]> git.saurik.com Git - bison.git/blame - ChangeLog
* data/glr.c (YYRECOVERING): Define to be a function-like macro
[bison.git] / ChangeLog
CommitLineData
02103984
PE
12006-05-30 Paul Eggert <eggert@cs.ucla.edu>
2
3 * data/glr.c (YYRECOVERING): Define to be a function-like macro
4 with no arguments, not as an object-like macro. This is for
5 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
6 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8 Document this.
9
2c08afa5
JD
102006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
11
12 * src/getargs.c (usage): Back out yesterday's modification of the
13 --help output so that we don't have to wait for translation before
14 releasing 2.3.
15
6077da58
PE
162006-05-29 Paul Eggert <eggert@cs.ucla.edu>
17
18 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
19 Problem reported by Akim Demaille.
20
2a26b6c2
JD
212006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
22
23 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
24
aefef0d6
PE
252006-05-26 Paul Eggert <eggert@cs.ucla.edu>
26
27 * data/yacc.c (yy_reduce_print): Omit trailing white space in
28 generated source code. Problem reported by Frans Englich in
29 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
30
fcd8e201
PE
312006-05-22 Paul Eggert <eggert@cs.ucla.edu>
32
33 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
34 shell, not within 'make', so that 'make' by an ordinary builder
35 (using GNU make) does not worry about configuring gzip. This also
36 works around a bug reported independently by Keith Thompson and by
37 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
38 stderr rather than stdout, messing up the build logs.
39
7b5cdcbd
JD
402006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
41
42 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
43 to make sure that YYID will never be unused. This fixes a 'make
44 maintainer-check' failure caused by the recent changes to the 'Trivial
45 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
46 not used.
47 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
48
5ad0a449
JD
492006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
50
51 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
52 state before an empty RHS is always resolved here. Only the location
53 of that state is guaranteed to be resolved, and that's enough. This
54 fixes the remaining bug reported by Derek M. Jones in
55 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
56 * tests/glr-regression.at (Uninitialized location when reporting
57 ambiguity): Test the above case.
58 Also, the embedded comments in this test case claim it checks the case
59 of an empty RHS that has inherited the initial location. However, the
60 corresponding LHS was already resolved, so yyresolveLocations didn't
61 actually have reason to modify it. Fix this by forcing
62 nondeterministic operation at the beginning of the parse.
63
50cce58e
PE
642006-05-20 Paul Eggert <eggert@cs.ucla.edu>
65
66 * data/c.m4 (b4_yy_symbol_print_generate):
67 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
68 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
69 of the bugs reported today by Derek M Jones in
70 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
71 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
72 defined to be a type name without parens or brackets.
73 (Location Type): Similarly for YYLTYPE.
74 * tests/regression.at (Trivial grammars): Put in a test for this
75 bug that will be caught by 'make maintainer-check' (though not,
76 alas, by 'make check' unless your compiler is picky).
77
ab8d9dc5
PE
782006-05-19 Paul Eggert <eggert@cs.ucla.edu>
79
0d2c8934 80 * NEWS: Version 2.2.
ab8d9dc5
PE
81 * configure.ac (AC_INIT): Likewise.
82
9138c575
JD
832006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
84
85 * data/glr.c (yyreportTree): Make room in yystates for the state
86 preceding the RHS. This fixes the segmentation fault reported by Derek
87 M. Jones in
88 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
89 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
90 to the user. Reported for yyreportTree by Derek M. Jones later in the
91 same thread.
92 * THANKS: Add Derek M. Jones.
93 Update my email address.
94 Fix typo in Steve Murphy's name.
95
276f48df
PE
962006-05-14 Paul Eggert <eggert@cs.ucla.edu>
97
d6645148
PE
98 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
99 checking against YYLAST that caused the parser to miss a potential
100 alternative in its diagnostic.
101 Problem reported by Maria Jose Moron Fernandez in
102 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
103 * data/lalr1.cc (yysyntax_error_): Likewise.
104 * data/yacc.c (yysyntax_error): Likewise.
105 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
106 tokens, in case we run into an older C compiler.
107 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
108 Use them to check for the off-by-one error fixed above.
109
276f48df
PE
110 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
111 YYSIZE_T, not size_t.
112 * tests/regression.at (Trivial grammars): New test, to catch
113 the error fixed by the above patch.
114
cd8b5791
AD
1152006-05-14 Akim Demaille <akim@lrde.epita.fr>
116
117 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
118 scheme.
119 Reported by Steve Murphy.
120
34376418
AD
1212006-05-14 Akim Demaille <akim@lrde.epita.fr>
122
123 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
124 * data/glr.cc: b4_location_flag is now b4_locations_flag.
125
327afc7c
AD
1262006-05-14 Akim Demaille <akim@lrde.epita.fr>
127
128 Implement --trace=m4.
129 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
130 * src/output.c (output_skeleton): When set, pass -dV to m4.
131
132 Factor the handling of flags in m4.
133 * src/output.c (prepare): Rename the muscle names debug, defines,
134 error_verbose to debug_flag, defines_flag, error_verbose_flag.
135 * data/c.m4: Adjust.
136 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
137 Use b4_define_flag_if to define other b4_FLAG_if macros.
138 (b4_location_if): As a consequence, rename as...
139 (b4_locations_if): this, for consistency.
140 Adjust all the skeletons.
141
ba9ecd19
AD
1422006-05-14 Akim Demaille <akim@lrde.epita.fr>
143
144 * etc/bench.pm: Shorten bench names.
145
4e83ea15
AD
1462006-05-14 Akim Demaille <akim@lrde.epita.fr>
147
148 * src/output.h, src/output.c (error_verbose): Move to...
149 * src/getargs.h, src/getargs.c: here.
150 Sort the flags.
151 Adjust dependencies.
152
6e93d810
PE
1532006-05-13 Paul Eggert <eggert@cs.ucla.edu>
154
155 * data/c.m4 (b4_copyright): Put the special exception for Bison
156 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
157 uses changed. Suggested by Akim Demaille. Also, wrap the
158 copyright notice, in case it is longer than 80 columns. Replace
159 comma by newline after title.
6e93d810 160
eaea13f5
PE
1612006-05-11 Paul Eggert <eggert@cs.ucla.edu>
162
163 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
164 incompatibility, not a bug. Mention that it wasn't fixed as of
165 flex 2.5.33.
166
3cf084ec
AD
1672006-05-11 Akim Demaille <akim@lrde.epita.fr>
168
169 * examples/extexi: Enforce the precedence of concatenation over
170 >>.
0a9f1c7d 171 Reported by Tommy Nordgren.
3cf084ec 172
32c96bd7
AD
1732006-05-11 Akim Demaille <akim@lrde.epita.fr>
174
175 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
176 with the member "token".
f94705b2 177 Reported by Martin Nylin.
32c96bd7 178
eaea13f5
PE
1792006-05-08 Paul Eggert <eggert@cs.ucla.edu>
180
181 * data/glr.c: Switch to Bison 2.2 special-exception language in
182 the copyright notice. Use more-regular format for titles and
183 copyright notices.
184 * data/glr.cc: Likewise.
185 * data/location.cc: Likewise.
186 * data/yacc.cc: Likewise.
187 * doc/bison.texinfo (Conditions): Document this.
188 * NEWS: likewise. Upgrade version to 2.2.
189
6e2d1146
AD
1902006-04-27 Akim Demaille <akim@lrde.epita.fr>
191
192 * data/glr.cc: Remove dead code.
193
47671055
PE
1942006-04-25 Paul Eggert <eggert@cs.ucla.edu>
195
196 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
197 that variable and the line breaks the bootstrap. Problem reported
198 by Juan M. Guerrero.
199
ed2e6384
AD
2002006-04-24 Akim Demaille <akim@lrde.epita.fr>
201
202 * doc/bison.texinfo (Multiple start-symbols): New.
203
3cedc2dc
AD
2042006-04-24 Akim Demaille <akim@lrde.epita.fr>
205
206 * etc/README, etc/bench.pl: New.
207
b2ddc3f3
AD
2082006-04-03 Akim Demaille <akim@lrde.epita.fr>
209
210 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
211 rule.
212 Reported by Mickael Labau.
213 * tests/input.at (Torturing the Scanner): Test it.
214
91e3ac9a
PE
2152006-03-16 Paul Eggert <eggert@cs.ucla.edu>
216
217 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
218 Problem reported by Bob Rossi.
219
2202006-03-13 Paul Eggert <eggert@cs.ucla.edu>
221
222 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
223 and didn't really work.
224 For the index, use @ifnotinfo, not @iftex.
225 Minor cleanups of spacing and terminology.
226
5cf61e93
AD
2272006-03-12 Akim Demaille <akim@lrde.epita.fr>
228
229 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
230 of AT_NAME_PREFIX when %name-prefix is not used.
231
aa08666d
AD
2322006-03-12 Akim Demaille <akim@lrde.epita.fr>
233
234 Apply --prefix to C++ skeletons too: they change the namespace.
235 The test suite already exercize these cases.
236 * data/c++.m4 (b4_namespace): New.
237 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
238 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
239 * data/yacc.c, data/glr.c: Remove a useless `[]'.
240 * doc/bison.texinfo: Document it.
241 (Option Cross Key): Use @multitable in all formats. It looks
242 nicer, even in TeX outputs.
243 (Rules): Use the same code whatever the output type is.
244 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
245 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
246 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 247
45567173
AD
2482006-03-10 Akim Demaille <akim@lrde.epita.fr>
249
250 * TODO: Remove dead items.
251
e9d8f881 2522006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
253
254 * doc/FAQ: Remove, merged into...
255 * doc/bison.texinfo (FAQ): this.
256 * doc/Makefile.am (EXTRA_DIST): Adjust.
257
c095d689
AD
2582006-03-10 Akim Demaille <akim@lrde.epita.fr>
259
260 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
261 even if empty.
262 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
263 * doc/bison.texinfo (Calc++ Scanner): Use it.
264
6e0f8287
PE
2652006-03-09 Paul Eggert <eggert@cs.ucla.edu>
266
267 Fix two nits reported by twlevo, plus one more that I discovered.
268
269 * src/assoc.h (assoc_to_string): Give a name to the arg, as
270 this is the usual Bison style.
271 * src/location.h (location_print): Likewise.
272
273 * src/reader.h (token_name): Likewise.
274
d6b771c3
PE
2752006-03-08 Paul Eggert <eggert@cs.ucla.edu>
276
277 Fix some nits reported by twlevo.
278 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
279 and "POSIX". Use more-modern syntax for URLs. Mention C++
280 and ask for Java. Don't hardwire OS version numbers. Add
281 copyright notice.
282 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
283 * src/conflicts.c (solved_conflicts_obstack): Now static.
284
1e137b71
JD
2852006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
286
287 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
288 page. Say "you can use it" not "you may use it" as on the web page;
289 we're describing capabilities not granting permission.
290
73f2e47e
PE
2912006-03-06 Paul Eggert <eggert@cs.ucla.edu>
292
6d05403d
PE
293 * data/glr.c (yyresolveLocations): Rename local variables to avoid
294 shadowing warnings. Use usual patter for iterating through RHS.
295 * tests/glr-regression.at
296 (Uninitialized location when reporting ambiguity):
297 Modify yylex so that it uses its argument, rather than trying
298 to rely on ARGSUSED (which doesn't work for gcc with warnings).
299 const char -> char const.
300
73f2e47e
PE
301 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
302 Don't use tabs inside commands; it messes up 'ps'.
303 Problem reported by twlevo.
304
8710fc41
JD
3052006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
306
307 * tests/glr-regression.at (Uninitialized location when reporting
308 ambiguity): New test case.
309 * data/glr.c (yyresolveLocations): New function, which uses
310 YYLLOC_DEFAULT.
311 (yyresolveValue): Invoke yyresolveLocations before reporting an
312 ambiguity.
313 * doc/bison.texinfo (Default Action for Locations): Note
314 YYLLOC_DEFAULT's usage for ambiguity locations.
315 (GLR Semantic Actions): Cross-reference those notes.
316
ae952af2
JD
3172006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
318
319 * tests/glr-regression.at (Leaked semantic values when reporting
320 ambiguity): Remove unnecessary union and type declarations.
321 (Leaked lookahead after nondeterministic parse syntax error): New test
322 case.
323 * data/glr.c (yyparse): Check for zero stacks remaining before
324 attempting to shift the lookahead so that you don't lose it.
325
35ee866a
JD
3262006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
327
328 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
329 * tests/glr-regression.at (Leaked semantic values when reporting
330 ambiguity): New test case.
331 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
332 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
333 now unnecessary yystackp parameter.
334 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
335 destructors can be called.
336
337 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
338 in existing testcases.
339
520181ab
JD
3402006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
341
342 Don't leak semantic values for parent RHS when a user action cuts the
343 parser, and clean up related code a bit.
344 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
345 cuts parse): Rename to...
346 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
347 for leaked parent RHS values.
348 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
349 between an unresolved state (non-empty chain of semantic options) and
350 an incomplete one (signaled by an empty chain).
ae952af2 351 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
352 successfully or unsuccessfully resolved yyGLRState to...
353 (yyresolveValue): ... here so that yyresolveValue always leaves a
354 yyGLRState with consistent data and thus is easier to understand.
355 Remove the yyvalp and yylocp parameters since they are always just
356 taken from the yys parameter. When reporting a discarded merged value
357 in debugging output, note that it is incompletely merged. Document the
358 interface.
359 (yyresolveAction): If resolving any of the RHS states fails, destroy
360 them all rather than leaking them. Thus, as long as user actions are
361 written to clean up the RHS correctly, yyresolveAction always cleans up
362 the RHS of a semantic option. Document the interface.
363
18d9185c
PE
3642006-02-27 Paul Eggert <eggert@cs.ucla.edu>
365
366 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
367 led to a segmentation fault in GNU Pascal. Problem reported
368 by Waldek Hebisch.
369
841a7737
JD
3702006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
371
372 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
373 mid-rule action inside a nonterminal symbol in order to declare a
374 destructor for its semantic value.
375
fc3f467f
PE
3762006-02-16 Paul Eggert <eggert@cs.ucla.edu>
377
378 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
379 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
380 __cplusplus && ! defined _STDLIB_H && !
381 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
382 defined free))]: Include <stdlib.h> rather than rolling our own
383 declarations of malloc and free, to avoid problems with
384 incompatible declarations (using 'throw') C++'s stdlib.h. This
385 should fix Debian bug 340012
386 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
387 reported by Guillaume Melquiond.
388
a3af26dd
PE
3892006-02-13 Paul Eggert <eggert@cs.ucla.edu>
390
4d7bc38c
PE
391 * NEWS: Clarify symbols versus types in unused-value warnings.
392
a3af26dd
PE
393 * configure.ac (AC_INIT): Bump version number.
394
4e26c69e
PE
3952006-02-13 Paul Eggert <eggert@cs.ucla.edu>
396
397 * NEWS: Version 2.1a.
398 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
399 since C99 requires this.
400
498e897c
PE
4012006-02-11 Paul Eggert <eggert@cs.ucla.edu>
402
403 * m4/c-working.m4: New file.
404 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
405
57bb17ca
PE
4062006-02-10 Paul Eggert <eggert@cs.ucla.edu>
407
408 * Makefile.maint: Merge from coreutils.
409
0be105dc
PE
4102006-02-09 Paul Eggert <eggert@cs.ucla.edu>
411
412 More portability fixes for problems summarized by Nelson H. F. Beebe.
413
414 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
415 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
416 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
417 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
418 messes up because C++ code is compiled in 32-bit mode but linked
419 in 64-bit mode.
420
6fc0c024
PE
4212006-02-08 Paul Eggert <eggert@cs.ucla.edu>
422
423 More portability fixes for problems summarized by Nelson H. F. Beebe.
424
7870f699
PE
425 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
426 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
427
6fc0c024
PE
428 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
429 nodist_PROGRAMS, since we don't need to actually compile the
430 example if we're just doing a plain 'make'. This avoids bothering
431 the installer unnecessarily about problems due to weird C++
432 compilers.
433
fe6c2fde
PE
4342006-02-06 Paul Eggert <eggert@cs.ucla.edu>
435
436 More portability fixes for problems summarized by Nelson H. F. Beebe.
437
438 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
439 than #include "...", and compile with -I'.'. The old method was
440 not portable, according to Posix and the C standard, and it does
441 not work with Sun C 5.7, where previous #line directives affect
442 the working directory used in later #include "..." directives.
443
927b425b
JMG
4442006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
445
446 Various DJGGP specific issues in /djgpp
447
d9735e9e
PE
4482006-02-02 Paul Eggert <eggert@cs.ucla.edu>
449
450 More portability fixes for problems summarized by Nelson H. F. Beebe.
451
452 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
453 '#include <map>' works and that you can apply ++ to iterators.
454
5a6755af
PE
4552006-02-01 Paul Eggert <eggert@cs.ucla.edu>
456
67a0dc4f
PE
457 Work around portability problems summarized by Nelson H. F. Beebe in
458 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
459
8c86f0ef
PE
460 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
461 that '#include <string>' works.
462
de35dd59
PE
463 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
464 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
465 "warning: sorry: semantics of inline function static data `const
466 unsigned char translate_table[262]' are wrong (you'll wind up with
467 multiple copies)".
468
67a0dc4f
PE
469 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
470 or, xor to not_, and_, or_, and xor_, respectively. This works
471 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
472 random system header somewhere that includes the equivalent of
473 <iso646.h>.
474
5a6755af
PE
475 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
476 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 477 Suite Version 2.0.
5a6755af 478
3f001415
JD
4792006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
480
481 During deterministic GLR operation, user actions should be able to
482 influence the parse by changing yychar. To make this easier to fix and
483 to make glr.c easier to evolve in general, don't maintain yytoken in
484 parallel with yychar; just compute yytoken when needed.
485 * tests/glr-regression.at (Incorrect lookahead during deterministic
486 GLR): Check that setting yychar in a user action has the intended
487 effect.
488 * data/glr.c (yyGLRStack): Remove yytokenp member.
489 (yyclearin): Don't set *yytokenp.
490 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
491 yychar rather than *yytokenp to determine the current lookahead.
492 Compute yytoken locally when needed.
493 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
494 point to.
495
496 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
497 after `--report' documentation.
498
e2a8c0f5
PE
4992006-01-30 Paul Eggert <eggert@cs.ucla.edu>
500
501 * src/parse-gram.y (grammar_declaration): Location of printer
502 symbol is @1, not list->location. Bug reported by twlevo.
503 * tests/input.at (Incompatible Aliases): Adjust to above change.
504
6b702268
PE
5052006-01-29 Paul Eggert <eggert@cs.ucla.edu>
506
27622431
PE
507 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
508 all the test at once. This makes the output easier to read in the
509 normal case.
510
6b702268
PE
511 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
512 got from <http://bro-ids.org/download.html>. The bug is that
513 when two actions appeared in succession, the second one was
514 scanned before the first one was added to the grammar rule
515 as a midrule action. Bison then output the incorrect warning
516 "parse.y:905.17-906.36: warning: unused value: $3".
517 * src/parse-gram.y (BRACED_CODE, action): These are no longer
518 associated with a value.
519 (rhs): Don't invoke grammar_current_rule_action_append.
520 (action): Invoke it here instead.
521 * src/reader.c (grammar_midrule_action): Now extern.
522 (grammar_current_rule_action_append): Don't invoke
523 grammar_midrule_action; that is now the scanner's job.
524 * src/reader.h (last_string, last_braced_code_loc):
525 (grammar_midrule_action): New decls.
526 * src/scan-gram.l (last_string): Now extern, sigh.
527 (last_braced_code_loc): New extern variable.
528 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
529 rule already has an action.
530 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
531 * tests/input.at (AT_CHECK_UNUSED_VALUES):
532 Add some tests to check that the above changes fixed the bug.
533
d40ba6c2
PE
5342006-01-27 Paul Eggert <eggert@cs.ucla.edu>
535
536 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
537 All used changed. Check whether the symbol has a destructor,
538 not whether it is typed.
539 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
540 that the values are still reported as unused. All line numbers
541 adjusted.
542
401aace6
PE
5432006-01-23 Paul Eggert <eggert@cs.ucla.edu>
544
545 Work around a bug in bro 0.8, which underparenthesizes its
546 definition of YYLLOC_DEFAULT.
547 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
548 their arguments.
549 * data/lalr1.cc: Likewise.
550 * data/yacc.cc: Likewise.
551
06f01bc4
PE
5522006-01-22 Paul Eggert <eggert@cs.ucla.edu>
553
401aace6
PE
554 Work around a bug in Pike 7.0, and give the Pike folks a
555 better way to override the usual int widths.
556 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
557 user can override the types.
558 (short): #undef, to work around a bug in Pike 7.0.
559 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
560 (union yyalloc.yyss): Use yytype_int16 rather than short.
561 All uses changed.
562 (yysigned_char): Remove.
563 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
564 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
565 * tests/regression.at (Web2c Actions): Adjust to above changes.
566
567 * src/reader.c (check_and_convert_grammar): New function.
568 (reader): Close the input file even if something went wrong during
569 parsing. Minor file descriptor leak reported by twlevo.
570
06f01bc4
PE
571 * src/assoc.c (assoc_to_string): Use a default: abort (); case
572 to pacify gcc -Wswitch-default.
573 * src/scan-gram.l (adjust_location): Use a default: break; case
574 to pacify gcc -Wswitch-default.
575 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
576 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
577 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
578 Move these decls to scan-skel.l, since they don't need to be
579 visible elsewhere.
580 * src/scan-skel.l: Accept the above decls.
581 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
582 is used.
583
02650b7f
PE
5842006-01-21 Paul Eggert <eggert@cs.ucla.edu>
585
586 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
587 since we don't want to insist on a version number at the start
588 of the changelog every time.
589 * Makefile.maint: Sync from coreutils a bit better.
590 (sc_trailing_blank): Renamed from sc_trailing_space.
591 All uses changed.
592 (sc_no_if_have_config_h, sc_require_config_h):
593 (sc_prohibit_assert_without_use): New rules.
594 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
595 (sc_dd_max_sym_length): Fix leading spaces in rule.
596 (sc_system_h_headers): Prefix with @.
597 (sc_useless_cpp_parens, m4-check): Output line numbers.
598 (changelog-check): Allow version only in head.
599 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
600 satisfy new Makefile.maint rule.
601 * data/glr.c: Likewise.
602 * data/glr.cc: Likewise.
603 * data/lalr1.cc: Likewise.
604 * data/yacc.c: Likewise.
605 * lib/ebitsetv.c: Likewise.
606 * lib/lbitset.c: Likewise.
607 * lib/subpipe.c: Likewise.
608 * lib/timevar.c: Likewise.
609 * src/system.h: Likewise.
610 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
611 * djgpp/Makefile.maint: Add copyright notice.
612 * djgpp/README.in: Likewise.
613 * djgpp/config.bat: Likewise.
614 * djgpp/config.site: Likewise.
615 * djgpp/config_h.sed: Likewise.
616 * djgpp/djunpack.bat: Likewise.
617 * djgpp/config.sed: Fix copyright notice to match standard format.
618 * djgpp/subpipe.h: Likewise.
619 * lib/bitsetv-print.c: Likewise.
620 * lib/bitsetv.c: Likewise.
621 * lib/subpipe.h: Likewise.
622 * lib/timevar.c: Likewise.
623 * lib/timevar.h: Likewise.
624 * djgpp/subpipe.c: Use standard recipe for config.h.
625 * lib/abitset.c: Likewise.
626 * lib/bitset.c: Likewise.
627 * lib/bitset_stats.c: Likewise.
628 * lib/bitsetv-print.c: Likewise.
629 * lib/bitsetv.c: Likewise.
630 * lib/ebitsetv.c: Likewise.
631 * lib/get-errno.c: Likewise.
632 * lib/lbitset.c: Likewise.
633 * lib/subpipe.c: Likewise.
634 * lib/timevar.c: Likewise.
635 * lib/vbitset.c: Likewise.
636 * tests/local.at: Likewise.
637 * src/scan-gram.l: Don't include verify.h, since system.h does
638 that for us.
639 * .x-sc_require_config_h: New file.
640 * .x-sc_unmarked_diagnostics: New file.
641
287c78f6
PE
6422006-01-20 Paul Eggert <eggert@cs.ucla.edu>
643
287c78f6
PE
644 Be a bit more systematic about using 'abort'.
645 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
646 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
647 Put 'default: abort ();' before some other case, to satisfy older
648 pedantic compilers.
649 * lib/bitset_stats.c (bitset_stats_init): Likewise.
650 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
651 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
652 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
653 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
654 (get_decision_str, get_orientation_str, get_node_alignment_str):
655 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
656 (get_linestyle_str, get_arrowstyle_str): Likewise.
657 * src/conflicts.c (resolve_sr_conflict):
658 Use a default case rather than one for the one remaining enum
659 value, to catch invalid enum values as well.
660 * src/lalr.c (set_goto_map, map_goto):
661 Prefer "assert (FOO);" to "if (!FOO) abort ();".
662 * src/nullable.c (nullable_compute, token_definitions_output):
663 Likewise.
664 * src/reader.c (packgram, reader): Likewise.
665 * src/state.c (transitions_to, state_new, state_reduction_find):
666 Likewise.
667 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
668 (symbol_pack): Likewise.
669 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
670 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
671 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
672 * src/system.h: Don't include <assert.h>.
673 (assert): New macro.
674
675 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
676 (Destructor Decl, Parser Function, Pure Calling):
677 Describe rules for braces inside C code more carefully.
287c78f6 678
c66dfadd
PE
6792006-01-19 Paul Eggert <eggert@cs.ucla.edu>
680
c21493b8
PE
681 Fix some porting glitches found by Nelson H. F. Beebe.
682 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
683 compilers that don't understand that abort () does not return.
684 * src/state.c (transitions_to): Likewise.
685 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
686 that '#include <cstdlib>' works.
687 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
688 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
689 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
690 for the benefit of some pre-C99 compilers.
691
b6e3facf
PE
692 * bootstrap: Undo changes to gnulib files that autoreconf made.
693
c66dfadd
PE
694 Minor fixups to get 'make maintainer-check' to work.
695 * configure.ac: Don't use -Wnested-externs, as it's incompatible
696 with the new verify.h implementation.
697 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
698 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
699 * data/yacc.c (YYUSE): Likewise.
700 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
701 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
702 * src/parse-gram.y (declaration): Don't pass a string constant
703 to a function that expects char *, since GCC might complain
704 about the constant value.
705 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
706 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
707 before #defining them.
708 * tests/glr-regression.at
709 (Incorrectly initialized location for empty right-hand side in GLR):
710 In yyerror, use the msg arg.
711 (Corrupted semantic options if user action cuts parse):
712 (Incorrect lookahead during deterministic GLR):
713 (Incorrect lookahead during nondeterministic GLR):
714 Don't name a local var 'index'; it shadows string.h's 'index'.
715
ed94ef2a
AD
7162006-01-19 Akim Demaille <akim@epita.fr>
717
718 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
719 location, not just parts of it.
720
e9ad4aec
PE
7212006-01-18 Paul Eggert <eggert@cs.ucla.edu>
722
d6ca7905
PE
723 * NEWS: Document the fact that multiple %unions are now allowed.
724 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
725 * TODO: This feature is now implemented, so remove it from
726 the wishlist.
d6ca7905 727
ef1b70e0
PE
728 * Makefile.maint: Merge with coreutils Makefile.maint.
729 (CVS_LIST): Use build-aux version if available.
730 (VERSION_REGEXP): New macro.
731 (syntax-check-rules): Add sc_no_if_have_config_h,
732 sc_prohibit_assert_without_use, sc_require_config_h,
733 sc_useless_cpp_parens.
734 (sc_obsolete_symbols): Check for O_NDELAY.
735 (sc_dd_max_sym_length): Track coreutils.
736 (sc_unmarked_diagnostics): Look in all files, not just *.c.
737 (sc_useless_cpp_parens): New rule.
738 (news-date-check): Look for version or today's date.
739 (changelog-check): Don't require version number near head.
740 (copyright-check): Use current year instead of hardwiring 2005.
741 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
742 (announcement): Add --gpg-key-ID.
743
744 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
745 with "file system".
746
2073ce56 747 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
748 array. Problem reported by twlevo.
749 * src/reader.c (packgram): Prepend a new sentinel before ritem.
750 * src/lalr.c (build_relations): Rely on new sentinel.
751 * src/gram.c (gram_free): Adjust to new sentinel.
752
b7691f15
JD
7532006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
754
755 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
756 yylookaheadNeeds. All uses updated.
757 (yysplitStack): Rename local yynewLookaheadStatuses to
758 yynewLookaheadNeeds.
759 * data/glr-regression.at (Incorrect lookahead during nondeterministic
760 GLR): In comments, change `lookahead status' to `lookahead need'.
761
ddee1b06
PH
7622006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
763
764 * data/glr.c (yysplitStack): A little stylistic rewrite.
765
12f4614d
PH
7662006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
767
768 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
769
32c29292
JD
7702006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
771
772 * doc/bison.texinfo: Fix some typos.
773 (GLR Semantic Actions): New subsection discussing special
774 considerations because GLR semantic actions might be deferred.
775 (Actions): Mention look-ahead usage of yylval.
776 (Actions and Locations): Mention look-ahead usage of yylloc.
777 (Special Features for Use in Actions): Add YYEOF entry and mention it
778 in the yychar entry.
779 In the yychar entry, remove mention of the local yychar case (pure
780 parser) since this is irrelevant information when writing semantic
781 actions and since it's already discussed in `Bison Symbols' where
782 yychar is otherwise described as an external variable.
783 In the yychar entry, don't call it the `current' look-ahead since it
784 isn't when semantic actions are deferred.
785 In the yychar and yyclearin entries, add note about deferred semantic
786 actions.
787 Add yylloc and yylval entries discussing look-ahead usage.
788 (Look-Ahead Tokens): When discussing yychar, don't call it the
789 `current' look-ahead, and do mention yylval and yylloc.
790 (Error Recovery): Cross-reference `Action Features' when mentioning
791 yyclearin.
792 (Bison Symbols): In the yychar entry, don't call it the `current'
793 look-ahead.
794 In the yylloc and yylval entries, mention look-ahead usage.
795
de366a2f 7962006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
797
798 * tests/glr-regression.at: Update copyright year to 2006.
799
bf70fa87
JD
8002006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
801
802 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
803 use during nondeterministic operation to track which stacks have
804 actually needed the current lookahead.
805 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
806 Allocate, deallocate, resize, and otherwise shuffle space for
807 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
808 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
809 appropriately during nondeterministic operation.
810 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
811 members to store the current lookahead to be used by the deferred
812 user action.
813 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
814 from which the RHS is taken. Set the lookahead members of the new
815 yySemanticOption according to the lookahead status for stack yyk.
816 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
817 yyaddDeferredAction.
818 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
819 members of yySemanticOption before invoking yyuserAction, and then set
820 them back to their current values afterward.
821 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
822 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
823 * tests/glr-regression.at: Remove `.' from the ends of recent test case
824 titles for consistency.
825 (Leaked merged semantic value if user action cuts parse): In order to
826 suppress lint warnings, use arguments in merge function, and assign
827 char value < 128 in main.
828 (Incorrect lookahead during deterministic GLR): New test case.
829 (Incorrect lookahead during nondeterministic GLR): New test case.
830
05449a2c
JD
8312006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
832
de366a2f 833 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
834 !yyvaluep as signal that no semantic value is available to print.
835 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
836 to print a semantic value.
837
4158e0a1 8382006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 839
4158e0a1
JD
840 * tests/glr-regression.at: For consistency with my newer test cases,
841 don't thank myself.
842
d659304d
JD
8432006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
844
845 * data/glr.c (yyresolveValue): When merging semantic options, if at
846 least one user action succeeds but a later one cuts the parse, then
847 destroy the semantic value before returning rather than leaking it.
848 (yyresolveStates): If a user action cuts the parse and thus
849 yyresolveValue fails, ignore the (unset) semantic value rather than
850 corrupting the yyGLRState, and empty the semantic options list since
851 the user actions should have called all necessary destructors.
852 Simplify code with YYCHK.
853 * tests/glr-regression.at (Corrupted semantic options if user action
854 cuts parse): New test case.
855 (Undesirable destructors if user action cuts parse): New test case.
856 Before applying any of this patch, this test case never actually failed
857 for me... but only because the corrupted semantic options usually
858 masked this bug.
859 (Leaked merged semantic value if user action cuts parse): New test
860 case.
861
6ec2c0f2
AD
8622006-01-05 Akim Demaille <akim@epita.fr>
863
864 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
865
1b9c21fb
PE
8662006-01-04 Paul Eggert <eggert@cs.ucla.edu>
867
868 * data/c.m4 (b4_c_modern): New macro, with a new provision for
869 _MSC_VER. Problem reported by Cenzato Marco.
870 (b4_c_function_def): Use it.
871 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
872 b4_c_modern.
873 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
874 than rolling our own.
875
84866159
AD
8762006-01-04 Akim Demaille <akim@epita.fr>
877
878 Also warn about non-used mid-rule values.
879 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
880 member.
881 (symbol_list_new): Adjust.
882 * src/reader.c (symbol_typed_p): New.
883 (grammar_rule_check): Use it.
884 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
885 Check its rule.
886 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
887 Use it.
888 * tests/actions.at (Exotic Dollars): Adjust.
889
378f4bd8
AD
8902006-01-04 Akim Demaille <akim@epita.fr>
891
892 * src/reader.c (grammar_midrule_action): If $$ is set in a
893 mid-rule, move the `used' bit to its lhs.
894 * tests/input.at (Unused values): New.
895 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
896
e2a21b6f
PE
8972006-01-03 Paul Eggert <eggert@cs.ucla.edu>
898
54662697
PE
899 * doc/bison.texinfo (Bison Options): Say more accurately what
900 --yacc does.
901 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
902 about declarations in the grammar when in Yacc mode, as POSIX does
903 not require a diagnostic when the grammar uses extensions.
904
905 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
906
073f9288
PE
907 Warn about dubious constructions like "%token T T".
908 Reported by twlevo.
909 * src/symtab.h (struct symbol.declared): New member.
910 * src/symtab.c (symbol_new): Initialize it to false.
911 (symbol_class_set): New arg DECLARING, specifying whether
912 this is a declaration that we want to warn about, if there
913 is more than one of them. All uses changed.
914
1221b78a
PE
915 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
916 Allow multiple %union directives, whose contents concatenate.
917 * src/parse-gram.y (grammar_declaration): Likewise.
918 Use muscle_code_grow, so that we don't need stype_line any more.
919 All uses changed.
920
921 * src/muscle_tab.c (muscle_grow): Fix comment.
922
e2a21b6f
PE
923 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
924 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
925 Update copyright year to 2006.
926
8f7e3cf9
AD
9272006-01-03 Akim Demaille <akim@epita.fr>
928
929 Have glr.cc pass (some of) the calc.at tests.
930 * data/glr.cc (b4_parse_param_orig): New.
931 (b4_parse_param): Improve its definition, and bound it more
932 clearly in the skeleton.
933 (b4_epilogue): Append, instead of prepending, in order to keep
934 #line consistency.
935 Simplify the generation of auxiliary functions: locations and
936 purity are mandated.
937 (b4_global_tokens_and_yystype): Honor it.
938 * data/location.cc (c++.m4): Don't include it.
939 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
940 and AT_SKEL_CC_IF.
941 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
942 AT_LALR1_CC_IF.
943 Be sure to initialize the first position's filename.
944 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
945 mandated anyway.
946 (AT_CHECK_CALC_GLR_CC): New.
947 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
948
3953ed88
AD
9492006-01-02 Akim Demaille <akim@epita.fr>
950
951 * src/output.c (output_skeleton): Don't hard wire the inclusion of
952 c.m4.
0a96ba81 953 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
954 * data/glr.cc: Do not include stack.hh.
955
9ecafbbf
AD
9562006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
957
958 * data/glr.c: Reformat whitespace with tabs.
959 (b4_lpure_formals): Remove this unused m4 macro.
960 * tests/cxx-type.at: Reformat whitespace with tabs.
961 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
962 since it's a member. Rename type to isNterm for clarity.
963
c4d497a0
AD
9642005-12-29 Akim <akim@sulaco.local>
965
966 Let glr.cc catch up with symbol_value_print.
967 * data/glr.cc (b4_yysymprint_generate): Replace by...
968 (b4_yy_symbol_print_generate): this.
969 (yy_symbol_print, yy_symbol_value_print): Declare them.
970
4517da37
PE
9712005-12-28 Paul Eggert <eggert@cs.ucla.edu>
972
973 * src/location.h (boundary): Note that a line or column equal
974 to INT_MAX indicates an overflow.
975 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
976 (rule_length_overflow, increment_rule_length, add_column_width):
977 New functions.
978 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
979 (<SC_BRACED_CODE>"}"):
980 Use increment_rule_length rather than incrementing it by hand.
981 (adjust_location, handle_syncline): Diagnose overflow.
982 (handle_action_dollar, handle_action_at):
983 Fix bug with monstrosities like $-2147483648.
984 Remove now-unnecessary checks.
985 (scan_integer): Verify assumptions and remove now-unnecessary checks.
986 (convert_ucn_to_byte): Verify assumptions.
987 (handle_syncline): New arg LOC. All callers changed.
988 Don't store through a value derived from char const * pointer.
989
990 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
991 GCC warnings.
992
e3233bf6
PE
9932005-12-27 Paul Eggert <eggert@cs.ucla.edu>
994
995 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
996 Remove unnecessary forward static decls.
997
8f3596a6
AD
9982005-12-27 Akim Demaille <akim@epita.fr>
999
1000 * src/reader.c (grammar_current_rule_check): Also check that $$
1001 is used.
1002 Take the rule to check as argument, hence rename as...
1003 (grammar_rule_check): this.
1004 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
1005 Rename as...
1006 (grammar_rule_begin, grammar_rule_end): these, for consistency.
1007 (grammar_midrule_action, grammar_symbol_append): Now static.
1008 * tests/torture.at (input): Don't rely on the default action
1009 being always performed.
1010 * tests/calc.at: "Set" $$ even when the action is "cut" with
1011 YYERROR or other.
1012 * tests/actions.at (Exotic Dollars): Instead of using unused
1013 values, check that the warning is issued.
1014
721be13c
PE
10152005-12-22 Paul Eggert <eggert@cs.ucla.edu>
1016
1017 * NEWS: Improve wording for unused-value warnings.
1018
a0af42fc
AD
10192005-12-22 Akim Demaille <akim@epita.fr>
1020
1021 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
1022 (b4_yysymprint_generate): Rename as...
1023 (b4_yy_symbol_print_generate): this.
1024 Generate yy_symbol_print instead of yysymprint.
1025 Generate also yy_symbol_value_print, and use it.
1026
affac613
AD
10272005-12-22 Akim Demaille <akim@epita.fr>
1028
721be13c 1029 * NEWS: Warn about unused values.
affac613
AD
1030 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
1031 a `used' member.
1032 (symbol_list_n_get, symbol_list_n_used_set): New.
1033 (symbol_list_n_type_name_get): Use symbol_list_n_get.
1034 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
1035 * src/reader.c (grammar_current_rule_check): Check that values are
1036 used.
1037 * src/symtab.c (symbol_print): Accept 0.
1038 * tests/existing.at: Remove the type information.
1039 Empty the actions.
1040 Remove useless actions (beware of mid-rule actions: perl -000
1041 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
1042 * tests/actions.at (Exotic Dollars): Use unused values.
1043 * tests/calc.at: Likewise.
1044 * tests/glr-regression.at (No users destructors if stack 0 deleted):
1045 Likewise.
1046
1047 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
1048 rule_useful_p.
1049
9d9b8b70
PE
10502005-12-21 Paul Eggert <eggert@cs.ucla.edu>
1051
8bb4c753
PE
1052 Undo 2005-12-01 tentative license wording change. The wording is
1053 still being reviewed by the lawyers, and we don't want to wait for
1054 them before publishing a test release. For now, revert to the
1055 previous wording.
1056 * NEWS: Undo 2005-12-01 change.
1057 * data/glr.c: Revert to previous license wording.
1058 * data/glr.cc: Likewise.
1059 * data/lalr1.cc: Likewise.
1060 * data/location.cc: Likewise.
1061 * data/yacc.c: Likewise.
1062
9d9b8b70
PE
1063 * NEWS: Reword %destructor vs YYABORT etc.
1064 * data/glr.c: Use American spacing, for consistency.
1065 * data/glr.cc: Likewise.
1066 * data/lalr1.cc: Likewise.
1067 * data/yacc.c: Likewise.
1068 * data/yacc.c: Reformat comments slightly.
1069 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
1070 for consistency. Fix some spelling errors and reword recently-included
1071 text slightly.
1072 * tests/cxx-type.at: Cast results of malloc, for C++.
1073
2c3b392a
AD
10742005-12-21 Joel E. Denny <address@hidden>
1075
1076 * tests/cxx-type.at: Construct a tree, count the parents of shared
1077 nodes, and free each node once and only once. Previously, the memory
1078 for semantic values was leaked instead.
1079
d6cff4dc
AD
10802005-12-21 Joel E. Denny <address@hidden>
1081
1082 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
1083 (yylval, yylloc): If pure, #define to yystackp->yyval and
1084 yystackp->yyloc similar to yychar and yynerrs.
1085 (yyparse): If pure, remove local yylval and yylloc. Add local
1086 yystackp to accommodate pure definitions of yylval and yylloc.
1087 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
1088 yylvalp and yyllocp to &yylval and &yylloc.
1089 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
1090 namespace. Previously, nerrs and char were missing, but lval and lloc
1091 weren't necessary.
1092 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
1093 yylvalp and yyllocp parameters since, if pure, these are now always
1094 accessible through yystackp. If not pure, they are still accessible
1095 globally.
1096 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
1097 `if (YYID (N))' to pacify lint.
1098
a85284cf
AD
10992005-12-21 Akim Demaille <akim@epita.fr>
1100
1101 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
1102 destroy the RHS symbols of a rule.
1103 * data/yacc.c (yylen): Initialize to 0.
1104 Keep its value to the number of items to possibly shift.
1105 In particular, a regular successful parse that ends on YYFINAL by
1106 a (internal) YYACCEPT must not have yylen != 0.
1107 (yyerrorlab, yyreturn): Pop the RHS.
1108 Reorder a bit to emphasize the `shifting' bits of code.
1109 (YYPOPSTACK): Now accept a number of items to pop.
1110 * data/lalr1.cc: Likewise.
1111 * data/glr.c: Formatting changes.
1112 Use goto instead of fall through.
1113 * doc/bison.texinfo (Destructor Decl): Complete.
1114
d508c281
JMG
11152005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1116
1117 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
1118 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
1119 * djgpp/config.bat: Replace every occurence of the file name
1120 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1121 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1122 * djgpp/config.sed: Replace every occurence of the file name
1123 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1124 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1125 * djgpp/djunpack.bat: DJGPP specific file.
1126 * djgpp/fnchange.lst: DJGPP specific file.
1127 * djgpp/README.in: Add new information about how to unpack the bison
1128 source on MSDOS and other systems which have 8.3 file name restrictions
1129 using djunpack.bat and fnchange.lst.
1130
3e7a2cd9
PE
11312005-12-12 Paul Eggert <eggert@cs.ucla.edu>
1132
1133 * bootstrap (build_cvs_prefix): Remove; unused.
1134 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
1135 when getting gnulib.
1136
11372005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
1138
1139 * data/glr.c: Reorder typedef declarations for structs to match order
1140 of struct declarations.
1141 Rename yystack everywhere to yystackp except in yyparse where it's not
1142 a pointer.
1143 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
1144 consistency.
1145 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
1146 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
1147 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
1148 lint.
1149
877519f8
PE
11502005-12-09 Paul Eggert <eggert@cs.ucla.edu>
1151
0eca5a39
PE
1152 * tests/sets.at (Accept): Fix typos in regular expression used to
1153 sed out the final state number.
1154
2cec9080
PE
1155 Work around portability problem on Solaris 10: flex-generated
1156 files include <stdio.h> before <config.h>, which messes up
1157 because the latter defines __EXTENSIONS__. Address the problem
1158 by creating two new little files that include <config.h> first,
1159 then include the flex-generated files. Rewrite everyone else
1160 to include <config.h> first, as well.
1161 * lib/timevar.c: Always include "config.h".
1162 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
1163 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
1164 (EXTRA_bison_SOURCES): New macro.
1165 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
1166 * src/system.h: Don't include config.h.
1167 * src/LR0.c: Include <config.h> first.
1168 * src/assoc.c: Likewise.
1169 * src/closure.c: Likewise.
1170 * src/complain.c: Likewise.
1171 * src/conflicts.c: Likewise.
1172 * src/derives.c: Likewise.
1173 * src/files.c: Likewise.
1174 * src/getargs.c: Likewise.
1175 * src/gram.c: Likewise.
1176 * src/lalr.c: Likewise.
1177 * src/location.c: Likewise.
1178 * src/main.c: Likewise.
1179 * src/muscle_tab.c: Likewise.
1180 * src/nullable.c: Likewise.
1181 * src/output.c: Likewise.
1182 * src/parse-gram.y: Likewise.
1183 * src/print.c: Likewise.
1184 * src/print_graph.c: Likewise.
1185 * src/reader.c: Likewise.
1186 * src/reduce.c: Likewise.
1187 * src/relation.c: Likewise.
1188 * src/state.c: Likewise.
1189 * src/symlist.c: Likewise.
1190 * src/symtab.c: Likewise.
1191 * src/tables.c: Likewise.
1192 * src/uniqstr.c: Likewise.
1193 * src/vcg.c: Likewise.
1194
877519f8
PE
1195 * src/parse-gram.y: Fix minor problems uncovered by lint.
1196 (current_lhs, current_lhs_location): Now static.
1197 (current_assoc): Remove unused variable.
1198
1199 Cleanups so that Bison-generated parsers have less lint.
1200 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
1201 Prepend /*ARGSUSED*/, for lint's sake.
1202 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
1203 definition if 'lint' is defined.
1204 (YYID): New macro (or function, if lint).
1205 All uses of /*CONSTCOND*/0 replaced by YYID(0).
1206 * data/yacc.c: Likewise.
1207 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
1208 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
1209 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
1210 is C++ only.
1211 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
1212 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
1213 Use YYID(0) rather than 0, for lint.
1214 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
1215 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
1216
f5228370
PE
12172005-12-07 Paul Eggert <eggert@cs.ucla.edu>
1218
1219 * tests/glr-regression.at
1220 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
1221 Close memory leak reported by twlevo.
1222
69ce078b
PE
12232005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
1224
6ff99711
PE
1225 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
1226 all stacks.
1227 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
1228 * tests/glr-regression.at (No users destructors if stack 0 deleted):
1229 New test case.
1230 (Duplicated user destructor for lookahead): This test now is expected
1231 to succeed.
1232
af3412cd
PE
12332005-12-01 Paul Eggert <eggert@cs.ucla.edu>
1234
32b5b719 1235 * NEWS: Document the following change.
af3412cd
PE
1236 * data/yacc.c: Say "parser skeleton" rather than "file", since
1237 it's no longer just a file.
1238 * data/glr.c: Grant a special exception for C GLR parsers, that
1239 reads like the already-existing exception for C LALR(1) parsers.
1240 * data/glr.cc: Likewise.
1241 * data/lalr1.cc: Likewise.
1242 * data/location.cc: Likewise.
1243 * data/yacc.c: Reword the "written by" statement to clarify that
1244 it was the parser skeleton, not the entire output file.
1245 * data/glr.c: Written by Paul Hilfinger.
1246 * data/glr.cc: Written by Akim Demaille.
1247 * data/lalr1.cc: Likewise.
1248
035aa4a0
PE
12492005-11-18 Paul Eggert <eggert@cs.ucla.edu>
1250
d9963c85
PE
1251 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
1252 Fix typos in previous change that broke 'make check'.
1253 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
1254 supported in C.
1255 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
1256 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
1257 We can revert this once things settle down.
1258
035aa4a0
PE
1259 * src/conflicts.c (conflicts_print): Don't print file name twice
1260 when %expect fails because there were no conflicts.
1261 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
1262 change.
1263 * tests/conflicts.at (%expect not enough, %expect too much):
1264 (%expect with reduce conflicts): Adjust to new behavior.
1265
12662005-11-18 Akim Demaille <akim@epita.fr>
1267
1268 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
1269 errors.
1270 * NEWS: Document this.
1271 * doc/bison.texinfo (Expect Decl): Likewise.
1272
d1ff7a7c
AD
12732005-11-16 Akim Demaille <akim@epita.fr>
1274
1275 Generalize the display of semantic values and locations in traces.
1276 * data/glr.c (yy_reduce_print): Fix indices (again).
1277 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
1278 literal integers.
1279 * data/lalr1.cc (yyreduce_print): Rename as...
1280 (yy_reduce_print): this.
1281 Display values and locations.
1282 * data/yacc.c (yy_reduce_print): Likewise.
1283 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
1284 (yysymprint): Move higher to be visible from yy_reduce_print).
1285 (yyparse): Adjust.
1286 * tests/calc.at: Adjust the expected length of the traces.
1287
6de5398d
AD
12882005-11-14 Akim Demaille <akim@epita.fr>
1289
1290 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
1291 from 1 to N, while values and location start at 0.
1292 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
1293
a1373f55
AD
12942005-11-14 Akim Demaille <akim@epita.fr>
1295
1296 * data/glr.c (yy_reduce_print): Fix the $ number.
1297
613d8952
AD
12982005-11-14 Akim Demaille <akim@epita.fr>
1299
1300 "Use" parse parameters.
1301 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
1302 * data/glr.c, data/glr.cc: Use them.
1303 * data/glr.c (YYUSE): Have a C++ definition that supports
1304 non-pointer types.
1305
b2741627
AD
13062005-11-14 Akim Demaille <akim@epita.fr>
1307
1308 * data/glr.c (yyexpandGLRStack): Declare only if defined.
1309
5059b5c8
AD
13102005-11-14 Akim Demaille <akim@epita.fr>
1311
42249483
AD
1312 * data/glr.cc: New.
1313 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 1314
4626a15d
AD
13152005-11-12 Akim Demaille <akim@epita.fr>
1316
1317 Let position and location be PODs.
1318 * data/location.cc (position::initialize, location::initialize): New.
1319 (position::position, location::location): Define only if
1320 b4_location_constructors is defined.
1321 * data/lalr1.cc (b4_location_constructors): Define it for backward
1322 compatibility.
1323 * doc/bison.texinfo (Initial Action Decl): Use initialize.
1324
13252005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
1326
1327 * data/lalr1.cc: Move the body of the ctor and dtor into the
1328 parser file (instead of the header).
1329 Wrap the implementations in a "namespace yy".
1330
13312005-11-12 Akim Demaille <akim@epita.fr>
1332
1333 Have glr.c include its header file when created.
1334 * data/glr.c (b4_shared_declarations): New.
1335 Output them verbatim in the parser if !%defines, otherwise
1336 output then in the header file, and include it instead.
1337
1989d947
AD
13382005-11-11 Akim Demaille <akim@epita.fr>
1339
1340 * data/glr.c: Comment changes.
1341
13422005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
1343
1344 When yydebug, report semantic and location values for reductions.
1345 * data/glr.c (yy_reduce_print): Report the semantic values and the
1346 locations.
1347 (YY_REDUCE_PRINT): Adjust.
1348 (yyglrReduce): Use them.
1349 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
1350 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
1351 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
1352 traces.
1353
02998094
AD
13542005-11-10 Akim Demaille <akim@epita.fr>
1355
1356 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
1357 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
1358 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
1359
5210672f
PE
13602005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
1361
1362 * m4/cxx.m4, examples/Makefile.am: Don't build
1363 examples/calc++ if no C++ compiler is available. (trivial change)
1364
a8991a1d
AD
13652005-11-09 Akim Demaille <akim@epita.fr>
1366
1367 * src/scan-skel.l: Use a couple of asserts.
1368
36b5e963
AD
13692005-11-03 Akim Demaille <akim@epita.fr>
1370
1371 In some (weird) cases, the final state number is incorrect.
1372 Reported by Alexandre Duret-Lutz.
1373 * src/LR0.c (state_list_append): Remove the computation of
1374 final_state.
1375 (save_reductions): Do it here.
1376 (get_state): Alpha conversion.
1377 (generate_states): Use a for loop.
1378 * src/gram.h (item_number_is_rule_number)
1379 (item_number_is_symbol_number): New.
1380 * src/state.c: Use assert.
1381 * src/system.h: Include assert.h.
1382 * tests/sets.at (Accept): New.
1383
44e7ead1
PH
13842005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1385
1386 * data/glr.c (yyfill): Adjust comment.
36b5e963 1387 (yyresolveAction): Initialize default location properly
44e7ead1
PH
1388 for empty right-hand sides.
1389 (yydoAction): Ditto.
1390 Add comment explaining apparently dead code.
36b5e963
AD
1391 * tests/glr-regression.at
1392 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 1393 New test.
36b5e963 1394
e10a80ee
PE
13952005-10-30 Paul Eggert <eggert@cs.ucla.edu>
1396
1397 * bootstrap (cleanup_gnulib): New function. Use it to clean up
1398 gnulib when interrupted. This fixes some race conditions and
1399 works around some portability problems (one noted by Paul
1400 Hilfinger).
1401
067b32ee
AD
14022005-10-22 Akim <akim@epita.fr>
1403
1404 * Makefile.cfg: Adjust to config -> build-aux.
1405 Reported by twledo.
1406
4b367315
AD
14072005-10-21 Akim Demaille <akim@epita.fr>
1408
1409 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
1410 the %parse-params.
1411 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
1412 * data/yacc.c (b4_Pure_if): Rename as...
1413 (b4_yacc_pure_if): this.
1414 (YY_SYMBOL_PRINT, yyparse): Adjust.
1415 * doc/bison.texinfo: Formatting changes.
1416
24cc23d9
AD
14172005-10-21 Akim Demaille <akim@epita.fr>
1418
1419 Finish the transition config -> build-aux.
1420 * configure.ac, Makefile.am: Use build-aux.
1421 * config/prev-version, config/announce-gen, config/Makefile.am:
1422 Move to...
1423 * build-aux/prev-version, build-aux/announce-gen,
1424 * build-aux/Makefile.am: here.
1425
d4476375
AD
14262005-10-14 Akim Demaille <akim@epita.fr>
1427
1428 * examples/calc++/test: Use set -x only when VERBOSE.
1429
302c0aee
PE
14302005-10-13 Paul Eggert <eggert@cs.ucla.edu>
1431
1432 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
1433 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
1434
7625ec2c
AD
14352005-10-13 Akim Demaille <akim@epita.fr>
1436
1437 * src/scan-skel.l: Output the base name parts of the parser and
1438 header file names.
302c0aee 1439 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
1440 additional checks.
1441 Use this to exercise C++ outputs in subdirs.
1442 Reported by Oleg Smolsky.
1443
ba0fe3c7
PE
14442005-10-12 Paul Eggert <eggert@cs.ucla.edu>
1445
1446 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
1447 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
1448 Problem reported by John P. Hartmann.
1449 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
1450 already defined it.
1451
9b8a5ce0
AD
14522005-10-12 Akim Demaille <akim@epita.fr>
1453
1454 * src/parse-gram.y (version_check): Exit 63 to please missing
1455 (stands for "version mismatch).
1456 * tests/input.at, doc/bison.texinfo: Adjust.
1457
4f6e011e
PE
14582005-10-10 Paul Eggert <eggert@cs.ucla.edu>
1459
1460 Work around portability problems with Visual Age C compiler
1461 (xlc and xlC_r) reported by John P. Hartmann.
1462 * data/location.cc (initial_column, initial_line): Remove.
1463 All uses replaced by 0 and 1.
1464 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
1465 that xlc complains about.
1466 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 1467 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 1468 as __STDC__.
4d7aa45e
PE
1469 * data/yacc.c (YYMODERN_C): New macro, which also looks at
1470 __STDC_VERSION__. Use it everywhere instead of looking at
1471 __STDC__ and __cplusplus.
4f6e011e 1472
a1b3bf8c
AD
14732005-10-10 Akim Demaille <akim@epita.fr>
1474
1475 * examples/calc++/test: Be quiet unless VERBOSE.
1476
412e44aa
PE
14772005-10-05 Paul Eggert <eggert@cs.ucla.edu>
1478
2a4647a3
PE
1479 * data/c.m4 (yydestruct, yysymprint):
1480 Use YYUSE instead of casting to void.
1481 * data/glr.c (YYUSE): New macro.
1482 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
1483 Use it instead of rolling our own.
1484 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
1485 (YYCHK1):
1486 Use /*CONSTCOND*/ to suppress lint warnings.
1487 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
1488 (YY_STACK_PRINT): Use 'false' not '0'.
1489 (YYUSE): New macro.
1490 (yysymprint_, yydestruct_): Use it instead of rolling our own.
1491 * data/yacc.c (YYUSE): New macro.
1492 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
1493 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
1494 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
1495
1496
412e44aa
PE
1497 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
1498 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
1499
88c6637f
PE
15002005-10-04 Paul Eggert <eggert@cs.ucla.edu>
1501
2f4f028d
PE
1502 Undo the parts of the unlocked-I/O change that substituted
1503 putc or puts for printf. This might hurt performance a bit,
1504 but some people prefer the printf style.
1505 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
1506 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
1507 All uses replaced by YYFPRINTF and YYDPRINTF.
1508 * data/yacc.c: Likewise.
1509 * lib/bitset.c (bitset_print): Likewise.
1510 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
1511 putc and puts.
1512 * lib/lbitset.c (debug_lbitset): Likewise.
1513 * src/closure.c (print_firsts, print_fderives): Likewise.
1514 * src/gram.c (grammar_dump): Likewise.
1515 * src/lalr.c (look_ahead_tokens_print): Likewise.
1516 * src/output.c (escaped_output): Likewise.
1517 (user_actions_output): Break apart two printfs.
1518 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
1519 * src/reduce.c (reduce_print): Likewise.
1520 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
1521 * src/system.h: Include unlocked-io.h rathe than stdio.h.
1522
88c6637f
PE
1523 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
1524 Use assignments rather than casts-to-void to suppress
1525 unused-variable warnings. This pacifies 'lint'.
1526 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
1527 unused-variable warnings.
1528
fb32e373
JMG
15292005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1530
1531 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
1532
edb8f44f
PE
15332005-10-02 Paul Eggert <eggert@cs.ucla.edu>
1534
fb9c0b33
PE
1535 Use unlocked I/O for a minor performance improvement on hosts like
1536 GNU/Linux and Solaris that support unlocked I/O. The basic idea
1537 is to use the gnlib unlocked-io module, and to prefer putc and
1538 puts to printf when either will work (since the latter doesn't
1539 come in an unlocked flavor).
1540 * bootstrap (gnulib_modules): Add unlocked-io.
1541 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
1542 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
1543 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
1544 and similarly for puts and putc and printf.
1545 * data/yacc.c: Likewise.
1546 * lib/bitset.c (bitset_print): Likewise.
1547 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
1548 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
1549 to printf.
1550 * lib/lbitset.c (debug_lbitset): Likewise.
1551 * src/closure.c (print_firsts, print_fderives): Likewise.
1552 * src/gram.c (grammar_dump): Likewise.
1553 * src/lalr.c (look_ahead_tokens_print): Likewise.
1554 * src/output.c (escaped_output): Likewise.
1555 (user_actions_output): Coalesce two printfs.
2f4f028d 1556 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
1557 * src/reduce.c (reduce_print): Likewise.
1558 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 1559 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 1560
edb8f44f
PE
1561 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
1562 this confuses xgettext.
1563
b50d2359
AD
15642005-10-02 Akim Demaille <akim@epita.fr>
1565
1566 * bootstrap (gnulib_modules): Add strverscmp.
1567 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
1568 * m4/.cvsignore: Add strverscmp.m4.
1569 * src/parse-gram.y (%require): New token, new rule.
1570 (version_check): New.
1571 * src/scan-gram.l (%require): Adjust.
1572 * tests/input.at (AT_REQUIRE): New.
1573 Use it.
1574 * doc/bison.texinfo (Require Decl): New.
1575 (Calc++ Parser): Use %require.
1576
21667f64
AD
15772005-10-02 Akim Demaille <akim@epita.fr>
1578
1579 * data/location.cc: New.
1580
2b81e969
AD
15812005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
1582 Akim Demaille <akim@epita.fr>
1583
1584 Make sure -odir/foo.cc creates dir/location.hh etc.
1585 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
1586 (spec_file_prefix, spec_verbose_file, spec_graph_file)
1587 (spec_defines_file): Now const.
1588 (dir_prefix): New.
1589 (short_base_name): Remove.
1590 * src/files.c: Adjust.
1591 (dirname.h): Include.
1592 (base_name): Don't prototype it.
1593 (finput): Remove, duplicates gram_in.
1594 (full_base_name, short_base_name): Replace by...
1595 (all_but_ext, all_but_tab_ext): these.
1596 (compute_base_names): Rename as...
1597 (compute_file_name_parts): this.
1598 Update to compute the new variables, including dir_prefix.
1599 Adjust dependencies.
1600 * src/output.c (prepare): Output them.
1601 * src/reader.c: Adjust to use gram_in, not finput.
1602 * src/scan-skel.l (@dir_prefix@): New.
1603
ad6a9b97
JMG
16042005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1605
1606 * lib/subpipe.c: New function end_of_output_subpipe() added
1607 to allow support for non-posix systems. This is a no-op function
1608 for posix systems.
1609
1610 * lib/subpipe.h: New function end_of_output_subpipe() added
1611 to allow support for non-posix systems. This is a no-op function
1612 for posix systems.
1613
1614 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
1615 handle the lack of pipe/fork functionality on non-posix systems.
1616
1617 * djgpp/Makefile.maint: DJGPP specific file.
1618
1619 * djgpp/README.in: DJGPP specific file.
1620
1621 * djgpp/config.bat: DJGPP specific configuration file.
1622
1623 * djgpp/config.sed: DJGPP specific configuration file.
1624
1625 * djgpp/config.site: DJGPP specific configuration file.
1626
1627 * djgpp/config_h.sed: DJGPP specific configuration file.
1628
1629 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
1630
1631 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
1632
fc695704
AD
16332005-10-02 Akim Demaille <akim@epita.fr>
1634
1635 * data/location.cc: New, extract from...
1636 * data/lalr1.cc: here.
1637 (location.hh): Include it after the user prologue, in case the
1638 filename type is defined by the user.
1639 Forward declation location and position before the pre-prologue.
1640 (yyresult_): Rename as...
1641 (yyresult): this, it's a local variable, not an attribute.
1642 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
1643
16442005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
1645
1646 * examples/extexi: Restore the #line generation.
1647
fb9712a9
AD
16482005-09-30 Akim Demaille <akim@epita.fr>,
1649 Alexandre Duret-Lutz <adl@gnu.org>
1650
1651 Move the token type and YYSTYPE in the parser class.
1652 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
1653 (parser::token): New, from the moved free definition of tokens.
1654 (parser::semantic_value): Now a full definition instead of an
1655 indirection to YYSTYPE.
1656 (b4_post_prologue): No longer included in the header file, but
1657 in the implementation file.
1658 * doc/bison.texi (C+ Language Interface): Update.
1659 * src/parse-gram.y: Support unary %define.
1660 * tests/actions.at: Define global_tokens_and_yystype for backward
1661 compatibility until we update the tests.
1662 * tests/calc.at: Idem.
1663 (first_line, first_column, last_line, last_column): Define for lalr1.cc
1664 to simplify the code.
1665
55f0c7b1
PE
16662005-09-29 Paul Eggert <eggert@cs.ucla.edu>
1667
1668 Port to SunOS 4.1.4, which lacks strtoul and strerror.
1669 Ah, the good old days! Problem reported by Peter Klein.
1670 * bootstrap (gnulib_modules): Add strerror, strtoul.
1671 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
1672 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
1673
fb9712a9 16742005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
1675
1676 * data/c.m4 (b4_error_verbose_if): New.
1677 * data/lalr1.cc: Use it.
1678 (YYERROR_VERBOSE_IF): Remove.
1679 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
1680 parser members, replaced by...
1681 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
1682 local variables.
1683 (yysyntax_error_): Takes the state number as argument.
1684 (yyreduce_print_): Use the argument yyrule, not the former
1685 attribute yyn_.
1686
8a6f72f3
PE
16872005-09-26 Paul Eggert <eggert@cs.ucla.edu>
1688
1689 * bootstrap (gnulib_modules): Add verify.
1690 * lib/.cvsignore: Add verify.h.
1691 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
1692 * src/system.h (verify): Remove.
1693 Include verify.h instead.
1694 * src/tables.c (tables_generate): Use new API for 'verify'.
1695
0d50976f
PE
16962005-09-21 Paul Eggert <eggert@cs.ucla.edu>
1697
ebc3737e
PE
1698 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
1699 local variables whose names begin with 'yy'.
1700 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1701 Trivial changes from Joel E. Denny.
1702
0d50976f
PE
1703 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
1704 it itself.
1705 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
1706 don't use alloca any more.
1707
1708 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
1709 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 1710 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
1711 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
1712 to match yacc.c, to test more hosts.
1713
a05b79df
PE
17142005-09-20 Paul Eggert <eggert@cs.ucla.edu>
1715
55289366
PE
1716 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
1717 doesn't affect behavior.
1718 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
1719 Solaris, AIX, MSC.
1720 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
1721 This works a bit better with glibc, if user code has already included
1722 stdlib.h.
1723 * doc/bison.texinfo (Bison Parser): Document that users can't
1724 arbitrarily use malloc and free for other purposes. Document
1725 that <alloca.h> and <malloc.h> might be included.
1726 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
1727 user must declare alloca.
1728
a05b79df
PE
1729 * HACKING (release): Forwarn the Translation Project about
1730 stable releses.
1731
3ab2ca22
AD
17322005-09-20 Akim Demaille <akim@epita.fr>
1733
1734 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
1735
a9739e7c
PE
17362005-09-19 Paul Eggert <eggert@cs.ucla.edu>
1737
a702593e
PE
1738 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
1739 (YYSTACK_ALLOC_MAXIMUM): Use it.
1740 (yysyntax_error): New function.
1741 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
1742 multiple syntax errors are reported, and alloca is being used.
1743 Instead, reallocate buffers twice as big each time, so that
1744 we waste at most half the allocated memory. Start with a small
1745 (128-byte) buffer that will suffice in most cases anyway.
1746 Use yysyntax_error to do most of the work.
1747
1748 * doc/bison.texinfo (Error Reporting, Table of Symbols):
1749 yynerrs is the number of errors reported, not the number of
1750 errors encountered.
1751
a9739e7c
PE
1752 * tests/glr-regression.at (Duplicated user destructor for lookahead):
1753 Mark it as expected to fail.
1754 Cast result of malloc; problem reported by twlevo@xs4all.nl.
1755 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
1756 Don't start user-code symbols with "yy", to avoid name space problems.
1757
f479c6c6
AD
17582005-09-19 Akim Demaille <akim@epita.fr>
1759
1760 Remove the traits, failed experiment.
1761 It never proved useful, and anyway because of the current
1762 definition, it was not possible to have several specialization of
1763 this traits, making it useless.
1764 * data/lalr1.cc (yy:traits): Remove.
1765 Inline its definitions in the parser class.
1766
e2586f82
AD
17672005-09-19 Akim Demaille <akim@epita.fr>
1768
1769 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
1770 least Mac OSX with a /usr/local install of gettext.
1771
2e8cf949
AD
17722005-09-19 Akim Demaille <akim@epita.fr>
1773
1774 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
1775 and yytoken for similarity with the other skeletons.
1776
c7fb0b90
AD
17772005-09-19 Akim Demaille <akim@epita.fr>
1778
4e26c69e 1779 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 1780
1bd0deda
PE
17812005-09-16 Paul Eggert <eggert@cs.ucla.edu>
1782
1783 * NEWS: Version 2.1.
1784
1785 * NEWS: Remove notice of yytname change, since it was never in an
1786 official release.
1787 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
1788 diagnostic.
1789 * src/output.c (prepare): Likewise.
1790 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
1791 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
1792 is not defined. This is an awful hack, but it's enough for now.
1793 All callers changed.
1794 * tests/glr-regression-at (make_value): Args are const pointers now,
1795 to avoid GCC warning.
1796 (Duplicated user destructor for lookahead): New test. Currently
1797 skipped. It fails on my host but I'm not sure it'll always fail.
1798
17992005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
1800
1801 * src/symtab.h (struct symbol): Declare the printer and destructor
1802 as const, to avoid accidental calls to free.
1803 (symbol_destructor_set, symbol_printer_set): Adjust.
1804 * src/symtab.c: Adjust.
1805
1bd0deda 18062005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
1807
1808 * data/c.m4 (b4_token_enums): New.
1809 (b4_token_defines): Rename as...
1810 (b4_token_enums_defines): this.
1811 (b4_token_defines): New, output only the #defines.
1812 * data/yacc.c, data/glr.c: Adjust.
1813 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
1814 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
1815 as default values.
1816
dbcdae2d
AD
18172005-09-16 Akim Demaille <akim@epita.fr>
1818
1819 * data/lalr1.cc (yylex_): Remove, inline its code.
1820 (yyreport_syntax_error_): Remove, replaced by...
1821 (yysyntax_error_): this which returns a string and leaves to the
1822 caller the call to the users' error function.
1823 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
1824 Move from members of the parser object...
1825 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
1826 to local variables of the parse function.
1827
70d8f291
AD
18282005-09-16 Akim Demaille <akim@epita.fr>
1829
1830 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
1831 since it's in Bison's name space.
1832
b47dbebe
PE
18332005-09-15 Paul Eggert <eggert@cs.ucla.edu>
1834
ae199bf1
PE
1835 * data/glr.c (yyresolveValue): Add default case to pacify
1836 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
1837
b47dbebe
PE
1838 * NEWS: Document when yyparse started to return 2.
1839 * doc/bison.texinfo (Parser Function): Document when yyparse
1840 returns 2.
1841
1842 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
1843 (b4_filename_type): Renamed back from b4_file_name_type. All uses
1844 changed.
1845 (class position): file_name -> filename (reverting). All uses changed.
1846
18472005-09-14 Paul Eggert <eggert@cs.ucla.edu>
1848
1849 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
1850 do anything if $@ exists. This reverts part of the 2005-07-07
1851 patch.
1852
00292f66
PE
18532005-09-11 Paul Eggert <eggert@cs.ucla.edu>
1854
1855 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
1856 contains obsolete information and isn't worth distributing as a
1857 separate file anyway.
1858 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
1859 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
1860 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
1861 (yyparse): Abort if user code uses longjmp to throw an unexpected
1862 value.
1863
a420f962
PE
18642005-09-09 Paul Eggert <eggert@cs.ucla.edu>
1865
00292f66
PE
1866 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
1867 Suggested by twlevo@xs4all.nl.
1868
127287e9
PE
1869 * data/glr.c (YYCHK1): Do not assume YYE is in range.
1870 This avoids a diagnostic from gcc -Wswitch-enum.
1871 Problem reported by twlevo@xs4all.nl.
1872
a420f962
PE
1873 * doc/bison.texinfo: Don't use "filename", as per GNU coding
1874 standards. Use "file name" or "file" or "name", depending on
1875 the context.
1876 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
1877 not to hack/foo.tab.c.
1878 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
1879 * data/glr.c: b4_filename -> b4_file_name.
1880 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
1881 All uses changed.
1882 (class position): filename -> file_name. All uses changed.
1883 * data/yacc.c: b4_filename -> b4_file_name.
1884 * lib/bitset.h: filename -> file_name in local vars.
1885 * lib/bitset_stats.c: Likewise.
1886 * src/files.c: Likewise.
1887 * src/scan-skel.l ("@output ".*\n): Likewise.
1888 * src/files.c (file_name_split): Renamed from filename_split.
1889 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
1890
18912005-09-08 Paul Eggert <eggert@cs.ucla.edu>
1892
1893 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
1894 to accommodate latest gnulib.
1895
1896 * tests/glr-regression.at (Duplicate representation of merged trees):
1897 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
1898
1899 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
1900 needed.
1901
42a6501d
PE
19022005-08-26 Paul Eggert <eggert@cs.ucla.edu>
1903
1904 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
1905 All uses changed. Invoke user destructor after an error during a
1906 split parse (trivial change from Joel E. Denny).
1907
1908 * tests/glr-regression.at
1909 (User destructor after an error during a split parse): New test case.
1910 Problem reported by Joel E. Denny in:
1911 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
1912
ef9a1faf
PE
19132005-08-25 Paul Eggert <eggert@cs.ucla.edu>
1914
5b4aaf78
PE
1915 * README-cvs: Give URLs for recommended tools.
1916 Mention Gzip version problem, and bootstrapping issues.
1917 Remove troubleshooting section, as it's somewhat obsolete.
1918
b5240ba5
PE
1919 * bootstrap (no_cache): New var, to accommodate different wget
1920 variants. Use it instead of '-C off'. Problem reported by
1921 twlevo@xs4all.nl.
1922
ef9a1faf
PE
1923 * data/glr.c (yydestroyStackItem): New function.
1924 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
1925 debugging information. Problem reported by Joel E. Denny.
1926
e6efa9da
AD
19272005-08-25 Akim Demaille <akim@epita.fr>
1928
1929 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
1930
adc90f13
PE
19312005-08-24 Paul Eggert <eggert@cs.ucla.edu>
1932
1933 * data/glr.c (yyrecoverSyntaxError, yyreturn):
1934 Don't invoke destructor on unresolved entries.
1935 * tests/glr-regression.at
1936 (User destructor for unresolved GLR semantic value): New test case.
1937 Problem reported by Joel E. Denny in:
1938 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
1939
f9315de5
PE
19402005-08-21 Paul Eggert <eggert@cs.ucla.edu>
1941
15d29c1f
PE
1942 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
1943 Add strnlen.c.
1944 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
1945 lib-prefix.m4, po.m4.
1946
dd5f2af2
PE
1947 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
1948 in yydestruct diagnostic, since it might not be an error.
1949 Problem reported by Joel Denny near end of
1950 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 1951 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
1952 * data/yacc.c (yyreturn): Likewise.
1953 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
1954
1955 * src/files.c: Remove obsolete FIXME comment.
1956
1957 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
1958 with the other templates, and to fix bogus run-on messages such
1959 as the one reported at the end of
1960 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
1961 All callers changed to avoid the newline.
1962 (yyprocessOneStack): Output two lines rather than one, to accommodate
1963 the above change. This changes the debug output format slightly.
1964
f9315de5
PE
1965 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
1966 reported by Joel E. Denny in
1967 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
1968 (trivial change).
1969 * tests/glr-regression.at (Duplicate representation of merged trees):
1970 New test, from Joel E. Denny in:
1971 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
1972 * THANKS: Add Joel E. Denny.
1973
1974 * configure.ac (AC_INIT): Bump to 2.0c.
1975
04098407
PE
19762005-07-24 Paul Eggert <eggert@cs.ucla.edu>
1977
1978 * NEWS: Version 2.0b.
1979
ca5d2013
PE
1980 * Makefile.am (SUBDIRS): Put examples before tests, so that
1981 "make check" doesn't finish with "All 1 tests passed".
1982
3d54b576
PE
1983 * tests/regression.at (Token definitions): Don't rely on
1984 AT_PARSER_CHECK for data that contains backslashes. It currently
1985 uses 'echo', and 'echo' isn't portable if its argument contains
1986 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
1987 that the byte '\0xff' is not printable in the C locale; it is,
1988 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
1989 not printable, so use '\0x81' to test.
1990
d53ae497
PE
1991 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
1992 version of GCC, since the macro is used with non-GCC compilers.
1993
fc01665e
PE
1994 Fix core dump reported by Pablo De Napoli in
1995 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
1996 * tests/regression.at (Invalid inputs with {}): New test.
1997 * src/parse-gram.y (token_name): Translate type before using
1998 it as an index.
1999
04098407
PE
2000 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
2001 the user's name space. All uses changed to __attribute__
2002 ((__unused__)).
2003 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
2004 Add __attribute__ ((__noreturn__)).
2005
2006 * etc/clcommit: Remove. We weren't using it, and it failed
2007 "make maintainer-distcheck".
2008 * Makefile.maint: Merge from coreutils.
2009 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
2010 (syntax-check-rules): Change list of rules as described below.
2011 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
2012 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
2013 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
2014 (sc_trailing_space): New rules.
2015 (sc_xalloc_h_in_src): Remove.
2016 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
2017 (sc_space_tab, sc_error_exit_success, sc_changelog):
2018 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
2019 (makefile-check, po-check, author_mark_check):
2020 (makefile_path_separator_check, copyright-check):
2021 Use grep -n, to make it easier to find violations.
2022 Use CVS_LIST and CVS_LIST_EXCEPT.
2023 (header_regexp, h_re): Remove.
2024 (dd_c): New macro.
2025 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
2026 (my-distcheck): Use more-modern GCC flags.
2027 (signatures, %.asc): Remove.
2028 (rel-files, announcement): Remove signatures.
2029 Restore old updating code, even though we don't use it, so
2030 that we're the same as coreutils.
2031 (alpha, beta, major): Depend on news-date-check.
2032 Make the upload commands.
2033
2034 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
2035 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
2036 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
2037 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
2038 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
2039 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
2040 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
2041 * tests/sets.at: Likewise.
2042
2043 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
2044 we comment out the Autoconf version number.
2045 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
2046 it's error-prone and "make maintainer-distcheck" rejects it.
2047
2048 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
2049 Indent calls to "error" to pacify "make maintainer-distcheck",
2050 when the calls are not intended to be translated.
2051 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
2052
2053 * src/Makefile.am (DEFS): Use +=, to pacify
2054 "make maintainer-distcheck".
2055 (bison_SOURCES): Add scan-skel.h.
2056 (sc_tight_scope): New rule, from coreutils.
2057
2058 * src/files.c (src_extension, header_extension):
2059 Now static, not extern.
2060 * src/getargs.c (short_options): Likewise.
2061 * src/muscle_tab.c (muscle_table): Likewise.
2062 * src/parse-gram.y (current_class, current_type, current_prec):
2063 Likewise.
2064 * src/reader.c (grammar_end, previous_rule_end): Likewise.
2065 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
2066 * src/main.c (main): Cast bindtextdomain and textdomain calls to
2067 void, to avoid warning when NLS is disabled.
2068 * src/output.c: Include scan-skel.h.
2069 (scan_skel): Remove decl, since scan-skel.h does this.
2070 (output_skeleton):
2071 Indent calls to "error" to pacify "make maintainer-distcheck".
2072 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
2073 * src/reader.h (gram_end, gram_lineno): New decls to pacify
2074 "make maintainer-distcheck".
2075 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
2076 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
2077 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
2078 (skel_lex_destroy, scan_skel): Move these decls to...
2079 * src/scan-skel.h: New file.
2080 * src/uniqstr.c (uniqstr_assert):
2081 Indent calls to "error" to pacify "make maintainer-distcheck".
2082
2083 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
2084 not @VAR@.
2085
2086 * tests/torture.at: Revamp to avoid misuse of atoi that
2087 "make maintainer-distcheck" complained about.
2088
2089 * examples/extexi (message): Don't print a message more than once,
2090 and omit line-number decoration that makes Emacs compile think
2091 that informative messages are worth worrying about.
2092
20932005-07-22 Paul Eggert <eggert@cs.ucla.edu>
2094
2095 * configure.ac: Update version number.
2096
2097 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
2098 accidentally.
2099 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
2100 autogenerated by the maintainer.
2101 * examples/calc++/.cvsignore: Add *.yy.
2102
2103 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
2104 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2105 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2106
2107 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
2108
2109 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
2110 from maintainer-distcheck about casting the argument of 'free'.
2111
2112 * NEWS: Mention recent yytname changes.
2113 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
2114
2115 * bootstrap: For translations that have not yet been upgraded to
2116 the new runtime-po domain, prime the pump by extracting the
2117 relevant strings from the obsolete translations. This code can be
2118 removed once the bison-runtime domain has been translated by each
2119 team.
2120
2121 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
2122 now that token names are already quoted.
2123
2124 Fix problem reported by Anthony Heading.
2125 * data/glr.c (YYTOKEN_TABLE): New macro.
2126 (yytname): Define if YYTOKEN_TABLE.
2127 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
2128 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
2129 (YYERROR_VERBOSE): Define the same way the other skeletons do.
2130 * src/output.c (prepare_symbols): Output token_table_flag.
2131
0ffda363
PE
21322005-07-21 Paul Eggert <eggert@cs.ucla.edu>
2133
2134 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
2135 again if the first call fails.
2136
2137 * data/glr.c (yytnamerr): New function.
2138 (yyreportSyntaxError): Use it to dequote most string literals.
2139 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
2140 with other skeletons. All uses changed.
2141 (yytnameerr_): New function.
2142 (yyreport_syntax_error): Use it to dequote most string literals.
2143 * data/yacc.c (yytnamerr): New function.
2144 (yyerrlab): Use it to decode most string literals.
2145 * doc/bison.texinfo (Decl Summary, Calling Convention):
2146 Clarify quoting convention of yytname.
2147 * src/output.c (prepare_symbols): Quote all names. This undoes
2148 the 2005-04-17 change, which is now accomplished (mostly) via
2149 changes in the parsers as described above.
2150 * tests/regression.at (Token definitions, Web2c Actions):
2151 Undo most 2005-04-17 change here, too.
2152
21532005-07-20 Paul Eggert <eggert@cs.ucla.edu>
2154
2155 Fix more problems reported by twlevo@xs4all.nl.
2156 * tests/cxx-type.at: Don't pipe output of ./types through sed to
2157 remove trailing spaces. This loses the exit status of ./types,
2158 and isn't needed since ./types shouldn't be emitting trailing
2159 spaces.
2160 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
2161 as the stack isn't valid in that case.
2162
2163 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
2164 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
2165 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
2166 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
2167 is used.
2168 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
2169 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
2170 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
2171 Likewise.
2172
2173 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
2174 overly-picky compilers that reject 'char *foo = "bar";'.
2175
2176 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
2177 to FILE * parameter, not to stderr. This fixes a typo introduced
2178 in the 2005-07-12 change.
2179
2180 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
2181 warnings from GCC 4.
2182
2183 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
2184 (yyglrShiftDefer, yysplitStack):
2185 Remove unused parameters b4_pure_formals. All uses changed.
2186 (yyglrShift): Remove unused parameters b4_user_formals.
2187 All uses changed.
2188 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
2189
6100a9aa
PE
21902005-07-18 Paul Eggert <eggert@cs.ucla.edu>
2191
258b75ca
PE
2192 Destructor cleanups and regularization among the three skeletons.
2193 * NEWS: Document the behavior changes.
2194 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
2195 stack before failing, as the cleanup code will do it for us now.
2196 * data/lalr1.cc (yyerrlab): Likewise.
2197 * data/glr.c (yyparse): Pop everything off the stack before
2198 freeing it, so that destructors get called properly.
2199 * data/lalr1.cc (yyreturn): Likewise.
2200 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
2201 This is more consistent.
2202 * doc/bison.texinfo (Destructor Decl): Mention more reasons
2203 why destructors might be called. 1.875 -> 2.1.
2204 (Destructor Decl, Decl Summary, Table of Symbols):
2205 Some English-language cleanups for %destructor.
2206 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
2207 Add output line for destructor of start symbol.
2208 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
2209 because of that same extra output line.
2210
1a059451
PE
2211 * NEWS: Document minor wording changes in diagnostics of
2212 Bison-generated parsers.
2213 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
2214 Remove unused formals. All uses changed.
2215 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
2216 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
2217 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
2218 Rename yyoverflowab to yyexhaustedlab.
2219 When memory exhaustion occurs during syntax-error reporting,
2220 report it separately rather than in a single diagnostic; this
2221 eases translation.
2222 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
2223 (Memory Exhausted): Renamed from Parser Stack Overflow.
2224 Revamp wording slightly to prefer "memory exhaustion".
2225 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
2226
97460c78
PE
2227 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
2228
30757c8c
PE
2229 Add i18n support to the GLR skeleton. Partially fix the C++
2230 skeleton; a C++ expert needs to finish this. Remove debugging
2231 msgids; there's little point to having them translated, since they
2232 can be understood only by someone who can read the
2233 (English-language) source code.
2234
2235 Generate runtime-po/bison-runtime.pot automatically, so that we
2236 don't have to worry about garbage getting in that file. We'll
2237 make sure after the next official release that old msgids don't
2238 get lost. See
2239 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
2240
2241 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
2242 Now auto-generated.
2243 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
2244 Fix typos in explanations of the runtime file.
2245 * bootstrap: Change gettext keyword from YYI18N to YY_.
2246 Use standard Makefile.in.in in runtime-po, since we'll arrange
2247 for backward-compatible bison-runtime.po files in a different way.
2248 * data/glr.c (YY_): New macro, from yacc.c.
2249 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
2250 Translate messages intended for users.
2251 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
2252 the wording in the other skeletons. We don't know that the memory
2253 is virtual.
2254 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
2255 Use same method that yacc.c uses.
2256 Don't translate debugging messages.
2257 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
2258 it doesn't work (yet), and requires C++ expertise to fix.
2259 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
2260 Move defn to a more logical place, to be consistent with other
2261 skeletons.
2262 Don't translate debugging messages.
2263 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
2264 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
2265 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
2266 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
2267
ac8c5689
PE
2268 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
2269 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
2270 void, not int.
2271 * tests/glr-regression.at (Badly Collapsed GLR States):
2272 Likewise.
2273 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2274 yylex should return 0 at EOF rather than aborting.
2275
6100a9aa
PE
2276 Improve tests for stack overflow in GLR parser.
2277 Problem reported by twlevo@xs4all.nl.
2278 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
2279 All uses removed.
2280 (yyStackOverflow): Just longjmp, but with value 2 so that caller
2281 can handle the problem.
2282 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
2283 (yyparse): New local variable yyresult to record the result.
2284 Use result of setjmp to set it, rather than storing itinto
2285 struct.
2286 (yyDone): Remove label.
2287 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
2288 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
2289 if YYABORT is used).
2290 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
2291 yyparse status; put status > 1 into diagnostic.
2292 Check that status==2 works.
2293 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
2294 Use exit status 3 for failure to open (which shouldn't happen).
2295
15f40952
PE
22962005-07-17 Paul Eggert <eggert@cs.ucla.edu>
2297
67fd79c4
PE
2298 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
2299 1 on syntax error; just let yyparse do its thing.
2300 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
2301 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
2302 (Exploding the Stack Size with Alloca):
2303 (Exploding the Stack Size with Malloc):
2304 Expect exit status 2, not 1, since the parser is supposed to blow
2305 its stack. Problem reported by twlevo@xs4all.nl.
2306
15f40952
PE
2307 * data/glr.c (yyparse): Don't assume that the initial calls
2308 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
2309 Print a stack-overflow message and fail instead.
2310 Initialize the line-number information before creating the stack,
2311 so that the stack-overflow message can report line zero safely.
2312
f32c66b5
PE
23132005-07-14 Paul Eggert <eggert@cs.ucla.edu>
2314
a22ff96f 2315 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
2316 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
2317 (yyuserMerge): Provide a default case if b4_mergers is empty.
2318 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
2319 * tests/glr-regression.at
2320 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 2321 Add casts to pacify C++ compilers.
1beb0b24
PE
2322 * tests/glr-regression.at (Improper merging of GLR delayed action
2323 sets): Declare yylex before using it.
f32c66b5 2324 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
2325 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
2326 test for valgrind; valgrind is independent of g++.
2327 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
2328 for compatibility with POSIX 1003.1-2001 (if running coreutils).
2329 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
2330 Use a destructor, so that we can expand the stack. Change
2331 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 2332
d741bd1b
PE
23332005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2334
2335 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
2336 a valgrind failure. Problem reported by twlevo@xs4all.nl.
2337
0410a6e0
PE
23382005-07-13 Paul Eggert <eggert@cs.ucla.edu>
2339
2340 * PACKAGING: New file, suggested by Bruno Haible and taken from
2341 similar wording in gettext's PACKAGING file.
2342 * NEWS: Mention PACKAGING.
2343 * Makefile.am (EXTRA_DIST): Add PACKAGING.
2344
f7ab6a50
PE
23452005-07-12 Paul Eggert <eggert@cs.ucla.edu>
2346
baf785db 2347 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
2348 * bootstrap: Get runtime translations into runtime-po.
2349 Create runtime-po files automatically, if possible.
2350 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
2351 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
2352 does not infringe on the user's name space.
2353 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
2354 * doc/bison.texinfo (Internationalization): Revamp the English
2355 and Texinfo syntax a bit, to try to make it clearer.
2356 (Bison Options, Option Cross Key): Mention --print-localedir.
2357 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
2358 YYENABLE_NLS. Quote a bit more.
2359 * runtime-po/.cvsignore: New file.
2360 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
2361 * runtime-po/Rules-quot: Remove; now created by bootstrap.
2362 * runtime-po/quot.sed: Likewise.
2363 * runtime-po/boldquot.sed: Likewise.
2364 * runtime-po/en@quot.header: Likewise.
2365 * runtime-po/en@boldquot.header: Likewise.
2366 * runtime-po/insert-header.sin: Likewise.
2367 * runtime-po/remove-potcdate.sin: Likewise.
2368 * runtime-po/Makevars: Likewise.
2369 * runtime-po/LINGUAS: Likewise.
2370 * runtime-po/de.po: Likewise; we will rely on the translation project
2371 to maintain this, so "bootstrap" should get it.
0410a6e0 2372 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
2373 its value.
2374 * src/main.c (main): Bind the bison-runtime domain, too.
2375
23762005-07-12 Bruno Haible <bruno@clisp.org>
2377
2378 * data/yacc.c: Include <libintl.h> when NLS is enabled.
2379 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
2380 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
2381 * runtime-po: New directory.
2382 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
2383 $(DOMAIN).pot-update rule, so that old messages are never dropped.
2384 * runtime-po/Rules-quot: New file, copied from po/.
2385 * runtime-po/quot.sed: Likewise.
2386 * runtime-po/boldquot.sed: Likewise.
2387 * runtime-po/en@quot.header: Likewise.
2388 * runtime-po/en@boldquot.header: Likewise.
2389 * runtime-po/insert-header.sin: Likewise.
2390 * runtime-po/remove-potcdate.sin: Likewise.
2391 * runtime-po/Makevars: New file.
2392 * runtime-po/POTFILES.in: New file.
2393 * runtime-po/LINGUAS: New file.
2394 * runtime-po/bison-runtime.pot: New file.
2395 * runtime-po/de.po: New file.
2396 * m4/bison.m4: New file.
2397 * Makefile.am (SUBDIRS): Add runtime-po.
2398 (aclocaldir, aclocal_DATA): New variables.
2399 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
2400 Define aclocaldir.
2401 * src/getargs.c (usage): Document --print-localedir option.
2402 (PRINT_LOCALEDIR_OPTION): New enum item.
2403 (long_options): Add --print-localedir option.
2404 (getargs): Handle --print-localedir option.
2405 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
2406 (Internationalization): New section.
2407
22dda0f0
AD
24082005-07-12 Akim Demaille <akim@epita.fr>
2409
2410 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
2411 for consistency with the rest of the code.
2412 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
2413 Add separators.
2414
82b248ad
AD
24152005-07-12 Akim Demaille <akim@epita.fr>
2416
2417 * src/parse-gram.y: Use %printer instead of YYPRINT.
2418
fa0e9314
AD
24192005-07-12 Akim Demaille <akim@epita.fr>
2420
867a3e00
AD
2421 * src/symtab.h, src/symtab.c (symbol_print): New.
2422 * src/symlist.h, src/symlist.c (symbol_list_print): New.
2423 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
2424
24252005-07-12 Akim Demaille <akim@epita.fr>
2426
2427 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
2428 b4_at_dollar and b4_dollar_dollar.
2429
e054b190
PE
24302005-07-11 Paul Eggert <eggert@cs.ucla.edu>
2431
2432 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
2433 and Pennello's paper.
2434
34160ec4
PE
24352005-07-09 Paul Eggert <eggert@cs.ucla.edu>
2436
407d4a75
PE
2437 * data/yacc.c (yyparse): Undo previous patch. Instead,
2438 set yylsp[0] and yyvsp[0] only if the initial action
2439 sets yylloc and yylval, respectively.
2440
34160ec4
PE
2441 * data/yacc.c (yyparse): In the initial action, set
2442 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
2443 This avoids the use of undefined variables if the initial
2444 action does not set yylloc and/or yylval.
2445
c3d5a4a7
PE
24462005-07-07 Paul Eggert <eggert@cs.ucla.edu>
2447
b34d96c1
PE
2448 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
2449 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
2450 Remove from CVS. These files are automatically generated.
2451 * examples/extexi: Clarify that this file is now part of Bison,
2452 not GNU M4, and that it works with any POSIX-compatible Awk.
2453 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
2454 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
2455 so that we also get calc++-parser.yy. Geneate it.
2456 Use $(AWK), not gawk, since any conforming Awk will do.
2457 Put comment before action, since older 'make' can't handle comment
2458 in action.
2459 $(BUILT_SOURCES): List all built sources, not just some of them.
2460 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
2461 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
2462 $($(calc_sources_generated)): Remove unnecessary test for existence
2463 of target. (This had a shell syntax error anyway; a stray "x".)
2464 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
2465 calc++-parser.yy.
2466 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
2467
c3d5a4a7
PE
2468 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
2469 implied by the other modules.
2470
828c373b
AD
24712005-07-06 Akim Demaille <akim@epita.fr>
2472
2473 Bind examples/calc++ to the package.
2474 * examples/calc++/Makefile: Remove, replaced by...
2475 * examples/calc++/Makefile.am: ... this new file.
2476 * examples/calc++/test: Remove input.
2477 * examples/calc++/compile: Remove.
2478 * examples/Makefile.am: New.
2479 * configure.ac, Makefile.am: Adjust.
2480 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
2481
63cb01d6
PE
24822005-07-05 Paul Eggert <eggert@cs.ucla.edu>
2483
fd2df2ed
PE
2484 * data/glr.c (yyFail): Drastically simplify; since the format argument
2485 never had any % directives, we can simply pass it to yyerror.
2486 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
2487 be modified later, as that is the usual style in glr.c.
2488 Problems reported by Paul Hilfinger.
2489
63cb01d6
PE
2490 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
2491 and size overflow errors.
2492 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
2493 in case the user prolog sets feature-test macros like _GNU_SOURCE.
2494 (YYSIZEMAX): New macro.
2495 (yystpcpy): New function, taken from yacc.c.
2496 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
2497 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
2498 so that we don't have to maintain their signatures.
2499 (yyFail): Check for buffer overflow, by using vsnprintf rather
2500 than vsprintf. Allocate a bigger buffer if possible.
2501 Report an error if buffer allocation fails.
2502 (yyStackOverflow): New function.
2503 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
2504 the initialization was successful. It might fail if storage was
2505 exhausted.
2506 (yyexpandGLRStack): Add more checks for storage allocation failure.
2507 Use yyStackOverflow to report failures.
2508 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
2509 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
2510 Don't assume stack number fits in int.
2511 (yysplitStack): Check for storage allocation failure.
2512 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
2513 can print diagnostics on storage allocation failure. All callers
2514 changed.
2515 (yyresolveValue): Use yybool for boolean.
2516 (yyreportSyntaxError): Check for size-calculation overflow.
2517 This code is taken from yacc.c.
2518 (yyparse): Check for storage allocation errors when allocating
2519 the initial stack.
2520
1c59e0a1
AD
25212005-07-05 Akim Demaille <akim@epita.fr>
2522
2523 Extract calc++ from the documentation.
2524 * doc/bison.texinfo (Calc++): Add the extraction marks.
2525 * examples/extexi: New, from the aborted GNU Programming 2E.
2526 Separate the different paragraph of a file with empty lines.
2527 * examples/Makefile: Use it to extract the whole calc++ example.
2528
8a0adb01
AD
25292005-06-24 Akim Demaille <akim@epita.fr>
2530
2531 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
2532 class typedefs.
2533
12545799
AD
25342005-06-22 Akim Demaille <akim@epita.fr>
2535
2536 * doc/bison.texinfo (C++ Language Interface): First stab.
2537 (C++ Parsers): Remove.
2538
99be0235
AD
25392005-06-22 Akim Demaille <akim@epita.fr>
2540
2541 * data/lalr1.cc (yylex_): Honor %lex-param.
2542
0ffd4fd1
AD
25432005-06-22 Akim Demaille <akim@epita.fr>
2544
2545 Start a set of simple examples.
2546 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
2547 * examples/calc++/calc++-driver.hh,
2548 * examples/calc++/calc++-parser.yy,
2549 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
2550 * examples/calc++/compile, examples/calc++/test: New.
2551
0925ebb4
PE
25522005-06-09 Paul Eggert <eggert@cs.ucla.edu>
2553
2554 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
2555 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
2556 which stems from the 2005-05-27 patch.
2557
43d3b664
PH
25582005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2559
2560 * data/glr.c: Modify treatment of unused parameters to permit use
2561 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
2562
3062864d
PE
25632005-05-30 Paul Eggert <eggert@cs.ucla.edu>
2564
2565 Fix infringement on user name space reported by Janos Zoltan Szabo.
2566 * data/yacc.c (yyparse): strlen -> yystrlen.
2567
989b5b8e
AD
25682005-05-30 Akim Demaille <akim@epita.fr>
2569
2570 * data/lalr1.cc (_): New.
2571 Translate the various messages.
2572
bedf57f5
PE
25732005-05-27 Paul Eggert <eggert@cs.ucla.edu>
2574
2575 Fix infringement on user name space reported by Bruno Haible.
2576 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
2577 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
2578 the user's name space.
2579 (alloca): Include <stdlib.h> to get it, if it's not built in.
2580 (YYMALLOC, YYFREE): Define only if needed.
2581 (malloc, free): Declare, but only if needed, as this infringes on
2582 the user name space.
2583
4d1801f1
PE
25842005-05-25 Paul Eggert <eggert@cs.ucla.edu>
2585
2586 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
2587 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
2588 with %d format.
2589 * lib/ebitset.c (min, max): Undef before defining.
2590 * lib/vbitset.c (min, max): Likewise.
2591 * lib/subpipe.c (create_subpipe): Save local variables in case
2592 vfork clobbers them.
2593
25942005-05-24 Bruno Haible <bruno@clisp.org>
2595
2596 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
2597 error message syntax used by gcc-4.0.
2598
b94a9e1e
PE
25992005-05-23 Paul Eggert <eggert@cs.ucla.edu>
2600
85ac3861
PE
2601 * README: Mention m4 1.4.3. Remove obsolete advice about
2602 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
2603
b94a9e1e
PE
2604 * bootstrap: Remove workaround for problem I encountered with
2605 gettext 0.14.1; it seems to be fixed now.
2606
51c30d21
PE
26072005-05-22 Paul Eggert <eggert@cs.ucla.edu>
2608
009ce67d
PE
2609 * NEWS: Version 2.0a.
2610
f2a97c62
PE
2611 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
2612 the previous change.
2613
c8775f93
PE
2614 Various maintainer cleanups.
2615 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
2616 conftest*, for benefit of CVS commands run at the same time as
2617 "configure". Add build-aux, since "bootstrap" now creates it and
2618 its subfiles.
2619 * Makefile.cfg (move_if_change): Remove.
2620 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
2621 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
2622 (po_repo, do-po-update, po-update, wget_files, get-targets):
2623 (config.guess-url_prefix, config.sub-url_prefix):
2624 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
2625 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
2626 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
2627 Remove.
2628 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
2629 this is now the recommended name.
2630 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
2631 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
2632 ylwrap. These files now go into build-aux.
2633 * config/move-if-change: Remove.
2634 * config/prev-version.txt: Bump from 1.75 to 2.0.
2635
3ea5f0ec
PE
2636 * bootstrap: Add stdio-safer, unistd-safer modules.
2637 Remove m4/glibc2.m4 (introduced by latest gnulib, but
2638 we don't need it).
2639 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
2640 fopen-safer.c, stdio-safer.h, unistd-safer.h.
2641 * lib/subpipe.c: Include "unistd-safer.h".
2642 (create_subpipe): Make sure all the newly-created
2643 file descriptors are > 2, so that diagnostics don't
2644 get sent down them (which might cause Bison to hang, in theory).
2645 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
2646 * src/files.c (xfopen): Use fopen_safer, not fopen.
2647
51c30d21
PE
2648 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
2649 yesterday's yacc.c fix.
2650
cea1469d
PE
26512005-05-21 Paul Eggert <eggert@cs.ucla.edu>
2652
3ea5f0ec
PE
2653 * data/glr.c, data/lalr1.cc: Update copyright date.
2654
cea1469d
PE
2655 Fix a destructor bug reported by Wolfgang Spraul in
2656 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
2657 * data/yacc.c (yyabortlab): Don't call destructor, and
2658 don't set yychar to EMPTY.
2659 (yyoverflowlab): Don't call destructor.
2660 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
2661 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
2662 since we no longer output the message "discarding lookahead token
2663 end of input ()".
2664
5e6f62f2
PH
26652005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2666
2667 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
2668 fix a small glitch in debugging output.
2669 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
2670 after YY_SYMBOL_PRINT where needed.
2671
2672 (struct yyGLRState): Add some comments.
2673 (struct yySemanticOption): Add some comments.
2674 (union yyGLRStackItem): Add comment.
2675
2676 (yymergeOptionSets): Correct this to properly perform the union,
2677 avoiding infinite reported by Michael Rosien.
2678 Update comment.
2679
2680 * tests/glr-regression.at: Add test for GLR merging error reported
2681 by M. Rosien.
cea1469d 2682
0fb669f9
PE
26832005-05-13 Paul Eggert <eggert@cs.ucla.edu>
2684
2685 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
2686 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
2687 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
2688 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
2689 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
2690 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
2691 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
2692 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
2693 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
2694 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
2695 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
2696 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
2697 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
2698 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
2699 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
2700 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
2701 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
2702 src/derives.h, src/files.c, src/files.h, src/getargs.c,
2703 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
2704 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
2705 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
2706 src/output.h, src/parse-gram.c, src/parse-gram.h,
2707 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
2708 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
2709 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
2710 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
2711 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
2712 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
2713 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
2714 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
2715 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
2716 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
2717 tests/reduce.at, tests/regression.at, tests/sets.at,
2718 tests/synclines.at, tests/testsuite.at, tests/torture.at:
2719 Update FSF postal mail address.
2720
51f4735e
PE
27212005-05-11 Paul Eggert <eggert@cs.ucla.edu>
2722
2723 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
2724 Problem reported by Ralf Menzel.
2725
80ce3401
PE
27262005-05-01 Paul Eggert <eggert@cs.ucla.edu>
2727
2728 * tests/actions.at: Test that stack overflow invokes destructors.
2729 From Marcus Holland-Moritz.
2730 * data/yacc.c (yyerrlab): Move the code that destroys the stack
2731 from here....
2732 (yyreturn): to here. That way, destructors are called properly
2733 even if the stack overflows, or the user calls YYACCEPT or
2734 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
2735 (yyoverflowlab): Destroy the lookahead.
2736
27372005-04-24 Paul Eggert <eggert@cs.ucla.edu>
2738
2739 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
2740
72f000b0
PE
27412005-04-17 Paul Eggert <eggert@cs.ucla.edu>
2742
2743 * NEWS: Bison-generated C parsers no longer quote literal strings
2744 associated with tokens.
2745 * src/output.c (prepare_symbols): Don't escape strings,
2746 since users don't want to see C escapes.
2747 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
2748 in diagnostics.
c19683bb 2749 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
2750 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
2751
1094323f
PE
27522005-04-16 Paul Eggert <eggert@cs.ucla.edu>
2753
2754 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
2755 the data size is known to be too small and we can't increase it.
2756 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
2757
ca407bdf
PE
27582005-04-15 Paul Eggert <eggert@cs.ucla.edu>
2759
2760 * src/parse-gram.y: Include quotearg.h.
2761 (string_as_id): Quote $1 before using it as a key, since the
2762 lexer no longer quotes it for us.
2763 (string_content): Don't strip quotes, since lexer no longer
2764 quotes it for us.
2765 * src/scan-gram.l: Include quotearg.h.
2766 ("\""): Omit quote.
2767 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
2768 a key, since the rest of the lexer doesn't quote it.
2769 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
2770 * tests/regression.at (Token definitions): Check for backslashes
2771 in token strings.
2772
2773 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
2774 (YYSIZE_T): Define to unsigned long int when using an older compiler.
2775 (yyparse): Revamp code to generate long syntax error message, to
2776 make it easier to translate, and to avoid problems with arithmetic
2777 overflow. Change "virtual memory" to "memory" in diagnostic, since
2778 we don't know whether the memory is virtual.
2779
1ce59070
PE
27802005-04-13 Paul Eggert <eggert@cs.ucla.edu>
2781
2782 * NEWS: Bison-generated C parsers now use the _ macro to
2783 translate strings.
2784 * data/yacc.c (_) [!defined _]: New macro.
2785 All English strings wrapped inside this macro.
2786 * doc/bison.texinfo (Bison Parser): Document _.
2787 * po/POTFILES.in: Include src/parse-gram.c, since it now
2788 includes translateable strings that parse-gram.y doesn't.
2789
a749a695
PE
27902005-04-12 Paul Eggert <eggert@cs.ucla.edu>
2791
2792 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
2793 reverting the 2004-10-11 change to this function.
2794 (symbol_check_alias_consistency): Don't call symbol_type_set
2795 if the type name is already correct.
2796 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
2797
8fb1053b
PE
27982005-03-25 Paul Eggert <eggert@cs.ucla.edu>
2799
2800 * tests/regression.at (Token definitions): Don't use a token named
2801 c, as that generates a "#define c ..." that runs afoul of buggy
2802 stdlib.h that uses the identifier c as a member of struct
2803 drand48_data. Problem reported by Horst Wente.
2804
ff498c4a
PE
28052005-03-21 Paul Eggert <eggert@cs.ucla.edu>
2806
2807 * bootstrap: Change translation URL from
2808 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
2809 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
2810 redirection glitches. Problem reported by twlevo@xs4all.nl.
2811
65211d70
PE
28122005-03-20 Paul Eggert <eggert@cs.ucla.edu>
2813
2814 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
2815 after operands; POSIX says this isn't portable for the c99 command.
2816
9577fb1f
PE
28172005-03-18 Paul Eggert <eggert@cs.ucla.edu>
2818
2819 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
2820 immediately if a data overrun has occurred; this may help us track
2821 down what may be a spurious failure on MacOS.
2822
78b178f7
PE
28232005-03-17 Paul Eggert <eggert@cs.ucla.edu>
2824
a2599d0f
PE
2825 Respond to problems reported by twlevo@xs4all.nl.
2826
2827 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
2828
78b178f7
PE
2829 * src/vcg.h: Comment fix.
2830 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
2831 (G_CMAX): Change to -1 instead of INT_MAX.
2832
2833 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 2834
7296e729
PE
28352005-03-15 Paul Eggert <eggert@cs.ucla.edu>
2836
2837 * src/tables.c (state_number_to_vector_number): Put it inside an
2838 "#if 0", since it's not currently used. Problem reported by
2839 Roland McGrath.
2840
05ac60f3
PE
28412005-03-06 Paul Eggert <eggert@cs.ucla.edu>
2842
2843 * src/output.c (escaped_output): Renamed from
2844 escaped_file_name_output, since we now use it for symbol tags as
2845 well. All uses changed.
2846 (symbol_destructors_output, symbol_printers_output):
2847 Escape symbol tags too.
2848 Problem reported by Matyas Forstner in
2849 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
2850
2851 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
2852 not needed.
2853 * src/output.c (user_actions_output, token_definitions_output,
2854 symbol_destructors_output, symbol_printers_output): Likewise.
2855 * src/reader.c (prologue_augment): Likewise.
2856 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
2857
2858 * src/vcg.c (output_edge): Don't quote linestyle arg.
2859 Problem reported by twlevo@xs4all.nl.
2860
7eb453ac
PE
28612005-02-28 Paul Eggert <eggert@cs.ucla.edu>
2862
2863 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
2864 example, reported by Derek M Jones. Also, make the example even
2865 more outrageous, to better illustrate how bad the problem is.
2866
4c04c52a
PE
28672005-02-24 Paul Eggert <eggert@cs.ucla.edu>
2868
2869 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
2870 putsym. Typo reported by Sebastian Piping.
2871
a61e1620
PE
28722005-02-23 Paul Eggert <eggert@cs.ucla.edu>
2873
2874 * doc/bison.texinfo (Language and Grammar): some -> same
2875 (Epilogue): int he -> in the
2876 Typos reported by Sebastian Piping via Justin Pence.
2877
9ec93868
PE
28782005-02-07 Paul Eggert <eggert@cs.ucla.edu>
2879
2880 * tests/glr-regression.at (Improper handling of embedded actions
2881 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
2882 embedded actions and $-N in GLR parsers", work around an Autoconf bug
2883 with dollar signs in test names.
2884 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
2885 for a similar reason.
2886
73ce7e7e
PE
28872005-01-28 Paul Eggert <eggert@cs.ucla.edu>
2888
2889 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
2890 wants to redefine G_VIEW.
2891
2e72b98e
PE
28922005-01-27 Paul Eggert <eggert@cs.ucla.edu>
2893
2894 * src/vcg.c (get_view_str): Remove case for normal_view.
2895 Problem reported by twlevo@xs4all.nl.
2896
e0d634e5
PE
28972005-01-24 Paul Eggert <eggert@cs.ucla.edu>
2898
ccf830a4
PE
2899 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
2900 Problem reported by twlevo@xs4all.nl.
2901
e0d634e5
PE
2902 * doc/bison.texinfo: Change @dircategory from "GNU programming
2903 tools" to "Software development". Requested by Richard Stallman
2904 via Karl Berry.
2905
7bbc8cb0
PE
29062005-01-23 Paul Eggert <eggert@cs.ucla.edu>
2907
2908 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
2909 Problem reported by twlevo@xs4all.nl.
2910
08b770bc
PE
29112005-01-21 Paul Eggert <eggert@cs.ucla.edu>
2912
2913 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
2914 keyword; it's not needed with modern compilers, and it doesn't
2915 affect correctness with older compilers. Suggested by
2916 twlevo@xs4all.nl.
2917
95f22ad2
PE
29182005-01-17 Paul Eggert <eggert@cs.ucla.edu>
2919
2920 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
2921 gcc -Wswitch-default.
2922 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
2923 * data/yacc.c (yyparse): Likewise.
2924
d229d15c
PE
29252005-01-12 Paul Eggert <eggert@cs.ucla.edu>
2926
2927 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
2928 already. Let config.h define any nonstandard values.
2929
ecadd90f
PE
29302005-01-10 Paul Eggert <eggert@cs.ucla.edu>
2931
2932 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
2933 for the benefit of slower hosts. Problem reported by
2934 Nelson H. F. Beebe.
2935
213744b5
PE
29362005-01-07 Paul Eggert <eggert@cs.ucla.edu>
2937
2938 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
2939 being defined and not used.
2940 * data/lalr1.cc (yyparse): Likewise.
2941 Use "if (false)" rather than "if (0)".
2942
249d3236
PE
29432005-01-05 Paul Eggert <eggert@cs.ucla.edu>
2944
2945 * TODO: Mention that we should allow NUL bytes in tokens.
2946
987cc1fb
PE
29472005-01-02 Paul Eggert <eggert@cs.ucla.edu>
2948
2949 * src/scan-skel.l (<<EOF>>): Don't close standard output.
2950 Problem reported by Hans Aberg.
2951
08fe02d9
PE
29522005-01-01 Paul Eggert <eggert@cs.ucla.edu>
2953
2954 * src/getargs.c (version): Happy new year; update overall
2955 program copyright date from 2004 to 2005.
2956
2957 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
2958 Problem reported by Hans Aberg.
2959 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
2960 (Output file names.): Add a test for the case when standard output
2961 is closed.
2962
010c0266
PE
29632004-12-26 Paul Eggert <eggert@cs.ucla.edu>
2964
2965 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
2966 to fix an oversight in the Bison 2.0 manual.
2967
da12206a
PE
29682004-12-25 Paul Eggert <eggert@cs.ucla.edu>
2969
2970 * NEWS: Version 2.0. Reformat the existing news items since
2971 1.875, so that related items are grouped together.
3a4734aa 2972 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
2973 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
2974
c935d934
PE
2975 * tests/torture.at (Exploding the Stack Size with Alloca): Set
2976 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
2977 otherwise, we're not testing alloca. Unfortunately there's no
2978 simple way to consult HAVE_ALLOCA here.
2979
da12206a
PE
2980 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
2981 for yymsg, too.
2982
2983 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
2984 hand. This avoids a warning about comparing int to size_t when
2985 GCC warnings are enabled.
2986
0a2c5137
PE
29872004-12-22 Paul Eggert <eggert@cs.ucla.edu>
2988
d7e14fc0
PE
2989 * NEWS: Bison-generated parsers no longer default to using the
2990 alloca function (when available) to extend the parser stack, due
2991 to widespread problems in unchecked stack-overflow detection.
2992 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
2993 responsibility to set it to a positive value. This lets the user
2994 specify a value that is not a preprocessor constant.
2995 * data/yacc.c (YYMAXDEPTH): Likewise.
2996 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
2997 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
2998 to be a compile-time constant. However, explain the constraints on it.
2999 Also, explain the constraints on YYINITDEPTH.
3000 (Table of Symbols): Explain that alloca is no longer the default.
3001 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
3002 to 1.
3003
0a2c5137
PE
3004 * doc/bison.texinfo (Location Default Action): Mention that n must
3005 be zero when k is zero. Suggested by Frank Heckenbach.
3006
e019c247
AD
30072004-12-22 Akim Demaille <akim@epita.fr>
3008
3009 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
3010 (parser::state_type, parser::semantic_type, parser::location_type):
3011 Private, not public.
3012 (parser::parse): Return ints, not bool.
3013 Returning a bool introduces a problem: 0 corresponds to false, and
3014 it seems weird to return false on success. Returning true changes
3015 the conventions for yyparse.
3016 Alternatively we could return void and send an exception.
3017 There is no clear consensus (yet?).
3018 (state_stack, semantic_stack, location_stack): Rename as...
3019 (state_stack_type, semantic_stack_type, location_stack_type): these.
3020 Private, not public.
3021 * tests/c++.at: New.
3022 * tests/testsuite.at, tests/Makefile.am: Adjust.
3023
72731bb7
AD
30242004-12-21 Akim Demaille <akim@epita.fr>
3025
3026 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
3027
9a0d8bec
AD
30282004-12-21 Akim Demaille <akim@epita.fr>
3029
3030 Don't impose std::string for filenames.
3031
3032 * data/lalr1.cc (b4_filename_type): New.
3033 (position::filename): Use it.
3034 (parser.hh): Move the inclusion of stack.hh and location.hh below
3035 the user code, so that needed headers for the filename type can be
3036 included first.
72731bb7
AD
3037 Forward declare them before the user code.
3038 * tests/Makefile.am (check-local, installcheck-local): Pass
3039 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 3040
99880de5
AD
30412004-12-20 Akim Demaille <akim@epita.fr>
3042
3043 Use more STL like names: my_class instead of MyClass.
3044
3045 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
3046 (SemanticStack, SemanticType, StateStack, StateType)
3047 (TokenNumberType, Stack, Slice, Traits, Parser::location)
3048 (Parser::value): Rename as...
3049 (location_stack, location_type, rhs_number_type, semantic_stack)
3050 (semantic_type, state_stack, state_type, token_number_type, stack)
3051 (slice, traits, parser::yylloc, parser::yylval): these.
3052
3053 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
3054
9bec482e
PE
30552004-12-19 Paul Eggert <eggert@cs.ucla.edu>
3056
3057 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
3058 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
3059
f6fbd3da
PE
30602004-12-17 Paul Eggert <eggert@cs.ucla.edu>
3061
3062 Remove uses of 'short int' and 'unsigned short int'. This raises
3063 some arbitrary limits. It uses more memory but nowadays that's
3064 not much of an issue.
3065
3066 This change does not affect the generated parsers; that's a different
3067 task, as some users will want to conserve memory there.
3068
3069 Ideally we should use size_t to represent all object counts, and
3070 something like ptrdiff_t to represent signed differences of object
3071 counts; but that will require more code-cleanup than I have the
3072 time to do right now.
3073
3074 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
3075 Use size_t, not int or short int, to count objects.
3076 * src/closure.c (nritemset, closure): Likewise.
3077 * src/closure.h (nritemset, closure): Likewise.
3078 * src/nullable.c (nullable_compute): Likewise.
3079 * src/print.c (print_core): Likewise.
3080 * src/print_graph.c (print_core): Likewise.
3081 * src/state.c (state_compare, state_hash): Likewise.
3082 * src/state.h (struct state): Likewise.
3083 * src/tables.c (default_goto, goto_actions): Likewise.
3084
3085 * src/gram.h (rule_number, rule): Use int, not short int.
3086 * src/output.c (prepare_rules): Likewise.
3087 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
3088 errs, reductions): Likewise.
3089 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
3090 Likewise.
3091 * src/tables.c (vector_number, tally, action_number,
3092 ACTION_NUMBER_MINIMUM): Likewise.
3093 * src/output.c (muscle_insert_short_int_table): Remove.
3094
efeed023
AD
30952004-12-17 Akim Demaille <akim@epita.fr>
3096
3097 * data/lalr1.cc: Extensive Doxygenation.
3098 (error_): Rename as...
3099 (error): this, since it is visible to the user.
3100 Adjust callers.
3101 (Parser::message): Now an automatic variable from...
3102 (Parser::yyreport_syntax_error_): here.
3103 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
3104 Parser::error.
3105 * tests/input.at: Escape $.
3106
bc82c5a5
PE
31072004-12-16 Paul Eggert <eggert@cs.ucla.edu>
3108
3109 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
3110 Parenthesize rhs to avoid obscure problems with mistakes like
3111 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
3112 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3113 b4_rhs_location): Likewise.
3114 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3115 b4_rhs_location): Likewise.
3116
fd19f271
AD
31172004-12-16 Akim Demaille <akim@epita.fr>
3118
3119 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
3120 yacc.c: be sure to stay within yycheck_.
3121 * tests/actions.at: Re-enable C++ tests.
3122
10454ea4
AD
31232004-12-16 Akim Demaille <akim@epita.fr>
3124
3125 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
3126 real.
3127
c5b95ccf
AD
31282004-12-16 Akim Demaille <akim@epita.fr>
3129
3130 Use #define to handle the %name-prefix.
3131
3132 * data/glr.c, data/yacc.c: Comment changes.
3133 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
3134 so that one can refer to yylex in the parser file, and have it
3135 renamed, as is the case with other skeletons.
3136
617a8f12
AD
31372004-12-16 Akim Demaille <akim@epita.fr>
3138
3139 Move lalr1.cc internals into yy*.
3140
3141 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
3142 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
3143 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
3144 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
3145 (empty_, final_, terror_, errcode_, ntokens_)
3146 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
3147 (looka_, ilooka_, error_range_, nerrs_):
3148 Rename as...
3149 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
3150 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
3151 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
3152 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
3153 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
3154 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
3155 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
3156 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
3157 these.
3158
1e547e6e
PE
31592004-12-15 Paul Eggert <eggert@cs.ucla.edu>
3160
3161 Fix some problems reported by twlevo at xs4all.
3162 * src/symtab.c (symbol_new): Report an error if the input grammar
3163 contains too many symbols. This is better than calling abort() later.
3164 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
3165 (struct node, struct graph):
3166 Rename member expand to stretch. All uses changed.
3167 (struct graph): Remove member layoutalgorithm. All uses removed.
3168 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
3169 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
3170 All uses changed.
3171 (N_STRETCH): Rename from N_EXPAND. All uses changed.
3172
735d6bd4
AD
31732004-12-15 Akim Demaille <akim@epita.fr>
3174
3175 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
3176 Add more Doxygen comments.
3177 (symprint_, stack_print_, reduce_print_, destruct_, pop)
3178 (report_syntax_error_, translate_): Rename as...
3179 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
3180 (yypop_, yyreport_syntax_error_, yytranslate_): this.
3181
2e1f5829
AD
31822004-12-15 Akim Demaille <akim@epita.fr>
3183
3184 * data/lalr1.cc (lex_): Rename as...
3185 (yylex_): this.
3186 Move the trace here.
3187 Take the %name-prefix into account.
3188 Reported by Alexandre Duret-Lutz.
3189
a3cb6248
AD
31902004-12-15 Akim Demaille <akim@epita.fr>
3191
3192 Simplify the C++ parser constructor.
3193
3194 * data/lalr1.cc (debug_): Rename as...
3195 (yydebug_): so that the parser's internals are always in the yy*
3196 pseudo namespace.
3197 Adjust uses.
3198 (b4_parse_param_decl): Remove the leading comma as it is now only
3199 called as unique argument list.
3200 (Parser::Parser): Remove the constructor accepting a location and
3201 an initial debugging level.
3202 Remove from the other ctor the argument for the debugging level.
3203 (debug_level_type, debug_level, set_debug_level): New.
3204
3205 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
3206 constructor calls.
3207
07fed891
AD
32082004-12-15 Akim Demaille <akim@epita.fr>
3209
3210 Remove b4_root related material: failure experiment
a3cb6248 3211 (which goal was to allow to derive from a class).
07fed891
AD
3212
3213 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
3214 definitions and uses.
3215
e603eaa5
PE
32162004-12-14 Paul Eggert <eggert@cs.ucla.edu>
3217
3218 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
3219 not 2, since it's not portable to subtract 1 from the start of an
3220 array. The new item 0 is never set or used. All uses changed.
3221
3222 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
3223 the default definition of YYLLOC_DEFAULT. Problem reported
3224 by Frank Heckenbach.
3225
fafb007d
PE
32262004-12-12 Paul Eggert <eggert@cs.ucla.edu>
3227
3228 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
3229 the normal case and one for the error case. Just use the
3230 first one uniformly. Problem reported by Frank Heckenbach.
3231 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
3232 use exactly the same macro in both places.
3233 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
3234 so that the normal-case YYRHSLOC works for the error case too.
3235 All uses changed.
3236 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
3237 (YYLLOC_DEFAULT): Use the same macro as glr.c.
3238 * doc/bison.texinfo (Location Default Action): Don't claim that
3239 we have an array of locations. Use the same macro for both glr
3240 and lalr parsers. Mention YYRHSLOC. Mention what happens when
3241 the index is 0.
3242
48814dcd
PE
32432004-12-10 Paul Eggert <eggert@cs.ucla.edu>
3244
a4e1a53b
PE
3245 * HACKING: Update email addresses to send announcements to.
3246
48814dcd
PE
3247 * configure.ac (AC_INIT): Bump version to 1.875f.
3248
337116ba
PE
32492004-12-10 Paul Eggert <eggert@cs.ucla.edu>
3250
3251 * NEWS: Version 1.875e.
3252 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
3253
3254 * src/scan-skel.l: Include "complain.h", for "fatal".
3255
3256 * src/relation.h (relation_print, relation_digraph):
3257 Relation sizes are of type relation_node, not size_t (this is
3258 merely a doc fix, since the two types are equivalent).
3259 (relation_transpose): Relation sizes are of type relation_node,
3260 not int.
3261 * src/relation.c: Likewise.
3262 (top, infinity): Now of type relation_node, not int.
3263 (traverse, relation_transpose): Use relation_node, not int.
3264
3265 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
3266 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
3267 (yyparse): Remove unused local introduced in 2004-10-25 patch.
3268
3269 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 3270 specifying whether the test should be skipped. Use it tp
337116ba 3271 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 3272 fail on some hosts, and should be skipped.
337116ba 3273
da2a7671
PE
32742004-12-08 Paul Eggert <eggert@cs.ucla.edu>
3275
3276 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
3277 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
3278 unless otherwise specified below.
3279
3280 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
3281 to allocate kernel_base, kernel_items, kernel_size, since
3282 they needn't be initialized to 0.
3283 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
3284 * src/closure.c (new_closure): Likewise, for itemset.
3285 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
3286 * src/lalr.c (set_goto_map): Likewise, for temp_map.
3287 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
3288 (build_relations): Likewise for edge, states1, includes.
3289 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
3290 * src/reader.c (packgram): Likewise, for ritem, rules.
3291 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
3292 * src/relation.c (relation_digraph): Likewise for VERTICES.
3293 (relation_transpose): Likewise for new_R, end_R.
3294 * src/symtab.c (symbols_token_translations_init): Likewise for
3295 token_translations.
3296 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
3297 (token_actions): Likewise for yydefact, actrow, conflrow,
3298 conflict_list.
3299 (save_column): Likewise for froms[symno], tos[symno].
3300 (goto_actions): Likewise for state_count.
3301 (pack_table): Likewise for base, pos, check.
3302 (tables_generate): Likewise for width.
3303
3304 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
3305 for initial core. Just have a separate core, so we needn't worry
3306 about whether kernel_size and kernel_base are initialized.
3307
3308 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
3309 kernel_size, kernel_items): Remove unnecessary initialization.
3310 * src/conflicts.c (conflicts): Likewise.
3311 * src/derives.c (derives): Likewise.
3312 * src/muscle_tablc (muscle_insert): Likewise.
3313 * src/relation.c (relation_digraph): Likewise.
3314 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
3315 conflrow, conflict_table, conflict_list, table, check):
3316 Likewise.
3317
3318 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
3319 This is because all callers pass unsigned int.
3320 * src/closure.h (new_closure): Likewise.
3321
3322 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
3323 (build_relations): Initialize includes[i] in all cases.
3324 * src/reader.c (packgram): Always initialize rules[ruleno].prec
3325 and rules[ruleno].precsym. Initialize members in order.
3326 * src/relation.c (relation_transpose): Always initialize new_R[i]
3327 and end_R[i].
3328 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
3329
3330 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
3331 conflict_list[0] was always 0, but now it isn't initialized.
3332
3333 * src/table.c (table_grow): When conflict_table grew, the grown
3334 area wasn't cleared. Fix this.
3335
3336 * lib/.cvsignore: Add strdup.c, strdup.h.
3337 * m4/.cvsignore: Add strdup.m4.
3338
00baeeac
PE
33392004-12-07 Paul Eggert <eggert@cs.ucla.edu>
3340
3341 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
3342 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
3343 GOTO_NUMBER_MAXIMUM, since we occasionally compute
3344 ngotos + 1 without checking for overflow.
3345 (build_relations): Use END_NODE, not -1, to denote end of edges.
3346 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
3347 build_relations): Use goto_number, not int, for goto numbers.
3348 * src/tables.c (save_column, default_goto): Likewise.
3349
be3d9d42
AD
33502004-11-23 Akim Demaille <akim@epita.fr>
3351
3352 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
3353 of #defining from yystype.
3354 Don't typedef yystype, C++ does not need it.
3355 This lets it possible to forward declare it as union.
3356
78e526d5
PE
33572004-11-23 Paul Eggert <eggert@cs.ucla.edu>
3358
3359 * bootstrap (gnulib_modules): Add extensions.
3360 Problem reported by Jim Meyering.
3361
afbb696d
PE
33622004-11-22 Paul Eggert <eggert@cs.ucla.edu>
3363
3364 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
3365 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
3366 src/system.h, src/tables.c: XFREE -> free, to accommodate
3367 recent change to gnulib xalloc.h.
78e526d5 3368 Problem reported by Jim Meyering.
afbb696d 3369
c1f8f16a
AD
33702004-11-17 Akim Demaille <akim@epita.fr>
3371
3372 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
3373
33742004-10-28 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
3375 Alexandre Duret-Lutz <adl@gnu.org>
3376
3377 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
3378 changes.
3379 (YYCDEBUG): Adjust.
3380 Use it instead of cdebug_.
3381 (Parser::debug_stream, Parser::set_debug_stream): New.
3382 (Parser::symprint_): Define cdebug_ for temporary backward
3383 compatibility.
3384 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
3385 debug_stream ().
3386
68e11668
AD
33872004-11-17 Akim Demaille <akim@epita.fr>
3388
3389 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
3390 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
3391 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
3392 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
3393
97cbc73e
PE
33942004-10-27 Paul Eggert <eggert@cs.ucla.edu>
3395
3396 * data/glr.c (yyloc_default): Remove; not used.
3397 Problem reported by Frank Heckenbach.
3398
e342c3be
AD
33992004-10-25 Akim Demaille <akim@epita.fr>
3400
3401 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
3402 Introduce another definition to address simple location arrays.
3403 (yyGLRStack): New member: yyerror_range.
3404 (yyrecoverSyntaxError, yyparse): Update it.
3405 (yyrecoverSyntaxError): Use it when shifting the error token to
3406 have an accurate range, equivalent to the one computed by both
3407 yacc.c and lalr1.cc.
3408 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
3409 that column numbers start at column 0, as per GNU Coding
3410 Standards, the others tests, and the doc.
3411 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
3412 Adjust to the above change (first column is 0).
3413 And adjust the location of the "<error>", now covering the whole
3414 line.
3415
93602feb 34162004-10-22 Akim Demaille <akim@epita.fr>
04098407 3417 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
3418
3419 Remove some arbitrary limits on goto numbers and relations.
3420 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
3421 initial values, since they're never used.
3422 (set_goto_map): ngotos is now unsigned, so test for overflow
3423 by seeing whether it wraps around to zero.
3424 * src/lalr.h (goto_number): Now size_t, not short int.
3425 (GOTO_NUMBER_MAXIMUM): Remove.
3426 * src/relation.c (relation_print, traverse, relation_transpose):
3427 Check for END_NODE rather than looking at sign.
3428 * src/relation.h (END_NODE): New macro.
3429 (relation_node): Now size_t, not short int.
3430
dba08b04
PE
34312004-10-22 Paul Eggert <eggert@cs.ucla.edu>
3432
3433 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
3434 keyword, not an identifier. Problem reported by Baron Schwartz in
3435 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
3436
df09ef2e
AD
34372004-10-11 Akim Demaille <akim@epita.fr>
3438
3439 * src/symtab.c (symbol_check_alias_consistency): Also check
3440 type names, destructors, and printers.
3441 Reported by Alexandre Duret-Lutz.
3442 Recode the handling of associativity and precedence in terms
3443 of symbol_precedence_set.
3444 Accept no redeclaration at all, not even equal to the previous
3445 value.
3446 (redeclaration): New.
3447 Use it to factor redeclaration complaints.
3448 (symbol_make_alias): Don't set the type of the alias, let
3449 symbol_check_alias_consistency do it as for other features.
3450 * src/symtab.h (symbol): Add new member prec_location, and
3451 type_location.
3452 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
3453 * tests/input.at (Incompatible Aliases): New.
3454
146bc99d
PE
34552004-10-09 Paul Eggert <eggert@cs.ucla.edu>
3456
3457 .cvsignore fixes to accommodate gnulib changes,
3458 and the practice of naming build directories "_build".
3459 * .cvsignore: Add "_*". Sort.
3460 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
3461 * m4/.cvsignore: Add "*_gl.m4".
3462
e503aa60
AD
34632004-10-06 Akim Demaille <akim@epita.fr>
3464
3465 * src/parse-gram.y (add_param): Fix the truncation of trailing
3466 spaces.
3467
b4a20338
AD
34682004-10-05 Akim Demaille <akim@epita.fr>
3469
3470 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
3471 whether the reducion was empty or not. This leaves room to
3472 improve the use of YYLLOC_DEFAULT in such a case.
3473 lalr1.cc is still experimental, so changing this is acceptable.
3474 And finally, there are probably not many users who changed the
3475 handling of locations in GLR, so changing is admissible too.
3476
3477 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
3478 empty reduction, set @$ to an empty location ending the previously
3479 stacked symbol.
3480 Adjust uses to make sure the code is triggered on empty
3481 reductions.
3482 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
3483 expected output: empty reductions have empty locations.
3484
f85a5e6f
AD
34852004-09-29 Akim Demaille <akim@epita.fr>
3486
3487 * data/lalr1.cc: Move towards a more standard C++ coding style
3488 for templates: Class < T > -> Class<T>.
3489
b203fc2c
AD
34902004-09-29 Akim Demaille <akim@epita.fr>
3491
3492 * data/lalr1.cc: Reinstall the former ctor, for sake of
3493 compatibility, but warn it will be removed.
3494 Move towards a more standard C++ coding style (i.e., type *var ->
3495 type* var).
3496
5b7e1e73
PE
34972004-09-27 Paul Eggert <eggert@cs.ucla.edu>
3498
3fee967f
PE
3499 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
3500 since it's less likely to work if NULs are involved in the future.
5b7e1e73 3501
0dcca5c2
AD
35022004-09-27 Akim Demaille <akim@epita.fr>
3503
3504 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
3505
6dde1c82
AD
35062004-09-27 Akim Demaille <akim@epita.fr>
3507
3508 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 3509 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
3510 and argument names.
3511 (b4_cc_constructor_call): Likewise.
3512
b233d555
AD
35132004-09-24 Akim Demaille <akim@epita.fr>
3514
3515 * src/parse-gram.y (add_param): Strip the leading and trailing
3516 blanks from a formal argument declaration.
3517 (YY_LOCATION_PRINT): New.
3518
619404e3
AD
35192004-09-24 Akim Demaille <akim@epita.fr>
3520
3521 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
3522 after the location.
3523
dd8d9022
AD
35242004-09-24 Akim Demaille <akim@epita.fr>
3525
3526 * doc/bison.texinfo (Table of Symbols): Sort.
3527
0092f063
AD
35282004-09-21 Akim Demaille <akim@epita.fr>
3529
3530 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
3531 the useless parentheses.
3532 Suggested by Paul Eggert.
3533
451364ed
AD
35342004-09-20 Akim Demaille <akim@epita.fr>
3535
3536 Let the initial-action act on the look-ahead, and use it for the
3537 "initial push" (corresponding to an hypothetical beginning-of-file).
3538 And let lalr1.cc honor %initial-action.
3539
3540 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
3541 example.
3542 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
3543 (Parser::Parser): Remove the ctor that used to initialize it.
3544 (Parser::parse): Like in the other skeletons, issue the "starting
3545 parse" message before any action.
3546 Honor %initial-action.
3547 Initialize the stacks with the lookahead.
3548 * data/yacc.c: Let $$ and @$ in %initial-action designate the
3549 look-ahead.
3550 Push them in the stacks.
3551 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
3552
18d192f0
AD
35532004-09-20 Akim Demaille <akim@epita.fr>
3554
3555 * doc/bison.texinfo (Initial Action Decl): New.
3556
b8458aa5
AD
35572004-09-20 Akim Demaille <akim@epita.fr>
3558
3559 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
3560 clearer criterion to define it.
3561 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
3562 When reducing on an empty RHS, use the latest stacked location as
3563 location.
3564 yylloc is not always available.
3565 * data/glr.c: Likewise.
3566 Also, honor initial-actions.
3567
3fc16193
AD
35682004-09-20 Akim Demaille <akim@epita.fr>
3569
3570 * data/yacc.c (YY_LOCATION_PRINT): New.
3571 Define when we know YYLTYPE's structure, i.e., when the default
3572 YYLLOC_DEFAULT is used.
3573 * data/c.m4 (b4_yysymprint_generate): Use it.
3574 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
3575 value of the result.
3576 (error_start_): Replace with...
3577 (error_range_): this location array.
3578 This allows to replace code relying on the implementation of
3579 locations by portable code.
3580 * data/yacc.c (yylerrsp): Replace with...
3581 (yyerror_range): this.
3582 Every time a token is popped, update yyerror_range[0], to have an
3583 accurate location for the error token.
3584 * data/glr.c (YY_LOCATION_PRINT): New.
3585 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
3586 deference a pointer.
3587 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
3588 report the location in %printers.
3589
3590 * src/scan-skel.l: Instead of abort, report error messages to ease
3591 understanding skeleton scanning failures.
3592
ecfe33e7
AD
35932004-09-16 Akim Demaille <akim@epita.fr>
3594
3595 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
3596 (iterator, const_iterator): these, to be more in the C++ spirit.
3597 Also, return reverse iterators so that when displaying the stack
3598 we display its bottom first.
3599 (Parser::stack_print_, Parser::reduce_print_): Match the messages
3600 from yacc.c.
3601 We should probably use vector here though.
3602
1576d44d
AD
36032004-09-16 Akim Demaille <akim@epita.fr>
3604
3605 Have more complete shift traces.
3606
3607 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
3608 to report Shifts instead of ad hoc YYDPRINTF invocations,
3609 including for the error token.
3610 * data/lalr1.cc (symprint_): Output the location.
3611 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
3612 output the location within the %printer.
3613 Activate GLR tests, at least to make sure they compile properly.
3614 They still don't pass though.
3615 * tests/calc.at: Adjust expect verbose output, since now "Entering
3616 state..." is on a different line than the "Shifting" message.
3617
9c66f418
AD
36182004-09-08 Akim Demaille <akim@epita.fr>
3619
3620 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
3621 Bison directive from the Bison file to the invocation of this
3622 macro, so that these directives are passed to
3623 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
3624 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
3625 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
3626 the extra Bison directives instead of the whole series.
3627 Change the grammar so that there are recoverable errors, and
3628 unrecoverable errors. Now we can have the parser give up before
3629 consuming the whole input. As a result we now can observe that
3630 the lookahead is freed when needed.
3631 Change the parser source to parse argv[1] instead of a hard coded
3632 string.
3633 Simplify yylex, and give a value and location to EOF.
3634 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
3635 passed directives already coded in the file.
3636 Add some tests to check the location of "error".
3637 For some tests, the C++ parser is correct, and not yacc.c.
3638 For other tests, they provide different, but unsatisfying, values,
3639 so keep the C++ value so that at least one parser is "correct"
3640 according to the test suite.
3641 (Actions after errors): Remove, this is subsumed by the
3642 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
3643
52d5733f
AD
36442004-09-06 Akim Demaille <akim@epita.fr>
3645
3646 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 3647 (Parser::pop): New.
52d5733f
AD
3648 Use it.
3649
a0e68930
AD
36502004-09-06 Akim Demaille <akim@epita.fr>
3651
3652 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
3653 argument, an informative message.
3654 Call YY_SYMBOL_PRINT.
3655 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
3656 * data/lalr1.cc (destruct_): Likewise.
3657 In addition, no longer depend on b4_yysymprint_generate and
3658 b4_yydestruct_generate to generate these functions, do it "by
3659 hand".
3660
e757bb10
AD
36612004-09-03 Akim Demaille <akim@epita.fr>
3662
3663 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
3664 invoked, yydestruct the lookahead.
3665 * tests/calc.at (Calculator $1): Update the expected lengths of
3666 traces: there is an added line for the discarded lookahead.
3667 * doc/bison.texinfo (Destructor Decl): Some rewording.
3668 Define "discarded" symbols.
3669
0fe1f06d
AD
36702004-09-02 Akim Demaille <akim@epita.fr>
3671
3672 * data/lalr1.cc (translate_, destruct_): No reason to be static.
3673
284acc8b
AD
36742004-09-02 Akim Demaille <akim@epita.fr>
3675
3676 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
3677 (YYDSYMPRINTF): Rename as...
3678 (YY_SYMBOL_PRINT): this.
3679 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
3680 two.
3681 Use it instead of direct symprint_ calls.
3682 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
3683 one.
3684
a5eb1ed2
AD
36852004-09-02 Akim Demaille <akim@epita.fr>
3686
b7c72fe1
AD
3687 * data/lalr1.cc (b4_yysymprint_generate): New.
3688 (symprint_): New member function, defined when YYDEBUG.
3689 Use it consistently instead of token/nterm debugging output by
3690 hand.
a5eb1ed2
AD
3691 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
3692 %printer calls to use cdebug_ when using lalr1.cc.
3693
417141dd
AD
36942004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
3695
3696 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
3697 with #ifdef YYDEBUG.
3698
2fa09258
AD
36992004-08-26 Akim Demaille <akim@epita.fr>
3700
3701 * doc/bison.texinfo (Implementing Loops): Rename as...
3702 (Implementing Gotos/Loops): this.
3703
9378b508
PE
37042004-08-13 Paul Eggert <eggert@cs.ucla.edu>
3705
3706 Adjust to latest gnulib.
3707 * bootstrap (gnulib_modules): Add xalloc-die.
3708 Set LC_ALL=C so that file names sort consistently.
3709 Prefer the gnulib copies of gettext.m4, glibc21.m4,
3710 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
3711 uintmax_t.m4, ulonglong.m4.
3712 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
3713 po.m4 since we are now using _gl.m4 instead.
3714
87a8ad5c
PE
37152004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
3716
3717 * src/scan-action.l: Remove. Scanning of semantic actions is
3718 handled in scan-gram.l.
3719
dca81a78
PE
37202004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
3721
3722 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
3723
3724 * src/location.h (struct): The file member is a uniqstr.
3725 (equal_boundaries): Use UNIQSTR_EQ for comparison.
3726
c9cbf7c5
PE
37272004-07-22 Paul Eggert <eggert@cs.ucla.edu>
3728
3729 Fix bug with non-%union parsers that have printers or destructors,
3730 which led to a Bison core dump. Reported by Peter Fales in
3731 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 3732
c9cbf7c5
PE
3733 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
3734 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
3735 not to our own type.
3736 * src/output.c (symbol_destructors_output, symbol_printers_output):
3737 Don't assume %union.
3738 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
3739 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
3740 UNION-FLAG. All callers changed.
3741 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
3742 Use type char, not unsigned int, when declaring an array of char;
3743 this lets us remove a cast.
3744 (Printers and Destructors): Add non-%union test cases.
3745
fa7e68c3
PE
37462004-06-21 Paul Eggert <eggert@cs.ucla.edu>
3747
3748 * doc/bison.texinfo: Minor editorial changes, mostly to the new
3749 GLR writeups. E.g., avoid frenchspacing and the future tense,
3750 change "lookahead" to "look-ahead", and change "wrt" to "with
3751 respect to".
2fa09258 3752
fa7e68c3
PE
37532004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3754
3755 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
3756 New sections, split off from the GLR Parsers section. Put the new
3757 Simple GLR Parser near the start of the GLR section, for clarity.
3758 Rewrite connective text.
3759
99a9344e
PE
37602004-06-21 Frank Heckenbach <frank@g-n-u.de>
3761
3762 * doc/bison.texinfo (Simple GLR Parsers): New section.
3763
8dd162d3
PE
37642004-06-21 Paul Eggert <eggert@cs.ucla.edu>
3765
3766 * NEWS, TODO, doc/bison.texinfo:
3767 Use "look-ahead" instead of "lookahead", to be consistent.
3768 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
3769 while we're fixing "look-ahead".
3770 * src/conflicts.c (shift_set): Renamed from shiftset.
3771 (look_ahead_set): Renamed from lookaheadset.
3772 * src/print.c: Likewise.
3773 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
3774 name for "lookahead".
3775 (report_types, usage): Likewise.
3776 * src/getargs.h (report_look_ahead_tokens): Renamed from
3777 report_lookaheads.
3778 * src/lalr.c (compute_look_ahead_tokens): Renamed from
3779 compute_lookaheads.
3780 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
3781 (look_ahead_tokens_print): Renamed from lookaheads_print.
3782 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
3783 state_rule_lookaheads_print.
3784 * src/state.h: Likewise.
3785 (reductions.look_ahead_tokens): Renamed from lookaheads.
3786 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
3787 AT_DATA_LOOKAHEADS_GRAMMAR.
3788
57a90331
PE
37892004-06-03 Paul Eggert <eggert@cs.ucla.edu>
3790
3791 * README: Update location of patched M4 distribution.
3792
8ed3234a
PE
37932004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
3794
3795 Don't assume the C++ compiler takes the same arguments as the C compiler
3796 (trivial change).
3797 * configure.ac (O0CXXFLAGS): New var.
3798 * tests/atlocal.in (CXXFLAGS): Use it.
3799
07971983
PE
38002004-05-29 Paul Eggert <eggert@cs.ucla.edu>
3801
3802 Fix some "make check" problems with C++ reported by
3803 Albert Chin-A-Young for Tru64 C++ in this thread:
3804 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
3805
3806 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
3807 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3808 Output to a .cc file for C++, not to a .c file.
3809 * tests/calc.at (AT_CHECK_CALC): Likewise.
3810 * tests/regression.at (AT_CHECK_DANCER): Likewise.
3811 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
3812
29058652
PE
38132004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
3814
3815 * tests/calc.at, tests/actions.at: Workaround for SGI
3816 C++ compiler. (trivial change)
3817
62cb8a99
PE
38182004-05-27 Paul Eggert <eggert@cs.ucla.edu>
3819
fd418816
PE
3820 Spent a few hours checking out which prerequisite versions the
3821 current sources actually require. I went all the way back to
3822 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
3823 a seemingly endless set of combinations of versions more recent
3824 than that. The bottom line is that the current sources require
3825 fairly recent versions of the build tools, and it'll be some work
3826 to change this.
3827 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
3828 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
3829 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
3830 Add comments explaining why those particular versions are
3831 currently needed.
2fa09258 3832
62cb8a99
PE
3833 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
3834 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 3835 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
3836
3837 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
3838 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
3839
caa52c10
PE
38402004-05-26 Paul Eggert <eggert@cs.ucla.edu>
3841
3842 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
3843 0.11.5. Suggested by Bruno Haible.
3844 * bootstrap: Remove gettext version checking.
3845
3846 * doc/bison.texinfo (Decl Summary): Also mention that %union
3847 can depend on prerequisite types. Problem reported by Tim
3848 Van Holder.
3849
4bfd5e4e
PE
38502004-05-25 Paul Eggert <eggert@cs.ucla.edu>
3851
2cef3017
PE
3852 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
3853 * README-alpha: Don't tell people not to package this.
3854
b9c85d5c
PE
3855 * bootstrap: Don't assume $(...) works; use `...` instead.
3856 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
3857 gettext better.
3858
4bfd5e4e
PE
3859 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
3860 put into the -d output file, and mention what to do if YYSTYPE is
3861 defined as a macro.
3862
6a36ff94
PE
38632004-05-24 Paul Eggert <eggert@cs.ucla.edu>
3864
6712933e
PE
3865 Undo change made earlier today: it caused autopoint to not bring
3866 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
3867 autopoint's.
3868
3869 * bootstrap: Check that gettext version matches what's in
3870 configure.ac. Warn users to ignore robots.txt ERROR 404.
3871 * bootstrap: Undo today's earlier change (logged below).
3872 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 3873
6a36ff94
PE
3874 The gettext version checking is causing more trouble than it's
3875 curing; remove it. Problem reported by Paul Hilfinger.
3876
3877 * bootstrap: Issue a warning that one can expect a message
3878 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
3879 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
3880
209ea708
PE
38812004-05-23 Paul Eggert <eggert@cs.ucla.edu>
3882
3883 Ensure that the C++ compiler used for testing actually works on a
3884 simple test program; if not, skip the C++-related tests. Problem
3885 reported by Vin Shelton in:
161a71f3 3886 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
3887
3888 * m4/cxx.m4: New file.
3889 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
3890 * tests/atlocal.in (BISON_CXX_WORKS): Add.
3891 * tests/local.at (AT_COMPILE_CXX): Use it.
3892
41ca2549
PE
38932004-05-21 Paul Eggert <eggert@cs.ucla.edu>
3894
383e69dc
PE
3895 * data/glr.c (yylloc): Output this macro even if locations are not
3896 being generated, as the GLR parser needs it even in that case.
3897 Problem reported by Troy A. Johnson
3898 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
3899
41ca2549
PE
3900 * configure.ac (AC_INIT): Update to 1.875e.
3901
e476c87d
PE
39022004-05-21 Paul Eggert <eggert@cs.ucla.edu>
3903
3904 * NEWS: Version 1.875d.
3905 * configure.ac (AC_INIT): Likewise.
3906 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
3907
3908 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
3909 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
3910 lalr1.cc runs afoul of the first, and the last two are no longer
3911 supported by GCC 3.4.0.
3912 * README: Mention GNU m4 1.4 or later; mention m4 patches.
3913 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
3914
233a88ad
PE
39152004-05-06 Paul Eggert <eggert@cs.ucla.edu>
3916
3917 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
3918 unsigned int, for compatibility with latest gnulib hash module.
3919 * src/state.c (state_hash, state_hasher): Likewise.
3920 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
3921 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 3922
12ffdd28
PE
39232004-05-03 Paul Eggert <eggert@cs.ucla.edu>
3924
3925 * NEWS: Unescaped newlines are no longer allowed in char & strings.
3926
3927 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
3928 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
3929 character and string literals.
3930 (unexpected_end): New function.
3931 (unexpected_eof): Use it.
3932 (unexpected_newline): New function.
3933 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
3934 actions.
e476c87d 3935
12ffdd28
PE
3936 * NEWS: Document %expect-rr.
3937
3938 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
3939 Fix typo by replacing $1 with $option.
3940 Remove more 'intl'-related files.
9668e2be 3941 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
3942
3943 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
3944 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
3945 strtoul.c.
3946 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
3947 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
3948 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
3949 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
3950 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
3951 * src/.cvsignore: Add *.output.
3952
3953 * src/parse-gram.y: Put copyright notice inside %{ %} so it
3954 gets copied to the output file.
e476c87d 3955
1f65350a
PE
39562004-04-28 Paul Eggert <eggert@twinsun.com>
3957
3958 Get files from the gnulib and po repositories, instead of relying
3959 on them being in our CVS. Upgrade to latest versions of gnulib
3960 and Automake.
3961
3962 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
3963 * bootstrap: Bootstrap from gnulib and po repositories.
3964 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
3965 * README-cvs: Document these changes. Remove version numbers from
3966 mentions of build tools, since they change so often. Mention Flex.
3967
3968 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
3969 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
3970 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
3971 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 3972 does this for us.
12ffdd28
PE
3973 (AC_ISC_POSIX): Remove; we no longer support this
3974 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
3975 (AC_HEADER_STDC): Remove: we now assume C89 or better.
3976 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
3977 Do not check for C89 headers, except for locale.h which is used
3978 by the Yacc library and must port to K&R hosts.
3979 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
3980 Do not check for C89 functions, except for setlocale which is
3981 used by the Yacc library.
3982 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
3983 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
3984 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
3985 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
3986 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
3987 AM_GNU_GETTEXT): Remove; now done by:
3988 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
3989 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
3990 for us.
3991
3992 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
3993 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
3994 Define to empty, as gnulib.mk will do the rest for us.
3995 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
3996 for us.
3997 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
3998 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
3999
4000 * src/files.c: Include gnulib's xstrndup.h.
4001
4002 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
4003 (REALLOC): Use xnrealloc, for likewise.
4004 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
4005 (strnlen, memrchr): Remove decls; functions no longer used.
4006 Include <stpcpy.h>.
4007
4008 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
4009 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
4010 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
4011 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
4012 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
4013 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
4014 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
4015 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
4016 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
4017 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
4018 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
4019 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
4020 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
4021 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
4022 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
4023 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
4024 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
4025 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
4026 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
4027 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
4028 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
4029 Remove, as these files are now generated automatically
4030 by bootstrap or automake.
4031
4032 * po/ChangeLog: Remove: all but one entry was a duplicate
4033 of this file, and I moved that 2000-11-02 entry here.
4034
4035 * config/.cvsignore: Add Makefile, depcomp, install-sh.
4036 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
4037 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
4038 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
4039 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
4040 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
4041 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
4042 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
4043 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
4044 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
4045 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
4046 xstrndup.h.
4047 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
4048 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
4049 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
4050 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
4051 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
4052 * src/.cvsignore: Remove *_.c.
4053
4054
4055 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
4056 support it. (The latest stable gzip doesn't.)
4057
40582004-04-27 Paul Eggert <eggert@twinsun.com>
4059
4060 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
4061 case, as stos_ is now used by destructors due to the 2004-02-09
4062 change.
4063
4064 Remove more K&R C support.
4065 * lib/libiberty.y (PARAMS): Remove. All uses removed.
4066 * lib/subpipe.c (errno): Remove decl.
4067 Include <stdlib.h> unconditionally.
4068 (EXIT_FAILURE): Remove macro.
4069 * src/complain.c (vfprintf, strerror): Remove.
4070 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
4071 unconditionally.
4072 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
4073 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
4074 (strchr, strspn, memchr): Remove decls.
4075 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
4076 unconditionally. Do not declare perror.
4077 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
4078 unconditionally.
4079
4080 * src/complain.c (_): Remove useless defn, as system.h defines this.
4081
4082 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
4083 with latest obstack.h.
4084 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
4085 to procedure types, as obstack.h now does that for us.
4086 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
4087
4088 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
4089 so that this include file can stand alone.
4090 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
4091 does this now. Include subpipe.h first after config.h, to
4092 test whether it can stand alone.
4093
4094 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
4095 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
4096 unused declaration.
4097
4098 * tests/synclines.at (%union synch line): Put a dummy member in
4099 the union, because empty unions aren't allowed in C. Caught
4100 by GCC 3.4.0.
4101
4f16766c
PE
41022004-04-13 Jim Meyering <jim@meyering.net>
4103
4104 * src/conflicts.c (conflicts_print): Correct format string typo:
4105 use `%%' to produce literal `%'. (trivial change)
4106
779e7ceb
PE
41072004-03-30 Paul Eggert <eggert@twinsun.com>
4108
4109 * src/getargs.c (version): Update copyright year to 2004.
4110
4111 * data/c.m4 (b4_int_type): Use 'short int' rather than
4112 'short', and similarly for 'long', 'unsigned', etc.
4113 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
4114 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
4115 yy_yypstack, yydumpstack): Likewise.
4116 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
4117 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
4118 Likewise.
4119 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
4120 yy_stack_print, yyparse): Likewise.
4121 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
4122 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
4123 * lib/bitset.c (bitset_print): Likewise.
4124 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
4125 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
4126 * lib/bitsetv.c (bitsetv_dump): Likewise.
4127 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
4128 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
4129 Likewise.
4130 * src/LR0.c (allocate_itemsets): Likewise.
4131 * src/gram.h (rule_number, rule): Likewise.
4132 * src/lalr.h (goto_number): Likewise.
4133 * src/nullable.c (nullable_compute): Likewise.
4134 * src/output.c (prepare_rules): Likewise.
4135 * src/relation.c (relation_print, relation_digraph): Likewise.
4136 * src/relation.h (relation_node): Likewise.
4137 * src/state.h (state_number, transitions, errs, reductions,
4138 struct state): Likewise.
4139 * src/symtab.h (symbol_number, struct symbol): Likewise.
4140 * src/tables.c (vector_number, tally, action_number,
4141 default_goto, goto_actions): Likewise.
4142 * tests/existing.at (GNU Cim Grammar): Likewise.
4143 * tests/regression.at (Web2c Actions): Likewise.
4144
4145 * src/output.c (muscle_insert_short_int_table): Renamed from
4146 muscle_insert_short_table. All uses changed.
4147
d6328241
PH
41482004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4149
4150 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
4151 (declaration): Replace expected_conflicts with expected_sr_conflicts.
4152 Add %expect-rr rule.
4f16766c 4153
d6328241
PH
4154 * src/scan-gram.l: Recognize %expect-rr.
4155
4f16766c 4156 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 4157 expected_conflicts.
4f16766c 4158 (expected_rr_conflicts): Declare.
d6328241
PH
4159
4160 * src/conflicts.c (expected_sr_conflicts): Rename from
4161 expected_conflicts.
4162 (expected_rr_conflicts): Define.
4163 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
4164 for GLR parsers.
4165 Use expected_sr_conflicts in place of expected_conflicts.
4166 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 4167
d6328241 4168 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 4169
1452af69
PE
41702004-03-08 Paul Eggert <eggert@gnu.org>
4171
4172 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 4173 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
4174
4175 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
4176 in lalr1.cc.
4177 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
4178 * src/scan-gram.l (scan_integer): New function.
4179 ({int}): Use it.
4180 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
4181 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
4182 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
4183 Say "long int", not "long", for uniformity with GNU style.
4184
006d217d
PE
41852004-02-25 Paul Eggert <eggert@twinsun.com>
4186
4187 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
4188 compilers. This fixes a problem with Intel's C++ compiler being
4189 chatty, reported by Guido Trentalancia in
161a71f3 4190 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 4191
c2729758
ADL
41922004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
4193
4194 Support %destructor and merge error locations in lalr1.cc.
4195
4196 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
4197 (Parser::stos_): Define unconditionally.
4198 (Parser::destruct_): New method. Generate its body with
4199 b4_yydestruct_generate.
4200 (Parser::error_start_): New attribute.
4201 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
4202 token which are discarded.
4203 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
4204 error_start_ when erroneous token are discarded.
4205 (Parser::parse) <yyerrlab1>: Compute the location of the error
4206 token so that it covers all the discarded tokens.
4207 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
4208 it can be called with `%skeleton "lalr1.cc"', and do that.
4209
dd0e0635
PE
42102004-02-02 Paul Eggert <eggert@twinsun.com>
4211
4212 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
4213 $(top_srcdir)/lib and ../lib. This fixes a bug reported
4214 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
4215 There's no need to mention top_builddir since Automake does that
4216 for us.
4217 (INCLUDES): Remove, as Automake says it's obsolescent.
4218 Contents migrated into AM_CPPFLAGS as described above.
4219 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
4220
42212004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4222
4223 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
4224 (yyreportSyntaxError): Handle case where lookahead token is
4225 YYEMPTY.
4226
be16239b
PH
42272004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4228
4229 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
4230 resulting parsers are compilable with C++.
4231
5fa90832
PE
42322003-12-23 Paul Eggert <eggert@twinsun.com>
4233
4234 * config/depcomp, config/install-sh: Sync with Automake 1.8.
4235 * src/output.c (output_skeleton): Rename local var.
4236 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
4237 Bison tokens, as this runs afoul of the 2003-10-07 change that
4238 disallowed NUL bytes in character constants or string literals.
4239
4240 * tests/local.at: Require Autoconf 2.59's Autotest.
4241 * tests/testsuite.at: Don't include local.at, since we now assume
4242 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
4243 including it.
4244 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
4245 multiple inclusion warnings.
dd0e0635 4246
b165c324
AD
42472003-12-02 Akim Demaille <akim@epita.fr>
4248
4249 * doc/bison.texinfo (How Can I Reset the Parser): More about start
4250 conditions.
4251 From Bruno Haible.
4252
26e06a21
ADL
42532003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
4254
4255 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
4256
92ac3705
PE
42572003-10-07 Paul Eggert <eggert@twinsun.com>
4258
6a5ecb38
PE
4259 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
4260 if testsuite doesn't exist.
4261
92ac3705
PE
4262 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
4263 literals, unfortunately.
4264 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
4265 Complain about NUL bytes in character constants or string literals.
4266
91d2c560
PE
42672003-10-05 Paul Eggert <eggert@twinsun.com>
4268
4269 * NEWS: Don't document %no-default-prec, as it's still
4270 too experimental.
4271 * doc/bison.texinfo: Document %no-default-prec only if
4272 the defaultprec flag is set. Normally it's not.
4273
0cc3da3a
PE
42742003-10-04 Paul Eggert <eggert@twinsun.com>
4275
4276 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
4277 non-modifiable lvalue, instead of a modifiable one.
4278 * doc/bison.texinfo (Actions): Document that $$ can
4279 be assigned to. Do not claim that $$ and $N are
4280 array element references: user code should not rely on this.
4281
22fccf95
PE
42822003-10-01 Paul Eggert <eggert@twinsun.com>
4283
4284 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
4285 (grammar_declaration): Use it.
4286 * src/scan-gram.l: New token %no-default-prec.
4287 * tests/conflicts.at: Revamp tests to use %no-default-prec.
4288 * NEWS, doc/bison.texinfo: Document the above.
4289
fc8f2965
AD
42902003-10-01 Akim Demaille <akim@epita.fr>
4291
4292 VCG no longer supports long_straight_phase.
4293
4294 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
4295 * src/print_graph.c (print_graph): Adjust.
4296
39a06c25
PE
42972003-09-30 Frank Heckenbach <frank@g-n-u.de>
4298 and Paul Eggert <eggert@twinsun.com>
4299
4300 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
4301 Table of Symbols): Document %default-prec.
4302 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
4303 (grammar_declaration): Set default_prec on %default-prec.
4304 * src/scan-gram.l (%default-prec): New token.
4305 * src/reader.h (default_prec): New flag.
4306 * src/reader.c: Likewise.
4307 (packgram): Handle it.
4308 * tests/conflicts.at (%default-prec without %prec,
4309 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 4310
39a06c25
PE
43112003-09-30 Paul Eggert <eggert@twinsun.com>
4312
4313 * tests/testsuite.at: Include local.at, not input.at, fixing
4314 a typo in the 2003-08-25 patch.
4315
62b6aef9
AD
43162003-08-27 Akim Demaille <akim@epita.fr>
4317
4318 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
4319 GCC warnings.
4320
89e1cc61
AD
43212003-08-26 Akim Demaille <akim@epita.fr>
4322
4323 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
4324 "<\#" to avoid magic from Gnus when posting parts of this script.
4325
a08460b0
AD
43262003-08-26 Akim Demaille <akim@epita.fr>
4327
4328 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
4329 (Parser::parse): here.
4330 Adjust: nerrs and errstatus is now replaced by...
4331 (Parser::nerrs_, Parser::errstatus_): New.
4332
603f1cfd
AD
43332003-08-25 Akim Demaille <akim@epita.fr>
4334
4335 * config/announce-gen, Makefile.cfg: New.
4336 * Makefile.am: Adjust.
4337 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
4338 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
4339
cd3684cf
AD
43402003-08-25 Akim Demaille <akim@epita.fr>
4341
4342 When reducing initial empty rules, Bison parser read an initial
4343 location that is not defined. This results in garbage, and that
4344 affects Bison's own parser. Therefore we need (i) to extend Bison
4345 to support a means to initialize this location, and (ii) to use
4346 this CVS Bison to fix CVS Bison's parser.
4347
4348 * src/reader.h, reader.c (epilogue_augment): Remove, replace
4349 with...
4350 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
4351 * src/parse-gram.y: Adjust.
4352 (%initial-action): New.
4353 (%error-verbose): Since we require CVS Bison, there is no reason
4354 not to use it.
4355 * src/scan-gram.l: Adjust.
4356 * src/Makefile.am (YACC): New, to make sure we use our own parser.
4357 * data/yacc.c (yyparse): Use b4_initial_action.
4358
4e03e201
AD
43592003-08-25 Akim Demaille <akim@epita.fr>
4360
4361 * doc/bison.texinfo: Don't promote stdout for error messages.
4362
8c182d05
AD
43632003-08-25 Akim Demaille <akim@epita.fr>
4364
4365 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
4366 From Alexandre Duret-Lutz.
4367
6a60c4cf
PE
43682003-08-25 Akim Demaille <akim@epita.fr>
4369
4370 Version 1.875c.
4371
25f66e1a
AD
43722003-08-25 Akim Demaille <akim@epita.fr>
4373
4374 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
4375 Use them.
4376
5348bfbe
AD
43772003-08-25 Akim Demaille <akim@epita.fr>
4378
4379 * data/lalr1.cc (Parser::reduce_print_): New.
4380 Use it.
4381
47301314
AD
43822003-08-25 Akim Demaille <akim@epita.fr>
4383
4384 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
4385 error recovery loops. This patch is based on
161a71f3 4386 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
4387 Also, augment the similarity between lalr1.cc and yacc.c.
4388 Note: the locations of error recovery rules are not correct yet.
4389
4390 * data/lalr1.cc: Comment changes to augment the similarity between
4391 lalr1.cc and yacc.c.
4392 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
4393 (yyerrlab1): Remove, but where it used to be (now the bottom part of
4394 yyerrlab), when hitting EOF, pop the whole stack here instead of
4395 merely falling thru the default error handling mechanism.
4396 (yyerrorlab): New label, with the old contents of YYERROR,
4397 plus the following change: pop the stack of rhs corresponding
4398 to the production that invoked YYERROR. That is how Yacc
4399 behaves (required by POSIX).
4400 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
4401 fail.
4402
1f7a61ff
AD
44032003-08-25 Akim Demaille <akim@epita.fr>
4404
4405 Tune local.at so that people can "autom4te -l autotest calc.at -o
4406 calc" for instance, to extract a sub test suite.
4407
4408 * tests/testsuite.at: Move the initialization, Autotest version
4409 requirement, and AT_TESTED invocation into...
4410 * tests/local.at: here.
4411 * tests/testsuite.at: Include it for compatibility with Autoconf
4412 2.57.
4413 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
4414 be ignore.
4415
327b5b56
PE
44162003-08-04 Paul Eggert <eggert@twinsun.com>
4417
4418 Rework code slightly to avoid gcc -Wtraditional warnings.
4419 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
4420 The returned value is now stored in *YY0. All callers changed.
4421 * src/output.c (merge_output): Adjust to the above change.
4422
0051e3ed
PE
44232003-07-26 Paul Eggert <eggert@twinsun.com>
4424
4425 * data/glr.c (YYASSERT): New macro.
4426 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
4427 yyresolveStates, yyprocessOneStack):
4428 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
4429 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 4430
137437c6
PE
44312003-07-25 Paul Eggert <eggert@twinsun.com>
4432
5b620e06
PE
4433 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
4434 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 4435 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
4436 by Frank Heckenbach, though I have omitted the structure-initialization
4437 part of his glr-knr.diff patch since I recall that the Portable
4438 C Compiler didn't require that change.
4439
137437c6
PE
4440 Let the user specify how to allocate and free memory.
4441 Derived from a suggestion by Frank Heckenbach in
161a71f3 4442 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
4443 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
4444 All uses of free, malloc, realloc changed to use these macros,
4445 and unnecessary casts removed.
4446 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
4447
ddb85ca5
PE
44482003-07-06 Matthias Mann <MatthiasMann@gmx.de>
4449
4450 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
4451 use s.empty() rather than s == "" to test for empty string; see
161a71f3 4452 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
4453 (trivial change)
4454
39910e09
AD
44552003-06-25 Akim Demaille <akim@epita.fr>
4456
4457 * config/depcomp, config/install-sh: Update from masters.
4458
0ae99356
PE
44592003-06-20 Paul Eggert <eggert@twinsun.com>
4460
4461 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
4462 and return properly parenthesized result.
4463 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
4464 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
4465 Remove unnecessary parentheses from uses.
4466 * doc/bison.texinfo (Location Default Action): Describe the
4467 conventions for parentheses.
4468
cd05d13c
PE
44692003-06-19 Paul Eggert <eggert@twinsun.com>
4470
81fd08ca
PE
4471 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
4472 yyreportTree): Do not assume that size_t is the same width as int,
4473 when printing sizes. Print sizes using an unsigned format.
4474 Problem reported by Frank Heckenbach in
161a71f3 4475 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 4476
cd05d13c
PE
4477 Port to Forte Developer 7 C compiler.
4478 * data/glr.c (struct YYLTYPE): If locations are not being used,
4479 declare a single dummy member, as empty structs do not conform
4480 to the C standard.
4481 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
4482 the Forte Developer 7 C compiler complains that end-of-loop
4483 code is not reached.
4484
4dcf140b
PE
44852003-06-17 Paul Eggert <eggert@twinsun.com>
4486
4487 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
4488 avoid warnings from picky compilers about redefinition of PARAMS.
4489
8dd76bee
PE
44902003-06-17 Paul Eggert <eggert@twinsun.com>
4491
4492 Version 1.875b.
4493
4494 * NEWS: Document 1.875b.
4495
4496 * lib/bbitset.h: Do not include config.h; that's the includer's job.
4497 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
4498 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
4499 Don't use 'index' in comments, as it's a builtin fn on some hosts.
4500 * lib/bitset_stats.c: Include gettext.h unconditionally, as
4501 per recent gettext manual's suggestion.
4502 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
4503 Use prototypes, not old-style definitions.
4504 * lib/lbitset.c (lbitset_unused_clear): Likewise.
4505 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
4506 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
4507 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
4508 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
4509 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
4510 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
4511 vbitset_or_and_cmp, vbitset_copy): Likewise.
4512
4513 * lib/libiberty.h: Do not include config.h; that's the includer's job.
4514 Do not include <stdlib.h>.
4515 (PARAMS): Define unconditionally for C89.
4516 (ATTRIBUTE_NORETURN): Remove.
4517 (ATTRIBUTE_UNUSED): Define unconditionally.
4518
4519 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 4520 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
4521 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
4522 * lib/vbitset.c, lib/vbitset.h: New files.
4523 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
4524 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
4525 from libbitset.
4526
4527 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
4528 `How Can I Reset @code{yyparse}', since texinfo does not allow
4529 arbitrary @ in node names.
4530
4531 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
4532 shouldn't be needed according to the gettext 0.12.1 documentation
4533 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 4534 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 4535 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 4536 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 4537
8dd76bee
PE
4538 * lib/.cvsignore: Add stdbool.h.
4539 * m4/.cvsignore: Add nls.m4, po.m4.
4540
4541 Upgrade to CVS gnulib.
4542 * stdbool_.h: File renamed from stdbool.h.in.
4543 * configure.ac (AM_STDBOOL_H): Invoke this instead of
4544 AC_HEADER_STDBOOL.
4545 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
4546 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
4547 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
4548 (MOSTLYCLEANFILES): New var.
4549 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
4550 (stdbool.h): New rule.
4551 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
4552 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
4553 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
4554 m4/quote.m4: Upgrade to today's gnulib.
4555
4556 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
4557 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
4558 the tests right now.
4559 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
4560 yyerror are declared before use; C99 requires this.
4561
25005f6a
PH
45622003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4563
4564 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
4565 first.
4566 (yyrecoverSyntaxError): Correct the logic for setting and testing
4567 yyerrState.
4568 Correct comment on handling EOF.
4569 Allow states with only a default reduction, rather than failing
8dd76bee 4570 (I can't quite reconstruct why these were not allowed before).
25005f6a 4571
137437c6 4572 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 4573 buffer overruns, corrupting state.
8dd76bee
PE
4574
4575 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
4576 definition.
4577 * src/reader.h (max_left_semantic_context): New variable declaration.
4578 * src/scan-gram.l (max_left_semantic_context): Define.
4579 (handle_action_dollar): Update max_left_semantic_context.
4580 * data/glr.c (YYMAXLEFT): New definition.
4581 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
4582 (yyresolveAction): Ditto.
4583
4584 Fixes to problems with location handling in GLR parsers reported by
4585 Frank Heckenbach (2003/06/05).
4586
4587 * data/glr.c (YYLTYPE): Make trivial if locations not used.
4588 (YYRHSLOC): Add parentheses, and define only if locations used.
4589 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
4590 locations not used.
4591 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
4592 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 4593
25005f6a
PH
4594 * tests/cxx-type.at: Exercise location information; update tests
4595 to differentiate output with and without locations.
8dd76bee 4596 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
4597 because default YYLTYPE not yet defined.
4598 Change semantic actions to compute strings, rather than printing
4599 them directly (to test proper passing of semantics values). Change
4600 output to prefix notation and update test data and expected results.
4601 (yylex): Track locations.
4602 (stmtMerge): Return value rather than printing, and include arguments
4603 in value.
8dd76bee 4604
711f40b7
PE
46052003-06-03 Paul Eggert <eggert@twinsun.com>
4606
4607 Avoid warnings generated by GCC 2.95.4 when Bison is
4608 configured with --enable-gcc-warnings.
4609 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
4610 yy::]b4_parser_class_name[::translate_,
4611 yy::Stack::operator[] (unsigned),
4612 yy::Stack::operator[] (unsigned) const,
4613 yy::Slice::operator[] (unsigned),
4614 yy::Slice::operator[] (unsigned) const):
4615 Rename local vars to avoid warnings.
4616 * tests/glr-regression.at (Improper handling of embedded actions
4617 and $-N in GLR parsers): Remove unused local variable from yylex.
4618 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
4619 (void) as arg when not pure, since we now assume C89 when building
4620 Bison. Pacify GCC by using parameter.
4621
ac695f7d
PE
46222003-06-02 Paul Eggert <eggert@twinsun.com>
4623
4624 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
4625 yy::Location::lines, yy::Location::columns): Rename arguments
4626 to avoid shadowing; this removes a warning generated by GCC 3.3.
4627
26ec81e0
PE
46282003-06-01 Paul Eggert <eggert@twinsun.com>
4629
4630 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
4631 to g++, as GCC 3.3 complains if you do it.
4632 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
4633 everything that WARNING_CFLAGS has, except omit warnings
4634 not suitable for C++.
4635 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
4636 * tests/atlocal.in (CXXFLAGS): New var.
4637 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
4638
4639 Fix a GLR parser bug I reported in February; see
161a71f3 4640 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
4641 The problem was that GLR parsers did not conform to the C standard,
4642 because actions like { $1 = $2 + $3; } expanded to expressions
4643 that invoked YYFILL in separate subexpressions, and YYFILL assigned
4644 to a local variable. The C standard says that expressions
4645 like (var = f ()) + (var = f ()) have undefined behavior.
4646 Another problem was that GCC sometimes issues warnings that
4647 yyfill and its parameters are unused.
4648
4649 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
4650 as possibly unused.
4651 (yyfill): New function.
4652 (YYFILL): Use it.
4653 (yyuserAction): Change type of yynormal to bool, so that it matches
4654 the new yyfill signature. Mark it as possibly unused.
4655
4656
4657 Follow up on a bug I reported in February, where a Bison-generated
4658 parser can loop. Provide a test case and a fix for yacc.c. I
4659 don't have a fix for lalr1.cc or for glr.c, unfortunately.
4660 The original bug report is in:
161a71f3 4661 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
4662
4663 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
4664 macro's size was becoming unwieldy.
4665 (yyerrlab): Do not discard an empty lookahead symbol, as this
4666 might destroy garbage.
4667 (yyerrorlab): New label, with the old contents of YYERROR,
4668 plus the following change: pop the stack of rhs corresponding
4669 to the production that invoked YYERROR. That is how Yacc
4670 behaves, and POSIX requires this behavior.
4671 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
4672 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
4673 Define 'alarm' to do nothing if unistd.h is not available.
4674 Add a new rule "exp: '-' error;" to test the above change to
4675 data/yacc.c. Use 'alarm' to abort any test taking longer than
4676 10 seconds, as it's probably looping.
4677 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
4678 Also, the new yacc.c generates two fewer diagnostics for an
4679 existing test.
4680
d0829076
PE
46812003-05-24 Paul Eggert <eggert@twinsun.com>
4682
c6ae27df
PE
4683 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
4684 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
4685 This fixes a problem reported by John Bowman when the Compaq/HP
4686 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
4687 -ansi -Wall -gall).
4688 * data/yacc.c (union yyalloc): Likewise.
4689 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 4690
d0829076
PE
4691 Switch from 'int' to 'bool' where that makes sense.
4692
4693 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
4694 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
4695 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
4696 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
4697 Return or accept bool, not int. All callers changed.
4698 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
4699 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
4700 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
4701 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
4702 bitset_or_and_cmp_): Likewise.
4703 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
4704 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
4705 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
4706 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
4707 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
4708 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
4709 bitset_stats_or_and_cmp): Likewise.
4710 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
4711 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
4712 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
4713 ebitset_xor_cmp): Likewise.
4714 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
4715 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
4716 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
4717 lbitset_xor_cmp): Likewise.
4718 * lib/bbitset.h: Include <stdbool.h>.
4719 (struct bitset_vtable): The following members now return bool, not
4720 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
4721 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
4722 or_and_cmp).
4723 * src/conflicts.c (count_rr_conflicts): Likewise.
4724 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
4725 All uses changed.
4726 * lib/ebitset.c (ebitset_obstack_init): Likewise.
4727 * lib/lbitset.c (lbitset_obstack_init): Likewise.
4728 * src/getargs.c (debug_flag, defines_flag, locations_flag,
4729 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
4730 graph_flag): Likewise.
4731 * src/getargs.h (debug_flag, defines_flag, locations_flag,
4732 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
4733 graph_flag): Likewise.
4734 * src/output.c (error_verbose): Likewise.
4735 * src/output.h (error_verbose): Likewise.
4736 * src/reader.c (start_flag, typed): Likewise.
4737 * src/reader.h (typed): Likewise.
4738 * src/getargs.c (LOCATIONS_OPTION): New constant.
4739 (long_options, getargs): Use it.
4740 * src/lalr.c (build_relations): Use bool, not int.
4741 * src/nullable.c (nullable_compute): Likewise.
4742 * src/print.c (print_reductions): Likewise.
4743 * src/tables.c (action_row, pack_vector): Likewise.
4744 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
4745 * src/output.c (prepare): Use it.
4746 * src/output.c (token_definitions_output,
4747 symbol_destructors_output, symbol_destructors_output): Use string,
4748 not boolean integer, to keep track of whether to output separator.
4749 * src/print_graph.c (print_core): Likewise.
4750 * src/state.c (state_rule_lookaheads_print): Likewise.
4751
4752 * config/install-sh: Sync from automake 1.7.5.
4753
6b2584b7
PE
47542003-05-14 Paul Eggert <eggert@twinsun.com>
4755
4756 * src/parse-gram.y (rules_or_grammar_declaration): Require a
4757 semicolon after a grammar declaration, in the interest of possible
4758 future changes to the Bison input language.
4759 Do not allow a stray semicolon at the start of the grammar.
4760 (rhses.1): Allow one or more semicolons after any rule, including
4761 just before "|" as required by POSIX.
4762 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
4763 grammar.
4764
caf37a36
ADL
47652003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
4766
4767 %parse-param support for lalr1.cc.
4768
4769 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
4770 b4_cc_constructor_calls, b4_cc_constructor_call,
4771 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
4772 definitions.
4773 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
4774 parse-param arguments.
4775 (yy::b4_parser_class_name): Declare instance variables to
4776 hold parse-param arguments.
4777 * tests/calc.at: s/value/semantic_value/ because value clashes
4778 with a member of yy::b4_parser_class_name. Adjust C++ code
4779 to handle %parse-param. Enable %parse-param test in C++.
4780
3ab37077
PE
47812003-05-12 Paul Eggert <eggert@twinsun.com>
4782
4783 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
4784 English a bit. Fix fclose typo. Change "const char" to "char
4785 const", and use ANSI C rather than K&R for "main". Suggest
4786 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
4787 and suggest yy_switch_to_buffer.
4788
47892003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
4790
4791 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
4792 C89. This avoids a diagnostic on compilers that define __STDC__
4793 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 4794 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 4795
e743727f
PE
47962003-05-03 Paul Eggert <eggert@twinsun.com>
4797
4798 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
4799 Do not overrun array bounds.
4800 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 4801 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 4802
916708d5
AD
48032003-04-29 Akim Demaille <akim@epita.fr>
4804
4805 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
4806 * src/getargs.c, src/getargs.h: here, as bool, not int.
4807 (nondeterministic_parser): New.
4808 * src/parse-gram.y, src/scan-gram.l: Support
4809 %nondeterministic-parser.
4810 * src/output.c (prepare): Use nondeterministic_parser instead
4811 of glr_parser where appropriate.
4812 * src/tables.c (conflict_row, action_row, save_row)
4813 (token_actions, token_actions, pack_vector): Ditto.
4814
a06ea4aa
AD
48152003-04-29 Akim Demaille <akim@epita.fr>
4816
4817 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
4818
211074ca
AD
48192003-04-29 Akim Demaille <akim@epita.fr>
4820
4821 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
4822 with %pure-parser and %locations to exercise the patch from Yakov
4823 Markovitch below.
4824
6175ffe3
PE
48252003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
4826
4827 * data/yacc.c: (b4_lex_param): Corrected for the case where
4828 %lex-param is provided and %pure-parser isn't.
4829
b1e95857
PE
48302003-04-27 Paul Eggert <eggert@twinsun.com>
4831
4832 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 4833 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
4834 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
4835 if it is not defined.
4836 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
4837
acda9df6
PE
48382003-04-26 Paul Eggert <eggert@twinsun.com>
4839
3470c57b
PE
4840 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
4841 Declare to be of type suitable for the ninf value itself, not of
4842 type suitable for the corresponding table, since the latter might
4843 be unsigned but the ninf value might be negative. This fixes a
4844 bug reported by Alexandre Duret-Lutz in
161a71f3 4845 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 4846
acda9df6
PE
4847 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
4848 invokes it. We shouldn't invoke it twice because it will attempt
4849 to put error.o in the archive twice. This fixes a glitch reported
4850 by Martin Mokrejs in
161a71f3 4851 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 4852
b5250f26
PE
48532003-04-21 Paul Eggert <eggert@twinsun.com>
4854
4855 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
4856 to gnulib.
4857
089ac0f1
PE
48582003-04-21 Yakov Markovitch <Markovitch@iso.ru>
4859
4860 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
4861 Fix obvious typo that results in uncompilable GLR parsers
4862 when both %pure-parser and %locations are used. (trivial change)
4863
5ededac6
PE
48642003-04-17 Paul Eggert <eggert@twinsun.com>
4865
1b8f2fff
PE
4866 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
4867 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
4868 Do not insert the expected token via unput, as this runs afoul
4869 of a POSIX-compatibility bug in flex 2.5.31.
4870 All uses changed to BEGIN the parent state,
4871 since we no longer insert the expected token via unput.
4872 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
4873 that is no longer emitted after the above change.
4874
5ededac6
PE
4875 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
4876 the first one. This change is from Paul Hilfinger, and it fixes
4877 regression reported by Werner Lemberg in
161a71f3 4878 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
4879
4880 (resolve_sr_conflict): Don't invoke state_errs_set
4881 unless one or more tokens have been explicitly made errors.
4882 Otherwise, the above change causes Bison to abort.
4883
4884 * tests/existing.at (GNU pic Grammar): New test case, taken from
4885 Lemberg's email.
4886
b8be9132
AD
48872003-03-31 Akim Demaille <akim@epita.fr>
4888
4889 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
4890
d423d460
AD
48912003-03-31 Akim Demaille <akim@epita.fr>
4892
4893 * src/output.c (prepare_symbols): Avoid trailing spaces in the
4894 output.
4895
c7e441b4
AD
48962003-03-31 Akim Demaille <akim@epita.fr>
4897
4898 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
4899 From Paul Hilfinger.
4900
231897ad
AD
49012003-03-29 Akim Demaille <akim@epita.fr>
4902
4903 * m4/error.m4: Do not put under dynamic conditions some code which
4904 expansion is under static control.
4905
5b066063
AD
49062003-03-29 Akim Demaille <akim@epita.fr>
4907
4908 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
4909
22a74fec
AD
49102003-03-29 Akim Demaille <akim@epita.fr>
4911
4912 * doc/bison.texinfo (Strings are Destroyed): New.
4913
0eee27e7
PE
49142003-03-13 Paul Eggert <eggert@twinsun.com>
4915
4916 * .cvsignore: Add configure.lineno.
4917 * src/.cvsignore: Add yacc.
4918 * tests/.cvsignore: Add testsuite.log.
4919 * doc/fdl.texi: Sync with latest FSF version.
4920
f61aad93
PE
49212003-03-12 Paul Eggert <eggert@twinsun.com>
4922
537636c7
PE
4923 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
4924 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
4925 cursor, instead of leaving it undefined. This fixes a bug
4926 reported by Tim Van Holder in
161a71f3 4927 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
4928 * tests/input.at (Torturing the Scanner): Test the scanner on
4929 an empty input file, which was Tim Van Holder's test case.
4930
4931 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
4932 <sys/resource.h> can be included, include sys/time.h and
4933 sys/times.h first, if available. This works around the SunOS
4934 4.1.4 porting bug reported by Bruce Becker in
161a71f3 4935 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
4936
4937 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
4938 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
4939 AC_HEADER_SYS_WAIT.
4940
f61aad93
PE
4941 Merge changes from gnulib. This was prompted because the CVS
4942 snapshot didn't build on Solaris 7 due to strnlen problems.
4943
4944 These changes need to be merged back into gnulib:
4945 * lib/hash.c: Include <stdbool.h> unconditionally.
4946 * m4/onceonly.m4 (m4_quote): New macro.
4947 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
4948 Quote AC_FOREACH variable-expansions properly.
4949 The 2003-01-03 obstack.h change also needs merging.
4950 {end of changes requiring merging}
5b066063 4951
f61aad93
PE
4952 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
4953 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
4954 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
4955 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
4956 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
4957 New files, imported from gnulib.
4958 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
4959 above.
4960
4961 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
4962 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
4963 gnulib sources.
4964
4965 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
4966 Add.
4967 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
4968 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
4969 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
4970 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
4971 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
4972 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
4973 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
4974 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
4975 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
4976 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
4977 (jm_PREREQ_ARGMATCH): Remove.
4978 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
4979 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
4980
4981 * src/system.h: Include <stdbool.h> unconditionally.
4982
4983 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
4984 assuming at least C89 in the bitset code for some time now.
4985
d2ffe116
AD
49862003-03-03 Akim Demaille <akim@epita.fr>
4987
4988 * ro.po: New.
4989
052826fd
AD
49902003-03-02 Akim Demaille <akim@epita.fr>
4991
4992 * doc/bison.texinfo (Table of Symbols): Reactivate the
4993 documentation for %lex-param, and %parse-param.
4994
c4749565
AD
49952003-03-02 Akim Demaille <akim@epita.fr>
4996
4997 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
4998 generate verbose error messages.
4999 Use the number of tokens as an upper bound in yytname, as it
5000 cannot be a non terminal.
5001
d5286af1
AD
50022003-03-02 Akim Demaille <akim@epita.fr>
5003
5004 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
5005 message.
5006
22e304a6
AD
50072003-03-02 Akim Demaille <akim@epita.fr>
5008
22e304a6
AD
5009 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
5010 Use them to exercise yycheck overrun.
5011 Based on Andrew Suffield's grammar.
5012
67a25fed
AD
50132003-03-02 Akim Demaille <akim@epita.fr>
5014
5015 Create tests/local.at for Bison generic testing macros.
5016
5017 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
5018 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
5019 This new file.
5020 * tests/calc.at (AT_CHECK_CALC): Adjust.
5021 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
5022 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
5023 * tests/local.at: here.
5024 (AT_COMPILE_CXX): Tags the tests using it as c++.
5025 Ignore the test if CXX is not functional.
5026
9c2b381f
PE
50272003-03-01 Paul Eggert <eggert@twinsun.com>
5028
5029 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
5030 not loc->end, since loc->end might contain garbage and this leads
5031 to undefined behavior on some platforms.
5032 (id_loc, token_start): Use (IF_LINTed) initial values that do not
5033 depend on *loc, so that the reader doesn't give the the false
5034 impression that *loc is initialized.
5035 (<INITIAL>"%%"): Do not bother setting code_start, since its value
5036 does not survive the return.
5037
0433ba88
AD
50382003-03-01 Akim Demaille <akim@epita.fr>
5039
5040 * src/scan-gram.l (code_start): Always initialize it when entering
5041 into yylex, as SC_EPILOGUE is activated *before* the corresponding
5042 yylex invocation. An alternative would be making it static, but
5043 then it starts with the second %%'s beginning, instead of its end.
5044
b305ea69
PE
50452003-02-28 Paul Eggert <eggert@twinsun.com>
5046
5047 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
5048 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 5049 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 5050
c3d25e01
PE
50512003-02-26 Paul Eggert <eggert@twinsun.com>
5052
5053 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
5054 Remove Sequent/Pyramid discussion (nobody uses them any more).
5055 Merge VMS and MS-DOS discussion; these ports may well be dead
5056 but let's keep mentioning them for now. Put <> around email
5057 addresses. Add copyright notice.
5058
c267ffbc
PE
50592003-02-24 Paul Eggert <eggert@twinsun.com>
5060
5061 * data/glr.c (yy_reduce_print): yylineno -> yylno,
5062 to avoid collision with flex use of yylineno.
5063 Problem reported by Bruce Lilly in
161a71f3 5064 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
5065 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
5066 * data/yacc.c (yy_reduce_print): Likewise.
5067
5068 * config/depcomp: Sync with Automake 1.7.3.
5069
f939fc12
AD
50702003-02-21 Akim Demaille <akim@epita.fr>
5071
5072 * data/lalr1.cc: Use temporary variables instead of casts to
5073 change integer types.
5074 Suggested by Paul Eggert.
5075
95923bd6
AD
50762003-02-21 Akim Demaille <akim@epita.fr>
5077
5078 * doc/bison.texinfo: Use "location" consistently to refer to @n,
5079 to avoid confusions with lalr1.cc's notion of Position.
5080 Suggested by Paul Eggert.
5081
2cdc240e
AD
50822003-02-20 Akim Demaille <akim@epita.fr>
5083
5084 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
5085 before initial_columns.
5086 (location.hh): Use consistent variable names when defining the
5087 operator<<.
5088 Use "last" so that we subtract from Positions, not from unsigned.
5089
5d003116
AD
50902003-02-20 Akim Demaille <akim@epita.fr>
5091
5092 * data/lalr1.cc (position.hh): New subfile, including the extended
5093 and Doxygen'ed documentation of class Position.
5094 (location.hh): Use it.
5095 Document a` la Doxygen.
ba1ecc07 5096 With the help of Benoit Perrot.
5d003116 5097
d02b25f9
AD
50982003-02-20 Akim Demaille <akim@epita.fr>
5099
5100 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
5101 AT_YACC_IF.
5102 Redefine AT_YYERROR_SEES_LOC_IF using it.
5103 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
5104 not defined.
5105 Don't use the location in yy::Parser::error_ and
5106 yy::Parser::print_ when not %locations.
5107 Activate more lalr1.cc tests.
5108
0d1c3a04
AD
51092003-02-19 Akim Demaille <akim@epita.fr>
5110
5111 * data/lalr1.cc: When displaying a line number, be sure to make it
5112 an int.
5113
60a777aa
AD
51142003-02-19 Akim Demaille <akim@epita.fr>
5115
5116 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
5117 Remove, useless.
5118 (YYABORT, YYACCEPT, YYERROR): New.
5119 * tests/calc.at: Renable the lalr1.cc test.
5120
0b86fc41
AD
51212003-02-19 Akim Demaille <akim@epita.fr>
5122
5123 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
5124 error recovery, mixing with/without pops and discarding of the
5125 lookahead.
5126 Exercise YYERROR.
5127 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
5128
da99a5dc
PE
51292003-02-17 Paul Eggert <eggert@twinsun.com>
5130
5131 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
5132 * tests/testsuite.at (AT_COMPILE): Use them.
5133 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 5134 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 5135
93b8c255
PE
51362003-02-12 Paul Eggert <eggert@twinsun.com>
5137
5138 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
5139 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 5140 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
5141 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
5142 Check for malloc failure, for consistency with yacc.c.
5143 (yytname_size): Remove, for consistency with yacc.c.
5144
5145 The bug still remains in data/lalr1.cc, as I didn't have time
5146 to fix it there.
5147
7548fed2
AD
51482003-02-06 Akim Demaille <akim@epita.fr>
5149
5150 * configure.ac (GXX): Rename as...
5151 (CXX): this, to keep the original Autoconf semantics.
5152 Require 2.57.
5153 * data/lalr1.cc: Fix b4_copyright invocations.
5154 If YYDEBUG is not defined, don't depend upon name_ being defined.
5155 (location.hh): Include string and iostream.
5156 (Position::filename): New member.
5157 (Position::Position ()): New.
5158 (operator<< (Position)): New.
5159 (operator- (Position, int)): New.
5160 (Location::first, Location::last): Rename as...
5161 (Location::begin, Location::end): these, to mock the conventional
5162 iterator names.
5163 (operator<< (Location)): New.
5164 * tests/atlocal.in (CXX): New.
5165 * tests/testsuite.at (AT_COMPILE_CXX): New.
5166 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
5167 locations in a more synthetic way.
5168 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
5169 lalr1.cc is used.
5170 Adjust the C locations to match those from Emacs: first column is
5171 column 0.
5172 Change all the expected results.
5173 Conform to the GCS: simplify the locations when applicable.
5174 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
5175 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
5176 these CPP macros with the m4 macros new defined by...
5177 (AT_CHECK_PUSHDEFS): this, i.e.:
5178 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 5179 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
5180 New macros.
5181 (AT_CHECK_POPDEFS): Undefine them.
5182 (AT_CHECK_CALC_LALR1_CC): New.
5183 Use it for the first lalr1.cc test.
5184
43a176ef
AD
51852003-02-04 Akim Demaille <akim@epita.fr>
5186
5187 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
5188 Location as is defined.
5189
fc049e9c
AD
51902003-02-04 Akim Demaille <akim@epita.fr>
5191
5192 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
5193 name_ being defined.
5194
a737b216
PE
51952003-02-03 Paul Eggert <eggert@twinsun.com>
5196
5197 * src/gram.h (start_symbol): Remove unused decl.
5198
5199 Use more-consistent naming conventions for local vars.
5200
5201 * src/derives.c (derives_compute): Change type of local var from
5202 int to rule_number.
5203 * src/gram.c (grammar_rules_partial_print): Likewise.
5204 * src/print.c (print_core): Likewise.
5205 * src/reduce.c (reduce_grammar_tables): Likewise.
5206
5207 * src/gram.c (grammar_dump): Change name of item_number *
5208 local var from r to rp.
5209 * src/nullable.c (nullable_compute): Likewise.
5210
5211 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
5212
5213 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
5214 for symbol or symbol_number var.
5215 * src/reader.c (grammar_start_symbol_set): Likewise.
5216 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
5217 Likewise.
5218 * src/state.c (transitions_to): Likewise.
5219 * src/state.h: Likewise.
5220 * src/tables.c (symbol_number_to_vector_number): Likewise.
5221
5222 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
5223 char * var.
5224
5225 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
5226 var.
5227
5228 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
5229 var.
5230
5231 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
5232 Use str, not s, for char * var. Use ch, not c, for character var.
5233 Use size for size var.
5234
5235 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
5236 char * var.
5237 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
5238 uniqstr var.
5239 * src/uniqstr.h: Likewise.
5240
5241 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
5242 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
5243 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
5244 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
5245 param to have same name as that of enum, so that we don't use
5246 "s" to stand for a non-state.
5247
68e93ad5
AD
52482003-02-02 Akim Demaille <akim@epita.fr>
5249
5250 * src/scan-skel.l: Scan more than one inert character per yylex
5251 invocation.
5252
92898986
PE
52532003-02-01 Paul Eggert <eggert@twinsun.com>
5254
5255 Version 1.875a.
5256
1d9d5d71
PE
5257 * po/LINGUAS: Add ms.
5258
0435d061
AD
52592003-01-30 Akim Demaille <akim@epita.fr>
5260
5261 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
5262
6029a57f
PH
52632003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5264
5265 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
5266 of $1.
0435d061
AD
5267
5268 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 5269 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 5270 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 5271
6029a57f
PH
5272 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
5273 (b4_rhs_location): Ditto.
0435d061 5274 (yyfill): New function to copy from stack tree into array
6029a57f 5275 incrementally.
0435d061
AD
5276 (yyuserAction): Modify to allow incremental move of semantic values
5277 to rhs array when in GLR mode.
5278 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
5279 as needed.
5280 Remove dummy use of yystack, as there is now a guaranteed use.
5281 (yydoAction): Modify to allow incremental move of semantic values
5282 to rhs array when in GLR mode.
5283 (yyresolveAction): Ditto.
5284 (yyglrShiftDefer): Update comment.
0435d061 5285 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
5286 (yyglrReduce): Ditto.
5287 (yydoAction): Ditto
0435d061 5288
6029a57f
PH
5289 * tests/glr-regr1.at: Rename to ...
5290 * tests/glr-regression.at: Add new regression test for the problems
5291 described above (adapted from S. Eken).
5292 Update copyright notice.
5293 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
5294 * tests/Makefile.am: Ditto.
5295
6cee6297
PE
52962003-01-28 Paul Eggert <eggert@twinsun.com>
5297
5298 * data/lalr1.cc: Do not use @output_header_name@ unless
5299 b4_defines_flag is set. This fixes two bugs reported by
5300 Tim Van Holder in
161a71f3
PE
5301 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
5302 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 5303
b2a836b5
PE
53042003-01-21 Paul Eggert <eggert@twinsun.com>
5305
5306 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
5307 we don't need to worry about yyerrlab1 being reported as an
5308 "unused label" by non-GCC C compilers. The downside is that if
5309 locations are used then a couple of statements are duplicated each
5310 time YYERROR is invoked, but the upside is that the warnings
5311 should vanish.
5312 (yyerrlab1): Move code to YERROR.
5313 (yyerrlab2): Remove. Change uses back to yyerrlab1.
5314 This reverts some of the 2002-12-27 change.
5315
4196b931
PE
53162003-01-17 Paul Eggert <eggert@twinsun.com>
5317
5318 * src/output.c (symbol_printers_output): Fix typo that led
5319 to core dump. Problem reported by Antonio Rus in
161a71f3 5320 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 5321
3ae831b4
AD
53222003-01-13 Akim Demaille <akim@epita.fr>,
5323 Quoc Peyrot <chojin@lrde.epita.fr>,
5324 Robert Anisko <anisko_r@lrde.epita.fr>
5325
5326 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
5327 when the stacks contain one element, as the loop would otherwise
5328 free the last state, and then use the top state (the one we just
5329 popped). This means that the initial elements will not be freed
5330 explicitly, as is the case in yacc.c; it is not a problem, as
5331 these elements have fake values.
5332
e3aa65c5
PE
53332003-01-11 Paul Eggert <eggert@twinsun.com>
5334
5335 * NEWS: %expect-violations are now just warnings, reverting
5336 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
5337 bootstrapping problem reported by Matthias Klose; see
161a71f3 5338 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
5339 * src/conflicts.c (conflicts_print): Likewise.
5340 * tests/conflicts.at (%expect not enough, %expect too much,
5341 %expect with reduce conflicts): Likewise.
5342 * doc/bison.texinfo (Expect Decl): Document this. Also mention
5343 that the warning is enabled if the number of conflicts changes
5344 (not necessarily increases).
5345
5346 * src/getargs.c (version): Update copyright year.
5347
f0057011
AD
53482003-01-09 Akim Demaille <akim@epita.fr>
5349
5350 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
5351
1ee6d2a0
PE
53522003-01-08 Paul Eggert <eggert@twinsun.com>
5353
5354 * Makefile.maint (WGETFLAGS):
5355 New macro, containing "-C off" to disable proxy caches.
5356 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
5357 (rel-check): Use $(WGET) instead of wget.
5358
d4fd77c4
PE
53592003-01-06 Paul Eggert <eggert@twinsun.com>
5360
5361 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
5362 the GLR paper of Scott, Johnstone and Hussain.
5363
464c6927
PE
53642003-01-04 Paul Eggert <eggert@twinsun.com>
5365
d600ee67
PE
5366 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
5367 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
5368 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
5369 (EXTRA_LIBRARIES): New var, for liby.a.
5370 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
5371 (EXTRA_SCRIPTS): New var, for yacc.
5372
464c6927
PE
5373 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
5374 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
5375 Problem reported by Nelson H. F. Beebe.
5376
53772003-01-03 Paul Eggert <eggert@twinsun.com>
5378
5379 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
5380 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
5381 when compiling Bison 1.875's `bitset bset = obstack_alloc
5382 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
5383
5384 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
5385 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
5386 grow to a huge size with typical invocation.
d600ee67 5387
464c6927
PE
5388 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
5389 Use the pattern recommended by Autoconf 2.57, except also protect
5390 against double-definition.
5391 * src/system.h: Likewise.
5392 Portability issues reported by Nelson H. F. Beebe.
d600ee67 5393
464c6927
PE
5394 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
5395 All uses changed. Provide a definition in both C and C++.
5396 (yytrue, yyfalse): Define even if defined (__cplusplus).
5397
5398 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
5399 Reported by Nelson H. F. Beebe.
d600ee67 5400
464c6927
PE
5401 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
5402
0f42c7d5
PE
54032003-01-02 Paul Eggert <eggert@twinsun.com>
5404
5405 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
5406 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
5407 Bug reported by Nelson H. F. Beebe.
5408
dc546b0f
PE
54092003-01-01 Paul Eggert <eggert@twinsun.com>
5410
5411 * Version 1.875.
5412
2c09b6a7
PE
54132002-12-30 Paul Eggert <eggert@twinsun.com>
5414
5415 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
5416 Moved here from...
5417 (<INITIAL>","): Here. This causes stray "," to be treated
5418 more uniformly.
5419
dc546b0f 5420 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
5421 last brace in braced code when not in Yacc mode, for compatibility
5422 with Bison 1.35. This resurrects the 2001-12-15 patch to
5423 src/reader.c.
5424
5425 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
5426 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
5427
535c0f63
PE
54282002-12-28 Paul Eggert <eggert@twinsun.com>
5429
5430 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
5431 that of SYM's type. This fixes Debian bug 168069, reported by
5432 Thomas Olsson.
d600ee67 5433
963fcc17
PE
54342002-12-28 Paul Eggert <eggert@twinsun.com>
5435
5436 Version 1.75f.
5437
5438 Switch back to the Yacc style of conflict reports, undoing some
5439 of the 2002-07-30 change.
5440 * doc/bison.texinfo (Understanding): Use Yacc style for
5441 conflict reports. Also, use new way of locating rules.
5442 * src/conflicts.c (conflict_report):
5443 Renamed from conflict_report_yacc, removing the old
5444 'conflict_report'. Translate the entire conflict report at once,
5445 so that we don't assume that "," has the same interpretation in
5446 all languages.
5447 (conflicts_output): Use Yacc-style conflict report for each state,
5448 instead of our more-complicated style.
5449 (conflicts_print): Use Yacc-style conflict report, except print
5450 the input file name when not emulating Yacc.
5451 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
5452 Conflicted Reduction, %expect not enough, %expect too much,
5453 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
5454 * tests/existing.at (GNU Cim Grammar): Likewise.
5455 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
5456
5457 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
5458 fatal): Don't invoke fflush; it's not needed and it might even be
5459 harmful for stdout, as stdout might not be open.
5460 * src/reduce.c (reduce_print): Likewise.
5461
b1efe548
PE
54622002-12-27 Paul Eggert <eggert@twinsun.com>
5463
5464 Fix a bug where error locations were not being recorded correctly.
5465 This problem was originally reported by Paul Hilfinger in
161a71f3 5466 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
5467
5468 * data/yacc.c (yyparse): New local var yylerrsp, to record the
5469 top of the location stack's error locations.
5470 (yyerrlab): Set it. When discarding a token, push its location
5471 onto yylerrsp so that we don't lose track of the error's end.
5472 (yyerrlab1): Now is only the target of YYERROR, so that we can
5473 properly record the location of the action that failed. For GCC
5474 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
5475 GCC warning about yyerrlab1 being unused if YYERROR is unused.
5476 (yyerrlab2): New label, which yyerrlab now falls through to.
5477 Compute the error's location by applying YYLLOC_DEFAULT to
5478 the locations of all the symbols that went into the error.
5479 * doc/bison.texinfo (Location Default Action): Mention that
5480 YYLLOC_DEFAULT is also invoked for syntax errors.
5481 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5482 Error locations include the locations of all the tokens that were
5483 discarded, not just the last token.
d600ee67 5484
983c5c2c
PE
54852002-12-26 Paul Eggert <eggert@twinsun.com>
5486
b1efe548
PE
5487 * src/files.c: Include quote.h.
5488 (compute_output_file_names): Warn if we detect conflicting
5489 outputs to the same file. This should catch the misunderstanding
5490 exemplified by Debian Bug 165349, reported by Bruce Stephens..
5491
5492 * src/conflicts.c (conflicts_print): If the user specifies
5493 "%expect N", report an error if there are any reduce/reduce
5494 conflicts. This is what the manual says should happen.
5495 This fixes Debian bug 130890, reported by Anthony DeRobertis.
5496 * tests/conflicts.at (%expect with reduce conflicts): New test.
5497
983c5c2c
PE
5498 Don't use m4_include on relative file names, as it doesn't work as
5499 desired if there happens to be a file with that name under ".".
d600ee67 5500
983c5c2c
PE
5501 * m4sugar/version.m4: Remove; it was included but it wasn't used.
5502 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
5503 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
5504 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
5505 * src/output.c (output_skeleton): Use full path names when
5506 specifying a file to include; don't rely on include path, as
5507 it's unreliable when the working file contains a file with
5508 that name.
d600ee67 5509
983c5c2c
PE
55102002-12-25 Paul Eggert <eggert@twinsun.com>
5511
5512 Remove obsolete references to bison.simple and bison.hairy.
5513 Problem mentioned by Aubin Mahe in
161a71f3 5514 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
5515 * data/glr.c: Comment fix.
5516 * doc/bison.1: Remove references. Also, mention "yacc".
5517
5518 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
5519 with -g option.
5520
5521 * src/parse-gram.y (declaration): Use enum "report_states" rather
5522 than its numeric value 1.
5523
5524 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
5525 opening a new one. This fixes Debian bug 165349, reported by
5526 Bruce Stephens.
5527
23f2d9dc
PE
55282002-12-24 Paul Eggert <eggert@twinsun.com>
5529
5530 Version 1.75e.
5531
5532 * Makefile.maint (cvs-update): Don't assume that the shell
5533 supports $(...), as Solaris sh doesn't.
5534
5535 * src/parse-gram.y (lloc_default): Remove test for empty
5536 nonterminals at the end, since it didn't change the result.
5537
55382002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
5539
5540 If the user does not define YYSTYPE as a macro, Bison now declares it
5541 using typedef instead of defining it as a macro. POSIX requires this.
5542 For consistency, YYLTYPE is also declared instead of defined.
5543
5544 %union directives can now have a tag before the `{', e.g., the
5545 directive `%union foo {...}' now generates the C code
5546 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
5547 The default union tag is `YYSTYPE', for compatibility with Solaris 9
5548 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
5549 instead of `yyltype'.
5550
5551 `yystype' and `yyltype' are now obsolescent macros instead of being
5552 typedefs or tags; they are no longer documented and will be
5553 withdrawn in a future release.
5554
5555 * data/glr.c (b4_location_type): Remove.
5556 (YYSTYPE): Renamed from yystype.
5557 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
5558 (struct YYLTYPE): Renamed from struct yyltype.
5559 (YYLTYPE): Renamed from yyltype.
5560 (yyltype, yystype): New (and obsolescent) macros,
5561 for backward compatibility.
5562 * data/yacc.c: Likewise.
5563
5564 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
5565 does not specify a union tag. This is for compatibility with
5566 Solaris 9 yacc.
5567
5568 * src/parse-gram.y (add_param): 2nd arg is now char * not char
5569 const *, since it is now modified by stripping surrounding { }.
5570 (current_braced_code): Remove.
5571 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
5572 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
5573 trailing " {...}". Now of type <chars>.
5574 (grammar_declaration): Adjust to bundled tokens.
5575 (code_content): Remove; stripping is now done by add_param.
5576 (print_token_value): Print contents of bundled tokens.
5577 (token_name): New function.
5578
5579 * src/reader.h (braced_code, current_braced_code): Remove.
5580 (token_name): New decl.
5581
5582 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
5583 token_type, not braced_code code_kind. All uses changed.
5584 (SC_PRE_CODE): New state, for scanning after a keyword that
5585 has (or usually has) an immediately-following braced code.
5586 (token_type): New local var, to keep track of which token type
5587 to return when scanning braced code.
5588 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 5589 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
5590 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
5591 instead of returning a token type immediately.
5592 (<INITIAL>"{"): Set token type.
5593 (<SC_BRACED_CODE>"}"): Use it.
5594 (handle_action_dollar, handle_action_at): Now returns bool
5595 indicating success. Fail if ! current_rule; this prevents a core dump.
5596 (handle_symbol_code_dollar, handle_symbol_code_at):
5597 Remove; merge body into caller.
5598 (handle_dollar, handle_at): Complain in invalid contexts.
5599
5600 * NEWS, doc/bison.texinfo: Document the above.
5601 * NEWS: Fix years and program names in copyright notice.
5602
879ca4f8
PE
56032002-12-17 Paul Eggert <eggert@twinsun.com>
5604
5605 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
5606 Reporting, Table of Symbols): Omit mentions of %lex-param and
5607 %parse-param from the documentation for now.
5608
1c5fe69d
PE
56092002-12-15 Paul Eggert <eggert@twinsun.com>
5610
5611 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
5612 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
5613 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
5614 disagreed with the Bison documentation. Bug
5615 reported by Andrew Walrond.
d600ee67 5616
1c5fe69d
PE
5617 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
5618 as the caller now does that.
5619 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
5620 (YYEMPTY): Parenthesize right hand side, since others use it.
5621 (yyparse): Don't assume that our generated code is the only code
5622 that sets yychar.
5623
d1de5372
PE
56242002-12-13 Paul Eggert <eggert@twinsun.com>
5625
5626 Version 1.75d.
5627
5628 POSIX requires a "yacc" command.
5629 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
5630 (MOSTLYCLEANFILES): Add yacc.
5631 (yacc): New rule.
1c5fe69d 5632 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
5633 as an alias for bison y.
5634
5635 * po/LINGUAS: Add da.
d600ee67 5636
d1de5372
PE
5637 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
5638 problem with latest <getopt.h>.
5639 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
5640
5641 * doc/fdl.texi: Upgrade to 1.2.
5642 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
5643 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
5644 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
5645 gnulib.
5646 * config/install-sh: Sync with autotools.
5647
5648 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 5649 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
5650 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
5651 locations are requested.
5652 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
5653 locations are requested.
5654
d0f3fe23
PE
56552002-12-12 Paul Eggert <eggert@twinsun.com>
5656
5657 Remove unportable casts and storage allocation tricks.
5658 While we're at it, remove almost all casts, since they
5659 usually aren't needed and are a sign of trouble.
5660
5661 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
5662
5663 * src/derives.c (derives_compute): Do not subtract NTOKENS from
5664 the pointer DSET returned by malloc; this isn't portable.
5665 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
5666 Similarly for DERIVES.
5667 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
5668 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
5669 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
5670
5671 * src/derives.c (derives_compute): Do not bother invoking
5672 int_of_rule_number, since rule numbers are integers.
5673
5674 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
5675 rather than XMALLOC (char, N).
5676
5677 * src/files.c (filename_split): Rewrite to avoid cast.
5678
5679 * src/gram.h (symbol_number_as_item_number,
5680 item_number_as_symbol_number, rule_number_as_item_number,
5681 item_number_as_rule_number):
5682 Now inline functions rather than macros, to avoid casts.
5683 * src/state.h (state_number_as_int): Likewise.
5684 * src/tables.c (state_number_to_vector_number,
5685 symbol_number_to_vector_number): Likewise.
5686
5687 * src/gram.h (int_of_rule_number): Remove; no longer used.
5688
5689 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
5690 since the resulting storage is always stored into.
5691
5692 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
5693 where it's needed.
5694
5695 * src/muscle_tab.c (muscle_m4_output):
5696 Now inline. Return bool, not int.
5697 * src/state.c (state_compare): Likewise.
5698 * src/symtab.c (symbol_check_defined,
5699 symbol_check_alias_consistency, symbol_pack, symbol_translation,
5700 hash_compare_symbol, hash_symbol):
5701 Likewise.
5702 * src/uniqstr.c (uniqstr_print): Likewise.
5703 * src/muscle_tab.c (muscle_m4_output_processor):
5704 New function, to avoid casts.
5705 * src/state.c (state_comparator, stage_hasher): Likewise.
5706 * src/symtab.c (symbol_check_defined_processor,
5707 symbol_check_alias_consistency_processor, symbol_pack_processor,
5708 symbol_translation_processor, hash_symbol_comparator,
5709 hash_symbol_hasher): Likewise.
5710 * src/uniqstr.c (uniqstr_print_processor): Likewise.
5711 * src/muscle_tab.c (muscles_m4_output):
5712 Use new functions instead of casting old functions unportably.
5713 * src/state.c (state_hash_new): Likewise.
5714 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
5715 symbols_token_translations_init):
5716 Likewise.
5717 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
5718
5719 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
5720 var instead of casting to long, to avoid casts.
5721 (prepare_states): Use MALLOC rather than alloca, so that we don't
5722 have to worry about alloca.
5723 * src/state.c (state_hash_lookup): Likewise.
5724
5725 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
5726 local var instead of casting to unsigned char, to avoid casts.
5727
5728 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
5729 STATE_ALLOC): Remove.
5730 (transitions_new, errs_new, reductions_new, state_new): Use malloc
5731 rather than calloc, and use offsetof to avoid allocating slightly
5732 too much storage.
5733 (state_new): Initialize all members.
5734
5735 * src/state.c (state_hash): Use unsigned accumulator, not signed.
5736
5737 * src/symtab.c (symbol_free): Remove; unused.
5738 (symbol_get): Remove cast in lhs of assignment.
5739 (symbols_do): Now static. Accept generic arguments, not
5740 hashing-related ones.
5741
5742 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
5743 (symbol_processor): Remove.
5744 (symbols_do): Remove decl; now static.
5745
5746 * src/system.h (alloca): Remove; decl no longer needed.
5747 (<stddef.h>): Include, for offsetof.
5748 (<inttypes.>, <stdint.h>): Include if available.
5749 (uintptr_t): New type, if system lacks it.
5750 (CALLOC, MALLOC, REALLOC): New macros.
5751 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
5752 new macros.
5753
5754 * src/tables.c (table_size): Now int, to pacify GCC.
5755 (table_grow, table_ninf_remap): Use signed table size.
5756 (save_row): Don't bother initializing locals when not needed.
5757 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
5758 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
5759
5760 * src/vcg.h: Correct misspellings.
5761
5762 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
5763
5764
5765 * src/getargs.c (getargs): Don't assume EOF == -1.
5766
26b4a969
PE
57672002-12-09 Paul Eggert <eggert@twinsun.com>
5768
5769 Change identifier spellings to avoid collisions with names
5770 that are reserved by POSIX.
5771
5772 Don't use names ending in _t, since POSIX reserves them.
5773 For consistency, remove _e and _s endings -- they're weren't
5774 needed to remove ambiguity. All uses changed.
5775 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
5776 turn was just renamed from struniq_t.
5777 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
5778 which in turn was just renamed from struniq_processor_t.
5779 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
5780 in turn was renamed from hash_compare_struniq_t.
5781 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
5782 (state_list): Renamed from state_list_t.
5783 * src/assoc.h (assoc): Renamed from assoc_t.
5784 * src/conflicts.c (enum conflict_resolution): Renamed from
5785 enum conflict_resolution_e.
5786 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
5787 (rule_list): Renamed from rule_list_t.
5788 * src/getargs.h (enum trace): Renamed from enum trace_e.
5789 (enum report): Renamed from enum report_e.
5790 * src/gram.h (item_number): Renamed from item_number_t.
5791 (rule_number): Renamed from rule_number_t.
5792 (struct rule_s): Remove the "rule_s" part; not used.
5793 (rule): Renamed from rule_t.
5794 (rule_filter): Renamed from rule_filter_t.
5795 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
5796 (goto_list): Renamed from goto_list_t.
5797 * src/lalr.h (goto_number): Renamed from goto_number_t.
5798 * src/location.h (location): Renamed from location_t.
5799 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
5800 and moved here from:
5801 * src/muscle_tab.h (muscle_entry_t): here.
5802 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
5803 (rule_list): Renamed from rule_list_t.
5804 * src/print_graph.c (static_graph): Renamed from graph.
5805 * src/reader.h (braced_code): Renamed from braced_code_t.
5806 Remove brace_code_e tag.
5807 * src/relation.h (relation_node): Renamed from relation_node_t.
5808 (relation_nodes): Renamed from relation_nodes_t.
5809 (relation): Renamed from relation_t.
5810 * src/state.h (state_number): Renamed from state_number_t.
5811 (struct state): Renamed from struct state_s.
5812 (state): Renamed from state_t.
5813 (transitions): Renamed from transitions_t. Unused (and
5814 misspelled) transtion_s tag removed.
5815 (errs): Renamed from errs_t. Unused errs_s tag removed.
5816 (reductions): Renamed from reductions_t. Unused tag
5817 reductions_s removed.
5818 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
5819 (struct symbol_list): Renamed from struct symbol_list_s.
5820 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
5821 (struct symbol): Renamed from struct symbol_s.
5822 (symbol): Renamed from symbol_t.
5823 * src/tables.c (vector_number): Renamed from vector_number_t.
5824 (action_number): Renamed from action_t.
5825 * src/tables.h (base_number): Renamed from base_t.
5826 * src/vcg.h (enum color): Renamed from enum color_e.
5827 (enum textmode): Renamed from enum textmode_e.
5828 (enum shape): Renamed from enum shape_e.
5829 (struct colorentry): Renamed from struct colorentry_s.
5830 (struct classname): Renamed from struct classname_s.
5831 (struct infoname): Renamed from struct infoname_s.
5832 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
5833 (enum decision): Renamed from enum decision_e.
5834 (enum orientation): Renamed from enum orientation_e.
5835 (enum alignment): Renamed from enum alignment_e.
5836 (enum arrow_mode): Renamed from enum arrow_mode_e.
5837 (enum crossing_type): Renamed from enum crossing_type_e.
5838 (enum view): Renamed from enum view_e.
5839 (struct node): Renamed from struct node_s.
5840 (node): Renamed from node_t.
5841 (enum linestyle): Renamed from enum linestyle_e.
5842 (enum arrowstyle): Renamed from enum arrowstyle_e.
5843 (struct edge): Renamed from struct edge.
5844 (edge): Renamed from edge_t.
5845 (struct graph): Renamed from struct graph_s.
5846 (graph): Renamed from graph_t.
5847 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
5848 Rename value_t -> value.
5849 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
5850 value_t_as_yystype -> value_as_yystype.
5851
5852 Don't include <errno.h> in the mainstream code, since it
5853 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
5854 * lib/get-errno.c, lib/get-errno.h: New files.
5855 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
5856 get-errno.c.
5857 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
5858 * src/output.c (output_skeleton): Likewise.
5859 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
5860 instead of errno.
5861 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
5862 Likewise.
5863 (handle_action_dollar, handle_action_at): Likewise.
5864 * src/system.h: Do not include <errno.h>.
5865 (TAB_EXT): Renamed from EXT_TAB.
5866 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
5867
5868 Avoid str[a-z]*, since <string.h> reserves that name space.
5869 Change all instances of "struniq" in names to "uniqstr", and
5870 likewise for "STRUNIQ" and "UNIQSTR".
5871 * src/uniqstr.c: Renamed from src/struniq.c.
5872 * src/uniqstr.h: Renamed from src/struniq.h.
5873 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
5874 * src/files.c (strsuffix): Remove; unused.
5875 (concat2): Renamed from stringappend. Now static.
5876 * src/files.h (strsuffix, stringappend): Remove; unused.
5877 * src/parse-gram.y (<chars>): Renamed from <string>.
5878 (<uniqstr>): Renamed from <struniq>.
5879 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
5880 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
5881 (struct graph_s.expand): Renamed from struct graph_s.stretch.
5882 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
5883 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
5884 (N_EXPAND): Renamed from N_STRETCH.
5885
5886 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
5887 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
5888 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
5889 Remove; unused.
5890 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
5891 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
5892 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
5893 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
5894 (BASE_MAXIMUM): Renamed from BASE_MAX.
5895 (BASE_MINIMUM): Renamed from BASE_MIN.
5896 (ACTION_MAX): Remove; unused.
5897 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
5898 Unnecessary casts removed from above defines.
5899
5900
5901 Fix misspelling in names.
5902 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
5903 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
5904 G_NODE_ALIGNEMENT.
5905
5906
5907 * lib/timevar.c (timevar_report): Renamed from time_report,
5908 for consistency with other names.
5909 * lib/timevar.h (timevar_report): New decl.
5910 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
5911
5912
5913 Sort include-file uses.
5914
5915 Reorder all include files under src to be in the order "system.h".
5916 then the ../lib include files in angle brackets (alphabetized),
5917 then the . include files in double-quotes (alphabetized). Fix
5918 dependency breakages encountered in this process, as follows:
5919 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
5920 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
5921 * src/state.h: Include "symtab.h".
5922
996b1c7e
PE
59232002-12-08 Paul Eggert <eggert@twinsun.com>
5924
5925 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
5926 since this causes problems when __file__ contains character
5927 sequences like "@" that are treated specially by src/scan-skel.l.
5928 Instead, just use the file's basename. This fixes the bug
5929 reported by Martin Mokrejs in
161a71f3 5930 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 5931
e19c4e5d
PE
59322002-12-06 Paul Eggert <eggert@twinsun.com>
5933
5934 Add support for rules that do not have trailing semicolons, as
5935 POSIX requires. Improve the quality of locations in Bison
5936 diagnostics.
26b4a969 5937
e19c4e5d
PE
5938 * src/location.c: Include <quotearg.h>.
5939 (empty_location): Now const.
5940 (location_print): New function. Follow the recommendation of the
5941 GNU Coding Standards for locations that span file boundaries.
5942 * src/location.h: Do not include <quotearg.h>; no longer needed.
5943 (boundary): New type.
5944 (location_t): Use it. This allows locations to span file boundaries.
5945 All member uses changed: file -> start.file or end.file (as needed),
5946 first_line -> start.line, first_column -> start.column,
5947 last_line -> end.line, last_column -> end.column.
5948 (equal_boundaries): New function.
5949 (LOCATION_RESET, LOCATION_STEP): Remove.
5950 (LOCATION_PRINT): Remove. All callers changed to use location_print.
5951 (empty_location): Now const.
5952 (location_print): New decl.
5953 * src/parse-gram.y (lloc_default): New function, which handles
5954 empty locations more accurately.
5955 (YYLLOC_DEFAULT): Use it.
5956 (%token COLON): Remove.
5957 (%token ID_COLON): New token.
26b4a969 5958 (rules): Use it.
e19c4e5d
PE
5959 (declarations, rules): Remove trailing semicolon.
5960 (declaration, rules_or_grammar_declaration):
5961 Allow empty (";") declaration.
5962 (symbol_def): Remove empty actions; no longer needed.
5963 (rules_or_grammar_declaration): Remove trailing semicolon.
5964 (semi_colon.opt): Remove.
5965 * src/reader.h: Include location.h.
5966 (scanner_cursor): New decl.
5967 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
5968 rolling our own.
5969 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
5970 of *loc.
5971 (STEP): Remove. No longer needed, now that adjust_location does
5972 the work. All uses removed.
5973 (scanner_cursor): New var.
5974 (adjust_location): Renamed from extend_location. It now sets
5975 *loc and adjusts the scanner cursor. All uses changed.
5976 Don't bother testing for CR.
5977 (handle_syncline): Remove location arg; now updates scanner cursor.
5978 All callers changed.
5979 (unexpected_end_of_file): Now accepts start boundary of token or
5980 comment, not location. All callers changed. Update scanner cursor,
5981 not the location.
5982 (SC_AFTER_IDENTIFIER): New state.
5983 (context_state): Renamed from c_context. All uses changed.
5984 (id_loc, code_start, token_start): New local vars.
5985 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
5986 processing of Yacc white space and equivalents here.
5987 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
5988 instead of returning ID immediately, since we need to search for
5989 a subsequent colon.
5990 (<INITIAL>"'", "\""): Save token_start.
5991 (<INITIAL>"%{", "{", "%%"): Save code_start.
5992 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
5993 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
5994 BEGIN context_state at end, not INITIAL.
5995 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
5996 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
5997 Return correct token start.
5998 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
5999 the start of a character, string or multiline comment is found.
6000 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
6001 Reduction): Adjust reported locations to match the more-precise
6002 results now expected.
6003 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
6004 * tests/reduce.at (Useless Rules, Reduced Automaton,
6005 Underivable Rules): Likewise.
6006 * tests/regression.at (Invalid inputs): No longer `expecting ";"
6007 or "|"' now that so many other tokens are allowed by the new grammar.
6008
6009 * src/complain.h (current_file): Remove duplicate decl;
6010 current_file is now owned by files.h.
6011 * src/complain.c, src/scan-gram.l: Include files.h.
6012
60132002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 6014
e19c4e5d
PE
6015 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
6016 promotes to int; it might be unsigned int.
6017 * data/yacc.c (yy_reduce_print): Likewise.
6018
6019 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
6020 be #defined in the prologue, not in the Bison declarations.
6021 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 6022
b64755e3
PE
60232002-12-02 Paul Eggert <eggert@twinsun.com>
6024
6025 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
6026 * lib/strtoul.c: New file, from gnulib.
6027 This fixes a porting bug reported by Peter Klein in
161a71f3 6028 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 6029
6e746484
PE
60302002-11-30 Paul Eggert <eggert@twinsun.com>
6031
b64755e3
PE
6032 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
6033 and put only a forward declaration in the prologue. This is for
6034 consistency with the other scanner helper functions.
6035
6ba55592
PE
6036 Type clashes now generate warnings, not errors, since it
6037 appears that POSIX may allow some grammars with type clashes.
6038 * src/reader.c (grammar_current_rule_check): Warn about
6039 type clashes instead of complaining.
6040 * tests/input.at (Type Clashes): Expect warnings, not complaints.
6041
6e746484
PE
6042 Add Yacc library, since POSIX requires it.
6043 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
6044 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
6045 * lib/main.c, lib/yyerror.c: New files.
6046
6047 gram_error can be static; it need not be extern.
6048 * src/reader.h (gram_error): Remove decl.
6049 * src/parse-gram.y (gram_error): Now static. Add static decl.
6050 (print_token_value): Omit parameter names from forward decl,
6051 for consistency.
6052
88510f9c
PE
60532002-11-29 Paul Eggert <eggert@twinsun.com>
6054
6e746484
PE
6055 * doc/bison.texinfo: Emphasize that yylex and yyerror must
6056 be declared before being used. E.g., one should typically
6057 declare them in the prologue. Use GNU coding style in examples.
6058 Put "const" consistently after the type it modifies. Mention
6059 that C99 supports "inline". Mention that yyerror traditionally
6060 returns "int".
6061
88510f9c
PE
6062 %parse-param and %lex-param now take just one argument, the
6063 declaration; the argument name is deduced from the declaration.
6064
6065 * doc/bison.texinfo (Parser Function, Pure Calling, Error
6066 Reporting, Table of Symbols): Document this.
6067 * src/parse-gram.y (add_param): New function.
6068 (COMMA): Remove.
6069 (declaration): Implement new rule for %parse-param and %lex-param.
6070 * src/scan-gram.l: "," now elicits a warning, rather than being
6071 a token; this is more compatible with byacc.
6072 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
6073
bb92250c
PE
60742002-11-27 Paul Eggert <eggert@twinsun.com>
6075
6076 Rename identifiers to avoid real and potential collisions.
6077
6078 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
6079 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 6080 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
6081 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
6082 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
6083 * src/parse-gram.y (print_token_value): Renamed from yyprint.
6084 All uses changed.
6085 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
6086 The name "yycontrol" violates the name space rules, and this stuff
6087 wasn't being used anyway.
6088 (input): Remove action; this stuff wasn't being used.
6089 (gram_error): Rename local variable yylloc -> loc.
6090 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
6091 (YY_DECL): Don't use "yy" at start of local variables.
6092 All uses changed, e.g., yylloc -> loc.
6093 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
6094 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
6095 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
6096 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
6097
6098 * src/parse-gram.y (gram_error): loc is now const *.
6099 * src/reader.h (gram_error): Likewise.
6100
3af4feb2
PE
61012002-11-24 Paul Eggert <eggert@twinsun.com>
6102
6103 Version 1.75c.
6104
6105 * tests/actions.at (Actions after errors): Use an output format
6106 more similar to that of the Printers and Destructors test.
6107 Test the position of the ';' token too.
6108 (Printers and Destructors): Likewise.
6109 (Printers and Destructors: %glr-parser): Remove for now, to avoid
6110 unnecessarily alarming people when the test fails.
6111
6112 * data/yacc.c (yyerrlab1): Move this label down, so that the
6113 parser does not discard the lookahead token if the user code
6114 invokes YYERROR. This change is required for POSIX conformance.
6115
6116 * lib/error.c: Sync with gnulib.
6117
61182002-11-22 Paul Eggert <eggert@twinsun.com>
6119
6120 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
6121 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
6122 * lib/xmalloc.c: Likewise.
26b4a969 6123
58004308
PE
61242002-11-20 Paul Eggert <eggert@twinsun.com>
6125
6126 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
6127
61282002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 6129
58004308
PE
6130 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
6131 should use `if (! x) abort ();' rather than `assert (x);', and
6132 anyway it's one less thing to worry about configuring.
6133
6134 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
6135 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
6136 and replace all instances of assert with abort.
6137 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6138 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
6139
6140 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
6141 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
6142 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
6143 hash_find_entry, hash_rehash, hash_insert): Likewise.
6144 * src/conflicts.c (resolve_sr_conflict): Likewise.
6145 * src/lalr.c (set_goto_map, map_goto): Likewise.
6146 * src/nullable.c (nullable_compute): Likewise.
6147 * src/output.c (prepare_rules, token_definitions_output): Likewise.
6148 * src/reader.c (packgram, reader): Likewise.
6149 * src/state.c (state_new, state_free, state_transitions_set,
6150 state_reduction_find): Likewise.
6151 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
6152 symbol_pack): Likewise.
6153 * src/tables.c (conflict_row, pack_vector): Likewise.
6154 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6155 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6156 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
6157 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
6158
6159 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
6160 (ARGMATCH_CONSTRAINT): New macro.
6161 (ARGMATCH_ASSERT): Use it.
6162
6163 * src/system.h (verify): New macro.
6164 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
6165 rather than assert.
6166 * src/tables.c (tables_generate): Likewise.
6167
6168 * src/struniq.c (struniq_assert): Now returns void, and aborts
6169 if the assertion is false.
6170 (struniq_assert_p): Remove.
6171 * src/struniq.h: Likewise.
6172
76ae8198
PE
61732002-11-18 Paul Eggert <eggert@twinsun.com>
6174
6175 * data/glr.c (yygetLRActions): Replace `yyindex' with
6176 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
6177 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 6178 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 6179
d3c4e709
AD
61802002-11-18 Akim Demaille <akim@epita.fr>
6181
6182 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
6183 space.
6184 From Tim Van Holder.
6185
8d8a7238
PE
61862002-11-17 Paul Eggert <eggert@twinsun.com>
6187
6188 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
6189 to "SyntaxError" for consistency with my 2002-11-15 change.
6190
6191 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
6192 not define to {}, since this breaks the common use of `YYDPRINTF
6193 ((...));' if a single statement is desired (e.g. before `else').
6194 Work around GCC warnings by surrounding corresponding calls with
6195 {} if needed.
6196 (yyhasResolvedValue): Remove unused function.
6197 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
6198 loop body.
6199 (yyreportSyntaxError): Renamed from yyreportParseError.
6200 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
6201 All uses changed.
6202 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
6203 extern when possible. Remove unused initializations.
6204
b0937b22
AD
62052002-11-16 Akim Demaille <akim@epita.fr>
6206
6207 Augment the similarity between GLR and LALR traces.
6208
6209 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
6210 (YY_REDUCE_PRINT): New.
6211 (yyparse): Use them.
6212 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
6213 YYDPRINT here.
6214 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
6215 state reached after the reduction/recovery, since...
6216 (yyparse, yyprocessOneStack): Report the state we are entering in.
6217
c5e3e510
AD
62182002-11-16 Akim Demaille <akim@epita.fr>
6219
6220 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
6221 Add support for --trace=skeleton.
6222 * src/scan-skel.l: %option debug.
6223 Scan strings of non-@ or \n instead of character by character.
6224 (scan_skel): Handle trace_skeleton.
6225 (QPUTS): New.
6226 (@output_parser_name@, @output_header_name@): ``Restore'' their
6227 support (used to be M4 macros).
6228 * data/yacc.c: Quote larger chunks, a la glr.c.
6229 * data/lalr1.cc: Likewise.
6230 The header guards are no longer available, so use some other
6231 string than `YYLSP_NEEDED'.
6232
4c6cc1db
AD
62332002-11-16 Akim Demaille <akim@epita.fr>
6234
6235 Make the ``Printers and Destructors'' test more verbose, taking
6236 `yacc.c''s behavior as (possibly wrong) reference.
6237
6238 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
6239 instead of fprint on stdout.
6240 Set and report the last_line of the symbols.
6241 Consistently display values and locations.
6242
6d9e8019
PE
62432002-11-16 Paul Eggert <eggert@twinsun.com>
6244
6245 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
6246
6e649e65
PE
62472002-11-15 Paul Eggert <eggert@twinsun.com>
6248
b25d88f6
PE
6249 * tests/actions.at (Actions after errors): New test case.
6250
6e649e65
PE
6251 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
6252 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
6253 tests/action.at, tests/calc.at, tests/conflicts.at,
6254 tests/cxx-type.at, tests/regression.at:
6255 "parse error" -> "syntax error" for POSIX compatibility.
6256 "parsing stack overflow..." -> "parser stack overflow" so
6257 that code matches Bison documentation.
6258
0f39aab9
AD
62592002-11-15 Akim Demaille <akim@epita.fr>
6260
6261 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
6262 take two BRACED_CODE, not two string_content.
6263 Free the scanner's obstack when we are done.
6264 (code_content): New.
6265 * tests/calc.at: Adjust.
6266 * doc/bison.texinfo: Adjust.
6267 Also, make sure to include the `,' for these declarations.
6268
761c1926
AD
62692002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
6270
6271 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
6272 definition; avoids potential autoreconf problems.
6273
b0f98b10
AD
62742002-11-15 Akim Demaille <akim@epita.fr>
6275
6276 Always check the value returned by yyparse.
6277
6278 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
6279 returned by yyparse.
6280 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
6281 Adjust calls.
6282 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
6283 returned by yyparse.
6284
970785f1
PH
62852002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6286
6287 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
6288 on input.at test.
6289
8fcc7db1
PE
62902002-11-14 Paul Eggert <eggert@twinsun.com>
6291
7ec1b48e
PE
6292 * src/output.c (output_skeleton): Call xfopen instead of
6293 duplicating xfopen's body.
6294
cfff7583 6295 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 6296 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 6297
8fcc7db1
PE
6298 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
6299 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
6300 Group compiler. Instead, use "$CC -E bar.c". Include the .h
6301 file twice in the grammar, as an extra check.
6302
6303 * tests/input.at (Torturing the Scanner): Surround the
6304 backslash-newline tests with "#if 0", to make it less likely that
6305 we'll run into compiler bugs. Bring back solitary \ inside
6306 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 6307 test backslash-newline in C character constant.
8fcc7db1 6308
4e8d992c
AD
63092002-11-14 Akim Demaille <akim@epita.fr>
6310
6311 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
6312 status of the compiler.
f32b346d 6313 Calling `exit 1' is no longer needed.
4e8d992c
AD
6314 Reported by Nelson H. F. Beebe.
6315
9501dc6e
AD
63162002-11-14 Akim Demaille <akim@epita.fr>
6317
6318 * tests/atlocal.in (CPPFLAGS): We have config.h.
6319 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
6320 New.
6321 * tests/actions.at, tests/calc.at, tests/conflicts.at,
6322 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
6323 * tests/regression.at, tests/torture.at: Use them for all the
6324 grammars that are to be compiled.
6325 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
6326 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
6327 * doc/bison.texinfo (GLR Parsers): Document `inline'.
6328
18b519c0
AD
63292002-11-14 Akim Demaille <akim@epita.fr>
6330
6331 * doc/bison.texinfo: Various formatting changes (alignments in
6332 samples, additional @group/@end group, GCS in samples.
6333 Use @deffn instead of simple @table to define the directives,
6334 macros, variables etc.
6335
9a86cdb9
PE
63362002-11-13 Paul Eggert <eggert@twinsun.com>
6337
daa33def 6338 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 6339 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 6340
daa33def 6341 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 6342 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
6343 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
6344 * tests/headers.at (export YYLTYPE): Likewise.
6345
6346 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 6347 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 6348
9a86cdb9
PE
6349 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
6350 comments, since they're not portable. Use GNU coding style.
6351
9c1e26bd
AD
63522002-11-13 Akim Demaille <akim@epita.fr>
6353
6354 * data/yacc.c: Leave bigger chunks of quoted text.
6355 (YYDSYMPRINTF): New.
6356 Use it to report symbol activities.
6357 * data/glr.c (YYDSYMPRINTF): New.
6358 Use it.
6359
87f721cc
PE
63602002-11-12 Paul Eggert <eggert@twinsun.com>
6361
6362 Version 1.75b.
6363
6364 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
6365 (yyglrReduce): Return yyok, not 0.
6366 This should avoid the enumerated-type warnings reported
464c6927 6367 by Nelson H. F. Beebe in
161a71f3 6368 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
6369
6370 * lib/bbitset.h (BITSET_INLINE): Remove.
6371 * lib/bitset.h [! BITSET_INLINE]: Remove.
6372 (bitset_set, bitset_reset, bitset_test): Rename local vars
6373 to avoid shadowing warnings by GCC.
6374
6375 * data/glr.c (inline): Remove #define. It's the user's
6376 responsibility to #define it away, just like 'const'.
464c6927 6377 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 6378 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 6379
87f721cc
PE
6380 * Makefile.maint (po-check): Scan .l and .y files instead of the
6381 .c and the .h files that they generate. This fixes the bug
6382 reported by Tim Van Holder in:
161a71f3 6383 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
6384 Look for N_ as well as for _. Try to avoid matching #define for
6385 N_ and _.
6386 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
6387 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
6388 * src/scan-gram.l: Revamp regular expressions so that " and '
6389 do not confuse xgettext.
6390
6391 * src/struniq.h (struniq_new): Do not declare the return type
6392 to be 'const'; this violates the C standard.
6393 * src/struniq.c (struniq_new): Likewise.
6394
be14ade5
AD
63952002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
6396
6397 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
6398 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
6399 linker.
6400
05291fbc
AD
64012002-11-12 Akim Demaille <akim@epita.fr>
6402
6403 * Makefile.maint: Sync with Autoconf:
6404 (local_updates): New.
6405
1f5fd52e
AD
64062002-11-12 Akim Demaille <akim@epita.fr>
6407
6408 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
6409
283f1e64
AD
64102002-11-12 Akim Demaille <akim@epita.fr>
6411
6412 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
6413 locations.
6414
886b69d1
AD
64152002-11-12 Akim Demaille <akim@epita.fr>
6416
6417 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
6418 not yyvalue.
6419
3df37415
AD
64202002-11-12 Akim Demaille <akim@epita.fr>
6421
6422 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
6423 Use it to test the GLR parser.
6424
7bd6c77e
AD
64252002-11-12 Akim Demaille <akim@epita.fr>
6426
6427 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
6428 defines it.
6429 * data/glr.c (yystos): New.
6430 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
6431 (YYDSYMPRINT): New.
6432 (yyval): Don't define it, it is handled via M4.
6433 (yyrecoverParseError): Free verbosely the discarded symbols.
6434 * data/yacc.c (yysymprint): Remove, rather...
6435 (b4_yysymprint_generate): invoke.
6436 * data/c.m4 (b4_yysymprint_generate): New.
6437 Accept pointers as arguments, as opposed to the version from
6438 yacc.c.
6439 (b4_yydestruct_generate): Likewise.
6440 * tests/cations.at (Printers and Destructors): Use Bison directives
6441 instead of CPP macros.
6442 Don't rely on internal details.
6443
b0400cc6
AD
64442002-11-12 Akim Demaille <akim@epita.fr>
6445
6446 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
6447 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
6448 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
6449 it against YYEMPTY and so forth), work on yytoken (i.e., set
6450 it to YYEMPTY etc.).
6451 (yydestruct): Replace with a b4_yydestruct_generate invocation.
6452 (b4_symbol_actions): Remove.
6453 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
6454 for 0, end-of-input.
6455
72f889cc
AD
64562002-11-12 Akim Demaille <akim@epita.fr>
6457
6458 * doc/bison.texinfo (Destructor Decl): New.
6459
b1ae9233
AD
64602002-11-12 Akim Demaille <akim@epita.fr>
6461
6462 * src/tables.c (tables_generate): Use free for pointers that
6463 cannot be NULL, not XFREE.
6464 (pack_vector): Use assert, not fatal, for bound violations.
6465 * src/state.c (state_new): Likewise.
6466 * src/reader.c (reader): Likewise.
6467 * src/lalr.c (set_goto_map): Likewise.
72f889cc 6468 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
6469 the file name.
6470
7ec2d4cd
AD
64712002-11-12 Akim Demaille <akim@epita.fr>
6472
6473 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
6474 Restore.
6475 * src/scan-gram.l (last_string): Is global to the file, not to
6476 yylex.
6477 * src/parse-gram.y (input): Don't append the epilogue here,
6478 (epilogue.opt): do it here, and free the scanner's obstack.
6479 * src/reader.c (epilogue_set): Rename as...
6480 (epilogue_augment): this.
6481 * data/c.m4 (b4_epilogue): Defaults to empty.
6482
573a6cd3
AD
64832002-11-12 Akim Demaille <akim@epita.fr>
6484
6485 * src/getargs.c (long_options): Remove duplicates.
6486 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
6487 Remove.
6488 * doc/bison.rnh: Remove.
6489 * doc/bison.texinfo (VMS Invocation): Remove.
6490
95612cfa
AD
64912002-11-12 Akim Demaille <akim@epita.fr>
6492
6493 * src/struniq.h, src/struniq.c (struniq_t): Is const.
6494 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
6495
6496 Use struniq for symbols.
6497
6498 * src/symtab.h (symbol_t): The tag member is a struniq.
6499 (symbol_type_set): Adjust.
6500 * src/symtab.c (symbol_new): Takes a struniq.
6501 (symbol_free): Don't free the tag member.
6502 (hash_compare_symbol_t, hash_symbol_t): Rename as...
6503 (hash_compare_symbol, hash_symbol): these.
6504 Use the fact that tags as struniqs.
6505 (symbol_get): Use struniq_new.
6506 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
6507 Returns a strniq.
6508 * src/reader.h (merger_list, grammar_currentmerge_set): The name
6509 and type members are struniqs.
6510 * src/reader.c (get_merge_function)
6511 (grammar_current_rule_merge_set): Adjust.
6512 (TYPE, current_type): Are struniq.
6513
6514 Use struniq for file names.
6515
6516 * src/files.h, src/files.c (infile): Split into...
6517 (grammar_file, current_file): these.
6518 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
6519 * src/reduce.c (reduce_print): Likewise.
6520 * src/getargs.c (getargs): Likewise.
6521 * src/complain.h, src/complain.c: Likewise.
6522 * src/main.c (main): Call struniqs_new early enough to use it for
6523 file names.
6524 Don't free the input file name.
6525
3e6656f9
AD
65262002-11-12 Akim Demaille <akim@epita.fr>
6527
6528 * src/symtab.c (symbol_free): Remove dead deactivated code:
6529 type_name are properly removed.
6530 Don't use XFREE to free items that cannot be NULL.
6531 * src/struniq.h, src/struniq.c: New.
6532 * src/main.c (main): Initialize/free struniqs.
6533 * src/parse-gram.y (%union): Add astruniq member.
6534 (yyprint): Adjust.
6535 * src/scan-gram.l (<{tag}>): Return a struniq.
6536 Free the obstack bit that used to store it.
6537 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
6538
7672019c
PE
65392002-11-11 Paul Eggert <eggert@twinsun.com>
6540
6541 Revamp to fix many (but not all) of the C- and M4-related quoting
6542 problems. Among other things, this fixes the Bison bug reported
6543 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 6544 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
6545
6546 Use new @ escapes consistently. Represent brackets with @{ and @}
6547 rather than @<:@ and @:>@, since this works a bit better with dumb
6548 editors like vi. Represent @ with @@, since @ is now consistently
6549 an escape. Use @oline@ and @ofile@ rather than __oline__ and
6550 __ofile__, to avoid unexpected expansions. Similarly, use @output
6551 rather than #output.
6552
6553 * data/c.m4 (b4_copyright): Omit file name from comment, since
6554 the file name could contain "*/".
6555 (b4_synclines_flag): Don't quote the 2nd argument; it should already
6556 be quoted. All uses changed.
6557
6558 * data/glr.c: Use new @ escapes consistently.
6559 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
6560 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
6561 Remove, since they couldn't handle arbitrary characters in file
6562 names.
6563 * data/lalr1.cc: Likewise.
6564 * data/yacc.c: Likewise.
6565
6566 * src/files.c (output_infix): Remove; all uses removed.
6567 * src/files.h: Likewise.
6568
6569 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
6570 mishandled funny characters in file names, and anyway it isn't
6571 needed any more.
6572 * data/yacc.c: Likewise.
6573 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
6574
6575 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
6576 * data/yacc.c: Likewise.
6577
6578 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
6579 strings now.
6580 (muscle_init): Quote filename as a C string.
6581 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
6582 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
6583 * src/output.c (escaped_file_name_output): New function.
6584 (prepare_symbols): Quote tokens for M4.
6585 (prepare): Don't insert output_infix, output_prefix,
6586 output_parser_name, output_header_name; this is now down by scan-skel.
6587 Insert skeleton as a C string.
6588
6589 * src/output.c (user_actions_output, symbol_destructors_output,
6590 symbol_printers_output): Quote filenames for C and M4.
6591 * src/reader.c (prologue_augment, epilogue_set): Likewise.
6592
6593 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
6594 escapes other than \\ and \'; this simplifies the code.
6595 (<SC_STRING>): Likewise, for \\ and \".
6596 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
6597 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
6598 Use new escapes @{ and @} for [ and ].
6599
6600 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
6601 them with auto vars.
6602 Switch to new escape scheme, where @ is the escape character uniformly.
6603 Abort if a stray escape character is found. Avoid unbounded input
6604 buffer when parsing non-escaped text.
6605
6606 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
6607 __oline__, #output, $@, and @{ do not have unintended meanings.
6608
acea4f3b
PE
66092002-11-09 Paul Eggert <eggert@twinsun.com>
6610
6611 Fix the test failure due to GCC warnings described in
161a71f3 6612 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
6613 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
6614 evaluate to 0 if it's impossible for NINF to be in the respective
6615 table.
6616 (yygetLRActions, yyrecoverParseError): Use them.
6617
6618 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
6619 counted in the token inserted at end of file. Now takes
6620 location_t *, not location_t, so that the location can be
6621 adjusted. All uses changed.
6622
6623 * tests/regression.at (Invalid inputs): Adjust wording in
6624 diagnostic to match the new behavior.
6625
6626 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
6627 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
6628 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
6629 abort ();'. This reduces the runtime of the "Many lookaheads"
6630 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
6631 GCC 3.2.
6632
20ef1ad5
PE
66332002-11-07 Paul Eggert <eggert@twinsun.com>
6634
6635 * src/parse-gram.y (CHARACTER): Remove unused token.
6636 All uses removed.
6637
6638 * src/scan-gram.l: Remove stack option. We no longer use the
6639 stack, since the stack was never deeper than 1; instead, use the
6640 new auto var c_context to record the stacked value.
6641
6642 Remove nounput option. At an unexpected end of file, we now unput
6643 the minimal input necessary to end cleanly; this simplifies the
6644 code.
6645
6646 Avoid unbounded token sizes where this is easy.
6647
6648 (unexpected_end_of_file): New function.
6649 Use it to systematize the error message on unexpected EOF.
6650 (last-string): Now auto, not static.
6651 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
6652 (scanner_last_string_free): Remove; not used.
6653 (percent_percent_count): Move decl to just before use.
6654 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
6655 not the (never otherwised-used) CHARACTER.
6656
93724f13
AD
66572002-11-07 Akim Demaille <akim@epita.fr>
6658
6659 Let yyerror always receive the msg as last argument, so that
6660 yyerror can be variadic.
6661
6662 * data/yacc.c (b4_yyerror_args): New.
6663 Use it when calling yyerror.
6664 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
6665 Use it when calling yyerror.
6666 * doc/bison.texinfo (Error Reporting): Adjust.
6667 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
6668 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
6669
6e40b4eb
AD
66702002-11-06 Akim Demaille <akim@epita.fr>
6671
6672 #line should have quoted strings.
6673 Ideally, this should be done by m4_quotearg.
6674
6675 * src/scan-skel.l: Include quotearg.h.
6676 Quote __ofile__.
6677 * src/output.c (symbol_printers_output)
6678 (symbol_destructors_output): Quote the file name.
6679
2dfbfc12
AD
66802002-11-06 Akim Demaille <akim@epita.fr>
6681
6682 * tests/regression.at (Invalid inputs): Adjust to the recent
6683 messages.
6684
437c2d80
AD
66852002-11-06 Akim Demaille <akim@epita.fr>
6686
6687 Restore --no-lines.
6688 Reported by Jim Kent.
6689
6690 * data/c.m4 (b4_syncline): New.
6691 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
6692 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
6693 * src/output.c (user_actions_output): Likewise.
6694 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 6695 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 6696
900c5db5
AD
66972002-11-06 Akim Demaille <akim@epita.fr>
6698
6699 * src/main.c (main): Free `infile'.
6700 * src/scan-gram.l (handle_syncline): New.
6701 Recognize `#line'.
6702 * src/output.c (user_actions_output, symbol_destructors_output)
6703 (symbol_printers_output): Use the location's file name, not
6704 infile.
6705 * src/reader.c (prologue_augment, epilogue_set): Likewise.
6706
e183b123 67072002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 6708
e183b123 6709 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 6710 either has GLR conflict entries.
e183b123 6711
193eb6b7
PE
67122002-11-05 Paul Eggert <eggert@twinsun.com>
6713
e183b123
PE
6714 * src/scan-gram.l: Use more accurate diagnostics, e.g.
6715 "integer out of range" rather than "invalid value".
6716 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
6717 accordingly.
6718
193eb6b7
PE
6719 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
6720 Also, remove one static variable in the scanner.
6721
6722 * src/scan-gram.l (braces_level): Now auto, not static.
6723 Initialize to zero if the compiler is being picky.
6724 (INITIAL): Clear braces_level instead of incrementing it.
6725 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
6726 as POSIX 1003.1-2001 requires.
6727 * src/system.h (IF_LINT): New macro, taken from coreutils.
6728 * configure.ac: Define "lint" if --enable-gcc-warnings.
6729
29c01725
AD
67302002-11-05 Akim Demaille <akim@epita.fr>
6731
6732 * src/scan-gram.l: When it starts with `%', complain about the
6733 whole directive, not just that `invalid character: %'.
6734
8aeac3ca
AD
67352002-11-04 Akim Demaille <akim@epita.fr>
6736
6737 * Makefile.maint: Update from Autoconf.
6738 (update, cvs-update, po-update, do-po-update): New.
6739
793a58bb
AD
67402002-11-04 Akim Demaille <akim@epita.fr>
6741
6742 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
6743 and yyerror.
6744 Have yyerror `use' its arguments.
6745 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
6746 returns true when location & yacc & pure & parse-param.
6747 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
6748
c4d720cd
AD
67492002-11-04 Akim Demaille <akim@epita.fr>
6750
6751 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
6752 clashes.
6753 * src/scan-gram.l: Use [\'] instead of ['] to pacify
6754 font-lock-mode.
6755 Use complain_at.
6756 Use quote, not quote_n since LOCATION_PRINT no longer uses the
6757 slot 0.
6758
613a0dc5
PE
67592002-11-03 Paul Eggert <eggert@twinsun.com>
6760
6761 * src/reader.c (get_merge_function, grammar_current_rule_check):
6762 Use consistent diagnostics for reporting type name clashes.
6763 Quote the types with <>, for consistency with Yacc.
6764 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
6765
2a8d363a
AD
67662002-11-03 Akim Demaille <akim@epita.fr>
6767
6768 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
6769 New.
6770 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
6771 (b4_parse_param): Remove.
6772 Use b4_identification.
6773 Propagate b4_pure_args where needed to pass them to yyerror.
6774 * data/glr.m4 (b4_parse_param): Remove.
6775 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
6776 (b4_lpure_formals): New.
6777 Use b4_identification.
6778 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
6779 b4_user_formals and b4_user_args.
6780 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
6781 (yyreportAmbiguity): When using a pure parser, also need
6782 the location, and the parse-params.
6783 Adjust callers.
6784 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
6785 When using a pure parser, also need the parse-params.
6786 Adjust callers.
6787 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
6788 (%pure-parser + %parse-param) LALR and GLR parsers.
6789 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
6790 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
6791 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
6792 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
6793 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
6794 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
6795 * doc/bison.texinfo: Untabify the whole file.
6796 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
6797 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
6798 (Error Reporting): Adjust to these new directives.
6799 Document %error-verbose, deprecate YYERROR_VERBOSE.
6800
9e32add8
AD
68012002-11-03 Akim Demaille <akim@epita.fr>
6802
6803 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
6804 AT_CHECK_CALC_GLR invocations to use % directives, instead of
6805 command line options.
6806 * tests/cxx-type.at: Formatting changes.
6807
b02d90a5
PE
68082002-11-03 Paul Eggert <eggert@twinsun.com>
6809
6810 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
6811 to count columns correctly, and to check for invalid inputs.
9e32add8 6812
b02d90a5
PE
6813 Use mbsnwidth to count columns correctly. Account for tabs, too.
6814 Include mbswidth.h.
6815 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
6816 (extend_location): New function.
6817 (YY_LINES): Remove.
6818
6819 Handle CRLF in C code rather than in Lex code.
6820 (YY_INPUT): New macro.
6821 (no_cr_read): New function.
6822
6823 Scan UCNs, even though we don't fully handle them yet.
6824 (convert_ucn_to_byte): New function.
6825
6826 Handle backslash-newline correctly in C code.
6827 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
6828 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
6829 all uses changed.
6830 (tag, splice): New EREs. Do not allow NUL or newline in tags.
6831 Use {splice} wherever C allows backslash-newline.
6832 YY_STEP after space, newline, vertical-tab.
6833 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 6834
b02d90a5
PE
6835 (letter, id): Don't assume ASCII; e.g., spell out a-z.
6836
6837 ({int}, handle_action_dollar, handle_action_at): Check for integer
6838 overflow.
9e32add8 6839
b02d90a5
PE
6840 (YY_STEP): Omit trailing semicolon, so that it's more like C.
6841
6842 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
6843 as well as \000. Check for UCHAR_MAX, not 255.
6844 Allow \x with an arbitrary positive number of digits, as in C.
6845 Check for overflow here.
6846 Allow \? and UCNs, for compatibility with C.
6847
6848 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
6849 with quote slot used by complain_at.
6850
6851 * tests/input.at: Add tests for backslash-newline, m4 quotes
6852 in symbols, long literals, and funny escapes in strings.
6853
6854 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
6855 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
6856 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
6857 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
6858 * m4/mbswidth.m4: New file, from GNU coreutils.
6859
6860 * doc/bison.texinfo (Grammar Outline): Document // comments.
6861 (Symbols): Document that trigraphs have no special meaning in Bison,
6862 nor is backslash-newline allowed.
6863 (Actions): Document that trigraphs have no special meaning.
6864
6865 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
6866 no longer used.
6867
68682002-11-02 Paul Eggert <eggert@twinsun.com>
6869
6870 * src/reader.c: Don't include quote.h; not needed.
6871 (get_merge_function): Reword warning to be consistent with
6872 type clash diagnostic in grammar_current_rule_check.
6873
6874 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
6875 bug in trigraph handling.
6876
6877 * src/output.c (prepare_symbols): When printing token names,
6878 escape "[" as "@<:@" and likewise for "]".
6879
6880 * src/system.h (errno): Remove declaration, as we are now
6881 assuming C89 or better, and C89 guarantees errno.
6882
762b212b
PE
68832002-10-30 Paul Eggert <eggert@twinsun.com>
6884
6885 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
6886 Check for close failures.
6887 * src/files.h (xfclose): Return void, not int, since it always
6888 returned zero.
6889 * src/files.c (xfclose): Likewise. Report I/O error if ferror
6890 indicates one.
6891 * src/output.c (output_skeleton): Use xfclose rather than fclose
6892 and ferror. xfclose now checks ferror.
6893
6894 * data/glr.c (YYLEFTMOST_STATE): Remove.
6895 (yyreportTree): Use a stack-based leftmost state. This avoids
6896 our continuing battles with bogus warnings about initializers.
6897
56100c60
AD
68982002-10-30 Akim Demaille <akim@epita.fr>
6899
6900 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
6901 #if.
6902
51b4a04c
PH
69032002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6904
6905 * tests/glr-regr1.at: New test for reported regressions.
6906 * tests/testsuite.at: Add glr-regr1.at test.
6907 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 6908
bf1ebda2
PE
69092002-10-24 Paul Eggert <eggert@twinsun.com>
6910
5c16c6b1
PE
6911 Version 1.75a.
6912
bf1ebda2
PE
6913 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
6914 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
6915 we use malloc. Don't assume 'A' through 'Z' are contiguous.
6916 Don't assume strdup exists; POSIX says its an XSI extension.
6917 Check for buffer overflow on input.
6918
b526ee61
AD
69192002-10-24 Akim Demaille <akim@epita.fr>
6920
6921 * src/output.c (output_skeleton): Don't disable M4sugar comments
6922 too soon: it results in comments being expanded.
6923 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
6924 first output.
6925
f1886bb2
AD
69262002-10-24 Akim Demaille <akim@epita.fr>
6927
6928 * data/yacc.c (m4_int_type): New.
6929 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
6930 char' as only yacc.c wants K&R portability.
6931 * data/glr.c (yysigned_char): Remove.
6932 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
6933 Reported by Quoc Peyrot.
6934
c5576256
PE
69352002-10-23 Paul Eggert <eggert@twinsun.com>
6936
6937 * src/main.c (main): With --trace=time, report times even if a
6938 non-fatal error occurs. Formerly, the times were reported in some
6939 such cases but not in others.
6940 * src/reader.c (reader): Just return if a complaint has been issued,
6941 instead of exiting, so that 'main' can report times.
6942
27b0ffea
AD
69432002-10-22 Akim Demaille <akim@epita.fr>
6944
6945 * src/system.h: Include sys/types.
6946 Reported by Bert Deknuydt.
6947
223a7883
PE
69482002-10-23 Paul Eggert <eggert@twinsun.com>
6949
6950 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
6951 Suggested by Art Haas.
6952
69532002-10-22 Paul Eggert <eggert@twinsun.com>
6954
6955 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
6956 decl; not needed any more.
6957 * src/main.c (main): Use return to exit, undoing yesterday's change.
6958 The last OS that we could find where this wouldn't work is
6959 SunOS 3.5, and that's too old to worry about now.
6960
6961 * data/glr.c (struct yyltype): Define members even when not
6962 doing locations. This is more consistent with yacc.c, and it
6963 works around the following bug reports:
161a71f3
PE
6964 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
6965 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 6966
223a7883
PE
6967 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
6968 @acronym consistently. Standardize on "Yacc" instead of "YACC",
6969 "Algol" instead of "ALGOL". Give a bit more history about BNF.
6970
8b76775a
AD
69712002-10-22 Akim Demaille <akim@epita.fr>
6972
6973 * data/README: New.
6974
6db10d14
PE
69752002-10-21 Paul Eggert <eggert@twinsun.com>
6976
6977 Be consistent about 'bool'; the old code used an enum in one
6978 module and an int in another, and this violates the C standard.
6979 * m4/stdbool.m4: New file, from coreutils 4.5.3.
6980 * configure.ac (AC_HEADER_STDBOOL): Add.
6981 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
6982 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
6983 * src/symtab.c (hash_compare_symbol_t): Likewise.
6984 * src/system.h (bool, false, true): Use a definition consistent
6985 with ../lib/hash.c. All uses changed.
6986
6987 * src/complain.c (warning_issued): Renamed from warn_message_count,
6988 so that we needn't worry about integer overflow (!).
6989 Now of type bool. All uses changed.
6990 (complaint_issued): Renamed from complain_message_count; likewise.
6991
6992 * src/main.c (main): Use exit to exit with failure.
27b0ffea 6993
6db10d14
PE
6994 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
6995 rather than 1 and 0.
6996 * src/main.c (main): Likewise.
6997 * src/getargs.c (getargs): Likewise.
6998 * src/reader.c (reader): Likewise.
6999
7000 * src/getarg.c (getargs): Remove duplicate code for
7001 "Try `bison --help'".
7002
7003 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
7004 What was that "2" for?
7005
7006 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
7007 * src/getargs.c (usage): Likewise.
7008
7009 * src/getargs.c (getargs): When there are too few operands, report
7010 the last one. When there are too many, report the first extra
7011 one. This is how diffutils does it.
7012
92a060fd
PE
70132002-10-20 Paul Eggert <eggert@twinsun.com>
7014
7015 Remove K&R vestiges.
7016 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
7017 * src/complain.c (VA_START): Remove. Assume prototypes.
7018 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
7019 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
7020 fatal): Assume prototypes.
7021 * src/complain.h: Assume prototypes.
7022 * src/system.h (PARAMS): Remove.
7023 Include <limits.h> unconditionally, since it's guaranteeed even
7024 for a freestanding C89 compiler.
7025 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
7026 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 7027
e7cb57c0
AD
70282002-10-20 Akim Demaille <akim@epita.fr>
7029
7030 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
7031 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
7032 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
7033 (yyresolveStates, yyresolveAction, yyresolveStack)
7034 (yyprocessOneStack): Use them.
7035 (yy_reduce_print): New.
7036 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
7037
0245f82d
AD
70382002-10-20 Akim Demaille <akim@epita.fr>
7039
7040 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
7041 arguments and output `void'.
7042 (b4_c_function): Rename as...
7043 (b4_c_function_def): this.
7044 (b4_c_function_decl, b4_c_ansi_function_def)
7045 (b4_c_ansi_function_decl): New.
7046 Change the interpretation of the arguments: before `int, foo', now
7047 `int foo, foo'.
7048 * data/yacc.c (yyparse): Prototype and define thanks to these.
7049 Adjust b4_c_function_def uses.
7050 * data/glr.c (yyparse): Likewise, but ANSI only.
7051
39912f52
AD
70522002-10-20 Akim Demaille <akim@epita.fr>
7053
7054 * src/output.c (prepare): Move the definition of `tokens_number',
7055 `nterms_number', `undef_token_number', `user_token_number_max'
7056 to...
7057 (prepare_tokens): Here.
7058 (prepare_tokens): Rename as...
7059 (prepare_symbols): this.
7060 (prepare): Move the definition of `rules_number' to...
7061 (prepare_rules): here.
7062 (prepare): Move the definition of `last', `final_state_number',
7063 `states_number' to...
7064 (prepare_states): here.
7065 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
7066
20c1e2ad
AD
70672002-10-20 Akim Demaille <akim@epita.fr>
7068
7069 * src/tables.h, src/tables.c, src/output.c: Comment changes.
7070
21964f43
AD
70712002-10-20 Akim Demaille <akim@epita.fr>
7072
7073 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
7074 * data/c.m4: here.
7075
66d30cd4
AD
70762002-10-20 Akim Demaille <akim@epita.fr>
7077
7078 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
7079 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
7080 `pair'.
7081 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
7082 `name' to...
7083 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
7084 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
7085 These.
7086
95f2c9fe
PE
70872002-10-19 Paul Eggert <eggert@twinsun.com>
7088
7089 Do not create a temporary file, as that involves security and
7090 cleanup headaches. Instead, use a pair of pipes.
7091 Derived from a suggestion by Florian Krohm.
7092 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
7093 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
7094 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
7095 (BISON_PREREQ_SUBPIPE): Add.
7096 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
7097 Add subpipe.h, subpipe.c.
7098 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
7099 * po/POTFILES.in: Add lib/subpipe.c.
7100 * src/output.c: Include "subpipe.h".
7101 (m4_invoke): Remove decl.
7102 (scan_skel): New decl.
7103 (output_skeleton): Use pipe rather than temporary file for m4 input.
7104 Check that m4sugar.m4 is readable, to avoid deadlock.
7105 Check for pipe I/O error.
7106 * src/scan-skel.l (readpipe): Remove decl.
7107 (scan_skel): New function, to be used in place of m4_invoke.
7108 Read from stream rather than file.
66d30cd4 7109
95f2c9fe
PE
7110 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
7111 float, as this generates a warning on Solaris 8 + GCC 3.2 with
7112 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
7113 this generates a more-accurate value anyway.
7114
7115 * lib/timevar.c (timervar_accumulate): Rename locals to
7116 avoid confusion with similarly-named more-global.
7117 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
7118
7119 * src/output.c (prepare): Use xstrdup to convert char const *
7120 to char *, to avoid GCC warning.
7121
c19988b7
AD
71222002-10-19 Akim Demaille <akim@epita.fr>
7123
7124 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
7125 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
7126 Use them to have `calc.y' ready for %pure-parser.
7127 * data/yacc.c (YYLEX): Pass a yylex return type to
7128 b4_c_function_call.
7129
ae7453f2
AD
71302002-10-19 Akim Demaille <akim@epita.fr>
7131
7132 Prototype support of %lex-param and %parse-param.
7133
7134 * src/parse-gram.y: Add the definition of the %lex-param and
7135 %parse-param tokens, plus their rules.
7136 Drop the `_' version of %glr-parser.
7137 Add the "," token.
7138 * src/scan-gram.l (INITIAL): Scan them.
7139 * src/muscle_tab.c: Comment changes.
7140 (muscle_insert, muscle_find): Rename `pair' as `probe'.
7141 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
7142 (muscle_entry_s): The `value' member is no longer const.
7143 Adjust all dependencies.
7144 * src/muscle_tab.c (muscle_init): Adjust: use
7145 MUSCLE_INSERT_STRING.
7146 Initialize the obstack earlier.
7147 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
7148 (muscle_pair_list_grow): New.
7149 * data/c.m4 (b4_c_function_call, b4_c_args): New.
7150 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
7151 * tests/calc.at: Use %locations, not --locations.
7152 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
7153
0e575721
AD
71542002-10-19 Akim Demaille <akim@epita.fr>
7155
7156 * src/getargs.c (usage): Take status as argument and exit
7157 accordingly.
7158 Report the traditional `Try ... --help' message when status != 0.
7159 (usage, version): Don't take a FILE * as arg, it is pointless.
7160 (getargs): When there is an incorrect number of arguments, make it
7161 an error, and report it GNUlically thanks to `usage ()'.
7162
724ce7f5
PE
71632002-10-18 Paul Eggert <eggert@twinsun.com>
7164
3a781eb2
PE
7165 * data/glr.c (yyreportParseError): Don't assume that sprintf
7166 yields the length of the printed string, as this is not true
7167 on SunOS 4.1.4. Reported by Peter Klein.
7168
724ce7f5
PE
7169 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
7170 * tests/conflicts.at (%nonassoc and eof): Likewise.
7171 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
7172
473d0a75
AD
71732002-10-17 Akim Demaille <akim@epita.fr>
7174
7175 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
7176 * src/getargs.c (trace_types, trace_args): Adjust.
7177 * src/reader.c (grammar_current_rule_prec_set)
7178 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
7179 Standardize error messages.
7180 And s/@prec/%prec/!
7181 (reader): Use trace_flag to enable scanner/parser debugging,
7182 instead of an adhoc scheme.
7183 * src/scan-gram.l: Remove trailing debugging code.
7184
e76d2469
PE
71852002-10-16 Paul Eggert <eggert@twinsun.com>
7186
93e2236a
PE
7187 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
7188 MUSCLE_TAB_H.
7189
e76d2469
PE
7190 * NEWS: Officially drop support for building Bison with K&R C,
7191 since it didn't work anyway and it's not worth worrying about.
7192 * Makefile.maint (wget_files): Remove ansi2knr.c.
7193 (ansi2knr.c-url_prefix): Remove.
7194 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
7195 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
7196 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
7197
5bd1c419
PE
71982002-10-15 Paul Eggert <eggert@twinsun.com>
7199
7200 Stop using the "enum_" trick for K&R-style function definitions;
7201 it confused me, and I was the author! Instead, assume that people
7202 who want to use K&R C compilers (when using these modules in GCC,
7203 perhaps?) will run ansi2knr.
7204
7205 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
7206 All uses of "enum_" changed to "enum ".
7207 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
7208 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 7209
5bd1c419
PE
7210 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
7211 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
7212 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
7213 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
7214 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
7215 abitset_not, abitset_ones, abitset_or, abitset_or_and,
7216 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
7217 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
7218 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
7219 Use function prototypes; this removes the need for declaring
7220 static functions simply to provide their prototypes.
7221 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
7222 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
7223 bitset_count_, bitset_create, bitset_dump, bitset_first,
7224 bitset_free, bitset_init, bitset_last, bitset_next,
7225 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
7226 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
7227 bitset_print, bitset_release_memory, bitset_toggle_,
7228 bitset_type_choose, bitset_type_get, bitset_type_name_get,
7229 debug_bitset): Likewise.
7230 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
7231 * lib/bitset_stats.c (bitset_log_histogram_print,
7232 bitset_percent_histogram_print, bitset_stats_and,
7233 bitset_stats_and_cmp, bitset_stats_and_or,
7234 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
7235 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
7236 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
7237 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
7238 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
7239 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
7240 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
7241 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
7242 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
7243 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
7244 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
7245 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
7246 bitset_stats_zero): Likewise.
7247 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
7248 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
7249 bitsetv_dump, debug_bitsetv): Likewise.
7250 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
7251 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
7252 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
7253 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
7254 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
7255 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
7256 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
7257 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
7258 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
7259 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
7260 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
7261 Likewise.
7262 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
7263 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
7264 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
7265 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
7266 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
7267 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
7268 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
7269 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
7270 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
7271 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
7272 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 7273
ae26e1f0
AD
72742002-10-14 Akim Demaille <akim@epita.fr>
7275
7276 Version 1.75.
7277
d43baf71
AD
72782002-10-14 Akim Demaille <akim@epita.fr>
7279
7280 * tests/Makefile.am (maintainer-check-posix): New.
7281
7ebc83e3
AD
72822002-10-14 Akim Demaille <akim@epita.fr>
7283
7284 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
7285 member.
7286
05846dae
AD
72872002-10-14 Akim Demaille <akim@epita.fr>
7288
7289 * src/tables.c (table_ninf_remap): base -> tab.
7290 Reported by Matt Rosing.
7291
1318e37d
PE
72922002-10-14 Paul Eggert <eggert@twinsun.com>
7293
447fbb17
PE
7294 * tests/action.at, tests/calc.at, tests/conflicts.at,
7295 tests/cxx-type.at, tests/headers.at, tests/input.at,
7296 tests/regression.at, tests/synclines.at, tests/torture.at:
7297 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
7298 so that the tests still work even if POSIXLY_CORRECT is set.
7299 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 7300
1318e37d
PE
7301 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
7302 for portability to K&R hosts. Fix typo: signed char is guaranteed
7303 only to 127, not to 128.
7304 * data/glr.c (yysigned_char): New type.
7305 * data/yacc.c (yysigned_char): Likewise.
7306 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
7307
cc0f0794
PE
73082002-10-13 Paul Eggert <eggert@twinsun.com>
7309
5038f418
PE
7310 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
7311 true due to limited range of data type" warning from GCC.
7312
cc0f0794
PE
7313 * data/c.m4 (b4_token_defines): Protect against double-inclusion
7314 by wrapping enum yytokentype's definition inside #ifndef
7315 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
7316
6fed0802
AD
73172002-10-13 Akim Demaille <akim@epita.fr>
7318
7319 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
7320 Un yy- yyrhs to avoid the name clash with the global YYRHS.
7321
32f0598d
AD
73222002-10-13 Akim Demaille <akim@epita.fr>
7323
7324 * Makefile.maint: Update from Autoconf 2.54.
7325 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
7326
7ea9a33f
AD
73272002-10-13 Akim Demaille <akim@epita.fr>
7328
7329 * src/print.c (print_state): Separate the list of solved conflicts
7330 from the other items.
7331 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
7332
ea99527d
AD
73332002-10-13 Akim Demaille <akim@epita.fr>
7334
7335 Let nondeterministic skeletons be usable with deterministic
7336 tables.
7337
7338 With the patch, GAWK compiled by GCC without -O2 passes its test
7339 suite using a GLR parser driven by LALR tables. It fails with -O2
7340 because `struct stat' gives two different answers on my machine:
7341 88 (definition of an auto var) and later 96 (memset on this var).
7342 Hence the stack is badly corrumpted. The headers inclusion is to
7343 blame: if I move the awk.h inclusion before GLR's system header
7344 inclusion, the two struct stat have the same size.
7345
7346 * src/tables.c (pack_table): Always create conflict_table.
7347 (token_actions): Always create conflict_list.
7348 * data/glr.c (YYFLAG): Remove, unused.
7349
f377f69f
AD
73502002-10-13 Akim Demaille <akim@epita.fr>
7351
7352 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
7353 (O0FLAGS): New.
7354 (VALGRIND, GXX): New.
7355 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
7356 * tests/bison.in: Run $PREBISON a pre-command.
7357 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
7358 (maintainer-check-g++): New.
7359 * Makefile.am (maintainer-check): New.
7360
2a1fe6ed
AD
73612002-10-13 Akim Demaille <akim@epita.fr>
7362
7363 * data/glr.c: Formatting changes.
7364 Tweak some trace messages to match yacc.c's.
7365
f50adbbd
AD
73662002-10-13 Akim Demaille <akim@epita.fr>
7367
7368 GLR parsers sometimes raise parse errors instead of performing the
7369 default reduction.
7370 Reported by Charles-Henry de Boysson.
7371
7372 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 7373 check the length of the traces when %glr.
f50adbbd
AD
7374 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
7375 GLR's traces.
7376 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
7377 Test GLR parsers.
7378 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
7379 (yyltype): Remove the yy prefix from the member names.
7380 (yytable): Complete its comment.
7381 (yygetLRActions): Map error action number from YYTABLE from
7382 YYTABLE_NINF to 0.
7383 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
7384 (which was a bug: it should have been YYTABEL_NINF, and yet it was
7385 not satisfying as we could compare an YYACTION computed from
7386 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
7387 only value for error actions.
7388 (yyreportParseError): In verbose parse error messages, don't issue
7389 `error' in the list of expected tokens.
7390 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
7391 next action to perform to match glr.c's decoding.
7392 (yytable): Complete its comment.
7393
bcbad5b9
PE
73942002-10-13 Paul Eggert <eggert@twinsun.com>
7395
7396 Fix problem reported by Henrik Grubbstroem in
161a71f3 7397 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
7398 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
7399 because the Bison parser reads the second action before reducing
7400 the first one.
7401 * src/scan-gram.l (rule_length): New static var.
7402 Use it to keep track of the rule length in the scanner, since
7403 we can't expect the parser to be in lock-step sync with the scanner.
7404 (handle_action_dollar, handle_action_at): Use this var.
7405 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 7406
14904b89
PE
74072002-10-12 Paul Eggert <eggert@twinsun.com>
7408
1fe611e5
PE
7409 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
7410 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
7411 Include <sys/time.h> when checking for clock_t and struct tms.
7412 Use same include order as source.
7413 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 7414 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 7415
1fe611e5
PE
7416 * lib/timevar.c: Update copyright date and clarify comments.
7417 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 7418
1fe611e5
PE
7419 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
7420 GCC version as of today, then merge Bison's changes.
7421 Change "GCC" to "Bison" in copyright notice. timevar.def's
7422 author is Akim, so change that too.
7423
98194095
PE
7424 * src/reader.c (grammar_current_rule_check):
7425 Don't worry about the default action if $$ is untyped.
7426 Prevents bogus warnings reported by Jim Gifford in
161a71f3 7427 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 7428
14904b89
PE
7429 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
7430 * data/glr.c, data/lalr1.cc, data/yacc.c:
7431 Output token definitions before the first part of user declarations.
7432 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 7433 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 7434
ff6dca18
PE
74352002-10-11 Paul Eggert <eggert@twinsun.com>
7436
7437 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
7438 (yyparse): here. This undoes some of the 2002-07-25 change.
7439 Compatibility problem reported by Ralf S. Engelschall with
7440 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
7441
eb714592
AD
74422002-10-11 Akim Demaille <akim@epita.fr>
7443
7444 * tests/regression.at Characters Escapes): New.
7445 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
7446 characters.
7447 Reported by Jan Nieuwenhuizen.
7448
b7195100
AD
74492002-10-11 Akim Demaille <akim@epita.fr>
7450
7451 * po/id.po: New.
7452
f28a0f2d
PE
74532002-10-10 Paul Eggert <eggert@twinsun.com>
7454
7455 Portability fixes for bitsets; this also avoids several GCC
7456 warnings.
7457
7458 * lib/abitset.c: Include <stddef.h>, for offsetof.
7459 * lib/lbitset.c: Likewise.
7460
7461 * lib/abitset.c (abitset_bytes): Return a size that is aligned
7462 properly for vectors of objects. Do not assume that adding a
7463 header size to a multiple of a word size yields a value that is
7464 properly aligned for the whole union.
7465 * lib/bitsetv.c (bitsetv_alloc): Likewise.
7466
7467 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
7468 unique names for structures.
7469 * lib/ebitset.c (ebitset_bytes): Likewise.
7470 * lib/lbitset.c (lbitset_bytes): Likewise.
7471
7472 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
7473 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
7474 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
7475 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
7476 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
7477 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
7478 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
7479 to improve the type-checking that GCC can do.
7480 * lib/bitset.c (bitset_op4_cmp): Likewise.
7481 * lib/bitset_stats.c (bitset_stats_count,
7482 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
7483 bitset_stats_copy, bitset_stats_disjoint_p,
7484 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
7485 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
7486 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
7487 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
7488 bitset_stats_and_or_cmp, bitset_stats_andn_or,
7489 bitset_stats_andn_or_cmp, bitset_stats_or_and,
7490 bitset_stats_or_and_cmp): Likewise.
7491 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
7492 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
7493 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
7494 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
7495
7496 * lib/abitset.h: Include bitset.h, not bbitset.h.
7497 * lib/ebitset.h: Likewise.
7498 * lib/lbitset.h: Likewise.
7499
7500 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
7501 All instances of parameters of type enum bitset_opts are now of
7502 type enum_bitset_opts, to conform to the C Standard, and similarly
7503 for enum_bitset_type.
7504 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
7505 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
7506
7507 Do not use "struct bitset_struct" to mean different things in
7508 different modules. Not only is this confusing, it violates
7509 the C Standard, which requires that structure types in different
7510 modules must be compatible if one is to be passed to the other.
7511 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
7512 All instances of "struct bitset_struct *" replaced with "bitset".
7513 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
7514 (union bitset_union, struct abitset_struct, struct ebitset_struct,
7515 struct lbitset_struct, struct bitset_stats_struct): New types.
7516 All uses of struct bitset_struct changed to union bitset_union,
7517 etc.
ba0fe3c7 7518 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
7519 struct bitset_struct): Remove.
7520 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
7521 struct bitset_struct): Remove.
7522 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
7523 bitset_struct): Remove.
7524 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
7525 Likewise.
7526
7527 Do not call a function of type T using a call that assumes the
7528 function is of a different type U. Standard C requires that a
7529 function must be called with a type that is compatible with its
7530 definition.
7531 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
7532 New decls.
7533 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
7534 New functions.
7535 * lib/ebitset.c (PFV): Remove.
7536 * lib/lbitset.c (PFV): Likewise.
7537 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
7538 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
7539 decls.
7540 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
7541 (ebitset_vtable): Use them.
7542 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
7543 lbitset_xor): New functions.
7544 (lbitset_vtable): Use them.
7545
7546 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
7547 Declare.
7548
7549 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
7550 GCC warning.
7551 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
7552 Use offsetof, for simplicity.
7553
6fbe4984
PE
75542002-10-06 Paul Eggert <eggert@twinsun.com>
7555
7556 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
7557 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 7558 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
7559 which was inadvertently undone by the 2002-09-30 patch.
7560 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
7561 the same width as int.
7562
420f93c8
PE
75632002-10-04 Paul Eggert <eggert@twinsun.com>
7564
7565 Version 1.50.
7566
7567 * configure.ac (AC_INIT), NEWS: Increment version number.
7568
7569 * doc/bison.texinfo: Minor spelling, grammar, and white space
7570 fixes.
7571 (Symbols): Mention that any negative value returned from yylex
7572 signifies end-of-input. Warn about negative chars. Mention
7573 the portable Standard C character set.
7574
7575 The GNU coding standard says CFLAGS and YFLAGS are reserved
7576 for the installer to set.
7577 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
7578 * src/Makefile.am (AM_CFLAGS): Likewise.
7579 (AM_YFLAGS): Renamed from YFLAGS.
7580
7581 Fix some MAX and MIN problems.
7582 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
7583 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
7584 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
7585 * src/reader.c (reader): Use it.
7586
7587 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
7588 POSIX 1003.1-2001 has removed fgrep.
7589
75902002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
7591
7592 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
7593 interpreted as signed.
7594 * lib/ebitset.c (ebitset_list): Fix bug.
7595
ff68026d
PE
75962002-10-01 Paul Eggert <eggert@twinsun.com>
7597
7598 More fixes for 64-bit hosts and large bitsets.
7599
7600 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
7601 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
7602 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
7603 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
7604 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
7605 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
7606 bitset_count_): Likewise.
7607 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
7608 bitset_first, bitset_last): Likewise.
7609 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
7610 bitset_stats_list_reverse, bitset_stats_size,
7611 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
7612 Likewise.
7613 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
7614 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
7615 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
7616 bitsetv_reflexive_transitive_closure): Likewise.
7617 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
7618 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
7619 Likewise.
7620 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
7621 Likewise.
420f93c8 7622
ff68026d
PE
7623 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
7624 Use size_t, not unsigned int, to count bytes.
7625 * lib/abitset.h (abitset_bytes): Likewise.
7626 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
7627 Likewise.
7628 * lib/bitset.h (bitset_bytes): Likewise.
7629 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
7630 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
7631 * lib/bitsetv.c (bitsetv_alloc): Likewise.
7632 * lib/ebitset.c (ebitset_bytes): Likewise.
7633 * lib/ebitset.h (ebitset_bytes): Likewise.
7634 * lib/lbitset.c (lbitset_bytes): Likewise.
7635 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 7636
ff68026d
PE
7637 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
7638 abitset_subset_p, abitset_disjoint_p, abitset_and,
7639 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
7640 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
7641 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
7642 abitset_or_and, abitset_or_and_cmp):
7643 Use bitset_windex instead of unsigned int.
7644 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
7645 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
7646 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
7647 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
7648 Likewise.
7649 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 7650
ff68026d
PE
7651 * lib/bitset.c (bitset_print):
7652 Use proper printf formats for widths of integer types.
7653 * lib/bitset_stats.c (bitset_percent_histogram_print,
7654 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
7655 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
7656 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
7657 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 7658
ff68026d
PE
7659 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
7660 BITSET_SIZE_MAX): New macros.
7661 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
7662 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
7663 to BITSET_WINDEX_MAX.
7664
7665 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
7666 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
7667 since we now return the bitset_bindex type (not int).
7668
7669 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
7670 when computing sizes.
7671 * lib/ebitset.c (ebitset_elts_grow): Likewise.
7672
7673 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
7674 and avoid cast to unsigned.
7675
6aa452a6
AD
76762002-09-30 Akim Demaille <akim@epita.fr>
7677
7678 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
7679 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
7680 Updates from Michael Hayes.
7681
927f7817
AD
76822002-09-30 Art Haas <ahaas@neosoft.com>
7683
7684 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
7685 invocations.
7686 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
7687 defined.
7688
9738f41e
AD
76892002-09-27 Akim Demaille <akim@epita.fr>
7690
7691 Version 1.49c.
7692
a5c75d7f
AD
76932002-09-27 Akim Demaille <akim@epita.fr>
7694
7695 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
7696 (Because of AC_LIBSOURCE).
7697
8280e179
AD
76982002-09-27 Akim Demaille <akim@epita.fr>
7699
7700 Playing with Autoscan.
7701
7702 * configure.ac: Remove the old LIBOBJ tweaks.
7703 (AC_REPLACE_FUNCS): Add strrchr and strtol.
7704 * lib/strrchr.c: New.
7705 * lib/strtol.c: New, from the Coreutils 4.5.1.
7706
ae64af35
AD
77072002-09-27 Akim Demaille <akim@epita.fr>
7708
7709 Playing with Autoscan.
7710
7711 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
7712 * lib/Makefile.am (libbison_a_SOURCES): No longer include
7713 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
7714 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
7715 Coreutils 4.5.1.
7716
d1a1114f
AD
77172002-09-24 Akim Demaille <akim@epita.fr>
7718
7719 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
7720 (Frequently Asked Questions, Parser Stack Overflow): New.
7721
b906441c
AD
77222002-09-13 Akim Demaille <akim@epita.fr>
7723
7724 Playing with autoscan.
7725
7726 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
7727 * src/files.c (skeleton_find): Remove, unused.
7728 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
7729 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
7730
bd701811
AD
77312002-09-13 Akim Demaille <akim@epita.fr>
7732
7733 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
7734 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
7735
e0a13e7b
AD
77362002-09-13 Akim Demaille <akim@epita.fr>
7737
7738 * configure.ac: Require 2.54.
7739 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
7740 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
7741 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
7742 Remove, provided by Autoconf macros.
7743
c97011bf
AD
77442002-09-12 Akim Demaille <akim@epita.fr>
7745
7746 * m4/prereq.m4: Update, from Coreutils 4.5.1.
7747
d862b1be
AD
77482002-09-12 Akim Demaille <akim@epita.fr>
7749
7750 * m4/prereq.m4: Update, from Fileutils 4.1.5.
7751 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
7752 Reported by Martin Mokrejs.
7753
3d38c03a
AD
77542002-09-10 Akim Demaille <akim@epita.fr>
7755
7756 * src/parse-gram.y: Associate a human readable string to each
7757 token type.
7758 * tests/regression.at (Invalid inputs): Adjust.
7759
b6347355
AD
77602002-09-10 Gary V. Vaughan <gary@gnu.org>
7761
7762 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
7763 with an Autoconf-2.5x style configure.ac.
7764
09ba4ab2
PE
77652002-09-06 Paul Eggert <eggert@twinsun.com>
7766
7767 * doc/bison.texinfo (Conditions): Make explicit that the GPL
7768 exception applies only to yacc.c. This is a modification of a
7769 patch originally suggested by Akim Demaille.
7770
21846f69
AD
77712002-09-06 Akim Demaille <akim@epita.fr>
7772
09ba4ab2
PE
7773 * data/c.m4 (b4_copyright): Move the GPL exception comment from
7774 here to...
7775 * data/yacc.c: here.
7776
21846f69
AD
7777 * data/lalr1.cc (struct yyltype): Don't define it, since we use
7778 LocationType.
7779 (b4_ltype): Default to yy::Location from location.hh.
7780
c0ad8bf3
AD
77812002-09-04 Jim Meyering <jim@meyering.net>
7782
7783 * data/yacc.c: Guard the declaration of yytoknum also with
7784 `#ifdef YYPRINT', so it is declared only when used.
7785
3a93251e
AD
77862002-09-04 Akim Demaille <akim@epita.fr>
7787
7788 * configure.in: Rename as...
7789 * configure.ac: this.
7790 Bump to 1.49c.
7791
427c0dda
AD
77922002-09-04 Akim Demaille <akim@epita.fr>
7793
7794 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
7795 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
7796 translate maintainer only messages.
7797
6a254321
PE
77982002-08-12 Paul Eggert <eggert@twinsun.com>
7799
645e30d1
PE
7800 Version 1.49b.
7801
6a254321
PE
7802 * Makefile.am (SUBDIRS): Remove intl.
7803 (DISTCLEANFILES): Remove.
7804 * NEWS: Mention that GNU M4 is now required. Clarify what is
7805 meant by "larger grammars". Mention the pt_BR translation.
7806 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
7807 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
7808 Bump version from 0.11.2 to 0.11.5.
7809 (BISON_PREREQ_STAGE): Remove.
7810 (AM_GNU_GETTEXT): Use external gettext.
7811 (AC_OUTPUT): Remove intl/Makefile.
7812
7813 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
7814
7815 * data/glr.c: Include string.h, for strlen.
7816 (yyreportParseError): Use size_t for yysize.
7817 (yy_yypstack): No longer nested inside yypstates, as nested
7818 functions are not portable. Do not assume size_t is the
7819 same width as int.
7820 (yypstates): Do not assume that ptrdiff_t is the same width
7821 as int, and similarly for yyposn and YYINDEX.
7822
7823 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
7824
7825 * lib/Makefile.am (INCLUDES): Do not include from the intl
7826 directory, which has been removed.
7827 * src/Makefile.am (INCLUDES): Likewise.
7828
7829 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
7830 (bitsets_sources, additional_bitsets_sources, timevars_sources):
7831 New vars.
7832
7833 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
7834 * tests/Makefile.am (EXTRA_DIST): Likewise.
7835
7836 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
7837 Do not assume that bitset_windex is the same width as unsigned.
7838
7839 * lib/abitset.c (abitset_unused_clear): Do not assume that
7840 bitset_word is the same width as int.
7841 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
7842 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
7843 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
7844 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
7845 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
7846
7847 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
7848 portability to one's complement hosts!).
7849 * lib/ebitset.c (ebitset_op1): Likewise.
7850 * lib/lbitset.c (lbitset_op1): Likewise.
7851
7852 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
7853 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
7854 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
7855 Sync with fileutils.
7856 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
7857 lib/gettext.h: Sync with diffutils.
7858
7859 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
7860 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
7861
7862 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
7863 PROTOTYPES to check for prototypes, and "defined __STDC__" to
7864 check for void *.
7865
7866 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
7867 size_t; the old version tried to do this but casted improperly.
7868 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
7869 (bitset_test): Now returns int, not unsigned long.
7870
7871 * lib/bitset_stats.c: Include "gettext.h".
7872 (_): New macro.
7873 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
7874 name locals "index", as it generates unnecessary warnings on some
7875 hosts that have an "index" function.
7876
7877 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
7878 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
7879 they need translation.
7880 * src/LR0.c (state_list_append, new_itemsets, get_state,
7881 append_states, generate_states): Likewise.
7882 * src/assoc.c (assoc_to_string): Likewise.
7883 * src/closure.c (print_closure, set_firsts, closure): Likewise.
7884 * src/gram.c (grammar_dump): Likewise.
7885 * src/injections.c (injections_compute): Likewise.
7886 * src/lalr.c (lookaheads_print): Likewise.
7887 * src/relation.c (relation_transpose): Likewise.
7888 * src/scan-gram.l: Likewise.
7889 * src/tables.c (table_grow, pack_vector): Likewise.
7890
7891 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
7892 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
7893 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
7894 * m4/mbstate_t.m4: Sync with fileutils.
7895 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
7896
7897 * po/LINGUAS: Add pt_BR.
7898 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
7899 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
7900 lib/timevar.c.
7901 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
7902 manual recommends.
7903 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
7904
7905 * src/complain.c (strerror_r): Remove decl; not needed.
7906 (strerror): Use same pattern as ../lib/error.c.
7907
7908 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
7909
7910 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
7911
7912 * src/main.c (main): Cast result of bindtextdomain and textdomain
7913 to void, to avoid a GCC warning when --disable-nls is in effect.
7914
7915 * src/scan-gram.l: Use strings rather than escapes when possible,
7916 to minimize the number of warnings from xgettext.
7917 (handle_action_dollar, handle_action_at): Don't use isdigit,
7918 as it mishandles negative chars and it may not work as expected
7919 outside the C locale.
7920
7921 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
7922 this is a GCC extension and is not portable to other compilers.
7923
7924 * src/system.h (alloca): Use same pattern as ../lib/error.c.
7925 Do not include <ctype.h>; no longer needed.
7926 Do not include <malloc.h>; no longer needed (and generates
7927 warnings on OpenBSD 3.0).
7928
7929 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
7930 it's not portable.
7931
7932 * tests/regression.at: Do not use 'cc -c input.c -o input';
7933 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
7934
7935 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
7936 exit status as failure, not just exit status 1. Sun C exits
7937 with status 2 sometimes.
7938
7939 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
7940 Use it for the two large tests.
7941
c8f002c7
AD
79422002-08-02 Akim Demaille <akim@epita.fr>
7943
7944 * src/conflicts.c (conflicts_output): Don't output rules never
7945 reduced here, since anyway that computation doesn't work.
7946 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
7947 (rule_useless_p, rule_never_reduced_p): New.
7948 (grammar_rules_partial_print): Use a filter instead of a range.
7949 Display the title only if needed.
7950 (grammar_rules_print): Adjust.
7951 (grammar_rules_never_reduced_report): New.
7952 * src/tables.c (action_row): Move the computation of rules never
7953 reduced to...
7954 (token_actions): here.
7955 * src/main.c (main): Make the parser before making the report, so
7956 that rules never reduced are computed.
7957 Call grammar_rules_never_reduced_report.
7958 * src/print.c (print_results): Report rules never reduced.
7959 * tests/conflicts.at, tests/reduce.at: Adjust.
7960
cd08e51e
AD
79612002-08-01 Akim Demaille <akim@epita.fr>
7962
7963 Instead of attaching lookaheads and duplicating the rules being
7964 reduced by a state, attach the lookaheads to the reductions.
7965
7966 * src/state.h (state_t): Remove the `lookaheads',
7967 `lookaheads_rule' member.
7968 (reductions_t): Add a `lookaheads' member.
7969 Use a regular array for the `rules'.
7970 * src/state.c (reductions_new): Initialize the lookaheads member
7971 to 0.
7972 (state_rule_lookaheads_print): Adjust.
7973 * src/state.h, src/state.c (state_reductions_find): New.
7974 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
7975 (count_rr_conflicts): Adjust.
7976 * src/lalr.c (LArule): Remove.
7977 (add_lookback_edge): Adjust.
7978 (state_lookaheads_count): New.
7979 (states_lookaheads_initialize): Merge into...
7980 (initialize_LA): this.
7981 (lalr_free): Adjust.
7982 * src/main.c (main): Don't free nullable and derives too early: it
7983 is used by --verbose.
7984 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
7985
bb0027a9
AD
79862002-08-01 Akim Demaille <akim@epita.fr>
7987
7988 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
7989 `rule_number_t**'.
7990 (set_derives, free_derives): Rename as...
7991 (derives_compute, derives_free): this.
7992 Adjust all dependencies.
7993 * src/nullable.c (set_nullable, free_nullable): Rename as...
7994 (nullable_compute, nullable_free): these.
7995 (rule_list_t): Store rule_t *, not rule_number_t.
7996 * src/state.c (state_rule_lookaheads_print): Directly compare rule
7997 pointers, instead of their numbers.
7998 * src/main.c (main): Call nullable_free, and derives_free earlier,
7999 as they were lo longer used.
8000
3325ddc4
AD
80012002-08-01 Akim Demaille <akim@epita.fr>
8002
8003 * lib/timevar.c (get_time): Include children time.
8004 * src/lalr.h (LA, LArule): Don't export them: used with the
8005 state_t.
8006 * src/lalr.c (LA, LArule): Static.
8007 * src/lalr.h, src/lalr.c (lalr_free): New.
8008 * src/main.c (main): Call it.
8009 * src/tables.c (pack_vector): Check whether loc is >= to the
8010 table_size, not >.
8011 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
8012 (tables_generate): do it, since that's also it which allocates
8013 them.
8014 Don't free LA and LArule, main does.
8015
c6f1a33c
AD
80162002-07-31 Akim Demaille <akim@epita.fr>
8017
8018 Separate parser tables computation and output.
8019
8020 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
8021 (conflict_list, conflict_list_cnt, table, check, table_ninf)
8022 (yydefgoto, yydefact, high): Move to...
8023 * src/tables.h, src/tables.c: here.
8024 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
8025 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
8026 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
8027 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
8028 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
8029 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
8030 (action_row, save_row, token_actions, save_column, default_goto)
8031 (goto_actions, sort_actions, matching_state, pack_vector)
8032 (table_ninf_remap, pack_table, prepare_actions): Move to...
8033 * src/tables.c: here.
8034 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
8035 * src/output.c (token_actions, output_base, output_conflicts)
8036 (output_check): Merge into...
8037 (prepare_actions): this.
8038 (actions_output): Rename as...
8039 (user_actions_output): this.
8040 * src/main.c (main): Call tables_generate and tables_free.
8041
1509d42f
AD
80422002-07-31 Akim Demaille <akim@epita.fr>
8043
8044 Steal GCC's --time-report support.
8045
8046 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
8047 stolen/adjusted from GCC.
8048 * m4/stage.m4: Remove time related checks.
8049 * m4/timevar.m4: New.
8050 * configure.in: Adjust.
8051 * src/system.h: Adjust to using timevar.h.
8052 * src/getargs.h, src/getargs.c: Support trace_time for
8053 --trace=time.
8054 * src/main.c (stage): Remove.
8055 (main): Replace `stage' invocations with timevar calls.
8056 * src/output.c: Insert pertinent timevar calls.
8057
273a74fa
AD
80582002-07-31 Akim Demaille <akim@epita.fr>
8059
8060 Let --trace have arguments.
8061
8062 * src/getargs.h (enum trace_e): New.
8063 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
8064 (long_options, short_options): --trace/-T takes an optional
8065 argument.
8066 Change all the uses of trace_flag to reflect the new flags.
8067 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
8068
8069 Strengthen `stage' portability.
8070
8071 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
8072 * configure.in: Use it.
8073 Don't check for malloc.h and sys/times.h.
8074 * src/system.h: Include them when appropriate.
8075 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
8076 times and struct tms are available.
8077
217598da
AD
80782002-07-30 Akim Demaille <akim@epita.fr>
8079
8080 In verbose parse error message, don't report `error' as an
8081 expected token.
8082 * tests/actions.at (Printers and Destructors): Adjust.
8083 * tests/calc.at (Calculator $1): Adjust.
8084 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
8085 error message, do not report the parser accepts the error token in
8086 that state.
8087
52489d44
AD
80882002-07-30 Akim Demaille <akim@epita.fr>
8089
8090 Normalize conflict related messages.
8091
8092 * src/complain.h, src/complain.c (warn, complain): New.
8093 * src/conflicts.c (conflicts_print): Use them.
8094 (conflict_report_yacc): New, extracted from...
8095 (conflicts_print): here.
8096 * tests/conflicts.at, tests/existing.at: Adjust.
8097
e8832397
AD
80982002-07-30 Akim Demaille <akim@epita.fr>
8099
8100 Report rules which are never reduced by the parser: those hidden
8101 by conflicts.
8102
8103 * src/LR0.c (save_reductions): Don't make the final state too
8104 different: save its reduction (accept) instead of having a state
8105 without any action (no shift or goto, no reduce).
8106 Note: the final state is now a ``regular'' state, i.e., the
8107 parsers now contain `reduce 0' as default reduction.
8108 Nevertheless, since they decide to `accept' when yystate =
8109 final_state, they still will not reduce rule 0.
8110 * src/print.c (print_actions, print_reduction): Adjust.
8111 * src/output.c (action_row): Track reduced rules.
8112 (token_actions): Report rules never reduced.
8113 * tests/conflicts.at, tests/regression.at: Adjust.
8114
caf23d24
AD
81152002-07-30 Akim Demaille <akim@epita.fr>
8116
8117 `stage' was accidently included in a previous patch.
8118 Initiate its autoconfiscation.
8119
8120 * configure.in: Look for malloc.h and sys/times.h.
8121 * src/main.c (stage): Adjust.
8122 Report only when trace_flag.
8123
640748ee
AD
81242002-07-29 Akim Demaille <akim@epita.fr>
8125
8126 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
8127 state_number_t.
8128 (errs_t): symbol_t*, not symbol_number_t.
8129 (reductions_t): rule_t*, not rule_number_t.
8130 (FOR_EACH_SHIFT): New.
8131 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
8132 * src/print.c, src/print_graph.c: Adjust.
8133
88bce5a2
AD
81342002-07-29 Akim Demaille <akim@epita.fr>
8135
8136 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
8137
8138 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
8139 (endtoken, accept): these.
8140 * src/reader.c (reader): Set endtoken's default tag to "$end".
8141 Set undeftoken's tag to "$undefined" instead of "$undefined.".
8142 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
8143 Adjust.
8144
1bfb97db
AD
81452002-07-29 Akim Demaille <akim@epita.fr>
8146
8147 * src/reduce.c (reduce_grammar): When the language is empty,
8148 complain about the start symbol, not the axiom.
8149 Use its location.
8150 * tests/reduce.at (Empty Language): New.
8151
fc5734fe
AD
81522002-07-26 Akim Demaille <akim@epita.fr>
8153
8154 * src/reader.h, src/reader.c (gram_error): ... can't get
8155 yycontrol without making too strong assumptions on the parser
8156 itself.
8157 * src/output.c (prepare_tokens): Use the real 0th value of
8158 token_translations instead of `0'.
8159 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
8160 visible here.
8161 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
8162 for the time being: %locations ought to provide it to yyerror.
8163
3650b4b8
AD
81642002-07-25 Akim Demaille <akim@epita.fr>
8165
8166 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
8167 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
8168 * tests/regression.at (Web2c Actions): Adjust.
8169
4b3d3a8e
AD
81702002-07-25 Akim Demaille <akim@epita.fr>
8171
8172 Stop storing rules from 1 to nrules + 1.
8173
8174 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
8175 * src/nullable.c, src/output.c, src/print.c, src/reader.c
8176 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
8177 Iterate from 0 to nrules.
8178 Use rule_number_as_item_number and item_number_as_rule_number.
8179 Adjust to `derive' now containing possibly 0.
8180 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
8181 Handle the `- 1' part in rule numbers from/to item numbers.
8182 * src/conflicts.c (log_resolution): Fix the message which reversed
8183 shift and reduce.
8184 * src/output.c (action_row): Initialize default_rule to -1.
8185 (token_actions): Adjust.
8186 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
8187 expected output.
8188 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
8189
4a2a22f4
AD
81902002-07-25 Akim Demaille <akim@epita.fr>
8191
8192 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
8193 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
8194 (b4_c_knr_arg_decl): New.
8195 * data/yacc.c: Use it to define yysymprint, yydestruct, and
8196 yyreport_parse_error.
8197
b8df3223
AD
81982002-07-25 Akim Demaille <akim@epita.fr>
8199
8200 * data/yacc.c (yyreport_parse_error): New, extracted from...
8201 (yyparse): here.
8202 (yydestruct, yysymprint): Move above yyparse.
8203 Be K&R compliant.
8204
a762e609
AD
82052002-07-25 Akim Demaille <akim@epita.fr>
8206
8207 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
8208 replace...
8209 (b4_sint_type, b4_uint_type): these.
8210 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
8211 * tests/regression.at (Web2c Actions): Adjust.
8212
12b0043a
AD
82132002-07-25 Akim Demaille <akim@epita.fr>
8214
8215 * src/gram.h (TIEM_NUMBER_MAX): New.
8216 (item_number_of_rule_number, rule_number_of_item_number): Rename
8217 as...
8218 (rule_number_as_item_number, item_number_as_rule_number): these.
8219 Adjust dependencies.
8220 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
8221 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
8222 (symbol_number_to_vector_number): New.
8223 (order): Of vector_number_t* type.
8224 (base_t, BASE_MAX, BASE_MIN): New.
8225 (froms, tos, width, pos, check): Of base_t type.
8226 (action_number_t, ACTION_MIN, ACTION_MAX): New.
8227 (actrow): Of action_number_t type.
8228 (conflrow): Of unsigned int type.
8229 (table_ninf, base_ninf): New.
8230 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
8231 (muscle_insert_int_table, muscle_insert_base_table)
8232 (muscle_insert_rule_number_table): New.
8233 (prepare_tokens): Output `toknum' as int_table.
8234 (action_row): Returns a rule_number_t.
8235 Use ACTION_MIN, not SHRT_MIN.
8236 (token_actions): yydefact is rule_number_t*.
8237 (table_ninf_remap): New.
8238 (pack_table): Use it for `base' and `table'.
8239 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
8240 replaced with...
8241 (YYPACT_NINF, YYTABLE_NINF): these.
8242 (yypact, yytable): Compute their types instead of hard-coded
8243 `short'.
8244 * tests/regression.at (Web2c Actions): Adjust.
8245
5dde258a
AD
82462002-07-19 Akim Demaille <akim@epita.fr>
8247
8248 * src/scan-gram.l (id): Can start with an underscore.
8249
a945ec39
AD
82502002-07-16 Akim Demaille <akim@epita.fr>
8251
8252 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
8253 Adjust all former `associativity' dependencies.
8254 * src/symtab.c (symbol_new): Default associativity is `undef', not
8255 `right'.
8256 (symbol_check_alias_consistence): Adjust.
8257
fae437e8
AD
82582002-07-09 Akim Demaille <akim@epita.fr>
8259
8260 * doc/bison.texinfo: Properly set the ``header'' part.
8261 Use @dircategory ``GNU programming tools'' as per Texinfo's
8262 documentation.
8263 Use @copying.
8264
1a715ef2
AD
82652002-07-09 Akim Demaille <akim@epita.fr>
8266
8267 * lib/quotearg.h: Protect against multiple inclusions.
8268 * src/location.h (location_t): Add a `file' member.
8269 (LOCATION_RESET, LOCATION_PRINT): Adjust.
8270 * src/complain.c (warn_at, complain_at, fatal_at): Drop
8271 `error_one_per_line' support.
8272
a5d50994
AD
82732002-07-09 Akim Demaille <akim@epita.fr>
8274
8275 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
8276 * src/reader.c (lineno): Remove.
8277 Adjust all dependencies.
8278 (get_merge_function): Take a location and use complain_at.
8279 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
8280 * tests/regression.at (Invalid inputs, Mixing %token styles):
8281 Adjust.
8282
b275314e
AD
82832002-07-09 Akim Demaille <akim@epita.fr>
8284
8285 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
8286 recovery rule, and forbid extensions when --yacc.
8287 (gram_error): Use complain_at.
8288 * src/reader.c (reader): Exit if there were parse errors.
8289
865b9df1
AD
82902002-07-09 Akim Demaille <akim@epita.fr>
8291
8292 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
8293 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
8294 Reported by R Blake <blakers@mac.com>.
8295
c76e14da
AD
82962002-07-09 Akim Demaille <akim@epita.fr>
8297
8298 * data/yacc.c: Output the copyright notive in the header.
8299
7db2ed2d
AD
83002002-07-03 Akim Demaille <akim@epita.fr>
8301
8302 * src/output.c (froms, tos): Are state_number_t.
8303 (save_column): sp, sp1, and sp2 are state_number_t.
8304 (prepare): Rename `final' as `final_state_number', `nnts' as
8305 `nterms_number', `nrules' as `rules_number', `nstates' as
8306 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
8307 unused.
8308 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
8309 * data/lalr1.cc (nsym_): Remove, unused.
8310
e68e0410
AD
83112002-07-03 Akim Demaille <akim@epita.fr>
8312
8313 * src/lalr.h, src/lalr.c (goto_number_t): New.
8314 * src/lalr.c (goto_list_t): New.
8315 Propagate them.
8316 * src/nullable.c (rule_list_t): New.
8317 Propagate.
8318 * src/types.h: Remove.
8319
e1a4f3a4
AD
83202002-07-03 Akim Demaille <akim@epita.fr>
8321
8322 * src/closure.c (print_fderives): Use rule_rhs_print.
8323 * src/derives.c (print_derives): Use rule_rhs_print.
8324 (rule_list_t): New, replaces `shorts'.
8325 (set_derives): Add comments.
8326 * tests/sets.at (Nullable, Firsts): Adjust.
8327
536545f3
AD
83282002-07-03 Akim Demaille <akim@epita.fr>
8329
8330 * src/output.c (prepare_actions): Free `tally' and `width'.
8331 (prepare_actions): Allocate and free `order'.
8332 * src/symtab.c (symbols_free): Free `symbols'.
8333 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
8334 * src/output.c (m4_invoke): Move to...
8335 * src/scan-skel.l: here.
8336 (<<EOF>>): Close yyout, and free its name.
8337
8b752b00
AD
83382002-07-03 Akim Demaille <akim@epita.fr>
8339
8340 Fix some memory leaks, and fix a bug: state 0 was examined twice.
8341
8342 * src/LR0.c (new_state): Merge into...
8343 (state_list_append): this.
8344 (new_states): Merge into...
8345 (generate_states): here.
8346 (set_states): Don't ensure a proper `errs' state member here, do it...
8347 * src/conflicts.c (conflicts_solve): here.
8348 * src/state.h, src/state.c: Comment changes.
8349 (state_t): Rename member `shifts' as `transitions'.
8350 Adjust all dependencies.
8351 (errs_new): For consistency, also take the values as argument.
8352 (errs_dup): Remove.
8353 (state_errs_set): New.
8354 (state_reductions_set, state_transitions_set): Assert that no
8355 previous value was assigned.
8356 (state_free): New.
8357 (states_free): Use it.
8358 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
8359 temporary storage: use `errs' and `nerrs' as elsewhere.
8360 (set_conflicts): Allocate and free this `errs'.
8361
613f5e1a
AD
83622002-07-02 Akim Demaille <akim@epita.fr>
8363
8364 * lib/libiberty.h: New.
8365 * lib: Update the bitset implementation from upstream.
8366 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
8367 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
8368 * src/main.c: Adjust bitset stats calls.
8369
26e0cadc
PE
83702002-07-01 Paul Eggert <eggert@twinsun.com>
8371
8372 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
8373 char, so that negative chars don't collide with $.
8374
1154cced
AD
83752002-06-30 Akim Demaille <akim@epita.fr>
8376
8377 Have the GLR tests be `warning' checked, and fix the warnings.
8378
8379 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
8380 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
8381 (yyremoveDeletes): `yyi' and `yyj' are size_t.
8382 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
8383 (yyaddDeferredAction): static.
8384 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
8385 (yyreportParseError): yyprefix is const.
8386 yytokenp is used only when verbose.
8387 (yy__GNUC__): Replace with __GNUC__.
8388 (yypdumpstack): yyi is size_t.
8389 (yypreference): Un-yy local variables and arguments, to avoid
8390 clashes with `yyr1'. Anyway, we are not in the user name space.
8391 (yytname_size): be an int, as is compared with ints.
8392 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
8393 Use them.
8394 * tests/cxx-gram.at: Use quotation to protect $1.
8395 Use AT_COMPILE to enable warnings hunts.
8396 Prototype yylex and yyerror.
8397 `Use' argc.
8398 Include `string.h', not `strings.h'.
8399 Produce and prototype stmtMerge only when used.
8400 yylex takes a location.
8401
97650f4e
AD
84022002-06-30 Akim Demaille <akim@epita.fr>
8403
8404 We spend a lot of time in quotearg, in particular when --verbose.
8405
8406 * src/symtab.c (symbol_get): Store a quoted version of the key.
8407 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
8408 Adjust all callers.
8409
d2576365
AD
84102002-06-30 Akim Demaille <akim@epita.fr>
8411
8412 * src/state.h (reductions_t): Rename member `nreds' as num.
8413 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
8414 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
8415
ccaf65bc
AD
84162002-06-30 Akim Demaille <akim@epita.fr>
8417
8418 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
8419 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
8420 (shifts_to): Rename as...
8421 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
8422 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
8423 (TRANSITION_IS_DISABLED, transitions_to): these.
8424
87675353
AD
84252002-06-30 Akim Demaille <akim@epita.fr>
8426
8427 * src/print.c (print_shifts, print_gotos): Merge into...
8428 (print_transitions): this.
8429 (print_transitions, print_errs, print_reductions): Align the
8430 lookaheads columns.
8431 (print_core, print_transitions, print_errs, print_state,
8432 print_grammar): Output empty lines separator before, not after.
8433 (state_default_rule_compute): Rename as...
8434 (state_default_rule): this.
8435 * tests/conflicts.at (Defaulted Conflicted Reduction),
8436 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
8437 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
8438
ce4ccb4b
AD
84392002-06-30 Akim Demaille <akim@epita.fr>
8440
8441 Display items as we display rules.
8442
8443 * src/gram.h, src/gram.c (rule_lhs_print): New.
8444 * src/gram.c (grammar_rules_partial_print): Use it.
8445 * src/print.c (print_core): Likewise.
8446 * tests/conflicts.at (Defaulted Conflicted Reduction),
8447 (Unresolved SR Conflicts): Adjust.
8448 (Unresolved SR Conflicts): Adjust and rename as...
8449 (Resolved SR Conflicts): this, as was meant.
8450 * tests/regression.at (Web2c Report): Adjust.
8451
bc933ef1
AD
84522002-06-30 Akim Demaille <akim@epita.fr>
8453
8454 * src/print.c (state_default_rule_compute): New, extracted from...
8455 (print_reductions): here.
8456 Pessimize, but clarify the code.
8457 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
8458
53d4308d
AD
84592002-06-30 Akim Demaille <akim@epita.fr>
8460
8461 * src/output.c (action_row): Let default_rule be always a rule
8462 number.
8463
574fb2d5
AD
84642002-06-30 Akim Demaille <akim@epita.fr>
8465
8466 * src/closure.c (print_firsts, print_fderives, closure):
8467 Use BITSET_EXECUTE.
8468 * src/lalr.c (lookaheads_print): Likewise.
8469 * src/state.c (state_rule_lookaheads_print): Likewise.
8470 * src/print_graph.c (print_core): Likewise.
8471 * src/print.c (print_reductions): Likewise.
8472 * src/output.c (action_row): Likewise.
8473 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
8474
05811fd7
AD
84752002-06-30 Akim Demaille <akim@epita.fr>
8476
8477 * src/print_graph.c: Use report_flag.
8478
0e4d5753
AD
84792002-06-30 Akim Demaille <akim@epita.fr>
8480
8481 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
8482 to...
8483 * src/relation.h, src/relation.c (traverse, relation_digraph)
8484 (relation_print, relation_transpose): New.
8485
24c7d800
AD
84862002-06-30 Akim Demaille <akim@epita.fr>
8487
8488 * src/state.h, src/state.c (shifts_to): New.
8489 * src/lalr.c (build_relations): Use it.
8490
9222837b
AD
84912002-06-30 Akim Demaille <akim@epita.fr>
8492
8493 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
8494 (item_number_of_rule_number, rule_number_of_item_number): New.
8495 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
8496 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8497 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
8498 Propagate their use.
8499 Much remains to be done, in particular wrt `shorts' from types.h.
8500
260008e5
AD
85012002-06-30 Akim Demaille <akim@epita.fr>
8502
8503 * src/symtab.c (symbol_new): Initialize the `printer' member.
8504
8a731ca8
AD
85052002-06-30 Akim Demaille <akim@epita.fr>
8506
8507 * src/LR0.c (save_reductions): Remove, replaced by...
8508 * src/state.h, src/state.c (state_reductions_set): New.
8509 (reductions, errs): Rename as...
8510 (reductions_t, errs_t): these.
8511 Adjust all dependencies.
8512
32e1e0a4
AD
85132002-06-30 Akim Demaille <akim@epita.fr>
8514
8515 * src/LR0.c (state_list_t, state_list_append): New.
8516 (first_state, last_state): Now symbol_list_t.
8517 (this_state): Remove.
8518 (new_itemsets, append_states, save_reductions): Take a state_t as
8519 argument.
8520 (set_states, generate_states): Adjust.
8521 (save_shifts): Remove, replaced by...
8522 * src/state.h, src/state.c (state_shifts_set): New.
8523 (shifts): Rename as...
8524 (shifts_t): this.
8525 Adjust all dependencies.
8526 * src/state.h (state_t): Remove the `next' member.
8527
e5fb6710
AD
85282002-06-30 Akim Demaille <akim@epita.fr>
8529
8530 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
8531 escaped in slot 0.
8532
c7ca99d4
AD
85332002-06-30 Akim Demaille <akim@epita.fr>
8534
8535 Use hash.h for the state hash table.
8536
8537 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
8538 (allocate_storage): Use state_hash_new.
8539 (free_storage): Use state_hash_free.
8540 (new_state, get_state): Adjust.
8541 * src/lalr.h, src/lalr.c (states): Move to...
8542 * src/states.h (state_t): Remove the `link' member, no longer
8543 used.
8544 * src/states.h, src/states.c: here.
8545 (state_hash_new, state_hash_free, state_hash_lookup)
8546 (state_hash_insert, states_free): New.
8547 * src/states.c (state_table, state_compare, state_hash): New.
8548 * src/output.c (output_actions): Do not free states now, since we
8549 still need to know the final_state number in `prepare', called
8550 afterwards. Do it...
8551 * src/main.c (main): here: call states_free after `output'.
8552
df0e7316
AD
85532002-06-30 Akim Demaille <akim@epita.fr>
8554
8555 * src/state.h, src/state.c (state_new): New, extracted from...
8556 * src/LR0.c (new_state): here.
8557 * src/state.h (STATE_ALLOC): Move to...
8558 * src/state.c: here.
8559 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
8560 * src/state.h, src/state.c: here.
8561
39f41916
AD
85622002-06-30 Akim Demaille <akim@epita.fr>
8563
8564 * src/reader.c (gensym): Rename as...
8565 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
8566 (getsym): Rename as...
8567 (symbol_get): this.
8568
d57650a5
AD
85692002-06-30 Akim Demaille <akim@epita.fr>
8570
8571 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
8572 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
8573 * src/output.c, src/print.c, src/print_graph.c: Propagate.
8574 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
8575
5a08f1ce
AD
85762002-06-30 Akim Demaille <akim@epita.fr>
8577
8578 Make the test suite pass with warnings checked.
8579
8580 * tests/actions.at (Printers and Destructors): Improve.
8581 Avoid unsigned vs. signed issues.
8582 * tests/calc.at: Don't exercise the scanner here, do it...
8583 * tests/input.at (Torturing the Scanner): here.
8584
720623af
PH
85852002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8586
88e7e941 8587 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
8588 reorganize first lines parallel to yacc.c.
8589
fb8135fa
AD
85902002-06-28 Akim Demaille <akim@epita.fr>
8591
8592 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
8593 (b4_token_enum, b4_token_defines): New, factored from...
8594 * data/lalr1.cc, data/yacc.c, glr.c: here.
8595
41442480
AD
85962002-06-28 Akim Demaille <akim@epita.fr>
8597
8598 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
8599 unused variables.
8600 * src/output.c (merger_output): static.
8601
e0e5bf84
AD
86022002-06-28 Akim Demaille <akim@epita.fr>
8603
ba0fe3c7 8604 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
8605 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
8606 pacify GCC.
8607 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 8608
676385e2
PH
86092002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8610
8611 Accumulated changelog for new GLR parsing features.
8612
6a254321 8613 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
8614 conflicts_total_count.
8615 * src/conflicts.h: Ditto.
8616 * src/output.c (token_actions): Use the new name.
8617 (output_conflicts): Change conflp => conflict_list_heads, and
8618 confl => conflict_list for better readability.
8619 * data/glr.c: Use the new names.
8620 * NEWS: Add self to GLR announcement.
e0e5bf84 8621
676385e2
PH
8622 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
8623
8624 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
8625 Akim Demaille.
8626
8627 * data/bison.glr: Change name to glr.c
8628 * data/glr.c: Renamed from bison.glr.
8629 * data/Makefile.am: Add glr.c
e0e5bf84
AD
8630
8631 * src/getargs.c:
8632
676385e2 8633 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 8634 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 8635
676385e2
PH
8636 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8637
8638 * data/bison.glr: Be sure to restore the
8639 current #line when returning to the skeleton contents after having
8640 exposed the input file's #line.
8641
8642 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8643
8644 * data/bison.glr: Bring up to date with changes to bison.simple.
8645
8646 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8647
8648 * data/bison.glr: Correct definitions that use b4_prefix.
8649 Various reformatting.
8650 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
8651 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
8652 yytokenp argument; now part of stack.
8653 (yychar): Define to behave as documented.
8654 (yyclearin): Ditto.
e0e5bf84 8655
676385e2
PH
8656 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8657
8658 * src/reader.h: Add declaration for free_merger_functions.
8659
8660 * src/reader.c (merge_functions): New variable.
8661 (get_merge_function): New function.
8662 (free_merger_functions): New function.
8663 (readgram): Check for %prec that is not followed by a symbol.
8664 Handle %dprec and %merge declarations.
8665 (packgram): Initialize dprec and merger fields in rules array.
8666
8667 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
8668 conflict_list_cnt, conflict_list_free): New variables.
8669 (table_grow): Also grow conflict_table.
e0e5bf84 8670 (prepare_rules): Output dprec and merger tables.
676385e2 8671 (conflict_row): New function.
e0e5bf84 8672 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
8673 default reduction in conflicted states for GLR parser so that there
8674 are spaces for the conflict lists.
8675 (save_row): Also save conflict information.
8676 (token_actions): Allocate conflict list.
8677 (merger_output): New function.
8678 (pack_vector): Pack conflict table, too.
8679 (output_conflicts): New function to output yyconflp and yyconfl.
8680 (output_check): Allocate conflict_tos.
8681 (output_actions): Output conflict tables, also.
8682 (output_skeleton): Output b4_mergers definition.
8683 (prepare): Output b4_max_rhs_length definition.
8684 Use 'bison.glr' as default skeleton for GLR parsers.
8685
8686 * src/gram.c (glr_parser): New flag.
8687 (grammar_free): Call free_merger_functions.
8688
8689 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
8690 all pairs of conflicting reductions, rather than just all tokens
8691 causing conflicts. Needed to size conflict tables.
e0e5bf84 8692 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
8693 interface.
8694 (conflicts_print): Ditto.
8695 (count_total_conflicts): New function.
8696
8697 * src/reader.h (merger_list): New type.
8698 (merge_functions): New variable.
8699
8700 * src/lex.h (tok_dprec, tok_merge): New token types.
8701
8702 * src/gram.h (rule_s): Add dprec and merger fields.
8703 (glr_parser): New flag.
8704
8705 * src/conflicts.h (count_total_conflicts): New function.
8706
8707 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
8708
8709 * doc/bison.texinfo (Generalized LR Parsing): New section.
8710 (GLR Parsers): New section.
8711 (Language and Grammar): Mention GLR parsing.
8712 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
8713 Correct typo ("tge" -> "the").
8714
8715 * data/bison.glr: New skeleton for GLR parsing.
8716
8717 * tests/cxx-gram.at: New tests for GLR parsing.
8718
8719 * tests/testsuite.at: Include cxx-gram.at.
8720
8721 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 8722
676385e2
PH
8723 * src/parse-gram.y:
8724
8725 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
8726
8727 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 8728
b5480d74 87292002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
8730
8731 * src/options.h, src/options.c: Remove.
8732 * src/getargs.c (short_options, long_options): New.
8733
60491a94
AD
87342002-06-27 Akim Demaille <akim@epita.fr>
8735
8736 * data/bison.simple, data/bison.c++: Rename as...
8737 * data/yacc.c, data/lalr1.cc: these.
8738 * doc/bison.texinfo (Environment Variables): Remove.
8739
9be0c25b
AD
87402002-06-25 Raja R Harinath <harinath@cs.umn.edu>
8741
8742 * src/getargs.c (report_argmatch): Initialize strtok().
8743
1ae72863
AD
87442002-06-20 Akim Demaille <akim@epita.fr>
8745
8746 * data/bison.simple (b4_symbol_actions): New, replaces...
8747 (b4_symbol_destructor, b4_symbol_printer): these.
8748 (yysymprint): Be sure to call YYPRINT only for tokens, and using
8749 user token numbers.
8750
87542d29
AD
87512002-06-20 Akim Demaille <akim@epita.fr>
8752
8753 * data/bison.simple (yydestructor): Rename as...
8754 (yydestruct): this.
8755
1a31ed21
AD
87562002-06-20 Akim Demaille <akim@epita.fr>
8757
8758 * src/symtab.h, src/symtab.c (symbol_type_set)
8759 (symbol_destructor_set, symbol_precedence_set): The location is
8760 the last argument.
8761 Adjust all callers.
8762
e776192e
AD
87632002-06-20 Akim Demaille <akim@epita.fr>
8764
8765 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
8766 internals.
8767 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
8768 Takes a location.
8769 * src/symtab.h, src/symtab.c (symbol_class_set)
8770 (symbol_user_token_number_set): Likewise.
8771 Adjust all callers.
8772 Promote complain_at.
8773 * tests/input.at (Type Clashes): Adjust.
8774
5c1180b3
AD
87752002-06-20 Akim Demaille <akim@epita.fr>
8776
8777 * data/bison.simple (YYLEX): Fix the declaration when
8778 %pure-parser.
8779
e3170060
AD
87802002-06-20 Akim Demaille <akim@epita.fr>
8781
8782 * data/bison.simple (yysymprint): Don't print the token number,
8783 just its name.
8784 * tests/actions.at (Destructors): Rename as...
8785 (Printers and Destructors): this.
8786 Also exercise %printer.
8787
253862fd
AD
87882002-06-20 Akim Demaille <akim@epita.fr>
8789
8790 * data/bison.simple (YYDSYMPRINT): New.
8791 Use it to remove many of the #if YYDEBUG/if (yydebug).
8792
366eea36
AD
87932002-06-20 Akim Demaille <akim@epita.fr>
8794
8795 * src/symtab.h, src/symtab.c (symbol_t): printer and
8796 printer_location are new members.
8797 (symbol_printer_set): New.
8798 * src/parse-gram.y (PERCENT_PRINTER): New token.
8799 Handle its associated rule.
8800 * src/scan-gram.l: Adjust.
8801 (handle_destructor_at, handle_destructor_dollar): Rename as...
8802 (handle_symbol_code_at, handle_symbol_code_dollar): these.
8803 * src/output.c (symbol_printers_output): New.
8804 (output_skeleton): Call it.
8805 * data/bison.simple (yysymprint): New. Cannot be named yyprint
8806 since there are already many grammar files with a user `yyprint'.
8807 Replace the calls to YYPRINT to calls to yysymprint.
8808 * tests/calc.at: Adjust.
8809 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
8810 taking advantage of parser very internal details (stack size!).
8811
4f25ebb0
AD
88122002-06-20 Akim Demaille <akim@epita.fr>
8813
8814 * src/scan-gram.l: Complete the scanner with the missing patterns
8815 to pacify Flex.
8816 Use `quote' and `symbol_tag_get' where appropriate.
8817
93b68a0e
AD
88182002-06-19 Akim Demaille <akim@epita.fr>
8819
8820 * tests/actions.at (Destructors): Augment to test locations.
8821 * data/bison.simple (yydestructor): Pass it the current location
8822 if locations are enabled.
8823 Prototype only when __STDC__ or C++.
8824 Change the argument names to move into the yy name space: there is
8825 user code here.
8826
58612f1d
AD
88272002-06-19 Akim Demaille <akim@epita.fr>
8828
74310291
AD
8829 * data/bison.simple (b4_pure_if): New.
8830 Use it instead of #ifdef YYPURE.
8831
88322002-06-19 Akim Demaille <akim@epita.fr>
8833
8834 * data/bison.simple (b4_location_if): New.
58612f1d
AD
8835 Use it instead of #ifdef YYLSP_NEEDED.
8836
f25bfb75
AD
88372002-06-19 Akim Demaille <akim@epita.fr>
8838
8839 Prepare @$ in %destructor, but currently don't bind it in the
8840 skeleton, as %location use is not cleaned up yet.
8841
8842 * src/scan-gram.l (handle_dollar, handle_destructor_at)
8843 (handle_action_at): New.
8844 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
8845 a braced_code_t and a location as additional arguments.
8846 (handle_destructor_dollar): Instead of requiring `b4_eval', just
8847 unquote one when outputting `b4_dollar_dollar'.
8848 Adjust callers.
8849 * data/bison.simple (b4_eval): Remove.
8850 (b4_symbol_destructor): Adjust.
8851 * tests/input.at (Invalid @n): Adjust.
8852
c732d2c6
AD
88532002-06-19 Zack Weinberg <zack@codesourcery.com>
8854
8855 * doc/bison.texinfo: Document ability to have multiple
8856 prologue sections.
8857
8c165d89
AD
88582002-06-18 Akim Demaille <akim@epita.fr>
8859
8860 * src/files.c (compute_base_names): When computing the output file
8861 names from the input file name, strip the directory part.
8862
ca98bf57
AD
88632002-06-18 Akim Demaille <akim@epita.fr>
8864
8865 * data/bison.simple.new: Comment changes.
8866 Reported by Andreas Schwab.
8867
0bfb02ff
AD
88682002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
8869
8870 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
8871 there are no `label `yyoverflowlab' defined but not used' warnings
8872 when yyoverflow is defined.
8873
24c0aad7
AD
88742002-06-18 Akim Demaille <akim@epita.fr>
8875
8876 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
8877 new member.
8878 (symbol_destructor_set): Adjust.
8879 * src/output.c (symbol_destructors_output): Output the destructor
8880 locations.
8881 Output the symbol name.
8882 * data/bison.simple (b4_symbol_destructor): Adjust.
8883
5719c109
AD
88842002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
8885 and Akim Demaille <akim@epita.fr>
8886
8887 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
8888 what's left on the stack when the error recovery hits EOF.
8889 * tests/actions.at (Destructors): Complete to exercise this case.
8890
9280d3ef
AD
88912002-06-17 Akim Demaille <akim@epita.fr>
8892
8893 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
8894 arguments is really empty, not only equal to `[]'.
8895 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
8896 member.
8897 (symbol_destructor_set): New.
8898 * src/output.c (symbol_destructors_output): New.
8899 * src/reader.h (brace_code_t, current_braced_code): New.
8900 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
8901 (handle_dollar): Rename as...
8902 (handle_action_dollar): this.
8903 (handle_destructor_dollar): New.
8904 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
8905 (grammar_declaration): Use it.
8906 * data/bison.simple (yystos): Is always defined.
8907 (yydestructor): New.
8908 * tests/actions.at (Destructors): New.
8909 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
8910
dafdc66f
AD
89112002-06-17 Akim Demaille <akim@epita.fr>
8912
8913 * src/symlist.h, src/symlist.c (symbol_list_length): New.
8914 * src/scan-gram.l (handle_dollar, handle_at): Compute the
8915 rule_length only when needed.
8916 * src/output.c (actions_output, token_definitions_output): Output
8917 the full M4 block.
8918 * src/symtab.c: Don't access directly to the symbol tag, use
8919 symbol_tag_get.
8920 * src/parse-gram.y: Use symbol_list_free.
8921
56c47203
AD
89222002-06-17 Akim Demaille <akim@epita.fr>
8923
8924 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
8925 (symbol_list_prepend, get_type_name): Move to...
8926 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
8927 (symbol_list_prepend, symbol_list_n_type_name_get): here.
8928 Adjust all callers.
8929 (symbol_list_free): New.
8930 * src/scan-gram.l (handle_dollar): Takes a location.
8931 * tests/input.at (Invalid $n): Adjust.
8932
1e0bab92
AD
89332002-06-17 Akim Demaille <akim@epita.fr>
8934
8935 * src/reader.h, src/reader.c (symbol_list_new): Export it.
8936 (symbol_list_prepend): New.
8937 * src/parse-gram.y (%union): `list' is a new member.
8938 (symbols.1): New, replaces...
8939 (terms_to_prec.1, nterms_to_type.1): these.
8940 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
8941 Take a location as additional argument.
8942 Adjust all callers.
8943
04e60654
AD
89442002-06-15 Akim Demaille <akim@epita.fr>
8945
8946 * src/parse-gram.y: Move %token in the declaration section so that
8947 we don't depend upon CVS Bison.
8948
10e5b8bd
AD
89492002-06-15 Akim Demaille <akim@epita.fr>
8950
8951 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
8952 * src/print.c (print_core): Use it.
8953
9801d40c
AD
89542002-06-15 Akim Demaille <akim@epita.fr>
8955
8956 * src/conflicts.c (log_resolution): Accept the rule involved in
8957 the sr conflicts instead of the lookahead number that points to
8958 that rule.
8959 (flush_reduce): Accept the current lookahead vector as argument,
8960 instead of the index in LA.
8961 (resolve_sr_conflict): Accept the current number of lookahead
8962 bitset to consider for the STATE, instead of the index in LA.
8963 (set_conflicts): Adjust.
8964 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
8965
c0263492
AD
89662002-06-15 Akim Demaille <akim@epita.fr>
8967
8968 * src/state.h (state_t): Replace the `lookaheadsp' member, a
8969 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
8970 Adjust all dependencies.
8971 * src/lalr.c (initialize_lookaheads): Split into...
8972 (states_lookaheads_count, states_lookaheads_initialize): these.
8973 (lalr): Adjust.
8974
9757c359
AD
89752002-06-15 Akim Demaille <akim@epita.fr>
8976
8977 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
8978 out of...
8979 (grammar_rules_print): here.
8980 * src/reduce.c (reduce_output): Use it.
8981 * tests/reduce.at (Useless Rules, Reduced Automaton)
8982 (Underivable Rules): Adjust.
8983
6b98e4b5
AD
89842002-06-15 Akim Demaille <akim@epita.fr>
8985
8986 Copy BYacc's nice way to report the grammar.
8987
8988 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
8989 New.
8990 Don't print the rules' location, it is confusing and useless.
8991 (rule_print): Use grammar_rhs_print.
8992 * src/print.c (print_grammar): Use grammar_rules_print.
8993
6b98e4b5
AD
89942002-06-15 Akim Demaille <akim@epita.fr>
8995
8996 Complete and rationalize `useless thing' warnings.
8997
8998 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
8999 (symbol_tag_print): New.
9000 Use them everywhere in place of accessing directly the tag member.
9001 * src/gram.h, src/gram.c (rule_print): New.
9002 Use it where a rule used to be printed `by hand'.
9003 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
9004 (reduce_grammar_tables): Report the useless rules.
9005 (reduce_print): Useless things are a warning, not an error.
9006 Report it as such.
9007 * tests/reduce.at (Useless Nonterminals, Useless Rules):
9008 (Reduced Automaton, Underivable Rules): Adjust.
9009 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
9010 * tests/conflicts.at (Unresolved SR Conflicts)
9011 (Solved SR Conflicts): Adjust.
9012
ee000ba4
AD
90132002-06-15 Akim Demaille <akim@epita.fr>
9014
9015 Let symbols have a location.
9016
9017 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
9018 (getsym): Adjust.
9019 Adjust all callers.
9020 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
9021 Use location_t, not int.
9022 * src/symtab.c (symbol_check_defined): Take advantage of the
9023 location.
9024 * tests/regression.at (Invalid inputs): Adjust.
9025
8efe435c
AD
90262002-06-15 Akim Demaille <akim@epita.fr>
9027
9028 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
9029 (input): Don't try to initialize yylloc here, do it in the
9030 scanner.
9031 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
9032 * src/gram.h (rule_t): Change line and action_line into location
9033 and action_location, of location_t type.
9034 Adjust all dependencies.
9035 * src/location.h, src/location.c (empty_location): New.
9036 * src/reader.h, src/reader.c (grammar_start_symbol_set)
9037 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
9038 (grammar_current_rule_symbol_append)
9039 (grammar_current_rule_action_append): Expect a location as argument.
9040 * src/reader.c (grammar_midrule_action): Adjust to attach an
9041 action's location as dummy symbol location.
9042 * src/symtab.h, src/symtab.c (startsymbol_location): New.
9043 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
9044 the line numbers.
9045
1921f1d7
AD
90462002-06-14 Akim Demaille <akim@epita.fr>
9047
9048 Grammar declarations may be found in the grammar section.
9049
9050 * src/parse-gram.y (rules_or_grammar_declaration): New.
9051 (declarations): Each declaration may end with a semicolon, not
9052 just...
9053 (grammar_declaration): `"%union"'.
9054 (grammar): Branch to rules_or_grammar_declaration.
9055
4515534c
AD
90562002-06-14 Akim Demaille <akim@epita.fr>
9057
9058 * src/main.c (main): Invoke scanner_free.
9059
f958596b
AD
90602002-06-14 Akim Demaille <akim@epita.fr>
9061
9062 * src/output.c (m4_invoke): Extracted from...
9063 (output_skeleton): here.
9064 Free tempfile.
9065
2c569025
AD
90662002-06-14 Akim Demaille <akim@epita.fr>
9067
9068 * src/parse-gram.y (directives, directive, gram)
9069 (grammar_directives, precedence_directives, precedence_directive):
9070 Rename as...
9071 (declarations, declaration, grammar, grammar_declaration)
9072 (precedence_declaration, precedence_declarator): these.
9073 (symbol_declaration): New.
9074
592e8d4d
AD
90752002-06-14 Akim Demaille <akim@epita.fr>
9076
9077 * src/files.c (action_obstack): Remove, unused.
9078 (output_obstack): Remove it, and all its dependencies, as it is no
9079 longer needed.
9080 * src/reader.c (epilogue_set): Build the epilogue in the
9081 muscle_obstack.
9082 * src/output.h, src/output.c (muscle_obstack): Move to...
9083 * src/muscle_tab.h, src/muscle_tab.h: here.
9084 (muscle_init): Initialize muscle_obstack.
9085 (muscle_free): New.
9086 * src/main.c (main): Call it.
9087
0c15323d
AD
90882002-06-14 Akim Demaille <akim@epita.fr>
9089
9090 * src/location.h: New, extracted from...
9091 * src/reader.h: here.
9092 * src/Makefile.am (noinst_HEADERS): Merge into
9093 (bison_SOURCES): this.
9094 Add location.h.
9095 * src/parse-gram.y: Use location_t instead of Bison's.
9096 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
9097 Use location_t instead of ints.
9098
e96c9728
AD
90992002-06-14 Akim Demaille <akim@epita.fr>
9100
9101 * data/bison.simple, data/bison.c++: Be sure to restore the
9102 current #line when returning to the skeleton contents after having
9103 exposed the input file's #line.
9104
75d1fe16
AD
91052002-06-12 Akim Demaille <akim@epita.fr>
9106
9107 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
9108 eager.
9109 * tests/actions.at (Exotic Dollars): New.
9110
6c35d22c
AD
91112002-06-12 Akim Demaille <akim@epita.fr>
9112
9113 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
9114 ['"/] too eagerly.
9115 * tests/input.at (Torturing the Scanner): New.
9116
1d6412ad
AD
91172002-06-11 Akim Demaille <akim@epita.fr>
9118
9119 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
9120 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
9121 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
9122 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
9123 * src/reader.c (reader): Use it.
9124
4cdb01db
AD
91252002-06-11 Akim Demaille <akim@epita.fr>
9126
9127 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
9128 Adjust all callers.
9129 (scanner_last_string_free): New.
9130
44995b2e
AD
91312002-06-11 Akim Demaille <akim@epita.fr>
9132
9133 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
9134 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
9135 (last_string, YY_OBS_FREE): New.
9136 Use them when returning an ID.
9137
e9955c83
AD
91382002-06-11 Akim Demaille <akim@epita.fr>
9139
9140 Have Bison grammars parsed by a Bison grammar.
9141
9142 * src/reader.c, src/reader.h (prologue_augment): New.
9143 * src/reader.c (copy_definition): Remove.
9144
9145 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
9146 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
9147 (grammar_current_rule_prec_set, grammar_current_rule_check)
9148 (grammar_current_rule_symbol_append)
9149 (grammar_current_rule_action_append): Export.
9150 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
9151 (symbol_list_action_append): Remove.
9152 Hook the routines from reader.
9153 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
9154 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
9155
9156 * src/reader.c (read_declarations): Remove, unused.
9157
9158 * src/parse-gram.y: Handle the epilogue.
9159 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
9160 (grammar_start_symbol_set): this.
9161 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
9162 * src/reader.c (readgram): Remove, unused.
9163 (reader): Adjust to insert eoftoken and axiom where appropriate.
9164
9165 * src/reader.c (copy_dollar): Replace with...
9166 * src/scan-gram.h (handle_dollar): this.
9167 * src/parse-gram.y: Remove `%thong'.
9168
9169 * src/reader.c (copy_at): Replace with...
9170 * src/scan-gram.h (handle_at): this.
9171
9172 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
9173 New.
9174
9175 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
9176 time being.
9177
9178 * src/reader.h, src/reader.c (grammar_rule_end): New.
9179
9180 * src/parse.y (current_type, current_class): New.
9181 Implement `%nterm', `%token' support.
9182 Merge `%term' into `%token'.
9183 (string_as_id): New.
9184 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
9185 type name.
9186
9187 * src/parse-gram.y: Be sure to handle properly the beginning of
9188 rules.
9189
9190 * src/parse-gram.y: Handle %type.
9191 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
9192
9193 * src/parse-gram.y: More directives support.
9194 * src/options.c: No longer handle source directives.
9195
9196 * src/parse-gram.y: Fix %output.
9197
9198 * src/parse-gram.y: Handle %union.
9199 Use the prologue locations.
9200 * src/reader.c (parse_union_decl): Remove.
9201
9202 * src/reader.h, src/reader.c (epilogue_set): New.
9203 * src/parse-gram.y: Use it.
9204
9205 * data/bison.simple, data/bison.c++: b4_stype is now either not
9206 defined, then default to int, or to the contents of %union,
9207 without `union' itself.
9208 Adjust.
9209 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
9210
9211 * src/output.c (actions_output): Don't output braces, as they are
9212 already handled by the scanner.
9213
9214 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
9215 characters to themselves.
9216
9217 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
9218 that the epilogue has a proper #line.
9219
9220 * src/parse-gram.y: Handle precedence/associativity.
9221
9222 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
9223 a terminal.
9224 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
9225 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
9226 at all to define terminals that cannot be emitted.
9227
9228 * src/scan-gram.l: Escape M4 characters.
9229
9230 * src/scan-gram.l: Working properly with escapes in user
9231 strings/characters.
9232
9233 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
9234 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
9235 grammar.
9236 Use more modest sizes, as for the time being the parser does not
9237 release memory, and therefore the process swallows a huge amount
9238 of memory.
9239
9240 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
9241 stricter %token grammar.
9242
9243 * src/symtab.h (associativity): Add `undef_assoc'.
9244 (symbol_precedence_set): Do nothing when passed an undef_assoc.
9245 * src/symtab.c (symbol_check_alias_consistence): Adjust.
9246
9247 * tests/regression.at (Invalid %directive): Remove, as it is now
9248 meaningless.
9249 (Invalid inputs): Adjust to the new error messages.
9250 (Token definitions): The new grammar doesn't allow too many
9251 eccentricities.
9252
9253 * src/lex.h, src/lex.c: Remove.
9254 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
9255 (copy_character, copy_string2, copy_string, copy_identifier)
9256 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
9257 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
9258 (parse_action): Remove.
9259 * po/POTFILES.in: Adjust.
9260
2e047461
AD
92612002-06-11 Akim Demaille <akim@epita.fr>
9262
cd05d13c 9263 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
9264 rule's action member: return the action as a string.
9265 Don't require `rule_length' as an argument: compute it.
9266 (grammar_current_rule_symbol_append)
9267 (grammar_current_rule_action_append): New, eved out from
9268 (readgram): here.
9269 Remove `action_flag', `rulelength', unused now.
9270
9af3fbce
AD
92712002-06-11 Akim Demaille <akim@epita.fr>
9272
9273 * src/reader.c (grammar_current_rule_prec_set).
9274 (grammar_current_rule_check): New, eved out from...
9275 (readgram): here.
9276 Remove `xaction', `first_rhs': useless.
9277 * tests/input.at (Type clashes): New.
9278 * tests/existing.at (GNU Cim Grammar): Adjust.
9279
1485e106
AD
92802002-06-11 Akim Demaille <akim@epita.fr>
9281
9282 * src/reader.c (grammar_midrule_action): New, Eved out from
9283 (readgram): here.
9284
da4160c3
AD
92852002-06-11 Akim Demaille <akim@epita.fr>
9286
9287 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
9288 New.
9289 (readgram): Use them as replacement of inlined code, crule and
9290 crule1.
9291
f6d0f937
AD
92922002-06-11 Akim Demaille <akim@epita.fr>
9293
9294 * src/reader.c (grammar_end, grammar_symbol_append): New.
9295 (readgram): Use them.
9296 Make the use of `p' as local as possible.
9297
69078d4b
AD
92982002-06-10 Akim Demaille <akim@epita.fr>
9299
9300 GCJ's parser requires the tokens to be defined before the prologue.
9301
9302 * data/bison.simple: Output the token definition before the user's
9303 prologue.
9304 * tests/regression.at (Braces parsing, Duplicate string)
9305 (Mixing %token styles): Check the output from bison.
9306 (Early token definitions): New.
9307
5e424082
AD
93082002-06-10 Akim Demaille <akim@epita.fr>
9309
9310 * src/symtab.c (symbol_user_token_number_set): Don't complain when
9311 assigning twice the same user number to a token, so that we can
9312 use it in...
9313 * src/lex.c (lex): here.
9314 Also use `symbol_class_set' instead of hand written code.
9315 * src/reader.c (parse_assoc_decl): Likewise.
9316
44536b35
AD
93172002-06-10 Akim Demaille <akim@epita.fr>
9318
9319 * src/symtab.c, src/symtab.c (symbol_class_set)
9320 (symbol_user_token_number_set): New.
9321 * src/reader.c (parse_token_decl): Use them.
9322 Use a switch instead of ifs.
9323 Use a single argument.
9324
8b9f2372
AD
93252002-06-10 Akim Demaille <akim@epita.fr>
9326
9327 Remove `%thong' support as it is undocumented, unused, duplicates
9328 `%token's job, and creates useless e-mail traffic with people who
9329 want to know what it is, why it is undocumented, unused, and
9330 duplicates `%token's job.
9331
9332 * src/reader.c (parse_thong_decl): Remove.
9333 * src/options.c (option_table): Remove "thong".
9334 * src/lex.h (tok_thong): Remove.
9335
3ae2b51f
AD
93362002-06-10 Akim Demaille <akim@epita.fr>
9337
9338 * src/symtab.c, src/symtab.c (symbol_type_set)
9339 (symbol_precedence_set): New.
9340 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
9341 (value_components_used): Remove, unused.
9342
2f1afb73
AD
93432002-06-09 Akim Demaille <akim@epita.fr>
9344
9345 Move symbols handling code out of the reader.
9346
9347 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
9348 (axiom): Move to...
9349 * src/symtab.h, src/symtab.c: here.
9350
9351 * src/gram.c (start_symbol): Remove: use startsymbol->number.
9352 * src/reader.c (startval): Rename as...
9353 * src/symtab.h, src/symtab.c (startsymbol): this.
9354 * src/reader.c: Adjust.
9355
9356 * src/reader.c (symbol_check_defined, symbol_make_alias)
9357 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
9358 (token_translations_init)
9359 Move to...
9360 * src/symtab.c: here.
9361 * src/reader.c (packsymbols): Move to...
9362 * src/symtab.h, src/symtab.c (symbols_pack): here.
9363 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
9364 argument.
9365
e9bca3ad
AD
93662002-06-03 Akim Demaille <akim@epita.fr>
9367
9368 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
9369 then statements.
9370
86eff183
AD
93712002-06-03 Akim Demaille <akim@epita.fr>
9372
9373 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
9374 structs with non literals.
9375 * src/scan-skel.l: never-interactive.
9376 * src/conflicts.c (enum conflict_resolution_e): No trailing
9377 comma.
9378 * src/getargs.c (usage): Split long literal strings.
9379 Reported by Hans Aberg.
9380
717be197
AD
93812002-05-28 Akim Demaille <akim@epita.fr>
9382
9383 * data/bison.c++: Use C++ ostreams.
9384 (cdebug_): New member.
9385
670ddffd
AD
93862002-05-28 Akim Demaille <akim@epita.fr>
9387
9388 * src/output.c (output_skeleton): Be sure to allocate enough room
9389 for `/' _and_ for `\0' in full_skeleton.
9390
769b430f
AD
93912002-05-28 Akim Demaille <akim@epita.fr>
9392
9393 * data/bison.c++: Catch up with bison.simple:
9394 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9395 and Paul Eggert <eggert@twinsun.com>: `error' handing.
9396 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
9397 and popping traces.
9398
7067cb36
PH
93992002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9400
9401 * src/output.c (output_skeleton): Put an explicit path in front of
9402 the skeleton file name, rather than relying on the -I directory,
9403 to partially alleviate effects of having a skeleton file lying around
9404 in the current directory.
769b430f 9405
4a713ec2
PH
94062002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9407
769b430f 9408 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
9409 obstack_printf should be obstack_fgrow1.
9410
b408954b
AD
94112002-05-26 Akim Demaille <akim@epita.fr>
9412
9413 * src/state.h (state_t): `solved_conflicts' is a new member.
9414 * src/LR0.c (new_state): Set it to 0.
9415 * src/conflicts.h, src/conflicts.c (print_conflicts)
9416 (free_conflicts, solve_conflicts): Rename as...
9417 (conflicts_print, conflicts_free, conflicts_solve): these.
9418 Adjust callers.
9419 * src/conflicts.c (enum conflict_resolution_e)
9420 (solved_conflicts_obstack): New, used by...
9421 (log_resolution): this.
9422 Adjust to attach the conflict resolution to each state.
9423 Complete the description with the precedence/associativity
9424 information.
9425 (resolve_sr_conflict): Adjust.
9426 * src/print.c (print_state): Output its solved_conflicts.
9427 * tests/conflicts.at (Unresolved SR Conflicts)
9428 (Solved SR Conflicts): Exercise --report=all.
9429
a49aecd5
AD
94302002-05-26 Akim Demaille <akim@epita.fr>
9431
9432 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
9433 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
9434 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
9435 (token_number_t, item_number_as_token_number)
9436 (token_number_as_item_number, muscle_insert_token_number_table):
9437 Rename as...
9438 (symbol_number_t, item_number_as_symbol_number)
9439 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
9440 these, since it is more appropriate.
9441
5504898e
AD
94422002-05-26 Akim Demaille <akim@epita.fr>
9443
9444 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
9445 `Error:' lines.
9446 * data/bison.simple (yystos) [YYDEBUG]: New.
9447 (yyparse) [YYDEBUG]: Display the symbols which are popped during
9448 error recovery.
9449 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
9450
ec3bc396
AD
94512002-05-25 Akim Demaille <akim@epita.fr>
9452
9453 * doc/bison.texinfo (Debugging): Split into...
9454 (Tracing): this new section, its former contents, and...
9455 (Understanding): this new section.
9456 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
9457 by...
9458 (report_flag): this.
9459 Adjust all dependencies.
9460 (report_args, report_types, report_argmatch): New.
9461 (usage, getargs): Report/support -r, --report.
9462 * src/options.h
9463 (struct option_table_struct): Rename as..,
9464 (struct option_table_s): this.
9465 Rename the `set_flag' member to `flag' to match with getopt_long's
9466 struct.
9467 * src/options.c (option_table): Split verbose into an entry for
9468 %verbose, and another for --verbose.
9469 Support --report/-r, so remove -r from the obsolete --raw.
9470 * src/print.c: Attach full item sets and lookaheads reports to
9471 report_flag instead of trace_flag.
9472 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
9473
78df8250
PE
94742002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9475 and Paul Eggert <eggert@twinsun.com>
769b430f 9476
78df8250
PE
9477 * data/bison.simple (yyparse): Correct error handling to conform to
9478 POSIX and yacc. Specifically, after syntax error is discovered,
9479 do not reduce further before shifting the error token.
9480 Clean up the code a bit by removing the labels yyerrdefault,
9481 yyerrhandle, yyerrpop.
9482 * NEWS: Document the above.
9483
c0c9ea05
PH
94842002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9485
9486 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
9487 type; it isn't always big enough, since it doesn't necessarily
9488 include non-terminals.
769b430f 9489 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
9490 the latter can be removed.
9491 (yy_token_number_type): Remove, only one use.
9492 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
9493 don't use TokenNumberType as element type.
769b430f 9494
c0c9ea05
PH
9495 * tests/regression.at: Modify expected output to agree with change
9496 to yyr1 and yytranslate.
769b430f 9497
6390a83f
FK
94982002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
9499
9500 * src/reader.c (parse_action): Use copy_character instead of
9501 obstack_1grow.
9502
db7c8e9a
AD
95032002-05-13 Akim Demaille <akim@epita.fr>
9504
9505 * tests/regression.at (Token definitions): Prototype yylex and
9506 yyerror.
9507
fcc61800
PH
95082002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9509
158c687b 9510 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
9511 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
9512 32-bit arithmetic.
9513 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
9514
5683e9b2
AD
95152002-05-07 Akim Demaille <akim@epita.fr>
9516
9517 * tests/synclines.at: Be sure to prototype yylex and yyerror to
9518 avoid GCC warnings.
9519
0c2d3f4c
AD
95202002-05-07 Akim Demaille <akim@epita.fr>
9521
9522 Kill GCC warnings.
9523
9524 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
9525 over the RHS of each rule.
9526 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
9527 * src/state.h (state_t): Member `nitems' is unsigned short.
9528 * src/LR0.c (get_state): Adjust.
9529 * src/reader.c (packgram): Likewise.
9530 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
9531 `Type'.
9532 (muscle_insert_int_table): Remove, unused.
9533 (prepare_rules): Remove `max'.
9534
1565b720
AD
95352002-05-06 Akim Demaille <akim@epita.fr>
9536
9537 * src/closure.c (print_firsts): Display of the symbol tags.
9538 (bitmatrix_print): Move to...
9539 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
9540 here.
9541 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
9542
cfaee611
AD
95432002-05-06 Akim Demaille <akim@epita.fr>
9544
9545 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
9546 hash_do_for_each.
9547
458be8e0
AD
95482002-05-06 Akim Demaille <akim@epita.fr>
9549
9550 * src/LR0.c (new_state, get_state): Instead of using the global
9551 `kernel_size' and `kernel_base', have two new arguments:
9552 `core_size' and `core'.
9553 Adjust callers.
9554
a900a624
AD
95552002-05-06 Akim Demaille <akim@epita.fr>
9556
9557 * src/reader.c (packgram): No longer end `ritem' with a 0
9558 sentinel: it is not used.
9559
d4e7d3a1
AD
95602002-05-05 Akim Demaille <akim@epita.fr>
9561
9562 New experimental feature: display the lookaheads in the report and
9563 graph.
9564
9565 * src/print (print_core): When --trace-flag, display the rules
9566 lookaheads.
9567 * src/print_graph.c (print_core): Likewise.
9568 Swap the arguments.
9569 Adjust caller.
9570
39ceb25b
AD
95712002-05-05 Akim Demaille <akim@epita.fr>
9572
9573 * tests/torture.at (Many lookaheads): New test.
9574
5372019f
AD
95752002-05-05 Akim Demaille <akim@epita.fr>
9576
9577 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
9578 (GENERATE_MUSCLE_INSERT_TABLE): this.
9579 (output_int_table, output_unsigned_int_table, output_short_table)
9580 (output_token_number_table, output_item_number_table): Replace with...
9581 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
9582 (muscle_insert_short_table, muscle_insert_token_number_table)
9583 (muscle_insert_item_number_table): these.
9584 Adjust all callers.
9585 (prepare_tokens): Don't free `translations', since...
9586 * src/reader.h, src/reader.c (grammar_free): do it.
9587 Move to...
9588 * src/gram.h, src/gram.c (grammar_free): here.
9589 * data/bison.simple, data/bison.c++: b4_token_number_max is now
9590 b4_translate_max.
9591
5df5f6d5
AD
95922002-05-05 Akim Demaille <akim@epita.fr>
9593
9594 * src/output.c (output_unsigned_int_table): New.
9595 (prepare_rules): `i' is unsigned.
9596 `prhs', `rline', `r2' are unsigned int.
9597 Rename muscle `rhs_number_max' as `rhs_max'.
9598 Output muscles `prhs_max', `rline_max', and `r2_max'.
9599 Free rline and r1.
9600 * data/bison.simple, data/bison.c++: Adjust to use these muscles
9601 to compute types instead of constant types.
9602 * tests/regression.at (Web2c Actions): Adjust.
9603
b87f8b21
AD
96042002-05-04 Akim Demaille <akim@epita.fr>
9605
9606 * src/symtab.h (SALIAS, SUNDEF): Rename as...
9607 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
9608 Adjust dependencies.
9609 * src/output.c (token_definitions_output): Be sure not to output a
9610 `#define 'a'' when fed with `%token 'a' "a"'.
9611 * tests/regression.at (Token definitions): New.
9612
8bb936e4
PE
96132002-05-03 Paul Eggert <eggert@twinsun.com>
9614
9615 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
9616 for K&R C.
9617
96182002-05-03 gettextize <bug-gnu-gettext@gnu.org>
9619
9620 * Makefile.am (SUBDIRS): Remove intl.
9621 (EXTRA_DIST): Add config/config.rpath.
9622
53c71a12
AD
96232002-05-03 Akim Demaille <akim@epita.fr>
9624
9625 * data/bison.simple (m4_if): Don't output empty enums.
9626 And actually, output valid enum definitions :(.
9627
289dd0cf
AD
96282002-05-03 Akim Demaille <akim@epita.fr>
9629
9630 * configure.bat: Remove, completely obsolete.
9631 * Makefile.am (EXTRA_DIST): Adjust.
9632 Don't distribute config.rpath...
9633 * config/Makefile.am (EXTRA_DIST): Do it.
9634
db85e524
AD
96352002-05-03 Akim Demaille <akim@epita.fr>
9636
9637 * configure.in (GETTEXT_VERSION): New.
9638 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
9639
83ccf991
AD
96402002-05-03 Akim Demaille <akim@epita.fr>
9641
9642 * data/bison.simple (b4_token_enum): New.
9643 (b4_token_defines): Use it to output tokens both as #define and
9644 enums.
9645 Suggested by Paul Eggert.
9646 * src/output.c (token_definitions_output): Don't output spurious
9647 white spaces.
9648
1f418995
AD
96492002-05-03 Akim Demaille <akim@epita.fr>
9650
9651 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
9652
45119f04
RA
96532002-05-02 Robert Anisko <robert@lrde.epita.fr>
9654
9655 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
9656 Update the stack class, give a try to deque as the default container.
9657
b2d52318
AD
96582002-05-02 Akim Demaille <akim@epita.fr>
9659
9660 * data/bison.simple (yyparse): Do not implement @$ = @1.
9661 (YYLLOC_DEFAULT): Adjust to do it.
9662 * doc/bison.texinfo (Location Default Action): Fix.
9663
3a8b4109
AD
96642002-05-02 Akim Demaille <akim@epita.fr>
9665
9666 * src/reader.c (parse_braces): Merge into...
9667 (parse_action): this.
9668
84614e13
AD
96692002-05-02 Akim Demaille <akim@epita.fr>
9670
9671 * configure.in (ALL_LINGUAS): Remove.
9672 * po/LINGUAS, hr.po: New.
9673
fdbcd8e2
AD
96742002-05-02 Akim Demaille <akim@epita.fr>
9675
9676 Remove the so called hairy (semantic) parsers.
9677
9678 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
9679 * src/gram.h, src/gram.c (semantic_parser): Remove.
9680 (rule_t): Remove the guard and guard_line members.
9681 * src/lex.h (token_t): remove tok_guard.
9682 * src/options.c (option_table): Remove %guard and %semantic_parser
9683 support.
9684 * src/output.c, src/output.h (guards_output): Remove.
9685 (prepare): Adjust.
9686 (token_definitions_output): Don't output the `T'
9687 tokens (???).
9688 (output_skeleton): Don't output the guards.
9689 * src/files.c, src/files.c (attrsfile): Remove.
9690 * src/reader.c (symbol_list): Remove the guard and guard_line
9691 members.
9692 Adjust dependencies.
9693 (parse_guard): Remove.
9694 * data/bison.hairy: Remove.
9695 * doc/bison.texinfo (Environment Variables): Remove occurrences of
9696 BISON_HAIRY.
9697
82b6cb3f
AD
96982002-05-02 Akim Demaille <akim@epita.fr>
9699
9700 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
9701 (parse_guard): Rename the formal argument `stack_offset' as
9702 `rule_length', which is more readable.
9703 Adjust callers.
9704 (copy_at, copy_dollar): Instead of outputting the hard coded
9705 values of $$, $n and so forth, output invocation to b4_lhs_value,
9706 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
9707 Note: this patch partially drops `semantic-parser' support: it
9708 always does `rule_length - n', where semantic parsers ought to
9709 always use `-n'.
82b6cb3f
AD
9710 * data/bison.simple, data/bison.c++ (b4_lhs_value)
9711 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
9712
6cbfbcc5
AD
97132002-05-02 Akim Demaille <akim@epita.fr>
9714
9715 * configure.in (AC_INIT): Bump to 1.49b.
9716 (AM_INIT_AUTOMAKE): Short invocation.
9717
b8548114
AD
97182002-05-02 Akim Demaille <akim@epita.fr>
9719
9720 Version 1.49a.
9721
c20cd1fa
AD
97222002-05-01 Akim Demaille <akim@epita.fr>
9723
9724 * src/skeleton.h: Remove.
9725
8a9566d4
AD
97262002-05-01 Akim Demaille <akim@epita.fr>
9727
9728 * src/skeleton.h: Fix the #endif.
9729 Reported by Magnus Fromreide.
9730
8c6d399a
PE
97312002-04-26 Paul Eggert <eggert@twinsun.com>
9732
9733 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
9734 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 9735 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 9736
2b7ed18a
RA
97372002-04-25 Robert Anisko <robert@lrde.epita.fr>
9738
9739 * src/scan-skel.l: Postprocess quadrigraphs.
9740
9741 * src/reader.c (copy_character): New function, used to output
9742 single characters while replacing `[' and `]' with quadrigraphs, to
9743 avoid troubles with M4 quotes.
9744 (copy_comment): Output characters with copy_character.
9745 (read_additionnal_code): Likewise.
9746 (copy_string2): Likewise.
9747 (copy_definition): Likewise.
9748
9749 * tests/calc.at: Exercise M4 quoting.
9750
34a89c50
AD
97512002-04-25 Akim Demaille <akim@epita.fr>
9752
9753 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
9754 between `!' and the command.
9755 Reported by Paul Eggert.
9756
0dd1580a
RA
97572002-04-24 Robert Anisko <robert@lrde.epita.fr>
9758
9759 * tests/calc.at: Exercise prologue splitting.
9760
9761 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
9762 `b4_post_prologue' instead of `b4_prologue'.
9763
9764 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
9765 muscles.
9766 (output): Free pre_prologue_obstack and post_prologue_obstack.
9767 * src/files.h, src/files.c (attrs_obstack): Remove.
9768 (pre_prologue_obstack, post_prologue_obstack): New.
9769 * src/reader.c (copy_definition): Add a parameter to specify the
9770 obstack to fill, instead of using attrs_obstack unconditionally.
9771 (read_declarations): Pass pre_prologue_obstack to copy_definition if
9772 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
9773
83c1796f
PE
97742002-04-23 Paul Eggert <eggert@twinsun.com>
9775
9776 * data/bison.simple: Remove unnecessary commentary and white
9777 space differences from 1_29-branch.
9778 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
9779
9780 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
9781 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
9782 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
9783 constructors or destructors.
9784
9785 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
9786
1207eeac
AD
97872002-04-23 Akim Demaille <akim@epita.fr>
9788
9789 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
9790 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
9791 location with columns.
9792 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
9793 All reported by Paul Eggert.
9794
78ab8f67
AD
97952002-04-22 Akim Demaille <akim@epita.fr>
9796
9797 * src/reduce.c (dump_grammar): Move to...
9798 * src/gram.h, src/gram.c (grammar_dump): here.
9799 Be sure to separate long item numbers.
9800 Don't read the members of a rule's prec if its nil.
9801
133c20e2
AD
98022002-04-22 Akim Demaille <akim@epita.fr>
9803
9804 * src/output.c (table_size, table_grow): New.
9805 (MAXTABLE): Remove, replace uses with table_size.
9806 (pack_vector): Instead of dying when the table is too big, grow it.
9807
9515e8a7
AD
98082002-04-22 Akim Demaille <akim@epita.fr>
9809
9810 * data/bison.simple (yyr1): Its type is that of a token number.
9811 * data/bison.c++ (r1_): Likewise.
9812 * tests/regression.at (Web2c Actions): Adjust.
9813
23c5a174
AD
98142002-04-22 Akim Demaille <akim@epita.fr>
9815
9816 * src/reader.c (token_translations_init): 256 is now the default
9817 value for the error token, i.e., it will be assigned another
9818 number if the user assigned 256 to one of her tokens.
9819 (reader): Don't force 256 to error.
9820 * doc/bison.texinfo (Symbols): Adjust.
9821 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
9822 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
9823 etc. instead of 10, 20, 30 (which was used to `jump' over error
9824 (256) and undefined (2)).
9825
5fbb0954
AD
98262002-04-22 Akim Demaille <akim@epita.fr>
9827
9828 Propagate more token_number_t.
9829
9830 * src/gram.h (token_number_as_item_number)
9831 (item_number_as_token_number): New.
9832 * src/output.c (GENERATE_OUTPUT_TABLE): New.
9833 Use it to create output_item_number_table and
9834 output_token_number_table.
9835 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
9836 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
9837 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
9838 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
9839
4f940944
AD
98402002-04-22 Akim Demaille <akim@epita.fr>
9841
9842 * src/output.h, src/output.c (get_lines_number): Remove.
9843
3ded9a63
AD
98442002-04-19 Akim Demaille <akim@epita.fr>
9845
9846 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
9847 as Lex/Flex'.
9848 (Debugging): More details about enabling the debugging features.
9849 (Table of Symbols): Describe $$, $n, @$, and @n.
9850 Suggested by Tim Josling.
9851
e0c471a9
AD
98522002-04-19 Akim Demaille <akim@epita.fr>
9853
9854 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
9855
fecc10cd
AD
98562002-04-10 Akim Demaille <akim@epita.fr>
9857
9858 * src/system.h: Rely on HAVE_LIMITS_H.
9859 Suggested by Paul Eggert.
9860
51dec47b
AD
98612002-04-09 Akim Demaille <akim@epita.fr>
9862
9863 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
9864 full stderr, and strip it according to the bison options, instead
9865 of composing the error message from different bits.
9866 This makes it easier to check for several error messages.
9867 Adjust all the invocations.
9868 Add an invocation exercising the error token.
9869 Add an invocation demonstrating a stupid error message.
9870 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
9871 Adjust the tests.
9872 Error message are for stderr, not stdout.
9873
007a50a4
AD
98742002-04-09 Akim Demaille <akim@epita.fr>
9875
9876 * src/gram.h, src/gram.c (error_token_number): Remove, use
9877 errtoken->number.
9878 * src/reader.c (reader): Don't specify the user token number (2)
9879 for $undefined, as it uselessly prevents using it.
9880 * src/gram.h (token_number_t): Move to...
9881 * src/symtab.h: here.
9882 (state_t.number): Is a token_number_t.
9883 * src/print.c, src/reader.c: Use undeftoken->number instead of
9884 hard coded 2.
9885 (Even though this 2 is not the same as above: the number of the
9886 undeftoken remains being 2, it is its user token number which
9887 might not be 2).
9888 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
9889 `user_token_number_max'.
9890 Output `undef_token_number'.
9891 * data/bison.simple, data/bison.c++: Use them.
9892 Be sure to map invalid yylex return values to
9893 `undef_token_number'. This saves us from gratuitous SEGV.
9894
9895 * tests/conflicts.at (Solved SR Conflicts)
9896 (Unresolved SR Conflicts): Adjust.
9897 * tests/regression.at (Web2c Actions): Adjust.
9898
06446ccf
AD
98992002-04-08 Akim Demaille <akim@epita.fr>
9900
9901 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
9902 Adding #line.
9903 Remove the duplicate `typedefs'.
9904 (RhsNumberType): Fix the declaration and various other typos.
9905 Use __ofile__.
9906 * data/bison.simple: Use __ofile__.
9907 * src/scan-skel.l: Handle __ofile__.
9908
62a3e4f0
AD
99092002-04-08 Akim Demaille <akim@epita.fr>
9910
9911 * src/gram.h (item_number_t): New, the type of item numbers in
9912 RITEM. Note that it must be able to code symbol numbers as
9913 positive number, and the negation of rule numbers as negative
9914 numbers.
9915 Adjust all dependencies (pretty many).
9916 * src/reduce.c (rule): Remove this `short *' pointer: use
9917 item_number_t.
9918 * src/system.h (MINSHORT, MAXSHORT): Remove.
9919 Include `limits.h'.
9920 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
9921 (shortcpy): Remove.
9922 (MAXTABLE): Move to...
9923 * src/output.c (MAXTABLE): here.
9924 (prepare_rules): Use output_int_table to output rhs.
9925 * data/bison.simple, data/bison.c++: Adjust.
9926 * tests/torture.at (Big triangle): Move the limit from 254 to
9927 500.
9928 * tests/regression.at (Web2c Actions): Ajust.
9929
9930 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
9931 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
9932 passes, but produces negative #line number, once fixed, GCC is
9933 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
9934 C), it passes.
9935 * src/state.h (state_h): Code input lines on ints, not shorts.
9936
bb88b0fc
AD
99372002-04-08 Akim Demaille <akim@epita.fr>
9938
9939 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
9940 and then the grammar.
9941
9a636f47
AD
99422002-04-08 Akim Demaille <akim@epita.fr>
9943
9944 * src/system.h: No longer using strndup.
9945
680e8701
AD
99462002-04-07 Akim Demaille <akim@epita.fr>
9947
9948 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
9949 * src/output.c (output_table_data): Return the longest number.
9950 (prepare_tokens): Output `token_number_max').
9951 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
9952 New.
9953 Use them to define yy_token_number_type/TokenNumberType.
9954 Use this type for yytranslate.
9955 * tests/torture.at (Big triangle): Push the limit from 124 to
9956 253.
9957 * tests/regression.at (Web2c Actions): Adjust.
9958
817e9f41
AD
99592002-04-07 Akim Demaille <akim@epita.fr>
9960
9961 * tests/torture.at (Big triangle): New.
9962 (GNU AWK Grammar, GNU Cim Grammar): Move to...
9963 * tests/existing.at: here.
9964
5123689b
AD
99652002-04-07 Akim Demaille <akim@epita.fr>
9966
9967 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
9968 nritems.
9969 Adjust dependencies.
9970
f3849179
AD
99712002-04-07 Akim Demaille <akim@epita.fr>
9972
9973 * src/reader.c: Normalize increments to prefix form.
9974
bd02036a
AD
99752002-04-07 Akim Demaille <akim@epita.fr>
9976
9977 * src/reader.c, symtab.c: Remove debugging code.
9978
db8837cb
AD
99792002-04-07 Akim Demaille <akim@epita.fr>
9980
9981 Rename all the `bucket's as `symbol_t'.
9982
9983 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
9984 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
9985 * src/symtab.c, src/symtab.h (bucket): Rename as...
9986 (symbol_t): this.
9987 (symbol_list_new, bucket_check_defined, bucket_make_alias)
9988 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
9989 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
9990 (buckets_new, buckets_free, buckets_do): Rename as...
9991 (symbol_list_new, symbol_check_defined, symbol_make_alias)
9992 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
9993 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
9994 (symbols_new, symbols_free, symbols_do): these.
9995
72a23c97
AD
99962002-04-07 Akim Demaille <akim@epita.fr>
9997
9998 Use lib/hash for the symbol table.
9999
10000 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
10001 EOF.
10002 * src/lex.c (lex): Set the `number' member of new terminals.
10003 * src/reader.c (bucket_check_defined, bucket_make_alias)
10004 (bucket_check_alias_consistence, bucket_translation): New.
10005 (reader, grammar_free, readgram, token_translations_init)
10006 (packsymbols): Adjust.
10007 (reader): Number the predefined tokens.
10008 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
10009 for predefined tokens.
10010 * src/symtab.h (bucket): Remove all the hash table related
10011 members.
10012 * src/symtab.c (symtab): Replace by...
10013 (bucket_table): this.
10014 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
10015 (buckets_new, buckets_do): New.
10016
280a38c3
AD
100172002-04-07 Akim Demaille <akim@epita.fr>
10018
10019 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
10020 (start_symbol, max_user_token_number, semantic_parser)
10021 (error_token_number): Initialize.
10022 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
10023 Initialize.
10024 (reader): Don't.
10025 (errtoken, eoftoken, undeftoken, axiom): Extern.
10026
03b31c0c
AD
100272002-04-07 Akim Demaille <akim@epita.fr>
10028
10029 * src/gram.h (rule_s): prec and precsym are now pointers
10030 to the bucket giving the priority/associativity.
10031 Member `associativity' removed: useless.
10032 * src/reduce.c, src/conflicts.c: Adjust.
10033
8b3df748
AD
100342002-04-07 Akim Demaille <akim@epita.fr>
10035
10036 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
10037 Properly escape the symbols' TAG when outputting them.
10038
e601aa1d
AD
100392002-04-07 Akim Demaille <akim@epita.fr>
10040
10041 * src/lalr.h (LA): Is a bitsetv, not bitset*.
10042
b0299a2e
AD
100432002-04-07 Akim Demaille <akim@epita.fr>
10044
10045 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
10046 (LArule): this, which is an array to rule_t*.
10047 * src/print.c, src/conflicts.c: Adjust.
10048
d7e1f00c
AD
100492002-04-07 Akim Demaille <akim@epita.fr>
10050
10051 * src/gram.h (rule_t): Rename `number' as `user_number'.
10052 `number' is a new member.
10053 Adjust dependencies.
10054 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
10055
cc9305dd
AD
100562002-04-07 Akim Demaille <akim@epita.fr>
10057
10058 As a result of the previous patch, it is no longer needed
10059 to reorder ritem itself.
10060
10061 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
10062
b0940840
AD
100632002-04-07 Akim Demaille <akim@epita.fr>
10064
10065 Be sure never to walk through RITEMS, but use only data related to
10066 the rules themselves. RITEMS should be banished.
10067
10068 * src/output.c (output_token_translations): Rename as...
10069 (prepare_tokens): this.
10070 In addition to `translate', prepare the muscles `tname' and
10071 `toknum', which were handled by...
10072 (output_rule_data): this.
10073 Remove, and move the remainder of its outputs into...
10074 (prepare_rules): this new routines, which also merges content from
10075 (output_gram): this.
10076 (prepare_rules): Be sure never to walk through RITEMS.
10077 (output_stos): Rename as...
10078 (prepare_stos): this.
10079 (output): Always invoke prepare_states, after all, just don't use it
10080 in the output if you don't need it.
10081
643a5994
AD
100822002-04-07 Akim Demaille <akim@epita.fr>
10083
10084 * src/LR0.c (new_state): Display `nstates' as the name of the
10085 newly created state.
10086 Adjust to initialize first_state and last_state if needed.
10087 Be sure to distinguish the initial from the final state.
10088 (new_states): Create the itemset of the initial state, and use
10089 new_state.
10090 * src/closure.c (closure): Now that the initial state has its
10091 items properly set, there is no need for a special case when
10092 creating `ruleset'.
10093
10094 As a result, now the rule 0, reducing to $axiom, is visible in the
10095 outputs. Adjust the test suite.
10096
10097 * tests/conflicts.at (Solved SR Conflicts)
10098 (Unresolved SR Conflicts): Adjust.
10099 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
10100 * tests/conflicts.at (S/R in initial): New.
10101
b4c4ccc2
AD
101022002-04-07 Akim Demaille <akim@epita.fr>
10103
10104 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
10105 the RHS of the rules.
10106 * src/output.c (output_gram): Likewise.
10107
bba97eb2
AD
101082002-04-07 Akim Demaille <akim@epita.fr>
10109
10110 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
10111 bucket.
10112 Adjust all dependencies.
10113 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
10114 `number' of the buckets too.
10115 * src/gram.h: Include `symtab.h'.
10116 (associativity): Move to...
10117 * src/symtab.h: here.
10118 No longer include `gram.h'.
10119
c3b407f4
AD
101202002-04-07 Akim Demaille <akim@epita.fr>
10121
10122 * src/gram.h, src/gram.c (rules_rhs_length): New.
10123 (ritem_longest_rhs): Use it.
10124 * src/gram.h (rule_t): `number' is a new member.
10125 * src/reader.c (packgram): Set it.
10126 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
10127 the end of `rules', and count them out of `nrules'.
10128 (reduce_output, dump_grammar): Adjust.
10129 * src/print.c (print_grammar): It is no longer needed to check for
10130 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
10131 * tests/reduce.at (Reduced Automaton): New test.
10132
11652ab3
AD
101332002-04-07 Akim Demaille <akim@epita.fr>
10134
10135 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
10136 lacking `+ 1' to nrules, Bison reported as useless a token if it
10137 was used solely to set the precedence of the last rule...
10138
26b23c1a
AD
101392002-04-07 Akim Demaille <akim@epita.fr>
10140
10141 * data/bison.c++, data/bison.simple: Don't output the current file
10142 name in #line, to avoid useless diffs between two identical
10143 outputs under different names.
10144
18bcecb0
AD
101452002-04-07 Akim Demaille <akim@epita.fr>
10146
10147 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
10148 Normalize loops to using `< nrules + 1', not `<= nrules'.
10149
fa770c86
AD
101502002-04-07 Akim Demaille <akim@epita.fr>
10151
10152 * TODO: Update.
10153
d9b739c3
AD
101542002-04-07 Akim Demaille <akim@epita.fr>
10155
10156 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
10157 bucket.value as bucket.number.
10158
99013900
AD
101592002-04-07 Akim Demaille <akim@epita.fr>
10160
10161 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
10162 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
10163 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
10164 RHS, instead of being an index in RITEMS.
10165
e966383b
PE
101662002-04-04 Paul Eggert <eggert@twinsun.com>
10167
10168 * doc/bison.texinfo: Update copyright date.
10169 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
10170 (Symbols): Warn about running Bison in one character set,
10171 but compiling and/or running in an incompatible one.
10172 Warn about character code 256, too.
10173
101742002-04-03 Paul Eggert <eggert@twinsun.com>
10175
10176 * src/bison.data (YYSTACK_ALLOC): Depend on whether
10177 YYERROR_VERBOSE is nonzero, not whether it is defined.
10178
10179 Merge changes from bison-1_29-branch.
c307773e 10180
8d6c48b9
PE
101812002-03-20 Paul Eggert <eggert@twinsun.com>
10182
10183 Merge fixes from Debian bison_1.34-1.diff.
10184
10185 * configure.in (AC_PREREQ): 2.53.
10186
e53c6322
AD
101872002-03-20 Akim Demaille <akim@epita.fr>
10188
10189 * src/conflicts.c (log_resolution): Argument `resolution' is const.
10190
9ffbeca7
PE
101912002-03-19 Paul Eggert <eggert@twinsun.com>
10192
21db0b2a
PE
10193 * src/bison.simple (YYCOPY): New macro.
10194 (YYSTACK_RELOCATE): Use it.
10195 Remove Type arg; no longer needed. All callers changed.
10196 (yymemcpy): Remove; no longer needed.
10197
9ffbeca7
PE
10198 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
10199 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
10200
642cb8f8
AD
102012002-03-19 Akim Demaille <akim@epita.fr>
10202
10203 Test and fix the #line outputs.
10204
10205 * tests/atlocal.at (GCC): New.
10206 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 10207 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
10208 (Action synch line, Epilogue synch line): New tests.
10209 * src/reader.c (parse_union_decl): Define the muscle stype_line.
10210 * data/bison.simple, data/bison.c++: Use it.
10211
3c31a486
AD
102122002-03-19 Akim Demaille <akim@epita.fr>
10213
10214 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
10215 (Solved SR Conflicts, %expect not enough, %expect right)
10216 (%expect too much): Move to...
10217 * tests/conflicts.at: this new file.
10218
0d8bed56
AD
102192002-03-19 Akim Demaille <akim@epita.fr>
10220
10221 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
10222 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
10223 that we can move to enums for instance.
10224 * src/output.c (token_definitions_output): Output a list of
10225 `token-name, token-number' instead of the #define.
10226 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
10227
9208d17f
AD
102282002-03-14 Akim Demaille <akim@epita.fr>
10229
10230 Use Gettext 0.11.1.
10231
af27eacb
RA
102322002-03-09 Robert Anisko <robert@lrde.epita.fr>
10233
10234 * data/bison.c++: Make the user able to add members to the generated
10235 parser by subclassing.
10236
9101a310
RA
102372002-03-05 Robert Anisko <robert@lrde.epita.fr>
10238
10239 * src/reader.c (read_additionnal_code): `c' should be an integer, not
10240 a character.
10241 Reported by Nicolas Tisserand and Nicolas Burrus.
10242
fff9bf0b
RA
102432002-03-04 Robert Anisko <robert@lrde.epita.fr>
10244
10245 * src/reader.c: Warn about lacking semi-colons, do not complain.
10246
64dba31e
RA
102472002-03-04 Robert Anisko <robert@lrde.epita.fr>
10248
10249 * data/bison.c++: Remove a debug line.
10250
374f5a14
RA
102512002-03-04 Robert Anisko <robert@lrde.epita.fr>
10252
10253 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
10254 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
10255 provide a default implementation.
10256
bfcf1f3a
AD
102572002-03-04 Akim Demaille <akim@epita.fr>
10258
10259 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
10260 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
10261 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
10262 * tests/semantic.at (Parsing Guards): Similarly.
10263 * src/reader.at (readgram): Complain if the last rule is not ended
10264 with a semi-colon.
10265
65ccf9fc
AD
102662002-03-04 Akim Demaille <akim@epita.fr>
10267
10268 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
10269 * src/closure.c: here.
10270 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
10271 RTC.
10272 * src/warshall.h, src/warshall.c: Remove.
10273 * tests/sets.at (Broken Closure): Adjust.
10274
d0039cbc
AD
102752002-03-04 Akim Demaille <akim@epita.fr>
10276
10277 * src/output.c (output_skeleton): tempdir is const.
10278 bytes_read is unused.
10279
345cea78
AD
102802002-03-04 Akim Demaille <akim@epita.fr>
10281
10282 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
10283 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
10284 Update.
10285 From Michael Hayes.
10286
564801f7
AD
102872002-03-04 Akim Demaille <akim@epita.fr>
10288
10289 * src/closure.c (closure): `r' is unused.
10290
e5352bc7
AD
102912002-03-04 Akim Demaille <akim@epita.fr>
10292
10293 * tests/sets.at (Broken Closure): Add the ending `;'.
10294 * src/reader.at (readgram): Complain if a rule is not ended with a
10295 semi-colon.
10296
914feea9
AD
102972002-03-04 Akim Demaille <akim@epita.fr>
10298
10299 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
10300 (count_sr_conflicts): Use bitset_count.
10301 * src/reduce.c (inaccessable_symbols): Ditto.
10302 (bits_size): Remove.
10303 * src/warshall.h, src/warshall.c: Convert to bitsetv.
10304
f0250de6
AD
103052002-03-04 Akim Demaille <akim@epita.fr>
10306
10307 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
10308 * src/reduce.c: Remove the `bitset_zero's following the
10309 `bitset_create's, as now it is performed by the latter.
10310
ef017502
AD
103112002-03-04 Akim Demaille <akim@epita.fr>
10312
10313 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
10314 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
10315 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
10316 latest sources from Michael.
10317
76514394
AD
103182002-03-04 Akim Demaille <akim@epita.fr>
10319
10320 * src/output.c (output): Don't free the grammar.
10321 * src/reader.c (grammar_free): New.
10322 * src/main.c (main): Call it and don't free symtab here.
10323
55024580
AD
103242002-03-04 Akim Demaille <akim@epita.fr>
10325
10326 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
10327 before returning.
10328 Reported by Benoit Perrot.
10329
f9abaa2c
AD
103302002-03-04 Akim Demaille <akim@epita.fr>
10331
10332 Use bitset operations when possible, not loops over bits.
10333
10334 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
10335 bitset_or.
10336 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
10337 * src/reduce.c (useless_nonterminals): Formatting changes.
10338 * src/warshall.c (TC): Use bitset_or.
10339
0e721e75
AD
103402002-03-04 Akim Demaille <akim@epita.fr>
10341
10342 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
10343 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
10344 Ditto.
10345
0fb1ffb1
AD
103462002-03-04 Akim Demaille <akim@epita.fr>
10347
10348 * src/lalr.c (F): Now a bitset*.
10349 Adjust all dependencies.
10350
b86796bf
AD
103512002-03-04 Akim Demaille <akim@epita.fr>
10352
10353 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
10354 Adjust all dependencies.
10355
602bbf31
AD
103562002-03-04 Akim Demaille <akim@epita.fr>
10357
10358 * src/L0.c, src/LR0.h (nstates): Be size_t.
10359 Adjust comparisons (signed vs unsigned).
10360 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
10361 bitset*.
10362 Adjust all dependencies.
10363
d8a0245c
AD
103642002-03-04 Akim Demaille <akim@epita.fr>
10365
10366 * src/closure.c (firsts): Now, also a bitset.
10367 Adjust all dependencies.
10368 (varsetsize): Remove, now unused.
10369 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
10370
34ba9743
AD
103712002-03-04 Akim Demaille <akim@epita.fr>
10372
10373 * src/print.c: Convert to use bitset.h, not hand coded iterations
10374 over ints.
10375
ed86e78c
AD
103762002-03-04 Akim Demaille <akim@epita.fr>
10377
10378 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
10379
dfdb1797
AD
103802002-03-04 Akim Demaille <akim@epita.fr>
10381
10382 * src/closure.c (ruleset): Be a bitset.
10383 (rulesetsize): Remove.
10384
7086e707
AD
103852002-03-04 Akim Demaille <akim@epita.fr>
10386
10387 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
10388 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
10389 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
10390 * src/closure.c (fderives): Be an array of bitsets.
10391
98254360
RA
103922002-02-28 Robert Anisko <robert@lrde.epita.fr>
10393
10394 * data/bison.c++: Merge the two generated headers. Insert a copyright
10395 notice in each output file.
10396
a75c057f
AD
103972002-02-28 Akim Demaille <akim@epita.fr>
10398
10399 * data/bison.c++: Copy the prologue of bison.simple to fetch
10400 useful M4 definitions, such as b4_header_guard.
10401
06b00abc
AD
104022002-02-25 Akim Demaille <akim@epita.fr>
10403
10404 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
10405 translator friendly scheme for the bgr
10406 copyright notice.
06b00abc 10407
70e7d534
AD
104082002-02-25 Akim Demaille <akim@epita.fr>
10409
10410 * src/output.c (header_output): Remove, now handled completely via
10411 M4.
10412
abe017f6
AD
104132002-02-25 Akim Demaille <akim@epita.fr>
10414
10415 * m4/m4.m4: New, from CVS Autoconf.
10416 * configure.in: Invoke it.
10417 * src/output.c (output_skeleton): Use its result instead of the
10418 hard coded name.
10419
381fb12e
AD
104202002-02-25 Akim Demaille <akim@epita.fr>
10421
10422 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
10423 Fileutils 4.1.5.
10424 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
10425 * src/output.c (output_skeleton): Use mkstemp to create a real
10426 temporary file.
10427 Move the filling of `skeleton' and its muscle to...
10428 (prepare): here.
10429 (output): Move the definition of the prologue muscle to...
10430 (prepare): here.
10431 * src/system.h (DEFAULT_TMPDIR): New.
10432
6f38107f
PE
104332002-02-14 Paul Eggert <eggert@twinsun.com>
10434
10435 Remove the support for C++ namespace cleanliness; it was
10436 causing more problems than it was curing, since it didn't work
10437 properly on some nonstandard C++ compilers. This can wait
10438 for a proper C++ parser.
10439
10440 * NEWS: Document this.
10441 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
10442 of C++, as it's treated like C now.
10443 * src/bison.simple (YYSTD): Remove.
10444 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
10445 Treat C++ just like Standard C instead of trying to support
10446 namespace cleanliness.
10447
80cce3da
AD
104482002-02-14 Akim Demaille <akim@epita.fr>
10449
10450 * tests/regression.at (else): Adjust to Andreas' change.
10451
842e8679
AD
104522002-02-14 Akim Demaille <akim@epita.fr>
10453
10454 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
10455
4bda3f10
AD
104562002-02-13 Andreas Schwab <schwab@suse.de>
10457
10458 * src/output.c (output_rule_data): Don't output NULL, it might
10459 not be defined yet.
10460
4162fa07 104612002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 10462
4162fa07
RA
10463 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
10464 (Copyright notice): Update.
b418ecd8 10465
bd16a5dc
AD
104662002-02-11 Akim Demaille <akim@epita.fr>
10467
10468 * tests/regression.at (%nonassoc and eof): Don't include
10469 nonportable headers.
10470
8d69a1a3
RA
104712002-02-08 Robert Anisko <robert@lrde.epita.fr>
10472
10473 * data/bison.c++: Correct error recovery. Make the user able to
10474 initialize the starting location.
10475
9b2d0677
AD
104762002-02-07 Akim Demaille <akim@epita.fr>
10477
10478 * tests/input.at: New.
10479
69e2658b
RA
104802002-02-07 Robert Anisko <robert@lrde.epita.fr>
10481
10482 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 10483 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
10484 directives around tables only needed for debugging.
10485
4aacc3a7
RA
104862002-02-07 Robert Anisko <robert@lrde.epita.fr>
10487
10488 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
10489 C++ parsers.
10490 (yy::b4_name::parse): Use print_.
10491
762a801e
RA
104922002-02-07 Robert Anisko <robert@lrde.epita.fr>
10493
10494 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
10495
4bb2bc3f
RA
104962002-02-07 Robert Anisko <robert@lrde.epita.fr>
10497
10498 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
10499 C++ parsers.
10500 (yy::b4_name::parse): Build verbose error messages, and use error_.
10501
6b45a3ca
RA
105022002-02-06 Robert Anisko <robert@lrde.epita.fr>
10503
10504 * data/bison.c++: Fix m4 quoting in comments.
10505
50997c6e
RA
105062002-02-06 Robert Anisko <robert@lrde.epita.fr>
10507
10508 * data/bison.c++: Adjust the parser code. Fix some muscles that were
10509 not expanded by m4.
10510
3f3eed27
AD
105112002-02-05 Akim Demaille <akim@epita.fr>
10512
10513 * data/bison.c++: Adjust to the M4 back end.
10514 More is certainly needed.
10515
be2a1a68
AD
105162002-02-05 Akim Demaille <akim@epita.fr>
10517
10518 Give a try to M4 as a back end.
10519
10520 * lib/readpipe.c: New, from wdiff.
10521 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
10522 BISON_HAIRY.
10523 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
10524 specific values. Now it is m4 that performs the lookup.
10525 * src/parse-skel.y: Remove.
10526 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
10527 * src/output.c (actions_output, guards_output)
10528 (token_definitions_output): No longer keeps track of the output
10529 line number, hence remove the second argument.
10530 (guards_output): Check against the guard member of a rule, not the
10531 action member.
10532 Adjust callers.
10533 (output_skeleton): Don't look for the skeleton location, let m4 do
10534 that.
10535 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
10536 file will be used.
10537 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
10538 (prepare): Given that for the time being changesyntax is not
10539 usable in M4, rename the muscles using `-' to `_'.
10540 Define `defines_flag', `output_parser_name' and `output_header_name'.
10541 * src/output.h (actions_output, guards_output)
10542 (token_definitions_output): Adjust prototypes.
10543 * src/scan-skel.l: Instead of scanning the skeletons, it now
10544 processes the output of m4: `__oline__' and `#output'.
10545 * data/bison.simple: Adjust to be used by M4(sugar).
10546 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
10547 to date.
10548 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
10549 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
10550 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
10551 shamelessly stolen from CVS Autoconf.
10552
beda758b
AD
105532002-02-05 Akim Demaille <akim@epita.fr>
10554
10555 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
10556 * configure.in: Check for the declarations of free and malloc.
10557 * src/muscle_tab.c: Adjust.
10558
5ece6d43
AD
105592002-02-05 Akim Demaille <akim@epita.fr>
10560
10561 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
10562 which have no values.
10563
5bb18f9a
AD
105642002-02-05 Akim Demaille <akim@epita.fr>
10565
10566 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
10567 * data/: here.
10568
894dd62e
PE
105692002-01-29 Paul Eggert <eggert@twinsun.com>
10570
10571 * src/bison.simple (YYSIZE_T): Do not define merely because
10572 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
10573 On some platforms, <alloca.h> does not declare YYSTD (size_t).
10574
82841af7
AD
105752002-01-27 Akim Demaille <akim@epita.fr>
10576
10577 Fix `%nonassoc and eof'.
10578
10579 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
10580 which were not properly copied! Replace
10581 memcpy (res->errs, src->errs, src->nerrs);
10582 with
10583 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
10584 !!!
10585 * tests/regression.at (%nonassoc and eof): Adjust to newest
10586 Autotest: `.' is not in the PATH.
10587
318b76e9
AD
105882002-01-27 Akim Demaille <akim@epita.fr>
10589
10590 * tests/sets.at (AT_EXTRACT_SETS): New.
10591 (Nullable): Use it.
10592 (Firsts): New.
10593
30d2f3d5
AD
105942002-01-26 Akim Demaille <akim@epita.fr>
10595
10596 * tests/actions.at, tests/calc.at, tests/headers.at,
10597 * tests/torture.at: Adjust to the newest Autotest which no longer
10598 forces `.' in the PATH.
10599
30f8c395
AD
106002002-01-25 Akim Demaille <akim@epita.fr>
10601
10602 * tests/regression.at (%nonassoc and eof): New.
10603 Suggested by Robert Anisko.
10604
29ae55f1
AD
106052002-01-24 Akim Demaille <akim@epita.fr>
10606
10607 Bison dumps core when trying to complain about broken input files.
10608 Reported by Cris van Pelt.
10609
10610 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
10611 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
10612 into...
10613 (Invalid inputs): Strengthen: exercise parse_percent_token.
10614
2b548aa6
RA
106152002-01-24 Robert Anisko <robert.anisko@epita.fr>
10616
10617 * src/Makefile.am: Add bison.c++.
10618 * src/bison.c++: New skeleton.
10619
bb0146c2
AD
106202002-01-21 Paolo Bonzini <bonzini@gnu.org>
10621
10622 * po/it.po: New.
10623
bec30531
AD
106242002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
10625
10626 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
10627
fc6edc45
MA
106282002-01-20 Marc Autret <marc@gnu.org>
10629
10630 * src/files.c (compute_output_file_names): Fix
10631
5e5d5415
MA
106322002-01-20 Marc Autret <marc@gnu.org>
10633
10634 * tests/output.at: New test.
10635 * src/files.c (compute_base_names): Don't map extensions when
10636 the YACC flag is set, use defaults.
10637 Reported by Evgeny Stambulchik.
10638
44ea3fbd
MA
106392002-01-20 Marc Autret <marc@gnu.org>
10640
ba0fe3c7
PE
10641 * src/system.h: Need to define __attribute__ away for non-GCC
10642 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
10643 Suggested by Albert Chin-A-Young.
10644
338963d1
TVH
106452002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
10646
10647 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
10648 canonical definition.
10649 * src/system.h: Use the canonical definition for PARAMS (avoids
10650 a conflict with the macro from lib/hash.h).
10651
c57b2479
AD
106522002-01-11 Akim Demaille <akim@epita.fr>
10653
10654 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 10655 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 10656
b85810ae
AD
106572002-01-09 Akim Demaille <akim@epita.fr>
10658
10659 * src/files.c, src/files.h (output_infix): New.
10660 (tab_extension): Remove.
10661 (compute_base_names): Compute the former, drop the latter.
10662 * src/output.c (prepare): Insert the muscles `output-infix', and
10663 `output-suffix'.
10664 * src/parse-skel.y (string, string.1): New.
10665 (section.header): Use it.
10666 (section.yacc): Remove.
10667 (prefix): Remove too.
10668 * src/scan-skel.l: Adjust.
10669 * src/bison.simple, src/bison.hairy: Adjust.
10670
cae60122
AD
106712002-01-09 Akim Demaille <akim@epita.fr>
10672
10673 * configure.in (WERROR_CFLAGS): Compute it.
10674 * src/Makefile.am (CFLAGS): Pass it.
10675 * tests/atlocal.in (CFLAGS): Idem.
10676 * src/files.c: Fix a few warnings.
10677 (get_extension_index): Remove, unused.
10678
ae404801
AD
106792002-01-08 Akim Demaille <akim@epita.fr>
10680
10681 * src/getargs.c (AS_FILE_NAME): New.
10682 (getargs): Use it to convert DOSish file names.
10683 * src/files.c (base_name): Rename as full_base_name to avoid
10684 clashes with `base_name ()'.
10685 (filename_split): New.
10686 (compute_base_names): N-th rewrite, using filename_split.
10687
22312b71
AD
106882002-01-08 Akim Demaille <akim@epita.fr>
10689
10690 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
10691 New, stolen from the Fileutils 4.1.
10692 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
10693 * configure.in: Check for the presence of memrchr, and of its
10694 prototype.
10695
a67cef01
TVH
106962002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
10697
10698 * lib/hash.h (__P): Added definition for this macro.
10699 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
10700 BUILT_SOURCES, to ensure they are generated first.
10701 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
10702 %error-verbose to allow bootstrapping with bison 1.30x.
10703
2b25d624
AD
107042002-01-06 Akim Demaille <akim@epita.fr>
10705
10706 * src/reader.c (parse_braces): Don't fetch the next char, the
10707 convention is to fetch on entry.
10708 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
10709 'switch' without a following semicolon.
10710 * tests/regression.at (braces parsing): New.
10711
3460813b
AD
107122002-01-06 Akim Demaille <akim@epita.fr>
10713
10714 Bison is dead wrong in its RR conflict reports.
10715
10716 * tests/torture.at (GNU Cim Grammar): New.
10717 * src/conflicts.c (count_rr_conflicts): Fix.
10718
73784c64
AD
107192002-01-06 Akim Demaille <akim@epita.fr>
10720
10721 Creating package.m4 from configure.ac causes too many problems.
10722
10723 * tests/Makefile.am (package.m4): Create it by hand,
10724 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
10725
25d81090
AD
107262002-01-06 Akim Demaille <akim@epita.fr>
10727
10728 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
10729 skeleton.h.
10730
a9b8959e
PE
107312002-01-04 Paul Eggert <eggert@twinsun.com>
10732
10733 * doc/bison.texinfo (Debugging):
10734 Remove YYSTDERR; it's no longer defined or used.
10735 Also, s/cstdio.h/cstdio/.
10736
25d81090
AD
107372002-01-03 Akim Demaille <akim@epita.fr>
10738
10739 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
10740
1109455c
AD
107412002-01-03 Akim Demaille <akim@epita.fr>
10742
10743 * src/parse-skel.y (process_skeleton): Don't bind the parser's
10744 tracing code to --trace, wait for a better --trace option, with
10745 args.
10746
7ea5e977
AD
107472002-01-03 Akim Demaille <akim@epita.fr>
10748
10749 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
10750 The ISO C++ standard is extremely clear about it: stderr is
10751 considered a macro, not a regular symbol (see table 94 `Header
10752 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
10753 Therefore std:: does not apply to it. It still does with fprintf.
10754 Also, s/cstdio.h/cstdio/.
10755
fab5b110
AD
107562002-01-03 Akim Demaille <akim@epita.fr>
10757
10758 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
10759 for non system headers.
10760
aed7fd9b
AD
107612002-01-02 Akim Demaille <akim@epita.fr>
10762
10763 Equip the skeleton chain with location tracking, runtime trace,
10764 pure parser and scanner.
10765
10766 * src/parse-skel.y: Request a pure parser, locations, and prefix
10767 renaming.
10768 (%union): Having several members with the same type does not help
10769 type mismatches, simplify.
10770 (YYPRINT, yyprint): New.
10771 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
10772 (skel_error): this.
10773 Handle locations.
10774 * src/scan-skel.l: Adjust to these changes.
10775 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
10776 (LOCATION_PRINT, skel_control_t): New.
10777
24fad99e
AD
107782001-12-30 Akim Demaille <akim@epita.fr>
10779
10780 * src/parse-skel.y: Get rid of the shift/reduce conflict:
10781 replace `gb' with BLANKS.
10782 * src/scan-skel.l: Adjust.
10783
a4b36db4
AD
107842001-12-30 Akim Demaille <akim@epita.fr>
10785
10786 * src/system.h: We don't need nor want bcopy.
10787 Throw away MS-DOS crap: we don't need getpid.
10788 * configure.in: We don't need strndup. It was even causing
10789 problems: because Flex includes the headers *before* us,
10790 _GNU_SOURCE is not defined by config.h, and therefore strndup was
10791 not visible.
10792 * lib/xstrndup.c: New.
10793 * src/scan-skel.l: Use it.
10794 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
10795 * src/parse-skel.y: Use %directives instead of #defines.
10796
1239777d
AD
107972001-12-30 Akim Demaille <akim@epita.fr>
10798
10799 * src/skeleton.h: New.
10800 * src/output.c (output_parser, output_master_parser): Remove, dead
10801 code.
10802 * src/output.h (get_lines_number, actions_output, guards_output)
10803 (token_definitions_output): Prototype them.
10804 * src/parse-skel.y: Add the license notice.
10805 Include output.h and skeleton.h.
10806 (process_skeleton): Returns void, and takes a single parameter.
10807 * src/scan-skel.l: Add the license notice.
10808 Include skeleton.h.
10809 Don't use %option yylineno: it seems that then Flex imagines
10810 REJECT has been used, and therefore it won't reallocate its
10811 buffers (which makes no other sense to me than a bug). It results
10812 in warnings for `unused: yy_flex_realloc'.
10813
9b3add5b
RA
108142001-12-30 Robert Anisko <robert.anisko@epita.fr>
10815
10816 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
10817 (MUSCLE_INSERT_PREFIX): ...to there.
10818 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
10819 (MUSCLE_INSERT_PREFIX): Move from here...
10820
10821 * src/bison.hairy: Add a section directive. Put braces around muscle
10822 names. This parser skeleton is still broken, but Bison should not
10823 choke on a bad muscle 'syntax'.
10824 * src/bison.simple: Add a section directive. Put braces around muscle
10825 names.
10826
10827 * src/files.h (strsuffix, stringappend): Add declarations.
10828 (tab_extension): Add declaration.
10829 (short_base_name): Add declaration.
10830
10831 * src/files.c (strsuffix, stringappend): No longer static. These
10832 functions are used in the skeleton parser.
10833 (tab_extension): New.
10834 (compute_base_names): Use the computations done in this function
fab5b110 10835 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
10836 names.
10837 (short_base_name): No longer static.
10838
10839 * src/output.c (output_skeleton): New.
10840 (output): Disable call to output_master_parser, and give a try to
10841 a new skeleton handling system.
10842 (guards_output, actions_output): No longer static.
10843 (token_definitions_output, get_lines_number): No longer static.
10844
10845 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
10846
fab5b110 10847 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
10848 parse-skel.y.
10849
10850 * src/parse-skel.y: New file.
10851 * src/scan-skel.l: New file.
10852
b5b61c61
AD
108532001-12-29 Akim Demaille <akim@epita.fr>
10854
10855 %name-prefix is broken.
10856
10857 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
10858 Adjust all dependencies.
10859 * tests/headers.at (export YYLTYPE): Strengthen this test: use
10860 %name-prefix.
10861
10862 Renaming yylval but not yylloc is not consistent. Now we do.
10863
10864 * src/bison.simple: Prefix yylloc if used.
10865 * doc/bison.texinfo (Decl Summary): Document that.
10866
8c9a50be
AD
108672001-12-29 Akim Demaille <akim@epita.fr>
10868
10869 * doc/bison.texinfo: Promote `%long-directive' over
10870 `%long_directive'.
10871 Remove all references to fixed-output-files, yacc is enough.
10872
d99361e6
AD
108732001-12-29 Akim Demaille <akim@epita.fr>
10874
10875 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
10876 user prologue. These are defaults.
10877 * tests/actions.at (Mid-rule actions): Make sure the user can
10878 define YYDEBUG and YYERROR_VERBOSE.
10879
b9cecb91
AD
108802001-12-29 Akim Demaille <akim@epita.fr>
10881
10882 * src/output.c (header_output): Don't forget to export YYLTYPE and
10883 yylloc.
10884 * tests/headers.at (export YYLTYPE): New, make sure it does.
10885 * tests/regression.at (%union and --defines, Invalid CPP headers):
10886 Move to...
10887 * tests/headers.at: here.
10888
aea13e97
AD
108892001-12-29 Akim Demaille <akim@epita.fr>
10890
10891 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
10892
931394cb
AD
108932001-12-29 Akim Demaille <akim@epita.fr>
10894
10895 * tests/actions.at (Mid-rule actions): Output on a single line
10896 instead of several.
10897
704a47c4
AD
108982001-12-29 Akim Demaille <akim@epita.fr>
10899
10900 * doc/bison.texinfo: Formatting changes.
10901
091e20bb
AD
109022001-12-29 Akim Demaille <akim@epita.fr>
10903
10904 Don't store the token defs in a muscle, just be ready to output it
10905 on command. Now possible via `symbols'. Fixes a memory leak.
10906
10907 * src/output.c (token_definitions_output): New.
10908 (output_parser, header_output): Use it.
10909 * src/reader.c (symbols_save): Remove.
10910
cce71710
AD
109112001-12-29 Akim Demaille <akim@epita.fr>
10912
10913 * src/bison.simple: Do not provide a default for YYSTYPE and
10914 YYLTYPE before the user's prologue. Otherwise it's hardly... a
10915 default.
10916
82c035a8
AD
109172001-12-29 Akim Demaille <akim@epita.fr>
10918
10919 Mid-rule actions are simply... ignored!
10920
10921 * src/reader.c (readgram): Be sure to attach mid-rule actions to
10922 the empty-rule associated to the dummy symbol, not to the host
10923 rule.
10924 * tests/actions.at (Mid-rule actions): New.
10925
8419d367
AD
109262001-12-29 Akim Demaille <akim@epita.fr>
10927
10928 Memory leak.
10929
10930 * src/reader.c (reader): Free grammar.
10931
375d5806
AD
109322001-12-29 Akim Demaille <akim@epita.fr>
10933
10934 Memory leak.
10935
10936 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
10937 since it allocates it for each state, although only one is needed.
10938 (allocate_storage): Do it here.
10939
f51cb8ff
AD
109402001-12-29 Akim Demaille <akim@epita.fr>
10941
10942 * src/options.h, src/options.c (create_long_option_table): Rename
10943 as...
10944 (long_option_table_new): this, with a clearer prototype.
10945 (percent_table): Remove, unused,
10946 * src/getargs.c (getargs): Adjust.
10947
29e88316
AD
109482001-12-29 Akim Demaille <akim@epita.fr>
10949
10950 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
10951 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
10952 as states.
10953
b9f71f19
AD
109542001-12-29 Akim Demaille <akim@epita.fr>
10955
10956 * src/lalr.c (build_relations): Rename `states' as `states1'.
10957 Sorry, I don't understand exactly what it is, no better name...
10958
1a2b5d37
AD
109592001-12-29 Akim Demaille <akim@epita.fr>
10960
10961 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
10962 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
10963 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
10964 as rules.
10965
1cca533e
AD
109662001-12-29 Akim Demaille <akim@epita.fr>
10967
10968 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
10969 ago.
10970
c03ae966
AD
109712001-12-29 Akim Demaille <akim@epita.fr>
10972
10973 * src/reader.c, src/reader.h (user_toknums): Remove.
10974 Adjust all users to use symbols[i]->user_token_number.
10975
5a670b1e
AD
109762001-12-29 Akim Demaille <akim@epita.fr>
10977
10978 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
10979 Adjust all users to use symbols[i]->prec or ->assoc.
10980
ad949da9
AD
109812001-12-29 Akim Demaille <akim@epita.fr>
10982
10983 * src/reader.c, src/reader.h (tags): Remove.
10984 Adjust all users to use symbols[i]->tag.
10985
0e78e603
AD
109862001-12-29 Akim Demaille <akim@epita.fr>
10987
10988 * src/gram.h, src/gram.c (symbols): New, similar to state_table
10989 and rule_table.
10990 * src/reader.c (packsymbols): Fill this table.
10991 Drop sprec.
10992 * src/conflicts.c (resolve_sr_conflict): Adjust.
10993 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
10994 single table.
10995 Use symbols[i]->tag instead of tags[i].
10996
213e640e
AD
109972001-12-29 Akim Demaille <akim@epita.fr>
10998
10999 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
11000 In addition, put a comment in there, to replace...
11001 * tests/regression.at (%union and C comments): Remove.
11002
e7b8bef1
AD
110032001-12-29 Akim Demaille <akim@epita.fr>
11004
11005 * tests/regression.at (Web2c Actions): Blindly move the actual
11006 output as expected output. The contents *seem* right to me, but I
11007 can't pretend reading perfectly parser tables... Nonetheless, all
11008 the other tests pass correctly, the table look OK, even though the
11009 presence of `$axiom' is to be noted: AFAICS it is useless (but
11010 harmless).
11011
b68e7744
AD
110122001-12-29 Akim Demaille <akim@epita.fr>
11013
11014 * src/reader.c (readgram): Don't add the rule 0 if there were no
11015 rules read. In other words, add it _after_ having performed
11016 grammar sanity checks.
11017 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
11018
78d5bae9
AD
110192001-12-29 Akim Demaille <akim@epita.fr>
11020
11021 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
11022 visible, and some states have now a different number.
11023
ff442794
AD
110242001-12-29 Akim Demaille <akim@epita.fr>
11025
11026 * src/reader.c (readgram): Bind the initial rule's lineno to that
11027 of the first rule.
11028 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
11029 (Solved SR Conflicts): Adjust rule 0's line number.
11030
610ab194
AD
110312001-12-29 Akim Demaille <akim@epita.fr>
11032
11033 Fix the `GAWK Grammar' failure.
11034
11035 * src/LR0.c (final_state): Initialize to -1 so that we do compute
11036 the reductions of the first state which was mistakenly confused
11037 with the final state because precisely final_state was initialized
11038 to 0.
11039 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
11040 now noticed by Bison.
11041 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
11042 have a reduction on $default.
11043
29d29c8f
AD
110442001-12-29 Akim Demaille <akim@epita.fr>
11045
11046 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
11047 rule line numbers.
11048 * src/closure.c (print_closure): Likewise.
11049 * src/derives.c (print_derives): Likewise.
11050 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
11051 now.
11052
7c6b64d0
AD
110532001-12-29 Akim Demaille <akim@epita.fr>
11054
11055 * src/lalr.c (lookaheads_print): New.
11056 (lalr): Call it when --trace-flag.
11057 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
11058 are dumped.
11059
3d4daee3
AD
110602001-12-29 Akim Demaille <akim@epita.fr>
11061
11062 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
11063 when walking through ritem, even via rule->rhs.
11064 * src/reduce.c (dump_grammar, useful_production, reduce_output)
11065 (useful_production, useless_nonterminals): Likewise.
11066 (reduce_grammar_tables): Likewise, plus update nritems.
11067 * src/nullable.c (set_nullable): Likewise.
11068 * src/lalr.c (build_relations): Likewise.
11069 * tests/sets.at (Nullable): Adjust.
11070 Fortunately, now, the $axiom is no longer nullable.
11071
9e7f6bbd
AD
110722001-12-29 Akim Demaille <akim@epita.fr>
11073
11074 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
11075 the 0-sentinel.
11076 * src/gram.c (ritem_longest_rhs): Likewise.
11077 * src/reduce.c (nonterminals_reduce): Likewise.
11078 * src/print_graph.c (print_graph): Likewise.
11079 * src/output.c (output_rule_data): Likewise.
11080 * src/nullable.c (set_nullable): Likewise.
11081
255ef638
AD
110822001-12-29 Akim Demaille <akim@epita.fr>
11083
11084 * src/output.c: Comment changes.
11085
0d8a7363
AD
110862001-12-27 Paul Eggert <eggert@twinsun.com>
11087
11088 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
11089 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
11090 Sparc, as they were causing more porting problems than the
11091 (minor) performance improvement was worth.
11092
11093 Also, catch up with 1.31's YYSTD.
11094
3db472b9
AD
110952001-12-27 Akim Demaille <akim@epita.fr>
11096
11097 * src/output.c (output_gram): Rely on nritems, not the
11098 0-sentinel. See below.
11099 Use -1 as separator, not 0.
11100 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
11101 Rely on -1 as separator in yyrhs, instead of 0.
11102 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
11103 twice `Now at end of input', therefore there are two lines less to
11104 expect.
11105
b365aa05
AD
111062001-12-27 Akim Demaille <akim@epita.fr>
11107
11108 * tests/regression.at (Unresolved SR Conflicts):
11109 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
11110 below.
11111
30171f79
AD
111122001-12-27 Akim Demaille <akim@epita.fr>
11113
11114 * src/LR0.c (new_state): Recognize the final state by the fact it
11115 is reached by eoftoken.
11116 (insert_start_shifting_state, insert_eof_shifting_state)
11117 (insert_accepting_state, augment_automaton): Remove, since now
11118 these states are automatically computed from the initial state.
11119 (generate_states): Adjust.
11120 * src/print.c: When reporting a rule number to the user, substract
11121 1, so that the axiom rule is rule 0, and the first user rule is 1.
11122 * src/reduce.c: Likewise.
11123 * src/print_graph.c (print_core): For the time being, just as for
11124 the report, depend upon --trace-flags to dump the full set of
11125 items.
11126 * src/reader.c (readgram): Once the grammar read, insert the rule
11127 0: `$axiom: START-SYMBOL $'.
11128 * tests/set.at: Adjust: rule 0 is now displayed, and since the
11129 number of the states has changed (the final state is no longer
11130 necessarily the last), catch up.
11131
75142d45
AD
111322001-12-27 Akim Demaille <akim@epita.fr>
11133
11134 Try to make the use of the eoftoken valid. Given that its value
11135 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
11136 is used instead of > 0 where appropriate, (ii), depend upon nritems
11137 instead of the 0-sentinel.
11138
11139 * src/gram.h, src/gram.c (nritems): New.
11140 Expected to be duplication of nitems, but for the time being...
11141 * src/reader.c (packgram): Assert nritems and nitems are equal.
11142 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
11143 * src/closure.c (print_closure, print_fderives): Likewise.
11144 * src/gram.c (ritem_print): Likewise.
11145 * src/print.c (print_core, print_grammar): Likewise.
11146 * src/print_graph.c: Likewise.
11147
b7c49edf
AD
111482001-12-27 Akim Demaille <akim@epita.fr>
11149
11150 * src/main.c (main): If there are complains after grammar
11151 reductions, then output the report anyway if requested, then die.
11152 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
11153 * src/reader.c (eoftoken): New.
11154 (parse_token_decl): If the token being defined has value `0', it
11155 is the eoftoken.
11156 (packsymbols): No longer hack `tags' to insert `$' by hand.
11157 Be sure to preserve the value of the eoftoken.
11158 (reader): Make sure eoftoken is defined.
11159 Initialize nsyms to 0: now eoftoken is created just like the others.
11160 * src/print.c (print_grammar): Don't special case the eof token.
11161 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
11162 lie anyway, albeit pleasant.
11163 * tests/calc.at: Exercise error messages with eoftoken.
11164 Change the grammar so that empty input is invalid.
11165 Adjust expectations.
11166 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
11167
ec2da99f
AD
111682001-12-27 Akim Demaille <akim@epita.fr>
11169
11170 * configure.in: Check the protos of strchr ans strspn.
11171 Replace strchr if needed.
11172 * src/system.h: Provide the protos of strchr, strspn and memchr if
11173 missing.
11174 * lib/strchr.c: New.
11175 * src/reader.c (symbols_save): Use strchr.
11176
8adfa272
AD
111772001-12-27 Akim Demaille <akim@epita.fr>
11178
11179 * src/print.c, src/print_graph.c (escape): New.
11180 Use it to quote the TAGS outputs.
11181 * src/print_graph.c (print_state): Now errors are in red, and
11182 reductions in green.
11183 Prefer high to wide: output the state number on a line of its own.
11184
80dac38c
AD
111852001-12-27 Akim Demaille <akim@epita.fr>
11186
11187 * src/state.h, src/state.c (reductions_new): New.
11188 * src/LR0.c (set_state_table): Let all the states have a
11189 `reductions', even if reduced to 0.
11190 (save_reductions): Adjust.
11191 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
11192 * src/print.c (print_reductions, print_actions): Adjust.
11193 * src/output.c (action_row): Adjust.
11194
2cec70b9
AD
111952001-12-27 Akim Demaille <akim@epita.fr>
11196
11197 * src/state.h, src/state.c (errs_new, errs_dup): New.
11198 * src/LR0.c (set_state_table): Let all the states have an errs,
11199 even if reduced to 0.
11200 * src/print.c (print_errs, print_reductions): Adjust.
11201 * src/output.c (output_actions, action_row): Adjust.
11202 * src/conflicts.c (resolve_sr_conflict): Adjust.
11203
13ca549a
AD
112042001-12-27 Akim Demaille <akim@epita.fr>
11205
11206 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
11207
5092aba5
AD
112082001-12-27 Akim Demaille <akim@epita.fr>
11209
11210 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
11211 * src/print.c: here.
11212 (lookaheadset, shiftset): New, used as additional storage by
11213 print_reductions.
11214 (print_results): Adjust.
11215 (print_shifts, print_gotos, print_errs): New, extracted from...
11216 (print_actions): here.
11217 * src/print_graph.c (print_actions): Remove dead code.
11218
11e2beca
AD
112192001-12-27 Akim Demaille <akim@epita.fr>
11220
11221 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
11222 `$n' and `@n'.
11223
dac3c910
AD
112242001-12-27 Akim Demaille <akim@epita.fr>
11225
11226 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
11227 (build_relations): Adjust.
11228
d0b0fefa
AD
112292001-12-27 Akim Demaille <akim@epita.fr>
11230
11231 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
11232 duplication.
11233
adc8c848
AD
112342001-12-27 Akim Demaille <akim@epita.fr>
11235
11236 * src/reader.c (packgram): Catch nitems overflows.
11237
14d293ac
AD
112382001-12-27 Akim Demaille <akim@epita.fr>
11239
11240 * src/files.c, src/files.h (guard_obstack): Remove.
11241 * src/output.c (output): Adjust.
11242 * src/reader.c (parse_braces): New, factoring...
11243 (copy_action, copy_guard): these two which are renamed as...
11244 (parse_action, parse_guard): these.
11245 As a voluntary consequence, using braces around guards is now
11246 mandatory.
11247
f499b062
AD
112482001-12-27 Akim Demaille <akim@epita.fr>
11249
11250 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
11251 * src/reader.c (symbol_list): `guard' and `guard_line' are new
11252 members.
11253 (symbol_list_new): Adjust.
11254 (copy_action): action_line is the first line, not the last.
11255 (copy_guard): Just as for actions, store the `action' only, not
11256 the switch/case/break flesh.
11257 Don't parse the user action that might follow the guard, let...
11258 (readgram): do it, i.e., now, there can be an action after a
11259 guard.
11260 In other words the guard is just explicitly optional.
11261 (packgram): Adjust.
11262 * src/output.c (guards_output): New.
11263 (output_parser): Call it when needed.
11264 (output): Also free the guard and attrs obstacks.
11265 * src/files.c, src/files.h (obstack_save): Remove.
11266 (output_files): Remove.
11267 As a result, if one needs the former `.act' file, using an
11268 appropriate skeleton which requires actions and guards is now
11269 required.
11270 * src/main.c (main): Adjust.
11271 * tests/semantic.at: New.
11272 * tests/regression.at: Use `input.y' as input file name.
11273 Avoid 8+3 problems by requiring input.c when the test needs the
11274 parser.
11275
d945f5cd
AD
112762001-12-27 Akim Demaille <akim@epita.fr>
11277
11278 * src/reader.c (symbol_list_new): Be sure to initialize all the
11279 fields.
11280
d200e455
AD
112812001-12-27 Akim Demaille <akim@epita.fr>
11282
11283 All the hacks using a final pseudo state are now useless.
11284
11285 * src/LR0.c (set_state_table): state_table holds exactly nstates.
11286 * src/lalr.c (nLA): New.
11287 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
11288 instead of lookaheadsp from the pseudo state (nstate + 1).
11289
f9507c28
AD
112902001-12-27 Akim Demaille <akim@epita.fr>
11291
11292 * src/output.c (action_row, token_actions): Use a state_t instead
11293 of a integer, and nlookaheads instead of the following state's
11294 lookaheadsp.
11295
065fbd27
AD
112962001-12-27 Akim Demaille <akim@epita.fr>
11297
11298 * src/conflicts.c (log_resolution, flush_shift)
11299 (resolve_sr_conflict, set_conflicts, solve_conflicts)
11300 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
11301 (conflicts_print, print_reductions): Use a state_t instead of an
11302 integer when referring to a state.
11303 As much as possible, depend upon nlookaheads, instead of the
11304 `lookaheadsp' member of the following state (since lookaheads of
11305 successive states are successive, the difference between state n + 1
11306 and n served as the number of lookaheads for state n).
11307 * src/lalr.c (add_lookback_edge): Likewise.
11308 * src/print.c (print_core, print_actions, print_state)
11309 (print_results): Likewise.
11310 * src/print_graph.c (print_core, print_actions, print_state)
11311 (print_graph): Likewise.
11312 * src/conflicts.h: Adjust.
11313
1b177bd7
AD
113142001-12-27 Akim Demaille <akim@epita.fr>
11315
11316 * src/bison.hairy: Formatting/comment changes.
11317 ANSIfy.
11318 Remove `register' indications.
11319 Add plenty of `static'.
11320
7742ddeb
AD
113212001-12-27 Akim Demaille <akim@epita.fr>
11322
11323 * src/output.c (prepare): Drop the muscle `ntbase' which
11324 duplicates ntokens.
11325 * src/bison.simple: Formatting/comment changes.
11326 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
11327 is an undocumented synonym.
11328
1fa14068
AD
113292001-12-22 Akim Demaille <akim@epita.fr>
11330
11331 * src/output.c (output_table_data): Change the prototype to use
11332 `int' for array ranges: some invocations do pass an int, not a
11333 short.
11334 Reported by Wayne Green.
11335
b9752825
AD
113362001-12-22 Akim Demaille <akim@epita.fr>
11337
11338 Some actions of web2c.y are improperly triggered.
11339 Reported by Mike Castle.
11340
11341 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
11342 * tests/regression.at (Web2c): Rename as...
11343 (Web2c Report): this.
11344 (Web2c Actions): New.
11345
776209d6
AD
113462001-12-22 Akim Demaille <akim@epita.fr>
11347
11348 Reductions in web2c.y are improperly reported.
11349 Reported by Mike Castle.
11350
11351 * src/conflicts.c (print_reductions): Fix.
11352 * tests/regression.at (Web2c): New.
11353
275fc3ad
AD
113542001-12-18 Akim Demaille <akim@epita.fr>
11355
11356 Some host fail on `assert (!"foo")', which expands to
11357 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
11358 Reported by Nelson Beebee.
11359
11360 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
11361 `#define it_succeeded 0' and `assert (it_succeeded)'.
11362
897668ee
MA
113632001-12-17 Marc Autret <autret_m@epita.fr>
11364
11365 * src/bison.simple: Don't hard code the skeleton line and filename.
11366 * src/output.c (output_parser): Rename 'line' as 'output_line'.
11367 New line counter 'skeleton_line' (skeleton-line muscle).
11368
ab3399e0
PE
113692001-12-17 Paul Eggert <eggert@twinsun.com>
11370
11371 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
11372 YYDEBUG must be defined to a nonzero value.
11373
11374 * src/bison.simple (yytname): Do not assume that the user defines
11375 YYDEBUG to a properly parenthesized expression.
11376
3877f72b
AD
113772001-12-17 Akim Demaille <akim@epita.fr>
11378
11379 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
11380 nlookaheads is a new member.
11381 Adjust all users.
11382 * src/lalr.h (nlookaheads): Remove this orphan declaration.
11383 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
11384 state.
776209d6 11385
331dbc1b
AD
113862001-12-17 Akim Demaille <akim@epita.fr>
11387
11388 * src/files.h, src/files.c (open_files, close_files): Remove.
11389 * src/main.c (main): Don't open/close files, nor invoke lex_free,
11390 let...
11391 * src/reader.c (reader): Do it.
776209d6 11392
be750e4c
AD
113932001-12-17 Akim Demaille <akim@epita.fr>
11394
11395 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 11396
709ae8c6
AD
113972001-12-17 Akim Demaille <akim@epita.fr>
11398
11399 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
11400 (flush_reduce): New.
11401 (resolve_sr_conflict): Adjust.
776209d6 11402
f87685c3
AD
114032001-12-17 Akim Demaille <akim@epita.fr>
11404
11405 * src/output.c (output_obstack): Be static and rename as...
11406 (format_obstack): this, to avoid any confusion with files.c's
11407 output_obstack.
11408 * src/reader.h (muscle_obstack): Move to...
11409 * src/output.h: here, since it's defined in output.c.
11410
837491d8
AD
114112001-12-17 Akim Demaille <akim@epita.fr>
11412
11413 * src/output.c (action_row, save_column, default_goto)
11414 (sort_actions, matching_state, pack_vector): Better variable
11415 locality.
11416
796d61fb
AD
114172001-12-17 Akim Demaille <akim@epita.fr>
11418
11419 * src/output.c: Various formatting changes.
776209d6 11420
64d15509
AD
114212001-12-17 Akim Demaille <akim@epita.fr>
11422
11423 * src/files.c (output_files): Free the output_obstack.
11424 * src/main.c (main): Call print and print_graph conditionally.
11425 * src/print.c (print): Work unconditionally.
11426 * src/print_graph.c (print_graph): Work unconditionally.
11427 * src/conflicts.c (log_resolution): Output only if verbose_flag.
11428
fbc8ecb7
MA
114292001-12-16 Marc Autret <autret_m@epita.fr>
11430
11431 * src/output.c (actions_output): Fix. When we use %no-lines,
11432 there is one less line per action.
11433
f0440388
MA
114342001-12-16 Marc Autret <autret_m@epita.fr>
11435
11436 * src/bison.simple: Remove a useless #line directive.
11437 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
11438 * src/output.c (get_lines_number): New.
776209d6 11439 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
11440 output muscles.
11441 Fix line numbering.
11442 (actions_output): Computes the number of lines taken by actions.
11443 (output_master_parser): Insert new skeleton which is the name of
11444 the output parser file name.
11445
a79986b8
MA
114462001-12-15 Marc Autret <autret_m@epita.fr>
11447
11448 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
11449
4ec8e00f
MA
114502001-12-15 Marc Autret <autret_m@epita.fr>
11451
11452 * src/output.c (output_gram): Keep track of the hairy one.
11453
1a4648ff
AD
114542001-12-15 Akim Demaille <akim@epita.fr>
11455
11456 Make `make distcheck' work.
11457
11458 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
11459 system.h which uses libgettext.h.
11460
9c2c67e6
AD
114612001-12-15 Akim Demaille <akim@epita.fr>
11462
11463 * src/nullable.c (set_nullable): Useless rules must be skipped,
11464 otherwise, since we range over their symbols, we might look at a
11465 nonterminal which no longer ``exists'', i.e., it is not counted in
11466 `nvars', hence we overflow our arrays.
11467
93ede233
AD
114682001-12-15 Akim Demaille <akim@epita.fr>
11469
11470 The header can also be produced directly, without any obstack!
11471 Yahoo!
11472
11473 * src/files.c, src/files.h (defines_obstack): Remove.
11474 (compute_header_macro): Global.
11475 (defines_obstack_save): Remove.
11476 * src/reader.c (parse_union_decl): No longer output to
11477 defines_obstack: its content can be found in the `stype' muscle
11478 anyway.
11479 (output_token_translations): Merge into...
11480 (symbols_output): this.
11481 Rename as...
11482 (symbols_save): this.
11483 (reader): Adjust.
11484 * src/output.c (header_output): New.
11485 (output): Call it.
11486
2666f928
AD
114872001-12-15 Akim Demaille <akim@epita.fr>
11488
11489 * src/reader.c (parse_union_decl): Instead of handling two obstack
11490 simultaneously, use one to define the `stype' muscle, and use the
11491 value of the latter to fill defines_obstack.
11492 (copy_comment): Remove.
11493 (copy_comment2): Work for a single obstack.
11494 Rename as...
11495 (copy_comment): this.
11496
428046f8
AD
114972001-12-15 Akim Demaille <akim@epita.fr>
11498
11499 * src/lex.c, src/lex.h (xgetc): No longer static.
11500 * src/reader.c (parse_union_decl): Revamp.
11501
ea52d706
AD
115022001-12-15 Akim Demaille <akim@epita.fr>
11503
11504 Still making progress in separating Bison into (i) input, (ii)
11505 process, (iii) output: now we can directly output the parser file
11506 without using table_obstack at all.
11507
11508 * src/files.c, src/files.h (table_obstack): Bye bye.
11509 (parser_file_name): New.
11510 * src/files.c (compute_output_file_names): Compute it.
11511 * src/output.c (actions_output, output_parser)
11512 (output_master_parser): To a file instead of an obstack.
11513
3f96f4dc
AD
115142001-12-15 Akim Demaille <akim@epita.fr>
11515
11516 Attach actions to rules, instead of pre-outputting them to
11517 actions_obstack.
11518
11519 * src/gram.h (rule_t): action and action_line are new members.
11520 * src/reader.c (symbol_list): Likewise.
11521 (copy_action): Save the actions within the rule.
11522 (packgram): Save them in rule_table.
11523 * src/output.c (actions_output): New.
11524 (output_parser): Use it on `%%actions'.
11525 (output_rule_data): Don't free rule_table.
11526 (output): Do it.
11527 (prepare): Don't save the `action' muscle.
11528 * src/bison.simple: s/%%action/%%actions/.
11529
51576fb3
AD
115302001-12-15 Akim Demaille <akim@epita.fr>
11531
11532 * src/reader.c (copy_action): When --yacc, don't append a `;'
11533 to the user action: let it fail if lacking.
dee049eb 11534 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 11535
2648a72d
AD
115362001-12-14 Akim Demaille <akim@epita.fr>
11537
11538 * src/lex.c (literalchar): Simply return the char you decoded, non
11539 longer mess around with obstacks and int pointers.
11540 Adjust all callers.
11541
92790e5b
AD
115422001-12-14 Akim Demaille <akim@epita.fr>
11543
11544 * src/lex.c (literalchar): Don't escape the special characters,
11545 just decode them, and keep them as char (before, eol was output as
11546 the 2 char string `\n' etc.).
11547 * src/output.c (output_rule_data): Use quotearg to output the
11548 token strings.
11549
927c1557
PE
115502001-12-13 Paul Eggert <eggert@twinsun.com>
11551
11552 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
11553 Do not infringe on the global user namespace when using C++.
11554 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
11555 All uses of `fprintf' and `stderr' changed.
11556
11557 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
11558
ed8e1f68
AD
115592001-12-13 Akim Demaille <akim@epita.fr>
11560
11561 The computation of nullable is broken: it doesn't handle empty
11562 RHS's properly.
11563
11564 * tests/torture.at (GNU AWK Grammar): New.
11565 * tests/sets.at (Nullable): New.
11566 * src/nullable.c (set_nullable): Instead of blindly looping over
11567 `ritems', loop over the rules, and then over their rhs's.
11568
11569 Work around Autotest bugs.
11570
11571 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
11572 frame, because Autotest understand lines starting with a `+' as
11573 traces from the shell. Then, they are not processed properly.
11574 Admittedly an Autotest bug, but we don't have time to wait for
11575 Autotest to catch up.
11576 * tests/regression.at (Broken Closure): Adjust to the new table
11577 frames.
11578 Move to...
11579 * tests/sets.at: here.
11580
cb581495
AD
115812001-12-13 Akim Demaille <akim@epita.fr>
11582
11583 * src/closure.c (closure): Use nrules instead of playing tricks
11584 with BITS_PER_WORD.
11585
2e729273
AD
115862001-12-13 Akim Demaille <akim@epita.fr>
11587
11588 * src/print.c (print_actions): Output the handling of `$' as the
11589 traces do: shifting the token EOF. Before EOF was treated as a
11590 nonterminal.
11591 * tests/regression.at: Adjust some tests.
11592 * src/print_graph.c (print_core): Complete the set of items via
11593 closure. The next-to-final and final states are still unsatisfying,
11594 but that's to be addressed elsewhere.
11595 No longer output the rule numbers, but do output the state number.
11596 A single loop for the shifts + gotos is enough, but picked a
11597 distinct color for each.
11598 (print_graph): Initialize and finalize closure.
11599
107f7dfb
AD
116002001-12-13 Akim Demaille <akim@epita.fr>
11601
11602 * src/reader.c (readgram): Remove dead code, an strip useless
11603 braces.
11604 (get_type): Remove, unused.
11605
9b53a24f
AD
116062001-12-12 Akim Demaille <akim@epita.fr>
11607
11608 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
11609 on that of lib/error.c.
11610
dbfb6dcd
AD
116112001-12-12 Akim Demaille <akim@epita.fr>
11612
11613 Some hosts don't like `/' in includes.
11614
11615 * src/system.h: Include libgettext.h without qualifying the path.
11616 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
11617 $(top_srcdir).
11618
c25fb648
MA
116192001-12-11 Marc Autret <autret_m@epita.fr>
11620
11621 * src/output.c (output_parser): Remove useless muscle.
11622
710ddc4f
MA
116232001-12-11 Marc Autret <autret_m@epita.fr>
11624
11625 * src/bison.simple: Remove #line just before %%epilogue. It
11626 is now handled in ...
11627 * src/reader.c (read_additionnal_code): Add the output of a
11628 #line for the epilogue.
11629
e83d80b8
MA
116302001-12-10 Marc Autret <autret_m@epita.fr>
11631
927c1557 11632 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
11633 replace precedent remove.
11634 * src/bison.simple: Remove #line before %%prologue because
11635 %%input-line is wrong at this time.
11636
971d5158
MA
116372001-12-10 Marc Autret <autret_m@epita.fr>
11638
11639 * src/reader.c (symbols_output): Clean up.
927c1557 11640 * src/output.c (output_gram, output): Clean up.
971d5158 11641
5edafffd
AD
116422001-12-10 Akim Demaille <akim@epita.fr>
11643
11644 * src/lalr.c (initialize_lookaheads): New. Extracted from...
11645 * src/LR0.c (set_state_table): here.
11646 * src/lalr.c (lalr): Call it.
11647
0279f8e9
AD
116482001-12-10 Akim Demaille <akim@epita.fr>
11649
11650 * src/state.h (shifts): Remove the `number' member: shifts are
11651 attached to state, hence no longer need to be labelled with a
11652 state number.
11653
190c4f5f
AD
116542001-12-10 Akim Demaille <akim@epita.fr>
11655
11656 Now that states have a complete set of members, the linked list of
11657 shifts is useless: just fill directly the state's shifts member.
11658
11659 * src/state.h (shifts): Remove the `next' member.
11660 * src/LR0.c (first_state, last_state): Remove.
11661 Adjust the callers.
11662 (augment_automaton): Don't look for the shifts that must be added
11663 a shift on EOF: it is those of the state we looked for! But now,
11664 since shifts are attached, it is no longer needed to looking
11665 merely by its id: its number.
11666
2a73b93d
AD
116672001-12-10 Akim Demaille <akim@epita.fr>
11668
11669 * src/LR0.c (augment_automaton): Better variable locality.
11670 Remove an impossible branch: if there is a state corresponding to
11671 the start symbol being shifted, then there is shift for the start
11672 symbol from the initial state.
11673
74392f6a
AD
116742001-12-10 Akim Demaille <akim@epita.fr>
11675
11676 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
11677 only when appropriate: when insert_start_shifting_state' is not
11678 invoked.
11679 * tests/regression.at (Rule Line Numbers): Adjust.
11680
37c82725
AD
116812001-12-10 Akim Demaille <akim@epita.fr>
11682
11683 * src/LR0.c (augment_automaton): Now that all states have shifts,
11684 merge the two cases addition shifts to the initial state.
11685
6a164e0c
AD
116862001-12-10 Akim Demaille <akim@epita.fr>
11687
11688 * src/lalr.c (set_state_table): Move to...
11689 * src/LR0.c: here.
11690 * src/lalr.c (lalr): Don't call it...
11691 * src/LR0.c (generate_states): do it.
11692 * src/LR0.h (first_state): Remove, only the table is used.
11693
7215de24
AD
116942001-12-10 Akim Demaille <akim@epita.fr>
11695
11696 * src/LR0.h (first_shift, first_reduction): Remove.
11697 * src/lalr.c: Don't use first_shift: find shifts through the
11698 states.
11699
80e25d4d
AD
117002001-12-10 Akim Demaille <akim@epita.fr>
11701
11702 * src/LR0.c: Attach shifts to states as soon as they are
11703 computed.
11704 * src/lalr.c (set_state_table): Instead of assigning shifts to
11705 state, just assert that the mapping was properly done.
11706
0ab3728b
AD
117072001-12-10 Akim Demaille <akim@epita.fr>
11708
11709 * src/LR0.c (insert_start_shift): Rename as...
11710 (insert_start_shifting_state): this.
11711 (insert_eof_shifting_state, insert_accepting_state): New.
11712 (augment_automaton): Adjust.
11713 Better locality of the variables.
11714 When looking if the start_symbol is shifted from the initial
11715 state, using `while (... symbol != start_symbol ...)' sounds
11716 better than `while (... symbol < start_symbol ...)': If fail
11717 to see how the order between symbols could be relevant!
11718
78af9bbc
AD
117192001-12-10 Akim Demaille <akim@epita.fr>
11720
11721 * src/getargs.h: Don't declare `spec_name_prefix' and
11722 `spec_file_prefix', declared by src/files.h.
11723 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
11724 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
11725 * src/output.c (prepare): Adjust.
11726 * src/reader.c (symbols_output): Likewise.
11727 * src/vmsgetargs.c: Vaguely adjust, but who cares?
11728
bdef2a41
AD
117292001-12-10 Akim Demaille <akim@epita.fr>
11730
11731 * src/muscle_tab.c (muscle_init): NULL is a better default than
11732 `"0"'.
11733
3735969c
AD
117342001-12-10 Akim Demaille <akim@epita.fr>
11735
11736 * src/reader.c (reader): Calling symbols_output once is enough.
11737
49701457
AD
117382001-12-10 Akim Demaille <akim@epita.fr>
11739
11740 Now that states have a complete set of members, the linked list of
11741 reductions is useless: just fill directly the state's reductions
11742 member.
11743
11744 * src/state.h (struct reductions): Remove member `number' and
11745 `next'.
11746 * src/LR0.c (first_reduction, last_reduction): Remove.
11747 (save_reductions): Don't link the new reductions, store them in
11748 this_state.
11749 * src/lalr.c (set_state_table): No need to attach reductions to
11750 states, it's already done.
11751 * src/output.c (output_actions): No longer free the shifts, then
11752 the reductions, then the states: free all the states and their
11753 members.
11754
0edad749
AD
117552001-12-10 Akim Demaille <akim@epita.fr>
11756
11757 * src/options.c (OPTN, DRTV, BOTH): New.
11758 (option_table): Use them.
11759
0edad749
AD
11760 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
11761 the job of system.h.
11762 * src/options.c: Don't include stdio.h and xalloc.h for the same
11763 reasons.
11764
5449dd0f
AD
117652001-12-10 Akim Demaille <akim@epita.fr>
11766
11767 * src/output.c (output, prepare): Make sure the values of the
11768 muscles `action' and `prologue' are 0-terminated.
11769
a870c567
AD
117702001-12-10 Akim Demaille <akim@epita.fr>
11771
11772 Clean up GCC warnings.
11773
11774 * src/reader.c (copy_action): `buf' is not used.
11775 (parse_skel_decl): Be static.
11776 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
11777 * src/options.h (create_long_option_table): Have a real prototype.
11778 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
11779 (hash_delete_at): Return const void *.
11780 Adjust casts to preserve the const.
11781
80df8768
AD
117822001-12-10 Akim Demaille <akim@epita.fr>
11783
11784 * configure.in: Require 2.52g.
11785 M4 is not needed, but AUTOM4TE is.
11786 * m4/m4.m4: Remove.
11787 * tests/Makefile.am: Adjust.
11788
f693ad14
AD
117892001-12-10 Akim Demaille <akim@epita.fr>
11790
11791 One structure for states is enough, even though theoretically
11792 there are LR(0) states and LALR(1) states.
11793
11794 * src/lalr.h (state_t): Remove.
11795 (state_table): Be state_t **, not state_t *.
11796 * src/state.h (core, CORE_ALLOC): Rename as...
11797 (state_t, STATE_ALLOC): this.
11798 Add the LALR(1) members: shifts, reductions, errs.
11799 * src/LR0.c (state_table): Rename as...
11800 (state_hash): this, to avoid name clashes with the global
11801 `state_table'.
11802 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
11803 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
11804
74ffbcb6
AD
118052001-12-10 Akim Demaille <akim@epita.fr>
11806
11807 Bison dumps core on bash.y.
11808 Reported by Pascal Bart.
11809
11810 * src/warshall.c (bitmatrix_print): New.
11811 (TC): Use it.
ba0fe3c7 11812 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
11813 j must be the outer loop.
11814 * tests/regression.at (Broken Closure): New.
11815
07708e19
AD
118162001-12-05 Akim Demaille <akim@epita.fr>
11817
11818 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
11819 its argument.
ba1ecc07 11820 Reported by Peter Hamorsky.
07708e19 11821
92b16366
AD
118222001-12-05 Akim Demaille <akim@epita.fr>
11823
11824 * src/conflicts.c (err_table): Remove.
11825 (resolve_sr_conflict): Adjust.
11826 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
11827 Rename as...
11828 (state_t.reductions, state_t.shifts): this.
11829
076ab033
AD
118302001-12-05 Akim Demaille <akim@epita.fr>
11831
11832 * src/reduce.c (reduce_grammar_tables): No longer disable the
11833 removal of useless rules via CPP but via `if (0)', so that the
11834 compiler still check the code is valid.
11835 For instance, it should have noticed `rline' no longer exists: use
11836 the `line' member of rule_t.
11837 * src/gram.c (dummy, rline): Remove, unused.
11838
3843c413
AD
118392001-12-05 Akim Demaille <akim@epita.fr>
11840
11841 * src/output.c (pack_vector): Use assert, not berror.
11842 * src/main.c (berror): Remove, unused.
11843
43168960
AD
118442001-12-05 Akim Demaille <akim@epita.fr>
11845
11846 New experimental feature: if --verbose --trace output all the
11847 items of a state, not only its kernel.
11848
11849 * src/print.c (print_core): If `trace_flag', then invoke closure
11850 before outputting the items of the state (print_core is no longer
11851 a correct name them).
11852 (print_results): Invoke new_closure/free_closure if needed.
11853
b2872512
AD
118542001-12-05 Akim Demaille <akim@epita.fr>
11855
11856 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
11857 * src/closure.c, src/closure.h (itemsetsize): Rename as...
11858 (nitemset): for consistency with the rest of the project.
11859
23cbcc6c
AD
118602001-12-05 Akim Demaille <akim@epita.fr>
11861
11862 * src/closure.c (print_closure): Improve.
11863 (closure): Use it for printing input and output.
11864
03ec521c
AD
118652001-12-05 Akim Demaille <akim@epita.fr>
11866
11867 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
11868 indexed by nonterminals.
11869
3a7456dd
AD
118702001-12-05 Akim Demaille <akim@epita.fr>
11871
11872 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
11873 what it was!).
11874 * src/warshall.h: Remove accidental duplication of the content.
11875
1cbcf2e7
AD
118762001-12-05 Akim Demaille <akim@epita.fr>
11877
11878 * src/closure.c (set_fderives): De-obfuscate.
11879
84182270
AD
118802001-12-05 Akim Demaille <akim@epita.fr>
11881
11882 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
11883
3f6f053c
AD
118842001-12-05 Akim Demaille <akim@epita.fr>
11885
11886 * src/closure.c (set_firsts): De-obfuscate.
11887
7a5350ba
AD
118882001-12-05 Akim Demaille <akim@epita.fr>
11889
11890 * src/output.c (action_row): De-obfuscate
11891 using the good o' techniques: arrays not pointers, variable
11892 locality, BITISSET, RESETBIT etc.
11893
d954473d
AD
118942001-12-05 Akim Demaille <akim@epita.fr>
11895
11896 Pessimize the code to simplify it: from now on, all the states
11897 have a valid SHIFTS, which NSHIFTS is possibly 0.
11898
11899 * src/LR0.c (shifts_new): Be global and move to..
11900 * src/state.c, src/state.h: here.
11901 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
11902 * src/print_graph: Adjust.
11903
9839bbe5
AD
119042001-12-05 Akim Demaille <akim@epita.fr>
11905
11906 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
11907 * src/conflicts.c: Use it.
11908 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
11909 incorrectly ``simplified''.
11910
9f136c07
AD
119112001-12-05 Akim Demaille <akim@epita.fr>
11912
11913 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
11914 using the good o' techniques: arrays not pointers, variable
11915 locality, BITISSET, RESETBIT etc.
11916
b608206e
AD
119172001-12-05 Akim Demaille <akim@epita.fr>
11918
11919 * src/state.h (SHIFT_SYMBOL): New.
11920 * src/conflicts.c: Use it to deobfuscate.
11921
52afa962
AD
119222001-12-05 Akim Demaille <akim@epita.fr>
11923
11924 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
11925 (print_reductions): De-obfuscate using the good o' techniques:
11926 arrays not pointers, variable locality, BITISSET.
11927
e74dc321
AD
119282001-12-05 Akim Demaille <akim@epita.fr>
11929
11930 * src/conflicts.c (print_reductions): Arrays, not pointers.
11931 Use BITISSET.
11932
768fca83
AD
119332001-12-05 Akim Demaille <akim@epita.fr>
11934
11935 * src/conflicts.c (print_reductions): Pessimize, but clarify.
11936
a17e599f
AD
119372001-12-05 Akim Demaille <akim@epita.fr>
11938
11939 * src/conflicts.c (print_reductions): Improve variable locality.
11940
a04bc341
AD
119412001-12-05 Akim Demaille <akim@epita.fr>
11942
11943 * src/conflicts.c (print_reductions): Pessimize, but clarify.
11944
c8ea038e
AD
119452001-12-05 Akim Demaille <akim@epita.fr>
11946
11947 * src/conflicts.c (print_reductions): Improve variable locality.
11948
aa2aab3c
AD
119492001-12-05 Akim Demaille <akim@epita.fr>
11950
11951 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
11952 * src/lalr.c: Use them.
11953
b178c8cc
AD
119542001-12-05 Akim Demaille <akim@epita.fr>
11955
11956 * src/LR0.c (augment_automaton): Formatting changes.
11957 Better variable locality.
11958
f67d13aa
AD
119592001-12-05 Akim Demaille <akim@epita.fr>
11960
11961 * src/lalr.c (matrix_print): New.
11962 (transpose): Use it.
11963 Use arrays instead of pointers.
11964
c2713865
AD
119652001-12-05 Akim Demaille <akim@epita.fr>
11966
11967 * src/lalr.c (maxrhs): Move to...
11968 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
11969 * src/lalr.c (build_relations): Adjust.
11970
9887c18a
AD
119712001-12-05 Akim Demaille <akim@epita.fr>
11972
11973 * src/lalr.c (transpose): Free the memory allocated to the
11974 argument, as it is replaced by the results by the unique caller.
11975 (build_relations): Merely invoke transpose: it handles the memory
11976 deallocation.
11977 Improve variable locality.
11978 Avoid variables used as mere abbreviations.
11979 (compute_lookaheads): Use arrays instead of pointers.
11980
4d4f699c
AD
119812001-12-05 Akim Demaille <akim@epita.fr>
11982
11983 * src/lalr.c (initialize_F): Improve variable locality.
11984 Avoid variables used as mere abbreviations.
11985
80a69750
AD
119862001-12-05 Akim Demaille <akim@epita.fr>
11987
11988 * src/derives.c (print_derives): Display the ruleno.
11989 * src/lalr.c (initialize_F, transpose): Better variable locality
11990 to improve readability.
11991 Avoid variables used as mere abbreviations.
11992
fe961097
AD
119932001-12-05 Akim Demaille <akim@epita.fr>
11994
11995 * src/lalr.c (traverse): Use arrays instead of pointers.
11996
e3e4e814
AD
119972001-12-05 Akim Demaille <akim@epita.fr>
11998
11999 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
12000 the handling of squeue.
12001 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12002
630e182b
AD
120032001-12-05 Akim Demaille <akim@epita.fr>
12004
12005 Because useless nonterminals are now kept alive (instead of being
12006 `destroyed'), we now sometimes examine them, and store information
12007 related to them. Hence we need to know their number, and adjust
12008 memory allocations.
12009
12010 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
12011 static.
12012 * src/LR0.c (allocate_itemsets): The memory allocated to
12013 `symbol_count' was used for two different purpose: once to count
12014 the number of occurrences of each symbol, and later reassigned to
12015 `shift_symbol', containing the symbol that can be shifted from a
12016 given state.
12017 Deobfuscate, i.e., allocate, use and free `symbol_count' here
12018 only, and...
12019 (new_itemsets): Allocate `shift_symbol' here.
12020 (allocate_itemsets): symbol_count includes useless nonterminals.
12021 Make room for them.
12022 (free_storage): Use `free', not `XFREE', for pointers that cannot
12023 be null.
12024
81b51460
AD
120252001-12-05 Akim Demaille <akim@epita.fr>
12026
12027 * src/nullable.c (set_nullable): Deobfuscate the handling of
12028 ritem.
12029 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12030
3067fbef
AD
120312001-12-05 Akim Demaille <akim@epita.fr>
12032
12033 * src/gram.c, src/gram.h (ritem_print): New.
12034 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
12035 (This useless function was defined only to work around VMS linkers
12036 that can't handle compilation units with variables only).
12037 * src/reduce.c (dump_grammar): Use it to trace the construction of
12038 ritem.
12039
c2bea5f9
PE
120402001-12-04 Paul Eggert <eggert@twinsun.com>
12041
7d27c823
PE
12042 * src/bison.simple (union yyalloc): Change member names
12043 to be the same as the stack names.
12044 (yyparse): yyptr is now union yyalloc *, not char *.
12045 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
12046 and may generate better code on some machines.
c2bea5f9
PE
12047 (yystpcpy): Use prototype if __STDC__ is defined, not just
12048 if __cplusplus is defined.
35687a9d 12049
2c8a9dfa
AD
120502001-11-30 Akim Demaille <akim@epita.fr>
12051
12052 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
12053 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
12054 Gettext doesn't compile cleanly, and dies with -Werror.
12055 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
12056 Include WARNING_CFLAGS here.
12057 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
12058 before being defined.
12059
f4e421e6
AD
120602001-11-27 Paul Eggert <eggert@twinsun.com>
12061
12062 * lib/quotearg.h (quotearg_n, quotearg_n_style):
12063 First arg is int, not unsigned.
12064 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
12065 (SIZE_MAX, UINT_MAX): New macros.
12066 (quotearg_n_options): Abort if N is negative.
12067 Avoid overflow check on hosts where size_t is 64 bits and int
12068 is 32 bits, as overflow is impossible there.
12069 Fix off-by-one typo that caused unnecessary reallocation.
12070
7093d0f5
AD
120712001-11-29 Paul Eggert <eggert@twinsun.com>
12072
12073 Name space cleanup in generated parser.
12074
12075 * doc/bison.texinfo (Bison Parser): Discuss system headers
12076 and their effect on the user name space.
12077
12078 * src/bison.simple:
12079 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
12080 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
12081 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
12082
12083 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
12084 on user names when possible.
12085
12086 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
12087 Simplify test for whather <alloca.h> exists.
12088
12089 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
12090
12091 (<stdio.h>): Include if YYDEBUG.
12092
12093 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
12094 ! defined (yyoverflow) && ! defined (yymemcpy).
12095
12096 (yymemcpy, yyparse): Rename local variables as needed so that
12097 they all begin with 'yy'.
12098
12099 (yystrlen, yystpcpy): New functions.
12100
12101 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
12102 All uses changed.
12103
12104 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
12105 instead of relying on string.h functions. Use YYSTACK_ALLOC
12106 and YYSTACK_FREE instead of malloc and free.
12107
fd51e5ff
AD
121082001-11-30 Akim Demaille <akim@epita.fr>
12109
12110 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
12111 before their first uses.
12112 (YYBISON, YYPURE): Move to the top of the output.
12113
7d13ff5f
AD
121142001-11-30 Akim Demaille <akim@epita.fr>
12115
12116 * tests/reduce.at (Useless Nonterminals): Fix.
12117
892a3995
AD
121182001-11-30 Akim Demaille <akim@epita.fr>
12119
12120 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
12121 if body instead of `;' to pacify GCC's warnings.
12122
68f1e3ed
AD
121232001-11-30 Akim Demaille <akim@epita.fr>
12124
12125 Instead of mapping the LHS of unused rules to -1, keep the LHS
12126 valid, but flag the rules as invalid.
12127
12128 * src/gram.h (rule_t): `useful' is a new member.
12129 * src/print.c (print_grammar): Adjust.
12130 * src/derives.c (set_derives): Likewise.
12131 * src/reader.c (packgram, reduce_output): Likewise.
12132 * src/reduce.c (reduce_grammar_tables): Likewise.
12133 * tests/reduce.at (Underivable Rules, Useless Rules): New.
12134
d2d1b42b
AD
121352001-11-30 Akim Demaille <akim@epita.fr>
12136
12137 * src/reduce.c (reduce_output): Formatting changes.
12138 * src/print.c (print_results, print_grammar): Likewise.
12139 * tests/regression.at (Rule Line Numbers)
12140 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
12141
760b53a8
AD
121422001-11-30 Akim Demaille <akim@epita.fr>
12143
12144 * src/reduce.c (nonterminals_reduce): Instead of throwing away
12145 useless nonterminals, move them at the end of the symbol arrays.
12146 (reduce_output): Adjust.
12147 * tests/reduce.at (Useless Nonterminals): Adjust.
12148
00238958
AD
121492001-11-30 Akim Demaille <akim@epita.fr>
12150
12151 * src/reduce.c: Various comment/formatting changes.
12152 (nonterminals_reduce): New, extracted from...
12153 (reduce_grammar_tables): here.
12154 (reduce_grammar): Call nonterminals_reduce.
12155
396452de
PE
121562001-11-29 Paul Eggert <eggert@twinsun.com>
12157
12158 * src/bison.simple (YYSTACK_REALLOC): Remove.
12159 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
12160 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
12161 New macros.
12162 (union yyalloc): New type.
12163 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
12164 an arbitrary restriction on hosts where size_t is wider than int.
12165
12166 (yyparse): Don't dump core if alloca or malloc fails; instead, report
12167 a parser stack overflow. Allocate just one block of memory for all
12168 three stacks, instead of allocating three blocks; this typically is
12169 faster and reduces fragmentation.
12170
12171 Do not limit the number of items in the stack to a value that fits
12172 in 'int', as this is an arbitrary limit on hosts with 64-bit
12173 size_t and 32-bit int.
12174
147e184c
MA
121752001-11-29 Marc Autret <autret_m@epita.fr>
12176
12177 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
12178 of defining YYERROR_VERBOSE.
12179 [AT_DATA]: $4 is now out of C declarations in the prologue.
12180
426cf563
MA
121812001-11-28 Marc Autret <autret_m@epita.fr>
12182
12183 * src/reader.c (parse_dquoted_param): New.
12184 (parse_skel_decl): Use it.
12185 * src/lex.h: Add its prototype.
12186 * src/lex.c (literalchar): Become not static.
12187
c7925b99
MA
121882001-11-28 Marc Autret <autret_m@epita.fr>
12189
12190 * src/output.h: And put its extern declaration here.
12191 * src/output.c (error_verbose): Define here.
12192 (prepare): Echo name modification.
12193 * src/getargs.h: Clean its extern declaration.
12194 * src/getargs.c (error_verbose_flag): Remove.
12195 (getargs): Remove case 'e'.
12196 * src/options.c (option_table): 'error-verbose' is now seen as simple
12197 percent option.
12198 Include output.h.
12199
12200 * src/reader.c (read_declarations): Remove case tok_include.
12201 (parse_include_decl): Remove.
12202 * src/lex.h (token_t): Remove tok_include.
12203 * src/options.c (option_table): 'include' is now a simple command line
12204 option.
12205
5b5d1929
MA
122062001-11-28 Marc Autret <autret_m@epita.fr>
12207
12208 * src/bison.simple: Adjust muscle names.
12209 * src/muscle_tab.c (muscle_init): Also rename the muscles.
12210 * src/output.c (prepare): s/_/-/ for the muscles names.
12211 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
12212
8850be4b
MA
122132001-11-28 Marc Autret <autret_m@epita.fr>
12214
12215 * src/bison.simple: Fix debug.
12216 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
12217
4a38e613
AD
122182001-11-28 Akim Demaille <akim@epita.fr>
12219
12220 * src/LR0.c (shifts_new): New.
12221 (save_shifts, insert_start_shift, augment_automaton): Use it.
12222
4b35e1c1
AD
122232001-11-28 Akim Demaille <akim@epita.fr>
12224
12225 * src/closure.c (closure): `b' and `ruleno' denote the same value:
12226 keep ruleno only.
12227
d2b04478
AD
122282001-11-28 Akim Demaille <akim@epita.fr>
12229
12230 * src/closure.c (closure): Instead of looping over word in array
12231 then bits in words, loop over bits in array.
12232
2c4c30aa
AD
122332001-11-28 Akim Demaille <akim@epita.fr>
12234
12235 * src/closure.c (closure): No longer optimize the special case
12236 where all the bits of `ruleset[r]' are set to 0, to make the code
12237 clearer.
12238
576890b7
AD
122392001-11-28 Akim Demaille <akim@epita.fr>
12240
12241 * src/closure.c (closure): `r' and `c' are new variables, used to
12242 de-obfuscate accesses to RULESET and CORE.
12243
cb487d7d
AD
122442001-11-28 Akim Demaille <akim@epita.fr>
12245
12246 * src/reduce.c (reduce_print): Use ngettext.
12247 (dump_grammar): Improve the trace accuracy.
12248
6013d43f
AD
122492001-11-28 Akim Demaille <akim@epita.fr>
12250
12251 * src/reduce.c (dump_grammar): Don't translate trace messages.
12252
cb4956ee
AD
122532001-11-28 Akim Demaille <akim@epita.fr>
12254
12255 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
12256 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
12257 as all tags are free'ed afterwards.
12258 From Enrico Scholz.
12259
648185ab
PE
122602001-11-27 Paul Eggert <eggert@twinsun.com>
12261
12262 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
12263 use alloca when we didn't want to, and vice versa.
12264
68254a03
MA
122652001-11-27 Marc Autret <autret_m@epita.fr>
12266
9113b58f
AD
12267 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
12268 initialization.
68254a03
MA
12269 * src/output.c (prepare): Remove its update.
12270
04d843a2
MA
122712001-11-27 Marc Autret <autret_m@epita.fr>
12272
12273 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
12274 Use %error-verbose.
12275
d2079671 122762001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
12277
12278 * src/bison.simple: Remove YYERROR_VERBOSE using.
12279 Use %%error_verbose.
12280 (yyparse): Likewise.
12281 * src/output.c (prepare): Give its final value.
12282 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
12283 * src/getargs.h: Add its extern declaration.
12284 * src/getargs.c (error_verbose_flag): New int.
12285 (getargs): Update to catch new case.
12286 * src/options.c (option_table): 'error-verbose' is a new option.
12287 (shortopts): Update.
12288
e0327bc8
AD
122892001-11-27 Akim Demaille <akim@epita.fr>
12290
12291 * src/system.h: Use intl/libgettext.h.
12292 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
12293
000f1a3c
AD
122942001-11-27 Akim Demaille <akim@epita.fr>
12295
12296 * tests/torture.at (Exploding the Stack Size with Malloc):
12297 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
12298
26cfe0be
AD
122992001-11-27 Akim Demaille <akim@epita.fr>
12300
12301 * src/files.c: Include error.h.
12302 Reported by Hans Aberg.
12303
f6bd5427
MA
123042001-11-26 Marc Autret <autret_m@epita.fr>
12305
d2079671 12306 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
12307 (read_declarations): Add case tok_include.
12308 * src/getargs.h (include): Add its extern definition.
12309 * src/getargs.c (include): New const char *.
12310 (getargs): Add case '-I'.
12311 * src/options.c (option_table): Add include as command line and
12312 percent option.
12313 * src/lex.h (token_t): Add tok_include.
12314
2ca209c1
AD
123152001-11-26 Akim Demaille <akim@epita.fr>
12316
12317 * src/reader.c (readgram): Make sure rules for mid-rule actions
12318 have a lineno equal to that of their host rule.
12319 Reported by Hans Aberg.
12320 * tests/regression.at (Rule Line Numbers): New.
12321
0e41b407
AD
123222001-11-26 Akim Demaille <akim@epita.fr>
12323
12324 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
12325 size_ts.
12326
123272001-11-26 Akim Demaille <akim@epita.fr>
12328
12329 * src/complain.c, src/complain.h (error): Remove, provided by
12330 lib/error.[ch].
12331
e0c40012
AD
123322001-11-26 Akim Demaille <akim@epita.fr>
12333
12334 * src/reader.c (read_declarations): Don't abort on tok_illegal,
12335 issue an error message.
12336 * tests/regression.at (Invalid %directive): New.
12337 Reported by Hans Aberg.
12338
5e147124
AD
123392001-11-26 Akim Demaille <akim@epita.fr>
12340
12341 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
12342 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
12343
a034c8b8
AD
123442001-11-26 Akim Demaille <akim@epita.fr>
12345
12346 * src/conflicts.c (conflicts_print): Don't complain at all when
12347 there are no reduce/reduce conflicts, and as many shift/reduce
12348 conflicts as expected.
12349 * tests/regression.at (%expect right): Adjust.
12350
c64a20f3
AD
123512001-11-23 Akim Demaille <akim@epita.fr>
12352
12353 * lib/alloca.c: Update, from fileutils.
12354
5b0d29bb
AD
123552001-11-23 Akim Demaille <akim@epita.fr>
12356
12357 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
12358
722c4bfe
AD
123592001-11-23 Akim Demaille <akim@epita.fr>
12360
12361 * src/system.h: Include alloca.h.
12362 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
12363
6255b435
AD
123642001-11-23 Akim Demaille <akim@epita.fr>
12365
12366 * src/print_graph.c (print_actions): Remove `rule', unused.
12367 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
12368 pacify GCC's signed < unsigned warnings.
12369 * src/closure.c (itemsetsize): Likewise.
12370 * src/reader.c (symbol_list_new): Static.
12371
b29b2ed5
AD
123722001-11-23 Akim Demaille <akim@epita.fr>
12373
12374 Attaching lineno to buckets is stupid, since only one copy of each
12375 symbol is kept, only the line of the first occurrence is kept too.
12376
12377 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
12378 * src/reader.c (rline_allocated): Remove, unused.
12379 (symbol_list): Have a `line' member.
12380 (symbol_list_new): New.
12381 (readgram): Use it.
12382 * src/print.c (print_grammar): Output the rule line numbers.
12383 * tests/regression.at (Solved SR Conflicts)
12384 (Unresolved SR Conflicts): Adjust.
12385 Reported by Hans Aberg.
12386
a81b1d4a
MA
123872001-11-22 Marc Autret <autret_m@epita.fr>
12388
12389 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
12390
c1ecb3c1
MA
123912001-11-22 Marc Autret <autret_m@epita.fr>
12392
12393 * src/muscle_tab.c (muscle_init): Remove initialization of
12394 skeleton muscle.
12395 * src/output.c (output_master_parser): Do it here.
12396
fbe01355
AD
123972001-11-20 Akim Demaille <akim@epita.fr>
12398
12399 * po/sv.po: New.
12400 * configure.in (ALL_LINGUAS): Adjust.
12401 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
12402 longer contains strings to translate.
12403
81e895c0
AD
124042001-11-19 Akim Demaille <akim@epita.fr>
12405
12406 * src/conflicts.c (conflicts_print): Add a missing \n.
12407
6bb1878b
AD
124082001-11-19 Akim Demaille <akim@epita.fr>
12409
12410 * src/nullable.c (nullable_print): New.
12411 (set_nullable): Call it when tracing.
12412 Better locality of variables.
12413
d9ec2d07
AD
124142001-11-19 Akim Demaille <akim@epita.fr>
12415
12416 * src/print.c (print_actions): Better locality of variables.
12417
720e5c1b
AD
124182001-11-19 Akim Demaille <akim@epita.fr>
12419
12420 * src/derives.c (print_derives): Fix and enrich.
12421 * src/closure.c (print_fderives): Likewise.
12422
fb908786
AD
124232001-11-19 Akim Demaille <akim@epita.fr>
12424
12425 * src/closure.c (itemsetend): Remove, replaced with...
12426 (itemsetsize): new.
12427
125ecb56
AD
124282001-11-19 Akim Demaille <akim@epita.fr>
12429
12430 * src/LR0.c (kernel_end): Remove, replaced with...
12431 (kernel_size): new.
12432
d8cf039f
AD
124332001-11-19 Akim Demaille <akim@epita.fr>
12434
12435 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
12436 to clarify.
12437
7bec0760
AD
124382001-11-19 Akim Demaille <akim@epita.fr>
12439
12440 * src/closure.c (closure): Use arrays instead of pointers to clarify.
12441
c87d4863
AD
124422001-11-19 Akim Demaille <akim@epita.fr>
12443
12444 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
12445 trace messages.
12446 * src/LR0.c: Likewise.
12447 (allocate_itemsets): Use arrays instead of pointers to clarify.
12448
9bfe901c
AD
124492001-11-19 Akim Demaille <akim@epita.fr>
12450
12451 * src/getargs.c (statistics_flag): Replace with...
12452 (trace_flag): New.
12453 (longopts): Accept --trace instead of --statistics.
12454 * src/getargs.h, src/options.c: Adjust.
12455 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
12456 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
12457
97db7bd4
AD
124582001-11-19 Akim Demaille <akim@epita.fr>
12459
cc72668c 12460 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
12461 pointers to clarify the code.
12462 (save_reductions, save_shifts): Factor common parts of alternatives.
12463
2c5f66ed
AD
124642001-11-19 Akim Demaille <akim@epita.fr>
12465
12466 * src/LR0.c (new_state, get_state): Complete TRACE code.
12467 * src/closure.c: Include `reader.h' to get `tags', needed by the
12468 trace code.
12469 Rename the conditional DEBUG as TRACE.
12470 Output consistently TRACEs to stderr, not stdout.
12471 * src/derives.c: Likewise.
12472 * src/reduce.c: (inaccessable_symbols): Using if is better style
12473 than goto.
12474 Use `#if TRACE' instead of `#if 0' for tracing code.
12475
300f275f
AD
124762001-11-19 Akim Demaille <akim@epita.fr>
12477
12478 * src/system.h (LIST_FREE, shortcpy): New.
12479 * src/LR0.c: Use them.
12480 * src/output.c (free_itemsets, free_reductions, free_shifts):
12481 Remove, replaced by LIST_FREE.
12482
f59c437a
AD
124832001-11-19 Akim Demaille <akim@epita.fr>
12484
12485 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
12486 (REDUCTIONS_ALLOC): New.
12487 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
12488 allocation.
12489
6986fd9e
AD
124902001-11-19 Akim Demaille <akim@epita.fr>
12491
12492 * src/LR0.c (new_state): Complete trace code.
12493 * src/nullable.c (set_nullable): Don't translate traces.
12494
4bc30f78
AD
124952001-11-19 Akim Demaille <akim@epita.fr>
12496
12497 * src/print_graph.c (print_core): Better locality of variables.
12498 * src/print.c (print_core): Likewise.
12499
08a946e0
AD
125002001-11-19 Akim Demaille <akim@epita.fr>
12501
12502 * src/vcg.c: You do the output, so you are responsible of the
12503 handling of VCG syntax, in particular: use quotearg.
12504 * src/print_graph.c: Don't.
12505 (print_actions): Don't output the actions as part of the nodes,
12506 since that's the job of the edges.
12507 (print_state): Don't output by hand: fill the node description,
9bfe901c 12508 and ask for its output.
08a946e0 12509
f0473484
AD
125102001-11-19 Akim Demaille <akim@epita.fr>
12511
cc72668c
AD
12512 * src/bison.simple (yyparse): When verbosely reporting an error,
12513 no longer put additional quotes around token names.
f0473484
AD
12514 * tests/calc.at: Adjust.
12515
e41dc700
AD
125162001-11-19 Akim Demaille <akim@epita.fr>
12517
12518 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
12519 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
12520 * src/output.c: Adjust.
12521
652a871c
AD
125222001-11-19 Akim Demaille <akim@epita.fr>
12523
12524 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
12525 (rule_t): this.
12526 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
12527
b2ed6e58
AD
125282001-11-19 Akim Demaille <akim@epita.fr>
12529
12530 * src/gram.h (rule_t): New.
12531 (rule_table): New.
12532 (rrhs, rlhs): Remove, part of state_t.
12533 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
12534 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
12535 * src/reader.c, src/reduce.c: Adjust.
12536
edad7067
AD
125372001-11-19 Akim Demaille <akim@epita.fr>
12538
12539 * src/reader.c (symbols_output): New, extracted from...
12540 (packsymbols): Here.
12541 (reader): Call it.
12542
3feec034
AD
125432001-11-19 Akim Demaille <akim@epita.fr>
12544
12545 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
12546 (maxrhs): this new function.
12547
ddcd5fdf
AD
125482001-11-19 Akim Demaille <akim@epita.fr>
12549
cc72668c 12550 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
12551 Adjust.
12552
bb527fc2
AD
125532001-11-19 Akim Demaille <akim@epita.fr>
12554
cc72668c 12555 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
12556 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
12557 * src/lalr.c: Adjust.
12558
a845a697
AD
125592001-11-19 Akim Demaille <akim@epita.fr>
12560
12561 * src/lalr.c (initialize_LA): Only initialize LA. Let...
12562 (set_state_table): handle the `lookaheads' members.
12563
f004bf6a
AD
125642001-11-19 Akim Demaille <akim@epita.fr>
12565
cc72668c
AD
12566 * src/lalr.h (lookaheads): Removed array, whose contents is now
12567 a member of...
f004bf6a
AD
12568 (state_t): this structure.
12569 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
12570 Adjust.
12571
de326cc0
AD
125722001-11-19 Akim Demaille <akim@epita.fr>
12573
cc72668c
AD
12574 * src/lalr.h (consistent): Removed array, whose contents is now
12575 a member of...
de326cc0
AD
12576 (state_t): this structure.
12577 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
12578 Adjust.
12579
90b4416b
AD
125802001-11-19 Akim Demaille <akim@epita.fr>
12581
cc72668c
AD
12582 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
12583 contents are now members of...
90b4416b
AD
12584 (state_t): this structure.
12585 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
12586 Adjust.
12587
9703cc49
AD
125882001-11-19 Akim Demaille <akim@epita.fr>
12589
12590 * src/lalr.h (state_t): New.
12591 (state_table): Be a state_t * instead of a core **.
12592 (accessing_symbol): Remove, part of state_t.
12593 * src/lalr.c: Adjust.
12594 (set_accessing_symbol): Merge into...
12595 (set_state_table): this.
12596 * src/print_graph.c, src/conflicts.c: Adjust.
12597
d803322e
AD
125982001-11-14 Akim Demaille <akim@epita.fr>
12599
12600 * tests/calc.at, tests/output.at, tests/regression.at,
12601 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
12602 now the tests are run in private dirs, therefore AC_CLEANUP and
12603 family can be simplified to 0-ary.
12604 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
12605 use abs. path to find config.h.
12606 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
12607 stderr, there can be way too much random noise.
12608 Instead pass -Werror to GCC and rely on the exit status.
12609 Reported by Wolfram Wagner.
12610
3d76b07d
AD
126112001-11-14 Akim Demaille <akim@epita.fr>
12612
12613 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
12614 defined only if yyoverflow is defined, to avoid `warning: unused
12615 variable `yyvs1''.
12616 Reported by The Test Suite.
12617
09b503c8
AD
126182001-11-14 Akim Demaille <akim@epita.fr>
12619
12620 * src/print.c: Include reduce.h.
12621 Reported by Hans Aberg.
12622
126232001-11-14 Akim Demaille <akim@epita.fr>
12624
12625 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
12626 Revert a previous patch: these are really const.
12627 * src/conflicts.c (conflict_report): Additional useless pair of
12628 braces to pacify GCC's warnings for `if () if () {} else {}'.
12629 * src/lex.c (parse_percent_token): Replace equal_offset with
12630 arg_offset.
12631 arg is const.
12632 Be sure to strdup `arg' when used, since there is no reason for
12633 token_buffer not to change.
12634
0f37a994
AD
126352001-11-14 Akim Demaille <akim@epita.fr>
12636
12637 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
12638 definition.
12639 * src/main.c (main): Use them.
12640 Suggested by Hans Aberg.
12641
d39d93b8
AD
126422001-11-12 Akim Demaille <akim@epita.fr>
12643
12644 * src/system.h (ngettext): Now that we use ngettext, be sure to
12645 provide a default definition when NLS are not used.
12646
9edcd895
AD
126472001-11-12 Akim Demaille <akim@epita.fr>
12648
12649 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
12650 Use @kbd to denote user input.
12651 (Language and Grammar): ANSIfy the example.
12652 Adjust its layout for info/notinfo.
12653 (Location Tracking Calc): Output error messages to stderr.
12654 Output locations in a more GNUtically correct way.
12655 Fix a couple of Englishos.
12656 Adjust @group/@end group pairs.
12657
7da99ede
AD
126582001-11-12 Akim Demaille <akim@epita.fr>
12659
e3aa65c5 12660 %expect was not functioning at all.
7da99ede
AD
12661
12662 * src/conflicts.c (expected_conflicts): Set to -1.
12663 (conflict_report): Use ngettext.
12664 (conflicts_print): Check %expect and make its violation an error.
12665 * doc/bison.texinfo (Expect Decl): Adjust.
12666 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
12667 * tests/regression.at (%expect not enough, %expect right)
12668 (%expect too much): New.
12669
ba9dda1a
AD
126702001-11-12 Akim Demaille <akim@epita.fr>
12671
12672 * tests/regression.at (Conflicts): Rename as...
12673 (Unresolved SR Conflicts): this.
12674 (Solved SR Conflicts): New.
12675
337c5bd1
AD
126762001-11-12 Akim Demaille <akim@epita.fr>
12677
12678 * src/reduce.c (print_results): Rename as...
12679 (reduce_output): This.
12680 Output to OUT, passed as argument, instead of output_obstack.
12681 (dump_grammar): Likewise.
12682 (reduce_free): New.
12683 Also free V1.
12684 (reduce_grammar): No longer call reduce_output, since...
12685 * src/print.c (print_results): do it.
12686 * src/main.c (main): Call reduce_free;
12687
c73a41af
AD
126882001-11-12 Akim Demaille <akim@epita.fr>
12689
12690 * src/conflicts.c (print_reductions): Accept OUT as argument.
12691 Output to it, not to output_obstack.
12692 * src/print.c (print_actions): Adjust.
12693
0df87bb6
AD
126942001-11-12 Akim Demaille <akim@epita.fr>
12695
12696 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
12697 the result instead of using...
12698 (src_total, rrc_total, src_count, rrc_count): Remove.
12699 (any_conflicts): Remove.
12700 (print_conflicts): Split into...
12701 (conflicts_print, conflicts_output): New.
12702 * src/conflicts.h: Adjust.
12703 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 12704 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
12705 * tests/regression.at (Conflicts): New.
12706 Reported by Tom Lane.
12707
e4d3d4de
AD
127082001-11-12 Akim Demaille <akim@epita.fr>
12709
12710 * tests/regression.at (Invalid input): Remove, duplicate with
12711 ``Invalid input: 1''.
12712
6d7d248e
AD
127132001-11-12 Akim Demaille <akim@epita.fr>
12714
12715 * tests/torture.at (AT_DATA_STACK_TORTURE)
12716 (Exploding the Stack Size with Alloca)
12717 (Exploding the Stack Size with Malloc): New.
12718
e9e4c321
AD
127192001-11-12 Akim Demaille <akim@epita.fr>
12720
12721 * src/bison.simple (YYSTACK_REALLOC): New.
12722 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 12723 Reported by Per Allansson.
e9e4c321 12724
5f7e0832
AD
127252001-11-12 Pascal Bart <pascal.bart@epita.fr>
12726
12727 * src/bison.simple: Define type yystype instead of YYSTYPE, and
12728 define CPP macro, which substitute YYSTYPE by yystype.
12729 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
12730 with yyltype/YYLTYPE. This allows inclusion of the generated
12731 header within the parser if the compiler, such as GGC, accepts
12732 multiple equivalent #defines.
12733 From Akim.
12734
e3f1699f
AD
127352001-11-05 Akim Demaille <akim@epita.fr>
12736
12737 * src/reader.c (symbols_output): New, extracted from...
12738 (packsymbols): here.
12739 (reader): Adjust.
12740
65be0866
AD
127412001-11-05 Akim Demaille <akim@epita.fr>
12742
12743 * src/lex.c (parse_percent_token): s/quotearg/quote/.
12744
e4d910bf
AD
127452001-11-05 Akim Demaille <akim@epita.fr>
12746
12747 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
12748 pattern.
12749
951366c1
AD
127502001-11-05 Akim Demaille <akim@epita.fr>
12751
12752 * src/options.h (struct option_table_struct): set_flags is void*.
12753 * src/options.c (longopts): Support `--output' and `%output'.
12754 (usage): Adjust.
12755 * src/lex.h (tok_setopt): Remove, replaced with...
12756 (tok_intopt, tok_stropt): these new guys.
12757 * src/lex.c (getopt.h): Not needed.
12758 (token_buffer, unlexed_token_buffer): Not const.
12759 (percent_table): Promote `-' over `_' in directive names.
12760 Active `%name-prefix', `file-prefix', and `output'.
12761 (parse_percent_token): Accept possible arguments to directives.
12762 Promote `-' over `_' in directive names.
12763
d8988b2f
AD
127642001-11-04 Akim Demaille <akim@epita.fr>
12765
12766 * doc/bison.texinfo (Decl Summary): Split the list into
12767 `directives for grammars' and `directives for bison'.
12768 Sort'em.
12769 Add description of `%name-prefix', `file-prefix', and `output'.
12770 Promote `-' over `_' in directive names.
12771 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
12772 Simplify the description of `--name-prefix'.
12773 Promote `-' over `_' in directive names.
12774 Promote `--output' over `--output-file'.
12775 Fix the description of `--defines'.
12776 * tests/output.at: Exercise %file-prefix and %output.
12777
6468d18e
AD
127782001-11-02 Akim Demaille <akim@epita.fr>
12779
12780 * doc/refcard.tex: Update.
12781
6b7e85b9
AD
127822001-11-02 Akim Demaille <akim@epita.fr>
12783
12784 * src/symtab.h (SUNDEF): New.
12785 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
12786 stand for `uninitialized', instead of 0.
12787 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
12788 * src/lex.c (lex): Adjust.
12789
12790 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
12791 Number it 0.
12792 Let yylex return it instead of a plain 0.
12793 Reported by Dick Streefland.
12794
cd5aafcf
AD
127952001-11-02 Akim Demaille <akim@epita.fr>
12796
12797 * tests/regression.at (Mixing %token styles): New test.
12798
037ca2f1
AD
127992001-11-02 Akim Demaille <akim@epita.fr>
12800
12801 * src/reader.c (parse_thong_decl): Formatting changes.
12802 (token_translations_init): New, extracted from...
12803 (packsymbols): Here.
12804 Adjust.
12805
270a173c
AD
128062001-11-01 Akim Demaille <akim@epita.fr>
12807
12808 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
12809 Check that `9foo.y' produces correct cpp guards.
12810 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
12811 guards.
12812 Reported by Wwp.
12813
561f9a30
AD
128142001-11-01 Akim Demaille <akim@epita.fr>
12815
12816 * tests/regression.at (Invalid input: 2): New.
12817 * src/lex.c (unlexed_token_buffer): New.
12818 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
12819 too.
12820 Reported by Wwp.
12821
f987e9d2
AD
128222001-11-01 Akim Demaille <akim@epita.fr>
12823
12824 * tests/calc.at: Catch up with 1.30.
12825 * configure.in: Bump to 1.49a.
12826 Adjust to newer Autotest.
12827
0846f581
PB
128282001-10-19 Pascal Bart <pascal.bart@epita.fr>
12829
12830 * src/conflicts.c: Move global variables rrc_total and src_total ...
12831 (print_conflicts): here.
12832 * src/output.c (output): Free global variable user_toknums.
12833 * src/lex.c (token_obstack): Become static.
12834
3c1a79b3
AD
128352001-10-18 Akim Demaille <akim@epita.fr>
12836
12837 * tests/atlocal.in (GCC): Add.
12838 * tests/calc.at: s/m4_match/m4_bmatch/.
12839 s/m4_patsubst/m4_bpatsubst/.
12840 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
12841 * configure.in: AC_SUBST(GCC).
12842
5d52e7d0
MA
128432001-10-14 Marc Autret <autret_m@epita.fr>
12844
12845 * src/options.c (create_long_option_table): Fix.
12846
631aa1d3
AD
128472001-10-10 Akim Demaille <akim@epita.fr>
12848
12849 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
12850
f6ec6d13
AD
128512001-10-04 Akim Demaille <akim@epita.fr>
12852
12853 * src/reader.c (parse_union_decl): Push the caracters in
12854 union_obstack, not attrs_obstack.
12855
342b8b6e
AD
128562001-10-04 Akim Demaille <akim@epita.fr>
12857
12858 Merge in the branch 1.29.
12859
12860 * src/reader.c (packsymbols): Use a temporary obstack for
12861 `%%tokendef', since output_stack is already used elsewhere.
12862
12863 2001-10-02 Akim Demaille <akim@epita.fr>
12864
12865 Bump 1.29d.
12866
12867 2001-10-02 Akim Demaille <akim@epita.fr>
12868
12869 Version 1.29c.
12870
12871 2001-10-02 Akim Demaille <akim@epita.fr>
12872
12873 * tests/regression.at (Invalid CPP headers): New.
12874 From Alexander Belopolsky.
12875 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
12876
12877 2001-10-02 Akim Demaille <akim@epita.fr>
12878
12879 * tests/regression.at (Invalid input): New.
12880 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
12881 Reported by Shura.
12882
12883 2001-10-02 Akim Demaille <akim@epita.fr>
12884
12885 * tests/calc.at: Now that --debug works, the tests must be adjusted.
12886
12887 2001-10-02 Akim Demaille <akim@epita.fr>
12888
12889 * src/output.c (output_parser): Assert `skeleton'.
12890 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
12891 systems.
12892 From Shura.
12893
12894 2001-10-01 Marc Autret <autret_m@epita.fr>
12895
12896 * src/lex.h: Echo modifications.
12897 * src/lex.c (unlex): Parameter is now token_t.
12898 From Hans Aberg.
12899
12900 2001-10-01 Marc Autret <autret_m@epita.fr>
12901
12902 * src/main.c: Include lex.h.
12903 From Hans Aberg.
12904
12905 2001-09-29 Akim Demaille <akim@epita.fr>
12906
12907 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
12908
12909 2001-09-28 Akim Demaille <akim@epita.fr>
12910
12911 * tests/testsuite.at: Update to newer Autotest.
12912 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
12913
12914 2001-09-27 Akim Demaille <akim@epita.fr>
12915
12916 Position independent wrapper.
12917
12918 * tests/bison: Remove.
12919 * tests/bison.in: New.
12920 * configure.in: Adjust.
12921
12922 2001-09-27 Paul Eggert <eggert@twinsun.com>
12923
12924 Port quotearg fixes from tar 1.13.24.
12925
12926 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
12927 tm to be declared.
12928 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
12929 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
12930
12931 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
12932 * m4/mbrtowc.m4: New file.
12933 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
12934 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
12935
12936 2001-09-27 Akim Demaille <akim@epita.fr>
12937
12938 Bump to 1.29c.
12939
12940 2001-09-27 Akim Demaille <akim@epita.fr>
12941
12942 Version 1.29b.
12943
12944 2001-09-25 Akim Demaille <akim@epita.fr>
12945
12946 * src/system.h: Include `xalloc.h'.
12947 Remove it from the C files.
12948 * src/files.c (output_files): Free the obstacks.
12949 * src/lex.c (init_lex): Rename as...
12950 (lex_init): this.
12951 (lex_free): New.
12952 * src/main.c (main): Use it.
12953
12954 2001-09-24 Marc Autret <autret_m@epita.fr>
12955
12956 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
12957 to output informations in fout (FILE*).
12958 (open_graph, close_graph): Likewise.
12959 (output_graph, output_edge, output_node): Likewise.
12960 * src/vcg.h: Update function prototypes.
12961 * src/print_graph.c (print_graph): Open output graph file.
12962 (print_actions): Adjust.
12963 * src/files.h: Remove extern declaration.
12964 * src/files.c: Remove graph_obstack declaration.
12965 (open_files): Remove graph_obstack initialization.
12966 (output_files): Remove graph_obstack saving.
12967
12968 2001-09-24 Marc Autret <autret_m@epita.fr>
12969
12970 * src/files.c (compute_output_file_names): Fix.
12971
12972 2001-09-24 Marc Autret <autret_m@epita.fr>,
12973 Akim Demaille <akim@epita.fr>
12974
12975 * src/reader.c (reader): Remove call to free_symtab ().
12976 * src/main.c (main): Call it here.
12977 Include symtab.h.
12978 * src/conflicts.c (initialize_conflicts): Rename as...
12979 (solve_conflicts): this.
12980 * src/print.c (print_core, print_actions, print_state)
12981 (print_grammar): Dump to a file instead a `output_obstack'.
12982 (print_results): Dump `output_obstack', and then proceed with the
12983 FILE *.
12984 * src/files.c (compute_output_file_names, close_files): New.
12985 (output_files): Adjust.
12986 * src/main.c (main): Adjust.
12987
12988 2001-09-23 Marc Autret <autret_m@epita.fr>
12989
12990 * src/files.c (compute_header_macro): Computes header macro name
12991 from spec_defines_file when given.
12992
12993 2001-09-23 Marc Autret <autret_m@epita.fr>
12994
12995 * src/files.c (output_files): Add default extensions.
12996
12997 2001-09-22 Akim Demaille <akim@epita.fr>
12998
12999 * src/conflicts.c (finalize_conflicts): Rename as...
13000 (free_conflicts): this.
13001
13002 2001-09-22 Akim Demaille <akim@epita.fr>
13003
13004 * src/gram.c (gram_free): Rename back as...
13005 (dummy): this.
13006 (output_token_translations): Free `token_translations'.
13007 * src/symtab.c (free_symtab): Free the tag field.
13008
13009 2001-09-22 Akim Demaille <akim@epita.fr>
13010
13011 Remove `translations' as it is always set to true.
13012
13013 * src/gram.h: Adjust.
13014 * src/reader.c (packsymbols, parse_token_decl): Adjust
13015 * src/print.c (print_grammar): Adjust.
13016 * src/output.c (output_token_translations): Adjust.
13017 * src/lex.c (lex): Adjust.
13018 * src/gram.c: Be sure the set pointers to NULL.
13019 (dummy): Rename as...
13020 (gram_free): this.
13021
13022 2001-09-22 Akim Demaille <akim@epita.fr>
13023
13024 * configure.in: Invoke AM_LIB_DMALLOC.
13025 * src/system.h: Use dmalloc.
13026 * src/LR0.c: Be sure to have pointers initialized to NULL.
13027 (allocate_itemsets): Allocate kernel_items only if needed.
13028
13029 2001-09-22 Akim Demaille <akim@epita.fr>
13030
13031 * configure.in: Bump to 1.29b.
13032 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
13033 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
13034 need xmalloc.c in calc.y.
13035 From Pascal Bart.
13036
13037 2001-09-21 Akim Demaille <akim@epita.fr>
13038
13039 Version 1.29a.
13040 * Makefile.maint, config/config.guess, config/config.sub,
13041 * config/missing: Update from masters.
13042 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
13043 upon package.m4.
13044 * configure.in (ALL_LINGUAS): Add `tr'.
13045
13046 2001-09-21 Akim Demaille <akim@epita.fr>
13047
13048 * tests/Makefile.am (package.m4): Move to...
13049 ($(srcdir)/$(TESTSUITE)): here.
13050
13051 2001-09-20 Akim Demaille <akim@epita.fr>
13052
13053 * src/complain.c: No longer try to be standalone: use system.h.
13054 Don't assume __STDC__ is defined to 1. Just test if it is defined.
13055 * src/complain.h: Likewise.
13056 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
13057 Remove the unused variable `n'.
13058 From Albert Chin-A-Young.
13059
13060 2001-09-18 Marc Autret <autret_m@epita.fr>
13061
13062 * doc/bison.1: Update.
13063 * doc/bison.texinfo (Bison Options): Update --defines and --graph
13064 descriptions.
13065 (Option Cross Key): Update.
13066 Add --graph.
13067
13068 2001-09-18 Marc Autret <autret_m@epita.fr>
13069
13070 * tests/regression.at: New test (comment in %union).
13071
13072 2001-09-18 Marc Autret <autret_m@epita.fr>
13073
13074 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
13075 do that.
13076 Reported by Keith Browne.
13077
13078 2001-09-18 Marc Autret <autret_m@epita.fr>
13079
13080 * tests/output.at: Add tests for --defines and --graph.
13081
13082 2001-09-18 Marc Autret <autret_m@epita.fr>
13083
13084 * tests/output.at: Removes tests of %{header,src}_extension features.
13085
13086 2001-09-18 Akim Demaille <akim@epita.fr>
13087
13088 * tests/Makefile.am (package.m4): New.
13089 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
13090 (_AT_CHECK_CALC_ERROR): Likewise.
13091 Factor the `, ' part of verbose error messages.
13092
13093 2001-09-18 Marc Autret <autret_m@epita.fr>
13094
13095 * src/getargs.c (longopts): Declare --defines and --graph as options
13096 with optional arguments.
13097 * src/files.h: Add extern declarations.
13098 * src/files.c (spec_graph_file, spec_defines_file): New.
13099 (output_files): Update.
13100 Remove CPP-outed code.
13101
13102 2001-09-18 Marc Autret <autret_m@epita.fr>
13103
13104 Turn off %{source,header}_extension feature.
13105
13106 * src/files.c (compute_exts_from_gf): Update.
13107 (compute_exts_from_src): Update.
13108 (output_files): CPP-out useless code.
13109 * src/files.h: Remove {header,source}_extension extern declarations.
13110 * src/reader.c (parse_dquoted_param): CPP-out.
13111 (parse_header_extension_decl): Remove.
13112 (parse_source_extension_decl): Remove.
13113 (read_declarations): Remove cases tok_{hdrext,srcext}.
13114 * src/lex.c (percent_table): Remove {header,source}_extension entries.
13115 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
13116
13117 2001-09-10 Akim Demaille <akim@epita.fr>
13118
13119 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
13120 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
13121 (AT_CHECK_OUTPUT): this.
13122 Merely check ls' exit status, its output is useless.
13123
13124 2001-09-10 Akim Demaille <akim@epita.fr>
13125
13126 * tests/calc.at: Use m4_match.
13127 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
13128
13129 2001-09-10 Marc Autret <autret_m@epita.fr>,
13130 Akim Demaille <akim@epita.fr>
13131
13132 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
13133 enum color_e.
13134 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
13135 to `normal'.
13136 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
13137 * src/lex.h: Adjust prototype.
13138 (token_t): Add `tok_undef'.
13139 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
13140 (parse_percent_token): Now returns token_t.
13141 Add default statement in switch.
13142 (lex): Separate `c' as an input variable, from the token_t result
13143 part.
13144 (unlexed): Is a token_t.
13145
13146 2001-09-10 Akim Demaille <akim@epita.fr>
13147
13148 * configure.in: Bump to 1.29a.
13149
13150 2001-09-07 Akim Demaille <akim@epita.fr>
13151
13152 Version 1.29.
13153
13154 2001-08-30 Akim Demaille <akim@epita.fr>
13155
13156 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
13157 * m4/atconfig.m4: Remove.
13158 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
13159 * tests/bison: New.
13160 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
13161 m4_if, m4_patsubst, and m4_regexp.
13162 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
13163 `input' file instead of echo.
13164
13165 2001-08-29 Akim Demaille <akim@epita.fr>
13166
13167 Bump to 1.28e.
13168
13169 2001-08-29 Akim Demaille <akim@epita.fr>
13170
13171 Version 1.28d.
13172
13173 2001-08-29 Paul Eggert <eggert@twinsun.com>
13174
13175 * src/bison.simple (yyparse): Don't take the address of an
13176 item before the start of an array, as that doesn't conform to
13177 the C Standard.
13178
13179 2001-08-29 Robert Anisko <anisko_r@epita.fr>
13180
13181 * doc/bison.texinfo (Location Tracking Calc): New node.
13182
13183 2001-08-29 Paul Eggert <eggert@twinsun.com>
13184
13185 * src/output.c (output): Do not define const, as this now
13186 causes more problems than it cures.
13187
13188 2001-08-29 Akim Demaille <akim@epita.fr>
13189
13190 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
13191 the nodes.
13192 Be sure to tag the `detailmenu'.
13193
13194 2001-08-29 Akim Demaille <akim@epita.fr>
13195
13196 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
13197 download in a tmp dir.
13198
13199 2001-08-28 Marc Autret <autret_m@epita.fr>
13200
13201 * config/depcomp: New file.
13202
13203 2001-08-28 Marc Autret <autret_m@epita.fr>
13204
13205 * doc/bison.1 (mandoc): Adjust.
13206 From Juan Manuel Guerrero.
13207
13208 2001-08-28 Marc Autret <autret_m@epita.fr>
13209
13210 * src/print_graph.c (print_state): Fix.
13211
13212 2001-08-27 Marc Autret <autret_m@epita.fr>
13213
13214 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
13215 char * members.
13216 Echo modifications to the functions prototypes.
13217 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
13218
13219 2001-08-27 Marc Autret <autret_m@epita.fr>
13220
13221 * src/vcg.c: Include `xalloc.h'.
13222 (add_colorentry): New.
13223 (add_classname): New.
13224 (add_infoname): New.
13225 * src/vcg.h: Add new prototypes.
13226
13227 2001-08-27 Akim Demaille <akim@epita.fr>
13228
13229 * Makefile.maint: Sync. again with CVS Autoconf.
13230
13231 2001-08-27 Akim Demaille <akim@epita.fr>
13232
13233 * Makefile.maint: Formatting changes.
13234 (po-update, cvs-update, update): New targets.
13235 (AMTAR): Remove.
13236
13237 2001-08-27 Akim Demaille <akim@epita.fr>
13238
13239 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
13240 * Makefile.maint: Sync. with CVS Autoconf.
13241
13242 2001-08-27 Marc Autret <autret_m@epita.fr>
13243
13244 * src/vcg.h (struct infoname_s): New.
13245 (struct colorentry_s): New.
13246 (graph_s): New fields {vertical,horizontal}_order in structure.
13247 Add `infoname' field.
13248 Add `colorentry' field;
13249 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
13250 (G_HORIZONTAL_ORDER): New.
13251 (G_INFONAME): New.
13252 (G_COLORENTRY): New.
13253 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
13254 Add output of `infoname'.
13255 Add output of `colorentry'.
13256
13257 2001-08-27 Marc Autret <autret_m@epita.fr>
13258
13259 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
13260 This one shadowed a global parameter.
13261
13262 2001-08-24 Marc Autret <autret_m@epita.fr>
13263
13264 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
13265 instead of `unsigned'.
13266 (print_state): Do not call obstack_object_size () in obstack_grow ()
13267 to avoid macro variables shadowing.
13268
13269 2001-08-23 Marc Autret <autret_m@epita.fr>
13270
13271 * src/lex.c (percent_table): Typo: s/naem/name/.
13272 Add graph option.
13273 Normalize new options declarations.
13274
13275 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
13276
13277 * tests/suite.at: Exercise %header_extension and %source_extension.
13278
13279 2001-08-16 Marc Autret <autret_m@epita.fr>
13280
13281 * src/reader.c (parse_dquoted_param): New.
13282 (parse_header_extension_decl): Use it.
13283 (parse_source_extension_decl): Likewise.
13284
13285 2001-08-16 Marc Autret <autret_m@epita.fr>
13286
13287 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
13288 (get_xxxx_str): Use assert () instead of complain ().
13289 Remove return invokations in default cases.
13290 (get_decision_str): Modify default behaviour. Remove second argument.
13291 Echo modifications on calls.
13292 (output_graph): Fix.
13293
13294 2001-08-16 Marc Autret <autret_m@epita.fr>
13295
13296 * src/getargs.c (usage): Update with ``-g, --graph''.
13297
13298 2001-08-16 Marc Autret <autret_m@epita.fr>
13299
13300 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
13301 (Option Cross Key): Likewise.
13302 * doc/bison.1: Update.
13303
1c8c2190
PB
133042001-09-25 Pascal Bart <pascal.bart@epita.fr>
13305
13306 * src/output.c (output_master_parser): Don't finish action_obstack.
13307 (output_parser): Don't care about the muscle action, here.
13308 (prepare): Copy the action_obstack in the action muscle.
13309 (output): Free action_obstack.
13310
180d45ba
PB
133112001-09-23 Pascal Bart <pascal.bart@epita.fr>
13312
13313 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
13314 will contain `%union' declaration.
13315 (parse_union_decl): Delete #line directive output.
13316 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
13317 informations about %union.
13318 (parse_union_decl): Copy the union_obstack in the muscle stype.
13319 * src/bison.simple: Add new #line directive.
13320 Add typdef %%stype YYSTYPE.
13321
c51d1a19
PB
133222001-09-23 Pascal Bart <pascal.bart@epita.fr>
13323
13324 * src/bison.simple: Add new `#line' directive.
13325
6f9344da
PB
133262001-09-22 Pascal Bart <pascal.bart@epita.fr>
13327
13328 * src/bison.simple: New `#line' directive.
13329 * src/output.c (output_parser): Support new dynamic muscle input_line.
13330
652def80
MA
133312001-09-22 Marc Autret <autret_m@epita.fr>
13332
13333 * src/output.c (output_master_parser): New.
13334 (output_parser): Be more re-entrant.
13335
25b222fa
MA
133362001-09-21 Marc Autret <autret_m@epita.fr>
13337
13338 * src/reader.c (copy_definition, parse_union_decl): Update and use
13339 `linef' muscle.
13340 (copy_action): Likewise.
13341 Use obstack_1grow ().
13342 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
13343
6bc35ae5
MA
133442001-09-21 Marc Autret <autret_m@epita.fr>
13345
13346 * src/options.c (option_table): Adjust.
13347 * src/lex.c (parse_percent_token): Fix.
13348
c0629aa1
PB
133492001-09-20 Pascal Bart <pascal.bart@epita.fr>
13350
13351 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 13352
82b6d266
PB
133532001-09-20 Pascal Bart <pascal.bart@epita.fr>
13354
13355 * src/lex.c (parse_percent_token): Change type of variable `tx', which
13356 is now an option_table_struct*.
13357 (option_strcmp): New function option_strcmp.
13358 (parse_percent_token): Call option_strcmp.
13359 * src/getargs.c (xalloc.h, options.h): Include it.
13360 (getargs): Call create_long_option_table.
13361 (getargs): Free longopts at the end of the function.
13362 (shortopts): Move in options.c.
13363 * src/options.c (create_long_option_table): New function. Convert
13364 information from option_table to option structure.
13365 * src/reader.c (options.h): Include it.
13366
13367 * src/Makefile.am: Adjust.
13368 * src/options.c (option_table): Create from longopts and percent_table.
13369 * src/getargs.c (longopts): Delete.
13370 * src/lex.c (struct percent_table_struct): Delete.
13371 (percent_table): Delete.
13372 (options.h): Include it.
13373 * src/options.c: Create.
13374 * src/options.h: Create.
13375 Declare enum opt_access_e.
13376 Define struct option_table_struct.
13377
75f5aaea
MA
133782001-09-20 Marc Autret <autret_m@epita.fr>
13379
13380 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
13381 sections of Bison.
13382
f508cb0a
PB
133832001-09-19 Pascal Bart <pascal.bart@epita.fr>
13384
13385 * src/bison.simple: s/%%filename/%%skeleton.
13386 * src/muscle_tab.c (getargs.h): Include it.
13387 (muscle_init): Insert new muscle skeleton.
13388
13105fc1
PB
133892001-09-18 Pascal Bart <pascal.bart@epita.fr>
13390
13391 * src/output.c (output_parser): Delete unused variable actions_dumped.
13392
b0c4483e
PB
133932001-09-07 Pascal Bart <pascal.bart@epita.fr>
13394
13395 * src/output.c (output): Delete call to reader_output_yylsp.
13396 * src/reader.c (reader): Likewise.
ba0fe3c7 13397 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 13398
11d82f03
MA
133992001-09-02 Marc Autret <autret_m@epita.fr>
13400
13401 * src/reader.c: Include muscle_tab.h.
13402 (parse_union_decl): Update.
13403 (parse_macro_decl): Rename parse_muscle_decl.
13404 Update to use renamed functions and variable.
13405 (read_declarations, copy_action, read_additionnal_code, : Updated
13406 with correct variables and functions names.
13407 (packsymbols, reader): Likewise.
342b8b6e 13408
11d82f03 13409 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 13410
11d82f03
MA
13411 * src/output.c: Include muscle_tab.h
13412 In all functions using macro_insert, change by using muscle_insert ().
13413 (macro_obstack): Rename muscle_obstack.
13414 Echo modifications in the whole file.
13415 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
13416 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
13417 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
13418
13419 * src/muscle_tab.h: Update double inclusion macros.
13420 (macro_entry_s): Rename muscle_entry_s.
13421 Update prototypes.
342b8b6e 13422
11d82f03
MA
13423 * src/muscle_tab.c: Include muscle_tab.h.
13424 Rename macro_tabble to muscle_table.
13425 (mhash1, mhash2, mcmp): Use muscle_entry.
13426 (macro_init): Rename muscle_init. Update.
13427 (macro_insert): Rename muscle_insert. Update.
13428 (macro_find): Rename muscle_find. Update.
13429
13430 * src/main.c: Include muscle_tab.h.
13431 (main): Call muscle_init ().
13432 * src/Makefile.am (bison_SOURCES): Echo modifications.
13433
93a37297
MA
134342001-09-02 Marc Autret <autret_m@epita.fr>
13435
f753cd62 13436 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 13437
f753cd62
MA
13438 * src/muscle_tab.c, src/muscle_tab.h: Add files.
13439
134402001-09-02 Marc Autret <autret_m@epita.fr>
13441
13442 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 13443
682d48cd
PB
134442001-09-01 Pascal Bart <pascal.bart@epita.fr>
13445
342b8b6e 13446 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
13447 filename.
13448
087c8fda
MA
134492001-09-01 Marc Autret <autret_m@epita.fr>
13450
13451 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
13452 to an explicit value to activate the feature. We do it here.
13453
dda680cb
PB
134542001-08-31 Pascal Bart <pascal.bart@epita.fr>
13455
13456 * src/output.c (prepare): Delete the `filename' muscule insertion.
13457 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
13458 (parse_union_decl): Likewise.
13459 * src/macrotab.c (macro_init): Initialize filename by infile.
13460
9e644e64
MA
134612001-08-31 Marc Autret <autret_m@epita.fr>
13462
13463 * src/bison.simple (YYLSP_NEEDED): New definition.
13464 * src/output.c (prepare): Add macro insertion of `locations_flag'
13465
17da6427
PB
134662001-08-31 Pascal Bart <pascal.bart@epita.fr>
13467
13468 * src/output.c (prepare): Delete insertion of previous muscles,
13469 and insert the `prefix' muscles.
13470 * src/macrotab.c (macro_init): Likewise.
13471 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 13472 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
13473 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
13474 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 13475 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
13476 name_prefix.
13477
e8cb70b9
PB
134782001-08-31 Pascal Bart <pascal.bart@epita.fr>
13479
13480 * src/main.c (main): Standardize.
13481 * src/output.c (output_table_data, output_parser): Likewise.
13482 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
13483
63c2d5de
MA
134842001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
13485
342b8b6e 13486 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
13487 %%epilogue.
13488 * src/output.c (output): Rename %%declarations to %%prologue.
13489 * src/bison.simple: Echo modifications.
342b8b6e 13490
d8cb5183
MA
134912001-08-31 Marc Autret <autret_m@epita.fr>
13492
13493 * src/reader.c (readgram): CleanUp.
13494 (output_token_defines): Likewise.
13495 (packsymbols): Likewise.
13496 (reader): Likewise.
13497 * src/output.c (output): CPP-out useless code.
13498
6c686258
PB
134992001-08-31 Pascal Bart <pascal.bart@epita.fr>
13500
342b8b6e 13501 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
13502 output_trailers and output_headers.
13503 * src/output.h: Remove obsolete functions prototypes of output_headers
13504 and output_trailers.
13505
8f451ef7
PB
135062001-08-30 Pascal Bart <pascal.bart@epita.fr>
13507
13508 * src/main.c: Include macrotab.h.
342b8b6e 13509 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
13510 Adjust functions prototypes.
13511 * src/macrotab.c (macro_insert): Constify key and value.
13512 (macro_find): Constify key.
13513 (macro_insert): Include 'xalloc.h'
13514 (macro_insert): Use XMALLOC.
13515 (macro_find): Constify return value.
13516 * src/output.c (output_table_data): Rename table to table_data.
13517 (output_parser): Constify macro_key, macro_value.
13518
997b6fd0 135192001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
13520
13521 * src/reader.c (parse_skel_decl): New.
342b8b6e 13522 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
13523 * src/lex.h (token_t): New token `tok_skel'.
13524 * src/lex.c (percent_table): Add skeleton option entry.
13525 Standardize.
13526
ff48177d
MA
135272001-08-29 Marc Autret <autret_m@epita.fr>
13528
13529 * src/bison.simple: Add %%user_code directive at the end.
13530 * src/reader.c (read_additionnal_code): New.
13531 (reader): Use it.
13532 * src/output.c (output_program): Remove.
13533 (output): Update.
13534
b33160bf
MA
135352001-08-28 Marc Autret <autret_m@epita.fr>
13536
13537 * src/output.c (output_actions): Clean up.
4e5caae2 13538 (output_gram): CPP-out useless code.
b33160bf
MA
13539 * src/reader.c (reader): Clean up, CPP-out useless code.
13540
d1a2daf7
PB
135412001-08-28 Pascal Bart <pascal.bart@epita.fr>
13542
342b8b6e 13543 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 13544 directive.
d1a2daf7
PB
13545 * src/bison.simple: Add `%%definitions'.
13546
2b763dfe
MA
135472001-08-28 Marc Autret <autret_m@epita.fr>
13548
13549 * config/depcomp: New file.
13550
f1a87ef6
PE
135512001-08-27 Paul Eggert <eggert@twinsun.com>
13552
13553 * src/bison.simple (yyparse): Don't take the address of an
13554 item before the start of an array, as that doesn't conform to
13555 the C Standard.
13556
82e236e2
RA
135572001-08-27 Robert Anisko <robert.anisko@epita.fr>
13558
f1a87ef6 13559 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
13560 obstack. It was done too late here.
13561
13562 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
13563 completely wrong.
13564 (reader): Initialize the macro obstack here, since we need it to grow
13565 '%define' directives.
13566
13567 * src/reader.h: Declare the macro obstack as extern.
13568
b0cfa28a
RA
135692001-08-27 Robert Anisko <robert.anisko@epita.fr>
13570
13571 * src/output.c (output_parser): Fix. Store single '%' characters in
13572 the output obstack instead of throwing them away.
13573
6fc74234
AD
135742001-08-27 Akim Demaille <akim@epita.fr>
13575
13576 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
13577
9c76d118
RA
135782001-08-25 Robert Anisko <robert.anisko@epita.fr>
13579
13580 * lib/Makefile.am: Adjust.
13581
a8289c62
RA
135822001-08-25 Robert Anisko <robert.anisko@epita.fr>
13583
13584 * src/bison.simple: Update and add '%%' directives.
13585
b6610515
RA
135862001-08-25 Robert Anisko <robert.anisko@epita.fr>
13587
13588 * src/reader.c (reader): Remove calls to 'output_headers' and
13589 'output_trailers'. Remove some C output.
13590 (readgram): Disable a piece of code that was writing a default
13591 definition for 'YYSTYPE'.
13592 (reader_output_yylsp): Remove.
13593 (packsymbols): Output token defintions to a macro.
13594 (copy_definition): Disable C output.
6fc74234 13595
b6610515
RA
13596 * src/reader.c (parse_macro_decl): New function used to parse macro
13597 declarations.
13598 (copy_string2): Put the body of copy_string into this new function.
13599 Add a parameter to let the caller choose whether he wants to copy the
13600 string delimiters or not.
13601 (copy_string): Be a simple call to copy_string2 with the last argument
13602 bound to true.
13603 (read_declarations): Add case for macro definition.
13604 (copy_identifier): New.
6fc74234 13605 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
13606 rather than lex.
13607
26f609ff
RA
136082001-08-25 Robert Anisko <robert.anisko@epita.fr>
13609
13610 * src/output.c (prepare): Add prefixed names.
13611 (output_parser): Output semantic actions.
13612 (output_parser): Fix bug on '%%line' directives.
6fc74234 13613
26f609ff
RA
13614 * src/output.c (output_headers): Remove. The C code printed by this
13615 function should now be in the skeletons.
13616 (output_trailers): Remove.
13617 (output): Disable call to 'reader_output_yylsp'.
13618 (output_rule_data): Do not output tables to the table obstack.
13619
13620 * src/output.c: Remove some C dedicated output.
13621 Improve the use of macro and output obstacks.
13622 (output_defines): Remove.
6fc74234 13623
26f609ff
RA
13624 * src/output.c (output_token_translations): Associate 'translate'
13625 table with a macro. No output to the table obstack.
13626 (output_gram): Same for 'rhs' and 'prhs'.
13627 (output_stos): Same for 'stos'.
13628 (output_rule_data): Same for 'r1' and 'r2'.
13629 (token_actions): Same for 'defact'.
13630 (goto_actions): Same for 'defgoto'.
13631 (output_base): Same for 'pact' and 'pgoto'.
13632 (output_table): Same for 'table'.
13633 (output_check): Same for 'check'.
6fc74234 13634
26f609ff
RA
13635 * src/output.c (output_table_data): New function.
13636 (output_short_table): Remove.
13637 (output_short_or_char_table): Remove.
6fc74234 13638
26f609ff
RA
13639 * src/output.c (output_parser): Replace most of the skeleton copy code
13640 with something new. Skeletons are now processed character by character
13641 rather than line by line, and Bison looks for '%%' macros. This is the
13642 first step in making Bison's output process (a lot) more flexible.
13643 (output_parser): Use the macro table.
13644
6f43b113
RA
136452001-08-25 Robert Anisko <robert.anisko@epita.fr>
13646
13647 * src/main.c (main): Initialize the macro table.
13648
dd3127cf
RA
136492001-08-25 Robert Anisko <robert.anisko@epita.fr>
13650
13651 * src/lex.c (percent_table): Add tok_define.
13652 * src/lex.h: Add tok_define.
13653
aa321494
RA
136542001-08-25 Robert Anisko <robert.anisko@epita.fr>
13655
13656 * src/macrotab.c: New file.
13657 * src/macrotab.h: New file.
13658 * src/Makefile.am: Update.
13659
68bd3b6b
RA
136602001-08-25 Robert Anisko <robert.anisko@epita.fr>
13661
13662 * lib/hash.c: New file.
13663 * lib/hash.h: New file.
13664 * lib/Makefile.am: Update.
13665
45f8dd1e
AD
136662001-08-15 Akim Demaille <akim@epita.fr>
13667
13668 Version 1.28c.
13669
40a64a7a 136702001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
13671
13672 * src/reader.c (readgram): Indent output macro YYSTYPE.
13673 (packsymbols): Likewise.
13674 (output_token_defines): Likewise.
13675 * src/files.c: Standardize.
13676 (compute_header_macro): New.
13677 (defines_obstack_save): New. Use compute_header_macro.
13678 (output_files): Update. Use defines_obstack_save.
13679
f9a8293a
AD
136802001-08-15 Akim Demaille <akim@epita.fr>
13681
13682 * doc/bison.texinfo (Table of Symbols): Document
13683 YYSTACK_USE_ALLOCA.
13684
150ca7a7
AD
136852001-08-15 Akim Demaille <akim@epita.fr>
13686
13687 * missing: Update from CVS Automake.
13688 * config/config.guess, config/config.sub, config/texinfo.tex:
13689 Update from gnu.org.
13690
69b5cec4
AD
136912001-08-15 Akim Demaille <akim@epita.fr>
13692
13693 * Makefile.maint: Sync with CVS Autoconf.
13694
f2b5126e
PB
136952001-08-14 Pascal Bart <pascal.bart@epita.fr>
13696
69b5cec4 13697 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
13698 `fdl.texi'.
13699 * doc/fdl.texi: Add to package.
13700
4ecbf796
MA
137012001-08-14 Marc Autret <autret_m@epita.fr>
13702
13703 Turn on %{source,header}_extension features.
13704
69b5cec4 13705 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
13706 source_extension.
13707 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 13708 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
13709 between options.
13710
95fb5662
MA
137112001-08-14 Marc Autret <autret_m@epita.fr>
13712
13713 * src/files.c (compute_base_names): Add extensions computing when
13714 `--file-prefix' used.
13715 Standardize function calls.
13716
78d09da9
MA
137172001-08-13 Marc Autret <autret_m@epita.fr>
13718
69b5cec4 13719 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
13720 defining it (defined but null disables alloca).
13721
5a009f2c
MA
137222001-08-13 Marc Autret <autret_m@epita.fr>
13723
13724 * src/bison.simple (_yy_memcpy): CPP reformat.
13725
1e41465a
PB
137262001-08-13 Pascal Bart <pascal.bart@epita.fr>
13727
13728 * tests/atconfig.in (CPPFLAGS): Fix.
13729
c67a198d
PB
137302001-08-10 Pascal Bart <pascal.bart@epita.fr>
13731
79282c6c 13732 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
13733 `gpl.texi'.
13734 * doc/gpl.texi: Add to package.
13735
09a6de7e
MA
137362001-08-10 Marc Autret <autret_m@epita.fr>
13737
13738 * src/print_graph.h: Fix.
13739 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
13740
b77b9ee0
AD
137412001-08-10 Akim Demaille <akim@epita.fr>
13742
13743 * src/system.h: Provide default declarations for stpcpy, strndup,
13744 and strnlen.
13745
3e259915
MA
137462001-08-10 Robert Anisko <anisko_r@epita.fr>
13747
13748 * doc/bison.texinfo (Locations): Update @$ stuff.
13749
ca96bc2d
MA
137502001-08-09 Robert Anisko <anisko_r@epita.fr>
13751
13752 * src/bison.simple (YYLLOC_DEFAULT): Update.
13753 (yyparse): Adjust.
13754
fdc6758b
MA
137552001-08-08 Marc Autret <autret_m@epita.fr>
13756
b77b9ee0 13757 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
13758 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
13759 Reported by Fabrice Bauzac.
957d4dbf 13760
600cad3b
MA
137612001-08-08 Marc Autret <autret_m@epita.fr>
13762
13763 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
13764 * src/vcg.c (output_node): Fix.
13765 * src/vcg.h: Cleanup.
13766 * src/print_graph.c: Add comments.
b77b9ee0 13767 (node_output_size): New global variable. Simplify the formatting of
600cad3b 13768 the VCG graph output.
b77b9ee0 13769 (print_actions): Unused code is now used. It notifies the final state
600cad3b 13770 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 13771 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
13772 blue.
13773 Get the current node name and node_obstack by argument.
13774 (node_obstack): New variable.
13775 (print_state): Manage node_obstack.
13776 (print_core): Use node_obstack given by argument.
13777 A node is not only computed here but in print_actions also.
13778 (print_graph): CPP out useless code instead of commenting it.
13779
976e528f
AD
137802001-08-07 Pascal Bart <pascal.bart@epita.fr>
13781
13782 * tests/atconfig.in (CPPFLAGS): Fix.
13783
20e8e5ca
AD
137842001-08-07 Akim Demaille <akim@epita.fr>
13785
13786 * src/print_graph.c (quote): New.
13787 (print_core): Use it.
13788
957d4dbf 137892001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 13790
3e3da797
AD
13791 * src/vcg.c (complain.h): Include it.
13792 Unepitaize `return' invocations.
c4b66126 13793 [NDEBUG] (main): Remove.
79282c6c 13794 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
13795 * src/files.c (open_files): Initialize graph_obstack.
13796 * src/print_graph.c (print_actions): CPP out useless code.
13797 (print_core): Don't output the last `\n' in labels.
13798 Use `quote'.
13799 * src/files.c (output_files): Output the VCG file.
13800 * src/main.c (main): Invoke print_graph ();
3e3da797 13801
957d4dbf 138022001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
13803
13804 Automaton VCG graph output.
13805 Using option ``-g'' or long option ``--graph'', you can generate
13806 a gram_filename.vcg file containing a VCG description of the LALR (1)
13807 automaton of your grammar.
13808
13809 * src/main.c: Call to print_graph() function.
13810 * src/getargs.h: Update.
13811 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
13812 (graph_flag): New flag.
13813 (longopts): Update.
13814 (getargs): Add case `g'.
13815 * src/files.c (graph_obstack): New obstack struct.
13816 (open_files): Initialize new obstack.
13817 (output_files): Saves graph_obstack if required.
13818 * src/files.h (graph_obstack): New extern declaration.
13819 * src/Makefile.am: Add new source files.
13820
927c1557 138212001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
13822
13823 * src/print_graph.c, src/print_graph.h (graph): New.
13824 * src/vcg.h: New file.
13825 * src/vcg.c: New file, VCG graph handling.
13826
7333d403
AD
138272001-08-06 Marc Autret <autret_m@epita.fr>
13828
13829 Add of %source_extension and %header_extension which specify
13830 the source or/and the header output file extension.
13831
13832 * src/files.c (compute_base_names): Remove initialisation of
13833 src_extension and header_extension.
13834 (compute_exts_from_gf): Update.
13835 (compute_exts_from_src): Update.
13836 (output_files): Update.
13837 * src/reader.c (parse_header_extension_decl): New.
13838 (parse_source_extension_decl): New.
13839 (read_declarations): New case statements for the new tokens.
13840 * src/lex.c (percent_table): Add entries for %source_extension
13841 and %header_extension.
13842 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
13843
84163231
AD
138442001-08-06 Marc Autret <autret_m@epita.fr>
13845
13846 * configure.in: Bump to 1.28c.
13847 * doc/bison.texinfo: Texinfo thingies.
13848
8303fc42
AD
138492001-08-04 Pascal Bart <pascal.bart@epita.fr>
13850
13851 * tests/atconfig.in (CPPFLAGS): Add.
13852 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
13853
70a84437
AD
138542001-08-03 Akim Demaille <akim@epita.fr>
13855
13856 Version 1.28b.
13857
2ce10144
AD
138582001-08-03 Akim Demaille <akim@epita.fr>
13859
13860 * tests/Makefile.am (check-local): Ship testsuite.
13861 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
13862 Include `string.h'.
13863
1e3e4bc1
AD
138642001-08-03 Akim Demaille <akim@epita.fr>
13865
13866 * configure.in: Try using -Wformat when compiling.
13867
42b45b7f
AD
138682001-08-03 Akim Demaille <akim@epita.fr>
13869
13870 * configure.in: Bump to 1.28b.
13871
8f13fe33
AD
138722001-08-03 Akim Demaille <akim@epita.fr>
13873
13874 * src/complain.c: Adjust strerror_r portability issues.
13875
b37ba92c
AD
138762001-08-03 Akim Demaille <akim@epita.fr>
13877
13878 Version 1.28a.
13879
b0ce6046
AD
138802001-08-03 Akim Demaille <akim@epita.fr>
13881
13882 * src/getargs.c, src/getarg.h (skeleton)): Constify.
13883 * src/lex.c (literalchar): Avoid name clashes on `buf'.
13884 * src/getargs.c: Include complain.h.
13885 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
13886 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
13887
d01c415b
AD
138882001-08-03 Akim Demaille <akim@epita.fr>
13889
13890 * src/reader.c (readgram): Display hidden chars in error messages.
13891
459dd1a6
AD
138922001-08-03 Akim Demaille <akim@epita.fr>
13893
13894 Update to gettext 0.10.39.
13895
53b74c0c
AD
138962001-08-03 Akim Demaille <akim@epita.fr>
13897
13898 * lib/strspn.c: New.
13899
234a3be3
AD
139002001-08-01 Marc Autret <autret_m@epita.fr>
13901
13902 * doc/bison.texinfo: Update.
13903 * doc/bison.1 (mandoc): Update.
13904 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
13905 * src/files.c: Support output files extensions computing.
13906 (src_extension): New static variable.
13907 (header_extension): New static variable.
13908 (tr): New function.
13909 (get_extension_index): New function, gets the index of an extension
13910 filename in a string.
13911 (compute_exts_from_gf): New function, computes extensions from the
13912 grammar file extension.
13913 (compute_exts_from_src): New functions, computes extensions from the
13914 C source file extension, file given by ``-o'' option.
13915 (compute_base_names): Update.
13916 (output_files): Update.
13917
847bf1f5
AD
139182001-08-01 Robert Anisko <anisko_r@epita.fr>
13919
d995fee7 13920 * doc/bison.texi: Document @$.
847bf1f5
AD
13921 (Locations): New section.
13922
d074a105
AD
139232001-07-18 Akim Demaille <akim@epita.fr>
13924
13925 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
13926 * config/prev-version.txt, config/move-if-change: New.
13927 * Makefile.am: Adjust.
13928
3419715d
AD
139292001-07-08 Pascal Bart <pascal.bart@epita.fr>
13930
13931 * src/bison.simple (yyparse): Suppress warning `comparaison
13932 between signed and unsigned'.
13933
62ab6972
AD
139342001-07-05 Pascal Bart <pascal.bart@epita.fr>
13935
13936 * src/getargs.h (raw_flag): Remove.
13937 * src/getargs.c: Die on `-r'/`--raw'.
13938 * src/lex.c (parse_percent_token): Die on `%raw'.
13939 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
13940 * tests/calc.at: Suppress test with option `--raw'.
13941
1e24cc5b
AD
139422001-07-14 Akim Demaille <akim@epita.fr>
13943
13944 * config/: New.
13945 * configure.in: Require Autoconf 2.50.
13946 Update to gettext 0.10.38.
13947
32dfccf8
AD
139482001-03-16 Akim Demaille <akim@epita.fr>
13949
13950 * doc/bison.texinfo: ANSIfy the examples.
13951
cd5bd6ac
AD
139522001-03-16 Akim Demaille <akim@epita.fr>
13953
13954 * getargs.c (skeleton): New variable.
13955 (longopts): --skeleton is a new option.
13956 (shortopts, getargs): -S is a new option.
13957 * getargs.h: Declare skeleton.
13958 * output.c (output_parser): Use it.
13959
5141b016
AD
139602001-03-16 Akim Demaille <akim@epita.fr>
13961
13962 * m4/strerror_r.m4: New.
13963 * m4/error.m4: Run AC_FUNC_STRERROR_R.
13964 * lib/error.h, lib/error.c: Update.
13965
447992b9
AD
139662001-03-16 Akim Demaille <akim@epita.fr>
13967
13968 * src/getargs.c (longopts): Clean up.
13969
274d42ce
AD
139702001-02-21 Akim Demaille <akim@epita.fr>
13971
13972 * src/reader.c (gensym): `gensym_count' is your own.
13973 Use a static buf to create the symbol name, as token_buffer is no
13974 longer a buffer.
13975
22c821f3
AD
139762001-02-08 Akim Demaille <akim@epita.fr>
13977
13978 * src/conflicts.c (conflict_report): Be sure not to append to res
13979 between two calls, which could happen if both first sprintf were
13980 skipped, but not the first cp += strlen.
13981
18569462
AD
139822001-02-08 Akim Demaille <akim@epita.fr>
13983
13984 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
13985 New, from fileutils 4.0.37.
13986 * configure.in: Require Autoconf 2.49c. I took some time before
13987 making this decision. This is the only way out for portability
13988 issues in Bison, it would mean way too much duplicate effort to
13989 import in Bison features implemented in 2.49c since 2.13.
13990 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
13991
0d8f3c8a
AD
139922001-02-02 Akim Demaille <akim@epita.fr>
13993
13994 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 13995 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 13996
f17bcd1f
AD
139972001-01-19 Akim Demaille <akim@epita.fr>
13998
13999 Get rid of the ad hoc handling of token_buffer in the scanner: use
14000 the obstacks.
14001
14002 * src/lex.c (token_obstack): New.
14003 (init_lex): Initialize it. No longer call...
14004 (grow_token_buffer): this. Remove it.
14005 Adjust all the places which used it to use the obstack.
14006
511e79b3
AD
140072001-01-19 Akim Demaille <akim@epita.fr>
14008
14009 * src/lex.h: Rename all the tokens:
14010 s/\bENDFILE\b/tok_eof/g;
14011 s/\bIDENTIFIER\b/tok_identifier/g;
14012 etc.
14013 Let them be enums, not #define, to ease debugging.
14014 Adjust all the code.
14015
0d6508ef
AD
140162001-01-18 Akim Demaille <akim@epita.fr>
14017
14018 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
14019 * src/lex.c (maxtoken, grow_token_buffer): Static.
14020
6deb4447
AD
140212001-01-18 Akim Demaille <akim@epita.fr>
14022
14023 Since we now use obstacks, more % directives can be enabled.
14024
14025 * src/lex.c (percent_table): Also accept `%yacc',
14026 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
14027 `%debug'.
14028 Handle the actions for `%semantic_parser' and `%pure_parser' here,
14029 instead of returning a token.
14030 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
14031 * src/reader.c (read_declarations): Adjust.
14032 * src/files.c (open_files): Don't call `compute_base_names', don't
14033 compute `attrsfile' since they depend upon data which might be
14034 *in* the input file now.
14035 (output_files): Do it here.
14036 * src/output.c (output_headers): Document the fact that this patch
14037 introduces a guaranteed SEGV for semantic parsers.
14038 * doc/bison.texinfo: Document them.
14039 * tests/suite.at: Exercise these %options.
14040
ff4423cc
AD
140412000-12-20 Akim Demaille <akim@epita.fr>
14042
14043 Also handle the output file (--verbose) with obstacks.
14044
14045 * files.c (foutput): Remove.
14046 (output_obstack): New.
14047 Adjust all dependencies.
14048 * src/conflicts.c: Return a string.
14049 * src/system.h (obstack_grow_string): Rename as...
14050 (obstack_sgrow): this. Be ready to work with non literals.
14051 (obstack_fgrow4): New.
14052
956dba3a
AD
140532000-12-20 Akim Demaille <akim@epita.fr>
14054
14055 * src/files.c (open_files): Fix the computation of short_base_name
14056 in the case of `-o foo.tab.c'.
14057
337bab46
AD
140582000-12-20 Akim Demaille <akim@epita.fr>
14059
14060 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
14061 (copy_dollar): Now that everything uses obstacks, get rid of the
14062 FILE * parameters.
14063
5d3214b8
AD
140642000-12-20 Akim Demaille <akim@epita.fr>
14065
14066 * src/files.c (open_files): Actually the `.output' file is based
14067 on the short_base_name, not base_name.
14068 * tests/suite.at (Checking output file names): Adjust.
14069
29092a57
AD
140702000-12-20 Akim Demaille <akim@epita.fr>
14071
14072 * src/bison.s1: Remove, we now use directly...
14073 * src/bison.simple: this.
14074 * src/Makefile.am: Use pkgdata instead of data.
14075
ea5607fd
AD
140762000-12-20 Akim Demaille <akim@epita.fr>
14077
14078 * src/files.c (guard_obstack): New.
14079 (open_files): Initialize it.
14080 (output_files): Dump it...
14081 * src/files.h: Export it.
14082 * src/reader.c (copy_guard): Use it.
14083
27110317
AD
140842000-12-19 Akim Demaille <akim@epita.fr>
14085
14086 * src/files.c (outfile, defsfile, actfile): Removed as global
14087 vars.
14088 (open_files): Don't compute them.
14089 (output_files): Adjust.
14090 (base_name, short_base_name): Be global.
14091 Adjust dependencies.
14092
19c50364
AD
140932000-12-19 Akim Demaille <akim@epita.fr>
14094
14095 * src/files.c (strsuffix): New.
14096 (stringappend): Be just like strcat but allocate.
14097 (base_names): Eve out from open_files.
14098 Try to simplify the rather hairy computation of base_name and
14099 short_base_name.
14100 (open_files): Use it.
14101 * tests/suite.at (Checking output file names): New test.
14102
573c1d9f
AD
141032000-12-19 Akim Demaille <akim@epita.fr>
14104
14105 * src/system.h (obstack_grow_literal_string): Rename as...
14106 (obstack_grow_string): this.
14107 * src/output.c (output_parser): Recognize `%% actions' instead of
14108 `$'.
14109 * src/bison.s1: s/$/%% actions/.
14110 * src/bison.hairy: Likewise.
14111
ef7ddedd
AD
141122000-12-19 Akim Demaille <akim@epita.fr>
14113
14114 * src/output.c (output_parser): Compute the `#line' lines when
14115 there are.
14116 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
14117 Suggested by Hans Aberg.
14118
ff61dabd
AD
141192000-12-19 Akim Demaille <akim@epita.fr>
14120
14121 Let the handling of the skeleton files be local to the procedures
14122 that use it.
14123
14124 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
14125 longer static.
14126 (fparser, open_extra_files): Remove.
14127 (open_files, output_files): Don't take care of fparser.
14128 * src/files.h: Adjust.
14129 * src/output.c (output_parser): Open and close the file to the
14130 skeleton.
14131 * src/reader.c (read_declarations): When %semantic_parser, open
14132 fguard.
14133
55b96341
AD
141342000-12-19 Akim Demaille <akim@epita.fr>
14135
14136 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
14137 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
14138
358c15b7
AD
141392000-12-19 Akim Demaille <akim@epita.fr>
14140
14141 * src/files.c (open_files): Yipee! We no longer need all the code
14142 looking for `/tmp' since we have no tmp file.
14143
7de3329e
AD
141442000-12-19 Akim Demaille <akim@epita.fr>
14145
14146 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
14147 New macros.
14148 * src/files.c (open_files): Less dependency on MSDOS etc.
14149
3abcd459
AD
141502000-12-14 Akim Demaille <akim@epita.fr>
14151
14152 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
14153 Provide a default definition.
14154 Use it when executing the default @ action.
14155 * src/reader.c (reader_output_yylsp): No longer include
14156 `timestamp' and `text' in the default YYLTYPE.
14157
2a91a95e
AD
141582000-12-12 Akim Demaille <akim@epita.fr>
14159
14160 * src/reader.c (copy_definition, parse_union_decl, copy_action)
14161 (copy_guard): Quote the file names.
14162 Reported by Laurent Mascherpa.
14163
14d3eb9b
AD
141642000-12-12 Akim Demaille <akim@epita.fr>
14165
14166 * src/output.c (output_headers, output_program, output): Be sure
14167 to escape special characters when outputting filenames.
14168 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
14169 (output_headers): Don't depend on them, Use ACTSTR.
14170
d7045ec6
AD
141712000-11-17 Akim Demaille <akim@epita.fr>
14172
14173 * lib/obstack.h: Formatting changes.
14174 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
14175 prevents type checking.
14176 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
14177 cast the value to (void *): assigning a `foo *' to a `void *'
14178 variable is valid.
14179 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
14180 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
14181 append characters.
14182
6fd54b73
AD
141832000-11-17 Akim Demaille <akim@epita.fr>
14184
14185 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
14186 as...
14187 (suite.m4, regression.m4, calc.m4): these.
14188 * tests/atgeneral.m4: Update from CVS Autoconf.
14189
4c50eae6
AD
141902000-11-17 Akim Demaille <akim@epita.fr>
14191
14192 * tests/regression.m4 (%union and --defines): New test,
14193 demonstrating a current bug in the obstack implementation.
14194
a35f64ea
AD
141952000-11-17 Akim Demaille <akim@epita.fr>
14196
14197 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
14198 macros.
14199 Use them to declare the variables which are global or local to
14200 `yyparse'.
14201
7de23534
AD
142022000-11-17 Akim Demaille <akim@epita.fr>
14203
14204 * acconfig.h: Remove, no longer used.
14205
aa7815f5
AD
142062000-11-07 Akim Demaille <akim@epita.fr>
14207
14208 * src: s/Copyright (C)/Copyright/g.
14209
5af1f549
AD
142102000-11-07 Akim Demaille <akim@epita.fr>
14211
14212 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
14213 defining.
14214 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
14215
553e2b22
AD
142162000-11-07 Akim Demaille <akim@epita.fr>
14217
14218 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
14219 Merge in a single CPP if/else.
14220
8a4f41d6
AD
142212000-11-07 Akim Demaille <akim@epita.fr>
14222
14223 * src/output.c (output): Remove useless variables.
14224 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
14225 argument `data' for consistency with the prototypes.
14226 Qualify it `const'.
14227 (obstack_copy, obstack_copy0): Rename the second argument as
14228 `address' for consistency. Qualify it `const'.
14229 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
14230 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
14231 `const' their input argument (`data' or `address').
14232 Adjust the corresponding macros to include `const' in casts.
14233
095a3fb5
AD
142342000-11-03 Akim Demaille <akim@epita.fr>
14235
14236 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
14237 s/PFILE1/BISON_HAIRY/.
14238 Adjust dependencies.
14239
d1cdce7c
AD
142402000-11-03 Akim Demaille <akim@epita.fr>
14241
090c5ebf 14242 For some reason, this was not applied.
d1cdce7c
AD
14243
14244 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
14245 `unlink': it's no longer used.
14246
9311529b
AD
142472000-11-03 Akim Demaille <akim@epita.fr>
14248
14249 * src/files.c (skeleton_find): New function, eved out of...
14250 (open_files, open_extra_files): here.
14251
d8880f69
AD
142522000-11-03 Akim Demaille <akim@epita.fr>
14253
14254 Don't use `atexit'.
14255
14256 * src/files.c (obstack_save): New function.
14257 (done): Rename as...
14258 (output_files): this.
14259 Use `obstack_save'.
14260 * src/main.c (main): Don't use `atexit' to register `done', since
14261 it no longer has to remove tmp files, just call `output_files'
14262 when there are no errors.
14263
0dbb648e
AD
142642000-11-02 Akim Demaille <akim@epita.fr>
14265
14266 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
14267 `unlink': it's no longer used.
14268 * src/files.h: Formatting changes.
14269
896fe5c1
AD
142702000-11-02 Akim Demaille <akim@epita.fr>
14271
14272 Remove the last uses of mktemp and unlink/delete.
14273
14274 * src/files.c (fdefines, ftable): Removed.
14275 (defines_ostack, table_obstack): New.
14276 Adjust dependencies of the former into uses of the latter.
14277 * src/output.c (output_short_or_char_table, output_short_table):
14278 Convert to using obstacks.
14279 * src/reader.c (copy_comment2): Accept one FILE * and two
14280 obstacks.
14281 (output_token_defines, reader_output_yylsp): Use obstacks.
14282 * src/system.h (obstack_fgrow3): New.
1f65350a 14283 * po/POTFILES.in: Adjust.
896fe5c1 14284
dd60faec
AD
142852000-11-01 Akim Demaille <akim@epita.fr>
14286
14287 Change each use of `fattrs' into a use of `attrs_obstack'.
14288
14289 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
14290 * src/files.c (fattrs): Remove.
14291 (attrs_obstack): New.
14292 Adjust all dependencies.
14293 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
14294
8c7ebe49
AD
142952000-11-01 Akim Demaille <akim@epita.fr>
14296
14297 Introduce obstacks.
14298 Change each use of `faction' into a use of `action_obstack'.
14299
14300 * lib/obstack.h, lib/obstack.c: New files.
14301 * src/files.c (faction): Remove.
14302 (action_obstack): New.
14303 Adjust all dependencies.
14304
77aee789
AD
143052000-10-20 Akim Demaille <akim@epita.fr>
14306
14307 * lib/quote.h (PARAMS): New macro. Use it.
14308
43591cec
AD
143092000-10-16 Akim Demaille <akim@epita.fr>
14310
14311 * src/output.c (output_short_or_char_table): New function.
14312 (output_short_table, output_token_translations): Use it.
14313 (goto_actions): Use output_short_table.
14314
1e9798d5
AD
143152000-10-16 Akim Demaille <akim@epita.fr>
14316
14317 * src/symtab.c (bucket_new): New function.
14318 (getsym): Use it.
14319
14320 * src/output.c (output_short_table): New argument to display the
14321 comment associated with the table.
14322 Adjust dependencies.
14323 (output_gram): Use it.
14324 (output_rule_data): Nicer output layout for YYTNAME.
14325
f282676b
AD
143262000-10-16 Akim Demaille <akim@epita.fr>
14327
14328 * src/lex.c (read_typename): New function.
14329 (lex): Use it.
14330 * src/reader.c (copy_dollar): Likewise.
14331
550a72a3
AD
143322000-10-16 Akim Demaille <akim@epita.fr>
14333
14334 * src/reader.c (copy_comment2): Expect the input stream to be on
14335 the `/' which is suspected to open a comment, instead of being
14336 called after `//' or `/*' was read.
14337 (copy_comment, copy_definition, parse_union_decl, copy_action)
14338 (copy_guard): Adjust.
14339
131e2fef
AD
143402000-10-16 Akim Demaille <akim@epita.fr>
14341
14342 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
14343 `read_signed_integer'.
14344
79282c5a
AD
143452000-10-16 Akim Demaille <akim@epita.fr>
14346
14347 * src/reader.c (copy_dollar): New function.
14348 (copy_guard, copy_action): Use it.
14349
ff4a34be
AD
143502000-10-16 Akim Demaille <akim@epita.fr>
14351
14352 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
14353 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
14354 New files, from Fileutils 4.0.27.
14355 * src/main.c (printable_version): Remove.
14356 * src/lex.c, src/reader.c: Use `quote'.
14357
143582000-10-04 Akim Demaille <akim@epita.fr>
14359
14360 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
14361
14ded682
AD
143622000-10-04 Akim Demaille <akim@epita.fr>
14363
14364 * doc/bison.texinfo: Various typos spotted by Neil Booth.
14365
8e03724b
AD
143662000-10-04 Akim Demaille <akim@epita.fr>
14367
14368 When a literal string is used to define two different tokens,
14369 `bison -v' segfaults.
14370 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
14371
14372 * tests/regression.m4: New file.
14373 Include the core of the sample provided by Piotr Gackiewicz.
14374 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
14375 properly.
14376
a9e64249
AD
143772000-10-04 Akim Demaille <akim@epita.fr>
14378
14379 * src/reader.c (parse_expect_decl): Keep `count' within the size
14380 of `buffer'.
14381 From Neil Booth.
14382
da9abf43
AD
143832000-10-02 Paul Eggert <eggert@twinsun.com>
14384
14385 * bison.s1 (yyparse): Assign the default value
14386 unconditionally, to avoid a GCC warning and make the parser a
14387 tad smaller.
14388
c33638bb
AD
143892000-10-02 Akim Demaille <akim@epita.fr>
14390
14391 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
14392 options.
14393
444c570a
AD
143942000-10-02 Akim Demaille <akim@epita.fr>
14395
14396 * src/derives.c, src/print.c, src/reduce.c: To ease the
14397 translation, move some `\n' out of the translated strings.
14398
89cab50d
AD
143992000-10-02 Akim Demaille <akim@epita.fr>
14400
14401 The location tracking mechanism is precious for parse error
14402 messages. Nevertheless, it is enabled only when `@n' is used in
14403 the grammar, which is a different issue (you can use it in error
14404 message, but not in the grammar per se). Therefore, there should
14405 be another means to enable it.
14406
14407 * src/getargs.c (getargs): Support `--locations'.
14408 (usage): Report it.
14409 * src/getargs.h (locationsflag): Export it.
14410 * src/lex.c (percent_table): Support `%locations'.
14411 * src/reader.c (yylsp_needed): Remove this variable, now replaced
14412 with `locationsflag'.
14413 * doc/bison.texinfo: Document `--locations' and `%locations'.
14414 Sort the options.
14415 * tests/calc.m4: Test it.
14416
14417 For regularity of the names, replace each
14418 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
14419 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
14420 In addition replace each `flag' with `_flag'.
14421
d6c2cba0
AD
144222000-10-02 Akim Demaille <akim@epita.fr>
14423
14424 Also test parse error messages, including with YYERROR_VERBOSE.
14425
14426 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
14427 associative).
14428 Use it to check the computations.
14429 Use it to check `nonassoc' is honored.
14430 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
14431 `--yyerror-verbose'.
14432 (_AT_CHECK_CALC): Adjust to this option.
14433 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
14434
5a35a6cb
AD
144352000-10-02 Akim Demaille <akim@epita.fr>
14436
14437 Test also `--verbose', `--defines' and `--name-prefix'. Testing
14438 the latter demonstrates a flaw in the handling of non debugging
14439 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
14440 was used in order to simplify:
14441
14442 #if YYDEBUG
14443 if (yydebug)
14444 {
14445 ...
14446 }
14447 #endif
14448
14449 into
14450
14451 if (yydebug)
14452 {
14453 ...
14454 }
14455
14456 unfortunately this leads to a CPP conflict when
14457 `--name-prefix=foo' is used since it produces `#define yydebug
14458 foodebug'.
14459
14460 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
14461 (YYDPRINTF): New macro.
14462 Spread its use.
14463 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
14464 the bison options.
14465 Also test `--verbose', `--defines' and `--name-prefix'.
14466
71da9eea
AD
144672000-10-02 Akim Demaille <akim@epita.fr>
14468
14469 Improve the readability of the produced parsers.
14470
14471 * src/bison.s1: Formatting changes.
14472 Improve the comment related to the `$' mark.
14473 (yydefault): Don't fall through to `yyresume': `goto' there.
14474 * src/output.c (output_parser): When the `$' is met, skip the end
14475 of its line.
14476 New variable, `number_of_dollar_signs', to check there's exactly
14477 one `$' in the parser skeleton.
14478
95e36146
AD
144792000-10-02 Akim Demaille <akim@epita.fr>
14480
14481 * lib/xstrdup.c: New file, from the fileutils.
14482 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
14483 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
14484 instead of strlen + xmalloc + strcpy.
14485 * src/symtab.c (copys): Remove, use xstrdup instead.
14486
d7020c20
AD
144872000-10-02 Akim Demaille <akim@epita.fr>
14488
14489 * src/gram.h (associativity): New enum type which replaces the
14490 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
14491 `right_assoc', `left_assoc' and `non_assoc'.
14492 Adjust all dependencies.
14493 * src/reader.c: Formatting changes.
14494 (LTYPESTR): Don't define it, use it as a literal in
14495 `reader_output_yylsp'.
14496 * src/symtab.h (symbol_class): New enum type which replaces the
14497 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
14498 `sunknown', `stoken and `snterm'.
14499
1916f98e
AD
145002000-10-02 Akim Demaille <akim@epita.fr>
14501
14502 * src/getargs.c (fixed_outfiles): Rename as...
14503 (yaccflag): for consistency and accuracy.
14504 Adjust dependencies.
14505
d7913476
AD
145062000-10-02 Akim Demaille <akim@epita.fr>
14507
14508 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
14509 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
14510 difficult and introduced a lot of core dump. It turns out that
14511 Bison used an implementation of `xmalloc' based on `calloc', and
14512 at various places it does depend upon the initialization to 0. I
14513 have not tried to isolate the pertinent places, and all the former
14514 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
14515 someone should address this issue.
14516
14517 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
14518 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
14519 files.
14520 Adjust dependencies.
14521 * src/warshall.h: New file.
14522 Propagate.
14523
340ef489
AD
145242000-10-02 Akim Demaille <akim@epita.fr>
14525
14526 Various anti-`extern in *.c' changes.
14527
14528 * src/system.h: Include `assert.h'.
14529
b2ca4022
AD
145302000-10-02 Akim Demaille <akim@epita.fr>
14531
14532 * src/state.h (nstates, final_state, first_state, first_shift)
14533 (first_reduction): Move their exportation from here...
14534 * src/LR0.h: to here.
14535 Adjust dependencies.
14536 * src/getargs.c (statisticsflag): New variable.
14537 Add support for `--statistics'.
14538 Adjust dependencies.
14539
14540 Remove a lot of now useless `extern' statements in most files.
14541
403b315b
AD
145422000-10-02 Akim Demaille <akim@epita.fr>
14543
14544 * src/LR0.h: New file.
14545 Propagate its use.
14546
07a58c13
AD
145472000-10-02 Akim Demaille <akim@epita.fr>
14548
14549 * src/print.h: New file.
14550 Propagate its use.
14551 * src/print.c: Formatting and ordering changes.
14552 (verbose, terse): Replace with...
14553 (print_results): this new function.
14554 Adjust dependencies.
14555
0619caf0
AD
145562000-10-02 Akim Demaille <akim@epita.fr>
14557
14558 * src/conflicts.c (conflict_report): New function.
14559 (conflict_log, verbose_conflict_log): Replace with...
14560 (print_conflicts): this function.
14561 Adjust dependencies.
14562 * src/conflicts.h: New file.
14563 Propagate its inclusion.
14564
3519ec76
AD
145652000-10-02 Akim Demaille <akim@epita.fr>
14566
14567 * src/nullable.h: New file.
14568 Propagate its inclusion.
14569 * src/nullable.c: Formatting changes.
14570
015acc48
AD
145712000-10-02 Akim Demaille <akim@epita.fr>
14572
14573 * src/reduce.h: New file.
14574 Propagate its inclusion.
14575 * src/reduce.c: Topological sort and other formatting changes.
14576 (bool, TRUE, FALSE): Move their definition to...
14577 * src/system.h: here.
14578
8963a27b
AD
145792000-10-02 Akim Demaille <akim@epita.fr>
14580
14581 * src/files.c: Formatting changes.
14582 (tryopen, tryclose, openfiles): Rename as...
14583 (xfopen, xfclose, open_files): this.
14584 (stringappend): static.
14585 * src/files.h: Complete the list of exported symbols.
14586 Propagate its use.
14587
a70083a3
AD
145882000-10-02 Akim Demaille <akim@epita.fr>
14589
14590 * src/reader.h: New file.
14591 Propagate its use instead of tedious list of `extern' and
14592 prototypes.
14593 * src/reader.c: Formatting changes, topological sort,
14594 s/register//.
14595
abadc117
AD
145962000-10-02 Akim Demaille <akim@epita.fr>
14597
14598 * src/lex.h: Prototype `lex.c' exported functions.
14599 * src/reader.c: Adjust.
14600 * src/lex.c: Formatting changes.
14601 (safegetc): Rename as...
14602 (xgetc): this.
14603
720d742f
AD
146042000-10-02 Akim Demaille <akim@epita.fr>
14605
14606 * src/lalr.h: New file.
14607 Propagate its inclusion instead of prototypes and `extern'.
14608 * src/lalr.c: Formatting changes, topological sorting etc.
14609
f2acea59
AD
146102000-10-02 Akim Demaille <akim@epita.fr>
14611
14612 * src/output.c (token_actions): Introduce a temporary array,
14613 YYDEFACT, that makes it possible for this function to use
14614 output_short_table.
14615
d019d655
AD
146162000-10-02 Akim Demaille <akim@epita.fr>
14617
14618 `user_toknums' is output as a `short[]' in `output.c', while it is
14619 defined as a `int[]' in `reader.c'. For consistency with the
14620 other output tables, `user_toknums' is now defined as a table of
14621 shorts.
14622
14623 * src/reader.c (user_toknums): Be a short table instead of an int
14624 table.
14625 Adjust dependencies.
14626
14627 Factor the short table outputs.
14628
14629 * src/output.c (output_short_table): New function.
14630 * src/output.c (output_gram, output_stos, output_rule_data)
14631 (output_base, output_table, output_check): Use it.
14632
6c89f1c1
AD
146332000-10-02 Akim Demaille <akim@epita.fr>
14634
14635 * src/output.c (output): Topological sort of the functions, in
14636 order to get rid of the `static' prototypes.
14637 No longer use `register'.
14638 * src/output.h: New file.
14639 Propagate its inclusion in files explicitly prototyping functions
14640 from output.c.
14641
d9efd181
AD
146422000-09-21 Akim Demaille <akim@epita.fr>
14643
14644 * src/atgeneral.m4: Update from Autoconf.
14645
c29240e7 146462000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
14647
14648 * src/closure.h: New file.
14649 * src/closure.c: Formatting changes, topological sort over the
14650 functions, use of closure.h.
14651 (initialize_closure, finalize_closure): Rename as...
14652 (new_closure, free_closure): these. Adjust dependencies.
14653 * src/LR0.c: Formatting changes, topological sort, use of
14654 cloture.h.
14655 (initialize_states): Rename as...
14656 (new_states): this.
14657 * src/Makefile.am (noinst_HEADERS): Adjust.
14658
499daa50
AD
146592000-09-20 Akim Demaille <akim@epita.fr>
14660
14661 * src/acconfig.h: Don't protect config.h against multiple
14662 inclusion.
14663 Don't define PARAMS.
14664 * src/system.h: Define PARAMS.
14665 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
14666 purpose of config.h. system.h must not try to fix wrong
14667 definitions in config.h.
14668
cc84fd5d
AD
146692000-09-20 Akim Demaille <akim@epita.fr>
14670
14671 * src/derives.h: New file.
14672 * src/main.c, src/derives.h: Use it.
14673 Formatting changes.
14674 * src/Makefile.am (noinst_HEADERS): Adjust.
14675
db5b3a89
AD
146762000-09-20 Akim Demaille <akim@epita.fr>
14677
14678 * tests/atgeneral.m4: Update from Autoconf.
14679 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
14680 (AT_CHECK_CALC): New macros.
14681 Use these macros to test bison with options `', `--raw',
14682 `--debug', `--yacc', `--yacc --debug'.
14683
ceed8467
AD
146842000-09-19 Akim Demaille <akim@epita.fr>
14685
14686 * src/output.c: Formatting changes.
14687 * src/machine.h: Remove, leaving its contents in...
14688 * src/system.h: here.
14689 Include stdio.h.
14690 Adjust all dependencies on stdio.h and machine.h.
14691 * src/getargs.h: New file.
14692 Let all `extern' declarations about getargs.c be replaced with
14693 inclusion of `getargs.h'.
14694 * src/Makefile.am (noinst_HEADERS): Adjust.
14695
14696 * tests/calc.m4 (yyin): Be initialized in main, not on the global
14697 scope.
14698 (yyerror): Returns void, not int.
14699 * doc/bison.texinfo: Formatting changes.
14700
05a1d24b
AD
147012000-09-19 Akim Demaille <akim@epita.fr>
14702
14703 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
14704 portable.
14705
cbd25751
AD
147062000-09-18 Akim Demaille <akim@epita.fr>
14707
14708 * configure.in: Append WARNING_CFLAGS to CFLAGS.
14709 * src/Makefile.am (INCLUDES): Don't.
14710 Be ready to fetch headers in lib/.
14711
13863333
AD
147122000-09-18 Akim Demaille <akim@epita.fr>
14713
14714 * doc/bison.texinfo: Update the copyright.
14715 ANSIfy and GNUify the examples.
14716 Remove the old menu.
14717
0d533154
AD
147182000-09-18 Akim Demaille <akim@epita.fr>
14719
14720 First set of tests: use the `calc' example from the documentation.
14721
14722 * src/bison.s1 (yyparse): Condition the code using `yytname' which
14723 is defined only when YYDEBUG is.
14724 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
14725 * src/files.c (tryopen, tryclose): Formatting changes.
14726 Move to the top and be static.
14727 * src/reader.c (read_signed_integer): Likewise.
14728 * tests/calc.m4: New file.
14729 * Makefile.am, suite.m4: Adjust.
14730 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
14731
e79137ac
AD
147322000-09-18 Akim Demaille <akim@epita.fr>
14733
14734 Add support for an Autotest test suite for Bison.
14735
14736 * m4/m4.m4, m4/atconfig.m4: New files.
14737 * m4/Makefile.am (EXTRA_DIST): Adjust.
14738 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
14739 files.
14740 * src/getargs.c: Display a more standard --version message.
14741 * src/reader.c (reader): Formatting changes.
14742 No longer depend upon VERSION_STRING.
14743 * configure.in: No longer use `dnl'.
14744 Set up the test suite and the new directory `tests/.
14745 (VERSION_STRING): Remove.
14746
27821bff
AD
147472000-04-14 Akim Demaille <akim@epita.fr>
14748
14749 * src/reader.c (copy_comment2): New function, same as former
14750 `copy_comment', but outputs into two FILE *.
14751 (copy_comment): Use it.
14752 (parse_union_decl): Use it.
14753 (get_type, parse_start_decl): Use the same `invalid' message.
14754 (parse_start_decl, parse_union_decl): Use the same `multiple'
14755 message.
14756 (parse_union_decl, copy_guard, copy_action): Use the same
14757 `unmatched' message.
14758 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
14759
cfe5fbc0
AD
147602000-03-31 Akim Demaille <akim@epita.fr>
14761
14762 * src/files.c (tryopen, tryclose): Move to the top.
14763 Be static.
14764
cb7db13e
AD
147652000-03-31 Akim Demaille <akim@epita.fr>
14766
14767 * src/main.c (main): Don't call `done', exit does it.
14768
a0f6b076
AD
147692000-03-31 Akim Demaille <akim@epita.fr>
14770
36281465
AD
14771 * allocate.c: s/return (foo)/return foo/.
14772 * lalr.c: Likewise.
14773 * LR0.c: Likewise.
14774 * output.c: Likewise.
14775 * reader.c: Likewise.
14776 * symtab.c: Likewise.
14777 * vmsgetargs.c: Likewise.
14778
147792000-03-31 Akim Demaille <akim@epita.fr>
14780
14781 Clean up the error reporting functions.
a0f6b076
AD
14782
14783 * src/report.c: New file.
14784 * src/report.h: Likewise.
14785 * src/Makefile.am: Adjust.
14786 * m4/error.m4: New file.
14787 * m4/Makefile.am: Adjust.
14788 * configure.in (jm_PREREQ_ERROR): Call it.
14789 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
14790 Remove.
14791 (fatal, fatals): Remove. All callers use complain.c::fatal.
14792 (warn, warni, warns, warnss, warnss): Remove. All callers use
14793 complain.c::complain.
14794 (toomany): Remove, use fatal instead.
14795 * src/files.c (done): No argument, use complain_message_count.
14796 * src/main.c (main): Register `done' to `atexit'.
14797
14798 * src/getargs.c (usage): More `fputs', less `fprintf'.
14799
18539825
AD
148002000-03-28 Akim Demaille <akim@epita.fr>
14801
14802 * lib/: New directory.
14803 * Makefile.am (SUBDIRS): Adjust.
14804 * configure.in: Adjust.
14805 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
14806 useless.
14807 * src/alloca.c: Moved to lib/.
14808 * src/getopt.c: Likewise.
14809 * src/getopt1.c: Likewise.
14810 * src/getopt.h: Likewise.
14811 * src/ansi2knr.c: Likewise.
14812 * src/ansi2knr.1: Likewise.
14813 * src/Makefile.am: Adjust.
14814 * lib/Makefile.am: New file.
14815
9f306f2a
AD
148162000-03-28 Akim Demaille <akim@epita.fr>
14817
14818 * src/getargs.c (usage): Refresh the help message.
14819
0ba347b6
AD
148202000-03-17 Akim Demaille <akim@epita.fr>
14821
14822 * src/getopt1.c: Updated from textutils 2.0e
14823 * src/getopt.c: Likewise.
14824 * src/getopt.h: Likewise.
14825
dbe7f271
AD
148262000-03-17 Akim Demaille <akim@epita.fr>
14827
14828 * src/Makefile.am (bison.simple): Fix the awk program: quote only
14829 the file name, not the whole `#line LINE FILE'.
14830
75bbe78d
AD
148312000-03-17 Akim Demaille <akim@epita.fr>
14832
14833 On syntax errors, report the token on which we choked.
14834
aa5fd0ee
AD
14835 * src/bison.s1 (yyparse): In the label yyerrlab, when
14836 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 14837
7b306f52
AD
148382000-03-17 Akim Demaille <akim@epita.fr>
14839
aa5fd0ee 14840 * src/reader.c (copy_at): New function.
7b306f52
AD
14841 (copy_guard): Use it.
14842 (copy_action): Use it.
14843
e87b5700
AD
148442000-03-17 Akim Demaille <akim@epita.fr>
14845
14846 Be kind to translators, save some useless translations.
14847
aa5fd0ee 14848 * src/main.c (banner): New function.
e87b5700
AD
14849 (fatal_banner): Use it.
14850 (warn_banner): Use it.
14851
ae3c3164
AD
148522000-03-17 Akim Demaille <akim@epita.fr>
14853
aa5fd0ee
AD
14854 * src/reader.c (copy_definition): Use copy_string and
14855 copy_comment. Removed now unused `match', `ended',
14856 `cplus_comment'.
ae3c3164
AD
14857 (copy_comment, copy_string): Moved, to be visible from
14858 copy_definition.
14859
4dc58e7c
AD
148602000-03-17 Akim Demaille <akim@epita.fr>
14861
aa5fd0ee
AD
14862 * src/reader.c (copy_string): Declare `static inline'. No
14863 problems with inline, since it is checked by configure.
4dc58e7c
AD
14864 (copy_comment): Likewise.
14865
0a6384c4
AD
148662000-03-17 Akim Demaille <akim@epita.fr>
14867
aa5fd0ee 14868 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 14869
3cef001a
AD
148702000-03-17 Akim Demaille <akim@epita.fr>
14871
aa5fd0ee 14872 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
14873 (copy_action): Use it. Removed now unused `match', `ended',
14874 `cplus_comment'.
14875 (copy_guard): Likewise.
14876
ca36d2ef
AD
148772000-03-17 Akim Demaille <akim@epita.fr>
14878
aa5fd0ee 14879 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
14880 (copy_action): Use it.
14881 (copy_guard): Likewise.
14882
6666f98f
AD
148832000-03-17 Akim Demaille <akim@epita.fr>
14884
14885 Change the handling of @s so that they behave exactly like $s.
14886 There is now a pseudo variable @$ (readble and writable), location
14887 of the lhs of the rule (by default ranging from the location of
14888 the first symbol of the rhs, to the location of the last symbol,
14889 or, if the rhs is empty, YYLLOC).
14890
14891 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
14892 yyval.
14893 (yyparse): When providing a default semantic action, provide a
14894 default location action.
14895 (after the $): No longer change `*YYLSP', just stack YYLOC the
14896 same way you stack YYVAL.
14897 * src/reader.c (read_declarations): Use warns.
14898 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
14899 (copy_action, case '@'): Likewise.
14900 Use a standard error message, to save useless work from
14901 translators.
14902
41aca2e0
AD
149032000-03-17 Akim Demaille <akim@epita.fr>
14904
aa5fd0ee
AD
14905 * src/bison.s1: Formatting and cosmetics changes.
14906 * src/reader.c: Likewise.
41aca2e0
AD
14907 Update the Copyright notice.
14908
dc08c1d5
AD
149092000-03-17 Akim Demaille <akim@epita.fr>
14910
aa5fd0ee
AD
14911 * src/bison.s1 (#line): All set to `#line' only, since the
14912 Makefile now handles them.
dc08c1d5 14913
9ee3c97b
AD
149142000-03-16 Akim Demaille <akim@epita.fr>
14915
14916 * src/output.c (output_rule_data): Output the documentation of
14917 some of the tables.
14918 (Copyright notice): Update.
14919 Formatting changes.
14920
0de741ca
AD
149212000-03-16 Akim Demaille <akim@epita.fr>
14922
14923 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
14924 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
14925 One `#if YYDEBUG' remains, since it uses variables which are
14926 defined only if `YYDEBUG != 0'.
14927
bb10be54
AD
149282000-03-16 Akim Demaille <akim@epita.fr>
14929
14930 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
14931 and related variables so that the similarities are highlighted.
14932
b07b484a
AD
149332000-03-16 Akim Demaille <akim@epita.fr>
14934
14935 * src/bison.s1: Properly indent CPP directives.
14936
361f60b3
AD
149372000-03-16 Akim Demaille <akim@epita.fr>
14938
14939 * src/bison.s1: Properly indent the `alloca' CPP section.
14940
8c44d3ec
AD
149412000-03-16 Akim Demaille <akim@epita.fr>
14942
14943 Do not hard code values of directories in `configure.in'.
14944 Update the `configure' tool chain.
14945
14946 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
14947 src/makefile.am.
14948 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
14949 (AC_OUTPUT): Add m4/Makefile.
14950 Bump to bison 1.28a, 1.29 has never been released.
14951 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
14952 handled via src/Makefile.am.
14953 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
14954 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
14955 autoheader.
14956 * Makefile.am (SUBDIRS): Add m4.
14957 (ACLOCAL_AM_FLAGS): New variable.
14958 (AUTOMAKE_OPTIONS): Add check-news.
14959 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
14960 the proper line number and file name.
14961 (DEFS): Propagate the location of bison library files and of the
14962 locale files.
14963 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
14964 builddir.
14965 * acinclude.m4: Remove, replaced by the directory m4.
14966 * m4/Makefile.am (EXTRA_DIST): New variable.
14967 * m4/gettext.m4: New file, from the fileutils.
14968 * m4/lcmessage.m4: Likewise
14969 * m4/progtest.m4: Likewise.
14970 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
14971
f95997e7
AD
149722000-03-10 Akim Demaille <akim@epita.fr>
14973
14974 * src/closure.c:
14975 Formatting changes of various comments.
14976 Respect the GNU coding standards at various places.
14977 Don't use `_()' when no translation is needed.
14978
149791999-12-13 Jesse Thilo <jthilo@gnu.org>
14980
14981 * src/files.c:
14982 OS/2 honors TMPDIR environment variable.
14983
149841999-12-13 Jesse Thilo <jthilo@gnu.org>
14985
14986 * doc/bison.texinfo: Tweaked spelling and grammar.
14987 Updated ISBN.
14988 Removed reference to price of printed copy.
14989 Mention BISON_SIMPLE and BISON_HAIRY.
14990
149911999-12-13 Jesse Thilo <jthilo@gnu.org>
14992
14993 * configure.in, NEWS:
14994 Bison 1.29 released.
14995
149961999-10-27 Jesse Thilo <jthilo@gnu.org>
14997
14998 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
14999 Added reference card.
15000
150011999-07-26 Jesse Thilo <jthilo@gnu.org>
15002
15003 * po/ru.po: Added Russian translation.
15004
150051999-07-26 Jesse Thilo <jthilo@gnu.org>
15006
15007 * configure.in: Added Russian translation.
15008
150091999-07-06 Jesse Thilo <jthilo@gnu.org>
15010
15011 * configure.in, NEWS, README:
15012 Released version 1.28.
15013
150141999-06-14 Jesse Thilo <jthilo@gnu.org>
15015
15016 * src/system.h:
15017 Squashed redefinition warning on some systems.
15018
15019 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
15020 Have configure build version string instead of relying on ANSI string
15021 concatentation.
15022
150231999-06-14 Jesse Thilo <jthilo@gnu.org>
15024
15025 * po/POTFILES.in: Got rid of version.c.
15026
150271999-06-14 Jesse Thilo <jthilo@gnu.org>
15028
15029 * acconfig.h, configure.in:
15030 Have configure build version string instead of relying on ANSI string
15031 concatentation.
15032
150331999-06-08 Jesse Thilo <jthilo@gnu.org>
15034
15035 * doc/bison.1:
15036 Dropped mention of `+' for long-named options.
15037
150381999-05-30 Jesse Thilo <jthilo@gnu.org>
15039
15040 * src/files.c: Added <unistd.h> for unlink().
15041
15042 * src/Makefile.am, src/system.h:
15043 I18n fixes.
15044
150451999-05-30 Jesse Thilo <jthilo@gnu.org>
15046
15047 * README: Added a FAQ list.
15048
15049 * configure.in, acconfig.h:
15050 I18n fixes.
15051
150521999-05-30 Jesse Thilo <jthilo@gnu.org>
15053
15054 * doc/FAQ, doc/Makefile.am:
15055 Added a FAQ list.
15056
150571999-05-19 Jesse Thilo <jthilo@gnu.org>
15058
15059 * src/alloc.h, src/symtab.h, src/version.c:
15060 Protected inclusion of "config.h" with HAVE_CONFIG_H.
15061
150621999-04-18 Jesse Thilo <jthilo@gnu.org>
15063
15064 * src/.cvsignore, src/Makefile.am:
15065 Reorganized: sources in `src', documentation in `doc'.
15066
15067 * src/lex.c (literalchar):
15068 fixed the code for escaping double quotes (thanks
15069 Jonathan Czisny.)
15070
150711999-04-18 Jesse Thilo <jthilo@gnu.org>
15072
15073 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
15074 Adjusted paths to reflect directory reorganization.
15075
150761999-04-18 Jesse Thilo <jthilo@gnu.org>
15077
15078 * doc/.cvsignore, doc/Makefile.am:
15079 Reorganized: sources in `src', documentation in `doc'.
15080
150811999-04-18 Jesse Thilo <jthilo@gnu.org>
15082
15083 * configure.in:
15084 Updated AC_INIT file to reflect directory reorganization.
15085
15086 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
15087 Reorganized: sources in `src', documentation in `doc'.
15088
150891999-04-13 Jesse Thilo <jthilo@gnu.org>
15090
15091 * src/allocate.c:
15092 Don't declare calloc() and realloc() if not necessary.
15093
150941999-04-13 Jesse Thilo <jthilo@gnu.org>
15095
15096 * configure.in, acconfig.h, acinclude.m4:
15097 Don't declare calloc() and realloc() if not necessary.
15098
150991999-03-23 Jesse Thilo <jthilo@gnu.org>
15100
15101 * po/.cvsignore: Added i18n support.
15102
151031999-03-23 Jesse Thilo <jthilo@gnu.org>
15104
15105 * acconfig.h, configure.in, Makefile.am:
15106 Added i18n support.
15107
151081999-03-22 Jesse Thilo <jthilo@gnu.org>
15109
15110 * src/bison.s1: Fixed #line numbers.
15111
151121999-03-15 Jesse Thilo <jthilo@gnu.org>
15113
15114 * po/es.po, po/fr.po, po/nl.po, po/de.po:
15115 Added PO files from Translation Project.
15116
151171999-03-03 Jesse Thilo <jthilo@gnu.org>
15118
15119 * Makefile.am:
15120 Added support for non-ANSI compilers (ansi2knr).
15121
151221999-02-16 Jesse Thilo <jthilo@gnu.org>
15123
15124 * configure.in: Bumped version number to 1.27.
15125
15126 * Makefile.am:
15127 Added `bison.simple' to list of files removed by `make distclean'.
15128
151291999-02-12 Jesse Thilo <jthilo@gnu.org>
15130
15131 * src/files.c, src/files.h:
15132 Defined locations of parser files in config.h instead of Makefile.
15133
151341999-02-12 Jesse Thilo <jthilo@gnu.org>
15135
15136 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
15137 Defined locations of parser files in config.h instead of Makefile.
15138
151391999-02-09 Jesse Thilo <jthilo@gnu.org>
15140
15141 * Makefile.am:
15142 Removed inappropriate use of $< macro.
15143
151441999-02-05 Jesse Thilo <jthilo@gnu.org>
15145
15146 * po/Makefile.in.in, po/POTFILES.in:
15147 Add `po' directory skeleton.
15148
151491999-01-27 Jesse Thilo <jthilo@gnu.org>
15150
15151 * README: Document help-bison list.
15152
15153 * configure.in: Add check for mkstemp().
15154
151551999-01-20 Jesse Thilo <jthilo@gnu.org>
15156
15157 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
15158 Hush a few compiler warnings.
15159
15160 * src/files.c:
15161 Add tryclose(), which verifies that fclose was successful.
15162 Hush a couple of compiler warnings.
15163
151641999-01-20 Jesse Thilo <jthilo@gnu.org>
15165
15166 * Makefile.am, OChangeLog:
15167 ChangeLog is now automatically generated. Include the old version as
15168 OChangeLog.
15169
151701999-01-14 Jesse Thilo <jthilo@gnu.org>
15171
15172 * 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:
15173 Update FSF address.
15174
151751999-01-14 Jesse Thilo <jthilo@gnu.org>
15176
15177 * doc/bison.texinfo: Fix formatting glitch.
15178
15179 * doc/bison.texinfo: Update FSF address.
15180
151811999-01-14 Jesse Thilo <jthilo@gnu.org>
15182
15183 * acconfig.h: Update FSF address.
15184
151851999-01-08 Jesse Thilo <jthilo@gnu.org>
15186
15187 * src/system.h:
15188 Don't define PACKAGE here, since config.h defines it.
15189
151901998-12-30 Jesse Thilo <jthilo@gnu.org>
15191
15192 * src/reader.c: Update copyright date.
15193
15194 * src/main.c:
15195 Ditch sprintf to statically-sized buffers in fatal/warn functions in
15196 favor of output directly to stderr (avoids buffer overruns).
15197
15198 * src/reader.c: Some checks for premature EOF.
15199
15200 * 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:
15201 Use prototypes if the compiler understands them.
15202
15203 * src/files.c: Honor TMPDIR on Unix hosts.
15204 Use prototypes if the compiler understands them.
15205
15206 * src/reader.c:
15207 Fix a couple of buffer overrun bugs.
15208 Use prototypes if the compiler understands them.
15209
15210 * src/system.h: Include unistd.h and ctype.h.
15211 Use #ifdef instead of #if for NLS symbols.
15212
152131998-12-30 Jesse Thilo <jthilo@gnu.org>
15214
15215 * doc/bison.texinfo:
15216 Delete comment "consider using @set for edition number, etc..." since
15217 we now are doing so.
15218
152191998-12-30 Jesse Thilo <jthilo@gnu.org>
15220
15221 * configure.in:
15222 Use prototypes if the compiler understands them.
15223
15224 * NEWS: Document 1.26 highlights.
15225
15226 * Makefile.am: Require Automake 1.3 or later.
15227
15228 * acconfig.h:
15229 Use prototypes if the compiler understands them.
15230
152311998-12-29 Jesse Thilo <jthilo@gnu.org>
15232
15233 * src/version.c:
15234 Use VERSION symbol from automake for version number.
15235
152361998-12-29 Jesse Thilo <jthilo@gnu.org>
15237
15238 * acconfig.h, configure.in, version.cin:
15239 Use VERSION symbol from automake for version number.
15240
152411998-11-28 Jesse Thilo <jthilo@gnu.org>
15242
15243 * Makefile.am:
15244 Distribute original version of simple parser (bison.s1), not built
15245 version (bison.simple).
15246
152471998-11-28 Jesse Thilo <jthilo@gnu.org>
15248
15249 * doc/bison.texinfo: Add info dir entry.
15250
15251 * doc/bison.texinfo:
15252 Let automake put version number into documentation.
15253
152541998-11-26 Jesse Thilo <jthilo@gnu.org>
15255
15256 * src/bison.cld, src/build.com, src/vmshlp.mar:
15257 Add non-RCS files from /gd/gnu/bison.
15258
152591998-11-26 Jesse Thilo <jthilo@gnu.org>
15260
15261 * doc/bison.1:
15262 Document the BISON_HAIRY and BISON_SIMPLE variables.
15263
152641998-11-25 Jesse Thilo <jthilo@gnu.org>
15265
15266 * src/version.c: Build version.c automatically.
15267
15268 * src/reader.c:
15269 Fix token numbering (used to start at 258, not 257).
15270
15271 * src/system.h: Include config.h.
15272
15273 * src/getargs.c: Update bug report address.
15274
15275 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
15276 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
15277
152781998-11-25 Jesse Thilo <jthilo@gnu.org>
15279
15280 * Makefile.am:
15281 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
15282
15283 * configure.in, version.cin:
15284 Build version.c automatically.
15285
15286 * AUTHORS: Add AUTHORS file.
15287
15288 * README: Update bug report address.
15289
15290 * bison.simple:
15291 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
15292
15293 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
15294 Add automake stuff.
15295
152961998-11-25 Jesse Thilo <jthilo@gnu.org>
15297
15298 * doc/bison.texinfo: Clean up some formatting.
15299
153001998-05-05 Richard Stallman <rms@gnu.org>
15301
15302 * doc/bison.texinfo:
15303 Explain better why to make a pure parser.
15304
153051998-01-05 Richard Stallman <rms@gnu.org>
15306
15307 * src/files.c (openfiles):
15308 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
15309 find a temporary directory, if possible. Do not unlink files while
15310 they are open.
15311
153121997-08-25 Richard Stallman <rms@gnu.org>
15313
15314 * src/reader.c (stack_offset;):
15315 Change some warni to warns.
15316
15317 * src/lex.c (literalchar): Use warns, not warni.
15318
153191997-06-28 Richard Stallman <rms@gnu.org>
15320
15321 * src/bison.s1: Add a Bison version comment.
15322
15323 * src/main.c (fatal, warn, berror):
15324 Use program_name.
15325
153261997-06-28 Richard Stallman <rms@gnu.org>
15327
15328 * Makefile.in (bison_version): New variable.
15329 (dist): Use that variable.
15330 (bison.s1): Substitute the Bison version into bison.simple.
15331
15332 * bison.simple: Add a Bison version comment.
15333
153341997-06-18 Richard Stallman <rms@gnu.org>
15335
15336 * src/main.c (fatal, warn, berror):
15337 Make error messages standard.
15338 (toomany): Improve error message text.
15339
15340 * 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:
15341 new.h renamed to alloc.h.
15342
153431997-06-18 Richard Stallman <rms@gnu.org>
15344
15345 * Makefile.in: new.h renamed to alloc.h.
15346
153471997-05-24 Richard Stallman <rms@gnu.org>
15348
15349 * src/lex.c (literalchar):
15350 Fix the code for escaping \, " and '.
15351
15352 (lex): Avoid trouble when there are many chars
15353 to discard in a char literal with just several chars in it.
15354
153551997-05-17 Richard Stallman <rms@gnu.org>
15356
15357 * src/bison.s1:
15358 Use malloc, if using alloca is troublesome.
15359 (YYSTACK_USE_ALLOCA): New flag macro.
15360 Define it for some systems and compilers.
15361 (YYSTACK_ALLOC): New macro.
15362 (yyparse): Use YYSTACK_ALLOC to allocate stack.
15363 If it was malloc'd, free it.
15364
153651997-05-17 Richard Stallman <rms@gnu.org>
15366
15367 * bison.simple:
15368 Use malloc, if using alloca is troublesome.
15369 (YYSTACK_USE_ALLOCA): New flag macro.
15370 Define it for some systems and compilers.
15371 (YYSTACK_ALLOC): New macro.
15372 (yyparse): Use YYSTACK_ALLOC to allocate stack.
15373 If it was malloc'd, free it.
15374
153751997-04-23 Richard Stallman <rms@gnu.org>
15376
15377 * src/bison.s1:
15378 (alloca) [__hpux]: Always define as __builtin_alloca.
15379
153801997-04-23 Richard Stallman <rms@gnu.org>
15381
15382 * bison.simple:
15383 (alloca) [__hpux]: Always define as __builtin_alloca.
15384
153851997-04-22 Richard Stallman <rms@gnu.org>
15386
15387 * src/bison.s1:
15388 [__hpux]: Include alloca.h (right for HPUX 10)
15389 instead of declaring alloca (right for HPUX 9).
15390
15391 * src/bison.s1 (__yy_memcpy):
15392 Declare arg `count' as unsigned int.
15393 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
15394
153951997-04-22 Richard Stallman <rms@gnu.org>
15396
15397 * bison.simple:
15398 [__hpux]: Include alloca.h (right for HPUX 10)
15399 instead of declaring alloca (right for HPUX 9).
15400
15401 * bison.simple (__yy_memcpy):
15402 Declare arg `count' as unsigned int.
15403 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
15404
154051997-01-03 Richard Stallman <rms@gnu.org>
15406
15407 * src/allocate.c: [__STDC__ or _MSC_VER]:
15408 Declare calloc and realloc to return void *.
15409
154101997-01-02 Richard Stallman <rms@gnu.org>
15411
15412 * src/system.h:
15413 [_MSC_VER]: Include stdlib.h and process.h.
15414 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
15415
15416 * src/main.c (main): Return FAILURE as a value.
15417 (printable_version): Declare arg as int, not char.
15418
154191997-01-02 Richard Stallman <rms@gnu.org>
15420
15421 * Makefile.in (dist):
15422 Explicitly check for symlinks, and copy them.
15423
154241996-12-19 Richard Stallman <rms@gnu.org>
15425
15426 * src/files.c:
15427 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
15428
154291996-12-18 Paul Eggert <eggert@gnu.org>
15430
15431 * src/bison.s1 (yyparse):
15432 If __GNUC__ and YYPARSE_PARAM are both defined,
15433 declare yyparse to have a void * argument.
15434
154351996-12-18 Paul Eggert <eggert@gnu.org>
15436
15437 * bison.simple (yyparse):
15438 If __GNUC__ and YYPARSE_PARAM are both defined,
15439 declare yyparse to have a void * argument.
15440
154411996-12-17 Richard Stallman <rms@gnu.org>
15442
15443 * src/reduce.c (nbits): Add some casts.
15444
154451996-08-12 Richard Stallman <rms@gnu.org>
15446
15447 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
15448
154491996-08-12 Richard Stallman <rms@gnu.org>
15450
15451 * bison.simple: Test _MSDOS as well as _MSDOS_.
15452
154531996-07-31 Richard Stallman <rms@gnu.org>
15454
15455 * src/bison.s1:
15456 [__sun && __i386]: Include alloca.h.
15457
154581996-07-31 Richard Stallman <rms@gnu.org>
15459
15460 * bison.simple:
15461 [__sun && __i386]: Include alloca.h.
15462
154631996-07-30 Richard Stallman <rms@gnu.org>
15464
15465 * src/bison.s1: Comment change.
15466
15467 * src/bison.s1: Test _MSDOS_, not MSDOS.
15468
154691996-07-30 Richard Stallman <rms@gnu.org>
15470
15471 * bison.simple: Comment change.
15472
15473 * bison.simple: Test _MSDOS_, not MSDOS.
15474
154751996-06-01 Richard Stallman <rms@gnu.org>
15476
15477 * 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:
15478 Insert `_' macro around many string constants.
15479
15480 * src/main.c:
15481 Insert `_' macro around many string constants.
15482
15483 (main): Call setlocale, bindtextdomain and textdomain.
15484
15485 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
15486 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
15487 [ENABLE_NLS]: Include libintl.h.
15488 [ENABLE_NLS] (gettext): Define.
15489 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
15490 (N_, PACKAGE, LOCALEDIR): New macros.
15491
154921996-06-01 Richard Stallman <rms@gnu.org>
15493
15494 * POTFILES.in: New file.
15495
15496 * Makefile.in (allocate.o):
15497 Define target explicitly.
15498
15499 * Makefile.in (CFLAGS): Set to @CFLAGS@.
15500 (LDFLAGS): Set to @LDFLAGS@.
15501 (configure): Run autoconf only if preceding `cd' succeeds.
15502 (bison.s1): Redirect output to temporary file then move the
15503 temporary to the target, rather than redirecting directly to bison.s1.
15504 (clean): Remove config.status and config.log.
15505 (distclean): Don't remove config.status here.
15506
155071996-05-12 Richard Stallman <rms@gnu.org>
15508
15509 * src/bison.s1:
15510 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
15511
155121996-05-12 Richard Stallman <rms@gnu.org>
15513
15514 * bison.simple:
15515 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
15516
155171996-05-11 Richard Stallman <rms@gnu.org>
15518
15519 * src/bison.s1 (__yy_memcpy):
15520 Really reorder the args, as was supposedly done on Feb 14 1995.
15521 (yyparse): Calls changed accordingly.
15522
155231996-05-11 Richard Stallman <rms@gnu.org>
15524
15525 * Makefile.in (dist): Don't use $(srcdir).
15526
15527 * bison.simple (__yy_memcpy):
15528 Really reorder the args, as was supposedly done on Feb 14 1995.
15529 (yyparse): Calls changed accordingly.
15530
155311996-01-27 Richard Stallman <rms@gnu.org>
15532
15533 * src/output.c (output_rule_data):
15534 Test YYERROR_VERBOSE in the conditional
15535 around the definition of ttyname.
15536
155371995-12-29 Richard Stallman <rms@gnu.org>
15538
15539 * src/bison.s1:
15540 Fix line numbers in #line commands.
15541
155421995-12-29 Richard Stallman <rms@gnu.org>
15543
15544 * bison.simple:
15545 Fix line numbers in #line commands.
15546
155471995-12-27 Richard Stallman <rms@gnu.org>
15548
15549 * src/bison.s1 (YYPARSE_PARAM_DECL):
15550 In C++, make it always null.
15551 (YYPARSE_PARAM_ARG): New macro.
15552 (yyparse): Use YYPARSE_PARAM_ARG.
15553
155541995-12-27 Richard Stallman <rms@gnu.org>
15555
15556 * bison.simple (YYPARSE_PARAM_DECL):
15557 In C++, make it always null.
15558 (YYPARSE_PARAM_ARG): New macro.
15559 (yyparse): Use YYPARSE_PARAM_ARG.
15560
155611995-11-29 Richard Stallman <rms@gnu.org>
15562
15563 * doc/bison.texinfo:
15564 Describe literal string tokens, %raw, %no_lines, %token_table.
15565
155661995-11-29 Daniel Hagerty <hag@gnu.org>
15567
15568 * doc/bison.texinfo: Fixed update date
15569
155701995-10-16 Richard Stallman <rms@gnu.org>
15571
15572 * src/version.c: Version 1.25.
15573
155741995-10-16 Richard Stallman <rms@gnu.org>
15575
15576 * NEWS: *** empty log message ***
15577
155781995-10-16 Richard Stallman <rms@gnu.org>
15579
15580 * doc/bison.1, doc/bison.rnh:
15581 Add new options.
15582
155831995-10-15 Richard Stallman <rms@gnu.org>
15584
15585 * src/vmsgetargs.c, src/getargs.c:
15586 Added -n, -k, and -raw switches.
15587 (noparserflag, toknumflag, rawtoknumflag): New variables.
15588
15589 * src/symtab.h (SALIAS):
15590 New #define for adding aliases to %token.
15591 (struct bucket): Added `alias' field.
15592
15593 * src/reduce.c (reduce_grammar):
15594 Revise error message.
15595 (print_notices): Remove final `.' from error message.
15596
15597 * src/reader.c (reader_output_yylsp):
15598 New function.
15599 (readgram): Use `#if 0' around code that accepted %command
15600 inside grammar rules: The documentation doesn't allow it,
15601 and it will fail since the %command processors scan for the next %.
15602 (parse_token_decl): Extended the %token
15603 declaration to allow a multi-character symbol as an alias.
15604 (parse_thong_decl): New function.
15605 (read_declarations): Added %thong declarations.
15606 (read_declarations): Handle NOOP to deal with allowing
15607 % declarations as another means to specify the flags.
15608 (readgram): Allow %prec prior to semantics embedded in a rule.
15609 (skip_to_char, read_declarations, copy_definition)
15610 (parse_token_decl, parse_start_decl, parse_type_decl)
15611 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
15612 (get_type_name, copy_guard, copy_action, readgram)
15613 (get_type, packsymbols): Revised most error messages.
15614 Changed `fatal' to `warnxxx' to avoid aborting for error.
15615 Revised and use multiple warnxxx functions to avoid using VARARGS1.
15616 (read_declarations): Improve the error message for
15617 an invalid character. Do not abort.
15618 (read_declarations, copy_guard, copy_action): Use
15619 printable_version to avoid unprintable characters in printed output.
15620 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
15621 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
15622 Allow the type of a non-terminal can be given
15623 more than once, as long as all specifications give the same type.
15624
15625 * src/output.c:
15626 (output_headers, output_trailers, output, output_gram)
15627 (output_rule_data): Implement noparserflag variable.
15628 Implement toknumflag variable.
15629 (output): Call reader_output_yylsp to output LTYPESTR.
15630
15631 * src/main.c (main):
15632 If reader sees an error, don't process the grammar.
15633 (fatals): Updated to not use VARARGS1.
15634 (printable_version, int_to_string, warn, warni, warns, warnss)
15635 (warnsss): New error reporting functions. Avoid abort for error.
15636
15637 * src/lex.h:
15638 Added THONG and NOOP for alias processing.
15639 Added SETOPT for the new code that allows setting options with %flags.
15640
15641 * src/lex.c:
15642 Include getopt.h. Add some extern decls.
15643 (safegetc): New function to deal with EOF gracefully.
15644 (literalchar); new function to deal with reading \ escapes.
15645 (lex): Use literalchar.
15646 (lex): Implemented "..." tokens.
15647 (literalchar, lex, parse_percent_token): Made tokenbuffer
15648 always contain the token. This includes growing the token
15649 buffer while reading an integer.
15650 (parse_percent_token): Replaced if-else statement with percent_table.
15651 (parse_percent_token): Added % declarations as another
15652 way to specify the flags -n, -l, and -r. Also added hooks for
15653 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
15654 major changes to files.c.
15655 (lex) Retain in the incoming stream a character following
15656 an incorrect '/'.
15657 (skip_white_space, lex): Revised most error messages
15658 and changed fatal to warn to avoid aborting.
15659 (percent_table): Added %thong declarations.
15660
15661 * src/gram.h: Comment changes.
15662
15663 * src/files.c (openfiles, open_extra_files, done):
15664 Add faction flag
15665 and actfile file. Handle noparserflag. Both for -n switch.
15666
15667 * src/conflicts.c (resolve_sr_conflict):
15668 Remove use of alloca.
15669
156701995-06-01 Jim Meyering <meyering@gnu.org>
15671
15672 * doc/bison.texinfo: *** empty log message ***
15673
156741995-05-06 Richard Stallman <rms@gnu.org>
15675
15676 * src/bison.s1: Comment change.
15677
156781995-05-06 Richard Stallman <rms@gnu.org>
15679
15680 * bison.simple: Comment change.
15681
156821995-05-03 Richard Stallman <rms@gnu.org>
15683
15684 * src/version.c: Version now 1.24.
15685
15686 * src/bison.s1: Change distribution terms.
15687
15688 * src/version.c: Version now 1.23.
15689
156901995-05-03 Richard Stallman <rms@gnu.org>
15691
15692 * doc/bison.texinfo:
15693 Rewrite "Conditions for Using Bison".
15694 Update version to 1.24.
15695
156961995-05-03 Richard Stallman <rms@gnu.org>
15697
15698 * bison.simple: Change distribution terms.
15699
157001995-02-23 Richard Stallman <rms@gnu.org>
15701
15702 * src/files.c: Test __VMS_POSIX as well as VMS.
15703
157041995-02-14 Jim Meyering <meyering@gnu.org>
15705
15706 * src/bison.s1 (__yy_memcpy):
15707 Renamed from __yy_bcopy to avoid
15708 confusion. Reverse FROM and TO arguments to be consistent with
15709 those of memcpy.
15710
157111995-02-14 Jim Meyering <meyering@gnu.org>
15712
15713 * bison.simple (__yy_memcpy):
15714 Renamed from __yy_bcopy to avoid
15715 confusion. Reverse FROM and TO arguments to be consistent with
15716 those of memcpy.
15717
157181994-11-10 David J. MacKenzie <djm@gnu.org>
15719
15720 * NEWS: reformat
15721
15722 * NEWS: New file.
15723
15724 * Makefile.in (DISTFILES): Include NEWS.
15725
15726 * Makefile.in (DISTFILES):
15727 Include install-sh, not install.sh.
15728
15729 * configure.in: Update to Autoconf v2 macro names.
15730
157311994-10-05 David J. MacKenzie <djm@gnu.org>
15732
15733 * Makefile.in: fix typo
15734
15735 * Makefile.in (prefix, exec_prefix):
15736 Let configure set them.
15737
157381994-09-28 David J. MacKenzie <djm@gnu.org>
15739
15740 * Makefile.in: Set datadir to $(prefix)/share.
15741
157421994-09-15 Richard Stallman <rms@gnu.org>
15743
15744 * src/bison.s1:
15745 Update copyright notice and GPL version.
15746
157471994-09-15 Richard Stallman <rms@gnu.org>
15748
15749 * bison.simple:
15750 Update copyright notice and GPL version.
15751
157521994-07-12 Richard Stallman <rms@gnu.org>
15753
15754 * src/reduce.c, src/reader.c:
15755 entered into RCS
15756
157571994-05-05 David J. MacKenzie <djm@gnu.org>
15758
15759 * Makefile.in: entered into RCS
15760
157611994-03-26 Richard Stallman <rms@gnu.org>
15762
15763 * src/bison.s1: entered into RCS
15764
157651994-03-26 Richard Stallman <rms@gnu.org>
15766
15767 * bison.simple: entered into RCS
15768
157691994-03-25 Richard Stallman <rms@gnu.org>
15770
15771 * src/main.c: entered into RCS
15772
157731994-03-24 Richard Stallman <rms@gnu.org>
15774
15775 * src/conflicts.c: entered into RCS
15776
157771994-01-02 Richard Stallman <rms@gnu.org>
15778
15779 * Makefile.in: *** empty log message ***
15780
157811993-11-21 Richard Stallman <rms@gnu.org>
15782
15783 * src/bison.s1: *** empty log message ***
15784
157851993-11-21 Richard Stallman <rms@gnu.org>
15786
15787 * doc/bison.texinfo: entered into RCS
15788
15789 * doc/bison.texinfo: *** empty log message ***
15790
157911993-11-21 Richard Stallman <rms@gnu.org>
15792
15793 * bison.simple: *** empty log message ***
15794
157951993-10-25 David J. MacKenzie <djm@gnu.org>
15796
15797 * doc/bison.texinfo: *** empty log message ***
15798
157991993-10-19 Richard Stallman <rms@gnu.org>
15800
15801 * src/bison.s1: *** empty log message ***
15802
158031993-10-19 Richard Stallman <rms@gnu.org>
15804
15805 * bison.simple: *** empty log message ***
15806
158071993-10-14 Richard Stallman <rms@gnu.org>
15808
15809 * src/bison.s1: *** empty log message ***
15810
158111993-10-14 Richard Stallman <rms@gnu.org>
15812
15813 * bison.simple: *** empty log message ***
15814
158151993-09-14 David J. MacKenzie <djm@gnu.org>
15816
15817 * doc/bison.texinfo: *** empty log message ***
15818
158191993-09-13 Noah Friedman <friedman@gnu.org>
15820
15821 * Makefile.in: *** empty log message ***
15822
158231993-09-10 Richard Stallman <rms@gnu.org>
15824
15825 * src/conflicts.c: *** empty log message ***
15826
15827 * src/system.h: entered into RCS
15828
158291993-09-10 Richard Stallman <rms@gnu.org>
15830
15831 * doc/bison.1: entered into RCS
15832
158331993-09-06 Noah Friedman <friedman@gnu.org>
15834
15835 * src/version.c: entered into RCS
15836
158371993-09-06 Noah Friedman <friedman@gnu.org>
15838
15839 * Makefile.in: *** empty log message ***
15840
158411993-07-30 David J. MacKenzie <djm@gnu.org>
15842
15843 * Makefile.in: *** empty log message ***
15844
158451993-07-24 Richard Stallman <rms@gnu.org>
15846
15847 * src/bison.s1: *** empty log message ***
15848
158491993-07-24 Richard Stallman <rms@gnu.org>
15850
15851 * bison.simple: *** empty log message ***
15852
158531993-07-08 David J. MacKenzie <djm@gnu.org>
15854
15855 * Makefile.in: *** empty log message ***
15856
158571993-07-04 Richard Stallman <rms@gnu.org>
15858
15859 * src/bison.s1: *** empty log message ***
15860
158611993-07-04 Richard Stallman <rms@gnu.org>
15862
15863 * bison.simple: *** empty log message ***
15864
158651993-06-26 David J. MacKenzie <djm@gnu.org>
15866
15867 * src/getargs.c: entered into RCS
15868
158691993-06-26 David J. MacKenzie <djm@gnu.org>
15870
15871 * doc/bison.texinfo: *** empty log message ***
15872
15873 * doc/bison.1: New file.
15874
158751993-06-25 Richard Stallman <rms@gnu.org>
15876
15877 * src/getargs.c: New file.
15878
158791993-06-16 Richard Stallman <rms@gnu.org>
15880
15881 * src/bison.s1: *** empty log message ***
15882
158831993-06-16 Richard Stallman <rms@gnu.org>
15884
15885 * bison.simple: *** empty log message ***
15886
158871993-06-03 Richard Stallman <rms@gnu.org>
15888
15889 * src/bison.s1: New file.
15890
158911993-06-03 Richard Stallman <rms@gnu.org>
15892
15893 * doc/bison.texinfo: *** empty log message ***
15894
158951993-06-03 Richard Stallman <rms@gnu.org>
15896
15897 * bison.simple: New file.
15898
158991993-05-19 Richard Stallman <rms@gnu.org>
15900
15901 * doc/bison.texinfo: New file.
15902
159031993-05-07 Noah Friedman <friedman@gnu.org>
15904
15905 * Makefile.in: *** empty log message ***
15906
159071993-04-28 Noah Friedman <friedman@gnu.org>
15908
15909 * src/reader.c: *** empty log message ***
15910
159111993-04-23 Noah Friedman <friedman@gnu.org>
15912
15913 * src/alloc.h: entered into RCS
15914
159151993-04-20 David J. MacKenzie <djm@gnu.org>
15916
15917 * src/version.c: *** empty log message ***
15918
15919 * src/files.c, src/allocate.c:
15920 entered into RCS
15921
15922 * src/reader.c: *** empty log message ***
15923
15924 * src/lex.c: entered into RCS
15925
15926 * src/conflicts.c: New file.
15927
15928 * src/symtab.c: entered into RCS
15929
15930 * src/alloc.h: New file.
15931
15932 * src/LR0.c: entered into RCS
15933
159341993-04-18 Noah Friedman <friedman@gnu.org>
15935
15936 * src/reader.c: New file.
15937
15938 * src/version.c: *** empty log message ***
15939
159401993-04-18 Noah Friedman <friedman@gnu.org>
15941
15942 * Makefile.in: *** empty log message ***
15943
159441993-04-17 Noah Friedman <friedman@gnu.org>
15945
15946 * Makefile.in: *** empty log message ***
15947
159481993-04-15 Richard Stallman <rms@gnu.org>
15949
15950 * src/main.c, src/files.c:
15951 New file.
15952
159531993-04-15 Noah Friedman <friedman@gnu.org>
15954
15955 * configure.in: entered into RCS
15956
15957 * configure.in: *** empty log message ***
15958
15959 * configure.in: New file.
15960
159611993-04-14 Richard Stallman <rms@gnu.org>
15962
15963 * Makefile.in: New file.
15964
159651993-04-13 Richard Stallman <rms@gnu.org>
15966
15967 * src/version.c: New file.
15968
159691993-03-25 Richard Stallman <rms@gnu.org>
15970
15971 * src/output.c: entered into RCS
15972
159731992-09-25 Richard Stallman <rms@gnu.org>
15974
15975 * configure.bat: entered into RCS
15976
159771992-06-22 Richard Stallman <rms@gnu.org>
15978
15979 * src/vmsgetargs.c: entered into RCS
15980
159811992-06-22 Richard Stallman <rms@gnu.org>
15982
15983 * doc/bison.rnh: entered into RCS
15984
159851992-04-20 David J. MacKenzie <djm@gnu.org>
15986
15987 * README: entered into RCS
15988
159891992-01-22 Richard Stallman <rms@gnu.org>
15990
15991 * src/machine.h: entered into RCS
15992
159931991-12-21 Richard Stallman <rms@gnu.org>
15994
15995 * src/lalr.c, src/closure.c:
15996 entered into RCS
15997
159981991-12-20 Richard Stallman <rms@gnu.org>
15999
16000 * src/state.h: entered into RCS
16001
160021991-12-18 Richard Stallman <rms@gnu.org>
16003
16004 * src/print.c, src/nullable.c, src/derives.c:
16005 entered into RCS
16006
160071991-11-03 David J. MacKenzie <djm@gnu.org>
16008
16009 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
16010 entered into RCS
16011
160121988-09-09 Richard Stallman <rms@gnu.org>
16013
16014 * src/bison.hairy: entered into RCS
16015
160161987-12-16 Richard Stallman <rms@gnu.org>
16017
16018 * REFERENCES: entered into RCS
dc546b0f 16019
f294a2c2 16020
04098407 16021 -----
f294a2c2 16022
04098407 16023 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
e2a21b6f
PE
16024 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
16025 Software Foundation, Inc.
f294a2c2 16026
04098407
PE
16027 Copying and distribution of this file, with or without
16028 modification, are permitted provided the copyright notice and this
16029 notice are preserved.