]> git.saurik.com Git - bison.git/blame - ChangeLog
Pacify make maintainer-check-posix.
[bison.git] / ChangeLog
CommitLineData
42660736
JD
12009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Pacify make maintainer-check-posix.
4 * tests/input.at (%define, --define): Move bison command-line
5 options before grammar file name.
6
a2d05674
JD
72009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
8
9 Document semicolon warnings.
10 * NEWS (2.5): Here.
11
c4fae1ef
AD
122008-12-08 Akim Demaille <demaille@gostai.com>
13
14 Fix portability issue in the test suite.
15 * tests/local.at (AT_MATCHES_CHECK): New.
16 Based on Perl instead of Sed. Sed has too many portability
17 pitfalls, not ever Sed is GNU Sed.
18 * tests/actions.at (Fix user actions without a trailing semicolon):
19 Use it.
20
42f4393a
DJ
212008-12-07 Di-an Jan <dianj@freeshell.org>
22
23 Implement the FIXME that ends an user action with a semicolon
24 if it seems necessary.
25 * src/scan-code.l (flex rules section): Flag cpp directive from
26 any `#' to the first unescaped end-of-line. Semicolon is not
27 needed after `;', `{', '}', or cpp directives and is needed after
28 any other token (whitespaces and comments have no effect).
29 * tests/actions.at (Fix user actions without a trailing semicolon):
30 New test.
31 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
32 to make user actions complete statements.
33 Adjust column numbers in error messages.
34 * tests/regression.at (Fix user actions without a trailing semicolon):
35 Remove. Covered by new test.
36
bd5df716
AD
372009-04-14 Akim Demaille <demaille@gostai.com>
38
39 doc: minor fixes.
40 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
41 (Table of Symbols): Remove duplicate entry for %debug.
42
7ba0d59d
EB
432009-04-10 Eric Blake <ebb9@byu.net>
44
45 submodules: update to latest
46 * submodules/autoconf: Use latest upstream Autoconf.
47
b4d71a96
EB
482009-04-06 Eric Blake <ebb9@byu.net>
49
50 Work around autoconf 2.63b bug in testsuite.
51 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
52 autoconf bug related to # in test.
53
4ecd3681
JD
542009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
55
56 * NEWS (2.5): Describe new -D/--define feature.
57
c65e5292
AD
582008-11-10 Akim Demaille <demaille@gostai.com>
59
60 --trace=muscles
61 * src/getargs.h, src/getargs.c (trace_muscle): New.
62 (trace_types, trace_args): Support it.
63 * src/output.c (output_skeleton): Use it.
64
96002de2
AD
652008-11-10 Akim Demaille <demaille@gostai.com>
66
67 muscles_output.
68 * src/output.c (muscles_output): New, extracted from...
69 (output_skeleton): here.
70 Adjust.
71
fadb13b5
AD
722008-11-21 Akim Demaille <demaille@gostai.com>
73
74 Display the changes in cross-options.texi.
75 * build-aux/cross-options.pl ($sep): New, to separate items.
76 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
77 the changes.
78
72183df4
DJ
792008-11-20 Di-an Jan <dianj@freeshell.org>
80
81 Improves options in the manual.
82 * doc/bison.texinfo (-g, -x): Add space before argument.
83 (Option Cross Key): Implement FIXME: listing directives also.
84 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
85 (Short Option): Special case -d. Put arguments inside @option.
fadb13b5 86 (Bison Directive): Add column, automatically extracted from
72183df4
DJ
87 src/scan-gram.l (actual name passed as the first argument)
88 with special case for %define.
89 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
90 to build-aux/cross-options.pl.
91 * src/getargs.c (usage): Document limitations of cross-options.pl.
92 * src/scan-gram.l: Likewise.
93
e80b068c
AD
942009-02-25 Akim Demaille <demaille@gostai.com>
95
96 Copyright years.
97 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
98
e3ee30b8
AD
992008-12-08 Akim Demaille <demaille@gostai.com>
100
101 Install autoconf as a submodule to get m4sugar.
102 * .gitmodules: Add submodules/autoconf.
103 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
104 submodules/autoconf.
105
c4eb1e84
JD
1062008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
107
108 Simplify last patch slightly.
109 * src/getargs.c (getargs): Here.
110
10fa0146
JD
1112008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
112
113 Fix last warning from --enable-gcc-warnings.
114 * src/getargs.c (getargs): Don't assign const address to non-const
115 pointer.
116
6f5be1ab
DJ
1172008-11-17 Di-an Jan <dianj@freeshell.org>
118
119 Handle --enable-gcc-warnings.
120 * src/getargs.c (command_line_location): Set parameters to void.
121
11c4e57d
AD
1222008-11-11 Akim Demaille <demaille@gostai.com>
123
124 AT_FULL_COMPILE.
125 * tests/actions.at, tests/regression.at: Use it.
126
e186a284
AD
1272008-11-07 Akim Demaille <demaille@gostai.com>
128
129 Pass command line location to skeleton_arg and language_argmatch.
130 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
131 The location argument is now mandatory.
132 Adjust all dependencies.
133 (getargs): Use command_line_location.
134
e14c6831
AD
1352008-11-07 Akim Demaille <demaille@gostai.com>
136
137 -D, --define.
138 * src/getargs.c (usage): Document -D.
139 Fix help string for --locations.
140 (command_line_location): New.
141 (short_options, long_options, getargs): Support -D, --define.
142 (getargs): Move -d support at the right place.
143 * doc/bison.texinfo (Bison Options): Update.
144 * tests/input.at (%define, --define): New.
145
75c21b61
AD
1462008-11-07 Akim Demaille <demaille@gostai.com>
147
148 Initialize the muscle table before parsing the command line.
149 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
150 (getargs): Define file_name.
151 * src/main.c (main): Initialize muscle_tab before calling
152 getargs.
153 * src/muscle_tab.c (muscle_init): No longer define file_name, as
154 its value is not available yet.
155
33d2a860
AD
1562008-11-09 Akim Demaille <demaille@gostai.com>
157
158 Require the generation of parse-gram.output.
159 * src/Makefile.am (YACC): Pass --report=all.
160
006faedf
JD
1612009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
162
163 * NEWS (2.5): New stub.
164
ecd1b61c
JD
1652009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
166
167 Fix options documentation.
168 * build-aux/cross-options.pl: As in --help output, write optional
169 arguments as [=ARG] not =[ARG].
170 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
171
f67c4037
AD
1722008-11-07 Akim Demaille <demaille@gostai.com>
173
174 Fix --help.
175 * src/getargs.c (usage): Fix help string for -W.
176
0213d651
AD
1772008-11-07 Akim Demaille <demaille@gostai.com>
178
179 Handle more general types of option arguments.
180 * build-aux/cross-options.pl: The argument ends at the first
181 space, not the first non-symbol character.
182 Use @var for each word appearing the argument description.
183
c19178bf
JD
1842009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
185
186 Remove spurious initial empty lines.
187 * data/location.cc: End the @output lines with an @.
188
0d2b2ab0
AD
1892008-11-04 Akim Demaille <demaille@gostai.com>
190
191 Remove spurious initial empty lines.
192 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
193 * data/yacc.c: End the @output lines with an @.
194
8ba62e3e
JD
1952009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
196
197 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
198 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
199 requirements for a correct m4 are stricter.
200 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
201 * configure.ac: Update to use AC_PROG_GNU_M4.
202 Reported by Eric Blake.
203
5bc993d9
JD
2042009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
205
206 Help with updating web manual.
207 * HACKING: Incorporate instructions from gnulib/doc/README.
208 * bootstrap.conf (gnulib_modules): Add gendocs.
209
580c075d
JD
2102009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
211
212 Fix strange %define locations for default values.
213 Reported by Akim Demaille at
214 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
215 and discussed again starting at
216 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
217 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
218 because location information is bogus.
219 Use angle brackets to delimit fake file name because square brackets
220 look like underexpanded m4. Choose a better fake file name.
221 Use negative line numbers.
222 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
223 * src/location.c (location_print): If line for a boundary is negative,
224 only print that boundary's file name.
225 * src/location.h: Document that.
226 * tests/skeletons.at (%define Boolean variables: invalid skeleton
227 defaults): Update output.
228
5d3a1ecb
AD
2292008-11-07 Akim Demaille <demaille@gostai.com>
230
231 Locations without columns for command line arguments.
232 * src/location.c (location_print): Don't display negative columns.
233 * src/location.h: Document this.
234
015e86a7
JD
2352009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
236
237 Add reminder about uploading public key to keys.gnupg.net.
238 * HACKING (Release Procedure): Here.
239
c1455bab
AD
2402009-03-31 Akim Demaille <demaille@gostai.com>
241
242 bootstrap: --help to stdout.
243 * bootstrap (usage): Don't send --help to stderr.
244 Use a here doc instead of a long string.
245
2075a82a
AD
2462009-03-31 Akim Demaille <demaille@gostai.com>
247
248 bootstrap: README-hacking no longer exists
249 * bootstrap (checkout_only_file): Set to HACKING.
250
26fccd4d
AD
2512009-03-26 Akim Demaille <demaille@gostai.com>
252
253 doc: merge HACKING and README-hacking.
254 Two files is confusing.
255 Reported by Alexandre Duret-Lutz.
5bc993d9 256
26fccd4d
AD
257 * README-hacking: Merge into...
258 * HACKING (Working from the repository): here.
259
6469c4d7
AD
2602009-03-26 Akim Demaille <demaille@gostai.com>
261
262 doc: update README-hacking.
263 * README-hacking: We now use git and git submodules.
264 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
265
b328890a
AD
2662009-03-26 Akim Demaille <demaille@gostai.com>
267
268 lalr1.cc: avoid GCC 4.3 warnings.
269 GCC 4.3 now warns about "a || b && c" and asks for explicit
270 parentheses.
271 Reported by Alexandre Duret-Lutz.
272 * data/location.cc: Update copyright years.
273 (Position::operator==): Use parens to make precedence explicit.
274 Compare lines and columns first, as they are more likely to be
275 different, and they are faster to compare.
276
f3079439
AD
2772009-03-26 Akim Demaille <demaille@gostai.com>
278
279 gnulib: update.
280 * gnulib: Update to latest.
281 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
282 use +=.
283
8defe11b
AD
2842009-01-08 Akim Demaille <demaille@gostai.com>
285
286 Fix grep portability issues.
287 Grep on Solaris does not support -q.
288 Reported by Summum Bonum.
5bc993d9 289
8defe11b
AD
290 * NEWS: Add a stub for 2.4.2.
291 * THANKS: Add Summum Bonum.
292 * tests/atlocal.in (EGREP): New.
293 (CC, CXX, XSLTPROC): Make it possible to override them via
294 envvars.
295 * tests/java.at: Use $EGREP instead of egrep.
296 Use AT_CHECK's ignore instead of grep's -q.
297
41930e7a
JD
2982008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
299
300 Version 2.4.1.
301 * NEWS: Set version and date.
302 * lib/Makefile.am: Update copyright year.
303 * tests/atlocal.in: Update copyright year.
304
d07932ef
JD
3052008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
306
307 Semicolon feature removal is not about future language support.
308 * NEWS: The semicolon feature is no longer active for newer languages,
309 so don't claim that it causes trouble for them.
310
0364b334
JD
3112008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
312
313 * gnulib: Update submodule to HEAD.
314
876fd835
AD
3152008-12-09 Akim Demaille <demaille@gostai.com>
316
317 Update data/README.
318 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
319
bee1df15
EB
3202008-12-05 Eric Blake <ebb9@byu.net>
321
322 Build testsuite with newer autoconf.
323 * tests/output.at (m4_expand): Don't override in newer autoconf,
324 where the underlying implementation changed.
325 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
326 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
327 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
328 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
329 since some of them contain unbalanced ')'.
330
7e6d1e22
JD
3312008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
332
333 * NEWS: Clarify a little.
334
a957d06c
JD
3352008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
336
337 * NEWS: Update for recent changes.
338
462503f8
JD
3392008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
340
341 Fix unexpanded macros in GLR defines file.
342 Reported by Csaba Raduly at
343 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
344 * THANKS (Csaba Raduly): Add.
345 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
346 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
347 lexer in a separate module that includes the defines file.
348 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
349 source.
350 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
351 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
352 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
353 (AT_DATA_SOURCE_PROLOGUE): New.
354 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
355 (AT_DATA_SOURCE): New.
356 (AT_FULL_COMPILE): New, copied from master branch and extended to
357 support an additional source file.
358
bf151b75
JD
3592008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
360
361 Don't let maintainer-*-check targets force a version update.
362 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
363 handled.
364
f56274a8
DJ
3652008-11-17 Di-an Jan <dianj@freeshell.org>
366
367 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
368 Align menus. Adjust word wrapping. Use node names for menu names.
369 (Examples): Don't abbreviate node names.
370 (LocalWords): Remove abbreviations.
371 (Copying): Make description a sentence.
bf151b75 372 (Java Action Features): Remove period to match the rest of menu.
f56274a8 373
b5775a81
PB
3742008-11-11 Paolo Bonzini <bonzini@gnu.org>
375
376 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
377 * configure.ac: Adjust usage.
378 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
379 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
380 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
381
7ed73f82
JD
3822008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
383
384 Don't add a semicolon to actions for %skeleton or %language.
385 It breaks Java test cases as reported by Akim Demaille.
386 * src/scan-code.l: Implement.
387
4b1ebc49
JD
3882008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
389
390 Clean up %skeleton and %language priority implementation.
391 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
392 remove static qualifier because others will soon need to see it.
393 (language_prio): Likewise.
394 (getargs): Use command_line_prio rather than 0.
395 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
396 enum fields.
397 (skeleton_prio): Extern it.
398 (language_prio): Extern it.
399 * src/parse-gram.y: Use grammar_prio rather than 1.
400
738cde3e
AD
4012008-11-04 Akim Demaille <demaille@gostai.com>
402
403 * NEWS: Mention the trailing semicolon in action.
404
d6fb461d
AD
4052008-11-04 Akim Demaille <demaille@gostai.com>
406
407 Reformat NEWS.
408 * NEWS: Use more outline-mode markup.
409 Suggested by Jim Meyering.
410
14da0cdd
JD
4112008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
412
413 Fix user actions without a trailing semicolon.
414 Reported by Sergei Steshenko at
415 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
416 * THANKS (Sergei Steshenko): Add.
417 * src/scan-code.l (SC_RULE_ACTION): Fix it.
418 * tests/regression.at (Fix user actions without a trailing semicolon):
419 New test case.
420
c9ba9e59
JD
4212008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
422
423 Initiate further development.
424 * NEWS: Create an empty section for new entries.
425 * gnulib: Update submodule to HEAD.
426
bfb40910
JD
4272008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
428
429 * NEWS: Version 2.4.
430
241fda7a
JD
4312008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
432
433 Prepare for next release.
434 * NEWS: Briefly mention changes since 2.3b.
435 * README: Say GNU m4 1.4.6, which we've been requiring in release
436 announcements already, not 1.4.3, which breaks the build.
437
ed4d67dc
JD
4382008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
439
440 Say %language is experimental.
441 We're thinking of extending it's effect on output file naming. See the
442 thread at
443 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
444 * NEWS: Say it's experimental.
445 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
446 recommend it over %skeleton for now.
447 (Bison Options): Likewise.
448 (C++ Bison Interface): Use %skeleton not %language.
449 (Calc++ Parser): Use %skeleton not %language.
450 * src/getargs.c (usage): Say it's experimental.
451
e254a580
DJ
4522008-11-01 Di-an Jan <dianj@freeshell.org>
453 Paolo Bonzini <bonzini@gnu.org>
454
455 Support all Java parser class modifiers.
456 * data/java.m4 (b4_percent_define_get3): New.
457 (b4_final_if, b4_strictfp_if): New.
458 * data/lalr1.java (final, strictfp, extends, implements): Support.
459 * doc/bison.texinfo (final, strictfp, extends, implements): Add
460 documentation.
461 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
462 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
463 (AT_CHECK_JAVA_GREP): New.
464 (Java parser class modifiers): New test.
465 (Java parser class extends and implements): New test.
466
467 Model exception propagation better with throws and lex_throws.
468 * data/java.m4 (b4_list2): New.
469 (throws): Change default.
470 * data/lalr1.java (yyaction): Add throws.
471 (parse): Add lex_throws in addition to throws.
472 * doc/bison.texinfo (throws, lex_throws): Add documentation.
473 * tests/java.at (Java throws specifications): New test.
474
475 Improve documentation for Java parsers.
476 * doc/bison.texinfo (Java Parsers): Add subsections.
477 Don't quote first argument of %define.
478 (Java Bison Interface): Document output files. Move documentation
479 of parser class and merge into Java Parser Interface. Document
480 features that error out. Document directives with no effect.
481 Move note about Javadoc higher.
482 (Java Semantic Values): Explicitly mention stype.
483 Document that generic types cannot be used.
484 (Java Location Values): Use @deftypeivar. Document constructors.
485 Correct return value for toString.
486 (Java Parser Interface): List undocumented constants/fields.
487 Move documentation of fields added by %parse-param closer to list
488 of members. Document that token names are added as fields.
489 Document constructors accurately. Remove error method.
490 (Java Scanner Interface): Move note on %pure-parser to Java Bison
491 Interface. Describe %code lexer and yylex accutately.
492 Remove documentation that does not match the code.
493 (Java Action Features): New.
494 (Java Differences): Add reference. Add item on semantic values.
495 Add note about @{ ... @}. Clarify %% epilogue placement.
496 (Java Declarations Summary): New.
497
498 Fix Java skeleton.
499 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
500 (b4_remove_comma): Quote test argument.
501 (b4_identification): Remove "bison" field.
502 * tests/java.at (Java parser class and package names): New test.
503 (Java %parse-param and %lex-param): New test.
504 (Java stype, position_class and location_class): New test.
505
f259e4e6
PB
5062008-10-31 Di-an Jan <dianj@freeshell.org>
507
508 * data/lalr1.jave: Update copyright years.
509 (YYParser): Correct name of "generated from" file in Javadoc:
510 use b4_file_name instead of @ofile@.
511 (Location constructor): Correct Javadoc parameter name.
512 (yylloc): Add missing opening m4 quote after b4_location_if.
513 This removes a stray [ in the Javadoc of Lexer.getStartPos.
514 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
515 (YYParser constructor): Correct Javadoc parameter name.
516
cae5057f
JD
5172008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
518
519 Always put auxiliary code files in the same dir as other output files.
520 * src/files.c (compute_file_name_parts): When the user specifies
521 --output but not --file-prefix, extract the directory prefix from the
522 file prefix not from the grammar file name. This affects the location
523 of files like location.hh generated by the C++ skeleton. The includes
524 in the other output files require this fix.
525 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
526 for expected output files.
527 (Output files): Add a test for the above.
528
4af432ba
JD
5292008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
530
531 * gnulib: Update submodule to HEAD.
532
e26d4e43
JD
5332008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
534
535 Update copyright year.
536 * src/files.c: Here.
537
c0ee9e21
DJ
5382008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
539
540 Don't overwrite the input file.
541 * src/files.c (output_file_name_check): Fatal error if using input file
542 for output.
543 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
544 argument.
545 (Conflicting output files): Add test.
546
482dc52f
AD
5472008-10-28 Akim Demaille <demaille@gostai.com>
548
549 Space changes.
550 * data/lalr1.cc: Formatting changes.
551
52cbbe84
AD
5522008-10-28 Akim Demaille <demaille@gostai.com>
553
554 Don't define debugging functions when !YYDEBUG.
555 * data/lalr1.cc (debug_stream, set_debug_stream)
556 (debug_level_type, debug_level, set_debug_level): Don't
557 declare them when YYDEBUG is not defined.
558 The implementation are already YYDEBUG-aware.
559
0925d5bf
AD
5602008-10-28 Akim Demaille <demaille@gostai.com>
561
562 Prefer "continue" for empty loop bodies.
563 * etc/bench.pl.in: Use "continue" instead of {}.
564
cf98343c
AD
5652008-10-28 Akim Demaille <demaille@gostai.com>
566
567 Space and comments changes.
568 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
569 * data/c.m4, data/lalr1.cc: Space changes.
570
9f467b7d
AD
5712008-10-28 Akim Demaille <demaille@gostai.com>
572
573 Make gnulib a submodule.
574 * gnulib: New.
575 * .gitmodules (gnulib): New.
576
0f0e1ace
JD
5772008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
578
579 Fix yyerror_range for user-defined location type in C++. Reported by
580 Georg Sauthoff at
581 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
582 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
583 * THANKS (Georg Sauthoff): Add.
584
548e2104
JD
5852008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
586
587 Update several administrative files mainly to facilitate releasing.
588 * HACKING (Administrivia): Make the git-merge-changelog notes more
589 helpful.
590 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
591 (Release Procedure): Update for git and add numerous details that were
592 previously missing.
593 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
594 * maint.mk (announcement): Don't list bison as a bootstrap tool so
595 that announcements don't claim we bootstrapped with whatever bison
596 happened to be in PATH. Add flex as a bootstrap tool.
597 * Makefile.maint: Remove, previously replaced by maint.mk.
598 * Makefile.cfg: Remove, and migrate settings to...
599 * cfg.mk: ... here for the sake of `make announcement'.
600 * bootstrap.conf (gnulib_modules): Add announce-gen.
601 * README: Say GNU Bison instead of just Bison. Suggested by Karl
602 Berry.
603
ddf17a6e
PB
6042008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
605
606 Small but important bugfixes for the Java skeleton.
607 * data/lalr1.java (yyerror): Change Location to b4_location_type.
608 (yy_symbol_print): Call toString on yyvaluep.
609
e1145ad8
AD
6102008-08-29 Akim Demaille <demaille@gostai.com>
611
612 Clarify UPDATED use.
bee1df15 613 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 614 not to the release date of Bison.
bee1df15 615 Reported by Joel E. Denny.
e1145ad8 616
0df72d78
AD
6172008-08-29 Akim Demaille <demaille@gostai.com>
618
619 * README: Update FAQ pointer.
620 Reported by Joel E. Denny.
621
9a90b6bb
EB
6222008-08-27 Eric Blake <ebb9@byu.net>
623
624 Resync m4sugar from autoconf.
625 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
626 (m4_init): Adjust to latest m4.git changes.
627 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
628 effects.
629 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
630 (_m4_list_cmp): Reduce side effects.
631
65015668
AD
6322008-08-27 Akim Demaille <demaille@gostai.com>
633
634 Check yyerrok in calc.at.
bee1df15
EB
635 * tests/calc.at (calc.y): Use yyerrok on "( error )".
636 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
637 expected.
65015668 638
98e26a92
AD
6392008-08-27 Akim Demaille <demaille@gostai.com>
640
641 Support yyerrok in lalr1.cc.
642 YYBACKUP is still to import back into lalr1.cc.
bee1df15 643 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 644
86c0e784
JD
6452008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
646
647 For maintainer-check*, don't recompile for a $(VERSION) update.
648 * cfg.mk: New file.
649 (_is-dist-target): Override the one in GNUmakefile.
650 * Makefile.am (EXTRA_DIST): Add cfg.mk.
651
88511166
JD
6522008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
653
654 Update for recent change to gnulib.
655 * src/parse-gram.y: Don't include strverscmp.h. It comes from
656 string.h now.
657
6bbb2ed5
EB
6582008-08-15 Eric Blake <ebb9@byu.net>
659
d67c52e8
EB
660 Remaining m4sugar merge from autoconf.
661 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
662 * data/m4sugar/foreach.m4: New file, copied from autoconf.
663 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
664 * src/output.c (output_skeleton): Tell m4 how to find it.
665
6bbb2ed5
EB
666 Partial m4sugar merge from autoconf: m4_map.
667 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
668 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
669 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
670 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
671 for empty list.
672 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
673 Likewise.
674 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
675 declares it.
676
8dce3875
JD
6772008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
678
679 Keep .version and PACKAGE_VERSION in sync.
680 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
681 dependency, and add comments justifying this in more detail. Discussed
682 starting at
683 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
684
882a1fbf
EB
6852008-08-06 Eric Blake <ebb9@byu.net>
686
a3764451
EB
687 Partial m4sugar merge from autoconf: m4_shiftn.
688 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
689 (m4_shift2, m4_shift3): New macros.
690 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
691 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
692 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
693 * data/java.m4 (b4_remove_comma): Likewise.
694
882a1fbf
EB
695 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
696 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
697 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
698 (m4_init): Consolidate wrapped text into single m4_wrap.
699 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
700 in wrapped text.
701
a30e920d
EB
7022008-08-05 Eric Blake <ebb9@byu.net>
703
dfcc5959
EB
704 Partial m4sugar merge from autoconf: builtins, version.m4.
705 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
706 (m4_prepend): Remove, as it is unused and inherently quadratic,
707 whereas m4_append is linear in newer m4.
708 (m4_mkstemp): New builtin.
709 (m4_symbols): Make rename conditional.
710 (m4_version_prereq): Ensure fatal error if used in bison, which
711 intentionally lacks version.m4.
712
a30e920d
EB
713 Fix comments in m4sugar.
714 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
715
445b7470
JD
7162008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
717
718 Update for recent .gitignore fix in Gnulib.
719 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
720 anchored .gitignore entries.
721
a1e50014
JD
7222008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
723
724 Set gnu or gnits strictness.
725 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
726 development and gnits strictness for releases. Based on Eric Blake's
727 suggestion at
728 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
729
d43f77e7
PB
7302008-07-31 Paolo Bonzini <bonzini@gnu.org>
731
732 * NEWS: Clarify documentation of %language.
733
fee2ed87
PB
7342008-07-31 Paolo Bonzini <bonzini@gnu.org>
735
736 Support usage of git-merge-changelog.
737 * .gitattributes: New.
738 * HACKING: Document usage of git-merge-changelog.
739 * bootstrap: Install git-merge-changelog entries in .git/config
740 if appropriate.
741
78029cd5
JD
7422008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
743
744 Remove remaining dependence on CVS Id keyword.
745 * ChangeLog: For the sake of people still using CVS, don't use dollars
746 when mentioning Id.
747 * data/xslt/bison.xsl: Remove Id from header comments, where it was
748 unusual anyway.
749 * data/xslt/xml2dot.xsl: Likewise.
750 * data/xslt/xml2text.xsl: Likewise.
751 * data/xslt/xml2xhtml.xsl: Likewise.
752 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
753 * doc/Makefile.am (neutralize): Remove, no longer needed.
754 (.x.1): Don't use neutralize.
755 (edit): Don't substitute for ID.
756 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
757
c53d18b1
JD
7582008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
759
760 Fix dependence on computed configure variables.
761 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
762 $(top_srcdir)/configure.ac so that changes to computed variables, such
763 as PACKAGE_VERSION, are seen.
764 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
765
5523ac79
JD
7662008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
767
768 Update copyright dates for recent changes.
769 * Makefile.am: Here.
770 * src/Makefile.am: Here.
771 * src/reduce.c: Here.
772 * tests/reduce.at: Here.
773
8fa36911
JD
7742008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
775
776 Use git-version-gen for version names between releases.
777 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
778 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
779 * .prev-version: New.
780 * .version.in: Remove.
78029cd5 781 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
782 revision.
783 * GNUmakefile: Remove, now copied from Gnulib.
784 * Makefile.am: Add code suggested by comments in
785 build-aux/git-version-gen.
786 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
787 .prev-version, and .version.
788 * NEWS (2.3b+): Rename to...
789 (?.?): ... this because we're dropping the "+" version naming scheme,
790 but, in general, we still can't be sure of our next release name.
791 * bootstrap: Add a quick hack to remove from .gitignore the
792 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
793 entry. This should really be fixed in gnulib instead.
794 * bootstrap.conf (gnulib_modules): Add gnumakefile.
795 * configure.ac (AC_INIT): Set version name by invoking
796 build-aux/git-version-gen.
797 (AC_CONFIG_FILES): Remove .version, now generated by
798 build-aux/git-version-gen.
799 * maint.mk: New, copied from coreutils.
800 * doc/.cvsignore (bison.1): Add.
801 * doc/.gitignore (/bison.1): Add.
802 * doc/bison.1: Remove, generated.
803 * src/.cvsignore (revision.c): Remove.
804 * src/.gitignore (/revision.c): Remove.
805 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
806 (BUILT_SOURCES): Remove revision.c.
807 (revision.c): Remove.
808 * src/getargs.c (version): Don't print revision after the VERSION.
809 * src/revision.h: Remove.
810
bcf07cb7
JD
8112008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
812
813 Fix untranslatable composition of sentences. Reported by Goran
814 Uddeborg at
815 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
816 * THANKS (Goran Uddeborg): Add.
817 * src/reduce.c (reduce_print): Report the number of nonterminals and
818 rules useless in the grammar in separate sentences.
819 * tests/reduce.at (Useless Rules): Update output.
820 (Reduced Automaton): Likewise.
821 (Underivable Rules): Likewise.
822 (Empty Language): Likewise.
823
9aacab9a
JD
8242008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
825
826 Fix some .gitignore and .cvsignore problems.
827 * bootstrap (insert_sorted_if_absent): Replace all uses with...
828 (insert_vc_ignore): ... this new function, which prepends `/' to all
829 .gitignore entries before passing them to insert_sorted_if_absent.
830 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
831 .cvsignore files are maintained even though Bison developers run
832 bootstrap while using Git.
833 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
834 unneeded by Bison.
835 (gnulib): Add.
836 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
837 unneeded. Reported by Eric Blake.
838 * lib/.gitignore (/*~): Add.
839 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
840 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
841 Blake.
842 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
843
a9fc7990
JD
8442008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
845
846 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
847 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
848 * bootstrap.conf (gnulib_modules): Add unsetenv.
849 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
850 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
851 (/setenv.m4): Add.
852 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
853 the first argument because it may become position-dependent, and unset
854 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
855 Add comments explaining these issues in more detail.
856
0f1d6f10
JD
8572008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
858
859 Add .gitignore everywhere based on .cvsignore.
860 * .gitignore: New.
861 * build-aux/.gitignore: New.
862 * data/.gitignore: New.
863 * doc/.gitignore: New.
864 * etc/.gitignore: New.
865 * examples/.gitignore: New.
866 * examples/calc++/.gitignore: New.
867 * lib/.gitignore: New.
868 * m4/.gitignore: New.
869 * po/.gitignore: New.
870 * runtime-po/.gitignore: New.
871 * src/.gitignore: New.
872 * tests/.gitignore: New.
873
7bd1665a
JD
8742008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
875
876 * NEWS (2.3b+): New section, empty for now.
877 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
878
72c5b982
JD
8792008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
880
881 * NEWS (2.3b): Update release date since there has been a delay in
882 getting the announcements and tarballs out.
883
bd02cd5d
JD
8842008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
885
886 * NEWS: Version 2.3b.
887 * configure.ac (AC_INIT): Likewise.
888 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
889
9126263e
JD
8902008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
891
892 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
893 been doing it for years.
894 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
895 (Release Procedure): Add FIXME about make alpha being unmaintained.
896
fa6aa7b3
JD
8972008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
898
899 * data/yacc.c: Reformat m4 a little for readability.
900 * src/lalr.c (build_relations): Correct comment.
901
d30b312d
JMG
9022008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
903
904 DJGPP specific issue.
905 * djgpp/config.sed: Fixes required to run configure scripts generated
906 by autoconf 2.62.
907
138d4cd9
JD
9082008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
909
910 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
911 coordinator@translationproject.org.
912
8f7e2e1f
JD
9132008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
914
915 * THANKS: Add Eric Blake.
916
f55efa38
JD
9172008-04-23 Eric Blake <ebb9@byu.net>
918
919 Revert prior patch, by working around autoconf regression.
920 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
921 ("Output file name: ("): Uncomment test.
922 ("Output file name: )"): Likewise.
923 Based on an idea from Noah Misch.
924
096c9f9d
JD
9252008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
926
927 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
928 2.61. Reported by Juan Manuel Guerrero at
929 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
930 * tests/output.at ("Output file name: ("): Comment out test case for
931 now.
932 ("Output file name: )"): Likewise.
933
0f664b89
JD
9342008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
935
936 * GNUmakefile: Update git-version-gen invocation so make dist
937 succeeds.
938
1cfe6375
JD
9392008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
940
941 Update to the current gnulib CVS repository, and fix trigraph handling
942 in Bison.
943 * bootstrap: Update gnulib CVS repository URL.
944 (symlink_to_dir): Encapsulate the code that guarantees the destination
945 directory exists into...
946 (check_dst_dir): ... this new function, and...
947 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
948 fail when copying files into lib/uniwidth/.
949 * src/output.c (prepare_symbols): When writing yytname muscles, where
950 symbol names will be encoded in C-string literals, tell quotearg to
951 escape trigraphs. This used to be the default in gnulib.
952 * tests/regression.at (Token definitions): Because of the change in
953 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
954 escapes trigraphs in symbol names. Thus, yytname no longer has
955 trigraphs unnecessarily doubly escaped. Update test case output.
956 Extend test case to be sure Bison's own error messages will no longer
957 have trigraphs in symbol names unnecessarily escaped once.
958
74c52fc8
JD
9592008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
960
961 Fix make dist infinite loop reported by Juan Manuel Guerrero at
962 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
963 * .cvsignore: Add .version.
964 * .version.in: New.
965 * bootstrap.conf (gnulib_modules): Add git-version-gen.
966 * configure.ac (AC_CONFIG_FILES): Add .version.
967 * build-aux/.cvsignore: Add git-version-gen.
968
8e55b3aa
JD
9692008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
970
971 * NEWS (2.3a+): Mention that -g now takes an argument.
972 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
973 consistency. Update the -g and -x entries now that they take
974 arguments. Use brackets to indicate optional arguments.
975 * src/getargs.c (usage): Explain the relationship between arguments of
976 long and short options more completely. Document --defines and -d
977 separately since the former takes an argument but, for POSIX Yacc, the
978 latter does not.
979 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 980 (getargs): Sort cases.
8e55b3aa 981
59c5ac72
AD
9822008-02-28 Akim Demaille <demaille@gostai.com>
983
984 * doc/bison.texinfo: Fix a few typos.
985
118d4978
AD
9862008-02-28 Akim Demaille <akim@epita.fr>
987
988 * doc/bison.texinfo (Bison Options): Document -W.
989 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
990
7020f1e9
AD
9912008-02-28 Akim Demaille <akim@epita.fr>
992
993 * src/getargs.c (short_options): Split and sort for readability.
994 -g and -x take optional arguments, just like their long options.
995 * build-aux/cross-options.pl: Use /x to make the regexp easier to
996 understand.
997 Fix the handling of $opt which resulted in all the argument to be
998 considered as optional.
999
59da312b
JD
10002008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1001
1002 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
1003 say its interface is experimental.
1004 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
1005 Java.
1006 (Bison Options): In the -L and --language entry, mention Java.
1007 (Java Bison Interface): Say the interface is experimental.
1008 * src/getargs.c (usage): Mention -L and --language.
1009
1010 * NEWS (2.3a+): Say the push parsing interface is experimental.
1011 * doc/bison.texinfo (Push Decl): Likewise.
1012 (Decl Summary): Likewise in the "%define api.push_pull" entry.
1013 (Push Parser Function): Likewise.
1014 (Pull Parser Function): Likewise.
1015 (Parser Create Function): Likewise.
1016 (Parser Delete Function): Likewise.
1017 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
1018 yypull_parse, and yypush_parse entries.
1019
1020 * NEWS (2.3a+): Mention XML support, and say the schema is
1021 experimental.
1022 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
1023 * src/getargs.c (usage): Say the XML schema is experimental.
1024
1025 * NEWS (2.3a+): Say option instead of flag.
1026
2bb3ebec
WP
10272008-02-21 Wojciech Polak <polak@gnu.org>
1028
1029 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
1030 text.
1031
333e670c
JD
10322008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
1033
1034 Fix impure push parser compile error reported by Bob Rossi at
1035 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
1036 * data/yacc.c: Clean up whitespace in the output a little.
1037 (yypstate_allocated): Define for impure push parsers regardless of
1038 whether the pull interface is also requested.
1039 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
1040 check impure push parsers without the pull interface.
1041
1042 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
1043 yyerror takes arguments specified by %parse-param while yypstate_new
1044 does not.
1045 * doc/bison.texinfo (Parser Create Function): Document that
1046 yypstate_new returns 0 for multiple impure parser instances.
1047 * tests/push.at (Push Parsing: Multiple impure instances): Update
1048 expected stderr output.
1049
798096e1
JD
10502008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1051
1052 * runtime-po/POTFILES.in (push.c): Remove.
1053
9ca7f077
JD
10542008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
1055
1056 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
1057 * data/push.c: Rename to...
1058 * data/yacc.c: ... this, overwriting it.
1059 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
1060 `%push-pull-parser' -> `%define api.push_pull "both"'.
1061 Remove old yacc.c tests, and update push.c tests to yacc.c.
1062
42ee26bb
JD
10632008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
1064
1065 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
1066 `"%code top" blocks' instead of `%code "top" blocks'.
1067 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
1068 Clean up whitespace in the output a little.
1069
b1cc23c4
JD
10702008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
1071
1072 Fix documentation problems reported by Tim Josling at
1073 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
1074 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
1075 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
1076 integers. Explain the effect of literal string aliases on error
1077 messages. Copy token 0 documentation from the C++ skeleton
1078 documentation.
1079
ab7f29f8
JD
10802008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
1081
1082 Accept a token number in a %left, %right, or %nonassoc for POSIX
1083 conformance. Reported by Tim Josling at
1084 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
1085 * NEWS (2.3a+): Mention.
1086 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
1087 and code numbers are treated by precedence declarations.
1088 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
1089 of symbols.1.
1090 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
1091 of symbol.
1092 (symbol.prec): New, just like symbol but allows INT.
1093 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
1094 longer holds.
1095 * tests/regression.at (Token number in precedence declaration): New
1096 test case.
1097
a924ef36
JMG
10982008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1099
1100 DJGPP specific issues.
1101 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
1102 be changed. Copyright timestamp adjusted.
1103 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
1104 be changed. Copyright timestamp adjusted.
1105 * djgpp/config.site: Copyright timestamp adjusted.
1106 * djgpp/config_h.sed: Copyright timestamp adjusted.
1107 * djgpp/djunpack.bat: Copyright timestamp adjusted.
1108 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
1109 filename translation list.
1110 * djgpp/subpipe.c (init_subpipe): Check the environment variables
1111 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
1112 files shall be created. Before trying to use the temp dir where the
1113 environment variable points to check that the dir really exists. If
1114 not default to the cwd as temp dir. Copyright timestamp adjusted.
1115 * djgpp/subpipe.h: Copyright timestamp adjusted.
1116 * djgpp/testsuite.sed: Copyright timestamp adjusted.
1117
389c8cfd
PE
11182008-01-30 Paul Eggert <eggert@cs.ucla.edu>
1119
1120 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
1121
5d1cfef4
PE
11222008-01-09 Paul Eggert <eggert@cs.ucla.edu>
1123
1124 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
1125 Problem reported by Claudio Saavedra in
1126 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
1127
e2dcf996
WP
11282008-01-05 Wojciech Polak <polak@gnu.org>
1129
1130 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
1131 document's title with the input grammar file name.
1132
da730230
JD
11332007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
1134
1135 Automate regression testing of the XML/XSLT implementation. Discussed
1136 starting at
1137 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
1138 * configure.ac (XSLTPROC): New substitution.
1139 * Makefile.am (maintainer-xml-check): New phony target invoking...
1140 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
1141 invoking make maintainer-check with BISON_TEST_XML=1.
1142 * tests/atlocal.in (XSLTPROC): New.
1143 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
1144 not to report reachable memory when Bison is expected to have a
1145 non-zero exit status and (2) to compare XML/XSLT output with --graph
1146 and --report=all output for every working grammar when
1147 BISON_TEST_XML=1.
1148 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
1149 (AT_BISON_CHECK_XML): New.
1150 (AT_QUELL_VALGRIND): New.
1151 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
1152 (AT_CHECK): ... don't redefine this since this was the old way to
1153 quell Valgrind.
1154 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
1155 AT_BISON_CHECK invocations.
1156 * tests/c++.at: Likewise.
1157 * tests/calc.at: Likewise.
1158 * tests/conflicts.at: Likewise.
1159 * tests/cxx-type.at: Likewise.
1160 * tests/existing.at: Likewise.
1161 * tests/glr-regression.at: Likewise.
1162 * tests/headers.at: Likewise.
1163 * tests/input.at: Likewise.
1164 * tests/java.at: Likewise.
1165 * tests/output.at: Likewise.
1166 * tests/push.at: Likewise.
1167 * tests/reduce.at: Likewise.
1168 * tests/regression.at: Likewise.
1169 * tests/sets.at: Likewise.
1170 * tests/skeletons.at: Likewise.
1171 * tests/synclines.at: Likewise.
1172 * tests/torture.at: Likewise.
1173 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
1174 tends to hang xsltproc.
1175 (Big horizontal): Likewise.
1176
408476bc
JD
11772007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
1178
1179 In XML output, remove redundant class attribute on symbol element.
1180 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
1181 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
1182 look up a symbol to determine whether it's a nonterminal or terminal.
1183 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
1184 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
1185
1186 Add prec/assoc information to XML output.
1187 * src/gram.c (grammar_rules_print_xml): For each rule that has a
1188 %prec, add a percent_prec attribute.
1189 * src/print-xml.c (print_grammar): For each terminal that has a
1190 precedence or associativity, add a prec or assoc attribute.
1191 (xml_indent): New.
1192 (xml_puts): Use xml_indent.
1193 (xml_printf): Use xml_indent.
1194 * src/print-xml.h (xml_indent): Prototype.
1195
1196 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
1197 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
1198
d4a26c48
JD
11992007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
1200
1201 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
1202 (bison:ruleByNumber): ... this for clarity.
1203 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
1204 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
1205 (xsl:template match="reduction"): Update.
1206 (xsl:template match="item"): Update.
1207 (xsl:template match="reduction"): Update.
1208
1209 In the XML output, don't print the list of rules where symbols appear.
1210 Compute it in XSLT instead. Discussed at
1211 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
1212 * data/xslt/bison.xsl (bison:ruleByLhs): New.
1213 (bison:ruleByRhs): New.
1214 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
1215 bison:ruleByRhs.
1216 (xsl:template match="terminal/rule"): Remove.
1217 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
1218 bison:ruleByRhs.
1219 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
1220 Remove.
1221 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
1222 bison:ruleByRhs and mode="number-link" for rule template.
1223 (xsl:template match="terminal/rule"): Remove.
1224 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
1225 bison:ruleByRhs and mode="number-link" for rule template.
1226 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
1227 Rewrite as...
1228 (xsl:template match="rule" mode="number-link"): ... this.
1229 * src/print-xml.c (print_grammar): Don't print the list of rules.
1230
ef1b4273
JD
12312007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
1232
1233 Don't let --report affect XML output; always print all information.
1234 Discussed at
1235 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
1236 * src/conflicts.c (log_resolution): Implement.
1237 * src/print-xml.c (print_core): Implement.
1238 (print_state): Implement.
1239 (print_xml): Implement.
1240
1241 * NEWS (2.3a+): Fix quotes.
1242 * src/parse-gram.y (prologue_declaration): For consistency with -v,
1243 don't let %verbose clear the list specified by --report.
1244
0f6cd9e3
AD
12452007-11-26 Akim Demaille <akim@epita.fr>
1246
1247 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
1248
d80fb37a
JD
12492007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
1250
1251 In the XML output, list useless and unused symbols and rules with the
1252 useful ones and add a "usefulness" attribute. Discussed starting at
1253 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
1254 * src/gram.c (grammar_rules_partial_print_xml): Remove.
1255 (grammar_rules_print_xml): Print all rules instead of just those
1256 useful in the grammar, and add a "usefulness" attribute.
1257 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
1258 * src/print-xml.c (print_rules_useless_in_parser): Remove.
1259 (print_grammar): Print all nonterminals instead of just useful ones,
1260 and add a "usefulness" attribute to nonterminals and terminals.
1261 (print_xml): Don't print a separate "reductions" or
1262 "rules-useless-in-parser" element.
1263 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
1264 (reduce_xml): Remove.
1265 (reduce_token_unused_in_grammar): New.
1266 (reduce_nonterminal_useless_in_grammar): New.
1267 * src/reduce.h (reduce_xml): Remove prototype.
1268 (reduce_token_unused_in_grammar): Add prototype.
1269 (reduce_nonterminal_useless_in_grammar): Add prototype.
1270 * data/xslt/xml2text.xsl: Update for XML changes.
1271 * data/xslt/xml2xhtml.xsl: Update for XML changes.
1272 * tests/reduce.at (Useless Terminals): Update output.
1273 (Useless Rules): Update output.
1274 (Reduced Automaton): Update output.
1275
1276 Say "Terminals unused in grammar" instead of "Unused terminals".
1277 * NEWS (2.3a+): Update.
1278 * doc/bison.texinfo (Understanding): Update example output.
1279 * src/reduce.c (reduce_output): Implement.
1280 * data/xslt/xml2text.xsl: Implement.
1281 * data/xslt/xml2xhtml.xsl: Implement.
1282
1bb2bd75
JD
12832007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1284
1285 Accept --report-file=FILE to override the default `.output' filename.
1286 * NEWS (2.3a+): Mention.
1287 * doc/bison.texinfo (Bison Options): Add an entry.
1288 * src/files.c (compute_output_file_names): Don't override
1289 spec_verbose_file if already set.
1290 * src/getargs.c (usage): Document --report-file.
1291 (REPORT_FILE_OPTION): New anonymous enum member.
1292 (long_options): Add entry for it.
1293 (getargs): Add case for it setting spec_verbose_file.
1294
1295 * build-aux/cross-options.pl: Don't record a short option just because
1296 there's an arg.
1297 * doc/.cvsignore: Add yacc.1.
1298
a005a9c4
AD
12992007-11-14 Akim Demaille <akim@epita.fr>
1300
1301 * doc/yacc.1.in: New.
1302 * configure.ac, doc/Makefile.am: Adjust.
1303 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
1304 config.h symbol.
1305 Use AC_SUBST for assignments too.
1306 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
1307
cff03fb2
JD
13082007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
1309
1310 * src/gram.c: Remove comments that duplicate comments in gram.h.
1311
1312 When reporting useless rules and nonterminals, say "useless in grammar"
1313 instead of "useless", and say "useless in parser" instead of "never
1314 reduced". Discussed starting at
1315 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
1316 * NEWS (2.3a+): Mention this change.
1317 * data/xslt/xml2text.xsl: Update output text and expected input XML
1318 element names to match changes below.
1319 * data/xslt/xml2xhtml.xsl: Likewise.
1320 (xsl:template match="bison-xml-report"): Add missing entry in Table of
1321 Contents: "Rules useless in parser due to conflicts".
1322 * doc/bison.texinfo (Decl Summary): Reword a little.
1323 (Understanding): Update example output for changes below.
1324 * src/gram.c: (rule_useful_p): Rename to...
1325 (rule_useful_in_grammar_p): ... this.
1326 (rule_useless_p): Rename to...
1327 (rule_useless_in_grammar_p): ... this.
1328 (rule_never_reduced_p): Rename to...
1329 (rule_useless_in_parser_p): ... this.
1330 (grammar_rules_print): Update for renames.
1331 (grammar_rules_print_xml): Update for renames.
1332 (grammar_rules_never_reduced_report): Rename to...
1333 (grammar_rules_useless_report): ... this since it is used for either
1334 kind of useless rule.
1335 * src/gram.h: Reword comments and update function names in prototypes.
1336 * src/main.c (main): Say "rule useless in parser due to conflicts".
1337 * src/print-xml.c (print_rules_never_reduced): Rename to...
1338 (print_rules_useless_in_parser): ... this, and rename output XML
1339 element "rules-never-reduced" to "rules-useless-in-parser".
1340 (print_xml): Update for rename.
1341 * src/print.c (print_results): Say "Rules useless in parser due to
1342 conflicts".
1343 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
1344 (nonterminals_reduce): Say "nonterminal useless in grammar".
1345 (reduce_output): Say "Nonterminals useless in grammar".
1346 Say "Rules useless in grammar".
1347 (reduce_xml): Rename output XML element "useless" to
1348 "useless-in-grammar".
1349 (reduce_print): Don't report the count of grammatically useless rules
1350 as "rules never reduced" just because %yacc is specified.
1351 In the correct report of this count, say nonterminal(s) and rule(s)
1352 "useless in grammar".
1353 * tests/conflicts.at (S/R in initial): Update expected output.
1354 (Defaulted Conflicted Reduction): Likewise.
1355 (Unreachable States After Conflict Resolution): Likewise.
1356 * tests/existing.at (GNU pic Grammar): Likewise.
1357 * tests/reduce.at (Useless Nonterminals): Likewise.
1358 (Useless Rules): Likewise.
1359 (Reduced Automaton): Likewise.
1360 (Underivable Rules): Likewise.
1361 (Empty Language): Likewise.
1362
66f0441d
JD
13632007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
1364
1365 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
1366 here document and before the EOF so that BSD's implementation of Bourne
1367 shell doesn't parse the delimiter as part of the here document.
1368 * doc/.cvsignore: Add cross-options.texi.
1369 * src/getargs.c (usage): Add a blank line after the warning categories.
1370
d0ee4105
PB
13712007-11-08 Paolo Bonzini <bonzini@gnu.org>
1372
1373 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
1374
e8b1fb9b
AD
13752007-11-05 Akim Demaille <akim@epita.fr>
1376
1377 Remove Id: from bison.1.
1378 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
1379 (perl -0777 -pi -e 's/\.PP\nId): New.
1380 (.x.1): Use it to ignore the version control revision.
1381
2f7a96b5
AD
13822007-11-05 Akim Demaille <demaille@gostai.com>
1383
1384 * build-aux/Makefile.am: Ship cross-options.pl.
1385 * doc/Makefile.am: Always refer to cross-options.texi with
1386 $(srcdir).
1387 (MAINTAINERCLEANFILES): Add it.
1388
f4101aa6
AD
13892007-11-04 Akim Demaille <demaille@gostai.com>
1390
1391 Generate the long/short option cross-table.
1392 * build-aux/cross-options.pl: New.
1393 * doc/Makefile.am (cross-options.texi): New.
1394 * doc/bison.texinfo: Use it.
1395
727a1401
AD
13962007-11-04 Akim Demaille <demaille@gostai.com>
1397
1398 Generate bison.1 using help2man.
1399 * doc/common.x, doc/bison.x: New.
1400 * doc/Makefile.am (bison.1, .x.1): New.
1401 The code is taken from autoconf-2.61/man/Makefile.am.
1402 * configure.ac: Look for help2man.
1403
6aeb9c57
AD
14042007-11-04 Akim Demaille <demaille@gostai.com>
1405
1406 Complete --help.
1407 * src/getargs.c (usage): Document -W, make it clear that -d,
1408 -g and -x have optional arguments.
1409
d7be4085
AD
14102007-11-04 Akim Demaille <demaille@gostai.com>
1411
1412 Find sha1sum when named gsha1sum.
1413 * bootstrap (find_tool): New.
1414 ($SHA1SUM): New.
1415
d9df47b6
JD
14162007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1417
1418 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
1419 at
1420 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
1421 * NEWS (2.3a+): Mention.
1422 * data/bison.m4 (b4_pure_if): Don't define it here.
1423 * data/c.m4 (b4_identification): Depend on individual skeletons to
1424 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
1425 values of the %define variables api.pure or api.push_pull. Define
1426 YYPURE, YYPUSH, and YYPULL accordingly.
1427 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
1428 glr.cc has already defined b4_pure_flag.
1429 * data/push.c: Define b4_pure_if based on `%define api.pure'.
1430 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 1431 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
1432 * doc/bison.texinfo (Pure Decl): Update.
1433 (Push Decl): Update.
1434 (Decl Summary): Add api.pure to %define entry.
1435 In %pure-parser entry, say it's deprecated and reference %define.
1436 (Pure Calling): Update.
1437 (Error Reporting): Update.
1438 (C++ Scanner Interface): Update.
1439 (How Can I Reset the Parser): Update.
1440 (Table of Symbols): In %pure-parser entry, say it's deprecated and
1441 reference %define.
1442 * src/getargs.c (pure_parser): Remove global variable.
1443 * src/getargs.h (pure_parser): Remove extern.
1444 * src/output.c (prepare): Don't define pure_flag muscle.
1445 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
1446 wrapper around `%define api.pure'.
1447 * tests/calc.at (Simple LALR Calculator): Update.
1448 (Simple GLR Calculator): Update.
1449 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
1450 Update.
1451 (GLR: Resolve ambiguity, pure, locations): Update.
1452 (GLR: Merge conflicting parses, pure, no locations): Update.
1453 (GLR: Merge conflicting parses, pure, locations): Update.
1454 * tests/glr-regression.at (Uninitialized location when reporting
1455 ambiguity): Update
1456 * tests/input.at (Unused %define api.pure): New test case.
1457 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
1458 AT_PURE_IF and AT_PURE_AND_LOC_IF.
1459 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
1460
c373bf8b
JD
14612007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1462
1463 %define push_pull -> %define api.push_pull. Discussed starting at
1464 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
1465 * data/push.c: Expect the new name.
1466 * data/yacc.c: Likewise.
1467 * doc/bison.texinfo (Push Decl): Update.
1468 (Decl Summary): Update %define entry.
1469 (Push Parser Function): Update.
1470 (Pull Parser Function): Update.
1471 (Parser Create Function): Update.
1472 (Parser Delete Function): Update.
1473 * tests/calc.at (Simple LALR Calculator): Update.
1474 * tests/input.at (%define enum variables): Update.
1475 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
1476 (Push Parsing: Multiple impure instances): Update.
1477 (Push Parsing: Unsupported Skeletons): Update.
1478 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
1479 (Exploding the Stack Size with Malloc): Update.
1480
1481 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
1482 other entries some.
1483
32f19b6b
JD
14842007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
1485
1486 For the XML output's terminal element, rename @number to @token-number,
1487 and add @symbol-number. In the nonterminal element, rename @number to
1488 @symbol-number. Discussed starting at
1489 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
1490 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
1491 renames.
1492 (xsl:template match="nonterminal"): Likewise.
1493 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
1494 (xsl:template match="nonterminal"): Likewise.
1495 * src/print-xml.c (print_grammar): Implement.
1496
255a6b90
JD
14972007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
1498
1499 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
1500 2007-10-11 change, the child elements here are items not rules.
408476bc 1501 (xsl:template match="item"): New.
255a6b90
JD
1502 (xsl:template match="rule"): Update for new reduced itemset.
1503 (xsl:template match="point"): Remove.
1504 (xsl:template match="empty"): For consistency with --graph, don't
1505 output "/* empty */".
1506 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
1507 line-wrap, don't pass a negative value as first-line-length since this
1508 won't work with the following changes.
1509 (xsl:template name="line-wrap"): Simplify slightly.
1510 (xsl:template name="ws-search"): Eliminate recursion.
1511 * src/print_graph.c (print_core): Don't print a reduction's lookahead
1512 set next to an item whose dot is not at the end of the RHS even if it
1513 happens to be associated with the same rule.
1514
88c78747
JD
15152007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
1516
31984206
JD
1517 Add %define lr.keep_unreachable_states.
1518 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
1519 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
1520 * src/main.c (main): Implement it.
1521 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1522 Extend to test it, and fix a typo.
1523
15242007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
1525
1526 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
1527 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
1528 the example .output text.
1529 * tests/regression.at (Extra lookahead sets in report): Improve wording
1530 of comments.
1531
b7a70162
WP
15322007-10-17 Wojciech Polak <polak@gnu.org>
1533
1534 * src/print-xml.c (print_grammar): Renamed
1535 <terminal> and <nonterminal> attributes:
1536 "type" to "number" and "symbol" to "name".
1537 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
1538 Use new attribute names.
1539 (xsl:template match="nonterminal"): Likewise.
1540 * data/xslt/xml2xhtml.xsl: Likewise.
1541
a0de5091
JD
15422007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
1543
1544 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
1545 (Option Cross Key): Likewise.
1546
1547 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
1548 next to an item whose dot is not at the end of the RHS even if it
1549 happens to be associated with the same rule.
1550 * src/print.c (print_core): Likewise.
1551 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
1552 (Resolved SR Conflicts): Update output.
1553 * tests/regression.at (Extra lookahead sets in report): New test case.
1554
4c20d18d
WP
15552007-10-11 Wojciech Polak <polak@gnu.org>
1556
1557 * src/print-xml.c (print_core): Remove item set
1558 redundancy.
1559 * data/xslt/bison.xsl (bison:ruleNumber): New key.
1560 Improve processing time. Suggested by Joel E. Denny.
1561 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
1562 Write xsl:param "required" attribute as comment.
1563 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
1564 (xsl:template match="rule"): Support new reduced itemset.
1565 (xsl:template match="point"): Remove.
1566 * data/xslt/xml2xhtml.xsl: Likewise.
1567
f506ad1c
JD
15682007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
1569
1570 * src/getargs.c (version): Update copyright year.
1571
21f1b063
JD
15722007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
1573
1574 Make xml2dot.xsl and --graph produce the same output.
1575 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
1576 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
1577 escaped later.
1578 (xsl:template name="output-node"): Use the new escape template instead
1579 of the string-replace template directly.
1580 (xsl:template name="output-edge"): Likewise.
1581 (xsl:template name="escape"): New, escapes backslashes and newlines in
1582 addition to quotation marks.
1583 * src/graphviz.c (start_graph, output_node, output_edge): Add
1584 whitespace to output for legibility.
1585
1586 Make xml2text.xsl and --report produce the same output, and remove the
1587 XML "conflicts" element since a conflict summary is easily extracted
1588 from the automaton.
1589 * data/xslt/bison.xsl: New.
1590 (xsl:template match="state" mode="bison:count-conflicts): New.
1591 * data/xslt/xml2text.xsl: Import bison.xsl.
1592 (xsl:template match="bison-xml-report"): Instead of styling the
1593 "conflicts" element, style the "automaton" element with mode
1594 "conflicts". Unlike the former, the latter lists S/R and R/R
1595 conflicts for a state on the same line.
1596 (xsl:template match="conflicts"): Remove.
1597 (xsl:template match="conflict"): Remove.
1598 (xsl:template match="terminal"): Line-wrap the list of rules in which
1599 the terminal is used.
1600 (xsl:template match="nonterminal"): Likewise for nonterminals.
1601 (xsl:template match="automaton" mode="conflicts"): New.
1602 (xsl:template match="state" mode="conflicts"): New.
1603 (xsl:template name="line-wrap"): New.
1604 (xsl:template name="ws-search"): New.
1605 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
1606 (xsl:template match="bison-xml-report"): Instead of styling the
1607 "conflicts" element, style the "automaton" element with mode
1608 "conflicts."
1609 (xsl:template match="conflicts"): Remove.
1610 (xsl:template match="conflict"): Remove.
1611 (xsl:template match="automaton" mode="conflicts"): New.
1612 (xsl:template match="state" mode="conflicts): New.
1613 * src/conflicts.c (conflicts_output_xml): Remove.
1614 * src/conflicts.h (conflicts_output_xml): Remove prototype.
1615 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
1616 * src/print.c (print_grammar): Consistently wrap at the 66th column so
1617 the corresponding XSLT is easier. Also, never wrap between a word and
1618 the comma that follows it.
1619
793fbca5
JD
16202007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
1621
1622 Improve C++ namespace support. Discussed starting at
1623 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
1624 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
1625 b4_namespace_close): New macros that interpret the %define variable
1626 "namespace" so its value can contain "::" to indicate nested
1627 namespaces.
1628 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
1629 the above macros.
1630 * data/lalr1.cc (b4_namespace): Likewise.
1631 * data/location.cc (b4_namespace): Likewise.
1632 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
1633 inside a new table in the general %define entry. Document `%define
1634 namespace' there as well. Point the %name-prefix entry to it since it
1635 explains it more completely in the case of C++.
1636 (C++ Bison Interface): Mention `%define namespace' instead of
1637 %name-prefix.
1638 (Table of Symbols): Remove the `%define push_pull' entry. The %define
1639 entry suffices.
1640 * tests/c++.at (Relative namespace references): New test case.
1641 (Absolute namespace references): New test case.
1642 (Syntactically invalid namespace references): New test case.
1643 * tests/input.at (C++ namespace reference errors): New test case.
1644
35b8730d
JD
16452007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
1646
1647 Add syncline support and location accessor to internal %define
1648 interfaces.
1649 * data/bison.m4 (b4_percent_define_get_loc): New.
1650 (b4_percent_define_get_syncline): New.
1651 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
1652 (b4_percent_define_default): Record defining location as line 1 rather
1653 than 0 for the sake of synchronizing #line's, and define
1654 b4_percent_define_syncline(VARIABLE).
1655 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
1656 * src/muscle_tab.c (muscle_syncline_grow): New.
1657 (muscle_code_grow): Use muscle_syncline_grow.
1658 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
1659 define b4_percent_define_syncline(VARIABLE).
1660 (muscle_percent_define_get_loc): New.
1661 (muscle_percent_define_get_syncline): New.
1662 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
1663 remove some unused variables.
1664 (muscle_percent_define_default): Record defining location as line 1
1665 rather than 0 for the sake of synchronizing #line's, and define
1666 b4_percent_define_syncline(VARIABLE).
1667 (muscle_percent_define_check_values): Use
1668 muscle_percent_define_get_loc.
1669 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
1670 (muscle_percent_define_get_syncline): Prototype.
1671 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1672 defaults): Update output for location change.
1673 (Complaining during macro argument expansion): Extend to test
1674 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
1675
7dc4a694
JD
16762007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
1677
1678 Fix some error-reporting macro bugs.
1679 * data/bison.m4 (b4_cat): New.
1680 (b4_error, b4_error_at): Use b4_cat to send error directives directly
1681 to stdout so they don't become arguments to other macros. Update
1682 comments and add examples.
1683 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
1684 add examples.
1685 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
1686 after printing the error directive so that M4 doesn't report subsequent
1687 problems that are induced by this problem.
1688 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
1689 instead of just in them. Recognize @\n in both places. Both expand to
1690 the empty string. Needed by b4_cat.
1691 * tests/skeletons.at (Complaining during macro argument expansion):
1692 New test case.
1693 (Fatal errors make M4 exit immediately): New test case.
1694
d4bd2295
JD
16952007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
1696
1697 Implement --print-datadir.
1698 * src/getargs.c (usage): Mention.
1699 (PRINT_DATADIR_OPTION): New anonymous enum member.
1700 (long_options): Add entry for it.
1701 (getargs): Add case for it calling compute_pkgdatadir.
1702 * src/output.c (output_skeleton): Encapsulate data directory
1703 computation from here...
1704 (prepare): ... and from here...
1705 (compute_pkgdatadir): ... into this new function.
1706 * src/output.h (compute_pkgdatadir): Prototype.
1707
34cdeddf
JD
17082007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
1709
1710 * src/print-xml.c (escape_bufs): New static global variable
1711 replacing...
1712 (xml_escape_n): ... the static local variable buf here.
1713 (print_xml): Free memory for escape_bufs.
1714 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
1715
d782395d
JD
17162007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
1717
1718 Replace `%push-parser' and `%push-pull-parser' with
1719 `%define push_pull "push"' and `%define push_pull "both"'.
1720 `%define push_pull "pull"' is the default.
1721 * doc/bison.texinfo (Push Decl, Push Parser Function,
1722 Pull Parser Function, Parser Create Function, Parser Delete Function):
1723 Update declarations.
1724 (Decl Summary, Table of Symbols): Replace %push-parser and
1725 %push-pull-parser entries with a %define push_pull entry.
1726 * data/bison.m4 (b4_percent_define_check_values): New macro.
1727 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
1728 definitions...
1729 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
1730 definitions...
1731 * data/push.c: ... to here and compute them from the value of the
1732 %define variable push_pull.
1733 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
1734 parsing requests here...
1735 * data/yacc.c: ... hack this to switch to push.c any time
1736 b4_use_push_pull_flag or the %define variable push_pull is set. This
1737 will go away when we mv push.c yacc.c.
1738 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
1739 push parsing is not supported since unused %define variables are
1740 reported anyway.
1741 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
1742 * src/muscle_tab.h (muscle_percent_define_check_values): Update
1743 comments for consistency with b4_percent_define_check_values.
1744 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
1745 muscles.
1746 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
1747 Remove.
1748 (prologue_declaration): Remove %push-parser and %push-pull-parser
1749 rules.
1750 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
1751 * tests/calc.at: Update declarations.
1752 * tests/input.at (%define enum variables): New test case.
1753 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
1754 declaration.
1755 (Push Parsing: Multiple impure instances): Update declaration.
1756 (Push Parsing: Unsupported Skeletons): New test case.
1757 * tests/torture.at (Exploding the Stack Size with Alloca): Update
1758 declaration.
1759 (Exploding the Stack Size with Malloc): Update declaration.
1760
3f999f78
WP
17612007-09-24 Wojciech Polak <polak@gnu.org>
1762
1763 Add XSLT transformations.
1764
1765 * data/xslt/xml2dot.xsl: Transform XML into DOT.
1766 * data/xslt/xml2text.xsl: Transform XML into plain text.
1767 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
1768 * data/Makefile.am (xsltdir): New variable.
1769 (dist_xslt_DATA): Add xslt/*.xsl files.
1770
a4f75309
PE
17712007-09-23 Paul Eggert <eggert@cs.ucla.edu>
1772
1773 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
1774 Problem reported by Wojciech Polak.
1775 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
1776 (xml_printf): Undo change I made on 21 September; that is,
1777 indent 2 spaces, not 1.
1778
ad5feac4
JD
17792007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
1780
1781 Pacify ./configure --enable-gcc-warnings.
1782 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
1783 `char const *' instead of `char *'.
1784 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
1785 local variable `sep'.
1786
41d7a5f2
PE
17872007-09-21 Paul Eggert <eggert@cs.ucla.edu>
1788
1789 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
1790 elsewhere.
1791 * src/print-xml.c: Prefer "const" after types; that's more consistent.
1792 (xml_printf): Indent just 1 space for level.
1793 (e_char, xlate_char): Remove.
1794 (xml_escape_string): Rewrite to avoid undefined behavior (used
1795 storage that was freed from the stack).
1796 (xml_escape_n): Don't bother checking for subscript error.
1797
3f999f78
WP
17982007-09-21 Wojciech Polak <polak@gnu.org>
1799
1800 Add Bison XML Automaton Report.
41d7a5f2
PE
1801
1802 Add support for an -x option to generate an XML report.
1803 It is not documented yet.
1804 * src/print-xml.c: New file.
1805 * src/print-xml.h: Likewise.
1806 * lib/timevar.def (TV_XML): New var.
1807 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
1808 * src/conflicts.c: Include print-xml.h.
1809 (solved_conflicts_xml_obstack): New var.
1810 (log_resolution, conflicts_solve, conflicts_free):
1811 Add support for XML report.
1812 (conflicts_output_val): New function.
1813 * src/conflicts.h (conflicts_output_val): New decl.
1814 * src/files.c (spec_xml_file): New var.
1815 (compute_output_file_names, output_file_names_free): Add XML support.
1816 * src/files.h (spec_xml_file): New decl.
1817 * src/getargs.c (xml_flag): New var.
1818 (usage, short_options, long_options, getargs): Add XML support.
1819 * src/getargs.h (xml_flag): New decl.
1820 * src/gram.c: Include print-xml.h.
1821 (rule_lhs_print_xml, rule_rhs_print_xml):
1822 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
1823 New functions.
1824 * src/gram.h: Declare external ones.
1825 * src/main.c: Include print-xml.h.
1826 (main): Add XML support.
1827 * src/reduce.c: Include print-xml.h.
1828 (reduce_xml): New function.
1829 * src/reduce.h: Declare it.
1830 * src/state.c: Include print-xml.h.
1831 (state_new): Add XML support.
1832 (state_rule_lookahead_tokens_print_xml): New function.
1833 * src/state.h: Declare it.
1834 (struct state): New member solved_conflicts_xml.
1835 * src/symtab.c (symbol_class_get_string): New function.
1836 * src/symtab.h: Declare it.
1837
6d8e724d
PE
18382007-09-21 Paul Eggert <eggert@cs.ucla.edu>
1839
1840 * GNUmakefile: Switch to coreutils's version.
1841 * bootstrap: Likewise.
1842 * Makefile.cfg: Adjust to new GNUmakefile.
1843 * README-hacking: Likewise.
1844
1845 Import from gnulib:
1846
1847 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
1848 Bruno Haible <bruno@clisp.org>
1849
1850 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
1851 and is a script that invokes bison. Tighten the code. Add comments.
1852
922bdd7f
JD
18532007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
1854
1855 Spell "boolean" as "Boolean". Reported by Akim Demaille.
1856 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
1857 * doc/bison.texinfo (Decl Summary): Fix.
1858 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
1859 * tests/input.at (Boolean %define variables): Update output.
1860 * tests/skeletons.at (%define boolean variables: invalid skeleton
1861 defaults): Rename to...
1862 (%define Boolean variables: invalid skeleton defaults): ... this and
1863 update output.
1864
1b17b01d
JD
18652007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
1866
1867 In impure push mode, don't allow more than one yypstate to be allocated
1868 since multiple impure parsers would corrupt yynerrs.
1869 * data/push.c (yypstate_allocated): New static global variable
1870 initialized to 0.
1871 (yypull_parse): If yypstate_new returns 0, don't report it as memory
1872 exhaustion if yypstate_allocated is 1, but still return 2.
1873 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
1874 already 1. Otherwise, set it to 1.
1875 (yypstate_delete): Set it to 0.
1876 * tests/push.at (Push Parsing: Multiple impure instances): New test
1877 case.
1878
9987d1b3
JD
18792007-08-17 Bob Rossi <bob@brasko.net>
1880
1881 * doc/bison.texinfo (Push Decl): Document the push parser.
1882 (Table of Symbols): Ditto.
1883 (Pure Decl): Ditto.
1884 (Decl Summary): Ditto.
1885 (Multiple Parsers, Push Parser Function, Pull Parser Function,
1886 Parser Create Function, Parser Delete Function):
1887 Add new push parser symbols.
1888 (Table of Symbols): Document push-parser, push-pull-parser,
1889 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
1890
f16b0819
PE
18912007-08-15 Paul Eggert <eggert@cs.ucla.edu>
1892
1893 Update to GPLv3.
1894 * doc/gpl-3.0.texi: New file.
1895 * doc/gpl.texi: Remove.
1896 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
1897 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
1898 * README-hacking, TODO, bootstrap, bootstrap.conf:
1899 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
1900 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
1901 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
1902 * data/lalr1.cc, data/lalr1.java, data/location.cc:
1903 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
1904 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
1905 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
1906 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
1907 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
1908 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
1909 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
1910 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
1911 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
1912 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
1913 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
1914 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
1915 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
1916 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
1917 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
1918 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
1919 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
1920 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
1921 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
1922 * src/complain.c, src/complain.h, src/conflicts.c:
1923 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
1924 * src/files.h, src/flex-scanner.h, src/getargs.c:
1925 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
1926 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
1927 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
1928 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
1929 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
1930 * src/print.c, src/print.h, src/print_graph.c:
1931 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
1932 * src/reduce.h, src/relation.c, src/relation.h:
1933 * src/revision.h, src/scan-code.h, src/scan-code.l:
1934 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
1935 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
1936 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
1937 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
1938 * tests/Makefile.am, tests/actions.at, tests/c++.at:
1939 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
1940 * tests/existing.at, tests/glr-regression.at:
1941 * tests/headers.at, tests/input.at, tests/java.at:
1942 * tests/local.at, tests/output.at, tests/push.at:
1943 * tests/reduce.at, tests/regression.at, tests/sets.at:
1944 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
1945 * tests/torture.at:
1946 Update to GPLv3.
1947
728c4be2
JD
19482007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1949
1950 Get rid of broken %no-parser, -n, and --no-parser implementation and
1951 documentation.
1952 * TODO: Don't mention them.
1953 * doc/bison.1: Likewise.
1954 * doc/bison.texinfo (Decl Summary): Likewise.
1955 (Bison Options): Likewise.
1956 (Option Cross Key): Likewise.
1957 * src/getargs.c (no_parser_flag): Remove global variable.
1958 (usage): Don't print description of -n and --no-parser.
1959 (long_options): Remove --no-parser entry here.
1960 (getargs): Remove -n case in the switch here.
1961 * src/getargs.h (no_parser_flag): Remove extern.
1962 * tests/regression.at (Web2c Actions): Remove comment that mentions
1963 --no-parser.
1964
5d31a216
JD
19652007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1966
1967 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
1968 name user variables starting with `yy'. Just pass NULL instead of a
1969 dummy local &yylval to yypush_parse.
1970 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
1971 starting with `yy'.
1972
a2ea208d
JD
19732007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
1974
1975 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
1976 true since it's then always used regardless of whether yyoverflow is
1977 defined. Reported by Christian Burger at
1978 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
1979 * THANKS: Add Christian Burger.
1980
91661ebb
JD
1981 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1982 node names: say "Decl Summary" not "Bison Declaration Summary".
1983
cbd50549
JD
19842007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
1985
1986 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
1987 determine whether this function has already complained about an invalid
1988 value for a %define boolean variable, don't check whether Bison has
1989 ever examined the value. As written, the check was a tautology.
1990 Instead, record and check for this complaint using a separate muscle.
1991
eb1b0740
JD
19922007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1993
1994 Fix push parsing memory leak reported by Brandon Lucia at
1995 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
1996 * THANKS: Add Brandon Lucia.
1997 * data/push.c (yypstate_delete): Free the stack if it was reallocated
1998 but the parse never completed and thus freed it.
1999 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
2000 * tests/testsuite.at: Include push.at.
2001 * test/push.at: New.
2002 (Push Parsing: Memory Leak for Early Deletion): New test case.
2003
9d774aff
JD
20042007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
2005
2006 Improve handling of multiple S/R conflicts in the same state and of S/R
2007 conflicts involving multiple reductions.
2008 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
2009 set for a state here or Bison will abort if it is reassigned on a
2010 later conflicted reduction in the same state.
2011 Similarly, don't finalize and assign the solved conflicts report here
2012 or it will be lost if it is reassigned on a later conflicted reduction
2013 in the same state.
2014 (set_conflicts): Instead, assign them both here after all S/R conflicts
2015 in the state have been fully examined.
2016 * src/print.c (shift_set): Rename to...
2017 (no_reduce_set): ... this.
2018 (print_reductions): Update for rename, and add %nonassoc error action
2019 tokens to no_reduce_set so that, when printing the first remaining
2020 reduction on an error action token, the reduction is enclosed in
2021 brackets.
2022 (print_results): Update for rename.
2023 * tests/conflicts.at (Solved conflicts report for multiple reductions
2024 in a state): New test case.
2025 (%nonassoc error actions for multiple reductions in a state): New test
2026 case.
2027
2028 * src/main.c (main): Don't depend on C99 features.
2029
10159d2a
JD
20302007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2031
2032 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
2033 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
2034 uniwidth.
10159d2a 2035
953b3935
JD
20362007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
2037
2038 * bootstrap (slurp): Create target directories that don't exist.
2039 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
2040
6ce2d93a
JD
20412007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
2042
2043 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
2044 than item number.
2045 * closure.c (closure): Likewise.
2046 * state.h (reductions): Comment sorting of rules.
2047 (state): Comment sorting of items.
2048
ce3448d5
JD
20492007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
2050
2051 Fix C++ test cases after recent Gnulib changes. Discussed starting at
2052 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
2053 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
2054 definition in order to avoid Gnulib headers since we don't use config.h
2055 here.
2056 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
2057 rather than AT_DATA so that config.h is included.
2058
8a86eef0
JD
20592007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
2060
2061 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
2062 instead of fprintf. Guard these functions with #if YYDEBUG instead of
2063 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
2064 and so that YYFPRINTF is guaranteed to be defined here.
2065
b1a81613
JD
20662007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
2067
2068 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
2069 with...
2070 (muscle_percent_define_check_values): ... this more helpful function.
2071 Again, it's not used yet, but it will be.
2072 * src/muscle_tab.h: Likewise.
2073
71b61d4d
JD
2074 Improve some comments in parser table construction.
2075 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
2076 (generate_states): Don't mention ruleset, which is internal to closure.
2077 * src/closure.c (closure): Explain sorting of core and itemset, which
2078 is required for this function to behave correctly.
2079 * src/closure.h (closure): Mention sorting.
2080
2a6b783d
JD
20812007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
2082
2083 * src/lalr.c (state_lookahead_tokens_count): For code readability,
2084 move the check for disabled transitions to an aver since conflict
2085 resolution hasn't happened yet.
2086
2087 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
2088 labels a state as inconsistent just because it has error transitions.
2089 The original form of this check appeared in revision 1.1 of lalr.c,
2090 which was committed on 1991-12-21. Now (at least), changing the
2091 consistency label on such a state appears to have no useful effect in
2092 any of the places it is examined, which I enumerate below. The key
2093 point to understanding each item in this enumeration is that a state
2094 with an error transition is labelled consistent in the first place only
2095 if it has no rules, so the check cannot matter for states that have
2096 rules. (1) Labelling a state as inconsistent will cause set_conflicts
2097 to try to identify its conflicts, and a state must have *rules* to have
2098 conflicts. (2) Labelling a state as inconsistent will affect how
2099 action_row sets the default *rule* for the state. (3) Labelling a
2100 state as inconsistent will cause build_relations to add lookback edges
2101 to *rules* in that state.
2102 * src/state.h (struct state): Word the comment for member consistent
2103 more carefully.
2104
14462c2b
JD
21052007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2106
2107 Don't depend on C99 features.
2108 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
2109 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
2110 * src/reader.c (check_and_convert_grammar): Fix for-loop.
2111 * src/state.c (state_mark_reachable_states): Fix for-loop.
2112 (state_remove_unreachable_states): Fix for-loop.
2113
2114 Don't widen struct state with member reachable just to temporarily
2115 record reachability. Instead, use a local bitset.
2116 * src/state.h (struct state): Remove member.
2117 * src/state.c (state_new): Don't initialize it.
2118 (state_mark_reachable_states): Rename to...
2119 (state_record_reachable_states): ... this, and use bitset.
2120 (state_remove_unreachable_states): Use bitset.
2121
5a43d418
JD
21222007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
2123
2124 * src/Makefile.am (yacc): Quote target action commands properly so
2125 that the yacc script isn't corrupt. Reported by Hans Aberg at
2126 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
2127
0c650a20
JD
2128 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
2129 the case of pure parsers. Reported by Frans Englich at
2130 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
2131 * THANKS: Add Frans Englich.
2132
61fee93e
JD
2133 * NEWS (2.3a+): In the %code entry, reference section `Bison
2134 Declaration Summary' from the manual now since the %code summary has
2135 moved there.
2136 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
2137 in the rules section must be terminated by semicolons.
2138
f124d423
JD
21392007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2140
2141 Extend the front-end API for %define variables to more completely
2142 mirror the back-end. This will be useful in the future.
2143 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
2144 Update comments to mention the new front-end counterparts of these
2145 macros.
2146 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
2147 for muscle_string_decode and muscle_location_decode.
2148 (muscle_string_decode): New static function.
2149 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
2150 (muscle_percent_define_get, muscle_percent_define_ifdef): New
2151 functions.
2152 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
2153 muscle_percent_define_get to mimic the b4_percent_define_flag_if
2154 implementation more closely.
2155 (muscle_percent_define_invalid_value): New function.
2156 * src/muscle_tab.h (muscle_percent_define_get,
2157 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
2158 Prototype.
2159
75ad86ee
JD
21602007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2161
2162 * NEWS (2.3a+): Mention yesterday's state-removal change.
2163 (2.3a): Remove the %language entry, which was added after 2.3a.
2164 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
2165 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
2166 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
2167 tests/existing.at: Update copyright date.
2168
5967f0cf
JD
21692007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2170
2171 If conflict resolution makes states unreachable, remove those states,
2172 report rules that are then unused, and don't report conflicts in those
2173 states.
2174 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
2175 New global function.
2176 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
2177 function.
2178 * src/main.c (main): After conflict resolution, remove the unreachable
2179 states and update all data structures that reference states by number.
2180 * src/state.c (state_new): Initialize each state's reachable member to
2181 false.
2182 (state_mark_reachable_states): New static function.
2183 (state_remove_unreachable_states): New global function.
2184 * src/state.h (struct state): Add member bool reachable.
2185 (state_remove_unreachable_states): Prototype.
2186 * tests/conflicts.at (Unreachable States After Conflict Resolution):
2187 New test case.
2188 * tests/existing.at (GNU pic Grammar): Update test case output now that
2189 an unused rule is discovered.
2190
b09f4f48
JD
21912007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2192
2193 Minor code cleanup in parser table construction.
2194 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
2195 (new_itemsets, save_reductions): Update for rename to nitemset.
2196 * src/closure.c (nritemset): Rename to...
2197 (nitemset): ... this since the "r" appears to meaningless and isn't
2198 used in the comments.
2199 (closure): Update for rename.
2200 * src/closure.h (nritemset): Update extern to...
2201 (nitemset): ... this.
2202 * src/lalr.c (LA): Fix a typo in comments.
2203 * src/print.c (print_core): Update for rename to nitemset.
2204 * src/print_graph.c (print_graph): Likewise.
2205 * src/state.h: Fix some typos in header comments.
2206
bbb44d83
PE
22072007-04-04 Paul Eggert <eggert@cs.ucla.edu>
2208
9b33de72
PE
2209 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
2210 still sticks to ASCII. Sorry!
2211
bbb44d83
PE
2212 * README-hacking: New file, taken mostly from coreutils, with changes
2213 for Bison. Contains much of the contents of:
2214 * README-cvs: Remove.
2215 * bootstrap: Sync from gnulib.
2216 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
2217 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
2218
29553547
JD
22192007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
2220
2221 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
2222 Setzer.
2223 (Java Differences): Fix some typos.
2224 * THANKS: Add Sebastian Setzer.
2225
01b477c6
PB
22262007-03-07 Paolo Bonzini <bonzini@gnu.org>
2227
730739e4
AD
2228 * data/java.m4 (b4_single_class_if): Remove.
2229 (b4_abstract_if): Look at "%define abstract".
2230 (b4_lexer_if): New.
2231 (b4_union_name): Rename...
2232 (b4_yystype): ... to this. Map to "%define stype".
2233 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
2234 b4_maybe_throws): Fix quoting.
2235 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
2236 * data/lalr1.java (Lexer interface): Always define.
2237 (Lexer interface within parser class): Remove.
2238 (YYLexer class): New, used when "%code lexer" is present.
2239 (constructor): When "%code lexer" is used, pass %lex-param
2240 to the lexer constructor.
2241 (yylex, yyparse): Remove %lex-param from method invocations
2242 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
2243
2244 * doc/bison.texinfo (Java Bison Interface): Mention "%define
2245 abstract". Rename "%define union_name" to "%define stype".
2246 Rename method names according to previous patch.
2247 (Java Scanner Interface): Describe "%code lexer" instead of
2248 "%pure-parser" and "%define single_class".
2249 (Java Differences): Mention "%code lexer".
2250
2251 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
2252 Include scanner here, using macros from tests/local.at.
2253 (AT_DATA_CALC_Y): Remove final argument.
2254 (_AT_CHECK_JAVA_CALC): Likewise.
2255 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
2256 of %locations and %error-verbose.
2257 (main): Test with and without %lex-param.
2258 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
2259 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 2260
122bea3a
JMG
22612007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2262
2263 DJGPP spefic issue. Inhibit the use of disallowed characters for
2264 file name genertion on Win98, WinXP, etc. These are |<>":?*\
2265 and concern testsuite case 46.
2266 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
2267 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
2268 * djgpp/config.bat: Inhibit the use of disallowed characters.
2269
9611cfa2
JD
22702007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2271
2272 Miscellaneous %define and %code cleanup.
2273 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
2274 values are interpreted.
2275 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
2276 documentation a little more.
2277 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
2278 muscle_percent_define_insert, muscle_percent_code_grow): New
2279 functions/macros.
2280 * src/muscle_tab.h (muscle_percent_define_insert,
2281 muscle_percent_code_grow): Prototype.
2282 * src/parse-gram.y (prologue_declaration): Use
2283 muscle_percent_define_insert and muscle_percent_code_grow when parsing
2284 %define and %code directives.
2285
2286 Make it easy to share %define boolean variables between the front-end
2287 and back-end. Though not used yet, this will be useful in the future.
2288 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
2289 Bison uses of names rather than just skeleton uses of names.
2290 (b4_percent_define_get, b4_percent_define_ifdef): Rename
2291 b4_percent_define_skeleton_variables(VARIABLE) to
2292 b4_percent_define_bison_variables(VARIABLE).
2293 (b4_percent_code_get, b4_percent_code_ifdef): Rename
2294 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
2295 b4_percent_code_bison_qualifiers(QUALIFIER).
2296 (b4_check_user_names_wrap): Update for renames.
2297 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
2298 muscle_percent_define_default): New functions mimicking
2299 b4_percent_define_flag_if and b4_percent_define_default.
2300
2301 For %define variables, report locations for invalid values and
bbb44d83 2302 redefinitions.
9611cfa2
JD
2303 * data/bison.m4 (b4_percent_define_flag_if): Read
2304 b4_percent_define_loc(VARIABLE) to report the location of an invalid
2305 value for VARIABLE.
2306 (b4_percent_define_default): Save a special location in
2307 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
2308 must later be reported as invalid.
2309 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
2310 functions.
2311 (muscle_percent_define_insert): Record the location of VARIABLE in
2312 muscle percent_define_loc(VARIABLE), and use it to report the previous
2313 location for a redefinition.
2314 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
2315 (muscle_percent_define_default): Update like b4_percent_define_default.
2316 (muscle_grow_user_name_list): Rename to...
2317 (muscle_user_name_list_grow): ... this for consistency and use
2318 muscle_location_grow.
2319 * src/muscle_tab.h (muscle_location_grow): Prototype.
2320 * tests/input.at (%define errors): Update expected output.
2321 * tests/skeletons.at (%define boolean variables: invalid skeleton
2322 defaults): New test case.
2323
0bf92491
JD
23242007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
2325
2326 * src/print.c (lookahead_set, state_default_rule): Remove.
2327 (print_reductions): Replace state_default_rule invocation with
2328 equivalent use of yydefact, which was computed in token_actions in
2329 tables.c.
2330 (print_results): Don't allocate lookahead_set.
2331
d3b12988
PB
23322007-02-27 Paolo Bonzini <bonzini@gnu.org>
2333
2334 * data/lalr1.java: Prefix all private members with yy.
2335
f57a7536
JD
23362007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
2337
2338 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 2339 Sebastien Fricker at
f57a7536 2340 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 2341 * THANKS: Add Sebastien Fricker.
f57a7536
JD
2342 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
2343 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
2344 accept a variable number of arguments.
2345
6404a5bf
JD
23462007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2347
2348 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
2349
e4e09639
JMG
23502007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2351
2352 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
2353 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
2354 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
2355
d7e0a1a7
PE
23562007-02-11 Paul Eggert <eggert@cs.ucla.edu>
2357
2358 Undo my 2007-02-07 change, switching back to the c-strcase module
2359 introduced in the 2007-02-03 change. Bruno Haible reported that
2360 the 2007-02-07 change would be dangerous in Turkish if we add a
2361 language whose name contains "i", since "i" is not lowercase "I"
2362 in Turkish.
2363 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
2364 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
2365 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
2366 * m4/.cvsignore: Remove strcase.m4.
2367 * src/getargs.c: Revert 2007-02-07 change, as follows.
2368 Include c-strcase.h.
2369 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
2370
deee93a1
JD
23712007-02-11 Bruno Haible <bruno@clisp.org>
2372
2373 Enable the Java related testsuite tests when the only Java compiler
2374 found is a gcj < 4.3. Discussed at
2375 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
2376 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
2377
574add85
JD
23782007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
2379
2380 * data/Makefile.am: Update copyright date.
2381 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
2382 yypstate_new returns NULL.
2383 (yypstate_new): Return NULL if malloc does.
2384 * src/reader.c (packgram): Move translation of rule actions from the
2385 beginning of packgram to...
2386 (check_and_convert_grammar): ... here right before packgram is invoked
2387 so it's easier to write more complete comments, and remove redundant
2388 code.
2389
e785ccf7
JD
23902007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
2391
2392 As in semantic actions, make @$ in %initial-action, %destructor, and
2393 %printer imply %locations.
2394 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
2395 scanning @$.
2396 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
2397 (@$ in %initial-action implies %locations,
2398 @$ in %destructor implies %locations,
2399 @$ in %printer implies %locations): ... these new test cases.
2400
1cfe1ed7
PE
24012007-02-07 Paul Eggert <eggert@cs.ucla.edu>
2402
2403 Undo most of the 2007-02-03 change, switching to the strcase module
2404 now that gnulib strcase has been fixed.
2405 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
2406 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
2407 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
2408 * m4/.cvsignore: Add strcase.m4.
2409 * src/getargs.c: Revert 2007-02-03 change, as follows.
2410 Don't include c-strcase.h.
2411 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
2412 strcasecmp has "unspecified behavior" outside the POSIX locale,
2413 but it works fine in practice if at least one argument is ASCII,
2414 as is the case in Bison.
2415
0049ec86
PB
24162007-02-07 Paolo Bonzini <bonzini@gnu.org>
2417
2418 * tests/java.at: Skip tests if only one of javac/java is present.
2419 Reported by Joel E. Denny.
2420 * tests/atlocal.in: Adjust copyright years.
2421
24222007-02-05 Paolo Bonzini <bonzini@gnu.org>
2423
2424 * data/lalr1.java (Stack): Work around old verifiers that disallow
2425 access to the private fields of an inner class, from the outer class.
2426 We can make Stack's fields public because user code doesn't have access
2427 to the instance of Stack used by parse(). Reported by Paul Eggert.
2428
2c2b7220
PE
24292007-02-03 Paul Eggert <eggert@cs.ucla.edu>
2430
2431 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
2432 the right spot for these files?
2433 * bootstrap.conf (gnulib_modules): Add c-strcase.
2434 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
2435 c-strncasecmp.c.
2436 * src/getargs.c: Include c-strcase.h.
2437 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
2438 to avoid unspecified behavior.
2439
b2b81dae
JD
24402007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
2441
2442 * doc/bison.texinfo (Decl Summary): Correct typo.
2443
c1d19e10
PB
24442007-01-30 Paolo Bonzini <bonzini@gnu.org>
2445
2446 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
2447 Complain if the value does not match empty, "true" or "false".
2448 * data/c++.m4: Adjust default definitions of %define variables.
2449 * data/java.m4: Adjust default definitions of %define variables.
2450 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
2451 to above behavior.
2452 * tests/input.at (Boolean %define variables): Test new behavior.
2453
8405b70c
PB
24542007-01-29 Paolo Bonzini <bonzini@gnu.org>
2455
2456 * NEWS: Mention java.
2457 * TODO: Remove things that are done.
2458 * bootstrap.conf: Add javacomp-script and javaexec-script.
2459 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
2460
2461 * data/Makefile.am: Add new files.
2462 * data/java-skel.m4: New.
2463 * data/java.m4: New.
2464 * data/lalr1.java: New.
2465
2466 * doc/bison.texinfo: Put "A Complete C++ Example" under
2467 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
2468 under Other Languages.
2469
2470 * src/getargs.c (valid_languages): Add Java.
2471 * src/getargs.h (struct bison_language): Update size of string fields.
2472
2473 * tests/Makefile.am: Add java.at.
2474 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
2475 * tests/java.at: New.
2476 * tests/testsuite.at: Include it.
2477
3eb82471
JD
24782007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
2479
2480 Clean up.
2481 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
2482 at_directive_argv arguments so these no longer have to be global
2483 variables. Also, update the implementation for the following changes.
2484 (fail_for_at_directive_too_many_args,
2485 fail_for_at_directive_too_few_args): Add at_directive_name argument.
2486 (at_directive_name): Remove as at_directive_argv[0] will be used for
2487 this now.
2488 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
2489 for the directive name.
2490 (at_directive_argc, at_directive_argv): Make these local within
2491 skel_lex instead of global.
2492 (INITIAL): Update directive start action for above changes.
2493 (SC_AT_DIRECTIVE_ARG): Rename to...
2494 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
2495 (SC_AT_DIRECTIVE_SKIP_WS): Update.
2496 (scan_skel): Move yylex_destroy to...
2497 (skel_scanner_free): ... here.
2498 * tests/skeletons.at (installed skeleton file name): Rename to...
2499 (installed skeleton file names): ... this.
2500
148d66d8
JD
25012007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
2502
2503 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
2504 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
2505 Summary" not "Directives".
2506 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
2507 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
2508 since the former is now the more complete one.
2509 (Prologue Alternatives): Likewise and do the same for %defines.
2510 (Table of Symbols): Add summary of %code, add summary of %define, and
2511 move full %code documentation to...
2512 (Decl Summary): ... here for consistency with other entries in these
2513 sections.
2514 Move %define entry in order to keep this list alphabetized.
2515 Reword %define entry a little to put less emphasis on the skeleton
2516 concept, which most users shouldn't have to think about.
2517
665f0c24
PE
25182007-01-26 Paul Eggert <eggert@cs.ucla.edu>
2519
2520 Adjust to recent gnulib changes.
2521 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
2522 Add string.h, string_.h, unistd_.h, wchar_.h.
2523 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
2524 * src/system.h: Don't include <stpcpy.h>; this is now done by
2525 <string.h>.
2526
592d0b1e
PB
25272007-01-23 Paolo Bonzini <bonzini@gnu.org>
2528
2529 Simplify implementation of unqualified %code, implement macros for
2530 uniform treatment of boolean %define flags. Document %define.
2531 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
2532 b4_percent_code_ifdef): New.
2533 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
2534 * data/c++.m4: Define default value for global_tokens_and_yystype.
2535 * data/glr.cc: Likewise.
2536 * data/location.cc: Use b4_percent_define_flag_if.
2537
148d66d8 2538 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
2539
2540 * src/parse-gram.y (Unqualified %code): Change muscle name to
2541 b4_percent_code().
2542 (content.opt): Default to empty.
2543
a7867f53
JD
25442007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
2545
2546 Implement support for relative and absolute skeleton file names.
2547 Discussed starting at
2548 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
2549 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
2550 (Bison Options): Document in --skeleton entry.
2551 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
2552 full_skeleton can't necessarily hold all of pkgdatadir.
2553 If the specified skeleton file name contains a `/', don't prepend
2554 pkgdatadir.
2555 * src/parse-gram.y (prologue_declaration): If the specified skeleton
2556 file name contains a `/', prepend the grammar file directory.
2557 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
2558 * skeletons.at: New file.
2559 (relative skeleton file names): New test case.
2560 (installed skeleton file names): New test case.
2561 * tests/testsuite.at: Include skeletons.at.
2562
2563 * bootstrap: Update copyright to 2007.
2564
830c9b18
PB
25652007-01-17 Paolo Bonzini <bonzini@gnu.org>
2566
2567 * bootstrap: Remove occurrences of .#bootmp from the files.
2568
a8c2e813
AD
25692007-01-17 Akim Demaille <akim@epita.fr>
2570
2571 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
2572 nonterminals.
2573 Use per-type %printer.
2574
279cabb6
JD
25752007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
2576
2577 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
2578 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2579 djgpp/config.site, src/files.c, src/files.h, src/main.c,
2580 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
2581 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
2582 tests/glr-regression.at, tests/input.at, tests/local.at,
2583 tests/output.at, tests/torture.at: Update copyright to 2007.
2584
bb32f4f2
AD
25852007-01-16 Akim Demaille <akim@epita.fr>
2586
2587 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
2588 error code.
2589 (Calc++ Scanner): Exit with failure if we can't open the input
2590 file.
2591 Accept "-" standing for stdin.
2592 (Calc++ Top Level): Print the result only if the parsing was
2593 successful.
2594
7cff04b5
AD
25952007-01-16 Akim Demaille <akim@epita.fr>
2596
2597 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
2598
a4e25e1d
JD
25992007-01-15 Paolo Bonzini <bonzini@gnu.org>
2600 and Joel E. Denny <jdenny@ces.clemson.edu>
2601
2602 Clean up %define and %code implementation in M4 some. Most
2603 importantly, rename all related macros to be in the b4_percent_define
2604 and b4_percent_code namespaces. Also, complete support for `.' in
2605 %define variable names and %code qualifiers.
2606 * data/bison.m4 (b4_check_user_names): Check for special
2607 "SKELETON-NAMESPACE(name)" macros instead of using two nested
2608 m4_foreach loops.
2609 (b4_get_percent_define, b4_get_percent_code): Rename to...
2610 (b4_percent_define_get, b4_percent_code_get): ... these.
2611 Extend documentation with examples.
2612 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
2613 b4_percent_define_skeleton_variables and
2614 b4_percent_code_skeleton_qualifiers.
2615 Expect any value for the %define variable `foo' to be stored in the
2616 macro named `b4_percent_define(foo)'; expect any %code blocks for the
2617 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
2618 expect any unqualified %code blocks to be stored in a macro named
2619 `b4_percent_code_unqualified'.
2620 Use m4_indir so that %define variable names and %code qualifiers can
2621 contain `.', which is allowed by the grammar parser.
2622 (b4_percent_define_default): New macro to set a default value for a
2623 %define variable.
2624 (m4_wrap): Update wrapped code, and fix some underquoting.
2625 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
2626 Expect grammar uses of %define variables and %code qualifiers to be
2627 defined in b4_percent_define_user_variables and
2628 b4_percent_code_user_qualifiers.
2629 * data/c++.m4: Use b4_percent_define_default rather than
2630 m4_define_default. Fix some underquoting. Skeleton usage of %define
2631 variable define_location_comparison now implies skeleton usage of
2632 %define variable filename_type.
2633 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2634 data/push.c, data/yacc.c: Update macro names.
2635 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
2636 muscle names.
2637
e37c665c
JMG
26382007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2639
2640 DJGPP specific issues.
2641
2642 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
2643 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
2644
7d2d521f
JD
26452007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2646
2647 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
2648 run parsers in all tests so that Valgrind is invoked during
2649 maintainer-check-valgrind.
2650 (Duplicate representation of merged trees): Free all semantic values.
2651 (Duplicated user destructor for lookahead): Likewise.
2652
e0ac9b4b
JD
26532007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2654
2655 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
2656 command-line prefix.
2657 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
2658 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
2659 miss Valgrind messages.
2660 (Exploding the Stack Size with Malloc): Likewise.
2661
78143faa
JD
26622007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2663
2664 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
2665 locals. Reported by Juan Manuel Guerrero at
2666 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
2667 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
2668 Fix some indentation also.
2669 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
2670 explaining this issue.
2671
7ecec4dd
JD
26722007-01-09 Paolo Bonzini <bonzini@gnu.org>
2673 and Joel E. Denny <jdenny@ces.clemson.edu>
2674
2675 Simplify union and prologue handling, and escape union and lex/parse
2676 params with digraphs.
2677 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
2678 values to the empty string since these are no longer guaranteed
2679 initialized by the front-end.
2680 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
2681 braces around b4_user_stype since this is no longer done by the
2682 front-end.
2683 * src/files.c, src/files.h (pre_prologue_obstack,
2684 post_prologue_obstack): Remove.
2685 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
2686 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
2687 with digraphs. This fixes lex params and parse params.
2688 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
2689 * src/output.c (prepare): Remove muscle insertion of the prologues.
2690 (output): Remove freeing of pre_prologue_obstack and
2691 post_prologue_obstack.
2692 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
2693 than prologue_augment for prologue parsing so you don't need prologue
2694 obstacks.
5c80250c
JD
2695 (grammar_declaration): For %union RHS, use `braceless' instead of
2696 "{...}" so that braces are already stripped and code is escaped with
2697 digraphs.
7ecec4dd
JD
2698 * src/reader.c (prologue_augment): Remove.
2699 (reader): Remove initialization of pre_prologue_obstack and
2700 post_prologue_obstack.
2701 * src/reader.h (prologue_augment): Remove.
2702
2703 * data/c.m4: Remove stray parenthesis.
2704
16dc6a9e
JD
27052007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2706
2707 Remove quotes from variables names in %define directives and from
2708 qualifiers in %code directives, and restrict the characters that are
2709 allowed in them to M4-friendly ones. For %define, continue to support
2710 the quoted form as a deprecated feature. Discussed starting at
2711 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
2712 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
2713 %code.
2714 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
2715 (Decl Summary): In %defines entry, update mention of `%code requires'
2716 and `%code provides'.
16dc6a9e
JD
2717 (C++ Location Values): Update %define uses.
2718 (Calc++ Parser Interface): Likewise.
2719 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 2720 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
2721 * src/parse-gram.y (prologue_declaration): For %define variables, use
2722 `variable' instead of `STRING'.
2723 (grammar_declaration): For %code qualifiers, use `ID' instead of
2724 `STRING'.
2725 (variable): New nonterminal that takes an `ID' or a `STRING'.
2726 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
2727 and %define uses.
2728 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
2729 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
2730 (%define errors): Update %define uses.
2731
e9813cd4
JD
27322007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2733
2734 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
2735 instead of muscle_insert for %define values so that M4-special
2736 characters are replaced with digraphs.
2737 * tests/input.at (%define errors): Extend to check weird values.
2738
6afc30cc
JD
27392007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2740
2741 Instead of having skeletons declare all valid %define variables and
2742 %code qualifiers, provide macros that retrieve the associated values
2743 and build these lists automatically. Thus Bison will now warn when a
2744 variable or qualifier is not used by the skeleton in the current
2745 invocation regardless of whether it might sometimes be used by that
2746 skeleton in other invocations. Also, move all %define value macros to
2747 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
2748 form, which is replaced by %code.
2749 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
2750 (b4_check_user_names): ... this, and change the series of valid name
2751 arguments to a single list argument for names used in the skeleton
2752 similar to the existing list argument for names used in the grammar.
2753 Warn instead of complaining.
2754 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
2755 values and %code code, to format %code code properly, and to build
2756 lists of all %define variables and %code qualifiers used in the
2757 skeleton: b4_skeleton_percent_define_variables and
2758 b4_skeleton_percent_code_qualifiers.
2759 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
2760 Remove, and...
2761 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
2762 the skeleton names lists can finish building first. In place of
2763 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
2764 expect the lists b4_user_percent_define_variables and
2765 b4_user_percent_code_qualifiers.
2766 * data/c++.m4: Where setting default values for b4_parser_class_name,
2767 b4_location_type, b4_filename_type, b4_namespace, and
2768 b4_define_location_comparison, update their names to the
2769 b4_percent_define_ namespace.
2770 * data/glr.c: Don't use b4_check_percent_define_variables and
2771 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
2772 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
2773 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 2774 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
2775 * data/location.cc: Use b4_get_percent_define.
2776 * data/push.c: Don't use b4_check_percent_define_variables and
2777 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
2778 * data/yacc.c: Likewise, and don't call m4_exit in
2779 b4_use_push_for_pull_if or m4_wrap code will never execute.
2780 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
2781 Rename to...
2782 (muscle_grow_user_name_list): ... this for consistency with the
2783 terminology used in bison.m4.
2784 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
2785 %define variable names, and rename muscle used_percent_define_variables
2786 to user_percent_define_variables.
2787 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
2788 user_percent_code_qualifiers.
2789 (content): Remove.
2790 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
2791 {CODE} form is no longer accepted.
2792 * tests/input.at (Reject bad %code qualifiers): Rename to...
2793 (Reject unused %code qualifiers): ... this, and update test output.
2794 (%define error): Update test output.
2795
7eb8a0bc
JD
27962007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
2797
2798 Check for unrecognized %define variables similar to checking for
2799 unrecognized %code qualifiers. Check for redefined %define variables.
2800 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
2801 generalizes...
2802 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
2803 (b4_check_percent_define_variables): New, also wraps it.
2804 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
2805 variables using b4_check_percent_define_variables.
2806 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
2807 all those exercised in the test suite and all those listed in the
2808 `Default values' section of c++.m4. Are there others?
2809 * data/push.c, data/yacc.c: Declare no valid %define variables.
2810 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
2811 similar to muscle_find, but it works even when the muscle stores a
2812 const value.
2813 (muscle_grow_used_name_list): New function for constructing the used
2814 name list muscles that b4_check_for_unrecognized_names requires.
2815 * src/parse-gram.y (prologue_declaration): Warn if a variable is
2816 %define'd more than once. Define the b4_used_percent_define_variables
2817 muscle with muscle_grow_used_name_list.
2818 (grammar_declaration): Abbreviate %code code with
2819 muscle_grow_used_name_list.
2820 * tests/input.at (%define errors): New.
2821
3fc65ead
JD
28222007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2823
2824 Provide warn_at, complain_at, and fatal_at function callbacks to the
2825 skeletons, and use this for %code qualifier complaints.
2826 * data/bison.m4 (b4_error_at): New, invoked by...
2827 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
2828 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
2829 @fatal_at(...@) directives.
2830 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
2831 qualifiers in b4_used_percent_code_qualifiers and to use
2832 b4_complain_at.
2833 * src/location.c, src/location.h (boundary_set_from_string): New global
2834 function.
2835 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
2836 function.
2837 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
2838 to b4_used_percent_code_qualifiers.
2839 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
2840 function.
2841 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
2842 (lineno): Rename to...
2843 (out_lineno): ... this so I don't misunderstand it again.
2844 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
2845 here; these newlines are in the input but not the output file.
2846 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
2847 (at_directive_perform): ... this new static function, and add handling
2848 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
2849 directives.
2850 * tests/input.at (Reject bad %code qualifiers): Update test output with
2851 locations and extend.
2852
2853 * tests/output.at (Output file name: [, Output file name: ]): Remove
2854 bogus comment about these tests failing.
2855
1c7b7e1d
JD
28562007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2857
2858 Clean up b4_check_percent_code_qualifiers a little.
2859 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
2860 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
2861 documentation and add examples.
2862 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
2863 qualifiers here.
2864
08af01c2
JD
28652007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2866
2867 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
2868 unreliable -- especially when they're hidden inside another macro.
2869 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
2870 data/c.m4: Remove m4_divert(-1).
2871 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2872 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
2873 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 2874 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
2875 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
2876 pushed and popped by m4sugar, should be first on the stack.
2877
2878 Provide warn, complain, and fatal function callbacks to the skeletons.
2879 This provides more flexibility than m4_fatal, improves the error
2880 message format, and captures messages for translation. Discussed
2881 starting at
2882 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
2883 * data/bison.m4 (b4_error): New, invoked by...
2884 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
2885 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
2886 directives. Because these M4 macros might be called when the current
2887 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
2888 the previous removal of uses of m4_divert, which caused trouble.
2889 (b4_check_percent_code_qualifiers): Use b4_complain instead of
2890 m4_fatal to report unrecognized %code qualifiers.
2891 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
2892 push parser requests.
2893 * data/glr.c: Use b4_complain instead of m4_fatal to report
2894 non-deterministic push parser requests.
2895 Update @output usage to @output(...@) form.
2896 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
2897 report missing %defines. Update @output usage to @output(...@) form.
2898 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
2899 @output(...@) form.
2900 * src/main.c (main): Invoke skel_scanner_free.
2901 * src/scan-skel.h (skel_scanner_free): Prototype new function.
2902 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
2903 obstack_for_string from flex-scanner.h.
2904 (YY_DECL): Use to declare skel_lex static.
2905 (decode_at_digraphs): Remove; now handled in the new
2906 SC_AT_DIRECTIVE_ARG start condition.
2907 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
2908 functions.
2909 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
2910 at_directive_argv): New static globals.
2911 (INITIAL): Use fail_for_invalid_at.
2912 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
2913 recognize the start of a generalized `@directive(...@)' form and
2914 start...
2915 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
2916 directive args (using the new obstack_for_string), to decode the
2917 contained @ diagraphs, and to perform the directive. It recognizes
2918 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
2919 @output(...@).
2920 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
2921 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
2922 `@,'.
2923 (scan_skel): Initialize obstack_for_string on the first call.
2924 (skel_scanner_free): New function to free obstack_for_string.
2925 * tests/input.at (Reject bad %code qualifiers): Update test output.
2926
8e0a5e9e
JD
29272007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
2928
2929 Consolidate the 4 prologue alternative directives (%code, %requires,
2930 %provides, and %code-top) into a single %code directive with an
2931 optional qualifier field. Discussed at
2932 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
2933 * NEWS (2.3a+): Rewrite the existing entry for the prologue
2934 alternatives.
2935 * doc/bison.texinfo (Prologue Alternatives): Update.
2936 (Decl Summary): Update to %code "requires" and %code "provides".
2937 (Calc++ Parser): Update to %code "requires".
148d66d8 2938 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
2939 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
2940 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
2941 are replaced by b4_percent_code_provides and b4_percent_code_requires,
2942 which are skeleton-specific.
2943 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
2944 declare what %code qualifiers it supports and to complain if any other
2945 qualifiers were used in the grammar.
2946 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
2947 and b4_user_code([b4_percent_code_provides]) in place of
2948 b4_user_requires and b4_user_provides.
2949 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
2950 Add b4_user_code([b4_percent_code_top]) and
2951 b4_user_code([b4_percent_code]).
2952 Invoke b4_check_percent_code_qualifiers.
2953 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2954 PERCENT_REQUIRES): Remove.
2955 (grammar_declaration): Remove RHS's for %code-top, %provides, and
2956 %requires. Rewrite the %code RHS as the unqualified form defining the
2957 muscle b4_percent_code. Add another RHS for the qualified %code form,
2958 which defines muscles of the form b4_percent_code_QUALIFIER and the
2959 b4_used_percent_code_qualifiers muscle.
2960 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2961 PERCENT_REQUIRES): Remove.
2962 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
2963 %code "requires" and %code "provides".
2964 * tests/input.at (Reject bad %code qualifiers): New.
2965
95021767
JD
29662007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2967
2968 Use the new code_props interface for destructors and printers.
2969 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
2970 printer_location members, and change the type of the destructor and
2971 printer members to code_props.
2972 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
2973 symbol_printer_get, semantic_type_destructor_set,
2974 semantic_type_printer_set, default_tagged_destructor_set,
2975 default_tagless_destructor_set, default_tagged_printer_set,
2976 default_tagless_printer_set): Use code_props in arguments and return
2977 types in place of char const * and location.
2978 (symbol_destructor_location_get, symbol_printer_location_get): Remove
2979 since the locations are now contained in the return of
2980 symbol_destructor_get and symbol_printer_get.
2981 * src/output.c (symbol_destructors_output, symbol_printers_output):
2982 Replace with...
2983 (symbol_code_props_output): ... this to eliminate duplicate code.
2984 (output_skeleton): Update to use symbol_code_props_output.
2985 * src/reader.c (symbol_should_be_used): Update use of
2986 symbol_destructor_get.
2987 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2988 Update uses of the various _destructor_set and _printer_set functions.
2989 * src/symtab.c: (default_tagged_destructor_location,
2990 default_tagless_destructor_location, default_tagged_printer_location,
2991 default_tagless_printer_location): Remove since we...
2992 (default_tagged_destructor, default_tagless_destructor,
2993 default_tagged_printer, default_tagless_printer): ... change the type
2994 of these to code_props.
2995 (symbol_new, semantic_type_new, symbol_destructor_set,
2996 semantic_type_destructor_set, symbol_destructor_get,
2997 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
2998 symbol_check_alias_consistency, default_tagged_destructor_set,
2999 default_tagless_destructor_set, default_tagged_printer_set,
3000 default_tagless_printer_set): Update.
3001 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
3002 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
3003 code_props members.
3004 (symbol_print): Use SYMBOL_CODE_PRINT.
3005
f6857bbf
JD
30062007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
3007
3008 Use the new code_props interface for rule actions.
3009 * src/symlist.h (symbol_list): Replace action, action_location, and
3010 used members with a code_props action_props member.
3011 * src/reader.c (symbol_should_be_used, grammar_rule_check,
3012 grammar_midrule_action, grammar_current_rule_merge_set,
3013 grammar_current_rule_symbol_append, packgram): Update.
3014 * src/scan-code.h (translate_rule_action): Remove, no longer used.
3015 * src/scan-code.l (handle_action_dollar): Update.
3016 (translate_rule_action): Remove, no longer used.
3017 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
3018
7c0c6181
JD
30192007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
3020
3021 Use the new code_props interface in parse-gram.y.
3022 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
3023 Update all uses of translate_* functions to use the new code_props
3024 interface and to use gram_scanner_last_string_free and
3025 code_scanner_last_string_free where possible.
3026 (grammar_declaration): symbol_list_destructor_set and
3027 symbol_list_printer_set now perform the translation, so don't do it
3028 here. Use gram_scanner_last_string_free where possible.
3029 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
3030 translate_code): Remove, no longer used.
3031 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
3032 symbol_list_printer_set): Perform code translation here rather than
3033 depending on the caller to do so.
3034
3035 * src/symlist.h (struct symbol_list): Correct some documentation typos.
3036 * src/scan-gram.h (gram_last_string): Remove declaration.
3037 * src/scan-gram.l (last_string): Declare it static.
3038
28e52c0d
JD
30392007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
3040
3041 Encapsulate code properties and related functionality for the various
3042 destructors, printers, and actions into a code_props structure and
3043 interface. This patch merely implements code_props in scan-code.h and
3044 scan-code.l. Future patches will rewrite other modules to use it.
3045 Discussed starting at
3046 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
3047 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
3048 consistently initialize const structs that have an empty location
3049 field.
3050 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
3051 to ensure consistency.
3052 * src/scan-code.h (code_props): New structure.
3053 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
3054 function, macro, and const global variable for initializing a
3055 code_props with no code.
3056 (code_props_plain_init, code_props_symbol_action_init,
3057 code_props_rule_action_init, code_props_translate_code): The rest of
3058 the new code_props functional interface. Among other things, the init
3059 functions set the code_props kind field so that
3060 code_props_translate_code will know whether to behave like
3061 translate_symbol_action, translate_rule_action, or translate_code.
3062 These old translate functions must remain until all other modules are
3063 updated to use the new code_props interface.
3064 (code_scanner_last_string_free): New function similar to
3065 gram_scanner_last_string_free.
3066 (code_scanner_free): Add documentation.
3067 * src/scan-code.l: Implement the new interface.
3068 (code_lex): Make it static, add a code_props* argument, and remove the
3069 rule argument.
3070 (last_string): New static global similar to the one in scan-gram.l.
3071 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
3072 instead of rule.
3073 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
3074 code_props since Bison may one day use this information for destructors
3075 and printers.
3076 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
3077 (handle_action_dollar): Use symbol_list_n_get and set used flag
3078 directly since symbol_list_n_used_set is removed.
3079 (translate_action): Add a code_props* argument and remove the rule,
3080 action, and location arguments. Pass the code_props* on to code_lex.
3081 (translate_rule_action, translate_symbol_action, translate_code):
3082 Rewrite as wrappers around the new code_props interface.
3083 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
3084 it would eventually need to break the encapsulation of code_props.
3085
96034983
JD
30862007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
3087
3088 * etc/.cvsignore: New.
3089
945e396c
JD
30902007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
3091
3092 Add maintainer-push-check to run maintainer-check using push parsing in
3093 place of pull parsing where available.
3094 * Makefile.am (maintainer-push-check): New.
3095 * data/bison.m4 (b4_use_push_for_pull_if): New.
3096 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
3097 appropriately based on their existing values.
3098 (yypush_parse): Don't print push-parser-specific diagnostics if push
3099 parsing is being used in place of pull parsing.
3100 * data/yacc.c: If push parsing should replace pull parsing, redirect to
3101 push.c.
3102 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
3103 variable, and insert b4_use_push_for_pull_flag into muscles.
3104 * tests/Makefile.am (maintainer-push-check): New.
3105
7d596384
JD
31062006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
3107
3108 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
3109 (whether successful or failed) so that yypush_parse can be invoked
3110 again to start a new parse using the same yypstate.
3111 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
3112 check multiple yypull_parse invocations on the same yypstate. For pull
3113 mode, extend to check multiple yyparse invocations.
3114 (Exploding the Stack Size with Alloca): Extend to try with
3115 %push-pull-parser.
3116 (Exploding the Stack Size with Malloc): Likewise.
3117
3118 * tests/calc.at (Simple LALR Calculator): Don't specify
3119 %skeleton "push.c" since %push-pull-parser implies that now.
3120 * tests/headers.at (export YYLTYPE): Don't check for the push
3121 declarations. Otherwise, this test case can't be used to see if push
3122 mode can truly emulate pull mode.
3123 * tests/input.at (Torturing the Scanner): Likewise.
3124 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
3125 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
3126 AT_YACC_IF, which now includes the case of push mode since %skeleton
3127 need not be used for push mode. This will be more intuitive once
3128 push.c is renamed to yacc.c.
3129
7172e23e
JD
31302006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
3131
3132 For push mode, convert yyparse from a macro to a function, invoke yylex
3133 instead of passing a yylexp argument to yypull_parse, and don't
3134 generate yypull_parse or yyparse unless %push-pull-parser is declared.
3135 Discussed starting at
3136 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
3137 * data/bison.m4 (b4_pull_if): New.
3138 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
3139 * data/push.c: Improve M4 quoting a little.
3140 (b4_generate_macro_args, b4_parenthesize): Remove.
3141 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
3142 any time a pull parser is requested.
3143 Don't #define this as a wrapper around yypull_parse. Instead, when
3144 both push and pull are requested, make it a function that does that
3145 same thing.
3146 (yypull_parse): If there's a b4_prefix, #define this to
3147 b4_prefix[pull_parse] when both push and pull are requested.
3148 Don't define this as a function unless both push and pull are
3149 requested.
3150 Remove the yylexp argument and hard-code yylex invocation instead.
3151 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
3152 %push-parser.
3153 * src/getargs.c (pull_parser): New global initialized to true.
3154 * getargs.h (pull_parser): extern it.
3155 * src/output.c (prepare): Insert pull_flag muscle.
3156 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
3157 (prologue_declaration): Set both push_parser and pull_parser = true for
3158 %push-pull-parser. Set push_parser = true and pull_parser = false for
3159 %push-parser.
3160 * src/scan-gram.l: Don't accept %push_parser as an alternative to
3161 %push-parser since there's no backward-compatibility concern here.
3162 Scan %push-pull-parser.
3163 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
3164 instead of %push-parser.
3165 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
3166 prototype it in the module that calls yyparse.
3167 * tests/input.at (Torturing the Scanner): Likewise.
3168 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
3169
2e7944cb
JD
31702006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
3171
3172 Update etc/bench.pl. Optimize push mode a little (the yyn change
3173 deserves most of the credit).
3174 * Makefile.am (SUBDIRS): Add etc subdirectory.
3175 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
3176 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
3177 yytoken, yyval, and yyloc declarations to...
3178 (yyparse or yypush_parse): ... here to improve performance. For
3179 yypush_parse invocations after the first, be sure to assign yyn its old
3180 value again.
3181 (yypstate_new): Don't bother initializing the yyresult field since the
3182 initial value isn't used.
3183 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
3184 remove the #define that, in push mode, set it to yyps->NAME.
3185 * etc/Makefile.am: New.
3186 * etc/bench.pl: Remove and build it instead from...
3187 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
3188 "tests/bison" from the build directory by default rather than just
3189 invoking "bison" from $PATH.
3190 (calc_grammar): Update push parser code: don't declare yylval globally,
3191 don't define yyparse_wrapper, and don't #define yyparse.
3192 (bench_grammar): Update to check all working combinations of yacc.c,
3193 push.c, impure, pure, pull, and push.
3194
c3d50342
JD
31952006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
3196
3197 For push mode, add pull wrappers around yypush_parse.
3198 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
3199 (yypull_parse): New function wrapping yypush_parse.
3200 (yyparse): New #define wrapping yypull_parse.
3201 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
3202 is declared.
3203 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
3204 prototype yylex in the module that calls yyparse, and don't prototype
3205 yyparse there. Otherwise, the yyparse expansion won't compile.
3206 * tests/input.at (Torturing the Scanner): Likewise.
3207
94ebeba5
JD
32082006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
3209
3210 Enable push parsers to operate in impure mode. Thus, %push-parser no
3211 longer implies %pure-parser. The point of this change is to move
3212 towards being able to test the push parser code by running the entire
3213 test suite as if %push-parser had been declared.
3214 * data/push.c (yypush_parse): For impure mode, remove the
3215 yypushed_char, yypushed_val, and yypushed_loc arguments.
3216 Instead, declare these as local variables initialized to the global
3217 yychar, yylval, and yylloc.
3218 For the first yypush_parse invocation only, restore the initial values
3219 of these global variables when it's time to read a token since they
3220 have been overwritten.
3221 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
3222 %push-parser.
3223 * tests/calc.at (Simple LALR(1) Calculator): Always declare
3224 %pure-parser along with %push-parser since this test case was designed
3225 for pure push parsers.
3226 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
3227 (AT_YACC_OR_PUSH_IF): New.
3228 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
3229 add a note that it's still wrong for some cases (as it has been for a
3230 while).
3231 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
3232 %push-parser no longer implies %pure-parser.
3233
a0633178
JD
32342006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3235
3236 Remove some unnecessary differences between the pull parser code and
3237 the push parser code. This patch enables yynerrs in push mode.
3238 * data/push.c: Reformat M4 a little.
3239 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
3240 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
3241 because push mode is on. Instead, if pure mode is on, move yynerrs
3242 to...
3243 (b4_declare_parser_state_variables): ... here.
3244 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
3245 to yyps->NAME so it can be used in yypush_parse.
3246 (yypush_parse): Don't omit uses of yynerrs in push mode.
3247
8646b6a3
JD
32482006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3249
3250 Fix bug such that the first pushed token's value and location are
3251 sometimes overwritten (sometimes by %initial-action) before being used.
3252 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
3253 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
3254 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
3255 more closely mimic the pull parser logic.
3256 Don't copy the pushed token to yychar, yylval, and yylloc until it's
3257 time to read a token, which is after any initialization of yylval and
3258 yylloc.
3259 (gottoken): Rename label to...
3260 (yyread_pushed_token): ... for clarity and to avoid infringing on the
3261 user namespace.
3262
9baf4d74
JD
32632006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3264
3265 Rearrange initialization of the parser state variables so that the
3266 skeleton doesn't have to have a copy for pull mode and another for push
3267 mode. This patch also fixes at least a bug such that yylloc was not
3268 initialized (with b4_location_initial_line and
3269 b4_location_initial_column) upon calling yypush_parse. However, that
3270 initialization now overwrites the first token's location;
3271 %initial-action assigning @$ already did the same thing, and both bugs
3272 will be fixed in a later patch.
3273 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
3274 (b4_declare_parser_state_variables): Remove initialization of yytoken,
3275 yyss, yyvs, yyls, and yystacksize.
3276 (yypstate_new): Remove initialization of some yypstate fields: yystate,
3277 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
3278 yylsp.
3279 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
3280 yyps->NAME so it can be used in yypush_parse.
3281 (yyparse or yypush_parse): For yypush_parse, don't print the
3282 "Starting parse" diagnostic for invocations after the first.
3283 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
3284 yypush_parse, only do it for the first invocation.
3285 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
3286 initialization to occur in yypush_parse but only on the first
3287 invocation.
3288
23522164
JD
32892006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
3290
3291 * data/push.c: Add CPP guards around push parser declarations in both
3292 the header and the code file.
3293 In the code file, move the push parser declarations to the same place
3294 they appear in the header file.
3295 Clean up the M4 some, especially the inconsistent underquoting in
3296 some b4_c_function_def and b4_c_function_decl uses.
3297
bb010fe5
JD
32982006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
3299
3300 Encapsulate the push parser state variables into an M4 macro so the
3301 push skeleton doesn't have to list them again for pull mode's yyparse.
3302 For push mode, remove yypush_parse's local equivalents of these
3303 variables to eliminate unnecessary copying between the two sets at
3304 run-time. This patch also fixes at least a bug related to multiple
3305 %initial-action invocations in push mode.
3306 * data/push.c (b4_declare_parser_variables): Rename to...
3307 (b4_declare_scanner_communication_variables): ... this for clarity and
3308 update both uses.
3309 (b4_declare_yyparse_variables): Remove and move its contents to the one
3310 spot where it was invoked.
3311 (b4_declare_parser_state_variables): New macro containing the parser
3312 state variables required by push mode.
3313 (struct yypstate): Replace all fields but yynew with
3314 b4_declare_parser_state_variables.
3315 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
3316 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
3317 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
3318 (yyparse or yypush_parse): For yyparse in pull mode, replace local
3319 parser state variable declarations with
3320 b4_declare_parser_state_variables.
3321 Don't initialize parser state variables when calling yypush_parse since
3322 yypstate_new already does that.
3323 Invoke the user's initial action only upon the first yypush_parse
3324 invocation.
3325 Remove all code that copies between the local parser state variables
3326 and the yypstate.
3327
2d212f8c
JD
33282006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
3329
3330 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
3331 prevent a name collision in a future patch where these names will
3332 sometimes be #define'd.
3333 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
3334 since it no longer has the same name as the existing argument.
3335 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
3336
e6e704dc
JD
33372006-12-19 Paolo Bonzini <bonzini@gnu.org>
3338 and Joel E. Denny <jdenny@ces.clemson.edu>
3339
3340 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3341 that the argument is case-insensitive, and there's no `=' here.
3342 For the %skeleton entry, mention that %language is better.
3343 (Bison Options): Likewise for --language and --skeleton. Move the
3344 --skeleton entry so that the `Tuning the parser' section is sorted
3345 alphabetically on long options.
3346 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
3347 %language directive in detail here; cross-reference the %language
3348 documentation instead.
3349 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
3350 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 3351 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
3352 * examples/extexi (normalize): Instead of replacing every %require
3353 argument with the current Bison version, just substitute for
3354 `@value{VERSION}'. This guarantees that we're testing what actually
3355 appears in the documentation.
3356 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
3357 rather than `@VERSION@'.
3358
0e021770
PE
33592006-12-18 Paul Eggert <eggert@cs.ucla.edu>
3360
fd575f05
PE
3361 * NEWS: Reword the %language news a bit, and put it earlier.
3362
0e021770
PE
3363 * src/getargs.c (skeleton_arg): Last arg is now location const *.
3364 Rewrite to simplify the logic.
3365 (language_argmatch): Likewise.
fd575f05
PE
3366 (program_name): We now own this var.
3367 * src/getargs.h (struct bison_language): Use char[] rather than
3368 const char *.
0e021770
PE
3369
3370 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
3371 Java is supported.
3372 * src/complain.c (program_name): Remove decl; no longer needed.
3373 * src/main.c (program_name): Remove; now belongs to getargs.
3374
33752006-12-18 Paolo Bonzini <bonzini@gnu.org>
3376
3377 * NEWS: Document %language.
3378
3379 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
3380
3381 * data/c-skel.m4, data/c++-skel.m4: New files.
3382 * data/glr.c: Complain on push parsers.
3383
3384 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
3385 over %skeleton.
148d66d8 3386 (Decl Summary): Document %language and %skeleton.
0e021770
PE
3387 (Command line): Document -L.
3388
3389 * examples/extexi: Rewrite %require directive.
3390 * examples/calc++/Makefile.am: Pass VERSION to extexi.
3391
3392 * src/files.c (compute_exts_from_gc): Look in language structure
3393 for .y extension.
3394 (compute_file_name_parts): Check whether .tab should be added.
3395 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
3396 (language, skeleton_arg, language_argmatch): New.
3397 (long_options): Add --language.
3398 (getargs): Use skeleton_arg, add -L/--language.
3399 * src/getargs.h: Include location.h.
3400 (struct bison_language, language, skeleton_arg, language_argmatch): New.
3401 * src/output.c (prepare): Pick default skeleton from struct language.
3402 Don't dispatch C skeletons here.
3403 * src/parse-gram.y (PERCENT_LANGUAGE): New.
3404 (prologue_declaration): Add "%language" rule, use skeleton_arg.
3405 * src/scan-gram.l ("%language"): New rule.
3406
3407 * tests/calc.at: Test %skeleton and %language.
3408 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
3409 (AT_GLR_IF): Look for %skeleton "glr.cc".
3410 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
3411 (AT_YACC_IF): Reject %language.
3412
5691bf57
PE
34132006-12-18 Paul Eggert <eggert@cs.ucla.edu>
3414
db06f0ce
PE
3415 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
3416 since it wasn't used; only the typedef name 'semantic_type' is needed.
3417 Also, omit trailing white space.
3418
5691bf57
PE
3419 * bootstrap: Sync from coreutils.
3420 (gnulib_extra_files): Add build-aux/announce.gen.
3421 (slurp): Adjust .gitignore files like .cvsignore files.
3422 * build-aux/announce-gen: Remove from CVS, since bootstrap
3423 now creates this.
3424
791934e4
JD
34252006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
3426
3427 Make %push-parser imply %pure-parser. This fixes several bugs; see
3428 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
3429 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
3430 pure_parser = true.
3431 * data/push.c: Don't bother testing b4_push_if when deciding whether
3432 to expand b4_declare_parser_variables globally.
3433 (yypush_parse): Likewise in here.
3434
3435 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
3436 (yy_reduce_print): Reformat M4 for readability.
3437
ee5abb37
JD
34382006-12-15 Bob Rossi <bob@brasko.net>
3439 and Joel Denny <jdenny@ces.clemson.edu>
3440
3441 * data/push.c (yypstate): Add typedef, and update all uses of
3442 struct yypstate to just yypstate.
3443 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
3444
16ca01f9
JD
34452006-12-14 Bob Rossi <bob@brasko.net>
3446
3447 * data/push.c (yypush_parse): Declare prototype regardless of
3448 %locations option.
3449
ab8e7e1a
JD
34502006-12-14 Bob Rossi <bob@brasko.net>
3451
3452 * data/push.c (yyparse): Remove the prototype and the #define when in
3453 push-parser mode.
3454
9bf32be3
JD
34552006-12-13 Bob Rossi <bob@brasko.net>
3456
3457 * data/push.c (yypstate_init): Rename to...
3458 (yypstate_new): ... this and use b4_c_function_def.
3459 (yypstate_delete): New.
3460 (yypush_parse): Change parameters yynval and yynlloc to be const.
3461 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
3462 yypstate_delete functions.
3463
f02e2948
JD
34642006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
3465
3466 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
3467 strange test case titles. Reported by Bob Rossi.
3468
38eb7751
PE
34692006-12-13 Paul Eggert <eggert@cs.ucla.edu>
3470
3471 * TODO: Add pointer to Sylvain Schmitz's work on static detection
3472 of potential ambiguities in GLR grammers.
3473
bd9d212b
JD
34742006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
3475
3476 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
3477 `bison ', use m4_index instead of m4_substr since chopping up a string
3478 containing M4-special characters causes problems here.
3479
3480 Fix a couple of bugs related to special characters in user-specified
3481 file names, and make it easier for skeletons to compute output file
3482 names with the same file name prefix as Bison-computed output file
3483 names.
3484 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
3485 b4_parser_file_name and b4_spec_defines_file instead of
3486 @output_parser_name@ and @output_header_name@, which are now redundant.
3487 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
3488 b4_parser_file_name, b4_spec_defines_file, and the new
3489 @basename(FILENAME@) instead of @output_parser_name@ and
3490 @output_header_name@, which inappropriately escaped the file names as
3491 C string literals.
3492 * src/files.c (all_but_ext): Remove static qualifier.
3493 (compute_output_file_names): Move `free (all_but_ext)' to...
3494 (output_file_names_free): ... here since all_but_ext is needed later.
3495 * src/files.h (all_but_ext): Extern.
3496 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
3497 exactly what MUSCLE_INSERT_STRING used to do.
3498 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
3499 characters are escaped properly.
3500 * src/output.c (prepare): Define muscle file_name_all_but_ext as
3501 all_but_ext.
3502 For pkgdatadir muscle, maintain previous functionality by using
3503 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
3504 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
3505 digraphs would never be expanded. Hopefully no one has M4-special
3506 characters in his Bison installation path.
3507 * src/scan-skel.l: Don't parse @output_header_name@ and
3508 @output_parser_name@ anymore since they're now redundant.
3509 In @output, use decode_at_digraphs.
3510 Parse a new @basename command that invokes last_component.
3511 (decode_at_digraphs): New.
3512 (BASE_QPUTS): Remove unused.
3513 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
3514 (Output file name): New tests.
3515
3f7ca628
JD
35162006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
3517
3518 Warn about output files that are generated by the skeletons and that
3519 conflict with other output files.
3520 * data/glr.c: Don't generate the header file here when glr.cc does.
3521 * src/files.c (file_names, file_names_count): New static globals.
3522 (compute_output_file_names): Invoke output_file_name_check for files
3523 not generated by the skeletons and remove existing checks.
3524 (output_file_name_check): New function that warns about conflicting
3525 output file names.
3526 (output_file_names_free): Free file_names.
3527 * src/files.h (output_file_name_check): Declare.
3528 * src/scan-skel.l: Invoke output_file_name_check for files generated by
3529 the skeletons.
3530 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
3531 (Conflicting output files): New tests.
3532
178e123e
PE
35332006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3534
3535 * doc/bison.texinfo: Fix a couple of typos.
3536
35372006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
3538
3539 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
3540 Rename to...
3541 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
3542 update all uses.
3543 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
3544 (yypush_parse): Rename yypvars argument to yyps and remove redundant
3545 local pv.
3546 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
3547 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
3548
ea17f233
JD
35492006-12-07 Bob Rossi <bob@brasko.net>
3550 and Joel Denny <jdenny@ces.clemson.edu>
3551
3552 * data/push.c (yypvarsinit): Change return type from void* to struct
3553 yypvars*. No longer cast to void* on return.
3554 (struct yypvars): Remove yylen since it need not be remembered between
3555 yypushparse invocations.
3556 (yypushparse): Don't copy between yylen and pv->yylen.
3557
55a30bda
JD
35582006-12-05 Bob Rossi <bob@brasko.net>
3559
3560 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
3561 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
3562 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
3563 (struct yypvars): Remove b4_declare_parser_variables.
3564 (yypvarsinit): Remove init code for removed variables.
3565 (global scope): Do not declare b4_declare_parser_variables if
3566 push or pure mode.
3567 (yypushparse): Add b4_declare_parser_variables.
3568 Init new local variables, and remove init code for removed
3569 yypvars variables.
3570 (yyparse): Delete.
3571 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
3572 and yyparse for other modes.
3573 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
3574 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
3575 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
3576 (AT_PURE_LEX_IF): True if pure or push parser.
3577
85894313
JD
35782006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
3579
3580 Document Yacc prologue alternatives and default %destructor's and
3581 %printer's as experimental. Don't mention Java yet. Discussed at
3582 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
3583 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
3584 (2.3a): Annotate this entry to say the old forms of these features were
3585 also experimental.
3586 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 3587 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
3588 of Java (we'll want this back eventually).
3589
02975b9a
JD
35902006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3591
3592 Support a file name argument to %defines. Deprecate `=' in
3593 %file-prefix, %name-prefix, and %output. Discussed at
3594 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
3595 * NEWS (2.3a+): Mention.
148d66d8 3596 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
3597 form of %defines, and remove `=' from entries for %file-prefix,
3598 %name-prefix, and %output.
3599 * src/parse-gram.y (prologue_declaration): Implement.
3600 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
3601 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
3602 all but one occurrence of %name-prefix.
3603 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
3604 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
3605 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
3606 occurrence of each of %file-prefix and %output. Add check for %defines
3607 with argument.
3608 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
3609 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
3610 Remove the `=' from %output.
3611
287b314e
JD
36122006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
3613
3614 Don't escape $ in test case titles since Autoconf 2.61 now does that
3615 correctly.
3616 * tests/actions.at (Default %printer and %destructor are not for error
3617 or $undefined): Here.
3618 (Default %printer and %destructor are not for $accept): Here.
3619 * tests/input.at (Invalid $n and @n): Here.
3620
3ebecc24
JD
36212006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
3622
3623 Rename <!> to <>. Discussed starting at
3624 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
3625 * NEWS (2.3a+): Update.
148d66d8 3626 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
3627 Update.
3628 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
3629 * src/scan-gram.l (INITIAL): Implement.
3630 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
3631 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
3632 comment.
3633 * tests/actions.at (Default tagless %printer and %destructor,
3634 Default tagged and per-type %printer and %destructor,
3635 Default %printer and %destructor are not for error or $undefined,
3636 Default %printer and %destructor are not for $accept,
3637 Default %printer and %destructor for mid-rule values): Update.
3638 * tests/input.at (Default %printer and %destructor redeclared,
3639 Unused values with default %destructor): Update.
3640
26b8a438
JD
36412006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3642
3643 Don't let %prec take a nonterminal.
3644 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
3645 token.
3646 * tests/input.at (%prec takes a token): New test checking that %prec
3647 won't take a nonterminal.
3648
07c39ae9
JD
36492006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3650
405d53b7
JD
3651 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
3652 it was double-quoted.
07c39ae9
JD
3653 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
3654 grammar is maintained with Bison's highest standards.
3655 * src/getargs.c: Fix some typos in Doxygen comments.
3656
580b8926
JD
36572006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3658
3659 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
3660 later. Reported by Paul Eggert in
3661 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
3662 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
3663 * src/scan-code.l (translate_action): Don't bother invoking
3664 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
3665 (code_scanner_free): Instead of invoking
3666 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
3667 which frees more.
3668 * src/scan-gram.l (gram_scanner_free): Likewise.
3669 * src/scan-skel.l (scan_skel): Likewise.
3670
4502eadc
JD
36712006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3672
3673 * src/files.c (tr): Change return type to void.
3674 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
3675 has been called previously for the same key.
3676 (muscle_find): Return storage instead of value so that
3677 --enable-gcc-warnings doesn't produce warnings that the return discards
3678 const. aver that the value and storage are the same since storage
3679 could potentially be NULL when value is not.
3680 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
3681 same as 0.
3682
7746c8f6
PE
36832006-11-08 Paul Eggert <eggert@cs.ucla.edu>
3684
3685 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
3686 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
3687 us a slightly cleaner distribution, and also works.
3688 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
3689 gnulib changes.
3690
eb095650
PE
36912006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
3692 and Paul Eggert <eggert@cs.ucla.edu>
3693
3694 Don't let Bison leak memory except when it complains.
3695 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
3696 (spec_defines_file, dir_prefix): Now char *, not const char *,
3697 since they are freed.
3698 * src/files.c: Likewise.
3699 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
3700 Likewise.
3701 (tr): Now operates in-place. All uses changed.
3702 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
3703 values.
3704 (compute_file_name_parts, compute_output_file_names): Don't store
3705 read-only data in variables that will be freed.
3706 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
3707 src_extension, and header_extension.
3708 (output_file_names_free): New public function to free
3709 spec_verbose_file, spec_graph_file, spec_defines_file,
3710 parser_file_name, and dir_prefix.
3711 * src/getargs.c (getargs): Don't store read-only data in variables that
3712 will be freed.
3713 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
3714 (which previously existed but was unused), and quotearg_free.
3715 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
3716 * src/muscle_tab.c: Likewise.
3717 (muscle_entry): Make the value char const *,
3718 and add a new storage member that is char * and can be freed.
3719 (muscle_entry_free): New private function.
3720 (muscle_init): Use it instead of free.
3721 (muscle_insert, muscle_grow): Update and use new storage member.
3722 (muscle_code_grow): Free the string passed to muscle_grow
3723 since it's not needed anymore.
3724 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
3725 add a new `char *code' member.
3726 ("{...}"): Declare semantic type as code.
3727 * src/scan-code.h (translate_rule_action):
3728 (translate_symbol_action, translate_code, translate_action): Return
3729 `char const *' rather than `char *' since external code should not free
3730 these strings.
3731 * src/scan-code.l: Likewise.
3732 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
3733 which is "{...}" in the parser.
3734 * tests/Makefile.am (maintainer-check-valgrind): Set
3735 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
3736 Valgrind.
3737 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
3738 complain.
3739 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
3740 expecting a non-zero exit status sets --leak-check=summary and
3741 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
3742 this case, and we don't want to hear about it.
3743
ac564be4
PE
37442006-11-08 Paul Eggert <eggert@cs.ucla.edu>
3745
3746 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
3747 instead of from the template, to simplify configuration a bit.
3748 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
3749 and m4/wint_t.m4, as they are needed with the latest gnulib.
3750
17bd8a73
JD
37512006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3752
3753 Disable unset/unused mid-rule value warnings by default, and recognize
3754 --warnings=midrule-values to enable them. Discussed starting at
3755 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
3756 * NEWS (2.3a+): Mention.
3757 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
3758 warnings): Add entry for midrule-values subargument.
3759 * src/reader.c (symbol_should_be_used): Don't return true just because
3760 the value is a set/used mid-rule value unless
3761 --warnings=midrule-values was specified.
3762 * tests/input.at (Unused values, Unused values before symbol
3763 declarations): Run tests with and without --warnings=midrule-values.
3764
3765 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
3766 than LIST_FREE directly.
3767
89eb3c76
JD
37682006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3769
3770 Finish implementing --warnings=error, which should not be implied by
3771 --warnings=all (or by its synonyms -W and --warnings without
3772 subarguments).
3773 * src/complain.c (set_warning_issued): New function to report that
3774 warnings are being treated as errors and to record an error if so.
3775 Invoke...
3776 (warn_at, warn): ... here.
3777 * src/getargs.c (warnings_args, warnings_types): Reorder so that
3778 "error - warnings are errors" does not appear above "all - all of the
3779 above".
3780 (getargs): For -W and --warnings without subarguments, don't let
3781 FLAGS_ARGMATCH set warnings_error in warnings_flag.
3782 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
3783
ba7560e2
JD
37842006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3785
3786 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
3787 empty subargument list. For example: `bison --warnings= parser.y'.
3788
31283fc3
JD
37892006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3790
3791 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
3792 the parser header file so that gcc doesn't warn.
3793
12e35840
JD
37942006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3795
3796 Split the default %destructor/%printer into two kinds: <*> and <!>.
3797 Discussed starting at
3798 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
3799 * NEWS (2.3a+): Mention.
3800 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
3801 previous change today related to mid-rules.
148d66d8 3802 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 3803 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
3804 (TYPE_TAG_ANY): Add as <*>.
3805 (TYPE_TAG_NONE): Add as <!>.
3806 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
3807 for <*> and <!>.
3808 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
3809 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
3810 * src/symlist.c (symbol_list_default_new): Split into tagged and
3811 tagless versions.
3812 (symbol_list_destructor_set, symbol_list_printer_set): Split
3813 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
3814 SYMLIST_DEFAULT_TAGLESS.
3815 * src/symlist.h: Update symbol_list_default*_new prototypes.
3816 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
3817 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
3818 * src/symtab.c (default_destructor, default_destructor_location,
3819 default_printer, default_printer_location): Split each into tagged and
3820 tagless versions.
3821 (symbol_destructor_get, symbol_destructor_location_get,
3822 symbol_printer_get, symbol_printer_location_get): Implement tagged
3823 default and tagless default cases.
3824 (default_destructor_set, default_printer_set): Split each into tagged
3825 and tagless versions.
3826 * src/symtab.h: Update prototypes.
3827 * tests/actions.at (Default %printer and %destructor): Rename to...
3828 (Default tagless %printer and %destructor): ... this, and extend.
3829 (Per-type %printer and %destructor): Rename to...
3830 (Default tagged and per-type %printer and %destructor): ... this, and
3831 extend.
3832 (Default %printer and %destructor for user-defined end token): Extend.
3833 (Default %printer and %destructor are not for error or $undefined):
3834 Update.
3835 (Default %printer and %destructor are not for $accept): Update.
3836 (Default %printer and %destructor for mid-rule values): Extend.
3837 * tests/input.at (Default %printer and %destructor redeclared): Extend.
3838 (Unused values with default %destructor): Extend.
3839
f91b1629
JD
38402006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3841
3842 Don't apply the default %destructor/%printer to an unreferenced midrule
3843 value. Mentioned at
3844 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
3845 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
3846 like $@n instead of just @n so that the default %destructor/%printer
3847 logic doesn't see them as user-defined symbols.
3848 (symbol_is_dummy): Check for both forms of the name.
3849 * src/reader.c (packgram): Remove the `$' from each midrule symbol
3850 name for which the midrule value is referenced in any action.
3851 * tests/actions.at (Default %printer and %destructor for mid-rule
3852 values): New test.
3853 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
3854 for change to dummy symbol names.
3855
519d0004
JD
38562006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3857
3858 Warn about unset midrule $$ if the corresponding $n is used.
3859 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
3860 $n usage.
3861 (packgram): Before invoking grammar_rule_check on any rule, make sure
3862 all actions have already been scanned in order to set `used' flags.
3863 Otherwise, checking that a midrule's $$ is set will not always work
3864 properly because the midrule check must forward-reference the midrule's
3865 parent rule.
3866 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
3867 warning.
3868
a501eca9
JD
38692006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3870
3871 More improvements to the documentation of the prologue alternatives:
3872 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
3873 Bison manual.
3874 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
3875 some text to clarify the relative importance of the new directives and
3876 to show how these directives may be viewed as code labels.
3877
2cbe6b7f
JD
38782006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
3879
3880 Similar to the recently removed %before-header, add %code-top as the
3881 alternative to the pre-prologue. Mentioned at
3882 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
3883 Also, let the prologue alternatives appear in the grammar section.
3884 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
3885 (prologue_declaration): Move the existing prologue alternatives to...
3886 (grammar_declaration): ... here and add %code-top.
3887 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
3888
3889 Clean up and extend documentation for the prologue alternatives.
3890 * NEWS (2.3a+): Describe prologue alternatives.
3891 * doc/bison.texinfo (Prologue): Move discussion of prologue
3892 alternatives to...
3893 (Prologue Alternatives): ... this new section, and extend it to discuss
3894 all 4 directives in detail.
148d66d8
JD
3895 (Table of Symbols): Clean up discussion of prologue alternatives and
3896 add %code-top.
2cbe6b7f 3897
e557d3ea
JMG
38982006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3899
3900 DJGPP specific issues.
3901
3902 * djgpp/config.bat: config.hin has been moved to lib. Adjust
3903 config.bat accordingly.
3904 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
3905 * djgpp/config.site: Likewise.
3906
136a0f76
PB
39072006-10-16 Paolo Bonzini <bonzini@gnu.org>
3908
27bd5d67
PB
3909 Replace %*-header with %provides, %requires, %code. See discussion at
3910 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
3911
136a0f76
PB
3912 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
3913 (b4_user_start_header): Remove.
3914 * data/glr.c: Use new macros instead of b4_*start_header
3915 and b4_*end_header.
3916 * data/glr.cc: Likewise.
3917 * data/lalr1.cc: Likewise.
3918 * data/push.c: Likewise.
3919 * data/yacc.c: Likewise.
3920
3921 * doc/bison.texinfo: Remove %before-header, rename
3922 %{start,end,after}-header to %requires, %provides, %code.
3923
3924 * src/parse-gram.y: Likewise (also rename token names accordingly).
3925 * src/scan-gram.l: Likewise.
3926 * tests/actions.at: Likewise.
3927
10f429ef
PE
39282006-10-14 Paul Eggert <eggert@cs.ucla.edu>
3929
3930 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
3931 Problem reported by Joel E. Denny.
3932
39332006-10-14 Jim Meyering <jim@meyering.net>
3934
3935 (Sync from coreutils.)
3936 Work also when the working directory (with e.g. coreutils sources)
3937 is version controlled with git, rather than CVS.
3938 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
3939 rather than CVS.
3940 In messages and comments, say e.g., "checked-out sources",
3941 rather than "CVS sources".
3942 (version_controlled_file): New function. Work for git as well as
3943 for CVS. Don't use grep's -q option.
3944 (slurp): Call it here, in place of CVS-specific code.
3945
c4bd5bf7
JD
39462006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
3947
3948 Fix testsuite for ./configure --enable-gcc-warnings:
3949 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
3950 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
3951 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
3952 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
3953 * test/regression.at (Diagnostic that expects two alternatives):
3954 Likewise.
3955
46356ea4
PE
39562006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3957
231ed89a
PE
3958 * bootstrap.conf (gnulib_modules): Add config-h.
3959 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
3960 worry about HAVE_CONFIG_H.
3961 * lib/abitset.c: Likewise.
3962 * lib/bitset.c: Likewise.
3963 * lib/bitset_stats.c: Likewise.
3964 * lib/bitsetv-print.c: Likewise.
3965 * lib/bitsetv.c: Likewise.
3966 * lib/ebitset.c: Likewise.
3967 * lib/get-errno.c: Likewise.
3968 * lib/lbitset.c: Likewise.
3969 * lib/subpipe.c: Likewise.
3970 * lib/timevar.c: Likewise.
3971 * lib/vbitset.c: Likewise.
3972 * lib/bitset.c: Include "bitset.h" first, to test interface.
3973 * lib/bitset_stats.c: Include "bitset_stats.h" first.
3974 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
3975 * lib/bitsetv.c: Include "bitsetv.h" first.
3976 * lib/get-errno.c: Include "get-errno.h" first.
3977 * m4/.cvsignore: Add config-h.m4.
3978 * tests/actions.at (Default %printer and %destructor for ...):
3979 Adjust expected line numbers in output to reflect removal of #if
3980 HAVE_CONFIG_H lines.
3981 * tests/glr-regression.at (Missed %merge type warnings when ...):
3982 Likewise.
3983 * tests/regression.at (Braced code in declaration in rules section):
3984 Likewise.
3985 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
3986 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
3987 Include <config.h> unconditionally.
3988
46356ea4
PE
3989 * bootstrap: Sync from coreutils, as follows:
3990
3991 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3992
3993 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
3994 variable was sometimes used without being initialized. This
3995 messed up the installation of the INSTALL file in some cases.
3996
3997 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3998
3999 * bootstrap (usage, main program, symlink_to_gnulib): Add option
4000 --copy. Inspired by a suggestion from Bruno Haible.
4001
4002 2006-10-03 Jim Meyering <jim@meyering.net>
4003
4004 * bootstrap: Undo last change to this file, since now gnulib-tool
4005 sticks with the automake default in generating dependencies.
4006
dd4bf078
PE
40072006-10-12 Paul Eggert <eggert@cs.ucla.edu>
4008
cf2a5f7c
PE
4009 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
4010 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
4011
4012 * doc/bison.1: Add copyright notice.
4013
4014 * data/glr.c: Don't include <stdarg.h>; not used.
4015
35fe0834
PE
4016 * NEWS: The -g and --graph options now output graphs in Graphviz
4017 DOT format, not VCG format.
4018 * doc/bison.1: Likewise.
4019 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
4020 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
4021 of this change in
4022 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
4023 * TODO: Remove Graphviz entry.
4024 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
4025 remove vcg.c, vcg.h, vcg_defaults.h.
4026 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
4027 * src/graphviz.c, src/graphviz.h: New files.
4028 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
4029 * src/files.h: Make comment more generic.
4030 * src/main.c (main): Likewise.
4031 * src/print_graph.h: Likewise.
4032 * src/getargs.c (usage): Make usage description more generic.
4033 * src/print_graph.c: Include graphviz.h rather than vcg.h.
4034 (static_graph, fgraph): Remove. All uses changed to pass
4035 arguments instead of sharing a static var.
4036 (print_core, print_actions, print_state, print_graph):
4037 Output graphviz format rather than VCG format.
4038 * tests/.cvsignore: Remove *.vcg; add *.dot.
4039 * tests/output.at: Expect *.dot files, not *.vcg files.
4040
dd4bf078
PE
4041 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
4042 accommodates the 2006-10-08 change.
4043
efdd7421
PE
40442006-10-11 Bob Rossi <bob@brasko.net>
4045
4046 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
4047 (b4_yyssa, b4_yyerror_range): New macros.
4048 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
4049 (yypvarsinit): Remove init of removed fields.
4050 (yypushparse): Remove use of removed fields; use new macros instead.
4051
96a1981a
PE
40522006-10-11 Paul Eggert <eggert@cs.ucla.edu>
4053
4054 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
4055 in a push parser. Reindent slightly to match yacc.c better.
4056
40572006-10-11 Bob Rossi <bob@brasko.net>
4058
46356ea4
PE
4059 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
4060 yymsg_alloc fields.
4061 (yypvarsinit, yypushparse): Remove init of removed fields.
4062 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 4063
c1630a8b
PE
40642006-10-09 Paul Eggert <eggert@cs.ucla.edu>
4065
4066 * THANKS: Add Paolo Bonzini and Bob Rossi.
4067
90b9908d
PB
40682006-10-08 Paolo Bonzini <bonzini@gnu.org>
4069
4070 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
4071 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
4072 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
4073 b4_define_user_cde and uses): Remove.
4074 (b4_comment, b4_prefix, b4_sync_start): New.
4075 * data/bison.m4: New file, with most of the content removed from c.m4.
4076 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
4077 * src/output.c (output_skeleton): Pass bison.m4.
4078 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
4079 only if specified.
4080
cf806753
PE
40812006-10-05 Paul Eggert <eggert@cs.ucla.edu>
4082
4083 Fix test failure reported by Tom Lane in
4084 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
4085 and try to make such failures easier to catch in the future.
4086 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
4087 that's now the caller's responsibility.
4088 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
4089 Set yychar = YYEOF if it's negative.
4090 * tests/actions.at (yylex): Abort if asked to read past EOF.
4091 * tests/conflicts.at (yylex): Likewise.
4092 * tests/cxx-type.at (yylex): Likewise.
4093 * tests/glr-regression.at (yylex): Likewise.
4094 * tests/input.at (yylex): Likewise.
4095 * tests/regression.at (yylex): Likewise.
4096 * tests/torture.at (yylex): Likewise.
4097
0e2f006a
PE
40982006-10-01 Paul Eggert <eggert@cs.ucla.edu>
4099
4100 Fix problems with translating English-language diagnostics.
4101 * bootstrap: Fix bug introduced in recent bootstrap changes, with
4102 respect to bison-runtime pot generation. The YY_ stuff
4103 wasn't being captured.
4104 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
4105 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
4106 * runtime-po/POTFILES.in: Add data/push.c.
4107
e3ddc1e3
PE
41082006-09-29 Paul Eggert <eggert@cs.ucla.edu>
4109
4110 Merge bootstrap changes from coreutils.
4111
4112 2006-09-28 Jim Meyering <jim@meyering.net>
4113
4114 Automatically generated dependencies are important even
4115 when all of the sources in a directory come from gnulib.
4116 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
4117 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
4118
4119 2006-09-23 Jim Meyering <jim@meyering.net>
4120
4121 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
4122
4123 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4124
4125 * bootstrap: Add support for --force.
4126 (usage): New function. Describe usage less tersely.
4127 (CVS_only_file): New var.
4128
01e972b3
PE
41292006-09-21 Paul Eggert <eggert@cs.ucla.edu>
4130
4131 * data/push.c (YYPUSH_MORE): Make it an enum instead.
4132 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
4133 Adjust white space and comments to match GNU style better.
4134
c63d3e90
PE
41352006-09-20 Bob Rossi <bob@brasko.net>
4136
4137 * data/push.c (yyresult_get): Remove function.
4138 (YYPUSH_MORE): Add #define.
4139 (yypushparse): Modify return value.
4140
e70f46d1
PE
41412006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4142
4143 * stamp-h.in: Remove; no longer needed.
4144 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
4145 Remove config.h, config.hin, intl (no longer created).
4146 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
4147 stamp-h1.
4148
4149 Sync bootstrap from coreutils, as follows:
4150
4151 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
4152
4153 * bootstrap (symlink_to_gnulib): New function.
4154 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
4155 to copies-of-gnulib.
4156 (cp_mark_as_generated, slurp, gnulib_files):
4157 Avoid making a copy if it's the same as the old version.
4158 (gnulib_files): Add support for this variable (used by Bison).
4159
a92be413
PE
41602006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4161
4162 * src/getargs.c (usage): Rework to use conventions similar to
4163 coreutils, to make translation a bit easier and the code a bit
4164 smaller. Problem reported by Tim Van Holder.
4165
4f82b42a
PE
41662006-09-15 Paul Eggert <eggert@cs.ucla.edu>
4167
3b2942e6
PE
4168 Use some of gnulib's new modules, taken from coreutils.
4169
4170 * bootstrap: Sync from coreutils, except add support for gnulib_files.
4171 * bootstrap.conf: New file.
4172 (gnulib_modules): Add configmake, inttypes, unistd.
4173 (XGETTEXT_OPTIONS): Add complain, complain_at,
4174 fatal, fatal_at, warn, warn_at, unexpected_end.
4175 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
4176 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
4177 (gl_EARLY): Add.
4178 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
4179 (gl_INIT): Add
4180 (GNULIB_AUTOCONF_SNIPPET): Remove.
4181 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
4182 the pickiest.
4183 * lib/.cvsignore: Add inttypes_.h.
4184 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
4185 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
4186 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
4187 no-longer-necessary initializations.
4188 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
4189 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
4190 use the unistd module.
4191 * src/system.h: Likewise.
4192 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
4193 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
4194 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
4195 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
4196 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
4197 * src/system.h: Include inttypes.h unconditionally, now that we
4198 use the inttypes module. Don't bother to include stdint.h, since
4199 inttypes.h now does that for us.
4200 (LOCALEDIR): Remove, now that we use the configmake module.
4201 * src/getargs.c: Include configmake.h.
4202 * src/main.c: Likewise.
4203 * src/output.c: Likewise.
4204 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
4205 not from $abs_top_builddir, since config.h moved.
4206
4207
4f82b42a
PE
4208 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
4209 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
4210
4211 * src/parse-gram.y (symbol_declaration): Don't put statements
4212 before declarations; it's not portable to C89.
4213 * src/scan-code.l (handle_action_at): Likewise.
4214
4215 * src/scan-code.l: Always initialize braces_level; the old code
4216 left it uninitialized and therefore had undefined behavior.
4217
4218 Don't attempt to redefine 'assert', since it runs afoul of
4219 systems where standard headers (mistakenly) include <assert.h>.
4220 Instead, define and use our own alternative, called 'aver'.
4221 * src/reader.c: Don't include assert.h, since we no longer
4222 use assert.
4223 * src/scan-code.l: Likewise.
4224 * src/system.h (assert): Remove, replacing with....
4225 (aver): New function, taking a bool arg. All uses changed.
4226 * src/tables.c (pack_vector): Ensure that aver arg is bool,
4227 not merely an integer.
4228
31c10e38
PE
42292006-09-15 Bob Rossi <bob@brasko.net>
4230
4231 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
4232 * data/c.m4 (YYPUSH): New.
4233 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
4234 * src/getargs.c (push_parser): New var.
4235 * src/getargs.h (push_parser): New declaration.
4236 * src/output.c (prepare): Add macro insertion of `push_flag'.
4237 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
4238 (prologue_declaration): Parse %push-parser.
4239 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
4240 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
4241 list of removed lines from the traces observed.
4242 (AT_CHECK_CALC_LALR): Added push parser tests.
4243
fa7b79c0
PE
42442006-09-13 Paul Eggert <eggert@cs.ucla.edu>
4245
21fe08ca
PE
4246 * NEWS: Version 2.3a.
4247 * configure.ac (AC_INIT): Likewise.
4248
e8ec4d9b
PE
4249 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
4250 "#define YYSTYPE int" that caused "make maintainer-check" to fail
4251 due to header ordering dependencies. I don't know why the #define
4252 was there.
4253
fa7b79c0
PE
4254 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
4255 runtime cost when YYDEBUG is not defined, and so that some tests
4256 that used to fail now work. Problem and initial suggestion by
4257 Paolo Bonzini.
4258 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
4259 * data/glr.cc (b4_parser_class_name):
4260 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
4261 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
4262 (yydebug_) [YYDEBUG]: New member.
4263 (yycdebug_): Now defined only if YYDEBUG.
4264 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
4265 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
4266 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
4267 if YYYDEBUG.
4268 (debug_stream, set_debug_stream, debug_level, set_debug_level):
4269 Define only if YYDEBUG.
4270 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
4271 set_debug_level.
4272 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
4273 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
4274 AT_CHECK_CALC_GLR_CC that are working now.
4275
4ec13d60
PE
42762006-09-12 Paul Eggert <eggert@cs.ucla.edu>
4277
4278 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
4279 We don't need them in glr.cc, and glr.c defines them.
4280 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
4281 assumes that defining it to anything is the same as defining
4282 it to 1. Problem reported by Paolo Bonzini.
4283
8e1687ae
PE
42842006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
4285
4286 * data/c.m4 (b4_null, b4_case): Define.
4287 * src/output.c (prepare_symbols): Use b4_null.
4288 (user_actions_output): Use b4_case.
4289
3dc5e96b
PE
42902006-09-11 Paul Eggert <eggert@cs.ucla.edu>
4291
aef3da86
PE
4292 * data/glr.c (b4_shared_declarations): Put start-header first,
4293 before any #includes that we generate, so that feature-test
4294 macros work. Problem reported by Michael Deutschmann in
4295 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
4296 * data/lalr1.cc: Likewise.
4297 * doc/bison.texinfo (Prologue): Document that feature-test macros
4298 should be defined before any Bison declarations.
4299 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
4300 that depend on location.hh after, not before, Bison decls, since
4301 we now include location.hh after the first user prologue.
4302
3dc5e96b
PE
4303 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
4304 Sander Brandenburg in
4305 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
4306 Also, fix minor white space and comment issues.
aef3da86
PE
4307 (Prologue): Mention that it's better to define feature-test macros
4308 before Bison declarations. Problem reported by Michael Deutschmann.
4309
4310 * README-cvs: Fix typo: "&" should be "&&". Problem reported
4311 by Jim Meyering.
4312 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
4313 This adjusts to recent gnulib changes.
3dc5e96b 4314
b2a0b7ca
JD
43152006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
4316
4317 Finish implementation of per-type %destructor/%printer. Discussed
4318 starting at
4319 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
4320 and
4321 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
4322 * NEWS (2.3+): Add a description of this feature to the default
4323 %destructor/%printer description.
4324 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
4325 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4326 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
4327 list node contains a semantic type.
4328 * src/symtab.c, src/symtab.h: Extend with a table that associates
4329 semantic types with their %destructor's and %printer's.
4330 (semantic_type_from_uniqstr, semantic_type_get,
4331 semantic_type_destructor_set, semantic_type_printer_set): New functions
4332 composing the public interface of that table.
4333 (symbol_destructor_get, symbol_destructor_location_get,
4334 symbol_printer_get, symbol_printer_location_get): If there's no
4335 per-symbol %destructor/%printer, look up the per-type before trying
4336 the default.
4337 * tests/actions.at (Per-type %printer and %destructor): New test case.
4338 * tests/input.at (Default %printer and %destructor redeclared):
4339 Extend to check that multiple occurrences of %symbol-default in a
4340 single %destructor/%printer declaration is an error.
4341 (Per-type %printer and %destructor redeclared, Unused values with
4342 per-type %destructor): New test cases.
4343
3be03b13
JD
43442006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
4345
4346 Require default %destructor/%printer to be declared using
4347 %symbol-default instead of an empty symbol list, and start working on
4348 new per-type %destructor/%printer. Discussed at
4349 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
4350 * NEWS (2.3+): Add %symbol-default to example.
4351 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 4352 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
4353 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
4354 (generic_symlist, generic_symlist_item): New nonterminals for creating
4355 a list in which each item is a symbol, semantic type, or
4356 %symbol-default.
4357 (grammar_declaration): Use generic_symlist in %destructor and %printer
4358 declarations instead of symbols.1 or an empty list.
4359 (symbol_declaration, precedence_declaration, symbols.1): Update actions
4360 for changes to symbol_list.
4361 * src/reader.c: Update for changes to symbol_list.
4362 * src/scan-code.l: Likewise.
4363 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
4364 * src/symlist.c, src/symlist.h: Extend such that a list node may
4365 represent a semantic type or a %symbol-default in addition to just an
4366 ordinary symbol. Add switched functions for setting %destructor's and
4367 %printer's.
4368 * tests/actions.at, tests/input.at: Add %symbol-default to all default
4369 %destructor/%printer declarations.
4370
3508ce36
JD
43712006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
4372
4373 Whether the default %destructor/%printer applies to a particular symbol
4374 isn't a question of whether the user *declares* that symbol (in %token,
4375 for example). It's a question of whether the user by any means
4376 *defines* the symbol at all (by simply using a char token, for
4377 example). $end is defined by Bison whereas any other token with token
4378 number 0 is defined by the user. The error token is always defined by
4379 Bison regardless of whether the user declares it with %token, but we
4380 may one day let the user define error as a nonterminal instead.
4381 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
4382 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
4383 the meaning of "user-defined".
4384 * tests/actions.at (Default %printer and %destructor for user-declared
4385 end token): Rename to...
4386 (Default %printer and %destructor for user-defined end token): ...
4387 this.
4388
4389 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
4390 computation of whether to apply the default, don't maintain a list of
4391 every Bison-defined symbol. Instead, just check for a first character
4392 of '$', which a user symbol cannot have, and check for the error token.
4393
9350499c
JD
43942006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
4395
4396 Don't apply the default %destructor or %printer to the error token,
4397 $undefined, or $accept. This change fits the general rule that the
4398 default %destructor and %printer are only for user-declared symbols,
4399 and it solves several difficulties that are described in the new test
4400 cases listed below.
4401 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
4402 * tests/actions.at (Default %printer and %destructor are not for error
4403 or $undefined, Default %printer and %destructor are not for $accept):
4404 New test cases.
4405
4d7370cb
JD
44062006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
4407
4408 Allow %start after the first rule.
4409 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
4410 when parsing the first rule.
4411 (check_and_convert_grammar): Search for it here after all grammar
4412 declarations have been parsed. Skip midrules, which have dummy LHS
4413 nonterminals.
4414 * src/symtab.c (symbol_is_dummy): New function.
4415 * src/symtab.h (symbol_is_dummy): Declare it.
4416 * tests/input.at (%start after first rule): New test.
4417
6d0ef4ec
JD
44182006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
4419
4420 Redo some of the previous commit: add back the ability to use
4421 non-aliased/undeclared string literals since it might be useful to
4422 those declaring %token-table.
4423 * src/reader.c (check_and_convert_grammar): Undo changes in previous
4424 commit: don't worry about complaints from symbols_pack.
4425 * src/symtab.c (symbol_new, symbol_class_set,
4426 symbol_check_alias_consistency): Undo changes in previous commit: count
4427 each string literal as a new symbol and token, assign it a symbol
4428 number, and don't complain about non-aliased string literals.
4429 (symbols_pack): Since symbol_make_alias still does not decrement symbol
4430 and token counts but does still set aliased tokens to the same number,
4431 symbol_pack_processor now leaves empty slots in the symbols array.
4432 Remove those slots.
4433 * tests/regression.at (Undeclared string literal): Remove test case
4434 added in previous commit since non-aliased string literals are allowed
4435 again.
4436 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
4437 remove unnecessary string literal declarations.
4438 * tests/sets.at (Firsts): Likewise.
4439
965537bc
JD
44402006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
4441
4442 Don't allow an undeclared string literal, but allow a string literal to
4443 be used before its declaration.
4444 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
4445 symbols_pack complained.
4446 * src/symtab.c (symbol_new): Don't count a string literal as a new
4447 symbol.
4448 (symbol_class_set): Don't count a string literal as a new token, and
4449 don't assign it a symbol number since symbol_make_alias does that.
4450 (symbol_make_alias): It's not necessary to decrement the symbol and
4451 token counts anymore. Don't assume that an alias declaration occurs
4452 before any uses of the identifier or string, and thus don't assert that
4453 one of them has the highest symbol number so far.
4454 (symbol_check_alias_consistency): Complain if there's a string literal
4455 that wasn't declared as an alias.
4456 (symbols_pack): Bail if symbol_check_alias_consistency failed since
4457 symbol_pack asserts that every token has been assigned a symbol number
4458 although undeclared string literals have not.
4459 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 4460 string literal): New test cases.
965537bc
JD
4461 (Characters Escapes, Web2c Actions): Declare string literals as
4462 aliases.
4463 * tests/sets.at (Firsts): Likewise.
4464
47aee066
JD
44652006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
4466
4467 In the grammar scanner, STRING_FINISH unclosed constructs and return
4468 them to the parser in order to improve error messages.
4469 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
4470 SC_BRACED_CODE, SC_PROLOGUE): Implement.
4471 * tests/input.at (Unclosed constructs): New test case.
4472 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
4473 seen.
4474
4475 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
4476 unused global.
4477
1f6b3679
JD
44782006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
4479
4480 Handle string aliases for character tokens correctly.
4481 * src/symtab.c (symbol_user_token_number_set): If the token has an
4482 alias, check and set its alias's user token number instead of its own,
4483 which is set to indicate the alias. Previously, every occurrence of
4484 the character token in the grammar overwrote that alias indicator with
4485 the character code.
4486 * tests/input.at (String aliases for character tokens): New test.
4487
219741d8
JD
44882006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
4489
4490 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
4491
11daa4e7
PE
44922006-08-11 Paul Eggert <eggert@cs.ucla.edu>
4493
4494 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
4495 to prevent failures when building on older platforms.
4496 Check for autopoint failure.
4497 Set XGETTEXT_OPTIONS to values that check for C format strings,
4498 so that translators are warned about them (this also helps
4499 prevent core dumps).
4500
4501 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
4502 function, since it simplifies our code a bit.
4503
4504 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
4505 rather than -W, so we don't get bogus warnings about sign comparisons.
4506 Add -Wpointer-arith, since that warning is useful (it reports code
4507 that does not conform to C89 and that some compilers reject).
4508 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
4509 since it's no longer needed.
4510
f9bfc42a
JD
45112006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
4512
4513 Clean up scanners a bit.
4514 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
4515 definitions so gcc won't warn when obstack_for_string is unused.
4516 * src/scan-code.l: config.h and system.h are already #include'd by
4517 scan-code-c.c, so get rid of them here.
4518 * src/scan-gram.l: Likewise.
4519 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
4520 definitions rather than duplicating the rest of it.
4521 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
4522
06e8700a
JD
45232006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
4524
4525 Suppress signed/unsigned comparison warnings for yycheck.
4526 * data/c.m4 (b4_safest_int_type): New macro.
4527 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
4528 a signed int type, cast it to b4_safest_int_type first.
4529 * data/yacc.c: Likewise.
4530 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
4531 also overwritten.
4532
9c437126
PE
45332006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
4534
4535 * doc/bison.texinfo: Fix some typos.
4536
284d8a13
PE
45372006-08-02 Paul Eggert <eggert@cs.ucla.edu>
4538
4539 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
4540 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
4541
4542 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
4543 the latest gnulib does this a different way.
4544 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
4545 translation was patched, so stop omitting it.
4546
ec5479ce
JD
45472006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
4548
4549 Enable declaration of default %printer/%destructor. Make the parser
4550 use these for all user-declared grammar symbols for which the user does
4551 not declare a specific %printer/%destructor. Thus, the parser uses it
4552 for token 0 if the user declares it but not if Bison generates it as
4553 $end. Discussed starting at
4554 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
4555 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
4556 and
4557 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
4558 * NEWS (2.3+): Mention.
4559 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
4560 declare a %destructor for a mid-rule's semantic value. It's just
4561 impossible to declare one specific to it.
4562 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
4563 code. Describe default %destructor form.
4564 * src/parse-gram.y (grammar_declaration): Parse default
4565 %printer/%destructor declarations.
4566 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
4567 and symbol_destructor_location_get rather than accessing the destructor
4568 and destructor_location members of struct symbol.
4569 (symbol_printers_output): Likewise but for %printer's.
4570 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
4571 again.
4572 * src/symtab.c (default_destructor, default_destructor_location,
4573 default_printer, default_printer_location): New static global
4574 variables to record the default %destructor and %printer.
4575 (symbol_destructor_get, symbol_destructor_location_get,
4576 symbol_printer_get, symbol_printer_location_get): New functions to
4577 compute the appropriate %destructor and %printer for a symbol.
4578 (default_destructor_set, default_printer_set): New functions to set the
4579 default %destructor and %printer.
4580 * src/symtab.h: Prototype all those new functions.
4581 * tests/actions.at (Default %printer and %destructor): New test to
4582 check that the right %printer and %destructor are called, that they're
4583 not called for $end, and that $$ and @$ work correctly.
4584 (Default %printer and %destructor for user-declared end token): New
4585 test to check that the default %printer and %destructor are called for
4586 a user-declared end token.
4587 * tests/input.at (Default %printer and %destructor redeclared, Unused
4588 values with default %destructor): New tests to check related grammar
4589 warnings and errors.
4590
868d2d96
JD
45912006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
4592
4593 Clean up handling of %destructor for the end token (token 0).
4594 Discussed starting at
4595 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
4596 and
4597 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
4598
4599 Make the skeletons consistent in how they pop the end token and invoke
4600 its %destructor.
4601 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
4602 state, which has token number 0, since this would invoke the
4603 %destructor for the end token.
4604 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
4605 until after shifting the end token, or else it won't be popped.
4606 * data/yacc.c (yyparse): Likewise.
4607
4608 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
4609 it's the end token. Upon termination, destroy an unshifted lookahead
4610 even when it's the end token.
4611 * data/lalr1.cc (yy::parser::parse): Likewise.
4612 * data/yacc.c (yyparse): Likewise.
4613
4614 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
4615 value warnings for the end token when the user gives the end token a
4616 %destructor.
4617
4618 * tests/actions.at (Printers and Destructors): Test all the above.
4619
62a9592d
PE
46202006-07-24 Paul Eggert <eggert@cs.ucla.edu>
4621
4622 Update to latest gnulib and gettext versions.
4623 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
4624 Add fopen-safer.
4625 (gnulib_files): Add m4/warning.m4. Don't worry about files
4626 overwritten by autopoint.
4627 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
4628 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
4629 rejects them.
4630 Don't use autoreconf; instead, invoke autopoint etc. by hand,
4631 so that we can remove the intl files at a better time.
4632 (intl_files_to_remove): Remove aclocal.m4, since it gets
4633 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
4634 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
4635 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
4636 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
4637 Remove datarootdir hack; no longer needed.
4638 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
4639 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
4640 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
4641 strdup.h.
4642 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
4643 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
4644
10d6970f
PE
46452006-07-20 Paul Eggert <eggert@cs.ucla.edu>
4646
4647 * bootstrap: Adjust to today's change to gnulib-tool by invoking
4648 it with --assume-autoconf='latest-stable'.
4649
50a33993
JD
46502006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
4651
4652 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
4653 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
4654 YYSTYPE' and `{'.
4655 * src/muscle_tab.h (muscle_grow): Replace the header comments with
4656 those from muscle_tab.c since the old ones are misleading.
4657
2ce4ed68
AD
46582006-07-13 Akim Demaille <akim@epita.fr>
4659
4660 Support %define "KEY" {VALUE}.
4661 * src/scan-code.h, src/scan-code.l (translate_action)
4662 (translate_rule_action, translate_symbol_action, translate_code):
4663 Return char *, not const char *.
4664 * src/parse-gram.y (declaration): Rename as...
4665 (prologue_declaration): this.
4666 (string_content): Remove this nonterminal, use STRING.
4667 (braceless, content, content.opt): New nonterminal.
4668 Use them.
4669 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
4670 as value.
4671 * src/scan-gram.l (getargs.h): Don't include it.
4672
db7e5eb5
PE
46732006-07-12 Paul Eggert <eggert@cs.ucla.edu>
4674
4675 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
4676 rather than a for-loop that declares a local bool variable. This
4677 should work around a compatibility problem with a Cray x1e C++
4678 compiler reported by Hung Nguyen in
4679 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
4680 The for-loop was introduced in the 2004-11-17 change but I don't
4681 know why it was needed.
4682
a5d80ba5
AD
46832006-07-12 Akim Demaille <akim@epita.fr>
4684
4685 * data/c.m4: Comment changes.
4686
23eb2a69
AD
46872006-07-10 Akim Demaille <akim@lrde.epita.fr>
4688
4689 * src/complain.c (error_message, ERROR_MESSAGE): New.
4690 To factor...
4691 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
4692 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
4693
ddc8ede1
PE
46942006-07-09 Paul Eggert <eggert@cs.ucla.edu>
4695
4696 * NEWS: Instead of %union, you can define and use your own union type
4697 YYSTYPE if your grammar contains at least one <type> tag.
4698 Your YYSTYPE need not be a macro; it can be a typedef.
4699 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
4700 (Union Decl, Decl Summary): Document this.
4701 * data/glr.c (YYSTYPE): Implement this.
4702 * data/glr.cc (YYSTYPE): Likewise.
4703 * data/lalr1.cc (YYSTYPE): Likewise.
4704 * data/yacc.c (YYSTYPE): Likewise.
4705 * src/output.c (prepare): Output tag_seen_flag.
4706 * src/parse-gram.y (declaration, grammar_declaration):
4707 Use 'union_seen' rather than 'typed' to determine whether
4708 %union has been seen, since grammars can now be typed without
4709 %union.
4710 (symbol_declaration, type.opt, symbol_def):
4711 Keep track of whether a tag has been seen.
4712 * src/reader.c (union_seen, tag_seen): New vars.
4713 (typed): remove.
4714 * src/reader.h (union_seen, tag_seen, typed): Likewise.
4715 * src/scan-code.l (untyped_var_seen): New variable.
4716 (handle_action_dollar): Adjust to above changes.
4717 (handle_action_dollar, handle_action_at):
4718 Improve overflow checking for outlandish numbers.
4719 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
4720 avoid new diagnostics generated by above changes.
4721 * tests/regression.at (YYSTYPE typedef): Add test to check
4722 for type tags without %union.
4723
4724 * src/symlist.c (symbol_list_length): Return int, not unsigned
4725 int, since callers expect int. This may need to get revisited
4726 once we have proper integer overflow checking.
4727
4728 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
4729 object is now static.
4730
4731 * src/getargs.c (flags_argmatch): Return void, not int,
4732 to pacify ./configure --enable-gcc-warnings.
4733
4734 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
4735 since last_string is already defined to FLEX_PREFIX (last_string).
4736
7b42569e
AD
47372006-07-09 Akim Demaille <akim@lrde.epita.fr>
4738
4739 Implement --warnings/-W.
4740 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
4741 replaced by...
4742 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
4743 Adjust callers.
4744 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
4745 (warnings_args, warnings_types): New.
4746 (getargs, short_options, long_options): Accept -W/--warnings.
4747 Sort the options by alphabetical order, upper case letter right
4748 before its lower case.
4749
3b452f4e
JD
47502006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4751
4752 Change %merge result type clash warnings to errors. Discussed at
4753 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
4754 * src/reader.c (record_merge_function_type): Use complain_at.
4755 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4756 declared later): Update test case results.
4757
b8a41559
AD
47582006-07-09 Akim Demaille <akim@lrde.epita.fr>
4759
4760 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
4761 to be in alphabetical order.
4762 (trace_args): Spelling fixes.
4763
cd9e1ba2
PE
47642006-07-09 Paul Eggert <eggert@cs.ucla.edu>
4765
4766 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
4767 so they don't collide with user-defined macros.
4768 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
4769 this was never guaranteed, and now that we're using gnulib stdint,
4770 which defines int_fast16_t to long int, the problem is exposed.
4771
cb48f191
PE
47722006-07-08 Paul Eggert <eggert@cs.ucla.edu>
4773
b8445a15
PE
4774 * data/c.m4 (b4_basename): Simplify a bit, since we don't
4775 need the full POSIX semantics (and weren't implementing them
4776 anyway).
4777
cb48f191
PE
4778 Adjust to Autoconf 2.60 and today's gnulib.
4779 * bootstrap (gnulib_modules): Add stdint.
4780 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
4781 no longer copies it.
4782 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
4783 since stdint needs the former and wcwidth (which is now required
4784 by mbswidth) needs the latter.
4785 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
4786 work around a compatibility glitch between gettext 0.14.6 and
4787 Autoconf 2.60.
4788 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
4789 Do not check for uintptr_t, since new stdint module does the right
4790 thing.
4791 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
4792 Add stdint.h, stdint_.h, wcwidth.h.
4793 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
4794 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
4795 stdint.m4, wchar_t.m4, wcwidth.m4.
4796 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
4797 usual order for ../lib/*.h files.
4798 (file_name_split): Use last_component, not base_name, to adjust
4799 to gnulib changes.
4800 * src/parse-gram.h: Include <strverscmp.h> in the usual order
4801 for ../lib/*.h files.
4802 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
4803 Define unconditionally, since we now assume the stdint module.
4804 * src/scan-skel.l: Include <dirname.h>.
4805 (BASE_QPUTS): Use last_component, not base_name.
4806 * src/system.h: Include <unlocked-io.h> in the usual order
4807 for ../lib/*.h files. Include <stdint.h> unconditionally,
4808 since we now use the stdint module.
4809 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
4810 HAVE_UINTPTR_T, since we now use the stdint module.
4811 (base_name): Remove decl, since files now include <dirname.h>
4812 to get the decl.
4813
cd48d21d
AD
48142006-07-08 Akim Demaille <akim@lrde.epita.fr>
4815
4816 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
4817 New, default to 1.
4818 * data/yacc.c, data/glr.c, data/location.cc: Use them.
4819 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
4820 default.
4821 * tests/calc.at: Adjust.
4822
8ec0a172
AD
48232006-07-08 Akim Demaille <akim@lrde.epita.fr>
4824
b8445a15 4825 * data/c.m4 (b4_basename): New.
8ec0a172
AD
4826 (b4_syncline): Also output the location of its invocation (from
4827 the skeleton).
4828 (b4_user_action, b4_define_user_action, b4_user_actions)
4829 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
4830 (b4_user_stype): New.
4831 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
4832
4a678af8
JD
48332006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
4834
4835 In the grammar file, the first column is 1 not 0 on the first line as
4836 on every other line.
4837 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
4838 * tests/input.at (Torturing the Scanner): Update output.
4839
4840 * src/scan-gram.l (scanner_cursor): Declare it static.
4841
dd60572a
JD
48422006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
4843
4844 In warnings, say "previous declaration" rather than "first
4845 declaration".
4846 * src/symtab.c (redeclaration): Do that here.
4847 * src/reader.c (record_merge_function_type): In the case of a result
4848 type clash, report the previous declaration rather than the very first
4849 one in the grammar file.
4850 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4851 declared later): Add a third declaration to check this behavior.
4852 * tests/input.at (Incompatible Aliases): Update output.
4853
2073e1b6
AD
48542006-06-27 Akim Demaille <akim@epita.fr>
4855
4856 * doc/Doxyfile.in: New.
4857 * doc/Makefile.am: Use it.
4858 * src/lalr.h, src/symtab.h: Initial doxygenation.
4859
8ee5b538
JD
48602006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4861
4862 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
4863 declared after the %merge. This continues the effort of the previous
4864 patch.
8ee5b538
JD
4865 * src/reader.c (get_merge_function): Don't set the merger type yet.
4866 (record_merge_function_type): New function for setting the merger type
4867 and checking for clashes.
4868 (grammar_current_rule_merge_set): Set the location of the %merge for
4869 the current rule.
4870 (packgram): Invoke record_merge_function_type for each rule now that
4871 all symbol type declarations have been parsed.
4872 * src/reader.h (merger_list.type_declaration_location): New member
4873 storing the location of the first %merge from which the type for this
4874 merging function was derived.
4875 * src/symlist.h (symbol_list.merger_declaration_location): New member
4876 storing the location of a rule's %merge, if any.
4877 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4878 declared later): New test to catch the error fixed by the above patch.
4879
ffa4ba3a
JD
48802006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4881
4882 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
4883 declarations appear after the rules. Discussed at
4884 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
4885 and
4886 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
4887 Don't mistake the type of $$ in a midrule to be that of its parent
4888 rule's $$.
ffa4ba3a
JD
4889 * src/reader.c (grammar_current_rule_end): Don't invoke
4890 grammar_rule_check yet since not all symbol declarations may have been
4891 parsed yet.
4892 (grammar_midrule_action): Likewise.
4893 Don't record whether the midrule's $$ has been used yet since actions
4894 haven't been translated yet.
4895 Record the midrule's parent rule and its RHS index within the parent
4896 rule.
4897 (grammar_current_rule_action_append): Don't translate the action yet
4898 since not all symbol declarations may have been parsed yet and, thus,
4899 warnings about types for $$, $n, @$, and @n can't be reported yet.
4900 (packgram): Translate the action and invoke grammar_rule_check now that
4901 all symbol declarations have been parsed.
4902 * src/scan-code.l (handle_action_dollar): Now that this is invoked
4903 after parsing the entire grammar file, the symbol list here in the case
4904 of a midrule is actually the midrule's empty RHS, so reference its
4905 parent rule's RHS where necessary.
4906 On the other hand, now that you can already know it's a midrule, you
4907 aren't forced to think $$ has the same type as its parent rule's $$.
4908 (handle_action_at): In the case of a midrule, reference the parent rule
4909 where necessary.
4910 * src/symlist.c (symbol_list_new): Initialize new midrule-related
4911 members.
4912 (symbol_list_length): Now that this is invoked after all rules have
4913 been parsed, a NULL symbol (rather than a NULL symbol list node)
4914 terminates a rule. symbol_list_print already does this correctly.
4915 * src/symlist.h (symbol_list.midrule_parent_rule,
4916 symbol_list.midrule_parent_rhs_index): New members so that midrules can
4917 remember their relationships with their parents.
4918 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
4919 fixed by the above patch.
4920 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
4921 implementing...
4922 (Unused values): ... this old test case and...
4923 (Unused values before symbol declarations): ... this new test case.
4924 This one is the same as `Unused values' except that all symbol
4925 declarations appear after the rules in order to catch the rest of the
4926 errors fixed by the above patch.
4927
e256e17f
JD
49282006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4929
300a1930
JD
4930 More cleanup.
4931 * src/reader.c (current_rule): Declare it static since it's no longer
4932 used outside this file.
4933 (grammar_current_rule_action_append): Remove redundant arguments from
4934 translate_rule_action invocation.
4935 * src/reader.h (current_rule): Remove this unused extern.
4936 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
4937 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 4938
381ecb06
JD
49392006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
4940
4941 Clean up yesterday's patch.
4942 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
4943 to...
4944 * src/reader.c (grammar_current_rule_action_append): ... here for
4945 consistency with grammar_current_rule_symbol_append.
4946 * tests/regression.at (Braced code in declaration in rules section):
4947 Make yyerror and yylex static as usual.
4948
4210cd0b
JD
49492006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
4950
4951 Fix bug that mistakes braced code in a declaration in the rules section
4952 to be a rule action. Mentioned at
4953 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
4954 * src/scan-gram.l: Move midrule action detection from the start of the
4955 scanning of any braced code to...
4956 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
4957 action. For readability, use $2 and @2 rather than the equivalent
4958 global variables.
4959 * tests/regression.at (Braced code in declaration in rules section):
4960 New test to catch the error fixed by the above patch.
4961
4962 Work on code readability some.
4963 * src/scan-code.l (current_rule): Get rid of this misleading and
4964 redundant declaration: it's actually extern'ed in reader.h.
4965 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
4966 translate_action): Add a rule argument and use it instead of the global
4967 current_rule.
4968 (translate_rule_action): This already receives current_rule through an
4969 argument, so pass it on to translate_action instead of assigning
4970 current_rule to current_rule.
4971 (translate_symbol_action, translate_code): Pass rule = NULL to
4972 translate_action.
4973
34f98f46
JD
49742006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
4975
4976 Rename %before-definitions to %start-header and %after-definitions to
4977 %end-header. Don't use these declarations to separate pre-prologue
4978 blocks from post-prologue blocks. Add new order-independent
4979 declarations %before-header and %after-header as alternatives to the
4980 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
4981 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
4982 * NEWS (2.3+): Update for these changes.
4983 * data/glr.c (b4_before_definitions): Update to...
4984 (b4_start_header): ... this.
4985 (b4_after_definitions): Update to...
4986 (b4_end_header): ... this.
4987 * data/glr.cc: Likewise.
4988 * data/lalr1.cc: Likewise.
4989 * data/yacc.c: Likewise.
4990 * doc/bison.texinfo (The prologue): Update names, and replace remaining
4991 prologue blocks with %*-header declarations.
4992 (Calc++ Parser): Likewise.
91661ebb 4993 (Decl Summary): Update names.
148d66d8 4994 (Table of Symbols): Update description.
34f98f46
JD
4995 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
4996 (PERCENT_END_HEADER): ... this.
4997 (PERCENT_BEFORE_DEFINITIONS): Update to...
4998 (PERCENT_START_HEADER): ... this.
4999 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
5000 (declaration): Update token names and m4 macro names.
5001 When parsing %end-header and %start-header, invoke translate_code
5002 before muscle_code_grow, and no longer set global booleans to remember
5003 whether these declarations have been seen.
5004 Parse new %after-header and %before-header.
5005 * src/reader.c (before_definitions, after_definitions): Remove.
5006 (prologue_augment): Accept a new bool argument to specify whether to
5007 augment the pre-prologue or post-prologue.
5008 * src/reader.h (before_definitions, after_definitions): Remove these
5009 extern's.
5010 (prologue_augment): Add new bool argument.
5011 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
5012 (PERCENT_END_HEADER): ... this.
5013 (PERCENT_BEFORE_DEFINITIONS): Update to...
5014 (PERCENT_START_HEADER): ... this.
5015 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
5016 * tests/actions.at (Printers and Destructors): Update names.
5017
31b2b07e
JD
50182006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
5019
5020 Add comparison operators for C++ location classes. Discussed at
5021 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
5022 * data/c++.m4 (b4_define_location_comparison): New boolean %define
5023 declaration indicating whether filename_type has an operator==. If
5024 filename_type is `std::string', it defaults to `1', `0' otherwise.
5025 * data/location.cc: Iff b4_define_location_comparison is `1', add
5026 operator== and operator!= for class position and for class location.
5027
5028 Some minor fixes.
5029 * src/scan-action.l: Remove unused file.
5030 * src/symtab.c (symbol_printer_set): Use printer_location not
5031 destructor_location.
5032 * src/symtab.h (struct symbol): Replace incorrect source comment for
5033 printer members.
5034 * tests/input.at (Incompatible Aliases): Update output with correct
5035 printer location.
5036
9bc0dd67
JD
50372006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
5038
5039 Don't put the pre-prologue in the header file. For the yacc.c code
5040 file and the glr.c header and code files, move the pre-prologue before
5041 the token definitions. Add new %before-definitions and
5042 %after-definitions to declare code that will go in both the header file
5043 and code file. Discussed at
5044 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
5045 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
5046 and
5047 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
5048 * NEWS (2.3+): Describe these changes.
5049 * data/glr.c (b4_pre_prologue): Move from within to before...
5050 (b4_shared_declarations): ... this.
5051 Add new b4_before_definitions before b4_token_enums.
5052 Add new b4_after_definitions at the end.
5053 * data/glr.cc (b4_pre_prologue): Replace with...
5054 (b4_before_definitions): ... this in the header file.
5055 (b4_after_definitions): New near the end of the header file.
5056 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
5057 code file right before including the header file.
5058 (b4_before_definitions): New in the previous position of
5059 b4_pre_prologue in the header file.
5060 (b4_after_definitions): New near the end of the header file.
5061 * data/yacc.c: Clean up some m4 quoting especially in the header file.
5062 (b4_token_enums_defines): In the code file, move to right before
5063 YYSTYPE for consistency with the header file.
5064 (b4_before_definitions): New right before b4_token_enums_defines in
5065 both the header and code file.
5066 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
5067 header and code file.
5068 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
5069 of prologues for %union dependencies.
91661ebb
JD
5070 (Decl Summary): In %defines description, mention the effect of
5071 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
5072 (Calc++ Parser): Forward declare driver in a %before-definitions rather
5073 than in the pre-prologue so that make check succeeds.
148d66d8 5074 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
5075 %after-definitions.
5076 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
5077 %before-definitions.
5078 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
5079 (declaration): Parse those declarations and append to
5080 b4_before_definitions and b4_after_definitions, respectively.
5081 * src/reader.c (before_definitions, after_definitions): New bools to
5082 track whether those declarations have been seen.
5083 (prologue_augment): Add to the post-prologue if %union,
5084 %before-definitions, or %after-definitions has been seen.
5085 * src/reader.h (before_definitions, after_definitions): New extern's.
5086 * src/scan-gram.l: Scan the new declarations.
5087 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
5088 prologue block in a %before-definitions or a %after-definitions based
5089 on whether the %union is declared.
5090 * tests/regression.at (Early token definitions with --yacc, Early token
5091 definitions without --yacc): Move tests for token definitions into the
5092 post-prologue since token names are no longer defined in the
5093 pre-prologue.
5094
203b9274
AD
50952006-06-20 Akim Demaille <akim@epita.fr>
5096
5097 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
5098 (symbol_get): Use it.
5099 * src/parse-gram.y: Use it.
5100
a7ee59cf
JD
51012006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
5102
5103 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
5104 build succeeds when configured with --enable-gcc-warnings.
5105
5a2baae7
PE
51062006-06-19 Paul Eggert <eggert@cs.ucla.edu>
5107
33ad1a9c
PE
5108 * src/parse-gram.y (char_name): New function.
5109 (CHAR, STRING, string_content): For %printer, properly escape.
5110 (ID): Prefer fputs to fprintf.
5111 (id): Reindent to be consistent with other rules.
5112 Properly quote char.
5113
5a2baae7
PE
5114 The Translation Project changed its way of publishing translations
5115 to maintainers. I haven't received any responses to my request
5116 for supporting the old way, or for documenting the new way. I
5117 have modified 'bootstrap' to use screen scraping
5118 (in this case, HTML scraping). This is unreliable and inelegant,
5119 but I don't see any better way. Yuck.
5120 * bootstrap (TP_URL, WGET_COMMAND): New vars.
5121 (get_translations): New function, which uses HTML scraping to
5122 deduce locations of latest translations.
5123 Use this function to grab both bison and bison-runtime .po files.
5124 Don't bother priming the pump for the runtime-po domain any more,
5125 as it's now translated better than bison is.
5126
58d7a1a1
AD
51272006-06-19 Akim Demaille <akim@epita.fr>
5128
5129 * src/scan-gram.l: No longer "parse" things after `%union' until
5130 `{'. Rather, return a single "%union" token.
5131 No longer make symbols: return strings, and leave the conversion
5132 to symbols to the parser.
5133 (SC_PRE_CODE, token_type): Remove.
5134 * src/parse-gram.y (%union): New field `character'.
5135 Sort tokens.
5136 (CHAR): New token.
5137 (ID, ID_COLON): Now that the scanner no longer makes them
5138 identifiers, adjust all uses to invoke symbol_get.
5139 (id_colon): New, wraps the conversion from string to symbol.
5140 (%union): Accept a possible union_name.
5141 (symbol): Now can be a char.
5142 * data/c.m4 (b4_union_name): Leave a default value.
5143 * data/glr.c, data/yacc.c: Use it.
5144
b931235e
JD
51452006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
5146
5147 For associating token numbers with token names for "yacc.c", don't use
5148 #define statements unless `--yacc' is specified; always use enum
5149 yytokentype. Most important discussions start at:
5150 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
5151 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
5152 and
5153 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
5154 * NEWS (2.3+): Mention.
5155 * data/c.m4 (b4_yacc_if): New.
5156 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
5157 token #define's.
5158 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
5159 on token name definitions.
5160 * src/getargs.c (usage): Capitalize `Yacc' in English.
5161 * src/output.c (prepare): Define b4_yacc_flag.
5162 * tests/regression.at (Early token definitions): Test that tokens names
5163 are defined before the pre-prologue not just before the post-prologue.
5164 Remove this test case and copy to...
5165 (Early token definitions with --yacc): ... this to test #define's.
5166 (Early token definitions without --yacc): ... and this to test enums.
5167
9e6e7ed2
PE
51682006-06-11 Paul Eggert <eggert@cs.ucla.edu>
5169
5170 * NEWS: Reword the post-2.3 change to not be so optimistic about
5171 removing the old "look-ahead" spelling.
5172 Update previous look-ahead/lookahead change reports.
5173 * REFERENCES: look-ahead -> lookahead (since that's
5174 what he actually wrote).
5175 * doc/refcard.tex: look ahead -> lookahead,
5176 look-ahead -> lookahead
5177
742e4900
JD
51782006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
5179
5180 For consistency, use `lookahead' instead of `look-ahead' or
5181 `look_ahead'. Discussed starting at
5182 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
5183 and then at
5184 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
5185 * NEWS: For the next release, note the change to `--report'.
5186 * TODO, doc/bison.1: Update English.
5187 * doc/bison.texinfo: Update English.
5188 (Understanding Your Parser, Bison Options): Document as
5189 `--report=lookahead' rather than `--report=look-ahead'.
5190 * src/conflicts.c: Update English in comments.
5191 (lookahead_set): Rename from look_ahead_set.
5192 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
5193 (resolve_sr_conflict): Rename local look_ahead_tokens to
5194 lookahead_tokens, and update other uses.
5195 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
5196 count_rr_conflicts, conflicts_free): Update uses.
5197 * src/getargs.c (report_args): Move "lookahead" before alternate
5198 spellings.
5199 (report_types): Update uses.
5200 (usage): For `--report' usage description, state `lookahead' spelling
5201 rather than `look-ahead'.
5202 * src/getargs.h (report.report_lookahead_tokens): Rename from
5203 report_look_ahead_tokens.
5204 * src/lalr.c: Update English in comments.
5205 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
5206 (state_lookahead_tokens_count): Rename from
5207 state_look_ahead_tokens_count.
5208 Rename local n_look_ahead_tokens to n_lookahead_tokens.
5209 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
5210 Rename local n_look_ahead_tokens to n_lookahead_tokens.
5211 Update other uses.
5212 Update English in output.
5213 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
5214 * src/print.c: Update English in comments.
5215 (lookahead_set): Rename from look_ahead_set.
5216 (print_reduction): Rename argument lookahead_token from
5217 look_ahead_token.
5218 (print_core, state_default_rule, print_reductions, print_results):
5219 Update uses.
5220 * src/print_graph.c: Update English in comments.
5221 (print_core): Update uses.
5222 * src/state.c: Update English in comments.
5223 (reductions_new): Update uses.
5224 (state_rule_lookahead_tokens_print): Rename from
5225 state_rule_look_ahead_tokens_print, and update other uses.
5226 * src/state.h: Update English in comments.
5227 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
5228 (state_rule_lookahead_tokens_print): Rename from
5229 state_rule_look_ahead_tokens_print.
5230 * src/tables.c: Update English in comments.
5231 (conflict_row, action_row): Update uses.
5232 * tests/glr-regression.at
5233 (Incorrect lookahead during deterministic GLR,
5234 Incorrect lookahead during nondeterministic GLR): Rename
5235 print_look_ahead to print_lookahead.
5236 * tests/torture.at: Update English in comments.
5237 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
5238 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
5239 (Many lookahead tokens): Update uses.
5240 * data/glr.c: Update English in comments.
5241 * lalr1.cc: Likewise.
5242 * yacc.c: Likewise.
5243 * src/conflicts.h: Likewise.
5244 * src/lalr.h: Likewise.
5245 * src/main.c: Likewise.
5246 * src/output.c: Likewise.
5247 * src/parse-gram.c: Likewise.
5248 * src/tables.h: Likewise.
5249 * tests/calc.at: Likewise.
5250
3c40d0b5
JD
52512006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
5252
5253 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
5254
5d278082
PE
52552006-06-07 Paul Eggert <eggert@cs.ucla.edu>
5256
5257 * TODO: Add request from Nelson H. F. Beebe to be able to install
5258 Bison without installing the yacc script.
5259
9e668899
JD
52602006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
5261
5262 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
5263 and yytext if they're already #define'd.
5264 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
5265 * src/scan-code-c.c: ... here.
5266 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
5267 <config.h>.
5268
0c8e079f
JD
52692006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
5270
5271 Get Bison to build again when configured with --enable-gcc-warnings.
5272 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
5273 missing #include's.
5274 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
5275 loc argument as it shadows a global.
5276 * src/scan-gram.l: Remove stray comma that prevents boundary_set
5277 invocation.
5278
5279 * src/.cvsignore: Add scan-code.c.
5280
2346344a
AD
52812006-06-07 Akim Demaille <akim@epita.fr>
5282
5283 * src/scan-gram.l: Move the "add a trailing ; to actions" code
5284 to...
5285 * src/scan-code.l: here.
5286 * tests/input.at (Torturing the Scanner): Fix another location
5287 error.
5288
4862bdfd
AD
52892006-06-07 Akim Demaille <akim@epita.fr>
5290
5291 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
5292
e9071366
AD
52932006-06-06 Akim Demaille <akim@epita.fr>
5294
5295 Extract the parsing of user actions from the grammar scanner.
5296 As a consequence, the relation between the grammar scanner and
5297 parser is much simpler. We can also split "composite tokens" back
5298 into simple tokens.
5299 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
5300 * src/scan-gram.l (add_column_width, adjust_location): Move to and
5301 rename as...
5302 * src/location.h, src/location.c (add_column_width)
5303 (location_compute): these.
5304 Fix the column count: the initial column is 0.
5305 (location_print): Be robust to ending column being 0.
5306 * src/location.h (boundary_set): New.
5307 * src/main.c: Adjust to scanner_free being renamed as
5308 gram_scanner_free.
5309 * src/output.c: Include scan-code.h.
5310 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
5311 Use boundary_set.
5312 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
5313 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
5314 which is now, again, a separate token.
5315 Adjust all dependencies.
5316 Whereever actions with $ and @ are used, use translate_code.
5317 (action): Remove this nonterminal which is now useless.
5318 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
5319 (grammar_current_rule_action_append): Use translate_code.
5320 (packgram): Bound check ruleno, itemno, and rule_length.
5321 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
5322 (last_string, last_braced_code_loc, max_left_semantic_context)
5323 (scanner_initialize, scanner_free, scanner_last_string_free)
5324 (gram_out, gram_lineno, YY_DECL_): Move to...
5325 * src/scan-gram.h: this new file.
5326 (YY_DECL): Rename as...
5327 (GRAM_DECL): this.
5328 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
5329 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
5330 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
5331 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
5332 Move these declarations, and...
5333 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
5334 these to...
5335 * src/flex-scanner.h: this new file.
5336 * src/scan-gram.l (rule_length, rule_length_overflow)
5337 (increment_rule_length): Remove.
5338 (last_braced_code_loc): Rename as...
5339 (gram_last_braced_code_loc): this.
5340 Adjust to the changes of the parser.
5341 Move all the handling of $ and @ into...
5342 * src/scan-code.l: here.
5343 * src/scan-gram.l (handle_dollar, handle_at): Remove.
5344 (handle_action_dollar, handle_action_at): Move to...
5345 * src/scan-code.l: here.
5346 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
5347 scan-code.h, scan-code-c.c, scan-gram.h.
5348 (EXTRA_bison_SOURCES): Add scan-code.l.
5349 (BUILT_SOURCES): Add scan-code.c.
5350 (yacc): Be robust to white spaces.
5351
5352 * tests/conflicts.at, tests/input.at, tests/reduce.at,
5353 * tests/regression.at: Adjust the column numbers.
5354 * tests/regression.at: Adjust the error message.
7891a7c4 5355
184e42f0
JD
53562006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
5357
5358 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
5359 Use Akim's wording from
5360 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
5361
7891a7c4
JD
53622006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
5363
5364 Between Bison releases, manually append `+' to the previous Bison
5365 release number, and use that as a signal to automatically print the
5366 ChangeLog's CVS Id keyword from --version. Discussed starting at
5367 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
5368 * ChangeLog: Add Id header.
5369 * configure.ac (AC_INIT): Append `+' to `2.3'.
5370 * src/.cvsignore: Add revision.c.
5371 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
5372 (BUILT_SOURCES): Add revision.c.
5373 (revision.c): New target rule. This file defines a new global variable
5374 named revision. It initializes it with either the Id from ChangeLog
5375 or, if VERSION doesn't contain `+', with the empty string.
5376 * src/getargs.c (version): Print the value of revision.
5377 * src/revision.h: Extern revision.
5378
4ad3ed84
PE
53792006-06-05 Paul Eggert <eggert@cs.ucla.edu>
5380
5381 * NEWS: Version 2.3.
5382 * configure.ac (AC_INIT): Likewise.
5383
02103984
PE
53842006-05-30 Paul Eggert <eggert@cs.ucla.edu>
5385
5386 * data/glr.c (YYRECOVERING): Define to be a function-like macro
5387 with no arguments, not as an object-like macro. This is for
5388 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
5389 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
5390 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
5391 Document this.
5392
2c08afa5
JD
53932006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
5394
5395 * src/getargs.c (usage): Back out yesterday's modification of the
5396 --help output so that we don't have to wait for translation before
5397 releasing 2.3.
5398
6077da58
PE
53992006-05-29 Paul Eggert <eggert@cs.ucla.edu>
5400
5401 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
5402 Problem reported by Akim Demaille.
5403
2a26b6c2
JD
54042006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
5405
5406 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
5407
aefef0d6
PE
54082006-05-26 Paul Eggert <eggert@cs.ucla.edu>
5409
5410 * data/yacc.c (yy_reduce_print): Omit trailing white space in
5411 generated source code. Problem reported by Frans Englich in
5412 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
5413
fcd8e201
PE
54142006-05-22 Paul Eggert <eggert@cs.ucla.edu>
5415
5416 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
5417 shell, not within 'make', so that 'make' by an ordinary builder
5418 (using GNU make) does not worry about configuring gzip. This also
5419 works around a bug reported independently by Keith Thompson and by
5420 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
5421 stderr rather than stdout, messing up the build logs.
5422
7b5cdcbd
JD
54232006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
5424
5425 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
5426 to make sure that YYID will never be unused. This fixes a 'make
5427 maintainer-check' failure caused by the recent changes to the 'Trivial
5428 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
5429 not used.
5430 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
5431
5ad0a449
JD
54322006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
5433
5434 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
5435 state before an empty RHS is always resolved here. Only the location
5436 of that state is guaranteed to be resolved, and that's enough. This
5437 fixes the remaining bug reported by Derek M. Jones in
5438 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
5439 * tests/glr-regression.at (Uninitialized location when reporting
5440 ambiguity): Test the above case.
5441 Also, the embedded comments in this test case claim it checks the case
5442 of an empty RHS that has inherited the initial location. However, the
5443 corresponding LHS was already resolved, so yyresolveLocations didn't
5444 actually have reason to modify it. Fix this by forcing
5445 nondeterministic operation at the beginning of the parse.
5446
50cce58e
PE
54472006-05-20 Paul Eggert <eggert@cs.ucla.edu>
5448
5449 * data/c.m4 (b4_yy_symbol_print_generate):
5450 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
5451 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
5452 of the bugs reported today by Derek M Jones in
5453 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
5454 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
5455 defined to be a type name without parens or brackets.
5456 (Location Type): Similarly for YYLTYPE.
5457 * tests/regression.at (Trivial grammars): Put in a test for this
5458 bug that will be caught by 'make maintainer-check' (though not,
5459 alas, by 'make check' unless your compiler is picky).
5460
ab8d9dc5
PE
54612006-05-19 Paul Eggert <eggert@cs.ucla.edu>
5462
0d2c8934 5463 * NEWS: Version 2.2.
ab8d9dc5
PE
5464 * configure.ac (AC_INIT): Likewise.
5465
9138c575
JD
54662006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
5467
5468 * data/glr.c (yyreportTree): Make room in yystates for the state
5469 preceding the RHS. This fixes the segmentation fault reported by Derek
5470 M. Jones in
5471 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
5472 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
5473 to the user. Reported for yyreportTree by Derek M. Jones later in the
5474 same thread.
5475 * THANKS: Add Derek M. Jones.
5476 Update my email address.
5477 Fix typo in Steve Murphy's name.
5478
276f48df
PE
54792006-05-14 Paul Eggert <eggert@cs.ucla.edu>
5480
d6645148
PE
5481 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
5482 checking against YYLAST that caused the parser to miss a potential
5483 alternative in its diagnostic.
5484 Problem reported by Maria Jose Moron Fernandez in
5485 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
5486 * data/lalr1.cc (yysyntax_error_): Likewise.
5487 * data/yacc.c (yysyntax_error): Likewise.
5488 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
5489 tokens, in case we run into an older C compiler.
5490 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
5491 Use them to check for the off-by-one error fixed above.
5492
276f48df
PE
5493 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
5494 YYSIZE_T, not size_t.
5495 * tests/regression.at (Trivial grammars): New test, to catch
5496 the error fixed by the above patch.
5497
cd8b5791
AD
54982006-05-14 Akim Demaille <akim@lrde.epita.fr>
5499
5500 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
5501 scheme.
5502 Reported by Steve Murphy.
5503
34376418
AD
55042006-05-14 Akim Demaille <akim@lrde.epita.fr>
5505
5506 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
5507 * data/glr.cc: b4_location_flag is now b4_locations_flag.
5508
327afc7c
AD
55092006-05-14 Akim Demaille <akim@lrde.epita.fr>
5510
5511 Implement --trace=m4.
5512 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
5513 * src/output.c (output_skeleton): When set, pass -dV to m4.
5514
5515 Factor the handling of flags in m4.
5516 * src/output.c (prepare): Rename the muscle names debug, defines,
5517 error_verbose to debug_flag, defines_flag, error_verbose_flag.
5518 * data/c.m4: Adjust.
5519 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
5520 Use b4_define_flag_if to define other b4_FLAG_if macros.
5521 (b4_location_if): As a consequence, rename as...
5522 (b4_locations_if): this, for consistency.
5523 Adjust all the skeletons.
5524
ba9ecd19
AD
55252006-05-14 Akim Demaille <akim@lrde.epita.fr>
5526
5527 * etc/bench.pm: Shorten bench names.
5528
4e83ea15
AD
55292006-05-14 Akim Demaille <akim@lrde.epita.fr>
5530
5531 * src/output.h, src/output.c (error_verbose): Move to...
5532 * src/getargs.h, src/getargs.c: here.
5533 Sort the flags.
5534 Adjust dependencies.
5535
6e93d810
PE
55362006-05-13 Paul Eggert <eggert@cs.ucla.edu>
5537
5538 * data/c.m4 (b4_copyright): Put the special exception for Bison
5539 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
5540 uses changed. Suggested by Akim Demaille. Also, wrap the
5541 copyright notice, in case it is longer than 80 columns. Replace
5542 comma by newline after title.
6e93d810 5543
eaea13f5
PE
55442006-05-11 Paul Eggert <eggert@cs.ucla.edu>
5545
5546 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
5547 incompatibility, not a bug. Mention that it wasn't fixed as of
5548 flex 2.5.33.
5549
3cf084ec
AD
55502006-05-11 Akim Demaille <akim@lrde.epita.fr>
5551
5552 * examples/extexi: Enforce the precedence of concatenation over
5553 >>.
0a9f1c7d 5554 Reported by Tommy Nordgren.
3cf084ec 5555
32c96bd7
AD
55562006-05-11 Akim Demaille <akim@lrde.epita.fr>
5557
5558 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
5559 with the member "token".
f94705b2 5560 Reported by Martin Nylin.
32c96bd7 5561
eaea13f5
PE
55622006-05-08 Paul Eggert <eggert@cs.ucla.edu>
5563
5564 * data/glr.c: Switch to Bison 2.2 special-exception language in
5565 the copyright notice. Use more-regular format for titles and
5566 copyright notices.
5567 * data/glr.cc: Likewise.
5568 * data/location.cc: Likewise.
5569 * data/yacc.cc: Likewise.
5570 * doc/bison.texinfo (Conditions): Document this.
5571 * NEWS: likewise. Upgrade version to 2.2.
5572
6e2d1146
AD
55732006-04-27 Akim Demaille <akim@lrde.epita.fr>
5574
5575 * data/glr.cc: Remove dead code.
5576
47671055
PE
55772006-04-25 Paul Eggert <eggert@cs.ucla.edu>
5578
5579 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
5580 that variable and the line breaks the bootstrap. Problem reported
5581 by Juan M. Guerrero.
5582
ed2e6384
AD
55832006-04-24 Akim Demaille <akim@lrde.epita.fr>
5584
5585 * doc/bison.texinfo (Multiple start-symbols): New.
5586
3cedc2dc
AD
55872006-04-24 Akim Demaille <akim@lrde.epita.fr>
5588
5589 * etc/README, etc/bench.pl: New.
5590
b2ddc3f3
AD
55912006-04-03 Akim Demaille <akim@lrde.epita.fr>
5592
5593 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
5594 rule.
5595 Reported by Mickael Labau.
5596 * tests/input.at (Torturing the Scanner): Test it.
5597
91e3ac9a
PE
55982006-03-16 Paul Eggert <eggert@cs.ucla.edu>
5599
5600 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
5601 Problem reported by Bob Rossi.
5602
56032006-03-13 Paul Eggert <eggert@cs.ucla.edu>
5604
5605 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
5606 and didn't really work.
5607 For the index, use @ifnotinfo, not @iftex.
5608 Minor cleanups of spacing and terminology.
5609
5cf61e93
AD
56102006-03-12 Akim Demaille <akim@lrde.epita.fr>
5611
5612 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
5613 of AT_NAME_PREFIX when %name-prefix is not used.
5614
aa08666d
AD
56152006-03-12 Akim Demaille <akim@lrde.epita.fr>
5616
5617 Apply --prefix to C++ skeletons too: they change the namespace.
5618 The test suite already exercize these cases.
5619 * data/c++.m4 (b4_namespace): New.
5620 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
5621 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
5622 * data/yacc.c, data/glr.c: Remove a useless `[]'.
5623 * doc/bison.texinfo: Document it.
5624 (Option Cross Key): Use @multitable in all formats. It looks
5625 nicer, even in TeX outputs.
5626 (Rules): Use the same code whatever the output type is.
5627 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
5628 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
5629 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 5630
45567173
AD
56312006-03-10 Akim Demaille <akim@lrde.epita.fr>
5632
5633 * TODO: Remove dead items.
5634
e9d8f881 56352006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
5636
5637 * doc/FAQ: Remove, merged into...
5638 * doc/bison.texinfo (FAQ): this.
5639 * doc/Makefile.am (EXTRA_DIST): Adjust.
5640
c095d689
AD
56412006-03-10 Akim Demaille <akim@lrde.epita.fr>
5642
5643 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
5644 even if empty.
5645 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
5646 * doc/bison.texinfo (Calc++ Scanner): Use it.
5647
6e0f8287
PE
56482006-03-09 Paul Eggert <eggert@cs.ucla.edu>
5649
5650 Fix two nits reported by twlevo, plus one more that I discovered.
5651
5652 * src/assoc.h (assoc_to_string): Give a name to the arg, as
5653 this is the usual Bison style.
5654 * src/location.h (location_print): Likewise.
5655
5656 * src/reader.h (token_name): Likewise.
5657
d6b771c3
PE
56582006-03-08 Paul Eggert <eggert@cs.ucla.edu>
5659
5660 Fix some nits reported by twlevo.
5661 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
5662 and "POSIX". Use more-modern syntax for URLs. Mention C++
5663 and ask for Java. Don't hardwire OS version numbers. Add
5664 copyright notice.
5665 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
5666 * src/conflicts.c (solved_conflicts_obstack): Now static.
5667
1e137b71
JD
56682006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5669
5670 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
5671 page. Say "you can use it" not "you may use it" as on the web page;
5672 we're describing capabilities not granting permission.
5673
73f2e47e
PE
56742006-03-06 Paul Eggert <eggert@cs.ucla.edu>
5675
6d05403d
PE
5676 * data/glr.c (yyresolveLocations): Rename local variables to avoid
5677 shadowing warnings. Use usual patter for iterating through RHS.
5678 * tests/glr-regression.at
5679 (Uninitialized location when reporting ambiguity):
5680 Modify yylex so that it uses its argument, rather than trying
5681 to rely on ARGSUSED (which doesn't work for gcc with warnings).
5682 const char -> char const.
5683
73f2e47e
PE
5684 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
5685 Don't use tabs inside commands; it messes up 'ps'.
5686 Problem reported by twlevo.
5687
8710fc41
JD
56882006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
5689
5690 * tests/glr-regression.at (Uninitialized location when reporting
5691 ambiguity): New test case.
5692 * data/glr.c (yyresolveLocations): New function, which uses
5693 YYLLOC_DEFAULT.
5694 (yyresolveValue): Invoke yyresolveLocations before reporting an
5695 ambiguity.
5696 * doc/bison.texinfo (Default Action for Locations): Note
5697 YYLLOC_DEFAULT's usage for ambiguity locations.
5698 (GLR Semantic Actions): Cross-reference those notes.
5699
ae952af2
JD
57002006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
5701
5702 * tests/glr-regression.at (Leaked semantic values when reporting
5703 ambiguity): Remove unnecessary union and type declarations.
5704 (Leaked lookahead after nondeterministic parse syntax error): New test
5705 case.
5706 * data/glr.c (yyparse): Check for zero stacks remaining before
5707 attempting to shift the lookahead so that you don't lose it.
5708
35ee866a
JD
57092006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5710
5711 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
5712 * tests/glr-regression.at (Leaked semantic values when reporting
5713 ambiguity): New test case.
5714 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
5715 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
5716 now unnecessary yystackp parameter.
5717 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
5718 destructors can be called.
5719
5720 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
5721 in existing testcases.
5722
520181ab
JD
57232006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5724
5725 Don't leak semantic values for parent RHS when a user action cuts the
5726 parser, and clean up related code a bit.
5727 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
5728 cuts parse): Rename to...
5729 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
5730 for leaked parent RHS values.
5731 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
5732 between an unresolved state (non-empty chain of semantic options) and
5733 an incomplete one (signaled by an empty chain).
ae952af2 5734 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
5735 successfully or unsuccessfully resolved yyGLRState to...
5736 (yyresolveValue): ... here so that yyresolveValue always leaves a
5737 yyGLRState with consistent data and thus is easier to understand.
5738 Remove the yyvalp and yylocp parameters since they are always just
5739 taken from the yys parameter. When reporting a discarded merged value
5740 in debugging output, note that it is incompletely merged. Document the
5741 interface.
5742 (yyresolveAction): If resolving any of the RHS states fails, destroy
5743 them all rather than leaking them. Thus, as long as user actions are
5744 written to clean up the RHS correctly, yyresolveAction always cleans up
5745 the RHS of a semantic option. Document the interface.
5746
18d9185c
PE
57472006-02-27 Paul Eggert <eggert@cs.ucla.edu>
5748
5749 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
5750 led to a segmentation fault in GNU Pascal. Problem reported
5751 by Waldek Hebisch.
5752
841a7737
JD
57532006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
5754
5755 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
5756 mid-rule action inside a nonterminal symbol in order to declare a
5757 destructor for its semantic value.
5758
fc3f467f
PE
57592006-02-16 Paul Eggert <eggert@cs.ucla.edu>
5760
5761 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
5762 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
5763 __cplusplus && ! defined _STDLIB_H && !
5764 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
5765 defined free))]: Include <stdlib.h> rather than rolling our own
5766 declarations of malloc and free, to avoid problems with
5767 incompatible declarations (using 'throw') C++'s stdlib.h. This
5768 should fix Debian bug 340012
5769 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
5770 reported by Guillaume Melquiond.
5771
a3af26dd
PE
57722006-02-13 Paul Eggert <eggert@cs.ucla.edu>
5773
4d7bc38c
PE
5774 * NEWS: Clarify symbols versus types in unused-value warnings.
5775
a3af26dd
PE
5776 * configure.ac (AC_INIT): Bump version number.
5777
4e26c69e
PE
57782006-02-13 Paul Eggert <eggert@cs.ucla.edu>
5779
5780 * NEWS: Version 2.1a.
5781 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
5782 since C99 requires this.
5783
498e897c
PE
57842006-02-11 Paul Eggert <eggert@cs.ucla.edu>
5785
5786 * m4/c-working.m4: New file.
5787 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
5788
57bb17ca
PE
57892006-02-10 Paul Eggert <eggert@cs.ucla.edu>
5790
5791 * Makefile.maint: Merge from coreutils.
5792
0be105dc
PE
57932006-02-09 Paul Eggert <eggert@cs.ucla.edu>
5794
5795 More portability fixes for problems summarized by Nelson H. F. Beebe.
5796
5797 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
5798 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
5799 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
5800 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
5801 messes up because C++ code is compiled in 32-bit mode but linked
5802 in 64-bit mode.
5803
6fc0c024
PE
58042006-02-08 Paul Eggert <eggert@cs.ucla.edu>
5805
5806 More portability fixes for problems summarized by Nelson H. F. Beebe.
5807
7870f699
PE
5808 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
5809 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
5810
6fc0c024
PE
5811 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
5812 nodist_PROGRAMS, since we don't need to actually compile the
5813 example if we're just doing a plain 'make'. This avoids bothering
5814 the installer unnecessarily about problems due to weird C++
5815 compilers.
5816
fe6c2fde
PE
58172006-02-06 Paul Eggert <eggert@cs.ucla.edu>
5818
5819 More portability fixes for problems summarized by Nelson H. F. Beebe.
5820
5821 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
5822 than #include "...", and compile with -I'.'. The old method was
5823 not portable, according to Posix and the C standard, and it does
5824 not work with Sun C 5.7, where previous #line directives affect
5825 the working directory used in later #include "..." directives.
5826
927b425b
JMG
58272006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5828
5829 Various DJGGP specific issues in /djgpp
5830
d9735e9e
PE
58312006-02-02 Paul Eggert <eggert@cs.ucla.edu>
5832
5833 More portability fixes for problems summarized by Nelson H. F. Beebe.
5834
5835 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
5836 '#include <map>' works and that you can apply ++ to iterators.
5837
5a6755af
PE
58382006-02-01 Paul Eggert <eggert@cs.ucla.edu>
5839
67a0dc4f
PE
5840 Work around portability problems summarized by Nelson H. F. Beebe in
5841 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
5842
8c86f0ef
PE
5843 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5844 that '#include <string>' works.
5845
de35dd59
PE
5846 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
5847 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
5848 "warning: sorry: semantics of inline function static data `const
5849 unsigned char translate_table[262]' are wrong (you'll wind up with
5850 multiple copies)".
5851
67a0dc4f
PE
5852 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
5853 or, xor to not_, and_, or_, and xor_, respectively. This works
5854 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
5855 random system header somewhere that includes the equivalent of
5856 <iso646.h>.
5857
5a6755af
PE
5858 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
5859 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 5860 Suite Version 2.0.
5a6755af 5861
3f001415
JD
58622006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
5863
5864 During deterministic GLR operation, user actions should be able to
5865 influence the parse by changing yychar. To make this easier to fix and
5866 to make glr.c easier to evolve in general, don't maintain yytoken in
5867 parallel with yychar; just compute yytoken when needed.
5868 * tests/glr-regression.at (Incorrect lookahead during deterministic
5869 GLR): Check that setting yychar in a user action has the intended
5870 effect.
5871 * data/glr.c (yyGLRStack): Remove yytokenp member.
5872 (yyclearin): Don't set *yytokenp.
5873 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
5874 yychar rather than *yytokenp to determine the current lookahead.
5875 Compute yytoken locally when needed.
5876 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
5877 point to.
5878
5879 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
5880 after `--report' documentation.
5881
e2a8c0f5
PE
58822006-01-30 Paul Eggert <eggert@cs.ucla.edu>
5883
5884 * src/parse-gram.y (grammar_declaration): Location of printer
5885 symbol is @1, not list->location. Bug reported by twlevo.
5886 * tests/input.at (Incompatible Aliases): Adjust to above change.
5887
6b702268
PE
58882006-01-29 Paul Eggert <eggert@cs.ucla.edu>
5889
27622431
PE
5890 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
5891 all the test at once. This makes the output easier to read in the
5892 normal case.
5893
6b702268
PE
5894 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
5895 got from <http://bro-ids.org/download.html>. The bug is that
5896 when two actions appeared in succession, the second one was
5897 scanned before the first one was added to the grammar rule
5898 as a midrule action. Bison then output the incorrect warning
5899 "parse.y:905.17-906.36: warning: unused value: $3".
5900 * src/parse-gram.y (BRACED_CODE, action): These are no longer
5901 associated with a value.
5902 (rhs): Don't invoke grammar_current_rule_action_append.
5903 (action): Invoke it here instead.
5904 * src/reader.c (grammar_midrule_action): Now extern.
5905 (grammar_current_rule_action_append): Don't invoke
5906 grammar_midrule_action; that is now the scanner's job.
5907 * src/reader.h (last_string, last_braced_code_loc):
5908 (grammar_midrule_action): New decls.
5909 * src/scan-gram.l (last_string): Now extern, sigh.
5910 (last_braced_code_loc): New extern variable.
5911 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
5912 rule already has an action.
5913 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
5914 * tests/input.at (AT_CHECK_UNUSED_VALUES):
5915 Add some tests to check that the above changes fixed the bug.
5916
d40ba6c2
PE
59172006-01-27 Paul Eggert <eggert@cs.ucla.edu>
5918
5919 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
5920 All used changed. Check whether the symbol has a destructor,
5921 not whether it is typed.
5922 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
5923 that the values are still reported as unused. All line numbers
5924 adjusted.
5925
401aace6
PE
59262006-01-23 Paul Eggert <eggert@cs.ucla.edu>
5927
5928 Work around a bug in bro 0.8, which underparenthesizes its
5929 definition of YYLLOC_DEFAULT.
5930 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
5931 their arguments.
5932 * data/lalr1.cc: Likewise.
5933 * data/yacc.cc: Likewise.
5934
06f01bc4
PE
59352006-01-22 Paul Eggert <eggert@cs.ucla.edu>
5936
401aace6
PE
5937 Work around a bug in Pike 7.0, and give the Pike folks a
5938 better way to override the usual int widths.
5939 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
5940 user can override the types.
5941 (short): #undef, to work around a bug in Pike 7.0.
5942 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
5943 (union yyalloc.yyss): Use yytype_int16 rather than short.
5944 All uses changed.
5945 (yysigned_char): Remove.
5946 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
5947 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
5948 * tests/regression.at (Web2c Actions): Adjust to above changes.
5949
5950 * src/reader.c (check_and_convert_grammar): New function.
5951 (reader): Close the input file even if something went wrong during
5952 parsing. Minor file descriptor leak reported by twlevo.
5953
06f01bc4
PE
5954 * src/assoc.c (assoc_to_string): Use a default: abort (); case
5955 to pacify gcc -Wswitch-default.
5956 * src/scan-gram.l (adjust_location): Use a default: break; case
5957 to pacify gcc -Wswitch-default.
5958 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
5959 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
5960 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
5961 Move these decls to scan-skel.l, since they don't need to be
5962 visible elsewhere.
5963 * src/scan-skel.l: Accept the above decls.
5964 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
5965 is used.
5966
02650b7f
PE
59672006-01-21 Paul Eggert <eggert@cs.ucla.edu>
5968
5969 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
5970 since we don't want to insist on a version number at the start
5971 of the changelog every time.
5972 * Makefile.maint: Sync from coreutils a bit better.
5973 (sc_trailing_blank): Renamed from sc_trailing_space.
5974 All uses changed.
5975 (sc_no_if_have_config_h, sc_require_config_h):
5976 (sc_prohibit_assert_without_use): New rules.
5977 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
5978 (sc_dd_max_sym_length): Fix leading spaces in rule.
5979 (sc_system_h_headers): Prefix with @.
5980 (sc_useless_cpp_parens, m4-check): Output line numbers.
5981 (changelog-check): Allow version only in head.
5982 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
5983 satisfy new Makefile.maint rule.
5984 * data/glr.c: Likewise.
5985 * data/glr.cc: Likewise.
5986 * data/lalr1.cc: Likewise.
5987 * data/yacc.c: Likewise.
5988 * lib/ebitsetv.c: Likewise.
5989 * lib/lbitset.c: Likewise.
5990 * lib/subpipe.c: Likewise.
5991 * lib/timevar.c: Likewise.
5992 * src/system.h: Likewise.
5993 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
5994 * djgpp/Makefile.maint: Add copyright notice.
5995 * djgpp/README.in: Likewise.
5996 * djgpp/config.bat: Likewise.
5997 * djgpp/config.site: Likewise.
5998 * djgpp/config_h.sed: Likewise.
5999 * djgpp/djunpack.bat: Likewise.
6000 * djgpp/config.sed: Fix copyright notice to match standard format.
6001 * djgpp/subpipe.h: Likewise.
6002 * lib/bitsetv-print.c: Likewise.
6003 * lib/bitsetv.c: Likewise.
6004 * lib/subpipe.h: Likewise.
6005 * lib/timevar.c: Likewise.
6006 * lib/timevar.h: Likewise.
6007 * djgpp/subpipe.c: Use standard recipe for config.h.
6008 * lib/abitset.c: Likewise.
6009 * lib/bitset.c: Likewise.
6010 * lib/bitset_stats.c: Likewise.
6011 * lib/bitsetv-print.c: Likewise.
6012 * lib/bitsetv.c: Likewise.
6013 * lib/ebitsetv.c: Likewise.
6014 * lib/get-errno.c: Likewise.
6015 * lib/lbitset.c: Likewise.
6016 * lib/subpipe.c: Likewise.
6017 * lib/timevar.c: Likewise.
6018 * lib/vbitset.c: Likewise.
6019 * tests/local.at: Likewise.
6020 * src/scan-gram.l: Don't include verify.h, since system.h does
6021 that for us.
6022 * .x-sc_require_config_h: New file.
6023 * .x-sc_unmarked_diagnostics: New file.
6024
287c78f6
PE
60252006-01-20 Paul Eggert <eggert@cs.ucla.edu>
6026
287c78f6
PE
6027 Be a bit more systematic about using 'abort'.
6028 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
6029 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
6030 Put 'default: abort ();' before some other case, to satisfy older
6031 pedantic compilers.
6032 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6033 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
6034 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
6035 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
6036 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
6037 (get_decision_str, get_orientation_str, get_node_alignment_str):
6038 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
6039 (get_linestyle_str, get_arrowstyle_str): Likewise.
6040 * src/conflicts.c (resolve_sr_conflict):
6041 Use a default case rather than one for the one remaining enum
6042 value, to catch invalid enum values as well.
6043 * src/lalr.c (set_goto_map, map_goto):
6044 Prefer "assert (FOO);" to "if (!FOO) abort ();".
6045 * src/nullable.c (nullable_compute, token_definitions_output):
6046 Likewise.
6047 * src/reader.c (packgram, reader): Likewise.
6048 * src/state.c (transitions_to, state_new, state_reduction_find):
6049 Likewise.
6050 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
6051 (symbol_pack): Likewise.
6052 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
6053 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
6054 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
6055 * src/system.h: Don't include <assert.h>.
6056 (assert): New macro.
6057
6058 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
6059 (Destructor Decl, Parser Function, Pure Calling):
6060 Describe rules for braces inside C code more carefully.
287c78f6 6061
c66dfadd
PE
60622006-01-19 Paul Eggert <eggert@cs.ucla.edu>
6063
c21493b8
PE
6064 Fix some porting glitches found by Nelson H. F. Beebe.
6065 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
6066 compilers that don't understand that abort () does not return.
6067 * src/state.c (transitions_to): Likewise.
6068 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
6069 that '#include <cstdlib>' works.
6070 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
6071 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
6072 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
6073 for the benefit of some pre-C99 compilers.
6074
b6e3facf
PE
6075 * bootstrap: Undo changes to gnulib files that autoreconf made.
6076
c66dfadd
PE
6077 Minor fixups to get 'make maintainer-check' to work.
6078 * configure.ac: Don't use -Wnested-externs, as it's incompatible
6079 with the new verify.h implementation.
6080 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
6081 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
6082 * data/yacc.c (YYUSE): Likewise.
6083 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
6084 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
6085 * src/parse-gram.y (declaration): Don't pass a string constant
6086 to a function that expects char *, since GCC might complain
6087 about the constant value.
6088 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
6089 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
6090 before #defining them.
6091 * tests/glr-regression.at
6092 (Incorrectly initialized location for empty right-hand side in GLR):
6093 In yyerror, use the msg arg.
6094 (Corrupted semantic options if user action cuts parse):
6095 (Incorrect lookahead during deterministic GLR):
6096 (Incorrect lookahead during nondeterministic GLR):
6097 Don't name a local var 'index'; it shadows string.h's 'index'.
6098
ed94ef2a
AD
60992006-01-19 Akim Demaille <akim@epita.fr>
6100
6101 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
6102 location, not just parts of it.
6103
e9ad4aec
PE
61042006-01-18 Paul Eggert <eggert@cs.ucla.edu>
6105
d6ca7905
PE
6106 * NEWS: Document the fact that multiple %unions are now allowed.
6107 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
6108 * TODO: This feature is now implemented, so remove it from
6109 the wishlist.
d6ca7905 6110
ef1b70e0
PE
6111 * Makefile.maint: Merge with coreutils Makefile.maint.
6112 (CVS_LIST): Use build-aux version if available.
6113 (VERSION_REGEXP): New macro.
6114 (syntax-check-rules): Add sc_no_if_have_config_h,
6115 sc_prohibit_assert_without_use, sc_require_config_h,
6116 sc_useless_cpp_parens.
6117 (sc_obsolete_symbols): Check for O_NDELAY.
6118 (sc_dd_max_sym_length): Track coreutils.
6119 (sc_unmarked_diagnostics): Look in all files, not just *.c.
6120 (sc_useless_cpp_parens): New rule.
6121 (news-date-check): Look for version or today's date.
6122 (changelog-check): Don't require version number near head.
6123 (copyright-check): Use current year instead of hardwiring 2005.
6124 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
6125 (announcement): Add --gpg-key-ID.
6126
6127 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
6128 with "file system".
6129
2073ce56 6130 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
6131 array. Problem reported by twlevo.
6132 * src/reader.c (packgram): Prepend a new sentinel before ritem.
6133 * src/lalr.c (build_relations): Rely on new sentinel.
6134 * src/gram.c (gram_free): Adjust to new sentinel.
6135
b7691f15
JD
61362006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
6137
6138 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
6139 yylookaheadNeeds. All uses updated.
6140 (yysplitStack): Rename local yynewLookaheadStatuses to
6141 yynewLookaheadNeeds.
6142 * data/glr-regression.at (Incorrect lookahead during nondeterministic
6143 GLR): In comments, change `lookahead status' to `lookahead need'.
6144
ddee1b06
PH
61452006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6146
6147 * data/glr.c (yysplitStack): A little stylistic rewrite.
6148
12f4614d
PH
61492006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6150
6151 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
6152
32c29292
JD
61532006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
6154
6155 * doc/bison.texinfo: Fix some typos.
6156 (GLR Semantic Actions): New subsection discussing special
6157 considerations because GLR semantic actions might be deferred.
6158 (Actions): Mention look-ahead usage of yylval.
6159 (Actions and Locations): Mention look-ahead usage of yylloc.
6160 (Special Features for Use in Actions): Add YYEOF entry and mention it
6161 in the yychar entry.
6162 In the yychar entry, remove mention of the local yychar case (pure
6163 parser) since this is irrelevant information when writing semantic
148d66d8 6164 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
6165 yychar is otherwise described as an external variable.
6166 In the yychar entry, don't call it the `current' look-ahead since it
6167 isn't when semantic actions are deferred.
6168 In the yychar and yyclearin entries, add note about deferred semantic
6169 actions.
6170 Add yylloc and yylval entries discussing look-ahead usage.
6171 (Look-Ahead Tokens): When discussing yychar, don't call it the
6172 `current' look-ahead, and do mention yylval and yylloc.
6173 (Error Recovery): Cross-reference `Action Features' when mentioning
6174 yyclearin.
148d66d8 6175 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
6176 look-ahead.
6177 In the yylloc and yylval entries, mention look-ahead usage.
6178
de366a2f 61792006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
6180
6181 * tests/glr-regression.at: Update copyright year to 2006.
6182
bf70fa87
JD
61832006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6184
6185 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
6186 use during nondeterministic operation to track which stacks have
6187 actually needed the current lookahead.
6188 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
6189 Allocate, deallocate, resize, and otherwise shuffle space for
6190 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
6191 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
6192 appropriately during nondeterministic operation.
6193 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
6194 members to store the current lookahead to be used by the deferred
6195 user action.
6196 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
6197 from which the RHS is taken. Set the lookahead members of the new
6198 yySemanticOption according to the lookahead status for stack yyk.
6199 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
6200 yyaddDeferredAction.
6201 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
6202 members of yySemanticOption before invoking yyuserAction, and then set
6203 them back to their current values afterward.
6204 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
6205 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
6206 * tests/glr-regression.at: Remove `.' from the ends of recent test case
6207 titles for consistency.
6208 (Leaked merged semantic value if user action cuts parse): In order to
6209 suppress lint warnings, use arguments in merge function, and assign
6210 char value < 128 in main.
6211 (Incorrect lookahead during deterministic GLR): New test case.
6212 (Incorrect lookahead during nondeterministic GLR): New test case.
6213
05449a2c
JD
62142006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6215
de366a2f 6216 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
6217 !yyvaluep as signal that no semantic value is available to print.
6218 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
6219 to print a semantic value.
6220
4158e0a1 62212006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 6222
4158e0a1
JD
6223 * tests/glr-regression.at: For consistency with my newer test cases,
6224 don't thank myself.
6225
d659304d
JD
62262006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
6227
6228 * data/glr.c (yyresolveValue): When merging semantic options, if at
6229 least one user action succeeds but a later one cuts the parse, then
6230 destroy the semantic value before returning rather than leaking it.
6231 (yyresolveStates): If a user action cuts the parse and thus
6232 yyresolveValue fails, ignore the (unset) semantic value rather than
6233 corrupting the yyGLRState, and empty the semantic options list since
6234 the user actions should have called all necessary destructors.
6235 Simplify code with YYCHK.
6236 * tests/glr-regression.at (Corrupted semantic options if user action
6237 cuts parse): New test case.
6238 (Undesirable destructors if user action cuts parse): New test case.
6239 Before applying any of this patch, this test case never actually failed
6240 for me... but only because the corrupted semantic options usually
6241 masked this bug.
6242 (Leaked merged semantic value if user action cuts parse): New test
6243 case.
6244
6ec2c0f2
AD
62452006-01-05 Akim Demaille <akim@epita.fr>
6246
6247 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
6248
1b9c21fb
PE
62492006-01-04 Paul Eggert <eggert@cs.ucla.edu>
6250
6251 * data/c.m4 (b4_c_modern): New macro, with a new provision for
6252 _MSC_VER. Problem reported by Cenzato Marco.
6253 (b4_c_function_def): Use it.
6254 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
6255 b4_c_modern.
6256 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
6257 than rolling our own.
6258
84866159
AD
62592006-01-04 Akim Demaille <akim@epita.fr>
6260
6261 Also warn about non-used mid-rule values.
6262 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
6263 member.
6264 (symbol_list_new): Adjust.
6265 * src/reader.c (symbol_typed_p): New.
6266 (grammar_rule_check): Use it.
6267 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
6268 Check its rule.
6269 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
6270 Use it.
6271 * tests/actions.at (Exotic Dollars): Adjust.
6272
378f4bd8
AD
62732006-01-04 Akim Demaille <akim@epita.fr>
6274
6275 * src/reader.c (grammar_midrule_action): If $$ is set in a
6276 mid-rule, move the `used' bit to its lhs.
6277 * tests/input.at (Unused values): New.
6278 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
6279
e2a21b6f
PE
62802006-01-03 Paul Eggert <eggert@cs.ucla.edu>
6281
54662697
PE
6282 * doc/bison.texinfo (Bison Options): Say more accurately what
6283 --yacc does.
6284 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
6285 about declarations in the grammar when in Yacc mode, as POSIX does
6286 not require a diagnostic when the grammar uses extensions.
6287
6288 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
6289
073f9288
PE
6290 Warn about dubious constructions like "%token T T".
6291 Reported by twlevo.
6292 * src/symtab.h (struct symbol.declared): New member.
6293 * src/symtab.c (symbol_new): Initialize it to false.
6294 (symbol_class_set): New arg DECLARING, specifying whether
6295 this is a declaration that we want to warn about, if there
6296 is more than one of them. All uses changed.
6297
1221b78a
PE
6298 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
6299 Allow multiple %union directives, whose contents concatenate.
6300 * src/parse-gram.y (grammar_declaration): Likewise.
6301 Use muscle_code_grow, so that we don't need stype_line any more.
6302 All uses changed.
6303
6304 * src/muscle_tab.c (muscle_grow): Fix comment.
6305
e2a21b6f
PE
6306 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
6307 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
6308 Update copyright year to 2006.
6309
8f7e3cf9
AD
63102006-01-03 Akim Demaille <akim@epita.fr>
6311
6312 Have glr.cc pass (some of) the calc.at tests.
6313 * data/glr.cc (b4_parse_param_orig): New.
6314 (b4_parse_param): Improve its definition, and bound it more
6315 clearly in the skeleton.
6316 (b4_epilogue): Append, instead of prepending, in order to keep
6317 #line consistency.
6318 Simplify the generation of auxiliary functions: locations and
6319 purity are mandated.
6320 (b4_global_tokens_and_yystype): Honor it.
6321 * data/location.cc (c++.m4): Don't include it.
6322 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
6323 and AT_SKEL_CC_IF.
6324 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
6325 AT_LALR1_CC_IF.
6326 Be sure to initialize the first position's filename.
6327 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
6328 mandated anyway.
6329 (AT_CHECK_CALC_GLR_CC): New.
6330 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
6331
3953ed88
AD
63322006-01-02 Akim Demaille <akim@epita.fr>
6333
6334 * src/output.c (output_skeleton): Don't hard wire the inclusion of
6335 c.m4.
0a96ba81 6336 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
6337 * data/glr.cc: Do not include stack.hh.
6338
9ecafbbf
AD
63392006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6340
6341 * data/glr.c: Reformat whitespace with tabs.
6342 (b4_lpure_formals): Remove this unused m4 macro.
6343 * tests/cxx-type.at: Reformat whitespace with tabs.
6344 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
6345 since it's a member. Rename type to isNterm for clarity.
6346
c4d497a0
AD
63472005-12-29 Akim <akim@sulaco.local>
6348
6349 Let glr.cc catch up with symbol_value_print.
6350 * data/glr.cc (b4_yysymprint_generate): Replace by...
6351 (b4_yy_symbol_print_generate): this.
6352 (yy_symbol_print, yy_symbol_value_print): Declare them.
6353
4517da37
PE
63542005-12-28 Paul Eggert <eggert@cs.ucla.edu>
6355
6356 * src/location.h (boundary): Note that a line or column equal
6357 to INT_MAX indicates an overflow.
6358 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
6359 (rule_length_overflow, increment_rule_length, add_column_width):
6360 New functions.
6361 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
6362 (<SC_BRACED_CODE>"}"):
6363 Use increment_rule_length rather than incrementing it by hand.
6364 (adjust_location, handle_syncline): Diagnose overflow.
6365 (handle_action_dollar, handle_action_at):
6366 Fix bug with monstrosities like $-2147483648.
6367 Remove now-unnecessary checks.
6368 (scan_integer): Verify assumptions and remove now-unnecessary checks.
6369 (convert_ucn_to_byte): Verify assumptions.
6370 (handle_syncline): New arg LOC. All callers changed.
6371 Don't store through a value derived from char const * pointer.
6372
6373 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
6374 GCC warnings.
6375
e3233bf6
PE
63762005-12-27 Paul Eggert <eggert@cs.ucla.edu>
6377
6378 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
6379 Remove unnecessary forward static decls.
6380
8f3596a6
AD
63812005-12-27 Akim Demaille <akim@epita.fr>
6382
6383 * src/reader.c (grammar_current_rule_check): Also check that $$
6384 is used.
6385 Take the rule to check as argument, hence rename as...
6386 (grammar_rule_check): this.
6387 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
6388 Rename as...
6389 (grammar_rule_begin, grammar_rule_end): these, for consistency.
6390 (grammar_midrule_action, grammar_symbol_append): Now static.
6391 * tests/torture.at (input): Don't rely on the default action
6392 being always performed.
6393 * tests/calc.at: "Set" $$ even when the action is "cut" with
6394 YYERROR or other.
6395 * tests/actions.at (Exotic Dollars): Instead of using unused
6396 values, check that the warning is issued.
6397
721be13c
PE
63982005-12-22 Paul Eggert <eggert@cs.ucla.edu>
6399
6400 * NEWS: Improve wording for unused-value warnings.
6401
a0af42fc
AD
64022005-12-22 Akim Demaille <akim@epita.fr>
6403
6404 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
6405 (b4_yysymprint_generate): Rename as...
6406 (b4_yy_symbol_print_generate): this.
6407 Generate yy_symbol_print instead of yysymprint.
6408 Generate also yy_symbol_value_print, and use it.
6409
affac613
AD
64102005-12-22 Akim Demaille <akim@epita.fr>
6411
721be13c 6412 * NEWS: Warn about unused values.
affac613
AD
6413 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
6414 a `used' member.
6415 (symbol_list_n_get, symbol_list_n_used_set): New.
6416 (symbol_list_n_type_name_get): Use symbol_list_n_get.
6417 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
6418 * src/reader.c (grammar_current_rule_check): Check that values are
6419 used.
6420 * src/symtab.c (symbol_print): Accept 0.
6421 * tests/existing.at: Remove the type information.
6422 Empty the actions.
6423 Remove useless actions (beware of mid-rule actions: perl -000
6424 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
6425 * tests/actions.at (Exotic Dollars): Use unused values.
6426 * tests/calc.at: Likewise.
6427 * tests/glr-regression.at (No users destructors if stack 0 deleted):
6428 Likewise.
6429
6430 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
6431 rule_useful_p.
6432
9d9b8b70
PE
64332005-12-21 Paul Eggert <eggert@cs.ucla.edu>
6434
8bb4c753
PE
6435 Undo 2005-12-01 tentative license wording change. The wording is
6436 still being reviewed by the lawyers, and we don't want to wait for
6437 them before publishing a test release. For now, revert to the
6438 previous wording.
6439 * NEWS: Undo 2005-12-01 change.
6440 * data/glr.c: Revert to previous license wording.
6441 * data/glr.cc: Likewise.
6442 * data/lalr1.cc: Likewise.
6443 * data/location.cc: Likewise.
6444 * data/yacc.c: Likewise.
6445
9d9b8b70
PE
6446 * NEWS: Reword %destructor vs YYABORT etc.
6447 * data/glr.c: Use American spacing, for consistency.
6448 * data/glr.cc: Likewise.
6449 * data/lalr1.cc: Likewise.
6450 * data/yacc.c: Likewise.
6451 * data/yacc.c: Reformat comments slightly.
6452 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
6453 for consistency. Fix some spelling errors and reword recently-included
6454 text slightly.
6455 * tests/cxx-type.at: Cast results of malloc, for C++.
6456
2c3b392a
AD
64572005-12-21 Joel E. Denny <address@hidden>
6458
6459 * tests/cxx-type.at: Construct a tree, count the parents of shared
6460 nodes, and free each node once and only once. Previously, the memory
6461 for semantic values was leaked instead.
6462
d6cff4dc
AD
64632005-12-21 Joel E. Denny <address@hidden>
6464
6465 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
6466 (yylval, yylloc): If pure, #define to yystackp->yyval and
6467 yystackp->yyloc similar to yychar and yynerrs.
6468 (yyparse): If pure, remove local yylval and yylloc. Add local
6469 yystackp to accommodate pure definitions of yylval and yylloc.
6470 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
6471 yylvalp and yyllocp to &yylval and &yylloc.
6472 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
6473 namespace. Previously, nerrs and char were missing, but lval and lloc
6474 weren't necessary.
6475 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
6476 yylvalp and yyllocp parameters since, if pure, these are now always
6477 accessible through yystackp. If not pure, they are still accessible
6478 globally.
6479 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
6480 `if (YYID (N))' to pacify lint.
6481
a85284cf
AD
64822005-12-21 Akim Demaille <akim@epita.fr>
6483
6484 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
6485 destroy the RHS symbols of a rule.
6486 * data/yacc.c (yylen): Initialize to 0.
6487 Keep its value to the number of items to possibly shift.
6488 In particular, a regular successful parse that ends on YYFINAL by
6489 a (internal) YYACCEPT must not have yylen != 0.
6490 (yyerrorlab, yyreturn): Pop the RHS.
6491 Reorder a bit to emphasize the `shifting' bits of code.
6492 (YYPOPSTACK): Now accept a number of items to pop.
6493 * data/lalr1.cc: Likewise.
6494 * data/glr.c: Formatting changes.
6495 Use goto instead of fall through.
6496 * doc/bison.texinfo (Destructor Decl): Complete.
6497
d508c281
JMG
64982005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6499
6500 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6501 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
6502 * djgpp/config.bat: Replace every occurence of the file name
6503 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
6504 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
6505 * djgpp/config.sed: Replace every occurence of the file name
6506 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
6507 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
6508 * djgpp/djunpack.bat: DJGPP specific file.
6509 * djgpp/fnchange.lst: DJGPP specific file.
6510 * djgpp/README.in: Add new information about how to unpack the bison
6511 source on MSDOS and other systems which have 8.3 file name restrictions
6512 using djunpack.bat and fnchange.lst.
6513
3e7a2cd9
PE
65142005-12-12 Paul Eggert <eggert@cs.ucla.edu>
6515
6516 * bootstrap (build_cvs_prefix): Remove; unused.
6517 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
6518 when getting gnulib.
6519
65202005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
6521
6522 * data/glr.c: Reorder typedef declarations for structs to match order
6523 of struct declarations.
6524 Rename yystack everywhere to yystackp except in yyparse where it's not
6525 a pointer.
6526 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
6527 consistency.
6528 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
6529 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
6530 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
6531 lint.
6532
877519f8
PE
65332005-12-09 Paul Eggert <eggert@cs.ucla.edu>
6534
0eca5a39
PE
6535 * tests/sets.at (Accept): Fix typos in regular expression used to
6536 sed out the final state number.
6537
2cec9080
PE
6538 Work around portability problem on Solaris 10: flex-generated
6539 files include <stdio.h> before <config.h>, which messes up
6540 because the latter defines __EXTENSIONS__. Address the problem
6541 by creating two new little files that include <config.h> first,
6542 then include the flex-generated files. Rewrite everyone else
6543 to include <config.h> first, as well.
6544 * lib/timevar.c: Always include "config.h".
6545 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
6546 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
6547 (EXTRA_bison_SOURCES): New macro.
6548 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
6549 * src/system.h: Don't include config.h.
6550 * src/LR0.c: Include <config.h> first.
6551 * src/assoc.c: Likewise.
6552 * src/closure.c: Likewise.
6553 * src/complain.c: Likewise.
6554 * src/conflicts.c: Likewise.
6555 * src/derives.c: Likewise.
6556 * src/files.c: Likewise.
6557 * src/getargs.c: Likewise.
6558 * src/gram.c: Likewise.
6559 * src/lalr.c: Likewise.
6560 * src/location.c: Likewise.
6561 * src/main.c: Likewise.
6562 * src/muscle_tab.c: Likewise.
6563 * src/nullable.c: Likewise.
6564 * src/output.c: Likewise.
6565 * src/parse-gram.y: Likewise.
6566 * src/print.c: Likewise.
6567 * src/print_graph.c: Likewise.
6568 * src/reader.c: Likewise.
6569 * src/reduce.c: Likewise.
6570 * src/relation.c: Likewise.
6571 * src/state.c: Likewise.
6572 * src/symlist.c: Likewise.
6573 * src/symtab.c: Likewise.
6574 * src/tables.c: Likewise.
6575 * src/uniqstr.c: Likewise.
6576 * src/vcg.c: Likewise.
6577
877519f8
PE
6578 * src/parse-gram.y: Fix minor problems uncovered by lint.
6579 (current_lhs, current_lhs_location): Now static.
6580 (current_assoc): Remove unused variable.
6581
6582 Cleanups so that Bison-generated parsers have less lint.
6583 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
6584 Prepend /*ARGSUSED*/, for lint's sake.
6585 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
6586 definition if 'lint' is defined.
6587 (YYID): New macro (or function, if lint).
6588 All uses of /*CONSTCOND*/0 replaced by YYID(0).
6589 * data/yacc.c: Likewise.
6590 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
6591 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
6592 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
6593 is C++ only.
6594 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
6595 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
6596 Use YYID(0) rather than 0, for lint.
6597 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
6598 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
6599
f5228370
PE
66002005-12-07 Paul Eggert <eggert@cs.ucla.edu>
6601
6602 * tests/glr-regression.at
6603 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6604 Close memory leak reported by twlevo.
6605
69ce078b
PE
66062005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
6607
6ff99711
PE
6608 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
6609 all stacks.
6610 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
6611 * tests/glr-regression.at (No users destructors if stack 0 deleted):
6612 New test case.
6613 (Duplicated user destructor for lookahead): This test now is expected
6614 to succeed.
6615
af3412cd
PE
66162005-12-01 Paul Eggert <eggert@cs.ucla.edu>
6617
32b5b719 6618 * NEWS: Document the following change.
af3412cd
PE
6619 * data/yacc.c: Say "parser skeleton" rather than "file", since
6620 it's no longer just a file.
6621 * data/glr.c: Grant a special exception for C GLR parsers, that
6622 reads like the already-existing exception for C LALR(1) parsers.
6623 * data/glr.cc: Likewise.
6624 * data/lalr1.cc: Likewise.
6625 * data/location.cc: Likewise.
6626 * data/yacc.c: Reword the "written by" statement to clarify that
6627 it was the parser skeleton, not the entire output file.
6628 * data/glr.c: Written by Paul Hilfinger.
6629 * data/glr.cc: Written by Akim Demaille.
6630 * data/lalr1.cc: Likewise.
6631
035aa4a0
PE
66322005-11-18 Paul Eggert <eggert@cs.ucla.edu>
6633
d9963c85
PE
6634 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
6635 Fix typos in previous change that broke 'make check'.
6636 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
6637 supported in C.
6638 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
6639 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
6640 We can revert this once things settle down.
6641
035aa4a0
PE
6642 * src/conflicts.c (conflicts_print): Don't print file name twice
6643 when %expect fails because there were no conflicts.
6644 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
6645 change.
6646 * tests/conflicts.at (%expect not enough, %expect too much):
6647 (%expect with reduce conflicts): Adjust to new behavior.
6648
66492005-11-18 Akim Demaille <akim@epita.fr>
6650
6651 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
6652 errors.
6653 * NEWS: Document this.
6654 * doc/bison.texinfo (Expect Decl): Likewise.
6655
d1ff7a7c
AD
66562005-11-16 Akim Demaille <akim@epita.fr>
6657
6658 Generalize the display of semantic values and locations in traces.
6659 * data/glr.c (yy_reduce_print): Fix indices (again).
6660 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
6661 literal integers.
6662 * data/lalr1.cc (yyreduce_print): Rename as...
6663 (yy_reduce_print): this.
6664 Display values and locations.
6665 * data/yacc.c (yy_reduce_print): Likewise.
6666 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
6667 (yysymprint): Move higher to be visible from yy_reduce_print).
6668 (yyparse): Adjust.
6669 * tests/calc.at: Adjust the expected length of the traces.
6670
6de5398d
AD
66712005-11-14 Akim Demaille <akim@epita.fr>
6672
6673 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
6674 from 1 to N, while values and location start at 0.
6675 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
6676
a1373f55
AD
66772005-11-14 Akim Demaille <akim@epita.fr>
6678
6679 * data/glr.c (yy_reduce_print): Fix the $ number.
6680
613d8952
AD
66812005-11-14 Akim Demaille <akim@epita.fr>
6682
6683 "Use" parse parameters.
6684 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
6685 * data/glr.c, data/glr.cc: Use them.
6686 * data/glr.c (YYUSE): Have a C++ definition that supports
6687 non-pointer types.
6688
b2741627
AD
66892005-11-14 Akim Demaille <akim@epita.fr>
6690
6691 * data/glr.c (yyexpandGLRStack): Declare only if defined.
6692
5059b5c8
AD
66932005-11-14 Akim Demaille <akim@epita.fr>
6694
42249483
AD
6695 * data/glr.cc: New.
6696 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 6697
4626a15d
AD
66982005-11-12 Akim Demaille <akim@epita.fr>
6699
6700 Let position and location be PODs.
6701 * data/location.cc (position::initialize, location::initialize): New.
6702 (position::position, location::location): Define only if
6703 b4_location_constructors is defined.
6704 * data/lalr1.cc (b4_location_constructors): Define it for backward
6705 compatibility.
6706 * doc/bison.texinfo (Initial Action Decl): Use initialize.
6707
67082005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
6709
6710 * data/lalr1.cc: Move the body of the ctor and dtor into the
6711 parser file (instead of the header).
6712 Wrap the implementations in a "namespace yy".
6713
67142005-11-12 Akim Demaille <akim@epita.fr>
6715
6716 Have glr.c include its header file when created.
6717 * data/glr.c (b4_shared_declarations): New.
6718 Output them verbatim in the parser if !%defines, otherwise
6719 output then in the header file, and include it instead.
6720
1989d947
AD
67212005-11-11 Akim Demaille <akim@epita.fr>
6722
6723 * data/glr.c: Comment changes.
6724
67252005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
6726
6727 When yydebug, report semantic and location values for reductions.
6728 * data/glr.c (yy_reduce_print): Report the semantic values and the
6729 locations.
6730 (YY_REDUCE_PRINT): Adjust.
6731 (yyglrReduce): Use them.
6732 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
6733 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
6734 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
6735 traces.
6736
02998094
AD
67372005-11-10 Akim Demaille <akim@epita.fr>
6738
6739 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
6740 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
6741 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
6742
5210672f
PE
67432005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
6744
6745 * m4/cxx.m4, examples/Makefile.am: Don't build
6746 examples/calc++ if no C++ compiler is available. (trivial change)
6747
a8991a1d
AD
67482005-11-09 Akim Demaille <akim@epita.fr>
6749
6750 * src/scan-skel.l: Use a couple of asserts.
6751
36b5e963
AD
67522005-11-03 Akim Demaille <akim@epita.fr>
6753
6754 In some (weird) cases, the final state number is incorrect.
6755 Reported by Alexandre Duret-Lutz.
6756 * src/LR0.c (state_list_append): Remove the computation of
6757 final_state.
6758 (save_reductions): Do it here.
6759 (get_state): Alpha conversion.
6760 (generate_states): Use a for loop.
6761 * src/gram.h (item_number_is_rule_number)
6762 (item_number_is_symbol_number): New.
6763 * src/state.c: Use assert.
6764 * src/system.h: Include assert.h.
6765 * tests/sets.at (Accept): New.
6766
44e7ead1
PH
67672005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6768
6769 * data/glr.c (yyfill): Adjust comment.
36b5e963 6770 (yyresolveAction): Initialize default location properly
44e7ead1
PH
6771 for empty right-hand sides.
6772 (yydoAction): Ditto.
6773 Add comment explaining apparently dead code.
36b5e963
AD
6774 * tests/glr-regression.at
6775 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 6776 New test.
36b5e963 6777
e10a80ee
PE
67782005-10-30 Paul Eggert <eggert@cs.ucla.edu>
6779
6780 * bootstrap (cleanup_gnulib): New function. Use it to clean up
6781 gnulib when interrupted. This fixes some race conditions and
6782 works around some portability problems (one noted by Paul
6783 Hilfinger).
6784
067b32ee
AD
67852005-10-22 Akim <akim@epita.fr>
6786
6787 * Makefile.cfg: Adjust to config -> build-aux.
6788 Reported by twledo.
6789
4b367315
AD
67902005-10-21 Akim Demaille <akim@epita.fr>
6791
6792 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
6793 the %parse-params.
6794 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
6795 * data/yacc.c (b4_Pure_if): Rename as...
6796 (b4_yacc_pure_if): this.
6797 (YY_SYMBOL_PRINT, yyparse): Adjust.
6798 * doc/bison.texinfo: Formatting changes.
6799
24cc23d9
AD
68002005-10-21 Akim Demaille <akim@epita.fr>
6801
6802 Finish the transition config -> build-aux.
6803 * configure.ac, Makefile.am: Use build-aux.
6804 * config/prev-version, config/announce-gen, config/Makefile.am:
6805 Move to...
6806 * build-aux/prev-version, build-aux/announce-gen,
6807 * build-aux/Makefile.am: here.
6808
d4476375
AD
68092005-10-14 Akim Demaille <akim@epita.fr>
6810
6811 * examples/calc++/test: Use set -x only when VERBOSE.
6812
302c0aee
PE
68132005-10-13 Paul Eggert <eggert@cs.ucla.edu>
6814
6815 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
6816 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
6817
7625ec2c
AD
68182005-10-13 Akim Demaille <akim@epita.fr>
6819
6820 * src/scan-skel.l: Output the base name parts of the parser and
6821 header file names.
302c0aee 6822 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
6823 additional checks.
6824 Use this to exercise C++ outputs in subdirs.
6825 Reported by Oleg Smolsky.
6826
ba0fe3c7
PE
68272005-10-12 Paul Eggert <eggert@cs.ucla.edu>
6828
6829 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
6830 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
6831 Problem reported by John P. Hartmann.
6832 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
6833 already defined it.
6834
9b8a5ce0
AD
68352005-10-12 Akim Demaille <akim@epita.fr>
6836
6837 * src/parse-gram.y (version_check): Exit 63 to please missing
6838 (stands for "version mismatch).
6839 * tests/input.at, doc/bison.texinfo: Adjust.
6840
4f6e011e
PE
68412005-10-10 Paul Eggert <eggert@cs.ucla.edu>
6842
6843 Work around portability problems with Visual Age C compiler
6844 (xlc and xlC_r) reported by John P. Hartmann.
6845 * data/location.cc (initial_column, initial_line): Remove.
6846 All uses replaced by 0 and 1.
6847 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
6848 that xlc complains about.
6849 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 6850 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 6851 as __STDC__.
4d7aa45e
PE
6852 * data/yacc.c (YYMODERN_C): New macro, which also looks at
6853 __STDC_VERSION__. Use it everywhere instead of looking at
6854 __STDC__ and __cplusplus.
4f6e011e 6855
a1b3bf8c
AD
68562005-10-10 Akim Demaille <akim@epita.fr>
6857
6858 * examples/calc++/test: Be quiet unless VERBOSE.
6859
412e44aa
PE
68602005-10-05 Paul Eggert <eggert@cs.ucla.edu>
6861
2a4647a3
PE
6862 * data/c.m4 (yydestruct, yysymprint):
6863 Use YYUSE instead of casting to void.
6864 * data/glr.c (YYUSE): New macro.
6865 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6866 Use it instead of rolling our own.
6867 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6868 (YYCHK1):
6869 Use /*CONSTCOND*/ to suppress lint warnings.
6870 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6871 (YY_STACK_PRINT): Use 'false' not '0'.
6872 (YYUSE): New macro.
6873 (yysymprint_, yydestruct_): Use it instead of rolling our own.
6874 * data/yacc.c (YYUSE): New macro.
6875 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
6876 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
6877 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
6878
6879
412e44aa
PE
6880 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
6881 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
6882
88c6637f
PE
68832005-10-04 Paul Eggert <eggert@cs.ucla.edu>
6884
2f4f028d
PE
6885 Undo the parts of the unlocked-I/O change that substituted
6886 putc or puts for printf. This might hurt performance a bit,
6887 but some people prefer the printf style.
6888 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
6889 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
6890 All uses replaced by YYFPRINTF and YYDPRINTF.
6891 * data/yacc.c: Likewise.
6892 * lib/bitset.c (bitset_print): Likewise.
6893 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
6894 putc and puts.
6895 * lib/lbitset.c (debug_lbitset): Likewise.
6896 * src/closure.c (print_firsts, print_fderives): Likewise.
6897 * src/gram.c (grammar_dump): Likewise.
6898 * src/lalr.c (look_ahead_tokens_print): Likewise.
6899 * src/output.c (escaped_output): Likewise.
6900 (user_actions_output): Break apart two printfs.
6901 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
6902 * src/reduce.c (reduce_print): Likewise.
6903 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
6904 * src/system.h: Include unlocked-io.h rathe than stdio.h.
6905
88c6637f
PE
6906 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6907 Use assignments rather than casts-to-void to suppress
6908 unused-variable warnings. This pacifies 'lint'.
6909 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
6910 unused-variable warnings.
6911
fb32e373
JMG
69122005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6913
6914 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6915
edb8f44f
PE
69162005-10-02 Paul Eggert <eggert@cs.ucla.edu>
6917
fb9c0b33
PE
6918 Use unlocked I/O for a minor performance improvement on hosts like
6919 GNU/Linux and Solaris that support unlocked I/O. The basic idea
6920 is to use the gnlib unlocked-io module, and to prefer putc and
6921 puts to printf when either will work (since the latter doesn't
6922 come in an unlocked flavor).
6923 * bootstrap (gnulib_modules): Add unlocked-io.
6924 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
6925 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
6926 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
6927 and similarly for puts and putc and printf.
6928 * data/yacc.c: Likewise.
6929 * lib/bitset.c (bitset_print): Likewise.
6930 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
6931 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
6932 to printf.
6933 * lib/lbitset.c (debug_lbitset): Likewise.
6934 * src/closure.c (print_firsts, print_fderives): Likewise.
6935 * src/gram.c (grammar_dump): Likewise.
6936 * src/lalr.c (look_ahead_tokens_print): Likewise.
6937 * src/output.c (escaped_output): Likewise.
6938 (user_actions_output): Coalesce two printfs.
2f4f028d 6939 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
6940 * src/reduce.c (reduce_print): Likewise.
6941 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 6942 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 6943
edb8f44f
PE
6944 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
6945 this confuses xgettext.
6946
b50d2359
AD
69472005-10-02 Akim Demaille <akim@epita.fr>
6948
6949 * bootstrap (gnulib_modules): Add strverscmp.
6950 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
6951 * m4/.cvsignore: Add strverscmp.m4.
6952 * src/parse-gram.y (%require): New token, new rule.
6953 (version_check): New.
6954 * src/scan-gram.l (%require): Adjust.
6955 * tests/input.at (AT_REQUIRE): New.
6956 Use it.
6957 * doc/bison.texinfo (Require Decl): New.
6958 (Calc++ Parser): Use %require.
6959
21667f64
AD
69602005-10-02 Akim Demaille <akim@epita.fr>
6961
6962 * data/location.cc: New.
6963
2b81e969
AD
69642005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
6965 Akim Demaille <akim@epita.fr>
6966
6967 Make sure -odir/foo.cc creates dir/location.hh etc.
6968 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
6969 (spec_file_prefix, spec_verbose_file, spec_graph_file)
6970 (spec_defines_file): Now const.
6971 (dir_prefix): New.
6972 (short_base_name): Remove.
6973 * src/files.c: Adjust.
6974 (dirname.h): Include.
6975 (base_name): Don't prototype it.
6976 (finput): Remove, duplicates gram_in.
6977 (full_base_name, short_base_name): Replace by...
6978 (all_but_ext, all_but_tab_ext): these.
6979 (compute_base_names): Rename as...
6980 (compute_file_name_parts): this.
6981 Update to compute the new variables, including dir_prefix.
6982 Adjust dependencies.
6983 * src/output.c (prepare): Output them.
6984 * src/reader.c: Adjust to use gram_in, not finput.
6985 * src/scan-skel.l (@dir_prefix@): New.
6986
ad6a9b97
JMG
69872005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6988
6989 * lib/subpipe.c: New function end_of_output_subpipe() added
6990 to allow support for non-posix systems. This is a no-op function
6991 for posix systems.
6992
6993 * lib/subpipe.h: New function end_of_output_subpipe() added
6994 to allow support for non-posix systems. This is a no-op function
6995 for posix systems.
6996
6997 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
6998 handle the lack of pipe/fork functionality on non-posix systems.
6999
7000 * djgpp/Makefile.maint: DJGPP specific file.
7001
7002 * djgpp/README.in: DJGPP specific file.
7003
7004 * djgpp/config.bat: DJGPP specific configuration file.
7005
7006 * djgpp/config.sed: DJGPP specific configuration file.
7007
7008 * djgpp/config.site: DJGPP specific configuration file.
7009
7010 * djgpp/config_h.sed: DJGPP specific configuration file.
7011
7012 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
7013
7014 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
7015
fc695704
AD
70162005-10-02 Akim Demaille <akim@epita.fr>
7017
7018 * data/location.cc: New, extract from...
7019 * data/lalr1.cc: here.
7020 (location.hh): Include it after the user prologue, in case the
7021 filename type is defined by the user.
7022 Forward declation location and position before the pre-prologue.
7023 (yyresult_): Rename as...
7024 (yyresult): this, it's a local variable, not an attribute.
7025 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
7026
70272005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
7028
7029 * examples/extexi: Restore the #line generation.
7030
fb9712a9
AD
70312005-09-30 Akim Demaille <akim@epita.fr>,
7032 Alexandre Duret-Lutz <adl@gnu.org>
7033
7034 Move the token type and YYSTYPE in the parser class.
7035 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
7036 (parser::token): New, from the moved free definition of tokens.
7037 (parser::semantic_value): Now a full definition instead of an
7038 indirection to YYSTYPE.
7039 (b4_post_prologue): No longer included in the header file, but
7040 in the implementation file.
7041 * doc/bison.texi (C+ Language Interface): Update.
7042 * src/parse-gram.y: Support unary %define.
7043 * tests/actions.at: Define global_tokens_and_yystype for backward
7044 compatibility until we update the tests.
7045 * tests/calc.at: Idem.
7046 (first_line, first_column, last_line, last_column): Define for lalr1.cc
7047 to simplify the code.
7048
55f0c7b1
PE
70492005-09-29 Paul Eggert <eggert@cs.ucla.edu>
7050
7051 Port to SunOS 4.1.4, which lacks strtoul and strerror.
7052 Ah, the good old days! Problem reported by Peter Klein.
7053 * bootstrap (gnulib_modules): Add strerror, strtoul.
7054 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
7055 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
7056
fb9712a9 70572005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
7058
7059 * data/c.m4 (b4_error_verbose_if): New.
7060 * data/lalr1.cc: Use it.
7061 (YYERROR_VERBOSE_IF): Remove.
7062 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
7063 parser members, replaced by...
7064 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
7065 local variables.
7066 (yysyntax_error_): Takes the state number as argument.
7067 (yyreduce_print_): Use the argument yyrule, not the former
7068 attribute yyn_.
7069
8a6f72f3
PE
70702005-09-26 Paul Eggert <eggert@cs.ucla.edu>
7071
7072 * bootstrap (gnulib_modules): Add verify.
7073 * lib/.cvsignore: Add verify.h.
7074 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
7075 * src/system.h (verify): Remove.
7076 Include verify.h instead.
7077 * src/tables.c (tables_generate): Use new API for 'verify'.
7078
0d50976f
PE
70792005-09-21 Paul Eggert <eggert@cs.ucla.edu>
7080
ebc3737e
PE
7081 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
7082 local variables whose names begin with 'yy'.
7083 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7084 Trivial changes from Joel E. Denny.
7085
0d50976f
PE
7086 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
7087 it itself.
7088 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
7089 don't use alloca any more.
7090
7091 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
7092 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 7093 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
7094 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
7095 to match yacc.c, to test more hosts.
7096
a05b79df
PE
70972005-09-20 Paul Eggert <eggert@cs.ucla.edu>
7098
55289366
PE
7099 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
7100 doesn't affect behavior.
7101 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
7102 Solaris, AIX, MSC.
7103 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
7104 This works a bit better with glibc, if user code has already included
7105 stdlib.h.
7106 * doc/bison.texinfo (Bison Parser): Document that users can't
7107 arbitrarily use malloc and free for other purposes. Document
7108 that <alloca.h> and <malloc.h> might be included.
7109 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
7110 user must declare alloca.
7111
a05b79df
PE
7112 * HACKING (release): Forwarn the Translation Project about
7113 stable releses.
7114
3ab2ca22
AD
71152005-09-20 Akim Demaille <akim@epita.fr>
7116
7117 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
7118
a9739e7c
PE
71192005-09-19 Paul Eggert <eggert@cs.ucla.edu>
7120
a702593e
PE
7121 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
7122 (YYSTACK_ALLOC_MAXIMUM): Use it.
7123 (yysyntax_error): New function.
7124 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
7125 multiple syntax errors are reported, and alloca is being used.
7126 Instead, reallocate buffers twice as big each time, so that
7127 we waste at most half the allocated memory. Start with a small
7128 (128-byte) buffer that will suffice in most cases anyway.
7129 Use yysyntax_error to do most of the work.
7130
7131 * doc/bison.texinfo (Error Reporting, Table of Symbols):
7132 yynerrs is the number of errors reported, not the number of
7133 errors encountered.
7134
a9739e7c
PE
7135 * tests/glr-regression.at (Duplicated user destructor for lookahead):
7136 Mark it as expected to fail.
7137 Cast result of malloc; problem reported by twlevo@xs4all.nl.
7138 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
7139 Don't start user-code symbols with "yy", to avoid name space problems.
7140
f479c6c6
AD
71412005-09-19 Akim Demaille <akim@epita.fr>
7142
7143 Remove the traits, failed experiment.
7144 It never proved useful, and anyway because of the current
7145 definition, it was not possible to have several specialization of
7146 this traits, making it useless.
7147 * data/lalr1.cc (yy:traits): Remove.
7148 Inline its definitions in the parser class.
7149
e2586f82
AD
71502005-09-19 Akim Demaille <akim@epita.fr>
7151
7152 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
7153 least Mac OSX with a /usr/local install of gettext.
7154
2e8cf949
AD
71552005-09-19 Akim Demaille <akim@epita.fr>
7156
7157 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
7158 and yytoken for similarity with the other skeletons.
7159
c7fb0b90
AD
71602005-09-19 Akim Demaille <akim@epita.fr>
7161
4e26c69e 7162 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 7163
1bd0deda
PE
71642005-09-16 Paul Eggert <eggert@cs.ucla.edu>
7165
7166 * NEWS: Version 2.1.
7167
7168 * NEWS: Remove notice of yytname change, since it was never in an
7169 official release.
7170 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
7171 diagnostic.
7172 * src/output.c (prepare): Likewise.
7173 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
7174 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
7175 is not defined. This is an awful hack, but it's enough for now.
7176 All callers changed.
7177 * tests/glr-regression-at (make_value): Args are const pointers now,
7178 to avoid GCC warning.
7179 (Duplicated user destructor for lookahead): New test. Currently
7180 skipped. It fails on my host but I'm not sure it'll always fail.
7181
71822005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
7183
7184 * src/symtab.h (struct symbol): Declare the printer and destructor
7185 as const, to avoid accidental calls to free.
7186 (symbol_destructor_set, symbol_printer_set): Adjust.
7187 * src/symtab.c: Adjust.
7188
1bd0deda 71892005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
7190
7191 * data/c.m4 (b4_token_enums): New.
7192 (b4_token_defines): Rename as...
7193 (b4_token_enums_defines): this.
7194 (b4_token_defines): New, output only the #defines.
7195 * data/yacc.c, data/glr.c: Adjust.
7196 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
7197 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
7198 as default values.
7199
dbcdae2d
AD
72002005-09-16 Akim Demaille <akim@epita.fr>
7201
7202 * data/lalr1.cc (yylex_): Remove, inline its code.
7203 (yyreport_syntax_error_): Remove, replaced by...
7204 (yysyntax_error_): this which returns a string and leaves to the
7205 caller the call to the users' error function.
7206 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
7207 Move from members of the parser object...
7208 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
7209 to local variables of the parse function.
7210
70d8f291
AD
72112005-09-16 Akim Demaille <akim@epita.fr>
7212
7213 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
7214 since it's in Bison's name space.
7215
b47dbebe
PE
72162005-09-15 Paul Eggert <eggert@cs.ucla.edu>
7217
ae199bf1
PE
7218 * data/glr.c (yyresolveValue): Add default case to pacify
7219 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
7220
b47dbebe
PE
7221 * NEWS: Document when yyparse started to return 2.
7222 * doc/bison.texinfo (Parser Function): Document when yyparse
7223 returns 2.
7224
7225 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
7226 (b4_filename_type): Renamed back from b4_file_name_type. All uses
7227 changed.
7228 (class position): file_name -> filename (reverting). All uses changed.
7229
72302005-09-14 Paul Eggert <eggert@cs.ucla.edu>
7231
7232 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
7233 do anything if $@ exists. This reverts part of the 2005-07-07
7234 patch.
7235
00292f66
PE
72362005-09-11 Paul Eggert <eggert@cs.ucla.edu>
7237
7238 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
7239 contains obsolete information and isn't worth distributing as a
7240 separate file anyway.
7241 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
7242 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
7243 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
7244 (yyparse): Abort if user code uses longjmp to throw an unexpected
7245 value.
7246
a420f962
PE
72472005-09-09 Paul Eggert <eggert@cs.ucla.edu>
7248
00292f66
PE
7249 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
7250 Suggested by twlevo@xs4all.nl.
7251
127287e9
PE
7252 * data/glr.c (YYCHK1): Do not assume YYE is in range.
7253 This avoids a diagnostic from gcc -Wswitch-enum.
7254 Problem reported by twlevo@xs4all.nl.
7255
a420f962
PE
7256 * doc/bison.texinfo: Don't use "filename", as per GNU coding
7257 standards. Use "file name" or "file" or "name", depending on
7258 the context.
7259 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
7260 not to hack/foo.tab.c.
7261 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
7262 * data/glr.c: b4_filename -> b4_file_name.
7263 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
7264 All uses changed.
7265 (class position): filename -> file_name. All uses changed.
7266 * data/yacc.c: b4_filename -> b4_file_name.
7267 * lib/bitset.h: filename -> file_name in local vars.
7268 * lib/bitset_stats.c: Likewise.
7269 * src/files.c: Likewise.
7270 * src/scan-skel.l ("@output ".*\n): Likewise.
7271 * src/files.c (file_name_split): Renamed from filename_split.
7272 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
7273
72742005-09-08 Paul Eggert <eggert@cs.ucla.edu>
7275
7276 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
7277 to accommodate latest gnulib.
7278
7279 * tests/glr-regression.at (Duplicate representation of merged trees):
7280 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
7281
7282 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
7283 needed.
7284
42a6501d
PE
72852005-08-26 Paul Eggert <eggert@cs.ucla.edu>
7286
7287 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
7288 All uses changed. Invoke user destructor after an error during a
7289 split parse (trivial change from Joel E. Denny).
7290
7291 * tests/glr-regression.at
7292 (User destructor after an error during a split parse): New test case.
7293 Problem reported by Joel E. Denny in:
7294 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
7295
ef9a1faf
PE
72962005-08-25 Paul Eggert <eggert@cs.ucla.edu>
7297
5b4aaf78
PE
7298 * README-cvs: Give URLs for recommended tools.
7299 Mention Gzip version problem, and bootstrapping issues.
7300 Remove troubleshooting section, as it's somewhat obsolete.
7301
b5240ba5
PE
7302 * bootstrap (no_cache): New var, to accommodate different wget
7303 variants. Use it instead of '-C off'. Problem reported by
7304 twlevo@xs4all.nl.
7305
ef9a1faf
PE
7306 * data/glr.c (yydestroyStackItem): New function.
7307 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
7308 debugging information. Problem reported by Joel E. Denny.
7309
e6efa9da
AD
73102005-08-25 Akim Demaille <akim@epita.fr>
7311
7312 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
7313
adc90f13
PE
73142005-08-24 Paul Eggert <eggert@cs.ucla.edu>
7315
7316 * data/glr.c (yyrecoverSyntaxError, yyreturn):
7317 Don't invoke destructor on unresolved entries.
7318 * tests/glr-regression.at
7319 (User destructor for unresolved GLR semantic value): New test case.
7320 Problem reported by Joel E. Denny in:
7321 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
7322
f9315de5
PE
73232005-08-21 Paul Eggert <eggert@cs.ucla.edu>
7324
15d29c1f
PE
7325 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
7326 Add strnlen.c.
7327 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
7328 lib-prefix.m4, po.m4.
7329
dd5f2af2
PE
7330 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
7331 in yydestruct diagnostic, since it might not be an error.
7332 Problem reported by Joel Denny near end of
7333 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 7334 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
7335 * data/yacc.c (yyreturn): Likewise.
7336 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
7337
7338 * src/files.c: Remove obsolete FIXME comment.
7339
7340 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
7341 with the other templates, and to fix bogus run-on messages such
7342 as the one reported at the end of
7343 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
7344 All callers changed to avoid the newline.
7345 (yyprocessOneStack): Output two lines rather than one, to accommodate
7346 the above change. This changes the debug output format slightly.
7347
f9315de5
PE
7348 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
7349 reported by Joel E. Denny in
7350 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
7351 (trivial change).
7352 * tests/glr-regression.at (Duplicate representation of merged trees):
7353 New test, from Joel E. Denny in:
7354 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
7355 * THANKS: Add Joel E. Denny.
7356
7357 * configure.ac (AC_INIT): Bump to 2.0c.
7358
04098407
PE
73592005-07-24 Paul Eggert <eggert@cs.ucla.edu>
7360
7361 * NEWS: Version 2.0b.
7362
ca5d2013
PE
7363 * Makefile.am (SUBDIRS): Put examples before tests, so that
7364 "make check" doesn't finish with "All 1 tests passed".
7365
3d54b576
PE
7366 * tests/regression.at (Token definitions): Don't rely on
7367 AT_PARSER_CHECK for data that contains backslashes. It currently
7368 uses 'echo', and 'echo' isn't portable if its argument contains
7369 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
7370 that the byte '\0xff' is not printable in the C locale; it is,
7371 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
7372 not printable, so use '\0x81' to test.
7373
d53ae497
PE
7374 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
7375 version of GCC, since the macro is used with non-GCC compilers.
7376
fc01665e
PE
7377 Fix core dump reported by Pablo De Napoli in
7378 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
7379 * tests/regression.at (Invalid inputs with {}): New test.
7380 * src/parse-gram.y (token_name): Translate type before using
7381 it as an index.
7382
04098407
PE
7383 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
7384 the user's name space. All uses changed to __attribute__
7385 ((__unused__)).
7386 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
7387 Add __attribute__ ((__noreturn__)).
7388
7389 * etc/clcommit: Remove. We weren't using it, and it failed
7390 "make maintainer-distcheck".
7391 * Makefile.maint: Merge from coreutils.
7392 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
7393 (syntax-check-rules): Change list of rules as described below.
7394 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
7395 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
7396 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
7397 (sc_trailing_space): New rules.
7398 (sc_xalloc_h_in_src): Remove.
7399 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
7400 (sc_space_tab, sc_error_exit_success, sc_changelog):
7401 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
7402 (makefile-check, po-check, author_mark_check):
7403 (makefile_path_separator_check, copyright-check):
7404 Use grep -n, to make it easier to find violations.
7405 Use CVS_LIST and CVS_LIST_EXCEPT.
7406 (header_regexp, h_re): Remove.
7407 (dd_c): New macro.
7408 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
7409 (my-distcheck): Use more-modern GCC flags.
7410 (signatures, %.asc): Remove.
7411 (rel-files, announcement): Remove signatures.
7412 Restore old updating code, even though we don't use it, so
7413 that we're the same as coreutils.
7414 (alpha, beta, major): Depend on news-date-check.
7415 Make the upload commands.
7416
7417 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
7418 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
7419 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
7420 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
7421 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
7422 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
7423 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
7424 * tests/sets.at: Likewise.
7425
7426 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
7427 we comment out the Autoconf version number.
7428 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
7429 it's error-prone and "make maintainer-distcheck" rejects it.
7430
7431 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
7432 Indent calls to "error" to pacify "make maintainer-distcheck",
7433 when the calls are not intended to be translated.
7434 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
7435
7436 * src/Makefile.am (DEFS): Use +=, to pacify
7437 "make maintainer-distcheck".
7438 (bison_SOURCES): Add scan-skel.h.
7439 (sc_tight_scope): New rule, from coreutils.
7440
7441 * src/files.c (src_extension, header_extension):
7442 Now static, not extern.
7443 * src/getargs.c (short_options): Likewise.
7444 * src/muscle_tab.c (muscle_table): Likewise.
7445 * src/parse-gram.y (current_class, current_type, current_prec):
7446 Likewise.
7447 * src/reader.c (grammar_end, previous_rule_end): Likewise.
7448 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
7449 * src/main.c (main): Cast bindtextdomain and textdomain calls to
7450 void, to avoid warning when NLS is disabled.
7451 * src/output.c: Include scan-skel.h.
7452 (scan_skel): Remove decl, since scan-skel.h does this.
7453 (output_skeleton):
7454 Indent calls to "error" to pacify "make maintainer-distcheck".
7455 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
7456 * src/reader.h (gram_end, gram_lineno): New decls to pacify
7457 "make maintainer-distcheck".
7458 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
7459 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
7460 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
7461 (skel_lex_destroy, scan_skel): Move these decls to...
7462 * src/scan-skel.h: New file.
7463 * src/uniqstr.c (uniqstr_assert):
7464 Indent calls to "error" to pacify "make maintainer-distcheck".
7465
7466 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
7467 not @VAR@.
7468
7469 * tests/torture.at: Revamp to avoid misuse of atoi that
7470 "make maintainer-distcheck" complained about.
7471
7472 * examples/extexi (message): Don't print a message more than once,
7473 and omit line-number decoration that makes Emacs compile think
7474 that informative messages are worth worrying about.
7475
74762005-07-22 Paul Eggert <eggert@cs.ucla.edu>
7477
7478 * configure.ac: Update version number.
7479
7480 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
7481 accidentally.
7482 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
7483 autogenerated by the maintainer.
7484 * examples/calc++/.cvsignore: Add *.yy.
7485
7486 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
7487 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7488 * lib/bitsetv.c (bitsetv_alloc): Likewise.
7489
7490 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
7491
7492 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
7493 from maintainer-distcheck about casting the argument of 'free'.
7494
7495 * NEWS: Mention recent yytname changes.
7496 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
7497
7498 * bootstrap: For translations that have not yet been upgraded to
7499 the new runtime-po domain, prime the pump by extracting the
7500 relevant strings from the obsolete translations. This code can be
7501 removed once the bison-runtime domain has been translated by each
7502 team.
7503
7504 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
7505 now that token names are already quoted.
7506
7507 Fix problem reported by Anthony Heading.
7508 * data/glr.c (YYTOKEN_TABLE): New macro.
7509 (yytname): Define if YYTOKEN_TABLE.
7510 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
7511 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
7512 (YYERROR_VERBOSE): Define the same way the other skeletons do.
7513 * src/output.c (prepare_symbols): Output token_table_flag.
7514
0ffda363
PE
75152005-07-21 Paul Eggert <eggert@cs.ucla.edu>
7516
7517 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
7518 again if the first call fails.
7519
7520 * data/glr.c (yytnamerr): New function.
7521 (yyreportSyntaxError): Use it to dequote most string literals.
7522 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
7523 with other skeletons. All uses changed.
7524 (yytnameerr_): New function.
7525 (yyreport_syntax_error): Use it to dequote most string literals.
7526 * data/yacc.c (yytnamerr): New function.
7527 (yyerrlab): Use it to decode most string literals.
7528 * doc/bison.texinfo (Decl Summary, Calling Convention):
7529 Clarify quoting convention of yytname.
7530 * src/output.c (prepare_symbols): Quote all names. This undoes
7531 the 2005-04-17 change, which is now accomplished (mostly) via
7532 changes in the parsers as described above.
7533 * tests/regression.at (Token definitions, Web2c Actions):
7534 Undo most 2005-04-17 change here, too.
7535
75362005-07-20 Paul Eggert <eggert@cs.ucla.edu>
7537
7538 Fix more problems reported by twlevo@xs4all.nl.
7539 * tests/cxx-type.at: Don't pipe output of ./types through sed to
7540 remove trailing spaces. This loses the exit status of ./types,
7541 and isn't needed since ./types shouldn't be emitting trailing
7542 spaces.
7543 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
7544 as the stack isn't valid in that case.
7545
7546 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7547 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7548 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7549 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
7550 is used.
7551 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
7552 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7553 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7554 Likewise.
7555
7556 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
7557 overly-picky compilers that reject 'char *foo = "bar";'.
7558
7559 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
7560 to FILE * parameter, not to stderr. This fixes a typo introduced
7561 in the 2005-07-12 change.
7562
7563 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
7564 warnings from GCC 4.
7565
7566 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
7567 (yyglrShiftDefer, yysplitStack):
7568 Remove unused parameters b4_pure_formals. All uses changed.
7569 (yyglrShift): Remove unused parameters b4_user_formals.
7570 All uses changed.
7571 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
7572
6100a9aa
PE
75732005-07-18 Paul Eggert <eggert@cs.ucla.edu>
7574
258b75ca
PE
7575 Destructor cleanups and regularization among the three skeletons.
7576 * NEWS: Document the behavior changes.
7577 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
7578 stack before failing, as the cleanup code will do it for us now.
7579 * data/lalr1.cc (yyerrlab): Likewise.
7580 * data/glr.c (yyparse): Pop everything off the stack before
7581 freeing it, so that destructors get called properly.
7582 * data/lalr1.cc (yyreturn): Likewise.
7583 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
7584 This is more consistent.
7585 * doc/bison.texinfo (Destructor Decl): Mention more reasons
7586 why destructors might be called. 1.875 -> 2.1.
7587 (Destructor Decl, Decl Summary, Table of Symbols):
7588 Some English-language cleanups for %destructor.
7589 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7590 Add output line for destructor of start symbol.
7591 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
7592 because of that same extra output line.
7593
1a059451
PE
7594 * NEWS: Document minor wording changes in diagnostics of
7595 Bison-generated parsers.
7596 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
7597 Remove unused formals. All uses changed.
7598 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
7599 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
7600 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
7601 Rename yyoverflowab to yyexhaustedlab.
7602 When memory exhaustion occurs during syntax-error reporting,
7603 report it separately rather than in a single diagnostic; this
7604 eases translation.
7605 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
7606 (Memory Exhausted): Renamed from Parser Stack Overflow.
7607 Revamp wording slightly to prefer "memory exhaustion".
7608 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
7609
97460c78
PE
7610 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
7611
30757c8c
PE
7612 Add i18n support to the GLR skeleton. Partially fix the C++
7613 skeleton; a C++ expert needs to finish this. Remove debugging
7614 msgids; there's little point to having them translated, since they
7615 can be understood only by someone who can read the
7616 (English-language) source code.
7617
7618 Generate runtime-po/bison-runtime.pot automatically, so that we
7619 don't have to worry about garbage getting in that file. We'll
7620 make sure after the next official release that old msgids don't
7621 get lost. See
7622 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
7623
7624 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
7625 Now auto-generated.
7626 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
7627 Fix typos in explanations of the runtime file.
7628 * bootstrap: Change gettext keyword from YYI18N to YY_.
7629 Use standard Makefile.in.in in runtime-po, since we'll arrange
7630 for backward-compatible bison-runtime.po files in a different way.
7631 * data/glr.c (YY_): New macro, from yacc.c.
7632 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
7633 Translate messages intended for users.
7634 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
7635 the wording in the other skeletons. We don't know that the memory
7636 is virtual.
7637 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
7638 Use same method that yacc.c uses.
7639 Don't translate debugging messages.
7640 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
7641 it doesn't work (yet), and requires C++ expertise to fix.
7642 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
7643 Move defn to a more logical place, to be consistent with other
7644 skeletons.
7645 Don't translate debugging messages.
7646 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
7647 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
7648 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
7649 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
7650
ac8c5689
PE
7651 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
7652 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
7653 void, not int.
7654 * tests/glr-regression.at (Badly Collapsed GLR States):
7655 Likewise.
7656 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
7657 yylex should return 0 at EOF rather than aborting.
7658
6100a9aa
PE
7659 Improve tests for stack overflow in GLR parser.
7660 Problem reported by twlevo@xs4all.nl.
7661 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
7662 All uses removed.
7663 (yyStackOverflow): Just longjmp, but with value 2 so that caller
7664 can handle the problem.
7665 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
7666 (yyparse): New local variable yyresult to record the result.
7667 Use result of setjmp to set it, rather than storing itinto
7668 struct.
7669 (yyDone): Remove label.
7670 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
7671 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
7672 if YYABORT is used).
7673 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
7674 yyparse status; put status > 1 into diagnostic.
7675 Check that status==2 works.
7676 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
7677 Use exit status 3 for failure to open (which shouldn't happen).
7678
15f40952
PE
76792005-07-17 Paul Eggert <eggert@cs.ucla.edu>
7680
67fd79c4
PE
7681 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
7682 1 on syntax error; just let yyparse do its thing.
7683 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
7684 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
7685 (Exploding the Stack Size with Alloca):
7686 (Exploding the Stack Size with Malloc):
7687 Expect exit status 2, not 1, since the parser is supposed to blow
7688 its stack. Problem reported by twlevo@xs4all.nl.
7689
15f40952
PE
7690 * data/glr.c (yyparse): Don't assume that the initial calls
7691 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
7692 Print a stack-overflow message and fail instead.
7693 Initialize the line-number information before creating the stack,
7694 so that the stack-overflow message can report line zero safely.
7695
f32c66b5
PE
76962005-07-14 Paul Eggert <eggert@cs.ucla.edu>
7697
a22ff96f 7698 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
7699 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
7700 (yyuserMerge): Provide a default case if b4_mergers is empty.
7701 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
7702 * tests/glr-regression.at
7703 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 7704 Add casts to pacify C++ compilers.
1beb0b24
PE
7705 * tests/glr-regression.at (Improper merging of GLR delayed action
7706 sets): Declare yylex before using it.
f32c66b5 7707 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
7708 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
7709 test for valgrind; valgrind is independent of g++.
7710 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
7711 for compatibility with POSIX 1003.1-2001 (if running coreutils).
7712 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
7713 Use a destructor, so that we can expand the stack. Change
7714 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 7715
d741bd1b
PE
77162005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7717
7718 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
7719 a valgrind failure. Problem reported by twlevo@xs4all.nl.
7720
0410a6e0
PE
77212005-07-13 Paul Eggert <eggert@cs.ucla.edu>
7722
7723 * PACKAGING: New file, suggested by Bruno Haible and taken from
7724 similar wording in gettext's PACKAGING file.
7725 * NEWS: Mention PACKAGING.
7726 * Makefile.am (EXTRA_DIST): Add PACKAGING.
7727
f7ab6a50
PE
77282005-07-12 Paul Eggert <eggert@cs.ucla.edu>
7729
baf785db 7730 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
7731 * bootstrap: Get runtime translations into runtime-po.
7732 Create runtime-po files automatically, if possible.
7733 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
7734 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
7735 does not infringe on the user's name space.
7736 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
7737 * doc/bison.texinfo (Internationalization): Revamp the English
7738 and Texinfo syntax a bit, to try to make it clearer.
7739 (Bison Options, Option Cross Key): Mention --print-localedir.
7740 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
7741 YYENABLE_NLS. Quote a bit more.
7742 * runtime-po/.cvsignore: New file.
7743 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
7744 * runtime-po/Rules-quot: Remove; now created by bootstrap.
7745 * runtime-po/quot.sed: Likewise.
7746 * runtime-po/boldquot.sed: Likewise.
7747 * runtime-po/en@quot.header: Likewise.
7748 * runtime-po/en@boldquot.header: Likewise.
7749 * runtime-po/insert-header.sin: Likewise.
7750 * runtime-po/remove-potcdate.sin: Likewise.
7751 * runtime-po/Makevars: Likewise.
7752 * runtime-po/LINGUAS: Likewise.
7753 * runtime-po/de.po: Likewise; we will rely on the translation project
7754 to maintain this, so "bootstrap" should get it.
0410a6e0 7755 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
7756 its value.
7757 * src/main.c (main): Bind the bison-runtime domain, too.
7758
77592005-07-12 Bruno Haible <bruno@clisp.org>
7760
7761 * data/yacc.c: Include <libintl.h> when NLS is enabled.
7762 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
7763 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
7764 * runtime-po: New directory.
7765 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
7766 $(DOMAIN).pot-update rule, so that old messages are never dropped.
7767 * runtime-po/Rules-quot: New file, copied from po/.
7768 * runtime-po/quot.sed: Likewise.
7769 * runtime-po/boldquot.sed: Likewise.
7770 * runtime-po/en@quot.header: Likewise.
7771 * runtime-po/en@boldquot.header: Likewise.
7772 * runtime-po/insert-header.sin: Likewise.
7773 * runtime-po/remove-potcdate.sin: Likewise.
7774 * runtime-po/Makevars: New file.
7775 * runtime-po/POTFILES.in: New file.
7776 * runtime-po/LINGUAS: New file.
7777 * runtime-po/bison-runtime.pot: New file.
7778 * runtime-po/de.po: New file.
7779 * m4/bison.m4: New file.
7780 * Makefile.am (SUBDIRS): Add runtime-po.
7781 (aclocaldir, aclocal_DATA): New variables.
7782 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
7783 Define aclocaldir.
7784 * src/getargs.c (usage): Document --print-localedir option.
7785 (PRINT_LOCALEDIR_OPTION): New enum item.
7786 (long_options): Add --print-localedir option.
7787 (getargs): Handle --print-localedir option.
7788 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
7789 (Internationalization): New section.
7790
22dda0f0
AD
77912005-07-12 Akim Demaille <akim@epita.fr>
7792
7793 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
7794 for consistency with the rest of the code.
7795 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
7796 Add separators.
7797
82b248ad
AD
77982005-07-12 Akim Demaille <akim@epita.fr>
7799
7800 * src/parse-gram.y: Use %printer instead of YYPRINT.
7801
fa0e9314
AD
78022005-07-12 Akim Demaille <akim@epita.fr>
7803
867a3e00
AD
7804 * src/symtab.h, src/symtab.c (symbol_print): New.
7805 * src/symlist.h, src/symlist.c (symbol_list_print): New.
7806 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
7807
78082005-07-12 Akim Demaille <akim@epita.fr>
7809
7810 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
7811 b4_at_dollar and b4_dollar_dollar.
7812
e054b190
PE
78132005-07-11 Paul Eggert <eggert@cs.ucla.edu>
7814
7815 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
7816 and Pennello's paper.
7817
34160ec4
PE
78182005-07-09 Paul Eggert <eggert@cs.ucla.edu>
7819
407d4a75
PE
7820 * data/yacc.c (yyparse): Undo previous patch. Instead,
7821 set yylsp[0] and yyvsp[0] only if the initial action
7822 sets yylloc and yylval, respectively.
7823
34160ec4
PE
7824 * data/yacc.c (yyparse): In the initial action, set
7825 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
7826 This avoids the use of undefined variables if the initial
7827 action does not set yylloc and/or yylval.
7828
c3d5a4a7
PE
78292005-07-07 Paul Eggert <eggert@cs.ucla.edu>
7830
b34d96c1
PE
7831 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
7832 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
7833 Remove from CVS. These files are automatically generated.
7834 * examples/extexi: Clarify that this file is now part of Bison,
7835 not GNU M4, and that it works with any POSIX-compatible Awk.
7836 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
7837 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
7838 so that we also get calc++-parser.yy. Geneate it.
7839 Use $(AWK), not gawk, since any conforming Awk will do.
7840 Put comment before action, since older 'make' can't handle comment
7841 in action.
7842 $(BUILT_SOURCES): List all built sources, not just some of them.
7843 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
7844 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
7845 $($(calc_sources_generated)): Remove unnecessary test for existence
7846 of target. (This had a shell syntax error anyway; a stray "x".)
7847 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
7848 calc++-parser.yy.
7849 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
7850
c3d5a4a7
PE
7851 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
7852 implied by the other modules.
7853
828c373b
AD
78542005-07-06 Akim Demaille <akim@epita.fr>
7855
7856 Bind examples/calc++ to the package.
7857 * examples/calc++/Makefile: Remove, replaced by...
7858 * examples/calc++/Makefile.am: ... this new file.
7859 * examples/calc++/test: Remove input.
7860 * examples/calc++/compile: Remove.
7861 * examples/Makefile.am: New.
7862 * configure.ac, Makefile.am: Adjust.
7863 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
7864
63cb01d6
PE
78652005-07-05 Paul Eggert <eggert@cs.ucla.edu>
7866
fd2df2ed
PE
7867 * data/glr.c (yyFail): Drastically simplify; since the format argument
7868 never had any % directives, we can simply pass it to yyerror.
7869 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
7870 be modified later, as that is the usual style in glr.c.
7871 Problems reported by Paul Hilfinger.
7872
63cb01d6
PE
7873 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
7874 and size overflow errors.
7875 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
7876 in case the user prolog sets feature-test macros like _GNU_SOURCE.
7877 (YYSIZEMAX): New macro.
7878 (yystpcpy): New function, taken from yacc.c.
7879 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
7880 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
7881 so that we don't have to maintain their signatures.
7882 (yyFail): Check for buffer overflow, by using vsnprintf rather
7883 than vsprintf. Allocate a bigger buffer if possible.
7884 Report an error if buffer allocation fails.
7885 (yyStackOverflow): New function.
7886 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
7887 the initialization was successful. It might fail if storage was
7888 exhausted.
7889 (yyexpandGLRStack): Add more checks for storage allocation failure.
7890 Use yyStackOverflow to report failures.
7891 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
7892 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
7893 Don't assume stack number fits in int.
7894 (yysplitStack): Check for storage allocation failure.
7895 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
7896 can print diagnostics on storage allocation failure. All callers
7897 changed.
7898 (yyresolveValue): Use yybool for boolean.
7899 (yyreportSyntaxError): Check for size-calculation overflow.
7900 This code is taken from yacc.c.
7901 (yyparse): Check for storage allocation errors when allocating
7902 the initial stack.
7903
1c59e0a1
AD
79042005-07-05 Akim Demaille <akim@epita.fr>
7905
7906 Extract calc++ from the documentation.
7907 * doc/bison.texinfo (Calc++): Add the extraction marks.
7908 * examples/extexi: New, from the aborted GNU Programming 2E.
7909 Separate the different paragraph of a file with empty lines.
7910 * examples/Makefile: Use it to extract the whole calc++ example.
7911
8a0adb01
AD
79122005-06-24 Akim Demaille <akim@epita.fr>
7913
7914 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
7915 class typedefs.
7916
12545799
AD
79172005-06-22 Akim Demaille <akim@epita.fr>
7918
7919 * doc/bison.texinfo (C++ Language Interface): First stab.
7920 (C++ Parsers): Remove.
7921
99be0235
AD
79222005-06-22 Akim Demaille <akim@epita.fr>
7923
7924 * data/lalr1.cc (yylex_): Honor %lex-param.
7925
0ffd4fd1
AD
79262005-06-22 Akim Demaille <akim@epita.fr>
7927
7928 Start a set of simple examples.
7929 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
7930 * examples/calc++/calc++-driver.hh,
7931 * examples/calc++/calc++-parser.yy,
7932 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
7933 * examples/calc++/compile, examples/calc++/test: New.
7934
0925ebb4
PE
79352005-06-09 Paul Eggert <eggert@cs.ucla.edu>
7936
7937 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
7938 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
7939 which stems from the 2005-05-27 patch.
7940
43d3b664
PH
79412005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7942
7943 * data/glr.c: Modify treatment of unused parameters to permit use
7944 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
7945
3062864d
PE
79462005-05-30 Paul Eggert <eggert@cs.ucla.edu>
7947
7948 Fix infringement on user name space reported by Janos Zoltan Szabo.
7949 * data/yacc.c (yyparse): strlen -> yystrlen.
7950
989b5b8e
AD
79512005-05-30 Akim Demaille <akim@epita.fr>
7952
7953 * data/lalr1.cc (_): New.
7954 Translate the various messages.
7955
bedf57f5
PE
79562005-05-27 Paul Eggert <eggert@cs.ucla.edu>
7957
7958 Fix infringement on user name space reported by Bruno Haible.
7959 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
7960 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
7961 the user's name space.
7962 (alloca): Include <stdlib.h> to get it, if it's not built in.
7963 (YYMALLOC, YYFREE): Define only if needed.
7964 (malloc, free): Declare, but only if needed, as this infringes on
7965 the user name space.
7966
4d1801f1
PE
79672005-05-25 Paul Eggert <eggert@cs.ucla.edu>
7968
7969 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
7970 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
7971 with %d format.
7972 * lib/ebitset.c (min, max): Undef before defining.
7973 * lib/vbitset.c (min, max): Likewise.
7974 * lib/subpipe.c (create_subpipe): Save local variables in case
7975 vfork clobbers them.
7976
79772005-05-24 Bruno Haible <bruno@clisp.org>
7978
7979 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
7980 error message syntax used by gcc-4.0.
7981
b94a9e1e
PE
79822005-05-23 Paul Eggert <eggert@cs.ucla.edu>
7983
85ac3861
PE
7984 * README: Mention m4 1.4.3. Remove obsolete advice about
7985 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
7986
b94a9e1e
PE
7987 * bootstrap: Remove workaround for problem I encountered with
7988 gettext 0.14.1; it seems to be fixed now.
7989
51c30d21
PE
79902005-05-22 Paul Eggert <eggert@cs.ucla.edu>
7991
009ce67d
PE
7992 * NEWS: Version 2.0a.
7993
f2a97c62
PE
7994 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
7995 the previous change.
7996
c8775f93
PE
7997 Various maintainer cleanups.
7998 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
7999 conftest*, for benefit of CVS commands run at the same time as
8000 "configure". Add build-aux, since "bootstrap" now creates it and
8001 its subfiles.
8002 * Makefile.cfg (move_if_change): Remove.
8003 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
8004 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
8005 (po_repo, do-po-update, po-update, wget_files, get-targets):
8006 (config.guess-url_prefix, config.sub-url_prefix):
8007 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
8008 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
8009 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
8010 Remove.
8011 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
8012 this is now the recommended name.
8013 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
8014 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
8015 ylwrap. These files now go into build-aux.
8016 * config/move-if-change: Remove.
8017 * config/prev-version.txt: Bump from 1.75 to 2.0.
8018
3ea5f0ec
PE
8019 * bootstrap: Add stdio-safer, unistd-safer modules.
8020 Remove m4/glibc2.m4 (introduced by latest gnulib, but
8021 we don't need it).
8022 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
8023 fopen-safer.c, stdio-safer.h, unistd-safer.h.
8024 * lib/subpipe.c: Include "unistd-safer.h".
8025 (create_subpipe): Make sure all the newly-created
8026 file descriptors are > 2, so that diagnostics don't
8027 get sent down them (which might cause Bison to hang, in theory).
8028 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
8029 * src/files.c (xfopen): Use fopen_safer, not fopen.
8030
51c30d21
PE
8031 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
8032 yesterday's yacc.c fix.
8033
cea1469d
PE
80342005-05-21 Paul Eggert <eggert@cs.ucla.edu>
8035
3ea5f0ec
PE
8036 * data/glr.c, data/lalr1.cc: Update copyright date.
8037
cea1469d
PE
8038 Fix a destructor bug reported by Wolfgang Spraul in
8039 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
8040 * data/yacc.c (yyabortlab): Don't call destructor, and
8041 don't set yychar to EMPTY.
8042 (yyoverflowlab): Don't call destructor.
8043 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
8044 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
8045 since we no longer output the message "discarding lookahead token
8046 end of input ()".
8047
5e6f62f2
PH
80482005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8049
8050 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
8051 fix a small glitch in debugging output.
8052 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
8053 after YY_SYMBOL_PRINT where needed.
8054
8055 (struct yyGLRState): Add some comments.
8056 (struct yySemanticOption): Add some comments.
8057 (union yyGLRStackItem): Add comment.
8058
8059 (yymergeOptionSets): Correct this to properly perform the union,
8060 avoiding infinite reported by Michael Rosien.
8061 Update comment.
8062
8063 * tests/glr-regression.at: Add test for GLR merging error reported
8064 by M. Rosien.
cea1469d 8065
0fb669f9
PE
80662005-05-13 Paul Eggert <eggert@cs.ucla.edu>
8067
8068 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
8069 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
8070 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
8071 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
8072 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
8073 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
8074 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
8075 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
8076 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
8077 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
8078 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
8079 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
8080 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
8081 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
8082 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
8083 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
8084 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
8085 src/derives.h, src/files.c, src/files.h, src/getargs.c,
8086 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
8087 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
8088 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
8089 src/output.h, src/parse-gram.c, src/parse-gram.h,
8090 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
8091 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
8092 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
8093 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
8094 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
8095 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
8096 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
8097 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
8098 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
8099 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
8100 tests/reduce.at, tests/regression.at, tests/sets.at,
8101 tests/synclines.at, tests/testsuite.at, tests/torture.at:
8102 Update FSF postal mail address.
8103
51f4735e
PE
81042005-05-11 Paul Eggert <eggert@cs.ucla.edu>
8105
8106 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
8107 Problem reported by Ralf Menzel.
8108
80ce3401
PE
81092005-05-01 Paul Eggert <eggert@cs.ucla.edu>
8110
8111 * tests/actions.at: Test that stack overflow invokes destructors.
8112 From Marcus Holland-Moritz.
8113 * data/yacc.c (yyerrlab): Move the code that destroys the stack
8114 from here....
8115 (yyreturn): to here. That way, destructors are called properly
8116 even if the stack overflows, or the user calls YYACCEPT or
8117 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
8118 (yyoverflowlab): Destroy the lookahead.
8119
81202005-04-24 Paul Eggert <eggert@cs.ucla.edu>
8121
8122 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
8123
72f000b0
PE
81242005-04-17 Paul Eggert <eggert@cs.ucla.edu>
8125
8126 * NEWS: Bison-generated C parsers no longer quote literal strings
8127 associated with tokens.
8128 * src/output.c (prepare_symbols): Don't escape strings,
8129 since users don't want to see C escapes.
8130 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
8131 in diagnostics.
c19683bb 8132 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
8133 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
8134
1094323f
PE
81352005-04-16 Paul Eggert <eggert@cs.ucla.edu>
8136
8137 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
8138 the data size is known to be too small and we can't increase it.
8139 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
8140
ca407bdf
PE
81412005-04-15 Paul Eggert <eggert@cs.ucla.edu>
8142
8143 * src/parse-gram.y: Include quotearg.h.
8144 (string_as_id): Quote $1 before using it as a key, since the
8145 lexer no longer quotes it for us.
8146 (string_content): Don't strip quotes, since lexer no longer
8147 quotes it for us.
8148 * src/scan-gram.l: Include quotearg.h.
8149 ("\""): Omit quote.
8150 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
8151 a key, since the rest of the lexer doesn't quote it.
8152 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
8153 * tests/regression.at (Token definitions): Check for backslashes
8154 in token strings.
8155
8156 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
8157 (YYSIZE_T): Define to unsigned long int when using an older compiler.
8158 (yyparse): Revamp code to generate long syntax error message, to
8159 make it easier to translate, and to avoid problems with arithmetic
8160 overflow. Change "virtual memory" to "memory" in diagnostic, since
8161 we don't know whether the memory is virtual.
8162
1ce59070
PE
81632005-04-13 Paul Eggert <eggert@cs.ucla.edu>
8164
8165 * NEWS: Bison-generated C parsers now use the _ macro to
8166 translate strings.
8167 * data/yacc.c (_) [!defined _]: New macro.
8168 All English strings wrapped inside this macro.
8169 * doc/bison.texinfo (Bison Parser): Document _.
8170 * po/POTFILES.in: Include src/parse-gram.c, since it now
8171 includes translateable strings that parse-gram.y doesn't.
8172
a749a695
PE
81732005-04-12 Paul Eggert <eggert@cs.ucla.edu>
8174
8175 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
8176 reverting the 2004-10-11 change to this function.
8177 (symbol_check_alias_consistency): Don't call symbol_type_set
8178 if the type name is already correct.
8179 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
8180
8fb1053b
PE
81812005-03-25 Paul Eggert <eggert@cs.ucla.edu>
8182
8183 * tests/regression.at (Token definitions): Don't use a token named
8184 c, as that generates a "#define c ..." that runs afoul of buggy
8185 stdlib.h that uses the identifier c as a member of struct
8186 drand48_data. Problem reported by Horst Wente.
8187
ff498c4a
PE
81882005-03-21 Paul Eggert <eggert@cs.ucla.edu>
8189
8190 * bootstrap: Change translation URL from
8191 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
8192 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
8193 redirection glitches. Problem reported by twlevo@xs4all.nl.
8194
65211d70
PE
81952005-03-20 Paul Eggert <eggert@cs.ucla.edu>
8196
8197 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
8198 after operands; POSIX says this isn't portable for the c99 command.
8199
9577fb1f
PE
82002005-03-18 Paul Eggert <eggert@cs.ucla.edu>
8201
8202 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
8203 immediately if a data overrun has occurred; this may help us track
8204 down what may be a spurious failure on MacOS.
8205
78b178f7
PE
82062005-03-17 Paul Eggert <eggert@cs.ucla.edu>
8207
a2599d0f
PE
8208 Respond to problems reported by twlevo@xs4all.nl.
8209
8210 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
8211
78b178f7
PE
8212 * src/vcg.h: Comment fix.
8213 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
8214 (G_CMAX): Change to -1 instead of INT_MAX.
8215
8216 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 8217
7296e729
PE
82182005-03-15 Paul Eggert <eggert@cs.ucla.edu>
8219
8220 * src/tables.c (state_number_to_vector_number): Put it inside an
8221 "#if 0", since it's not currently used. Problem reported by
8222 Roland McGrath.
8223
05ac60f3
PE
82242005-03-06 Paul Eggert <eggert@cs.ucla.edu>
8225
8226 * src/output.c (escaped_output): Renamed from
8227 escaped_file_name_output, since we now use it for symbol tags as
8228 well. All uses changed.
8229 (symbol_destructors_output, symbol_printers_output):
8230 Escape symbol tags too.
8231 Problem reported by Matyas Forstner in
8232 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
8233
8234 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
8235 not needed.
8236 * src/output.c (user_actions_output, token_definitions_output,
8237 symbol_destructors_output, symbol_printers_output): Likewise.
8238 * src/reader.c (prologue_augment): Likewise.
8239 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
8240
8241 * src/vcg.c (output_edge): Don't quote linestyle arg.
8242 Problem reported by twlevo@xs4all.nl.
8243
7eb453ac
PE
82442005-02-28 Paul Eggert <eggert@cs.ucla.edu>
8245
8246 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
8247 example, reported by Derek M Jones. Also, make the example even
8248 more outrageous, to better illustrate how bad the problem is.
8249
4c04c52a
PE
82502005-02-24 Paul Eggert <eggert@cs.ucla.edu>
8251
8252 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
8253 putsym. Typo reported by Sebastian Piping.
8254
a61e1620
PE
82552005-02-23 Paul Eggert <eggert@cs.ucla.edu>
8256
8257 * doc/bison.texinfo (Language and Grammar): some -> same
8258 (Epilogue): int he -> in the
8259 Typos reported by Sebastian Piping via Justin Pence.
8260
9ec93868
PE
82612005-02-07 Paul Eggert <eggert@cs.ucla.edu>
8262
8263 * tests/glr-regression.at (Improper handling of embedded actions
8264 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
8265 embedded actions and $-N in GLR parsers", work around an Autoconf bug
8266 with dollar signs in test names.
8267 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
8268 for a similar reason.
8269
73ce7e7e
PE
82702005-01-28 Paul Eggert <eggert@cs.ucla.edu>
8271
8272 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
8273 wants to redefine G_VIEW.
8274
2e72b98e
PE
82752005-01-27 Paul Eggert <eggert@cs.ucla.edu>
8276
8277 * src/vcg.c (get_view_str): Remove case for normal_view.
8278 Problem reported by twlevo@xs4all.nl.
8279
e0d634e5
PE
82802005-01-24 Paul Eggert <eggert@cs.ucla.edu>
8281
ccf830a4
PE
8282 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
8283 Problem reported by twlevo@xs4all.nl.
8284
e0d634e5
PE
8285 * doc/bison.texinfo: Change @dircategory from "GNU programming
8286 tools" to "Software development". Requested by Richard Stallman
8287 via Karl Berry.
8288
7bbc8cb0
PE
82892005-01-23 Paul Eggert <eggert@cs.ucla.edu>
8290
8291 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
8292 Problem reported by twlevo@xs4all.nl.
8293
08b770bc
PE
82942005-01-21 Paul Eggert <eggert@cs.ucla.edu>
8295
8296 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
8297 keyword; it's not needed with modern compilers, and it doesn't
8298 affect correctness with older compilers. Suggested by
8299 twlevo@xs4all.nl.
8300
95f22ad2
PE
83012005-01-17 Paul Eggert <eggert@cs.ucla.edu>
8302
8303 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
8304 gcc -Wswitch-default.
8305 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
8306 * data/yacc.c (yyparse): Likewise.
8307
d229d15c
PE
83082005-01-12 Paul Eggert <eggert@cs.ucla.edu>
8309
8310 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
8311 already. Let config.h define any nonstandard values.
8312
ecadd90f
PE
83132005-01-10 Paul Eggert <eggert@cs.ucla.edu>
8314
8315 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
8316 for the benefit of slower hosts. Problem reported by
8317 Nelson H. F. Beebe.
8318
213744b5
PE
83192005-01-07 Paul Eggert <eggert@cs.ucla.edu>
8320
8321 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
8322 being defined and not used.
8323 * data/lalr1.cc (yyparse): Likewise.
8324 Use "if (false)" rather than "if (0)".
8325
249d3236
PE
83262005-01-05 Paul Eggert <eggert@cs.ucla.edu>
8327
8328 * TODO: Mention that we should allow NUL bytes in tokens.
8329
987cc1fb
PE
83302005-01-02 Paul Eggert <eggert@cs.ucla.edu>
8331
8332 * src/scan-skel.l (<<EOF>>): Don't close standard output.
8333 Problem reported by Hans Aberg.
8334
08fe02d9
PE
83352005-01-01 Paul Eggert <eggert@cs.ucla.edu>
8336
8337 * src/getargs.c (version): Happy new year; update overall
8338 program copyright date from 2004 to 2005.
8339
8340 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
8341 Problem reported by Hans Aberg.
8342 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
8343 (Output file names.): Add a test for the case when standard output
8344 is closed.
8345
010c0266
PE
83462004-12-26 Paul Eggert <eggert@cs.ucla.edu>
8347
8348 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
8349 to fix an oversight in the Bison 2.0 manual.
8350
da12206a
PE
83512004-12-25 Paul Eggert <eggert@cs.ucla.edu>
8352
8353 * NEWS: Version 2.0. Reformat the existing news items since
8354 1.875, so that related items are grouped together.
3a4734aa 8355 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
8356 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
8357
c935d934
PE
8358 * tests/torture.at (Exploding the Stack Size with Alloca): Set
8359 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
8360 otherwise, we're not testing alloca. Unfortunately there's no
8361 simple way to consult HAVE_ALLOCA here.
8362
da12206a
PE
8363 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
8364 for yymsg, too.
8365
8366 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
8367 hand. This avoids a warning about comparing int to size_t when
8368 GCC warnings are enabled.
8369
0a2c5137
PE
83702004-12-22 Paul Eggert <eggert@cs.ucla.edu>
8371
d7e14fc0
PE
8372 * NEWS: Bison-generated parsers no longer default to using the
8373 alloca function (when available) to extend the parser stack, due
8374 to widespread problems in unchecked stack-overflow detection.
8375 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
8376 responsibility to set it to a positive value. This lets the user
8377 specify a value that is not a preprocessor constant.
8378 * data/yacc.c (YYMAXDEPTH): Likewise.
8379 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
8380 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
8381 to be a compile-time constant. However, explain the constraints on it.
8382 Also, explain the constraints on YYINITDEPTH.
8383 (Table of Symbols): Explain that alloca is no longer the default.
8384 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
8385 to 1.
8386
0a2c5137
PE
8387 * doc/bison.texinfo (Location Default Action): Mention that n must
8388 be zero when k is zero. Suggested by Frank Heckenbach.
8389
e019c247
AD
83902004-12-22 Akim Demaille <akim@epita.fr>
8391
8392 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
8393 (parser::state_type, parser::semantic_type, parser::location_type):
8394 Private, not public.
8395 (parser::parse): Return ints, not bool.
8396 Returning a bool introduces a problem: 0 corresponds to false, and
8397 it seems weird to return false on success. Returning true changes
8398 the conventions for yyparse.
8399 Alternatively we could return void and send an exception.
8400 There is no clear consensus (yet?).
8401 (state_stack, semantic_stack, location_stack): Rename as...
8402 (state_stack_type, semantic_stack_type, location_stack_type): these.
8403 Private, not public.
8404 * tests/c++.at: New.
8405 * tests/testsuite.at, tests/Makefile.am: Adjust.
8406
72731bb7
AD
84072004-12-21 Akim Demaille <akim@epita.fr>
8408
8409 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
8410
9a0d8bec
AD
84112004-12-21 Akim Demaille <akim@epita.fr>
8412
8413 Don't impose std::string for filenames.
8414
8415 * data/lalr1.cc (b4_filename_type): New.
8416 (position::filename): Use it.
8417 (parser.hh): Move the inclusion of stack.hh and location.hh below
8418 the user code, so that needed headers for the filename type can be
8419 included first.
72731bb7
AD
8420 Forward declare them before the user code.
8421 * tests/Makefile.am (check-local, installcheck-local): Pass
8422 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 8423
99880de5
AD
84242004-12-20 Akim Demaille <akim@epita.fr>
8425
8426 Use more STL like names: my_class instead of MyClass.
8427
8428 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
8429 (SemanticStack, SemanticType, StateStack, StateType)
8430 (TokenNumberType, Stack, Slice, Traits, Parser::location)
8431 (Parser::value): Rename as...
8432 (location_stack, location_type, rhs_number_type, semantic_stack)
8433 (semantic_type, state_stack, state_type, token_number_type, stack)
8434 (slice, traits, parser::yylloc, parser::yylval): these.
8435
8436 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
8437
9bec482e
PE
84382004-12-19 Paul Eggert <eggert@cs.ucla.edu>
8439
8440 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
8441 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8442
f6fbd3da
PE
84432004-12-17 Paul Eggert <eggert@cs.ucla.edu>
8444
8445 Remove uses of 'short int' and 'unsigned short int'. This raises
8446 some arbitrary limits. It uses more memory but nowadays that's
8447 not much of an issue.
8448
8449 This change does not affect the generated parsers; that's a different
8450 task, as some users will want to conserve memory there.
8451
8452 Ideally we should use size_t to represent all object counts, and
8453 something like ptrdiff_t to represent signed differences of object
8454 counts; but that will require more code-cleanup than I have the
8455 time to do right now.
8456
8457 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
8458 Use size_t, not int or short int, to count objects.
8459 * src/closure.c (nritemset, closure): Likewise.
8460 * src/closure.h (nritemset, closure): Likewise.
8461 * src/nullable.c (nullable_compute): Likewise.
8462 * src/print.c (print_core): Likewise.
8463 * src/print_graph.c (print_core): Likewise.
8464 * src/state.c (state_compare, state_hash): Likewise.
8465 * src/state.h (struct state): Likewise.
8466 * src/tables.c (default_goto, goto_actions): Likewise.
8467
8468 * src/gram.h (rule_number, rule): Use int, not short int.
8469 * src/output.c (prepare_rules): Likewise.
8470 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
8471 errs, reductions): Likewise.
8472 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
8473 Likewise.
8474 * src/tables.c (vector_number, tally, action_number,
8475 ACTION_NUMBER_MINIMUM): Likewise.
8476 * src/output.c (muscle_insert_short_int_table): Remove.
8477
efeed023
AD
84782004-12-17 Akim Demaille <akim@epita.fr>
8479
8480 * data/lalr1.cc: Extensive Doxygenation.
8481 (error_): Rename as...
8482 (error): this, since it is visible to the user.
8483 Adjust callers.
8484 (Parser::message): Now an automatic variable from...
8485 (Parser::yyreport_syntax_error_): here.
8486 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
8487 Parser::error.
8488 * tests/input.at: Escape $.
8489
bc82c5a5
PE
84902004-12-16 Paul Eggert <eggert@cs.ucla.edu>
8491
8492 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
8493 Parenthesize rhs to avoid obscure problems with mistakes like
8494 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
8495 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
8496 b4_rhs_location): Likewise.
8497 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
8498 b4_rhs_location): Likewise.
8499
fd19f271
AD
85002004-12-16 Akim Demaille <akim@epita.fr>
8501
8502 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
8503 yacc.c: be sure to stay within yycheck_.
8504 * tests/actions.at: Re-enable C++ tests.
8505
10454ea4
AD
85062004-12-16 Akim Demaille <akim@epita.fr>
8507
8508 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
8509 real.
8510
c5b95ccf
AD
85112004-12-16 Akim Demaille <akim@epita.fr>
8512
8513 Use #define to handle the %name-prefix.
8514
8515 * data/glr.c, data/yacc.c: Comment changes.
8516 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
8517 so that one can refer to yylex in the parser file, and have it
8518 renamed, as is the case with other skeletons.
8519
617a8f12
AD
85202004-12-16 Akim Demaille <akim@epita.fr>
8521
8522 Move lalr1.cc internals into yy*.
8523
8524 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
8525 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
8526 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
8527 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
8528 (empty_, final_, terror_, errcode_, ntokens_)
8529 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
8530 (looka_, ilooka_, error_range_, nerrs_):
8531 Rename as...
8532 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
8533 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
8534 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
8535 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
8536 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
8537 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
8538 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
8539 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
8540 these.
8541
1e547e6e
PE
85422004-12-15 Paul Eggert <eggert@cs.ucla.edu>
8543
8544 Fix some problems reported by twlevo at xs4all.
8545 * src/symtab.c (symbol_new): Report an error if the input grammar
8546 contains too many symbols. This is better than calling abort() later.
8547 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
8548 (struct node, struct graph):
8549 Rename member expand to stretch. All uses changed.
8550 (struct graph): Remove member layoutalgorithm. All uses removed.
8551 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
8552 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
8553 All uses changed.
8554 (N_STRETCH): Rename from N_EXPAND. All uses changed.
8555
735d6bd4
AD
85562004-12-15 Akim Demaille <akim@epita.fr>
8557
8558 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
8559 Add more Doxygen comments.
8560 (symprint_, stack_print_, reduce_print_, destruct_, pop)
8561 (report_syntax_error_, translate_): Rename as...
8562 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
8563 (yypop_, yyreport_syntax_error_, yytranslate_): this.
8564
2e1f5829
AD
85652004-12-15 Akim Demaille <akim@epita.fr>
8566
8567 * data/lalr1.cc (lex_): Rename as...
8568 (yylex_): this.
8569 Move the trace here.
8570 Take the %name-prefix into account.
8571 Reported by Alexandre Duret-Lutz.
8572
a3cb6248
AD
85732004-12-15 Akim Demaille <akim@epita.fr>
8574
8575 Simplify the C++ parser constructor.
8576
8577 * data/lalr1.cc (debug_): Rename as...
8578 (yydebug_): so that the parser's internals are always in the yy*
8579 pseudo namespace.
8580 Adjust uses.
8581 (b4_parse_param_decl): Remove the leading comma as it is now only
8582 called as unique argument list.
8583 (Parser::Parser): Remove the constructor accepting a location and
8584 an initial debugging level.
8585 Remove from the other ctor the argument for the debugging level.
8586 (debug_level_type, debug_level, set_debug_level): New.
8587
8588 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
8589 constructor calls.
8590
07fed891
AD
85912004-12-15 Akim Demaille <akim@epita.fr>
8592
8593 Remove b4_root related material: failure experiment
a3cb6248 8594 (which goal was to allow to derive from a class).
07fed891
AD
8595
8596 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
8597 definitions and uses.
8598
e603eaa5
PE
85992004-12-14 Paul Eggert <eggert@cs.ucla.edu>
8600
8601 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
8602 not 2, since it's not portable to subtract 1 from the start of an
8603 array. The new item 0 is never set or used. All uses changed.
8604
8605 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
8606 the default definition of YYLLOC_DEFAULT. Problem reported
8607 by Frank Heckenbach.
8608
fafb007d
PE
86092004-12-12 Paul Eggert <eggert@cs.ucla.edu>
8610
8611 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
8612 the normal case and one for the error case. Just use the
8613 first one uniformly. Problem reported by Frank Heckenbach.
8614 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
8615 use exactly the same macro in both places.
8616 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
8617 so that the normal-case YYRHSLOC works for the error case too.
8618 All uses changed.
8619 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
8620 (YYLLOC_DEFAULT): Use the same macro as glr.c.
8621 * doc/bison.texinfo (Location Default Action): Don't claim that
8622 we have an array of locations. Use the same macro for both glr
8623 and lalr parsers. Mention YYRHSLOC. Mention what happens when
8624 the index is 0.
8625
48814dcd
PE
86262004-12-10 Paul Eggert <eggert@cs.ucla.edu>
8627
a4e1a53b
PE
8628 * HACKING: Update email addresses to send announcements to.
8629
48814dcd
PE
8630 * configure.ac (AC_INIT): Bump version to 1.875f.
8631
337116ba
PE
86322004-12-10 Paul Eggert <eggert@cs.ucla.edu>
8633
8634 * NEWS: Version 1.875e.
8635 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
8636
8637 * src/scan-skel.l: Include "complain.h", for "fatal".
8638
8639 * src/relation.h (relation_print, relation_digraph):
8640 Relation sizes are of type relation_node, not size_t (this is
8641 merely a doc fix, since the two types are equivalent).
8642 (relation_transpose): Relation sizes are of type relation_node,
8643 not int.
8644 * src/relation.c: Likewise.
8645 (top, infinity): Now of type relation_node, not int.
8646 (traverse, relation_transpose): Use relation_node, not int.
8647
8648 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
8649 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
8650 (yyparse): Remove unused local introduced in 2004-10-25 patch.
8651
8652 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 8653 specifying whether the test should be skipped. Use it tp
337116ba 8654 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 8655 fail on some hosts, and should be skipped.
337116ba 8656
da2a7671
PE
86572004-12-08 Paul Eggert <eggert@cs.ucla.edu>
8658
8659 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
8660 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
8661 unless otherwise specified below.
8662
8663 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
8664 to allocate kernel_base, kernel_items, kernel_size, since
8665 they needn't be initialized to 0.
8666 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
8667 * src/closure.c (new_closure): Likewise, for itemset.
8668 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
8669 * src/lalr.c (set_goto_map): Likewise, for temp_map.
8670 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
8671 (build_relations): Likewise for edge, states1, includes.
8672 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
8673 * src/reader.c (packgram): Likewise, for ritem, rules.
8674 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
8675 * src/relation.c (relation_digraph): Likewise for VERTICES.
8676 (relation_transpose): Likewise for new_R, end_R.
8677 * src/symtab.c (symbols_token_translations_init): Likewise for
8678 token_translations.
8679 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
8680 (token_actions): Likewise for yydefact, actrow, conflrow,
8681 conflict_list.
8682 (save_column): Likewise for froms[symno], tos[symno].
8683 (goto_actions): Likewise for state_count.
8684 (pack_table): Likewise for base, pos, check.
8685 (tables_generate): Likewise for width.
8686
8687 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
8688 for initial core. Just have a separate core, so we needn't worry
8689 about whether kernel_size and kernel_base are initialized.
8690
8691 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
8692 kernel_size, kernel_items): Remove unnecessary initialization.
8693 * src/conflicts.c (conflicts): Likewise.
8694 * src/derives.c (derives): Likewise.
8695 * src/muscle_tablc (muscle_insert): Likewise.
8696 * src/relation.c (relation_digraph): Likewise.
8697 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
8698 conflrow, conflict_table, conflict_list, table, check):
8699 Likewise.
8700
8701 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
8702 This is because all callers pass unsigned int.
8703 * src/closure.h (new_closure): Likewise.
8704
8705 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
8706 (build_relations): Initialize includes[i] in all cases.
8707 * src/reader.c (packgram): Always initialize rules[ruleno].prec
8708 and rules[ruleno].precsym. Initialize members in order.
8709 * src/relation.c (relation_transpose): Always initialize new_R[i]
8710 and end_R[i].
8711 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
8712
8713 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
8714 conflict_list[0] was always 0, but now it isn't initialized.
8715
8716 * src/table.c (table_grow): When conflict_table grew, the grown
8717 area wasn't cleared. Fix this.
8718
8719 * lib/.cvsignore: Add strdup.c, strdup.h.
8720 * m4/.cvsignore: Add strdup.m4.
8721
00baeeac
PE
87222004-12-07 Paul Eggert <eggert@cs.ucla.edu>
8723
8724 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
8725 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
8726 GOTO_NUMBER_MAXIMUM, since we occasionally compute
8727 ngotos + 1 without checking for overflow.
8728 (build_relations): Use END_NODE, not -1, to denote end of edges.
8729 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
8730 build_relations): Use goto_number, not int, for goto numbers.
8731 * src/tables.c (save_column, default_goto): Likewise.
8732
be3d9d42
AD
87332004-11-23 Akim Demaille <akim@epita.fr>
8734
8735 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
8736 of #defining from yystype.
8737 Don't typedef yystype, C++ does not need it.
8738 This lets it possible to forward declare it as union.
8739
78e526d5
PE
87402004-11-23 Paul Eggert <eggert@cs.ucla.edu>
8741
8742 * bootstrap (gnulib_modules): Add extensions.
8743 Problem reported by Jim Meyering.
8744
afbb696d
PE
87452004-11-22 Paul Eggert <eggert@cs.ucla.edu>
8746
8747 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
8748 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
8749 src/system.h, src/tables.c: XFREE -> free, to accommodate
8750 recent change to gnulib xalloc.h.
78e526d5 8751 Problem reported by Jim Meyering.
afbb696d 8752
c1f8f16a
AD
87532004-11-17 Akim Demaille <akim@epita.fr>
8754
8755 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
8756
db7e5eb5 87572004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
8758 Alexandre Duret-Lutz <adl@gnu.org>
8759
8760 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
8761 changes.
8762 (YYCDEBUG): Adjust.
8763 Use it instead of cdebug_.
8764 (Parser::debug_stream, Parser::set_debug_stream): New.
8765 (Parser::symprint_): Define cdebug_ for temporary backward
8766 compatibility.
8767 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
8768 debug_stream ().
8769
68e11668
AD
87702004-11-17 Akim Demaille <akim@epita.fr>
8771
8772 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
8773 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
8774 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
8775 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
8776
97cbc73e
PE
87772004-10-27 Paul Eggert <eggert@cs.ucla.edu>
8778
8779 * data/glr.c (yyloc_default): Remove; not used.
8780 Problem reported by Frank Heckenbach.
8781
e342c3be
AD
87822004-10-25 Akim Demaille <akim@epita.fr>
8783
8784 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
8785 Introduce another definition to address simple location arrays.
8786 (yyGLRStack): New member: yyerror_range.
8787 (yyrecoverSyntaxError, yyparse): Update it.
8788 (yyrecoverSyntaxError): Use it when shifting the error token to
8789 have an accurate range, equivalent to the one computed by both
8790 yacc.c and lalr1.cc.
8791 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
8792 that column numbers start at column 0, as per GNU Coding
8793 Standards, the others tests, and the doc.
8794 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
8795 Adjust to the above change (first column is 0).
8796 And adjust the location of the "<error>", now covering the whole
8797 line.
8798
93602feb 87992004-10-22 Akim Demaille <akim@epita.fr>
04098407 8800 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
8801
8802 Remove some arbitrary limits on goto numbers and relations.
8803 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
8804 initial values, since they're never used.
8805 (set_goto_map): ngotos is now unsigned, so test for overflow
8806 by seeing whether it wraps around to zero.
8807 * src/lalr.h (goto_number): Now size_t, not short int.
8808 (GOTO_NUMBER_MAXIMUM): Remove.
8809 * src/relation.c (relation_print, traverse, relation_transpose):
8810 Check for END_NODE rather than looking at sign.
8811 * src/relation.h (END_NODE): New macro.
8812 (relation_node): Now size_t, not short int.
8813
dba08b04
PE
88142004-10-22 Paul Eggert <eggert@cs.ucla.edu>
8815
8816 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
8817 keyword, not an identifier. Problem reported by Baron Schwartz in
8818 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
8819
df09ef2e
AD
88202004-10-11 Akim Demaille <akim@epita.fr>
8821
8822 * src/symtab.c (symbol_check_alias_consistency): Also check
8823 type names, destructors, and printers.
8824 Reported by Alexandre Duret-Lutz.
8825 Recode the handling of associativity and precedence in terms
8826 of symbol_precedence_set.
8827 Accept no redeclaration at all, not even equal to the previous
8828 value.
8829 (redeclaration): New.
8830 Use it to factor redeclaration complaints.
8831 (symbol_make_alias): Don't set the type of the alias, let
8832 symbol_check_alias_consistency do it as for other features.
8833 * src/symtab.h (symbol): Add new member prec_location, and
8834 type_location.
8835 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
8836 * tests/input.at (Incompatible Aliases): New.
8837
146bc99d
PE
88382004-10-09 Paul Eggert <eggert@cs.ucla.edu>
8839
8840 .cvsignore fixes to accommodate gnulib changes,
8841 and the practice of naming build directories "_build".
8842 * .cvsignore: Add "_*". Sort.
8843 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
8844 * m4/.cvsignore: Add "*_gl.m4".
8845
e503aa60
AD
88462004-10-06 Akim Demaille <akim@epita.fr>
8847
8848 * src/parse-gram.y (add_param): Fix the truncation of trailing
8849 spaces.
8850
b4a20338
AD
88512004-10-05 Akim Demaille <akim@epita.fr>
8852
8853 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
8854 whether the reducion was empty or not. This leaves room to
8855 improve the use of YYLLOC_DEFAULT in such a case.
8856 lalr1.cc is still experimental, so changing this is acceptable.
8857 And finally, there are probably not many users who changed the
8858 handling of locations in GLR, so changing is admissible too.
8859
8860 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
8861 empty reduction, set @$ to an empty location ending the previously
8862 stacked symbol.
8863 Adjust uses to make sure the code is triggered on empty
8864 reductions.
8865 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
8866 expected output: empty reductions have empty locations.
8867
f85a5e6f
AD
88682004-09-29 Akim Demaille <akim@epita.fr>
8869
8870 * data/lalr1.cc: Move towards a more standard C++ coding style
8871 for templates: Class < T > -> Class<T>.
8872
b203fc2c
AD
88732004-09-29 Akim Demaille <akim@epita.fr>
8874
8875 * data/lalr1.cc: Reinstall the former ctor, for sake of
8876 compatibility, but warn it will be removed.
8877 Move towards a more standard C++ coding style (i.e., type *var ->
8878 type* var).
8879
5b7e1e73
PE
88802004-09-27 Paul Eggert <eggert@cs.ucla.edu>
8881
3fee967f
PE
8882 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
8883 since it's less likely to work if NULs are involved in the future.
5b7e1e73 8884
0dcca5c2
AD
88852004-09-27 Akim Demaille <akim@epita.fr>
8886
8887 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
8888
6dde1c82
AD
88892004-09-27 Akim Demaille <akim@epita.fr>
8890
8891 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 8892 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
8893 and argument names.
8894 (b4_cc_constructor_call): Likewise.
8895
b233d555
AD
88962004-09-24 Akim Demaille <akim@epita.fr>
8897
8898 * src/parse-gram.y (add_param): Strip the leading and trailing
8899 blanks from a formal argument declaration.
8900 (YY_LOCATION_PRINT): New.
8901
619404e3
AD
89022004-09-24 Akim Demaille <akim@epita.fr>
8903
8904 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
8905 after the location.
8906
dd8d9022
AD
89072004-09-24 Akim Demaille <akim@epita.fr>
8908
8909 * doc/bison.texinfo (Table of Symbols): Sort.
8910
0092f063
AD
89112004-09-21 Akim Demaille <akim@epita.fr>
8912
8913 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
8914 the useless parentheses.
8915 Suggested by Paul Eggert.
8916
451364ed
AD
89172004-09-20 Akim Demaille <akim@epita.fr>
8918
8919 Let the initial-action act on the look-ahead, and use it for the
8920 "initial push" (corresponding to an hypothetical beginning-of-file).
8921 And let lalr1.cc honor %initial-action.
8922
8923 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
8924 example.
8925 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
8926 (Parser::Parser): Remove the ctor that used to initialize it.
8927 (Parser::parse): Like in the other skeletons, issue the "starting
8928 parse" message before any action.
8929 Honor %initial-action.
8930 Initialize the stacks with the lookahead.
8931 * data/yacc.c: Let $$ and @$ in %initial-action designate the
8932 look-ahead.
8933 Push them in the stacks.
8934 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
8935
18d192f0
AD
89362004-09-20 Akim Demaille <akim@epita.fr>
8937
8938 * doc/bison.texinfo (Initial Action Decl): New.
8939
b8458aa5
AD
89402004-09-20 Akim Demaille <akim@epita.fr>
8941
8942 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
8943 clearer criterion to define it.
8944 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
8945 When reducing on an empty RHS, use the latest stacked location as
8946 location.
8947 yylloc is not always available.
8948 * data/glr.c: Likewise.
8949 Also, honor initial-actions.
8950
3fc16193
AD
89512004-09-20 Akim Demaille <akim@epita.fr>
8952
8953 * data/yacc.c (YY_LOCATION_PRINT): New.
8954 Define when we know YYLTYPE's structure, i.e., when the default
8955 YYLLOC_DEFAULT is used.
8956 * data/c.m4 (b4_yysymprint_generate): Use it.
8957 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
8958 value of the result.
8959 (error_start_): Replace with...
8960 (error_range_): this location array.
8961 This allows to replace code relying on the implementation of
8962 locations by portable code.
8963 * data/yacc.c (yylerrsp): Replace with...
8964 (yyerror_range): this.
8965 Every time a token is popped, update yyerror_range[0], to have an
8966 accurate location for the error token.
8967 * data/glr.c (YY_LOCATION_PRINT): New.
8968 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
8969 deference a pointer.
8970 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
8971 report the location in %printers.
8972
8973 * src/scan-skel.l: Instead of abort, report error messages to ease
8974 understanding skeleton scanning failures.
8975
ecfe33e7
AD
89762004-09-16 Akim Demaille <akim@epita.fr>
8977
8978 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
8979 (iterator, const_iterator): these, to be more in the C++ spirit.
8980 Also, return reverse iterators so that when displaying the stack
8981 we display its bottom first.
8982 (Parser::stack_print_, Parser::reduce_print_): Match the messages
8983 from yacc.c.
8984 We should probably use vector here though.
8985
1576d44d
AD
89862004-09-16 Akim Demaille <akim@epita.fr>
8987
8988 Have more complete shift traces.
8989
8990 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
8991 to report Shifts instead of ad hoc YYDPRINTF invocations,
8992 including for the error token.
8993 * data/lalr1.cc (symprint_): Output the location.
8994 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
8995 output the location within the %printer.
8996 Activate GLR tests, at least to make sure they compile properly.
8997 They still don't pass though.
8998 * tests/calc.at: Adjust expect verbose output, since now "Entering
8999 state..." is on a different line than the "Shifting" message.
9000
9c66f418
AD
90012004-09-08 Akim Demaille <akim@epita.fr>
9002
9003 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
9004 Bison directive from the Bison file to the invocation of this
9005 macro, so that these directives are passed to
9006 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
9007 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
9008 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
9009 the extra Bison directives instead of the whole series.
9010 Change the grammar so that there are recoverable errors, and
9011 unrecoverable errors. Now we can have the parser give up before
9012 consuming the whole input. As a result we now can observe that
9013 the lookahead is freed when needed.
9014 Change the parser source to parse argv[1] instead of a hard coded
9015 string.
9016 Simplify yylex, and give a value and location to EOF.
9017 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
9018 passed directives already coded in the file.
9019 Add some tests to check the location of "error".
9020 For some tests, the C++ parser is correct, and not yacc.c.
9021 For other tests, they provide different, but unsatisfying, values,
9022 so keep the C++ value so that at least one parser is "correct"
9023 according to the test suite.
9024 (Actions after errors): Remove, this is subsumed by the
9025 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
9026
52d5733f
AD
90272004-09-06 Akim Demaille <akim@epita.fr>
9028
9029 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 9030 (Parser::pop): New.
52d5733f
AD
9031 Use it.
9032
a0e68930
AD
90332004-09-06 Akim Demaille <akim@epita.fr>
9034
9035 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
9036 argument, an informative message.
9037 Call YY_SYMBOL_PRINT.
9038 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
9039 * data/lalr1.cc (destruct_): Likewise.
9040 In addition, no longer depend on b4_yysymprint_generate and
9041 b4_yydestruct_generate to generate these functions, do it "by
9042 hand".
9043
e757bb10
AD
90442004-09-03 Akim Demaille <akim@epita.fr>
9045
9046 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
9047 invoked, yydestruct the lookahead.
9048 * tests/calc.at (Calculator $1): Update the expected lengths of
9049 traces: there is an added line for the discarded lookahead.
9050 * doc/bison.texinfo (Destructor Decl): Some rewording.
9051 Define "discarded" symbols.
9052
0fe1f06d
AD
90532004-09-02 Akim Demaille <akim@epita.fr>
9054
9055 * data/lalr1.cc (translate_, destruct_): No reason to be static.
9056
284acc8b
AD
90572004-09-02 Akim Demaille <akim@epita.fr>
9058
9059 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
9060 (YYDSYMPRINTF): Rename as...
9061 (YY_SYMBOL_PRINT): this.
9062 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
9063 two.
9064 Use it instead of direct symprint_ calls.
9065 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
9066 one.
9067
a5eb1ed2
AD
90682004-09-02 Akim Demaille <akim@epita.fr>
9069
b7c72fe1
AD
9070 * data/lalr1.cc (b4_yysymprint_generate): New.
9071 (symprint_): New member function, defined when YYDEBUG.
9072 Use it consistently instead of token/nterm debugging output by
9073 hand.
a5eb1ed2
AD
9074 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
9075 %printer calls to use cdebug_ when using lalr1.cc.
9076
417141dd
AD
90772004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
9078
9079 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
9080 with #ifdef YYDEBUG.
9081
2fa09258
AD
90822004-08-26 Akim Demaille <akim@epita.fr>
9083
9084 * doc/bison.texinfo (Implementing Loops): Rename as...
9085 (Implementing Gotos/Loops): this.
9086
9378b508
PE
90872004-08-13 Paul Eggert <eggert@cs.ucla.edu>
9088
9089 Adjust to latest gnulib.
9090 * bootstrap (gnulib_modules): Add xalloc-die.
9091 Set LC_ALL=C so that file names sort consistently.
9092 Prefer the gnulib copies of gettext.m4, glibc21.m4,
9093 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
9094 uintmax_t.m4, ulonglong.m4.
9095 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
9096 po.m4 since we are now using _gl.m4 instead.
9097
87a8ad5c
PE
90982004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
9099
9100 * src/scan-action.l: Remove. Scanning of semantic actions is
9101 handled in scan-gram.l.
9102
dca81a78
PE
91032004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
9104
9105 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
9106
9107 * src/location.h (struct): The file member is a uniqstr.
9108 (equal_boundaries): Use UNIQSTR_EQ for comparison.
9109
c9cbf7c5
PE
91102004-07-22 Paul Eggert <eggert@cs.ucla.edu>
9111
9112 Fix bug with non-%union parsers that have printers or destructors,
9113 which led to a Bison core dump. Reported by Peter Fales in
9114 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 9115
c9cbf7c5
PE
9116 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
9117 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
9118 not to our own type.
9119 * src/output.c (symbol_destructors_output, symbol_printers_output):
9120 Don't assume %union.
9121 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
9122 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
9123 UNION-FLAG. All callers changed.
9124 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
9125 Use type char, not unsigned int, when declaring an array of char;
9126 this lets us remove a cast.
9127 (Printers and Destructors): Add non-%union test cases.
9128
fa7e68c3
PE
91292004-06-21 Paul Eggert <eggert@cs.ucla.edu>
9130
9131 * doc/bison.texinfo: Minor editorial changes, mostly to the new
9132 GLR writeups. E.g., avoid frenchspacing and the future tense,
9133 change "lookahead" to "look-ahead", and change "wrt" to "with
9134 respect to".
2fa09258 9135
fa7e68c3
PE
91362004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9137
9138 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
9139 New sections, split off from the GLR Parsers section. Put the new
9140 Simple GLR Parser near the start of the GLR section, for clarity.
9141 Rewrite connective text.
9142
99a9344e
PE
91432004-06-21 Frank Heckenbach <frank@g-n-u.de>
9144
9145 * doc/bison.texinfo (Simple GLR Parsers): New section.
9146
8dd162d3
PE
91472004-06-21 Paul Eggert <eggert@cs.ucla.edu>
9148
9149 * NEWS, TODO, doc/bison.texinfo:
9150 Use "look-ahead" instead of "lookahead", to be consistent.
9151 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
9152 while we're fixing "look-ahead".
9153 * src/conflicts.c (shift_set): Renamed from shiftset.
9154 (look_ahead_set): Renamed from lookaheadset.
9155 * src/print.c: Likewise.
9156 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
9157 name for "lookahead".
9158 (report_types, usage): Likewise.
9159 * src/getargs.h (report_look_ahead_tokens): Renamed from
9160 report_lookaheads.
9161 * src/lalr.c (compute_look_ahead_tokens): Renamed from
9162 compute_lookaheads.
9163 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
9164 (look_ahead_tokens_print): Renamed from lookaheads_print.
9165 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
9166 state_rule_lookaheads_print.
9167 * src/state.h: Likewise.
9168 (reductions.look_ahead_tokens): Renamed from lookaheads.
9169 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
9170 AT_DATA_LOOKAHEADS_GRAMMAR.
9171
57a90331
PE
91722004-06-03 Paul Eggert <eggert@cs.ucla.edu>
9173
9174 * README: Update location of patched M4 distribution.
9175
8ed3234a
PE
91762004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
9177
9178 Don't assume the C++ compiler takes the same arguments as the C compiler
9179 (trivial change).
9180 * configure.ac (O0CXXFLAGS): New var.
9181 * tests/atlocal.in (CXXFLAGS): Use it.
9182
07971983
PE
91832004-05-29 Paul Eggert <eggert@cs.ucla.edu>
9184
9185 Fix some "make check" problems with C++ reported by
9186 Albert Chin-A-Young for Tru64 C++ in this thread:
9187 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
9188
9189 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
9190 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9191 Output to a .cc file for C++, not to a .c file.
9192 * tests/calc.at (AT_CHECK_CALC): Likewise.
9193 * tests/regression.at (AT_CHECK_DANCER): Likewise.
9194 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
9195
29058652
PE
91962004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
9197
9198 * tests/calc.at, tests/actions.at: Workaround for SGI
9199 C++ compiler. (trivial change)
9200
62cb8a99
PE
92012004-05-27 Paul Eggert <eggert@cs.ucla.edu>
9202
fd418816
PE
9203 Spent a few hours checking out which prerequisite versions the
9204 current sources actually require. I went all the way back to
9205 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
9206 a seemingly endless set of combinations of versions more recent
9207 than that. The bottom line is that the current sources require
9208 fairly recent versions of the build tools, and it'll be some work
9209 to change this.
9210 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
9211 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
9212 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
9213 Add comments explaining why those particular versions are
9214 currently needed.
2fa09258 9215
62cb8a99
PE
9216 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
9217 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 9218 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
9219
9220 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
9221 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
9222
caa52c10
PE
92232004-05-26 Paul Eggert <eggert@cs.ucla.edu>
9224
9225 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
9226 0.11.5. Suggested by Bruno Haible.
9227 * bootstrap: Remove gettext version checking.
9228
9229 * doc/bison.texinfo (Decl Summary): Also mention that %union
9230 can depend on prerequisite types. Problem reported by Tim
9231 Van Holder.
9232
4bfd5e4e
PE
92332004-05-25 Paul Eggert <eggert@cs.ucla.edu>
9234
2cef3017
PE
9235 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
9236 * README-alpha: Don't tell people not to package this.
9237
b9c85d5c
PE
9238 * bootstrap: Don't assume $(...) works; use `...` instead.
9239 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
9240 gettext better.
9241
4bfd5e4e
PE
9242 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
9243 put into the -d output file, and mention what to do if YYSTYPE is
9244 defined as a macro.
9245
6a36ff94
PE
92462004-05-24 Paul Eggert <eggert@cs.ucla.edu>
9247
6712933e
PE
9248 Undo change made earlier today: it caused autopoint to not bring
9249 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
9250 autopoint's.
9251
9252 * bootstrap: Check that gettext version matches what's in
9253 configure.ac. Warn users to ignore robots.txt ERROR 404.
9254 * bootstrap: Undo today's earlier change (logged below).
9255 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 9256
6a36ff94
PE
9257 The gettext version checking is causing more trouble than it's
9258 curing; remove it. Problem reported by Paul Hilfinger.
9259
9260 * bootstrap: Issue a warning that one can expect a message
9261 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
9262 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
9263
209ea708
PE
92642004-05-23 Paul Eggert <eggert@cs.ucla.edu>
9265
9266 Ensure that the C++ compiler used for testing actually works on a
9267 simple test program; if not, skip the C++-related tests. Problem
9268 reported by Vin Shelton in:
161a71f3 9269 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
9270
9271 * m4/cxx.m4: New file.
9272 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
9273 * tests/atlocal.in (BISON_CXX_WORKS): Add.
9274 * tests/local.at (AT_COMPILE_CXX): Use it.
9275
41ca2549
PE
92762004-05-21 Paul Eggert <eggert@cs.ucla.edu>
9277
383e69dc
PE
9278 * data/glr.c (yylloc): Output this macro even if locations are not
9279 being generated, as the GLR parser needs it even in that case.
9280 Problem reported by Troy A. Johnson
9281 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
9282
41ca2549
PE
9283 * configure.ac (AC_INIT): Update to 1.875e.
9284
e476c87d
PE
92852004-05-21 Paul Eggert <eggert@cs.ucla.edu>
9286
9287 * NEWS: Version 1.875d.
9288 * configure.ac (AC_INIT): Likewise.
9289 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
9290
9291 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
9292 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
9293 lalr1.cc runs afoul of the first, and the last two are no longer
9294 supported by GCC 3.4.0.
9295 * README: Mention GNU m4 1.4 or later; mention m4 patches.
9296 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
9297
233a88ad
PE
92982004-05-06 Paul Eggert <eggert@cs.ucla.edu>
9299
9300 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
9301 unsigned int, for compatibility with latest gnulib hash module.
9302 * src/state.c (state_hash, state_hasher): Likewise.
9303 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
9304 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 9305
12ffdd28
PE
93062004-05-03 Paul Eggert <eggert@cs.ucla.edu>
9307
9308 * NEWS: Unescaped newlines are no longer allowed in char & strings.
9309
9310 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
9311 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
9312 character and string literals.
9313 (unexpected_end): New function.
9314 (unexpected_eof): Use it.
9315 (unexpected_newline): New function.
9316 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
9317 actions.
e476c87d 9318
12ffdd28
PE
9319 * NEWS: Document %expect-rr.
9320
9321 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
9322 Fix typo by replacing $1 with $option.
9323 Remove more 'intl'-related files.
9668e2be 9324 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
9325
9326 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
9327 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
9328 strtoul.c.
9329 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
9330 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
9331 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
9332 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
9333 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
9334 * src/.cvsignore: Add *.output.
9335
9336 * src/parse-gram.y: Put copyright notice inside %{ %} so it
9337 gets copied to the output file.
e476c87d 9338
1f65350a
PE
93392004-04-28 Paul Eggert <eggert@twinsun.com>
9340
9341 Get files from the gnulib and po repositories, instead of relying
9342 on them being in our CVS. Upgrade to latest versions of gnulib
9343 and Automake.
9344
9345 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
9346 * bootstrap: Bootstrap from gnulib and po repositories.
9347 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
9348 * README-cvs: Document these changes. Remove version numbers from
9349 mentions of build tools, since they change so often. Mention Flex.
9350
9351 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
9352 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
9353 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
9354 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 9355 does this for us.
12ffdd28
PE
9356 (AC_ISC_POSIX): Remove; we no longer support this
9357 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
9358 (AC_HEADER_STDC): Remove: we now assume C89 or better.
9359 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
9360 Do not check for C89 headers, except for locale.h which is used
9361 by the Yacc library and must port to K&R hosts.
9362 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
9363 Do not check for C89 functions, except for setlocale which is
9364 used by the Yacc library.
9365 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
9366 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
9367 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
9368 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
9369 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
9370 AM_GNU_GETTEXT): Remove; now done by:
9371 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
9372 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
9373 for us.
9374
9375 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
9376 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
9377 Define to empty, as gnulib.mk will do the rest for us.
9378 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
9379 for us.
9380 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
9381 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
9382
9383 * src/files.c: Include gnulib's xstrndup.h.
9384
9385 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
9386 (REALLOC): Use xnrealloc, for likewise.
9387 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
9388 (strnlen, memrchr): Remove decls; functions no longer used.
9389 Include <stpcpy.h>.
9390
9391 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
9392 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
9393 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
9394 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
9395 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
9396 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
9397 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
9398 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
9399 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
9400 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
9401 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
9402 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9403 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
9404 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
9405 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
9406 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
9407 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
9408 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
9409 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
9410 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
9411 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
9412 Remove, as these files are now generated automatically
9413 by bootstrap or automake.
9414
9415 * po/ChangeLog: Remove: all but one entry was a duplicate
9416 of this file, and I moved that 2000-11-02 entry here.
9417
9418 * config/.cvsignore: Add Makefile, depcomp, install-sh.
9419 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
9420 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
9421 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
9422 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
9423 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
9424 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
9425 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
9426 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
9427 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
9428 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
9429 xstrndup.h.
9430 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
9431 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
9432 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
9433 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
9434 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
9435 * src/.cvsignore: Remove *_.c.
9436
9437
9438 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
9439 support it. (The latest stable gzip doesn't.)
9440
94412004-04-27 Paul Eggert <eggert@twinsun.com>
9442
9443 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
9444 case, as stos_ is now used by destructors due to the 2004-02-09
9445 change.
9446
9447 Remove more K&R C support.
9448 * lib/libiberty.y (PARAMS): Remove. All uses removed.
9449 * lib/subpipe.c (errno): Remove decl.
9450 Include <stdlib.h> unconditionally.
9451 (EXIT_FAILURE): Remove macro.
9452 * src/complain.c (vfprintf, strerror): Remove.
9453 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
9454 unconditionally.
9455 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
9456 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
9457 (strchr, strspn, memchr): Remove decls.
9458 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
9459 unconditionally. Do not declare perror.
9460 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
9461 unconditionally.
9462
9463 * src/complain.c (_): Remove useless defn, as system.h defines this.
9464
9465 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
9466 with latest obstack.h.
9467 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
9468 to procedure types, as obstack.h now does that for us.
9469 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
9470
9471 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
9472 so that this include file can stand alone.
9473 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
9474 does this now. Include subpipe.h first after config.h, to
9475 test whether it can stand alone.
9476
9477 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
9478 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
9479 unused declaration.
9480
9481 * tests/synclines.at (%union synch line): Put a dummy member in
9482 the union, because empty unions aren't allowed in C. Caught
9483 by GCC 3.4.0.
9484
4f16766c
PE
94852004-04-13 Jim Meyering <jim@meyering.net>
9486
9487 * src/conflicts.c (conflicts_print): Correct format string typo:
9488 use `%%' to produce literal `%'. (trivial change)
9489
779e7ceb
PE
94902004-03-30 Paul Eggert <eggert@twinsun.com>
9491
9492 * src/getargs.c (version): Update copyright year to 2004.
9493
9494 * data/c.m4 (b4_int_type): Use 'short int' rather than
9495 'short', and similarly for 'long', 'unsigned', etc.
9496 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
9497 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
9498 yy_yypstack, yydumpstack): Likewise.
9499 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
9500 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
9501 Likewise.
9502 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
9503 yy_stack_print, yyparse): Likewise.
9504 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
9505 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
9506 * lib/bitset.c (bitset_print): Likewise.
9507 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
9508 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9509 * lib/bitsetv.c (bitsetv_dump): Likewise.
9510 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
9511 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
9512 Likewise.
9513 * src/LR0.c (allocate_itemsets): Likewise.
9514 * src/gram.h (rule_number, rule): Likewise.
9515 * src/lalr.h (goto_number): Likewise.
9516 * src/nullable.c (nullable_compute): Likewise.
9517 * src/output.c (prepare_rules): Likewise.
9518 * src/relation.c (relation_print, relation_digraph): Likewise.
9519 * src/relation.h (relation_node): Likewise.
9520 * src/state.h (state_number, transitions, errs, reductions,
9521 struct state): Likewise.
9522 * src/symtab.h (symbol_number, struct symbol): Likewise.
9523 * src/tables.c (vector_number, tally, action_number,
9524 default_goto, goto_actions): Likewise.
9525 * tests/existing.at (GNU Cim Grammar): Likewise.
9526 * tests/regression.at (Web2c Actions): Likewise.
9527
9528 * src/output.c (muscle_insert_short_int_table): Renamed from
9529 muscle_insert_short_table. All uses changed.
9530
d6328241
PH
95312004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9532
9533 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
9534 (declaration): Replace expected_conflicts with expected_sr_conflicts.
9535 Add %expect-rr rule.
4f16766c 9536
d6328241
PH
9537 * src/scan-gram.l: Recognize %expect-rr.
9538
4f16766c 9539 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 9540 expected_conflicts.
4f16766c 9541 (expected_rr_conflicts): Declare.
d6328241
PH
9542
9543 * src/conflicts.c (expected_sr_conflicts): Rename from
9544 expected_conflicts.
9545 (expected_rr_conflicts): Define.
9546 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
9547 for GLR parsers.
9548 Use expected_sr_conflicts in place of expected_conflicts.
9549 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 9550
d6328241 9551 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 9552
1452af69
PE
95532004-03-08 Paul Eggert <eggert@gnu.org>
9554
9555 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 9556 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
9557
9558 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
9559 in lalr1.cc.
9560 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
9561 * src/scan-gram.l (scan_integer): New function.
9562 ({int}): Use it.
9563 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
9564 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
9565 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
9566 Say "long int", not "long", for uniformity with GNU style.
9567
006d217d
PE
95682004-02-25 Paul Eggert <eggert@twinsun.com>
9569
9570 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
9571 compilers. This fixes a problem with Intel's C++ compiler being
9572 chatty, reported by Guido Trentalancia in
161a71f3 9573 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 9574
c2729758
ADL
95752004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
9576
9577 Support %destructor and merge error locations in lalr1.cc.
9578
9579 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
9580 (Parser::stos_): Define unconditionally.
9581 (Parser::destruct_): New method. Generate its body with
9582 b4_yydestruct_generate.
9583 (Parser::error_start_): New attribute.
9584 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
9585 token which are discarded.
9586 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
9587 error_start_ when erroneous token are discarded.
9588 (Parser::parse) <yyerrlab1>: Compute the location of the error
9589 token so that it covers all the discarded tokens.
9590 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
9591 it can be called with `%skeleton "lalr1.cc"', and do that.
9592
dd0e0635
PE
95932004-02-02 Paul Eggert <eggert@twinsun.com>
9594
9595 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
9596 $(top_srcdir)/lib and ../lib. This fixes a bug reported
9597 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
9598 There's no need to mention top_builddir since Automake does that
9599 for us.
9600 (INCLUDES): Remove, as Automake says it's obsolescent.
9601 Contents migrated into AM_CPPFLAGS as described above.
9602 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
9603
96042004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9605
9606 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
9607 (yyreportSyntaxError): Handle case where lookahead token is
9608 YYEMPTY.
9609
be16239b
PH
96102004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9611
9612 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
9613 resulting parsers are compilable with C++.
9614
5fa90832
PE
96152003-12-23 Paul Eggert <eggert@twinsun.com>
9616
9617 * config/depcomp, config/install-sh: Sync with Automake 1.8.
9618 * src/output.c (output_skeleton): Rename local var.
9619 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
9620 Bison tokens, as this runs afoul of the 2003-10-07 change that
9621 disallowed NUL bytes in character constants or string literals.
9622
9623 * tests/local.at: Require Autoconf 2.59's Autotest.
9624 * tests/testsuite.at: Don't include local.at, since we now assume
9625 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
9626 including it.
9627 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
9628 multiple inclusion warnings.
dd0e0635 9629
b165c324
AD
96302003-12-02 Akim Demaille <akim@epita.fr>
9631
9632 * doc/bison.texinfo (How Can I Reset the Parser): More about start
9633 conditions.
9634 From Bruno Haible.
9635
26e06a21
ADL
96362003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
9637
9638 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
9639
92ac3705
PE
96402003-10-07 Paul Eggert <eggert@twinsun.com>
9641
6a5ecb38
PE
9642 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
9643 if testsuite doesn't exist.
9644
92ac3705
PE
9645 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
9646 literals, unfortunately.
9647 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
9648 Complain about NUL bytes in character constants or string literals.
9649
91d2c560
PE
96502003-10-05 Paul Eggert <eggert@twinsun.com>
9651
9652 * NEWS: Don't document %no-default-prec, as it's still
9653 too experimental.
9654 * doc/bison.texinfo: Document %no-default-prec only if
9655 the defaultprec flag is set. Normally it's not.
9656
0cc3da3a
PE
96572003-10-04 Paul Eggert <eggert@twinsun.com>
9658
9659 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
9660 non-modifiable lvalue, instead of a modifiable one.
9661 * doc/bison.texinfo (Actions): Document that $$ can
9662 be assigned to. Do not claim that $$ and $N are
9663 array element references: user code should not rely on this.
9664
22fccf95
PE
96652003-10-01 Paul Eggert <eggert@twinsun.com>
9666
9667 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
9668 (grammar_declaration): Use it.
9669 * src/scan-gram.l: New token %no-default-prec.
9670 * tests/conflicts.at: Revamp tests to use %no-default-prec.
9671 * NEWS, doc/bison.texinfo: Document the above.
9672
fc8f2965
AD
96732003-10-01 Akim Demaille <akim@epita.fr>
9674
9675 VCG no longer supports long_straight_phase.
9676
9677 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
9678 * src/print_graph.c (print_graph): Adjust.
9679
39a06c25
PE
96802003-09-30 Frank Heckenbach <frank@g-n-u.de>
9681 and Paul Eggert <eggert@twinsun.com>
9682
9683 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
9684 Table of Symbols): Document %default-prec.
9685 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
9686 (grammar_declaration): Set default_prec on %default-prec.
9687 * src/scan-gram.l (%default-prec): New token.
9688 * src/reader.h (default_prec): New flag.
9689 * src/reader.c: Likewise.
9690 (packgram): Handle it.
9691 * tests/conflicts.at (%default-prec without %prec,
9692 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 9693
39a06c25
PE
96942003-09-30 Paul Eggert <eggert@twinsun.com>
9695
9696 * tests/testsuite.at: Include local.at, not input.at, fixing
9697 a typo in the 2003-08-25 patch.
9698
62b6aef9
AD
96992003-08-27 Akim Demaille <akim@epita.fr>
9700
9701 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
9702 GCC warnings.
9703
89e1cc61
AD
97042003-08-26 Akim Demaille <akim@epita.fr>
9705
9706 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
9707 "<\#" to avoid magic from Gnus when posting parts of this script.
9708
a08460b0
AD
97092003-08-26 Akim Demaille <akim@epita.fr>
9710
9711 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
9712 (Parser::parse): here.
9713 Adjust: nerrs and errstatus is now replaced by...
9714 (Parser::nerrs_, Parser::errstatus_): New.
9715
603f1cfd
AD
97162003-08-25 Akim Demaille <akim@epita.fr>
9717
9718 * config/announce-gen, Makefile.cfg: New.
9719 * Makefile.am: Adjust.
9720 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
9721 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
9722
cd3684cf
AD
97232003-08-25 Akim Demaille <akim@epita.fr>
9724
9725 When reducing initial empty rules, Bison parser read an initial
9726 location that is not defined. This results in garbage, and that
9727 affects Bison's own parser. Therefore we need (i) to extend Bison
9728 to support a means to initialize this location, and (ii) to use
9729 this CVS Bison to fix CVS Bison's parser.
9730
9731 * src/reader.h, reader.c (epilogue_augment): Remove, replace
9732 with...
9733 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
9734 * src/parse-gram.y: Adjust.
9735 (%initial-action): New.
9736 (%error-verbose): Since we require CVS Bison, there is no reason
9737 not to use it.
9738 * src/scan-gram.l: Adjust.
9739 * src/Makefile.am (YACC): New, to make sure we use our own parser.
9740 * data/yacc.c (yyparse): Use b4_initial_action.
9741
4e03e201
AD
97422003-08-25 Akim Demaille <akim@epita.fr>
9743
9744 * doc/bison.texinfo: Don't promote stdout for error messages.
9745
8c182d05
AD
97462003-08-25 Akim Demaille <akim@epita.fr>
9747
9748 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
9749 From Alexandre Duret-Lutz.
9750
6a60c4cf
PE
97512003-08-25 Akim Demaille <akim@epita.fr>
9752
9753 Version 1.875c.
9754
25f66e1a
AD
97552003-08-25 Akim Demaille <akim@epita.fr>
9756
9757 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
9758 Use them.
9759
5348bfbe
AD
97602003-08-25 Akim Demaille <akim@epita.fr>
9761
9762 * data/lalr1.cc (Parser::reduce_print_): New.
9763 Use it.
9764
47301314
AD
97652003-08-25 Akim Demaille <akim@epita.fr>
9766
9767 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
9768 error recovery loops. This patch is based on
161a71f3 9769 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
9770 Also, augment the similarity between lalr1.cc and yacc.c.
9771 Note: the locations of error recovery rules are not correct yet.
9772
9773 * data/lalr1.cc: Comment changes to augment the similarity between
9774 lalr1.cc and yacc.c.
9775 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
9776 (yyerrlab1): Remove, but where it used to be (now the bottom part of
9777 yyerrlab), when hitting EOF, pop the whole stack here instead of
9778 merely falling thru the default error handling mechanism.
9779 (yyerrorlab): New label, with the old contents of YYERROR,
9780 plus the following change: pop the stack of rhs corresponding
9781 to the production that invoked YYERROR. That is how Yacc
9782 behaves (required by POSIX).
9783 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
9784 fail.
9785
1f7a61ff
AD
97862003-08-25 Akim Demaille <akim@epita.fr>
9787
9788 Tune local.at so that people can "autom4te -l autotest calc.at -o
9789 calc" for instance, to extract a sub test suite.
9790
9791 * tests/testsuite.at: Move the initialization, Autotest version
9792 requirement, and AT_TESTED invocation into...
9793 * tests/local.at: here.
9794 * tests/testsuite.at: Include it for compatibility with Autoconf
9795 2.57.
9796 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
9797 be ignore.
9798
327b5b56
PE
97992003-08-04 Paul Eggert <eggert@twinsun.com>
9800
9801 Rework code slightly to avoid gcc -Wtraditional warnings.
9802 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
9803 The returned value is now stored in *YY0. All callers changed.
9804 * src/output.c (merge_output): Adjust to the above change.
9805
0051e3ed
PE
98062003-07-26 Paul Eggert <eggert@twinsun.com>
9807
9808 * data/glr.c (YYASSERT): New macro.
9809 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
9810 yyresolveStates, yyprocessOneStack):
9811 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
9812 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 9813
137437c6
PE
98142003-07-25 Paul Eggert <eggert@twinsun.com>
9815
5b620e06
PE
9816 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
9817 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 9818 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
9819 by Frank Heckenbach, though I have omitted the structure-initialization
9820 part of his glr-knr.diff patch since I recall that the Portable
9821 C Compiler didn't require that change.
9822
137437c6
PE
9823 Let the user specify how to allocate and free memory.
9824 Derived from a suggestion by Frank Heckenbach in
161a71f3 9825 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
9826 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
9827 All uses of free, malloc, realloc changed to use these macros,
9828 and unnecessary casts removed.
9829 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
9830
ddb85ca5
PE
98312003-07-06 Matthias Mann <MatthiasMann@gmx.de>
9832
9833 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
9834 use s.empty() rather than s == "" to test for empty string; see
161a71f3 9835 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
9836 (trivial change)
9837
39910e09
AD
98382003-06-25 Akim Demaille <akim@epita.fr>
9839
9840 * config/depcomp, config/install-sh: Update from masters.
9841
0ae99356
PE
98422003-06-20 Paul Eggert <eggert@twinsun.com>
9843
9844 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
9845 and return properly parenthesized result.
9846 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
9847 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9848 Remove unnecessary parentheses from uses.
9849 * doc/bison.texinfo (Location Default Action): Describe the
9850 conventions for parentheses.
9851
cd05d13c
PE
98522003-06-19 Paul Eggert <eggert@twinsun.com>
9853
81fd08ca
PE
9854 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
9855 yyreportTree): Do not assume that size_t is the same width as int,
9856 when printing sizes. Print sizes using an unsigned format.
9857 Problem reported by Frank Heckenbach in
161a71f3 9858 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 9859
cd05d13c
PE
9860 Port to Forte Developer 7 C compiler.
9861 * data/glr.c (struct YYLTYPE): If locations are not being used,
9862 declare a single dummy member, as empty structs do not conform
9863 to the C standard.
9864 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
9865 the Forte Developer 7 C compiler complains that end-of-loop
9866 code is not reached.
9867
4dcf140b
PE
98682003-06-17 Paul Eggert <eggert@twinsun.com>
9869
9870 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
9871 avoid warnings from picky compilers about redefinition of PARAMS.
9872
8dd76bee
PE
98732003-06-17 Paul Eggert <eggert@twinsun.com>
9874
9875 Version 1.875b.
9876
9877 * NEWS: Document 1.875b.
9878
9879 * lib/bbitset.h: Do not include config.h; that's the includer's job.
9880 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
9881 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
9882 Don't use 'index' in comments, as it's a builtin fn on some hosts.
9883 * lib/bitset_stats.c: Include gettext.h unconditionally, as
9884 per recent gettext manual's suggestion.
9885 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
9886 Use prototypes, not old-style definitions.
9887 * lib/lbitset.c (lbitset_unused_clear): Likewise.
9888 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
9889 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
9890 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
9891 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
9892 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
9893 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
9894 vbitset_or_and_cmp, vbitset_copy): Likewise.
9895
9896 * lib/libiberty.h: Do not include config.h; that's the includer's job.
9897 Do not include <stdlib.h>.
9898 (PARAMS): Define unconditionally for C89.
9899 (ATTRIBUTE_NORETURN): Remove.
9900 (ATTRIBUTE_UNUSED): Define unconditionally.
9901
9902 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 9903 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
9904 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
9905 * lib/vbitset.c, lib/vbitset.h: New files.
9906 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9907 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
9908 from libbitset.
9909
9910 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
9911 `How Can I Reset @code{yyparse}', since texinfo does not allow
9912 arbitrary @ in node names.
9913
9914 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
9915 shouldn't be needed according to the gettext 0.12.1 documentation
9916 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 9917 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 9918 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 9919 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 9920
8dd76bee
PE
9921 * lib/.cvsignore: Add stdbool.h.
9922 * m4/.cvsignore: Add nls.m4, po.m4.
9923
9924 Upgrade to CVS gnulib.
9925 * stdbool_.h: File renamed from stdbool.h.in.
9926 * configure.ac (AM_STDBOOL_H): Invoke this instead of
9927 AC_HEADER_STDBOOL.
9928 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
9929 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
9930 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
9931 (MOSTLYCLEANFILES): New var.
9932 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
9933 (stdbool.h): New rule.
9934 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
9935 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
9936 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
9937 m4/quote.m4: Upgrade to today's gnulib.
9938
9939 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
9940 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
9941 the tests right now.
9942 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
9943 yyerror are declared before use; C99 requires this.
9944
25005f6a
PH
99452003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9946
9947 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
9948 first.
9949 (yyrecoverSyntaxError): Correct the logic for setting and testing
9950 yyerrState.
9951 Correct comment on handling EOF.
9952 Allow states with only a default reduction, rather than failing
8dd76bee 9953 (I can't quite reconstruct why these were not allowed before).
25005f6a 9954
137437c6 9955 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 9956 buffer overruns, corrupting state.
8dd76bee
PE
9957
9958 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
9959 definition.
9960 * src/reader.h (max_left_semantic_context): New variable declaration.
9961 * src/scan-gram.l (max_left_semantic_context): Define.
9962 (handle_action_dollar): Update max_left_semantic_context.
9963 * data/glr.c (YYMAXLEFT): New definition.
9964 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
9965 (yyresolveAction): Ditto.
9966
9967 Fixes to problems with location handling in GLR parsers reported by
9968 Frank Heckenbach (2003/06/05).
9969
9970 * data/glr.c (YYLTYPE): Make trivial if locations not used.
9971 (YYRHSLOC): Add parentheses, and define only if locations used.
9972 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
9973 locations not used.
9974 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
9975 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 9976
25005f6a
PH
9977 * tests/cxx-type.at: Exercise location information; update tests
9978 to differentiate output with and without locations.
8dd76bee 9979 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
9980 because default YYLTYPE not yet defined.
9981 Change semantic actions to compute strings, rather than printing
9982 them directly (to test proper passing of semantics values). Change
9983 output to prefix notation and update test data and expected results.
9984 (yylex): Track locations.
9985 (stmtMerge): Return value rather than printing, and include arguments
9986 in value.
8dd76bee 9987
711f40b7
PE
99882003-06-03 Paul Eggert <eggert@twinsun.com>
9989
9990 Avoid warnings generated by GCC 2.95.4 when Bison is
9991 configured with --enable-gcc-warnings.
9992 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
9993 yy::]b4_parser_class_name[::translate_,
9994 yy::Stack::operator[] (unsigned),
9995 yy::Stack::operator[] (unsigned) const,
9996 yy::Slice::operator[] (unsigned),
9997 yy::Slice::operator[] (unsigned) const):
9998 Rename local vars to avoid warnings.
9999 * tests/glr-regression.at (Improper handling of embedded actions
10000 and $-N in GLR parsers): Remove unused local variable from yylex.
10001 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
10002 (void) as arg when not pure, since we now assume C89 when building
10003 Bison. Pacify GCC by using parameter.
10004
ac695f7d
PE
100052003-06-02 Paul Eggert <eggert@twinsun.com>
10006
10007 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
10008 yy::Location::lines, yy::Location::columns): Rename arguments
10009 to avoid shadowing; this removes a warning generated by GCC 3.3.
10010
26ec81e0
PE
100112003-06-01 Paul Eggert <eggert@twinsun.com>
10012
10013 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
10014 to g++, as GCC 3.3 complains if you do it.
10015 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
10016 everything that WARNING_CFLAGS has, except omit warnings
10017 not suitable for C++.
10018 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
10019 * tests/atlocal.in (CXXFLAGS): New var.
10020 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
10021
10022 Fix a GLR parser bug I reported in February; see
161a71f3 10023 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
10024 The problem was that GLR parsers did not conform to the C standard,
10025 because actions like { $1 = $2 + $3; } expanded to expressions
10026 that invoked YYFILL in separate subexpressions, and YYFILL assigned
10027 to a local variable. The C standard says that expressions
10028 like (var = f ()) + (var = f ()) have undefined behavior.
10029 Another problem was that GCC sometimes issues warnings that
10030 yyfill and its parameters are unused.
10031
10032 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
10033 as possibly unused.
10034 (yyfill): New function.
10035 (YYFILL): Use it.
10036 (yyuserAction): Change type of yynormal to bool, so that it matches
10037 the new yyfill signature. Mark it as possibly unused.
10038
10039
10040 Follow up on a bug I reported in February, where a Bison-generated
10041 parser can loop. Provide a test case and a fix for yacc.c. I
10042 don't have a fix for lalr1.cc or for glr.c, unfortunately.
10043 The original bug report is in:
161a71f3 10044 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
10045
10046 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
10047 macro's size was becoming unwieldy.
10048 (yyerrlab): Do not discard an empty lookahead symbol, as this
10049 might destroy garbage.
10050 (yyerrorlab): New label, with the old contents of YYERROR,
10051 plus the following change: pop the stack of rhs corresponding
10052 to the production that invoked YYERROR. That is how Yacc
10053 behaves, and POSIX requires this behavior.
10054 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
10055 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
10056 Define 'alarm' to do nothing if unistd.h is not available.
10057 Add a new rule "exp: '-' error;" to test the above change to
10058 data/yacc.c. Use 'alarm' to abort any test taking longer than
10059 10 seconds, as it's probably looping.
10060 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
10061 Also, the new yacc.c generates two fewer diagnostics for an
10062 existing test.
10063
d0829076
PE
100642003-05-24 Paul Eggert <eggert@twinsun.com>
10065
c6ae27df
PE
10066 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
10067 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
10068 This fixes a problem reported by John Bowman when the Compaq/HP
10069 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
10070 -ansi -Wall -gall).
10071 * data/yacc.c (union yyalloc): Likewise.
10072 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 10073
d0829076
PE
10074 Switch from 'int' to 'bool' where that makes sense.
10075
10076 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
10077 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
10078 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
10079 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
10080 Return or accept bool, not int. All callers changed.
10081 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
10082 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
10083 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
10084 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
10085 bitset_or_and_cmp_): Likewise.
10086 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
10087 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
10088 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
10089 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
10090 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
10091 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
10092 bitset_stats_or_and_cmp): Likewise.
10093 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
10094 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
10095 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
10096 ebitset_xor_cmp): Likewise.
10097 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
10098 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
10099 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
10100 lbitset_xor_cmp): Likewise.
10101 * lib/bbitset.h: Include <stdbool.h>.
10102 (struct bitset_vtable): The following members now return bool, not
10103 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
10104 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
10105 or_and_cmp).
10106 * src/conflicts.c (count_rr_conflicts): Likewise.
10107 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
10108 All uses changed.
10109 * lib/ebitset.c (ebitset_obstack_init): Likewise.
10110 * lib/lbitset.c (lbitset_obstack_init): Likewise.
10111 * src/getargs.c (debug_flag, defines_flag, locations_flag,
10112 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
10113 graph_flag): Likewise.
10114 * src/getargs.h (debug_flag, defines_flag, locations_flag,
10115 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
10116 graph_flag): Likewise.
10117 * src/output.c (error_verbose): Likewise.
10118 * src/output.h (error_verbose): Likewise.
10119 * src/reader.c (start_flag, typed): Likewise.
10120 * src/reader.h (typed): Likewise.
10121 * src/getargs.c (LOCATIONS_OPTION): New constant.
10122 (long_options, getargs): Use it.
10123 * src/lalr.c (build_relations): Use bool, not int.
10124 * src/nullable.c (nullable_compute): Likewise.
10125 * src/print.c (print_reductions): Likewise.
10126 * src/tables.c (action_row, pack_vector): Likewise.
10127 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
10128 * src/output.c (prepare): Use it.
10129 * src/output.c (token_definitions_output,
10130 symbol_destructors_output, symbol_destructors_output): Use string,
10131 not boolean integer, to keep track of whether to output separator.
10132 * src/print_graph.c (print_core): Likewise.
10133 * src/state.c (state_rule_lookaheads_print): Likewise.
10134
10135 * config/install-sh: Sync from automake 1.7.5.
10136
6b2584b7
PE
101372003-05-14 Paul Eggert <eggert@twinsun.com>
10138
10139 * src/parse-gram.y (rules_or_grammar_declaration): Require a
10140 semicolon after a grammar declaration, in the interest of possible
10141 future changes to the Bison input language.
10142 Do not allow a stray semicolon at the start of the grammar.
10143 (rhses.1): Allow one or more semicolons after any rule, including
10144 just before "|" as required by POSIX.
10145 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
10146 grammar.
10147
caf37a36
ADL
101482003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
10149
10150 %parse-param support for lalr1.cc.
10151
10152 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
10153 b4_cc_constructor_calls, b4_cc_constructor_call,
10154 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
10155 definitions.
10156 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
10157 parse-param arguments.
10158 (yy::b4_parser_class_name): Declare instance variables to
10159 hold parse-param arguments.
10160 * tests/calc.at: s/value/semantic_value/ because value clashes
10161 with a member of yy::b4_parser_class_name. Adjust C++ code
10162 to handle %parse-param. Enable %parse-param test in C++.
10163
3ab37077
PE
101642003-05-12 Paul Eggert <eggert@twinsun.com>
10165
10166 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
10167 English a bit. Fix fclose typo. Change "const char" to "char
10168 const", and use ANSI C rather than K&R for "main". Suggest
10169 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
10170 and suggest yy_switch_to_buffer.
10171
101722003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
10173
10174 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
10175 C89. This avoids a diagnostic on compilers that define __STDC__
10176 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 10177 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 10178
e743727f
PE
101792003-05-03 Paul Eggert <eggert@twinsun.com>
10180
10181 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
10182 Do not overrun array bounds.
10183 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 10184 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 10185
916708d5
AD
101862003-04-29 Akim Demaille <akim@epita.fr>
10187
10188 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
10189 * src/getargs.c, src/getargs.h: here, as bool, not int.
10190 (nondeterministic_parser): New.
10191 * src/parse-gram.y, src/scan-gram.l: Support
10192 %nondeterministic-parser.
10193 * src/output.c (prepare): Use nondeterministic_parser instead
10194 of glr_parser where appropriate.
10195 * src/tables.c (conflict_row, action_row, save_row)
10196 (token_actions, token_actions, pack_vector): Ditto.
10197
a06ea4aa
AD
101982003-04-29 Akim Demaille <akim@epita.fr>
10199
10200 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
10201
211074ca
AD
102022003-04-29 Akim Demaille <akim@epita.fr>
10203
10204 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
10205 with %pure-parser and %locations to exercise the patch from Yakov
10206 Markovitch below.
10207
6175ffe3
PE
102082003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
10209
10210 * data/yacc.c: (b4_lex_param): Corrected for the case where
10211 %lex-param is provided and %pure-parser isn't.
10212
b1e95857
PE
102132003-04-27 Paul Eggert <eggert@twinsun.com>
10214
10215 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 10216 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
10217 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
10218 if it is not defined.
10219 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
10220
acda9df6
PE
102212003-04-26 Paul Eggert <eggert@twinsun.com>
10222
3470c57b
PE
10223 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
10224 Declare to be of type suitable for the ninf value itself, not of
10225 type suitable for the corresponding table, since the latter might
10226 be unsigned but the ninf value might be negative. This fixes a
10227 bug reported by Alexandre Duret-Lutz in
161a71f3 10228 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 10229
acda9df6
PE
10230 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
10231 invokes it. We shouldn't invoke it twice because it will attempt
10232 to put error.o in the archive twice. This fixes a glitch reported
10233 by Martin Mokrejs in
161a71f3 10234 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 10235
b5250f26
PE
102362003-04-21 Paul Eggert <eggert@twinsun.com>
10237
10238 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
10239 to gnulib.
10240
089ac0f1
PE
102412003-04-21 Yakov Markovitch <Markovitch@iso.ru>
10242
10243 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
10244 Fix obvious typo that results in uncompilable GLR parsers
10245 when both %pure-parser and %locations are used. (trivial change)
10246
5ededac6
PE
102472003-04-17 Paul Eggert <eggert@twinsun.com>
10248
1b8f2fff
PE
10249 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
10250 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
10251 Do not insert the expected token via unput, as this runs afoul
10252 of a POSIX-compatibility bug in flex 2.5.31.
10253 All uses changed to BEGIN the parent state,
10254 since we no longer insert the expected token via unput.
10255 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
10256 that is no longer emitted after the above change.
10257
5ededac6
PE
10258 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
10259 the first one. This change is from Paul Hilfinger, and it fixes
10260 regression reported by Werner Lemberg in
161a71f3 10261 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
10262
10263 (resolve_sr_conflict): Don't invoke state_errs_set
10264 unless one or more tokens have been explicitly made errors.
10265 Otherwise, the above change causes Bison to abort.
10266
10267 * tests/existing.at (GNU pic Grammar): New test case, taken from
10268 Lemberg's email.
10269
b8be9132
AD
102702003-03-31 Akim Demaille <akim@epita.fr>
10271
10272 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
10273
d423d460
AD
102742003-03-31 Akim Demaille <akim@epita.fr>
10275
10276 * src/output.c (prepare_symbols): Avoid trailing spaces in the
10277 output.
10278
c7e441b4
AD
102792003-03-31 Akim Demaille <akim@epita.fr>
10280
10281 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
10282 From Paul Hilfinger.
10283
231897ad
AD
102842003-03-29 Akim Demaille <akim@epita.fr>
10285
10286 * m4/error.m4: Do not put under dynamic conditions some code which
10287 expansion is under static control.
10288
5b066063
AD
102892003-03-29 Akim Demaille <akim@epita.fr>
10290
10291 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
10292
22a74fec
AD
102932003-03-29 Akim Demaille <akim@epita.fr>
10294
10295 * doc/bison.texinfo (Strings are Destroyed): New.
10296
0eee27e7
PE
102972003-03-13 Paul Eggert <eggert@twinsun.com>
10298
10299 * .cvsignore: Add configure.lineno.
10300 * src/.cvsignore: Add yacc.
10301 * tests/.cvsignore: Add testsuite.log.
10302 * doc/fdl.texi: Sync with latest FSF version.
10303
f61aad93
PE
103042003-03-12 Paul Eggert <eggert@twinsun.com>
10305
537636c7
PE
10306 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
10307 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
10308 cursor, instead of leaving it undefined. This fixes a bug
10309 reported by Tim Van Holder in
161a71f3 10310 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
10311 * tests/input.at (Torturing the Scanner): Test the scanner on
10312 an empty input file, which was Tim Van Holder's test case.
10313
10314 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
10315 <sys/resource.h> can be included, include sys/time.h and
10316 sys/times.h first, if available. This works around the SunOS
10317 4.1.4 porting bug reported by Bruce Becker in
161a71f3 10318 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
10319
10320 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
10321 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
10322 AC_HEADER_SYS_WAIT.
10323
f61aad93
PE
10324 Merge changes from gnulib. This was prompted because the CVS
10325 snapshot didn't build on Solaris 7 due to strnlen problems.
10326
10327 These changes need to be merged back into gnulib:
10328 * lib/hash.c: Include <stdbool.h> unconditionally.
10329 * m4/onceonly.m4 (m4_quote): New macro.
10330 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
10331 Quote AC_FOREACH variable-expansions properly.
10332 The 2003-01-03 obstack.h change also needs merging.
10333 {end of changes requiring merging}
5b066063 10334
f61aad93
PE
10335 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
10336 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
10337 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
10338 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
10339 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
10340 New files, imported from gnulib.
10341 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
10342 above.
10343
10344 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
10345 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
10346 gnulib sources.
10347
10348 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
10349 Add.
10350 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
10351 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
10352 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
10353 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
10354 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
10355 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
10356 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
10357 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
10358 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
10359 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
10360 (jm_PREREQ_ARGMATCH): Remove.
10361 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
10362 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
10363
10364 * src/system.h: Include <stdbool.h> unconditionally.
10365
10366 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
10367 assuming at least C89 in the bitset code for some time now.
10368
d2ffe116
AD
103692003-03-03 Akim Demaille <akim@epita.fr>
10370
10371 * ro.po: New.
10372
052826fd
AD
103732003-03-02 Akim Demaille <akim@epita.fr>
10374
10375 * doc/bison.texinfo (Table of Symbols): Reactivate the
10376 documentation for %lex-param, and %parse-param.
10377
c4749565
AD
103782003-03-02 Akim Demaille <akim@epita.fr>
10379
10380 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
10381 generate verbose error messages.
10382 Use the number of tokens as an upper bound in yytname, as it
10383 cannot be a non terminal.
10384
d5286af1
AD
103852003-03-02 Akim Demaille <akim@epita.fr>
10386
10387 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
10388 message.
10389
22e304a6
AD
103902003-03-02 Akim Demaille <akim@epita.fr>
10391
22e304a6
AD
10392 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
10393 Use them to exercise yycheck overrun.
10394 Based on Andrew Suffield's grammar.
10395
67a25fed
AD
103962003-03-02 Akim Demaille <akim@epita.fr>
10397
10398 Create tests/local.at for Bison generic testing macros.
10399
10400 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
10401 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
10402 This new file.
10403 * tests/calc.at (AT_CHECK_CALC): Adjust.
10404 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
10405 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
10406 * tests/local.at: here.
10407 (AT_COMPILE_CXX): Tags the tests using it as c++.
10408 Ignore the test if CXX is not functional.
10409
9c2b381f
PE
104102003-03-01 Paul Eggert <eggert@twinsun.com>
10411
10412 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
10413 not loc->end, since loc->end might contain garbage and this leads
10414 to undefined behavior on some platforms.
10415 (id_loc, token_start): Use (IF_LINTed) initial values that do not
10416 depend on *loc, so that the reader doesn't give the the false
10417 impression that *loc is initialized.
10418 (<INITIAL>"%%"): Do not bother setting code_start, since its value
10419 does not survive the return.
10420
0433ba88
AD
104212003-03-01 Akim Demaille <akim@epita.fr>
10422
10423 * src/scan-gram.l (code_start): Always initialize it when entering
10424 into yylex, as SC_EPILOGUE is activated *before* the corresponding
10425 yylex invocation. An alternative would be making it static, but
10426 then it starts with the second %%'s beginning, instead of its end.
10427
b305ea69
PE
104282003-02-28 Paul Eggert <eggert@twinsun.com>
10429
10430 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
10431 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 10432 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 10433
c3d25e01
PE
104342003-02-26 Paul Eggert <eggert@twinsun.com>
10435
10436 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
10437 Remove Sequent/Pyramid discussion (nobody uses them any more).
10438 Merge VMS and MS-DOS discussion; these ports may well be dead
10439 but let's keep mentioning them for now. Put <> around email
10440 addresses. Add copyright notice.
10441
c267ffbc
PE
104422003-02-24 Paul Eggert <eggert@twinsun.com>
10443
10444 * data/glr.c (yy_reduce_print): yylineno -> yylno,
10445 to avoid collision with flex use of yylineno.
10446 Problem reported by Bruce Lilly in
161a71f3 10447 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
10448 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10449 * data/yacc.c (yy_reduce_print): Likewise.
10450
10451 * config/depcomp: Sync with Automake 1.7.3.
10452
f939fc12
AD
104532003-02-21 Akim Demaille <akim@epita.fr>
10454
10455 * data/lalr1.cc: Use temporary variables instead of casts to
10456 change integer types.
10457 Suggested by Paul Eggert.
10458
95923bd6
AD
104592003-02-21 Akim Demaille <akim@epita.fr>
10460
10461 * doc/bison.texinfo: Use "location" consistently to refer to @n,
10462 to avoid confusions with lalr1.cc's notion of Position.
10463 Suggested by Paul Eggert.
10464
2cdc240e
AD
104652003-02-20 Akim Demaille <akim@epita.fr>
10466
10467 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
10468 before initial_columns.
10469 (location.hh): Use consistent variable names when defining the
10470 operator<<.
10471 Use "last" so that we subtract from Positions, not from unsigned.
10472
5d003116
AD
104732003-02-20 Akim Demaille <akim@epita.fr>
10474
10475 * data/lalr1.cc (position.hh): New subfile, including the extended
10476 and Doxygen'ed documentation of class Position.
10477 (location.hh): Use it.
10478 Document a` la Doxygen.
ba1ecc07 10479 With the help of Benoit Perrot.
5d003116 10480
d02b25f9
AD
104812003-02-20 Akim Demaille <akim@epita.fr>
10482
10483 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
10484 AT_YACC_IF.
10485 Redefine AT_YYERROR_SEES_LOC_IF using it.
10486 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
10487 not defined.
10488 Don't use the location in yy::Parser::error_ and
10489 yy::Parser::print_ when not %locations.
10490 Activate more lalr1.cc tests.
10491
0d1c3a04
AD
104922003-02-19 Akim Demaille <akim@epita.fr>
10493
10494 * data/lalr1.cc: When displaying a line number, be sure to make it
10495 an int.
10496
60a777aa
AD
104972003-02-19 Akim Demaille <akim@epita.fr>
10498
10499 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
10500 Remove, useless.
10501 (YYABORT, YYACCEPT, YYERROR): New.
10502 * tests/calc.at: Renable the lalr1.cc test.
10503
0b86fc41
AD
105042003-02-19 Akim Demaille <akim@epita.fr>
10505
10506 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
10507 error recovery, mixing with/without pops and discarding of the
10508 lookahead.
10509 Exercise YYERROR.
10510 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
10511
da99a5dc
PE
105122003-02-17 Paul Eggert <eggert@twinsun.com>
10513
10514 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
10515 * tests/testsuite.at (AT_COMPILE): Use them.
10516 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 10517 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 10518
93b8c255
PE
105192003-02-12 Paul Eggert <eggert@twinsun.com>
10520
10521 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
10522 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 10523 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
10524 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
10525 Check for malloc failure, for consistency with yacc.c.
10526 (yytname_size): Remove, for consistency with yacc.c.
10527
10528 The bug still remains in data/lalr1.cc, as I didn't have time
10529 to fix it there.
10530
7548fed2
AD
105312003-02-06 Akim Demaille <akim@epita.fr>
10532
10533 * configure.ac (GXX): Rename as...
10534 (CXX): this, to keep the original Autoconf semantics.
10535 Require 2.57.
10536 * data/lalr1.cc: Fix b4_copyright invocations.
10537 If YYDEBUG is not defined, don't depend upon name_ being defined.
10538 (location.hh): Include string and iostream.
10539 (Position::filename): New member.
10540 (Position::Position ()): New.
10541 (operator<< (Position)): New.
10542 (operator- (Position, int)): New.
10543 (Location::first, Location::last): Rename as...
10544 (Location::begin, Location::end): these, to mock the conventional
10545 iterator names.
10546 (operator<< (Location)): New.
10547 * tests/atlocal.in (CXX): New.
10548 * tests/testsuite.at (AT_COMPILE_CXX): New.
10549 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
10550 locations in a more synthetic way.
10551 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
10552 lalr1.cc is used.
10553 Adjust the C locations to match those from Emacs: first column is
10554 column 0.
10555 Change all the expected results.
10556 Conform to the GCS: simplify the locations when applicable.
10557 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
10558 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
10559 these CPP macros with the m4 macros new defined by...
10560 (AT_CHECK_PUSHDEFS): this, i.e.:
10561 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 10562 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
10563 New macros.
10564 (AT_CHECK_POPDEFS): Undefine them.
10565 (AT_CHECK_CALC_LALR1_CC): New.
10566 Use it for the first lalr1.cc test.
10567
43a176ef
AD
105682003-02-04 Akim Demaille <akim@epita.fr>
10569
10570 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
10571 Location as is defined.
10572
fc049e9c
AD
105732003-02-04 Akim Demaille <akim@epita.fr>
10574
10575 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
10576 name_ being defined.
10577
a737b216
PE
105782003-02-03 Paul Eggert <eggert@twinsun.com>
10579
10580 * src/gram.h (start_symbol): Remove unused decl.
10581
10582 Use more-consistent naming conventions for local vars.
10583
10584 * src/derives.c (derives_compute): Change type of local var from
10585 int to rule_number.
10586 * src/gram.c (grammar_rules_partial_print): Likewise.
10587 * src/print.c (print_core): Likewise.
10588 * src/reduce.c (reduce_grammar_tables): Likewise.
10589
10590 * src/gram.c (grammar_dump): Change name of item_number *
10591 local var from r to rp.
10592 * src/nullable.c (nullable_compute): Likewise.
10593
10594 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
10595
10596 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
10597 for symbol or symbol_number var.
10598 * src/reader.c (grammar_start_symbol_set): Likewise.
10599 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
10600 Likewise.
10601 * src/state.c (transitions_to): Likewise.
10602 * src/state.h: Likewise.
10603 * src/tables.c (symbol_number_to_vector_number): Likewise.
10604
10605 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
10606 char * var.
10607
10608 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
10609 var.
10610
10611 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
10612 var.
10613
10614 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
10615 Use str, not s, for char * var. Use ch, not c, for character var.
10616 Use size for size var.
10617
10618 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
10619 char * var.
10620 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
10621 uniqstr var.
10622 * src/uniqstr.h: Likewise.
10623
10624 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10625 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10626 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
10627 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
10628 param to have same name as that of enum, so that we don't use
10629 "s" to stand for a non-state.
10630
68e93ad5
AD
106312003-02-02 Akim Demaille <akim@epita.fr>
10632
10633 * src/scan-skel.l: Scan more than one inert character per yylex
10634 invocation.
10635
92898986
PE
106362003-02-01 Paul Eggert <eggert@twinsun.com>
10637
10638 Version 1.875a.
10639
1d9d5d71
PE
10640 * po/LINGUAS: Add ms.
10641
0435d061
AD
106422003-01-30 Akim Demaille <akim@epita.fr>
10643
10644 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
10645
6029a57f
PH
106462003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10647
10648 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
10649 of $1.
0435d061
AD
10650
10651 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 10652 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 10653 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 10654
6029a57f
PH
10655 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
10656 (b4_rhs_location): Ditto.
0435d061 10657 (yyfill): New function to copy from stack tree into array
6029a57f 10658 incrementally.
0435d061
AD
10659 (yyuserAction): Modify to allow incremental move of semantic values
10660 to rhs array when in GLR mode.
10661 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
10662 as needed.
10663 Remove dummy use of yystack, as there is now a guaranteed use.
10664 (yydoAction): Modify to allow incremental move of semantic values
10665 to rhs array when in GLR mode.
10666 (yyresolveAction): Ditto.
10667 (yyglrShiftDefer): Update comment.
0435d061 10668 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
10669 (yyglrReduce): Ditto.
10670 (yydoAction): Ditto
0435d061 10671
6029a57f
PH
10672 * tests/glr-regr1.at: Rename to ...
10673 * tests/glr-regression.at: Add new regression test for the problems
10674 described above (adapted from S. Eken).
10675 Update copyright notice.
10676 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
10677 * tests/Makefile.am: Ditto.
10678
6cee6297
PE
106792003-01-28 Paul Eggert <eggert@twinsun.com>
10680
10681 * data/lalr1.cc: Do not use @output_header_name@ unless
10682 b4_defines_flag is set. This fixes two bugs reported by
10683 Tim Van Holder in
161a71f3
PE
10684 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
10685 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 10686
b2a836b5
PE
106872003-01-21 Paul Eggert <eggert@twinsun.com>
10688
10689 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
10690 we don't need to worry about yyerrlab1 being reported as an
10691 "unused label" by non-GCC C compilers. The downside is that if
10692 locations are used then a couple of statements are duplicated each
10693 time YYERROR is invoked, but the upside is that the warnings
10694 should vanish.
10695 (yyerrlab1): Move code to YERROR.
10696 (yyerrlab2): Remove. Change uses back to yyerrlab1.
10697 This reverts some of the 2002-12-27 change.
10698
4196b931
PE
106992003-01-17 Paul Eggert <eggert@twinsun.com>
10700
10701 * src/output.c (symbol_printers_output): Fix typo that led
10702 to core dump. Problem reported by Antonio Rus in
161a71f3 10703 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 10704
3ae831b4
AD
107052003-01-13 Akim Demaille <akim@epita.fr>,
10706 Quoc Peyrot <chojin@lrde.epita.fr>,
10707 Robert Anisko <anisko_r@lrde.epita.fr>
10708
10709 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
10710 when the stacks contain one element, as the loop would otherwise
10711 free the last state, and then use the top state (the one we just
10712 popped). This means that the initial elements will not be freed
10713 explicitly, as is the case in yacc.c; it is not a problem, as
10714 these elements have fake values.
10715
e3aa65c5
PE
107162003-01-11 Paul Eggert <eggert@twinsun.com>
10717
10718 * NEWS: %expect-violations are now just warnings, reverting
10719 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
10720 bootstrapping problem reported by Matthias Klose; see
161a71f3 10721 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
10722 * src/conflicts.c (conflicts_print): Likewise.
10723 * tests/conflicts.at (%expect not enough, %expect too much,
10724 %expect with reduce conflicts): Likewise.
10725 * doc/bison.texinfo (Expect Decl): Document this. Also mention
10726 that the warning is enabled if the number of conflicts changes
10727 (not necessarily increases).
10728
10729 * src/getargs.c (version): Update copyright year.
10730
f0057011
AD
107312003-01-09 Akim Demaille <akim@epita.fr>
10732
10733 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
10734
1ee6d2a0
PE
107352003-01-08 Paul Eggert <eggert@twinsun.com>
10736
10737 * Makefile.maint (WGETFLAGS):
10738 New macro, containing "-C off" to disable proxy caches.
10739 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
10740 (rel-check): Use $(WGET) instead of wget.
10741
d4fd77c4
PE
107422003-01-06 Paul Eggert <eggert@twinsun.com>
10743
10744 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
10745 the GLR paper of Scott, Johnstone and Hussain.
10746
464c6927
PE
107472003-01-04 Paul Eggert <eggert@twinsun.com>
10748
d600ee67
PE
10749 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
10750 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
10751 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
10752 (EXTRA_LIBRARIES): New var, for liby.a.
10753 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
10754 (EXTRA_SCRIPTS): New var, for yacc.
10755
464c6927
PE
10756 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
10757 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
10758 Problem reported by Nelson H. F. Beebe.
10759
107602003-01-03 Paul Eggert <eggert@twinsun.com>
10761
10762 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
10763 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
10764 when compiling Bison 1.875's `bitset bset = obstack_alloc
10765 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
10766
10767 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
10768 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
10769 grow to a huge size with typical invocation.
d600ee67 10770
464c6927
PE
10771 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
10772 Use the pattern recommended by Autoconf 2.57, except also protect
10773 against double-definition.
10774 * src/system.h: Likewise.
10775 Portability issues reported by Nelson H. F. Beebe.
d600ee67 10776
464c6927
PE
10777 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
10778 All uses changed. Provide a definition in both C and C++.
10779 (yytrue, yyfalse): Define even if defined (__cplusplus).
10780
10781 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
10782 Reported by Nelson H. F. Beebe.
d600ee67 10783
464c6927
PE
10784 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
10785
0f42c7d5
PE
107862003-01-02 Paul Eggert <eggert@twinsun.com>
10787
10788 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
10789 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
10790 Bug reported by Nelson H. F. Beebe.
10791
dc546b0f
PE
107922003-01-01 Paul Eggert <eggert@twinsun.com>
10793
10794 * Version 1.875.
10795
2c09b6a7
PE
107962002-12-30 Paul Eggert <eggert@twinsun.com>
10797
10798 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
10799 Moved here from...
10800 (<INITIAL>","): Here. This causes stray "," to be treated
10801 more uniformly.
10802
dc546b0f 10803 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
10804 last brace in braced code when not in Yacc mode, for compatibility
10805 with Bison 1.35. This resurrects the 2001-12-15 patch to
10806 src/reader.c.
10807
10808 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
10809 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
10810
535c0f63
PE
108112002-12-28 Paul Eggert <eggert@twinsun.com>
10812
10813 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
10814 that of SYM's type. This fixes Debian bug 168069, reported by
10815 Thomas Olsson.
d600ee67 10816
963fcc17
PE
108172002-12-28 Paul Eggert <eggert@twinsun.com>
10818
10819 Version 1.75f.
10820
10821 Switch back to the Yacc style of conflict reports, undoing some
10822 of the 2002-07-30 change.
10823 * doc/bison.texinfo (Understanding): Use Yacc style for
10824 conflict reports. Also, use new way of locating rules.
10825 * src/conflicts.c (conflict_report):
10826 Renamed from conflict_report_yacc, removing the old
10827 'conflict_report'. Translate the entire conflict report at once,
10828 so that we don't assume that "," has the same interpretation in
10829 all languages.
10830 (conflicts_output): Use Yacc-style conflict report for each state,
10831 instead of our more-complicated style.
10832 (conflicts_print): Use Yacc-style conflict report, except print
10833 the input file name when not emulating Yacc.
10834 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
10835 Conflicted Reduction, %expect not enough, %expect too much,
10836 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
10837 * tests/existing.at (GNU Cim Grammar): Likewise.
10838 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
10839
10840 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
10841 fatal): Don't invoke fflush; it's not needed and it might even be
10842 harmful for stdout, as stdout might not be open.
10843 * src/reduce.c (reduce_print): Likewise.
10844
b1efe548
PE
108452002-12-27 Paul Eggert <eggert@twinsun.com>
10846
10847 Fix a bug where error locations were not being recorded correctly.
10848 This problem was originally reported by Paul Hilfinger in
161a71f3 10849 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
10850
10851 * data/yacc.c (yyparse): New local var yylerrsp, to record the
10852 top of the location stack's error locations.
10853 (yyerrlab): Set it. When discarding a token, push its location
10854 onto yylerrsp so that we don't lose track of the error's end.
10855 (yyerrlab1): Now is only the target of YYERROR, so that we can
10856 properly record the location of the action that failed. For GCC
10857 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
10858 GCC warning about yyerrlab1 being unused if YYERROR is unused.
10859 (yyerrlab2): New label, which yyerrlab now falls through to.
10860 Compute the error's location by applying YYLLOC_DEFAULT to
10861 the locations of all the symbols that went into the error.
10862 * doc/bison.texinfo (Location Default Action): Mention that
10863 YYLLOC_DEFAULT is also invoked for syntax errors.
10864 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10865 Error locations include the locations of all the tokens that were
10866 discarded, not just the last token.
d600ee67 10867
983c5c2c
PE
108682002-12-26 Paul Eggert <eggert@twinsun.com>
10869
b1efe548
PE
10870 * src/files.c: Include quote.h.
10871 (compute_output_file_names): Warn if we detect conflicting
10872 outputs to the same file. This should catch the misunderstanding
10873 exemplified by Debian Bug 165349, reported by Bruce Stephens..
10874
10875 * src/conflicts.c (conflicts_print): If the user specifies
10876 "%expect N", report an error if there are any reduce/reduce
10877 conflicts. This is what the manual says should happen.
10878 This fixes Debian bug 130890, reported by Anthony DeRobertis.
10879 * tests/conflicts.at (%expect with reduce conflicts): New test.
10880
983c5c2c
PE
10881 Don't use m4_include on relative file names, as it doesn't work as
10882 desired if there happens to be a file with that name under ".".
d600ee67 10883
983c5c2c
PE
10884 * m4sugar/version.m4: Remove; it was included but it wasn't used.
10885 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
10886 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
10887 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
10888 * src/output.c (output_skeleton): Use full path names when
10889 specifying a file to include; don't rely on include path, as
10890 it's unreliable when the working file contains a file with
10891 that name.
d600ee67 10892
983c5c2c
PE
108932002-12-25 Paul Eggert <eggert@twinsun.com>
10894
10895 Remove obsolete references to bison.simple and bison.hairy.
10896 Problem mentioned by Aubin Mahe in
161a71f3 10897 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
10898 * data/glr.c: Comment fix.
10899 * doc/bison.1: Remove references. Also, mention "yacc".
10900
10901 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
10902 with -g option.
10903
10904 * src/parse-gram.y (declaration): Use enum "report_states" rather
10905 than its numeric value 1.
10906
10907 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
10908 opening a new one. This fixes Debian bug 165349, reported by
10909 Bruce Stephens.
10910
23f2d9dc
PE
109112002-12-24 Paul Eggert <eggert@twinsun.com>
10912
10913 Version 1.75e.
10914
10915 * Makefile.maint (cvs-update): Don't assume that the shell
10916 supports $(...), as Solaris sh doesn't.
10917
10918 * src/parse-gram.y (lloc_default): Remove test for empty
10919 nonterminals at the end, since it didn't change the result.
10920
109212002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
10922
10923 If the user does not define YYSTYPE as a macro, Bison now declares it
10924 using typedef instead of defining it as a macro. POSIX requires this.
10925 For consistency, YYLTYPE is also declared instead of defined.
10926
10927 %union directives can now have a tag before the `{', e.g., the
10928 directive `%union foo {...}' now generates the C code
10929 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
10930 The default union tag is `YYSTYPE', for compatibility with Solaris 9
10931 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
10932 instead of `yyltype'.
10933
10934 `yystype' and `yyltype' are now obsolescent macros instead of being
10935 typedefs or tags; they are no longer documented and will be
10936 withdrawn in a future release.
10937
10938 * data/glr.c (b4_location_type): Remove.
10939 (YYSTYPE): Renamed from yystype.
10940 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
10941 (struct YYLTYPE): Renamed from struct yyltype.
10942 (YYLTYPE): Renamed from yyltype.
10943 (yyltype, yystype): New (and obsolescent) macros,
10944 for backward compatibility.
10945 * data/yacc.c: Likewise.
10946
10947 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
10948 does not specify a union tag. This is for compatibility with
10949 Solaris 9 yacc.
10950
10951 * src/parse-gram.y (add_param): 2nd arg is now char * not char
10952 const *, since it is now modified by stripping surrounding { }.
10953 (current_braced_code): Remove.
10954 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
10955 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
10956 trailing " {...}". Now of type <chars>.
10957 (grammar_declaration): Adjust to bundled tokens.
10958 (code_content): Remove; stripping is now done by add_param.
10959 (print_token_value): Print contents of bundled tokens.
10960 (token_name): New function.
10961
10962 * src/reader.h (braced_code, current_braced_code): Remove.
10963 (token_name): New decl.
10964
10965 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
10966 token_type, not braced_code code_kind. All uses changed.
10967 (SC_PRE_CODE): New state, for scanning after a keyword that
10968 has (or usually has) an immediately-following braced code.
10969 (token_type): New local var, to keep track of which token type
10970 to return when scanning braced code.
10971 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 10972 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
10973 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
10974 instead of returning a token type immediately.
10975 (<INITIAL>"{"): Set token type.
10976 (<SC_BRACED_CODE>"}"): Use it.
10977 (handle_action_dollar, handle_action_at): Now returns bool
10978 indicating success. Fail if ! current_rule; this prevents a core dump.
10979 (handle_symbol_code_dollar, handle_symbol_code_at):
10980 Remove; merge body into caller.
10981 (handle_dollar, handle_at): Complain in invalid contexts.
10982
10983 * NEWS, doc/bison.texinfo: Document the above.
10984 * NEWS: Fix years and program names in copyright notice.
10985
879ca4f8
PE
109862002-12-17 Paul Eggert <eggert@twinsun.com>
10987
10988 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
10989 Reporting, Table of Symbols): Omit mentions of %lex-param and
10990 %parse-param from the documentation for now.
10991
1c5fe69d
PE
109922002-12-15 Paul Eggert <eggert@twinsun.com>
10993
10994 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
10995 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
10996 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
10997 disagreed with the Bison documentation. Bug
10998 reported by Andrew Walrond.
d600ee67 10999
1c5fe69d
PE
11000 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
11001 as the caller now does that.
11002 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
11003 (YYEMPTY): Parenthesize right hand side, since others use it.
11004 (yyparse): Don't assume that our generated code is the only code
11005 that sets yychar.
11006
d1de5372
PE
110072002-12-13 Paul Eggert <eggert@twinsun.com>
11008
11009 Version 1.75d.
11010
11011 POSIX requires a "yacc" command.
11012 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
11013 (MOSTLYCLEANFILES): Add yacc.
11014 (yacc): New rule.
1c5fe69d 11015 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
11016 as an alias for bison y.
11017
11018 * po/LINGUAS: Add da.
d600ee67 11019
d1de5372
PE
11020 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
11021 problem with latest <getopt.h>.
11022 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
11023
11024 * doc/fdl.texi: Upgrade to 1.2.
11025 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
11026 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
11027 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
11028 gnulib.
11029 * config/install-sh: Sync with autotools.
11030
11031 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 11032 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
11033 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
11034 locations are requested.
11035 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
11036 locations are requested.
11037
d0f3fe23
PE
110382002-12-12 Paul Eggert <eggert@twinsun.com>
11039
11040 Remove unportable casts and storage allocation tricks.
11041 While we're at it, remove almost all casts, since they
11042 usually aren't needed and are a sign of trouble.
11043
11044 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
11045
11046 * src/derives.c (derives_compute): Do not subtract NTOKENS from
11047 the pointer DSET returned by malloc; this isn't portable.
11048 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
11049 Similarly for DERIVES.
11050 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
11051 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
11052 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
11053
11054 * src/derives.c (derives_compute): Do not bother invoking
11055 int_of_rule_number, since rule numbers are integers.
11056
11057 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
11058 rather than XMALLOC (char, N).
11059
11060 * src/files.c (filename_split): Rewrite to avoid cast.
11061
11062 * src/gram.h (symbol_number_as_item_number,
11063 item_number_as_symbol_number, rule_number_as_item_number,
11064 item_number_as_rule_number):
11065 Now inline functions rather than macros, to avoid casts.
11066 * src/state.h (state_number_as_int): Likewise.
11067 * src/tables.c (state_number_to_vector_number,
11068 symbol_number_to_vector_number): Likewise.
11069
11070 * src/gram.h (int_of_rule_number): Remove; no longer used.
11071
11072 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
11073 since the resulting storage is always stored into.
11074
11075 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
11076 where it's needed.
11077
11078 * src/muscle_tab.c (muscle_m4_output):
11079 Now inline. Return bool, not int.
11080 * src/state.c (state_compare): Likewise.
11081 * src/symtab.c (symbol_check_defined,
11082 symbol_check_alias_consistency, symbol_pack, symbol_translation,
11083 hash_compare_symbol, hash_symbol):
11084 Likewise.
11085 * src/uniqstr.c (uniqstr_print): Likewise.
11086 * src/muscle_tab.c (muscle_m4_output_processor):
11087 New function, to avoid casts.
11088 * src/state.c (state_comparator, stage_hasher): Likewise.
11089 * src/symtab.c (symbol_check_defined_processor,
11090 symbol_check_alias_consistency_processor, symbol_pack_processor,
11091 symbol_translation_processor, hash_symbol_comparator,
11092 hash_symbol_hasher): Likewise.
11093 * src/uniqstr.c (uniqstr_print_processor): Likewise.
11094 * src/muscle_tab.c (muscles_m4_output):
11095 Use new functions instead of casting old functions unportably.
11096 * src/state.c (state_hash_new): Likewise.
11097 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
11098 symbols_token_translations_init):
11099 Likewise.
11100 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
11101
11102 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
11103 var instead of casting to long, to avoid casts.
11104 (prepare_states): Use MALLOC rather than alloca, so that we don't
11105 have to worry about alloca.
11106 * src/state.c (state_hash_lookup): Likewise.
11107
11108 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
11109 local var instead of casting to unsigned char, to avoid casts.
11110
11111 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
11112 STATE_ALLOC): Remove.
11113 (transitions_new, errs_new, reductions_new, state_new): Use malloc
11114 rather than calloc, and use offsetof to avoid allocating slightly
11115 too much storage.
11116 (state_new): Initialize all members.
11117
11118 * src/state.c (state_hash): Use unsigned accumulator, not signed.
11119
11120 * src/symtab.c (symbol_free): Remove; unused.
11121 (symbol_get): Remove cast in lhs of assignment.
11122 (symbols_do): Now static. Accept generic arguments, not
11123 hashing-related ones.
11124
11125 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
11126 (symbol_processor): Remove.
11127 (symbols_do): Remove decl; now static.
11128
11129 * src/system.h (alloca): Remove; decl no longer needed.
11130 (<stddef.h>): Include, for offsetof.
11131 (<inttypes.>, <stdint.h>): Include if available.
11132 (uintptr_t): New type, if system lacks it.
11133 (CALLOC, MALLOC, REALLOC): New macros.
11134 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
11135 new macros.
11136
11137 * src/tables.c (table_size): Now int, to pacify GCC.
11138 (table_grow, table_ninf_remap): Use signed table size.
11139 (save_row): Don't bother initializing locals when not needed.
11140 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
11141 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
11142
11143 * src/vcg.h: Correct misspellings.
11144
11145 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
11146
11147
11148 * src/getargs.c (getargs): Don't assume EOF == -1.
11149
26b4a969
PE
111502002-12-09 Paul Eggert <eggert@twinsun.com>
11151
11152 Change identifier spellings to avoid collisions with names
11153 that are reserved by POSIX.
11154
11155 Don't use names ending in _t, since POSIX reserves them.
11156 For consistency, remove _e and _s endings -- they're weren't
11157 needed to remove ambiguity. All uses changed.
11158 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
11159 turn was just renamed from struniq_t.
11160 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
11161 which in turn was just renamed from struniq_processor_t.
11162 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
11163 in turn was renamed from hash_compare_struniq_t.
11164 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
11165 (state_list): Renamed from state_list_t.
11166 * src/assoc.h (assoc): Renamed from assoc_t.
11167 * src/conflicts.c (enum conflict_resolution): Renamed from
11168 enum conflict_resolution_e.
11169 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
11170 (rule_list): Renamed from rule_list_t.
11171 * src/getargs.h (enum trace): Renamed from enum trace_e.
11172 (enum report): Renamed from enum report_e.
11173 * src/gram.h (item_number): Renamed from item_number_t.
11174 (rule_number): Renamed from rule_number_t.
11175 (struct rule_s): Remove the "rule_s" part; not used.
11176 (rule): Renamed from rule_t.
11177 (rule_filter): Renamed from rule_filter_t.
11178 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
11179 (goto_list): Renamed from goto_list_t.
11180 * src/lalr.h (goto_number): Renamed from goto_number_t.
11181 * src/location.h (location): Renamed from location_t.
11182 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
11183 and moved here from:
11184 * src/muscle_tab.h (muscle_entry_t): here.
11185 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
11186 (rule_list): Renamed from rule_list_t.
11187 * src/print_graph.c (static_graph): Renamed from graph.
11188 * src/reader.h (braced_code): Renamed from braced_code_t.
11189 Remove brace_code_e tag.
11190 * src/relation.h (relation_node): Renamed from relation_node_t.
11191 (relation_nodes): Renamed from relation_nodes_t.
11192 (relation): Renamed from relation_t.
11193 * src/state.h (state_number): Renamed from state_number_t.
11194 (struct state): Renamed from struct state_s.
11195 (state): Renamed from state_t.
11196 (transitions): Renamed from transitions_t. Unused (and
11197 misspelled) transtion_s tag removed.
11198 (errs): Renamed from errs_t. Unused errs_s tag removed.
11199 (reductions): Renamed from reductions_t. Unused tag
11200 reductions_s removed.
11201 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
11202 (struct symbol_list): Renamed from struct symbol_list_s.
11203 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
11204 (struct symbol): Renamed from struct symbol_s.
11205 (symbol): Renamed from symbol_t.
11206 * src/tables.c (vector_number): Renamed from vector_number_t.
11207 (action_number): Renamed from action_t.
11208 * src/tables.h (base_number): Renamed from base_t.
11209 * src/vcg.h (enum color): Renamed from enum color_e.
11210 (enum textmode): Renamed from enum textmode_e.
11211 (enum shape): Renamed from enum shape_e.
11212 (struct colorentry): Renamed from struct colorentry_s.
11213 (struct classname): Renamed from struct classname_s.
11214 (struct infoname): Renamed from struct infoname_s.
11215 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
11216 (enum decision): Renamed from enum decision_e.
11217 (enum orientation): Renamed from enum orientation_e.
11218 (enum alignment): Renamed from enum alignment_e.
11219 (enum arrow_mode): Renamed from enum arrow_mode_e.
11220 (enum crossing_type): Renamed from enum crossing_type_e.
11221 (enum view): Renamed from enum view_e.
11222 (struct node): Renamed from struct node_s.
11223 (node): Renamed from node_t.
11224 (enum linestyle): Renamed from enum linestyle_e.
11225 (enum arrowstyle): Renamed from enum arrowstyle_e.
11226 (struct edge): Renamed from struct edge.
11227 (edge): Renamed from edge_t.
11228 (struct graph): Renamed from struct graph_s.
11229 (graph): Renamed from graph_t.
11230 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
11231 Rename value_t -> value.
11232 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
11233 value_t_as_yystype -> value_as_yystype.
11234
11235 Don't include <errno.h> in the mainstream code, since it
11236 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
11237 * lib/get-errno.c, lib/get-errno.h: New files.
11238 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
11239 get-errno.c.
11240 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
11241 * src/output.c (output_skeleton): Likewise.
11242 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
11243 instead of errno.
11244 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
11245 Likewise.
11246 (handle_action_dollar, handle_action_at): Likewise.
11247 * src/system.h: Do not include <errno.h>.
11248 (TAB_EXT): Renamed from EXT_TAB.
11249 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
11250
11251 Avoid str[a-z]*, since <string.h> reserves that name space.
11252 Change all instances of "struniq" in names to "uniqstr", and
11253 likewise for "STRUNIQ" and "UNIQSTR".
11254 * src/uniqstr.c: Renamed from src/struniq.c.
11255 * src/uniqstr.h: Renamed from src/struniq.h.
11256 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
11257 * src/files.c (strsuffix): Remove; unused.
11258 (concat2): Renamed from stringappend. Now static.
11259 * src/files.h (strsuffix, stringappend): Remove; unused.
11260 * src/parse-gram.y (<chars>): Renamed from <string>.
11261 (<uniqstr>): Renamed from <struniq>.
11262 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
11263 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
11264 (struct graph_s.expand): Renamed from struct graph_s.stretch.
11265 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
11266 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
11267 (N_EXPAND): Renamed from N_STRETCH.
11268
11269 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
11270 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
11271 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
11272 Remove; unused.
11273 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
11274 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
11275 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
11276 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
11277 (BASE_MAXIMUM): Renamed from BASE_MAX.
11278 (BASE_MINIMUM): Renamed from BASE_MIN.
11279 (ACTION_MAX): Remove; unused.
11280 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
11281 Unnecessary casts removed from above defines.
11282
11283
11284 Fix misspelling in names.
11285 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
11286 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
11287 G_NODE_ALIGNEMENT.
11288
11289
11290 * lib/timevar.c (timevar_report): Renamed from time_report,
11291 for consistency with other names.
11292 * lib/timevar.h (timevar_report): New decl.
11293 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
11294
11295
11296 Sort include-file uses.
11297
11298 Reorder all include files under src to be in the order "system.h".
11299 then the ../lib include files in angle brackets (alphabetized),
11300 then the . include files in double-quotes (alphabetized). Fix
11301 dependency breakages encountered in this process, as follows:
11302 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
11303 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
11304 * src/state.h: Include "symtab.h".
11305
996b1c7e
PE
113062002-12-08 Paul Eggert <eggert@twinsun.com>
11307
11308 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
11309 since this causes problems when __file__ contains character
11310 sequences like "@" that are treated specially by src/scan-skel.l.
11311 Instead, just use the file's basename. This fixes the bug
11312 reported by Martin Mokrejs in
161a71f3 11313 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 11314
e19c4e5d
PE
113152002-12-06 Paul Eggert <eggert@twinsun.com>
11316
11317 Add support for rules that do not have trailing semicolons, as
11318 POSIX requires. Improve the quality of locations in Bison
11319 diagnostics.
26b4a969 11320
e19c4e5d
PE
11321 * src/location.c: Include <quotearg.h>.
11322 (empty_location): Now const.
11323 (location_print): New function. Follow the recommendation of the
11324 GNU Coding Standards for locations that span file boundaries.
11325 * src/location.h: Do not include <quotearg.h>; no longer needed.
11326 (boundary): New type.
11327 (location_t): Use it. This allows locations to span file boundaries.
11328 All member uses changed: file -> start.file or end.file (as needed),
11329 first_line -> start.line, first_column -> start.column,
11330 last_line -> end.line, last_column -> end.column.
11331 (equal_boundaries): New function.
11332 (LOCATION_RESET, LOCATION_STEP): Remove.
11333 (LOCATION_PRINT): Remove. All callers changed to use location_print.
11334 (empty_location): Now const.
11335 (location_print): New decl.
11336 * src/parse-gram.y (lloc_default): New function, which handles
11337 empty locations more accurately.
11338 (YYLLOC_DEFAULT): Use it.
11339 (%token COLON): Remove.
11340 (%token ID_COLON): New token.
26b4a969 11341 (rules): Use it.
e19c4e5d
PE
11342 (declarations, rules): Remove trailing semicolon.
11343 (declaration, rules_or_grammar_declaration):
11344 Allow empty (";") declaration.
11345 (symbol_def): Remove empty actions; no longer needed.
11346 (rules_or_grammar_declaration): Remove trailing semicolon.
11347 (semi_colon.opt): Remove.
11348 * src/reader.h: Include location.h.
11349 (scanner_cursor): New decl.
11350 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
11351 rolling our own.
11352 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
11353 of *loc.
11354 (STEP): Remove. No longer needed, now that adjust_location does
11355 the work. All uses removed.
11356 (scanner_cursor): New var.
11357 (adjust_location): Renamed from extend_location. It now sets
11358 *loc and adjusts the scanner cursor. All uses changed.
11359 Don't bother testing for CR.
11360 (handle_syncline): Remove location arg; now updates scanner cursor.
11361 All callers changed.
11362 (unexpected_end_of_file): Now accepts start boundary of token or
11363 comment, not location. All callers changed. Update scanner cursor,
11364 not the location.
11365 (SC_AFTER_IDENTIFIER): New state.
11366 (context_state): Renamed from c_context. All uses changed.
11367 (id_loc, code_start, token_start): New local vars.
11368 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
11369 processing of Yacc white space and equivalents here.
11370 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
11371 instead of returning ID immediately, since we need to search for
11372 a subsequent colon.
11373 (<INITIAL>"'", "\""): Save token_start.
11374 (<INITIAL>"%{", "{", "%%"): Save code_start.
11375 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
11376 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
11377 BEGIN context_state at end, not INITIAL.
11378 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
11379 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
11380 Return correct token start.
11381 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
11382 the start of a character, string or multiline comment is found.
11383 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
11384 Reduction): Adjust reported locations to match the more-precise
11385 results now expected.
11386 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
11387 * tests/reduce.at (Useless Rules, Reduced Automaton,
11388 Underivable Rules): Likewise.
11389 * tests/regression.at (Invalid inputs): No longer `expecting ";"
11390 or "|"' now that so many other tokens are allowed by the new grammar.
11391
11392 * src/complain.h (current_file): Remove duplicate decl;
11393 current_file is now owned by files.h.
11394 * src/complain.c, src/scan-gram.l: Include files.h.
11395
113962002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 11397
e19c4e5d
PE
11398 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
11399 promotes to int; it might be unsigned int.
11400 * data/yacc.c (yy_reduce_print): Likewise.
11401
11402 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
11403 be #defined in the prologue, not in the Bison declarations.
11404 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 11405
b64755e3
PE
114062002-12-02 Paul Eggert <eggert@twinsun.com>
11407
11408 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
11409 * lib/strtoul.c: New file, from gnulib.
11410 This fixes a porting bug reported by Peter Klein in
161a71f3 11411 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 11412
6e746484
PE
114132002-11-30 Paul Eggert <eggert@twinsun.com>
11414
b64755e3
PE
11415 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
11416 and put only a forward declaration in the prologue. This is for
11417 consistency with the other scanner helper functions.
11418
6ba55592
PE
11419 Type clashes now generate warnings, not errors, since it
11420 appears that POSIX may allow some grammars with type clashes.
11421 * src/reader.c (grammar_current_rule_check): Warn about
11422 type clashes instead of complaining.
11423 * tests/input.at (Type Clashes): Expect warnings, not complaints.
11424
6e746484
PE
11425 Add Yacc library, since POSIX requires it.
11426 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
11427 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
11428 * lib/main.c, lib/yyerror.c: New files.
11429
11430 gram_error can be static; it need not be extern.
11431 * src/reader.h (gram_error): Remove decl.
11432 * src/parse-gram.y (gram_error): Now static. Add static decl.
11433 (print_token_value): Omit parameter names from forward decl,
11434 for consistency.
11435
88510f9c
PE
114362002-11-29 Paul Eggert <eggert@twinsun.com>
11437
6e746484
PE
11438 * doc/bison.texinfo: Emphasize that yylex and yyerror must
11439 be declared before being used. E.g., one should typically
11440 declare them in the prologue. Use GNU coding style in examples.
11441 Put "const" consistently after the type it modifies. Mention
11442 that C99 supports "inline". Mention that yyerror traditionally
11443 returns "int".
11444
88510f9c
PE
11445 %parse-param and %lex-param now take just one argument, the
11446 declaration; the argument name is deduced from the declaration.
11447
11448 * doc/bison.texinfo (Parser Function, Pure Calling, Error
11449 Reporting, Table of Symbols): Document this.
11450 * src/parse-gram.y (add_param): New function.
11451 (COMMA): Remove.
11452 (declaration): Implement new rule for %parse-param and %lex-param.
11453 * src/scan-gram.l: "," now elicits a warning, rather than being
11454 a token; this is more compatible with byacc.
11455 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
11456
bb92250c
PE
114572002-11-27 Paul Eggert <eggert@twinsun.com>
11458
11459 Rename identifiers to avoid real and potential collisions.
11460
11461 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
11462 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 11463 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
11464 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11465 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
11466 * src/parse-gram.y (print_token_value): Renamed from yyprint.
11467 All uses changed.
11468 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
11469 The name "yycontrol" violates the name space rules, and this stuff
11470 wasn't being used anyway.
11471 (input): Remove action; this stuff wasn't being used.
11472 (gram_error): Rename local variable yylloc -> loc.
11473 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
11474 (YY_DECL): Don't use "yy" at start of local variables.
11475 All uses changed, e.g., yylloc -> loc.
11476 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
11477 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
11478 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
11479 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
11480
11481 * src/parse-gram.y (gram_error): loc is now const *.
11482 * src/reader.h (gram_error): Likewise.
11483
3af4feb2
PE
114842002-11-24 Paul Eggert <eggert@twinsun.com>
11485
11486 Version 1.75c.
11487
11488 * tests/actions.at (Actions after errors): Use an output format
11489 more similar to that of the Printers and Destructors test.
11490 Test the position of the ';' token too.
11491 (Printers and Destructors): Likewise.
11492 (Printers and Destructors: %glr-parser): Remove for now, to avoid
11493 unnecessarily alarming people when the test fails.
11494
11495 * data/yacc.c (yyerrlab1): Move this label down, so that the
11496 parser does not discard the lookahead token if the user code
11497 invokes YYERROR. This change is required for POSIX conformance.
11498
11499 * lib/error.c: Sync with gnulib.
11500
115012002-11-22 Paul Eggert <eggert@twinsun.com>
11502
11503 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
11504 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
11505 * lib/xmalloc.c: Likewise.
26b4a969 11506
58004308
PE
115072002-11-20 Paul Eggert <eggert@twinsun.com>
11508
11509 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
11510
115112002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 11512
58004308
PE
11513 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
11514 should use `if (! x) abort ();' rather than `assert (x);', and
11515 anyway it's one less thing to worry about configuring.
11516
11517 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
11518 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
11519 and replace all instances of assert with abort.
11520 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
11521 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
11522
11523 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
11524 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
11525 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
11526 hash_find_entry, hash_rehash, hash_insert): Likewise.
11527 * src/conflicts.c (resolve_sr_conflict): Likewise.
11528 * src/lalr.c (set_goto_map, map_goto): Likewise.
11529 * src/nullable.c (nullable_compute): Likewise.
11530 * src/output.c (prepare_rules, token_definitions_output): Likewise.
11531 * src/reader.c (packgram, reader): Likewise.
11532 * src/state.c (state_new, state_free, state_transitions_set,
11533 state_reduction_find): Likewise.
11534 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
11535 symbol_pack): Likewise.
11536 * src/tables.c (conflict_row, pack_vector): Likewise.
11537 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
11538 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
11539 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
11540 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
11541
11542 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
11543 (ARGMATCH_CONSTRAINT): New macro.
11544 (ARGMATCH_ASSERT): Use it.
11545
11546 * src/system.h (verify): New macro.
11547 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
11548 rather than assert.
11549 * src/tables.c (tables_generate): Likewise.
11550
11551 * src/struniq.c (struniq_assert): Now returns void, and aborts
11552 if the assertion is false.
11553 (struniq_assert_p): Remove.
11554 * src/struniq.h: Likewise.
11555
76ae8198
PE
115562002-11-18 Paul Eggert <eggert@twinsun.com>
11557
11558 * data/glr.c (yygetLRActions): Replace `yyindex' with
11559 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
11560 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 11561 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 11562
d3c4e709
AD
115632002-11-18 Akim Demaille <akim@epita.fr>
11564
11565 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
11566 space.
11567 From Tim Van Holder.
11568
8d8a7238
PE
115692002-11-17 Paul Eggert <eggert@twinsun.com>
11570
11571 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
11572 to "SyntaxError" for consistency with my 2002-11-15 change.
11573
11574 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
11575 not define to {}, since this breaks the common use of `YYDPRINTF
11576 ((...));' if a single statement is desired (e.g. before `else').
11577 Work around GCC warnings by surrounding corresponding calls with
11578 {} if needed.
11579 (yyhasResolvedValue): Remove unused function.
11580 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
11581 loop body.
11582 (yyreportSyntaxError): Renamed from yyreportParseError.
11583 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
11584 All uses changed.
11585 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
11586 extern when possible. Remove unused initializations.
11587
b0937b22
AD
115882002-11-16 Akim Demaille <akim@epita.fr>
11589
11590 Augment the similarity between GLR and LALR traces.
11591
11592 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
11593 (YY_REDUCE_PRINT): New.
11594 (yyparse): Use them.
11595 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
11596 YYDPRINT here.
11597 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
11598 state reached after the reduction/recovery, since...
11599 (yyparse, yyprocessOneStack): Report the state we are entering in.
11600
c5e3e510
AD
116012002-11-16 Akim Demaille <akim@epita.fr>
11602
11603 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
11604 Add support for --trace=skeleton.
11605 * src/scan-skel.l: %option debug.
11606 Scan strings of non-@ or \n instead of character by character.
11607 (scan_skel): Handle trace_skeleton.
11608 (QPUTS): New.
11609 (@output_parser_name@, @output_header_name@): ``Restore'' their
11610 support (used to be M4 macros).
11611 * data/yacc.c: Quote larger chunks, a la glr.c.
11612 * data/lalr1.cc: Likewise.
11613 The header guards are no longer available, so use some other
11614 string than `YYLSP_NEEDED'.
11615
4c6cc1db
AD
116162002-11-16 Akim Demaille <akim@epita.fr>
11617
11618 Make the ``Printers and Destructors'' test more verbose, taking
11619 `yacc.c''s behavior as (possibly wrong) reference.
11620
11621 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
11622 instead of fprint on stdout.
11623 Set and report the last_line of the symbols.
11624 Consistently display values and locations.
11625
6d9e8019
PE
116262002-11-16 Paul Eggert <eggert@twinsun.com>
11627
11628 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
11629
6e649e65
PE
116302002-11-15 Paul Eggert <eggert@twinsun.com>
11631
b25d88f6
PE
11632 * tests/actions.at (Actions after errors): New test case.
11633
6e649e65
PE
11634 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
11635 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
11636 tests/action.at, tests/calc.at, tests/conflicts.at,
11637 tests/cxx-type.at, tests/regression.at:
11638 "parse error" -> "syntax error" for POSIX compatibility.
11639 "parsing stack overflow..." -> "parser stack overflow" so
11640 that code matches Bison documentation.
11641
0f39aab9
AD
116422002-11-15 Akim Demaille <akim@epita.fr>
11643
11644 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
11645 take two BRACED_CODE, not two string_content.
11646 Free the scanner's obstack when we are done.
11647 (code_content): New.
11648 * tests/calc.at: Adjust.
11649 * doc/bison.texinfo: Adjust.
11650 Also, make sure to include the `,' for these declarations.
11651
761c1926
AD
116522002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
11653
11654 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
11655 definition; avoids potential autoreconf problems.
11656
b0f98b10
AD
116572002-11-15 Akim Demaille <akim@epita.fr>
11658
11659 Always check the value returned by yyparse.
11660
11661 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
11662 returned by yyparse.
11663 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
11664 Adjust calls.
11665 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
11666 returned by yyparse.
11667
970785f1
PH
116682002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11669
11670 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
11671 on input.at test.
11672
8fcc7db1
PE
116732002-11-14 Paul Eggert <eggert@twinsun.com>
11674
7ec1b48e
PE
11675 * src/output.c (output_skeleton): Call xfopen instead of
11676 duplicating xfopen's body.
11677
cfff7583 11678 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 11679 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 11680
8fcc7db1
PE
11681 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
11682 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
11683 Group compiler. Instead, use "$CC -E bar.c". Include the .h
11684 file twice in the grammar, as an extra check.
11685
11686 * tests/input.at (Torturing the Scanner): Surround the
11687 backslash-newline tests with "#if 0", to make it less likely that
11688 we'll run into compiler bugs. Bring back solitary \ inside
11689 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 11690 test backslash-newline in C character constant.
8fcc7db1 11691
4e8d992c
AD
116922002-11-14 Akim Demaille <akim@epita.fr>
11693
11694 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
11695 status of the compiler.
f32b346d 11696 Calling `exit 1' is no longer needed.
4e8d992c
AD
11697 Reported by Nelson H. F. Beebe.
11698
9501dc6e
AD
116992002-11-14 Akim Demaille <akim@epita.fr>
11700
11701 * tests/atlocal.in (CPPFLAGS): We have config.h.
11702 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
11703 New.
11704 * tests/actions.at, tests/calc.at, tests/conflicts.at,
11705 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
11706 * tests/regression.at, tests/torture.at: Use them for all the
11707 grammars that are to be compiled.
11708 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
11709 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
11710 * doc/bison.texinfo (GLR Parsers): Document `inline'.
11711
18b519c0
AD
117122002-11-14 Akim Demaille <akim@epita.fr>
11713
11714 * doc/bison.texinfo: Various formatting changes (alignments in
11715 samples, additional @group/@end group, GCS in samples.
11716 Use @deffn instead of simple @table to define the directives,
11717 macros, variables etc.
11718
9a86cdb9
PE
117192002-11-13 Paul Eggert <eggert@twinsun.com>
11720
daa33def 11721 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 11722 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 11723
daa33def 11724 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 11725 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
11726 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
11727 * tests/headers.at (export YYLTYPE): Likewise.
11728
11729 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 11730 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 11731
9a86cdb9
PE
11732 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
11733 comments, since they're not portable. Use GNU coding style.
11734
9c1e26bd
AD
117352002-11-13 Akim Demaille <akim@epita.fr>
11736
11737 * data/yacc.c: Leave bigger chunks of quoted text.
11738 (YYDSYMPRINTF): New.
11739 Use it to report symbol activities.
11740 * data/glr.c (YYDSYMPRINTF): New.
11741 Use it.
11742
87f721cc
PE
117432002-11-12 Paul Eggert <eggert@twinsun.com>
11744
11745 Version 1.75b.
11746
11747 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
11748 (yyglrReduce): Return yyok, not 0.
11749 This should avoid the enumerated-type warnings reported
464c6927 11750 by Nelson H. F. Beebe in
161a71f3 11751 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
11752
11753 * lib/bbitset.h (BITSET_INLINE): Remove.
11754 * lib/bitset.h [! BITSET_INLINE]: Remove.
11755 (bitset_set, bitset_reset, bitset_test): Rename local vars
11756 to avoid shadowing warnings by GCC.
11757
11758 * data/glr.c (inline): Remove #define. It's the user's
11759 responsibility to #define it away, just like 'const'.
464c6927 11760 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 11761 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 11762
87f721cc
PE
11763 * Makefile.maint (po-check): Scan .l and .y files instead of the
11764 .c and the .h files that they generate. This fixes the bug
11765 reported by Tim Van Holder in:
161a71f3 11766 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
11767 Look for N_ as well as for _. Try to avoid matching #define for
11768 N_ and _.
11769 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
11770 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
11771 * src/scan-gram.l: Revamp regular expressions so that " and '
11772 do not confuse xgettext.
11773
11774 * src/struniq.h (struniq_new): Do not declare the return type
11775 to be 'const'; this violates the C standard.
11776 * src/struniq.c (struniq_new): Likewise.
11777
be14ade5
AD
117782002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
11779
11780 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
11781 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
11782 linker.
11783
05291fbc
AD
117842002-11-12 Akim Demaille <akim@epita.fr>
11785
11786 * Makefile.maint: Sync with Autoconf:
11787 (local_updates): New.
11788
1f5fd52e
AD
117892002-11-12 Akim Demaille <akim@epita.fr>
11790
11791 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
11792
283f1e64
AD
117932002-11-12 Akim Demaille <akim@epita.fr>
11794
11795 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
11796 locations.
11797
886b69d1
AD
117982002-11-12 Akim Demaille <akim@epita.fr>
11799
11800 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
11801 not yyvalue.
11802
3df37415
AD
118032002-11-12 Akim Demaille <akim@epita.fr>
11804
11805 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
11806 Use it to test the GLR parser.
11807
7bd6c77e
AD
118082002-11-12 Akim Demaille <akim@epita.fr>
11809
11810 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
11811 defines it.
11812 * data/glr.c (yystos): New.
11813 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
11814 (YYDSYMPRINT): New.
11815 (yyval): Don't define it, it is handled via M4.
11816 (yyrecoverParseError): Free verbosely the discarded symbols.
11817 * data/yacc.c (yysymprint): Remove, rather...
11818 (b4_yysymprint_generate): invoke.
11819 * data/c.m4 (b4_yysymprint_generate): New.
11820 Accept pointers as arguments, as opposed to the version from
11821 yacc.c.
11822 (b4_yydestruct_generate): Likewise.
11823 * tests/cations.at (Printers and Destructors): Use Bison directives
11824 instead of CPP macros.
11825 Don't rely on internal details.
11826
b0400cc6
AD
118272002-11-12 Akim Demaille <akim@epita.fr>
11828
11829 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
11830 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
11831 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
11832 it against YYEMPTY and so forth), work on yytoken (i.e., set
11833 it to YYEMPTY etc.).
11834 (yydestruct): Replace with a b4_yydestruct_generate invocation.
11835 (b4_symbol_actions): Remove.
11836 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
11837 for 0, end-of-input.
11838
72f889cc
AD
118392002-11-12 Akim Demaille <akim@epita.fr>
11840
11841 * doc/bison.texinfo (Destructor Decl): New.
11842
b1ae9233
AD
118432002-11-12 Akim Demaille <akim@epita.fr>
11844
11845 * src/tables.c (tables_generate): Use free for pointers that
11846 cannot be NULL, not XFREE.
11847 (pack_vector): Use assert, not fatal, for bound violations.
11848 * src/state.c (state_new): Likewise.
11849 * src/reader.c (reader): Likewise.
11850 * src/lalr.c (set_goto_map): Likewise.
72f889cc 11851 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
11852 the file name.
11853
7ec2d4cd
AD
118542002-11-12 Akim Demaille <akim@epita.fr>
11855
11856 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
11857 Restore.
11858 * src/scan-gram.l (last_string): Is global to the file, not to
11859 yylex.
11860 * src/parse-gram.y (input): Don't append the epilogue here,
11861 (epilogue.opt): do it here, and free the scanner's obstack.
11862 * src/reader.c (epilogue_set): Rename as...
11863 (epilogue_augment): this.
11864 * data/c.m4 (b4_epilogue): Defaults to empty.
11865
573a6cd3
AD
118662002-11-12 Akim Demaille <akim@epita.fr>
11867
11868 * src/getargs.c (long_options): Remove duplicates.
11869 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
11870 Remove.
11871 * doc/bison.rnh: Remove.
11872 * doc/bison.texinfo (VMS Invocation): Remove.
11873
95612cfa
AD
118742002-11-12 Akim Demaille <akim@epita.fr>
11875
11876 * src/struniq.h, src/struniq.c (struniq_t): Is const.
11877 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
11878
11879 Use struniq for symbols.
11880
11881 * src/symtab.h (symbol_t): The tag member is a struniq.
11882 (symbol_type_set): Adjust.
11883 * src/symtab.c (symbol_new): Takes a struniq.
11884 (symbol_free): Don't free the tag member.
11885 (hash_compare_symbol_t, hash_symbol_t): Rename as...
11886 (hash_compare_symbol, hash_symbol): these.
11887 Use the fact that tags as struniqs.
11888 (symbol_get): Use struniq_new.
11889 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
11890 Returns a strniq.
11891 * src/reader.h (merger_list, grammar_currentmerge_set): The name
11892 and type members are struniqs.
11893 * src/reader.c (get_merge_function)
11894 (grammar_current_rule_merge_set): Adjust.
11895 (TYPE, current_type): Are struniq.
11896
11897 Use struniq for file names.
11898
11899 * src/files.h, src/files.c (infile): Split into...
11900 (grammar_file, current_file): these.
11901 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
11902 * src/reduce.c (reduce_print): Likewise.
11903 * src/getargs.c (getargs): Likewise.
11904 * src/complain.h, src/complain.c: Likewise.
11905 * src/main.c (main): Call struniqs_new early enough to use it for
11906 file names.
11907 Don't free the input file name.
11908
3e6656f9
AD
119092002-11-12 Akim Demaille <akim@epita.fr>
11910
11911 * src/symtab.c (symbol_free): Remove dead deactivated code:
11912 type_name are properly removed.
11913 Don't use XFREE to free items that cannot be NULL.
11914 * src/struniq.h, src/struniq.c: New.
11915 * src/main.c (main): Initialize/free struniqs.
11916 * src/parse-gram.y (%union): Add astruniq member.
11917 (yyprint): Adjust.
11918 * src/scan-gram.l (<{tag}>): Return a struniq.
11919 Free the obstack bit that used to store it.
11920 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
11921
7672019c
PE
119222002-11-11 Paul Eggert <eggert@twinsun.com>
11923
11924 Revamp to fix many (but not all) of the C- and M4-related quoting
11925 problems. Among other things, this fixes the Bison bug reported
11926 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 11927 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
11928
11929 Use new @ escapes consistently. Represent brackets with @{ and @}
11930 rather than @<:@ and @:>@, since this works a bit better with dumb
11931 editors like vi. Represent @ with @@, since @ is now consistently
11932 an escape. Use @oline@ and @ofile@ rather than __oline__ and
11933 __ofile__, to avoid unexpected expansions. Similarly, use @output
11934 rather than #output.
11935
11936 * data/c.m4 (b4_copyright): Omit file name from comment, since
11937 the file name could contain "*/".
11938 (b4_synclines_flag): Don't quote the 2nd argument; it should already
11939 be quoted. All uses changed.
11940
11941 * data/glr.c: Use new @ escapes consistently.
11942 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
11943 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
11944 Remove, since they couldn't handle arbitrary characters in file
11945 names.
11946 * data/lalr1.cc: Likewise.
11947 * data/yacc.c: Likewise.
11948
11949 * src/files.c (output_infix): Remove; all uses removed.
11950 * src/files.h: Likewise.
11951
11952 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
11953 mishandled funny characters in file names, and anyway it isn't
11954 needed any more.
11955 * data/yacc.c: Likewise.
11956 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
11957
11958 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
11959 * data/yacc.c: Likewise.
11960
11961 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
11962 strings now.
11963 (muscle_init): Quote filename as a C string.
11964 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
11965 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
11966 * src/output.c (escaped_file_name_output): New function.
11967 (prepare_symbols): Quote tokens for M4.
11968 (prepare): Don't insert output_infix, output_prefix,
11969 output_parser_name, output_header_name; this is now down by scan-skel.
11970 Insert skeleton as a C string.
11971
11972 * src/output.c (user_actions_output, symbol_destructors_output,
11973 symbol_printers_output): Quote filenames for C and M4.
11974 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11975
11976 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
11977 escapes other than \\ and \'; this simplifies the code.
11978 (<SC_STRING>): Likewise, for \\ and \".
11979 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
11980 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
11981 Use new escapes @{ and @} for [ and ].
11982
11983 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
11984 them with auto vars.
11985 Switch to new escape scheme, where @ is the escape character uniformly.
11986 Abort if a stray escape character is found. Avoid unbounded input
11987 buffer when parsing non-escaped text.
11988
11989 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
11990 __oline__, #output, $@, and @{ do not have unintended meanings.
11991
acea4f3b
PE
119922002-11-09 Paul Eggert <eggert@twinsun.com>
11993
11994 Fix the test failure due to GCC warnings described in
161a71f3 11995 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
11996 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
11997 evaluate to 0 if it's impossible for NINF to be in the respective
11998 table.
11999 (yygetLRActions, yyrecoverParseError): Use them.
12000
12001 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
12002 counted in the token inserted at end of file. Now takes
12003 location_t *, not location_t, so that the location can be
12004 adjusted. All uses changed.
12005
12006 * tests/regression.at (Invalid inputs): Adjust wording in
12007 diagnostic to match the new behavior.
12008
12009 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
12010 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
12011 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
12012 abort ();'. This reduces the runtime of the "Many lookaheads"
12013 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
12014 GCC 3.2.
12015
20ef1ad5
PE
120162002-11-07 Paul Eggert <eggert@twinsun.com>
12017
12018 * src/parse-gram.y (CHARACTER): Remove unused token.
12019 All uses removed.
12020
12021 * src/scan-gram.l: Remove stack option. We no longer use the
12022 stack, since the stack was never deeper than 1; instead, use the
12023 new auto var c_context to record the stacked value.
12024
12025 Remove nounput option. At an unexpected end of file, we now unput
12026 the minimal input necessary to end cleanly; this simplifies the
12027 code.
12028
12029 Avoid unbounded token sizes where this is easy.
12030
12031 (unexpected_end_of_file): New function.
12032 Use it to systematize the error message on unexpected EOF.
12033 (last-string): Now auto, not static.
12034 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
12035 (scanner_last_string_free): Remove; not used.
12036 (percent_percent_count): Move decl to just before use.
12037 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
12038 not the (never otherwised-used) CHARACTER.
12039
93724f13
AD
120402002-11-07 Akim Demaille <akim@epita.fr>
12041
12042 Let yyerror always receive the msg as last argument, so that
12043 yyerror can be variadic.
12044
12045 * data/yacc.c (b4_yyerror_args): New.
12046 Use it when calling yyerror.
12047 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
12048 Use it when calling yyerror.
12049 * doc/bison.texinfo (Error Reporting): Adjust.
12050 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
12051 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
12052
6e40b4eb
AD
120532002-11-06 Akim Demaille <akim@epita.fr>
12054
12055 #line should have quoted strings.
12056 Ideally, this should be done by m4_quotearg.
12057
12058 * src/scan-skel.l: Include quotearg.h.
12059 Quote __ofile__.
12060 * src/output.c (symbol_printers_output)
12061 (symbol_destructors_output): Quote the file name.
12062
2dfbfc12
AD
120632002-11-06 Akim Demaille <akim@epita.fr>
12064
12065 * tests/regression.at (Invalid inputs): Adjust to the recent
12066 messages.
12067
437c2d80
AD
120682002-11-06 Akim Demaille <akim@epita.fr>
12069
12070 Restore --no-lines.
12071 Reported by Jim Kent.
12072
12073 * data/c.m4 (b4_syncline): New.
12074 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
12075 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
12076 * src/output.c (user_actions_output): Likewise.
12077 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 12078 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 12079
900c5db5
AD
120802002-11-06 Akim Demaille <akim@epita.fr>
12081
12082 * src/main.c (main): Free `infile'.
12083 * src/scan-gram.l (handle_syncline): New.
12084 Recognize `#line'.
12085 * src/output.c (user_actions_output, symbol_destructors_output)
12086 (symbol_printers_output): Use the location's file name, not
12087 infile.
12088 * src/reader.c (prologue_augment, epilogue_set): Likewise.
12089
e183b123 120902002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 12091
e183b123 12092 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 12093 either has GLR conflict entries.
e183b123 12094
193eb6b7
PE
120952002-11-05 Paul Eggert <eggert@twinsun.com>
12096
e183b123
PE
12097 * src/scan-gram.l: Use more accurate diagnostics, e.g.
12098 "integer out of range" rather than "invalid value".
12099 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
12100 accordingly.
12101
193eb6b7
PE
12102 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
12103 Also, remove one static variable in the scanner.
12104
12105 * src/scan-gram.l (braces_level): Now auto, not static.
12106 Initialize to zero if the compiler is being picky.
12107 (INITIAL): Clear braces_level instead of incrementing it.
12108 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
12109 as POSIX 1003.1-2001 requires.
12110 * src/system.h (IF_LINT): New macro, taken from coreutils.
12111 * configure.ac: Define "lint" if --enable-gcc-warnings.
12112
29c01725
AD
121132002-11-05 Akim Demaille <akim@epita.fr>
12114
12115 * src/scan-gram.l: When it starts with `%', complain about the
12116 whole directive, not just that `invalid character: %'.
12117
8aeac3ca
AD
121182002-11-04 Akim Demaille <akim@epita.fr>
12119
12120 * Makefile.maint: Update from Autoconf.
12121 (update, cvs-update, po-update, do-po-update): New.
12122
793a58bb
AD
121232002-11-04 Akim Demaille <akim@epita.fr>
12124
12125 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
12126 and yyerror.
12127 Have yyerror `use' its arguments.
12128 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
12129 returns true when location & yacc & pure & parse-param.
12130 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
12131
c4d720cd
AD
121322002-11-04 Akim Demaille <akim@epita.fr>
12133
12134 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
12135 clashes.
12136 * src/scan-gram.l: Use [\'] instead of ['] to pacify
12137 font-lock-mode.
12138 Use complain_at.
12139 Use quote, not quote_n since LOCATION_PRINT no longer uses the
12140 slot 0.
12141
613a0dc5
PE
121422002-11-03 Paul Eggert <eggert@twinsun.com>
12143
12144 * src/reader.c (get_merge_function, grammar_current_rule_check):
12145 Use consistent diagnostics for reporting type name clashes.
12146 Quote the types with <>, for consistency with Yacc.
12147 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
12148
2a8d363a
AD
121492002-11-03 Akim Demaille <akim@epita.fr>
12150
12151 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
12152 New.
12153 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
12154 (b4_parse_param): Remove.
12155 Use b4_identification.
12156 Propagate b4_pure_args where needed to pass them to yyerror.
12157 * data/glr.m4 (b4_parse_param): Remove.
12158 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
12159 (b4_lpure_formals): New.
12160 Use b4_identification.
12161 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
12162 b4_user_formals and b4_user_args.
12163 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
12164 (yyreportAmbiguity): When using a pure parser, also need
12165 the location, and the parse-params.
12166 Adjust callers.
12167 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
12168 When using a pure parser, also need the parse-params.
12169 Adjust callers.
12170 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
12171 (%pure-parser + %parse-param) LALR and GLR parsers.
12172 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
12173 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
12174 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
12175 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
12176 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
12177 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
12178 * doc/bison.texinfo: Untabify the whole file.
12179 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
12180 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
12181 (Error Reporting): Adjust to these new directives.
12182 Document %error-verbose, deprecate YYERROR_VERBOSE.
12183
9e32add8
AD
121842002-11-03 Akim Demaille <akim@epita.fr>
12185
12186 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
12187 AT_CHECK_CALC_GLR invocations to use % directives, instead of
12188 command line options.
12189 * tests/cxx-type.at: Formatting changes.
12190
b02d90a5
PE
121912002-11-03 Paul Eggert <eggert@twinsun.com>
12192
12193 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
12194 to count columns correctly, and to check for invalid inputs.
9e32add8 12195
b02d90a5
PE
12196 Use mbsnwidth to count columns correctly. Account for tabs, too.
12197 Include mbswidth.h.
12198 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
12199 (extend_location): New function.
12200 (YY_LINES): Remove.
12201
12202 Handle CRLF in C code rather than in Lex code.
12203 (YY_INPUT): New macro.
12204 (no_cr_read): New function.
12205
12206 Scan UCNs, even though we don't fully handle them yet.
12207 (convert_ucn_to_byte): New function.
12208
12209 Handle backslash-newline correctly in C code.
12210 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
12211 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
12212 all uses changed.
12213 (tag, splice): New EREs. Do not allow NUL or newline in tags.
12214 Use {splice} wherever C allows backslash-newline.
12215 YY_STEP after space, newline, vertical-tab.
12216 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 12217
b02d90a5
PE
12218 (letter, id): Don't assume ASCII; e.g., spell out a-z.
12219
12220 ({int}, handle_action_dollar, handle_action_at): Check for integer
12221 overflow.
9e32add8 12222
b02d90a5
PE
12223 (YY_STEP): Omit trailing semicolon, so that it's more like C.
12224
12225 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
12226 as well as \000. Check for UCHAR_MAX, not 255.
12227 Allow \x with an arbitrary positive number of digits, as in C.
12228 Check for overflow here.
12229 Allow \? and UCNs, for compatibility with C.
12230
12231 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
12232 with quote slot used by complain_at.
12233
12234 * tests/input.at: Add tests for backslash-newline, m4 quotes
12235 in symbols, long literals, and funny escapes in strings.
12236
12237 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
12238 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
12239 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
12240 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
12241 * m4/mbswidth.m4: New file, from GNU coreutils.
12242
12243 * doc/bison.texinfo (Grammar Outline): Document // comments.
12244 (Symbols): Document that trigraphs have no special meaning in Bison,
12245 nor is backslash-newline allowed.
12246 (Actions): Document that trigraphs have no special meaning.
12247
12248 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
12249 no longer used.
12250
122512002-11-02 Paul Eggert <eggert@twinsun.com>
12252
12253 * src/reader.c: Don't include quote.h; not needed.
12254 (get_merge_function): Reword warning to be consistent with
12255 type clash diagnostic in grammar_current_rule_check.
12256
12257 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
12258 bug in trigraph handling.
12259
12260 * src/output.c (prepare_symbols): When printing token names,
12261 escape "[" as "@<:@" and likewise for "]".
12262
12263 * src/system.h (errno): Remove declaration, as we are now
12264 assuming C89 or better, and C89 guarantees errno.
12265
762b212b
PE
122662002-10-30 Paul Eggert <eggert@twinsun.com>
12267
12268 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
12269 Check for close failures.
12270 * src/files.h (xfclose): Return void, not int, since it always
12271 returned zero.
12272 * src/files.c (xfclose): Likewise. Report I/O error if ferror
12273 indicates one.
12274 * src/output.c (output_skeleton): Use xfclose rather than fclose
12275 and ferror. xfclose now checks ferror.
12276
12277 * data/glr.c (YYLEFTMOST_STATE): Remove.
12278 (yyreportTree): Use a stack-based leftmost state. This avoids
12279 our continuing battles with bogus warnings about initializers.
12280
56100c60
AD
122812002-10-30 Akim Demaille <akim@epita.fr>
12282
12283 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
12284 #if.
12285
51b4a04c
PH
122862002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12287
12288 * tests/glr-regr1.at: New test for reported regressions.
12289 * tests/testsuite.at: Add glr-regr1.at test.
12290 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 12291
bf1ebda2
PE
122922002-10-24 Paul Eggert <eggert@twinsun.com>
12293
5c16c6b1
PE
12294 Version 1.75a.
12295
bf1ebda2
PE
12296 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
12297 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
12298 we use malloc. Don't assume 'A' through 'Z' are contiguous.
12299 Don't assume strdup exists; POSIX says its an XSI extension.
12300 Check for buffer overflow on input.
12301
b526ee61
AD
123022002-10-24 Akim Demaille <akim@epita.fr>
12303
12304 * src/output.c (output_skeleton): Don't disable M4sugar comments
12305 too soon: it results in comments being expanded.
12306 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
12307 first output.
12308
f1886bb2
AD
123092002-10-24 Akim Demaille <akim@epita.fr>
12310
12311 * data/yacc.c (m4_int_type): New.
12312 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
12313 char' as only yacc.c wants K&R portability.
12314 * data/glr.c (yysigned_char): Remove.
12315 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
12316 Reported by Quoc Peyrot.
12317
c5576256
PE
123182002-10-23 Paul Eggert <eggert@twinsun.com>
12319
12320 * src/main.c (main): With --trace=time, report times even if a
12321 non-fatal error occurs. Formerly, the times were reported in some
12322 such cases but not in others.
12323 * src/reader.c (reader): Just return if a complaint has been issued,
12324 instead of exiting, so that 'main' can report times.
12325
27b0ffea
AD
123262002-10-22 Akim Demaille <akim@epita.fr>
12327
12328 * src/system.h: Include sys/types.
12329 Reported by Bert Deknuydt.
12330
223a7883
PE
123312002-10-23 Paul Eggert <eggert@twinsun.com>
12332
12333 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
12334 Suggested by Art Haas.
12335
123362002-10-22 Paul Eggert <eggert@twinsun.com>
12337
12338 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
12339 decl; not needed any more.
12340 * src/main.c (main): Use return to exit, undoing yesterday's change.
12341 The last OS that we could find where this wouldn't work is
12342 SunOS 3.5, and that's too old to worry about now.
12343
12344 * data/glr.c (struct yyltype): Define members even when not
12345 doing locations. This is more consistent with yacc.c, and it
12346 works around the following bug reports:
161a71f3
PE
12347 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
12348 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 12349
223a7883
PE
12350 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
12351 @acronym consistently. Standardize on "Yacc" instead of "YACC",
12352 "Algol" instead of "ALGOL". Give a bit more history about BNF.
12353
8b76775a
AD
123542002-10-22 Akim Demaille <akim@epita.fr>
12355
12356 * data/README: New.
12357
6db10d14
PE
123582002-10-21 Paul Eggert <eggert@twinsun.com>
12359
12360 Be consistent about 'bool'; the old code used an enum in one
12361 module and an int in another, and this violates the C standard.
12362 * m4/stdbool.m4: New file, from coreutils 4.5.3.
12363 * configure.ac (AC_HEADER_STDBOOL): Add.
12364 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
12365 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
12366 * src/symtab.c (hash_compare_symbol_t): Likewise.
12367 * src/system.h (bool, false, true): Use a definition consistent
12368 with ../lib/hash.c. All uses changed.
12369
12370 * src/complain.c (warning_issued): Renamed from warn_message_count,
12371 so that we needn't worry about integer overflow (!).
12372 Now of type bool. All uses changed.
12373 (complaint_issued): Renamed from complain_message_count; likewise.
12374
12375 * src/main.c (main): Use exit to exit with failure.
27b0ffea 12376
6db10d14
PE
12377 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
12378 rather than 1 and 0.
12379 * src/main.c (main): Likewise.
12380 * src/getargs.c (getargs): Likewise.
12381 * src/reader.c (reader): Likewise.
12382
12383 * src/getarg.c (getargs): Remove duplicate code for
12384 "Try `bison --help'".
12385
12386 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
12387 What was that "2" for?
12388
12389 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
12390 * src/getargs.c (usage): Likewise.
12391
12392 * src/getargs.c (getargs): When there are too few operands, report
12393 the last one. When there are too many, report the first extra
12394 one. This is how diffutils does it.
12395
92a060fd
PE
123962002-10-20 Paul Eggert <eggert@twinsun.com>
12397
12398 Remove K&R vestiges.
12399 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
12400 * src/complain.c (VA_START): Remove. Assume prototypes.
12401 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
12402 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
12403 fatal): Assume prototypes.
12404 * src/complain.h: Assume prototypes.
12405 * src/system.h (PARAMS): Remove.
12406 Include <limits.h> unconditionally, since it's guaranteeed even
12407 for a freestanding C89 compiler.
12408 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
12409 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 12410
e7cb57c0
AD
124112002-10-20 Akim Demaille <akim@epita.fr>
12412
12413 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
12414 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
12415 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
12416 (yyresolveStates, yyresolveAction, yyresolveStack)
12417 (yyprocessOneStack): Use them.
12418 (yy_reduce_print): New.
12419 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
12420
0245f82d
AD
124212002-10-20 Akim Demaille <akim@epita.fr>
12422
12423 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
12424 arguments and output `void'.
12425 (b4_c_function): Rename as...
12426 (b4_c_function_def): this.
12427 (b4_c_function_decl, b4_c_ansi_function_def)
12428 (b4_c_ansi_function_decl): New.
12429 Change the interpretation of the arguments: before `int, foo', now
12430 `int foo, foo'.
12431 * data/yacc.c (yyparse): Prototype and define thanks to these.
12432 Adjust b4_c_function_def uses.
12433 * data/glr.c (yyparse): Likewise, but ANSI only.
12434
39912f52
AD
124352002-10-20 Akim Demaille <akim@epita.fr>
12436
12437 * src/output.c (prepare): Move the definition of `tokens_number',
12438 `nterms_number', `undef_token_number', `user_token_number_max'
12439 to...
12440 (prepare_tokens): Here.
12441 (prepare_tokens): Rename as...
12442 (prepare_symbols): this.
12443 (prepare): Move the definition of `rules_number' to...
12444 (prepare_rules): here.
12445 (prepare): Move the definition of `last', `final_state_number',
12446 `states_number' to...
12447 (prepare_states): here.
12448 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
12449
20c1e2ad
AD
124502002-10-20 Akim Demaille <akim@epita.fr>
12451
12452 * src/tables.h, src/tables.c, src/output.c: Comment changes.
12453
21964f43
AD
124542002-10-20 Akim Demaille <akim@epita.fr>
12455
12456 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
12457 * data/c.m4: here.
12458
66d30cd4
AD
124592002-10-20 Akim Demaille <akim@epita.fr>
12460
12461 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
12462 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
12463 `pair'.
12464 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
12465 `name' to...
12466 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
12467 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
12468 These.
12469
95f2c9fe
PE
124702002-10-19 Paul Eggert <eggert@twinsun.com>
12471
12472 Do not create a temporary file, as that involves security and
12473 cleanup headaches. Instead, use a pair of pipes.
12474 Derived from a suggestion by Florian Krohm.
12475 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
12476 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
12477 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
12478 (BISON_PREREQ_SUBPIPE): Add.
12479 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
12480 Add subpipe.h, subpipe.c.
12481 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
12482 * po/POTFILES.in: Add lib/subpipe.c.
12483 * src/output.c: Include "subpipe.h".
12484 (m4_invoke): Remove decl.
12485 (scan_skel): New decl.
12486 (output_skeleton): Use pipe rather than temporary file for m4 input.
12487 Check that m4sugar.m4 is readable, to avoid deadlock.
12488 Check for pipe I/O error.
12489 * src/scan-skel.l (readpipe): Remove decl.
12490 (scan_skel): New function, to be used in place of m4_invoke.
12491 Read from stream rather than file.
66d30cd4 12492
95f2c9fe
PE
12493 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
12494 float, as this generates a warning on Solaris 8 + GCC 3.2 with
12495 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
12496 this generates a more-accurate value anyway.
12497
12498 * lib/timevar.c (timervar_accumulate): Rename locals to
12499 avoid confusion with similarly-named more-global.
12500 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
12501
12502 * src/output.c (prepare): Use xstrdup to convert char const *
12503 to char *, to avoid GCC warning.
12504
c19988b7
AD
125052002-10-19 Akim Demaille <akim@epita.fr>
12506
12507 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
12508 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
12509 Use them to have `calc.y' ready for %pure-parser.
12510 * data/yacc.c (YYLEX): Pass a yylex return type to
12511 b4_c_function_call.
12512
ae7453f2
AD
125132002-10-19 Akim Demaille <akim@epita.fr>
12514
12515 Prototype support of %lex-param and %parse-param.
12516
12517 * src/parse-gram.y: Add the definition of the %lex-param and
12518 %parse-param tokens, plus their rules.
12519 Drop the `_' version of %glr-parser.
12520 Add the "," token.
12521 * src/scan-gram.l (INITIAL): Scan them.
12522 * src/muscle_tab.c: Comment changes.
12523 (muscle_insert, muscle_find): Rename `pair' as `probe'.
12524 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
12525 (muscle_entry_s): The `value' member is no longer const.
12526 Adjust all dependencies.
12527 * src/muscle_tab.c (muscle_init): Adjust: use
12528 MUSCLE_INSERT_STRING.
12529 Initialize the obstack earlier.
12530 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
12531 (muscle_pair_list_grow): New.
12532 * data/c.m4 (b4_c_function_call, b4_c_args): New.
12533 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
12534 * tests/calc.at: Use %locations, not --locations.
12535 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
12536
0e575721
AD
125372002-10-19 Akim Demaille <akim@epita.fr>
12538
12539 * src/getargs.c (usage): Take status as argument and exit
12540 accordingly.
12541 Report the traditional `Try ... --help' message when status != 0.
12542 (usage, version): Don't take a FILE * as arg, it is pointless.
12543 (getargs): When there is an incorrect number of arguments, make it
12544 an error, and report it GNUlically thanks to `usage ()'.
12545
724ce7f5
PE
125462002-10-18 Paul Eggert <eggert@twinsun.com>
12547
3a781eb2
PE
12548 * data/glr.c (yyreportParseError): Don't assume that sprintf
12549 yields the length of the printed string, as this is not true
12550 on SunOS 4.1.4. Reported by Peter Klein.
12551
724ce7f5
PE
12552 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
12553 * tests/conflicts.at (%nonassoc and eof): Likewise.
12554 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
12555
473d0a75
AD
125562002-10-17 Akim Demaille <akim@epita.fr>
12557
12558 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
12559 * src/getargs.c (trace_types, trace_args): Adjust.
12560 * src/reader.c (grammar_current_rule_prec_set)
12561 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
12562 Standardize error messages.
12563 And s/@prec/%prec/!
12564 (reader): Use trace_flag to enable scanner/parser debugging,
12565 instead of an adhoc scheme.
12566 * src/scan-gram.l: Remove trailing debugging code.
12567
e76d2469
PE
125682002-10-16 Paul Eggert <eggert@twinsun.com>
12569
93e2236a
PE
12570 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
12571 MUSCLE_TAB_H.
12572
e76d2469
PE
12573 * NEWS: Officially drop support for building Bison with K&R C,
12574 since it didn't work anyway and it's not worth worrying about.
12575 * Makefile.maint (wget_files): Remove ansi2knr.c.
12576 (ansi2knr.c-url_prefix): Remove.
12577 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
12578 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12579 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12580
5bd1c419
PE
125812002-10-15 Paul Eggert <eggert@twinsun.com>
12582
12583 Stop using the "enum_" trick for K&R-style function definitions;
12584 it confused me, and I was the author! Instead, assume that people
12585 who want to use K&R C compilers (when using these modules in GCC,
12586 perhaps?) will run ansi2knr.
12587
12588 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
12589 All uses of "enum_" changed to "enum ".
12590 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
12591 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 12592
5bd1c419
PE
12593 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
12594 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
12595 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
12596 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
12597 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
12598 abitset_not, abitset_ones, abitset_or, abitset_or_and,
12599 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
12600 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
12601 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
12602 Use function prototypes; this removes the need for declaring
12603 static functions simply to provide their prototypes.
12604 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
12605 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
12606 bitset_count_, bitset_create, bitset_dump, bitset_first,
12607 bitset_free, bitset_init, bitset_last, bitset_next,
12608 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
12609 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
12610 bitset_print, bitset_release_memory, bitset_toggle_,
12611 bitset_type_choose, bitset_type_get, bitset_type_name_get,
12612 debug_bitset): Likewise.
12613 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
12614 * lib/bitset_stats.c (bitset_log_histogram_print,
12615 bitset_percent_histogram_print, bitset_stats_and,
12616 bitset_stats_and_cmp, bitset_stats_and_or,
12617 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
12618 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
12619 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
12620 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
12621 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
12622 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
12623 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
12624 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
12625 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
12626 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
12627 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
12628 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
12629 bitset_stats_zero): Likewise.
12630 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12631 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12632 bitsetv_dump, debug_bitsetv): Likewise.
12633 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
12634 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
12635 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
12636 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
12637 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
12638 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
12639 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
12640 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
12641 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
12642 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
12643 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
12644 Likewise.
12645 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
12646 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
12647 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
12648 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
12649 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
12650 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
12651 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
12652 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
12653 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
12654 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
12655 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 12656
ae26e1f0
AD
126572002-10-14 Akim Demaille <akim@epita.fr>
12658
12659 Version 1.75.
12660
d43baf71
AD
126612002-10-14 Akim Demaille <akim@epita.fr>
12662
12663 * tests/Makefile.am (maintainer-check-posix): New.
12664
7ebc83e3
AD
126652002-10-14 Akim Demaille <akim@epita.fr>
12666
12667 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
12668 member.
12669
05846dae
AD
126702002-10-14 Akim Demaille <akim@epita.fr>
12671
12672 * src/tables.c (table_ninf_remap): base -> tab.
12673 Reported by Matt Rosing.
12674
1318e37d
PE
126752002-10-14 Paul Eggert <eggert@twinsun.com>
12676
447fbb17
PE
12677 * tests/action.at, tests/calc.at, tests/conflicts.at,
12678 tests/cxx-type.at, tests/headers.at, tests/input.at,
12679 tests/regression.at, tests/synclines.at, tests/torture.at:
12680 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
12681 so that the tests still work even if POSIXLY_CORRECT is set.
12682 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 12683
1318e37d
PE
12684 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
12685 for portability to K&R hosts. Fix typo: signed char is guaranteed
12686 only to 127, not to 128.
12687 * data/glr.c (yysigned_char): New type.
12688 * data/yacc.c (yysigned_char): Likewise.
12689 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
12690
cc0f0794
PE
126912002-10-13 Paul Eggert <eggert@twinsun.com>
12692
5038f418
PE
12693 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
12694 true due to limited range of data type" warning from GCC.
12695
cc0f0794
PE
12696 * data/c.m4 (b4_token_defines): Protect against double-inclusion
12697 by wrapping enum yytokentype's definition inside #ifndef
12698 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
12699
6fed0802
AD
127002002-10-13 Akim Demaille <akim@epita.fr>
12701
12702 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
12703 Un yy- yyrhs to avoid the name clash with the global YYRHS.
12704
32f0598d
AD
127052002-10-13 Akim Demaille <akim@epita.fr>
12706
12707 * Makefile.maint: Update from Autoconf 2.54.
12708 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
12709
7ea9a33f
AD
127102002-10-13 Akim Demaille <akim@epita.fr>
12711
12712 * src/print.c (print_state): Separate the list of solved conflicts
12713 from the other items.
12714 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
12715
ea99527d
AD
127162002-10-13 Akim Demaille <akim@epita.fr>
12717
12718 Let nondeterministic skeletons be usable with deterministic
12719 tables.
12720
12721 With the patch, GAWK compiled by GCC without -O2 passes its test
12722 suite using a GLR parser driven by LALR tables. It fails with -O2
12723 because `struct stat' gives two different answers on my machine:
12724 88 (definition of an auto var) and later 96 (memset on this var).
12725 Hence the stack is badly corrumpted. The headers inclusion is to
12726 blame: if I move the awk.h inclusion before GLR's system header
12727 inclusion, the two struct stat have the same size.
12728
12729 * src/tables.c (pack_table): Always create conflict_table.
12730 (token_actions): Always create conflict_list.
12731 * data/glr.c (YYFLAG): Remove, unused.
12732
f377f69f
AD
127332002-10-13 Akim Demaille <akim@epita.fr>
12734
12735 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
12736 (O0FLAGS): New.
12737 (VALGRIND, GXX): New.
12738 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
12739 * tests/bison.in: Run $PREBISON a pre-command.
12740 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
12741 (maintainer-check-g++): New.
12742 * Makefile.am (maintainer-check): New.
12743
2a1fe6ed
AD
127442002-10-13 Akim Demaille <akim@epita.fr>
12745
12746 * data/glr.c: Formatting changes.
12747 Tweak some trace messages to match yacc.c's.
12748
f50adbbd
AD
127492002-10-13 Akim Demaille <akim@epita.fr>
12750
12751 GLR parsers sometimes raise parse errors instead of performing the
12752 default reduction.
12753 Reported by Charles-Henry de Boysson.
12754
12755 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 12756 check the length of the traces when %glr.
f50adbbd
AD
12757 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
12758 GLR's traces.
12759 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
12760 Test GLR parsers.
12761 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
12762 (yyltype): Remove the yy prefix from the member names.
12763 (yytable): Complete its comment.
12764 (yygetLRActions): Map error action number from YYTABLE from
12765 YYTABLE_NINF to 0.
12766 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
12767 (which was a bug: it should have been YYTABEL_NINF, and yet it was
12768 not satisfying as we could compare an YYACTION computed from
12769 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
12770 only value for error actions.
12771 (yyreportParseError): In verbose parse error messages, don't issue
12772 `error' in the list of expected tokens.
12773 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
12774 next action to perform to match glr.c's decoding.
12775 (yytable): Complete its comment.
12776
bcbad5b9
PE
127772002-10-13 Paul Eggert <eggert@twinsun.com>
12778
12779 Fix problem reported by Henrik Grubbstroem in
161a71f3 12780 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
12781 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
12782 because the Bison parser reads the second action before reducing
12783 the first one.
12784 * src/scan-gram.l (rule_length): New static var.
12785 Use it to keep track of the rule length in the scanner, since
12786 we can't expect the parser to be in lock-step sync with the scanner.
12787 (handle_action_dollar, handle_action_at): Use this var.
12788 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 12789
14904b89
PE
127902002-10-12 Paul Eggert <eggert@twinsun.com>
12791
1fe611e5
PE
12792 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
12793 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
12794 Include <sys/time.h> when checking for clock_t and struct tms.
12795 Use same include order as source.
12796 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 12797 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 12798
1fe611e5
PE
12799 * lib/timevar.c: Update copyright date and clarify comments.
12800 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 12801
1fe611e5
PE
12802 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
12803 GCC version as of today, then merge Bison's changes.
12804 Change "GCC" to "Bison" in copyright notice. timevar.def's
12805 author is Akim, so change that too.
12806
98194095
PE
12807 * src/reader.c (grammar_current_rule_check):
12808 Don't worry about the default action if $$ is untyped.
12809 Prevents bogus warnings reported by Jim Gifford in
161a71f3 12810 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 12811
14904b89
PE
12812 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
12813 * data/glr.c, data/lalr1.cc, data/yacc.c:
12814 Output token definitions before the first part of user declarations.
12815 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 12816 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 12817
ff6dca18
PE
128182002-10-11 Paul Eggert <eggert@twinsun.com>
12819
12820 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
12821 (yyparse): here. This undoes some of the 2002-07-25 change.
12822 Compatibility problem reported by Ralf S. Engelschall with
12823 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
12824
eb714592
AD
128252002-10-11 Akim Demaille <akim@epita.fr>
12826
12827 * tests/regression.at Characters Escapes): New.
12828 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
12829 characters.
12830 Reported by Jan Nieuwenhuizen.
12831
b7195100
AD
128322002-10-11 Akim Demaille <akim@epita.fr>
12833
12834 * po/id.po: New.
12835
f28a0f2d
PE
128362002-10-10 Paul Eggert <eggert@twinsun.com>
12837
12838 Portability fixes for bitsets; this also avoids several GCC
12839 warnings.
12840
12841 * lib/abitset.c: Include <stddef.h>, for offsetof.
12842 * lib/lbitset.c: Likewise.
12843
12844 * lib/abitset.c (abitset_bytes): Return a size that is aligned
12845 properly for vectors of objects. Do not assume that adding a
12846 header size to a multiple of a word size yields a value that is
12847 properly aligned for the whole union.
12848 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12849
12850 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
12851 unique names for structures.
12852 * lib/ebitset.c (ebitset_bytes): Likewise.
12853 * lib/lbitset.c (lbitset_bytes): Likewise.
12854
12855 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
12856 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
12857 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
12858 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
12859 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
12860 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
12861 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
12862 to improve the type-checking that GCC can do.
12863 * lib/bitset.c (bitset_op4_cmp): Likewise.
12864 * lib/bitset_stats.c (bitset_stats_count,
12865 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
12866 bitset_stats_copy, bitset_stats_disjoint_p,
12867 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
12868 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
12869 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
12870 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
12871 bitset_stats_and_or_cmp, bitset_stats_andn_or,
12872 bitset_stats_andn_or_cmp, bitset_stats_or_and,
12873 bitset_stats_or_and_cmp): Likewise.
12874 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
12875 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
12876 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
12877 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
12878
12879 * lib/abitset.h: Include bitset.h, not bbitset.h.
12880 * lib/ebitset.h: Likewise.
12881 * lib/lbitset.h: Likewise.
12882
12883 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
12884 All instances of parameters of type enum bitset_opts are now of
12885 type enum_bitset_opts, to conform to the C Standard, and similarly
12886 for enum_bitset_type.
12887 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
12888 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
12889
12890 Do not use "struct bitset_struct" to mean different things in
12891 different modules. Not only is this confusing, it violates
12892 the C Standard, which requires that structure types in different
12893 modules must be compatible if one is to be passed to the other.
12894 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
12895 All instances of "struct bitset_struct *" replaced with "bitset".
12896 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
12897 (union bitset_union, struct abitset_struct, struct ebitset_struct,
12898 struct lbitset_struct, struct bitset_stats_struct): New types.
12899 All uses of struct bitset_struct changed to union bitset_union,
12900 etc.
ba0fe3c7 12901 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
12902 struct bitset_struct): Remove.
12903 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
12904 struct bitset_struct): Remove.
12905 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
12906 bitset_struct): Remove.
12907 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
12908 Likewise.
12909
12910 Do not call a function of type T using a call that assumes the
12911 function is of a different type U. Standard C requires that a
12912 function must be called with a type that is compatible with its
12913 definition.
12914 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12915 New decls.
12916 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12917 New functions.
12918 * lib/ebitset.c (PFV): Remove.
12919 * lib/lbitset.c (PFV): Likewise.
12920 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
12921 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
12922 decls.
12923 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
12924 (ebitset_vtable): Use them.
12925 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
12926 lbitset_xor): New functions.
12927 (lbitset_vtable): Use them.
12928
12929 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
12930 Declare.
12931
12932 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
12933 GCC warning.
12934 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
12935 Use offsetof, for simplicity.
12936
6fbe4984
PE
129372002-10-06 Paul Eggert <eggert@twinsun.com>
12938
12939 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
12940 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 12941 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
12942 which was inadvertently undone by the 2002-09-30 patch.
12943 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
12944 the same width as int.
12945
420f93c8
PE
129462002-10-04 Paul Eggert <eggert@twinsun.com>
12947
12948 Version 1.50.
12949
12950 * configure.ac (AC_INIT), NEWS: Increment version number.
12951
12952 * doc/bison.texinfo: Minor spelling, grammar, and white space
12953 fixes.
12954 (Symbols): Mention that any negative value returned from yylex
12955 signifies end-of-input. Warn about negative chars. Mention
12956 the portable Standard C character set.
12957
12958 The GNU coding standard says CFLAGS and YFLAGS are reserved
12959 for the installer to set.
12960 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
12961 * src/Makefile.am (AM_CFLAGS): Likewise.
12962 (AM_YFLAGS): Renamed from YFLAGS.
12963
12964 Fix some MAX and MIN problems.
12965 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
12966 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
12967 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
12968 * src/reader.c (reader): Use it.
12969
12970 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
12971 POSIX 1003.1-2001 has removed fgrep.
12972
129732002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
12974
12975 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
12976 interpreted as signed.
12977 * lib/ebitset.c (ebitset_list): Fix bug.
12978
ff68026d
PE
129792002-10-01 Paul Eggert <eggert@twinsun.com>
12980
12981 More fixes for 64-bit hosts and large bitsets.
12982
12983 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
12984 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
12985 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
12986 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
12987 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
12988 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
12989 bitset_count_): Likewise.
12990 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
12991 bitset_first, bitset_last): Likewise.
12992 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
12993 bitset_stats_list_reverse, bitset_stats_size,
12994 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
12995 Likewise.
12996 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12997 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12998 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12999 bitsetv_reflexive_transitive_closure): Likewise.
13000 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
13001 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
13002 Likewise.
13003 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
13004 Likewise.
420f93c8 13005
ff68026d
PE
13006 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
13007 Use size_t, not unsigned int, to count bytes.
13008 * lib/abitset.h (abitset_bytes): Likewise.
13009 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
13010 Likewise.
13011 * lib/bitset.h (bitset_bytes): Likewise.
13012 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
13013 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
13014 * lib/bitsetv.c (bitsetv_alloc): Likewise.
13015 * lib/ebitset.c (ebitset_bytes): Likewise.
13016 * lib/ebitset.h (ebitset_bytes): Likewise.
13017 * lib/lbitset.c (lbitset_bytes): Likewise.
13018 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 13019
ff68026d
PE
13020 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
13021 abitset_subset_p, abitset_disjoint_p, abitset_and,
13022 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
13023 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
13024 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
13025 abitset_or_and, abitset_or_and_cmp):
13026 Use bitset_windex instead of unsigned int.
13027 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
13028 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
13029 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
13030 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
13031 Likewise.
13032 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 13033
ff68026d
PE
13034 * lib/bitset.c (bitset_print):
13035 Use proper printf formats for widths of integer types.
13036 * lib/bitset_stats.c (bitset_percent_histogram_print,
13037 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
13038 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13039 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
13040 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 13041
ff68026d
PE
13042 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
13043 BITSET_SIZE_MAX): New macros.
13044 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
13045 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
13046 to BITSET_WINDEX_MAX.
13047
13048 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
13049 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
13050 since we now return the bitset_bindex type (not int).
13051
13052 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
13053 when computing sizes.
13054 * lib/ebitset.c (ebitset_elts_grow): Likewise.
13055
13056 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
13057 and avoid cast to unsigned.
13058
6aa452a6
AD
130592002-09-30 Akim Demaille <akim@epita.fr>
13060
13061 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
13062 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
13063 Updates from Michael Hayes.
13064
927f7817
AD
130652002-09-30 Art Haas <ahaas@neosoft.com>
13066
13067 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
13068 invocations.
13069 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
13070 defined.
13071
9738f41e
AD
130722002-09-27 Akim Demaille <akim@epita.fr>
13073
13074 Version 1.49c.
13075
a5c75d7f
AD
130762002-09-27 Akim Demaille <akim@epita.fr>
13077
13078 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
13079 (Because of AC_LIBSOURCE).
13080
8280e179
AD
130812002-09-27 Akim Demaille <akim@epita.fr>
13082
13083 Playing with Autoscan.
13084
13085 * configure.ac: Remove the old LIBOBJ tweaks.
13086 (AC_REPLACE_FUNCS): Add strrchr and strtol.
13087 * lib/strrchr.c: New.
13088 * lib/strtol.c: New, from the Coreutils 4.5.1.
13089
ae64af35
AD
130902002-09-27 Akim Demaille <akim@epita.fr>
13091
13092 Playing with Autoscan.
13093
13094 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
13095 * lib/Makefile.am (libbison_a_SOURCES): No longer include
13096 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
13097 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
13098 Coreutils 4.5.1.
13099
d1a1114f
AD
131002002-09-24 Akim Demaille <akim@epita.fr>
13101
13102 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
13103 (Frequently Asked Questions, Parser Stack Overflow): New.
13104
b906441c
AD
131052002-09-13 Akim Demaille <akim@epita.fr>
13106
13107 Playing with autoscan.
13108
13109 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
13110 * src/files.c (skeleton_find): Remove, unused.
13111 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
13112 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
13113
bd701811
AD
131142002-09-13 Akim Demaille <akim@epita.fr>
13115
13116 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
13117 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
13118
e0a13e7b
AD
131192002-09-13 Akim Demaille <akim@epita.fr>
13120
13121 * configure.ac: Require 2.54.
13122 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
13123 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
13124 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
13125 Remove, provided by Autoconf macros.
13126
c97011bf
AD
131272002-09-12 Akim Demaille <akim@epita.fr>
13128
13129 * m4/prereq.m4: Update, from Coreutils 4.5.1.
13130
d862b1be
AD
131312002-09-12 Akim Demaille <akim@epita.fr>
13132
13133 * m4/prereq.m4: Update, from Fileutils 4.1.5.
13134 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
13135 Reported by Martin Mokrejs.
13136
3d38c03a
AD
131372002-09-10 Akim Demaille <akim@epita.fr>
13138
13139 * src/parse-gram.y: Associate a human readable string to each
13140 token type.
13141 * tests/regression.at (Invalid inputs): Adjust.
13142
b6347355
AD
131432002-09-10 Gary V. Vaughan <gary@gnu.org>
13144
13145 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
13146 with an Autoconf-2.5x style configure.ac.
13147
09ba4ab2
PE
131482002-09-06 Paul Eggert <eggert@twinsun.com>
13149
13150 * doc/bison.texinfo (Conditions): Make explicit that the GPL
13151 exception applies only to yacc.c. This is a modification of a
13152 patch originally suggested by Akim Demaille.
13153
21846f69
AD
131542002-09-06 Akim Demaille <akim@epita.fr>
13155
09ba4ab2
PE
13156 * data/c.m4 (b4_copyright): Move the GPL exception comment from
13157 here to...
13158 * data/yacc.c: here.
13159
21846f69
AD
13160 * data/lalr1.cc (struct yyltype): Don't define it, since we use
13161 LocationType.
13162 (b4_ltype): Default to yy::Location from location.hh.
13163
c0ad8bf3
AD
131642002-09-04 Jim Meyering <jim@meyering.net>
13165
13166 * data/yacc.c: Guard the declaration of yytoknum also with
13167 `#ifdef YYPRINT', so it is declared only when used.
13168
3a93251e
AD
131692002-09-04 Akim Demaille <akim@epita.fr>
13170
13171 * configure.in: Rename as...
13172 * configure.ac: this.
13173 Bump to 1.49c.
13174
427c0dda
AD
131752002-09-04 Akim Demaille <akim@epita.fr>
13176
13177 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
13178 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
13179 translate maintainer only messages.
13180
6a254321
PE
131812002-08-12 Paul Eggert <eggert@twinsun.com>
13182
645e30d1
PE
13183 Version 1.49b.
13184
6a254321
PE
13185 * Makefile.am (SUBDIRS): Remove intl.
13186 (DISTCLEANFILES): Remove.
13187 * NEWS: Mention that GNU M4 is now required. Clarify what is
13188 meant by "larger grammars". Mention the pt_BR translation.
13189 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
13190 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
13191 Bump version from 0.11.2 to 0.11.5.
13192 (BISON_PREREQ_STAGE): Remove.
13193 (AM_GNU_GETTEXT): Use external gettext.
13194 (AC_OUTPUT): Remove intl/Makefile.
13195
13196 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
13197
13198 * data/glr.c: Include string.h, for strlen.
13199 (yyreportParseError): Use size_t for yysize.
13200 (yy_yypstack): No longer nested inside yypstates, as nested
13201 functions are not portable. Do not assume size_t is the
13202 same width as int.
13203 (yypstates): Do not assume that ptrdiff_t is the same width
13204 as int, and similarly for yyposn and YYINDEX.
13205
13206 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
13207
13208 * lib/Makefile.am (INCLUDES): Do not include from the intl
13209 directory, which has been removed.
13210 * src/Makefile.am (INCLUDES): Likewise.
13211
13212 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
13213 (bitsets_sources, additional_bitsets_sources, timevars_sources):
13214 New vars.
13215
13216 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
13217 * tests/Makefile.am (EXTRA_DIST): Likewise.
13218
13219 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
13220 Do not assume that bitset_windex is the same width as unsigned.
13221
13222 * lib/abitset.c (abitset_unused_clear): Do not assume that
13223 bitset_word is the same width as int.
13224 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
13225 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
13226 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
13227 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
13228 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
13229
13230 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
13231 portability to one's complement hosts!).
13232 * lib/ebitset.c (ebitset_op1): Likewise.
13233 * lib/lbitset.c (lbitset_op1): Likewise.
13234
13235 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
13236 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
13237 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
13238 Sync with fileutils.
13239 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
13240 lib/gettext.h: Sync with diffutils.
13241
13242 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
13243 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
13244
13245 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
13246 PROTOTYPES to check for prototypes, and "defined __STDC__" to
13247 check for void *.
13248
13249 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
13250 size_t; the old version tried to do this but casted improperly.
13251 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
13252 (bitset_test): Now returns int, not unsigned long.
13253
13254 * lib/bitset_stats.c: Include "gettext.h".
13255 (_): New macro.
13256 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
13257 name locals "index", as it generates unnecessary warnings on some
13258 hosts that have an "index" function.
13259
13260 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
13261 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
13262 they need translation.
13263 * src/LR0.c (state_list_append, new_itemsets, get_state,
13264 append_states, generate_states): Likewise.
13265 * src/assoc.c (assoc_to_string): Likewise.
13266 * src/closure.c (print_closure, set_firsts, closure): Likewise.
13267 * src/gram.c (grammar_dump): Likewise.
13268 * src/injections.c (injections_compute): Likewise.
13269 * src/lalr.c (lookaheads_print): Likewise.
13270 * src/relation.c (relation_transpose): Likewise.
13271 * src/scan-gram.l: Likewise.
13272 * src/tables.c (table_grow, pack_vector): Likewise.
13273
13274 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
13275 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
13276 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
13277 * m4/mbstate_t.m4: Sync with fileutils.
13278 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
13279
13280 * po/LINGUAS: Add pt_BR.
13281 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
13282 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
13283 lib/timevar.c.
13284 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
13285 manual recommends.
13286 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
13287
13288 * src/complain.c (strerror_r): Remove decl; not needed.
13289 (strerror): Use same pattern as ../lib/error.c.
13290
13291 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
13292
13293 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
13294
13295 * src/main.c (main): Cast result of bindtextdomain and textdomain
13296 to void, to avoid a GCC warning when --disable-nls is in effect.
13297
13298 * src/scan-gram.l: Use strings rather than escapes when possible,
13299 to minimize the number of warnings from xgettext.
13300 (handle_action_dollar, handle_action_at): Don't use isdigit,
13301 as it mishandles negative chars and it may not work as expected
13302 outside the C locale.
13303
13304 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
13305 this is a GCC extension and is not portable to other compilers.
13306
13307 * src/system.h (alloca): Use same pattern as ../lib/error.c.
13308 Do not include <ctype.h>; no longer needed.
13309 Do not include <malloc.h>; no longer needed (and generates
13310 warnings on OpenBSD 3.0).
13311
13312 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
13313 it's not portable.
13314
13315 * tests/regression.at: Do not use 'cc -c input.c -o input';
13316 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
13317
13318 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
13319 exit status as failure, not just exit status 1. Sun C exits
13320 with status 2 sometimes.
13321
13322 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
13323 Use it for the two large tests.
13324
c8f002c7
AD
133252002-08-02 Akim Demaille <akim@epita.fr>
13326
13327 * src/conflicts.c (conflicts_output): Don't output rules never
13328 reduced here, since anyway that computation doesn't work.
13329 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
13330 (rule_useless_p, rule_never_reduced_p): New.
13331 (grammar_rules_partial_print): Use a filter instead of a range.
13332 Display the title only if needed.
13333 (grammar_rules_print): Adjust.
13334 (grammar_rules_never_reduced_report): New.
13335 * src/tables.c (action_row): Move the computation of rules never
13336 reduced to...
13337 (token_actions): here.
13338 * src/main.c (main): Make the parser before making the report, so
13339 that rules never reduced are computed.
13340 Call grammar_rules_never_reduced_report.
13341 * src/print.c (print_results): Report rules never reduced.
13342 * tests/conflicts.at, tests/reduce.at: Adjust.
13343
cd08e51e
AD
133442002-08-01 Akim Demaille <akim@epita.fr>
13345
13346 Instead of attaching lookaheads and duplicating the rules being
13347 reduced by a state, attach the lookaheads to the reductions.
13348
13349 * src/state.h (state_t): Remove the `lookaheads',
13350 `lookaheads_rule' member.
13351 (reductions_t): Add a `lookaheads' member.
13352 Use a regular array for the `rules'.
13353 * src/state.c (reductions_new): Initialize the lookaheads member
13354 to 0.
13355 (state_rule_lookaheads_print): Adjust.
13356 * src/state.h, src/state.c (state_reductions_find): New.
13357 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
13358 (count_rr_conflicts): Adjust.
13359 * src/lalr.c (LArule): Remove.
13360 (add_lookback_edge): Adjust.
13361 (state_lookaheads_count): New.
13362 (states_lookaheads_initialize): Merge into...
13363 (initialize_LA): this.
13364 (lalr_free): Adjust.
13365 * src/main.c (main): Don't free nullable and derives too early: it
13366 is used by --verbose.
13367 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
13368
bb0027a9
AD
133692002-08-01 Akim Demaille <akim@epita.fr>
13370
13371 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
13372 `rule_number_t**'.
13373 (set_derives, free_derives): Rename as...
13374 (derives_compute, derives_free): this.
13375 Adjust all dependencies.
13376 * src/nullable.c (set_nullable, free_nullable): Rename as...
13377 (nullable_compute, nullable_free): these.
13378 (rule_list_t): Store rule_t *, not rule_number_t.
13379 * src/state.c (state_rule_lookaheads_print): Directly compare rule
13380 pointers, instead of their numbers.
13381 * src/main.c (main): Call nullable_free, and derives_free earlier,
13382 as they were lo longer used.
13383
3325ddc4
AD
133842002-08-01 Akim Demaille <akim@epita.fr>
13385
13386 * lib/timevar.c (get_time): Include children time.
13387 * src/lalr.h (LA, LArule): Don't export them: used with the
13388 state_t.
13389 * src/lalr.c (LA, LArule): Static.
13390 * src/lalr.h, src/lalr.c (lalr_free): New.
13391 * src/main.c (main): Call it.
13392 * src/tables.c (pack_vector): Check whether loc is >= to the
13393 table_size, not >.
13394 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
13395 (tables_generate): do it, since that's also it which allocates
13396 them.
13397 Don't free LA and LArule, main does.
13398
c6f1a33c
AD
133992002-07-31 Akim Demaille <akim@epita.fr>
13400
13401 Separate parser tables computation and output.
13402
13403 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
13404 (conflict_list, conflict_list_cnt, table, check, table_ninf)
13405 (yydefgoto, yydefact, high): Move to...
13406 * src/tables.h, src/tables.c: here.
13407 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
13408 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
13409 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
13410 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
13411 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
13412 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
13413 (action_row, save_row, token_actions, save_column, default_goto)
13414 (goto_actions, sort_actions, matching_state, pack_vector)
13415 (table_ninf_remap, pack_table, prepare_actions): Move to...
13416 * src/tables.c: here.
13417 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
13418 * src/output.c (token_actions, output_base, output_conflicts)
13419 (output_check): Merge into...
13420 (prepare_actions): this.
13421 (actions_output): Rename as...
13422 (user_actions_output): this.
13423 * src/main.c (main): Call tables_generate and tables_free.
13424
1509d42f
AD
134252002-07-31 Akim Demaille <akim@epita.fr>
13426
13427 Steal GCC's --time-report support.
13428
13429 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
13430 stolen/adjusted from GCC.
13431 * m4/stage.m4: Remove time related checks.
13432 * m4/timevar.m4: New.
13433 * configure.in: Adjust.
13434 * src/system.h: Adjust to using timevar.h.
13435 * src/getargs.h, src/getargs.c: Support trace_time for
13436 --trace=time.
13437 * src/main.c (stage): Remove.
13438 (main): Replace `stage' invocations with timevar calls.
13439 * src/output.c: Insert pertinent timevar calls.
13440
273a74fa
AD
134412002-07-31 Akim Demaille <akim@epita.fr>
13442
13443 Let --trace have arguments.
13444
13445 * src/getargs.h (enum trace_e): New.
13446 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
13447 (long_options, short_options): --trace/-T takes an optional
13448 argument.
13449 Change all the uses of trace_flag to reflect the new flags.
13450 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
13451
13452 Strengthen `stage' portability.
13453
13454 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
13455 * configure.in: Use it.
13456 Don't check for malloc.h and sys/times.h.
13457 * src/system.h: Include them when appropriate.
13458 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
13459 times and struct tms are available.
13460
217598da
AD
134612002-07-30 Akim Demaille <akim@epita.fr>
13462
13463 In verbose parse error message, don't report `error' as an
13464 expected token.
13465 * tests/actions.at (Printers and Destructors): Adjust.
13466 * tests/calc.at (Calculator $1): Adjust.
13467 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
13468 error message, do not report the parser accepts the error token in
13469 that state.
13470
52489d44
AD
134712002-07-30 Akim Demaille <akim@epita.fr>
13472
13473 Normalize conflict related messages.
13474
13475 * src/complain.h, src/complain.c (warn, complain): New.
13476 * src/conflicts.c (conflicts_print): Use them.
13477 (conflict_report_yacc): New, extracted from...
13478 (conflicts_print): here.
13479 * tests/conflicts.at, tests/existing.at: Adjust.
13480
e8832397
AD
134812002-07-30 Akim Demaille <akim@epita.fr>
13482
13483 Report rules which are never reduced by the parser: those hidden
13484 by conflicts.
13485
13486 * src/LR0.c (save_reductions): Don't make the final state too
13487 different: save its reduction (accept) instead of having a state
13488 without any action (no shift or goto, no reduce).
13489 Note: the final state is now a ``regular'' state, i.e., the
13490 parsers now contain `reduce 0' as default reduction.
13491 Nevertheless, since they decide to `accept' when yystate =
13492 final_state, they still will not reduce rule 0.
13493 * src/print.c (print_actions, print_reduction): Adjust.
13494 * src/output.c (action_row): Track reduced rules.
13495 (token_actions): Report rules never reduced.
13496 * tests/conflicts.at, tests/regression.at: Adjust.
13497
caf23d24
AD
134982002-07-30 Akim Demaille <akim@epita.fr>
13499
13500 `stage' was accidently included in a previous patch.
13501 Initiate its autoconfiscation.
13502
13503 * configure.in: Look for malloc.h and sys/times.h.
13504 * src/main.c (stage): Adjust.
13505 Report only when trace_flag.
13506
640748ee
AD
135072002-07-29 Akim Demaille <akim@epita.fr>
13508
13509 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
13510 state_number_t.
13511 (errs_t): symbol_t*, not symbol_number_t.
13512 (reductions_t): rule_t*, not rule_number_t.
13513 (FOR_EACH_SHIFT): New.
13514 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
13515 * src/print.c, src/print_graph.c: Adjust.
13516
88bce5a2
AD
135172002-07-29 Akim Demaille <akim@epita.fr>
13518
13519 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
13520
13521 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
13522 (endtoken, accept): these.
13523 * src/reader.c (reader): Set endtoken's default tag to "$end".
13524 Set undeftoken's tag to "$undefined" instead of "$undefined.".
13525 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
13526 Adjust.
13527
1bfb97db
AD
135282002-07-29 Akim Demaille <akim@epita.fr>
13529
13530 * src/reduce.c (reduce_grammar): When the language is empty,
13531 complain about the start symbol, not the axiom.
13532 Use its location.
13533 * tests/reduce.at (Empty Language): New.
13534
fc5734fe
AD
135352002-07-26 Akim Demaille <akim@epita.fr>
13536
13537 * src/reader.h, src/reader.c (gram_error): ... can't get
13538 yycontrol without making too strong assumptions on the parser
13539 itself.
13540 * src/output.c (prepare_tokens): Use the real 0th value of
13541 token_translations instead of `0'.
13542 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
13543 visible here.
13544 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
13545 for the time being: %locations ought to provide it to yyerror.
13546
3650b4b8
AD
135472002-07-25 Akim Demaille <akim@epita.fr>
13548
13549 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
13550 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
13551 * tests/regression.at (Web2c Actions): Adjust.
13552
4b3d3a8e
AD
135532002-07-25 Akim Demaille <akim@epita.fr>
13554
13555 Stop storing rules from 1 to nrules + 1.
13556
13557 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
13558 * src/nullable.c, src/output.c, src/print.c, src/reader.c
13559 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
13560 Iterate from 0 to nrules.
13561 Use rule_number_as_item_number and item_number_as_rule_number.
13562 Adjust to `derive' now containing possibly 0.
13563 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
13564 Handle the `- 1' part in rule numbers from/to item numbers.
13565 * src/conflicts.c (log_resolution): Fix the message which reversed
13566 shift and reduce.
13567 * src/output.c (action_row): Initialize default_rule to -1.
13568 (token_actions): Adjust.
13569 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
13570 expected output.
13571 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
13572
4a2a22f4
AD
135732002-07-25 Akim Demaille <akim@epita.fr>
13574
13575 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
13576 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
13577 (b4_c_knr_arg_decl): New.
13578 * data/yacc.c: Use it to define yysymprint, yydestruct, and
13579 yyreport_parse_error.
13580
b8df3223
AD
135812002-07-25 Akim Demaille <akim@epita.fr>
13582
13583 * data/yacc.c (yyreport_parse_error): New, extracted from...
13584 (yyparse): here.
13585 (yydestruct, yysymprint): Move above yyparse.
13586 Be K&R compliant.
13587
a762e609
AD
135882002-07-25 Akim Demaille <akim@epita.fr>
13589
13590 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
13591 replace...
13592 (b4_sint_type, b4_uint_type): these.
13593 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
13594 * tests/regression.at (Web2c Actions): Adjust.
13595
12b0043a
AD
135962002-07-25 Akim Demaille <akim@epita.fr>
13597
13598 * src/gram.h (TIEM_NUMBER_MAX): New.
13599 (item_number_of_rule_number, rule_number_of_item_number): Rename
13600 as...
13601 (rule_number_as_item_number, item_number_as_rule_number): these.
13602 Adjust dependencies.
13603 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
13604 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
13605 (symbol_number_to_vector_number): New.
13606 (order): Of vector_number_t* type.
13607 (base_t, BASE_MAX, BASE_MIN): New.
13608 (froms, tos, width, pos, check): Of base_t type.
13609 (action_number_t, ACTION_MIN, ACTION_MAX): New.
13610 (actrow): Of action_number_t type.
13611 (conflrow): Of unsigned int type.
13612 (table_ninf, base_ninf): New.
13613 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
13614 (muscle_insert_int_table, muscle_insert_base_table)
13615 (muscle_insert_rule_number_table): New.
13616 (prepare_tokens): Output `toknum' as int_table.
13617 (action_row): Returns a rule_number_t.
13618 Use ACTION_MIN, not SHRT_MIN.
13619 (token_actions): yydefact is rule_number_t*.
13620 (table_ninf_remap): New.
13621 (pack_table): Use it for `base' and `table'.
13622 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
13623 replaced with...
13624 (YYPACT_NINF, YYTABLE_NINF): these.
13625 (yypact, yytable): Compute their types instead of hard-coded
13626 `short'.
13627 * tests/regression.at (Web2c Actions): Adjust.
13628
5dde258a
AD
136292002-07-19 Akim Demaille <akim@epita.fr>
13630
13631 * src/scan-gram.l (id): Can start with an underscore.
13632
a945ec39
AD
136332002-07-16 Akim Demaille <akim@epita.fr>
13634
13635 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
13636 Adjust all former `associativity' dependencies.
13637 * src/symtab.c (symbol_new): Default associativity is `undef', not
13638 `right'.
13639 (symbol_check_alias_consistence): Adjust.
13640
fae437e8
AD
136412002-07-09 Akim Demaille <akim@epita.fr>
13642
13643 * doc/bison.texinfo: Properly set the ``header'' part.
13644 Use @dircategory ``GNU programming tools'' as per Texinfo's
13645 documentation.
13646 Use @copying.
13647
1a715ef2
AD
136482002-07-09 Akim Demaille <akim@epita.fr>
13649
13650 * lib/quotearg.h: Protect against multiple inclusions.
13651 * src/location.h (location_t): Add a `file' member.
13652 (LOCATION_RESET, LOCATION_PRINT): Adjust.
13653 * src/complain.c (warn_at, complain_at, fatal_at): Drop
13654 `error_one_per_line' support.
13655
a5d50994
AD
136562002-07-09 Akim Demaille <akim@epita.fr>
13657
13658 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
13659 * src/reader.c (lineno): Remove.
13660 Adjust all dependencies.
13661 (get_merge_function): Take a location and use complain_at.
13662 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
13663 * tests/regression.at (Invalid inputs, Mixing %token styles):
13664 Adjust.
13665
b275314e
AD
136662002-07-09 Akim Demaille <akim@epita.fr>
13667
13668 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
13669 recovery rule, and forbid extensions when --yacc.
13670 (gram_error): Use complain_at.
13671 * src/reader.c (reader): Exit if there were parse errors.
13672
865b9df1
AD
136732002-07-09 Akim Demaille <akim@epita.fr>
13674
13675 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
13676 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
13677 Reported by R Blake <blakers@mac.com>.
13678
c76e14da
AD
136792002-07-09 Akim Demaille <akim@epita.fr>
13680
13681 * data/yacc.c: Output the copyright notive in the header.
13682
7db2ed2d
AD
136832002-07-03 Akim Demaille <akim@epita.fr>
13684
13685 * src/output.c (froms, tos): Are state_number_t.
13686 (save_column): sp, sp1, and sp2 are state_number_t.
13687 (prepare): Rename `final' as `final_state_number', `nnts' as
13688 `nterms_number', `nrules' as `rules_number', `nstates' as
13689 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
13690 unused.
13691 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
13692 * data/lalr1.cc (nsym_): Remove, unused.
13693
e68e0410
AD
136942002-07-03 Akim Demaille <akim@epita.fr>
13695
13696 * src/lalr.h, src/lalr.c (goto_number_t): New.
13697 * src/lalr.c (goto_list_t): New.
13698 Propagate them.
13699 * src/nullable.c (rule_list_t): New.
13700 Propagate.
13701 * src/types.h: Remove.
13702
e1a4f3a4
AD
137032002-07-03 Akim Demaille <akim@epita.fr>
13704
13705 * src/closure.c (print_fderives): Use rule_rhs_print.
13706 * src/derives.c (print_derives): Use rule_rhs_print.
13707 (rule_list_t): New, replaces `shorts'.
13708 (set_derives): Add comments.
13709 * tests/sets.at (Nullable, Firsts): Adjust.
13710
536545f3
AD
137112002-07-03 Akim Demaille <akim@epita.fr>
13712
13713 * src/output.c (prepare_actions): Free `tally' and `width'.
13714 (prepare_actions): Allocate and free `order'.
13715 * src/symtab.c (symbols_free): Free `symbols'.
13716 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
13717 * src/output.c (m4_invoke): Move to...
13718 * src/scan-skel.l: here.
13719 (<<EOF>>): Close yyout, and free its name.
13720
8b752b00
AD
137212002-07-03 Akim Demaille <akim@epita.fr>
13722
13723 Fix some memory leaks, and fix a bug: state 0 was examined twice.
13724
13725 * src/LR0.c (new_state): Merge into...
13726 (state_list_append): this.
13727 (new_states): Merge into...
13728 (generate_states): here.
13729 (set_states): Don't ensure a proper `errs' state member here, do it...
13730 * src/conflicts.c (conflicts_solve): here.
13731 * src/state.h, src/state.c: Comment changes.
13732 (state_t): Rename member `shifts' as `transitions'.
13733 Adjust all dependencies.
13734 (errs_new): For consistency, also take the values as argument.
13735 (errs_dup): Remove.
13736 (state_errs_set): New.
13737 (state_reductions_set, state_transitions_set): Assert that no
13738 previous value was assigned.
13739 (state_free): New.
13740 (states_free): Use it.
13741 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
13742 temporary storage: use `errs' and `nerrs' as elsewhere.
13743 (set_conflicts): Allocate and free this `errs'.
13744
613f5e1a
AD
137452002-07-02 Akim Demaille <akim@epita.fr>
13746
13747 * lib/libiberty.h: New.
13748 * lib: Update the bitset implementation from upstream.
13749 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
13750 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
13751 * src/main.c: Adjust bitset stats calls.
13752
26e0cadc
PE
137532002-07-01 Paul Eggert <eggert@twinsun.com>
13754
13755 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
13756 char, so that negative chars don't collide with $.
13757
1154cced
AD
137582002-06-30 Akim Demaille <akim@epita.fr>
13759
13760 Have the GLR tests be `warning' checked, and fix the warnings.
13761
13762 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
13763 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
13764 (yyremoveDeletes): `yyi' and `yyj' are size_t.
13765 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
13766 (yyaddDeferredAction): static.
13767 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
13768 (yyreportParseError): yyprefix is const.
13769 yytokenp is used only when verbose.
13770 (yy__GNUC__): Replace with __GNUC__.
13771 (yypdumpstack): yyi is size_t.
13772 (yypreference): Un-yy local variables and arguments, to avoid
13773 clashes with `yyr1'. Anyway, we are not in the user name space.
13774 (yytname_size): be an int, as is compared with ints.
13775 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
13776 Use them.
13777 * tests/cxx-gram.at: Use quotation to protect $1.
13778 Use AT_COMPILE to enable warnings hunts.
13779 Prototype yylex and yyerror.
13780 `Use' argc.
13781 Include `string.h', not `strings.h'.
13782 Produce and prototype stmtMerge only when used.
13783 yylex takes a location.
13784
97650f4e
AD
137852002-06-30 Akim Demaille <akim@epita.fr>
13786
13787 We spend a lot of time in quotearg, in particular when --verbose.
13788
13789 * src/symtab.c (symbol_get): Store a quoted version of the key.
13790 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
13791 Adjust all callers.
13792
d2576365
AD
137932002-06-30 Akim Demaille <akim@epita.fr>
13794
13795 * src/state.h (reductions_t): Rename member `nreds' as num.
13796 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
13797 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
13798
ccaf65bc
AD
137992002-06-30 Akim Demaille <akim@epita.fr>
13800
13801 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
13802 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
13803 (shifts_to): Rename as...
13804 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
13805 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
13806 (TRANSITION_IS_DISABLED, transitions_to): these.
13807
87675353
AD
138082002-06-30 Akim Demaille <akim@epita.fr>
13809
13810 * src/print.c (print_shifts, print_gotos): Merge into...
13811 (print_transitions): this.
13812 (print_transitions, print_errs, print_reductions): Align the
13813 lookaheads columns.
13814 (print_core, print_transitions, print_errs, print_state,
13815 print_grammar): Output empty lines separator before, not after.
13816 (state_default_rule_compute): Rename as...
13817 (state_default_rule): this.
13818 * tests/conflicts.at (Defaulted Conflicted Reduction),
13819 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
13820 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
13821
ce4ccb4b
AD
138222002-06-30 Akim Demaille <akim@epita.fr>
13823
13824 Display items as we display rules.
13825
13826 * src/gram.h, src/gram.c (rule_lhs_print): New.
13827 * src/gram.c (grammar_rules_partial_print): Use it.
13828 * src/print.c (print_core): Likewise.
13829 * tests/conflicts.at (Defaulted Conflicted Reduction),
13830 (Unresolved SR Conflicts): Adjust.
13831 (Unresolved SR Conflicts): Adjust and rename as...
13832 (Resolved SR Conflicts): this, as was meant.
13833 * tests/regression.at (Web2c Report): Adjust.
13834
bc933ef1
AD
138352002-06-30 Akim Demaille <akim@epita.fr>
13836
13837 * src/print.c (state_default_rule_compute): New, extracted from...
13838 (print_reductions): here.
13839 Pessimize, but clarify the code.
13840 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
13841
53d4308d
AD
138422002-06-30 Akim Demaille <akim@epita.fr>
13843
13844 * src/output.c (action_row): Let default_rule be always a rule
13845 number.
13846
574fb2d5
AD
138472002-06-30 Akim Demaille <akim@epita.fr>
13848
13849 * src/closure.c (print_firsts, print_fderives, closure):
13850 Use BITSET_EXECUTE.
13851 * src/lalr.c (lookaheads_print): Likewise.
13852 * src/state.c (state_rule_lookaheads_print): Likewise.
13853 * src/print_graph.c (print_core): Likewise.
13854 * src/print.c (print_reductions): Likewise.
13855 * src/output.c (action_row): Likewise.
13856 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
13857
05811fd7
AD
138582002-06-30 Akim Demaille <akim@epita.fr>
13859
13860 * src/print_graph.c: Use report_flag.
13861
0e4d5753
AD
138622002-06-30 Akim Demaille <akim@epita.fr>
13863
13864 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
13865 to...
13866 * src/relation.h, src/relation.c (traverse, relation_digraph)
13867 (relation_print, relation_transpose): New.
13868
24c7d800
AD
138692002-06-30 Akim Demaille <akim@epita.fr>
13870
13871 * src/state.h, src/state.c (shifts_to): New.
13872 * src/lalr.c (build_relations): Use it.
13873
9222837b
AD
138742002-06-30 Akim Demaille <akim@epita.fr>
13875
13876 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
13877 (item_number_of_rule_number, rule_number_of_item_number): New.
13878 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
13879 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13880 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
13881 Propagate their use.
13882 Much remains to be done, in particular wrt `shorts' from types.h.
13883
260008e5
AD
138842002-06-30 Akim Demaille <akim@epita.fr>
13885
13886 * src/symtab.c (symbol_new): Initialize the `printer' member.
13887
8a731ca8
AD
138882002-06-30 Akim Demaille <akim@epita.fr>
13889
13890 * src/LR0.c (save_reductions): Remove, replaced by...
13891 * src/state.h, src/state.c (state_reductions_set): New.
13892 (reductions, errs): Rename as...
13893 (reductions_t, errs_t): these.
13894 Adjust all dependencies.
13895
32e1e0a4
AD
138962002-06-30 Akim Demaille <akim@epita.fr>
13897
13898 * src/LR0.c (state_list_t, state_list_append): New.
13899 (first_state, last_state): Now symbol_list_t.
13900 (this_state): Remove.
13901 (new_itemsets, append_states, save_reductions): Take a state_t as
13902 argument.
13903 (set_states, generate_states): Adjust.
13904 (save_shifts): Remove, replaced by...
13905 * src/state.h, src/state.c (state_shifts_set): New.
13906 (shifts): Rename as...
13907 (shifts_t): this.
13908 Adjust all dependencies.
13909 * src/state.h (state_t): Remove the `next' member.
13910
e5fb6710
AD
139112002-06-30 Akim Demaille <akim@epita.fr>
13912
13913 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
13914 escaped in slot 0.
13915
c7ca99d4
AD
139162002-06-30 Akim Demaille <akim@epita.fr>
13917
13918 Use hash.h for the state hash table.
13919
13920 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
13921 (allocate_storage): Use state_hash_new.
13922 (free_storage): Use state_hash_free.
13923 (new_state, get_state): Adjust.
13924 * src/lalr.h, src/lalr.c (states): Move to...
13925 * src/states.h (state_t): Remove the `link' member, no longer
13926 used.
13927 * src/states.h, src/states.c: here.
13928 (state_hash_new, state_hash_free, state_hash_lookup)
13929 (state_hash_insert, states_free): New.
13930 * src/states.c (state_table, state_compare, state_hash): New.
13931 * src/output.c (output_actions): Do not free states now, since we
13932 still need to know the final_state number in `prepare', called
13933 afterwards. Do it...
13934 * src/main.c (main): here: call states_free after `output'.
13935
df0e7316
AD
139362002-06-30 Akim Demaille <akim@epita.fr>
13937
13938 * src/state.h, src/state.c (state_new): New, extracted from...
13939 * src/LR0.c (new_state): here.
13940 * src/state.h (STATE_ALLOC): Move to...
13941 * src/state.c: here.
13942 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
13943 * src/state.h, src/state.c: here.
13944
39f41916
AD
139452002-06-30 Akim Demaille <akim@epita.fr>
13946
13947 * src/reader.c (gensym): Rename as...
13948 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
13949 (getsym): Rename as...
13950 (symbol_get): this.
13951
d57650a5
AD
139522002-06-30 Akim Demaille <akim@epita.fr>
13953
13954 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
13955 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
13956 * src/output.c, src/print.c, src/print_graph.c: Propagate.
13957 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
13958
5a08f1ce
AD
139592002-06-30 Akim Demaille <akim@epita.fr>
13960
13961 Make the test suite pass with warnings checked.
13962
13963 * tests/actions.at (Printers and Destructors): Improve.
13964 Avoid unsigned vs. signed issues.
13965 * tests/calc.at: Don't exercise the scanner here, do it...
13966 * tests/input.at (Torturing the Scanner): here.
13967
720623af
PH
139682002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13969
88e7e941 13970 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
13971 reorganize first lines parallel to yacc.c.
13972
fb8135fa
AD
139732002-06-28 Akim Demaille <akim@epita.fr>
13974
13975 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
13976 (b4_token_enum, b4_token_defines): New, factored from...
13977 * data/lalr1.cc, data/yacc.c, glr.c: here.
13978
41442480
AD
139792002-06-28 Akim Demaille <akim@epita.fr>
13980
13981 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
13982 unused variables.
13983 * src/output.c (merger_output): static.
13984
e0e5bf84
AD
139852002-06-28 Akim Demaille <akim@epita.fr>
13986
ba0fe3c7 13987 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
13988 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
13989 pacify GCC.
13990 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 13991
676385e2
PH
139922002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13993
13994 Accumulated changelog for new GLR parsing features.
13995
6a254321 13996 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
13997 conflicts_total_count.
13998 * src/conflicts.h: Ditto.
13999 * src/output.c (token_actions): Use the new name.
14000 (output_conflicts): Change conflp => conflict_list_heads, and
14001 confl => conflict_list for better readability.
14002 * data/glr.c: Use the new names.
14003 * NEWS: Add self to GLR announcement.
e0e5bf84 14004
676385e2
PH
14005 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
14006
14007 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
14008 Akim Demaille.
14009
14010 * data/bison.glr: Change name to glr.c
14011 * data/glr.c: Renamed from bison.glr.
14012 * data/Makefile.am: Add glr.c
e0e5bf84
AD
14013
14014 * src/getargs.c:
14015
676385e2 14016 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 14017 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 14018
676385e2
PH
14019 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14020
14021 * data/bison.glr: Be sure to restore the
14022 current #line when returning to the skeleton contents after having
14023 exposed the input file's #line.
14024
14025 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14026
14027 * data/bison.glr: Bring up to date with changes to bison.simple.
14028
14029 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14030
14031 * data/bison.glr: Correct definitions that use b4_prefix.
14032 Various reformatting.
14033 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
14034 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
14035 yytokenp argument; now part of stack.
14036 (yychar): Define to behave as documented.
14037 (yyclearin): Ditto.
e0e5bf84 14038
676385e2
PH
14039 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14040
14041 * src/reader.h: Add declaration for free_merger_functions.
14042
14043 * src/reader.c (merge_functions): New variable.
14044 (get_merge_function): New function.
14045 (free_merger_functions): New function.
14046 (readgram): Check for %prec that is not followed by a symbol.
14047 Handle %dprec and %merge declarations.
14048 (packgram): Initialize dprec and merger fields in rules array.
14049
14050 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
14051 conflict_list_cnt, conflict_list_free): New variables.
14052 (table_grow): Also grow conflict_table.
e0e5bf84 14053 (prepare_rules): Output dprec and merger tables.
676385e2 14054 (conflict_row): New function.
e0e5bf84 14055 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
14056 default reduction in conflicted states for GLR parser so that there
14057 are spaces for the conflict lists.
14058 (save_row): Also save conflict information.
14059 (token_actions): Allocate conflict list.
14060 (merger_output): New function.
14061 (pack_vector): Pack conflict table, too.
14062 (output_conflicts): New function to output yyconflp and yyconfl.
14063 (output_check): Allocate conflict_tos.
14064 (output_actions): Output conflict tables, also.
14065 (output_skeleton): Output b4_mergers definition.
14066 (prepare): Output b4_max_rhs_length definition.
14067 Use 'bison.glr' as default skeleton for GLR parsers.
14068
14069 * src/gram.c (glr_parser): New flag.
14070 (grammar_free): Call free_merger_functions.
14071
14072 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
14073 all pairs of conflicting reductions, rather than just all tokens
14074 causing conflicts. Needed to size conflict tables.
e0e5bf84 14075 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
14076 interface.
14077 (conflicts_print): Ditto.
14078 (count_total_conflicts): New function.
14079
14080 * src/reader.h (merger_list): New type.
14081 (merge_functions): New variable.
14082
14083 * src/lex.h (tok_dprec, tok_merge): New token types.
14084
14085 * src/gram.h (rule_s): Add dprec and merger fields.
14086 (glr_parser): New flag.
14087
14088 * src/conflicts.h (count_total_conflicts): New function.
14089
14090 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
14091
14092 * doc/bison.texinfo (Generalized LR Parsing): New section.
14093 (GLR Parsers): New section.
14094 (Language and Grammar): Mention GLR parsing.
14095 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
14096 Correct typo ("tge" -> "the").
14097
14098 * data/bison.glr: New skeleton for GLR parsing.
14099
14100 * tests/cxx-gram.at: New tests for GLR parsing.
14101
14102 * tests/testsuite.at: Include cxx-gram.at.
14103
14104 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 14105
676385e2
PH
14106 * src/parse-gram.y:
14107
14108 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
14109
14110 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 14111
b5480d74 141122002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
14113
14114 * src/options.h, src/options.c: Remove.
14115 * src/getargs.c (short_options, long_options): New.
14116
60491a94
AD
141172002-06-27 Akim Demaille <akim@epita.fr>
14118
14119 * data/bison.simple, data/bison.c++: Rename as...
14120 * data/yacc.c, data/lalr1.cc: these.
14121 * doc/bison.texinfo (Environment Variables): Remove.
14122
9be0c25b
AD
141232002-06-25 Raja R Harinath <harinath@cs.umn.edu>
14124
14125 * src/getargs.c (report_argmatch): Initialize strtok().
14126
1ae72863
AD
141272002-06-20 Akim Demaille <akim@epita.fr>
14128
14129 * data/bison.simple (b4_symbol_actions): New, replaces...
14130 (b4_symbol_destructor, b4_symbol_printer): these.
14131 (yysymprint): Be sure to call YYPRINT only for tokens, and using
14132 user token numbers.
14133
87542d29
AD
141342002-06-20 Akim Demaille <akim@epita.fr>
14135
14136 * data/bison.simple (yydestructor): Rename as...
14137 (yydestruct): this.
14138
1a31ed21
AD
141392002-06-20 Akim Demaille <akim@epita.fr>
14140
14141 * src/symtab.h, src/symtab.c (symbol_type_set)
14142 (symbol_destructor_set, symbol_precedence_set): The location is
14143 the last argument.
14144 Adjust all callers.
14145
e776192e
AD
141462002-06-20 Akim Demaille <akim@epita.fr>
14147
14148 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
14149 internals.
14150 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
14151 Takes a location.
14152 * src/symtab.h, src/symtab.c (symbol_class_set)
14153 (symbol_user_token_number_set): Likewise.
14154 Adjust all callers.
14155 Promote complain_at.
14156 * tests/input.at (Type Clashes): Adjust.
14157
5c1180b3
AD
141582002-06-20 Akim Demaille <akim@epita.fr>
14159
14160 * data/bison.simple (YYLEX): Fix the declaration when
14161 %pure-parser.
14162
e3170060
AD
141632002-06-20 Akim Demaille <akim@epita.fr>
14164
14165 * data/bison.simple (yysymprint): Don't print the token number,
14166 just its name.
14167 * tests/actions.at (Destructors): Rename as...
14168 (Printers and Destructors): this.
14169 Also exercise %printer.
14170
253862fd
AD
141712002-06-20 Akim Demaille <akim@epita.fr>
14172
14173 * data/bison.simple (YYDSYMPRINT): New.
14174 Use it to remove many of the #if YYDEBUG/if (yydebug).
14175
366eea36
AD
141762002-06-20 Akim Demaille <akim@epita.fr>
14177
14178 * src/symtab.h, src/symtab.c (symbol_t): printer and
14179 printer_location are new members.
14180 (symbol_printer_set): New.
14181 * src/parse-gram.y (PERCENT_PRINTER): New token.
14182 Handle its associated rule.
14183 * src/scan-gram.l: Adjust.
14184 (handle_destructor_at, handle_destructor_dollar): Rename as...
14185 (handle_symbol_code_at, handle_symbol_code_dollar): these.
14186 * src/output.c (symbol_printers_output): New.
14187 (output_skeleton): Call it.
14188 * data/bison.simple (yysymprint): New. Cannot be named yyprint
14189 since there are already many grammar files with a user `yyprint'.
14190 Replace the calls to YYPRINT to calls to yysymprint.
14191 * tests/calc.at: Adjust.
14192 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
14193 taking advantage of parser very internal details (stack size!).
14194
4f25ebb0
AD
141952002-06-20 Akim Demaille <akim@epita.fr>
14196
14197 * src/scan-gram.l: Complete the scanner with the missing patterns
14198 to pacify Flex.
14199 Use `quote' and `symbol_tag_get' where appropriate.
14200
93b68a0e
AD
142012002-06-19 Akim Demaille <akim@epita.fr>
14202
14203 * tests/actions.at (Destructors): Augment to test locations.
14204 * data/bison.simple (yydestructor): Pass it the current location
14205 if locations are enabled.
14206 Prototype only when __STDC__ or C++.
14207 Change the argument names to move into the yy name space: there is
14208 user code here.
14209
58612f1d
AD
142102002-06-19 Akim Demaille <akim@epita.fr>
14211
74310291
AD
14212 * data/bison.simple (b4_pure_if): New.
14213 Use it instead of #ifdef YYPURE.
14214
142152002-06-19 Akim Demaille <akim@epita.fr>
14216
14217 * data/bison.simple (b4_location_if): New.
58612f1d
AD
14218 Use it instead of #ifdef YYLSP_NEEDED.
14219
f25bfb75
AD
142202002-06-19 Akim Demaille <akim@epita.fr>
14221
14222 Prepare @$ in %destructor, but currently don't bind it in the
14223 skeleton, as %location use is not cleaned up yet.
14224
14225 * src/scan-gram.l (handle_dollar, handle_destructor_at)
14226 (handle_action_at): New.
14227 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
14228 a braced_code_t and a location as additional arguments.
14229 (handle_destructor_dollar): Instead of requiring `b4_eval', just
14230 unquote one when outputting `b4_dollar_dollar'.
14231 Adjust callers.
14232 * data/bison.simple (b4_eval): Remove.
14233 (b4_symbol_destructor): Adjust.
14234 * tests/input.at (Invalid @n): Adjust.
14235
c732d2c6
AD
142362002-06-19 Zack Weinberg <zack@codesourcery.com>
14237
14238 * doc/bison.texinfo: Document ability to have multiple
14239 prologue sections.
14240
8c165d89
AD
142412002-06-18 Akim Demaille <akim@epita.fr>
14242
14243 * src/files.c (compute_base_names): When computing the output file
14244 names from the input file name, strip the directory part.
14245
ca98bf57
AD
142462002-06-18 Akim Demaille <akim@epita.fr>
14247
14248 * data/bison.simple.new: Comment changes.
14249 Reported by Andreas Schwab.
14250
0bfb02ff
AD
142512002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
14252
14253 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
14254 there are no `label `yyoverflowlab' defined but not used' warnings
14255 when yyoverflow is defined.
14256
24c0aad7
AD
142572002-06-18 Akim Demaille <akim@epita.fr>
14258
14259 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
14260 new member.
14261 (symbol_destructor_set): Adjust.
14262 * src/output.c (symbol_destructors_output): Output the destructor
14263 locations.
14264 Output the symbol name.
14265 * data/bison.simple (b4_symbol_destructor): Adjust.
14266
5719c109
AD
142672002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
14268 and Akim Demaille <akim@epita.fr>
14269
14270 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
14271 what's left on the stack when the error recovery hits EOF.
14272 * tests/actions.at (Destructors): Complete to exercise this case.
14273
9280d3ef
AD
142742002-06-17 Akim Demaille <akim@epita.fr>
14275
14276 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
14277 arguments is really empty, not only equal to `[]'.
14278 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
14279 member.
14280 (symbol_destructor_set): New.
14281 * src/output.c (symbol_destructors_output): New.
14282 * src/reader.h (brace_code_t, current_braced_code): New.
14283 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
14284 (handle_dollar): Rename as...
14285 (handle_action_dollar): this.
14286 (handle_destructor_dollar): New.
14287 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
14288 (grammar_declaration): Use it.
14289 * data/bison.simple (yystos): Is always defined.
14290 (yydestructor): New.
14291 * tests/actions.at (Destructors): New.
14292 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
14293
dafdc66f
AD
142942002-06-17 Akim Demaille <akim@epita.fr>
14295
14296 * src/symlist.h, src/symlist.c (symbol_list_length): New.
14297 * src/scan-gram.l (handle_dollar, handle_at): Compute the
14298 rule_length only when needed.
14299 * src/output.c (actions_output, token_definitions_output): Output
14300 the full M4 block.
14301 * src/symtab.c: Don't access directly to the symbol tag, use
14302 symbol_tag_get.
14303 * src/parse-gram.y: Use symbol_list_free.
14304
56c47203
AD
143052002-06-17 Akim Demaille <akim@epita.fr>
14306
14307 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
14308 (symbol_list_prepend, get_type_name): Move to...
14309 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
14310 (symbol_list_prepend, symbol_list_n_type_name_get): here.
14311 Adjust all callers.
14312 (symbol_list_free): New.
14313 * src/scan-gram.l (handle_dollar): Takes a location.
14314 * tests/input.at (Invalid $n): Adjust.
14315
1e0bab92
AD
143162002-06-17 Akim Demaille <akim@epita.fr>
14317
14318 * src/reader.h, src/reader.c (symbol_list_new): Export it.
14319 (symbol_list_prepend): New.
14320 * src/parse-gram.y (%union): `list' is a new member.
14321 (symbols.1): New, replaces...
14322 (terms_to_prec.1, nterms_to_type.1): these.
14323 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
14324 Take a location as additional argument.
14325 Adjust all callers.
14326
04e60654
AD
143272002-06-15 Akim Demaille <akim@epita.fr>
14328
14329 * src/parse-gram.y: Move %token in the declaration section so that
14330 we don't depend upon CVS Bison.
14331
10e5b8bd
AD
143322002-06-15 Akim Demaille <akim@epita.fr>
14333
14334 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
14335 * src/print.c (print_core): Use it.
14336
9801d40c
AD
143372002-06-15 Akim Demaille <akim@epita.fr>
14338
14339 * src/conflicts.c (log_resolution): Accept the rule involved in
14340 the sr conflicts instead of the lookahead number that points to
14341 that rule.
14342 (flush_reduce): Accept the current lookahead vector as argument,
14343 instead of the index in LA.
14344 (resolve_sr_conflict): Accept the current number of lookahead
14345 bitset to consider for the STATE, instead of the index in LA.
14346 (set_conflicts): Adjust.
14347 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
14348
c0263492
AD
143492002-06-15 Akim Demaille <akim@epita.fr>
14350
14351 * src/state.h (state_t): Replace the `lookaheadsp' member, a
14352 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
14353 Adjust all dependencies.
14354 * src/lalr.c (initialize_lookaheads): Split into...
14355 (states_lookaheads_count, states_lookaheads_initialize): these.
14356 (lalr): Adjust.
14357
9757c359
AD
143582002-06-15 Akim Demaille <akim@epita.fr>
14359
14360 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
14361 out of...
14362 (grammar_rules_print): here.
14363 * src/reduce.c (reduce_output): Use it.
14364 * tests/reduce.at (Useless Rules, Reduced Automaton)
14365 (Underivable Rules): Adjust.
14366
6b98e4b5
AD
143672002-06-15 Akim Demaille <akim@epita.fr>
14368
14369 Copy BYacc's nice way to report the grammar.
14370
14371 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
14372 New.
14373 Don't print the rules' location, it is confusing and useless.
14374 (rule_print): Use grammar_rhs_print.
14375 * src/print.c (print_grammar): Use grammar_rules_print.
14376
6b98e4b5
AD
143772002-06-15 Akim Demaille <akim@epita.fr>
14378
14379 Complete and rationalize `useless thing' warnings.
14380
14381 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
14382 (symbol_tag_print): New.
14383 Use them everywhere in place of accessing directly the tag member.
14384 * src/gram.h, src/gram.c (rule_print): New.
14385 Use it where a rule used to be printed `by hand'.
14386 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
14387 (reduce_grammar_tables): Report the useless rules.
14388 (reduce_print): Useless things are a warning, not an error.
14389 Report it as such.
14390 * tests/reduce.at (Useless Nonterminals, Useless Rules):
14391 (Reduced Automaton, Underivable Rules): Adjust.
14392 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
14393 * tests/conflicts.at (Unresolved SR Conflicts)
14394 (Solved SR Conflicts): Adjust.
14395
ee000ba4
AD
143962002-06-15 Akim Demaille <akim@epita.fr>
14397
14398 Let symbols have a location.
14399
14400 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
14401 (getsym): Adjust.
14402 Adjust all callers.
14403 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
14404 Use location_t, not int.
14405 * src/symtab.c (symbol_check_defined): Take advantage of the
14406 location.
14407 * tests/regression.at (Invalid inputs): Adjust.
14408
8efe435c
AD
144092002-06-15 Akim Demaille <akim@epita.fr>
14410
14411 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
14412 (input): Don't try to initialize yylloc here, do it in the
14413 scanner.
14414 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
14415 * src/gram.h (rule_t): Change line and action_line into location
14416 and action_location, of location_t type.
14417 Adjust all dependencies.
14418 * src/location.h, src/location.c (empty_location): New.
14419 * src/reader.h, src/reader.c (grammar_start_symbol_set)
14420 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
14421 (grammar_current_rule_symbol_append)
14422 (grammar_current_rule_action_append): Expect a location as argument.
14423 * src/reader.c (grammar_midrule_action): Adjust to attach an
14424 action's location as dummy symbol location.
14425 * src/symtab.h, src/symtab.c (startsymbol_location): New.
14426 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
14427 the line numbers.
14428
1921f1d7
AD
144292002-06-14 Akim Demaille <akim@epita.fr>
14430
14431 Grammar declarations may be found in the grammar section.
14432
14433 * src/parse-gram.y (rules_or_grammar_declaration): New.
14434 (declarations): Each declaration may end with a semicolon, not
14435 just...
14436 (grammar_declaration): `"%union"'.
14437 (grammar): Branch to rules_or_grammar_declaration.
14438
4515534c
AD
144392002-06-14 Akim Demaille <akim@epita.fr>
14440
14441 * src/main.c (main): Invoke scanner_free.
14442
f958596b
AD
144432002-06-14 Akim Demaille <akim@epita.fr>
14444
14445 * src/output.c (m4_invoke): Extracted from...
14446 (output_skeleton): here.
14447 Free tempfile.
14448
2c569025
AD
144492002-06-14 Akim Demaille <akim@epita.fr>
14450
14451 * src/parse-gram.y (directives, directive, gram)
14452 (grammar_directives, precedence_directives, precedence_directive):
14453 Rename as...
14454 (declarations, declaration, grammar, grammar_declaration)
14455 (precedence_declaration, precedence_declarator): these.
14456 (symbol_declaration): New.
14457
592e8d4d
AD
144582002-06-14 Akim Demaille <akim@epita.fr>
14459
14460 * src/files.c (action_obstack): Remove, unused.
14461 (output_obstack): Remove it, and all its dependencies, as it is no
14462 longer needed.
14463 * src/reader.c (epilogue_set): Build the epilogue in the
14464 muscle_obstack.
14465 * src/output.h, src/output.c (muscle_obstack): Move to...
14466 * src/muscle_tab.h, src/muscle_tab.h: here.
14467 (muscle_init): Initialize muscle_obstack.
14468 (muscle_free): New.
14469 * src/main.c (main): Call it.
14470
0c15323d
AD
144712002-06-14 Akim Demaille <akim@epita.fr>
14472
14473 * src/location.h: New, extracted from...
14474 * src/reader.h: here.
14475 * src/Makefile.am (noinst_HEADERS): Merge into
14476 (bison_SOURCES): this.
14477 Add location.h.
14478 * src/parse-gram.y: Use location_t instead of Bison's.
14479 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
14480 Use location_t instead of ints.
14481
e96c9728
AD
144822002-06-14 Akim Demaille <akim@epita.fr>
14483
14484 * data/bison.simple, data/bison.c++: Be sure to restore the
14485 current #line when returning to the skeleton contents after having
14486 exposed the input file's #line.
14487
75d1fe16
AD
144882002-06-12 Akim Demaille <akim@epita.fr>
14489
14490 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
14491 eager.
14492 * tests/actions.at (Exotic Dollars): New.
14493
6c35d22c
AD
144942002-06-12 Akim Demaille <akim@epita.fr>
14495
14496 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
14497 ['"/] too eagerly.
14498 * tests/input.at (Torturing the Scanner): New.
14499
1d6412ad
AD
145002002-06-11 Akim Demaille <akim@epita.fr>
14501
14502 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
14503 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
14504 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
14505 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
14506 * src/reader.c (reader): Use it.
14507
4cdb01db
AD
145082002-06-11 Akim Demaille <akim@epita.fr>
14509
14510 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
14511 Adjust all callers.
14512 (scanner_last_string_free): New.
14513
44995b2e
AD
145142002-06-11 Akim Demaille <akim@epita.fr>
14515
14516 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
14517 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
14518 (last_string, YY_OBS_FREE): New.
14519 Use them when returning an ID.
14520
e9955c83
AD
145212002-06-11 Akim Demaille <akim@epita.fr>
14522
14523 Have Bison grammars parsed by a Bison grammar.
14524
14525 * src/reader.c, src/reader.h (prologue_augment): New.
14526 * src/reader.c (copy_definition): Remove.
14527
14528 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
14529 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
14530 (grammar_current_rule_prec_set, grammar_current_rule_check)
14531 (grammar_current_rule_symbol_append)
14532 (grammar_current_rule_action_append): Export.
14533 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
14534 (symbol_list_action_append): Remove.
14535 Hook the routines from reader.
14536 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
14537 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
14538
14539 * src/reader.c (read_declarations): Remove, unused.
14540
14541 * src/parse-gram.y: Handle the epilogue.
14542 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
14543 (grammar_start_symbol_set): this.
14544 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
14545 * src/reader.c (readgram): Remove, unused.
14546 (reader): Adjust to insert eoftoken and axiom where appropriate.
14547
14548 * src/reader.c (copy_dollar): Replace with...
14549 * src/scan-gram.h (handle_dollar): this.
14550 * src/parse-gram.y: Remove `%thong'.
14551
14552 * src/reader.c (copy_at): Replace with...
14553 * src/scan-gram.h (handle_at): this.
14554
14555 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
14556 New.
14557
14558 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
14559 time being.
14560
14561 * src/reader.h, src/reader.c (grammar_rule_end): New.
14562
14563 * src/parse.y (current_type, current_class): New.
14564 Implement `%nterm', `%token' support.
14565 Merge `%term' into `%token'.
14566 (string_as_id): New.
14567 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
14568 type name.
14569
14570 * src/parse-gram.y: Be sure to handle properly the beginning of
14571 rules.
14572
14573 * src/parse-gram.y: Handle %type.
14574 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
14575
14576 * src/parse-gram.y: More directives support.
14577 * src/options.c: No longer handle source directives.
14578
14579 * src/parse-gram.y: Fix %output.
14580
14581 * src/parse-gram.y: Handle %union.
14582 Use the prologue locations.
14583 * src/reader.c (parse_union_decl): Remove.
14584
14585 * src/reader.h, src/reader.c (epilogue_set): New.
14586 * src/parse-gram.y: Use it.
14587
14588 * data/bison.simple, data/bison.c++: b4_stype is now either not
14589 defined, then default to int, or to the contents of %union,
14590 without `union' itself.
14591 Adjust.
14592 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
14593
14594 * src/output.c (actions_output): Don't output braces, as they are
14595 already handled by the scanner.
14596
14597 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
14598 characters to themselves.
14599
14600 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
14601 that the epilogue has a proper #line.
14602
14603 * src/parse-gram.y: Handle precedence/associativity.
14604
14605 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
14606 a terminal.
14607 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
14608 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
14609 at all to define terminals that cannot be emitted.
14610
14611 * src/scan-gram.l: Escape M4 characters.
14612
14613 * src/scan-gram.l: Working properly with escapes in user
14614 strings/characters.
14615
14616 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
14617 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
14618 grammar.
14619 Use more modest sizes, as for the time being the parser does not
14620 release memory, and therefore the process swallows a huge amount
14621 of memory.
14622
14623 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
14624 stricter %token grammar.
14625
14626 * src/symtab.h (associativity): Add `undef_assoc'.
14627 (symbol_precedence_set): Do nothing when passed an undef_assoc.
14628 * src/symtab.c (symbol_check_alias_consistence): Adjust.
14629
14630 * tests/regression.at (Invalid %directive): Remove, as it is now
14631 meaningless.
14632 (Invalid inputs): Adjust to the new error messages.
14633 (Token definitions): The new grammar doesn't allow too many
14634 eccentricities.
14635
14636 * src/lex.h, src/lex.c: Remove.
14637 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
14638 (copy_character, copy_string2, copy_string, copy_identifier)
14639 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
14640 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
14641 (parse_action): Remove.
14642 * po/POTFILES.in: Adjust.
14643
2e047461
AD
146442002-06-11 Akim Demaille <akim@epita.fr>
14645
cd05d13c 14646 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
14647 rule's action member: return the action as a string.
14648 Don't require `rule_length' as an argument: compute it.
14649 (grammar_current_rule_symbol_append)
14650 (grammar_current_rule_action_append): New, eved out from
14651 (readgram): here.
14652 Remove `action_flag', `rulelength', unused now.
14653
9af3fbce
AD
146542002-06-11 Akim Demaille <akim@epita.fr>
14655
14656 * src/reader.c (grammar_current_rule_prec_set).
14657 (grammar_current_rule_check): New, eved out from...
14658 (readgram): here.
14659 Remove `xaction', `first_rhs': useless.
14660 * tests/input.at (Type clashes): New.
14661 * tests/existing.at (GNU Cim Grammar): Adjust.
14662
1485e106
AD
146632002-06-11 Akim Demaille <akim@epita.fr>
14664
14665 * src/reader.c (grammar_midrule_action): New, Eved out from
14666 (readgram): here.
14667
da4160c3
AD
146682002-06-11 Akim Demaille <akim@epita.fr>
14669
14670 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
14671 New.
14672 (readgram): Use them as replacement of inlined code, crule and
14673 crule1.
14674
f6d0f937
AD
146752002-06-11 Akim Demaille <akim@epita.fr>
14676
14677 * src/reader.c (grammar_end, grammar_symbol_append): New.
14678 (readgram): Use them.
14679 Make the use of `p' as local as possible.
14680
69078d4b
AD
146812002-06-10 Akim Demaille <akim@epita.fr>
14682
14683 GCJ's parser requires the tokens to be defined before the prologue.
14684
14685 * data/bison.simple: Output the token definition before the user's
14686 prologue.
14687 * tests/regression.at (Braces parsing, Duplicate string)
14688 (Mixing %token styles): Check the output from bison.
14689 (Early token definitions): New.
14690
5e424082
AD
146912002-06-10 Akim Demaille <akim@epita.fr>
14692
14693 * src/symtab.c (symbol_user_token_number_set): Don't complain when
14694 assigning twice the same user number to a token, so that we can
14695 use it in...
14696 * src/lex.c (lex): here.
14697 Also use `symbol_class_set' instead of hand written code.
14698 * src/reader.c (parse_assoc_decl): Likewise.
14699
44536b35
AD
147002002-06-10 Akim Demaille <akim@epita.fr>
14701
14702 * src/symtab.c, src/symtab.c (symbol_class_set)
14703 (symbol_user_token_number_set): New.
14704 * src/reader.c (parse_token_decl): Use them.
14705 Use a switch instead of ifs.
14706 Use a single argument.
14707
8b9f2372
AD
147082002-06-10 Akim Demaille <akim@epita.fr>
14709
14710 Remove `%thong' support as it is undocumented, unused, duplicates
14711 `%token's job, and creates useless e-mail traffic with people who
14712 want to know what it is, why it is undocumented, unused, and
14713 duplicates `%token's job.
14714
14715 * src/reader.c (parse_thong_decl): Remove.
14716 * src/options.c (option_table): Remove "thong".
14717 * src/lex.h (tok_thong): Remove.
14718
3ae2b51f
AD
147192002-06-10 Akim Demaille <akim@epita.fr>
14720
14721 * src/symtab.c, src/symtab.c (symbol_type_set)
14722 (symbol_precedence_set): New.
14723 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
14724 (value_components_used): Remove, unused.
14725
2f1afb73
AD
147262002-06-09 Akim Demaille <akim@epita.fr>
14727
14728 Move symbols handling code out of the reader.
14729
14730 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
14731 (axiom): Move to...
14732 * src/symtab.h, src/symtab.c: here.
14733
14734 * src/gram.c (start_symbol): Remove: use startsymbol->number.
14735 * src/reader.c (startval): Rename as...
14736 * src/symtab.h, src/symtab.c (startsymbol): this.
14737 * src/reader.c: Adjust.
14738
14739 * src/reader.c (symbol_check_defined, symbol_make_alias)
14740 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14741 (token_translations_init)
14742 Move to...
14743 * src/symtab.c: here.
14744 * src/reader.c (packsymbols): Move to...
14745 * src/symtab.h, src/symtab.c (symbols_pack): here.
14746 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
14747 argument.
14748
e9bca3ad
AD
147492002-06-03 Akim Demaille <akim@epita.fr>
14750
14751 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
14752 then statements.
14753
86eff183
AD
147542002-06-03 Akim Demaille <akim@epita.fr>
14755
14756 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
14757 structs with non literals.
14758 * src/scan-skel.l: never-interactive.
14759 * src/conflicts.c (enum conflict_resolution_e): No trailing
14760 comma.
14761 * src/getargs.c (usage): Split long literal strings.
14762 Reported by Hans Aberg.
14763
717be197
AD
147642002-05-28 Akim Demaille <akim@epita.fr>
14765
14766 * data/bison.c++: Use C++ ostreams.
14767 (cdebug_): New member.
14768
670ddffd
AD
147692002-05-28 Akim Demaille <akim@epita.fr>
14770
14771 * src/output.c (output_skeleton): Be sure to allocate enough room
14772 for `/' _and_ for `\0' in full_skeleton.
14773
769b430f
AD
147742002-05-28 Akim Demaille <akim@epita.fr>
14775
14776 * data/bison.c++: Catch up with bison.simple:
14777 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14778 and Paul Eggert <eggert@twinsun.com>: `error' handing.
14779 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
14780 and popping traces.
14781
7067cb36
PH
147822002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14783
14784 * src/output.c (output_skeleton): Put an explicit path in front of
14785 the skeleton file name, rather than relying on the -I directory,
14786 to partially alleviate effects of having a skeleton file lying around
14787 in the current directory.
769b430f 14788
4a713ec2
PH
147892002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14790
769b430f 14791 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
14792 obstack_printf should be obstack_fgrow1.
14793
b408954b
AD
147942002-05-26 Akim Demaille <akim@epita.fr>
14795
14796 * src/state.h (state_t): `solved_conflicts' is a new member.
14797 * src/LR0.c (new_state): Set it to 0.
14798 * src/conflicts.h, src/conflicts.c (print_conflicts)
14799 (free_conflicts, solve_conflicts): Rename as...
14800 (conflicts_print, conflicts_free, conflicts_solve): these.
14801 Adjust callers.
14802 * src/conflicts.c (enum conflict_resolution_e)
14803 (solved_conflicts_obstack): New, used by...
14804 (log_resolution): this.
14805 Adjust to attach the conflict resolution to each state.
14806 Complete the description with the precedence/associativity
14807 information.
14808 (resolve_sr_conflict): Adjust.
14809 * src/print.c (print_state): Output its solved_conflicts.
14810 * tests/conflicts.at (Unresolved SR Conflicts)
14811 (Solved SR Conflicts): Exercise --report=all.
14812
a49aecd5
AD
148132002-05-26 Akim Demaille <akim@epita.fr>
14814
14815 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14816 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14817 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
14818 (token_number_t, item_number_as_token_number)
14819 (token_number_as_item_number, muscle_insert_token_number_table):
14820 Rename as...
14821 (symbol_number_t, item_number_as_symbol_number)
14822 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
14823 these, since it is more appropriate.
14824
5504898e
AD
148252002-05-26 Akim Demaille <akim@epita.fr>
14826
14827 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
14828 `Error:' lines.
14829 * data/bison.simple (yystos) [YYDEBUG]: New.
14830 (yyparse) [YYDEBUG]: Display the symbols which are popped during
14831 error recovery.
14832 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
14833
ec3bc396
AD
148342002-05-25 Akim Demaille <akim@epita.fr>
14835
14836 * doc/bison.texinfo (Debugging): Split into...
14837 (Tracing): this new section, its former contents, and...
14838 (Understanding): this new section.
14839 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
14840 by...
14841 (report_flag): this.
14842 Adjust all dependencies.
14843 (report_args, report_types, report_argmatch): New.
14844 (usage, getargs): Report/support -r, --report.
14845 * src/options.h
14846 (struct option_table_struct): Rename as..,
14847 (struct option_table_s): this.
14848 Rename the `set_flag' member to `flag' to match with getopt_long's
14849 struct.
14850 * src/options.c (option_table): Split verbose into an entry for
14851 %verbose, and another for --verbose.
14852 Support --report/-r, so remove -r from the obsolete --raw.
14853 * src/print.c: Attach full item sets and lookaheads reports to
14854 report_flag instead of trace_flag.
14855 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
14856
78df8250
PE
148572002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14858 and Paul Eggert <eggert@twinsun.com>
769b430f 14859
78df8250
PE
14860 * data/bison.simple (yyparse): Correct error handling to conform to
14861 POSIX and yacc. Specifically, after syntax error is discovered,
14862 do not reduce further before shifting the error token.
14863 Clean up the code a bit by removing the labels yyerrdefault,
14864 yyerrhandle, yyerrpop.
14865 * NEWS: Document the above.
14866
c0c9ea05
PH
148672002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14868
14869 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
14870 type; it isn't always big enough, since it doesn't necessarily
14871 include non-terminals.
769b430f 14872 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
14873 the latter can be removed.
14874 (yy_token_number_type): Remove, only one use.
14875 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
14876 don't use TokenNumberType as element type.
769b430f 14877
c0c9ea05
PH
14878 * tests/regression.at: Modify expected output to agree with change
14879 to yyr1 and yytranslate.
769b430f 14880
6390a83f
FK
148812002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
14882
14883 * src/reader.c (parse_action): Use copy_character instead of
14884 obstack_1grow.
14885
db7c8e9a
AD
148862002-05-13 Akim Demaille <akim@epita.fr>
14887
14888 * tests/regression.at (Token definitions): Prototype yylex and
14889 yyerror.
14890
fcc61800
PH
148912002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14892
158c687b 14893 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
14894 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
14895 32-bit arithmetic.
14896 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
14897
5683e9b2
AD
148982002-05-07 Akim Demaille <akim@epita.fr>
14899
14900 * tests/synclines.at: Be sure to prototype yylex and yyerror to
14901 avoid GCC warnings.
14902
0c2d3f4c
AD
149032002-05-07 Akim Demaille <akim@epita.fr>
14904
14905 Kill GCC warnings.
14906
14907 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
14908 over the RHS of each rule.
14909 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
14910 * src/state.h (state_t): Member `nitems' is unsigned short.
14911 * src/LR0.c (get_state): Adjust.
14912 * src/reader.c (packgram): Likewise.
14913 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
14914 `Type'.
14915 (muscle_insert_int_table): Remove, unused.
14916 (prepare_rules): Remove `max'.
14917
1565b720
AD
149182002-05-06 Akim Demaille <akim@epita.fr>
14919
14920 * src/closure.c (print_firsts): Display of the symbol tags.
14921 (bitmatrix_print): Move to...
14922 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
14923 here.
14924 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
14925
cfaee611
AD
149262002-05-06 Akim Demaille <akim@epita.fr>
14927
14928 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
14929 hash_do_for_each.
14930
458be8e0
AD
149312002-05-06 Akim Demaille <akim@epita.fr>
14932
14933 * src/LR0.c (new_state, get_state): Instead of using the global
14934 `kernel_size' and `kernel_base', have two new arguments:
14935 `core_size' and `core'.
14936 Adjust callers.
14937
a900a624
AD
149382002-05-06 Akim Demaille <akim@epita.fr>
14939
14940 * src/reader.c (packgram): No longer end `ritem' with a 0
14941 sentinel: it is not used.
14942
d4e7d3a1
AD
149432002-05-05 Akim Demaille <akim@epita.fr>
14944
14945 New experimental feature: display the lookaheads in the report and
14946 graph.
14947
14948 * src/print (print_core): When --trace-flag, display the rules
14949 lookaheads.
14950 * src/print_graph.c (print_core): Likewise.
14951 Swap the arguments.
14952 Adjust caller.
14953
39ceb25b
AD
149542002-05-05 Akim Demaille <akim@epita.fr>
14955
14956 * tests/torture.at (Many lookaheads): New test.
14957
5372019f
AD
149582002-05-05 Akim Demaille <akim@epita.fr>
14959
14960 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
14961 (GENERATE_MUSCLE_INSERT_TABLE): this.
14962 (output_int_table, output_unsigned_int_table, output_short_table)
14963 (output_token_number_table, output_item_number_table): Replace with...
14964 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
14965 (muscle_insert_short_table, muscle_insert_token_number_table)
14966 (muscle_insert_item_number_table): these.
14967 Adjust all callers.
14968 (prepare_tokens): Don't free `translations', since...
14969 * src/reader.h, src/reader.c (grammar_free): do it.
14970 Move to...
14971 * src/gram.h, src/gram.c (grammar_free): here.
14972 * data/bison.simple, data/bison.c++: b4_token_number_max is now
14973 b4_translate_max.
14974
5df5f6d5
AD
149752002-05-05 Akim Demaille <akim@epita.fr>
14976
14977 * src/output.c (output_unsigned_int_table): New.
14978 (prepare_rules): `i' is unsigned.
14979 `prhs', `rline', `r2' are unsigned int.
14980 Rename muscle `rhs_number_max' as `rhs_max'.
14981 Output muscles `prhs_max', `rline_max', and `r2_max'.
14982 Free rline and r1.
14983 * data/bison.simple, data/bison.c++: Adjust to use these muscles
14984 to compute types instead of constant types.
14985 * tests/regression.at (Web2c Actions): Adjust.
14986
b87f8b21
AD
149872002-05-04 Akim Demaille <akim@epita.fr>
14988
14989 * src/symtab.h (SALIAS, SUNDEF): Rename as...
14990 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
14991 Adjust dependencies.
14992 * src/output.c (token_definitions_output): Be sure not to output a
14993 `#define 'a'' when fed with `%token 'a' "a"'.
14994 * tests/regression.at (Token definitions): New.
14995
8bb936e4
PE
149962002-05-03 Paul Eggert <eggert@twinsun.com>
14997
14998 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
14999 for K&R C.
15000
150012002-05-03 gettextize <bug-gnu-gettext@gnu.org>
15002
15003 * Makefile.am (SUBDIRS): Remove intl.
15004 (EXTRA_DIST): Add config/config.rpath.
15005
53c71a12
AD
150062002-05-03 Akim Demaille <akim@epita.fr>
15007
15008 * data/bison.simple (m4_if): Don't output empty enums.
15009 And actually, output valid enum definitions :(.
15010
289dd0cf
AD
150112002-05-03 Akim Demaille <akim@epita.fr>
15012
15013 * configure.bat: Remove, completely obsolete.
15014 * Makefile.am (EXTRA_DIST): Adjust.
15015 Don't distribute config.rpath...
15016 * config/Makefile.am (EXTRA_DIST): Do it.
15017
db85e524
AD
150182002-05-03 Akim Demaille <akim@epita.fr>
15019
15020 * configure.in (GETTEXT_VERSION): New.
15021 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
15022
83ccf991
AD
150232002-05-03 Akim Demaille <akim@epita.fr>
15024
15025 * data/bison.simple (b4_token_enum): New.
15026 (b4_token_defines): Use it to output tokens both as #define and
15027 enums.
15028 Suggested by Paul Eggert.
15029 * src/output.c (token_definitions_output): Don't output spurious
15030 white spaces.
15031
1f418995
AD
150322002-05-03 Akim Demaille <akim@epita.fr>
15033
15034 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
15035
45119f04
RA
150362002-05-02 Robert Anisko <robert@lrde.epita.fr>
15037
15038 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
15039 Update the stack class, give a try to deque as the default container.
15040
b2d52318
AD
150412002-05-02 Akim Demaille <akim@epita.fr>
15042
15043 * data/bison.simple (yyparse): Do not implement @$ = @1.
15044 (YYLLOC_DEFAULT): Adjust to do it.
15045 * doc/bison.texinfo (Location Default Action): Fix.
15046
3a8b4109
AD
150472002-05-02 Akim Demaille <akim@epita.fr>
15048
15049 * src/reader.c (parse_braces): Merge into...
15050 (parse_action): this.
15051
84614e13
AD
150522002-05-02 Akim Demaille <akim@epita.fr>
15053
15054 * configure.in (ALL_LINGUAS): Remove.
15055 * po/LINGUAS, hr.po: New.
15056
fdbcd8e2
AD
150572002-05-02 Akim Demaille <akim@epita.fr>
15058
15059 Remove the so called hairy (semantic) parsers.
15060
15061 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
15062 * src/gram.h, src/gram.c (semantic_parser): Remove.
15063 (rule_t): Remove the guard and guard_line members.
15064 * src/lex.h (token_t): remove tok_guard.
15065 * src/options.c (option_table): Remove %guard and %semantic_parser
15066 support.
15067 * src/output.c, src/output.h (guards_output): Remove.
15068 (prepare): Adjust.
15069 (token_definitions_output): Don't output the `T'
15070 tokens (???).
15071 (output_skeleton): Don't output the guards.
15072 * src/files.c, src/files.c (attrsfile): Remove.
15073 * src/reader.c (symbol_list): Remove the guard and guard_line
15074 members.
15075 Adjust dependencies.
15076 (parse_guard): Remove.
15077 * data/bison.hairy: Remove.
15078 * doc/bison.texinfo (Environment Variables): Remove occurrences of
15079 BISON_HAIRY.
15080
82b6cb3f
AD
150812002-05-02 Akim Demaille <akim@epita.fr>
15082
15083 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
15084 (parse_guard): Rename the formal argument `stack_offset' as
15085 `rule_length', which is more readable.
15086 Adjust callers.
15087 (copy_at, copy_dollar): Instead of outputting the hard coded
15088 values of $$, $n and so forth, output invocation to b4_lhs_value,
15089 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
15090 Note: this patch partially drops `semantic-parser' support: it
15091 always does `rule_length - n', where semantic parsers ought to
15092 always use `-n'.
82b6cb3f
AD
15093 * data/bison.simple, data/bison.c++ (b4_lhs_value)
15094 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
15095
6cbfbcc5
AD
150962002-05-02 Akim Demaille <akim@epita.fr>
15097
15098 * configure.in (AC_INIT): Bump to 1.49b.
15099 (AM_INIT_AUTOMAKE): Short invocation.
15100
b8548114
AD
151012002-05-02 Akim Demaille <akim@epita.fr>
15102
15103 Version 1.49a.
15104
c20cd1fa
AD
151052002-05-01 Akim Demaille <akim@epita.fr>
15106
15107 * src/skeleton.h: Remove.
15108
8a9566d4
AD
151092002-05-01 Akim Demaille <akim@epita.fr>
15110
15111 * src/skeleton.h: Fix the #endif.
15112 Reported by Magnus Fromreide.
15113
8c6d399a
PE
151142002-04-26 Paul Eggert <eggert@twinsun.com>
15115
15116 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
15117 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 15118 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 15119
2b7ed18a
RA
151202002-04-25 Robert Anisko <robert@lrde.epita.fr>
15121
15122 * src/scan-skel.l: Postprocess quadrigraphs.
15123
15124 * src/reader.c (copy_character): New function, used to output
15125 single characters while replacing `[' and `]' with quadrigraphs, to
15126 avoid troubles with M4 quotes.
15127 (copy_comment): Output characters with copy_character.
15128 (read_additionnal_code): Likewise.
15129 (copy_string2): Likewise.
15130 (copy_definition): Likewise.
15131
15132 * tests/calc.at: Exercise M4 quoting.
15133
34a89c50
AD
151342002-04-25 Akim Demaille <akim@epita.fr>
15135
15136 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
15137 between `!' and the command.
15138 Reported by Paul Eggert.
15139
0dd1580a
RA
151402002-04-24 Robert Anisko <robert@lrde.epita.fr>
15141
15142 * tests/calc.at: Exercise prologue splitting.
15143
15144 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
15145 `b4_post_prologue' instead of `b4_prologue'.
15146
15147 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
15148 muscles.
15149 (output): Free pre_prologue_obstack and post_prologue_obstack.
15150 * src/files.h, src/files.c (attrs_obstack): Remove.
15151 (pre_prologue_obstack, post_prologue_obstack): New.
15152 * src/reader.c (copy_definition): Add a parameter to specify the
15153 obstack to fill, instead of using attrs_obstack unconditionally.
15154 (read_declarations): Pass pre_prologue_obstack to copy_definition if
15155 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
15156
83c1796f
PE
151572002-04-23 Paul Eggert <eggert@twinsun.com>
15158
15159 * data/bison.simple: Remove unnecessary commentary and white
15160 space differences from 1_29-branch.
15161 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
15162
15163 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
15164 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
15165 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
15166 constructors or destructors.
15167
15168 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
15169
1207eeac
AD
151702002-04-23 Akim Demaille <akim@epita.fr>
15171
15172 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
15173 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
15174 location with columns.
15175 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
15176 All reported by Paul Eggert.
15177
78ab8f67
AD
151782002-04-22 Akim Demaille <akim@epita.fr>
15179
15180 * src/reduce.c (dump_grammar): Move to...
15181 * src/gram.h, src/gram.c (grammar_dump): here.
15182 Be sure to separate long item numbers.
15183 Don't read the members of a rule's prec if its nil.
15184
133c20e2
AD
151852002-04-22 Akim Demaille <akim@epita.fr>
15186
15187 * src/output.c (table_size, table_grow): New.
15188 (MAXTABLE): Remove, replace uses with table_size.
15189 (pack_vector): Instead of dying when the table is too big, grow it.
15190
9515e8a7
AD
151912002-04-22 Akim Demaille <akim@epita.fr>
15192
15193 * data/bison.simple (yyr1): Its type is that of a token number.
15194 * data/bison.c++ (r1_): Likewise.
15195 * tests/regression.at (Web2c Actions): Adjust.
15196
23c5a174
AD
151972002-04-22 Akim Demaille <akim@epita.fr>
15198
15199 * src/reader.c (token_translations_init): 256 is now the default
15200 value for the error token, i.e., it will be assigned another
15201 number if the user assigned 256 to one of her tokens.
15202 (reader): Don't force 256 to error.
15203 * doc/bison.texinfo (Symbols): Adjust.
15204 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
15205 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
15206 etc. instead of 10, 20, 30 (which was used to `jump' over error
15207 (256) and undefined (2)).
15208
5fbb0954
AD
152092002-04-22 Akim Demaille <akim@epita.fr>
15210
15211 Propagate more token_number_t.
15212
15213 * src/gram.h (token_number_as_item_number)
15214 (item_number_as_token_number): New.
15215 * src/output.c (GENERATE_OUTPUT_TABLE): New.
15216 Use it to create output_item_number_table and
15217 output_token_number_table.
15218 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
15219 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
15220 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
15221 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
15222
4f940944
AD
152232002-04-22 Akim Demaille <akim@epita.fr>
15224
15225 * src/output.h, src/output.c (get_lines_number): Remove.
15226
3ded9a63
AD
152272002-04-19 Akim Demaille <akim@epita.fr>
15228
15229 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
15230 as Lex/Flex'.
15231 (Debugging): More details about enabling the debugging features.
15232 (Table of Symbols): Describe $$, $n, @$, and @n.
15233 Suggested by Tim Josling.
15234
e0c471a9
AD
152352002-04-19 Akim Demaille <akim@epita.fr>
15236
15237 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
15238
fecc10cd
AD
152392002-04-10 Akim Demaille <akim@epita.fr>
15240
15241 * src/system.h: Rely on HAVE_LIMITS_H.
15242 Suggested by Paul Eggert.
15243
51dec47b
AD
152442002-04-09 Akim Demaille <akim@epita.fr>
15245
15246 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
15247 full stderr, and strip it according to the bison options, instead
15248 of composing the error message from different bits.
15249 This makes it easier to check for several error messages.
15250 Adjust all the invocations.
15251 Add an invocation exercising the error token.
15252 Add an invocation demonstrating a stupid error message.
15253 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
15254 Adjust the tests.
15255 Error message are for stderr, not stdout.
15256
007a50a4
AD
152572002-04-09 Akim Demaille <akim@epita.fr>
15258
15259 * src/gram.h, src/gram.c (error_token_number): Remove, use
15260 errtoken->number.
15261 * src/reader.c (reader): Don't specify the user token number (2)
15262 for $undefined, as it uselessly prevents using it.
15263 * src/gram.h (token_number_t): Move to...
15264 * src/symtab.h: here.
15265 (state_t.number): Is a token_number_t.
15266 * src/print.c, src/reader.c: Use undeftoken->number instead of
15267 hard coded 2.
15268 (Even though this 2 is not the same as above: the number of the
15269 undeftoken remains being 2, it is its user token number which
15270 might not be 2).
15271 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
15272 `user_token_number_max'.
15273 Output `undef_token_number'.
15274 * data/bison.simple, data/bison.c++: Use them.
15275 Be sure to map invalid yylex return values to
15276 `undef_token_number'. This saves us from gratuitous SEGV.
15277
15278 * tests/conflicts.at (Solved SR Conflicts)
15279 (Unresolved SR Conflicts): Adjust.
15280 * tests/regression.at (Web2c Actions): Adjust.
15281
06446ccf
AD
152822002-04-08 Akim Demaille <akim@epita.fr>
15283
15284 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
15285 Adding #line.
15286 Remove the duplicate `typedefs'.
15287 (RhsNumberType): Fix the declaration and various other typos.
15288 Use __ofile__.
15289 * data/bison.simple: Use __ofile__.
15290 * src/scan-skel.l: Handle __ofile__.
15291
62a3e4f0
AD
152922002-04-08 Akim Demaille <akim@epita.fr>
15293
15294 * src/gram.h (item_number_t): New, the type of item numbers in
15295 RITEM. Note that it must be able to code symbol numbers as
15296 positive number, and the negation of rule numbers as negative
15297 numbers.
15298 Adjust all dependencies (pretty many).
15299 * src/reduce.c (rule): Remove this `short *' pointer: use
15300 item_number_t.
15301 * src/system.h (MINSHORT, MAXSHORT): Remove.
15302 Include `limits.h'.
15303 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
15304 (shortcpy): Remove.
15305 (MAXTABLE): Move to...
15306 * src/output.c (MAXTABLE): here.
15307 (prepare_rules): Use output_int_table to output rhs.
15308 * data/bison.simple, data/bison.c++: Adjust.
15309 * tests/torture.at (Big triangle): Move the limit from 254 to
15310 500.
15311 * tests/regression.at (Web2c Actions): Ajust.
15312
15313 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
15314 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
15315 passes, but produces negative #line number, once fixed, GCC is
15316 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
15317 C), it passes.
15318 * src/state.h (state_h): Code input lines on ints, not shorts.
15319
bb88b0fc
AD
153202002-04-08 Akim Demaille <akim@epita.fr>
15321
15322 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
15323 and then the grammar.
15324
9a636f47
AD
153252002-04-08 Akim Demaille <akim@epita.fr>
15326
15327 * src/system.h: No longer using strndup.
15328
680e8701
AD
153292002-04-07 Akim Demaille <akim@epita.fr>
15330
15331 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
15332 * src/output.c (output_table_data): Return the longest number.
15333 (prepare_tokens): Output `token_number_max').
15334 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
15335 New.
15336 Use them to define yy_token_number_type/TokenNumberType.
15337 Use this type for yytranslate.
15338 * tests/torture.at (Big triangle): Push the limit from 124 to
15339 253.
15340 * tests/regression.at (Web2c Actions): Adjust.
15341
817e9f41
AD
153422002-04-07 Akim Demaille <akim@epita.fr>
15343
15344 * tests/torture.at (Big triangle): New.
15345 (GNU AWK Grammar, GNU Cim Grammar): Move to...
15346 * tests/existing.at: here.
15347
5123689b
AD
153482002-04-07 Akim Demaille <akim@epita.fr>
15349
15350 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
15351 nritems.
15352 Adjust dependencies.
15353
f3849179
AD
153542002-04-07 Akim Demaille <akim@epita.fr>
15355
15356 * src/reader.c: Normalize increments to prefix form.
15357
bd02036a
AD
153582002-04-07 Akim Demaille <akim@epita.fr>
15359
15360 * src/reader.c, symtab.c: Remove debugging code.
15361
db8837cb
AD
153622002-04-07 Akim Demaille <akim@epita.fr>
15363
15364 Rename all the `bucket's as `symbol_t'.
15365
15366 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
15367 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
15368 * src/symtab.c, src/symtab.h (bucket): Rename as...
15369 (symbol_t): this.
15370 (symbol_list_new, bucket_check_defined, bucket_make_alias)
15371 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
15372 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
15373 (buckets_new, buckets_free, buckets_do): Rename as...
15374 (symbol_list_new, symbol_check_defined, symbol_make_alias)
15375 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
15376 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
15377 (symbols_new, symbols_free, symbols_do): these.
15378
72a23c97
AD
153792002-04-07 Akim Demaille <akim@epita.fr>
15380
15381 Use lib/hash for the symbol table.
15382
15383 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
15384 EOF.
15385 * src/lex.c (lex): Set the `number' member of new terminals.
15386 * src/reader.c (bucket_check_defined, bucket_make_alias)
15387 (bucket_check_alias_consistence, bucket_translation): New.
15388 (reader, grammar_free, readgram, token_translations_init)
15389 (packsymbols): Adjust.
15390 (reader): Number the predefined tokens.
15391 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
15392 for predefined tokens.
15393 * src/symtab.h (bucket): Remove all the hash table related
15394 members.
15395 * src/symtab.c (symtab): Replace by...
15396 (bucket_table): this.
15397 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
15398 (buckets_new, buckets_do): New.
15399
280a38c3
AD
154002002-04-07 Akim Demaille <akim@epita.fr>
15401
15402 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
15403 (start_symbol, max_user_token_number, semantic_parser)
15404 (error_token_number): Initialize.
15405 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
15406 Initialize.
15407 (reader): Don't.
15408 (errtoken, eoftoken, undeftoken, axiom): Extern.
15409
03b31c0c
AD
154102002-04-07 Akim Demaille <akim@epita.fr>
15411
15412 * src/gram.h (rule_s): prec and precsym are now pointers
15413 to the bucket giving the priority/associativity.
15414 Member `associativity' removed: useless.
15415 * src/reduce.c, src/conflicts.c: Adjust.
15416
8b3df748
AD
154172002-04-07 Akim Demaille <akim@epita.fr>
15418
15419 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
15420 Properly escape the symbols' TAG when outputting them.
15421
e601aa1d
AD
154222002-04-07 Akim Demaille <akim@epita.fr>
15423
15424 * src/lalr.h (LA): Is a bitsetv, not bitset*.
15425
b0299a2e
AD
154262002-04-07 Akim Demaille <akim@epita.fr>
15427
15428 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
15429 (LArule): this, which is an array to rule_t*.
15430 * src/print.c, src/conflicts.c: Adjust.
15431
d7e1f00c
AD
154322002-04-07 Akim Demaille <akim@epita.fr>
15433
15434 * src/gram.h (rule_t): Rename `number' as `user_number'.
15435 `number' is a new member.
15436 Adjust dependencies.
15437 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
15438
cc9305dd
AD
154392002-04-07 Akim Demaille <akim@epita.fr>
15440
15441 As a result of the previous patch, it is no longer needed
15442 to reorder ritem itself.
15443
15444 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
15445
b0940840
AD
154462002-04-07 Akim Demaille <akim@epita.fr>
15447
15448 Be sure never to walk through RITEMS, but use only data related to
15449 the rules themselves. RITEMS should be banished.
15450
15451 * src/output.c (output_token_translations): Rename as...
15452 (prepare_tokens): this.
15453 In addition to `translate', prepare the muscles `tname' and
15454 `toknum', which were handled by...
15455 (output_rule_data): this.
15456 Remove, and move the remainder of its outputs into...
15457 (prepare_rules): this new routines, which also merges content from
15458 (output_gram): this.
15459 (prepare_rules): Be sure never to walk through RITEMS.
15460 (output_stos): Rename as...
15461 (prepare_stos): this.
15462 (output): Always invoke prepare_states, after all, just don't use it
15463 in the output if you don't need it.
15464
643a5994
AD
154652002-04-07 Akim Demaille <akim@epita.fr>
15466
15467 * src/LR0.c (new_state): Display `nstates' as the name of the
15468 newly created state.
15469 Adjust to initialize first_state and last_state if needed.
15470 Be sure to distinguish the initial from the final state.
15471 (new_states): Create the itemset of the initial state, and use
15472 new_state.
15473 * src/closure.c (closure): Now that the initial state has its
15474 items properly set, there is no need for a special case when
15475 creating `ruleset'.
15476
15477 As a result, now the rule 0, reducing to $axiom, is visible in the
15478 outputs. Adjust the test suite.
15479
15480 * tests/conflicts.at (Solved SR Conflicts)
15481 (Unresolved SR Conflicts): Adjust.
15482 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
15483 * tests/conflicts.at (S/R in initial): New.
15484
b4c4ccc2
AD
154852002-04-07 Akim Demaille <akim@epita.fr>
15486
15487 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
15488 the RHS of the rules.
15489 * src/output.c (output_gram): Likewise.
15490
bba97eb2
AD
154912002-04-07 Akim Demaille <akim@epita.fr>
15492
15493 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
15494 bucket.
15495 Adjust all dependencies.
15496 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
15497 `number' of the buckets too.
15498 * src/gram.h: Include `symtab.h'.
15499 (associativity): Move to...
15500 * src/symtab.h: here.
15501 No longer include `gram.h'.
15502
c3b407f4
AD
155032002-04-07 Akim Demaille <akim@epita.fr>
15504
15505 * src/gram.h, src/gram.c (rules_rhs_length): New.
15506 (ritem_longest_rhs): Use it.
15507 * src/gram.h (rule_t): `number' is a new member.
15508 * src/reader.c (packgram): Set it.
15509 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
15510 the end of `rules', and count them out of `nrules'.
15511 (reduce_output, dump_grammar): Adjust.
15512 * src/print.c (print_grammar): It is no longer needed to check for
15513 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
15514 * tests/reduce.at (Reduced Automaton): New test.
15515
11652ab3
AD
155162002-04-07 Akim Demaille <akim@epita.fr>
15517
15518 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
15519 lacking `+ 1' to nrules, Bison reported as useless a token if it
15520 was used solely to set the precedence of the last rule...
15521
26b23c1a
AD
155222002-04-07 Akim Demaille <akim@epita.fr>
15523
15524 * data/bison.c++, data/bison.simple: Don't output the current file
15525 name in #line, to avoid useless diffs between two identical
15526 outputs under different names.
15527
18bcecb0
AD
155282002-04-07 Akim Demaille <akim@epita.fr>
15529
15530 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
15531 Normalize loops to using `< nrules + 1', not `<= nrules'.
15532
fa770c86
AD
155332002-04-07 Akim Demaille <akim@epita.fr>
15534
15535 * TODO: Update.
15536
d9b739c3
AD
155372002-04-07 Akim Demaille <akim@epita.fr>
15538
15539 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
15540 bucket.value as bucket.number.
15541
99013900
AD
155422002-04-07 Akim Demaille <akim@epita.fr>
15543
15544 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
15545 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
15546 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
15547 RHS, instead of being an index in RITEMS.
15548
e966383b
PE
155492002-04-04 Paul Eggert <eggert@twinsun.com>
15550
15551 * doc/bison.texinfo: Update copyright date.
15552 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
15553 (Symbols): Warn about running Bison in one character set,
15554 but compiling and/or running in an incompatible one.
15555 Warn about character code 256, too.
15556
155572002-04-03 Paul Eggert <eggert@twinsun.com>
15558
15559 * src/bison.data (YYSTACK_ALLOC): Depend on whether
15560 YYERROR_VERBOSE is nonzero, not whether it is defined.
15561
15562 Merge changes from bison-1_29-branch.
c307773e 15563
8d6c48b9
PE
155642002-03-20 Paul Eggert <eggert@twinsun.com>
15565
15566 Merge fixes from Debian bison_1.34-1.diff.
15567
15568 * configure.in (AC_PREREQ): 2.53.
15569
e53c6322
AD
155702002-03-20 Akim Demaille <akim@epita.fr>
15571
15572 * src/conflicts.c (log_resolution): Argument `resolution' is const.
15573
9ffbeca7
PE
155742002-03-19 Paul Eggert <eggert@twinsun.com>
15575
21db0b2a
PE
15576 * src/bison.simple (YYCOPY): New macro.
15577 (YYSTACK_RELOCATE): Use it.
15578 Remove Type arg; no longer needed. All callers changed.
15579 (yymemcpy): Remove; no longer needed.
15580
9ffbeca7
PE
15581 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
15582 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15583
642cb8f8
AD
155842002-03-19 Akim Demaille <akim@epita.fr>
15585
15586 Test and fix the #line outputs.
15587
15588 * tests/atlocal.at (GCC): New.
15589 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 15590 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
15591 (Action synch line, Epilogue synch line): New tests.
15592 * src/reader.c (parse_union_decl): Define the muscle stype_line.
15593 * data/bison.simple, data/bison.c++: Use it.
15594
3c31a486
AD
155952002-03-19 Akim Demaille <akim@epita.fr>
15596
15597 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
15598 (Solved SR Conflicts, %expect not enough, %expect right)
15599 (%expect too much): Move to...
15600 * tests/conflicts.at: this new file.
15601
0d8bed56
AD
156022002-03-19 Akim Demaille <akim@epita.fr>
15603
15604 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
15605 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
15606 that we can move to enums for instance.
15607 * src/output.c (token_definitions_output): Output a list of
15608 `token-name, token-number' instead of the #define.
15609 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
15610
9208d17f
AD
156112002-03-14 Akim Demaille <akim@epita.fr>
15612
15613 Use Gettext 0.11.1.
15614
af27eacb
RA
156152002-03-09 Robert Anisko <robert@lrde.epita.fr>
15616
15617 * data/bison.c++: Make the user able to add members to the generated
15618 parser by subclassing.
15619
9101a310
RA
156202002-03-05 Robert Anisko <robert@lrde.epita.fr>
15621
15622 * src/reader.c (read_additionnal_code): `c' should be an integer, not
15623 a character.
15624 Reported by Nicolas Tisserand and Nicolas Burrus.
15625
fff9bf0b
RA
156262002-03-04 Robert Anisko <robert@lrde.epita.fr>
15627
15628 * src/reader.c: Warn about lacking semi-colons, do not complain.
15629
64dba31e
RA
156302002-03-04 Robert Anisko <robert@lrde.epita.fr>
15631
15632 * data/bison.c++: Remove a debug line.
15633
374f5a14
RA
156342002-03-04 Robert Anisko <robert@lrde.epita.fr>
15635
15636 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
15637 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
15638 provide a default implementation.
15639
bfcf1f3a
AD
156402002-03-04 Akim Demaille <akim@epita.fr>
15641
15642 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
15643 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
15644 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
15645 * tests/semantic.at (Parsing Guards): Similarly.
15646 * src/reader.at (readgram): Complain if the last rule is not ended
15647 with a semi-colon.
15648
65ccf9fc
AD
156492002-03-04 Akim Demaille <akim@epita.fr>
15650
15651 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
15652 * src/closure.c: here.
15653 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
15654 RTC.
15655 * src/warshall.h, src/warshall.c: Remove.
15656 * tests/sets.at (Broken Closure): Adjust.
15657
d0039cbc
AD
156582002-03-04 Akim Demaille <akim@epita.fr>
15659
15660 * src/output.c (output_skeleton): tempdir is const.
15661 bytes_read is unused.
15662
345cea78
AD
156632002-03-04 Akim Demaille <akim@epita.fr>
15664
15665 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
15666 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
15667 Update.
15668 From Michael Hayes.
15669
564801f7
AD
156702002-03-04 Akim Demaille <akim@epita.fr>
15671
15672 * src/closure.c (closure): `r' is unused.
15673
e5352bc7
AD
156742002-03-04 Akim Demaille <akim@epita.fr>
15675
15676 * tests/sets.at (Broken Closure): Add the ending `;'.
15677 * src/reader.at (readgram): Complain if a rule is not ended with a
15678 semi-colon.
15679
914feea9
AD
156802002-03-04 Akim Demaille <akim@epita.fr>
15681
15682 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
15683 (count_sr_conflicts): Use bitset_count.
15684 * src/reduce.c (inaccessable_symbols): Ditto.
15685 (bits_size): Remove.
15686 * src/warshall.h, src/warshall.c: Convert to bitsetv.
15687
f0250de6
AD
156882002-03-04 Akim Demaille <akim@epita.fr>
15689
15690 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
15691 * src/reduce.c: Remove the `bitset_zero's following the
15692 `bitset_create's, as now it is performed by the latter.
15693
ef017502
AD
156942002-03-04 Akim Demaille <akim@epita.fr>
15695
15696 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
15697 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
15698 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
15699 latest sources from Michael.
15700
76514394
AD
157012002-03-04 Akim Demaille <akim@epita.fr>
15702
15703 * src/output.c (output): Don't free the grammar.
15704 * src/reader.c (grammar_free): New.
15705 * src/main.c (main): Call it and don't free symtab here.
15706
55024580
AD
157072002-03-04 Akim Demaille <akim@epita.fr>
15708
15709 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
15710 before returning.
15711 Reported by Benoit Perrot.
15712
f9abaa2c
AD
157132002-03-04 Akim Demaille <akim@epita.fr>
15714
15715 Use bitset operations when possible, not loops over bits.
15716
15717 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
15718 bitset_or.
15719 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
15720 * src/reduce.c (useless_nonterminals): Formatting changes.
15721 * src/warshall.c (TC): Use bitset_or.
15722
0e721e75
AD
157232002-03-04 Akim Demaille <akim@epita.fr>
15724
15725 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
15726 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
15727 Ditto.
15728
0fb1ffb1
AD
157292002-03-04 Akim Demaille <akim@epita.fr>
15730
15731 * src/lalr.c (F): Now a bitset*.
15732 Adjust all dependencies.
15733
b86796bf
AD
157342002-03-04 Akim Demaille <akim@epita.fr>
15735
15736 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
15737 Adjust all dependencies.
15738
602bbf31
AD
157392002-03-04 Akim Demaille <akim@epita.fr>
15740
15741 * src/L0.c, src/LR0.h (nstates): Be size_t.
15742 Adjust comparisons (signed vs unsigned).
15743 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
15744 bitset*.
15745 Adjust all dependencies.
15746
d8a0245c
AD
157472002-03-04 Akim Demaille <akim@epita.fr>
15748
15749 * src/closure.c (firsts): Now, also a bitset.
15750 Adjust all dependencies.
15751 (varsetsize): Remove, now unused.
15752 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
15753
34ba9743
AD
157542002-03-04 Akim Demaille <akim@epita.fr>
15755
15756 * src/print.c: Convert to use bitset.h, not hand coded iterations
15757 over ints.
15758
ed86e78c
AD
157592002-03-04 Akim Demaille <akim@epita.fr>
15760
15761 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
15762
dfdb1797
AD
157632002-03-04 Akim Demaille <akim@epita.fr>
15764
15765 * src/closure.c (ruleset): Be a bitset.
15766 (rulesetsize): Remove.
15767
7086e707
AD
157682002-03-04 Akim Demaille <akim@epita.fr>
15769
15770 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
15771 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
15772 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
15773 * src/closure.c (fderives): Be an array of bitsets.
15774
98254360
RA
157752002-02-28 Robert Anisko <robert@lrde.epita.fr>
15776
15777 * data/bison.c++: Merge the two generated headers. Insert a copyright
15778 notice in each output file.
15779
a75c057f
AD
157802002-02-28 Akim Demaille <akim@epita.fr>
15781
15782 * data/bison.c++: Copy the prologue of bison.simple to fetch
15783 useful M4 definitions, such as b4_header_guard.
15784
06b00abc
AD
157852002-02-25 Akim Demaille <akim@epita.fr>
15786
15787 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
15788 translator friendly scheme for the bgr
15789 copyright notice.
06b00abc 15790
70e7d534
AD
157912002-02-25 Akim Demaille <akim@epita.fr>
15792
15793 * src/output.c (header_output): Remove, now handled completely via
15794 M4.
15795
abe017f6
AD
157962002-02-25 Akim Demaille <akim@epita.fr>
15797
15798 * m4/m4.m4: New, from CVS Autoconf.
15799 * configure.in: Invoke it.
15800 * src/output.c (output_skeleton): Use its result instead of the
15801 hard coded name.
15802
381fb12e
AD
158032002-02-25 Akim Demaille <akim@epita.fr>
15804
15805 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
15806 Fileutils 4.1.5.
15807 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
15808 * src/output.c (output_skeleton): Use mkstemp to create a real
15809 temporary file.
15810 Move the filling of `skeleton' and its muscle to...
15811 (prepare): here.
15812 (output): Move the definition of the prologue muscle to...
15813 (prepare): here.
15814 * src/system.h (DEFAULT_TMPDIR): New.
15815
6f38107f
PE
158162002-02-14 Paul Eggert <eggert@twinsun.com>
15817
15818 Remove the support for C++ namespace cleanliness; it was
15819 causing more problems than it was curing, since it didn't work
15820 properly on some nonstandard C++ compilers. This can wait
15821 for a proper C++ parser.
15822
15823 * NEWS: Document this.
15824 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
15825 of C++, as it's treated like C now.
15826 * src/bison.simple (YYSTD): Remove.
15827 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
15828 Treat C++ just like Standard C instead of trying to support
15829 namespace cleanliness.
15830
80cce3da
AD
158312002-02-14 Akim Demaille <akim@epita.fr>
15832
15833 * tests/regression.at (else): Adjust to Andreas' change.
15834
842e8679
AD
158352002-02-14 Akim Demaille <akim@epita.fr>
15836
15837 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
15838
4bda3f10
AD
158392002-02-13 Andreas Schwab <schwab@suse.de>
15840
15841 * src/output.c (output_rule_data): Don't output NULL, it might
15842 not be defined yet.
15843
4162fa07 158442002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 15845
4162fa07
RA
15846 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
15847 (Copyright notice): Update.
b418ecd8 15848
bd16a5dc
AD
158492002-02-11 Akim Demaille <akim@epita.fr>
15850
15851 * tests/regression.at (%nonassoc and eof): Don't include
15852 nonportable headers.
15853
8d69a1a3
RA
158542002-02-08 Robert Anisko <robert@lrde.epita.fr>
15855
15856 * data/bison.c++: Correct error recovery. Make the user able to
15857 initialize the starting location.
15858
9b2d0677
AD
158592002-02-07 Akim Demaille <akim@epita.fr>
15860
15861 * tests/input.at: New.
15862
69e2658b
RA
158632002-02-07 Robert Anisko <robert@lrde.epita.fr>
15864
15865 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 15866 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
15867 directives around tables only needed for debugging.
15868
4aacc3a7
RA
158692002-02-07 Robert Anisko <robert@lrde.epita.fr>
15870
15871 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
15872 C++ parsers.
15873 (yy::b4_name::parse): Use print_.
15874
762a801e
RA
158752002-02-07 Robert Anisko <robert@lrde.epita.fr>
15876
15877 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
15878
4bb2bc3f
RA
158792002-02-07 Robert Anisko <robert@lrde.epita.fr>
15880
15881 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
15882 C++ parsers.
15883 (yy::b4_name::parse): Build verbose error messages, and use error_.
15884
6b45a3ca
RA
158852002-02-06 Robert Anisko <robert@lrde.epita.fr>
15886
15887 * data/bison.c++: Fix m4 quoting in comments.
15888
50997c6e
RA
158892002-02-06 Robert Anisko <robert@lrde.epita.fr>
15890
15891 * data/bison.c++: Adjust the parser code. Fix some muscles that were
15892 not expanded by m4.
15893
3f3eed27
AD
158942002-02-05 Akim Demaille <akim@epita.fr>
15895
15896 * data/bison.c++: Adjust to the M4 back end.
15897 More is certainly needed.
15898
be2a1a68
AD
158992002-02-05 Akim Demaille <akim@epita.fr>
15900
15901 Give a try to M4 as a back end.
15902
15903 * lib/readpipe.c: New, from wdiff.
15904 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
15905 BISON_HAIRY.
15906 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
15907 specific values. Now it is m4 that performs the lookup.
15908 * src/parse-skel.y: Remove.
15909 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
15910 * src/output.c (actions_output, guards_output)
15911 (token_definitions_output): No longer keeps track of the output
15912 line number, hence remove the second argument.
15913 (guards_output): Check against the guard member of a rule, not the
15914 action member.
15915 Adjust callers.
15916 (output_skeleton): Don't look for the skeleton location, let m4 do
15917 that.
15918 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
15919 file will be used.
15920 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
15921 (prepare): Given that for the time being changesyntax is not
15922 usable in M4, rename the muscles using `-' to `_'.
15923 Define `defines_flag', `output_parser_name' and `output_header_name'.
15924 * src/output.h (actions_output, guards_output)
15925 (token_definitions_output): Adjust prototypes.
15926 * src/scan-skel.l: Instead of scanning the skeletons, it now
15927 processes the output of m4: `__oline__' and `#output'.
15928 * data/bison.simple: Adjust to be used by M4(sugar).
15929 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
15930 to date.
15931 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
15932 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
15933 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
15934 shamelessly stolen from CVS Autoconf.
15935
beda758b
AD
159362002-02-05 Akim Demaille <akim@epita.fr>
15937
15938 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
15939 * configure.in: Check for the declarations of free and malloc.
15940 * src/muscle_tab.c: Adjust.
15941
5ece6d43
AD
159422002-02-05 Akim Demaille <akim@epita.fr>
15943
15944 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
15945 which have no values.
15946
5bb18f9a
AD
159472002-02-05 Akim Demaille <akim@epita.fr>
15948
15949 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
15950 * data/: here.
15951
894dd62e
PE
159522002-01-29 Paul Eggert <eggert@twinsun.com>
15953
15954 * src/bison.simple (YYSIZE_T): Do not define merely because
15955 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
15956 On some platforms, <alloca.h> does not declare YYSTD (size_t).
15957
82841af7
AD
159582002-01-27 Akim Demaille <akim@epita.fr>
15959
15960 Fix `%nonassoc and eof'.
15961
15962 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
15963 which were not properly copied! Replace
15964 memcpy (res->errs, src->errs, src->nerrs);
15965 with
15966 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
15967 !!!
15968 * tests/regression.at (%nonassoc and eof): Adjust to newest
15969 Autotest: `.' is not in the PATH.
15970
318b76e9
AD
159712002-01-27 Akim Demaille <akim@epita.fr>
15972
15973 * tests/sets.at (AT_EXTRACT_SETS): New.
15974 (Nullable): Use it.
15975 (Firsts): New.
15976
30d2f3d5
AD
159772002-01-26 Akim Demaille <akim@epita.fr>
15978
15979 * tests/actions.at, tests/calc.at, tests/headers.at,
15980 * tests/torture.at: Adjust to the newest Autotest which no longer
15981 forces `.' in the PATH.
15982
30f8c395
AD
159832002-01-25 Akim Demaille <akim@epita.fr>
15984
15985 * tests/regression.at (%nonassoc and eof): New.
15986 Suggested by Robert Anisko.
15987
29ae55f1
AD
159882002-01-24 Akim Demaille <akim@epita.fr>
15989
15990 Bison dumps core when trying to complain about broken input files.
15991 Reported by Cris van Pelt.
15992
15993 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
15994 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
15995 into...
15996 (Invalid inputs): Strengthen: exercise parse_percent_token.
15997
2b548aa6
RA
159982002-01-24 Robert Anisko <robert.anisko@epita.fr>
15999
16000 * src/Makefile.am: Add bison.c++.
16001 * src/bison.c++: New skeleton.
16002
bb0146c2
AD
160032002-01-21 Paolo Bonzini <bonzini@gnu.org>
16004
16005 * po/it.po: New.
16006
bec30531
AD
160072002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
16008
16009 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
16010
fc6edc45
MA
160112002-01-20 Marc Autret <marc@gnu.org>
16012
16013 * src/files.c (compute_output_file_names): Fix
16014
5e5d5415
MA
160152002-01-20 Marc Autret <marc@gnu.org>
16016
16017 * tests/output.at: New test.
16018 * src/files.c (compute_base_names): Don't map extensions when
16019 the YACC flag is set, use defaults.
16020 Reported by Evgeny Stambulchik.
16021
44ea3fbd
MA
160222002-01-20 Marc Autret <marc@gnu.org>
16023
ba0fe3c7
PE
16024 * src/system.h: Need to define __attribute__ away for non-GCC
16025 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
16026 Suggested by Albert Chin-A-Young.
16027
338963d1
TVH
160282002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
16029
16030 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
16031 canonical definition.
16032 * src/system.h: Use the canonical definition for PARAMS (avoids
16033 a conflict with the macro from lib/hash.h).
16034
c57b2479
AD
160352002-01-11 Akim Demaille <akim@epita.fr>
16036
16037 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 16038 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 16039
b85810ae
AD
160402002-01-09 Akim Demaille <akim@epita.fr>
16041
16042 * src/files.c, src/files.h (output_infix): New.
16043 (tab_extension): Remove.
16044 (compute_base_names): Compute the former, drop the latter.
16045 * src/output.c (prepare): Insert the muscles `output-infix', and
16046 `output-suffix'.
16047 * src/parse-skel.y (string, string.1): New.
16048 (section.header): Use it.
16049 (section.yacc): Remove.
16050 (prefix): Remove too.
16051 * src/scan-skel.l: Adjust.
16052 * src/bison.simple, src/bison.hairy: Adjust.
16053
cae60122
AD
160542002-01-09 Akim Demaille <akim@epita.fr>
16055
16056 * configure.in (WERROR_CFLAGS): Compute it.
16057 * src/Makefile.am (CFLAGS): Pass it.
16058 * tests/atlocal.in (CFLAGS): Idem.
16059 * src/files.c: Fix a few warnings.
16060 (get_extension_index): Remove, unused.
16061
ae404801
AD
160622002-01-08 Akim Demaille <akim@epita.fr>
16063
16064 * src/getargs.c (AS_FILE_NAME): New.
16065 (getargs): Use it to convert DOSish file names.
16066 * src/files.c (base_name): Rename as full_base_name to avoid
16067 clashes with `base_name ()'.
16068 (filename_split): New.
16069 (compute_base_names): N-th rewrite, using filename_split.
16070
22312b71
AD
160712002-01-08 Akim Demaille <akim@epita.fr>
16072
16073 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
16074 New, stolen from the Fileutils 4.1.
16075 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16076 * configure.in: Check for the presence of memrchr, and of its
16077 prototype.
16078
a67cef01
TVH
160792002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
16080
16081 * lib/hash.h (__P): Added definition for this macro.
16082 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
16083 BUILT_SOURCES, to ensure they are generated first.
16084 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
16085 %error-verbose to allow bootstrapping with bison 1.30x.
16086
2b25d624
AD
160872002-01-06 Akim Demaille <akim@epita.fr>
16088
16089 * src/reader.c (parse_braces): Don't fetch the next char, the
16090 convention is to fetch on entry.
16091 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
16092 'switch' without a following semicolon.
16093 * tests/regression.at (braces parsing): New.
16094
3460813b
AD
160952002-01-06 Akim Demaille <akim@epita.fr>
16096
16097 Bison is dead wrong in its RR conflict reports.
16098
16099 * tests/torture.at (GNU Cim Grammar): New.
16100 * src/conflicts.c (count_rr_conflicts): Fix.
16101
73784c64
AD
161022002-01-06 Akim Demaille <akim@epita.fr>
16103
16104 Creating package.m4 from configure.ac causes too many problems.
16105
16106 * tests/Makefile.am (package.m4): Create it by hand,
16107 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
16108
25d81090
AD
161092002-01-06 Akim Demaille <akim@epita.fr>
16110
16111 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
16112 skeleton.h.
16113
a9b8959e
PE
161142002-01-04 Paul Eggert <eggert@twinsun.com>
16115
16116 * doc/bison.texinfo (Debugging):
16117 Remove YYSTDERR; it's no longer defined or used.
16118 Also, s/cstdio.h/cstdio/.
16119
25d81090
AD
161202002-01-03 Akim Demaille <akim@epita.fr>
16121
16122 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
16123
1109455c
AD
161242002-01-03 Akim Demaille <akim@epita.fr>
16125
16126 * src/parse-skel.y (process_skeleton): Don't bind the parser's
16127 tracing code to --trace, wait for a better --trace option, with
16128 args.
16129
7ea5e977
AD
161302002-01-03 Akim Demaille <akim@epita.fr>
16131
16132 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
16133 The ISO C++ standard is extremely clear about it: stderr is
16134 considered a macro, not a regular symbol (see table 94 `Header
16135 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
16136 Therefore std:: does not apply to it. It still does with fprintf.
16137 Also, s/cstdio.h/cstdio/.
16138
fab5b110
AD
161392002-01-03 Akim Demaille <akim@epita.fr>
16140
16141 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
16142 for non system headers.
16143
aed7fd9b
AD
161442002-01-02 Akim Demaille <akim@epita.fr>
16145
16146 Equip the skeleton chain with location tracking, runtime trace,
16147 pure parser and scanner.
16148
16149 * src/parse-skel.y: Request a pure parser, locations, and prefix
16150 renaming.
16151 (%union): Having several members with the same type does not help
16152 type mismatches, simplify.
16153 (YYPRINT, yyprint): New.
16154 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
16155 (skel_error): this.
16156 Handle locations.
16157 * src/scan-skel.l: Adjust to these changes.
16158 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
16159 (LOCATION_PRINT, skel_control_t): New.
16160
24fad99e
AD
161612001-12-30 Akim Demaille <akim@epita.fr>
16162
16163 * src/parse-skel.y: Get rid of the shift/reduce conflict:
16164 replace `gb' with BLANKS.
16165 * src/scan-skel.l: Adjust.
16166
a4b36db4
AD
161672001-12-30 Akim Demaille <akim@epita.fr>
16168
16169 * src/system.h: We don't need nor want bcopy.
16170 Throw away MS-DOS crap: we don't need getpid.
16171 * configure.in: We don't need strndup. It was even causing
16172 problems: because Flex includes the headers *before* us,
16173 _GNU_SOURCE is not defined by config.h, and therefore strndup was
16174 not visible.
16175 * lib/xstrndup.c: New.
16176 * src/scan-skel.l: Use it.
16177 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
16178 * src/parse-skel.y: Use %directives instead of #defines.
16179
1239777d
AD
161802001-12-30 Akim Demaille <akim@epita.fr>
16181
16182 * src/skeleton.h: New.
16183 * src/output.c (output_parser, output_master_parser): Remove, dead
16184 code.
16185 * src/output.h (get_lines_number, actions_output, guards_output)
16186 (token_definitions_output): Prototype them.
16187 * src/parse-skel.y: Add the license notice.
16188 Include output.h and skeleton.h.
16189 (process_skeleton): Returns void, and takes a single parameter.
16190 * src/scan-skel.l: Add the license notice.
16191 Include skeleton.h.
16192 Don't use %option yylineno: it seems that then Flex imagines
16193 REJECT has been used, and therefore it won't reallocate its
16194 buffers (which makes no other sense to me than a bug). It results
16195 in warnings for `unused: yy_flex_realloc'.
16196
9b3add5b
RA
161972001-12-30 Robert Anisko <robert.anisko@epita.fr>
16198
16199 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
16200 (MUSCLE_INSERT_PREFIX): ...to there.
16201 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
16202 (MUSCLE_INSERT_PREFIX): Move from here...
16203
16204 * src/bison.hairy: Add a section directive. Put braces around muscle
16205 names. This parser skeleton is still broken, but Bison should not
16206 choke on a bad muscle 'syntax'.
16207 * src/bison.simple: Add a section directive. Put braces around muscle
16208 names.
16209
16210 * src/files.h (strsuffix, stringappend): Add declarations.
16211 (tab_extension): Add declaration.
16212 (short_base_name): Add declaration.
16213
16214 * src/files.c (strsuffix, stringappend): No longer static. These
16215 functions are used in the skeleton parser.
16216 (tab_extension): New.
16217 (compute_base_names): Use the computations done in this function
fab5b110 16218 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
16219 names.
16220 (short_base_name): No longer static.
16221
16222 * src/output.c (output_skeleton): New.
16223 (output): Disable call to output_master_parser, and give a try to
16224 a new skeleton handling system.
16225 (guards_output, actions_output): No longer static.
16226 (token_definitions_output, get_lines_number): No longer static.
16227
16228 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
16229
fab5b110 16230 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
16231 parse-skel.y.
16232
16233 * src/parse-skel.y: New file.
16234 * src/scan-skel.l: New file.
16235
b5b61c61
AD
162362001-12-29 Akim Demaille <akim@epita.fr>
16237
16238 %name-prefix is broken.
16239
16240 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
16241 Adjust all dependencies.
16242 * tests/headers.at (export YYLTYPE): Strengthen this test: use
16243 %name-prefix.
16244
16245 Renaming yylval but not yylloc is not consistent. Now we do.
16246
16247 * src/bison.simple: Prefix yylloc if used.
16248 * doc/bison.texinfo (Decl Summary): Document that.
16249
8c9a50be
AD
162502001-12-29 Akim Demaille <akim@epita.fr>
16251
16252 * doc/bison.texinfo: Promote `%long-directive' over
16253 `%long_directive'.
16254 Remove all references to fixed-output-files, yacc is enough.
16255
d99361e6
AD
162562001-12-29 Akim Demaille <akim@epita.fr>
16257
16258 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
16259 user prologue. These are defaults.
16260 * tests/actions.at (Mid-rule actions): Make sure the user can
16261 define YYDEBUG and YYERROR_VERBOSE.
16262
b9cecb91
AD
162632001-12-29 Akim Demaille <akim@epita.fr>
16264
16265 * src/output.c (header_output): Don't forget to export YYLTYPE and
16266 yylloc.
16267 * tests/headers.at (export YYLTYPE): New, make sure it does.
16268 * tests/regression.at (%union and --defines, Invalid CPP headers):
16269 Move to...
16270 * tests/headers.at: here.
16271
aea13e97
AD
162722001-12-29 Akim Demaille <akim@epita.fr>
16273
16274 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
16275
931394cb
AD
162762001-12-29 Akim Demaille <akim@epita.fr>
16277
16278 * tests/actions.at (Mid-rule actions): Output on a single line
16279 instead of several.
16280
704a47c4
AD
162812001-12-29 Akim Demaille <akim@epita.fr>
16282
16283 * doc/bison.texinfo: Formatting changes.
16284
091e20bb
AD
162852001-12-29 Akim Demaille <akim@epita.fr>
16286
16287 Don't store the token defs in a muscle, just be ready to output it
16288 on command. Now possible via `symbols'. Fixes a memory leak.
16289
16290 * src/output.c (token_definitions_output): New.
16291 (output_parser, header_output): Use it.
16292 * src/reader.c (symbols_save): Remove.
16293
cce71710
AD
162942001-12-29 Akim Demaille <akim@epita.fr>
16295
16296 * src/bison.simple: Do not provide a default for YYSTYPE and
16297 YYLTYPE before the user's prologue. Otherwise it's hardly... a
16298 default.
16299
82c035a8
AD
163002001-12-29 Akim Demaille <akim@epita.fr>
16301
16302 Mid-rule actions are simply... ignored!
16303
16304 * src/reader.c (readgram): Be sure to attach mid-rule actions to
16305 the empty-rule associated to the dummy symbol, not to the host
16306 rule.
16307 * tests/actions.at (Mid-rule actions): New.
16308
8419d367
AD
163092001-12-29 Akim Demaille <akim@epita.fr>
16310
16311 Memory leak.
16312
16313 * src/reader.c (reader): Free grammar.
16314
375d5806
AD
163152001-12-29 Akim Demaille <akim@epita.fr>
16316
16317 Memory leak.
16318
16319 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
16320 since it allocates it for each state, although only one is needed.
16321 (allocate_storage): Do it here.
16322
f51cb8ff
AD
163232001-12-29 Akim Demaille <akim@epita.fr>
16324
16325 * src/options.h, src/options.c (create_long_option_table): Rename
16326 as...
16327 (long_option_table_new): this, with a clearer prototype.
16328 (percent_table): Remove, unused,
16329 * src/getargs.c (getargs): Adjust.
16330
29e88316
AD
163312001-12-29 Akim Demaille <akim@epita.fr>
16332
16333 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
16334 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
16335 as states.
16336
b9f71f19
AD
163372001-12-29 Akim Demaille <akim@epita.fr>
16338
16339 * src/lalr.c (build_relations): Rename `states' as `states1'.
16340 Sorry, I don't understand exactly what it is, no better name...
16341
1a2b5d37
AD
163422001-12-29 Akim Demaille <akim@epita.fr>
16343
16344 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
16345 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
16346 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
16347 as rules.
16348
1cca533e
AD
163492001-12-29 Akim Demaille <akim@epita.fr>
16350
16351 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
16352 ago.
16353
c03ae966
AD
163542001-12-29 Akim Demaille <akim@epita.fr>
16355
16356 * src/reader.c, src/reader.h (user_toknums): Remove.
16357 Adjust all users to use symbols[i]->user_token_number.
16358
5a670b1e
AD
163592001-12-29 Akim Demaille <akim@epita.fr>
16360
16361 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
16362 Adjust all users to use symbols[i]->prec or ->assoc.
16363
ad949da9
AD
163642001-12-29 Akim Demaille <akim@epita.fr>
16365
16366 * src/reader.c, src/reader.h (tags): Remove.
16367 Adjust all users to use symbols[i]->tag.
16368
0e78e603
AD
163692001-12-29 Akim Demaille <akim@epita.fr>
16370
16371 * src/gram.h, src/gram.c (symbols): New, similar to state_table
16372 and rule_table.
16373 * src/reader.c (packsymbols): Fill this table.
16374 Drop sprec.
16375 * src/conflicts.c (resolve_sr_conflict): Adjust.
16376 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
16377 single table.
16378 Use symbols[i]->tag instead of tags[i].
16379
213e640e
AD
163802001-12-29 Akim Demaille <akim@epita.fr>
16381
16382 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
16383 In addition, put a comment in there, to replace...
16384 * tests/regression.at (%union and C comments): Remove.
16385
e7b8bef1
AD
163862001-12-29 Akim Demaille <akim@epita.fr>
16387
16388 * tests/regression.at (Web2c Actions): Blindly move the actual
16389 output as expected output. The contents *seem* right to me, but I
16390 can't pretend reading perfectly parser tables... Nonetheless, all
16391 the other tests pass correctly, the table look OK, even though the
16392 presence of `$axiom' is to be noted: AFAICS it is useless (but
16393 harmless).
16394
b68e7744
AD
163952001-12-29 Akim Demaille <akim@epita.fr>
16396
16397 * src/reader.c (readgram): Don't add the rule 0 if there were no
16398 rules read. In other words, add it _after_ having performed
16399 grammar sanity checks.
16400 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
16401
78d5bae9
AD
164022001-12-29 Akim Demaille <akim@epita.fr>
16403
16404 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
16405 visible, and some states have now a different number.
16406
ff442794
AD
164072001-12-29 Akim Demaille <akim@epita.fr>
16408
16409 * src/reader.c (readgram): Bind the initial rule's lineno to that
16410 of the first rule.
16411 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
16412 (Solved SR Conflicts): Adjust rule 0's line number.
16413
610ab194
AD
164142001-12-29 Akim Demaille <akim@epita.fr>
16415
16416 Fix the `GAWK Grammar' failure.
16417
16418 * src/LR0.c (final_state): Initialize to -1 so that we do compute
16419 the reductions of the first state which was mistakenly confused
16420 with the final state because precisely final_state was initialized
16421 to 0.
16422 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
16423 now noticed by Bison.
16424 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
16425 have a reduction on $default.
16426
29d29c8f
AD
164272001-12-29 Akim Demaille <akim@epita.fr>
16428
16429 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
16430 rule line numbers.
16431 * src/closure.c (print_closure): Likewise.
16432 * src/derives.c (print_derives): Likewise.
16433 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
16434 now.
16435
7c6b64d0
AD
164362001-12-29 Akim Demaille <akim@epita.fr>
16437
16438 * src/lalr.c (lookaheads_print): New.
16439 (lalr): Call it when --trace-flag.
16440 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
16441 are dumped.
16442
3d4daee3
AD
164432001-12-29 Akim Demaille <akim@epita.fr>
16444
16445 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
16446 when walking through ritem, even via rule->rhs.
16447 * src/reduce.c (dump_grammar, useful_production, reduce_output)
16448 (useful_production, useless_nonterminals): Likewise.
16449 (reduce_grammar_tables): Likewise, plus update nritems.
16450 * src/nullable.c (set_nullable): Likewise.
16451 * src/lalr.c (build_relations): Likewise.
16452 * tests/sets.at (Nullable): Adjust.
16453 Fortunately, now, the $axiom is no longer nullable.
16454
9e7f6bbd
AD
164552001-12-29 Akim Demaille <akim@epita.fr>
16456
16457 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
16458 the 0-sentinel.
16459 * src/gram.c (ritem_longest_rhs): Likewise.
16460 * src/reduce.c (nonterminals_reduce): Likewise.
16461 * src/print_graph.c (print_graph): Likewise.
16462 * src/output.c (output_rule_data): Likewise.
16463 * src/nullable.c (set_nullable): Likewise.
16464
255ef638
AD
164652001-12-29 Akim Demaille <akim@epita.fr>
16466
16467 * src/output.c: Comment changes.
16468
0d8a7363
AD
164692001-12-27 Paul Eggert <eggert@twinsun.com>
16470
16471 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
16472 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
16473 Sparc, as they were causing more porting problems than the
16474 (minor) performance improvement was worth.
16475
16476 Also, catch up with 1.31's YYSTD.
16477
3db472b9
AD
164782001-12-27 Akim Demaille <akim@epita.fr>
16479
16480 * src/output.c (output_gram): Rely on nritems, not the
16481 0-sentinel. See below.
16482 Use -1 as separator, not 0.
16483 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
16484 Rely on -1 as separator in yyrhs, instead of 0.
16485 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
16486 twice `Now at end of input', therefore there are two lines less to
16487 expect.
16488
b365aa05
AD
164892001-12-27 Akim Demaille <akim@epita.fr>
16490
16491 * tests/regression.at (Unresolved SR Conflicts):
16492 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
16493 below.
16494
30171f79
AD
164952001-12-27 Akim Demaille <akim@epita.fr>
16496
16497 * src/LR0.c (new_state): Recognize the final state by the fact it
16498 is reached by eoftoken.
16499 (insert_start_shifting_state, insert_eof_shifting_state)
16500 (insert_accepting_state, augment_automaton): Remove, since now
16501 these states are automatically computed from the initial state.
16502 (generate_states): Adjust.
16503 * src/print.c: When reporting a rule number to the user, substract
16504 1, so that the axiom rule is rule 0, and the first user rule is 1.
16505 * src/reduce.c: Likewise.
16506 * src/print_graph.c (print_core): For the time being, just as for
16507 the report, depend upon --trace-flags to dump the full set of
16508 items.
16509 * src/reader.c (readgram): Once the grammar read, insert the rule
16510 0: `$axiom: START-SYMBOL $'.
16511 * tests/set.at: Adjust: rule 0 is now displayed, and since the
16512 number of the states has changed (the final state is no longer
16513 necessarily the last), catch up.
16514
75142d45
AD
165152001-12-27 Akim Demaille <akim@epita.fr>
16516
16517 Try to make the use of the eoftoken valid. Given that its value
16518 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
16519 is used instead of > 0 where appropriate, (ii), depend upon nritems
16520 instead of the 0-sentinel.
16521
16522 * src/gram.h, src/gram.c (nritems): New.
16523 Expected to be duplication of nitems, but for the time being...
16524 * src/reader.c (packgram): Assert nritems and nitems are equal.
16525 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
16526 * src/closure.c (print_closure, print_fderives): Likewise.
16527 * src/gram.c (ritem_print): Likewise.
16528 * src/print.c (print_core, print_grammar): Likewise.
16529 * src/print_graph.c: Likewise.
16530
b7c49edf
AD
165312001-12-27 Akim Demaille <akim@epita.fr>
16532
16533 * src/main.c (main): If there are complains after grammar
16534 reductions, then output the report anyway if requested, then die.
16535 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
16536 * src/reader.c (eoftoken): New.
16537 (parse_token_decl): If the token being defined has value `0', it
16538 is the eoftoken.
16539 (packsymbols): No longer hack `tags' to insert `$' by hand.
16540 Be sure to preserve the value of the eoftoken.
16541 (reader): Make sure eoftoken is defined.
16542 Initialize nsyms to 0: now eoftoken is created just like the others.
16543 * src/print.c (print_grammar): Don't special case the eof token.
16544 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
16545 lie anyway, albeit pleasant.
16546 * tests/calc.at: Exercise error messages with eoftoken.
16547 Change the grammar so that empty input is invalid.
16548 Adjust expectations.
16549 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
16550
ec2da99f
AD
165512001-12-27 Akim Demaille <akim@epita.fr>
16552
16553 * configure.in: Check the protos of strchr ans strspn.
16554 Replace strchr if needed.
16555 * src/system.h: Provide the protos of strchr, strspn and memchr if
16556 missing.
16557 * lib/strchr.c: New.
16558 * src/reader.c (symbols_save): Use strchr.
16559
8adfa272
AD
165602001-12-27 Akim Demaille <akim@epita.fr>
16561
16562 * src/print.c, src/print_graph.c (escape): New.
16563 Use it to quote the TAGS outputs.
16564 * src/print_graph.c (print_state): Now errors are in red, and
16565 reductions in green.
16566 Prefer high to wide: output the state number on a line of its own.
16567
80dac38c
AD
165682001-12-27 Akim Demaille <akim@epita.fr>
16569
16570 * src/state.h, src/state.c (reductions_new): New.
16571 * src/LR0.c (set_state_table): Let all the states have a
16572 `reductions', even if reduced to 0.
16573 (save_reductions): Adjust.
16574 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
16575 * src/print.c (print_reductions, print_actions): Adjust.
16576 * src/output.c (action_row): Adjust.
16577
2cec70b9
AD
165782001-12-27 Akim Demaille <akim@epita.fr>
16579
16580 * src/state.h, src/state.c (errs_new, errs_dup): New.
16581 * src/LR0.c (set_state_table): Let all the states have an errs,
16582 even if reduced to 0.
16583 * src/print.c (print_errs, print_reductions): Adjust.
16584 * src/output.c (output_actions, action_row): Adjust.
16585 * src/conflicts.c (resolve_sr_conflict): Adjust.
16586
13ca549a
AD
165872001-12-27 Akim Demaille <akim@epita.fr>
16588
16589 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
16590
5092aba5
AD
165912001-12-27 Akim Demaille <akim@epita.fr>
16592
16593 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
16594 * src/print.c: here.
16595 (lookaheadset, shiftset): New, used as additional storage by
16596 print_reductions.
16597 (print_results): Adjust.
16598 (print_shifts, print_gotos, print_errs): New, extracted from...
16599 (print_actions): here.
16600 * src/print_graph.c (print_actions): Remove dead code.
16601
11e2beca
AD
166022001-12-27 Akim Demaille <akim@epita.fr>
16603
16604 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
16605 `$n' and `@n'.
16606
dac3c910
AD
166072001-12-27 Akim Demaille <akim@epita.fr>
16608
16609 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
16610 (build_relations): Adjust.
16611
d0b0fefa
AD
166122001-12-27 Akim Demaille <akim@epita.fr>
16613
16614 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
16615 duplication.
16616
adc8c848
AD
166172001-12-27 Akim Demaille <akim@epita.fr>
16618
16619 * src/reader.c (packgram): Catch nitems overflows.
16620
14d293ac
AD
166212001-12-27 Akim Demaille <akim@epita.fr>
16622
16623 * src/files.c, src/files.h (guard_obstack): Remove.
16624 * src/output.c (output): Adjust.
16625 * src/reader.c (parse_braces): New, factoring...
16626 (copy_action, copy_guard): these two which are renamed as...
16627 (parse_action, parse_guard): these.
16628 As a voluntary consequence, using braces around guards is now
16629 mandatory.
16630
f499b062
AD
166312001-12-27 Akim Demaille <akim@epita.fr>
16632
16633 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
16634 * src/reader.c (symbol_list): `guard' and `guard_line' are new
16635 members.
16636 (symbol_list_new): Adjust.
16637 (copy_action): action_line is the first line, not the last.
16638 (copy_guard): Just as for actions, store the `action' only, not
16639 the switch/case/break flesh.
16640 Don't parse the user action that might follow the guard, let...
16641 (readgram): do it, i.e., now, there can be an action after a
16642 guard.
16643 In other words the guard is just explicitly optional.
16644 (packgram): Adjust.
16645 * src/output.c (guards_output): New.
16646 (output_parser): Call it when needed.
16647 (output): Also free the guard and attrs obstacks.
16648 * src/files.c, src/files.h (obstack_save): Remove.
16649 (output_files): Remove.
16650 As a result, if one needs the former `.act' file, using an
16651 appropriate skeleton which requires actions and guards is now
16652 required.
16653 * src/main.c (main): Adjust.
16654 * tests/semantic.at: New.
16655 * tests/regression.at: Use `input.y' as input file name.
16656 Avoid 8+3 problems by requiring input.c when the test needs the
16657 parser.
16658
d945f5cd
AD
166592001-12-27 Akim Demaille <akim@epita.fr>
16660
16661 * src/reader.c (symbol_list_new): Be sure to initialize all the
16662 fields.
16663
d200e455
AD
166642001-12-27 Akim Demaille <akim@epita.fr>
16665
16666 All the hacks using a final pseudo state are now useless.
16667
16668 * src/LR0.c (set_state_table): state_table holds exactly nstates.
16669 * src/lalr.c (nLA): New.
16670 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
16671 instead of lookaheadsp from the pseudo state (nstate + 1).
16672
f9507c28
AD
166732001-12-27 Akim Demaille <akim@epita.fr>
16674
16675 * src/output.c (action_row, token_actions): Use a state_t instead
16676 of a integer, and nlookaheads instead of the following state's
16677 lookaheadsp.
16678
065fbd27
AD
166792001-12-27 Akim Demaille <akim@epita.fr>
16680
16681 * src/conflicts.c (log_resolution, flush_shift)
16682 (resolve_sr_conflict, set_conflicts, solve_conflicts)
16683 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
16684 (conflicts_print, print_reductions): Use a state_t instead of an
16685 integer when referring to a state.
16686 As much as possible, depend upon nlookaheads, instead of the
16687 `lookaheadsp' member of the following state (since lookaheads of
16688 successive states are successive, the difference between state n + 1
16689 and n served as the number of lookaheads for state n).
16690 * src/lalr.c (add_lookback_edge): Likewise.
16691 * src/print.c (print_core, print_actions, print_state)
16692 (print_results): Likewise.
16693 * src/print_graph.c (print_core, print_actions, print_state)
16694 (print_graph): Likewise.
16695 * src/conflicts.h: Adjust.
16696
1b177bd7
AD
166972001-12-27 Akim Demaille <akim@epita.fr>
16698
16699 * src/bison.hairy: Formatting/comment changes.
16700 ANSIfy.
16701 Remove `register' indications.
16702 Add plenty of `static'.
16703
7742ddeb
AD
167042001-12-27 Akim Demaille <akim@epita.fr>
16705
16706 * src/output.c (prepare): Drop the muscle `ntbase' which
16707 duplicates ntokens.
16708 * src/bison.simple: Formatting/comment changes.
16709 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
16710 is an undocumented synonym.
16711
1fa14068
AD
167122001-12-22 Akim Demaille <akim@epita.fr>
16713
16714 * src/output.c (output_table_data): Change the prototype to use
16715 `int' for array ranges: some invocations do pass an int, not a
16716 short.
16717 Reported by Wayne Green.
16718
b9752825
AD
167192001-12-22 Akim Demaille <akim@epita.fr>
16720
16721 Some actions of web2c.y are improperly triggered.
16722 Reported by Mike Castle.
16723
16724 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
16725 * tests/regression.at (Web2c): Rename as...
16726 (Web2c Report): this.
16727 (Web2c Actions): New.
16728
776209d6
AD
167292001-12-22 Akim Demaille <akim@epita.fr>
16730
16731 Reductions in web2c.y are improperly reported.
16732 Reported by Mike Castle.
16733
16734 * src/conflicts.c (print_reductions): Fix.
16735 * tests/regression.at (Web2c): New.
16736
275fc3ad
AD
167372001-12-18 Akim Demaille <akim@epita.fr>
16738
16739 Some host fail on `assert (!"foo")', which expands to
16740 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
16741 Reported by Nelson Beebee.
16742
16743 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
16744 `#define it_succeeded 0' and `assert (it_succeeded)'.
16745
897668ee
MA
167462001-12-17 Marc Autret <autret_m@epita.fr>
16747
16748 * src/bison.simple: Don't hard code the skeleton line and filename.
16749 * src/output.c (output_parser): Rename 'line' as 'output_line'.
16750 New line counter 'skeleton_line' (skeleton-line muscle).
16751
ab3399e0
PE
167522001-12-17 Paul Eggert <eggert@twinsun.com>
16753
16754 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
16755 YYDEBUG must be defined to a nonzero value.
16756
16757 * src/bison.simple (yytname): Do not assume that the user defines
16758 YYDEBUG to a properly parenthesized expression.
16759
3877f72b
AD
167602001-12-17 Akim Demaille <akim@epita.fr>
16761
16762 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
16763 nlookaheads is a new member.
16764 Adjust all users.
16765 * src/lalr.h (nlookaheads): Remove this orphan declaration.
16766 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
16767 state.
776209d6 16768
331dbc1b
AD
167692001-12-17 Akim Demaille <akim@epita.fr>
16770
16771 * src/files.h, src/files.c (open_files, close_files): Remove.
16772 * src/main.c (main): Don't open/close files, nor invoke lex_free,
16773 let...
16774 * src/reader.c (reader): Do it.
776209d6 16775
be750e4c
AD
167762001-12-17 Akim Demaille <akim@epita.fr>
16777
16778 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 16779
709ae8c6
AD
167802001-12-17 Akim Demaille <akim@epita.fr>
16781
16782 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
16783 (flush_reduce): New.
16784 (resolve_sr_conflict): Adjust.
776209d6 16785
f87685c3
AD
167862001-12-17 Akim Demaille <akim@epita.fr>
16787
16788 * src/output.c (output_obstack): Be static and rename as...
16789 (format_obstack): this, to avoid any confusion with files.c's
16790 output_obstack.
16791 * src/reader.h (muscle_obstack): Move to...
16792 * src/output.h: here, since it's defined in output.c.
16793
837491d8
AD
167942001-12-17 Akim Demaille <akim@epita.fr>
16795
16796 * src/output.c (action_row, save_column, default_goto)
16797 (sort_actions, matching_state, pack_vector): Better variable
16798 locality.
16799
796d61fb
AD
168002001-12-17 Akim Demaille <akim@epita.fr>
16801
16802 * src/output.c: Various formatting changes.
776209d6 16803
64d15509
AD
168042001-12-17 Akim Demaille <akim@epita.fr>
16805
16806 * src/files.c (output_files): Free the output_obstack.
16807 * src/main.c (main): Call print and print_graph conditionally.
16808 * src/print.c (print): Work unconditionally.
16809 * src/print_graph.c (print_graph): Work unconditionally.
16810 * src/conflicts.c (log_resolution): Output only if verbose_flag.
16811
fbc8ecb7
MA
168122001-12-16 Marc Autret <autret_m@epita.fr>
16813
16814 * src/output.c (actions_output): Fix. When we use %no-lines,
16815 there is one less line per action.
16816
f0440388
MA
168172001-12-16 Marc Autret <autret_m@epita.fr>
16818
16819 * src/bison.simple: Remove a useless #line directive.
16820 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
16821 * src/output.c (get_lines_number): New.
776209d6 16822 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
16823 output muscles.
16824 Fix line numbering.
16825 (actions_output): Computes the number of lines taken by actions.
16826 (output_master_parser): Insert new skeleton which is the name of
16827 the output parser file name.
16828
a79986b8
MA
168292001-12-15 Marc Autret <autret_m@epita.fr>
16830
16831 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
16832
4ec8e00f
MA
168332001-12-15 Marc Autret <autret_m@epita.fr>
16834
16835 * src/output.c (output_gram): Keep track of the hairy one.
16836
1a4648ff
AD
168372001-12-15 Akim Demaille <akim@epita.fr>
16838
16839 Make `make distcheck' work.
16840
16841 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
16842 system.h which uses libgettext.h.
16843
9c2c67e6
AD
168442001-12-15 Akim Demaille <akim@epita.fr>
16845
16846 * src/nullable.c (set_nullable): Useless rules must be skipped,
16847 otherwise, since we range over their symbols, we might look at a
16848 nonterminal which no longer ``exists'', i.e., it is not counted in
16849 `nvars', hence we overflow our arrays.
16850
93ede233
AD
168512001-12-15 Akim Demaille <akim@epita.fr>
16852
16853 The header can also be produced directly, without any obstack!
16854 Yahoo!
16855
16856 * src/files.c, src/files.h (defines_obstack): Remove.
16857 (compute_header_macro): Global.
16858 (defines_obstack_save): Remove.
16859 * src/reader.c (parse_union_decl): No longer output to
16860 defines_obstack: its content can be found in the `stype' muscle
16861 anyway.
16862 (output_token_translations): Merge into...
16863 (symbols_output): this.
16864 Rename as...
16865 (symbols_save): this.
16866 (reader): Adjust.
16867 * src/output.c (header_output): New.
16868 (output): Call it.
16869
2666f928
AD
168702001-12-15 Akim Demaille <akim@epita.fr>
16871
16872 * src/reader.c (parse_union_decl): Instead of handling two obstack
16873 simultaneously, use one to define the `stype' muscle, and use the
16874 value of the latter to fill defines_obstack.
16875 (copy_comment): Remove.
16876 (copy_comment2): Work for a single obstack.
16877 Rename as...
16878 (copy_comment): this.
16879
428046f8
AD
168802001-12-15 Akim Demaille <akim@epita.fr>
16881
16882 * src/lex.c, src/lex.h (xgetc): No longer static.
16883 * src/reader.c (parse_union_decl): Revamp.
16884
ea52d706
AD
168852001-12-15 Akim Demaille <akim@epita.fr>
16886
16887 Still making progress in separating Bison into (i) input, (ii)
16888 process, (iii) output: now we can directly output the parser file
16889 without using table_obstack at all.
16890
16891 * src/files.c, src/files.h (table_obstack): Bye bye.
16892 (parser_file_name): New.
16893 * src/files.c (compute_output_file_names): Compute it.
16894 * src/output.c (actions_output, output_parser)
16895 (output_master_parser): To a file instead of an obstack.
16896
3f96f4dc
AD
168972001-12-15 Akim Demaille <akim@epita.fr>
16898
16899 Attach actions to rules, instead of pre-outputting them to
16900 actions_obstack.
16901
16902 * src/gram.h (rule_t): action and action_line are new members.
16903 * src/reader.c (symbol_list): Likewise.
16904 (copy_action): Save the actions within the rule.
16905 (packgram): Save them in rule_table.
16906 * src/output.c (actions_output): New.
16907 (output_parser): Use it on `%%actions'.
16908 (output_rule_data): Don't free rule_table.
16909 (output): Do it.
16910 (prepare): Don't save the `action' muscle.
16911 * src/bison.simple: s/%%action/%%actions/.
16912
51576fb3
AD
169132001-12-15 Akim Demaille <akim@epita.fr>
16914
16915 * src/reader.c (copy_action): When --yacc, don't append a `;'
16916 to the user action: let it fail if lacking.
dee049eb 16917 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 16918
2648a72d
AD
169192001-12-14 Akim Demaille <akim@epita.fr>
16920
16921 * src/lex.c (literalchar): Simply return the char you decoded, non
16922 longer mess around with obstacks and int pointers.
16923 Adjust all callers.
16924
92790e5b
AD
169252001-12-14 Akim Demaille <akim@epita.fr>
16926
16927 * src/lex.c (literalchar): Don't escape the special characters,
16928 just decode them, and keep them as char (before, eol was output as
16929 the 2 char string `\n' etc.).
16930 * src/output.c (output_rule_data): Use quotearg to output the
16931 token strings.
16932
927c1557
PE
169332001-12-13 Paul Eggert <eggert@twinsun.com>
16934
16935 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
16936 Do not infringe on the global user namespace when using C++.
16937 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
16938 All uses of `fprintf' and `stderr' changed.
16939
16940 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
16941
ed8e1f68
AD
169422001-12-13 Akim Demaille <akim@epita.fr>
16943
16944 The computation of nullable is broken: it doesn't handle empty
16945 RHS's properly.
16946
16947 * tests/torture.at (GNU AWK Grammar): New.
16948 * tests/sets.at (Nullable): New.
16949 * src/nullable.c (set_nullable): Instead of blindly looping over
16950 `ritems', loop over the rules, and then over their rhs's.
16951
16952 Work around Autotest bugs.
16953
16954 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
16955 frame, because Autotest understand lines starting with a `+' as
16956 traces from the shell. Then, they are not processed properly.
16957 Admittedly an Autotest bug, but we don't have time to wait for
16958 Autotest to catch up.
16959 * tests/regression.at (Broken Closure): Adjust to the new table
16960 frames.
16961 Move to...
16962 * tests/sets.at: here.
16963
cb581495
AD
169642001-12-13 Akim Demaille <akim@epita.fr>
16965
16966 * src/closure.c (closure): Use nrules instead of playing tricks
16967 with BITS_PER_WORD.
16968
2e729273
AD
169692001-12-13 Akim Demaille <akim@epita.fr>
16970
16971 * src/print.c (print_actions): Output the handling of `$' as the
16972 traces do: shifting the token EOF. Before EOF was treated as a
16973 nonterminal.
16974 * tests/regression.at: Adjust some tests.
16975 * src/print_graph.c (print_core): Complete the set of items via
16976 closure. The next-to-final and final states are still unsatisfying,
16977 but that's to be addressed elsewhere.
16978 No longer output the rule numbers, but do output the state number.
16979 A single loop for the shifts + gotos is enough, but picked a
16980 distinct color for each.
16981 (print_graph): Initialize and finalize closure.
16982
107f7dfb
AD
169832001-12-13 Akim Demaille <akim@epita.fr>
16984
16985 * src/reader.c (readgram): Remove dead code, an strip useless
16986 braces.
16987 (get_type): Remove, unused.
16988
9b53a24f
AD
169892001-12-12 Akim Demaille <akim@epita.fr>
16990
16991 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
16992 on that of lib/error.c.
16993
dbfb6dcd
AD
169942001-12-12 Akim Demaille <akim@epita.fr>
16995
16996 Some hosts don't like `/' in includes.
16997
16998 * src/system.h: Include libgettext.h without qualifying the path.
16999 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
17000 $(top_srcdir).
17001
c25fb648
MA
170022001-12-11 Marc Autret <autret_m@epita.fr>
17003
17004 * src/output.c (output_parser): Remove useless muscle.
17005
710ddc4f
MA
170062001-12-11 Marc Autret <autret_m@epita.fr>
17007
17008 * src/bison.simple: Remove #line just before %%epilogue. It
17009 is now handled in ...
17010 * src/reader.c (read_additionnal_code): Add the output of a
17011 #line for the epilogue.
17012
e83d80b8
MA
170132001-12-10 Marc Autret <autret_m@epita.fr>
17014
927c1557 17015 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
17016 replace precedent remove.
17017 * src/bison.simple: Remove #line before %%prologue because
17018 %%input-line is wrong at this time.
17019
971d5158
MA
170202001-12-10 Marc Autret <autret_m@epita.fr>
17021
17022 * src/reader.c (symbols_output): Clean up.
927c1557 17023 * src/output.c (output_gram, output): Clean up.
971d5158 17024
5edafffd
AD
170252001-12-10 Akim Demaille <akim@epita.fr>
17026
17027 * src/lalr.c (initialize_lookaheads): New. Extracted from...
17028 * src/LR0.c (set_state_table): here.
17029 * src/lalr.c (lalr): Call it.
17030
0279f8e9
AD
170312001-12-10 Akim Demaille <akim@epita.fr>
17032
17033 * src/state.h (shifts): Remove the `number' member: shifts are
17034 attached to state, hence no longer need to be labelled with a
17035 state number.
17036
190c4f5f
AD
170372001-12-10 Akim Demaille <akim@epita.fr>
17038
17039 Now that states have a complete set of members, the linked list of
17040 shifts is useless: just fill directly the state's shifts member.
17041
17042 * src/state.h (shifts): Remove the `next' member.
17043 * src/LR0.c (first_state, last_state): Remove.
17044 Adjust the callers.
17045 (augment_automaton): Don't look for the shifts that must be added
17046 a shift on EOF: it is those of the state we looked for! But now,
17047 since shifts are attached, it is no longer needed to looking
17048 merely by its id: its number.
17049
2a73b93d
AD
170502001-12-10 Akim Demaille <akim@epita.fr>
17051
17052 * src/LR0.c (augment_automaton): Better variable locality.
17053 Remove an impossible branch: if there is a state corresponding to
17054 the start symbol being shifted, then there is shift for the start
17055 symbol from the initial state.
17056
74392f6a
AD
170572001-12-10 Akim Demaille <akim@epita.fr>
17058
17059 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
17060 only when appropriate: when insert_start_shifting_state' is not
17061 invoked.
17062 * tests/regression.at (Rule Line Numbers): Adjust.
17063
37c82725
AD
170642001-12-10 Akim Demaille <akim@epita.fr>
17065
17066 * src/LR0.c (augment_automaton): Now that all states have shifts,
17067 merge the two cases addition shifts to the initial state.
17068
6a164e0c
AD
170692001-12-10 Akim Demaille <akim@epita.fr>
17070
17071 * src/lalr.c (set_state_table): Move to...
17072 * src/LR0.c: here.
17073 * src/lalr.c (lalr): Don't call it...
17074 * src/LR0.c (generate_states): do it.
17075 * src/LR0.h (first_state): Remove, only the table is used.
17076
7215de24
AD
170772001-12-10 Akim Demaille <akim@epita.fr>
17078
17079 * src/LR0.h (first_shift, first_reduction): Remove.
17080 * src/lalr.c: Don't use first_shift: find shifts through the
17081 states.
17082
80e25d4d
AD
170832001-12-10 Akim Demaille <akim@epita.fr>
17084
17085 * src/LR0.c: Attach shifts to states as soon as they are
17086 computed.
17087 * src/lalr.c (set_state_table): Instead of assigning shifts to
17088 state, just assert that the mapping was properly done.
17089
0ab3728b
AD
170902001-12-10 Akim Demaille <akim@epita.fr>
17091
17092 * src/LR0.c (insert_start_shift): Rename as...
17093 (insert_start_shifting_state): this.
17094 (insert_eof_shifting_state, insert_accepting_state): New.
17095 (augment_automaton): Adjust.
17096 Better locality of the variables.
17097 When looking if the start_symbol is shifted from the initial
17098 state, using `while (... symbol != start_symbol ...)' sounds
17099 better than `while (... symbol < start_symbol ...)': If fail
17100 to see how the order between symbols could be relevant!
17101
78af9bbc
AD
171022001-12-10 Akim Demaille <akim@epita.fr>
17103
17104 * src/getargs.h: Don't declare `spec_name_prefix' and
17105 `spec_file_prefix', declared by src/files.h.
17106 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
17107 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
17108 * src/output.c (prepare): Adjust.
17109 * src/reader.c (symbols_output): Likewise.
17110 * src/vmsgetargs.c: Vaguely adjust, but who cares?
17111
bdef2a41
AD
171122001-12-10 Akim Demaille <akim@epita.fr>
17113
17114 * src/muscle_tab.c (muscle_init): NULL is a better default than
17115 `"0"'.
17116
3735969c
AD
171172001-12-10 Akim Demaille <akim@epita.fr>
17118
17119 * src/reader.c (reader): Calling symbols_output once is enough.
17120
49701457
AD
171212001-12-10 Akim Demaille <akim@epita.fr>
17122
17123 Now that states have a complete set of members, the linked list of
17124 reductions is useless: just fill directly the state's reductions
17125 member.
17126
17127 * src/state.h (struct reductions): Remove member `number' and
17128 `next'.
17129 * src/LR0.c (first_reduction, last_reduction): Remove.
17130 (save_reductions): Don't link the new reductions, store them in
17131 this_state.
17132 * src/lalr.c (set_state_table): No need to attach reductions to
17133 states, it's already done.
17134 * src/output.c (output_actions): No longer free the shifts, then
17135 the reductions, then the states: free all the states and their
17136 members.
17137
0edad749
AD
171382001-12-10 Akim Demaille <akim@epita.fr>
17139
17140 * src/options.c (OPTN, DRTV, BOTH): New.
17141 (option_table): Use them.
17142
0edad749
AD
17143 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
17144 the job of system.h.
17145 * src/options.c: Don't include stdio.h and xalloc.h for the same
17146 reasons.
17147
5449dd0f
AD
171482001-12-10 Akim Demaille <akim@epita.fr>
17149
17150 * src/output.c (output, prepare): Make sure the values of the
17151 muscles `action' and `prologue' are 0-terminated.
17152
a870c567
AD
171532001-12-10 Akim Demaille <akim@epita.fr>
17154
17155 Clean up GCC warnings.
17156
17157 * src/reader.c (copy_action): `buf' is not used.
17158 (parse_skel_decl): Be static.
17159 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
17160 * src/options.h (create_long_option_table): Have a real prototype.
17161 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
17162 (hash_delete_at): Return const void *.
17163 Adjust casts to preserve the const.
17164
80df8768
AD
171652001-12-10 Akim Demaille <akim@epita.fr>
17166
17167 * configure.in: Require 2.52g.
17168 M4 is not needed, but AUTOM4TE is.
17169 * m4/m4.m4: Remove.
17170 * tests/Makefile.am: Adjust.
17171
f693ad14
AD
171722001-12-10 Akim Demaille <akim@epita.fr>
17173
17174 One structure for states is enough, even though theoretically
17175 there are LR(0) states and LALR(1) states.
17176
17177 * src/lalr.h (state_t): Remove.
17178 (state_table): Be state_t **, not state_t *.
17179 * src/state.h (core, CORE_ALLOC): Rename as...
17180 (state_t, STATE_ALLOC): this.
17181 Add the LALR(1) members: shifts, reductions, errs.
17182 * src/LR0.c (state_table): Rename as...
17183 (state_hash): this, to avoid name clashes with the global
17184 `state_table'.
17185 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
17186 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
17187
74ffbcb6
AD
171882001-12-10 Akim Demaille <akim@epita.fr>
17189
17190 Bison dumps core on bash.y.
17191 Reported by Pascal Bart.
17192
17193 * src/warshall.c (bitmatrix_print): New.
17194 (TC): Use it.
ba0fe3c7 17195 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
17196 j must be the outer loop.
17197 * tests/regression.at (Broken Closure): New.
17198
07708e19
AD
171992001-12-05 Akim Demaille <akim@epita.fr>
17200
17201 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
17202 its argument.
ba1ecc07 17203 Reported by Peter Hamorsky.
07708e19 17204
92b16366
AD
172052001-12-05 Akim Demaille <akim@epita.fr>
17206
17207 * src/conflicts.c (err_table): Remove.
17208 (resolve_sr_conflict): Adjust.
17209 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
17210 Rename as...
17211 (state_t.reductions, state_t.shifts): this.
17212
076ab033
AD
172132001-12-05 Akim Demaille <akim@epita.fr>
17214
17215 * src/reduce.c (reduce_grammar_tables): No longer disable the
17216 removal of useless rules via CPP but via `if (0)', so that the
17217 compiler still check the code is valid.
17218 For instance, it should have noticed `rline' no longer exists: use
17219 the `line' member of rule_t.
17220 * src/gram.c (dummy, rline): Remove, unused.
17221
3843c413
AD
172222001-12-05 Akim Demaille <akim@epita.fr>
17223
17224 * src/output.c (pack_vector): Use assert, not berror.
17225 * src/main.c (berror): Remove, unused.
17226
43168960
AD
172272001-12-05 Akim Demaille <akim@epita.fr>
17228
17229 New experimental feature: if --verbose --trace output all the
17230 items of a state, not only its kernel.
17231
17232 * src/print.c (print_core): If `trace_flag', then invoke closure
17233 before outputting the items of the state (print_core is no longer
17234 a correct name them).
17235 (print_results): Invoke new_closure/free_closure if needed.
17236
b2872512
AD
172372001-12-05 Akim Demaille <akim@epita.fr>
17238
17239 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
17240 * src/closure.c, src/closure.h (itemsetsize): Rename as...
17241 (nitemset): for consistency with the rest of the project.
17242
23cbcc6c
AD
172432001-12-05 Akim Demaille <akim@epita.fr>
17244
17245 * src/closure.c (print_closure): Improve.
17246 (closure): Use it for printing input and output.
17247
03ec521c
AD
172482001-12-05 Akim Demaille <akim@epita.fr>
17249
17250 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
17251 indexed by nonterminals.
17252
3a7456dd
AD
172532001-12-05 Akim Demaille <akim@epita.fr>
17254
17255 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
17256 what it was!).
17257 * src/warshall.h: Remove accidental duplication of the content.
17258
1cbcf2e7
AD
172592001-12-05 Akim Demaille <akim@epita.fr>
17260
17261 * src/closure.c (set_fderives): De-obfuscate.
17262
84182270
AD
172632001-12-05 Akim Demaille <akim@epita.fr>
17264
17265 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
17266
3f6f053c
AD
172672001-12-05 Akim Demaille <akim@epita.fr>
17268
17269 * src/closure.c (set_firsts): De-obfuscate.
17270
7a5350ba
AD
172712001-12-05 Akim Demaille <akim@epita.fr>
17272
17273 * src/output.c (action_row): De-obfuscate
17274 using the good o' techniques: arrays not pointers, variable
17275 locality, BITISSET, RESETBIT etc.
17276
d954473d
AD
172772001-12-05 Akim Demaille <akim@epita.fr>
17278
17279 Pessimize the code to simplify it: from now on, all the states
17280 have a valid SHIFTS, which NSHIFTS is possibly 0.
17281
17282 * src/LR0.c (shifts_new): Be global and move to..
17283 * src/state.c, src/state.h: here.
17284 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
17285 * src/print_graph: Adjust.
17286
9839bbe5
AD
172872001-12-05 Akim Demaille <akim@epita.fr>
17288
17289 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
17290 * src/conflicts.c: Use it.
17291 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
17292 incorrectly ``simplified''.
17293
9f136c07
AD
172942001-12-05 Akim Demaille <akim@epita.fr>
17295
17296 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
17297 using the good o' techniques: arrays not pointers, variable
17298 locality, BITISSET, RESETBIT etc.
17299
b608206e
AD
173002001-12-05 Akim Demaille <akim@epita.fr>
17301
17302 * src/state.h (SHIFT_SYMBOL): New.
17303 * src/conflicts.c: Use it to deobfuscate.
17304
52afa962
AD
173052001-12-05 Akim Demaille <akim@epita.fr>
17306
17307 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
17308 (print_reductions): De-obfuscate using the good o' techniques:
17309 arrays not pointers, variable locality, BITISSET.
17310
e74dc321
AD
173112001-12-05 Akim Demaille <akim@epita.fr>
17312
17313 * src/conflicts.c (print_reductions): Arrays, not pointers.
17314 Use BITISSET.
17315
768fca83
AD
173162001-12-05 Akim Demaille <akim@epita.fr>
17317
17318 * src/conflicts.c (print_reductions): Pessimize, but clarify.
17319
a17e599f
AD
173202001-12-05 Akim Demaille <akim@epita.fr>
17321
17322 * src/conflicts.c (print_reductions): Improve variable locality.
17323
a04bc341
AD
173242001-12-05 Akim Demaille <akim@epita.fr>
17325
17326 * src/conflicts.c (print_reductions): Pessimize, but clarify.
17327
c8ea038e
AD
173282001-12-05 Akim Demaille <akim@epita.fr>
17329
17330 * src/conflicts.c (print_reductions): Improve variable locality.
17331
aa2aab3c
AD
173322001-12-05 Akim Demaille <akim@epita.fr>
17333
17334 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
17335 * src/lalr.c: Use them.
17336
b178c8cc
AD
173372001-12-05 Akim Demaille <akim@epita.fr>
17338
17339 * src/LR0.c (augment_automaton): Formatting changes.
17340 Better variable locality.
17341
f67d13aa
AD
173422001-12-05 Akim Demaille <akim@epita.fr>
17343
17344 * src/lalr.c (matrix_print): New.
17345 (transpose): Use it.
17346 Use arrays instead of pointers.
17347
c2713865
AD
173482001-12-05 Akim Demaille <akim@epita.fr>
17349
17350 * src/lalr.c (maxrhs): Move to...
17351 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
17352 * src/lalr.c (build_relations): Adjust.
17353
9887c18a
AD
173542001-12-05 Akim Demaille <akim@epita.fr>
17355
17356 * src/lalr.c (transpose): Free the memory allocated to the
17357 argument, as it is replaced by the results by the unique caller.
17358 (build_relations): Merely invoke transpose: it handles the memory
17359 deallocation.
17360 Improve variable locality.
17361 Avoid variables used as mere abbreviations.
17362 (compute_lookaheads): Use arrays instead of pointers.
17363
4d4f699c
AD
173642001-12-05 Akim Demaille <akim@epita.fr>
17365
17366 * src/lalr.c (initialize_F): Improve variable locality.
17367 Avoid variables used as mere abbreviations.
17368
80a69750
AD
173692001-12-05 Akim Demaille <akim@epita.fr>
17370
17371 * src/derives.c (print_derives): Display the ruleno.
17372 * src/lalr.c (initialize_F, transpose): Better variable locality
17373 to improve readability.
17374 Avoid variables used as mere abbreviations.
17375
fe961097
AD
173762001-12-05 Akim Demaille <akim@epita.fr>
17377
17378 * src/lalr.c (traverse): Use arrays instead of pointers.
17379
e3e4e814
AD
173802001-12-05 Akim Demaille <akim@epita.fr>
17381
17382 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
17383 the handling of squeue.
17384 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
17385
630e182b
AD
173862001-12-05 Akim Demaille <akim@epita.fr>
17387
17388 Because useless nonterminals are now kept alive (instead of being
17389 `destroyed'), we now sometimes examine them, and store information
17390 related to them. Hence we need to know their number, and adjust
17391 memory allocations.
17392
17393 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
17394 static.
17395 * src/LR0.c (allocate_itemsets): The memory allocated to
17396 `symbol_count' was used for two different purpose: once to count
17397 the number of occurrences of each symbol, and later reassigned to
17398 `shift_symbol', containing the symbol that can be shifted from a
17399 given state.
17400 Deobfuscate, i.e., allocate, use and free `symbol_count' here
17401 only, and...
17402 (new_itemsets): Allocate `shift_symbol' here.
17403 (allocate_itemsets): symbol_count includes useless nonterminals.
17404 Make room for them.
17405 (free_storage): Use `free', not `XFREE', for pointers that cannot
17406 be null.
17407
81b51460
AD
174082001-12-05 Akim Demaille <akim@epita.fr>
17409
17410 * src/nullable.c (set_nullable): Deobfuscate the handling of
17411 ritem.
17412 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
17413
3067fbef
AD
174142001-12-05 Akim Demaille <akim@epita.fr>
17415
17416 * src/gram.c, src/gram.h (ritem_print): New.
17417 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
17418 (This useless function was defined only to work around VMS linkers
17419 that can't handle compilation units with variables only).
17420 * src/reduce.c (dump_grammar): Use it to trace the construction of
17421 ritem.
17422
c2bea5f9
PE
174232001-12-04 Paul Eggert <eggert@twinsun.com>
17424
7d27c823
PE
17425 * src/bison.simple (union yyalloc): Change member names
17426 to be the same as the stack names.
17427 (yyparse): yyptr is now union yyalloc *, not char *.
17428 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
17429 and may generate better code on some machines.
c2bea5f9
PE
17430 (yystpcpy): Use prototype if __STDC__ is defined, not just
17431 if __cplusplus is defined.
35687a9d 17432
2c8a9dfa
AD
174332001-11-30 Akim Demaille <akim@epita.fr>
17434
17435 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
17436 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
17437 Gettext doesn't compile cleanly, and dies with -Werror.
17438 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
17439 Include WARNING_CFLAGS here.
17440 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
17441 before being defined.
17442
f4e421e6
AD
174432001-11-27 Paul Eggert <eggert@twinsun.com>
17444
17445 * lib/quotearg.h (quotearg_n, quotearg_n_style):
17446 First arg is int, not unsigned.
17447 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
17448 (SIZE_MAX, UINT_MAX): New macros.
17449 (quotearg_n_options): Abort if N is negative.
17450 Avoid overflow check on hosts where size_t is 64 bits and int
17451 is 32 bits, as overflow is impossible there.
17452 Fix off-by-one typo that caused unnecessary reallocation.
17453
7093d0f5
AD
174542001-11-29 Paul Eggert <eggert@twinsun.com>
17455
17456 Name space cleanup in generated parser.
17457
17458 * doc/bison.texinfo (Bison Parser): Discuss system headers
17459 and their effect on the user name space.
17460
17461 * src/bison.simple:
17462 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
17463 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
17464 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
17465
17466 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
17467 on user names when possible.
17468
17469 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
17470 Simplify test for whather <alloca.h> exists.
17471
17472 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
17473
17474 (<stdio.h>): Include if YYDEBUG.
17475
17476 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
17477 ! defined (yyoverflow) && ! defined (yymemcpy).
17478
17479 (yymemcpy, yyparse): Rename local variables as needed so that
17480 they all begin with 'yy'.
17481
17482 (yystrlen, yystpcpy): New functions.
17483
17484 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
17485 All uses changed.
17486
17487 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
17488 instead of relying on string.h functions. Use YYSTACK_ALLOC
17489 and YYSTACK_FREE instead of malloc and free.
17490
fd51e5ff
AD
174912001-11-30 Akim Demaille <akim@epita.fr>
17492
17493 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
17494 before their first uses.
17495 (YYBISON, YYPURE): Move to the top of the output.
17496
7d13ff5f
AD
174972001-11-30 Akim Demaille <akim@epita.fr>
17498
17499 * tests/reduce.at (Useless Nonterminals): Fix.
17500
892a3995
AD
175012001-11-30 Akim Demaille <akim@epita.fr>
17502
17503 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
17504 if body instead of `;' to pacify GCC's warnings.
17505
68f1e3ed
AD
175062001-11-30 Akim Demaille <akim@epita.fr>
17507
17508 Instead of mapping the LHS of unused rules to -1, keep the LHS
17509 valid, but flag the rules as invalid.
17510
17511 * src/gram.h (rule_t): `useful' is a new member.
17512 * src/print.c (print_grammar): Adjust.
17513 * src/derives.c (set_derives): Likewise.
17514 * src/reader.c (packgram, reduce_output): Likewise.
17515 * src/reduce.c (reduce_grammar_tables): Likewise.
17516 * tests/reduce.at (Underivable Rules, Useless Rules): New.
17517
d2d1b42b
AD
175182001-11-30 Akim Demaille <akim@epita.fr>
17519
17520 * src/reduce.c (reduce_output): Formatting changes.
17521 * src/print.c (print_results, print_grammar): Likewise.
17522 * tests/regression.at (Rule Line Numbers)
17523 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
17524
760b53a8
AD
175252001-11-30 Akim Demaille <akim@epita.fr>
17526
17527 * src/reduce.c (nonterminals_reduce): Instead of throwing away
17528 useless nonterminals, move them at the end of the symbol arrays.
17529 (reduce_output): Adjust.
17530 * tests/reduce.at (Useless Nonterminals): Adjust.
17531
00238958
AD
175322001-11-30 Akim Demaille <akim@epita.fr>
17533
17534 * src/reduce.c: Various comment/formatting changes.
17535 (nonterminals_reduce): New, extracted from...
17536 (reduce_grammar_tables): here.
17537 (reduce_grammar): Call nonterminals_reduce.
17538
396452de
PE
175392001-11-29 Paul Eggert <eggert@twinsun.com>
17540
17541 * src/bison.simple (YYSTACK_REALLOC): Remove.
17542 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
17543 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
17544 New macros.
17545 (union yyalloc): New type.
17546 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
17547 an arbitrary restriction on hosts where size_t is wider than int.
17548
17549 (yyparse): Don't dump core if alloca or malloc fails; instead, report
17550 a parser stack overflow. Allocate just one block of memory for all
17551 three stacks, instead of allocating three blocks; this typically is
17552 faster and reduces fragmentation.
17553
17554 Do not limit the number of items in the stack to a value that fits
17555 in 'int', as this is an arbitrary limit on hosts with 64-bit
17556 size_t and 32-bit int.
17557
147e184c
MA
175582001-11-29 Marc Autret <autret_m@epita.fr>
17559
17560 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
17561 of defining YYERROR_VERBOSE.
17562 [AT_DATA]: $4 is now out of C declarations in the prologue.
17563
426cf563
MA
175642001-11-28 Marc Autret <autret_m@epita.fr>
17565
17566 * src/reader.c (parse_dquoted_param): New.
17567 (parse_skel_decl): Use it.
17568 * src/lex.h: Add its prototype.
17569 * src/lex.c (literalchar): Become not static.
17570
c7925b99
MA
175712001-11-28 Marc Autret <autret_m@epita.fr>
17572
17573 * src/output.h: And put its extern declaration here.
17574 * src/output.c (error_verbose): Define here.
17575 (prepare): Echo name modification.
17576 * src/getargs.h: Clean its extern declaration.
17577 * src/getargs.c (error_verbose_flag): Remove.
17578 (getargs): Remove case 'e'.
17579 * src/options.c (option_table): 'error-verbose' is now seen as simple
17580 percent option.
17581 Include output.h.
17582
17583 * src/reader.c (read_declarations): Remove case tok_include.
17584 (parse_include_decl): Remove.
17585 * src/lex.h (token_t): Remove tok_include.
17586 * src/options.c (option_table): 'include' is now a simple command line
17587 option.
17588
5b5d1929
MA
175892001-11-28 Marc Autret <autret_m@epita.fr>
17590
17591 * src/bison.simple: Adjust muscle names.
17592 * src/muscle_tab.c (muscle_init): Also rename the muscles.
17593 * src/output.c (prepare): s/_/-/ for the muscles names.
17594 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
17595
8850be4b
MA
175962001-11-28 Marc Autret <autret_m@epita.fr>
17597
17598 * src/bison.simple: Fix debug.
17599 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
17600
4a38e613
AD
176012001-11-28 Akim Demaille <akim@epita.fr>
17602
17603 * src/LR0.c (shifts_new): New.
17604 (save_shifts, insert_start_shift, augment_automaton): Use it.
17605
4b35e1c1
AD
176062001-11-28 Akim Demaille <akim@epita.fr>
17607
17608 * src/closure.c (closure): `b' and `ruleno' denote the same value:
17609 keep ruleno only.
17610
d2b04478
AD
176112001-11-28 Akim Demaille <akim@epita.fr>
17612
17613 * src/closure.c (closure): Instead of looping over word in array
17614 then bits in words, loop over bits in array.
17615
2c4c30aa
AD
176162001-11-28 Akim Demaille <akim@epita.fr>
17617
17618 * src/closure.c (closure): No longer optimize the special case
17619 where all the bits of `ruleset[r]' are set to 0, to make the code
17620 clearer.
17621
576890b7
AD
176222001-11-28 Akim Demaille <akim@epita.fr>
17623
17624 * src/closure.c (closure): `r' and `c' are new variables, used to
17625 de-obfuscate accesses to RULESET and CORE.
17626
cb487d7d
AD
176272001-11-28 Akim Demaille <akim@epita.fr>
17628
17629 * src/reduce.c (reduce_print): Use ngettext.
17630 (dump_grammar): Improve the trace accuracy.
17631
6013d43f
AD
176322001-11-28 Akim Demaille <akim@epita.fr>
17633
17634 * src/reduce.c (dump_grammar): Don't translate trace messages.
17635
cb4956ee
AD
176362001-11-28 Akim Demaille <akim@epita.fr>
17637
17638 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
17639 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
17640 as all tags are free'ed afterwards.
17641 From Enrico Scholz.
17642
648185ab
PE
176432001-11-27 Paul Eggert <eggert@twinsun.com>
17644
17645 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
17646 use alloca when we didn't want to, and vice versa.
17647
68254a03
MA
176482001-11-27 Marc Autret <autret_m@epita.fr>
17649
9113b58f
AD
17650 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
17651 initialization.
68254a03
MA
17652 * src/output.c (prepare): Remove its update.
17653
04d843a2
MA
176542001-11-27 Marc Autret <autret_m@epita.fr>
17655
17656 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
17657 Use %error-verbose.
17658
d2079671 176592001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
17660
17661 * src/bison.simple: Remove YYERROR_VERBOSE using.
17662 Use %%error_verbose.
17663 (yyparse): Likewise.
17664 * src/output.c (prepare): Give its final value.
17665 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
17666 * src/getargs.h: Add its extern declaration.
17667 * src/getargs.c (error_verbose_flag): New int.
17668 (getargs): Update to catch new case.
17669 * src/options.c (option_table): 'error-verbose' is a new option.
17670 (shortopts): Update.
17671
e0327bc8
AD
176722001-11-27 Akim Demaille <akim@epita.fr>
17673
17674 * src/system.h: Use intl/libgettext.h.
17675 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
17676
000f1a3c
AD
176772001-11-27 Akim Demaille <akim@epita.fr>
17678
17679 * tests/torture.at (Exploding the Stack Size with Malloc):
17680 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
17681
26cfe0be
AD
176822001-11-27 Akim Demaille <akim@epita.fr>
17683
17684 * src/files.c: Include error.h.
17685 Reported by Hans Aberg.
17686
f6bd5427
MA
176872001-11-26 Marc Autret <autret_m@epita.fr>
17688
d2079671 17689 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
17690 (read_declarations): Add case tok_include.
17691 * src/getargs.h (include): Add its extern definition.
17692 * src/getargs.c (include): New const char *.
17693 (getargs): Add case '-I'.
17694 * src/options.c (option_table): Add include as command line and
17695 percent option.
17696 * src/lex.h (token_t): Add tok_include.
17697
2ca209c1
AD
176982001-11-26 Akim Demaille <akim@epita.fr>
17699
17700 * src/reader.c (readgram): Make sure rules for mid-rule actions
17701 have a lineno equal to that of their host rule.
17702 Reported by Hans Aberg.
17703 * tests/regression.at (Rule Line Numbers): New.
17704
0e41b407
AD
177052001-11-26 Akim Demaille <akim@epita.fr>
17706
17707 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
17708 size_ts.
17709
177102001-11-26 Akim Demaille <akim@epita.fr>
17711
17712 * src/complain.c, src/complain.h (error): Remove, provided by
17713 lib/error.[ch].
17714
e0c40012
AD
177152001-11-26 Akim Demaille <akim@epita.fr>
17716
17717 * src/reader.c (read_declarations): Don't abort on tok_illegal,
17718 issue an error message.
17719 * tests/regression.at (Invalid %directive): New.
17720 Reported by Hans Aberg.
17721
5e147124
AD
177222001-11-26 Akim Demaille <akim@epita.fr>
17723
17724 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
17725 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17726
a034c8b8
AD
177272001-11-26 Akim Demaille <akim@epita.fr>
17728
17729 * src/conflicts.c (conflicts_print): Don't complain at all when
17730 there are no reduce/reduce conflicts, and as many shift/reduce
17731 conflicts as expected.
17732 * tests/regression.at (%expect right): Adjust.
17733
c64a20f3
AD
177342001-11-23 Akim Demaille <akim@epita.fr>
17735
17736 * lib/alloca.c: Update, from fileutils.
17737
5b0d29bb
AD
177382001-11-23 Akim Demaille <akim@epita.fr>
17739
17740 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
17741
722c4bfe
AD
177422001-11-23 Akim Demaille <akim@epita.fr>
17743
17744 * src/system.h: Include alloca.h.
17745 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
17746
6255b435
AD
177472001-11-23 Akim Demaille <akim@epita.fr>
17748
17749 * src/print_graph.c (print_actions): Remove `rule', unused.
17750 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
17751 pacify GCC's signed < unsigned warnings.
17752 * src/closure.c (itemsetsize): Likewise.
17753 * src/reader.c (symbol_list_new): Static.
17754
b29b2ed5
AD
177552001-11-23 Akim Demaille <akim@epita.fr>
17756
17757 Attaching lineno to buckets is stupid, since only one copy of each
17758 symbol is kept, only the line of the first occurrence is kept too.
17759
17760 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
17761 * src/reader.c (rline_allocated): Remove, unused.
17762 (symbol_list): Have a `line' member.
17763 (symbol_list_new): New.
17764 (readgram): Use it.
17765 * src/print.c (print_grammar): Output the rule line numbers.
17766 * tests/regression.at (Solved SR Conflicts)
17767 (Unresolved SR Conflicts): Adjust.
17768 Reported by Hans Aberg.
17769
a81b1d4a
MA
177702001-11-22 Marc Autret <autret_m@epita.fr>
17771
17772 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
17773
c1ecb3c1
MA
177742001-11-22 Marc Autret <autret_m@epita.fr>
17775
17776 * src/muscle_tab.c (muscle_init): Remove initialization of
17777 skeleton muscle.
17778 * src/output.c (output_master_parser): Do it here.
17779
fbe01355
AD
177802001-11-20 Akim Demaille <akim@epita.fr>
17781
17782 * po/sv.po: New.
17783 * configure.in (ALL_LINGUAS): Adjust.
17784 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
17785 longer contains strings to translate.
17786
81e895c0
AD
177872001-11-19 Akim Demaille <akim@epita.fr>
17788
17789 * src/conflicts.c (conflicts_print): Add a missing \n.
17790
6bb1878b
AD
177912001-11-19 Akim Demaille <akim@epita.fr>
17792
17793 * src/nullable.c (nullable_print): New.
17794 (set_nullable): Call it when tracing.
17795 Better locality of variables.
17796
d9ec2d07
AD
177972001-11-19 Akim Demaille <akim@epita.fr>
17798
17799 * src/print.c (print_actions): Better locality of variables.
17800
720e5c1b
AD
178012001-11-19 Akim Demaille <akim@epita.fr>
17802
17803 * src/derives.c (print_derives): Fix and enrich.
17804 * src/closure.c (print_fderives): Likewise.
17805
fb908786
AD
178062001-11-19 Akim Demaille <akim@epita.fr>
17807
17808 * src/closure.c (itemsetend): Remove, replaced with...
17809 (itemsetsize): new.
17810
125ecb56
AD
178112001-11-19 Akim Demaille <akim@epita.fr>
17812
17813 * src/LR0.c (kernel_end): Remove, replaced with...
17814 (kernel_size): new.
17815
d8cf039f
AD
178162001-11-19 Akim Demaille <akim@epita.fr>
17817
17818 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
17819 to clarify.
17820
7bec0760
AD
178212001-11-19 Akim Demaille <akim@epita.fr>
17822
17823 * src/closure.c (closure): Use arrays instead of pointers to clarify.
17824
c87d4863
AD
178252001-11-19 Akim Demaille <akim@epita.fr>
17826
17827 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
17828 trace messages.
17829 * src/LR0.c: Likewise.
17830 (allocate_itemsets): Use arrays instead of pointers to clarify.
17831
9bfe901c
AD
178322001-11-19 Akim Demaille <akim@epita.fr>
17833
17834 * src/getargs.c (statistics_flag): Replace with...
17835 (trace_flag): New.
17836 (longopts): Accept --trace instead of --statistics.
17837 * src/getargs.h, src/options.c: Adjust.
17838 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
17839 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
17840
97db7bd4
AD
178412001-11-19 Akim Demaille <akim@epita.fr>
17842
cc72668c 17843 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
17844 pointers to clarify the code.
17845 (save_reductions, save_shifts): Factor common parts of alternatives.
17846
2c5f66ed
AD
178472001-11-19 Akim Demaille <akim@epita.fr>
17848
17849 * src/LR0.c (new_state, get_state): Complete TRACE code.
17850 * src/closure.c: Include `reader.h' to get `tags', needed by the
17851 trace code.
17852 Rename the conditional DEBUG as TRACE.
17853 Output consistently TRACEs to stderr, not stdout.
17854 * src/derives.c: Likewise.
17855 * src/reduce.c: (inaccessable_symbols): Using if is better style
17856 than goto.
17857 Use `#if TRACE' instead of `#if 0' for tracing code.
17858
300f275f
AD
178592001-11-19 Akim Demaille <akim@epita.fr>
17860
17861 * src/system.h (LIST_FREE, shortcpy): New.
17862 * src/LR0.c: Use them.
17863 * src/output.c (free_itemsets, free_reductions, free_shifts):
17864 Remove, replaced by LIST_FREE.
17865
f59c437a
AD
178662001-11-19 Akim Demaille <akim@epita.fr>
17867
17868 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
17869 (REDUCTIONS_ALLOC): New.
17870 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
17871 allocation.
17872
6986fd9e
AD
178732001-11-19 Akim Demaille <akim@epita.fr>
17874
17875 * src/LR0.c (new_state): Complete trace code.
17876 * src/nullable.c (set_nullable): Don't translate traces.
17877
4bc30f78
AD
178782001-11-19 Akim Demaille <akim@epita.fr>
17879
17880 * src/print_graph.c (print_core): Better locality of variables.
17881 * src/print.c (print_core): Likewise.
17882
08a946e0
AD
178832001-11-19 Akim Demaille <akim@epita.fr>
17884
17885 * src/vcg.c: You do the output, so you are responsible of the
17886 handling of VCG syntax, in particular: use quotearg.
17887 * src/print_graph.c: Don't.
17888 (print_actions): Don't output the actions as part of the nodes,
17889 since that's the job of the edges.
17890 (print_state): Don't output by hand: fill the node description,
9bfe901c 17891 and ask for its output.
08a946e0 17892
f0473484
AD
178932001-11-19 Akim Demaille <akim@epita.fr>
17894
cc72668c
AD
17895 * src/bison.simple (yyparse): When verbosely reporting an error,
17896 no longer put additional quotes around token names.
f0473484
AD
17897 * tests/calc.at: Adjust.
17898
e41dc700
AD
178992001-11-19 Akim Demaille <akim@epita.fr>
17900
17901 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
17902 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
17903 * src/output.c: Adjust.
17904
652a871c
AD
179052001-11-19 Akim Demaille <akim@epita.fr>
17906
17907 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
17908 (rule_t): this.
17909 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
17910
b2ed6e58
AD
179112001-11-19 Akim Demaille <akim@epita.fr>
17912
17913 * src/gram.h (rule_t): New.
17914 (rule_table): New.
17915 (rrhs, rlhs): Remove, part of state_t.
17916 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
17917 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17918 * src/reader.c, src/reduce.c: Adjust.
17919
edad7067
AD
179202001-11-19 Akim Demaille <akim@epita.fr>
17921
17922 * src/reader.c (symbols_output): New, extracted from...
17923 (packsymbols): Here.
17924 (reader): Call it.
17925
3feec034
AD
179262001-11-19 Akim Demaille <akim@epita.fr>
17927
17928 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
17929 (maxrhs): this new function.
17930
ddcd5fdf
AD
179312001-11-19 Akim Demaille <akim@epita.fr>
17932
cc72668c 17933 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
17934 Adjust.
17935
bb527fc2
AD
179362001-11-19 Akim Demaille <akim@epita.fr>
17937
cc72668c 17938 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
17939 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17940 * src/lalr.c: Adjust.
17941
a845a697
AD
179422001-11-19 Akim Demaille <akim@epita.fr>
17943
17944 * src/lalr.c (initialize_LA): Only initialize LA. Let...
17945 (set_state_table): handle the `lookaheads' members.
17946
f004bf6a
AD
179472001-11-19 Akim Demaille <akim@epita.fr>
17948
cc72668c
AD
17949 * src/lalr.h (lookaheads): Removed array, whose contents is now
17950 a member of...
f004bf6a
AD
17951 (state_t): this structure.
17952 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17953 Adjust.
17954
de326cc0
AD
179552001-11-19 Akim Demaille <akim@epita.fr>
17956
cc72668c
AD
17957 * src/lalr.h (consistent): Removed array, whose contents is now
17958 a member of...
de326cc0
AD
17959 (state_t): this structure.
17960 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17961 Adjust.
17962
90b4416b
AD
179632001-11-19 Akim Demaille <akim@epita.fr>
17964
cc72668c
AD
17965 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
17966 contents are now members of...
90b4416b
AD
17967 (state_t): this structure.
17968 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17969 Adjust.
17970
9703cc49
AD
179712001-11-19 Akim Demaille <akim@epita.fr>
17972
17973 * src/lalr.h (state_t): New.
17974 (state_table): Be a state_t * instead of a core **.
17975 (accessing_symbol): Remove, part of state_t.
17976 * src/lalr.c: Adjust.
17977 (set_accessing_symbol): Merge into...
17978 (set_state_table): this.
17979 * src/print_graph.c, src/conflicts.c: Adjust.
17980
d803322e
AD
179812001-11-14 Akim Demaille <akim@epita.fr>
17982
17983 * tests/calc.at, tests/output.at, tests/regression.at,
17984 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
17985 now the tests are run in private dirs, therefore AC_CLEANUP and
17986 family can be simplified to 0-ary.
17987 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
17988 use abs. path to find config.h.
17989 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
17990 stderr, there can be way too much random noise.
17991 Instead pass -Werror to GCC and rely on the exit status.
17992 Reported by Wolfram Wagner.
17993
3d76b07d
AD
179942001-11-14 Akim Demaille <akim@epita.fr>
17995
17996 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
17997 defined only if yyoverflow is defined, to avoid `warning: unused
17998 variable `yyvs1''.
17999 Reported by The Test Suite.
18000
09b503c8
AD
180012001-11-14 Akim Demaille <akim@epita.fr>
18002
18003 * src/print.c: Include reduce.h.
18004 Reported by Hans Aberg.
18005
180062001-11-14 Akim Demaille <akim@epita.fr>
18007
18008 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
18009 Revert a previous patch: these are really const.
18010 * src/conflicts.c (conflict_report): Additional useless pair of
18011 braces to pacify GCC's warnings for `if () if () {} else {}'.
18012 * src/lex.c (parse_percent_token): Replace equal_offset with
18013 arg_offset.
18014 arg is const.
18015 Be sure to strdup `arg' when used, since there is no reason for
18016 token_buffer not to change.
18017
0f37a994
AD
180182001-11-14 Akim Demaille <akim@epita.fr>
18019
18020 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
18021 definition.
18022 * src/main.c (main): Use them.
18023 Suggested by Hans Aberg.
18024
d39d93b8
AD
180252001-11-12 Akim Demaille <akim@epita.fr>
18026
18027 * src/system.h (ngettext): Now that we use ngettext, be sure to
18028 provide a default definition when NLS are not used.
18029
9edcd895
AD
180302001-11-12 Akim Demaille <akim@epita.fr>
18031
18032 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
18033 Use @kbd to denote user input.
18034 (Language and Grammar): ANSIfy the example.
18035 Adjust its layout for info/notinfo.
18036 (Location Tracking Calc): Output error messages to stderr.
18037 Output locations in a more GNUtically correct way.
18038 Fix a couple of Englishos.
18039 Adjust @group/@end group pairs.
18040
7da99ede
AD
180412001-11-12 Akim Demaille <akim@epita.fr>
18042
e3aa65c5 18043 %expect was not functioning at all.
7da99ede
AD
18044
18045 * src/conflicts.c (expected_conflicts): Set to -1.
18046 (conflict_report): Use ngettext.
18047 (conflicts_print): Check %expect and make its violation an error.
18048 * doc/bison.texinfo (Expect Decl): Adjust.
18049 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
18050 * tests/regression.at (%expect not enough, %expect right)
18051 (%expect too much): New.
18052
ba9dda1a
AD
180532001-11-12 Akim Demaille <akim@epita.fr>
18054
18055 * tests/regression.at (Conflicts): Rename as...
18056 (Unresolved SR Conflicts): this.
18057 (Solved SR Conflicts): New.
18058
337c5bd1
AD
180592001-11-12 Akim Demaille <akim@epita.fr>
18060
18061 * src/reduce.c (print_results): Rename as...
18062 (reduce_output): This.
18063 Output to OUT, passed as argument, instead of output_obstack.
18064 (dump_grammar): Likewise.
18065 (reduce_free): New.
18066 Also free V1.
18067 (reduce_grammar): No longer call reduce_output, since...
18068 * src/print.c (print_results): do it.
18069 * src/main.c (main): Call reduce_free;
18070
c73a41af
AD
180712001-11-12 Akim Demaille <akim@epita.fr>
18072
18073 * src/conflicts.c (print_reductions): Accept OUT as argument.
18074 Output to it, not to output_obstack.
18075 * src/print.c (print_actions): Adjust.
18076
0df87bb6
AD
180772001-11-12 Akim Demaille <akim@epita.fr>
18078
18079 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
18080 the result instead of using...
18081 (src_total, rrc_total, src_count, rrc_count): Remove.
18082 (any_conflicts): Remove.
18083 (print_conflicts): Split into...
18084 (conflicts_print, conflicts_output): New.
18085 * src/conflicts.h: Adjust.
18086 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 18087 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
18088 * tests/regression.at (Conflicts): New.
18089 Reported by Tom Lane.
18090
e4d3d4de
AD
180912001-11-12 Akim Demaille <akim@epita.fr>
18092
18093 * tests/regression.at (Invalid input): Remove, duplicate with
18094 ``Invalid input: 1''.
18095
6d7d248e
AD
180962001-11-12 Akim Demaille <akim@epita.fr>
18097
18098 * tests/torture.at (AT_DATA_STACK_TORTURE)
18099 (Exploding the Stack Size with Alloca)
18100 (Exploding the Stack Size with Malloc): New.
18101
e9e4c321
AD
181022001-11-12 Akim Demaille <akim@epita.fr>
18103
18104 * src/bison.simple (YYSTACK_REALLOC): New.
18105 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 18106 Reported by Per Allansson.
e9e4c321 18107
5f7e0832
AD
181082001-11-12 Pascal Bart <pascal.bart@epita.fr>
18109
18110 * src/bison.simple: Define type yystype instead of YYSTYPE, and
18111 define CPP macro, which substitute YYSTYPE by yystype.
18112 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
18113 with yyltype/YYLTYPE. This allows inclusion of the generated
18114 header within the parser if the compiler, such as GGC, accepts
18115 multiple equivalent #defines.
18116 From Akim.
18117
e3f1699f
AD
181182001-11-05 Akim Demaille <akim@epita.fr>
18119
18120 * src/reader.c (symbols_output): New, extracted from...
18121 (packsymbols): here.
18122 (reader): Adjust.
18123
65be0866
AD
181242001-11-05 Akim Demaille <akim@epita.fr>
18125
18126 * src/lex.c (parse_percent_token): s/quotearg/quote/.
18127
e4d910bf
AD
181282001-11-05 Akim Demaille <akim@epita.fr>
18129
18130 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
18131 pattern.
18132
951366c1
AD
181332001-11-05 Akim Demaille <akim@epita.fr>
18134
18135 * src/options.h (struct option_table_struct): set_flags is void*.
18136 * src/options.c (longopts): Support `--output' and `%output'.
18137 (usage): Adjust.
18138 * src/lex.h (tok_setopt): Remove, replaced with...
18139 (tok_intopt, tok_stropt): these new guys.
18140 * src/lex.c (getopt.h): Not needed.
18141 (token_buffer, unlexed_token_buffer): Not const.
18142 (percent_table): Promote `-' over `_' in directive names.
18143 Active `%name-prefix', `file-prefix', and `output'.
18144 (parse_percent_token): Accept possible arguments to directives.
18145 Promote `-' over `_' in directive names.
18146
d8988b2f
AD
181472001-11-04 Akim Demaille <akim@epita.fr>
18148
18149 * doc/bison.texinfo (Decl Summary): Split the list into
18150 `directives for grammars' and `directives for bison'.
18151 Sort'em.
18152 Add description of `%name-prefix', `file-prefix', and `output'.
18153 Promote `-' over `_' in directive names.
18154 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
18155 Simplify the description of `--name-prefix'.
18156 Promote `-' over `_' in directive names.
18157 Promote `--output' over `--output-file'.
18158 Fix the description of `--defines'.
18159 * tests/output.at: Exercise %file-prefix and %output.
18160
6468d18e
AD
181612001-11-02 Akim Demaille <akim@epita.fr>
18162
18163 * doc/refcard.tex: Update.
18164
6b7e85b9
AD
181652001-11-02 Akim Demaille <akim@epita.fr>
18166
18167 * src/symtab.h (SUNDEF): New.
18168 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
18169 stand for `uninitialized', instead of 0.
18170 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
18171 * src/lex.c (lex): Adjust.
18172
18173 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
18174 Number it 0.
18175 Let yylex return it instead of a plain 0.
18176 Reported by Dick Streefland.
18177
cd5aafcf
AD
181782001-11-02 Akim Demaille <akim@epita.fr>
18179
18180 * tests/regression.at (Mixing %token styles): New test.
18181
037ca2f1
AD
181822001-11-02 Akim Demaille <akim@epita.fr>
18183
18184 * src/reader.c (parse_thong_decl): Formatting changes.
18185 (token_translations_init): New, extracted from...
18186 (packsymbols): Here.
18187 Adjust.
18188
270a173c
AD
181892001-11-01 Akim Demaille <akim@epita.fr>
18190
18191 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
18192 Check that `9foo.y' produces correct cpp guards.
18193 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
18194 guards.
18195 Reported by Wwp.
18196
561f9a30
AD
181972001-11-01 Akim Demaille <akim@epita.fr>
18198
18199 * tests/regression.at (Invalid input: 2): New.
18200 * src/lex.c (unlexed_token_buffer): New.
18201 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
18202 too.
18203 Reported by Wwp.
18204
f987e9d2
AD
182052001-11-01 Akim Demaille <akim@epita.fr>
18206
18207 * tests/calc.at: Catch up with 1.30.
18208 * configure.in: Bump to 1.49a.
18209 Adjust to newer Autotest.
18210
0846f581
PB
182112001-10-19 Pascal Bart <pascal.bart@epita.fr>
18212
18213 * src/conflicts.c: Move global variables rrc_total and src_total ...
18214 (print_conflicts): here.
18215 * src/output.c (output): Free global variable user_toknums.
18216 * src/lex.c (token_obstack): Become static.
18217
3c1a79b3
AD
182182001-10-18 Akim Demaille <akim@epita.fr>
18219
18220 * tests/atlocal.in (GCC): Add.
18221 * tests/calc.at: s/m4_match/m4_bmatch/.
18222 s/m4_patsubst/m4_bpatsubst/.
18223 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
18224 * configure.in: AC_SUBST(GCC).
18225
5d52e7d0
MA
182262001-10-14 Marc Autret <autret_m@epita.fr>
18227
18228 * src/options.c (create_long_option_table): Fix.
18229
631aa1d3
AD
182302001-10-10 Akim Demaille <akim@epita.fr>
18231
18232 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
18233
f6ec6d13
AD
182342001-10-04 Akim Demaille <akim@epita.fr>
18235
18236 * src/reader.c (parse_union_decl): Push the caracters in
18237 union_obstack, not attrs_obstack.
18238
342b8b6e
AD
182392001-10-04 Akim Demaille <akim@epita.fr>
18240
18241 Merge in the branch 1.29.
18242
18243 * src/reader.c (packsymbols): Use a temporary obstack for
18244 `%%tokendef', since output_stack is already used elsewhere.
18245
18246 2001-10-02 Akim Demaille <akim@epita.fr>
18247
18248 Bump 1.29d.
18249
18250 2001-10-02 Akim Demaille <akim@epita.fr>
18251
18252 Version 1.29c.
18253
18254 2001-10-02 Akim Demaille <akim@epita.fr>
18255
18256 * tests/regression.at (Invalid CPP headers): New.
18257 From Alexander Belopolsky.
18258 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
18259
18260 2001-10-02 Akim Demaille <akim@epita.fr>
18261
18262 * tests/regression.at (Invalid input): New.
18263 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
18264 Reported by Shura.
18265
18266 2001-10-02 Akim Demaille <akim@epita.fr>
18267
18268 * tests/calc.at: Now that --debug works, the tests must be adjusted.
18269
18270 2001-10-02 Akim Demaille <akim@epita.fr>
18271
18272 * src/output.c (output_parser): Assert `skeleton'.
18273 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
18274 systems.
18275 From Shura.
18276
18277 2001-10-01 Marc Autret <autret_m@epita.fr>
18278
18279 * src/lex.h: Echo modifications.
18280 * src/lex.c (unlex): Parameter is now token_t.
18281 From Hans Aberg.
18282
18283 2001-10-01 Marc Autret <autret_m@epita.fr>
18284
18285 * src/main.c: Include lex.h.
18286 From Hans Aberg.
18287
18288 2001-09-29 Akim Demaille <akim@epita.fr>
18289
18290 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
18291
18292 2001-09-28 Akim Demaille <akim@epita.fr>
18293
18294 * tests/testsuite.at: Update to newer Autotest.
18295 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
18296
18297 2001-09-27 Akim Demaille <akim@epita.fr>
18298
18299 Position independent wrapper.
18300
18301 * tests/bison: Remove.
18302 * tests/bison.in: New.
18303 * configure.in: Adjust.
18304
18305 2001-09-27 Paul Eggert <eggert@twinsun.com>
18306
18307 Port quotearg fixes from tar 1.13.24.
18308
18309 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
18310 tm to be declared.
18311 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
18312 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
18313
18314 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
18315 * m4/mbrtowc.m4: New file.
18316 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
18317 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
18318
18319 2001-09-27 Akim Demaille <akim@epita.fr>
18320
18321 Bump to 1.29c.
18322
18323 2001-09-27 Akim Demaille <akim@epita.fr>
18324
18325 Version 1.29b.
18326
18327 2001-09-25 Akim Demaille <akim@epita.fr>
18328
18329 * src/system.h: Include `xalloc.h'.
18330 Remove it from the C files.
18331 * src/files.c (output_files): Free the obstacks.
18332 * src/lex.c (init_lex): Rename as...
18333 (lex_init): this.
18334 (lex_free): New.
18335 * src/main.c (main): Use it.
18336
18337 2001-09-24 Marc Autret <autret_m@epita.fr>
18338
18339 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
18340 to output informations in fout (FILE*).
18341 (open_graph, close_graph): Likewise.
18342 (output_graph, output_edge, output_node): Likewise.
18343 * src/vcg.h: Update function prototypes.
18344 * src/print_graph.c (print_graph): Open output graph file.
18345 (print_actions): Adjust.
18346 * src/files.h: Remove extern declaration.
18347 * src/files.c: Remove graph_obstack declaration.
18348 (open_files): Remove graph_obstack initialization.
18349 (output_files): Remove graph_obstack saving.
18350
18351 2001-09-24 Marc Autret <autret_m@epita.fr>
18352
18353 * src/files.c (compute_output_file_names): Fix.
18354
18355 2001-09-24 Marc Autret <autret_m@epita.fr>,
18356 Akim Demaille <akim@epita.fr>
18357
18358 * src/reader.c (reader): Remove call to free_symtab ().
18359 * src/main.c (main): Call it here.
18360 Include symtab.h.
18361 * src/conflicts.c (initialize_conflicts): Rename as...
18362 (solve_conflicts): this.
18363 * src/print.c (print_core, print_actions, print_state)
18364 (print_grammar): Dump to a file instead a `output_obstack'.
18365 (print_results): Dump `output_obstack', and then proceed with the
18366 FILE *.
18367 * src/files.c (compute_output_file_names, close_files): New.
18368 (output_files): Adjust.
18369 * src/main.c (main): Adjust.
18370
18371 2001-09-23 Marc Autret <autret_m@epita.fr>
18372
18373 * src/files.c (compute_header_macro): Computes header macro name
18374 from spec_defines_file when given.
18375
18376 2001-09-23 Marc Autret <autret_m@epita.fr>
18377
18378 * src/files.c (output_files): Add default extensions.
18379
18380 2001-09-22 Akim Demaille <akim@epita.fr>
18381
18382 * src/conflicts.c (finalize_conflicts): Rename as...
18383 (free_conflicts): this.
18384
18385 2001-09-22 Akim Demaille <akim@epita.fr>
18386
18387 * src/gram.c (gram_free): Rename back as...
18388 (dummy): this.
18389 (output_token_translations): Free `token_translations'.
18390 * src/symtab.c (free_symtab): Free the tag field.
18391
18392 2001-09-22 Akim Demaille <akim@epita.fr>
18393
18394 Remove `translations' as it is always set to true.
18395
18396 * src/gram.h: Adjust.
18397 * src/reader.c (packsymbols, parse_token_decl): Adjust
18398 * src/print.c (print_grammar): Adjust.
18399 * src/output.c (output_token_translations): Adjust.
18400 * src/lex.c (lex): Adjust.
18401 * src/gram.c: Be sure the set pointers to NULL.
18402 (dummy): Rename as...
18403 (gram_free): this.
18404
18405 2001-09-22 Akim Demaille <akim@epita.fr>
18406
18407 * configure.in: Invoke AM_LIB_DMALLOC.
18408 * src/system.h: Use dmalloc.
18409 * src/LR0.c: Be sure to have pointers initialized to NULL.
18410 (allocate_itemsets): Allocate kernel_items only if needed.
18411
18412 2001-09-22 Akim Demaille <akim@epita.fr>
18413
18414 * configure.in: Bump to 1.29b.
18415 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
18416 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
18417 need xmalloc.c in calc.y.
18418 From Pascal Bart.
18419
18420 2001-09-21 Akim Demaille <akim@epita.fr>
18421
18422 Version 1.29a.
18423 * Makefile.maint, config/config.guess, config/config.sub,
18424 * config/missing: Update from masters.
18425 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
18426 upon package.m4.
18427 * configure.in (ALL_LINGUAS): Add `tr'.
18428
18429 2001-09-21 Akim Demaille <akim@epita.fr>
18430
18431 * tests/Makefile.am (package.m4): Move to...
18432 ($(srcdir)/$(TESTSUITE)): here.
18433
18434 2001-09-20 Akim Demaille <akim@epita.fr>
18435
18436 * src/complain.c: No longer try to be standalone: use system.h.
18437 Don't assume __STDC__ is defined to 1. Just test if it is defined.
18438 * src/complain.h: Likewise.
18439 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
18440 Remove the unused variable `n'.
18441 From Albert Chin-A-Young.
18442
18443 2001-09-18 Marc Autret <autret_m@epita.fr>
18444
18445 * doc/bison.1: Update.
18446 * doc/bison.texinfo (Bison Options): Update --defines and --graph
18447 descriptions.
18448 (Option Cross Key): Update.
18449 Add --graph.
18450
18451 2001-09-18 Marc Autret <autret_m@epita.fr>
18452
18453 * tests/regression.at: New test (comment in %union).
18454
18455 2001-09-18 Marc Autret <autret_m@epita.fr>
18456
18457 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
18458 do that.
18459 Reported by Keith Browne.
18460
18461 2001-09-18 Marc Autret <autret_m@epita.fr>
18462
18463 * tests/output.at: Add tests for --defines and --graph.
18464
18465 2001-09-18 Marc Autret <autret_m@epita.fr>
18466
18467 * tests/output.at: Removes tests of %{header,src}_extension features.
18468
18469 2001-09-18 Akim Demaille <akim@epita.fr>
18470
18471 * tests/Makefile.am (package.m4): New.
18472 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
18473 (_AT_CHECK_CALC_ERROR): Likewise.
18474 Factor the `, ' part of verbose error messages.
18475
18476 2001-09-18 Marc Autret <autret_m@epita.fr>
18477
18478 * src/getargs.c (longopts): Declare --defines and --graph as options
18479 with optional arguments.
18480 * src/files.h: Add extern declarations.
18481 * src/files.c (spec_graph_file, spec_defines_file): New.
18482 (output_files): Update.
18483 Remove CPP-outed code.
18484
18485 2001-09-18 Marc Autret <autret_m@epita.fr>
18486
18487 Turn off %{source,header}_extension feature.
18488
18489 * src/files.c (compute_exts_from_gf): Update.
18490 (compute_exts_from_src): Update.
18491 (output_files): CPP-out useless code.
18492 * src/files.h: Remove {header,source}_extension extern declarations.
18493 * src/reader.c (parse_dquoted_param): CPP-out.
18494 (parse_header_extension_decl): Remove.
18495 (parse_source_extension_decl): Remove.
18496 (read_declarations): Remove cases tok_{hdrext,srcext}.
18497 * src/lex.c (percent_table): Remove {header,source}_extension entries.
18498 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
18499
18500 2001-09-10 Akim Demaille <akim@epita.fr>
18501
18502 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
18503 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
18504 (AT_CHECK_OUTPUT): this.
18505 Merely check ls' exit status, its output is useless.
18506
18507 2001-09-10 Akim Demaille <akim@epita.fr>
18508
18509 * tests/calc.at: Use m4_match.
18510 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
18511
18512 2001-09-10 Marc Autret <autret_m@epita.fr>,
18513 Akim Demaille <akim@epita.fr>
18514
18515 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
18516 enum color_e.
18517 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
18518 to `normal'.
18519 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
18520 * src/lex.h: Adjust prototype.
18521 (token_t): Add `tok_undef'.
18522 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
18523 (parse_percent_token): Now returns token_t.
18524 Add default statement in switch.
18525 (lex): Separate `c' as an input variable, from the token_t result
18526 part.
18527 (unlexed): Is a token_t.
18528
18529 2001-09-10 Akim Demaille <akim@epita.fr>
18530
18531 * configure.in: Bump to 1.29a.
18532
18533 2001-09-07 Akim Demaille <akim@epita.fr>
18534
18535 Version 1.29.
18536
18537 2001-08-30 Akim Demaille <akim@epita.fr>
18538
18539 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
18540 * m4/atconfig.m4: Remove.
18541 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
18542 * tests/bison: New.
18543 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
18544 m4_if, m4_patsubst, and m4_regexp.
18545 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
18546 `input' file instead of echo.
18547
18548 2001-08-29 Akim Demaille <akim@epita.fr>
18549
18550 Bump to 1.28e.
18551
18552 2001-08-29 Akim Demaille <akim@epita.fr>
18553
18554 Version 1.28d.
18555
18556 2001-08-29 Paul Eggert <eggert@twinsun.com>
18557
18558 * src/bison.simple (yyparse): Don't take the address of an
18559 item before the start of an array, as that doesn't conform to
18560 the C Standard.
18561
18562 2001-08-29 Robert Anisko <anisko_r@epita.fr>
18563
18564 * doc/bison.texinfo (Location Tracking Calc): New node.
18565
18566 2001-08-29 Paul Eggert <eggert@twinsun.com>
18567
18568 * src/output.c (output): Do not define const, as this now
18569 causes more problems than it cures.
18570
18571 2001-08-29 Akim Demaille <akim@epita.fr>
18572
18573 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
18574 the nodes.
18575 Be sure to tag the `detailmenu'.
18576
18577 2001-08-29 Akim Demaille <akim@epita.fr>
18578
18579 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
18580 download in a tmp dir.
18581
18582 2001-08-28 Marc Autret <autret_m@epita.fr>
18583
18584 * config/depcomp: New file.
18585
18586 2001-08-28 Marc Autret <autret_m@epita.fr>
18587
18588 * doc/bison.1 (mandoc): Adjust.
18589 From Juan Manuel Guerrero.
18590
18591 2001-08-28 Marc Autret <autret_m@epita.fr>
18592
18593 * src/print_graph.c (print_state): Fix.
18594
18595 2001-08-27 Marc Autret <autret_m@epita.fr>
18596
18597 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
18598 char * members.
18599 Echo modifications to the functions prototypes.
18600 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
18601
18602 2001-08-27 Marc Autret <autret_m@epita.fr>
18603
18604 * src/vcg.c: Include `xalloc.h'.
18605 (add_colorentry): New.
18606 (add_classname): New.
18607 (add_infoname): New.
18608 * src/vcg.h: Add new prototypes.
18609
18610 2001-08-27 Akim Demaille <akim@epita.fr>
18611
18612 * Makefile.maint: Sync. again with CVS Autoconf.
18613
18614 2001-08-27 Akim Demaille <akim@epita.fr>
18615
18616 * Makefile.maint: Formatting changes.
18617 (po-update, cvs-update, update): New targets.
18618 (AMTAR): Remove.
18619
18620 2001-08-27 Akim Demaille <akim@epita.fr>
18621
18622 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18623 * Makefile.maint: Sync. with CVS Autoconf.
18624
18625 2001-08-27 Marc Autret <autret_m@epita.fr>
18626
18627 * src/vcg.h (struct infoname_s): New.
18628 (struct colorentry_s): New.
18629 (graph_s): New fields {vertical,horizontal}_order in structure.
18630 Add `infoname' field.
18631 Add `colorentry' field;
18632 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
18633 (G_HORIZONTAL_ORDER): New.
18634 (G_INFONAME): New.
18635 (G_COLORENTRY): New.
18636 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
18637 Add output of `infoname'.
18638 Add output of `colorentry'.
18639
18640 2001-08-27 Marc Autret <autret_m@epita.fr>
18641
18642 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
18643 This one shadowed a global parameter.
18644
18645 2001-08-24 Marc Autret <autret_m@epita.fr>
18646
18647 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
18648 instead of `unsigned'.
18649 (print_state): Do not call obstack_object_size () in obstack_grow ()
18650 to avoid macro variables shadowing.
18651
18652 2001-08-23 Marc Autret <autret_m@epita.fr>
18653
18654 * src/lex.c (percent_table): Typo: s/naem/name/.
18655 Add graph option.
18656 Normalize new options declarations.
18657
18658 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
18659
18660 * tests/suite.at: Exercise %header_extension and %source_extension.
18661
18662 2001-08-16 Marc Autret <autret_m@epita.fr>
18663
18664 * src/reader.c (parse_dquoted_param): New.
18665 (parse_header_extension_decl): Use it.
18666 (parse_source_extension_decl): Likewise.
18667
18668 2001-08-16 Marc Autret <autret_m@epita.fr>
18669
18670 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
18671 (get_xxxx_str): Use assert () instead of complain ().
18672 Remove return invokations in default cases.
18673 (get_decision_str): Modify default behaviour. Remove second argument.
18674 Echo modifications on calls.
18675 (output_graph): Fix.
18676
18677 2001-08-16 Marc Autret <autret_m@epita.fr>
18678
18679 * src/getargs.c (usage): Update with ``-g, --graph''.
18680
18681 2001-08-16 Marc Autret <autret_m@epita.fr>
18682
18683 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
18684 (Option Cross Key): Likewise.
18685 * doc/bison.1: Update.
18686
1c8c2190
PB
186872001-09-25 Pascal Bart <pascal.bart@epita.fr>
18688
18689 * src/output.c (output_master_parser): Don't finish action_obstack.
18690 (output_parser): Don't care about the muscle action, here.
18691 (prepare): Copy the action_obstack in the action muscle.
18692 (output): Free action_obstack.
18693
180d45ba
PB
186942001-09-23 Pascal Bart <pascal.bart@epita.fr>
18695
18696 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
18697 will contain `%union' declaration.
18698 (parse_union_decl): Delete #line directive output.
18699 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
18700 informations about %union.
18701 (parse_union_decl): Copy the union_obstack in the muscle stype.
18702 * src/bison.simple: Add new #line directive.
18703 Add typdef %%stype YYSTYPE.
18704
c51d1a19
PB
187052001-09-23 Pascal Bart <pascal.bart@epita.fr>
18706
18707 * src/bison.simple: Add new `#line' directive.
18708
6f9344da
PB
187092001-09-22 Pascal Bart <pascal.bart@epita.fr>
18710
18711 * src/bison.simple: New `#line' directive.
18712 * src/output.c (output_parser): Support new dynamic muscle input_line.
18713
652def80
MA
187142001-09-22 Marc Autret <autret_m@epita.fr>
18715
18716 * src/output.c (output_master_parser): New.
18717 (output_parser): Be more re-entrant.
18718
25b222fa
MA
187192001-09-21 Marc Autret <autret_m@epita.fr>
18720
18721 * src/reader.c (copy_definition, parse_union_decl): Update and use
18722 `linef' muscle.
18723 (copy_action): Likewise.
18724 Use obstack_1grow ().
18725 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
18726
6bc35ae5
MA
187272001-09-21 Marc Autret <autret_m@epita.fr>
18728
18729 * src/options.c (option_table): Adjust.
18730 * src/lex.c (parse_percent_token): Fix.
18731
c0629aa1
PB
187322001-09-20 Pascal Bart <pascal.bart@epita.fr>
18733
18734 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 18735
82b6d266
PB
187362001-09-20 Pascal Bart <pascal.bart@epita.fr>
18737
18738 * src/lex.c (parse_percent_token): Change type of variable `tx', which
18739 is now an option_table_struct*.
18740 (option_strcmp): New function option_strcmp.
18741 (parse_percent_token): Call option_strcmp.
18742 * src/getargs.c (xalloc.h, options.h): Include it.
18743 (getargs): Call create_long_option_table.
18744 (getargs): Free longopts at the end of the function.
18745 (shortopts): Move in options.c.
18746 * src/options.c (create_long_option_table): New function. Convert
18747 information from option_table to option structure.
18748 * src/reader.c (options.h): Include it.
18749
18750 * src/Makefile.am: Adjust.
18751 * src/options.c (option_table): Create from longopts and percent_table.
18752 * src/getargs.c (longopts): Delete.
18753 * src/lex.c (struct percent_table_struct): Delete.
18754 (percent_table): Delete.
18755 (options.h): Include it.
18756 * src/options.c: Create.
18757 * src/options.h: Create.
18758 Declare enum opt_access_e.
18759 Define struct option_table_struct.
18760
75f5aaea
MA
187612001-09-20 Marc Autret <autret_m@epita.fr>
18762
18763 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
18764 sections of Bison.
18765
f508cb0a
PB
187662001-09-19 Pascal Bart <pascal.bart@epita.fr>
18767
18768 * src/bison.simple: s/%%filename/%%skeleton.
18769 * src/muscle_tab.c (getargs.h): Include it.
18770 (muscle_init): Insert new muscle skeleton.
18771
13105fc1
PB
187722001-09-18 Pascal Bart <pascal.bart@epita.fr>
18773
18774 * src/output.c (output_parser): Delete unused variable actions_dumped.
18775
b0c4483e
PB
187762001-09-07 Pascal Bart <pascal.bart@epita.fr>
18777
18778 * src/output.c (output): Delete call to reader_output_yylsp.
18779 * src/reader.c (reader): Likewise.
ba0fe3c7 18780 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 18781
11d82f03
MA
187822001-09-02 Marc Autret <autret_m@epita.fr>
18783
18784 * src/reader.c: Include muscle_tab.h.
18785 (parse_union_decl): Update.
18786 (parse_macro_decl): Rename parse_muscle_decl.
18787 Update to use renamed functions and variable.
18788 (read_declarations, copy_action, read_additionnal_code, : Updated
18789 with correct variables and functions names.
18790 (packsymbols, reader): Likewise.
342b8b6e 18791
11d82f03 18792 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 18793
11d82f03
MA
18794 * src/output.c: Include muscle_tab.h
18795 In all functions using macro_insert, change by using muscle_insert ().
18796 (macro_obstack): Rename muscle_obstack.
18797 Echo modifications in the whole file.
18798 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
18799 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
18800 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
18801
18802 * src/muscle_tab.h: Update double inclusion macros.
18803 (macro_entry_s): Rename muscle_entry_s.
18804 Update prototypes.
342b8b6e 18805
11d82f03
MA
18806 * src/muscle_tab.c: Include muscle_tab.h.
18807 Rename macro_tabble to muscle_table.
18808 (mhash1, mhash2, mcmp): Use muscle_entry.
18809 (macro_init): Rename muscle_init. Update.
18810 (macro_insert): Rename muscle_insert. Update.
18811 (macro_find): Rename muscle_find. Update.
18812
18813 * src/main.c: Include muscle_tab.h.
18814 (main): Call muscle_init ().
18815 * src/Makefile.am (bison_SOURCES): Echo modifications.
18816
93a37297
MA
188172001-09-02 Marc Autret <autret_m@epita.fr>
18818
f753cd62 18819 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 18820
f753cd62
MA
18821 * src/muscle_tab.c, src/muscle_tab.h: Add files.
18822
188232001-09-02 Marc Autret <autret_m@epita.fr>
18824
18825 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 18826
682d48cd
PB
188272001-09-01 Pascal Bart <pascal.bart@epita.fr>
18828
342b8b6e 18829 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
18830 filename.
18831
087c8fda
MA
188322001-09-01 Marc Autret <autret_m@epita.fr>
18833
18834 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
18835 to an explicit value to activate the feature. We do it here.
18836
dda680cb
PB
188372001-08-31 Pascal Bart <pascal.bart@epita.fr>
18838
18839 * src/output.c (prepare): Delete the `filename' muscule insertion.
18840 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
18841 (parse_union_decl): Likewise.
18842 * src/macrotab.c (macro_init): Initialize filename by infile.
18843
9e644e64
MA
188442001-08-31 Marc Autret <autret_m@epita.fr>
18845
18846 * src/bison.simple (YYLSP_NEEDED): New definition.
18847 * src/output.c (prepare): Add macro insertion of `locations_flag'
18848
17da6427
PB
188492001-08-31 Pascal Bart <pascal.bart@epita.fr>
18850
18851 * src/output.c (prepare): Delete insertion of previous muscles,
18852 and insert the `prefix' muscles.
18853 * src/macrotab.c (macro_init): Likewise.
18854 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 18855 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
18856 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
18857 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 18858 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
18859 name_prefix.
18860
e8cb70b9
PB
188612001-08-31 Pascal Bart <pascal.bart@epita.fr>
18862
18863 * src/main.c (main): Standardize.
18864 * src/output.c (output_table_data, output_parser): Likewise.
18865 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
18866
63c2d5de
MA
188672001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
18868
342b8b6e 18869 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
18870 %%epilogue.
18871 * src/output.c (output): Rename %%declarations to %%prologue.
18872 * src/bison.simple: Echo modifications.
342b8b6e 18873
d8cb5183
MA
188742001-08-31 Marc Autret <autret_m@epita.fr>
18875
18876 * src/reader.c (readgram): CleanUp.
18877 (output_token_defines): Likewise.
18878 (packsymbols): Likewise.
18879 (reader): Likewise.
18880 * src/output.c (output): CPP-out useless code.
18881
6c686258
PB
188822001-08-31 Pascal Bart <pascal.bart@epita.fr>
18883
342b8b6e 18884 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
18885 output_trailers and output_headers.
18886 * src/output.h: Remove obsolete functions prototypes of output_headers
18887 and output_trailers.
18888
8f451ef7
PB
188892001-08-30 Pascal Bart <pascal.bart@epita.fr>
18890
18891 * src/main.c: Include macrotab.h.
342b8b6e 18892 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
18893 Adjust functions prototypes.
18894 * src/macrotab.c (macro_insert): Constify key and value.
18895 (macro_find): Constify key.
18896 (macro_insert): Include 'xalloc.h'
18897 (macro_insert): Use XMALLOC.
18898 (macro_find): Constify return value.
18899 * src/output.c (output_table_data): Rename table to table_data.
18900 (output_parser): Constify macro_key, macro_value.
18901
997b6fd0 189022001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
18903
18904 * src/reader.c (parse_skel_decl): New.
342b8b6e 18905 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
18906 * src/lex.h (token_t): New token `tok_skel'.
18907 * src/lex.c (percent_table): Add skeleton option entry.
18908 Standardize.
18909
ff48177d
MA
189102001-08-29 Marc Autret <autret_m@epita.fr>
18911
18912 * src/bison.simple: Add %%user_code directive at the end.
18913 * src/reader.c (read_additionnal_code): New.
18914 (reader): Use it.
18915 * src/output.c (output_program): Remove.
18916 (output): Update.
18917
b33160bf
MA
189182001-08-28 Marc Autret <autret_m@epita.fr>
18919
18920 * src/output.c (output_actions): Clean up.
4e5caae2 18921 (output_gram): CPP-out useless code.
b33160bf
MA
18922 * src/reader.c (reader): Clean up, CPP-out useless code.
18923
d1a2daf7
PB
189242001-08-28 Pascal Bart <pascal.bart@epita.fr>
18925
342b8b6e 18926 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 18927 directive.
d1a2daf7
PB
18928 * src/bison.simple: Add `%%definitions'.
18929
2b763dfe
MA
189302001-08-28 Marc Autret <autret_m@epita.fr>
18931
18932 * config/depcomp: New file.
18933
f1a87ef6
PE
189342001-08-27 Paul Eggert <eggert@twinsun.com>
18935
18936 * src/bison.simple (yyparse): Don't take the address of an
18937 item before the start of an array, as that doesn't conform to
18938 the C Standard.
18939
82e236e2
RA
189402001-08-27 Robert Anisko <robert.anisko@epita.fr>
18941
f1a87ef6 18942 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
18943 obstack. It was done too late here.
18944
18945 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
18946 completely wrong.
18947 (reader): Initialize the macro obstack here, since we need it to grow
18948 '%define' directives.
18949
18950 * src/reader.h: Declare the macro obstack as extern.
18951
b0cfa28a
RA
189522001-08-27 Robert Anisko <robert.anisko@epita.fr>
18953
18954 * src/output.c (output_parser): Fix. Store single '%' characters in
18955 the output obstack instead of throwing them away.
18956
6fc74234
AD
189572001-08-27 Akim Demaille <akim@epita.fr>
18958
18959 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18960
9c76d118
RA
189612001-08-25 Robert Anisko <robert.anisko@epita.fr>
18962
18963 * lib/Makefile.am: Adjust.
18964
a8289c62
RA
189652001-08-25 Robert Anisko <robert.anisko@epita.fr>
18966
18967 * src/bison.simple: Update and add '%%' directives.
18968
b6610515
RA
189692001-08-25 Robert Anisko <robert.anisko@epita.fr>
18970
18971 * src/reader.c (reader): Remove calls to 'output_headers' and
18972 'output_trailers'. Remove some C output.
18973 (readgram): Disable a piece of code that was writing a default
18974 definition for 'YYSTYPE'.
18975 (reader_output_yylsp): Remove.
18976 (packsymbols): Output token defintions to a macro.
18977 (copy_definition): Disable C output.
6fc74234 18978
b6610515
RA
18979 * src/reader.c (parse_macro_decl): New function used to parse macro
18980 declarations.
18981 (copy_string2): Put the body of copy_string into this new function.
18982 Add a parameter to let the caller choose whether he wants to copy the
18983 string delimiters or not.
18984 (copy_string): Be a simple call to copy_string2 with the last argument
18985 bound to true.
18986 (read_declarations): Add case for macro definition.
18987 (copy_identifier): New.
6fc74234 18988 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
18989 rather than lex.
18990
26f609ff
RA
189912001-08-25 Robert Anisko <robert.anisko@epita.fr>
18992
18993 * src/output.c (prepare): Add prefixed names.
18994 (output_parser): Output semantic actions.
18995 (output_parser): Fix bug on '%%line' directives.
6fc74234 18996
26f609ff
RA
18997 * src/output.c (output_headers): Remove. The C code printed by this
18998 function should now be in the skeletons.
18999 (output_trailers): Remove.
19000 (output): Disable call to 'reader_output_yylsp'.
19001 (output_rule_data): Do not output tables to the table obstack.
19002
19003 * src/output.c: Remove some C dedicated output.
19004 Improve the use of macro and output obstacks.
19005 (output_defines): Remove.
6fc74234 19006
26f609ff
RA
19007 * src/output.c (output_token_translations): Associate 'translate'
19008 table with a macro. No output to the table obstack.
19009 (output_gram): Same for 'rhs' and 'prhs'.
19010 (output_stos): Same for 'stos'.
19011 (output_rule_data): Same for 'r1' and 'r2'.
19012 (token_actions): Same for 'defact'.
19013 (goto_actions): Same for 'defgoto'.
19014 (output_base): Same for 'pact' and 'pgoto'.
19015 (output_table): Same for 'table'.
19016 (output_check): Same for 'check'.
6fc74234 19017
26f609ff
RA
19018 * src/output.c (output_table_data): New function.
19019 (output_short_table): Remove.
19020 (output_short_or_char_table): Remove.
6fc74234 19021
26f609ff
RA
19022 * src/output.c (output_parser): Replace most of the skeleton copy code
19023 with something new. Skeletons are now processed character by character
19024 rather than line by line, and Bison looks for '%%' macros. This is the
19025 first step in making Bison's output process (a lot) more flexible.
19026 (output_parser): Use the macro table.
19027
6f43b113
RA
190282001-08-25 Robert Anisko <robert.anisko@epita.fr>
19029
19030 * src/main.c (main): Initialize the macro table.
19031
dd3127cf
RA
190322001-08-25 Robert Anisko <robert.anisko@epita.fr>
19033
19034 * src/lex.c (percent_table): Add tok_define.
19035 * src/lex.h: Add tok_define.
19036
aa321494
RA
190372001-08-25 Robert Anisko <robert.anisko@epita.fr>
19038
19039 * src/macrotab.c: New file.
19040 * src/macrotab.h: New file.
19041 * src/Makefile.am: Update.
19042
68bd3b6b
RA
190432001-08-25 Robert Anisko <robert.anisko@epita.fr>
19044
19045 * lib/hash.c: New file.
19046 * lib/hash.h: New file.
19047 * lib/Makefile.am: Update.
19048
45f8dd1e
AD
190492001-08-15 Akim Demaille <akim@epita.fr>
19050
19051 Version 1.28c.
19052
40a64a7a 190532001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
19054
19055 * src/reader.c (readgram): Indent output macro YYSTYPE.
19056 (packsymbols): Likewise.
19057 (output_token_defines): Likewise.
19058 * src/files.c: Standardize.
19059 (compute_header_macro): New.
19060 (defines_obstack_save): New. Use compute_header_macro.
19061 (output_files): Update. Use defines_obstack_save.
19062
f9a8293a
AD
190632001-08-15 Akim Demaille <akim@epita.fr>
19064
19065 * doc/bison.texinfo (Table of Symbols): Document
19066 YYSTACK_USE_ALLOCA.
19067
150ca7a7
AD
190682001-08-15 Akim Demaille <akim@epita.fr>
19069
19070 * missing: Update from CVS Automake.
19071 * config/config.guess, config/config.sub, config/texinfo.tex:
19072 Update from gnu.org.
19073
69b5cec4
AD
190742001-08-15 Akim Demaille <akim@epita.fr>
19075
19076 * Makefile.maint: Sync with CVS Autoconf.
19077
f2b5126e
PB
190782001-08-14 Pascal Bart <pascal.bart@epita.fr>
19079
69b5cec4 19080 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
19081 `fdl.texi'.
19082 * doc/fdl.texi: Add to package.
19083
4ecbf796
MA
190842001-08-14 Marc Autret <autret_m@epita.fr>
19085
19086 Turn on %{source,header}_extension features.
19087
69b5cec4 19088 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
19089 source_extension.
19090 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 19091 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
19092 between options.
19093
95fb5662
MA
190942001-08-14 Marc Autret <autret_m@epita.fr>
19095
19096 * src/files.c (compute_base_names): Add extensions computing when
19097 `--file-prefix' used.
19098 Standardize function calls.
19099
78d09da9
MA
191002001-08-13 Marc Autret <autret_m@epita.fr>
19101
69b5cec4 19102 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
19103 defining it (defined but null disables alloca).
19104
5a009f2c
MA
191052001-08-13 Marc Autret <autret_m@epita.fr>
19106
19107 * src/bison.simple (_yy_memcpy): CPP reformat.
19108
1e41465a
PB
191092001-08-13 Pascal Bart <pascal.bart@epita.fr>
19110
19111 * tests/atconfig.in (CPPFLAGS): Fix.
19112
c67a198d
PB
191132001-08-10 Pascal Bart <pascal.bart@epita.fr>
19114
79282c6c 19115 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
19116 `gpl.texi'.
19117 * doc/gpl.texi: Add to package.
19118
09a6de7e
MA
191192001-08-10 Marc Autret <autret_m@epita.fr>
19120
19121 * src/print_graph.h: Fix.
19122 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
19123
b77b9ee0
AD
191242001-08-10 Akim Demaille <akim@epita.fr>
19125
19126 * src/system.h: Provide default declarations for stpcpy, strndup,
19127 and strnlen.
19128
3e259915
MA
191292001-08-10 Robert Anisko <anisko_r@epita.fr>
19130
19131 * doc/bison.texinfo (Locations): Update @$ stuff.
19132
ca96bc2d
MA
191332001-08-09 Robert Anisko <anisko_r@epita.fr>
19134
19135 * src/bison.simple (YYLLOC_DEFAULT): Update.
19136 (yyparse): Adjust.
19137
fdc6758b
MA
191382001-08-08 Marc Autret <autret_m@epita.fr>
19139
b77b9ee0 19140 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
19141 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
19142 Reported by Fabrice Bauzac.
957d4dbf 19143
600cad3b
MA
191442001-08-08 Marc Autret <autret_m@epita.fr>
19145
19146 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
19147 * src/vcg.c (output_node): Fix.
19148 * src/vcg.h: Cleanup.
19149 * src/print_graph.c: Add comments.
b77b9ee0 19150 (node_output_size): New global variable. Simplify the formatting of
600cad3b 19151 the VCG graph output.
b77b9ee0 19152 (print_actions): Unused code is now used. It notifies the final state
600cad3b 19153 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 19154 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
19155 blue.
19156 Get the current node name and node_obstack by argument.
19157 (node_obstack): New variable.
19158 (print_state): Manage node_obstack.
19159 (print_core): Use node_obstack given by argument.
19160 A node is not only computed here but in print_actions also.
19161 (print_graph): CPP out useless code instead of commenting it.
19162
976e528f
AD
191632001-08-07 Pascal Bart <pascal.bart@epita.fr>
19164
19165 * tests/atconfig.in (CPPFLAGS): Fix.
19166
20e8e5ca
AD
191672001-08-07 Akim Demaille <akim@epita.fr>
19168
19169 * src/print_graph.c (quote): New.
19170 (print_core): Use it.
19171
957d4dbf 191722001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 19173
3e3da797
AD
19174 * src/vcg.c (complain.h): Include it.
19175 Unepitaize `return' invocations.
c4b66126 19176 [NDEBUG] (main): Remove.
79282c6c 19177 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
19178 * src/files.c (open_files): Initialize graph_obstack.
19179 * src/print_graph.c (print_actions): CPP out useless code.
19180 (print_core): Don't output the last `\n' in labels.
19181 Use `quote'.
19182 * src/files.c (output_files): Output the VCG file.
19183 * src/main.c (main): Invoke print_graph ();
3e3da797 19184
957d4dbf 191852001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
19186
19187 Automaton VCG graph output.
19188 Using option ``-g'' or long option ``--graph'', you can generate
19189 a gram_filename.vcg file containing a VCG description of the LALR (1)
19190 automaton of your grammar.
19191
19192 * src/main.c: Call to print_graph() function.
19193 * src/getargs.h: Update.
19194 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
19195 (graph_flag): New flag.
19196 (longopts): Update.
19197 (getargs): Add case `g'.
19198 * src/files.c (graph_obstack): New obstack struct.
19199 (open_files): Initialize new obstack.
19200 (output_files): Saves graph_obstack if required.
19201 * src/files.h (graph_obstack): New extern declaration.
19202 * src/Makefile.am: Add new source files.
19203
927c1557 192042001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
19205
19206 * src/print_graph.c, src/print_graph.h (graph): New.
19207 * src/vcg.h: New file.
19208 * src/vcg.c: New file, VCG graph handling.
19209
7333d403
AD
192102001-08-06 Marc Autret <autret_m@epita.fr>
19211
19212 Add of %source_extension and %header_extension which specify
19213 the source or/and the header output file extension.
19214
19215 * src/files.c (compute_base_names): Remove initialisation of
19216 src_extension and header_extension.
19217 (compute_exts_from_gf): Update.
19218 (compute_exts_from_src): Update.
19219 (output_files): Update.
19220 * src/reader.c (parse_header_extension_decl): New.
19221 (parse_source_extension_decl): New.
19222 (read_declarations): New case statements for the new tokens.
19223 * src/lex.c (percent_table): Add entries for %source_extension
19224 and %header_extension.
19225 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
19226
84163231
AD
192272001-08-06 Marc Autret <autret_m@epita.fr>
19228
19229 * configure.in: Bump to 1.28c.
19230 * doc/bison.texinfo: Texinfo thingies.
19231
8303fc42
AD
192322001-08-04 Pascal Bart <pascal.bart@epita.fr>
19233
19234 * tests/atconfig.in (CPPFLAGS): Add.
19235 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
19236
70a84437
AD
192372001-08-03 Akim Demaille <akim@epita.fr>
19238
19239 Version 1.28b.
19240
2ce10144
AD
192412001-08-03 Akim Demaille <akim@epita.fr>
19242
19243 * tests/Makefile.am (check-local): Ship testsuite.
19244 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
19245 Include `string.h'.
19246
1e3e4bc1
AD
192472001-08-03 Akim Demaille <akim@epita.fr>
19248
19249 * configure.in: Try using -Wformat when compiling.
19250
42b45b7f
AD
192512001-08-03 Akim Demaille <akim@epita.fr>
19252
19253 * configure.in: Bump to 1.28b.
19254
8f13fe33
AD
192552001-08-03 Akim Demaille <akim@epita.fr>
19256
19257 * src/complain.c: Adjust strerror_r portability issues.
19258
b37ba92c
AD
192592001-08-03 Akim Demaille <akim@epita.fr>
19260
19261 Version 1.28a.
19262
b0ce6046
AD
192632001-08-03 Akim Demaille <akim@epita.fr>
19264
19265 * src/getargs.c, src/getarg.h (skeleton)): Constify.
19266 * src/lex.c (literalchar): Avoid name clashes on `buf'.
19267 * src/getargs.c: Include complain.h.
19268 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
19269 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
19270
d01c415b
AD
192712001-08-03 Akim Demaille <akim@epita.fr>
19272
19273 * src/reader.c (readgram): Display hidden chars in error messages.
19274
459dd1a6
AD
192752001-08-03 Akim Demaille <akim@epita.fr>
19276
19277 Update to gettext 0.10.39.
19278
53b74c0c
AD
192792001-08-03 Akim Demaille <akim@epita.fr>
19280
19281 * lib/strspn.c: New.
19282
234a3be3
AD
192832001-08-01 Marc Autret <autret_m@epita.fr>
19284
19285 * doc/bison.texinfo: Update.
19286 * doc/bison.1 (mandoc): Update.
19287 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
19288 * src/files.c: Support output files extensions computing.
19289 (src_extension): New static variable.
19290 (header_extension): New static variable.
19291 (tr): New function.
19292 (get_extension_index): New function, gets the index of an extension
19293 filename in a string.
19294 (compute_exts_from_gf): New function, computes extensions from the
19295 grammar file extension.
19296 (compute_exts_from_src): New functions, computes extensions from the
19297 C source file extension, file given by ``-o'' option.
19298 (compute_base_names): Update.
19299 (output_files): Update.
19300
847bf1f5
AD
193012001-08-01 Robert Anisko <anisko_r@epita.fr>
19302
d995fee7 19303 * doc/bison.texi: Document @$.
847bf1f5
AD
19304 (Locations): New section.
19305
d074a105
AD
193062001-07-18 Akim Demaille <akim@epita.fr>
19307
19308 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
19309 * config/prev-version.txt, config/move-if-change: New.
19310 * Makefile.am: Adjust.
19311
3419715d
AD
193122001-07-08 Pascal Bart <pascal.bart@epita.fr>
19313
19314 * src/bison.simple (yyparse): Suppress warning `comparaison
19315 between signed and unsigned'.
19316
62ab6972
AD
193172001-07-05 Pascal Bart <pascal.bart@epita.fr>
19318
19319 * src/getargs.h (raw_flag): Remove.
19320 * src/getargs.c: Die on `-r'/`--raw'.
19321 * src/lex.c (parse_percent_token): Die on `%raw'.
19322 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
19323 * tests/calc.at: Suppress test with option `--raw'.
19324
1e24cc5b
AD
193252001-07-14 Akim Demaille <akim@epita.fr>
19326
19327 * config/: New.
19328 * configure.in: Require Autoconf 2.50.
19329 Update to gettext 0.10.38.
19330
32dfccf8
AD
193312001-03-16 Akim Demaille <akim@epita.fr>
19332
19333 * doc/bison.texinfo: ANSIfy the examples.
19334
cd5bd6ac
AD
193352001-03-16 Akim Demaille <akim@epita.fr>
19336
19337 * getargs.c (skeleton): New variable.
19338 (longopts): --skeleton is a new option.
19339 (shortopts, getargs): -S is a new option.
19340 * getargs.h: Declare skeleton.
19341 * output.c (output_parser): Use it.
19342
5141b016
AD
193432001-03-16 Akim Demaille <akim@epita.fr>
19344
19345 * m4/strerror_r.m4: New.
19346 * m4/error.m4: Run AC_FUNC_STRERROR_R.
19347 * lib/error.h, lib/error.c: Update.
19348
447992b9
AD
193492001-03-16 Akim Demaille <akim@epita.fr>
19350
19351 * src/getargs.c (longopts): Clean up.
19352
274d42ce
AD
193532001-02-21 Akim Demaille <akim@epita.fr>
19354
19355 * src/reader.c (gensym): `gensym_count' is your own.
19356 Use a static buf to create the symbol name, as token_buffer is no
19357 longer a buffer.
19358
22c821f3
AD
193592001-02-08 Akim Demaille <akim@epita.fr>
19360
19361 * src/conflicts.c (conflict_report): Be sure not to append to res
19362 between two calls, which could happen if both first sprintf were
19363 skipped, but not the first cp += strlen.
19364
18569462
AD
193652001-02-08 Akim Demaille <akim@epita.fr>
19366
19367 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
19368 New, from fileutils 4.0.37.
19369 * configure.in: Require Autoconf 2.49c. I took some time before
19370 making this decision. This is the only way out for portability
19371 issues in Bison, it would mean way too much duplicate effort to
19372 import in Bison features implemented in 2.49c since 2.13.
19373 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
19374
0d8f3c8a
AD
193752001-02-02 Akim Demaille <akim@epita.fr>
19376
19377 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 19378 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 19379
f17bcd1f
AD
193802001-01-19 Akim Demaille <akim@epita.fr>
19381
19382 Get rid of the ad hoc handling of token_buffer in the scanner: use
19383 the obstacks.
19384
19385 * src/lex.c (token_obstack): New.
19386 (init_lex): Initialize it. No longer call...
19387 (grow_token_buffer): this. Remove it.
19388 Adjust all the places which used it to use the obstack.
19389
511e79b3
AD
193902001-01-19 Akim Demaille <akim@epita.fr>
19391
19392 * src/lex.h: Rename all the tokens:
19393 s/\bENDFILE\b/tok_eof/g;
19394 s/\bIDENTIFIER\b/tok_identifier/g;
19395 etc.
19396 Let them be enums, not #define, to ease debugging.
19397 Adjust all the code.
19398
0d6508ef
AD
193992001-01-18 Akim Demaille <akim@epita.fr>
19400
19401 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
19402 * src/lex.c (maxtoken, grow_token_buffer): Static.
19403
6deb4447
AD
194042001-01-18 Akim Demaille <akim@epita.fr>
19405
19406 Since we now use obstacks, more % directives can be enabled.
19407
19408 * src/lex.c (percent_table): Also accept `%yacc',
19409 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
19410 `%debug'.
19411 Handle the actions for `%semantic_parser' and `%pure_parser' here,
19412 instead of returning a token.
19413 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
19414 * src/reader.c (read_declarations): Adjust.
19415 * src/files.c (open_files): Don't call `compute_base_names', don't
19416 compute `attrsfile' since they depend upon data which might be
19417 *in* the input file now.
19418 (output_files): Do it here.
19419 * src/output.c (output_headers): Document the fact that this patch
19420 introduces a guaranteed SEGV for semantic parsers.
19421 * doc/bison.texinfo: Document them.
19422 * tests/suite.at: Exercise these %options.
19423
ff4423cc
AD
194242000-12-20 Akim Demaille <akim@epita.fr>
19425
19426 Also handle the output file (--verbose) with obstacks.
19427
19428 * files.c (foutput): Remove.
19429 (output_obstack): New.
19430 Adjust all dependencies.
19431 * src/conflicts.c: Return a string.
19432 * src/system.h (obstack_grow_string): Rename as...
19433 (obstack_sgrow): this. Be ready to work with non literals.
19434 (obstack_fgrow4): New.
19435
956dba3a
AD
194362000-12-20 Akim Demaille <akim@epita.fr>
19437
19438 * src/files.c (open_files): Fix the computation of short_base_name
19439 in the case of `-o foo.tab.c'.
19440
337bab46
AD
194412000-12-20 Akim Demaille <akim@epita.fr>
19442
19443 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
19444 (copy_dollar): Now that everything uses obstacks, get rid of the
19445 FILE * parameters.
19446
5d3214b8
AD
194472000-12-20 Akim Demaille <akim@epita.fr>
19448
19449 * src/files.c (open_files): Actually the `.output' file is based
19450 on the short_base_name, not base_name.
19451 * tests/suite.at (Checking output file names): Adjust.
19452
29092a57
AD
194532000-12-20 Akim Demaille <akim@epita.fr>
19454
19455 * src/bison.s1: Remove, we now use directly...
19456 * src/bison.simple: this.
19457 * src/Makefile.am: Use pkgdata instead of data.
19458
ea5607fd
AD
194592000-12-20 Akim Demaille <akim@epita.fr>
19460
19461 * src/files.c (guard_obstack): New.
19462 (open_files): Initialize it.
19463 (output_files): Dump it...
19464 * src/files.h: Export it.
19465 * src/reader.c (copy_guard): Use it.
19466
27110317
AD
194672000-12-19 Akim Demaille <akim@epita.fr>
19468
19469 * src/files.c (outfile, defsfile, actfile): Removed as global
19470 vars.
19471 (open_files): Don't compute them.
19472 (output_files): Adjust.
19473 (base_name, short_base_name): Be global.
19474 Adjust dependencies.
19475
19c50364
AD
194762000-12-19 Akim Demaille <akim@epita.fr>
19477
19478 * src/files.c (strsuffix): New.
19479 (stringappend): Be just like strcat but allocate.
19480 (base_names): Eve out from open_files.
19481 Try to simplify the rather hairy computation of base_name and
19482 short_base_name.
19483 (open_files): Use it.
19484 * tests/suite.at (Checking output file names): New test.
19485
573c1d9f
AD
194862000-12-19 Akim Demaille <akim@epita.fr>
19487
19488 * src/system.h (obstack_grow_literal_string): Rename as...
19489 (obstack_grow_string): this.
19490 * src/output.c (output_parser): Recognize `%% actions' instead of
19491 `$'.
19492 * src/bison.s1: s/$/%% actions/.
19493 * src/bison.hairy: Likewise.
19494
ef7ddedd
AD
194952000-12-19 Akim Demaille <akim@epita.fr>
19496
19497 * src/output.c (output_parser): Compute the `#line' lines when
19498 there are.
19499 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
19500 Suggested by Hans Aberg.
19501
ff61dabd
AD
195022000-12-19 Akim Demaille <akim@epita.fr>
19503
19504 Let the handling of the skeleton files be local to the procedures
19505 that use it.
19506
19507 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
19508 longer static.
19509 (fparser, open_extra_files): Remove.
19510 (open_files, output_files): Don't take care of fparser.
19511 * src/files.h: Adjust.
19512 * src/output.c (output_parser): Open and close the file to the
19513 skeleton.
19514 * src/reader.c (read_declarations): When %semantic_parser, open
19515 fguard.
19516
55b96341
AD
195172000-12-19 Akim Demaille <akim@epita.fr>
19518
19519 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
19520 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
19521
358c15b7
AD
195222000-12-19 Akim Demaille <akim@epita.fr>
19523
19524 * src/files.c (open_files): Yipee! We no longer need all the code
19525 looking for `/tmp' since we have no tmp file.
19526
7de3329e
AD
195272000-12-19 Akim Demaille <akim@epita.fr>
19528
19529 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
19530 New macros.
19531 * src/files.c (open_files): Less dependency on MSDOS etc.
19532
3abcd459
AD
195332000-12-14 Akim Demaille <akim@epita.fr>
19534
19535 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
19536 Provide a default definition.
19537 Use it when executing the default @ action.
19538 * src/reader.c (reader_output_yylsp): No longer include
19539 `timestamp' and `text' in the default YYLTYPE.
19540
2a91a95e
AD
195412000-12-12 Akim Demaille <akim@epita.fr>
19542
19543 * src/reader.c (copy_definition, parse_union_decl, copy_action)
19544 (copy_guard): Quote the file names.
19545 Reported by Laurent Mascherpa.
19546
14d3eb9b
AD
195472000-12-12 Akim Demaille <akim@epita.fr>
19548
19549 * src/output.c (output_headers, output_program, output): Be sure
19550 to escape special characters when outputting filenames.
19551 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
19552 (output_headers): Don't depend on them, Use ACTSTR.
19553
d7045ec6
AD
195542000-11-17 Akim Demaille <akim@epita.fr>
19555
19556 * lib/obstack.h: Formatting changes.
19557 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
19558 prevents type checking.
19559 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
19560 cast the value to (void *): assigning a `foo *' to a `void *'
19561 variable is valid.
19562 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
19563 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
19564 append characters.
19565
6fd54b73
AD
195662000-11-17 Akim Demaille <akim@epita.fr>
19567
19568 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
19569 as...
19570 (suite.m4, regression.m4, calc.m4): these.
19571 * tests/atgeneral.m4: Update from CVS Autoconf.
19572
4c50eae6
AD
195732000-11-17 Akim Demaille <akim@epita.fr>
19574
19575 * tests/regression.m4 (%union and --defines): New test,
19576 demonstrating a current bug in the obstack implementation.
19577
a35f64ea
AD
195782000-11-17 Akim Demaille <akim@epita.fr>
19579
19580 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
19581 macros.
19582 Use them to declare the variables which are global or local to
19583 `yyparse'.
19584
7de23534
AD
195852000-11-17 Akim Demaille <akim@epita.fr>
19586
19587 * acconfig.h: Remove, no longer used.
19588
aa7815f5
AD
195892000-11-07 Akim Demaille <akim@epita.fr>
19590
19591 * src: s/Copyright (C)/Copyright/g.
19592
5af1f549
AD
195932000-11-07 Akim Demaille <akim@epita.fr>
19594
19595 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
19596 defining.
19597 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
19598
553e2b22
AD
195992000-11-07 Akim Demaille <akim@epita.fr>
19600
19601 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
19602 Merge in a single CPP if/else.
19603
8a4f41d6
AD
196042000-11-07 Akim Demaille <akim@epita.fr>
19605
19606 * src/output.c (output): Remove useless variables.
19607 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
19608 argument `data' for consistency with the prototypes.
19609 Qualify it `const'.
19610 (obstack_copy, obstack_copy0): Rename the second argument as
19611 `address' for consistency. Qualify it `const'.
19612 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
19613 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
19614 `const' their input argument (`data' or `address').
19615 Adjust the corresponding macros to include `const' in casts.
19616
095a3fb5
AD
196172000-11-03 Akim Demaille <akim@epita.fr>
19618
19619 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
19620 s/PFILE1/BISON_HAIRY/.
19621 Adjust dependencies.
19622
d1cdce7c
AD
196232000-11-03 Akim Demaille <akim@epita.fr>
19624
090c5ebf 19625 For some reason, this was not applied.
d1cdce7c
AD
19626
19627 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
19628 `unlink': it's no longer used.
19629
9311529b
AD
196302000-11-03 Akim Demaille <akim@epita.fr>
19631
19632 * src/files.c (skeleton_find): New function, eved out of...
19633 (open_files, open_extra_files): here.
19634
d8880f69
AD
196352000-11-03 Akim Demaille <akim@epita.fr>
19636
19637 Don't use `atexit'.
19638
19639 * src/files.c (obstack_save): New function.
19640 (done): Rename as...
19641 (output_files): this.
19642 Use `obstack_save'.
19643 * src/main.c (main): Don't use `atexit' to register `done', since
19644 it no longer has to remove tmp files, just call `output_files'
19645 when there are no errors.
19646
0dbb648e
AD
196472000-11-02 Akim Demaille <akim@epita.fr>
19648
19649 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
19650 `unlink': it's no longer used.
19651 * src/files.h: Formatting changes.
19652
896fe5c1
AD
196532000-11-02 Akim Demaille <akim@epita.fr>
19654
19655 Remove the last uses of mktemp and unlink/delete.
19656
19657 * src/files.c (fdefines, ftable): Removed.
19658 (defines_ostack, table_obstack): New.
19659 Adjust dependencies of the former into uses of the latter.
19660 * src/output.c (output_short_or_char_table, output_short_table):
19661 Convert to using obstacks.
19662 * src/reader.c (copy_comment2): Accept one FILE * and two
19663 obstacks.
19664 (output_token_defines, reader_output_yylsp): Use obstacks.
19665 * src/system.h (obstack_fgrow3): New.
1f65350a 19666 * po/POTFILES.in: Adjust.
896fe5c1 19667
dd60faec
AD
196682000-11-01 Akim Demaille <akim@epita.fr>
19669
19670 Change each use of `fattrs' into a use of `attrs_obstack'.
19671
19672 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
19673 * src/files.c (fattrs): Remove.
19674 (attrs_obstack): New.
19675 Adjust all dependencies.
19676 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
19677
8c7ebe49
AD
196782000-11-01 Akim Demaille <akim@epita.fr>
19679
19680 Introduce obstacks.
19681 Change each use of `faction' into a use of `action_obstack'.
19682
19683 * lib/obstack.h, lib/obstack.c: New files.
19684 * src/files.c (faction): Remove.
19685 (action_obstack): New.
19686 Adjust all dependencies.
19687
77aee789
AD
196882000-10-20 Akim Demaille <akim@epita.fr>
19689
19690 * lib/quote.h (PARAMS): New macro. Use it.
19691
43591cec
AD
196922000-10-16 Akim Demaille <akim@epita.fr>
19693
19694 * src/output.c (output_short_or_char_table): New function.
19695 (output_short_table, output_token_translations): Use it.
19696 (goto_actions): Use output_short_table.
19697
1e9798d5
AD
196982000-10-16 Akim Demaille <akim@epita.fr>
19699
19700 * src/symtab.c (bucket_new): New function.
19701 (getsym): Use it.
19702
19703 * src/output.c (output_short_table): New argument to display the
19704 comment associated with the table.
19705 Adjust dependencies.
19706 (output_gram): Use it.
19707 (output_rule_data): Nicer output layout for YYTNAME.
19708
f282676b
AD
197092000-10-16 Akim Demaille <akim@epita.fr>
19710
19711 * src/lex.c (read_typename): New function.
19712 (lex): Use it.
19713 * src/reader.c (copy_dollar): Likewise.
19714
550a72a3
AD
197152000-10-16 Akim Demaille <akim@epita.fr>
19716
19717 * src/reader.c (copy_comment2): Expect the input stream to be on
19718 the `/' which is suspected to open a comment, instead of being
19719 called after `//' or `/*' was read.
19720 (copy_comment, copy_definition, parse_union_decl, copy_action)
19721 (copy_guard): Adjust.
19722
131e2fef
AD
197232000-10-16 Akim Demaille <akim@epita.fr>
19724
19725 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
19726 `read_signed_integer'.
19727
79282c5a
AD
197282000-10-16 Akim Demaille <akim@epita.fr>
19729
19730 * src/reader.c (copy_dollar): New function.
19731 (copy_guard, copy_action): Use it.
19732
ff4a34be
AD
197332000-10-16 Akim Demaille <akim@epita.fr>
19734
19735 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
19736 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
19737 New files, from Fileutils 4.0.27.
19738 * src/main.c (printable_version): Remove.
19739 * src/lex.c, src/reader.c: Use `quote'.
19740
197412000-10-04 Akim Demaille <akim@epita.fr>
19742
19743 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
19744
14ded682
AD
197452000-10-04 Akim Demaille <akim@epita.fr>
19746
19747 * doc/bison.texinfo: Various typos spotted by Neil Booth.
19748
8e03724b
AD
197492000-10-04 Akim Demaille <akim@epita.fr>
19750
19751 When a literal string is used to define two different tokens,
19752 `bison -v' segfaults.
19753 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
19754
19755 * tests/regression.m4: New file.
19756 Include the core of the sample provided by Piotr Gackiewicz.
19757 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
19758 properly.
19759
a9e64249
AD
197602000-10-04 Akim Demaille <akim@epita.fr>
19761
19762 * src/reader.c (parse_expect_decl): Keep `count' within the size
19763 of `buffer'.
19764 From Neil Booth.
19765
da9abf43
AD
197662000-10-02 Paul Eggert <eggert@twinsun.com>
19767
19768 * bison.s1 (yyparse): Assign the default value
19769 unconditionally, to avoid a GCC warning and make the parser a
19770 tad smaller.
19771
c33638bb
AD
197722000-10-02 Akim Demaille <akim@epita.fr>
19773
19774 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
19775 options.
19776
444c570a
AD
197772000-10-02 Akim Demaille <akim@epita.fr>
19778
19779 * src/derives.c, src/print.c, src/reduce.c: To ease the
19780 translation, move some `\n' out of the translated strings.
19781
89cab50d
AD
197822000-10-02 Akim Demaille <akim@epita.fr>
19783
19784 The location tracking mechanism is precious for parse error
19785 messages. Nevertheless, it is enabled only when `@n' is used in
19786 the grammar, which is a different issue (you can use it in error
19787 message, but not in the grammar per se). Therefore, there should
19788 be another means to enable it.
19789
19790 * src/getargs.c (getargs): Support `--locations'.
19791 (usage): Report it.
19792 * src/getargs.h (locationsflag): Export it.
19793 * src/lex.c (percent_table): Support `%locations'.
19794 * src/reader.c (yylsp_needed): Remove this variable, now replaced
19795 with `locationsflag'.
19796 * doc/bison.texinfo: Document `--locations' and `%locations'.
19797 Sort the options.
19798 * tests/calc.m4: Test it.
19799
19800 For regularity of the names, replace each
19801 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
19802 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
19803 In addition replace each `flag' with `_flag'.
19804
d6c2cba0
AD
198052000-10-02 Akim Demaille <akim@epita.fr>
19806
19807 Also test parse error messages, including with YYERROR_VERBOSE.
19808
19809 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
19810 associative).
19811 Use it to check the computations.
19812 Use it to check `nonassoc' is honored.
19813 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
19814 `--yyerror-verbose'.
19815 (_AT_CHECK_CALC): Adjust to this option.
19816 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
19817
5a35a6cb
AD
198182000-10-02 Akim Demaille <akim@epita.fr>
19819
19820 Test also `--verbose', `--defines' and `--name-prefix'. Testing
19821 the latter demonstrates a flaw in the handling of non debugging
19822 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
19823 was used in order to simplify:
19824
19825 #if YYDEBUG
19826 if (yydebug)
19827 {
19828 ...
19829 }
19830 #endif
19831
19832 into
19833
19834 if (yydebug)
19835 {
19836 ...
19837 }
19838
19839 unfortunately this leads to a CPP conflict when
19840 `--name-prefix=foo' is used since it produces `#define yydebug
19841 foodebug'.
19842
19843 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
19844 (YYDPRINTF): New macro.
19845 Spread its use.
19846 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
19847 the bison options.
19848 Also test `--verbose', `--defines' and `--name-prefix'.
19849
71da9eea
AD
198502000-10-02 Akim Demaille <akim@epita.fr>
19851
19852 Improve the readability of the produced parsers.
19853
19854 * src/bison.s1: Formatting changes.
19855 Improve the comment related to the `$' mark.
19856 (yydefault): Don't fall through to `yyresume': `goto' there.
19857 * src/output.c (output_parser): When the `$' is met, skip the end
19858 of its line.
19859 New variable, `number_of_dollar_signs', to check there's exactly
19860 one `$' in the parser skeleton.
19861
95e36146
AD
198622000-10-02 Akim Demaille <akim@epita.fr>
19863
19864 * lib/xstrdup.c: New file, from the fileutils.
19865 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
19866 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
19867 instead of strlen + xmalloc + strcpy.
19868 * src/symtab.c (copys): Remove, use xstrdup instead.
19869
d7020c20
AD
198702000-10-02 Akim Demaille <akim@epita.fr>
19871
19872 * src/gram.h (associativity): New enum type which replaces the
19873 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
19874 `right_assoc', `left_assoc' and `non_assoc'.
19875 Adjust all dependencies.
19876 * src/reader.c: Formatting changes.
19877 (LTYPESTR): Don't define it, use it as a literal in
19878 `reader_output_yylsp'.
19879 * src/symtab.h (symbol_class): New enum type which replaces the
19880 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
19881 `sunknown', `stoken and `snterm'.
19882
1916f98e
AD
198832000-10-02 Akim Demaille <akim@epita.fr>
19884
19885 * src/getargs.c (fixed_outfiles): Rename as...
19886 (yaccflag): for consistency and accuracy.
19887 Adjust dependencies.
19888
d7913476
AD
198892000-10-02 Akim Demaille <akim@epita.fr>
19890
19891 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
19892 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
19893 difficult and introduced a lot of core dump. It turns out that
19894 Bison used an implementation of `xmalloc' based on `calloc', and
19895 at various places it does depend upon the initialization to 0. I
19896 have not tried to isolate the pertinent places, and all the former
19897 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
19898 someone should address this issue.
19899
19900 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
19901 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
19902 files.
19903 Adjust dependencies.
19904 * src/warshall.h: New file.
19905 Propagate.
19906
340ef489
AD
199072000-10-02 Akim Demaille <akim@epita.fr>
19908
19909 Various anti-`extern in *.c' changes.
19910
19911 * src/system.h: Include `assert.h'.
19912
b2ca4022
AD
199132000-10-02 Akim Demaille <akim@epita.fr>
19914
19915 * src/state.h (nstates, final_state, first_state, first_shift)
19916 (first_reduction): Move their exportation from here...
19917 * src/LR0.h: to here.
19918 Adjust dependencies.
19919 * src/getargs.c (statisticsflag): New variable.
19920 Add support for `--statistics'.
19921 Adjust dependencies.
19922
19923 Remove a lot of now useless `extern' statements in most files.
19924
403b315b
AD
199252000-10-02 Akim Demaille <akim@epita.fr>
19926
19927 * src/LR0.h: New file.
19928 Propagate its use.
19929
07a58c13
AD
199302000-10-02 Akim Demaille <akim@epita.fr>
19931
19932 * src/print.h: New file.
19933 Propagate its use.
19934 * src/print.c: Formatting and ordering changes.
19935 (verbose, terse): Replace with...
19936 (print_results): this new function.
19937 Adjust dependencies.
19938
0619caf0
AD
199392000-10-02 Akim Demaille <akim@epita.fr>
19940
19941 * src/conflicts.c (conflict_report): New function.
19942 (conflict_log, verbose_conflict_log): Replace with...
19943 (print_conflicts): this function.
19944 Adjust dependencies.
19945 * src/conflicts.h: New file.
19946 Propagate its inclusion.
19947
3519ec76
AD
199482000-10-02 Akim Demaille <akim@epita.fr>
19949
19950 * src/nullable.h: New file.
19951 Propagate its inclusion.
19952 * src/nullable.c: Formatting changes.
19953
015acc48
AD
199542000-10-02 Akim Demaille <akim@epita.fr>
19955
19956 * src/reduce.h: New file.
19957 Propagate its inclusion.
19958 * src/reduce.c: Topological sort and other formatting changes.
19959 (bool, TRUE, FALSE): Move their definition to...
19960 * src/system.h: here.
19961
8963a27b
AD
199622000-10-02 Akim Demaille <akim@epita.fr>
19963
19964 * src/files.c: Formatting changes.
19965 (tryopen, tryclose, openfiles): Rename as...
19966 (xfopen, xfclose, open_files): this.
19967 (stringappend): static.
19968 * src/files.h: Complete the list of exported symbols.
19969 Propagate its use.
19970
a70083a3
AD
199712000-10-02 Akim Demaille <akim@epita.fr>
19972
19973 * src/reader.h: New file.
19974 Propagate its use instead of tedious list of `extern' and
19975 prototypes.
19976 * src/reader.c: Formatting changes, topological sort,
19977 s/register//.
19978
abadc117
AD
199792000-10-02 Akim Demaille <akim@epita.fr>
19980
19981 * src/lex.h: Prototype `lex.c' exported functions.
19982 * src/reader.c: Adjust.
19983 * src/lex.c: Formatting changes.
19984 (safegetc): Rename as...
19985 (xgetc): this.
19986
720d742f
AD
199872000-10-02 Akim Demaille <akim@epita.fr>
19988
19989 * src/lalr.h: New file.
19990 Propagate its inclusion instead of prototypes and `extern'.
19991 * src/lalr.c: Formatting changes, topological sorting etc.
19992
f2acea59
AD
199932000-10-02 Akim Demaille <akim@epita.fr>
19994
19995 * src/output.c (token_actions): Introduce a temporary array,
19996 YYDEFACT, that makes it possible for this function to use
19997 output_short_table.
19998
d019d655
AD
199992000-10-02 Akim Demaille <akim@epita.fr>
20000
20001 `user_toknums' is output as a `short[]' in `output.c', while it is
20002 defined as a `int[]' in `reader.c'. For consistency with the
20003 other output tables, `user_toknums' is now defined as a table of
20004 shorts.
20005
20006 * src/reader.c (user_toknums): Be a short table instead of an int
20007 table.
20008 Adjust dependencies.
20009
20010 Factor the short table outputs.
20011
20012 * src/output.c (output_short_table): New function.
20013 * src/output.c (output_gram, output_stos, output_rule_data)
20014 (output_base, output_table, output_check): Use it.
20015
6c89f1c1
AD
200162000-10-02 Akim Demaille <akim@epita.fr>
20017
20018 * src/output.c (output): Topological sort of the functions, in
20019 order to get rid of the `static' prototypes.
20020 No longer use `register'.
20021 * src/output.h: New file.
20022 Propagate its inclusion in files explicitly prototyping functions
20023 from output.c.
20024
d9efd181
AD
200252000-09-21 Akim Demaille <akim@epita.fr>
20026
20027 * src/atgeneral.m4: Update from Autoconf.
20028
c29240e7 200292000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
20030
20031 * src/closure.h: New file.
20032 * src/closure.c: Formatting changes, topological sort over the
20033 functions, use of closure.h.
20034 (initialize_closure, finalize_closure): Rename as...
20035 (new_closure, free_closure): these. Adjust dependencies.
20036 * src/LR0.c: Formatting changes, topological sort, use of
20037 cloture.h.
20038 (initialize_states): Rename as...
20039 (new_states): this.
20040 * src/Makefile.am (noinst_HEADERS): Adjust.
20041
499daa50
AD
200422000-09-20 Akim Demaille <akim@epita.fr>
20043
20044 * src/acconfig.h: Don't protect config.h against multiple
20045 inclusion.
20046 Don't define PARAMS.
20047 * src/system.h: Define PARAMS.
20048 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
20049 purpose of config.h. system.h must not try to fix wrong
20050 definitions in config.h.
20051
cc84fd5d
AD
200522000-09-20 Akim Demaille <akim@epita.fr>
20053
20054 * src/derives.h: New file.
20055 * src/main.c, src/derives.h: Use it.
20056 Formatting changes.
20057 * src/Makefile.am (noinst_HEADERS): Adjust.
20058
db5b3a89
AD
200592000-09-20 Akim Demaille <akim@epita.fr>
20060
20061 * tests/atgeneral.m4: Update from Autoconf.
20062 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
20063 (AT_CHECK_CALC): New macros.
20064 Use these macros to test bison with options `', `--raw',
20065 `--debug', `--yacc', `--yacc --debug'.
20066
ceed8467
AD
200672000-09-19 Akim Demaille <akim@epita.fr>
20068
20069 * src/output.c: Formatting changes.
20070 * src/machine.h: Remove, leaving its contents in...
20071 * src/system.h: here.
20072 Include stdio.h.
20073 Adjust all dependencies on stdio.h and machine.h.
20074 * src/getargs.h: New file.
20075 Let all `extern' declarations about getargs.c be replaced with
20076 inclusion of `getargs.h'.
20077 * src/Makefile.am (noinst_HEADERS): Adjust.
20078
20079 * tests/calc.m4 (yyin): Be initialized in main, not on the global
20080 scope.
20081 (yyerror): Returns void, not int.
20082 * doc/bison.texinfo: Formatting changes.
20083
05a1d24b
AD
200842000-09-19 Akim Demaille <akim@epita.fr>
20085
20086 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
20087 portable.
20088
cbd25751
AD
200892000-09-18 Akim Demaille <akim@epita.fr>
20090
20091 * configure.in: Append WARNING_CFLAGS to CFLAGS.
20092 * src/Makefile.am (INCLUDES): Don't.
20093 Be ready to fetch headers in lib/.
20094
13863333
AD
200952000-09-18 Akim Demaille <akim@epita.fr>
20096
20097 * doc/bison.texinfo: Update the copyright.
20098 ANSIfy and GNUify the examples.
20099 Remove the old menu.
20100
0d533154
AD
201012000-09-18 Akim Demaille <akim@epita.fr>
20102
20103 First set of tests: use the `calc' example from the documentation.
20104
20105 * src/bison.s1 (yyparse): Condition the code using `yytname' which
20106 is defined only when YYDEBUG is.
20107 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
20108 * src/files.c (tryopen, tryclose): Formatting changes.
20109 Move to the top and be static.
20110 * src/reader.c (read_signed_integer): Likewise.
20111 * tests/calc.m4: New file.
20112 * Makefile.am, suite.m4: Adjust.
20113 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
20114
e79137ac
AD
201152000-09-18 Akim Demaille <akim@epita.fr>
20116
20117 Add support for an Autotest test suite for Bison.
20118
20119 * m4/m4.m4, m4/atconfig.m4: New files.
20120 * m4/Makefile.am (EXTRA_DIST): Adjust.
20121 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
20122 files.
20123 * src/getargs.c: Display a more standard --version message.
20124 * src/reader.c (reader): Formatting changes.
20125 No longer depend upon VERSION_STRING.
20126 * configure.in: No longer use `dnl'.
20127 Set up the test suite and the new directory `tests/.
20128 (VERSION_STRING): Remove.
20129
27821bff
AD
201302000-04-14 Akim Demaille <akim@epita.fr>
20131
20132 * src/reader.c (copy_comment2): New function, same as former
20133 `copy_comment', but outputs into two FILE *.
20134 (copy_comment): Use it.
20135 (parse_union_decl): Use it.
20136 (get_type, parse_start_decl): Use the same `invalid' message.
20137 (parse_start_decl, parse_union_decl): Use the same `multiple'
20138 message.
20139 (parse_union_decl, copy_guard, copy_action): Use the same
20140 `unmatched' message.
20141 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
20142
cfe5fbc0
AD
201432000-03-31 Akim Demaille <akim@epita.fr>
20144
20145 * src/files.c (tryopen, tryclose): Move to the top.
20146 Be static.
20147
cb7db13e
AD
201482000-03-31 Akim Demaille <akim@epita.fr>
20149
20150 * src/main.c (main): Don't call `done', exit does it.
20151
a0f6b076
AD
201522000-03-31 Akim Demaille <akim@epita.fr>
20153
36281465
AD
20154 * allocate.c: s/return (foo)/return foo/.
20155 * lalr.c: Likewise.
20156 * LR0.c: Likewise.
20157 * output.c: Likewise.
20158 * reader.c: Likewise.
20159 * symtab.c: Likewise.
20160 * vmsgetargs.c: Likewise.
20161
201622000-03-31 Akim Demaille <akim@epita.fr>
20163
20164 Clean up the error reporting functions.
a0f6b076
AD
20165
20166 * src/report.c: New file.
20167 * src/report.h: Likewise.
20168 * src/Makefile.am: Adjust.
20169 * m4/error.m4: New file.
20170 * m4/Makefile.am: Adjust.
20171 * configure.in (jm_PREREQ_ERROR): Call it.
20172 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
20173 Remove.
20174 (fatal, fatals): Remove. All callers use complain.c::fatal.
20175 (warn, warni, warns, warnss, warnss): Remove. All callers use
20176 complain.c::complain.
20177 (toomany): Remove, use fatal instead.
20178 * src/files.c (done): No argument, use complain_message_count.
20179 * src/main.c (main): Register `done' to `atexit'.
20180
20181 * src/getargs.c (usage): More `fputs', less `fprintf'.
20182
18539825
AD
201832000-03-28 Akim Demaille <akim@epita.fr>
20184
20185 * lib/: New directory.
20186 * Makefile.am (SUBDIRS): Adjust.
20187 * configure.in: Adjust.
20188 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
20189 useless.
20190 * src/alloca.c: Moved to lib/.
20191 * src/getopt.c: Likewise.
20192 * src/getopt1.c: Likewise.
20193 * src/getopt.h: Likewise.
20194 * src/ansi2knr.c: Likewise.
20195 * src/ansi2knr.1: Likewise.
20196 * src/Makefile.am: Adjust.
20197 * lib/Makefile.am: New file.
20198
9f306f2a
AD
201992000-03-28 Akim Demaille <akim@epita.fr>
20200
20201 * src/getargs.c (usage): Refresh the help message.
20202
0ba347b6
AD
202032000-03-17 Akim Demaille <akim@epita.fr>
20204
20205 * src/getopt1.c: Updated from textutils 2.0e
20206 * src/getopt.c: Likewise.
20207 * src/getopt.h: Likewise.
20208
dbe7f271
AD
202092000-03-17 Akim Demaille <akim@epita.fr>
20210
20211 * src/Makefile.am (bison.simple): Fix the awk program: quote only
20212 the file name, not the whole `#line LINE FILE'.
20213
75bbe78d
AD
202142000-03-17 Akim Demaille <akim@epita.fr>
20215
20216 On syntax errors, report the token on which we choked.
20217
aa5fd0ee
AD
20218 * src/bison.s1 (yyparse): In the label yyerrlab, when
20219 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 20220
7b306f52
AD
202212000-03-17 Akim Demaille <akim@epita.fr>
20222
aa5fd0ee 20223 * src/reader.c (copy_at): New function.
7b306f52
AD
20224 (copy_guard): Use it.
20225 (copy_action): Use it.
20226
e87b5700
AD
202272000-03-17 Akim Demaille <akim@epita.fr>
20228
20229 Be kind to translators, save some useless translations.
20230
aa5fd0ee 20231 * src/main.c (banner): New function.
e87b5700
AD
20232 (fatal_banner): Use it.
20233 (warn_banner): Use it.
20234
ae3c3164
AD
202352000-03-17 Akim Demaille <akim@epita.fr>
20236
aa5fd0ee
AD
20237 * src/reader.c (copy_definition): Use copy_string and
20238 copy_comment. Removed now unused `match', `ended',
20239 `cplus_comment'.
ae3c3164
AD
20240 (copy_comment, copy_string): Moved, to be visible from
20241 copy_definition.
20242
4dc58e7c
AD
202432000-03-17 Akim Demaille <akim@epita.fr>
20244
aa5fd0ee
AD
20245 * src/reader.c (copy_string): Declare `static inline'. No
20246 problems with inline, since it is checked by configure.
4dc58e7c
AD
20247 (copy_comment): Likewise.
20248
0a6384c4
AD
202492000-03-17 Akim Demaille <akim@epita.fr>
20250
aa5fd0ee 20251 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 20252
3cef001a
AD
202532000-03-17 Akim Demaille <akim@epita.fr>
20254
aa5fd0ee 20255 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
20256 (copy_action): Use it. Removed now unused `match', `ended',
20257 `cplus_comment'.
20258 (copy_guard): Likewise.
20259
ca36d2ef
AD
202602000-03-17 Akim Demaille <akim@epita.fr>
20261
aa5fd0ee 20262 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
20263 (copy_action): Use it.
20264 (copy_guard): Likewise.
20265
6666f98f
AD
202662000-03-17 Akim Demaille <akim@epita.fr>
20267
20268 Change the handling of @s so that they behave exactly like $s.
20269 There is now a pseudo variable @$ (readble and writable), location
20270 of the lhs of the rule (by default ranging from the location of
20271 the first symbol of the rhs, to the location of the last symbol,
20272 or, if the rhs is empty, YYLLOC).
20273
20274 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
20275 yyval.
20276 (yyparse): When providing a default semantic action, provide a
20277 default location action.
20278 (after the $): No longer change `*YYLSP', just stack YYLOC the
20279 same way you stack YYVAL.
20280 * src/reader.c (read_declarations): Use warns.
20281 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
20282 (copy_action, case '@'): Likewise.
20283 Use a standard error message, to save useless work from
20284 translators.
20285
41aca2e0
AD
202862000-03-17 Akim Demaille <akim@epita.fr>
20287
aa5fd0ee
AD
20288 * src/bison.s1: Formatting and cosmetics changes.
20289 * src/reader.c: Likewise.
41aca2e0
AD
20290 Update the Copyright notice.
20291
dc08c1d5
AD
202922000-03-17 Akim Demaille <akim@epita.fr>
20293
aa5fd0ee
AD
20294 * src/bison.s1 (#line): All set to `#line' only, since the
20295 Makefile now handles them.
dc08c1d5 20296
9ee3c97b
AD
202972000-03-16 Akim Demaille <akim@epita.fr>
20298
20299 * src/output.c (output_rule_data): Output the documentation of
20300 some of the tables.
20301 (Copyright notice): Update.
20302 Formatting changes.
20303
0de741ca
AD
203042000-03-16 Akim Demaille <akim@epita.fr>
20305
20306 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
20307 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
20308 One `#if YYDEBUG' remains, since it uses variables which are
20309 defined only if `YYDEBUG != 0'.
20310
bb10be54
AD
203112000-03-16 Akim Demaille <akim@epita.fr>
20312
20313 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
20314 and related variables so that the similarities are highlighted.
20315
b07b484a
AD
203162000-03-16 Akim Demaille <akim@epita.fr>
20317
20318 * src/bison.s1: Properly indent CPP directives.
20319
361f60b3
AD
203202000-03-16 Akim Demaille <akim@epita.fr>
20321
20322 * src/bison.s1: Properly indent the `alloca' CPP section.
20323
8c44d3ec
AD
203242000-03-16 Akim Demaille <akim@epita.fr>
20325
20326 Do not hard code values of directories in `configure.in'.
20327 Update the `configure' tool chain.
20328
20329 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
20330 src/makefile.am.
20331 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
20332 (AC_OUTPUT): Add m4/Makefile.
20333 Bump to bison 1.28a, 1.29 has never been released.
20334 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
20335 handled via src/Makefile.am.
20336 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
20337 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
20338 autoheader.
20339 * Makefile.am (SUBDIRS): Add m4.
20340 (ACLOCAL_AM_FLAGS): New variable.
20341 (AUTOMAKE_OPTIONS): Add check-news.
20342 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
20343 the proper line number and file name.
20344 (DEFS): Propagate the location of bison library files and of the
20345 locale files.
20346 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
20347 builddir.
20348 * acinclude.m4: Remove, replaced by the directory m4.
20349 * m4/Makefile.am (EXTRA_DIST): New variable.
20350 * m4/gettext.m4: New file, from the fileutils.
20351 * m4/lcmessage.m4: Likewise
20352 * m4/progtest.m4: Likewise.
20353 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
20354
f95997e7
AD
203552000-03-10 Akim Demaille <akim@epita.fr>
20356
20357 * src/closure.c:
20358 Formatting changes of various comments.
20359 Respect the GNU coding standards at various places.
20360 Don't use `_()' when no translation is needed.
20361
203621999-12-13 Jesse Thilo <jthilo@gnu.org>
20363
20364 * src/files.c:
20365 OS/2 honors TMPDIR environment variable.
20366
203671999-12-13 Jesse Thilo <jthilo@gnu.org>
20368
20369 * doc/bison.texinfo: Tweaked spelling and grammar.
20370 Updated ISBN.
20371 Removed reference to price of printed copy.
20372 Mention BISON_SIMPLE and BISON_HAIRY.
20373
203741999-12-13 Jesse Thilo <jthilo@gnu.org>
20375
20376 * configure.in, NEWS:
20377 Bison 1.29 released.
20378
203791999-10-27 Jesse Thilo <jthilo@gnu.org>
20380
20381 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
20382 Added reference card.
20383
203841999-07-26 Jesse Thilo <jthilo@gnu.org>
20385
20386 * po/ru.po: Added Russian translation.
20387
203881999-07-26 Jesse Thilo <jthilo@gnu.org>
20389
20390 * configure.in: Added Russian translation.
20391
203921999-07-06 Jesse Thilo <jthilo@gnu.org>
20393
20394 * configure.in, NEWS, README:
20395 Released version 1.28.
20396
203971999-06-14 Jesse Thilo <jthilo@gnu.org>
20398
20399 * src/system.h:
20400 Squashed redefinition warning on some systems.
20401
20402 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
20403 Have configure build version string instead of relying on ANSI string
20404 concatentation.
20405
204061999-06-14 Jesse Thilo <jthilo@gnu.org>
20407
20408 * po/POTFILES.in: Got rid of version.c.
20409
204101999-06-14 Jesse Thilo <jthilo@gnu.org>
20411
20412 * acconfig.h, configure.in:
20413 Have configure build version string instead of relying on ANSI string
20414 concatentation.
20415
204161999-06-08 Jesse Thilo <jthilo@gnu.org>
20417
20418 * doc/bison.1:
20419 Dropped mention of `+' for long-named options.
20420
204211999-05-30 Jesse Thilo <jthilo@gnu.org>
20422
20423 * src/files.c: Added <unistd.h> for unlink().
20424
20425 * src/Makefile.am, src/system.h:
20426 I18n fixes.
20427
204281999-05-30 Jesse Thilo <jthilo@gnu.org>
20429
20430 * README: Added a FAQ list.
20431
20432 * configure.in, acconfig.h:
20433 I18n fixes.
20434
204351999-05-30 Jesse Thilo <jthilo@gnu.org>
20436
20437 * doc/FAQ, doc/Makefile.am:
20438 Added a FAQ list.
20439
204401999-05-19 Jesse Thilo <jthilo@gnu.org>
20441
20442 * src/alloc.h, src/symtab.h, src/version.c:
20443 Protected inclusion of "config.h" with HAVE_CONFIG_H.
20444
204451999-04-18 Jesse Thilo <jthilo@gnu.org>
20446
20447 * src/.cvsignore, src/Makefile.am:
20448 Reorganized: sources in `src', documentation in `doc'.
20449
20450 * src/lex.c (literalchar):
20451 fixed the code for escaping double quotes (thanks
20452 Jonathan Czisny.)
20453
204541999-04-18 Jesse Thilo <jthilo@gnu.org>
20455
20456 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
20457 Adjusted paths to reflect directory reorganization.
20458
204591999-04-18 Jesse Thilo <jthilo@gnu.org>
20460
20461 * doc/.cvsignore, doc/Makefile.am:
20462 Reorganized: sources in `src', documentation in `doc'.
20463
204641999-04-18 Jesse Thilo <jthilo@gnu.org>
20465
20466 * configure.in:
20467 Updated AC_INIT file to reflect directory reorganization.
20468
20469 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
20470 Reorganized: sources in `src', documentation in `doc'.
20471
204721999-04-13 Jesse Thilo <jthilo@gnu.org>
20473
20474 * src/allocate.c:
20475 Don't declare calloc() and realloc() if not necessary.
20476
204771999-04-13 Jesse Thilo <jthilo@gnu.org>
20478
20479 * configure.in, acconfig.h, acinclude.m4:
20480 Don't declare calloc() and realloc() if not necessary.
20481
204821999-03-23 Jesse Thilo <jthilo@gnu.org>
20483
20484 * po/.cvsignore: Added i18n support.
20485
204861999-03-23 Jesse Thilo <jthilo@gnu.org>
20487
20488 * acconfig.h, configure.in, Makefile.am:
20489 Added i18n support.
20490
204911999-03-22 Jesse Thilo <jthilo@gnu.org>
20492
20493 * src/bison.s1: Fixed #line numbers.
20494
204951999-03-15 Jesse Thilo <jthilo@gnu.org>
20496
20497 * po/es.po, po/fr.po, po/nl.po, po/de.po:
20498 Added PO files from Translation Project.
20499
205001999-03-03 Jesse Thilo <jthilo@gnu.org>
20501
20502 * Makefile.am:
20503 Added support for non-ANSI compilers (ansi2knr).
20504
205051999-02-16 Jesse Thilo <jthilo@gnu.org>
20506
20507 * configure.in: Bumped version number to 1.27.
20508
20509 * Makefile.am:
20510 Added `bison.simple' to list of files removed by `make distclean'.
20511
205121999-02-12 Jesse Thilo <jthilo@gnu.org>
20513
20514 * src/files.c, src/files.h:
20515 Defined locations of parser files in config.h instead of Makefile.
20516
205171999-02-12 Jesse Thilo <jthilo@gnu.org>
20518
20519 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
20520 Defined locations of parser files in config.h instead of Makefile.
20521
205221999-02-09 Jesse Thilo <jthilo@gnu.org>
20523
20524 * Makefile.am:
20525 Removed inappropriate use of $< macro.
20526
205271999-02-05 Jesse Thilo <jthilo@gnu.org>
20528
20529 * po/Makefile.in.in, po/POTFILES.in:
20530 Add `po' directory skeleton.
20531
205321999-01-27 Jesse Thilo <jthilo@gnu.org>
20533
20534 * README: Document help-bison list.
20535
20536 * configure.in: Add check for mkstemp().
20537
205381999-01-20 Jesse Thilo <jthilo@gnu.org>
20539
20540 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
20541 Hush a few compiler warnings.
20542
20543 * src/files.c:
20544 Add tryclose(), which verifies that fclose was successful.
20545 Hush a couple of compiler warnings.
20546
205471999-01-20 Jesse Thilo <jthilo@gnu.org>
20548
20549 * Makefile.am, OChangeLog:
20550 ChangeLog is now automatically generated. Include the old version as
20551 OChangeLog.
20552
205531999-01-14 Jesse Thilo <jthilo@gnu.org>
20554
20555 * 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:
20556 Update FSF address.
20557
205581999-01-14 Jesse Thilo <jthilo@gnu.org>
20559
20560 * doc/bison.texinfo: Fix formatting glitch.
20561
20562 * doc/bison.texinfo: Update FSF address.
20563
205641999-01-14 Jesse Thilo <jthilo@gnu.org>
20565
20566 * acconfig.h: Update FSF address.
20567
205681999-01-08 Jesse Thilo <jthilo@gnu.org>
20569
20570 * src/system.h:
20571 Don't define PACKAGE here, since config.h defines it.
20572
205731998-12-30 Jesse Thilo <jthilo@gnu.org>
20574
20575 * src/reader.c: Update copyright date.
20576
20577 * src/main.c:
20578 Ditch sprintf to statically-sized buffers in fatal/warn functions in
20579 favor of output directly to stderr (avoids buffer overruns).
20580
20581 * src/reader.c: Some checks for premature EOF.
20582
20583 * 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:
20584 Use prototypes if the compiler understands them.
20585
20586 * src/files.c: Honor TMPDIR on Unix hosts.
20587 Use prototypes if the compiler understands them.
20588
20589 * src/reader.c:
20590 Fix a couple of buffer overrun bugs.
20591 Use prototypes if the compiler understands them.
20592
20593 * src/system.h: Include unistd.h and ctype.h.
20594 Use #ifdef instead of #if for NLS symbols.
20595
205961998-12-30 Jesse Thilo <jthilo@gnu.org>
20597
20598 * doc/bison.texinfo:
20599 Delete comment "consider using @set for edition number, etc..." since
20600 we now are doing so.
20601
206021998-12-30 Jesse Thilo <jthilo@gnu.org>
20603
20604 * configure.in:
20605 Use prototypes if the compiler understands them.
20606
20607 * NEWS: Document 1.26 highlights.
20608
20609 * Makefile.am: Require Automake 1.3 or later.
20610
20611 * acconfig.h:
20612 Use prototypes if the compiler understands them.
20613
206141998-12-29 Jesse Thilo <jthilo@gnu.org>
20615
20616 * src/version.c:
20617 Use VERSION symbol from automake for version number.
20618
206191998-12-29 Jesse Thilo <jthilo@gnu.org>
20620
20621 * acconfig.h, configure.in, version.cin:
20622 Use VERSION symbol from automake for version number.
20623
206241998-11-28 Jesse Thilo <jthilo@gnu.org>
20625
20626 * Makefile.am:
20627 Distribute original version of simple parser (bison.s1), not built
20628 version (bison.simple).
20629
206301998-11-28 Jesse Thilo <jthilo@gnu.org>
20631
20632 * doc/bison.texinfo: Add info dir entry.
20633
20634 * doc/bison.texinfo:
20635 Let automake put version number into documentation.
20636
206371998-11-26 Jesse Thilo <jthilo@gnu.org>
20638
20639 * src/bison.cld, src/build.com, src/vmshlp.mar:
20640 Add non-RCS files from /gd/gnu/bison.
20641
206421998-11-26 Jesse Thilo <jthilo@gnu.org>
20643
20644 * doc/bison.1:
20645 Document the BISON_HAIRY and BISON_SIMPLE variables.
20646
206471998-11-25 Jesse Thilo <jthilo@gnu.org>
20648
20649 * src/version.c: Build version.c automatically.
20650
20651 * src/reader.c:
20652 Fix token numbering (used to start at 258, not 257).
20653
20654 * src/system.h: Include config.h.
20655
20656 * src/getargs.c: Update bug report address.
20657
20658 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
20659 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
20660
206611998-11-25 Jesse Thilo <jthilo@gnu.org>
20662
20663 * Makefile.am:
20664 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
20665
20666 * configure.in, version.cin:
20667 Build version.c automatically.
20668
20669 * AUTHORS: Add AUTHORS file.
20670
20671 * README: Update bug report address.
20672
20673 * bison.simple:
20674 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
20675
20676 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
20677 Add automake stuff.
20678
206791998-11-25 Jesse Thilo <jthilo@gnu.org>
20680
20681 * doc/bison.texinfo: Clean up some formatting.
20682
206831998-05-05 Richard Stallman <rms@gnu.org>
20684
20685 * doc/bison.texinfo:
20686 Explain better why to make a pure parser.
20687
206881998-01-05 Richard Stallman <rms@gnu.org>
20689
20690 * src/files.c (openfiles):
20691 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
20692 find a temporary directory, if possible. Do not unlink files while
20693 they are open.
20694
206951997-08-25 Richard Stallman <rms@gnu.org>
20696
20697 * src/reader.c (stack_offset;):
20698 Change some warni to warns.
20699
20700 * src/lex.c (literalchar): Use warns, not warni.
20701
207021997-06-28 Richard Stallman <rms@gnu.org>
20703
20704 * src/bison.s1: Add a Bison version comment.
20705
20706 * src/main.c (fatal, warn, berror):
20707 Use program_name.
20708
207091997-06-28 Richard Stallman <rms@gnu.org>
20710
20711 * Makefile.in (bison_version): New variable.
20712 (dist): Use that variable.
20713 (bison.s1): Substitute the Bison version into bison.simple.
20714
20715 * bison.simple: Add a Bison version comment.
20716
207171997-06-18 Richard Stallman <rms@gnu.org>
20718
20719 * src/main.c (fatal, warn, berror):
20720 Make error messages standard.
20721 (toomany): Improve error message text.
20722
20723 * 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:
20724 new.h renamed to alloc.h.
20725
207261997-06-18 Richard Stallman <rms@gnu.org>
20727
20728 * Makefile.in: new.h renamed to alloc.h.
20729
207301997-05-24 Richard Stallman <rms@gnu.org>
20731
20732 * src/lex.c (literalchar):
20733 Fix the code for escaping \, " and '.
20734
20735 (lex): Avoid trouble when there are many chars
20736 to discard in a char literal with just several chars in it.
20737
207381997-05-17 Richard Stallman <rms@gnu.org>
20739
20740 * src/bison.s1:
20741 Use malloc, if using alloca is troublesome.
20742 (YYSTACK_USE_ALLOCA): New flag macro.
20743 Define it for some systems and compilers.
20744 (YYSTACK_ALLOC): New macro.
20745 (yyparse): Use YYSTACK_ALLOC to allocate stack.
20746 If it was malloc'd, free it.
20747
207481997-05-17 Richard Stallman <rms@gnu.org>
20749
20750 * bison.simple:
20751 Use malloc, if using alloca is troublesome.
20752 (YYSTACK_USE_ALLOCA): New flag macro.
20753 Define it for some systems and compilers.
20754 (YYSTACK_ALLOC): New macro.
20755 (yyparse): Use YYSTACK_ALLOC to allocate stack.
20756 If it was malloc'd, free it.
20757
207581997-04-23 Richard Stallman <rms@gnu.org>
20759
20760 * src/bison.s1:
20761 (alloca) [__hpux]: Always define as __builtin_alloca.
20762
207631997-04-23 Richard Stallman <rms@gnu.org>
20764
20765 * bison.simple:
20766 (alloca) [__hpux]: Always define as __builtin_alloca.
20767
207681997-04-22 Richard Stallman <rms@gnu.org>
20769
20770 * src/bison.s1:
20771 [__hpux]: Include alloca.h (right for HPUX 10)
20772 instead of declaring alloca (right for HPUX 9).
20773
20774 * src/bison.s1 (__yy_memcpy):
20775 Declare arg `count' as unsigned int.
20776 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
20777
207781997-04-22 Richard Stallman <rms@gnu.org>
20779
20780 * bison.simple:
20781 [__hpux]: Include alloca.h (right for HPUX 10)
20782 instead of declaring alloca (right for HPUX 9).
20783
20784 * bison.simple (__yy_memcpy):
20785 Declare arg `count' as unsigned int.
20786 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
20787
207881997-01-03 Richard Stallman <rms@gnu.org>
20789
20790 * src/allocate.c: [__STDC__ or _MSC_VER]:
20791 Declare calloc and realloc to return void *.
20792
207931997-01-02 Richard Stallman <rms@gnu.org>
20794
20795 * src/system.h:
20796 [_MSC_VER]: Include stdlib.h and process.h.
20797 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
20798
20799 * src/main.c (main): Return FAILURE as a value.
20800 (printable_version): Declare arg as int, not char.
20801
208021997-01-02 Richard Stallman <rms@gnu.org>
20803
20804 * Makefile.in (dist):
20805 Explicitly check for symlinks, and copy them.
20806
208071996-12-19 Richard Stallman <rms@gnu.org>
20808
20809 * src/files.c:
20810 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
20811
208121996-12-18 Paul Eggert <eggert@gnu.org>
20813
20814 * src/bison.s1 (yyparse):
20815 If __GNUC__ and YYPARSE_PARAM are both defined,
20816 declare yyparse to have a void * argument.
20817
208181996-12-18 Paul Eggert <eggert@gnu.org>
20819
20820 * bison.simple (yyparse):
20821 If __GNUC__ and YYPARSE_PARAM are both defined,
20822 declare yyparse to have a void * argument.
20823
208241996-12-17 Richard Stallman <rms@gnu.org>
20825
20826 * src/reduce.c (nbits): Add some casts.
20827
208281996-08-12 Richard Stallman <rms@gnu.org>
20829
20830 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
20831
208321996-08-12 Richard Stallman <rms@gnu.org>
20833
20834 * bison.simple: Test _MSDOS as well as _MSDOS_.
20835
208361996-07-31 Richard Stallman <rms@gnu.org>
20837
20838 * src/bison.s1:
20839 [__sun && __i386]: Include alloca.h.
20840
208411996-07-31 Richard Stallman <rms@gnu.org>
20842
20843 * bison.simple:
20844 [__sun && __i386]: Include alloca.h.
20845
208461996-07-30 Richard Stallman <rms@gnu.org>
20847
20848 * src/bison.s1: Comment change.
20849
20850 * src/bison.s1: Test _MSDOS_, not MSDOS.
20851
208521996-07-30 Richard Stallman <rms@gnu.org>
20853
20854 * bison.simple: Comment change.
20855
20856 * bison.simple: Test _MSDOS_, not MSDOS.
20857
208581996-06-01 Richard Stallman <rms@gnu.org>
20859
20860 * 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:
20861 Insert `_' macro around many string constants.
20862
20863 * src/main.c:
20864 Insert `_' macro around many string constants.
20865
20866 (main): Call setlocale, bindtextdomain and textdomain.
20867
20868 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
20869 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
20870 [ENABLE_NLS]: Include libintl.h.
20871 [ENABLE_NLS] (gettext): Define.
20872 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
20873 (N_, PACKAGE, LOCALEDIR): New macros.
20874
208751996-06-01 Richard Stallman <rms@gnu.org>
20876
20877 * POTFILES.in: New file.
20878
20879 * Makefile.in (allocate.o):
20880 Define target explicitly.
20881
20882 * Makefile.in (CFLAGS): Set to @CFLAGS@.
20883 (LDFLAGS): Set to @LDFLAGS@.
20884 (configure): Run autoconf only if preceding `cd' succeeds.
20885 (bison.s1): Redirect output to temporary file then move the
20886 temporary to the target, rather than redirecting directly to bison.s1.
20887 (clean): Remove config.status and config.log.
20888 (distclean): Don't remove config.status here.
20889
208901996-05-12 Richard Stallman <rms@gnu.org>
20891
20892 * src/bison.s1:
20893 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20894
208951996-05-12 Richard Stallman <rms@gnu.org>
20896
20897 * bison.simple:
20898 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20899
209001996-05-11 Richard Stallman <rms@gnu.org>
20901
20902 * src/bison.s1 (__yy_memcpy):
20903 Really reorder the args, as was supposedly done on Feb 14 1995.
20904 (yyparse): Calls changed accordingly.
20905
209061996-05-11 Richard Stallman <rms@gnu.org>
20907
20908 * Makefile.in (dist): Don't use $(srcdir).
20909
20910 * bison.simple (__yy_memcpy):
20911 Really reorder the args, as was supposedly done on Feb 14 1995.
20912 (yyparse): Calls changed accordingly.
20913
209141996-01-27 Richard Stallman <rms@gnu.org>
20915
20916 * src/output.c (output_rule_data):
20917 Test YYERROR_VERBOSE in the conditional
20918 around the definition of ttyname.
20919
209201995-12-29 Richard Stallman <rms@gnu.org>
20921
20922 * src/bison.s1:
20923 Fix line numbers in #line commands.
20924
209251995-12-29 Richard Stallman <rms@gnu.org>
20926
20927 * bison.simple:
20928 Fix line numbers in #line commands.
20929
209301995-12-27 Richard Stallman <rms@gnu.org>
20931
20932 * src/bison.s1 (YYPARSE_PARAM_DECL):
20933 In C++, make it always null.
20934 (YYPARSE_PARAM_ARG): New macro.
20935 (yyparse): Use YYPARSE_PARAM_ARG.
20936
209371995-12-27 Richard Stallman <rms@gnu.org>
20938
20939 * bison.simple (YYPARSE_PARAM_DECL):
20940 In C++, make it always null.
20941 (YYPARSE_PARAM_ARG): New macro.
20942 (yyparse): Use YYPARSE_PARAM_ARG.
20943
209441995-11-29 Richard Stallman <rms@gnu.org>
20945
20946 * doc/bison.texinfo:
20947 Describe literal string tokens, %raw, %no_lines, %token_table.
20948
209491995-11-29 Daniel Hagerty <hag@gnu.org>
20950
20951 * doc/bison.texinfo: Fixed update date
20952
209531995-10-16 Richard Stallman <rms@gnu.org>
20954
20955 * src/version.c: Version 1.25.
20956
209571995-10-16 Richard Stallman <rms@gnu.org>
20958
20959 * NEWS: *** empty log message ***
20960
209611995-10-16 Richard Stallman <rms@gnu.org>
20962
20963 * doc/bison.1, doc/bison.rnh:
20964 Add new options.
20965
209661995-10-15 Richard Stallman <rms@gnu.org>
20967
20968 * src/vmsgetargs.c, src/getargs.c:
20969 Added -n, -k, and -raw switches.
20970 (noparserflag, toknumflag, rawtoknumflag): New variables.
20971
20972 * src/symtab.h (SALIAS):
20973 New #define for adding aliases to %token.
20974 (struct bucket): Added `alias' field.
20975
20976 * src/reduce.c (reduce_grammar):
20977 Revise error message.
20978 (print_notices): Remove final `.' from error message.
20979
20980 * src/reader.c (reader_output_yylsp):
20981 New function.
20982 (readgram): Use `#if 0' around code that accepted %command
20983 inside grammar rules: The documentation doesn't allow it,
20984 and it will fail since the %command processors scan for the next %.
20985 (parse_token_decl): Extended the %token
20986 declaration to allow a multi-character symbol as an alias.
20987 (parse_thong_decl): New function.
20988 (read_declarations): Added %thong declarations.
20989 (read_declarations): Handle NOOP to deal with allowing
20990 % declarations as another means to specify the flags.
20991 (readgram): Allow %prec prior to semantics embedded in a rule.
20992 (skip_to_char, read_declarations, copy_definition)
20993 (parse_token_decl, parse_start_decl, parse_type_decl)
20994 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
20995 (get_type_name, copy_guard, copy_action, readgram)
20996 (get_type, packsymbols): Revised most error messages.
20997 Changed `fatal' to `warnxxx' to avoid aborting for error.
20998 Revised and use multiple warnxxx functions to avoid using VARARGS1.
20999 (read_declarations): Improve the error message for
21000 an invalid character. Do not abort.
21001 (read_declarations, copy_guard, copy_action): Use
21002 printable_version to avoid unprintable characters in printed output.
21003 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
21004 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
21005 Allow the type of a non-terminal can be given
21006 more than once, as long as all specifications give the same type.
21007
21008 * src/output.c:
21009 (output_headers, output_trailers, output, output_gram)
21010 (output_rule_data): Implement noparserflag variable.
21011 Implement toknumflag variable.
21012 (output): Call reader_output_yylsp to output LTYPESTR.
21013
21014 * src/main.c (main):
21015 If reader sees an error, don't process the grammar.
21016 (fatals): Updated to not use VARARGS1.
21017 (printable_version, int_to_string, warn, warni, warns, warnss)
21018 (warnsss): New error reporting functions. Avoid abort for error.
21019
21020 * src/lex.h:
21021 Added THONG and NOOP for alias processing.
21022 Added SETOPT for the new code that allows setting options with %flags.
21023
21024 * src/lex.c:
21025 Include getopt.h. Add some extern decls.
21026 (safegetc): New function to deal with EOF gracefully.
21027 (literalchar); new function to deal with reading \ escapes.
21028 (lex): Use literalchar.
21029 (lex): Implemented "..." tokens.
21030 (literalchar, lex, parse_percent_token): Made tokenbuffer
21031 always contain the token. This includes growing the token
21032 buffer while reading an integer.
21033 (parse_percent_token): Replaced if-else statement with percent_table.
21034 (parse_percent_token): Added % declarations as another
21035 way to specify the flags -n, -l, and -r. Also added hooks for
21036 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
21037 major changes to files.c.
21038 (lex) Retain in the incoming stream a character following
21039 an incorrect '/'.
21040 (skip_white_space, lex): Revised most error messages
21041 and changed fatal to warn to avoid aborting.
21042 (percent_table): Added %thong declarations.
21043
21044 * src/gram.h: Comment changes.
21045
21046 * src/files.c (openfiles, open_extra_files, done):
21047 Add faction flag
21048 and actfile file. Handle noparserflag. Both for -n switch.
21049
21050 * src/conflicts.c (resolve_sr_conflict):
21051 Remove use of alloca.
21052
210531995-06-01 Jim Meyering <meyering@gnu.org>
21054
21055 * doc/bison.texinfo: *** empty log message ***
21056
210571995-05-06 Richard Stallman <rms@gnu.org>
21058
21059 * src/bison.s1: Comment change.
21060
210611995-05-06 Richard Stallman <rms@gnu.org>
21062
21063 * bison.simple: Comment change.
21064
210651995-05-03 Richard Stallman <rms@gnu.org>
21066
21067 * src/version.c: Version now 1.24.
21068
21069 * src/bison.s1: Change distribution terms.
21070
21071 * src/version.c: Version now 1.23.
21072
210731995-05-03 Richard Stallman <rms@gnu.org>
21074
21075 * doc/bison.texinfo:
21076 Rewrite "Conditions for Using Bison".
21077 Update version to 1.24.
21078
210791995-05-03 Richard Stallman <rms@gnu.org>
21080
21081 * bison.simple: Change distribution terms.
21082
210831995-02-23 Richard Stallman <rms@gnu.org>
21084
21085 * src/files.c: Test __VMS_POSIX as well as VMS.
21086
210871995-02-14 Jim Meyering <meyering@gnu.org>
21088
21089 * src/bison.s1 (__yy_memcpy):
21090 Renamed from __yy_bcopy to avoid
21091 confusion. Reverse FROM and TO arguments to be consistent with
21092 those of memcpy.
21093
210941995-02-14 Jim Meyering <meyering@gnu.org>
21095
21096 * bison.simple (__yy_memcpy):
21097 Renamed from __yy_bcopy to avoid
21098 confusion. Reverse FROM and TO arguments to be consistent with
21099 those of memcpy.
21100
211011994-11-10 David J. MacKenzie <djm@gnu.org>
21102
21103 * NEWS: reformat
21104
21105 * NEWS: New file.
21106
21107 * Makefile.in (DISTFILES): Include NEWS.
21108
21109 * Makefile.in (DISTFILES):
21110 Include install-sh, not install.sh.
21111
21112 * configure.in: Update to Autoconf v2 macro names.
21113
211141994-10-05 David J. MacKenzie <djm@gnu.org>
21115
21116 * Makefile.in: fix typo
21117
21118 * Makefile.in (prefix, exec_prefix):
21119 Let configure set them.
21120
211211994-09-28 David J. MacKenzie <djm@gnu.org>
21122
21123 * Makefile.in: Set datadir to $(prefix)/share.
21124
211251994-09-15 Richard Stallman <rms@gnu.org>
21126
21127 * src/bison.s1:
21128 Update copyright notice and GPL version.
21129
211301994-09-15 Richard Stallman <rms@gnu.org>
21131
21132 * bison.simple:
21133 Update copyright notice and GPL version.
21134
211351994-07-12 Richard Stallman <rms@gnu.org>
21136
21137 * src/reduce.c, src/reader.c:
21138 entered into RCS
21139
211401994-05-05 David J. MacKenzie <djm@gnu.org>
21141
21142 * Makefile.in: entered into RCS
21143
211441994-03-26 Richard Stallman <rms@gnu.org>
21145
21146 * src/bison.s1: entered into RCS
21147
211481994-03-26 Richard Stallman <rms@gnu.org>
21149
21150 * bison.simple: entered into RCS
21151
211521994-03-25 Richard Stallman <rms@gnu.org>
21153
21154 * src/main.c: entered into RCS
21155
211561994-03-24 Richard Stallman <rms@gnu.org>
21157
21158 * src/conflicts.c: entered into RCS
21159
211601994-01-02 Richard Stallman <rms@gnu.org>
21161
21162 * Makefile.in: *** empty log message ***
21163
211641993-11-21 Richard Stallman <rms@gnu.org>
21165
21166 * src/bison.s1: *** empty log message ***
21167
211681993-11-21 Richard Stallman <rms@gnu.org>
21169
21170 * doc/bison.texinfo: entered into RCS
21171
21172 * doc/bison.texinfo: *** empty log message ***
21173
211741993-11-21 Richard Stallman <rms@gnu.org>
21175
21176 * bison.simple: *** empty log message ***
21177
211781993-10-25 David J. MacKenzie <djm@gnu.org>
21179
21180 * doc/bison.texinfo: *** empty log message ***
21181
211821993-10-19 Richard Stallman <rms@gnu.org>
21183
21184 * src/bison.s1: *** empty log message ***
21185
211861993-10-19 Richard Stallman <rms@gnu.org>
21187
21188 * bison.simple: *** empty log message ***
21189
211901993-10-14 Richard Stallman <rms@gnu.org>
21191
21192 * src/bison.s1: *** empty log message ***
21193
211941993-10-14 Richard Stallman <rms@gnu.org>
21195
21196 * bison.simple: *** empty log message ***
21197
211981993-09-14 David J. MacKenzie <djm@gnu.org>
21199
21200 * doc/bison.texinfo: *** empty log message ***
21201
212021993-09-13 Noah Friedman <friedman@gnu.org>
21203
21204 * Makefile.in: *** empty log message ***
21205
212061993-09-10 Richard Stallman <rms@gnu.org>
21207
21208 * src/conflicts.c: *** empty log message ***
21209
21210 * src/system.h: entered into RCS
21211
212121993-09-10 Richard Stallman <rms@gnu.org>
21213
21214 * doc/bison.1: entered into RCS
21215
212161993-09-06 Noah Friedman <friedman@gnu.org>
21217
21218 * src/version.c: entered into RCS
21219
212201993-09-06 Noah Friedman <friedman@gnu.org>
21221
21222 * Makefile.in: *** empty log message ***
21223
212241993-07-30 David J. MacKenzie <djm@gnu.org>
21225
21226 * Makefile.in: *** empty log message ***
21227
212281993-07-24 Richard Stallman <rms@gnu.org>
21229
21230 * src/bison.s1: *** empty log message ***
21231
212321993-07-24 Richard Stallman <rms@gnu.org>
21233
21234 * bison.simple: *** empty log message ***
21235
212361993-07-08 David J. MacKenzie <djm@gnu.org>
21237
21238 * Makefile.in: *** empty log message ***
21239
212401993-07-04 Richard Stallman <rms@gnu.org>
21241
21242 * src/bison.s1: *** empty log message ***
21243
212441993-07-04 Richard Stallman <rms@gnu.org>
21245
21246 * bison.simple: *** empty log message ***
21247
212481993-06-26 David J. MacKenzie <djm@gnu.org>
21249
21250 * src/getargs.c: entered into RCS
21251
212521993-06-26 David J. MacKenzie <djm@gnu.org>
21253
21254 * doc/bison.texinfo: *** empty log message ***
21255
21256 * doc/bison.1: New file.
21257
212581993-06-25 Richard Stallman <rms@gnu.org>
21259
21260 * src/getargs.c: New file.
21261
212621993-06-16 Richard Stallman <rms@gnu.org>
21263
21264 * src/bison.s1: *** empty log message ***
21265
212661993-06-16 Richard Stallman <rms@gnu.org>
21267
21268 * bison.simple: *** empty log message ***
21269
212701993-06-03 Richard Stallman <rms@gnu.org>
21271
21272 * src/bison.s1: New file.
21273
212741993-06-03 Richard Stallman <rms@gnu.org>
21275
21276 * doc/bison.texinfo: *** empty log message ***
21277
212781993-06-03 Richard Stallman <rms@gnu.org>
21279
21280 * bison.simple: New file.
21281
212821993-05-19 Richard Stallman <rms@gnu.org>
21283
21284 * doc/bison.texinfo: New file.
21285
212861993-05-07 Noah Friedman <friedman@gnu.org>
21287
21288 * Makefile.in: *** empty log message ***
21289
212901993-04-28 Noah Friedman <friedman@gnu.org>
21291
21292 * src/reader.c: *** empty log message ***
21293
212941993-04-23 Noah Friedman <friedman@gnu.org>
21295
21296 * src/alloc.h: entered into RCS
21297
212981993-04-20 David J. MacKenzie <djm@gnu.org>
21299
21300 * src/version.c: *** empty log message ***
21301
21302 * src/files.c, src/allocate.c:
21303 entered into RCS
21304
21305 * src/reader.c: *** empty log message ***
21306
21307 * src/lex.c: entered into RCS
21308
21309 * src/conflicts.c: New file.
21310
21311 * src/symtab.c: entered into RCS
21312
21313 * src/alloc.h: New file.
21314
21315 * src/LR0.c: entered into RCS
21316
213171993-04-18 Noah Friedman <friedman@gnu.org>
21318
21319 * src/reader.c: New file.
21320
21321 * src/version.c: *** empty log message ***
21322
213231993-04-18 Noah Friedman <friedman@gnu.org>
21324
21325 * Makefile.in: *** empty log message ***
21326
213271993-04-17 Noah Friedman <friedman@gnu.org>
21328
21329 * Makefile.in: *** empty log message ***
21330
213311993-04-15 Richard Stallman <rms@gnu.org>
21332
21333 * src/main.c, src/files.c:
21334 New file.
21335
213361993-04-15 Noah Friedman <friedman@gnu.org>
21337
21338 * configure.in: entered into RCS
21339
21340 * configure.in: *** empty log message ***
21341
21342 * configure.in: New file.
21343
213441993-04-14 Richard Stallman <rms@gnu.org>
21345
21346 * Makefile.in: New file.
21347
213481993-04-13 Richard Stallman <rms@gnu.org>
21349
21350 * src/version.c: New file.
21351
213521993-03-25 Richard Stallman <rms@gnu.org>
21353
21354 * src/output.c: entered into RCS
21355
213561992-09-25 Richard Stallman <rms@gnu.org>
21357
21358 * configure.bat: entered into RCS
21359
213601992-06-22 Richard Stallman <rms@gnu.org>
21361
21362 * src/vmsgetargs.c: entered into RCS
21363
213641992-06-22 Richard Stallman <rms@gnu.org>
21365
21366 * doc/bison.rnh: entered into RCS
21367
213681992-04-20 David J. MacKenzie <djm@gnu.org>
21369
21370 * README: entered into RCS
21371
213721992-01-22 Richard Stallman <rms@gnu.org>
21373
21374 * src/machine.h: entered into RCS
21375
213761991-12-21 Richard Stallman <rms@gnu.org>
21377
21378 * src/lalr.c, src/closure.c:
21379 entered into RCS
21380
213811991-12-20 Richard Stallman <rms@gnu.org>
21382
21383 * src/state.h: entered into RCS
21384
213851991-12-18 Richard Stallman <rms@gnu.org>
21386
21387 * src/print.c, src/nullable.c, src/derives.c:
21388 entered into RCS
21389
213901991-11-03 David J. MacKenzie <djm@gnu.org>
21391
21392 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
21393 entered into RCS
21394
213951988-09-09 Richard Stallman <rms@gnu.org>
21396
21397 * src/bison.hairy: entered into RCS
21398
213991987-12-16 Richard Stallman <rms@gnu.org>
21400
21401 * REFERENCES: entered into RCS
dc546b0f 21402
f294a2c2 21403
04098407 21404 -----
f294a2c2 21405
04098407 21406 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
f490771b
JD
21407 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
21408 2007, 2008, 2009 Free Software Foundation, Inc.
f294a2c2 21409
04098407
PE
21410 Copying and distribution of this file, with or without
21411 modification, are permitted provided the copyright notice and this
21412 notice are preserved.