]> git.saurik.com Git - bison.git/blame - ChangeLog
Fix portability issue in the test suite.
[bison.git] / ChangeLog
CommitLineData
c4fae1ef
AD
12008-12-08 Akim Demaille <demaille@gostai.com>
2
3 Fix portability issue in the test suite.
4 * tests/local.at (AT_MATCHES_CHECK): New.
5 Based on Perl instead of Sed. Sed has too many portability
6 pitfalls, not ever Sed is GNU Sed.
7 * tests/actions.at (Fix user actions without a trailing semicolon):
8 Use it.
9
42f4393a
DJ
102008-12-07 Di-an Jan <dianj@freeshell.org>
11
12 Implement the FIXME that ends an user action with a semicolon
13 if it seems necessary.
14 * src/scan-code.l (flex rules section): Flag cpp directive from
15 any `#' to the first unescaped end-of-line. Semicolon is not
16 needed after `;', `{', '}', or cpp directives and is needed after
17 any other token (whitespaces and comments have no effect).
18 * tests/actions.at (Fix user actions without a trailing semicolon):
19 New test.
20 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
21 to make user actions complete statements.
22 Adjust column numbers in error messages.
23 * tests/regression.at (Fix user actions without a trailing semicolon):
24 Remove. Covered by new test.
25
bd5df716
AD
262009-04-14 Akim Demaille <demaille@gostai.com>
27
28 doc: minor fixes.
29 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
30 (Table of Symbols): Remove duplicate entry for %debug.
31
7ba0d59d
EB
322009-04-10 Eric Blake <ebb9@byu.net>
33
34 submodules: update to latest
35 * submodules/autoconf: Use latest upstream Autoconf.
36
b4d71a96
EB
372009-04-06 Eric Blake <ebb9@byu.net>
38
39 Work around autoconf 2.63b bug in testsuite.
40 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
41 autoconf bug related to # in test.
42
4ecd3681
JD
432009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
44
45 * NEWS (2.5): Describe new -D/--define feature.
46
c65e5292
AD
472008-11-10 Akim Demaille <demaille@gostai.com>
48
49 --trace=muscles
50 * src/getargs.h, src/getargs.c (trace_muscle): New.
51 (trace_types, trace_args): Support it.
52 * src/output.c (output_skeleton): Use it.
53
96002de2
AD
542008-11-10 Akim Demaille <demaille@gostai.com>
55
56 muscles_output.
57 * src/output.c (muscles_output): New, extracted from...
58 (output_skeleton): here.
59 Adjust.
60
fadb13b5
AD
612008-11-21 Akim Demaille <demaille@gostai.com>
62
63 Display the changes in cross-options.texi.
64 * build-aux/cross-options.pl ($sep): New, to separate items.
65 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
66 the changes.
67
72183df4
DJ
682008-11-20 Di-an Jan <dianj@freeshell.org>
69
70 Improves options in the manual.
71 * doc/bison.texinfo (-g, -x): Add space before argument.
72 (Option Cross Key): Implement FIXME: listing directives also.
73 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
74 (Short Option): Special case -d. Put arguments inside @option.
fadb13b5 75 (Bison Directive): Add column, automatically extracted from
72183df4
DJ
76 src/scan-gram.l (actual name passed as the first argument)
77 with special case for %define.
78 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
79 to build-aux/cross-options.pl.
80 * src/getargs.c (usage): Document limitations of cross-options.pl.
81 * src/scan-gram.l: Likewise.
82
e80b068c
AD
832009-02-25 Akim Demaille <demaille@gostai.com>
84
85 Copyright years.
86 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
87
e3ee30b8
AD
882008-12-08 Akim Demaille <demaille@gostai.com>
89
90 Install autoconf as a submodule to get m4sugar.
91 * .gitmodules: Add submodules/autoconf.
92 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
93 submodules/autoconf.
94
c4eb1e84
JD
952008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
96
97 Simplify last patch slightly.
98 * src/getargs.c (getargs): Here.
99
10fa0146
JD
1002008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
101
102 Fix last warning from --enable-gcc-warnings.
103 * src/getargs.c (getargs): Don't assign const address to non-const
104 pointer.
105
6f5be1ab
DJ
1062008-11-17 Di-an Jan <dianj@freeshell.org>
107
108 Handle --enable-gcc-warnings.
109 * src/getargs.c (command_line_location): Set parameters to void.
110
11c4e57d
AD
1112008-11-11 Akim Demaille <demaille@gostai.com>
112
113 AT_FULL_COMPILE.
114 * tests/actions.at, tests/regression.at: Use it.
115
e186a284
AD
1162008-11-07 Akim Demaille <demaille@gostai.com>
117
118 Pass command line location to skeleton_arg and language_argmatch.
119 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
120 The location argument is now mandatory.
121 Adjust all dependencies.
122 (getargs): Use command_line_location.
123
e14c6831
AD
1242008-11-07 Akim Demaille <demaille@gostai.com>
125
126 -D, --define.
127 * src/getargs.c (usage): Document -D.
128 Fix help string for --locations.
129 (command_line_location): New.
130 (short_options, long_options, getargs): Support -D, --define.
131 (getargs): Move -d support at the right place.
132 * doc/bison.texinfo (Bison Options): Update.
133 * tests/input.at (%define, --define): New.
134
75c21b61
AD
1352008-11-07 Akim Demaille <demaille@gostai.com>
136
137 Initialize the muscle table before parsing the command line.
138 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
139 (getargs): Define file_name.
140 * src/main.c (main): Initialize muscle_tab before calling
141 getargs.
142 * src/muscle_tab.c (muscle_init): No longer define file_name, as
143 its value is not available yet.
144
33d2a860
AD
1452008-11-09 Akim Demaille <demaille@gostai.com>
146
147 Require the generation of parse-gram.output.
148 * src/Makefile.am (YACC): Pass --report=all.
149
006faedf
JD
1502009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
151
152 * NEWS (2.5): New stub.
153
ecd1b61c
JD
1542009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
155
156 Fix options documentation.
157 * build-aux/cross-options.pl: As in --help output, write optional
158 arguments as [=ARG] not =[ARG].
159 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
160
f67c4037
AD
1612008-11-07 Akim Demaille <demaille@gostai.com>
162
163 Fix --help.
164 * src/getargs.c (usage): Fix help string for -W.
165
0213d651
AD
1662008-11-07 Akim Demaille <demaille@gostai.com>
167
168 Handle more general types of option arguments.
169 * build-aux/cross-options.pl: The argument ends at the first
170 space, not the first non-symbol character.
171 Use @var for each word appearing the argument description.
172
c19178bf
JD
1732009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
174
175 Remove spurious initial empty lines.
176 * data/location.cc: End the @output lines with an @.
177
0d2b2ab0
AD
1782008-11-04 Akim Demaille <demaille@gostai.com>
179
180 Remove spurious initial empty lines.
181 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
182 * data/yacc.c: End the @output lines with an @.
183
8ba62e3e
JD
1842009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
185
186 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
187 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
188 requirements for a correct m4 are stricter.
189 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
190 * configure.ac: Update to use AC_PROG_GNU_M4.
191 Reported by Eric Blake.
192
5bc993d9
JD
1932009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
194
195 Help with updating web manual.
196 * HACKING: Incorporate instructions from gnulib/doc/README.
197 * bootstrap.conf (gnulib_modules): Add gendocs.
198
580c075d
JD
1992009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
200
201 Fix strange %define locations for default values.
202 Reported by Akim Demaille at
203 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
204 and discussed again starting at
205 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
206 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
207 because location information is bogus.
208 Use angle brackets to delimit fake file name because square brackets
209 look like underexpanded m4. Choose a better fake file name.
210 Use negative line numbers.
211 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
212 * src/location.c (location_print): If line for a boundary is negative,
213 only print that boundary's file name.
214 * src/location.h: Document that.
215 * tests/skeletons.at (%define Boolean variables: invalid skeleton
216 defaults): Update output.
217
5d3a1ecb
AD
2182008-11-07 Akim Demaille <demaille@gostai.com>
219
220 Locations without columns for command line arguments.
221 * src/location.c (location_print): Don't display negative columns.
222 * src/location.h: Document this.
223
015e86a7
JD
2242009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
225
226 Add reminder about uploading public key to keys.gnupg.net.
227 * HACKING (Release Procedure): Here.
228
c1455bab
AD
2292009-03-31 Akim Demaille <demaille@gostai.com>
230
231 bootstrap: --help to stdout.
232 * bootstrap (usage): Don't send --help to stderr.
233 Use a here doc instead of a long string.
234
2075a82a
AD
2352009-03-31 Akim Demaille <demaille@gostai.com>
236
237 bootstrap: README-hacking no longer exists
238 * bootstrap (checkout_only_file): Set to HACKING.
239
26fccd4d
AD
2402009-03-26 Akim Demaille <demaille@gostai.com>
241
242 doc: merge HACKING and README-hacking.
243 Two files is confusing.
244 Reported by Alexandre Duret-Lutz.
5bc993d9 245
26fccd4d
AD
246 * README-hacking: Merge into...
247 * HACKING (Working from the repository): here.
248
6469c4d7
AD
2492009-03-26 Akim Demaille <demaille@gostai.com>
250
251 doc: update README-hacking.
252 * README-hacking: We now use git and git submodules.
253 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
254
b328890a
AD
2552009-03-26 Akim Demaille <demaille@gostai.com>
256
257 lalr1.cc: avoid GCC 4.3 warnings.
258 GCC 4.3 now warns about "a || b && c" and asks for explicit
259 parentheses.
260 Reported by Alexandre Duret-Lutz.
261 * data/location.cc: Update copyright years.
262 (Position::operator==): Use parens to make precedence explicit.
263 Compare lines and columns first, as they are more likely to be
264 different, and they are faster to compare.
265
f3079439
AD
2662009-03-26 Akim Demaille <demaille@gostai.com>
267
268 gnulib: update.
269 * gnulib: Update to latest.
270 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
271 use +=.
272
8defe11b
AD
2732009-01-08 Akim Demaille <demaille@gostai.com>
274
275 Fix grep portability issues.
276 Grep on Solaris does not support -q.
277 Reported by Summum Bonum.
5bc993d9 278
8defe11b
AD
279 * NEWS: Add a stub for 2.4.2.
280 * THANKS: Add Summum Bonum.
281 * tests/atlocal.in (EGREP): New.
282 (CC, CXX, XSLTPROC): Make it possible to override them via
283 envvars.
284 * tests/java.at: Use $EGREP instead of egrep.
285 Use AT_CHECK's ignore instead of grep's -q.
286
41930e7a
JD
2872008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
288
289 Version 2.4.1.
290 * NEWS: Set version and date.
291 * lib/Makefile.am: Update copyright year.
292 * tests/atlocal.in: Update copyright year.
293
d07932ef
JD
2942008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
295
296 Semicolon feature removal is not about future language support.
297 * NEWS: The semicolon feature is no longer active for newer languages,
298 so don't claim that it causes trouble for them.
299
0364b334
JD
3002008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
301
302 * gnulib: Update submodule to HEAD.
303
876fd835
AD
3042008-12-09 Akim Demaille <demaille@gostai.com>
305
306 Update data/README.
307 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
308
bee1df15
EB
3092008-12-05 Eric Blake <ebb9@byu.net>
310
311 Build testsuite with newer autoconf.
312 * tests/output.at (m4_expand): Don't override in newer autoconf,
313 where the underlying implementation changed.
314 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
315 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
316 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
317 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
318 since some of them contain unbalanced ')'.
319
7e6d1e22
JD
3202008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
321
322 * NEWS: Clarify a little.
323
a957d06c
JD
3242008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
325
326 * NEWS: Update for recent changes.
327
462503f8
JD
3282008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
329
330 Fix unexpanded macros in GLR defines file.
331 Reported by Csaba Raduly at
332 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
333 * THANKS (Csaba Raduly): Add.
334 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
335 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
336 lexer in a separate module that includes the defines file.
337 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
338 source.
339 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
340 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
341 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
342 (AT_DATA_SOURCE_PROLOGUE): New.
343 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
344 (AT_DATA_SOURCE): New.
345 (AT_FULL_COMPILE): New, copied from master branch and extended to
346 support an additional source file.
347
bf151b75
JD
3482008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
349
350 Don't let maintainer-*-check targets force a version update.
351 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
352 handled.
353
f56274a8
DJ
3542008-11-17 Di-an Jan <dianj@freeshell.org>
355
356 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
357 Align menus. Adjust word wrapping. Use node names for menu names.
358 (Examples): Don't abbreviate node names.
359 (LocalWords): Remove abbreviations.
360 (Copying): Make description a sentence.
bf151b75 361 (Java Action Features): Remove period to match the rest of menu.
f56274a8 362
b5775a81
PB
3632008-11-11 Paolo Bonzini <bonzini@gnu.org>
364
365 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
366 * configure.ac: Adjust usage.
367 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
368 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
369 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
370
7ed73f82
JD
3712008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
372
373 Don't add a semicolon to actions for %skeleton or %language.
374 It breaks Java test cases as reported by Akim Demaille.
375 * src/scan-code.l: Implement.
376
4b1ebc49
JD
3772008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
378
379 Clean up %skeleton and %language priority implementation.
380 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
381 remove static qualifier because others will soon need to see it.
382 (language_prio): Likewise.
383 (getargs): Use command_line_prio rather than 0.
384 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
385 enum fields.
386 (skeleton_prio): Extern it.
387 (language_prio): Extern it.
388 * src/parse-gram.y: Use grammar_prio rather than 1.
389
738cde3e
AD
3902008-11-04 Akim Demaille <demaille@gostai.com>
391
392 * NEWS: Mention the trailing semicolon in action.
393
d6fb461d
AD
3942008-11-04 Akim Demaille <demaille@gostai.com>
395
396 Reformat NEWS.
397 * NEWS: Use more outline-mode markup.
398 Suggested by Jim Meyering.
399
14da0cdd
JD
4002008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
401
402 Fix user actions without a trailing semicolon.
403 Reported by Sergei Steshenko at
404 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
405 * THANKS (Sergei Steshenko): Add.
406 * src/scan-code.l (SC_RULE_ACTION): Fix it.
407 * tests/regression.at (Fix user actions without a trailing semicolon):
408 New test case.
409
c9ba9e59
JD
4102008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
411
412 Initiate further development.
413 * NEWS: Create an empty section for new entries.
414 * gnulib: Update submodule to HEAD.
415
bfb40910
JD
4162008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
417
418 * NEWS: Version 2.4.
419
241fda7a
JD
4202008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
421
422 Prepare for next release.
423 * NEWS: Briefly mention changes since 2.3b.
424 * README: Say GNU m4 1.4.6, which we've been requiring in release
425 announcements already, not 1.4.3, which breaks the build.
426
ed4d67dc
JD
4272008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
428
429 Say %language is experimental.
430 We're thinking of extending it's effect on output file naming. See the
431 thread at
432 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
433 * NEWS: Say it's experimental.
434 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
435 recommend it over %skeleton for now.
436 (Bison Options): Likewise.
437 (C++ Bison Interface): Use %skeleton not %language.
438 (Calc++ Parser): Use %skeleton not %language.
439 * src/getargs.c (usage): Say it's experimental.
440
e254a580
DJ
4412008-11-01 Di-an Jan <dianj@freeshell.org>
442 Paolo Bonzini <bonzini@gnu.org>
443
444 Support all Java parser class modifiers.
445 * data/java.m4 (b4_percent_define_get3): New.
446 (b4_final_if, b4_strictfp_if): New.
447 * data/lalr1.java (final, strictfp, extends, implements): Support.
448 * doc/bison.texinfo (final, strictfp, extends, implements): Add
449 documentation.
450 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
451 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
452 (AT_CHECK_JAVA_GREP): New.
453 (Java parser class modifiers): New test.
454 (Java parser class extends and implements): New test.
455
456 Model exception propagation better with throws and lex_throws.
457 * data/java.m4 (b4_list2): New.
458 (throws): Change default.
459 * data/lalr1.java (yyaction): Add throws.
460 (parse): Add lex_throws in addition to throws.
461 * doc/bison.texinfo (throws, lex_throws): Add documentation.
462 * tests/java.at (Java throws specifications): New test.
463
464 Improve documentation for Java parsers.
465 * doc/bison.texinfo (Java Parsers): Add subsections.
466 Don't quote first argument of %define.
467 (Java Bison Interface): Document output files. Move documentation
468 of parser class and merge into Java Parser Interface. Document
469 features that error out. Document directives with no effect.
470 Move note about Javadoc higher.
471 (Java Semantic Values): Explicitly mention stype.
472 Document that generic types cannot be used.
473 (Java Location Values): Use @deftypeivar. Document constructors.
474 Correct return value for toString.
475 (Java Parser Interface): List undocumented constants/fields.
476 Move documentation of fields added by %parse-param closer to list
477 of members. Document that token names are added as fields.
478 Document constructors accurately. Remove error method.
479 (Java Scanner Interface): Move note on %pure-parser to Java Bison
480 Interface. Describe %code lexer and yylex accutately.
481 Remove documentation that does not match the code.
482 (Java Action Features): New.
483 (Java Differences): Add reference. Add item on semantic values.
484 Add note about @{ ... @}. Clarify %% epilogue placement.
485 (Java Declarations Summary): New.
486
487 Fix Java skeleton.
488 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
489 (b4_remove_comma): Quote test argument.
490 (b4_identification): Remove "bison" field.
491 * tests/java.at (Java parser class and package names): New test.
492 (Java %parse-param and %lex-param): New test.
493 (Java stype, position_class and location_class): New test.
494
f259e4e6
PB
4952008-10-31 Di-an Jan <dianj@freeshell.org>
496
497 * data/lalr1.jave: Update copyright years.
498 (YYParser): Correct name of "generated from" file in Javadoc:
499 use b4_file_name instead of @ofile@.
500 (Location constructor): Correct Javadoc parameter name.
501 (yylloc): Add missing opening m4 quote after b4_location_if.
502 This removes a stray [ in the Javadoc of Lexer.getStartPos.
503 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
504 (YYParser constructor): Correct Javadoc parameter name.
505
cae5057f
JD
5062008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
507
508 Always put auxiliary code files in the same dir as other output files.
509 * src/files.c (compute_file_name_parts): When the user specifies
510 --output but not --file-prefix, extract the directory prefix from the
511 file prefix not from the grammar file name. This affects the location
512 of files like location.hh generated by the C++ skeleton. The includes
513 in the other output files require this fix.
514 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
515 for expected output files.
516 (Output files): Add a test for the above.
517
4af432ba
JD
5182008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
519
520 * gnulib: Update submodule to HEAD.
521
e26d4e43
JD
5222008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
523
524 Update copyright year.
525 * src/files.c: Here.
526
c0ee9e21
DJ
5272008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
528
529 Don't overwrite the input file.
530 * src/files.c (output_file_name_check): Fatal error if using input file
531 for output.
532 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
533 argument.
534 (Conflicting output files): Add test.
535
482dc52f
AD
5362008-10-28 Akim Demaille <demaille@gostai.com>
537
538 Space changes.
539 * data/lalr1.cc: Formatting changes.
540
52cbbe84
AD
5412008-10-28 Akim Demaille <demaille@gostai.com>
542
543 Don't define debugging functions when !YYDEBUG.
544 * data/lalr1.cc (debug_stream, set_debug_stream)
545 (debug_level_type, debug_level, set_debug_level): Don't
546 declare them when YYDEBUG is not defined.
547 The implementation are already YYDEBUG-aware.
548
0925d5bf
AD
5492008-10-28 Akim Demaille <demaille@gostai.com>
550
551 Prefer "continue" for empty loop bodies.
552 * etc/bench.pl.in: Use "continue" instead of {}.
553
cf98343c
AD
5542008-10-28 Akim Demaille <demaille@gostai.com>
555
556 Space and comments changes.
557 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
558 * data/c.m4, data/lalr1.cc: Space changes.
559
9f467b7d
AD
5602008-10-28 Akim Demaille <demaille@gostai.com>
561
562 Make gnulib a submodule.
563 * gnulib: New.
564 * .gitmodules (gnulib): New.
565
0f0e1ace
JD
5662008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
567
568 Fix yyerror_range for user-defined location type in C++. Reported by
569 Georg Sauthoff at
570 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
571 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
572 * THANKS (Georg Sauthoff): Add.
573
548e2104
JD
5742008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
575
576 Update several administrative files mainly to facilitate releasing.
577 * HACKING (Administrivia): Make the git-merge-changelog notes more
578 helpful.
579 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
580 (Release Procedure): Update for git and add numerous details that were
581 previously missing.
582 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
583 * maint.mk (announcement): Don't list bison as a bootstrap tool so
584 that announcements don't claim we bootstrapped with whatever bison
585 happened to be in PATH. Add flex as a bootstrap tool.
586 * Makefile.maint: Remove, previously replaced by maint.mk.
587 * Makefile.cfg: Remove, and migrate settings to...
588 * cfg.mk: ... here for the sake of `make announcement'.
589 * bootstrap.conf (gnulib_modules): Add announce-gen.
590 * README: Say GNU Bison instead of just Bison. Suggested by Karl
591 Berry.
592
ddf17a6e
PB
5932008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
594
595 Small but important bugfixes for the Java skeleton.
596 * data/lalr1.java (yyerror): Change Location to b4_location_type.
597 (yy_symbol_print): Call toString on yyvaluep.
598
e1145ad8
AD
5992008-08-29 Akim Demaille <demaille@gostai.com>
600
601 Clarify UPDATED use.
bee1df15 602 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 603 not to the release date of Bison.
bee1df15 604 Reported by Joel E. Denny.
e1145ad8 605
0df72d78
AD
6062008-08-29 Akim Demaille <demaille@gostai.com>
607
608 * README: Update FAQ pointer.
609 Reported by Joel E. Denny.
610
9a90b6bb
EB
6112008-08-27 Eric Blake <ebb9@byu.net>
612
613 Resync m4sugar from autoconf.
614 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
615 (m4_init): Adjust to latest m4.git changes.
616 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
617 effects.
618 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
619 (_m4_list_cmp): Reduce side effects.
620
65015668
AD
6212008-08-27 Akim Demaille <demaille@gostai.com>
622
623 Check yyerrok in calc.at.
bee1df15
EB
624 * tests/calc.at (calc.y): Use yyerrok on "( error )".
625 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
626 expected.
65015668 627
98e26a92
AD
6282008-08-27 Akim Demaille <demaille@gostai.com>
629
630 Support yyerrok in lalr1.cc.
631 YYBACKUP is still to import back into lalr1.cc.
bee1df15 632 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 633
86c0e784
JD
6342008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
635
636 For maintainer-check*, don't recompile for a $(VERSION) update.
637 * cfg.mk: New file.
638 (_is-dist-target): Override the one in GNUmakefile.
639 * Makefile.am (EXTRA_DIST): Add cfg.mk.
640
88511166
JD
6412008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
642
643 Update for recent change to gnulib.
644 * src/parse-gram.y: Don't include strverscmp.h. It comes from
645 string.h now.
646
6bbb2ed5
EB
6472008-08-15 Eric Blake <ebb9@byu.net>
648
d67c52e8
EB
649 Remaining m4sugar merge from autoconf.
650 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
651 * data/m4sugar/foreach.m4: New file, copied from autoconf.
652 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
653 * src/output.c (output_skeleton): Tell m4 how to find it.
654
6bbb2ed5
EB
655 Partial m4sugar merge from autoconf: m4_map.
656 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
657 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
658 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
659 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
660 for empty list.
661 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
662 Likewise.
663 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
664 declares it.
665
8dce3875
JD
6662008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
667
668 Keep .version and PACKAGE_VERSION in sync.
669 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
670 dependency, and add comments justifying this in more detail. Discussed
671 starting at
672 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
673
882a1fbf
EB
6742008-08-06 Eric Blake <ebb9@byu.net>
675
a3764451
EB
676 Partial m4sugar merge from autoconf: m4_shiftn.
677 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
678 (m4_shift2, m4_shift3): New macros.
679 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
680 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
681 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
682 * data/java.m4 (b4_remove_comma): Likewise.
683
882a1fbf
EB
684 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
685 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
686 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
687 (m4_init): Consolidate wrapped text into single m4_wrap.
688 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
689 in wrapped text.
690
a30e920d
EB
6912008-08-05 Eric Blake <ebb9@byu.net>
692
dfcc5959
EB
693 Partial m4sugar merge from autoconf: builtins, version.m4.
694 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
695 (m4_prepend): Remove, as it is unused and inherently quadratic,
696 whereas m4_append is linear in newer m4.
697 (m4_mkstemp): New builtin.
698 (m4_symbols): Make rename conditional.
699 (m4_version_prereq): Ensure fatal error if used in bison, which
700 intentionally lacks version.m4.
701
a30e920d
EB
702 Fix comments in m4sugar.
703 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
704
445b7470
JD
7052008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
706
707 Update for recent .gitignore fix in Gnulib.
708 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
709 anchored .gitignore entries.
710
a1e50014
JD
7112008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
712
713 Set gnu or gnits strictness.
714 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
715 development and gnits strictness for releases. Based on Eric Blake's
716 suggestion at
717 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
718
d43f77e7
PB
7192008-07-31 Paolo Bonzini <bonzini@gnu.org>
720
721 * NEWS: Clarify documentation of %language.
722
fee2ed87
PB
7232008-07-31 Paolo Bonzini <bonzini@gnu.org>
724
725 Support usage of git-merge-changelog.
726 * .gitattributes: New.
727 * HACKING: Document usage of git-merge-changelog.
728 * bootstrap: Install git-merge-changelog entries in .git/config
729 if appropriate.
730
78029cd5
JD
7312008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
732
733 Remove remaining dependence on CVS Id keyword.
734 * ChangeLog: For the sake of people still using CVS, don't use dollars
735 when mentioning Id.
736 * data/xslt/bison.xsl: Remove Id from header comments, where it was
737 unusual anyway.
738 * data/xslt/xml2dot.xsl: Likewise.
739 * data/xslt/xml2text.xsl: Likewise.
740 * data/xslt/xml2xhtml.xsl: Likewise.
741 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
742 * doc/Makefile.am (neutralize): Remove, no longer needed.
743 (.x.1): Don't use neutralize.
744 (edit): Don't substitute for ID.
745 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
746
c53d18b1
JD
7472008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
748
749 Fix dependence on computed configure variables.
750 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
751 $(top_srcdir)/configure.ac so that changes to computed variables, such
752 as PACKAGE_VERSION, are seen.
753 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
754
5523ac79
JD
7552008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
756
757 Update copyright dates for recent changes.
758 * Makefile.am: Here.
759 * src/Makefile.am: Here.
760 * src/reduce.c: Here.
761 * tests/reduce.at: Here.
762
8fa36911
JD
7632008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
764
765 Use git-version-gen for version names between releases.
766 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
767 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
768 * .prev-version: New.
769 * .version.in: Remove.
78029cd5 770 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
771 revision.
772 * GNUmakefile: Remove, now copied from Gnulib.
773 * Makefile.am: Add code suggested by comments in
774 build-aux/git-version-gen.
775 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
776 .prev-version, and .version.
777 * NEWS (2.3b+): Rename to...
778 (?.?): ... this because we're dropping the "+" version naming scheme,
779 but, in general, we still can't be sure of our next release name.
780 * bootstrap: Add a quick hack to remove from .gitignore the
781 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
782 entry. This should really be fixed in gnulib instead.
783 * bootstrap.conf (gnulib_modules): Add gnumakefile.
784 * configure.ac (AC_INIT): Set version name by invoking
785 build-aux/git-version-gen.
786 (AC_CONFIG_FILES): Remove .version, now generated by
787 build-aux/git-version-gen.
788 * maint.mk: New, copied from coreutils.
789 * doc/.cvsignore (bison.1): Add.
790 * doc/.gitignore (/bison.1): Add.
791 * doc/bison.1: Remove, generated.
792 * src/.cvsignore (revision.c): Remove.
793 * src/.gitignore (/revision.c): Remove.
794 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
795 (BUILT_SOURCES): Remove revision.c.
796 (revision.c): Remove.
797 * src/getargs.c (version): Don't print revision after the VERSION.
798 * src/revision.h: Remove.
799
bcf07cb7
JD
8002008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
801
802 Fix untranslatable composition of sentences. Reported by Goran
803 Uddeborg at
804 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
805 * THANKS (Goran Uddeborg): Add.
806 * src/reduce.c (reduce_print): Report the number of nonterminals and
807 rules useless in the grammar in separate sentences.
808 * tests/reduce.at (Useless Rules): Update output.
809 (Reduced Automaton): Likewise.
810 (Underivable Rules): Likewise.
811 (Empty Language): Likewise.
812
9aacab9a
JD
8132008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
814
815 Fix some .gitignore and .cvsignore problems.
816 * bootstrap (insert_sorted_if_absent): Replace all uses with...
817 (insert_vc_ignore): ... this new function, which prepends `/' to all
818 .gitignore entries before passing them to insert_sorted_if_absent.
819 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
820 .cvsignore files are maintained even though Bison developers run
821 bootstrap while using Git.
822 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
823 unneeded by Bison.
824 (gnulib): Add.
825 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
826 unneeded. Reported by Eric Blake.
827 * lib/.gitignore (/*~): Add.
828 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
829 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
830 Blake.
831 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
832
a9fc7990
JD
8332008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
834
835 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
836 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
837 * bootstrap.conf (gnulib_modules): Add unsetenv.
838 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
839 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
840 (/setenv.m4): Add.
841 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
842 the first argument because it may become position-dependent, and unset
843 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
844 Add comments explaining these issues in more detail.
845
0f1d6f10
JD
8462008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
847
848 Add .gitignore everywhere based on .cvsignore.
849 * .gitignore: New.
850 * build-aux/.gitignore: New.
851 * data/.gitignore: New.
852 * doc/.gitignore: New.
853 * etc/.gitignore: New.
854 * examples/.gitignore: New.
855 * examples/calc++/.gitignore: New.
856 * lib/.gitignore: New.
857 * m4/.gitignore: New.
858 * po/.gitignore: New.
859 * runtime-po/.gitignore: New.
860 * src/.gitignore: New.
861 * tests/.gitignore: New.
862
7bd1665a
JD
8632008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
864
865 * NEWS (2.3b+): New section, empty for now.
866 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
867
72c5b982
JD
8682008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
869
870 * NEWS (2.3b): Update release date since there has been a delay in
871 getting the announcements and tarballs out.
872
bd02cd5d
JD
8732008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
874
875 * NEWS: Version 2.3b.
876 * configure.ac (AC_INIT): Likewise.
877 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
878
9126263e
JD
8792008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
880
881 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
882 been doing it for years.
883 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
884 (Release Procedure): Add FIXME about make alpha being unmaintained.
885
fa6aa7b3
JD
8862008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
887
888 * data/yacc.c: Reformat m4 a little for readability.
889 * src/lalr.c (build_relations): Correct comment.
890
d30b312d
JMG
8912008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
892
893 DJGPP specific issue.
894 * djgpp/config.sed: Fixes required to run configure scripts generated
895 by autoconf 2.62.
896
138d4cd9
JD
8972008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
898
899 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
900 coordinator@translationproject.org.
901
8f7e2e1f
JD
9022008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
903
904 * THANKS: Add Eric Blake.
905
f55efa38
JD
9062008-04-23 Eric Blake <ebb9@byu.net>
907
908 Revert prior patch, by working around autoconf regression.
909 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
910 ("Output file name: ("): Uncomment test.
911 ("Output file name: )"): Likewise.
912 Based on an idea from Noah Misch.
913
096c9f9d
JD
9142008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
915
916 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
917 2.61. Reported by Juan Manuel Guerrero at
918 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
919 * tests/output.at ("Output file name: ("): Comment out test case for
920 now.
921 ("Output file name: )"): Likewise.
922
0f664b89
JD
9232008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
924
925 * GNUmakefile: Update git-version-gen invocation so make dist
926 succeeds.
927
1cfe6375
JD
9282008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
929
930 Update to the current gnulib CVS repository, and fix trigraph handling
931 in Bison.
932 * bootstrap: Update gnulib CVS repository URL.
933 (symlink_to_dir): Encapsulate the code that guarantees the destination
934 directory exists into...
935 (check_dst_dir): ... this new function, and...
936 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
937 fail when copying files into lib/uniwidth/.
938 * src/output.c (prepare_symbols): When writing yytname muscles, where
939 symbol names will be encoded in C-string literals, tell quotearg to
940 escape trigraphs. This used to be the default in gnulib.
941 * tests/regression.at (Token definitions): Because of the change in
942 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
943 escapes trigraphs in symbol names. Thus, yytname no longer has
944 trigraphs unnecessarily doubly escaped. Update test case output.
945 Extend test case to be sure Bison's own error messages will no longer
946 have trigraphs in symbol names unnecessarily escaped once.
947
74c52fc8
JD
9482008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
949
950 Fix make dist infinite loop reported by Juan Manuel Guerrero at
951 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
952 * .cvsignore: Add .version.
953 * .version.in: New.
954 * bootstrap.conf (gnulib_modules): Add git-version-gen.
955 * configure.ac (AC_CONFIG_FILES): Add .version.
956 * build-aux/.cvsignore: Add git-version-gen.
957
8e55b3aa
JD
9582008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
959
960 * NEWS (2.3a+): Mention that -g now takes an argument.
961 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
962 consistency. Update the -g and -x entries now that they take
963 arguments. Use brackets to indicate optional arguments.
964 * src/getargs.c (usage): Explain the relationship between arguments of
965 long and short options more completely. Document --defines and -d
966 separately since the former takes an argument but, for POSIX Yacc, the
967 latter does not.
968 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 969 (getargs): Sort cases.
8e55b3aa 970
59c5ac72
AD
9712008-02-28 Akim Demaille <demaille@gostai.com>
972
973 * doc/bison.texinfo: Fix a few typos.
974
118d4978
AD
9752008-02-28 Akim Demaille <akim@epita.fr>
976
977 * doc/bison.texinfo (Bison Options): Document -W.
978 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
979
7020f1e9
AD
9802008-02-28 Akim Demaille <akim@epita.fr>
981
982 * src/getargs.c (short_options): Split and sort for readability.
983 -g and -x take optional arguments, just like their long options.
984 * build-aux/cross-options.pl: Use /x to make the regexp easier to
985 understand.
986 Fix the handling of $opt which resulted in all the argument to be
987 considered as optional.
988
59da312b
JD
9892008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
990
991 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
992 say its interface is experimental.
993 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
994 Java.
995 (Bison Options): In the -L and --language entry, mention Java.
996 (Java Bison Interface): Say the interface is experimental.
997 * src/getargs.c (usage): Mention -L and --language.
998
999 * NEWS (2.3a+): Say the push parsing interface is experimental.
1000 * doc/bison.texinfo (Push Decl): Likewise.
1001 (Decl Summary): Likewise in the "%define api.push_pull" entry.
1002 (Push Parser Function): Likewise.
1003 (Pull Parser Function): Likewise.
1004 (Parser Create Function): Likewise.
1005 (Parser Delete Function): Likewise.
1006 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
1007 yypull_parse, and yypush_parse entries.
1008
1009 * NEWS (2.3a+): Mention XML support, and say the schema is
1010 experimental.
1011 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
1012 * src/getargs.c (usage): Say the XML schema is experimental.
1013
1014 * NEWS (2.3a+): Say option instead of flag.
1015
2bb3ebec
WP
10162008-02-21 Wojciech Polak <polak@gnu.org>
1017
1018 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
1019 text.
1020
333e670c
JD
10212008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
1022
1023 Fix impure push parser compile error reported by Bob Rossi at
1024 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
1025 * data/yacc.c: Clean up whitespace in the output a little.
1026 (yypstate_allocated): Define for impure push parsers regardless of
1027 whether the pull interface is also requested.
1028 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
1029 check impure push parsers without the pull interface.
1030
1031 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
1032 yyerror takes arguments specified by %parse-param while yypstate_new
1033 does not.
1034 * doc/bison.texinfo (Parser Create Function): Document that
1035 yypstate_new returns 0 for multiple impure parser instances.
1036 * tests/push.at (Push Parsing: Multiple impure instances): Update
1037 expected stderr output.
1038
798096e1
JD
10392008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1040
1041 * runtime-po/POTFILES.in (push.c): Remove.
1042
9ca7f077
JD
10432008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
1044
1045 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
1046 * data/push.c: Rename to...
1047 * data/yacc.c: ... this, overwriting it.
1048 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
1049 `%push-pull-parser' -> `%define api.push_pull "both"'.
1050 Remove old yacc.c tests, and update push.c tests to yacc.c.
1051
42ee26bb
JD
10522008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
1053
1054 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
1055 `"%code top" blocks' instead of `%code "top" blocks'.
1056 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
1057 Clean up whitespace in the output a little.
1058
b1cc23c4
JD
10592008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
1060
1061 Fix documentation problems reported by Tim Josling at
1062 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
1063 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
1064 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
1065 integers. Explain the effect of literal string aliases on error
1066 messages. Copy token 0 documentation from the C++ skeleton
1067 documentation.
1068
ab7f29f8
JD
10692008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
1070
1071 Accept a token number in a %left, %right, or %nonassoc for POSIX
1072 conformance. Reported by Tim Josling at
1073 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
1074 * NEWS (2.3a+): Mention.
1075 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
1076 and code numbers are treated by precedence declarations.
1077 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
1078 of symbols.1.
1079 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
1080 of symbol.
1081 (symbol.prec): New, just like symbol but allows INT.
1082 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
1083 longer holds.
1084 * tests/regression.at (Token number in precedence declaration): New
1085 test case.
1086
a924ef36
JMG
10872008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1088
1089 DJGPP specific issues.
1090 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
1091 be changed. Copyright timestamp adjusted.
1092 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
1093 be changed. Copyright timestamp adjusted.
1094 * djgpp/config.site: Copyright timestamp adjusted.
1095 * djgpp/config_h.sed: Copyright timestamp adjusted.
1096 * djgpp/djunpack.bat: Copyright timestamp adjusted.
1097 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
1098 filename translation list.
1099 * djgpp/subpipe.c (init_subpipe): Check the environment variables
1100 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
1101 files shall be created. Before trying to use the temp dir where the
1102 environment variable points to check that the dir really exists. If
1103 not default to the cwd as temp dir. Copyright timestamp adjusted.
1104 * djgpp/subpipe.h: Copyright timestamp adjusted.
1105 * djgpp/testsuite.sed: Copyright timestamp adjusted.
1106
389c8cfd
PE
11072008-01-30 Paul Eggert <eggert@cs.ucla.edu>
1108
1109 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
1110
5d1cfef4
PE
11112008-01-09 Paul Eggert <eggert@cs.ucla.edu>
1112
1113 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
1114 Problem reported by Claudio Saavedra in
1115 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
1116
e2dcf996
WP
11172008-01-05 Wojciech Polak <polak@gnu.org>
1118
1119 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
1120 document's title with the input grammar file name.
1121
da730230
JD
11222007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
1123
1124 Automate regression testing of the XML/XSLT implementation. Discussed
1125 starting at
1126 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
1127 * configure.ac (XSLTPROC): New substitution.
1128 * Makefile.am (maintainer-xml-check): New phony target invoking...
1129 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
1130 invoking make maintainer-check with BISON_TEST_XML=1.
1131 * tests/atlocal.in (XSLTPROC): New.
1132 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
1133 not to report reachable memory when Bison is expected to have a
1134 non-zero exit status and (2) to compare XML/XSLT output with --graph
1135 and --report=all output for every working grammar when
1136 BISON_TEST_XML=1.
1137 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
1138 (AT_BISON_CHECK_XML): New.
1139 (AT_QUELL_VALGRIND): New.
1140 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
1141 (AT_CHECK): ... don't redefine this since this was the old way to
1142 quell Valgrind.
1143 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
1144 AT_BISON_CHECK invocations.
1145 * tests/c++.at: Likewise.
1146 * tests/calc.at: Likewise.
1147 * tests/conflicts.at: Likewise.
1148 * tests/cxx-type.at: Likewise.
1149 * tests/existing.at: Likewise.
1150 * tests/glr-regression.at: Likewise.
1151 * tests/headers.at: Likewise.
1152 * tests/input.at: Likewise.
1153 * tests/java.at: Likewise.
1154 * tests/output.at: Likewise.
1155 * tests/push.at: Likewise.
1156 * tests/reduce.at: Likewise.
1157 * tests/regression.at: Likewise.
1158 * tests/sets.at: Likewise.
1159 * tests/skeletons.at: Likewise.
1160 * tests/synclines.at: Likewise.
1161 * tests/torture.at: Likewise.
1162 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
1163 tends to hang xsltproc.
1164 (Big horizontal): Likewise.
1165
408476bc
JD
11662007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
1167
1168 In XML output, remove redundant class attribute on symbol element.
1169 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
1170 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
1171 look up a symbol to determine whether it's a nonterminal or terminal.
1172 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
1173 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
1174
1175 Add prec/assoc information to XML output.
1176 * src/gram.c (grammar_rules_print_xml): For each rule that has a
1177 %prec, add a percent_prec attribute.
1178 * src/print-xml.c (print_grammar): For each terminal that has a
1179 precedence or associativity, add a prec or assoc attribute.
1180 (xml_indent): New.
1181 (xml_puts): Use xml_indent.
1182 (xml_printf): Use xml_indent.
1183 * src/print-xml.h (xml_indent): Prototype.
1184
1185 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
1186 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
1187
d4a26c48
JD
11882007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
1189
1190 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
1191 (bison:ruleByNumber): ... this for clarity.
1192 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
1193 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
1194 (xsl:template match="reduction"): Update.
1195 (xsl:template match="item"): Update.
1196 (xsl:template match="reduction"): Update.
1197
1198 In the XML output, don't print the list of rules where symbols appear.
1199 Compute it in XSLT instead. Discussed at
1200 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
1201 * data/xslt/bison.xsl (bison:ruleByLhs): New.
1202 (bison:ruleByRhs): New.
1203 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
1204 bison:ruleByRhs.
1205 (xsl:template match="terminal/rule"): Remove.
1206 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
1207 bison:ruleByRhs.
1208 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
1209 Remove.
1210 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
1211 bison:ruleByRhs and mode="number-link" for rule template.
1212 (xsl:template match="terminal/rule"): Remove.
1213 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
1214 bison:ruleByRhs and mode="number-link" for rule template.
1215 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
1216 Rewrite as...
1217 (xsl:template match="rule" mode="number-link"): ... this.
1218 * src/print-xml.c (print_grammar): Don't print the list of rules.
1219
ef1b4273
JD
12202007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
1221
1222 Don't let --report affect XML output; always print all information.
1223 Discussed at
1224 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
1225 * src/conflicts.c (log_resolution): Implement.
1226 * src/print-xml.c (print_core): Implement.
1227 (print_state): Implement.
1228 (print_xml): Implement.
1229
1230 * NEWS (2.3a+): Fix quotes.
1231 * src/parse-gram.y (prologue_declaration): For consistency with -v,
1232 don't let %verbose clear the list specified by --report.
1233
0f6cd9e3
AD
12342007-11-26 Akim Demaille <akim@epita.fr>
1235
1236 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
1237
d80fb37a
JD
12382007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
1239
1240 In the XML output, list useless and unused symbols and rules with the
1241 useful ones and add a "usefulness" attribute. Discussed starting at
1242 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
1243 * src/gram.c (grammar_rules_partial_print_xml): Remove.
1244 (grammar_rules_print_xml): Print all rules instead of just those
1245 useful in the grammar, and add a "usefulness" attribute.
1246 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
1247 * src/print-xml.c (print_rules_useless_in_parser): Remove.
1248 (print_grammar): Print all nonterminals instead of just useful ones,
1249 and add a "usefulness" attribute to nonterminals and terminals.
1250 (print_xml): Don't print a separate "reductions" or
1251 "rules-useless-in-parser" element.
1252 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
1253 (reduce_xml): Remove.
1254 (reduce_token_unused_in_grammar): New.
1255 (reduce_nonterminal_useless_in_grammar): New.
1256 * src/reduce.h (reduce_xml): Remove prototype.
1257 (reduce_token_unused_in_grammar): Add prototype.
1258 (reduce_nonterminal_useless_in_grammar): Add prototype.
1259 * data/xslt/xml2text.xsl: Update for XML changes.
1260 * data/xslt/xml2xhtml.xsl: Update for XML changes.
1261 * tests/reduce.at (Useless Terminals): Update output.
1262 (Useless Rules): Update output.
1263 (Reduced Automaton): Update output.
1264
1265 Say "Terminals unused in grammar" instead of "Unused terminals".
1266 * NEWS (2.3a+): Update.
1267 * doc/bison.texinfo (Understanding): Update example output.
1268 * src/reduce.c (reduce_output): Implement.
1269 * data/xslt/xml2text.xsl: Implement.
1270 * data/xslt/xml2xhtml.xsl: Implement.
1271
1bb2bd75
JD
12722007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1273
1274 Accept --report-file=FILE to override the default `.output' filename.
1275 * NEWS (2.3a+): Mention.
1276 * doc/bison.texinfo (Bison Options): Add an entry.
1277 * src/files.c (compute_output_file_names): Don't override
1278 spec_verbose_file if already set.
1279 * src/getargs.c (usage): Document --report-file.
1280 (REPORT_FILE_OPTION): New anonymous enum member.
1281 (long_options): Add entry for it.
1282 (getargs): Add case for it setting spec_verbose_file.
1283
1284 * build-aux/cross-options.pl: Don't record a short option just because
1285 there's an arg.
1286 * doc/.cvsignore: Add yacc.1.
1287
a005a9c4
AD
12882007-11-14 Akim Demaille <akim@epita.fr>
1289
1290 * doc/yacc.1.in: New.
1291 * configure.ac, doc/Makefile.am: Adjust.
1292 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
1293 config.h symbol.
1294 Use AC_SUBST for assignments too.
1295 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
1296
cff03fb2
JD
12972007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
1298
1299 * src/gram.c: Remove comments that duplicate comments in gram.h.
1300
1301 When reporting useless rules and nonterminals, say "useless in grammar"
1302 instead of "useless", and say "useless in parser" instead of "never
1303 reduced". Discussed starting at
1304 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
1305 * NEWS (2.3a+): Mention this change.
1306 * data/xslt/xml2text.xsl: Update output text and expected input XML
1307 element names to match changes below.
1308 * data/xslt/xml2xhtml.xsl: Likewise.
1309 (xsl:template match="bison-xml-report"): Add missing entry in Table of
1310 Contents: "Rules useless in parser due to conflicts".
1311 * doc/bison.texinfo (Decl Summary): Reword a little.
1312 (Understanding): Update example output for changes below.
1313 * src/gram.c: (rule_useful_p): Rename to...
1314 (rule_useful_in_grammar_p): ... this.
1315 (rule_useless_p): Rename to...
1316 (rule_useless_in_grammar_p): ... this.
1317 (rule_never_reduced_p): Rename to...
1318 (rule_useless_in_parser_p): ... this.
1319 (grammar_rules_print): Update for renames.
1320 (grammar_rules_print_xml): Update for renames.
1321 (grammar_rules_never_reduced_report): Rename to...
1322 (grammar_rules_useless_report): ... this since it is used for either
1323 kind of useless rule.
1324 * src/gram.h: Reword comments and update function names in prototypes.
1325 * src/main.c (main): Say "rule useless in parser due to conflicts".
1326 * src/print-xml.c (print_rules_never_reduced): Rename to...
1327 (print_rules_useless_in_parser): ... this, and rename output XML
1328 element "rules-never-reduced" to "rules-useless-in-parser".
1329 (print_xml): Update for rename.
1330 * src/print.c (print_results): Say "Rules useless in parser due to
1331 conflicts".
1332 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
1333 (nonterminals_reduce): Say "nonterminal useless in grammar".
1334 (reduce_output): Say "Nonterminals useless in grammar".
1335 Say "Rules useless in grammar".
1336 (reduce_xml): Rename output XML element "useless" to
1337 "useless-in-grammar".
1338 (reduce_print): Don't report the count of grammatically useless rules
1339 as "rules never reduced" just because %yacc is specified.
1340 In the correct report of this count, say nonterminal(s) and rule(s)
1341 "useless in grammar".
1342 * tests/conflicts.at (S/R in initial): Update expected output.
1343 (Defaulted Conflicted Reduction): Likewise.
1344 (Unreachable States After Conflict Resolution): Likewise.
1345 * tests/existing.at (GNU pic Grammar): Likewise.
1346 * tests/reduce.at (Useless Nonterminals): Likewise.
1347 (Useless Rules): Likewise.
1348 (Reduced Automaton): Likewise.
1349 (Underivable Rules): Likewise.
1350 (Empty Language): Likewise.
1351
66f0441d
JD
13522007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
1353
1354 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
1355 here document and before the EOF so that BSD's implementation of Bourne
1356 shell doesn't parse the delimiter as part of the here document.
1357 * doc/.cvsignore: Add cross-options.texi.
1358 * src/getargs.c (usage): Add a blank line after the warning categories.
1359
d0ee4105
PB
13602007-11-08 Paolo Bonzini <bonzini@gnu.org>
1361
1362 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
1363
e8b1fb9b
AD
13642007-11-05 Akim Demaille <akim@epita.fr>
1365
1366 Remove Id: from bison.1.
1367 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
1368 (perl -0777 -pi -e 's/\.PP\nId): New.
1369 (.x.1): Use it to ignore the version control revision.
1370
2f7a96b5
AD
13712007-11-05 Akim Demaille <demaille@gostai.com>
1372
1373 * build-aux/Makefile.am: Ship cross-options.pl.
1374 * doc/Makefile.am: Always refer to cross-options.texi with
1375 $(srcdir).
1376 (MAINTAINERCLEANFILES): Add it.
1377
f4101aa6
AD
13782007-11-04 Akim Demaille <demaille@gostai.com>
1379
1380 Generate the long/short option cross-table.
1381 * build-aux/cross-options.pl: New.
1382 * doc/Makefile.am (cross-options.texi): New.
1383 * doc/bison.texinfo: Use it.
1384
727a1401
AD
13852007-11-04 Akim Demaille <demaille@gostai.com>
1386
1387 Generate bison.1 using help2man.
1388 * doc/common.x, doc/bison.x: New.
1389 * doc/Makefile.am (bison.1, .x.1): New.
1390 The code is taken from autoconf-2.61/man/Makefile.am.
1391 * configure.ac: Look for help2man.
1392
6aeb9c57
AD
13932007-11-04 Akim Demaille <demaille@gostai.com>
1394
1395 Complete --help.
1396 * src/getargs.c (usage): Document -W, make it clear that -d,
1397 -g and -x have optional arguments.
1398
d7be4085
AD
13992007-11-04 Akim Demaille <demaille@gostai.com>
1400
1401 Find sha1sum when named gsha1sum.
1402 * bootstrap (find_tool): New.
1403 ($SHA1SUM): New.
1404
d9df47b6
JD
14052007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1406
1407 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
1408 at
1409 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
1410 * NEWS (2.3a+): Mention.
1411 * data/bison.m4 (b4_pure_if): Don't define it here.
1412 * data/c.m4 (b4_identification): Depend on individual skeletons to
1413 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
1414 values of the %define variables api.pure or api.push_pull. Define
1415 YYPURE, YYPUSH, and YYPULL accordingly.
1416 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
1417 glr.cc has already defined b4_pure_flag.
1418 * data/push.c: Define b4_pure_if based on `%define api.pure'.
1419 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 1420 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
1421 * doc/bison.texinfo (Pure Decl): Update.
1422 (Push Decl): Update.
1423 (Decl Summary): Add api.pure to %define entry.
1424 In %pure-parser entry, say it's deprecated and reference %define.
1425 (Pure Calling): Update.
1426 (Error Reporting): Update.
1427 (C++ Scanner Interface): Update.
1428 (How Can I Reset the Parser): Update.
1429 (Table of Symbols): In %pure-parser entry, say it's deprecated and
1430 reference %define.
1431 * src/getargs.c (pure_parser): Remove global variable.
1432 * src/getargs.h (pure_parser): Remove extern.
1433 * src/output.c (prepare): Don't define pure_flag muscle.
1434 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
1435 wrapper around `%define api.pure'.
1436 * tests/calc.at (Simple LALR Calculator): Update.
1437 (Simple GLR Calculator): Update.
1438 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
1439 Update.
1440 (GLR: Resolve ambiguity, pure, locations): Update.
1441 (GLR: Merge conflicting parses, pure, no locations): Update.
1442 (GLR: Merge conflicting parses, pure, locations): Update.
1443 * tests/glr-regression.at (Uninitialized location when reporting
1444 ambiguity): Update
1445 * tests/input.at (Unused %define api.pure): New test case.
1446 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
1447 AT_PURE_IF and AT_PURE_AND_LOC_IF.
1448 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
1449
c373bf8b
JD
14502007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1451
1452 %define push_pull -> %define api.push_pull. Discussed starting at
1453 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
1454 * data/push.c: Expect the new name.
1455 * data/yacc.c: Likewise.
1456 * doc/bison.texinfo (Push Decl): Update.
1457 (Decl Summary): Update %define entry.
1458 (Push Parser Function): Update.
1459 (Pull Parser Function): Update.
1460 (Parser Create Function): Update.
1461 (Parser Delete Function): Update.
1462 * tests/calc.at (Simple LALR Calculator): Update.
1463 * tests/input.at (%define enum variables): Update.
1464 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
1465 (Push Parsing: Multiple impure instances): Update.
1466 (Push Parsing: Unsupported Skeletons): Update.
1467 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
1468 (Exploding the Stack Size with Malloc): Update.
1469
1470 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
1471 other entries some.
1472
32f19b6b
JD
14732007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
1474
1475 For the XML output's terminal element, rename @number to @token-number,
1476 and add @symbol-number. In the nonterminal element, rename @number to
1477 @symbol-number. Discussed starting at
1478 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
1479 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
1480 renames.
1481 (xsl:template match="nonterminal"): Likewise.
1482 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
1483 (xsl:template match="nonterminal"): Likewise.
1484 * src/print-xml.c (print_grammar): Implement.
1485
255a6b90
JD
14862007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
1487
1488 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
1489 2007-10-11 change, the child elements here are items not rules.
408476bc 1490 (xsl:template match="item"): New.
255a6b90
JD
1491 (xsl:template match="rule"): Update for new reduced itemset.
1492 (xsl:template match="point"): Remove.
1493 (xsl:template match="empty"): For consistency with --graph, don't
1494 output "/* empty */".
1495 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
1496 line-wrap, don't pass a negative value as first-line-length since this
1497 won't work with the following changes.
1498 (xsl:template name="line-wrap"): Simplify slightly.
1499 (xsl:template name="ws-search"): Eliminate recursion.
1500 * src/print_graph.c (print_core): Don't print a reduction's lookahead
1501 set next to an item whose dot is not at the end of the RHS even if it
1502 happens to be associated with the same rule.
1503
88c78747
JD
15042007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
1505
31984206
JD
1506 Add %define lr.keep_unreachable_states.
1507 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
1508 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
1509 * src/main.c (main): Implement it.
1510 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1511 Extend to test it, and fix a typo.
1512
15132007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
1514
1515 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
1516 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
1517 the example .output text.
1518 * tests/regression.at (Extra lookahead sets in report): Improve wording
1519 of comments.
1520
b7a70162
WP
15212007-10-17 Wojciech Polak <polak@gnu.org>
1522
1523 * src/print-xml.c (print_grammar): Renamed
1524 <terminal> and <nonterminal> attributes:
1525 "type" to "number" and "symbol" to "name".
1526 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
1527 Use new attribute names.
1528 (xsl:template match="nonterminal"): Likewise.
1529 * data/xslt/xml2xhtml.xsl: Likewise.
1530
a0de5091
JD
15312007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
1532
1533 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
1534 (Option Cross Key): Likewise.
1535
1536 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
1537 next to an item whose dot is not at the end of the RHS even if it
1538 happens to be associated with the same rule.
1539 * src/print.c (print_core): Likewise.
1540 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
1541 (Resolved SR Conflicts): Update output.
1542 * tests/regression.at (Extra lookahead sets in report): New test case.
1543
4c20d18d
WP
15442007-10-11 Wojciech Polak <polak@gnu.org>
1545
1546 * src/print-xml.c (print_core): Remove item set
1547 redundancy.
1548 * data/xslt/bison.xsl (bison:ruleNumber): New key.
1549 Improve processing time. Suggested by Joel E. Denny.
1550 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
1551 Write xsl:param "required" attribute as comment.
1552 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
1553 (xsl:template match="rule"): Support new reduced itemset.
1554 (xsl:template match="point"): Remove.
1555 * data/xslt/xml2xhtml.xsl: Likewise.
1556
f506ad1c
JD
15572007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
1558
1559 * src/getargs.c (version): Update copyright year.
1560
21f1b063
JD
15612007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
1562
1563 Make xml2dot.xsl and --graph produce the same output.
1564 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
1565 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
1566 escaped later.
1567 (xsl:template name="output-node"): Use the new escape template instead
1568 of the string-replace template directly.
1569 (xsl:template name="output-edge"): Likewise.
1570 (xsl:template name="escape"): New, escapes backslashes and newlines in
1571 addition to quotation marks.
1572 * src/graphviz.c (start_graph, output_node, output_edge): Add
1573 whitespace to output for legibility.
1574
1575 Make xml2text.xsl and --report produce the same output, and remove the
1576 XML "conflicts" element since a conflict summary is easily extracted
1577 from the automaton.
1578 * data/xslt/bison.xsl: New.
1579 (xsl:template match="state" mode="bison:count-conflicts): New.
1580 * data/xslt/xml2text.xsl: Import bison.xsl.
1581 (xsl:template match="bison-xml-report"): Instead of styling the
1582 "conflicts" element, style the "automaton" element with mode
1583 "conflicts". Unlike the former, the latter lists S/R and R/R
1584 conflicts for a state on the same line.
1585 (xsl:template match="conflicts"): Remove.
1586 (xsl:template match="conflict"): Remove.
1587 (xsl:template match="terminal"): Line-wrap the list of rules in which
1588 the terminal is used.
1589 (xsl:template match="nonterminal"): Likewise for nonterminals.
1590 (xsl:template match="automaton" mode="conflicts"): New.
1591 (xsl:template match="state" mode="conflicts"): New.
1592 (xsl:template name="line-wrap"): New.
1593 (xsl:template name="ws-search"): New.
1594 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
1595 (xsl:template match="bison-xml-report"): Instead of styling the
1596 "conflicts" element, style the "automaton" element with mode
1597 "conflicts."
1598 (xsl:template match="conflicts"): Remove.
1599 (xsl:template match="conflict"): Remove.
1600 (xsl:template match="automaton" mode="conflicts"): New.
1601 (xsl:template match="state" mode="conflicts): New.
1602 * src/conflicts.c (conflicts_output_xml): Remove.
1603 * src/conflicts.h (conflicts_output_xml): Remove prototype.
1604 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
1605 * src/print.c (print_grammar): Consistently wrap at the 66th column so
1606 the corresponding XSLT is easier. Also, never wrap between a word and
1607 the comma that follows it.
1608
793fbca5
JD
16092007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
1610
1611 Improve C++ namespace support. Discussed starting at
1612 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
1613 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
1614 b4_namespace_close): New macros that interpret the %define variable
1615 "namespace" so its value can contain "::" to indicate nested
1616 namespaces.
1617 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
1618 the above macros.
1619 * data/lalr1.cc (b4_namespace): Likewise.
1620 * data/location.cc (b4_namespace): Likewise.
1621 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
1622 inside a new table in the general %define entry. Document `%define
1623 namespace' there as well. Point the %name-prefix entry to it since it
1624 explains it more completely in the case of C++.
1625 (C++ Bison Interface): Mention `%define namespace' instead of
1626 %name-prefix.
1627 (Table of Symbols): Remove the `%define push_pull' entry. The %define
1628 entry suffices.
1629 * tests/c++.at (Relative namespace references): New test case.
1630 (Absolute namespace references): New test case.
1631 (Syntactically invalid namespace references): New test case.
1632 * tests/input.at (C++ namespace reference errors): New test case.
1633
35b8730d
JD
16342007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
1635
1636 Add syncline support and location accessor to internal %define
1637 interfaces.
1638 * data/bison.m4 (b4_percent_define_get_loc): New.
1639 (b4_percent_define_get_syncline): New.
1640 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
1641 (b4_percent_define_default): Record defining location as line 1 rather
1642 than 0 for the sake of synchronizing #line's, and define
1643 b4_percent_define_syncline(VARIABLE).
1644 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
1645 * src/muscle_tab.c (muscle_syncline_grow): New.
1646 (muscle_code_grow): Use muscle_syncline_grow.
1647 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
1648 define b4_percent_define_syncline(VARIABLE).
1649 (muscle_percent_define_get_loc): New.
1650 (muscle_percent_define_get_syncline): New.
1651 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
1652 remove some unused variables.
1653 (muscle_percent_define_default): Record defining location as line 1
1654 rather than 0 for the sake of synchronizing #line's, and define
1655 b4_percent_define_syncline(VARIABLE).
1656 (muscle_percent_define_check_values): Use
1657 muscle_percent_define_get_loc.
1658 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
1659 (muscle_percent_define_get_syncline): Prototype.
1660 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1661 defaults): Update output for location change.
1662 (Complaining during macro argument expansion): Extend to test
1663 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
1664
7dc4a694
JD
16652007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
1666
1667 Fix some error-reporting macro bugs.
1668 * data/bison.m4 (b4_cat): New.
1669 (b4_error, b4_error_at): Use b4_cat to send error directives directly
1670 to stdout so they don't become arguments to other macros. Update
1671 comments and add examples.
1672 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
1673 add examples.
1674 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
1675 after printing the error directive so that M4 doesn't report subsequent
1676 problems that are induced by this problem.
1677 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
1678 instead of just in them. Recognize @\n in both places. Both expand to
1679 the empty string. Needed by b4_cat.
1680 * tests/skeletons.at (Complaining during macro argument expansion):
1681 New test case.
1682 (Fatal errors make M4 exit immediately): New test case.
1683
d4bd2295
JD
16842007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
1685
1686 Implement --print-datadir.
1687 * src/getargs.c (usage): Mention.
1688 (PRINT_DATADIR_OPTION): New anonymous enum member.
1689 (long_options): Add entry for it.
1690 (getargs): Add case for it calling compute_pkgdatadir.
1691 * src/output.c (output_skeleton): Encapsulate data directory
1692 computation from here...
1693 (prepare): ... and from here...
1694 (compute_pkgdatadir): ... into this new function.
1695 * src/output.h (compute_pkgdatadir): Prototype.
1696
34cdeddf
JD
16972007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
1698
1699 * src/print-xml.c (escape_bufs): New static global variable
1700 replacing...
1701 (xml_escape_n): ... the static local variable buf here.
1702 (print_xml): Free memory for escape_bufs.
1703 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
1704
d782395d
JD
17052007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
1706
1707 Replace `%push-parser' and `%push-pull-parser' with
1708 `%define push_pull "push"' and `%define push_pull "both"'.
1709 `%define push_pull "pull"' is the default.
1710 * doc/bison.texinfo (Push Decl, Push Parser Function,
1711 Pull Parser Function, Parser Create Function, Parser Delete Function):
1712 Update declarations.
1713 (Decl Summary, Table of Symbols): Replace %push-parser and
1714 %push-pull-parser entries with a %define push_pull entry.
1715 * data/bison.m4 (b4_percent_define_check_values): New macro.
1716 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
1717 definitions...
1718 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
1719 definitions...
1720 * data/push.c: ... to here and compute them from the value of the
1721 %define variable push_pull.
1722 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
1723 parsing requests here...
1724 * data/yacc.c: ... hack this to switch to push.c any time
1725 b4_use_push_pull_flag or the %define variable push_pull is set. This
1726 will go away when we mv push.c yacc.c.
1727 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
1728 push parsing is not supported since unused %define variables are
1729 reported anyway.
1730 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
1731 * src/muscle_tab.h (muscle_percent_define_check_values): Update
1732 comments for consistency with b4_percent_define_check_values.
1733 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
1734 muscles.
1735 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
1736 Remove.
1737 (prologue_declaration): Remove %push-parser and %push-pull-parser
1738 rules.
1739 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
1740 * tests/calc.at: Update declarations.
1741 * tests/input.at (%define enum variables): New test case.
1742 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
1743 declaration.
1744 (Push Parsing: Multiple impure instances): Update declaration.
1745 (Push Parsing: Unsupported Skeletons): New test case.
1746 * tests/torture.at (Exploding the Stack Size with Alloca): Update
1747 declaration.
1748 (Exploding the Stack Size with Malloc): Update declaration.
1749
3f999f78
WP
17502007-09-24 Wojciech Polak <polak@gnu.org>
1751
1752 Add XSLT transformations.
1753
1754 * data/xslt/xml2dot.xsl: Transform XML into DOT.
1755 * data/xslt/xml2text.xsl: Transform XML into plain text.
1756 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
1757 * data/Makefile.am (xsltdir): New variable.
1758 (dist_xslt_DATA): Add xslt/*.xsl files.
1759
a4f75309
PE
17602007-09-23 Paul Eggert <eggert@cs.ucla.edu>
1761
1762 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
1763 Problem reported by Wojciech Polak.
1764 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
1765 (xml_printf): Undo change I made on 21 September; that is,
1766 indent 2 spaces, not 1.
1767
ad5feac4
JD
17682007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
1769
1770 Pacify ./configure --enable-gcc-warnings.
1771 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
1772 `char const *' instead of `char *'.
1773 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
1774 local variable `sep'.
1775
41d7a5f2
PE
17762007-09-21 Paul Eggert <eggert@cs.ucla.edu>
1777
1778 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
1779 elsewhere.
1780 * src/print-xml.c: Prefer "const" after types; that's more consistent.
1781 (xml_printf): Indent just 1 space for level.
1782 (e_char, xlate_char): Remove.
1783 (xml_escape_string): Rewrite to avoid undefined behavior (used
1784 storage that was freed from the stack).
1785 (xml_escape_n): Don't bother checking for subscript error.
1786
3f999f78
WP
17872007-09-21 Wojciech Polak <polak@gnu.org>
1788
1789 Add Bison XML Automaton Report.
41d7a5f2
PE
1790
1791 Add support for an -x option to generate an XML report.
1792 It is not documented yet.
1793 * src/print-xml.c: New file.
1794 * src/print-xml.h: Likewise.
1795 * lib/timevar.def (TV_XML): New var.
1796 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
1797 * src/conflicts.c: Include print-xml.h.
1798 (solved_conflicts_xml_obstack): New var.
1799 (log_resolution, conflicts_solve, conflicts_free):
1800 Add support for XML report.
1801 (conflicts_output_val): New function.
1802 * src/conflicts.h (conflicts_output_val): New decl.
1803 * src/files.c (spec_xml_file): New var.
1804 (compute_output_file_names, output_file_names_free): Add XML support.
1805 * src/files.h (spec_xml_file): New decl.
1806 * src/getargs.c (xml_flag): New var.
1807 (usage, short_options, long_options, getargs): Add XML support.
1808 * src/getargs.h (xml_flag): New decl.
1809 * src/gram.c: Include print-xml.h.
1810 (rule_lhs_print_xml, rule_rhs_print_xml):
1811 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
1812 New functions.
1813 * src/gram.h: Declare external ones.
1814 * src/main.c: Include print-xml.h.
1815 (main): Add XML support.
1816 * src/reduce.c: Include print-xml.h.
1817 (reduce_xml): New function.
1818 * src/reduce.h: Declare it.
1819 * src/state.c: Include print-xml.h.
1820 (state_new): Add XML support.
1821 (state_rule_lookahead_tokens_print_xml): New function.
1822 * src/state.h: Declare it.
1823 (struct state): New member solved_conflicts_xml.
1824 * src/symtab.c (symbol_class_get_string): New function.
1825 * src/symtab.h: Declare it.
1826
6d8e724d
PE
18272007-09-21 Paul Eggert <eggert@cs.ucla.edu>
1828
1829 * GNUmakefile: Switch to coreutils's version.
1830 * bootstrap: Likewise.
1831 * Makefile.cfg: Adjust to new GNUmakefile.
1832 * README-hacking: Likewise.
1833
1834 Import from gnulib:
1835
1836 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
1837 Bruno Haible <bruno@clisp.org>
1838
1839 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
1840 and is a script that invokes bison. Tighten the code. Add comments.
1841
922bdd7f
JD
18422007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
1843
1844 Spell "boolean" as "Boolean". Reported by Akim Demaille.
1845 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
1846 * doc/bison.texinfo (Decl Summary): Fix.
1847 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
1848 * tests/input.at (Boolean %define variables): Update output.
1849 * tests/skeletons.at (%define boolean variables: invalid skeleton
1850 defaults): Rename to...
1851 (%define Boolean variables: invalid skeleton defaults): ... this and
1852 update output.
1853
1b17b01d
JD
18542007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
1855
1856 In impure push mode, don't allow more than one yypstate to be allocated
1857 since multiple impure parsers would corrupt yynerrs.
1858 * data/push.c (yypstate_allocated): New static global variable
1859 initialized to 0.
1860 (yypull_parse): If yypstate_new returns 0, don't report it as memory
1861 exhaustion if yypstate_allocated is 1, but still return 2.
1862 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
1863 already 1. Otherwise, set it to 1.
1864 (yypstate_delete): Set it to 0.
1865 * tests/push.at (Push Parsing: Multiple impure instances): New test
1866 case.
1867
9987d1b3
JD
18682007-08-17 Bob Rossi <bob@brasko.net>
1869
1870 * doc/bison.texinfo (Push Decl): Document the push parser.
1871 (Table of Symbols): Ditto.
1872 (Pure Decl): Ditto.
1873 (Decl Summary): Ditto.
1874 (Multiple Parsers, Push Parser Function, Pull Parser Function,
1875 Parser Create Function, Parser Delete Function):
1876 Add new push parser symbols.
1877 (Table of Symbols): Document push-parser, push-pull-parser,
1878 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
1879
f16b0819
PE
18802007-08-15 Paul Eggert <eggert@cs.ucla.edu>
1881
1882 Update to GPLv3.
1883 * doc/gpl-3.0.texi: New file.
1884 * doc/gpl.texi: Remove.
1885 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
1886 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
1887 * README-hacking, TODO, bootstrap, bootstrap.conf:
1888 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
1889 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
1890 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
1891 * data/lalr1.cc, data/lalr1.java, data/location.cc:
1892 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
1893 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
1894 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
1895 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
1896 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
1897 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
1898 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
1899 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
1900 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
1901 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
1902 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
1903 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
1904 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
1905 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
1906 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
1907 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
1908 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
1909 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
1910 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
1911 * src/complain.c, src/complain.h, src/conflicts.c:
1912 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
1913 * src/files.h, src/flex-scanner.h, src/getargs.c:
1914 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
1915 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
1916 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
1917 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
1918 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
1919 * src/print.c, src/print.h, src/print_graph.c:
1920 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
1921 * src/reduce.h, src/relation.c, src/relation.h:
1922 * src/revision.h, src/scan-code.h, src/scan-code.l:
1923 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
1924 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
1925 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
1926 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
1927 * tests/Makefile.am, tests/actions.at, tests/c++.at:
1928 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
1929 * tests/existing.at, tests/glr-regression.at:
1930 * tests/headers.at, tests/input.at, tests/java.at:
1931 * tests/local.at, tests/output.at, tests/push.at:
1932 * tests/reduce.at, tests/regression.at, tests/sets.at:
1933 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
1934 * tests/torture.at:
1935 Update to GPLv3.
1936
728c4be2
JD
19372007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1938
1939 Get rid of broken %no-parser, -n, and --no-parser implementation and
1940 documentation.
1941 * TODO: Don't mention them.
1942 * doc/bison.1: Likewise.
1943 * doc/bison.texinfo (Decl Summary): Likewise.
1944 (Bison Options): Likewise.
1945 (Option Cross Key): Likewise.
1946 * src/getargs.c (no_parser_flag): Remove global variable.
1947 (usage): Don't print description of -n and --no-parser.
1948 (long_options): Remove --no-parser entry here.
1949 (getargs): Remove -n case in the switch here.
1950 * src/getargs.h (no_parser_flag): Remove extern.
1951 * tests/regression.at (Web2c Actions): Remove comment that mentions
1952 --no-parser.
1953
5d31a216
JD
19542007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1955
1956 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
1957 name user variables starting with `yy'. Just pass NULL instead of a
1958 dummy local &yylval to yypush_parse.
1959 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
1960 starting with `yy'.
1961
a2ea208d
JD
19622007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
1963
1964 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
1965 true since it's then always used regardless of whether yyoverflow is
1966 defined. Reported by Christian Burger at
1967 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
1968 * THANKS: Add Christian Burger.
1969
91661ebb
JD
1970 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1971 node names: say "Decl Summary" not "Bison Declaration Summary".
1972
cbd50549
JD
19732007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
1974
1975 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
1976 determine whether this function has already complained about an invalid
1977 value for a %define boolean variable, don't check whether Bison has
1978 ever examined the value. As written, the check was a tautology.
1979 Instead, record and check for this complaint using a separate muscle.
1980
eb1b0740
JD
19812007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1982
1983 Fix push parsing memory leak reported by Brandon Lucia at
1984 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
1985 * THANKS: Add Brandon Lucia.
1986 * data/push.c (yypstate_delete): Free the stack if it was reallocated
1987 but the parse never completed and thus freed it.
1988 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
1989 * tests/testsuite.at: Include push.at.
1990 * test/push.at: New.
1991 (Push Parsing: Memory Leak for Early Deletion): New test case.
1992
9d774aff
JD
19932007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
1994
1995 Improve handling of multiple S/R conflicts in the same state and of S/R
1996 conflicts involving multiple reductions.
1997 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
1998 set for a state here or Bison will abort if it is reassigned on a
1999 later conflicted reduction in the same state.
2000 Similarly, don't finalize and assign the solved conflicts report here
2001 or it will be lost if it is reassigned on a later conflicted reduction
2002 in the same state.
2003 (set_conflicts): Instead, assign them both here after all S/R conflicts
2004 in the state have been fully examined.
2005 * src/print.c (shift_set): Rename to...
2006 (no_reduce_set): ... this.
2007 (print_reductions): Update for rename, and add %nonassoc error action
2008 tokens to no_reduce_set so that, when printing the first remaining
2009 reduction on an error action token, the reduction is enclosed in
2010 brackets.
2011 (print_results): Update for rename.
2012 * tests/conflicts.at (Solved conflicts report for multiple reductions
2013 in a state): New test case.
2014 (%nonassoc error actions for multiple reductions in a state): New test
2015 case.
2016
2017 * src/main.c (main): Don't depend on C99 features.
2018
10159d2a
JD
20192007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2020
2021 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
2022 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
2023 uniwidth.
10159d2a 2024
953b3935
JD
20252007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
2026
2027 * bootstrap (slurp): Create target directories that don't exist.
2028 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
2029
6ce2d93a
JD
20302007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
2031
2032 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
2033 than item number.
2034 * closure.c (closure): Likewise.
2035 * state.h (reductions): Comment sorting of rules.
2036 (state): Comment sorting of items.
2037
ce3448d5
JD
20382007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
2039
2040 Fix C++ test cases after recent Gnulib changes. Discussed starting at
2041 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
2042 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
2043 definition in order to avoid Gnulib headers since we don't use config.h
2044 here.
2045 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
2046 rather than AT_DATA so that config.h is included.
2047
8a86eef0
JD
20482007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
2049
2050 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
2051 instead of fprintf. Guard these functions with #if YYDEBUG instead of
2052 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
2053 and so that YYFPRINTF is guaranteed to be defined here.
2054
b1a81613
JD
20552007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
2056
2057 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
2058 with...
2059 (muscle_percent_define_check_values): ... this more helpful function.
2060 Again, it's not used yet, but it will be.
2061 * src/muscle_tab.h: Likewise.
2062
71b61d4d
JD
2063 Improve some comments in parser table construction.
2064 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
2065 (generate_states): Don't mention ruleset, which is internal to closure.
2066 * src/closure.c (closure): Explain sorting of core and itemset, which
2067 is required for this function to behave correctly.
2068 * src/closure.h (closure): Mention sorting.
2069
2a6b783d
JD
20702007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
2071
2072 * src/lalr.c (state_lookahead_tokens_count): For code readability,
2073 move the check for disabled transitions to an aver since conflict
2074 resolution hasn't happened yet.
2075
2076 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
2077 labels a state as inconsistent just because it has error transitions.
2078 The original form of this check appeared in revision 1.1 of lalr.c,
2079 which was committed on 1991-12-21. Now (at least), changing the
2080 consistency label on such a state appears to have no useful effect in
2081 any of the places it is examined, which I enumerate below. The key
2082 point to understanding each item in this enumeration is that a state
2083 with an error transition is labelled consistent in the first place only
2084 if it has no rules, so the check cannot matter for states that have
2085 rules. (1) Labelling a state as inconsistent will cause set_conflicts
2086 to try to identify its conflicts, and a state must have *rules* to have
2087 conflicts. (2) Labelling a state as inconsistent will affect how
2088 action_row sets the default *rule* for the state. (3) Labelling a
2089 state as inconsistent will cause build_relations to add lookback edges
2090 to *rules* in that state.
2091 * src/state.h (struct state): Word the comment for member consistent
2092 more carefully.
2093
14462c2b
JD
20942007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2095
2096 Don't depend on C99 features.
2097 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
2098 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
2099 * src/reader.c (check_and_convert_grammar): Fix for-loop.
2100 * src/state.c (state_mark_reachable_states): Fix for-loop.
2101 (state_remove_unreachable_states): Fix for-loop.
2102
2103 Don't widen struct state with member reachable just to temporarily
2104 record reachability. Instead, use a local bitset.
2105 * src/state.h (struct state): Remove member.
2106 * src/state.c (state_new): Don't initialize it.
2107 (state_mark_reachable_states): Rename to...
2108 (state_record_reachable_states): ... this, and use bitset.
2109 (state_remove_unreachable_states): Use bitset.
2110
5a43d418
JD
21112007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
2112
2113 * src/Makefile.am (yacc): Quote target action commands properly so
2114 that the yacc script isn't corrupt. Reported by Hans Aberg at
2115 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
2116
0c650a20
JD
2117 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
2118 the case of pure parsers. Reported by Frans Englich at
2119 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
2120 * THANKS: Add Frans Englich.
2121
61fee93e
JD
2122 * NEWS (2.3a+): In the %code entry, reference section `Bison
2123 Declaration Summary' from the manual now since the %code summary has
2124 moved there.
2125 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
2126 in the rules section must be terminated by semicolons.
2127
f124d423
JD
21282007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2129
2130 Extend the front-end API for %define variables to more completely
2131 mirror the back-end. This will be useful in the future.
2132 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
2133 Update comments to mention the new front-end counterparts of these
2134 macros.
2135 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
2136 for muscle_string_decode and muscle_location_decode.
2137 (muscle_string_decode): New static function.
2138 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
2139 (muscle_percent_define_get, muscle_percent_define_ifdef): New
2140 functions.
2141 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
2142 muscle_percent_define_get to mimic the b4_percent_define_flag_if
2143 implementation more closely.
2144 (muscle_percent_define_invalid_value): New function.
2145 * src/muscle_tab.h (muscle_percent_define_get,
2146 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
2147 Prototype.
2148
75ad86ee
JD
21492007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2150
2151 * NEWS (2.3a+): Mention yesterday's state-removal change.
2152 (2.3a): Remove the %language entry, which was added after 2.3a.
2153 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
2154 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
2155 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
2156 tests/existing.at: Update copyright date.
2157
5967f0cf
JD
21582007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2159
2160 If conflict resolution makes states unreachable, remove those states,
2161 report rules that are then unused, and don't report conflicts in those
2162 states.
2163 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
2164 New global function.
2165 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
2166 function.
2167 * src/main.c (main): After conflict resolution, remove the unreachable
2168 states and update all data structures that reference states by number.
2169 * src/state.c (state_new): Initialize each state's reachable member to
2170 false.
2171 (state_mark_reachable_states): New static function.
2172 (state_remove_unreachable_states): New global function.
2173 * src/state.h (struct state): Add member bool reachable.
2174 (state_remove_unreachable_states): Prototype.
2175 * tests/conflicts.at (Unreachable States After Conflict Resolution):
2176 New test case.
2177 * tests/existing.at (GNU pic Grammar): Update test case output now that
2178 an unused rule is discovered.
2179
b09f4f48
JD
21802007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2181
2182 Minor code cleanup in parser table construction.
2183 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
2184 (new_itemsets, save_reductions): Update for rename to nitemset.
2185 * src/closure.c (nritemset): Rename to...
2186 (nitemset): ... this since the "r" appears to meaningless and isn't
2187 used in the comments.
2188 (closure): Update for rename.
2189 * src/closure.h (nritemset): Update extern to...
2190 (nitemset): ... this.
2191 * src/lalr.c (LA): Fix a typo in comments.
2192 * src/print.c (print_core): Update for rename to nitemset.
2193 * src/print_graph.c (print_graph): Likewise.
2194 * src/state.h: Fix some typos in header comments.
2195
bbb44d83
PE
21962007-04-04 Paul Eggert <eggert@cs.ucla.edu>
2197
9b33de72
PE
2198 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
2199 still sticks to ASCII. Sorry!
2200
bbb44d83
PE
2201 * README-hacking: New file, taken mostly from coreutils, with changes
2202 for Bison. Contains much of the contents of:
2203 * README-cvs: Remove.
2204 * bootstrap: Sync from gnulib.
2205 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
2206 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
2207
29553547
JD
22082007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
2209
2210 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
2211 Setzer.
2212 (Java Differences): Fix some typos.
2213 * THANKS: Add Sebastian Setzer.
2214
01b477c6
PB
22152007-03-07 Paolo Bonzini <bonzini@gnu.org>
2216
730739e4
AD
2217 * data/java.m4 (b4_single_class_if): Remove.
2218 (b4_abstract_if): Look at "%define abstract".
2219 (b4_lexer_if): New.
2220 (b4_union_name): Rename...
2221 (b4_yystype): ... to this. Map to "%define stype".
2222 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
2223 b4_maybe_throws): Fix quoting.
2224 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
2225 * data/lalr1.java (Lexer interface): Always define.
2226 (Lexer interface within parser class): Remove.
2227 (YYLexer class): New, used when "%code lexer" is present.
2228 (constructor): When "%code lexer" is used, pass %lex-param
2229 to the lexer constructor.
2230 (yylex, yyparse): Remove %lex-param from method invocations
2231 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
2232
2233 * doc/bison.texinfo (Java Bison Interface): Mention "%define
2234 abstract". Rename "%define union_name" to "%define stype".
2235 Rename method names according to previous patch.
2236 (Java Scanner Interface): Describe "%code lexer" instead of
2237 "%pure-parser" and "%define single_class".
2238 (Java Differences): Mention "%code lexer".
2239
2240 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
2241 Include scanner here, using macros from tests/local.at.
2242 (AT_DATA_CALC_Y): Remove final argument.
2243 (_AT_CHECK_JAVA_CALC): Likewise.
2244 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
2245 of %locations and %error-verbose.
2246 (main): Test with and without %lex-param.
2247 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
2248 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 2249
122bea3a
JMG
22502007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2251
2252 DJGPP spefic issue. Inhibit the use of disallowed characters for
2253 file name genertion on Win98, WinXP, etc. These are |<>":?*\
2254 and concern testsuite case 46.
2255 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
2256 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
2257 * djgpp/config.bat: Inhibit the use of disallowed characters.
2258
9611cfa2
JD
22592007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2260
2261 Miscellaneous %define and %code cleanup.
2262 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
2263 values are interpreted.
2264 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
2265 documentation a little more.
2266 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
2267 muscle_percent_define_insert, muscle_percent_code_grow): New
2268 functions/macros.
2269 * src/muscle_tab.h (muscle_percent_define_insert,
2270 muscle_percent_code_grow): Prototype.
2271 * src/parse-gram.y (prologue_declaration): Use
2272 muscle_percent_define_insert and muscle_percent_code_grow when parsing
2273 %define and %code directives.
2274
2275 Make it easy to share %define boolean variables between the front-end
2276 and back-end. Though not used yet, this will be useful in the future.
2277 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
2278 Bison uses of names rather than just skeleton uses of names.
2279 (b4_percent_define_get, b4_percent_define_ifdef): Rename
2280 b4_percent_define_skeleton_variables(VARIABLE) to
2281 b4_percent_define_bison_variables(VARIABLE).
2282 (b4_percent_code_get, b4_percent_code_ifdef): Rename
2283 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
2284 b4_percent_code_bison_qualifiers(QUALIFIER).
2285 (b4_check_user_names_wrap): Update for renames.
2286 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
2287 muscle_percent_define_default): New functions mimicking
2288 b4_percent_define_flag_if and b4_percent_define_default.
2289
2290 For %define variables, report locations for invalid values and
bbb44d83 2291 redefinitions.
9611cfa2
JD
2292 * data/bison.m4 (b4_percent_define_flag_if): Read
2293 b4_percent_define_loc(VARIABLE) to report the location of an invalid
2294 value for VARIABLE.
2295 (b4_percent_define_default): Save a special location in
2296 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
2297 must later be reported as invalid.
2298 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
2299 functions.
2300 (muscle_percent_define_insert): Record the location of VARIABLE in
2301 muscle percent_define_loc(VARIABLE), and use it to report the previous
2302 location for a redefinition.
2303 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
2304 (muscle_percent_define_default): Update like b4_percent_define_default.
2305 (muscle_grow_user_name_list): Rename to...
2306 (muscle_user_name_list_grow): ... this for consistency and use
2307 muscle_location_grow.
2308 * src/muscle_tab.h (muscle_location_grow): Prototype.
2309 * tests/input.at (%define errors): Update expected output.
2310 * tests/skeletons.at (%define boolean variables: invalid skeleton
2311 defaults): New test case.
2312
0bf92491
JD
23132007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
2314
2315 * src/print.c (lookahead_set, state_default_rule): Remove.
2316 (print_reductions): Replace state_default_rule invocation with
2317 equivalent use of yydefact, which was computed in token_actions in
2318 tables.c.
2319 (print_results): Don't allocate lookahead_set.
2320
d3b12988
PB
23212007-02-27 Paolo Bonzini <bonzini@gnu.org>
2322
2323 * data/lalr1.java: Prefix all private members with yy.
2324
f57a7536
JD
23252007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
2326
2327 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 2328 Sebastien Fricker at
f57a7536 2329 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 2330 * THANKS: Add Sebastien Fricker.
f57a7536
JD
2331 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
2332 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
2333 accept a variable number of arguments.
2334
6404a5bf
JD
23352007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2336
2337 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
2338
e4e09639
JMG
23392007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2340
2341 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
2342 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
2343 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
2344
d7e0a1a7
PE
23452007-02-11 Paul Eggert <eggert@cs.ucla.edu>
2346
2347 Undo my 2007-02-07 change, switching back to the c-strcase module
2348 introduced in the 2007-02-03 change. Bruno Haible reported that
2349 the 2007-02-07 change would be dangerous in Turkish if we add a
2350 language whose name contains "i", since "i" is not lowercase "I"
2351 in Turkish.
2352 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
2353 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
2354 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
2355 * m4/.cvsignore: Remove strcase.m4.
2356 * src/getargs.c: Revert 2007-02-07 change, as follows.
2357 Include c-strcase.h.
2358 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
2359
deee93a1
JD
23602007-02-11 Bruno Haible <bruno@clisp.org>
2361
2362 Enable the Java related testsuite tests when the only Java compiler
2363 found is a gcj < 4.3. Discussed at
2364 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
2365 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
2366
574add85
JD
23672007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
2368
2369 * data/Makefile.am: Update copyright date.
2370 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
2371 yypstate_new returns NULL.
2372 (yypstate_new): Return NULL if malloc does.
2373 * src/reader.c (packgram): Move translation of rule actions from the
2374 beginning of packgram to...
2375 (check_and_convert_grammar): ... here right before packgram is invoked
2376 so it's easier to write more complete comments, and remove redundant
2377 code.
2378
e785ccf7
JD
23792007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
2380
2381 As in semantic actions, make @$ in %initial-action, %destructor, and
2382 %printer imply %locations.
2383 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
2384 scanning @$.
2385 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
2386 (@$ in %initial-action implies %locations,
2387 @$ in %destructor implies %locations,
2388 @$ in %printer implies %locations): ... these new test cases.
2389
1cfe1ed7
PE
23902007-02-07 Paul Eggert <eggert@cs.ucla.edu>
2391
2392 Undo most of the 2007-02-03 change, switching to the strcase module
2393 now that gnulib strcase has been fixed.
2394 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
2395 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
2396 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
2397 * m4/.cvsignore: Add strcase.m4.
2398 * src/getargs.c: Revert 2007-02-03 change, as follows.
2399 Don't include c-strcase.h.
2400 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
2401 strcasecmp has "unspecified behavior" outside the POSIX locale,
2402 but it works fine in practice if at least one argument is ASCII,
2403 as is the case in Bison.
2404
0049ec86
PB
24052007-02-07 Paolo Bonzini <bonzini@gnu.org>
2406
2407 * tests/java.at: Skip tests if only one of javac/java is present.
2408 Reported by Joel E. Denny.
2409 * tests/atlocal.in: Adjust copyright years.
2410
24112007-02-05 Paolo Bonzini <bonzini@gnu.org>
2412
2413 * data/lalr1.java (Stack): Work around old verifiers that disallow
2414 access to the private fields of an inner class, from the outer class.
2415 We can make Stack's fields public because user code doesn't have access
2416 to the instance of Stack used by parse(). Reported by Paul Eggert.
2417
2c2b7220
PE
24182007-02-03 Paul Eggert <eggert@cs.ucla.edu>
2419
2420 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
2421 the right spot for these files?
2422 * bootstrap.conf (gnulib_modules): Add c-strcase.
2423 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
2424 c-strncasecmp.c.
2425 * src/getargs.c: Include c-strcase.h.
2426 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
2427 to avoid unspecified behavior.
2428
b2b81dae
JD
24292007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
2430
2431 * doc/bison.texinfo (Decl Summary): Correct typo.
2432
c1d19e10
PB
24332007-01-30 Paolo Bonzini <bonzini@gnu.org>
2434
2435 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
2436 Complain if the value does not match empty, "true" or "false".
2437 * data/c++.m4: Adjust default definitions of %define variables.
2438 * data/java.m4: Adjust default definitions of %define variables.
2439 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
2440 to above behavior.
2441 * tests/input.at (Boolean %define variables): Test new behavior.
2442
8405b70c
PB
24432007-01-29 Paolo Bonzini <bonzini@gnu.org>
2444
2445 * NEWS: Mention java.
2446 * TODO: Remove things that are done.
2447 * bootstrap.conf: Add javacomp-script and javaexec-script.
2448 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
2449
2450 * data/Makefile.am: Add new files.
2451 * data/java-skel.m4: New.
2452 * data/java.m4: New.
2453 * data/lalr1.java: New.
2454
2455 * doc/bison.texinfo: Put "A Complete C++ Example" under
2456 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
2457 under Other Languages.
2458
2459 * src/getargs.c (valid_languages): Add Java.
2460 * src/getargs.h (struct bison_language): Update size of string fields.
2461
2462 * tests/Makefile.am: Add java.at.
2463 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
2464 * tests/java.at: New.
2465 * tests/testsuite.at: Include it.
2466
3eb82471
JD
24672007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
2468
2469 Clean up.
2470 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
2471 at_directive_argv arguments so these no longer have to be global
2472 variables. Also, update the implementation for the following changes.
2473 (fail_for_at_directive_too_many_args,
2474 fail_for_at_directive_too_few_args): Add at_directive_name argument.
2475 (at_directive_name): Remove as at_directive_argv[0] will be used for
2476 this now.
2477 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
2478 for the directive name.
2479 (at_directive_argc, at_directive_argv): Make these local within
2480 skel_lex instead of global.
2481 (INITIAL): Update directive start action for above changes.
2482 (SC_AT_DIRECTIVE_ARG): Rename to...
2483 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
2484 (SC_AT_DIRECTIVE_SKIP_WS): Update.
2485 (scan_skel): Move yylex_destroy to...
2486 (skel_scanner_free): ... here.
2487 * tests/skeletons.at (installed skeleton file name): Rename to...
2488 (installed skeleton file names): ... this.
2489
148d66d8
JD
24902007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
2491
2492 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
2493 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
2494 Summary" not "Directives".
2495 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
2496 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
2497 since the former is now the more complete one.
2498 (Prologue Alternatives): Likewise and do the same for %defines.
2499 (Table of Symbols): Add summary of %code, add summary of %define, and
2500 move full %code documentation to...
2501 (Decl Summary): ... here for consistency with other entries in these
2502 sections.
2503 Move %define entry in order to keep this list alphabetized.
2504 Reword %define entry a little to put less emphasis on the skeleton
2505 concept, which most users shouldn't have to think about.
2506
665f0c24
PE
25072007-01-26 Paul Eggert <eggert@cs.ucla.edu>
2508
2509 Adjust to recent gnulib changes.
2510 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
2511 Add string.h, string_.h, unistd_.h, wchar_.h.
2512 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
2513 * src/system.h: Don't include <stpcpy.h>; this is now done by
2514 <string.h>.
2515
592d0b1e
PB
25162007-01-23 Paolo Bonzini <bonzini@gnu.org>
2517
2518 Simplify implementation of unqualified %code, implement macros for
2519 uniform treatment of boolean %define flags. Document %define.
2520 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
2521 b4_percent_code_ifdef): New.
2522 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
2523 * data/c++.m4: Define default value for global_tokens_and_yystype.
2524 * data/glr.cc: Likewise.
2525 * data/location.cc: Use b4_percent_define_flag_if.
2526
148d66d8 2527 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
2528
2529 * src/parse-gram.y (Unqualified %code): Change muscle name to
2530 b4_percent_code().
2531 (content.opt): Default to empty.
2532
a7867f53
JD
25332007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
2534
2535 Implement support for relative and absolute skeleton file names.
2536 Discussed starting at
2537 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
2538 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
2539 (Bison Options): Document in --skeleton entry.
2540 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
2541 full_skeleton can't necessarily hold all of pkgdatadir.
2542 If the specified skeleton file name contains a `/', don't prepend
2543 pkgdatadir.
2544 * src/parse-gram.y (prologue_declaration): If the specified skeleton
2545 file name contains a `/', prepend the grammar file directory.
2546 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
2547 * skeletons.at: New file.
2548 (relative skeleton file names): New test case.
2549 (installed skeleton file names): New test case.
2550 * tests/testsuite.at: Include skeletons.at.
2551
2552 * bootstrap: Update copyright to 2007.
2553
830c9b18
PB
25542007-01-17 Paolo Bonzini <bonzini@gnu.org>
2555
2556 * bootstrap: Remove occurrences of .#bootmp from the files.
2557
a8c2e813
AD
25582007-01-17 Akim Demaille <akim@epita.fr>
2559
2560 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
2561 nonterminals.
2562 Use per-type %printer.
2563
279cabb6
JD
25642007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
2565
2566 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
2567 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2568 djgpp/config.site, src/files.c, src/files.h, src/main.c,
2569 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
2570 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
2571 tests/glr-regression.at, tests/input.at, tests/local.at,
2572 tests/output.at, tests/torture.at: Update copyright to 2007.
2573
bb32f4f2
AD
25742007-01-16 Akim Demaille <akim@epita.fr>
2575
2576 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
2577 error code.
2578 (Calc++ Scanner): Exit with failure if we can't open the input
2579 file.
2580 Accept "-" standing for stdin.
2581 (Calc++ Top Level): Print the result only if the parsing was
2582 successful.
2583
7cff04b5
AD
25842007-01-16 Akim Demaille <akim@epita.fr>
2585
2586 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
2587
a4e25e1d
JD
25882007-01-15 Paolo Bonzini <bonzini@gnu.org>
2589 and Joel E. Denny <jdenny@ces.clemson.edu>
2590
2591 Clean up %define and %code implementation in M4 some. Most
2592 importantly, rename all related macros to be in the b4_percent_define
2593 and b4_percent_code namespaces. Also, complete support for `.' in
2594 %define variable names and %code qualifiers.
2595 * data/bison.m4 (b4_check_user_names): Check for special
2596 "SKELETON-NAMESPACE(name)" macros instead of using two nested
2597 m4_foreach loops.
2598 (b4_get_percent_define, b4_get_percent_code): Rename to...
2599 (b4_percent_define_get, b4_percent_code_get): ... these.
2600 Extend documentation with examples.
2601 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
2602 b4_percent_define_skeleton_variables and
2603 b4_percent_code_skeleton_qualifiers.
2604 Expect any value for the %define variable `foo' to be stored in the
2605 macro named `b4_percent_define(foo)'; expect any %code blocks for the
2606 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
2607 expect any unqualified %code blocks to be stored in a macro named
2608 `b4_percent_code_unqualified'.
2609 Use m4_indir so that %define variable names and %code qualifiers can
2610 contain `.', which is allowed by the grammar parser.
2611 (b4_percent_define_default): New macro to set a default value for a
2612 %define variable.
2613 (m4_wrap): Update wrapped code, and fix some underquoting.
2614 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
2615 Expect grammar uses of %define variables and %code qualifiers to be
2616 defined in b4_percent_define_user_variables and
2617 b4_percent_code_user_qualifiers.
2618 * data/c++.m4: Use b4_percent_define_default rather than
2619 m4_define_default. Fix some underquoting. Skeleton usage of %define
2620 variable define_location_comparison now implies skeleton usage of
2621 %define variable filename_type.
2622 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2623 data/push.c, data/yacc.c: Update macro names.
2624 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
2625 muscle names.
2626
e37c665c
JMG
26272007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2628
2629 DJGPP specific issues.
2630
2631 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
2632 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
2633
7d2d521f
JD
26342007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2635
2636 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
2637 run parsers in all tests so that Valgrind is invoked during
2638 maintainer-check-valgrind.
2639 (Duplicate representation of merged trees): Free all semantic values.
2640 (Duplicated user destructor for lookahead): Likewise.
2641
e0ac9b4b
JD
26422007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2643
2644 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
2645 command-line prefix.
2646 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
2647 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
2648 miss Valgrind messages.
2649 (Exploding the Stack Size with Malloc): Likewise.
2650
78143faa
JD
26512007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2652
2653 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
2654 locals. Reported by Juan Manuel Guerrero at
2655 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
2656 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
2657 Fix some indentation also.
2658 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
2659 explaining this issue.
2660
7ecec4dd
JD
26612007-01-09 Paolo Bonzini <bonzini@gnu.org>
2662 and Joel E. Denny <jdenny@ces.clemson.edu>
2663
2664 Simplify union and prologue handling, and escape union and lex/parse
2665 params with digraphs.
2666 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
2667 values to the empty string since these are no longer guaranteed
2668 initialized by the front-end.
2669 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
2670 braces around b4_user_stype since this is no longer done by the
2671 front-end.
2672 * src/files.c, src/files.h (pre_prologue_obstack,
2673 post_prologue_obstack): Remove.
2674 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
2675 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
2676 with digraphs. This fixes lex params and parse params.
2677 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
2678 * src/output.c (prepare): Remove muscle insertion of the prologues.
2679 (output): Remove freeing of pre_prologue_obstack and
2680 post_prologue_obstack.
2681 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
2682 than prologue_augment for prologue parsing so you don't need prologue
2683 obstacks.
5c80250c
JD
2684 (grammar_declaration): For %union RHS, use `braceless' instead of
2685 "{...}" so that braces are already stripped and code is escaped with
2686 digraphs.
7ecec4dd
JD
2687 * src/reader.c (prologue_augment): Remove.
2688 (reader): Remove initialization of pre_prologue_obstack and
2689 post_prologue_obstack.
2690 * src/reader.h (prologue_augment): Remove.
2691
2692 * data/c.m4: Remove stray parenthesis.
2693
16dc6a9e
JD
26942007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2695
2696 Remove quotes from variables names in %define directives and from
2697 qualifiers in %code directives, and restrict the characters that are
2698 allowed in them to M4-friendly ones. For %define, continue to support
2699 the quoted form as a deprecated feature. Discussed starting at
2700 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
2701 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
2702 %code.
2703 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
2704 (Decl Summary): In %defines entry, update mention of `%code requires'
2705 and `%code provides'.
16dc6a9e
JD
2706 (C++ Location Values): Update %define uses.
2707 (Calc++ Parser Interface): Likewise.
2708 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 2709 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
2710 * src/parse-gram.y (prologue_declaration): For %define variables, use
2711 `variable' instead of `STRING'.
2712 (grammar_declaration): For %code qualifiers, use `ID' instead of
2713 `STRING'.
2714 (variable): New nonterminal that takes an `ID' or a `STRING'.
2715 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
2716 and %define uses.
2717 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
2718 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
2719 (%define errors): Update %define uses.
2720
e9813cd4
JD
27212007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2722
2723 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
2724 instead of muscle_insert for %define values so that M4-special
2725 characters are replaced with digraphs.
2726 * tests/input.at (%define errors): Extend to check weird values.
2727
6afc30cc
JD
27282007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2729
2730 Instead of having skeletons declare all valid %define variables and
2731 %code qualifiers, provide macros that retrieve the associated values
2732 and build these lists automatically. Thus Bison will now warn when a
2733 variable or qualifier is not used by the skeleton in the current
2734 invocation regardless of whether it might sometimes be used by that
2735 skeleton in other invocations. Also, move all %define value macros to
2736 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
2737 form, which is replaced by %code.
2738 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
2739 (b4_check_user_names): ... this, and change the series of valid name
2740 arguments to a single list argument for names used in the skeleton
2741 similar to the existing list argument for names used in the grammar.
2742 Warn instead of complaining.
2743 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
2744 values and %code code, to format %code code properly, and to build
2745 lists of all %define variables and %code qualifiers used in the
2746 skeleton: b4_skeleton_percent_define_variables and
2747 b4_skeleton_percent_code_qualifiers.
2748 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
2749 Remove, and...
2750 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
2751 the skeleton names lists can finish building first. In place of
2752 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
2753 expect the lists b4_user_percent_define_variables and
2754 b4_user_percent_code_qualifiers.
2755 * data/c++.m4: Where setting default values for b4_parser_class_name,
2756 b4_location_type, b4_filename_type, b4_namespace, and
2757 b4_define_location_comparison, update their names to the
2758 b4_percent_define_ namespace.
2759 * data/glr.c: Don't use b4_check_percent_define_variables and
2760 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
2761 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
2762 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 2763 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
2764 * data/location.cc: Use b4_get_percent_define.
2765 * data/push.c: Don't use b4_check_percent_define_variables and
2766 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
2767 * data/yacc.c: Likewise, and don't call m4_exit in
2768 b4_use_push_for_pull_if or m4_wrap code will never execute.
2769 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
2770 Rename to...
2771 (muscle_grow_user_name_list): ... this for consistency with the
2772 terminology used in bison.m4.
2773 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
2774 %define variable names, and rename muscle used_percent_define_variables
2775 to user_percent_define_variables.
2776 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
2777 user_percent_code_qualifiers.
2778 (content): Remove.
2779 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
2780 {CODE} form is no longer accepted.
2781 * tests/input.at (Reject bad %code qualifiers): Rename to...
2782 (Reject unused %code qualifiers): ... this, and update test output.
2783 (%define error): Update test output.
2784
7eb8a0bc
JD
27852007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
2786
2787 Check for unrecognized %define variables similar to checking for
2788 unrecognized %code qualifiers. Check for redefined %define variables.
2789 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
2790 generalizes...
2791 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
2792 (b4_check_percent_define_variables): New, also wraps it.
2793 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
2794 variables using b4_check_percent_define_variables.
2795 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
2796 all those exercised in the test suite and all those listed in the
2797 `Default values' section of c++.m4. Are there others?
2798 * data/push.c, data/yacc.c: Declare no valid %define variables.
2799 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
2800 similar to muscle_find, but it works even when the muscle stores a
2801 const value.
2802 (muscle_grow_used_name_list): New function for constructing the used
2803 name list muscles that b4_check_for_unrecognized_names requires.
2804 * src/parse-gram.y (prologue_declaration): Warn if a variable is
2805 %define'd more than once. Define the b4_used_percent_define_variables
2806 muscle with muscle_grow_used_name_list.
2807 (grammar_declaration): Abbreviate %code code with
2808 muscle_grow_used_name_list.
2809 * tests/input.at (%define errors): New.
2810
3fc65ead
JD
28112007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2812
2813 Provide warn_at, complain_at, and fatal_at function callbacks to the
2814 skeletons, and use this for %code qualifier complaints.
2815 * data/bison.m4 (b4_error_at): New, invoked by...
2816 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
2817 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
2818 @fatal_at(...@) directives.
2819 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
2820 qualifiers in b4_used_percent_code_qualifiers and to use
2821 b4_complain_at.
2822 * src/location.c, src/location.h (boundary_set_from_string): New global
2823 function.
2824 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
2825 function.
2826 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
2827 to b4_used_percent_code_qualifiers.
2828 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
2829 function.
2830 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
2831 (lineno): Rename to...
2832 (out_lineno): ... this so I don't misunderstand it again.
2833 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
2834 here; these newlines are in the input but not the output file.
2835 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
2836 (at_directive_perform): ... this new static function, and add handling
2837 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
2838 directives.
2839 * tests/input.at (Reject bad %code qualifiers): Update test output with
2840 locations and extend.
2841
2842 * tests/output.at (Output file name: [, Output file name: ]): Remove
2843 bogus comment about these tests failing.
2844
1c7b7e1d
JD
28452007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2846
2847 Clean up b4_check_percent_code_qualifiers a little.
2848 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
2849 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
2850 documentation and add examples.
2851 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
2852 qualifiers here.
2853
08af01c2
JD
28542007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2855
2856 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
2857 unreliable -- especially when they're hidden inside another macro.
2858 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
2859 data/c.m4: Remove m4_divert(-1).
2860 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2861 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
2862 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 2863 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
2864 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
2865 pushed and popped by m4sugar, should be first on the stack.
2866
2867 Provide warn, complain, and fatal function callbacks to the skeletons.
2868 This provides more flexibility than m4_fatal, improves the error
2869 message format, and captures messages for translation. Discussed
2870 starting at
2871 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
2872 * data/bison.m4 (b4_error): New, invoked by...
2873 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
2874 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
2875 directives. Because these M4 macros might be called when the current
2876 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
2877 the previous removal of uses of m4_divert, which caused trouble.
2878 (b4_check_percent_code_qualifiers): Use b4_complain instead of
2879 m4_fatal to report unrecognized %code qualifiers.
2880 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
2881 push parser requests.
2882 * data/glr.c: Use b4_complain instead of m4_fatal to report
2883 non-deterministic push parser requests.
2884 Update @output usage to @output(...@) form.
2885 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
2886 report missing %defines. Update @output usage to @output(...@) form.
2887 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
2888 @output(...@) form.
2889 * src/main.c (main): Invoke skel_scanner_free.
2890 * src/scan-skel.h (skel_scanner_free): Prototype new function.
2891 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
2892 obstack_for_string from flex-scanner.h.
2893 (YY_DECL): Use to declare skel_lex static.
2894 (decode_at_digraphs): Remove; now handled in the new
2895 SC_AT_DIRECTIVE_ARG start condition.
2896 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
2897 functions.
2898 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
2899 at_directive_argv): New static globals.
2900 (INITIAL): Use fail_for_invalid_at.
2901 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
2902 recognize the start of a generalized `@directive(...@)' form and
2903 start...
2904 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
2905 directive args (using the new obstack_for_string), to decode the
2906 contained @ diagraphs, and to perform the directive. It recognizes
2907 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
2908 @output(...@).
2909 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
2910 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
2911 `@,'.
2912 (scan_skel): Initialize obstack_for_string on the first call.
2913 (skel_scanner_free): New function to free obstack_for_string.
2914 * tests/input.at (Reject bad %code qualifiers): Update test output.
2915
8e0a5e9e
JD
29162007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
2917
2918 Consolidate the 4 prologue alternative directives (%code, %requires,
2919 %provides, and %code-top) into a single %code directive with an
2920 optional qualifier field. Discussed at
2921 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
2922 * NEWS (2.3a+): Rewrite the existing entry for the prologue
2923 alternatives.
2924 * doc/bison.texinfo (Prologue Alternatives): Update.
2925 (Decl Summary): Update to %code "requires" and %code "provides".
2926 (Calc++ Parser): Update to %code "requires".
148d66d8 2927 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
2928 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
2929 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
2930 are replaced by b4_percent_code_provides and b4_percent_code_requires,
2931 which are skeleton-specific.
2932 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
2933 declare what %code qualifiers it supports and to complain if any other
2934 qualifiers were used in the grammar.
2935 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
2936 and b4_user_code([b4_percent_code_provides]) in place of
2937 b4_user_requires and b4_user_provides.
2938 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
2939 Add b4_user_code([b4_percent_code_top]) and
2940 b4_user_code([b4_percent_code]).
2941 Invoke b4_check_percent_code_qualifiers.
2942 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2943 PERCENT_REQUIRES): Remove.
2944 (grammar_declaration): Remove RHS's for %code-top, %provides, and
2945 %requires. Rewrite the %code RHS as the unqualified form defining the
2946 muscle b4_percent_code. Add another RHS for the qualified %code form,
2947 which defines muscles of the form b4_percent_code_QUALIFIER and the
2948 b4_used_percent_code_qualifiers muscle.
2949 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2950 PERCENT_REQUIRES): Remove.
2951 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
2952 %code "requires" and %code "provides".
2953 * tests/input.at (Reject bad %code qualifiers): New.
2954
95021767
JD
29552007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2956
2957 Use the new code_props interface for destructors and printers.
2958 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
2959 printer_location members, and change the type of the destructor and
2960 printer members to code_props.
2961 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
2962 symbol_printer_get, semantic_type_destructor_set,
2963 semantic_type_printer_set, default_tagged_destructor_set,
2964 default_tagless_destructor_set, default_tagged_printer_set,
2965 default_tagless_printer_set): Use code_props in arguments and return
2966 types in place of char const * and location.
2967 (symbol_destructor_location_get, symbol_printer_location_get): Remove
2968 since the locations are now contained in the return of
2969 symbol_destructor_get and symbol_printer_get.
2970 * src/output.c (symbol_destructors_output, symbol_printers_output):
2971 Replace with...
2972 (symbol_code_props_output): ... this to eliminate duplicate code.
2973 (output_skeleton): Update to use symbol_code_props_output.
2974 * src/reader.c (symbol_should_be_used): Update use of
2975 symbol_destructor_get.
2976 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2977 Update uses of the various _destructor_set and _printer_set functions.
2978 * src/symtab.c: (default_tagged_destructor_location,
2979 default_tagless_destructor_location, default_tagged_printer_location,
2980 default_tagless_printer_location): Remove since we...
2981 (default_tagged_destructor, default_tagless_destructor,
2982 default_tagged_printer, default_tagless_printer): ... change the type
2983 of these to code_props.
2984 (symbol_new, semantic_type_new, symbol_destructor_set,
2985 semantic_type_destructor_set, symbol_destructor_get,
2986 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
2987 symbol_check_alias_consistency, default_tagged_destructor_set,
2988 default_tagless_destructor_set, default_tagged_printer_set,
2989 default_tagless_printer_set): Update.
2990 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
2991 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
2992 code_props members.
2993 (symbol_print): Use SYMBOL_CODE_PRINT.
2994
f6857bbf
JD
29952007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2996
2997 Use the new code_props interface for rule actions.
2998 * src/symlist.h (symbol_list): Replace action, action_location, and
2999 used members with a code_props action_props member.
3000 * src/reader.c (symbol_should_be_used, grammar_rule_check,
3001 grammar_midrule_action, grammar_current_rule_merge_set,
3002 grammar_current_rule_symbol_append, packgram): Update.
3003 * src/scan-code.h (translate_rule_action): Remove, no longer used.
3004 * src/scan-code.l (handle_action_dollar): Update.
3005 (translate_rule_action): Remove, no longer used.
3006 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
3007
7c0c6181
JD
30082007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
3009
3010 Use the new code_props interface in parse-gram.y.
3011 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
3012 Update all uses of translate_* functions to use the new code_props
3013 interface and to use gram_scanner_last_string_free and
3014 code_scanner_last_string_free where possible.
3015 (grammar_declaration): symbol_list_destructor_set and
3016 symbol_list_printer_set now perform the translation, so don't do it
3017 here. Use gram_scanner_last_string_free where possible.
3018 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
3019 translate_code): Remove, no longer used.
3020 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
3021 symbol_list_printer_set): Perform code translation here rather than
3022 depending on the caller to do so.
3023
3024 * src/symlist.h (struct symbol_list): Correct some documentation typos.
3025 * src/scan-gram.h (gram_last_string): Remove declaration.
3026 * src/scan-gram.l (last_string): Declare it static.
3027
28e52c0d
JD
30282007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
3029
3030 Encapsulate code properties and related functionality for the various
3031 destructors, printers, and actions into a code_props structure and
3032 interface. This patch merely implements code_props in scan-code.h and
3033 scan-code.l. Future patches will rewrite other modules to use it.
3034 Discussed starting at
3035 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
3036 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
3037 consistently initialize const structs that have an empty location
3038 field.
3039 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
3040 to ensure consistency.
3041 * src/scan-code.h (code_props): New structure.
3042 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
3043 function, macro, and const global variable for initializing a
3044 code_props with no code.
3045 (code_props_plain_init, code_props_symbol_action_init,
3046 code_props_rule_action_init, code_props_translate_code): The rest of
3047 the new code_props functional interface. Among other things, the init
3048 functions set the code_props kind field so that
3049 code_props_translate_code will know whether to behave like
3050 translate_symbol_action, translate_rule_action, or translate_code.
3051 These old translate functions must remain until all other modules are
3052 updated to use the new code_props interface.
3053 (code_scanner_last_string_free): New function similar to
3054 gram_scanner_last_string_free.
3055 (code_scanner_free): Add documentation.
3056 * src/scan-code.l: Implement the new interface.
3057 (code_lex): Make it static, add a code_props* argument, and remove the
3058 rule argument.
3059 (last_string): New static global similar to the one in scan-gram.l.
3060 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
3061 instead of rule.
3062 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
3063 code_props since Bison may one day use this information for destructors
3064 and printers.
3065 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
3066 (handle_action_dollar): Use symbol_list_n_get and set used flag
3067 directly since symbol_list_n_used_set is removed.
3068 (translate_action): Add a code_props* argument and remove the rule,
3069 action, and location arguments. Pass the code_props* on to code_lex.
3070 (translate_rule_action, translate_symbol_action, translate_code):
3071 Rewrite as wrappers around the new code_props interface.
3072 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
3073 it would eventually need to break the encapsulation of code_props.
3074
96034983
JD
30752007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
3076
3077 * etc/.cvsignore: New.
3078
945e396c
JD
30792007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
3080
3081 Add maintainer-push-check to run maintainer-check using push parsing in
3082 place of pull parsing where available.
3083 * Makefile.am (maintainer-push-check): New.
3084 * data/bison.m4 (b4_use_push_for_pull_if): New.
3085 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
3086 appropriately based on their existing values.
3087 (yypush_parse): Don't print push-parser-specific diagnostics if push
3088 parsing is being used in place of pull parsing.
3089 * data/yacc.c: If push parsing should replace pull parsing, redirect to
3090 push.c.
3091 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
3092 variable, and insert b4_use_push_for_pull_flag into muscles.
3093 * tests/Makefile.am (maintainer-push-check): New.
3094
7d596384
JD
30952006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
3096
3097 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
3098 (whether successful or failed) so that yypush_parse can be invoked
3099 again to start a new parse using the same yypstate.
3100 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
3101 check multiple yypull_parse invocations on the same yypstate. For pull
3102 mode, extend to check multiple yyparse invocations.
3103 (Exploding the Stack Size with Alloca): Extend to try with
3104 %push-pull-parser.
3105 (Exploding the Stack Size with Malloc): Likewise.
3106
3107 * tests/calc.at (Simple LALR Calculator): Don't specify
3108 %skeleton "push.c" since %push-pull-parser implies that now.
3109 * tests/headers.at (export YYLTYPE): Don't check for the push
3110 declarations. Otherwise, this test case can't be used to see if push
3111 mode can truly emulate pull mode.
3112 * tests/input.at (Torturing the Scanner): Likewise.
3113 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
3114 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
3115 AT_YACC_IF, which now includes the case of push mode since %skeleton
3116 need not be used for push mode. This will be more intuitive once
3117 push.c is renamed to yacc.c.
3118
7172e23e
JD
31192006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
3120
3121 For push mode, convert yyparse from a macro to a function, invoke yylex
3122 instead of passing a yylexp argument to yypull_parse, and don't
3123 generate yypull_parse or yyparse unless %push-pull-parser is declared.
3124 Discussed starting at
3125 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
3126 * data/bison.m4 (b4_pull_if): New.
3127 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
3128 * data/push.c: Improve M4 quoting a little.
3129 (b4_generate_macro_args, b4_parenthesize): Remove.
3130 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
3131 any time a pull parser is requested.
3132 Don't #define this as a wrapper around yypull_parse. Instead, when
3133 both push and pull are requested, make it a function that does that
3134 same thing.
3135 (yypull_parse): If there's a b4_prefix, #define this to
3136 b4_prefix[pull_parse] when both push and pull are requested.
3137 Don't define this as a function unless both push and pull are
3138 requested.
3139 Remove the yylexp argument and hard-code yylex invocation instead.
3140 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
3141 %push-parser.
3142 * src/getargs.c (pull_parser): New global initialized to true.
3143 * getargs.h (pull_parser): extern it.
3144 * src/output.c (prepare): Insert pull_flag muscle.
3145 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
3146 (prologue_declaration): Set both push_parser and pull_parser = true for
3147 %push-pull-parser. Set push_parser = true and pull_parser = false for
3148 %push-parser.
3149 * src/scan-gram.l: Don't accept %push_parser as an alternative to
3150 %push-parser since there's no backward-compatibility concern here.
3151 Scan %push-pull-parser.
3152 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
3153 instead of %push-parser.
3154 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
3155 prototype it in the module that calls yyparse.
3156 * tests/input.at (Torturing the Scanner): Likewise.
3157 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
3158
2e7944cb
JD
31592006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
3160
3161 Update etc/bench.pl. Optimize push mode a little (the yyn change
3162 deserves most of the credit).
3163 * Makefile.am (SUBDIRS): Add etc subdirectory.
3164 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
3165 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
3166 yytoken, yyval, and yyloc declarations to...
3167 (yyparse or yypush_parse): ... here to improve performance. For
3168 yypush_parse invocations after the first, be sure to assign yyn its old
3169 value again.
3170 (yypstate_new): Don't bother initializing the yyresult field since the
3171 initial value isn't used.
3172 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
3173 remove the #define that, in push mode, set it to yyps->NAME.
3174 * etc/Makefile.am: New.
3175 * etc/bench.pl: Remove and build it instead from...
3176 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
3177 "tests/bison" from the build directory by default rather than just
3178 invoking "bison" from $PATH.
3179 (calc_grammar): Update push parser code: don't declare yylval globally,
3180 don't define yyparse_wrapper, and don't #define yyparse.
3181 (bench_grammar): Update to check all working combinations of yacc.c,
3182 push.c, impure, pure, pull, and push.
3183
c3d50342
JD
31842006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
3185
3186 For push mode, add pull wrappers around yypush_parse.
3187 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
3188 (yypull_parse): New function wrapping yypush_parse.
3189 (yyparse): New #define wrapping yypull_parse.
3190 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
3191 is declared.
3192 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
3193 prototype yylex in the module that calls yyparse, and don't prototype
3194 yyparse there. Otherwise, the yyparse expansion won't compile.
3195 * tests/input.at (Torturing the Scanner): Likewise.
3196
94ebeba5
JD
31972006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
3198
3199 Enable push parsers to operate in impure mode. Thus, %push-parser no
3200 longer implies %pure-parser. The point of this change is to move
3201 towards being able to test the push parser code by running the entire
3202 test suite as if %push-parser had been declared.
3203 * data/push.c (yypush_parse): For impure mode, remove the
3204 yypushed_char, yypushed_val, and yypushed_loc arguments.
3205 Instead, declare these as local variables initialized to the global
3206 yychar, yylval, and yylloc.
3207 For the first yypush_parse invocation only, restore the initial values
3208 of these global variables when it's time to read a token since they
3209 have been overwritten.
3210 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
3211 %push-parser.
3212 * tests/calc.at (Simple LALR(1) Calculator): Always declare
3213 %pure-parser along with %push-parser since this test case was designed
3214 for pure push parsers.
3215 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
3216 (AT_YACC_OR_PUSH_IF): New.
3217 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
3218 add a note that it's still wrong for some cases (as it has been for a
3219 while).
3220 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
3221 %push-parser no longer implies %pure-parser.
3222
a0633178
JD
32232006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3224
3225 Remove some unnecessary differences between the pull parser code and
3226 the push parser code. This patch enables yynerrs in push mode.
3227 * data/push.c: Reformat M4 a little.
3228 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
3229 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
3230 because push mode is on. Instead, if pure mode is on, move yynerrs
3231 to...
3232 (b4_declare_parser_state_variables): ... here.
3233 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
3234 to yyps->NAME so it can be used in yypush_parse.
3235 (yypush_parse): Don't omit uses of yynerrs in push mode.
3236
8646b6a3
JD
32372006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3238
3239 Fix bug such that the first pushed token's value and location are
3240 sometimes overwritten (sometimes by %initial-action) before being used.
3241 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
3242 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
3243 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
3244 more closely mimic the pull parser logic.
3245 Don't copy the pushed token to yychar, yylval, and yylloc until it's
3246 time to read a token, which is after any initialization of yylval and
3247 yylloc.
3248 (gottoken): Rename label to...
3249 (yyread_pushed_token): ... for clarity and to avoid infringing on the
3250 user namespace.
3251
9baf4d74
JD
32522006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3253
3254 Rearrange initialization of the parser state variables so that the
3255 skeleton doesn't have to have a copy for pull mode and another for push
3256 mode. This patch also fixes at least a bug such that yylloc was not
3257 initialized (with b4_location_initial_line and
3258 b4_location_initial_column) upon calling yypush_parse. However, that
3259 initialization now overwrites the first token's location;
3260 %initial-action assigning @$ already did the same thing, and both bugs
3261 will be fixed in a later patch.
3262 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
3263 (b4_declare_parser_state_variables): Remove initialization of yytoken,
3264 yyss, yyvs, yyls, and yystacksize.
3265 (yypstate_new): Remove initialization of some yypstate fields: yystate,
3266 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
3267 yylsp.
3268 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
3269 yyps->NAME so it can be used in yypush_parse.
3270 (yyparse or yypush_parse): For yypush_parse, don't print the
3271 "Starting parse" diagnostic for invocations after the first.
3272 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
3273 yypush_parse, only do it for the first invocation.
3274 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
3275 initialization to occur in yypush_parse but only on the first
3276 invocation.
3277
23522164
JD
32782006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
3279
3280 * data/push.c: Add CPP guards around push parser declarations in both
3281 the header and the code file.
3282 In the code file, move the push parser declarations to the same place
3283 they appear in the header file.
3284 Clean up the M4 some, especially the inconsistent underquoting in
3285 some b4_c_function_def and b4_c_function_decl uses.
3286
bb010fe5
JD
32872006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
3288
3289 Encapsulate the push parser state variables into an M4 macro so the
3290 push skeleton doesn't have to list them again for pull mode's yyparse.
3291 For push mode, remove yypush_parse's local equivalents of these
3292 variables to eliminate unnecessary copying between the two sets at
3293 run-time. This patch also fixes at least a bug related to multiple
3294 %initial-action invocations in push mode.
3295 * data/push.c (b4_declare_parser_variables): Rename to...
3296 (b4_declare_scanner_communication_variables): ... this for clarity and
3297 update both uses.
3298 (b4_declare_yyparse_variables): Remove and move its contents to the one
3299 spot where it was invoked.
3300 (b4_declare_parser_state_variables): New macro containing the parser
3301 state variables required by push mode.
3302 (struct yypstate): Replace all fields but yynew with
3303 b4_declare_parser_state_variables.
3304 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
3305 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
3306 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
3307 (yyparse or yypush_parse): For yyparse in pull mode, replace local
3308 parser state variable declarations with
3309 b4_declare_parser_state_variables.
3310 Don't initialize parser state variables when calling yypush_parse since
3311 yypstate_new already does that.
3312 Invoke the user's initial action only upon the first yypush_parse
3313 invocation.
3314 Remove all code that copies between the local parser state variables
3315 and the yypstate.
3316
2d212f8c
JD
33172006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
3318
3319 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
3320 prevent a name collision in a future patch where these names will
3321 sometimes be #define'd.
3322 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
3323 since it no longer has the same name as the existing argument.
3324 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
3325
e6e704dc
JD
33262006-12-19 Paolo Bonzini <bonzini@gnu.org>
3327 and Joel E. Denny <jdenny@ces.clemson.edu>
3328
3329 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3330 that the argument is case-insensitive, and there's no `=' here.
3331 For the %skeleton entry, mention that %language is better.
3332 (Bison Options): Likewise for --language and --skeleton. Move the
3333 --skeleton entry so that the `Tuning the parser' section is sorted
3334 alphabetically on long options.
3335 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
3336 %language directive in detail here; cross-reference the %language
3337 documentation instead.
3338 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
3339 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 3340 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
3341 * examples/extexi (normalize): Instead of replacing every %require
3342 argument with the current Bison version, just substitute for
3343 `@value{VERSION}'. This guarantees that we're testing what actually
3344 appears in the documentation.
3345 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
3346 rather than `@VERSION@'.
3347
0e021770
PE
33482006-12-18 Paul Eggert <eggert@cs.ucla.edu>
3349
fd575f05
PE
3350 * NEWS: Reword the %language news a bit, and put it earlier.
3351
0e021770
PE
3352 * src/getargs.c (skeleton_arg): Last arg is now location const *.
3353 Rewrite to simplify the logic.
3354 (language_argmatch): Likewise.
fd575f05
PE
3355 (program_name): We now own this var.
3356 * src/getargs.h (struct bison_language): Use char[] rather than
3357 const char *.
0e021770
PE
3358
3359 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
3360 Java is supported.
3361 * src/complain.c (program_name): Remove decl; no longer needed.
3362 * src/main.c (program_name): Remove; now belongs to getargs.
3363
33642006-12-18 Paolo Bonzini <bonzini@gnu.org>
3365
3366 * NEWS: Document %language.
3367
3368 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
3369
3370 * data/c-skel.m4, data/c++-skel.m4: New files.
3371 * data/glr.c: Complain on push parsers.
3372
3373 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
3374 over %skeleton.
148d66d8 3375 (Decl Summary): Document %language and %skeleton.
0e021770
PE
3376 (Command line): Document -L.
3377
3378 * examples/extexi: Rewrite %require directive.
3379 * examples/calc++/Makefile.am: Pass VERSION to extexi.
3380
3381 * src/files.c (compute_exts_from_gc): Look in language structure
3382 for .y extension.
3383 (compute_file_name_parts): Check whether .tab should be added.
3384 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
3385 (language, skeleton_arg, language_argmatch): New.
3386 (long_options): Add --language.
3387 (getargs): Use skeleton_arg, add -L/--language.
3388 * src/getargs.h: Include location.h.
3389 (struct bison_language, language, skeleton_arg, language_argmatch): New.
3390 * src/output.c (prepare): Pick default skeleton from struct language.
3391 Don't dispatch C skeletons here.
3392 * src/parse-gram.y (PERCENT_LANGUAGE): New.
3393 (prologue_declaration): Add "%language" rule, use skeleton_arg.
3394 * src/scan-gram.l ("%language"): New rule.
3395
3396 * tests/calc.at: Test %skeleton and %language.
3397 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
3398 (AT_GLR_IF): Look for %skeleton "glr.cc".
3399 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
3400 (AT_YACC_IF): Reject %language.
3401
5691bf57
PE
34022006-12-18 Paul Eggert <eggert@cs.ucla.edu>
3403
db06f0ce
PE
3404 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
3405 since it wasn't used; only the typedef name 'semantic_type' is needed.
3406 Also, omit trailing white space.
3407
5691bf57
PE
3408 * bootstrap: Sync from coreutils.
3409 (gnulib_extra_files): Add build-aux/announce.gen.
3410 (slurp): Adjust .gitignore files like .cvsignore files.
3411 * build-aux/announce-gen: Remove from CVS, since bootstrap
3412 now creates this.
3413
791934e4
JD
34142006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
3415
3416 Make %push-parser imply %pure-parser. This fixes several bugs; see
3417 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
3418 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
3419 pure_parser = true.
3420 * data/push.c: Don't bother testing b4_push_if when deciding whether
3421 to expand b4_declare_parser_variables globally.
3422 (yypush_parse): Likewise in here.
3423
3424 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
3425 (yy_reduce_print): Reformat M4 for readability.
3426
ee5abb37
JD
34272006-12-15 Bob Rossi <bob@brasko.net>
3428 and Joel Denny <jdenny@ces.clemson.edu>
3429
3430 * data/push.c (yypstate): Add typedef, and update all uses of
3431 struct yypstate to just yypstate.
3432 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
3433
16ca01f9
JD
34342006-12-14 Bob Rossi <bob@brasko.net>
3435
3436 * data/push.c (yypush_parse): Declare prototype regardless of
3437 %locations option.
3438
ab8e7e1a
JD
34392006-12-14 Bob Rossi <bob@brasko.net>
3440
3441 * data/push.c (yyparse): Remove the prototype and the #define when in
3442 push-parser mode.
3443
9bf32be3
JD
34442006-12-13 Bob Rossi <bob@brasko.net>
3445
3446 * data/push.c (yypstate_init): Rename to...
3447 (yypstate_new): ... this and use b4_c_function_def.
3448 (yypstate_delete): New.
3449 (yypush_parse): Change parameters yynval and yynlloc to be const.
3450 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
3451 yypstate_delete functions.
3452
f02e2948
JD
34532006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
3454
3455 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
3456 strange test case titles. Reported by Bob Rossi.
3457
38eb7751
PE
34582006-12-13 Paul Eggert <eggert@cs.ucla.edu>
3459
3460 * TODO: Add pointer to Sylvain Schmitz's work on static detection
3461 of potential ambiguities in GLR grammers.
3462
bd9d212b
JD
34632006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
3464
3465 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
3466 `bison ', use m4_index instead of m4_substr since chopping up a string
3467 containing M4-special characters causes problems here.
3468
3469 Fix a couple of bugs related to special characters in user-specified
3470 file names, and make it easier for skeletons to compute output file
3471 names with the same file name prefix as Bison-computed output file
3472 names.
3473 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
3474 b4_parser_file_name and b4_spec_defines_file instead of
3475 @output_parser_name@ and @output_header_name@, which are now redundant.
3476 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
3477 b4_parser_file_name, b4_spec_defines_file, and the new
3478 @basename(FILENAME@) instead of @output_parser_name@ and
3479 @output_header_name@, which inappropriately escaped the file names as
3480 C string literals.
3481 * src/files.c (all_but_ext): Remove static qualifier.
3482 (compute_output_file_names): Move `free (all_but_ext)' to...
3483 (output_file_names_free): ... here since all_but_ext is needed later.
3484 * src/files.h (all_but_ext): Extern.
3485 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
3486 exactly what MUSCLE_INSERT_STRING used to do.
3487 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
3488 characters are escaped properly.
3489 * src/output.c (prepare): Define muscle file_name_all_but_ext as
3490 all_but_ext.
3491 For pkgdatadir muscle, maintain previous functionality by using
3492 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
3493 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
3494 digraphs would never be expanded. Hopefully no one has M4-special
3495 characters in his Bison installation path.
3496 * src/scan-skel.l: Don't parse @output_header_name@ and
3497 @output_parser_name@ anymore since they're now redundant.
3498 In @output, use decode_at_digraphs.
3499 Parse a new @basename command that invokes last_component.
3500 (decode_at_digraphs): New.
3501 (BASE_QPUTS): Remove unused.
3502 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
3503 (Output file name): New tests.
3504
3f7ca628
JD
35052006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
3506
3507 Warn about output files that are generated by the skeletons and that
3508 conflict with other output files.
3509 * data/glr.c: Don't generate the header file here when glr.cc does.
3510 * src/files.c (file_names, file_names_count): New static globals.
3511 (compute_output_file_names): Invoke output_file_name_check for files
3512 not generated by the skeletons and remove existing checks.
3513 (output_file_name_check): New function that warns about conflicting
3514 output file names.
3515 (output_file_names_free): Free file_names.
3516 * src/files.h (output_file_name_check): Declare.
3517 * src/scan-skel.l: Invoke output_file_name_check for files generated by
3518 the skeletons.
3519 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
3520 (Conflicting output files): New tests.
3521
178e123e
PE
35222006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3523
3524 * doc/bison.texinfo: Fix a couple of typos.
3525
35262006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
3527
3528 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
3529 Rename to...
3530 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
3531 update all uses.
3532 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
3533 (yypush_parse): Rename yypvars argument to yyps and remove redundant
3534 local pv.
3535 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
3536 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
3537
ea17f233
JD
35382006-12-07 Bob Rossi <bob@brasko.net>
3539 and Joel Denny <jdenny@ces.clemson.edu>
3540
3541 * data/push.c (yypvarsinit): Change return type from void* to struct
3542 yypvars*. No longer cast to void* on return.
3543 (struct yypvars): Remove yylen since it need not be remembered between
3544 yypushparse invocations.
3545 (yypushparse): Don't copy between yylen and pv->yylen.
3546
55a30bda
JD
35472006-12-05 Bob Rossi <bob@brasko.net>
3548
3549 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
3550 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
3551 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
3552 (struct yypvars): Remove b4_declare_parser_variables.
3553 (yypvarsinit): Remove init code for removed variables.
3554 (global scope): Do not declare b4_declare_parser_variables if
3555 push or pure mode.
3556 (yypushparse): Add b4_declare_parser_variables.
3557 Init new local variables, and remove init code for removed
3558 yypvars variables.
3559 (yyparse): Delete.
3560 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
3561 and yyparse for other modes.
3562 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
3563 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
3564 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
3565 (AT_PURE_LEX_IF): True if pure or push parser.
3566
85894313
JD
35672006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
3568
3569 Document Yacc prologue alternatives and default %destructor's and
3570 %printer's as experimental. Don't mention Java yet. Discussed at
3571 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
3572 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
3573 (2.3a): Annotate this entry to say the old forms of these features were
3574 also experimental.
3575 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 3576 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
3577 of Java (we'll want this back eventually).
3578
02975b9a
JD
35792006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3580
3581 Support a file name argument to %defines. Deprecate `=' in
3582 %file-prefix, %name-prefix, and %output. Discussed at
3583 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
3584 * NEWS (2.3a+): Mention.
148d66d8 3585 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
3586 form of %defines, and remove `=' from entries for %file-prefix,
3587 %name-prefix, and %output.
3588 * src/parse-gram.y (prologue_declaration): Implement.
3589 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
3590 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
3591 all but one occurrence of %name-prefix.
3592 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
3593 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
3594 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
3595 occurrence of each of %file-prefix and %output. Add check for %defines
3596 with argument.
3597 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
3598 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
3599 Remove the `=' from %output.
3600
287b314e
JD
36012006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
3602
3603 Don't escape $ in test case titles since Autoconf 2.61 now does that
3604 correctly.
3605 * tests/actions.at (Default %printer and %destructor are not for error
3606 or $undefined): Here.
3607 (Default %printer and %destructor are not for $accept): Here.
3608 * tests/input.at (Invalid $n and @n): Here.
3609
3ebecc24
JD
36102006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
3611
3612 Rename <!> to <>. Discussed starting at
3613 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
3614 * NEWS (2.3a+): Update.
148d66d8 3615 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
3616 Update.
3617 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
3618 * src/scan-gram.l (INITIAL): Implement.
3619 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
3620 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
3621 comment.
3622 * tests/actions.at (Default tagless %printer and %destructor,
3623 Default tagged and per-type %printer and %destructor,
3624 Default %printer and %destructor are not for error or $undefined,
3625 Default %printer and %destructor are not for $accept,
3626 Default %printer and %destructor for mid-rule values): Update.
3627 * tests/input.at (Default %printer and %destructor redeclared,
3628 Unused values with default %destructor): Update.
3629
26b8a438
JD
36302006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3631
3632 Don't let %prec take a nonterminal.
3633 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
3634 token.
3635 * tests/input.at (%prec takes a token): New test checking that %prec
3636 won't take a nonterminal.
3637
07c39ae9
JD
36382006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3639
405d53b7
JD
3640 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
3641 it was double-quoted.
07c39ae9
JD
3642 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
3643 grammar is maintained with Bison's highest standards.
3644 * src/getargs.c: Fix some typos in Doxygen comments.
3645
580b8926
JD
36462006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3647
3648 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
3649 later. Reported by Paul Eggert in
3650 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
3651 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
3652 * src/scan-code.l (translate_action): Don't bother invoking
3653 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
3654 (code_scanner_free): Instead of invoking
3655 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
3656 which frees more.
3657 * src/scan-gram.l (gram_scanner_free): Likewise.
3658 * src/scan-skel.l (scan_skel): Likewise.
3659
4502eadc
JD
36602006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3661
3662 * src/files.c (tr): Change return type to void.
3663 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
3664 has been called previously for the same key.
3665 (muscle_find): Return storage instead of value so that
3666 --enable-gcc-warnings doesn't produce warnings that the return discards
3667 const. aver that the value and storage are the same since storage
3668 could potentially be NULL when value is not.
3669 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
3670 same as 0.
3671
7746c8f6
PE
36722006-11-08 Paul Eggert <eggert@cs.ucla.edu>
3673
3674 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
3675 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
3676 us a slightly cleaner distribution, and also works.
3677 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
3678 gnulib changes.
3679
eb095650
PE
36802006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
3681 and Paul Eggert <eggert@cs.ucla.edu>
3682
3683 Don't let Bison leak memory except when it complains.
3684 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
3685 (spec_defines_file, dir_prefix): Now char *, not const char *,
3686 since they are freed.
3687 * src/files.c: Likewise.
3688 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
3689 Likewise.
3690 (tr): Now operates in-place. All uses changed.
3691 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
3692 values.
3693 (compute_file_name_parts, compute_output_file_names): Don't store
3694 read-only data in variables that will be freed.
3695 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
3696 src_extension, and header_extension.
3697 (output_file_names_free): New public function to free
3698 spec_verbose_file, spec_graph_file, spec_defines_file,
3699 parser_file_name, and dir_prefix.
3700 * src/getargs.c (getargs): Don't store read-only data in variables that
3701 will be freed.
3702 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
3703 (which previously existed but was unused), and quotearg_free.
3704 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
3705 * src/muscle_tab.c: Likewise.
3706 (muscle_entry): Make the value char const *,
3707 and add a new storage member that is char * and can be freed.
3708 (muscle_entry_free): New private function.
3709 (muscle_init): Use it instead of free.
3710 (muscle_insert, muscle_grow): Update and use new storage member.
3711 (muscle_code_grow): Free the string passed to muscle_grow
3712 since it's not needed anymore.
3713 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
3714 add a new `char *code' member.
3715 ("{...}"): Declare semantic type as code.
3716 * src/scan-code.h (translate_rule_action):
3717 (translate_symbol_action, translate_code, translate_action): Return
3718 `char const *' rather than `char *' since external code should not free
3719 these strings.
3720 * src/scan-code.l: Likewise.
3721 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
3722 which is "{...}" in the parser.
3723 * tests/Makefile.am (maintainer-check-valgrind): Set
3724 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
3725 Valgrind.
3726 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
3727 complain.
3728 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
3729 expecting a non-zero exit status sets --leak-check=summary and
3730 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
3731 this case, and we don't want to hear about it.
3732
ac564be4
PE
37332006-11-08 Paul Eggert <eggert@cs.ucla.edu>
3734
3735 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
3736 instead of from the template, to simplify configuration a bit.
3737 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
3738 and m4/wint_t.m4, as they are needed with the latest gnulib.
3739
17bd8a73
JD
37402006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3741
3742 Disable unset/unused mid-rule value warnings by default, and recognize
3743 --warnings=midrule-values to enable them. Discussed starting at
3744 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
3745 * NEWS (2.3a+): Mention.
3746 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
3747 warnings): Add entry for midrule-values subargument.
3748 * src/reader.c (symbol_should_be_used): Don't return true just because
3749 the value is a set/used mid-rule value unless
3750 --warnings=midrule-values was specified.
3751 * tests/input.at (Unused values, Unused values before symbol
3752 declarations): Run tests with and without --warnings=midrule-values.
3753
3754 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
3755 than LIST_FREE directly.
3756
89eb3c76
JD
37572006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3758
3759 Finish implementing --warnings=error, which should not be implied by
3760 --warnings=all (or by its synonyms -W and --warnings without
3761 subarguments).
3762 * src/complain.c (set_warning_issued): New function to report that
3763 warnings are being treated as errors and to record an error if so.
3764 Invoke...
3765 (warn_at, warn): ... here.
3766 * src/getargs.c (warnings_args, warnings_types): Reorder so that
3767 "error - warnings are errors" does not appear above "all - all of the
3768 above".
3769 (getargs): For -W and --warnings without subarguments, don't let
3770 FLAGS_ARGMATCH set warnings_error in warnings_flag.
3771 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
3772
ba7560e2
JD
37732006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3774
3775 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
3776 empty subargument list. For example: `bison --warnings= parser.y'.
3777
31283fc3
JD
37782006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3779
3780 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
3781 the parser header file so that gcc doesn't warn.
3782
12e35840
JD
37832006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3784
3785 Split the default %destructor/%printer into two kinds: <*> and <!>.
3786 Discussed starting at
3787 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
3788 * NEWS (2.3a+): Mention.
3789 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
3790 previous change today related to mid-rules.
148d66d8 3791 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 3792 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
3793 (TYPE_TAG_ANY): Add as <*>.
3794 (TYPE_TAG_NONE): Add as <!>.
3795 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
3796 for <*> and <!>.
3797 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
3798 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
3799 * src/symlist.c (symbol_list_default_new): Split into tagged and
3800 tagless versions.
3801 (symbol_list_destructor_set, symbol_list_printer_set): Split
3802 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
3803 SYMLIST_DEFAULT_TAGLESS.
3804 * src/symlist.h: Update symbol_list_default*_new prototypes.
3805 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
3806 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
3807 * src/symtab.c (default_destructor, default_destructor_location,
3808 default_printer, default_printer_location): Split each into tagged and
3809 tagless versions.
3810 (symbol_destructor_get, symbol_destructor_location_get,
3811 symbol_printer_get, symbol_printer_location_get): Implement tagged
3812 default and tagless default cases.
3813 (default_destructor_set, default_printer_set): Split each into tagged
3814 and tagless versions.
3815 * src/symtab.h: Update prototypes.
3816 * tests/actions.at (Default %printer and %destructor): Rename to...
3817 (Default tagless %printer and %destructor): ... this, and extend.
3818 (Per-type %printer and %destructor): Rename to...
3819 (Default tagged and per-type %printer and %destructor): ... this, and
3820 extend.
3821 (Default %printer and %destructor for user-defined end token): Extend.
3822 (Default %printer and %destructor are not for error or $undefined):
3823 Update.
3824 (Default %printer and %destructor are not for $accept): Update.
3825 (Default %printer and %destructor for mid-rule values): Extend.
3826 * tests/input.at (Default %printer and %destructor redeclared): Extend.
3827 (Unused values with default %destructor): Extend.
3828
f91b1629
JD
38292006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3830
3831 Don't apply the default %destructor/%printer to an unreferenced midrule
3832 value. Mentioned at
3833 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
3834 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
3835 like $@n instead of just @n so that the default %destructor/%printer
3836 logic doesn't see them as user-defined symbols.
3837 (symbol_is_dummy): Check for both forms of the name.
3838 * src/reader.c (packgram): Remove the `$' from each midrule symbol
3839 name for which the midrule value is referenced in any action.
3840 * tests/actions.at (Default %printer and %destructor for mid-rule
3841 values): New test.
3842 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
3843 for change to dummy symbol names.
3844
519d0004
JD
38452006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3846
3847 Warn about unset midrule $$ if the corresponding $n is used.
3848 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
3849 $n usage.
3850 (packgram): Before invoking grammar_rule_check on any rule, make sure
3851 all actions have already been scanned in order to set `used' flags.
3852 Otherwise, checking that a midrule's $$ is set will not always work
3853 properly because the midrule check must forward-reference the midrule's
3854 parent rule.
3855 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
3856 warning.
3857
a501eca9
JD
38582006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3859
3860 More improvements to the documentation of the prologue alternatives:
3861 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
3862 Bison manual.
3863 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
3864 some text to clarify the relative importance of the new directives and
3865 to show how these directives may be viewed as code labels.
3866
2cbe6b7f
JD
38672006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
3868
3869 Similar to the recently removed %before-header, add %code-top as the
3870 alternative to the pre-prologue. Mentioned at
3871 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
3872 Also, let the prologue alternatives appear in the grammar section.
3873 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
3874 (prologue_declaration): Move the existing prologue alternatives to...
3875 (grammar_declaration): ... here and add %code-top.
3876 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
3877
3878 Clean up and extend documentation for the prologue alternatives.
3879 * NEWS (2.3a+): Describe prologue alternatives.
3880 * doc/bison.texinfo (Prologue): Move discussion of prologue
3881 alternatives to...
3882 (Prologue Alternatives): ... this new section, and extend it to discuss
3883 all 4 directives in detail.
148d66d8
JD
3884 (Table of Symbols): Clean up discussion of prologue alternatives and
3885 add %code-top.
2cbe6b7f 3886
e557d3ea
JMG
38872006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3888
3889 DJGPP specific issues.
3890
3891 * djgpp/config.bat: config.hin has been moved to lib. Adjust
3892 config.bat accordingly.
3893 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
3894 * djgpp/config.site: Likewise.
3895
136a0f76
PB
38962006-10-16 Paolo Bonzini <bonzini@gnu.org>
3897
27bd5d67
PB
3898 Replace %*-header with %provides, %requires, %code. See discussion at
3899 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
3900
136a0f76
PB
3901 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
3902 (b4_user_start_header): Remove.
3903 * data/glr.c: Use new macros instead of b4_*start_header
3904 and b4_*end_header.
3905 * data/glr.cc: Likewise.
3906 * data/lalr1.cc: Likewise.
3907 * data/push.c: Likewise.
3908 * data/yacc.c: Likewise.
3909
3910 * doc/bison.texinfo: Remove %before-header, rename
3911 %{start,end,after}-header to %requires, %provides, %code.
3912
3913 * src/parse-gram.y: Likewise (also rename token names accordingly).
3914 * src/scan-gram.l: Likewise.
3915 * tests/actions.at: Likewise.
3916
10f429ef
PE
39172006-10-14 Paul Eggert <eggert@cs.ucla.edu>
3918
3919 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
3920 Problem reported by Joel E. Denny.
3921
39222006-10-14 Jim Meyering <jim@meyering.net>
3923
3924 (Sync from coreutils.)
3925 Work also when the working directory (with e.g. coreutils sources)
3926 is version controlled with git, rather than CVS.
3927 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
3928 rather than CVS.
3929 In messages and comments, say e.g., "checked-out sources",
3930 rather than "CVS sources".
3931 (version_controlled_file): New function. Work for git as well as
3932 for CVS. Don't use grep's -q option.
3933 (slurp): Call it here, in place of CVS-specific code.
3934
c4bd5bf7
JD
39352006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
3936
3937 Fix testsuite for ./configure --enable-gcc-warnings:
3938 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
3939 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
3940 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
3941 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
3942 * test/regression.at (Diagnostic that expects two alternatives):
3943 Likewise.
3944
46356ea4
PE
39452006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3946
231ed89a
PE
3947 * bootstrap.conf (gnulib_modules): Add config-h.
3948 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
3949 worry about HAVE_CONFIG_H.
3950 * lib/abitset.c: Likewise.
3951 * lib/bitset.c: Likewise.
3952 * lib/bitset_stats.c: Likewise.
3953 * lib/bitsetv-print.c: Likewise.
3954 * lib/bitsetv.c: Likewise.
3955 * lib/ebitset.c: Likewise.
3956 * lib/get-errno.c: Likewise.
3957 * lib/lbitset.c: Likewise.
3958 * lib/subpipe.c: Likewise.
3959 * lib/timevar.c: Likewise.
3960 * lib/vbitset.c: Likewise.
3961 * lib/bitset.c: Include "bitset.h" first, to test interface.
3962 * lib/bitset_stats.c: Include "bitset_stats.h" first.
3963 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
3964 * lib/bitsetv.c: Include "bitsetv.h" first.
3965 * lib/get-errno.c: Include "get-errno.h" first.
3966 * m4/.cvsignore: Add config-h.m4.
3967 * tests/actions.at (Default %printer and %destructor for ...):
3968 Adjust expected line numbers in output to reflect removal of #if
3969 HAVE_CONFIG_H lines.
3970 * tests/glr-regression.at (Missed %merge type warnings when ...):
3971 Likewise.
3972 * tests/regression.at (Braced code in declaration in rules section):
3973 Likewise.
3974 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
3975 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
3976 Include <config.h> unconditionally.
3977
46356ea4
PE
3978 * bootstrap: Sync from coreutils, as follows:
3979
3980 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3981
3982 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
3983 variable was sometimes used without being initialized. This
3984 messed up the installation of the INSTALL file in some cases.
3985
3986 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3987
3988 * bootstrap (usage, main program, symlink_to_gnulib): Add option
3989 --copy. Inspired by a suggestion from Bruno Haible.
3990
3991 2006-10-03 Jim Meyering <jim@meyering.net>
3992
3993 * bootstrap: Undo last change to this file, since now gnulib-tool
3994 sticks with the automake default in generating dependencies.
3995
dd4bf078
PE
39962006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3997
cf2a5f7c
PE
3998 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
3999 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
4000
4001 * doc/bison.1: Add copyright notice.
4002
4003 * data/glr.c: Don't include <stdarg.h>; not used.
4004
35fe0834
PE
4005 * NEWS: The -g and --graph options now output graphs in Graphviz
4006 DOT format, not VCG format.
4007 * doc/bison.1: Likewise.
4008 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
4009 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
4010 of this change in
4011 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
4012 * TODO: Remove Graphviz entry.
4013 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
4014 remove vcg.c, vcg.h, vcg_defaults.h.
4015 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
4016 * src/graphviz.c, src/graphviz.h: New files.
4017 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
4018 * src/files.h: Make comment more generic.
4019 * src/main.c (main): Likewise.
4020 * src/print_graph.h: Likewise.
4021 * src/getargs.c (usage): Make usage description more generic.
4022 * src/print_graph.c: Include graphviz.h rather than vcg.h.
4023 (static_graph, fgraph): Remove. All uses changed to pass
4024 arguments instead of sharing a static var.
4025 (print_core, print_actions, print_state, print_graph):
4026 Output graphviz format rather than VCG format.
4027 * tests/.cvsignore: Remove *.vcg; add *.dot.
4028 * tests/output.at: Expect *.dot files, not *.vcg files.
4029
dd4bf078
PE
4030 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
4031 accommodates the 2006-10-08 change.
4032
efdd7421
PE
40332006-10-11 Bob Rossi <bob@brasko.net>
4034
4035 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
4036 (b4_yyssa, b4_yyerror_range): New macros.
4037 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
4038 (yypvarsinit): Remove init of removed fields.
4039 (yypushparse): Remove use of removed fields; use new macros instead.
4040
96a1981a
PE
40412006-10-11 Paul Eggert <eggert@cs.ucla.edu>
4042
4043 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
4044 in a push parser. Reindent slightly to match yacc.c better.
4045
40462006-10-11 Bob Rossi <bob@brasko.net>
4047
46356ea4
PE
4048 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
4049 yymsg_alloc fields.
4050 (yypvarsinit, yypushparse): Remove init of removed fields.
4051 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 4052
c1630a8b
PE
40532006-10-09 Paul Eggert <eggert@cs.ucla.edu>
4054
4055 * THANKS: Add Paolo Bonzini and Bob Rossi.
4056
90b9908d
PB
40572006-10-08 Paolo Bonzini <bonzini@gnu.org>
4058
4059 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
4060 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
4061 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
4062 b4_define_user_cde and uses): Remove.
4063 (b4_comment, b4_prefix, b4_sync_start): New.
4064 * data/bison.m4: New file, with most of the content removed from c.m4.
4065 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
4066 * src/output.c (output_skeleton): Pass bison.m4.
4067 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
4068 only if specified.
4069
cf806753
PE
40702006-10-05 Paul Eggert <eggert@cs.ucla.edu>
4071
4072 Fix test failure reported by Tom Lane in
4073 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
4074 and try to make such failures easier to catch in the future.
4075 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
4076 that's now the caller's responsibility.
4077 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
4078 Set yychar = YYEOF if it's negative.
4079 * tests/actions.at (yylex): Abort if asked to read past EOF.
4080 * tests/conflicts.at (yylex): Likewise.
4081 * tests/cxx-type.at (yylex): Likewise.
4082 * tests/glr-regression.at (yylex): Likewise.
4083 * tests/input.at (yylex): Likewise.
4084 * tests/regression.at (yylex): Likewise.
4085 * tests/torture.at (yylex): Likewise.
4086
0e2f006a
PE
40872006-10-01 Paul Eggert <eggert@cs.ucla.edu>
4088
4089 Fix problems with translating English-language diagnostics.
4090 * bootstrap: Fix bug introduced in recent bootstrap changes, with
4091 respect to bison-runtime pot generation. The YY_ stuff
4092 wasn't being captured.
4093 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
4094 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
4095 * runtime-po/POTFILES.in: Add data/push.c.
4096
e3ddc1e3
PE
40972006-09-29 Paul Eggert <eggert@cs.ucla.edu>
4098
4099 Merge bootstrap changes from coreutils.
4100
4101 2006-09-28 Jim Meyering <jim@meyering.net>
4102
4103 Automatically generated dependencies are important even
4104 when all of the sources in a directory come from gnulib.
4105 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
4106 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
4107
4108 2006-09-23 Jim Meyering <jim@meyering.net>
4109
4110 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
4111
4112 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4113
4114 * bootstrap: Add support for --force.
4115 (usage): New function. Describe usage less tersely.
4116 (CVS_only_file): New var.
4117
01e972b3
PE
41182006-09-21 Paul Eggert <eggert@cs.ucla.edu>
4119
4120 * data/push.c (YYPUSH_MORE): Make it an enum instead.
4121 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
4122 Adjust white space and comments to match GNU style better.
4123
c63d3e90
PE
41242006-09-20 Bob Rossi <bob@brasko.net>
4125
4126 * data/push.c (yyresult_get): Remove function.
4127 (YYPUSH_MORE): Add #define.
4128 (yypushparse): Modify return value.
4129
e70f46d1
PE
41302006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4131
4132 * stamp-h.in: Remove; no longer needed.
4133 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
4134 Remove config.h, config.hin, intl (no longer created).
4135 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
4136 stamp-h1.
4137
4138 Sync bootstrap from coreutils, as follows:
4139
4140 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
4141
4142 * bootstrap (symlink_to_gnulib): New function.
4143 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
4144 to copies-of-gnulib.
4145 (cp_mark_as_generated, slurp, gnulib_files):
4146 Avoid making a copy if it's the same as the old version.
4147 (gnulib_files): Add support for this variable (used by Bison).
4148
a92be413
PE
41492006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4150
4151 * src/getargs.c (usage): Rework to use conventions similar to
4152 coreutils, to make translation a bit easier and the code a bit
4153 smaller. Problem reported by Tim Van Holder.
4154
4f82b42a
PE
41552006-09-15 Paul Eggert <eggert@cs.ucla.edu>
4156
3b2942e6
PE
4157 Use some of gnulib's new modules, taken from coreutils.
4158
4159 * bootstrap: Sync from coreutils, except add support for gnulib_files.
4160 * bootstrap.conf: New file.
4161 (gnulib_modules): Add configmake, inttypes, unistd.
4162 (XGETTEXT_OPTIONS): Add complain, complain_at,
4163 fatal, fatal_at, warn, warn_at, unexpected_end.
4164 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
4165 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
4166 (gl_EARLY): Add.
4167 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
4168 (gl_INIT): Add
4169 (GNULIB_AUTOCONF_SNIPPET): Remove.
4170 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
4171 the pickiest.
4172 * lib/.cvsignore: Add inttypes_.h.
4173 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
4174 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
4175 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
4176 no-longer-necessary initializations.
4177 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
4178 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
4179 use the unistd module.
4180 * src/system.h: Likewise.
4181 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
4182 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
4183 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
4184 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
4185 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
4186 * src/system.h: Include inttypes.h unconditionally, now that we
4187 use the inttypes module. Don't bother to include stdint.h, since
4188 inttypes.h now does that for us.
4189 (LOCALEDIR): Remove, now that we use the configmake module.
4190 * src/getargs.c: Include configmake.h.
4191 * src/main.c: Likewise.
4192 * src/output.c: Likewise.
4193 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
4194 not from $abs_top_builddir, since config.h moved.
4195
4196
4f82b42a
PE
4197 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
4198 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
4199
4200 * src/parse-gram.y (symbol_declaration): Don't put statements
4201 before declarations; it's not portable to C89.
4202 * src/scan-code.l (handle_action_at): Likewise.
4203
4204 * src/scan-code.l: Always initialize braces_level; the old code
4205 left it uninitialized and therefore had undefined behavior.
4206
4207 Don't attempt to redefine 'assert', since it runs afoul of
4208 systems where standard headers (mistakenly) include <assert.h>.
4209 Instead, define and use our own alternative, called 'aver'.
4210 * src/reader.c: Don't include assert.h, since we no longer
4211 use assert.
4212 * src/scan-code.l: Likewise.
4213 * src/system.h (assert): Remove, replacing with....
4214 (aver): New function, taking a bool arg. All uses changed.
4215 * src/tables.c (pack_vector): Ensure that aver arg is bool,
4216 not merely an integer.
4217
31c10e38
PE
42182006-09-15 Bob Rossi <bob@brasko.net>
4219
4220 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
4221 * data/c.m4 (YYPUSH): New.
4222 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
4223 * src/getargs.c (push_parser): New var.
4224 * src/getargs.h (push_parser): New declaration.
4225 * src/output.c (prepare): Add macro insertion of `push_flag'.
4226 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
4227 (prologue_declaration): Parse %push-parser.
4228 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
4229 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
4230 list of removed lines from the traces observed.
4231 (AT_CHECK_CALC_LALR): Added push parser tests.
4232
fa7b79c0
PE
42332006-09-13 Paul Eggert <eggert@cs.ucla.edu>
4234
21fe08ca
PE
4235 * NEWS: Version 2.3a.
4236 * configure.ac (AC_INIT): Likewise.
4237
e8ec4d9b
PE
4238 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
4239 "#define YYSTYPE int" that caused "make maintainer-check" to fail
4240 due to header ordering dependencies. I don't know why the #define
4241 was there.
4242
fa7b79c0
PE
4243 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
4244 runtime cost when YYDEBUG is not defined, and so that some tests
4245 that used to fail now work. Problem and initial suggestion by
4246 Paolo Bonzini.
4247 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
4248 * data/glr.cc (b4_parser_class_name):
4249 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
4250 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
4251 (yydebug_) [YYDEBUG]: New member.
4252 (yycdebug_): Now defined only if YYDEBUG.
4253 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
4254 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
4255 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
4256 if YYYDEBUG.
4257 (debug_stream, set_debug_stream, debug_level, set_debug_level):
4258 Define only if YYDEBUG.
4259 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
4260 set_debug_level.
4261 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
4262 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
4263 AT_CHECK_CALC_GLR_CC that are working now.
4264
4ec13d60
PE
42652006-09-12 Paul Eggert <eggert@cs.ucla.edu>
4266
4267 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
4268 We don't need them in glr.cc, and glr.c defines them.
4269 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
4270 assumes that defining it to anything is the same as defining
4271 it to 1. Problem reported by Paolo Bonzini.
4272
8e1687ae
PE
42732006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
4274
4275 * data/c.m4 (b4_null, b4_case): Define.
4276 * src/output.c (prepare_symbols): Use b4_null.
4277 (user_actions_output): Use b4_case.
4278
3dc5e96b
PE
42792006-09-11 Paul Eggert <eggert@cs.ucla.edu>
4280
aef3da86
PE
4281 * data/glr.c (b4_shared_declarations): Put start-header first,
4282 before any #includes that we generate, so that feature-test
4283 macros work. Problem reported by Michael Deutschmann in
4284 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
4285 * data/lalr1.cc: Likewise.
4286 * doc/bison.texinfo (Prologue): Document that feature-test macros
4287 should be defined before any Bison declarations.
4288 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
4289 that depend on location.hh after, not before, Bison decls, since
4290 we now include location.hh after the first user prologue.
4291
3dc5e96b
PE
4292 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
4293 Sander Brandenburg in
4294 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
4295 Also, fix minor white space and comment issues.
aef3da86
PE
4296 (Prologue): Mention that it's better to define feature-test macros
4297 before Bison declarations. Problem reported by Michael Deutschmann.
4298
4299 * README-cvs: Fix typo: "&" should be "&&". Problem reported
4300 by Jim Meyering.
4301 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
4302 This adjusts to recent gnulib changes.
3dc5e96b 4303
b2a0b7ca
JD
43042006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
4305
4306 Finish implementation of per-type %destructor/%printer. Discussed
4307 starting at
4308 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
4309 and
4310 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
4311 * NEWS (2.3+): Add a description of this feature to the default
4312 %destructor/%printer description.
4313 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
4314 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4315 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
4316 list node contains a semantic type.
4317 * src/symtab.c, src/symtab.h: Extend with a table that associates
4318 semantic types with their %destructor's and %printer's.
4319 (semantic_type_from_uniqstr, semantic_type_get,
4320 semantic_type_destructor_set, semantic_type_printer_set): New functions
4321 composing the public interface of that table.
4322 (symbol_destructor_get, symbol_destructor_location_get,
4323 symbol_printer_get, symbol_printer_location_get): If there's no
4324 per-symbol %destructor/%printer, look up the per-type before trying
4325 the default.
4326 * tests/actions.at (Per-type %printer and %destructor): New test case.
4327 * tests/input.at (Default %printer and %destructor redeclared):
4328 Extend to check that multiple occurrences of %symbol-default in a
4329 single %destructor/%printer declaration is an error.
4330 (Per-type %printer and %destructor redeclared, Unused values with
4331 per-type %destructor): New test cases.
4332
3be03b13
JD
43332006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
4334
4335 Require default %destructor/%printer to be declared using
4336 %symbol-default instead of an empty symbol list, and start working on
4337 new per-type %destructor/%printer. Discussed at
4338 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
4339 * NEWS (2.3+): Add %symbol-default to example.
4340 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 4341 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
4342 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
4343 (generic_symlist, generic_symlist_item): New nonterminals for creating
4344 a list in which each item is a symbol, semantic type, or
4345 %symbol-default.
4346 (grammar_declaration): Use generic_symlist in %destructor and %printer
4347 declarations instead of symbols.1 or an empty list.
4348 (symbol_declaration, precedence_declaration, symbols.1): Update actions
4349 for changes to symbol_list.
4350 * src/reader.c: Update for changes to symbol_list.
4351 * src/scan-code.l: Likewise.
4352 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
4353 * src/symlist.c, src/symlist.h: Extend such that a list node may
4354 represent a semantic type or a %symbol-default in addition to just an
4355 ordinary symbol. Add switched functions for setting %destructor's and
4356 %printer's.
4357 * tests/actions.at, tests/input.at: Add %symbol-default to all default
4358 %destructor/%printer declarations.
4359
3508ce36
JD
43602006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
4361
4362 Whether the default %destructor/%printer applies to a particular symbol
4363 isn't a question of whether the user *declares* that symbol (in %token,
4364 for example). It's a question of whether the user by any means
4365 *defines* the symbol at all (by simply using a char token, for
4366 example). $end is defined by Bison whereas any other token with token
4367 number 0 is defined by the user. The error token is always defined by
4368 Bison regardless of whether the user declares it with %token, but we
4369 may one day let the user define error as a nonterminal instead.
4370 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
4371 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
4372 the meaning of "user-defined".
4373 * tests/actions.at (Default %printer and %destructor for user-declared
4374 end token): Rename to...
4375 (Default %printer and %destructor for user-defined end token): ...
4376 this.
4377
4378 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
4379 computation of whether to apply the default, don't maintain a list of
4380 every Bison-defined symbol. Instead, just check for a first character
4381 of '$', which a user symbol cannot have, and check for the error token.
4382
9350499c
JD
43832006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
4384
4385 Don't apply the default %destructor or %printer to the error token,
4386 $undefined, or $accept. This change fits the general rule that the
4387 default %destructor and %printer are only for user-declared symbols,
4388 and it solves several difficulties that are described in the new test
4389 cases listed below.
4390 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
4391 * tests/actions.at (Default %printer and %destructor are not for error
4392 or $undefined, Default %printer and %destructor are not for $accept):
4393 New test cases.
4394
4d7370cb
JD
43952006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
4396
4397 Allow %start after the first rule.
4398 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
4399 when parsing the first rule.
4400 (check_and_convert_grammar): Search for it here after all grammar
4401 declarations have been parsed. Skip midrules, which have dummy LHS
4402 nonterminals.
4403 * src/symtab.c (symbol_is_dummy): New function.
4404 * src/symtab.h (symbol_is_dummy): Declare it.
4405 * tests/input.at (%start after first rule): New test.
4406
6d0ef4ec
JD
44072006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
4408
4409 Redo some of the previous commit: add back the ability to use
4410 non-aliased/undeclared string literals since it might be useful to
4411 those declaring %token-table.
4412 * src/reader.c (check_and_convert_grammar): Undo changes in previous
4413 commit: don't worry about complaints from symbols_pack.
4414 * src/symtab.c (symbol_new, symbol_class_set,
4415 symbol_check_alias_consistency): Undo changes in previous commit: count
4416 each string literal as a new symbol and token, assign it a symbol
4417 number, and don't complain about non-aliased string literals.
4418 (symbols_pack): Since symbol_make_alias still does not decrement symbol
4419 and token counts but does still set aliased tokens to the same number,
4420 symbol_pack_processor now leaves empty slots in the symbols array.
4421 Remove those slots.
4422 * tests/regression.at (Undeclared string literal): Remove test case
4423 added in previous commit since non-aliased string literals are allowed
4424 again.
4425 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
4426 remove unnecessary string literal declarations.
4427 * tests/sets.at (Firsts): Likewise.
4428
965537bc
JD
44292006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
4430
4431 Don't allow an undeclared string literal, but allow a string literal to
4432 be used before its declaration.
4433 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
4434 symbols_pack complained.
4435 * src/symtab.c (symbol_new): Don't count a string literal as a new
4436 symbol.
4437 (symbol_class_set): Don't count a string literal as a new token, and
4438 don't assign it a symbol number since symbol_make_alias does that.
4439 (symbol_make_alias): It's not necessary to decrement the symbol and
4440 token counts anymore. Don't assume that an alias declaration occurs
4441 before any uses of the identifier or string, and thus don't assert that
4442 one of them has the highest symbol number so far.
4443 (symbol_check_alias_consistency): Complain if there's a string literal
4444 that wasn't declared as an alias.
4445 (symbols_pack): Bail if symbol_check_alias_consistency failed since
4446 symbol_pack asserts that every token has been assigned a symbol number
4447 although undeclared string literals have not.
4448 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 4449 string literal): New test cases.
965537bc
JD
4450 (Characters Escapes, Web2c Actions): Declare string literals as
4451 aliases.
4452 * tests/sets.at (Firsts): Likewise.
4453
47aee066
JD
44542006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
4455
4456 In the grammar scanner, STRING_FINISH unclosed constructs and return
4457 them to the parser in order to improve error messages.
4458 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
4459 SC_BRACED_CODE, SC_PROLOGUE): Implement.
4460 * tests/input.at (Unclosed constructs): New test case.
4461 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
4462 seen.
4463
4464 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
4465 unused global.
4466
1f6b3679
JD
44672006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
4468
4469 Handle string aliases for character tokens correctly.
4470 * src/symtab.c (symbol_user_token_number_set): If the token has an
4471 alias, check and set its alias's user token number instead of its own,
4472 which is set to indicate the alias. Previously, every occurrence of
4473 the character token in the grammar overwrote that alias indicator with
4474 the character code.
4475 * tests/input.at (String aliases for character tokens): New test.
4476
219741d8
JD
44772006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
4478
4479 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
4480
11daa4e7
PE
44812006-08-11 Paul Eggert <eggert@cs.ucla.edu>
4482
4483 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
4484 to prevent failures when building on older platforms.
4485 Check for autopoint failure.
4486 Set XGETTEXT_OPTIONS to values that check for C format strings,
4487 so that translators are warned about them (this also helps
4488 prevent core dumps).
4489
4490 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
4491 function, since it simplifies our code a bit.
4492
4493 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
4494 rather than -W, so we don't get bogus warnings about sign comparisons.
4495 Add -Wpointer-arith, since that warning is useful (it reports code
4496 that does not conform to C89 and that some compilers reject).
4497 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
4498 since it's no longer needed.
4499
f9bfc42a
JD
45002006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
4501
4502 Clean up scanners a bit.
4503 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
4504 definitions so gcc won't warn when obstack_for_string is unused.
4505 * src/scan-code.l: config.h and system.h are already #include'd by
4506 scan-code-c.c, so get rid of them here.
4507 * src/scan-gram.l: Likewise.
4508 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
4509 definitions rather than duplicating the rest of it.
4510 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
4511
06e8700a
JD
45122006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
4513
4514 Suppress signed/unsigned comparison warnings for yycheck.
4515 * data/c.m4 (b4_safest_int_type): New macro.
4516 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
4517 a signed int type, cast it to b4_safest_int_type first.
4518 * data/yacc.c: Likewise.
4519 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
4520 also overwritten.
4521
9c437126
PE
45222006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
4523
4524 * doc/bison.texinfo: Fix some typos.
4525
284d8a13
PE
45262006-08-02 Paul Eggert <eggert@cs.ucla.edu>
4527
4528 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
4529 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
4530
4531 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
4532 the latest gnulib does this a different way.
4533 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
4534 translation was patched, so stop omitting it.
4535
ec5479ce
JD
45362006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
4537
4538 Enable declaration of default %printer/%destructor. Make the parser
4539 use these for all user-declared grammar symbols for which the user does
4540 not declare a specific %printer/%destructor. Thus, the parser uses it
4541 for token 0 if the user declares it but not if Bison generates it as
4542 $end. Discussed starting at
4543 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
4544 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
4545 and
4546 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
4547 * NEWS (2.3+): Mention.
4548 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
4549 declare a %destructor for a mid-rule's semantic value. It's just
4550 impossible to declare one specific to it.
4551 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
4552 code. Describe default %destructor form.
4553 * src/parse-gram.y (grammar_declaration): Parse default
4554 %printer/%destructor declarations.
4555 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
4556 and symbol_destructor_location_get rather than accessing the destructor
4557 and destructor_location members of struct symbol.
4558 (symbol_printers_output): Likewise but for %printer's.
4559 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
4560 again.
4561 * src/symtab.c (default_destructor, default_destructor_location,
4562 default_printer, default_printer_location): New static global
4563 variables to record the default %destructor and %printer.
4564 (symbol_destructor_get, symbol_destructor_location_get,
4565 symbol_printer_get, symbol_printer_location_get): New functions to
4566 compute the appropriate %destructor and %printer for a symbol.
4567 (default_destructor_set, default_printer_set): New functions to set the
4568 default %destructor and %printer.
4569 * src/symtab.h: Prototype all those new functions.
4570 * tests/actions.at (Default %printer and %destructor): New test to
4571 check that the right %printer and %destructor are called, that they're
4572 not called for $end, and that $$ and @$ work correctly.
4573 (Default %printer and %destructor for user-declared end token): New
4574 test to check that the default %printer and %destructor are called for
4575 a user-declared end token.
4576 * tests/input.at (Default %printer and %destructor redeclared, Unused
4577 values with default %destructor): New tests to check related grammar
4578 warnings and errors.
4579
868d2d96
JD
45802006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
4581
4582 Clean up handling of %destructor for the end token (token 0).
4583 Discussed starting at
4584 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
4585 and
4586 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
4587
4588 Make the skeletons consistent in how they pop the end token and invoke
4589 its %destructor.
4590 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
4591 state, which has token number 0, since this would invoke the
4592 %destructor for the end token.
4593 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
4594 until after shifting the end token, or else it won't be popped.
4595 * data/yacc.c (yyparse): Likewise.
4596
4597 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
4598 it's the end token. Upon termination, destroy an unshifted lookahead
4599 even when it's the end token.
4600 * data/lalr1.cc (yy::parser::parse): Likewise.
4601 * data/yacc.c (yyparse): Likewise.
4602
4603 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
4604 value warnings for the end token when the user gives the end token a
4605 %destructor.
4606
4607 * tests/actions.at (Printers and Destructors): Test all the above.
4608
62a9592d
PE
46092006-07-24 Paul Eggert <eggert@cs.ucla.edu>
4610
4611 Update to latest gnulib and gettext versions.
4612 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
4613 Add fopen-safer.
4614 (gnulib_files): Add m4/warning.m4. Don't worry about files
4615 overwritten by autopoint.
4616 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
4617 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
4618 rejects them.
4619 Don't use autoreconf; instead, invoke autopoint etc. by hand,
4620 so that we can remove the intl files at a better time.
4621 (intl_files_to_remove): Remove aclocal.m4, since it gets
4622 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
4623 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
4624 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
4625 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
4626 Remove datarootdir hack; no longer needed.
4627 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
4628 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
4629 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
4630 strdup.h.
4631 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
4632 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
4633
10d6970f
PE
46342006-07-20 Paul Eggert <eggert@cs.ucla.edu>
4635
4636 * bootstrap: Adjust to today's change to gnulib-tool by invoking
4637 it with --assume-autoconf='latest-stable'.
4638
50a33993
JD
46392006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
4640
4641 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
4642 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
4643 YYSTYPE' and `{'.
4644 * src/muscle_tab.h (muscle_grow): Replace the header comments with
4645 those from muscle_tab.c since the old ones are misleading.
4646
2ce4ed68
AD
46472006-07-13 Akim Demaille <akim@epita.fr>
4648
4649 Support %define "KEY" {VALUE}.
4650 * src/scan-code.h, src/scan-code.l (translate_action)
4651 (translate_rule_action, translate_symbol_action, translate_code):
4652 Return char *, not const char *.
4653 * src/parse-gram.y (declaration): Rename as...
4654 (prologue_declaration): this.
4655 (string_content): Remove this nonterminal, use STRING.
4656 (braceless, content, content.opt): New nonterminal.
4657 Use them.
4658 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
4659 as value.
4660 * src/scan-gram.l (getargs.h): Don't include it.
4661
db7e5eb5
PE
46622006-07-12 Paul Eggert <eggert@cs.ucla.edu>
4663
4664 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
4665 rather than a for-loop that declares a local bool variable. This
4666 should work around a compatibility problem with a Cray x1e C++
4667 compiler reported by Hung Nguyen in
4668 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
4669 The for-loop was introduced in the 2004-11-17 change but I don't
4670 know why it was needed.
4671
a5d80ba5
AD
46722006-07-12 Akim Demaille <akim@epita.fr>
4673
4674 * data/c.m4: Comment changes.
4675
23eb2a69
AD
46762006-07-10 Akim Demaille <akim@lrde.epita.fr>
4677
4678 * src/complain.c (error_message, ERROR_MESSAGE): New.
4679 To factor...
4680 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
4681 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
4682
ddc8ede1
PE
46832006-07-09 Paul Eggert <eggert@cs.ucla.edu>
4684
4685 * NEWS: Instead of %union, you can define and use your own union type
4686 YYSTYPE if your grammar contains at least one <type> tag.
4687 Your YYSTYPE need not be a macro; it can be a typedef.
4688 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
4689 (Union Decl, Decl Summary): Document this.
4690 * data/glr.c (YYSTYPE): Implement this.
4691 * data/glr.cc (YYSTYPE): Likewise.
4692 * data/lalr1.cc (YYSTYPE): Likewise.
4693 * data/yacc.c (YYSTYPE): Likewise.
4694 * src/output.c (prepare): Output tag_seen_flag.
4695 * src/parse-gram.y (declaration, grammar_declaration):
4696 Use 'union_seen' rather than 'typed' to determine whether
4697 %union has been seen, since grammars can now be typed without
4698 %union.
4699 (symbol_declaration, type.opt, symbol_def):
4700 Keep track of whether a tag has been seen.
4701 * src/reader.c (union_seen, tag_seen): New vars.
4702 (typed): remove.
4703 * src/reader.h (union_seen, tag_seen, typed): Likewise.
4704 * src/scan-code.l (untyped_var_seen): New variable.
4705 (handle_action_dollar): Adjust to above changes.
4706 (handle_action_dollar, handle_action_at):
4707 Improve overflow checking for outlandish numbers.
4708 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
4709 avoid new diagnostics generated by above changes.
4710 * tests/regression.at (YYSTYPE typedef): Add test to check
4711 for type tags without %union.
4712
4713 * src/symlist.c (symbol_list_length): Return int, not unsigned
4714 int, since callers expect int. This may need to get revisited
4715 once we have proper integer overflow checking.
4716
4717 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
4718 object is now static.
4719
4720 * src/getargs.c (flags_argmatch): Return void, not int,
4721 to pacify ./configure --enable-gcc-warnings.
4722
4723 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
4724 since last_string is already defined to FLEX_PREFIX (last_string).
4725
7b42569e
AD
47262006-07-09 Akim Demaille <akim@lrde.epita.fr>
4727
4728 Implement --warnings/-W.
4729 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
4730 replaced by...
4731 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
4732 Adjust callers.
4733 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
4734 (warnings_args, warnings_types): New.
4735 (getargs, short_options, long_options): Accept -W/--warnings.
4736 Sort the options by alphabetical order, upper case letter right
4737 before its lower case.
4738
3b452f4e
JD
47392006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4740
4741 Change %merge result type clash warnings to errors. Discussed at
4742 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
4743 * src/reader.c (record_merge_function_type): Use complain_at.
4744 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4745 declared later): Update test case results.
4746
b8a41559
AD
47472006-07-09 Akim Demaille <akim@lrde.epita.fr>
4748
4749 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
4750 to be in alphabetical order.
4751 (trace_args): Spelling fixes.
4752
cd9e1ba2
PE
47532006-07-09 Paul Eggert <eggert@cs.ucla.edu>
4754
4755 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
4756 so they don't collide with user-defined macros.
4757 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
4758 this was never guaranteed, and now that we're using gnulib stdint,
4759 which defines int_fast16_t to long int, the problem is exposed.
4760
cb48f191
PE
47612006-07-08 Paul Eggert <eggert@cs.ucla.edu>
4762
b8445a15
PE
4763 * data/c.m4 (b4_basename): Simplify a bit, since we don't
4764 need the full POSIX semantics (and weren't implementing them
4765 anyway).
4766
cb48f191
PE
4767 Adjust to Autoconf 2.60 and today's gnulib.
4768 * bootstrap (gnulib_modules): Add stdint.
4769 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
4770 no longer copies it.
4771 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
4772 since stdint needs the former and wcwidth (which is now required
4773 by mbswidth) needs the latter.
4774 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
4775 work around a compatibility glitch between gettext 0.14.6 and
4776 Autoconf 2.60.
4777 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
4778 Do not check for uintptr_t, since new stdint module does the right
4779 thing.
4780 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
4781 Add stdint.h, stdint_.h, wcwidth.h.
4782 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
4783 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
4784 stdint.m4, wchar_t.m4, wcwidth.m4.
4785 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
4786 usual order for ../lib/*.h files.
4787 (file_name_split): Use last_component, not base_name, to adjust
4788 to gnulib changes.
4789 * src/parse-gram.h: Include <strverscmp.h> in the usual order
4790 for ../lib/*.h files.
4791 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
4792 Define unconditionally, since we now assume the stdint module.
4793 * src/scan-skel.l: Include <dirname.h>.
4794 (BASE_QPUTS): Use last_component, not base_name.
4795 * src/system.h: Include <unlocked-io.h> in the usual order
4796 for ../lib/*.h files. Include <stdint.h> unconditionally,
4797 since we now use the stdint module.
4798 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
4799 HAVE_UINTPTR_T, since we now use the stdint module.
4800 (base_name): Remove decl, since files now include <dirname.h>
4801 to get the decl.
4802
cd48d21d
AD
48032006-07-08 Akim Demaille <akim@lrde.epita.fr>
4804
4805 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
4806 New, default to 1.
4807 * data/yacc.c, data/glr.c, data/location.cc: Use them.
4808 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
4809 default.
4810 * tests/calc.at: Adjust.
4811
8ec0a172
AD
48122006-07-08 Akim Demaille <akim@lrde.epita.fr>
4813
b8445a15 4814 * data/c.m4 (b4_basename): New.
8ec0a172
AD
4815 (b4_syncline): Also output the location of its invocation (from
4816 the skeleton).
4817 (b4_user_action, b4_define_user_action, b4_user_actions)
4818 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
4819 (b4_user_stype): New.
4820 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
4821
4a678af8
JD
48222006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
4823
4824 In the grammar file, the first column is 1 not 0 on the first line as
4825 on every other line.
4826 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
4827 * tests/input.at (Torturing the Scanner): Update output.
4828
4829 * src/scan-gram.l (scanner_cursor): Declare it static.
4830
dd60572a
JD
48312006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
4832
4833 In warnings, say "previous declaration" rather than "first
4834 declaration".
4835 * src/symtab.c (redeclaration): Do that here.
4836 * src/reader.c (record_merge_function_type): In the case of a result
4837 type clash, report the previous declaration rather than the very first
4838 one in the grammar file.
4839 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4840 declared later): Add a third declaration to check this behavior.
4841 * tests/input.at (Incompatible Aliases): Update output.
4842
2073e1b6
AD
48432006-06-27 Akim Demaille <akim@epita.fr>
4844
4845 * doc/Doxyfile.in: New.
4846 * doc/Makefile.am: Use it.
4847 * src/lalr.h, src/symtab.h: Initial doxygenation.
4848
8ee5b538
JD
48492006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4850
4851 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
4852 declared after the %merge. This continues the effort of the previous
4853 patch.
8ee5b538
JD
4854 * src/reader.c (get_merge_function): Don't set the merger type yet.
4855 (record_merge_function_type): New function for setting the merger type
4856 and checking for clashes.
4857 (grammar_current_rule_merge_set): Set the location of the %merge for
4858 the current rule.
4859 (packgram): Invoke record_merge_function_type for each rule now that
4860 all symbol type declarations have been parsed.
4861 * src/reader.h (merger_list.type_declaration_location): New member
4862 storing the location of the first %merge from which the type for this
4863 merging function was derived.
4864 * src/symlist.h (symbol_list.merger_declaration_location): New member
4865 storing the location of a rule's %merge, if any.
4866 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4867 declared later): New test to catch the error fixed by the above patch.
4868
ffa4ba3a
JD
48692006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4870
4871 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
4872 declarations appear after the rules. Discussed at
4873 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
4874 and
4875 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
4876 Don't mistake the type of $$ in a midrule to be that of its parent
4877 rule's $$.
ffa4ba3a
JD
4878 * src/reader.c (grammar_current_rule_end): Don't invoke
4879 grammar_rule_check yet since not all symbol declarations may have been
4880 parsed yet.
4881 (grammar_midrule_action): Likewise.
4882 Don't record whether the midrule's $$ has been used yet since actions
4883 haven't been translated yet.
4884 Record the midrule's parent rule and its RHS index within the parent
4885 rule.
4886 (grammar_current_rule_action_append): Don't translate the action yet
4887 since not all symbol declarations may have been parsed yet and, thus,
4888 warnings about types for $$, $n, @$, and @n can't be reported yet.
4889 (packgram): Translate the action and invoke grammar_rule_check now that
4890 all symbol declarations have been parsed.
4891 * src/scan-code.l (handle_action_dollar): Now that this is invoked
4892 after parsing the entire grammar file, the symbol list here in the case
4893 of a midrule is actually the midrule's empty RHS, so reference its
4894 parent rule's RHS where necessary.
4895 On the other hand, now that you can already know it's a midrule, you
4896 aren't forced to think $$ has the same type as its parent rule's $$.
4897 (handle_action_at): In the case of a midrule, reference the parent rule
4898 where necessary.
4899 * src/symlist.c (symbol_list_new): Initialize new midrule-related
4900 members.
4901 (symbol_list_length): Now that this is invoked after all rules have
4902 been parsed, a NULL symbol (rather than a NULL symbol list node)
4903 terminates a rule. symbol_list_print already does this correctly.
4904 * src/symlist.h (symbol_list.midrule_parent_rule,
4905 symbol_list.midrule_parent_rhs_index): New members so that midrules can
4906 remember their relationships with their parents.
4907 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
4908 fixed by the above patch.
4909 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
4910 implementing...
4911 (Unused values): ... this old test case and...
4912 (Unused values before symbol declarations): ... this new test case.
4913 This one is the same as `Unused values' except that all symbol
4914 declarations appear after the rules in order to catch the rest of the
4915 errors fixed by the above patch.
4916
e256e17f
JD
49172006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4918
300a1930
JD
4919 More cleanup.
4920 * src/reader.c (current_rule): Declare it static since it's no longer
4921 used outside this file.
4922 (grammar_current_rule_action_append): Remove redundant arguments from
4923 translate_rule_action invocation.
4924 * src/reader.h (current_rule): Remove this unused extern.
4925 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
4926 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 4927
381ecb06
JD
49282006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
4929
4930 Clean up yesterday's patch.
4931 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
4932 to...
4933 * src/reader.c (grammar_current_rule_action_append): ... here for
4934 consistency with grammar_current_rule_symbol_append.
4935 * tests/regression.at (Braced code in declaration in rules section):
4936 Make yyerror and yylex static as usual.
4937
4210cd0b
JD
49382006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
4939
4940 Fix bug that mistakes braced code in a declaration in the rules section
4941 to be a rule action. Mentioned at
4942 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
4943 * src/scan-gram.l: Move midrule action detection from the start of the
4944 scanning of any braced code to...
4945 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
4946 action. For readability, use $2 and @2 rather than the equivalent
4947 global variables.
4948 * tests/regression.at (Braced code in declaration in rules section):
4949 New test to catch the error fixed by the above patch.
4950
4951 Work on code readability some.
4952 * src/scan-code.l (current_rule): Get rid of this misleading and
4953 redundant declaration: it's actually extern'ed in reader.h.
4954 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
4955 translate_action): Add a rule argument and use it instead of the global
4956 current_rule.
4957 (translate_rule_action): This already receives current_rule through an
4958 argument, so pass it on to translate_action instead of assigning
4959 current_rule to current_rule.
4960 (translate_symbol_action, translate_code): Pass rule = NULL to
4961 translate_action.
4962
34f98f46
JD
49632006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
4964
4965 Rename %before-definitions to %start-header and %after-definitions to
4966 %end-header. Don't use these declarations to separate pre-prologue
4967 blocks from post-prologue blocks. Add new order-independent
4968 declarations %before-header and %after-header as alternatives to the
4969 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
4970 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
4971 * NEWS (2.3+): Update for these changes.
4972 * data/glr.c (b4_before_definitions): Update to...
4973 (b4_start_header): ... this.
4974 (b4_after_definitions): Update to...
4975 (b4_end_header): ... this.
4976 * data/glr.cc: Likewise.
4977 * data/lalr1.cc: Likewise.
4978 * data/yacc.c: Likewise.
4979 * doc/bison.texinfo (The prologue): Update names, and replace remaining
4980 prologue blocks with %*-header declarations.
4981 (Calc++ Parser): Likewise.
91661ebb 4982 (Decl Summary): Update names.
148d66d8 4983 (Table of Symbols): Update description.
34f98f46
JD
4984 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
4985 (PERCENT_END_HEADER): ... this.
4986 (PERCENT_BEFORE_DEFINITIONS): Update to...
4987 (PERCENT_START_HEADER): ... this.
4988 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4989 (declaration): Update token names and m4 macro names.
4990 When parsing %end-header and %start-header, invoke translate_code
4991 before muscle_code_grow, and no longer set global booleans to remember
4992 whether these declarations have been seen.
4993 Parse new %after-header and %before-header.
4994 * src/reader.c (before_definitions, after_definitions): Remove.
4995 (prologue_augment): Accept a new bool argument to specify whether to
4996 augment the pre-prologue or post-prologue.
4997 * src/reader.h (before_definitions, after_definitions): Remove these
4998 extern's.
4999 (prologue_augment): Add new bool argument.
5000 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
5001 (PERCENT_END_HEADER): ... this.
5002 (PERCENT_BEFORE_DEFINITIONS): Update to...
5003 (PERCENT_START_HEADER): ... this.
5004 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
5005 * tests/actions.at (Printers and Destructors): Update names.
5006
31b2b07e
JD
50072006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
5008
5009 Add comparison operators for C++ location classes. Discussed at
5010 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
5011 * data/c++.m4 (b4_define_location_comparison): New boolean %define
5012 declaration indicating whether filename_type has an operator==. If
5013 filename_type is `std::string', it defaults to `1', `0' otherwise.
5014 * data/location.cc: Iff b4_define_location_comparison is `1', add
5015 operator== and operator!= for class position and for class location.
5016
5017 Some minor fixes.
5018 * src/scan-action.l: Remove unused file.
5019 * src/symtab.c (symbol_printer_set): Use printer_location not
5020 destructor_location.
5021 * src/symtab.h (struct symbol): Replace incorrect source comment for
5022 printer members.
5023 * tests/input.at (Incompatible Aliases): Update output with correct
5024 printer location.
5025
9bc0dd67
JD
50262006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
5027
5028 Don't put the pre-prologue in the header file. For the yacc.c code
5029 file and the glr.c header and code files, move the pre-prologue before
5030 the token definitions. Add new %before-definitions and
5031 %after-definitions to declare code that will go in both the header file
5032 and code file. Discussed at
5033 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
5034 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
5035 and
5036 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
5037 * NEWS (2.3+): Describe these changes.
5038 * data/glr.c (b4_pre_prologue): Move from within to before...
5039 (b4_shared_declarations): ... this.
5040 Add new b4_before_definitions before b4_token_enums.
5041 Add new b4_after_definitions at the end.
5042 * data/glr.cc (b4_pre_prologue): Replace with...
5043 (b4_before_definitions): ... this in the header file.
5044 (b4_after_definitions): New near the end of the header file.
5045 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
5046 code file right before including the header file.
5047 (b4_before_definitions): New in the previous position of
5048 b4_pre_prologue in the header file.
5049 (b4_after_definitions): New near the end of the header file.
5050 * data/yacc.c: Clean up some m4 quoting especially in the header file.
5051 (b4_token_enums_defines): In the code file, move to right before
5052 YYSTYPE for consistency with the header file.
5053 (b4_before_definitions): New right before b4_token_enums_defines in
5054 both the header and code file.
5055 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
5056 header and code file.
5057 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
5058 of prologues for %union dependencies.
91661ebb
JD
5059 (Decl Summary): In %defines description, mention the effect of
5060 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
5061 (Calc++ Parser): Forward declare driver in a %before-definitions rather
5062 than in the pre-prologue so that make check succeeds.
148d66d8 5063 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
5064 %after-definitions.
5065 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
5066 %before-definitions.
5067 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
5068 (declaration): Parse those declarations and append to
5069 b4_before_definitions and b4_after_definitions, respectively.
5070 * src/reader.c (before_definitions, after_definitions): New bools to
5071 track whether those declarations have been seen.
5072 (prologue_augment): Add to the post-prologue if %union,
5073 %before-definitions, or %after-definitions has been seen.
5074 * src/reader.h (before_definitions, after_definitions): New extern's.
5075 * src/scan-gram.l: Scan the new declarations.
5076 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
5077 prologue block in a %before-definitions or a %after-definitions based
5078 on whether the %union is declared.
5079 * tests/regression.at (Early token definitions with --yacc, Early token
5080 definitions without --yacc): Move tests for token definitions into the
5081 post-prologue since token names are no longer defined in the
5082 pre-prologue.
5083
203b9274
AD
50842006-06-20 Akim Demaille <akim@epita.fr>
5085
5086 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
5087 (symbol_get): Use it.
5088 * src/parse-gram.y: Use it.
5089
a7ee59cf
JD
50902006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
5091
5092 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
5093 build succeeds when configured with --enable-gcc-warnings.
5094
5a2baae7
PE
50952006-06-19 Paul Eggert <eggert@cs.ucla.edu>
5096
33ad1a9c
PE
5097 * src/parse-gram.y (char_name): New function.
5098 (CHAR, STRING, string_content): For %printer, properly escape.
5099 (ID): Prefer fputs to fprintf.
5100 (id): Reindent to be consistent with other rules.
5101 Properly quote char.
5102
5a2baae7
PE
5103 The Translation Project changed its way of publishing translations
5104 to maintainers. I haven't received any responses to my request
5105 for supporting the old way, or for documenting the new way. I
5106 have modified 'bootstrap' to use screen scraping
5107 (in this case, HTML scraping). This is unreliable and inelegant,
5108 but I don't see any better way. Yuck.
5109 * bootstrap (TP_URL, WGET_COMMAND): New vars.
5110 (get_translations): New function, which uses HTML scraping to
5111 deduce locations of latest translations.
5112 Use this function to grab both bison and bison-runtime .po files.
5113 Don't bother priming the pump for the runtime-po domain any more,
5114 as it's now translated better than bison is.
5115
58d7a1a1
AD
51162006-06-19 Akim Demaille <akim@epita.fr>
5117
5118 * src/scan-gram.l: No longer "parse" things after `%union' until
5119 `{'. Rather, return a single "%union" token.
5120 No longer make symbols: return strings, and leave the conversion
5121 to symbols to the parser.
5122 (SC_PRE_CODE, token_type): Remove.
5123 * src/parse-gram.y (%union): New field `character'.
5124 Sort tokens.
5125 (CHAR): New token.
5126 (ID, ID_COLON): Now that the scanner no longer makes them
5127 identifiers, adjust all uses to invoke symbol_get.
5128 (id_colon): New, wraps the conversion from string to symbol.
5129 (%union): Accept a possible union_name.
5130 (symbol): Now can be a char.
5131 * data/c.m4 (b4_union_name): Leave a default value.
5132 * data/glr.c, data/yacc.c: Use it.
5133
b931235e
JD
51342006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
5135
5136 For associating token numbers with token names for "yacc.c", don't use
5137 #define statements unless `--yacc' is specified; always use enum
5138 yytokentype. Most important discussions start at:
5139 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
5140 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
5141 and
5142 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
5143 * NEWS (2.3+): Mention.
5144 * data/c.m4 (b4_yacc_if): New.
5145 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
5146 token #define's.
5147 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
5148 on token name definitions.
5149 * src/getargs.c (usage): Capitalize `Yacc' in English.
5150 * src/output.c (prepare): Define b4_yacc_flag.
5151 * tests/regression.at (Early token definitions): Test that tokens names
5152 are defined before the pre-prologue not just before the post-prologue.
5153 Remove this test case and copy to...
5154 (Early token definitions with --yacc): ... this to test #define's.
5155 (Early token definitions without --yacc): ... and this to test enums.
5156
9e6e7ed2
PE
51572006-06-11 Paul Eggert <eggert@cs.ucla.edu>
5158
5159 * NEWS: Reword the post-2.3 change to not be so optimistic about
5160 removing the old "look-ahead" spelling.
5161 Update previous look-ahead/lookahead change reports.
5162 * REFERENCES: look-ahead -> lookahead (since that's
5163 what he actually wrote).
5164 * doc/refcard.tex: look ahead -> lookahead,
5165 look-ahead -> lookahead
5166
742e4900
JD
51672006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
5168
5169 For consistency, use `lookahead' instead of `look-ahead' or
5170 `look_ahead'. Discussed starting at
5171 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
5172 and then at
5173 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
5174 * NEWS: For the next release, note the change to `--report'.
5175 * TODO, doc/bison.1: Update English.
5176 * doc/bison.texinfo: Update English.
5177 (Understanding Your Parser, Bison Options): Document as
5178 `--report=lookahead' rather than `--report=look-ahead'.
5179 * src/conflicts.c: Update English in comments.
5180 (lookahead_set): Rename from look_ahead_set.
5181 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
5182 (resolve_sr_conflict): Rename local look_ahead_tokens to
5183 lookahead_tokens, and update other uses.
5184 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
5185 count_rr_conflicts, conflicts_free): Update uses.
5186 * src/getargs.c (report_args): Move "lookahead" before alternate
5187 spellings.
5188 (report_types): Update uses.
5189 (usage): For `--report' usage description, state `lookahead' spelling
5190 rather than `look-ahead'.
5191 * src/getargs.h (report.report_lookahead_tokens): Rename from
5192 report_look_ahead_tokens.
5193 * src/lalr.c: Update English in comments.
5194 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
5195 (state_lookahead_tokens_count): Rename from
5196 state_look_ahead_tokens_count.
5197 Rename local n_look_ahead_tokens to n_lookahead_tokens.
5198 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
5199 Rename local n_look_ahead_tokens to n_lookahead_tokens.
5200 Update other uses.
5201 Update English in output.
5202 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
5203 * src/print.c: Update English in comments.
5204 (lookahead_set): Rename from look_ahead_set.
5205 (print_reduction): Rename argument lookahead_token from
5206 look_ahead_token.
5207 (print_core, state_default_rule, print_reductions, print_results):
5208 Update uses.
5209 * src/print_graph.c: Update English in comments.
5210 (print_core): Update uses.
5211 * src/state.c: Update English in comments.
5212 (reductions_new): Update uses.
5213 (state_rule_lookahead_tokens_print): Rename from
5214 state_rule_look_ahead_tokens_print, and update other uses.
5215 * src/state.h: Update English in comments.
5216 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
5217 (state_rule_lookahead_tokens_print): Rename from
5218 state_rule_look_ahead_tokens_print.
5219 * src/tables.c: Update English in comments.
5220 (conflict_row, action_row): Update uses.
5221 * tests/glr-regression.at
5222 (Incorrect lookahead during deterministic GLR,
5223 Incorrect lookahead during nondeterministic GLR): Rename
5224 print_look_ahead to print_lookahead.
5225 * tests/torture.at: Update English in comments.
5226 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
5227 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
5228 (Many lookahead tokens): Update uses.
5229 * data/glr.c: Update English in comments.
5230 * lalr1.cc: Likewise.
5231 * yacc.c: Likewise.
5232 * src/conflicts.h: Likewise.
5233 * src/lalr.h: Likewise.
5234 * src/main.c: Likewise.
5235 * src/output.c: Likewise.
5236 * src/parse-gram.c: Likewise.
5237 * src/tables.h: Likewise.
5238 * tests/calc.at: Likewise.
5239
3c40d0b5
JD
52402006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
5241
5242 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
5243
5d278082
PE
52442006-06-07 Paul Eggert <eggert@cs.ucla.edu>
5245
5246 * TODO: Add request from Nelson H. F. Beebe to be able to install
5247 Bison without installing the yacc script.
5248
9e668899
JD
52492006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
5250
5251 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
5252 and yytext if they're already #define'd.
5253 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
5254 * src/scan-code-c.c: ... here.
5255 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
5256 <config.h>.
5257
0c8e079f
JD
52582006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
5259
5260 Get Bison to build again when configured with --enable-gcc-warnings.
5261 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
5262 missing #include's.
5263 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
5264 loc argument as it shadows a global.
5265 * src/scan-gram.l: Remove stray comma that prevents boundary_set
5266 invocation.
5267
5268 * src/.cvsignore: Add scan-code.c.
5269
2346344a
AD
52702006-06-07 Akim Demaille <akim@epita.fr>
5271
5272 * src/scan-gram.l: Move the "add a trailing ; to actions" code
5273 to...
5274 * src/scan-code.l: here.
5275 * tests/input.at (Torturing the Scanner): Fix another location
5276 error.
5277
4862bdfd
AD
52782006-06-07 Akim Demaille <akim@epita.fr>
5279
5280 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
5281
e9071366
AD
52822006-06-06 Akim Demaille <akim@epita.fr>
5283
5284 Extract the parsing of user actions from the grammar scanner.
5285 As a consequence, the relation between the grammar scanner and
5286 parser is much simpler. We can also split "composite tokens" back
5287 into simple tokens.
5288 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
5289 * src/scan-gram.l (add_column_width, adjust_location): Move to and
5290 rename as...
5291 * src/location.h, src/location.c (add_column_width)
5292 (location_compute): these.
5293 Fix the column count: the initial column is 0.
5294 (location_print): Be robust to ending column being 0.
5295 * src/location.h (boundary_set): New.
5296 * src/main.c: Adjust to scanner_free being renamed as
5297 gram_scanner_free.
5298 * src/output.c: Include scan-code.h.
5299 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
5300 Use boundary_set.
5301 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
5302 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
5303 which is now, again, a separate token.
5304 Adjust all dependencies.
5305 Whereever actions with $ and @ are used, use translate_code.
5306 (action): Remove this nonterminal which is now useless.
5307 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
5308 (grammar_current_rule_action_append): Use translate_code.
5309 (packgram): Bound check ruleno, itemno, and rule_length.
5310 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
5311 (last_string, last_braced_code_loc, max_left_semantic_context)
5312 (scanner_initialize, scanner_free, scanner_last_string_free)
5313 (gram_out, gram_lineno, YY_DECL_): Move to...
5314 * src/scan-gram.h: this new file.
5315 (YY_DECL): Rename as...
5316 (GRAM_DECL): this.
5317 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
5318 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
5319 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
5320 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
5321 Move these declarations, and...
5322 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
5323 these to...
5324 * src/flex-scanner.h: this new file.
5325 * src/scan-gram.l (rule_length, rule_length_overflow)
5326 (increment_rule_length): Remove.
5327 (last_braced_code_loc): Rename as...
5328 (gram_last_braced_code_loc): this.
5329 Adjust to the changes of the parser.
5330 Move all the handling of $ and @ into...
5331 * src/scan-code.l: here.
5332 * src/scan-gram.l (handle_dollar, handle_at): Remove.
5333 (handle_action_dollar, handle_action_at): Move to...
5334 * src/scan-code.l: here.
5335 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
5336 scan-code.h, scan-code-c.c, scan-gram.h.
5337 (EXTRA_bison_SOURCES): Add scan-code.l.
5338 (BUILT_SOURCES): Add scan-code.c.
5339 (yacc): Be robust to white spaces.
5340
5341 * tests/conflicts.at, tests/input.at, tests/reduce.at,
5342 * tests/regression.at: Adjust the column numbers.
5343 * tests/regression.at: Adjust the error message.
7891a7c4 5344
184e42f0
JD
53452006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
5346
5347 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
5348 Use Akim's wording from
5349 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
5350
7891a7c4
JD
53512006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
5352
5353 Between Bison releases, manually append `+' to the previous Bison
5354 release number, and use that as a signal to automatically print the
5355 ChangeLog's CVS Id keyword from --version. Discussed starting at
5356 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
5357 * ChangeLog: Add Id header.
5358 * configure.ac (AC_INIT): Append `+' to `2.3'.
5359 * src/.cvsignore: Add revision.c.
5360 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
5361 (BUILT_SOURCES): Add revision.c.
5362 (revision.c): New target rule. This file defines a new global variable
5363 named revision. It initializes it with either the Id from ChangeLog
5364 or, if VERSION doesn't contain `+', with the empty string.
5365 * src/getargs.c (version): Print the value of revision.
5366 * src/revision.h: Extern revision.
5367
4ad3ed84
PE
53682006-06-05 Paul Eggert <eggert@cs.ucla.edu>
5369
5370 * NEWS: Version 2.3.
5371 * configure.ac (AC_INIT): Likewise.
5372
02103984
PE
53732006-05-30 Paul Eggert <eggert@cs.ucla.edu>
5374
5375 * data/glr.c (YYRECOVERING): Define to be a function-like macro
5376 with no arguments, not as an object-like macro. This is for
5377 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
5378 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
5379 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
5380 Document this.
5381
2c08afa5
JD
53822006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
5383
5384 * src/getargs.c (usage): Back out yesterday's modification of the
5385 --help output so that we don't have to wait for translation before
5386 releasing 2.3.
5387
6077da58
PE
53882006-05-29 Paul Eggert <eggert@cs.ucla.edu>
5389
5390 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
5391 Problem reported by Akim Demaille.
5392
2a26b6c2
JD
53932006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
5394
5395 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
5396
aefef0d6
PE
53972006-05-26 Paul Eggert <eggert@cs.ucla.edu>
5398
5399 * data/yacc.c (yy_reduce_print): Omit trailing white space in
5400 generated source code. Problem reported by Frans Englich in
5401 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
5402
fcd8e201
PE
54032006-05-22 Paul Eggert <eggert@cs.ucla.edu>
5404
5405 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
5406 shell, not within 'make', so that 'make' by an ordinary builder
5407 (using GNU make) does not worry about configuring gzip. This also
5408 works around a bug reported independently by Keith Thompson and by
5409 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
5410 stderr rather than stdout, messing up the build logs.
5411
7b5cdcbd
JD
54122006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
5413
5414 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
5415 to make sure that YYID will never be unused. This fixes a 'make
5416 maintainer-check' failure caused by the recent changes to the 'Trivial
5417 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
5418 not used.
5419 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
5420
5ad0a449
JD
54212006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
5422
5423 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
5424 state before an empty RHS is always resolved here. Only the location
5425 of that state is guaranteed to be resolved, and that's enough. This
5426 fixes the remaining bug reported by Derek M. Jones in
5427 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
5428 * tests/glr-regression.at (Uninitialized location when reporting
5429 ambiguity): Test the above case.
5430 Also, the embedded comments in this test case claim it checks the case
5431 of an empty RHS that has inherited the initial location. However, the
5432 corresponding LHS was already resolved, so yyresolveLocations didn't
5433 actually have reason to modify it. Fix this by forcing
5434 nondeterministic operation at the beginning of the parse.
5435
50cce58e
PE
54362006-05-20 Paul Eggert <eggert@cs.ucla.edu>
5437
5438 * data/c.m4 (b4_yy_symbol_print_generate):
5439 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
5440 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
5441 of the bugs reported today by Derek M Jones in
5442 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
5443 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
5444 defined to be a type name without parens or brackets.
5445 (Location Type): Similarly for YYLTYPE.
5446 * tests/regression.at (Trivial grammars): Put in a test for this
5447 bug that will be caught by 'make maintainer-check' (though not,
5448 alas, by 'make check' unless your compiler is picky).
5449
ab8d9dc5
PE
54502006-05-19 Paul Eggert <eggert@cs.ucla.edu>
5451
0d2c8934 5452 * NEWS: Version 2.2.
ab8d9dc5
PE
5453 * configure.ac (AC_INIT): Likewise.
5454
9138c575
JD
54552006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
5456
5457 * data/glr.c (yyreportTree): Make room in yystates for the state
5458 preceding the RHS. This fixes the segmentation fault reported by Derek
5459 M. Jones in
5460 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
5461 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
5462 to the user. Reported for yyreportTree by Derek M. Jones later in the
5463 same thread.
5464 * THANKS: Add Derek M. Jones.
5465 Update my email address.
5466 Fix typo in Steve Murphy's name.
5467
276f48df
PE
54682006-05-14 Paul Eggert <eggert@cs.ucla.edu>
5469
d6645148
PE
5470 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
5471 checking against YYLAST that caused the parser to miss a potential
5472 alternative in its diagnostic.
5473 Problem reported by Maria Jose Moron Fernandez in
5474 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
5475 * data/lalr1.cc (yysyntax_error_): Likewise.
5476 * data/yacc.c (yysyntax_error): Likewise.
5477 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
5478 tokens, in case we run into an older C compiler.
5479 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
5480 Use them to check for the off-by-one error fixed above.
5481
276f48df
PE
5482 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
5483 YYSIZE_T, not size_t.
5484 * tests/regression.at (Trivial grammars): New test, to catch
5485 the error fixed by the above patch.
5486
cd8b5791
AD
54872006-05-14 Akim Demaille <akim@lrde.epita.fr>
5488
5489 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
5490 scheme.
5491 Reported by Steve Murphy.
5492
34376418
AD
54932006-05-14 Akim Demaille <akim@lrde.epita.fr>
5494
5495 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
5496 * data/glr.cc: b4_location_flag is now b4_locations_flag.
5497
327afc7c
AD
54982006-05-14 Akim Demaille <akim@lrde.epita.fr>
5499
5500 Implement --trace=m4.
5501 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
5502 * src/output.c (output_skeleton): When set, pass -dV to m4.
5503
5504 Factor the handling of flags in m4.
5505 * src/output.c (prepare): Rename the muscle names debug, defines,
5506 error_verbose to debug_flag, defines_flag, error_verbose_flag.
5507 * data/c.m4: Adjust.
5508 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
5509 Use b4_define_flag_if to define other b4_FLAG_if macros.
5510 (b4_location_if): As a consequence, rename as...
5511 (b4_locations_if): this, for consistency.
5512 Adjust all the skeletons.
5513
ba9ecd19
AD
55142006-05-14 Akim Demaille <akim@lrde.epita.fr>
5515
5516 * etc/bench.pm: Shorten bench names.
5517
4e83ea15
AD
55182006-05-14 Akim Demaille <akim@lrde.epita.fr>
5519
5520 * src/output.h, src/output.c (error_verbose): Move to...
5521 * src/getargs.h, src/getargs.c: here.
5522 Sort the flags.
5523 Adjust dependencies.
5524
6e93d810
PE
55252006-05-13 Paul Eggert <eggert@cs.ucla.edu>
5526
5527 * data/c.m4 (b4_copyright): Put the special exception for Bison
5528 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
5529 uses changed. Suggested by Akim Demaille. Also, wrap the
5530 copyright notice, in case it is longer than 80 columns. Replace
5531 comma by newline after title.
6e93d810 5532
eaea13f5
PE
55332006-05-11 Paul Eggert <eggert@cs.ucla.edu>
5534
5535 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
5536 incompatibility, not a bug. Mention that it wasn't fixed as of
5537 flex 2.5.33.
5538
3cf084ec
AD
55392006-05-11 Akim Demaille <akim@lrde.epita.fr>
5540
5541 * examples/extexi: Enforce the precedence of concatenation over
5542 >>.
0a9f1c7d 5543 Reported by Tommy Nordgren.
3cf084ec 5544
32c96bd7
AD
55452006-05-11 Akim Demaille <akim@lrde.epita.fr>
5546
5547 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
5548 with the member "token".
f94705b2 5549 Reported by Martin Nylin.
32c96bd7 5550
eaea13f5
PE
55512006-05-08 Paul Eggert <eggert@cs.ucla.edu>
5552
5553 * data/glr.c: Switch to Bison 2.2 special-exception language in
5554 the copyright notice. Use more-regular format for titles and
5555 copyright notices.
5556 * data/glr.cc: Likewise.
5557 * data/location.cc: Likewise.
5558 * data/yacc.cc: Likewise.
5559 * doc/bison.texinfo (Conditions): Document this.
5560 * NEWS: likewise. Upgrade version to 2.2.
5561
6e2d1146
AD
55622006-04-27 Akim Demaille <akim@lrde.epita.fr>
5563
5564 * data/glr.cc: Remove dead code.
5565
47671055
PE
55662006-04-25 Paul Eggert <eggert@cs.ucla.edu>
5567
5568 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
5569 that variable and the line breaks the bootstrap. Problem reported
5570 by Juan M. Guerrero.
5571
ed2e6384
AD
55722006-04-24 Akim Demaille <akim@lrde.epita.fr>
5573
5574 * doc/bison.texinfo (Multiple start-symbols): New.
5575
3cedc2dc
AD
55762006-04-24 Akim Demaille <akim@lrde.epita.fr>
5577
5578 * etc/README, etc/bench.pl: New.
5579
b2ddc3f3
AD
55802006-04-03 Akim Demaille <akim@lrde.epita.fr>
5581
5582 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
5583 rule.
5584 Reported by Mickael Labau.
5585 * tests/input.at (Torturing the Scanner): Test it.
5586
91e3ac9a
PE
55872006-03-16 Paul Eggert <eggert@cs.ucla.edu>
5588
5589 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
5590 Problem reported by Bob Rossi.
5591
55922006-03-13 Paul Eggert <eggert@cs.ucla.edu>
5593
5594 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
5595 and didn't really work.
5596 For the index, use @ifnotinfo, not @iftex.
5597 Minor cleanups of spacing and terminology.
5598
5cf61e93
AD
55992006-03-12 Akim Demaille <akim@lrde.epita.fr>
5600
5601 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
5602 of AT_NAME_PREFIX when %name-prefix is not used.
5603
aa08666d
AD
56042006-03-12 Akim Demaille <akim@lrde.epita.fr>
5605
5606 Apply --prefix to C++ skeletons too: they change the namespace.
5607 The test suite already exercize these cases.
5608 * data/c++.m4 (b4_namespace): New.
5609 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
5610 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
5611 * data/yacc.c, data/glr.c: Remove a useless `[]'.
5612 * doc/bison.texinfo: Document it.
5613 (Option Cross Key): Use @multitable in all formats. It looks
5614 nicer, even in TeX outputs.
5615 (Rules): Use the same code whatever the output type is.
5616 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
5617 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
5618 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 5619
45567173
AD
56202006-03-10 Akim Demaille <akim@lrde.epita.fr>
5621
5622 * TODO: Remove dead items.
5623
e9d8f881 56242006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
5625
5626 * doc/FAQ: Remove, merged into...
5627 * doc/bison.texinfo (FAQ): this.
5628 * doc/Makefile.am (EXTRA_DIST): Adjust.
5629
c095d689
AD
56302006-03-10 Akim Demaille <akim@lrde.epita.fr>
5631
5632 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
5633 even if empty.
5634 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
5635 * doc/bison.texinfo (Calc++ Scanner): Use it.
5636
6e0f8287
PE
56372006-03-09 Paul Eggert <eggert@cs.ucla.edu>
5638
5639 Fix two nits reported by twlevo, plus one more that I discovered.
5640
5641 * src/assoc.h (assoc_to_string): Give a name to the arg, as
5642 this is the usual Bison style.
5643 * src/location.h (location_print): Likewise.
5644
5645 * src/reader.h (token_name): Likewise.
5646
d6b771c3
PE
56472006-03-08 Paul Eggert <eggert@cs.ucla.edu>
5648
5649 Fix some nits reported by twlevo.
5650 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
5651 and "POSIX". Use more-modern syntax for URLs. Mention C++
5652 and ask for Java. Don't hardwire OS version numbers. Add
5653 copyright notice.
5654 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
5655 * src/conflicts.c (solved_conflicts_obstack): Now static.
5656
1e137b71
JD
56572006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5658
5659 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
5660 page. Say "you can use it" not "you may use it" as on the web page;
5661 we're describing capabilities not granting permission.
5662
73f2e47e
PE
56632006-03-06 Paul Eggert <eggert@cs.ucla.edu>
5664
6d05403d
PE
5665 * data/glr.c (yyresolveLocations): Rename local variables to avoid
5666 shadowing warnings. Use usual patter for iterating through RHS.
5667 * tests/glr-regression.at
5668 (Uninitialized location when reporting ambiguity):
5669 Modify yylex so that it uses its argument, rather than trying
5670 to rely on ARGSUSED (which doesn't work for gcc with warnings).
5671 const char -> char const.
5672
73f2e47e
PE
5673 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
5674 Don't use tabs inside commands; it messes up 'ps'.
5675 Problem reported by twlevo.
5676
8710fc41
JD
56772006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
5678
5679 * tests/glr-regression.at (Uninitialized location when reporting
5680 ambiguity): New test case.
5681 * data/glr.c (yyresolveLocations): New function, which uses
5682 YYLLOC_DEFAULT.
5683 (yyresolveValue): Invoke yyresolveLocations before reporting an
5684 ambiguity.
5685 * doc/bison.texinfo (Default Action for Locations): Note
5686 YYLLOC_DEFAULT's usage for ambiguity locations.
5687 (GLR Semantic Actions): Cross-reference those notes.
5688
ae952af2
JD
56892006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
5690
5691 * tests/glr-regression.at (Leaked semantic values when reporting
5692 ambiguity): Remove unnecessary union and type declarations.
5693 (Leaked lookahead after nondeterministic parse syntax error): New test
5694 case.
5695 * data/glr.c (yyparse): Check for zero stacks remaining before
5696 attempting to shift the lookahead so that you don't lose it.
5697
35ee866a
JD
56982006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5699
5700 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
5701 * tests/glr-regression.at (Leaked semantic values when reporting
5702 ambiguity): New test case.
5703 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
5704 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
5705 now unnecessary yystackp parameter.
5706 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
5707 destructors can be called.
5708
5709 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
5710 in existing testcases.
5711
520181ab
JD
57122006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5713
5714 Don't leak semantic values for parent RHS when a user action cuts the
5715 parser, and clean up related code a bit.
5716 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
5717 cuts parse): Rename to...
5718 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
5719 for leaked parent RHS values.
5720 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
5721 between an unresolved state (non-empty chain of semantic options) and
5722 an incomplete one (signaled by an empty chain).
ae952af2 5723 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
5724 successfully or unsuccessfully resolved yyGLRState to...
5725 (yyresolveValue): ... here so that yyresolveValue always leaves a
5726 yyGLRState with consistent data and thus is easier to understand.
5727 Remove the yyvalp and yylocp parameters since they are always just
5728 taken from the yys parameter. When reporting a discarded merged value
5729 in debugging output, note that it is incompletely merged. Document the
5730 interface.
5731 (yyresolveAction): If resolving any of the RHS states fails, destroy
5732 them all rather than leaking them. Thus, as long as user actions are
5733 written to clean up the RHS correctly, yyresolveAction always cleans up
5734 the RHS of a semantic option. Document the interface.
5735
18d9185c
PE
57362006-02-27 Paul Eggert <eggert@cs.ucla.edu>
5737
5738 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
5739 led to a segmentation fault in GNU Pascal. Problem reported
5740 by Waldek Hebisch.
5741
841a7737
JD
57422006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
5743
5744 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
5745 mid-rule action inside a nonterminal symbol in order to declare a
5746 destructor for its semantic value.
5747
fc3f467f
PE
57482006-02-16 Paul Eggert <eggert@cs.ucla.edu>
5749
5750 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
5751 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
5752 __cplusplus && ! defined _STDLIB_H && !
5753 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
5754 defined free))]: Include <stdlib.h> rather than rolling our own
5755 declarations of malloc and free, to avoid problems with
5756 incompatible declarations (using 'throw') C++'s stdlib.h. This
5757 should fix Debian bug 340012
5758 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
5759 reported by Guillaume Melquiond.
5760
a3af26dd
PE
57612006-02-13 Paul Eggert <eggert@cs.ucla.edu>
5762
4d7bc38c
PE
5763 * NEWS: Clarify symbols versus types in unused-value warnings.
5764
a3af26dd
PE
5765 * configure.ac (AC_INIT): Bump version number.
5766
4e26c69e
PE
57672006-02-13 Paul Eggert <eggert@cs.ucla.edu>
5768
5769 * NEWS: Version 2.1a.
5770 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
5771 since C99 requires this.
5772
498e897c
PE
57732006-02-11 Paul Eggert <eggert@cs.ucla.edu>
5774
5775 * m4/c-working.m4: New file.
5776 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
5777
57bb17ca
PE
57782006-02-10 Paul Eggert <eggert@cs.ucla.edu>
5779
5780 * Makefile.maint: Merge from coreutils.
5781
0be105dc
PE
57822006-02-09 Paul Eggert <eggert@cs.ucla.edu>
5783
5784 More portability fixes for problems summarized by Nelson H. F. Beebe.
5785
5786 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
5787 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
5788 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
5789 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
5790 messes up because C++ code is compiled in 32-bit mode but linked
5791 in 64-bit mode.
5792
6fc0c024
PE
57932006-02-08 Paul Eggert <eggert@cs.ucla.edu>
5794
5795 More portability fixes for problems summarized by Nelson H. F. Beebe.
5796
7870f699
PE
5797 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
5798 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
5799
6fc0c024
PE
5800 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
5801 nodist_PROGRAMS, since we don't need to actually compile the
5802 example if we're just doing a plain 'make'. This avoids bothering
5803 the installer unnecessarily about problems due to weird C++
5804 compilers.
5805
fe6c2fde
PE
58062006-02-06 Paul Eggert <eggert@cs.ucla.edu>
5807
5808 More portability fixes for problems summarized by Nelson H. F. Beebe.
5809
5810 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
5811 than #include "...", and compile with -I'.'. The old method was
5812 not portable, according to Posix and the C standard, and it does
5813 not work with Sun C 5.7, where previous #line directives affect
5814 the working directory used in later #include "..." directives.
5815
927b425b
JMG
58162006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5817
5818 Various DJGGP specific issues in /djgpp
5819
d9735e9e
PE
58202006-02-02 Paul Eggert <eggert@cs.ucla.edu>
5821
5822 More portability fixes for problems summarized by Nelson H. F. Beebe.
5823
5824 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
5825 '#include <map>' works and that you can apply ++ to iterators.
5826
5a6755af
PE
58272006-02-01 Paul Eggert <eggert@cs.ucla.edu>
5828
67a0dc4f
PE
5829 Work around portability problems summarized by Nelson H. F. Beebe in
5830 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
5831
8c86f0ef
PE
5832 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5833 that '#include <string>' works.
5834
de35dd59
PE
5835 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
5836 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
5837 "warning: sorry: semantics of inline function static data `const
5838 unsigned char translate_table[262]' are wrong (you'll wind up with
5839 multiple copies)".
5840
67a0dc4f
PE
5841 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
5842 or, xor to not_, and_, or_, and xor_, respectively. This works
5843 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
5844 random system header somewhere that includes the equivalent of
5845 <iso646.h>.
5846
5a6755af
PE
5847 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
5848 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 5849 Suite Version 2.0.
5a6755af 5850
3f001415
JD
58512006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
5852
5853 During deterministic GLR operation, user actions should be able to
5854 influence the parse by changing yychar. To make this easier to fix and
5855 to make glr.c easier to evolve in general, don't maintain yytoken in
5856 parallel with yychar; just compute yytoken when needed.
5857 * tests/glr-regression.at (Incorrect lookahead during deterministic
5858 GLR): Check that setting yychar in a user action has the intended
5859 effect.
5860 * data/glr.c (yyGLRStack): Remove yytokenp member.
5861 (yyclearin): Don't set *yytokenp.
5862 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
5863 yychar rather than *yytokenp to determine the current lookahead.
5864 Compute yytoken locally when needed.
5865 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
5866 point to.
5867
5868 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
5869 after `--report' documentation.
5870
e2a8c0f5
PE
58712006-01-30 Paul Eggert <eggert@cs.ucla.edu>
5872
5873 * src/parse-gram.y (grammar_declaration): Location of printer
5874 symbol is @1, not list->location. Bug reported by twlevo.
5875 * tests/input.at (Incompatible Aliases): Adjust to above change.
5876
6b702268
PE
58772006-01-29 Paul Eggert <eggert@cs.ucla.edu>
5878
27622431
PE
5879 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
5880 all the test at once. This makes the output easier to read in the
5881 normal case.
5882
6b702268
PE
5883 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
5884 got from <http://bro-ids.org/download.html>. The bug is that
5885 when two actions appeared in succession, the second one was
5886 scanned before the first one was added to the grammar rule
5887 as a midrule action. Bison then output the incorrect warning
5888 "parse.y:905.17-906.36: warning: unused value: $3".
5889 * src/parse-gram.y (BRACED_CODE, action): These are no longer
5890 associated with a value.
5891 (rhs): Don't invoke grammar_current_rule_action_append.
5892 (action): Invoke it here instead.
5893 * src/reader.c (grammar_midrule_action): Now extern.
5894 (grammar_current_rule_action_append): Don't invoke
5895 grammar_midrule_action; that is now the scanner's job.
5896 * src/reader.h (last_string, last_braced_code_loc):
5897 (grammar_midrule_action): New decls.
5898 * src/scan-gram.l (last_string): Now extern, sigh.
5899 (last_braced_code_loc): New extern variable.
5900 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
5901 rule already has an action.
5902 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
5903 * tests/input.at (AT_CHECK_UNUSED_VALUES):
5904 Add some tests to check that the above changes fixed the bug.
5905
d40ba6c2
PE
59062006-01-27 Paul Eggert <eggert@cs.ucla.edu>
5907
5908 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
5909 All used changed. Check whether the symbol has a destructor,
5910 not whether it is typed.
5911 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
5912 that the values are still reported as unused. All line numbers
5913 adjusted.
5914
401aace6
PE
59152006-01-23 Paul Eggert <eggert@cs.ucla.edu>
5916
5917 Work around a bug in bro 0.8, which underparenthesizes its
5918 definition of YYLLOC_DEFAULT.
5919 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
5920 their arguments.
5921 * data/lalr1.cc: Likewise.
5922 * data/yacc.cc: Likewise.
5923
06f01bc4
PE
59242006-01-22 Paul Eggert <eggert@cs.ucla.edu>
5925
401aace6
PE
5926 Work around a bug in Pike 7.0, and give the Pike folks a
5927 better way to override the usual int widths.
5928 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
5929 user can override the types.
5930 (short): #undef, to work around a bug in Pike 7.0.
5931 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
5932 (union yyalloc.yyss): Use yytype_int16 rather than short.
5933 All uses changed.
5934 (yysigned_char): Remove.
5935 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
5936 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
5937 * tests/regression.at (Web2c Actions): Adjust to above changes.
5938
5939 * src/reader.c (check_and_convert_grammar): New function.
5940 (reader): Close the input file even if something went wrong during
5941 parsing. Minor file descriptor leak reported by twlevo.
5942
06f01bc4
PE
5943 * src/assoc.c (assoc_to_string): Use a default: abort (); case
5944 to pacify gcc -Wswitch-default.
5945 * src/scan-gram.l (adjust_location): Use a default: break; case
5946 to pacify gcc -Wswitch-default.
5947 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
5948 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
5949 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
5950 Move these decls to scan-skel.l, since they don't need to be
5951 visible elsewhere.
5952 * src/scan-skel.l: Accept the above decls.
5953 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
5954 is used.
5955
02650b7f
PE
59562006-01-21 Paul Eggert <eggert@cs.ucla.edu>
5957
5958 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
5959 since we don't want to insist on a version number at the start
5960 of the changelog every time.
5961 * Makefile.maint: Sync from coreutils a bit better.
5962 (sc_trailing_blank): Renamed from sc_trailing_space.
5963 All uses changed.
5964 (sc_no_if_have_config_h, sc_require_config_h):
5965 (sc_prohibit_assert_without_use): New rules.
5966 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
5967 (sc_dd_max_sym_length): Fix leading spaces in rule.
5968 (sc_system_h_headers): Prefix with @.
5969 (sc_useless_cpp_parens, m4-check): Output line numbers.
5970 (changelog-check): Allow version only in head.
5971 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
5972 satisfy new Makefile.maint rule.
5973 * data/glr.c: Likewise.
5974 * data/glr.cc: Likewise.
5975 * data/lalr1.cc: Likewise.
5976 * data/yacc.c: Likewise.
5977 * lib/ebitsetv.c: Likewise.
5978 * lib/lbitset.c: Likewise.
5979 * lib/subpipe.c: Likewise.
5980 * lib/timevar.c: Likewise.
5981 * src/system.h: Likewise.
5982 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
5983 * djgpp/Makefile.maint: Add copyright notice.
5984 * djgpp/README.in: Likewise.
5985 * djgpp/config.bat: Likewise.
5986 * djgpp/config.site: Likewise.
5987 * djgpp/config_h.sed: Likewise.
5988 * djgpp/djunpack.bat: Likewise.
5989 * djgpp/config.sed: Fix copyright notice to match standard format.
5990 * djgpp/subpipe.h: Likewise.
5991 * lib/bitsetv-print.c: Likewise.
5992 * lib/bitsetv.c: Likewise.
5993 * lib/subpipe.h: Likewise.
5994 * lib/timevar.c: Likewise.
5995 * lib/timevar.h: Likewise.
5996 * djgpp/subpipe.c: Use standard recipe for config.h.
5997 * lib/abitset.c: Likewise.
5998 * lib/bitset.c: Likewise.
5999 * lib/bitset_stats.c: Likewise.
6000 * lib/bitsetv-print.c: Likewise.
6001 * lib/bitsetv.c: Likewise.
6002 * lib/ebitsetv.c: Likewise.
6003 * lib/get-errno.c: Likewise.
6004 * lib/lbitset.c: Likewise.
6005 * lib/subpipe.c: Likewise.
6006 * lib/timevar.c: Likewise.
6007 * lib/vbitset.c: Likewise.
6008 * tests/local.at: Likewise.
6009 * src/scan-gram.l: Don't include verify.h, since system.h does
6010 that for us.
6011 * .x-sc_require_config_h: New file.
6012 * .x-sc_unmarked_diagnostics: New file.
6013
287c78f6
PE
60142006-01-20 Paul Eggert <eggert@cs.ucla.edu>
6015
287c78f6
PE
6016 Be a bit more systematic about using 'abort'.
6017 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
6018 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
6019 Put 'default: abort ();' before some other case, to satisfy older
6020 pedantic compilers.
6021 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6022 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
6023 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
6024 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
6025 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
6026 (get_decision_str, get_orientation_str, get_node_alignment_str):
6027 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
6028 (get_linestyle_str, get_arrowstyle_str): Likewise.
6029 * src/conflicts.c (resolve_sr_conflict):
6030 Use a default case rather than one for the one remaining enum
6031 value, to catch invalid enum values as well.
6032 * src/lalr.c (set_goto_map, map_goto):
6033 Prefer "assert (FOO);" to "if (!FOO) abort ();".
6034 * src/nullable.c (nullable_compute, token_definitions_output):
6035 Likewise.
6036 * src/reader.c (packgram, reader): Likewise.
6037 * src/state.c (transitions_to, state_new, state_reduction_find):
6038 Likewise.
6039 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
6040 (symbol_pack): Likewise.
6041 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
6042 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
6043 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
6044 * src/system.h: Don't include <assert.h>.
6045 (assert): New macro.
6046
6047 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
6048 (Destructor Decl, Parser Function, Pure Calling):
6049 Describe rules for braces inside C code more carefully.
287c78f6 6050
c66dfadd
PE
60512006-01-19 Paul Eggert <eggert@cs.ucla.edu>
6052
c21493b8
PE
6053 Fix some porting glitches found by Nelson H. F. Beebe.
6054 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
6055 compilers that don't understand that abort () does not return.
6056 * src/state.c (transitions_to): Likewise.
6057 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
6058 that '#include <cstdlib>' works.
6059 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
6060 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
6061 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
6062 for the benefit of some pre-C99 compilers.
6063
b6e3facf
PE
6064 * bootstrap: Undo changes to gnulib files that autoreconf made.
6065
c66dfadd
PE
6066 Minor fixups to get 'make maintainer-check' to work.
6067 * configure.ac: Don't use -Wnested-externs, as it's incompatible
6068 with the new verify.h implementation.
6069 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
6070 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
6071 * data/yacc.c (YYUSE): Likewise.
6072 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
6073 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
6074 * src/parse-gram.y (declaration): Don't pass a string constant
6075 to a function that expects char *, since GCC might complain
6076 about the constant value.
6077 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
6078 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
6079 before #defining them.
6080 * tests/glr-regression.at
6081 (Incorrectly initialized location for empty right-hand side in GLR):
6082 In yyerror, use the msg arg.
6083 (Corrupted semantic options if user action cuts parse):
6084 (Incorrect lookahead during deterministic GLR):
6085 (Incorrect lookahead during nondeterministic GLR):
6086 Don't name a local var 'index'; it shadows string.h's 'index'.
6087
ed94ef2a
AD
60882006-01-19 Akim Demaille <akim@epita.fr>
6089
6090 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
6091 location, not just parts of it.
6092
e9ad4aec
PE
60932006-01-18 Paul Eggert <eggert@cs.ucla.edu>
6094
d6ca7905
PE
6095 * NEWS: Document the fact that multiple %unions are now allowed.
6096 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
6097 * TODO: This feature is now implemented, so remove it from
6098 the wishlist.
d6ca7905 6099
ef1b70e0
PE
6100 * Makefile.maint: Merge with coreutils Makefile.maint.
6101 (CVS_LIST): Use build-aux version if available.
6102 (VERSION_REGEXP): New macro.
6103 (syntax-check-rules): Add sc_no_if_have_config_h,
6104 sc_prohibit_assert_without_use, sc_require_config_h,
6105 sc_useless_cpp_parens.
6106 (sc_obsolete_symbols): Check for O_NDELAY.
6107 (sc_dd_max_sym_length): Track coreutils.
6108 (sc_unmarked_diagnostics): Look in all files, not just *.c.
6109 (sc_useless_cpp_parens): New rule.
6110 (news-date-check): Look for version or today's date.
6111 (changelog-check): Don't require version number near head.
6112 (copyright-check): Use current year instead of hardwiring 2005.
6113 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
6114 (announcement): Add --gpg-key-ID.
6115
6116 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
6117 with "file system".
6118
2073ce56 6119 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
6120 array. Problem reported by twlevo.
6121 * src/reader.c (packgram): Prepend a new sentinel before ritem.
6122 * src/lalr.c (build_relations): Rely on new sentinel.
6123 * src/gram.c (gram_free): Adjust to new sentinel.
6124
b7691f15
JD
61252006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
6126
6127 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
6128 yylookaheadNeeds. All uses updated.
6129 (yysplitStack): Rename local yynewLookaheadStatuses to
6130 yynewLookaheadNeeds.
6131 * data/glr-regression.at (Incorrect lookahead during nondeterministic
6132 GLR): In comments, change `lookahead status' to `lookahead need'.
6133
ddee1b06
PH
61342006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6135
6136 * data/glr.c (yysplitStack): A little stylistic rewrite.
6137
12f4614d
PH
61382006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6139
6140 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
6141
32c29292
JD
61422006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
6143
6144 * doc/bison.texinfo: Fix some typos.
6145 (GLR Semantic Actions): New subsection discussing special
6146 considerations because GLR semantic actions might be deferred.
6147 (Actions): Mention look-ahead usage of yylval.
6148 (Actions and Locations): Mention look-ahead usage of yylloc.
6149 (Special Features for Use in Actions): Add YYEOF entry and mention it
6150 in the yychar entry.
6151 In the yychar entry, remove mention of the local yychar case (pure
6152 parser) since this is irrelevant information when writing semantic
148d66d8 6153 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
6154 yychar is otherwise described as an external variable.
6155 In the yychar entry, don't call it the `current' look-ahead since it
6156 isn't when semantic actions are deferred.
6157 In the yychar and yyclearin entries, add note about deferred semantic
6158 actions.
6159 Add yylloc and yylval entries discussing look-ahead usage.
6160 (Look-Ahead Tokens): When discussing yychar, don't call it the
6161 `current' look-ahead, and do mention yylval and yylloc.
6162 (Error Recovery): Cross-reference `Action Features' when mentioning
6163 yyclearin.
148d66d8 6164 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
6165 look-ahead.
6166 In the yylloc and yylval entries, mention look-ahead usage.
6167
de366a2f 61682006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
6169
6170 * tests/glr-regression.at: Update copyright year to 2006.
6171
bf70fa87
JD
61722006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6173
6174 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
6175 use during nondeterministic operation to track which stacks have
6176 actually needed the current lookahead.
6177 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
6178 Allocate, deallocate, resize, and otherwise shuffle space for
6179 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
6180 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
6181 appropriately during nondeterministic operation.
6182 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
6183 members to store the current lookahead to be used by the deferred
6184 user action.
6185 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
6186 from which the RHS is taken. Set the lookahead members of the new
6187 yySemanticOption according to the lookahead status for stack yyk.
6188 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
6189 yyaddDeferredAction.
6190 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
6191 members of yySemanticOption before invoking yyuserAction, and then set
6192 them back to their current values afterward.
6193 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
6194 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
6195 * tests/glr-regression.at: Remove `.' from the ends of recent test case
6196 titles for consistency.
6197 (Leaked merged semantic value if user action cuts parse): In order to
6198 suppress lint warnings, use arguments in merge function, and assign
6199 char value < 128 in main.
6200 (Incorrect lookahead during deterministic GLR): New test case.
6201 (Incorrect lookahead during nondeterministic GLR): New test case.
6202
05449a2c
JD
62032006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6204
de366a2f 6205 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
6206 !yyvaluep as signal that no semantic value is available to print.
6207 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
6208 to print a semantic value.
6209
4158e0a1 62102006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 6211
4158e0a1
JD
6212 * tests/glr-regression.at: For consistency with my newer test cases,
6213 don't thank myself.
6214
d659304d
JD
62152006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
6216
6217 * data/glr.c (yyresolveValue): When merging semantic options, if at
6218 least one user action succeeds but a later one cuts the parse, then
6219 destroy the semantic value before returning rather than leaking it.
6220 (yyresolveStates): If a user action cuts the parse and thus
6221 yyresolveValue fails, ignore the (unset) semantic value rather than
6222 corrupting the yyGLRState, and empty the semantic options list since
6223 the user actions should have called all necessary destructors.
6224 Simplify code with YYCHK.
6225 * tests/glr-regression.at (Corrupted semantic options if user action
6226 cuts parse): New test case.
6227 (Undesirable destructors if user action cuts parse): New test case.
6228 Before applying any of this patch, this test case never actually failed
6229 for me... but only because the corrupted semantic options usually
6230 masked this bug.
6231 (Leaked merged semantic value if user action cuts parse): New test
6232 case.
6233
6ec2c0f2
AD
62342006-01-05 Akim Demaille <akim@epita.fr>
6235
6236 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
6237
1b9c21fb
PE
62382006-01-04 Paul Eggert <eggert@cs.ucla.edu>
6239
6240 * data/c.m4 (b4_c_modern): New macro, with a new provision for
6241 _MSC_VER. Problem reported by Cenzato Marco.
6242 (b4_c_function_def): Use it.
6243 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
6244 b4_c_modern.
6245 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
6246 than rolling our own.
6247
84866159
AD
62482006-01-04 Akim Demaille <akim@epita.fr>
6249
6250 Also warn about non-used mid-rule values.
6251 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
6252 member.
6253 (symbol_list_new): Adjust.
6254 * src/reader.c (symbol_typed_p): New.
6255 (grammar_rule_check): Use it.
6256 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
6257 Check its rule.
6258 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
6259 Use it.
6260 * tests/actions.at (Exotic Dollars): Adjust.
6261
378f4bd8
AD
62622006-01-04 Akim Demaille <akim@epita.fr>
6263
6264 * src/reader.c (grammar_midrule_action): If $$ is set in a
6265 mid-rule, move the `used' bit to its lhs.
6266 * tests/input.at (Unused values): New.
6267 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
6268
e2a21b6f
PE
62692006-01-03 Paul Eggert <eggert@cs.ucla.edu>
6270
54662697
PE
6271 * doc/bison.texinfo (Bison Options): Say more accurately what
6272 --yacc does.
6273 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
6274 about declarations in the grammar when in Yacc mode, as POSIX does
6275 not require a diagnostic when the grammar uses extensions.
6276
6277 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
6278
073f9288
PE
6279 Warn about dubious constructions like "%token T T".
6280 Reported by twlevo.
6281 * src/symtab.h (struct symbol.declared): New member.
6282 * src/symtab.c (symbol_new): Initialize it to false.
6283 (symbol_class_set): New arg DECLARING, specifying whether
6284 this is a declaration that we want to warn about, if there
6285 is more than one of them. All uses changed.
6286
1221b78a
PE
6287 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
6288 Allow multiple %union directives, whose contents concatenate.
6289 * src/parse-gram.y (grammar_declaration): Likewise.
6290 Use muscle_code_grow, so that we don't need stype_line any more.
6291 All uses changed.
6292
6293 * src/muscle_tab.c (muscle_grow): Fix comment.
6294
e2a21b6f
PE
6295 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
6296 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
6297 Update copyright year to 2006.
6298
8f7e3cf9
AD
62992006-01-03 Akim Demaille <akim@epita.fr>
6300
6301 Have glr.cc pass (some of) the calc.at tests.
6302 * data/glr.cc (b4_parse_param_orig): New.
6303 (b4_parse_param): Improve its definition, and bound it more
6304 clearly in the skeleton.
6305 (b4_epilogue): Append, instead of prepending, in order to keep
6306 #line consistency.
6307 Simplify the generation of auxiliary functions: locations and
6308 purity are mandated.
6309 (b4_global_tokens_and_yystype): Honor it.
6310 * data/location.cc (c++.m4): Don't include it.
6311 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
6312 and AT_SKEL_CC_IF.
6313 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
6314 AT_LALR1_CC_IF.
6315 Be sure to initialize the first position's filename.
6316 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
6317 mandated anyway.
6318 (AT_CHECK_CALC_GLR_CC): New.
6319 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
6320
3953ed88
AD
63212006-01-02 Akim Demaille <akim@epita.fr>
6322
6323 * src/output.c (output_skeleton): Don't hard wire the inclusion of
6324 c.m4.
0a96ba81 6325 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
6326 * data/glr.cc: Do not include stack.hh.
6327
9ecafbbf
AD
63282006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6329
6330 * data/glr.c: Reformat whitespace with tabs.
6331 (b4_lpure_formals): Remove this unused m4 macro.
6332 * tests/cxx-type.at: Reformat whitespace with tabs.
6333 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
6334 since it's a member. Rename type to isNterm for clarity.
6335
c4d497a0
AD
63362005-12-29 Akim <akim@sulaco.local>
6337
6338 Let glr.cc catch up with symbol_value_print.
6339 * data/glr.cc (b4_yysymprint_generate): Replace by...
6340 (b4_yy_symbol_print_generate): this.
6341 (yy_symbol_print, yy_symbol_value_print): Declare them.
6342
4517da37
PE
63432005-12-28 Paul Eggert <eggert@cs.ucla.edu>
6344
6345 * src/location.h (boundary): Note that a line or column equal
6346 to INT_MAX indicates an overflow.
6347 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
6348 (rule_length_overflow, increment_rule_length, add_column_width):
6349 New functions.
6350 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
6351 (<SC_BRACED_CODE>"}"):
6352 Use increment_rule_length rather than incrementing it by hand.
6353 (adjust_location, handle_syncline): Diagnose overflow.
6354 (handle_action_dollar, handle_action_at):
6355 Fix bug with monstrosities like $-2147483648.
6356 Remove now-unnecessary checks.
6357 (scan_integer): Verify assumptions and remove now-unnecessary checks.
6358 (convert_ucn_to_byte): Verify assumptions.
6359 (handle_syncline): New arg LOC. All callers changed.
6360 Don't store through a value derived from char const * pointer.
6361
6362 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
6363 GCC warnings.
6364
e3233bf6
PE
63652005-12-27 Paul Eggert <eggert@cs.ucla.edu>
6366
6367 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
6368 Remove unnecessary forward static decls.
6369
8f3596a6
AD
63702005-12-27 Akim Demaille <akim@epita.fr>
6371
6372 * src/reader.c (grammar_current_rule_check): Also check that $$
6373 is used.
6374 Take the rule to check as argument, hence rename as...
6375 (grammar_rule_check): this.
6376 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
6377 Rename as...
6378 (grammar_rule_begin, grammar_rule_end): these, for consistency.
6379 (grammar_midrule_action, grammar_symbol_append): Now static.
6380 * tests/torture.at (input): Don't rely on the default action
6381 being always performed.
6382 * tests/calc.at: "Set" $$ even when the action is "cut" with
6383 YYERROR or other.
6384 * tests/actions.at (Exotic Dollars): Instead of using unused
6385 values, check that the warning is issued.
6386
721be13c
PE
63872005-12-22 Paul Eggert <eggert@cs.ucla.edu>
6388
6389 * NEWS: Improve wording for unused-value warnings.
6390
a0af42fc
AD
63912005-12-22 Akim Demaille <akim@epita.fr>
6392
6393 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
6394 (b4_yysymprint_generate): Rename as...
6395 (b4_yy_symbol_print_generate): this.
6396 Generate yy_symbol_print instead of yysymprint.
6397 Generate also yy_symbol_value_print, and use it.
6398
affac613
AD
63992005-12-22 Akim Demaille <akim@epita.fr>
6400
721be13c 6401 * NEWS: Warn about unused values.
affac613
AD
6402 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
6403 a `used' member.
6404 (symbol_list_n_get, symbol_list_n_used_set): New.
6405 (symbol_list_n_type_name_get): Use symbol_list_n_get.
6406 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
6407 * src/reader.c (grammar_current_rule_check): Check that values are
6408 used.
6409 * src/symtab.c (symbol_print): Accept 0.
6410 * tests/existing.at: Remove the type information.
6411 Empty the actions.
6412 Remove useless actions (beware of mid-rule actions: perl -000
6413 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
6414 * tests/actions.at (Exotic Dollars): Use unused values.
6415 * tests/calc.at: Likewise.
6416 * tests/glr-regression.at (No users destructors if stack 0 deleted):
6417 Likewise.
6418
6419 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
6420 rule_useful_p.
6421
9d9b8b70
PE
64222005-12-21 Paul Eggert <eggert@cs.ucla.edu>
6423
8bb4c753
PE
6424 Undo 2005-12-01 tentative license wording change. The wording is
6425 still being reviewed by the lawyers, and we don't want to wait for
6426 them before publishing a test release. For now, revert to the
6427 previous wording.
6428 * NEWS: Undo 2005-12-01 change.
6429 * data/glr.c: Revert to previous license wording.
6430 * data/glr.cc: Likewise.
6431 * data/lalr1.cc: Likewise.
6432 * data/location.cc: Likewise.
6433 * data/yacc.c: Likewise.
6434
9d9b8b70
PE
6435 * NEWS: Reword %destructor vs YYABORT etc.
6436 * data/glr.c: Use American spacing, for consistency.
6437 * data/glr.cc: Likewise.
6438 * data/lalr1.cc: Likewise.
6439 * data/yacc.c: Likewise.
6440 * data/yacc.c: Reformat comments slightly.
6441 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
6442 for consistency. Fix some spelling errors and reword recently-included
6443 text slightly.
6444 * tests/cxx-type.at: Cast results of malloc, for C++.
6445
2c3b392a
AD
64462005-12-21 Joel E. Denny <address@hidden>
6447
6448 * tests/cxx-type.at: Construct a tree, count the parents of shared
6449 nodes, and free each node once and only once. Previously, the memory
6450 for semantic values was leaked instead.
6451
d6cff4dc
AD
64522005-12-21 Joel E. Denny <address@hidden>
6453
6454 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
6455 (yylval, yylloc): If pure, #define to yystackp->yyval and
6456 yystackp->yyloc similar to yychar and yynerrs.
6457 (yyparse): If pure, remove local yylval and yylloc. Add local
6458 yystackp to accommodate pure definitions of yylval and yylloc.
6459 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
6460 yylvalp and yyllocp to &yylval and &yylloc.
6461 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
6462 namespace. Previously, nerrs and char were missing, but lval and lloc
6463 weren't necessary.
6464 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
6465 yylvalp and yyllocp parameters since, if pure, these are now always
6466 accessible through yystackp. If not pure, they are still accessible
6467 globally.
6468 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
6469 `if (YYID (N))' to pacify lint.
6470
a85284cf
AD
64712005-12-21 Akim Demaille <akim@epita.fr>
6472
6473 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
6474 destroy the RHS symbols of a rule.
6475 * data/yacc.c (yylen): Initialize to 0.
6476 Keep its value to the number of items to possibly shift.
6477 In particular, a regular successful parse that ends on YYFINAL by
6478 a (internal) YYACCEPT must not have yylen != 0.
6479 (yyerrorlab, yyreturn): Pop the RHS.
6480 Reorder a bit to emphasize the `shifting' bits of code.
6481 (YYPOPSTACK): Now accept a number of items to pop.
6482 * data/lalr1.cc: Likewise.
6483 * data/glr.c: Formatting changes.
6484 Use goto instead of fall through.
6485 * doc/bison.texinfo (Destructor Decl): Complete.
6486
d508c281
JMG
64872005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6488
6489 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6490 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
6491 * djgpp/config.bat: Replace every occurence of the file name
6492 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
6493 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
6494 * djgpp/config.sed: Replace every occurence of the file name
6495 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
6496 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
6497 * djgpp/djunpack.bat: DJGPP specific file.
6498 * djgpp/fnchange.lst: DJGPP specific file.
6499 * djgpp/README.in: Add new information about how to unpack the bison
6500 source on MSDOS and other systems which have 8.3 file name restrictions
6501 using djunpack.bat and fnchange.lst.
6502
3e7a2cd9
PE
65032005-12-12 Paul Eggert <eggert@cs.ucla.edu>
6504
6505 * bootstrap (build_cvs_prefix): Remove; unused.
6506 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
6507 when getting gnulib.
6508
65092005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
6510
6511 * data/glr.c: Reorder typedef declarations for structs to match order
6512 of struct declarations.
6513 Rename yystack everywhere to yystackp except in yyparse where it's not
6514 a pointer.
6515 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
6516 consistency.
6517 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
6518 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
6519 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
6520 lint.
6521
877519f8
PE
65222005-12-09 Paul Eggert <eggert@cs.ucla.edu>
6523
0eca5a39
PE
6524 * tests/sets.at (Accept): Fix typos in regular expression used to
6525 sed out the final state number.
6526
2cec9080
PE
6527 Work around portability problem on Solaris 10: flex-generated
6528 files include <stdio.h> before <config.h>, which messes up
6529 because the latter defines __EXTENSIONS__. Address the problem
6530 by creating two new little files that include <config.h> first,
6531 then include the flex-generated files. Rewrite everyone else
6532 to include <config.h> first, as well.
6533 * lib/timevar.c: Always include "config.h".
6534 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
6535 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
6536 (EXTRA_bison_SOURCES): New macro.
6537 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
6538 * src/system.h: Don't include config.h.
6539 * src/LR0.c: Include <config.h> first.
6540 * src/assoc.c: Likewise.
6541 * src/closure.c: Likewise.
6542 * src/complain.c: Likewise.
6543 * src/conflicts.c: Likewise.
6544 * src/derives.c: Likewise.
6545 * src/files.c: Likewise.
6546 * src/getargs.c: Likewise.
6547 * src/gram.c: Likewise.
6548 * src/lalr.c: Likewise.
6549 * src/location.c: Likewise.
6550 * src/main.c: Likewise.
6551 * src/muscle_tab.c: Likewise.
6552 * src/nullable.c: Likewise.
6553 * src/output.c: Likewise.
6554 * src/parse-gram.y: Likewise.
6555 * src/print.c: Likewise.
6556 * src/print_graph.c: Likewise.
6557 * src/reader.c: Likewise.
6558 * src/reduce.c: Likewise.
6559 * src/relation.c: Likewise.
6560 * src/state.c: Likewise.
6561 * src/symlist.c: Likewise.
6562 * src/symtab.c: Likewise.
6563 * src/tables.c: Likewise.
6564 * src/uniqstr.c: Likewise.
6565 * src/vcg.c: Likewise.
6566
877519f8
PE
6567 * src/parse-gram.y: Fix minor problems uncovered by lint.
6568 (current_lhs, current_lhs_location): Now static.
6569 (current_assoc): Remove unused variable.
6570
6571 Cleanups so that Bison-generated parsers have less lint.
6572 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
6573 Prepend /*ARGSUSED*/, for lint's sake.
6574 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
6575 definition if 'lint' is defined.
6576 (YYID): New macro (or function, if lint).
6577 All uses of /*CONSTCOND*/0 replaced by YYID(0).
6578 * data/yacc.c: Likewise.
6579 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
6580 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
6581 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
6582 is C++ only.
6583 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
6584 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
6585 Use YYID(0) rather than 0, for lint.
6586 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
6587 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
6588
f5228370
PE
65892005-12-07 Paul Eggert <eggert@cs.ucla.edu>
6590
6591 * tests/glr-regression.at
6592 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6593 Close memory leak reported by twlevo.
6594
69ce078b
PE
65952005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
6596
6ff99711
PE
6597 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
6598 all stacks.
6599 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
6600 * tests/glr-regression.at (No users destructors if stack 0 deleted):
6601 New test case.
6602 (Duplicated user destructor for lookahead): This test now is expected
6603 to succeed.
6604
af3412cd
PE
66052005-12-01 Paul Eggert <eggert@cs.ucla.edu>
6606
32b5b719 6607 * NEWS: Document the following change.
af3412cd
PE
6608 * data/yacc.c: Say "parser skeleton" rather than "file", since
6609 it's no longer just a file.
6610 * data/glr.c: Grant a special exception for C GLR parsers, that
6611 reads like the already-existing exception for C LALR(1) parsers.
6612 * data/glr.cc: Likewise.
6613 * data/lalr1.cc: Likewise.
6614 * data/location.cc: Likewise.
6615 * data/yacc.c: Reword the "written by" statement to clarify that
6616 it was the parser skeleton, not the entire output file.
6617 * data/glr.c: Written by Paul Hilfinger.
6618 * data/glr.cc: Written by Akim Demaille.
6619 * data/lalr1.cc: Likewise.
6620
035aa4a0
PE
66212005-11-18 Paul Eggert <eggert@cs.ucla.edu>
6622
d9963c85
PE
6623 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
6624 Fix typos in previous change that broke 'make check'.
6625 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
6626 supported in C.
6627 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
6628 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
6629 We can revert this once things settle down.
6630
035aa4a0
PE
6631 * src/conflicts.c (conflicts_print): Don't print file name twice
6632 when %expect fails because there were no conflicts.
6633 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
6634 change.
6635 * tests/conflicts.at (%expect not enough, %expect too much):
6636 (%expect with reduce conflicts): Adjust to new behavior.
6637
66382005-11-18 Akim Demaille <akim@epita.fr>
6639
6640 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
6641 errors.
6642 * NEWS: Document this.
6643 * doc/bison.texinfo (Expect Decl): Likewise.
6644
d1ff7a7c
AD
66452005-11-16 Akim Demaille <akim@epita.fr>
6646
6647 Generalize the display of semantic values and locations in traces.
6648 * data/glr.c (yy_reduce_print): Fix indices (again).
6649 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
6650 literal integers.
6651 * data/lalr1.cc (yyreduce_print): Rename as...
6652 (yy_reduce_print): this.
6653 Display values and locations.
6654 * data/yacc.c (yy_reduce_print): Likewise.
6655 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
6656 (yysymprint): Move higher to be visible from yy_reduce_print).
6657 (yyparse): Adjust.
6658 * tests/calc.at: Adjust the expected length of the traces.
6659
6de5398d
AD
66602005-11-14 Akim Demaille <akim@epita.fr>
6661
6662 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
6663 from 1 to N, while values and location start at 0.
6664 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
6665
a1373f55
AD
66662005-11-14 Akim Demaille <akim@epita.fr>
6667
6668 * data/glr.c (yy_reduce_print): Fix the $ number.
6669
613d8952
AD
66702005-11-14 Akim Demaille <akim@epita.fr>
6671
6672 "Use" parse parameters.
6673 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
6674 * data/glr.c, data/glr.cc: Use them.
6675 * data/glr.c (YYUSE): Have a C++ definition that supports
6676 non-pointer types.
6677
b2741627
AD
66782005-11-14 Akim Demaille <akim@epita.fr>
6679
6680 * data/glr.c (yyexpandGLRStack): Declare only if defined.
6681
5059b5c8
AD
66822005-11-14 Akim Demaille <akim@epita.fr>
6683
42249483
AD
6684 * data/glr.cc: New.
6685 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 6686
4626a15d
AD
66872005-11-12 Akim Demaille <akim@epita.fr>
6688
6689 Let position and location be PODs.
6690 * data/location.cc (position::initialize, location::initialize): New.
6691 (position::position, location::location): Define only if
6692 b4_location_constructors is defined.
6693 * data/lalr1.cc (b4_location_constructors): Define it for backward
6694 compatibility.
6695 * doc/bison.texinfo (Initial Action Decl): Use initialize.
6696
66972005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
6698
6699 * data/lalr1.cc: Move the body of the ctor and dtor into the
6700 parser file (instead of the header).
6701 Wrap the implementations in a "namespace yy".
6702
67032005-11-12 Akim Demaille <akim@epita.fr>
6704
6705 Have glr.c include its header file when created.
6706 * data/glr.c (b4_shared_declarations): New.
6707 Output them verbatim in the parser if !%defines, otherwise
6708 output then in the header file, and include it instead.
6709
1989d947
AD
67102005-11-11 Akim Demaille <akim@epita.fr>
6711
6712 * data/glr.c: Comment changes.
6713
67142005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
6715
6716 When yydebug, report semantic and location values for reductions.
6717 * data/glr.c (yy_reduce_print): Report the semantic values and the
6718 locations.
6719 (YY_REDUCE_PRINT): Adjust.
6720 (yyglrReduce): Use them.
6721 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
6722 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
6723 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
6724 traces.
6725
02998094
AD
67262005-11-10 Akim Demaille <akim@epita.fr>
6727
6728 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
6729 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
6730 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
6731
5210672f
PE
67322005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
6733
6734 * m4/cxx.m4, examples/Makefile.am: Don't build
6735 examples/calc++ if no C++ compiler is available. (trivial change)
6736
a8991a1d
AD
67372005-11-09 Akim Demaille <akim@epita.fr>
6738
6739 * src/scan-skel.l: Use a couple of asserts.
6740
36b5e963
AD
67412005-11-03 Akim Demaille <akim@epita.fr>
6742
6743 In some (weird) cases, the final state number is incorrect.
6744 Reported by Alexandre Duret-Lutz.
6745 * src/LR0.c (state_list_append): Remove the computation of
6746 final_state.
6747 (save_reductions): Do it here.
6748 (get_state): Alpha conversion.
6749 (generate_states): Use a for loop.
6750 * src/gram.h (item_number_is_rule_number)
6751 (item_number_is_symbol_number): New.
6752 * src/state.c: Use assert.
6753 * src/system.h: Include assert.h.
6754 * tests/sets.at (Accept): New.
6755
44e7ead1
PH
67562005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6757
6758 * data/glr.c (yyfill): Adjust comment.
36b5e963 6759 (yyresolveAction): Initialize default location properly
44e7ead1
PH
6760 for empty right-hand sides.
6761 (yydoAction): Ditto.
6762 Add comment explaining apparently dead code.
36b5e963
AD
6763 * tests/glr-regression.at
6764 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 6765 New test.
36b5e963 6766
e10a80ee
PE
67672005-10-30 Paul Eggert <eggert@cs.ucla.edu>
6768
6769 * bootstrap (cleanup_gnulib): New function. Use it to clean up
6770 gnulib when interrupted. This fixes some race conditions and
6771 works around some portability problems (one noted by Paul
6772 Hilfinger).
6773
067b32ee
AD
67742005-10-22 Akim <akim@epita.fr>
6775
6776 * Makefile.cfg: Adjust to config -> build-aux.
6777 Reported by twledo.
6778
4b367315
AD
67792005-10-21 Akim Demaille <akim@epita.fr>
6780
6781 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
6782 the %parse-params.
6783 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
6784 * data/yacc.c (b4_Pure_if): Rename as...
6785 (b4_yacc_pure_if): this.
6786 (YY_SYMBOL_PRINT, yyparse): Adjust.
6787 * doc/bison.texinfo: Formatting changes.
6788
24cc23d9
AD
67892005-10-21 Akim Demaille <akim@epita.fr>
6790
6791 Finish the transition config -> build-aux.
6792 * configure.ac, Makefile.am: Use build-aux.
6793 * config/prev-version, config/announce-gen, config/Makefile.am:
6794 Move to...
6795 * build-aux/prev-version, build-aux/announce-gen,
6796 * build-aux/Makefile.am: here.
6797
d4476375
AD
67982005-10-14 Akim Demaille <akim@epita.fr>
6799
6800 * examples/calc++/test: Use set -x only when VERBOSE.
6801
302c0aee
PE
68022005-10-13 Paul Eggert <eggert@cs.ucla.edu>
6803
6804 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
6805 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
6806
7625ec2c
AD
68072005-10-13 Akim Demaille <akim@epita.fr>
6808
6809 * src/scan-skel.l: Output the base name parts of the parser and
6810 header file names.
302c0aee 6811 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
6812 additional checks.
6813 Use this to exercise C++ outputs in subdirs.
6814 Reported by Oleg Smolsky.
6815
ba0fe3c7
PE
68162005-10-12 Paul Eggert <eggert@cs.ucla.edu>
6817
6818 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
6819 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
6820 Problem reported by John P. Hartmann.
6821 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
6822 already defined it.
6823
9b8a5ce0
AD
68242005-10-12 Akim Demaille <akim@epita.fr>
6825
6826 * src/parse-gram.y (version_check): Exit 63 to please missing
6827 (stands for "version mismatch).
6828 * tests/input.at, doc/bison.texinfo: Adjust.
6829
4f6e011e
PE
68302005-10-10 Paul Eggert <eggert@cs.ucla.edu>
6831
6832 Work around portability problems with Visual Age C compiler
6833 (xlc and xlC_r) reported by John P. Hartmann.
6834 * data/location.cc (initial_column, initial_line): Remove.
6835 All uses replaced by 0 and 1.
6836 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
6837 that xlc complains about.
6838 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 6839 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 6840 as __STDC__.
4d7aa45e
PE
6841 * data/yacc.c (YYMODERN_C): New macro, which also looks at
6842 __STDC_VERSION__. Use it everywhere instead of looking at
6843 __STDC__ and __cplusplus.
4f6e011e 6844
a1b3bf8c
AD
68452005-10-10 Akim Demaille <akim@epita.fr>
6846
6847 * examples/calc++/test: Be quiet unless VERBOSE.
6848
412e44aa
PE
68492005-10-05 Paul Eggert <eggert@cs.ucla.edu>
6850
2a4647a3
PE
6851 * data/c.m4 (yydestruct, yysymprint):
6852 Use YYUSE instead of casting to void.
6853 * data/glr.c (YYUSE): New macro.
6854 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6855 Use it instead of rolling our own.
6856 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6857 (YYCHK1):
6858 Use /*CONSTCOND*/ to suppress lint warnings.
6859 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6860 (YY_STACK_PRINT): Use 'false' not '0'.
6861 (YYUSE): New macro.
6862 (yysymprint_, yydestruct_): Use it instead of rolling our own.
6863 * data/yacc.c (YYUSE): New macro.
6864 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
6865 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
6866 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
6867
6868
412e44aa
PE
6869 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
6870 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
6871
88c6637f
PE
68722005-10-04 Paul Eggert <eggert@cs.ucla.edu>
6873
2f4f028d
PE
6874 Undo the parts of the unlocked-I/O change that substituted
6875 putc or puts for printf. This might hurt performance a bit,
6876 but some people prefer the printf style.
6877 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
6878 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
6879 All uses replaced by YYFPRINTF and YYDPRINTF.
6880 * data/yacc.c: Likewise.
6881 * lib/bitset.c (bitset_print): Likewise.
6882 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
6883 putc and puts.
6884 * lib/lbitset.c (debug_lbitset): Likewise.
6885 * src/closure.c (print_firsts, print_fderives): Likewise.
6886 * src/gram.c (grammar_dump): Likewise.
6887 * src/lalr.c (look_ahead_tokens_print): Likewise.
6888 * src/output.c (escaped_output): Likewise.
6889 (user_actions_output): Break apart two printfs.
6890 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
6891 * src/reduce.c (reduce_print): Likewise.
6892 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
6893 * src/system.h: Include unlocked-io.h rathe than stdio.h.
6894
88c6637f
PE
6895 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6896 Use assignments rather than casts-to-void to suppress
6897 unused-variable warnings. This pacifies 'lint'.
6898 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
6899 unused-variable warnings.
6900
fb32e373
JMG
69012005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6902
6903 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6904
edb8f44f
PE
69052005-10-02 Paul Eggert <eggert@cs.ucla.edu>
6906
fb9c0b33
PE
6907 Use unlocked I/O for a minor performance improvement on hosts like
6908 GNU/Linux and Solaris that support unlocked I/O. The basic idea
6909 is to use the gnlib unlocked-io module, and to prefer putc and
6910 puts to printf when either will work (since the latter doesn't
6911 come in an unlocked flavor).
6912 * bootstrap (gnulib_modules): Add unlocked-io.
6913 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
6914 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
6915 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
6916 and similarly for puts and putc and printf.
6917 * data/yacc.c: Likewise.
6918 * lib/bitset.c (bitset_print): Likewise.
6919 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
6920 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
6921 to printf.
6922 * lib/lbitset.c (debug_lbitset): Likewise.
6923 * src/closure.c (print_firsts, print_fderives): Likewise.
6924 * src/gram.c (grammar_dump): Likewise.
6925 * src/lalr.c (look_ahead_tokens_print): Likewise.
6926 * src/output.c (escaped_output): Likewise.
6927 (user_actions_output): Coalesce two printfs.
2f4f028d 6928 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
6929 * src/reduce.c (reduce_print): Likewise.
6930 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 6931 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 6932
edb8f44f
PE
6933 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
6934 this confuses xgettext.
6935
b50d2359
AD
69362005-10-02 Akim Demaille <akim@epita.fr>
6937
6938 * bootstrap (gnulib_modules): Add strverscmp.
6939 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
6940 * m4/.cvsignore: Add strverscmp.m4.
6941 * src/parse-gram.y (%require): New token, new rule.
6942 (version_check): New.
6943 * src/scan-gram.l (%require): Adjust.
6944 * tests/input.at (AT_REQUIRE): New.
6945 Use it.
6946 * doc/bison.texinfo (Require Decl): New.
6947 (Calc++ Parser): Use %require.
6948
21667f64
AD
69492005-10-02 Akim Demaille <akim@epita.fr>
6950
6951 * data/location.cc: New.
6952
2b81e969
AD
69532005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
6954 Akim Demaille <akim@epita.fr>
6955
6956 Make sure -odir/foo.cc creates dir/location.hh etc.
6957 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
6958 (spec_file_prefix, spec_verbose_file, spec_graph_file)
6959 (spec_defines_file): Now const.
6960 (dir_prefix): New.
6961 (short_base_name): Remove.
6962 * src/files.c: Adjust.
6963 (dirname.h): Include.
6964 (base_name): Don't prototype it.
6965 (finput): Remove, duplicates gram_in.
6966 (full_base_name, short_base_name): Replace by...
6967 (all_but_ext, all_but_tab_ext): these.
6968 (compute_base_names): Rename as...
6969 (compute_file_name_parts): this.
6970 Update to compute the new variables, including dir_prefix.
6971 Adjust dependencies.
6972 * src/output.c (prepare): Output them.
6973 * src/reader.c: Adjust to use gram_in, not finput.
6974 * src/scan-skel.l (@dir_prefix@): New.
6975
ad6a9b97
JMG
69762005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6977
6978 * lib/subpipe.c: New function end_of_output_subpipe() added
6979 to allow support for non-posix systems. This is a no-op function
6980 for posix systems.
6981
6982 * lib/subpipe.h: New function end_of_output_subpipe() added
6983 to allow support for non-posix systems. This is a no-op function
6984 for posix systems.
6985
6986 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
6987 handle the lack of pipe/fork functionality on non-posix systems.
6988
6989 * djgpp/Makefile.maint: DJGPP specific file.
6990
6991 * djgpp/README.in: DJGPP specific file.
6992
6993 * djgpp/config.bat: DJGPP specific configuration file.
6994
6995 * djgpp/config.sed: DJGPP specific configuration file.
6996
6997 * djgpp/config.site: DJGPP specific configuration file.
6998
6999 * djgpp/config_h.sed: DJGPP specific configuration file.
7000
7001 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
7002
7003 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
7004
fc695704
AD
70052005-10-02 Akim Demaille <akim@epita.fr>
7006
7007 * data/location.cc: New, extract from...
7008 * data/lalr1.cc: here.
7009 (location.hh): Include it after the user prologue, in case the
7010 filename type is defined by the user.
7011 Forward declation location and position before the pre-prologue.
7012 (yyresult_): Rename as...
7013 (yyresult): this, it's a local variable, not an attribute.
7014 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
7015
70162005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
7017
7018 * examples/extexi: Restore the #line generation.
7019
fb9712a9
AD
70202005-09-30 Akim Demaille <akim@epita.fr>,
7021 Alexandre Duret-Lutz <adl@gnu.org>
7022
7023 Move the token type and YYSTYPE in the parser class.
7024 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
7025 (parser::token): New, from the moved free definition of tokens.
7026 (parser::semantic_value): Now a full definition instead of an
7027 indirection to YYSTYPE.
7028 (b4_post_prologue): No longer included in the header file, but
7029 in the implementation file.
7030 * doc/bison.texi (C+ Language Interface): Update.
7031 * src/parse-gram.y: Support unary %define.
7032 * tests/actions.at: Define global_tokens_and_yystype for backward
7033 compatibility until we update the tests.
7034 * tests/calc.at: Idem.
7035 (first_line, first_column, last_line, last_column): Define for lalr1.cc
7036 to simplify the code.
7037
55f0c7b1
PE
70382005-09-29 Paul Eggert <eggert@cs.ucla.edu>
7039
7040 Port to SunOS 4.1.4, which lacks strtoul and strerror.
7041 Ah, the good old days! Problem reported by Peter Klein.
7042 * bootstrap (gnulib_modules): Add strerror, strtoul.
7043 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
7044 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
7045
fb9712a9 70462005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
7047
7048 * data/c.m4 (b4_error_verbose_if): New.
7049 * data/lalr1.cc: Use it.
7050 (YYERROR_VERBOSE_IF): Remove.
7051 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
7052 parser members, replaced by...
7053 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
7054 local variables.
7055 (yysyntax_error_): Takes the state number as argument.
7056 (yyreduce_print_): Use the argument yyrule, not the former
7057 attribute yyn_.
7058
8a6f72f3
PE
70592005-09-26 Paul Eggert <eggert@cs.ucla.edu>
7060
7061 * bootstrap (gnulib_modules): Add verify.
7062 * lib/.cvsignore: Add verify.h.
7063 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
7064 * src/system.h (verify): Remove.
7065 Include verify.h instead.
7066 * src/tables.c (tables_generate): Use new API for 'verify'.
7067
0d50976f
PE
70682005-09-21 Paul Eggert <eggert@cs.ucla.edu>
7069
ebc3737e
PE
7070 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
7071 local variables whose names begin with 'yy'.
7072 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7073 Trivial changes from Joel E. Denny.
7074
0d50976f
PE
7075 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
7076 it itself.
7077 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
7078 don't use alloca any more.
7079
7080 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
7081 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 7082 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
7083 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
7084 to match yacc.c, to test more hosts.
7085
a05b79df
PE
70862005-09-20 Paul Eggert <eggert@cs.ucla.edu>
7087
55289366
PE
7088 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
7089 doesn't affect behavior.
7090 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
7091 Solaris, AIX, MSC.
7092 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
7093 This works a bit better with glibc, if user code has already included
7094 stdlib.h.
7095 * doc/bison.texinfo (Bison Parser): Document that users can't
7096 arbitrarily use malloc and free for other purposes. Document
7097 that <alloca.h> and <malloc.h> might be included.
7098 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
7099 user must declare alloca.
7100
a05b79df
PE
7101 * HACKING (release): Forwarn the Translation Project about
7102 stable releses.
7103
3ab2ca22
AD
71042005-09-20 Akim Demaille <akim@epita.fr>
7105
7106 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
7107
a9739e7c
PE
71082005-09-19 Paul Eggert <eggert@cs.ucla.edu>
7109
a702593e
PE
7110 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
7111 (YYSTACK_ALLOC_MAXIMUM): Use it.
7112 (yysyntax_error): New function.
7113 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
7114 multiple syntax errors are reported, and alloca is being used.
7115 Instead, reallocate buffers twice as big each time, so that
7116 we waste at most half the allocated memory. Start with a small
7117 (128-byte) buffer that will suffice in most cases anyway.
7118 Use yysyntax_error to do most of the work.
7119
7120 * doc/bison.texinfo (Error Reporting, Table of Symbols):
7121 yynerrs is the number of errors reported, not the number of
7122 errors encountered.
7123
a9739e7c
PE
7124 * tests/glr-regression.at (Duplicated user destructor for lookahead):
7125 Mark it as expected to fail.
7126 Cast result of malloc; problem reported by twlevo@xs4all.nl.
7127 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
7128 Don't start user-code symbols with "yy", to avoid name space problems.
7129
f479c6c6
AD
71302005-09-19 Akim Demaille <akim@epita.fr>
7131
7132 Remove the traits, failed experiment.
7133 It never proved useful, and anyway because of the current
7134 definition, it was not possible to have several specialization of
7135 this traits, making it useless.
7136 * data/lalr1.cc (yy:traits): Remove.
7137 Inline its definitions in the parser class.
7138
e2586f82
AD
71392005-09-19 Akim Demaille <akim@epita.fr>
7140
7141 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
7142 least Mac OSX with a /usr/local install of gettext.
7143
2e8cf949
AD
71442005-09-19 Akim Demaille <akim@epita.fr>
7145
7146 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
7147 and yytoken for similarity with the other skeletons.
7148
c7fb0b90
AD
71492005-09-19 Akim Demaille <akim@epita.fr>
7150
4e26c69e 7151 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 7152
1bd0deda
PE
71532005-09-16 Paul Eggert <eggert@cs.ucla.edu>
7154
7155 * NEWS: Version 2.1.
7156
7157 * NEWS: Remove notice of yytname change, since it was never in an
7158 official release.
7159 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
7160 diagnostic.
7161 * src/output.c (prepare): Likewise.
7162 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
7163 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
7164 is not defined. This is an awful hack, but it's enough for now.
7165 All callers changed.
7166 * tests/glr-regression-at (make_value): Args are const pointers now,
7167 to avoid GCC warning.
7168 (Duplicated user destructor for lookahead): New test. Currently
7169 skipped. It fails on my host but I'm not sure it'll always fail.
7170
71712005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
7172
7173 * src/symtab.h (struct symbol): Declare the printer and destructor
7174 as const, to avoid accidental calls to free.
7175 (symbol_destructor_set, symbol_printer_set): Adjust.
7176 * src/symtab.c: Adjust.
7177
1bd0deda 71782005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
7179
7180 * data/c.m4 (b4_token_enums): New.
7181 (b4_token_defines): Rename as...
7182 (b4_token_enums_defines): this.
7183 (b4_token_defines): New, output only the #defines.
7184 * data/yacc.c, data/glr.c: Adjust.
7185 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
7186 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
7187 as default values.
7188
dbcdae2d
AD
71892005-09-16 Akim Demaille <akim@epita.fr>
7190
7191 * data/lalr1.cc (yylex_): Remove, inline its code.
7192 (yyreport_syntax_error_): Remove, replaced by...
7193 (yysyntax_error_): this which returns a string and leaves to the
7194 caller the call to the users' error function.
7195 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
7196 Move from members of the parser object...
7197 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
7198 to local variables of the parse function.
7199
70d8f291
AD
72002005-09-16 Akim Demaille <akim@epita.fr>
7201
7202 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
7203 since it's in Bison's name space.
7204
b47dbebe
PE
72052005-09-15 Paul Eggert <eggert@cs.ucla.edu>
7206
ae199bf1
PE
7207 * data/glr.c (yyresolveValue): Add default case to pacify
7208 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
7209
b47dbebe
PE
7210 * NEWS: Document when yyparse started to return 2.
7211 * doc/bison.texinfo (Parser Function): Document when yyparse
7212 returns 2.
7213
7214 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
7215 (b4_filename_type): Renamed back from b4_file_name_type. All uses
7216 changed.
7217 (class position): file_name -> filename (reverting). All uses changed.
7218
72192005-09-14 Paul Eggert <eggert@cs.ucla.edu>
7220
7221 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
7222 do anything if $@ exists. This reverts part of the 2005-07-07
7223 patch.
7224
00292f66
PE
72252005-09-11 Paul Eggert <eggert@cs.ucla.edu>
7226
7227 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
7228 contains obsolete information and isn't worth distributing as a
7229 separate file anyway.
7230 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
7231 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
7232 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
7233 (yyparse): Abort if user code uses longjmp to throw an unexpected
7234 value.
7235
a420f962
PE
72362005-09-09 Paul Eggert <eggert@cs.ucla.edu>
7237
00292f66
PE
7238 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
7239 Suggested by twlevo@xs4all.nl.
7240
127287e9
PE
7241 * data/glr.c (YYCHK1): Do not assume YYE is in range.
7242 This avoids a diagnostic from gcc -Wswitch-enum.
7243 Problem reported by twlevo@xs4all.nl.
7244
a420f962
PE
7245 * doc/bison.texinfo: Don't use "filename", as per GNU coding
7246 standards. Use "file name" or "file" or "name", depending on
7247 the context.
7248 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
7249 not to hack/foo.tab.c.
7250 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
7251 * data/glr.c: b4_filename -> b4_file_name.
7252 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
7253 All uses changed.
7254 (class position): filename -> file_name. All uses changed.
7255 * data/yacc.c: b4_filename -> b4_file_name.
7256 * lib/bitset.h: filename -> file_name in local vars.
7257 * lib/bitset_stats.c: Likewise.
7258 * src/files.c: Likewise.
7259 * src/scan-skel.l ("@output ".*\n): Likewise.
7260 * src/files.c (file_name_split): Renamed from filename_split.
7261 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
7262
72632005-09-08 Paul Eggert <eggert@cs.ucla.edu>
7264
7265 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
7266 to accommodate latest gnulib.
7267
7268 * tests/glr-regression.at (Duplicate representation of merged trees):
7269 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
7270
7271 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
7272 needed.
7273
42a6501d
PE
72742005-08-26 Paul Eggert <eggert@cs.ucla.edu>
7275
7276 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
7277 All uses changed. Invoke user destructor after an error during a
7278 split parse (trivial change from Joel E. Denny).
7279
7280 * tests/glr-regression.at
7281 (User destructor after an error during a split parse): New test case.
7282 Problem reported by Joel E. Denny in:
7283 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
7284
ef9a1faf
PE
72852005-08-25 Paul Eggert <eggert@cs.ucla.edu>
7286
5b4aaf78
PE
7287 * README-cvs: Give URLs for recommended tools.
7288 Mention Gzip version problem, and bootstrapping issues.
7289 Remove troubleshooting section, as it's somewhat obsolete.
7290
b5240ba5
PE
7291 * bootstrap (no_cache): New var, to accommodate different wget
7292 variants. Use it instead of '-C off'. Problem reported by
7293 twlevo@xs4all.nl.
7294
ef9a1faf
PE
7295 * data/glr.c (yydestroyStackItem): New function.
7296 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
7297 debugging information. Problem reported by Joel E. Denny.
7298
e6efa9da
AD
72992005-08-25 Akim Demaille <akim@epita.fr>
7300
7301 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
7302
adc90f13
PE
73032005-08-24 Paul Eggert <eggert@cs.ucla.edu>
7304
7305 * data/glr.c (yyrecoverSyntaxError, yyreturn):
7306 Don't invoke destructor on unresolved entries.
7307 * tests/glr-regression.at
7308 (User destructor for unresolved GLR semantic value): New test case.
7309 Problem reported by Joel E. Denny in:
7310 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
7311
f9315de5
PE
73122005-08-21 Paul Eggert <eggert@cs.ucla.edu>
7313
15d29c1f
PE
7314 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
7315 Add strnlen.c.
7316 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
7317 lib-prefix.m4, po.m4.
7318
dd5f2af2
PE
7319 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
7320 in yydestruct diagnostic, since it might not be an error.
7321 Problem reported by Joel Denny near end of
7322 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 7323 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
7324 * data/yacc.c (yyreturn): Likewise.
7325 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
7326
7327 * src/files.c: Remove obsolete FIXME comment.
7328
7329 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
7330 with the other templates, and to fix bogus run-on messages such
7331 as the one reported at the end of
7332 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
7333 All callers changed to avoid the newline.
7334 (yyprocessOneStack): Output two lines rather than one, to accommodate
7335 the above change. This changes the debug output format slightly.
7336
f9315de5
PE
7337 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
7338 reported by Joel E. Denny in
7339 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
7340 (trivial change).
7341 * tests/glr-regression.at (Duplicate representation of merged trees):
7342 New test, from Joel E. Denny in:
7343 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
7344 * THANKS: Add Joel E. Denny.
7345
7346 * configure.ac (AC_INIT): Bump to 2.0c.
7347
04098407
PE
73482005-07-24 Paul Eggert <eggert@cs.ucla.edu>
7349
7350 * NEWS: Version 2.0b.
7351
ca5d2013
PE
7352 * Makefile.am (SUBDIRS): Put examples before tests, so that
7353 "make check" doesn't finish with "All 1 tests passed".
7354
3d54b576
PE
7355 * tests/regression.at (Token definitions): Don't rely on
7356 AT_PARSER_CHECK for data that contains backslashes. It currently
7357 uses 'echo', and 'echo' isn't portable if its argument contains
7358 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
7359 that the byte '\0xff' is not printable in the C locale; it is,
7360 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
7361 not printable, so use '\0x81' to test.
7362
d53ae497
PE
7363 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
7364 version of GCC, since the macro is used with non-GCC compilers.
7365
fc01665e
PE
7366 Fix core dump reported by Pablo De Napoli in
7367 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
7368 * tests/regression.at (Invalid inputs with {}): New test.
7369 * src/parse-gram.y (token_name): Translate type before using
7370 it as an index.
7371
04098407
PE
7372 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
7373 the user's name space. All uses changed to __attribute__
7374 ((__unused__)).
7375 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
7376 Add __attribute__ ((__noreturn__)).
7377
7378 * etc/clcommit: Remove. We weren't using it, and it failed
7379 "make maintainer-distcheck".
7380 * Makefile.maint: Merge from coreutils.
7381 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
7382 (syntax-check-rules): Change list of rules as described below.
7383 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
7384 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
7385 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
7386 (sc_trailing_space): New rules.
7387 (sc_xalloc_h_in_src): Remove.
7388 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
7389 (sc_space_tab, sc_error_exit_success, sc_changelog):
7390 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
7391 (makefile-check, po-check, author_mark_check):
7392 (makefile_path_separator_check, copyright-check):
7393 Use grep -n, to make it easier to find violations.
7394 Use CVS_LIST and CVS_LIST_EXCEPT.
7395 (header_regexp, h_re): Remove.
7396 (dd_c): New macro.
7397 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
7398 (my-distcheck): Use more-modern GCC flags.
7399 (signatures, %.asc): Remove.
7400 (rel-files, announcement): Remove signatures.
7401 Restore old updating code, even though we don't use it, so
7402 that we're the same as coreutils.
7403 (alpha, beta, major): Depend on news-date-check.
7404 Make the upload commands.
7405
7406 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
7407 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
7408 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
7409 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
7410 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
7411 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
7412 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
7413 * tests/sets.at: Likewise.
7414
7415 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
7416 we comment out the Autoconf version number.
7417 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
7418 it's error-prone and "make maintainer-distcheck" rejects it.
7419
7420 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
7421 Indent calls to "error" to pacify "make maintainer-distcheck",
7422 when the calls are not intended to be translated.
7423 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
7424
7425 * src/Makefile.am (DEFS): Use +=, to pacify
7426 "make maintainer-distcheck".
7427 (bison_SOURCES): Add scan-skel.h.
7428 (sc_tight_scope): New rule, from coreutils.
7429
7430 * src/files.c (src_extension, header_extension):
7431 Now static, not extern.
7432 * src/getargs.c (short_options): Likewise.
7433 * src/muscle_tab.c (muscle_table): Likewise.
7434 * src/parse-gram.y (current_class, current_type, current_prec):
7435 Likewise.
7436 * src/reader.c (grammar_end, previous_rule_end): Likewise.
7437 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
7438 * src/main.c (main): Cast bindtextdomain and textdomain calls to
7439 void, to avoid warning when NLS is disabled.
7440 * src/output.c: Include scan-skel.h.
7441 (scan_skel): Remove decl, since scan-skel.h does this.
7442 (output_skeleton):
7443 Indent calls to "error" to pacify "make maintainer-distcheck".
7444 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
7445 * src/reader.h (gram_end, gram_lineno): New decls to pacify
7446 "make maintainer-distcheck".
7447 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
7448 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
7449 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
7450 (skel_lex_destroy, scan_skel): Move these decls to...
7451 * src/scan-skel.h: New file.
7452 * src/uniqstr.c (uniqstr_assert):
7453 Indent calls to "error" to pacify "make maintainer-distcheck".
7454
7455 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
7456 not @VAR@.
7457
7458 * tests/torture.at: Revamp to avoid misuse of atoi that
7459 "make maintainer-distcheck" complained about.
7460
7461 * examples/extexi (message): Don't print a message more than once,
7462 and omit line-number decoration that makes Emacs compile think
7463 that informative messages are worth worrying about.
7464
74652005-07-22 Paul Eggert <eggert@cs.ucla.edu>
7466
7467 * configure.ac: Update version number.
7468
7469 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
7470 accidentally.
7471 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
7472 autogenerated by the maintainer.
7473 * examples/calc++/.cvsignore: Add *.yy.
7474
7475 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
7476 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7477 * lib/bitsetv.c (bitsetv_alloc): Likewise.
7478
7479 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
7480
7481 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
7482 from maintainer-distcheck about casting the argument of 'free'.
7483
7484 * NEWS: Mention recent yytname changes.
7485 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
7486
7487 * bootstrap: For translations that have not yet been upgraded to
7488 the new runtime-po domain, prime the pump by extracting the
7489 relevant strings from the obsolete translations. This code can be
7490 removed once the bison-runtime domain has been translated by each
7491 team.
7492
7493 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
7494 now that token names are already quoted.
7495
7496 Fix problem reported by Anthony Heading.
7497 * data/glr.c (YYTOKEN_TABLE): New macro.
7498 (yytname): Define if YYTOKEN_TABLE.
7499 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
7500 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
7501 (YYERROR_VERBOSE): Define the same way the other skeletons do.
7502 * src/output.c (prepare_symbols): Output token_table_flag.
7503
0ffda363
PE
75042005-07-21 Paul Eggert <eggert@cs.ucla.edu>
7505
7506 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
7507 again if the first call fails.
7508
7509 * data/glr.c (yytnamerr): New function.
7510 (yyreportSyntaxError): Use it to dequote most string literals.
7511 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
7512 with other skeletons. All uses changed.
7513 (yytnameerr_): New function.
7514 (yyreport_syntax_error): Use it to dequote most string literals.
7515 * data/yacc.c (yytnamerr): New function.
7516 (yyerrlab): Use it to decode most string literals.
7517 * doc/bison.texinfo (Decl Summary, Calling Convention):
7518 Clarify quoting convention of yytname.
7519 * src/output.c (prepare_symbols): Quote all names. This undoes
7520 the 2005-04-17 change, which is now accomplished (mostly) via
7521 changes in the parsers as described above.
7522 * tests/regression.at (Token definitions, Web2c Actions):
7523 Undo most 2005-04-17 change here, too.
7524
75252005-07-20 Paul Eggert <eggert@cs.ucla.edu>
7526
7527 Fix more problems reported by twlevo@xs4all.nl.
7528 * tests/cxx-type.at: Don't pipe output of ./types through sed to
7529 remove trailing spaces. This loses the exit status of ./types,
7530 and isn't needed since ./types shouldn't be emitting trailing
7531 spaces.
7532 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
7533 as the stack isn't valid in that case.
7534
7535 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7536 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7537 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7538 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
7539 is used.
7540 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
7541 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7542 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7543 Likewise.
7544
7545 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
7546 overly-picky compilers that reject 'char *foo = "bar";'.
7547
7548 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
7549 to FILE * parameter, not to stderr. This fixes a typo introduced
7550 in the 2005-07-12 change.
7551
7552 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
7553 warnings from GCC 4.
7554
7555 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
7556 (yyglrShiftDefer, yysplitStack):
7557 Remove unused parameters b4_pure_formals. All uses changed.
7558 (yyglrShift): Remove unused parameters b4_user_formals.
7559 All uses changed.
7560 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
7561
6100a9aa
PE
75622005-07-18 Paul Eggert <eggert@cs.ucla.edu>
7563
258b75ca
PE
7564 Destructor cleanups and regularization among the three skeletons.
7565 * NEWS: Document the behavior changes.
7566 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
7567 stack before failing, as the cleanup code will do it for us now.
7568 * data/lalr1.cc (yyerrlab): Likewise.
7569 * data/glr.c (yyparse): Pop everything off the stack before
7570 freeing it, so that destructors get called properly.
7571 * data/lalr1.cc (yyreturn): Likewise.
7572 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
7573 This is more consistent.
7574 * doc/bison.texinfo (Destructor Decl): Mention more reasons
7575 why destructors might be called. 1.875 -> 2.1.
7576 (Destructor Decl, Decl Summary, Table of Symbols):
7577 Some English-language cleanups for %destructor.
7578 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7579 Add output line for destructor of start symbol.
7580 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
7581 because of that same extra output line.
7582
1a059451
PE
7583 * NEWS: Document minor wording changes in diagnostics of
7584 Bison-generated parsers.
7585 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
7586 Remove unused formals. All uses changed.
7587 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
7588 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
7589 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
7590 Rename yyoverflowab to yyexhaustedlab.
7591 When memory exhaustion occurs during syntax-error reporting,
7592 report it separately rather than in a single diagnostic; this
7593 eases translation.
7594 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
7595 (Memory Exhausted): Renamed from Parser Stack Overflow.
7596 Revamp wording slightly to prefer "memory exhaustion".
7597 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
7598
97460c78
PE
7599 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
7600
30757c8c
PE
7601 Add i18n support to the GLR skeleton. Partially fix the C++
7602 skeleton; a C++ expert needs to finish this. Remove debugging
7603 msgids; there's little point to having them translated, since they
7604 can be understood only by someone who can read the
7605 (English-language) source code.
7606
7607 Generate runtime-po/bison-runtime.pot automatically, so that we
7608 don't have to worry about garbage getting in that file. We'll
7609 make sure after the next official release that old msgids don't
7610 get lost. See
7611 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
7612
7613 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
7614 Now auto-generated.
7615 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
7616 Fix typos in explanations of the runtime file.
7617 * bootstrap: Change gettext keyword from YYI18N to YY_.
7618 Use standard Makefile.in.in in runtime-po, since we'll arrange
7619 for backward-compatible bison-runtime.po files in a different way.
7620 * data/glr.c (YY_): New macro, from yacc.c.
7621 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
7622 Translate messages intended for users.
7623 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
7624 the wording in the other skeletons. We don't know that the memory
7625 is virtual.
7626 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
7627 Use same method that yacc.c uses.
7628 Don't translate debugging messages.
7629 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
7630 it doesn't work (yet), and requires C++ expertise to fix.
7631 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
7632 Move defn to a more logical place, to be consistent with other
7633 skeletons.
7634 Don't translate debugging messages.
7635 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
7636 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
7637 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
7638 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
7639
ac8c5689
PE
7640 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
7641 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
7642 void, not int.
7643 * tests/glr-regression.at (Badly Collapsed GLR States):
7644 Likewise.
7645 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
7646 yylex should return 0 at EOF rather than aborting.
7647
6100a9aa
PE
7648 Improve tests for stack overflow in GLR parser.
7649 Problem reported by twlevo@xs4all.nl.
7650 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
7651 All uses removed.
7652 (yyStackOverflow): Just longjmp, but with value 2 so that caller
7653 can handle the problem.
7654 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
7655 (yyparse): New local variable yyresult to record the result.
7656 Use result of setjmp to set it, rather than storing itinto
7657 struct.
7658 (yyDone): Remove label.
7659 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
7660 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
7661 if YYABORT is used).
7662 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
7663 yyparse status; put status > 1 into diagnostic.
7664 Check that status==2 works.
7665 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
7666 Use exit status 3 for failure to open (which shouldn't happen).
7667
15f40952
PE
76682005-07-17 Paul Eggert <eggert@cs.ucla.edu>
7669
67fd79c4
PE
7670 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
7671 1 on syntax error; just let yyparse do its thing.
7672 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
7673 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
7674 (Exploding the Stack Size with Alloca):
7675 (Exploding the Stack Size with Malloc):
7676 Expect exit status 2, not 1, since the parser is supposed to blow
7677 its stack. Problem reported by twlevo@xs4all.nl.
7678
15f40952
PE
7679 * data/glr.c (yyparse): Don't assume that the initial calls
7680 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
7681 Print a stack-overflow message and fail instead.
7682 Initialize the line-number information before creating the stack,
7683 so that the stack-overflow message can report line zero safely.
7684
f32c66b5
PE
76852005-07-14 Paul Eggert <eggert@cs.ucla.edu>
7686
a22ff96f 7687 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
7688 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
7689 (yyuserMerge): Provide a default case if b4_mergers is empty.
7690 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
7691 * tests/glr-regression.at
7692 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 7693 Add casts to pacify C++ compilers.
1beb0b24
PE
7694 * tests/glr-regression.at (Improper merging of GLR delayed action
7695 sets): Declare yylex before using it.
f32c66b5 7696 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
7697 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
7698 test for valgrind; valgrind is independent of g++.
7699 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
7700 for compatibility with POSIX 1003.1-2001 (if running coreutils).
7701 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
7702 Use a destructor, so that we can expand the stack. Change
7703 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 7704
d741bd1b
PE
77052005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7706
7707 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
7708 a valgrind failure. Problem reported by twlevo@xs4all.nl.
7709
0410a6e0
PE
77102005-07-13 Paul Eggert <eggert@cs.ucla.edu>
7711
7712 * PACKAGING: New file, suggested by Bruno Haible and taken from
7713 similar wording in gettext's PACKAGING file.
7714 * NEWS: Mention PACKAGING.
7715 * Makefile.am (EXTRA_DIST): Add PACKAGING.
7716
f7ab6a50
PE
77172005-07-12 Paul Eggert <eggert@cs.ucla.edu>
7718
baf785db 7719 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
7720 * bootstrap: Get runtime translations into runtime-po.
7721 Create runtime-po files automatically, if possible.
7722 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
7723 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
7724 does not infringe on the user's name space.
7725 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
7726 * doc/bison.texinfo (Internationalization): Revamp the English
7727 and Texinfo syntax a bit, to try to make it clearer.
7728 (Bison Options, Option Cross Key): Mention --print-localedir.
7729 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
7730 YYENABLE_NLS. Quote a bit more.
7731 * runtime-po/.cvsignore: New file.
7732 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
7733 * runtime-po/Rules-quot: Remove; now created by bootstrap.
7734 * runtime-po/quot.sed: Likewise.
7735 * runtime-po/boldquot.sed: Likewise.
7736 * runtime-po/en@quot.header: Likewise.
7737 * runtime-po/en@boldquot.header: Likewise.
7738 * runtime-po/insert-header.sin: Likewise.
7739 * runtime-po/remove-potcdate.sin: Likewise.
7740 * runtime-po/Makevars: Likewise.
7741 * runtime-po/LINGUAS: Likewise.
7742 * runtime-po/de.po: Likewise; we will rely on the translation project
7743 to maintain this, so "bootstrap" should get it.
0410a6e0 7744 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
7745 its value.
7746 * src/main.c (main): Bind the bison-runtime domain, too.
7747
77482005-07-12 Bruno Haible <bruno@clisp.org>
7749
7750 * data/yacc.c: Include <libintl.h> when NLS is enabled.
7751 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
7752 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
7753 * runtime-po: New directory.
7754 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
7755 $(DOMAIN).pot-update rule, so that old messages are never dropped.
7756 * runtime-po/Rules-quot: New file, copied from po/.
7757 * runtime-po/quot.sed: Likewise.
7758 * runtime-po/boldquot.sed: Likewise.
7759 * runtime-po/en@quot.header: Likewise.
7760 * runtime-po/en@boldquot.header: Likewise.
7761 * runtime-po/insert-header.sin: Likewise.
7762 * runtime-po/remove-potcdate.sin: Likewise.
7763 * runtime-po/Makevars: New file.
7764 * runtime-po/POTFILES.in: New file.
7765 * runtime-po/LINGUAS: New file.
7766 * runtime-po/bison-runtime.pot: New file.
7767 * runtime-po/de.po: New file.
7768 * m4/bison.m4: New file.
7769 * Makefile.am (SUBDIRS): Add runtime-po.
7770 (aclocaldir, aclocal_DATA): New variables.
7771 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
7772 Define aclocaldir.
7773 * src/getargs.c (usage): Document --print-localedir option.
7774 (PRINT_LOCALEDIR_OPTION): New enum item.
7775 (long_options): Add --print-localedir option.
7776 (getargs): Handle --print-localedir option.
7777 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
7778 (Internationalization): New section.
7779
22dda0f0
AD
77802005-07-12 Akim Demaille <akim@epita.fr>
7781
7782 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
7783 for consistency with the rest of the code.
7784 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
7785 Add separators.
7786
82b248ad
AD
77872005-07-12 Akim Demaille <akim@epita.fr>
7788
7789 * src/parse-gram.y: Use %printer instead of YYPRINT.
7790
fa0e9314
AD
77912005-07-12 Akim Demaille <akim@epita.fr>
7792
867a3e00
AD
7793 * src/symtab.h, src/symtab.c (symbol_print): New.
7794 * src/symlist.h, src/symlist.c (symbol_list_print): New.
7795 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
7796
77972005-07-12 Akim Demaille <akim@epita.fr>
7798
7799 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
7800 b4_at_dollar and b4_dollar_dollar.
7801
e054b190
PE
78022005-07-11 Paul Eggert <eggert@cs.ucla.edu>
7803
7804 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
7805 and Pennello's paper.
7806
34160ec4
PE
78072005-07-09 Paul Eggert <eggert@cs.ucla.edu>
7808
407d4a75
PE
7809 * data/yacc.c (yyparse): Undo previous patch. Instead,
7810 set yylsp[0] and yyvsp[0] only if the initial action
7811 sets yylloc and yylval, respectively.
7812
34160ec4
PE
7813 * data/yacc.c (yyparse): In the initial action, set
7814 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
7815 This avoids the use of undefined variables if the initial
7816 action does not set yylloc and/or yylval.
7817
c3d5a4a7
PE
78182005-07-07 Paul Eggert <eggert@cs.ucla.edu>
7819
b34d96c1
PE
7820 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
7821 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
7822 Remove from CVS. These files are automatically generated.
7823 * examples/extexi: Clarify that this file is now part of Bison,
7824 not GNU M4, and that it works with any POSIX-compatible Awk.
7825 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
7826 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
7827 so that we also get calc++-parser.yy. Geneate it.
7828 Use $(AWK), not gawk, since any conforming Awk will do.
7829 Put comment before action, since older 'make' can't handle comment
7830 in action.
7831 $(BUILT_SOURCES): List all built sources, not just some of them.
7832 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
7833 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
7834 $($(calc_sources_generated)): Remove unnecessary test for existence
7835 of target. (This had a shell syntax error anyway; a stray "x".)
7836 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
7837 calc++-parser.yy.
7838 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
7839
c3d5a4a7
PE
7840 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
7841 implied by the other modules.
7842
828c373b
AD
78432005-07-06 Akim Demaille <akim@epita.fr>
7844
7845 Bind examples/calc++ to the package.
7846 * examples/calc++/Makefile: Remove, replaced by...
7847 * examples/calc++/Makefile.am: ... this new file.
7848 * examples/calc++/test: Remove input.
7849 * examples/calc++/compile: Remove.
7850 * examples/Makefile.am: New.
7851 * configure.ac, Makefile.am: Adjust.
7852 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
7853
63cb01d6
PE
78542005-07-05 Paul Eggert <eggert@cs.ucla.edu>
7855
fd2df2ed
PE
7856 * data/glr.c (yyFail): Drastically simplify; since the format argument
7857 never had any % directives, we can simply pass it to yyerror.
7858 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
7859 be modified later, as that is the usual style in glr.c.
7860 Problems reported by Paul Hilfinger.
7861
63cb01d6
PE
7862 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
7863 and size overflow errors.
7864 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
7865 in case the user prolog sets feature-test macros like _GNU_SOURCE.
7866 (YYSIZEMAX): New macro.
7867 (yystpcpy): New function, taken from yacc.c.
7868 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
7869 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
7870 so that we don't have to maintain their signatures.
7871 (yyFail): Check for buffer overflow, by using vsnprintf rather
7872 than vsprintf. Allocate a bigger buffer if possible.
7873 Report an error if buffer allocation fails.
7874 (yyStackOverflow): New function.
7875 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
7876 the initialization was successful. It might fail if storage was
7877 exhausted.
7878 (yyexpandGLRStack): Add more checks for storage allocation failure.
7879 Use yyStackOverflow to report failures.
7880 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
7881 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
7882 Don't assume stack number fits in int.
7883 (yysplitStack): Check for storage allocation failure.
7884 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
7885 can print diagnostics on storage allocation failure. All callers
7886 changed.
7887 (yyresolveValue): Use yybool for boolean.
7888 (yyreportSyntaxError): Check for size-calculation overflow.
7889 This code is taken from yacc.c.
7890 (yyparse): Check for storage allocation errors when allocating
7891 the initial stack.
7892
1c59e0a1
AD
78932005-07-05 Akim Demaille <akim@epita.fr>
7894
7895 Extract calc++ from the documentation.
7896 * doc/bison.texinfo (Calc++): Add the extraction marks.
7897 * examples/extexi: New, from the aborted GNU Programming 2E.
7898 Separate the different paragraph of a file with empty lines.
7899 * examples/Makefile: Use it to extract the whole calc++ example.
7900
8a0adb01
AD
79012005-06-24 Akim Demaille <akim@epita.fr>
7902
7903 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
7904 class typedefs.
7905
12545799
AD
79062005-06-22 Akim Demaille <akim@epita.fr>
7907
7908 * doc/bison.texinfo (C++ Language Interface): First stab.
7909 (C++ Parsers): Remove.
7910
99be0235
AD
79112005-06-22 Akim Demaille <akim@epita.fr>
7912
7913 * data/lalr1.cc (yylex_): Honor %lex-param.
7914
0ffd4fd1
AD
79152005-06-22 Akim Demaille <akim@epita.fr>
7916
7917 Start a set of simple examples.
7918 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
7919 * examples/calc++/calc++-driver.hh,
7920 * examples/calc++/calc++-parser.yy,
7921 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
7922 * examples/calc++/compile, examples/calc++/test: New.
7923
0925ebb4
PE
79242005-06-09 Paul Eggert <eggert@cs.ucla.edu>
7925
7926 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
7927 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
7928 which stems from the 2005-05-27 patch.
7929
43d3b664
PH
79302005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7931
7932 * data/glr.c: Modify treatment of unused parameters to permit use
7933 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
7934
3062864d
PE
79352005-05-30 Paul Eggert <eggert@cs.ucla.edu>
7936
7937 Fix infringement on user name space reported by Janos Zoltan Szabo.
7938 * data/yacc.c (yyparse): strlen -> yystrlen.
7939
989b5b8e
AD
79402005-05-30 Akim Demaille <akim@epita.fr>
7941
7942 * data/lalr1.cc (_): New.
7943 Translate the various messages.
7944
bedf57f5
PE
79452005-05-27 Paul Eggert <eggert@cs.ucla.edu>
7946
7947 Fix infringement on user name space reported by Bruno Haible.
7948 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
7949 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
7950 the user's name space.
7951 (alloca): Include <stdlib.h> to get it, if it's not built in.
7952 (YYMALLOC, YYFREE): Define only if needed.
7953 (malloc, free): Declare, but only if needed, as this infringes on
7954 the user name space.
7955
4d1801f1
PE
79562005-05-25 Paul Eggert <eggert@cs.ucla.edu>
7957
7958 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
7959 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
7960 with %d format.
7961 * lib/ebitset.c (min, max): Undef before defining.
7962 * lib/vbitset.c (min, max): Likewise.
7963 * lib/subpipe.c (create_subpipe): Save local variables in case
7964 vfork clobbers them.
7965
79662005-05-24 Bruno Haible <bruno@clisp.org>
7967
7968 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
7969 error message syntax used by gcc-4.0.
7970
b94a9e1e
PE
79712005-05-23 Paul Eggert <eggert@cs.ucla.edu>
7972
85ac3861
PE
7973 * README: Mention m4 1.4.3. Remove obsolete advice about
7974 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
7975
b94a9e1e
PE
7976 * bootstrap: Remove workaround for problem I encountered with
7977 gettext 0.14.1; it seems to be fixed now.
7978
51c30d21
PE
79792005-05-22 Paul Eggert <eggert@cs.ucla.edu>
7980
009ce67d
PE
7981 * NEWS: Version 2.0a.
7982
f2a97c62
PE
7983 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
7984 the previous change.
7985
c8775f93
PE
7986 Various maintainer cleanups.
7987 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
7988 conftest*, for benefit of CVS commands run at the same time as
7989 "configure". Add build-aux, since "bootstrap" now creates it and
7990 its subfiles.
7991 * Makefile.cfg (move_if_change): Remove.
7992 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
7993 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
7994 (po_repo, do-po-update, po-update, wget_files, get-targets):
7995 (config.guess-url_prefix, config.sub-url_prefix):
7996 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
7997 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
7998 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
7999 Remove.
8000 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
8001 this is now the recommended name.
8002 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
8003 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
8004 ylwrap. These files now go into build-aux.
8005 * config/move-if-change: Remove.
8006 * config/prev-version.txt: Bump from 1.75 to 2.0.
8007
3ea5f0ec
PE
8008 * bootstrap: Add stdio-safer, unistd-safer modules.
8009 Remove m4/glibc2.m4 (introduced by latest gnulib, but
8010 we don't need it).
8011 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
8012 fopen-safer.c, stdio-safer.h, unistd-safer.h.
8013 * lib/subpipe.c: Include "unistd-safer.h".
8014 (create_subpipe): Make sure all the newly-created
8015 file descriptors are > 2, so that diagnostics don't
8016 get sent down them (which might cause Bison to hang, in theory).
8017 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
8018 * src/files.c (xfopen): Use fopen_safer, not fopen.
8019
51c30d21
PE
8020 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
8021 yesterday's yacc.c fix.
8022
cea1469d
PE
80232005-05-21 Paul Eggert <eggert@cs.ucla.edu>
8024
3ea5f0ec
PE
8025 * data/glr.c, data/lalr1.cc: Update copyright date.
8026
cea1469d
PE
8027 Fix a destructor bug reported by Wolfgang Spraul in
8028 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
8029 * data/yacc.c (yyabortlab): Don't call destructor, and
8030 don't set yychar to EMPTY.
8031 (yyoverflowlab): Don't call destructor.
8032 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
8033 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
8034 since we no longer output the message "discarding lookahead token
8035 end of input ()".
8036
5e6f62f2
PH
80372005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8038
8039 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
8040 fix a small glitch in debugging output.
8041 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
8042 after YY_SYMBOL_PRINT where needed.
8043
8044 (struct yyGLRState): Add some comments.
8045 (struct yySemanticOption): Add some comments.
8046 (union yyGLRStackItem): Add comment.
8047
8048 (yymergeOptionSets): Correct this to properly perform the union,
8049 avoiding infinite reported by Michael Rosien.
8050 Update comment.
8051
8052 * tests/glr-regression.at: Add test for GLR merging error reported
8053 by M. Rosien.
cea1469d 8054
0fb669f9
PE
80552005-05-13 Paul Eggert <eggert@cs.ucla.edu>
8056
8057 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
8058 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
8059 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
8060 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
8061 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
8062 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
8063 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
8064 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
8065 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
8066 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
8067 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
8068 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
8069 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
8070 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
8071 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
8072 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
8073 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
8074 src/derives.h, src/files.c, src/files.h, src/getargs.c,
8075 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
8076 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
8077 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
8078 src/output.h, src/parse-gram.c, src/parse-gram.h,
8079 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
8080 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
8081 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
8082 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
8083 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
8084 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
8085 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
8086 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
8087 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
8088 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
8089 tests/reduce.at, tests/regression.at, tests/sets.at,
8090 tests/synclines.at, tests/testsuite.at, tests/torture.at:
8091 Update FSF postal mail address.
8092
51f4735e
PE
80932005-05-11 Paul Eggert <eggert@cs.ucla.edu>
8094
8095 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
8096 Problem reported by Ralf Menzel.
8097
80ce3401
PE
80982005-05-01 Paul Eggert <eggert@cs.ucla.edu>
8099
8100 * tests/actions.at: Test that stack overflow invokes destructors.
8101 From Marcus Holland-Moritz.
8102 * data/yacc.c (yyerrlab): Move the code that destroys the stack
8103 from here....
8104 (yyreturn): to here. That way, destructors are called properly
8105 even if the stack overflows, or the user calls YYACCEPT or
8106 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
8107 (yyoverflowlab): Destroy the lookahead.
8108
81092005-04-24 Paul Eggert <eggert@cs.ucla.edu>
8110
8111 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
8112
72f000b0
PE
81132005-04-17 Paul Eggert <eggert@cs.ucla.edu>
8114
8115 * NEWS: Bison-generated C parsers no longer quote literal strings
8116 associated with tokens.
8117 * src/output.c (prepare_symbols): Don't escape strings,
8118 since users don't want to see C escapes.
8119 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
8120 in diagnostics.
c19683bb 8121 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
8122 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
8123
1094323f
PE
81242005-04-16 Paul Eggert <eggert@cs.ucla.edu>
8125
8126 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
8127 the data size is known to be too small and we can't increase it.
8128 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
8129
ca407bdf
PE
81302005-04-15 Paul Eggert <eggert@cs.ucla.edu>
8131
8132 * src/parse-gram.y: Include quotearg.h.
8133 (string_as_id): Quote $1 before using it as a key, since the
8134 lexer no longer quotes it for us.
8135 (string_content): Don't strip quotes, since lexer no longer
8136 quotes it for us.
8137 * src/scan-gram.l: Include quotearg.h.
8138 ("\""): Omit quote.
8139 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
8140 a key, since the rest of the lexer doesn't quote it.
8141 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
8142 * tests/regression.at (Token definitions): Check for backslashes
8143 in token strings.
8144
8145 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
8146 (YYSIZE_T): Define to unsigned long int when using an older compiler.
8147 (yyparse): Revamp code to generate long syntax error message, to
8148 make it easier to translate, and to avoid problems with arithmetic
8149 overflow. Change "virtual memory" to "memory" in diagnostic, since
8150 we don't know whether the memory is virtual.
8151
1ce59070
PE
81522005-04-13 Paul Eggert <eggert@cs.ucla.edu>
8153
8154 * NEWS: Bison-generated C parsers now use the _ macro to
8155 translate strings.
8156 * data/yacc.c (_) [!defined _]: New macro.
8157 All English strings wrapped inside this macro.
8158 * doc/bison.texinfo (Bison Parser): Document _.
8159 * po/POTFILES.in: Include src/parse-gram.c, since it now
8160 includes translateable strings that parse-gram.y doesn't.
8161
a749a695
PE
81622005-04-12 Paul Eggert <eggert@cs.ucla.edu>
8163
8164 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
8165 reverting the 2004-10-11 change to this function.
8166 (symbol_check_alias_consistency): Don't call symbol_type_set
8167 if the type name is already correct.
8168 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
8169
8fb1053b
PE
81702005-03-25 Paul Eggert <eggert@cs.ucla.edu>
8171
8172 * tests/regression.at (Token definitions): Don't use a token named
8173 c, as that generates a "#define c ..." that runs afoul of buggy
8174 stdlib.h that uses the identifier c as a member of struct
8175 drand48_data. Problem reported by Horst Wente.
8176
ff498c4a
PE
81772005-03-21 Paul Eggert <eggert@cs.ucla.edu>
8178
8179 * bootstrap: Change translation URL from
8180 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
8181 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
8182 redirection glitches. Problem reported by twlevo@xs4all.nl.
8183
65211d70
PE
81842005-03-20 Paul Eggert <eggert@cs.ucla.edu>
8185
8186 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
8187 after operands; POSIX says this isn't portable for the c99 command.
8188
9577fb1f
PE
81892005-03-18 Paul Eggert <eggert@cs.ucla.edu>
8190
8191 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
8192 immediately if a data overrun has occurred; this may help us track
8193 down what may be a spurious failure on MacOS.
8194
78b178f7
PE
81952005-03-17 Paul Eggert <eggert@cs.ucla.edu>
8196
a2599d0f
PE
8197 Respond to problems reported by twlevo@xs4all.nl.
8198
8199 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
8200
78b178f7
PE
8201 * src/vcg.h: Comment fix.
8202 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
8203 (G_CMAX): Change to -1 instead of INT_MAX.
8204
8205 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 8206
7296e729
PE
82072005-03-15 Paul Eggert <eggert@cs.ucla.edu>
8208
8209 * src/tables.c (state_number_to_vector_number): Put it inside an
8210 "#if 0", since it's not currently used. Problem reported by
8211 Roland McGrath.
8212
05ac60f3
PE
82132005-03-06 Paul Eggert <eggert@cs.ucla.edu>
8214
8215 * src/output.c (escaped_output): Renamed from
8216 escaped_file_name_output, since we now use it for symbol tags as
8217 well. All uses changed.
8218 (symbol_destructors_output, symbol_printers_output):
8219 Escape symbol tags too.
8220 Problem reported by Matyas Forstner in
8221 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
8222
8223 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
8224 not needed.
8225 * src/output.c (user_actions_output, token_definitions_output,
8226 symbol_destructors_output, symbol_printers_output): Likewise.
8227 * src/reader.c (prologue_augment): Likewise.
8228 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
8229
8230 * src/vcg.c (output_edge): Don't quote linestyle arg.
8231 Problem reported by twlevo@xs4all.nl.
8232
7eb453ac
PE
82332005-02-28 Paul Eggert <eggert@cs.ucla.edu>
8234
8235 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
8236 example, reported by Derek M Jones. Also, make the example even
8237 more outrageous, to better illustrate how bad the problem is.
8238
4c04c52a
PE
82392005-02-24 Paul Eggert <eggert@cs.ucla.edu>
8240
8241 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
8242 putsym. Typo reported by Sebastian Piping.
8243
a61e1620
PE
82442005-02-23 Paul Eggert <eggert@cs.ucla.edu>
8245
8246 * doc/bison.texinfo (Language and Grammar): some -> same
8247 (Epilogue): int he -> in the
8248 Typos reported by Sebastian Piping via Justin Pence.
8249
9ec93868
PE
82502005-02-07 Paul Eggert <eggert@cs.ucla.edu>
8251
8252 * tests/glr-regression.at (Improper handling of embedded actions
8253 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
8254 embedded actions and $-N in GLR parsers", work around an Autoconf bug
8255 with dollar signs in test names.
8256 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
8257 for a similar reason.
8258
73ce7e7e
PE
82592005-01-28 Paul Eggert <eggert@cs.ucla.edu>
8260
8261 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
8262 wants to redefine G_VIEW.
8263
2e72b98e
PE
82642005-01-27 Paul Eggert <eggert@cs.ucla.edu>
8265
8266 * src/vcg.c (get_view_str): Remove case for normal_view.
8267 Problem reported by twlevo@xs4all.nl.
8268
e0d634e5
PE
82692005-01-24 Paul Eggert <eggert@cs.ucla.edu>
8270
ccf830a4
PE
8271 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
8272 Problem reported by twlevo@xs4all.nl.
8273
e0d634e5
PE
8274 * doc/bison.texinfo: Change @dircategory from "GNU programming
8275 tools" to "Software development". Requested by Richard Stallman
8276 via Karl Berry.
8277
7bbc8cb0
PE
82782005-01-23 Paul Eggert <eggert@cs.ucla.edu>
8279
8280 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
8281 Problem reported by twlevo@xs4all.nl.
8282
08b770bc
PE
82832005-01-21 Paul Eggert <eggert@cs.ucla.edu>
8284
8285 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
8286 keyword; it's not needed with modern compilers, and it doesn't
8287 affect correctness with older compilers. Suggested by
8288 twlevo@xs4all.nl.
8289
95f22ad2
PE
82902005-01-17 Paul Eggert <eggert@cs.ucla.edu>
8291
8292 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
8293 gcc -Wswitch-default.
8294 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
8295 * data/yacc.c (yyparse): Likewise.
8296
d229d15c
PE
82972005-01-12 Paul Eggert <eggert@cs.ucla.edu>
8298
8299 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
8300 already. Let config.h define any nonstandard values.
8301
ecadd90f
PE
83022005-01-10 Paul Eggert <eggert@cs.ucla.edu>
8303
8304 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
8305 for the benefit of slower hosts. Problem reported by
8306 Nelson H. F. Beebe.
8307
213744b5
PE
83082005-01-07 Paul Eggert <eggert@cs.ucla.edu>
8309
8310 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
8311 being defined and not used.
8312 * data/lalr1.cc (yyparse): Likewise.
8313 Use "if (false)" rather than "if (0)".
8314
249d3236
PE
83152005-01-05 Paul Eggert <eggert@cs.ucla.edu>
8316
8317 * TODO: Mention that we should allow NUL bytes in tokens.
8318
987cc1fb
PE
83192005-01-02 Paul Eggert <eggert@cs.ucla.edu>
8320
8321 * src/scan-skel.l (<<EOF>>): Don't close standard output.
8322 Problem reported by Hans Aberg.
8323
08fe02d9
PE
83242005-01-01 Paul Eggert <eggert@cs.ucla.edu>
8325
8326 * src/getargs.c (version): Happy new year; update overall
8327 program copyright date from 2004 to 2005.
8328
8329 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
8330 Problem reported by Hans Aberg.
8331 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
8332 (Output file names.): Add a test for the case when standard output
8333 is closed.
8334
010c0266
PE
83352004-12-26 Paul Eggert <eggert@cs.ucla.edu>
8336
8337 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
8338 to fix an oversight in the Bison 2.0 manual.
8339
da12206a
PE
83402004-12-25 Paul Eggert <eggert@cs.ucla.edu>
8341
8342 * NEWS: Version 2.0. Reformat the existing news items since
8343 1.875, so that related items are grouped together.
3a4734aa 8344 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
8345 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
8346
c935d934
PE
8347 * tests/torture.at (Exploding the Stack Size with Alloca): Set
8348 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
8349 otherwise, we're not testing alloca. Unfortunately there's no
8350 simple way to consult HAVE_ALLOCA here.
8351
da12206a
PE
8352 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
8353 for yymsg, too.
8354
8355 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
8356 hand. This avoids a warning about comparing int to size_t when
8357 GCC warnings are enabled.
8358
0a2c5137
PE
83592004-12-22 Paul Eggert <eggert@cs.ucla.edu>
8360
d7e14fc0
PE
8361 * NEWS: Bison-generated parsers no longer default to using the
8362 alloca function (when available) to extend the parser stack, due
8363 to widespread problems in unchecked stack-overflow detection.
8364 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
8365 responsibility to set it to a positive value. This lets the user
8366 specify a value that is not a preprocessor constant.
8367 * data/yacc.c (YYMAXDEPTH): Likewise.
8368 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
8369 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
8370 to be a compile-time constant. However, explain the constraints on it.
8371 Also, explain the constraints on YYINITDEPTH.
8372 (Table of Symbols): Explain that alloca is no longer the default.
8373 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
8374 to 1.
8375
0a2c5137
PE
8376 * doc/bison.texinfo (Location Default Action): Mention that n must
8377 be zero when k is zero. Suggested by Frank Heckenbach.
8378
e019c247
AD
83792004-12-22 Akim Demaille <akim@epita.fr>
8380
8381 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
8382 (parser::state_type, parser::semantic_type, parser::location_type):
8383 Private, not public.
8384 (parser::parse): Return ints, not bool.
8385 Returning a bool introduces a problem: 0 corresponds to false, and
8386 it seems weird to return false on success. Returning true changes
8387 the conventions for yyparse.
8388 Alternatively we could return void and send an exception.
8389 There is no clear consensus (yet?).
8390 (state_stack, semantic_stack, location_stack): Rename as...
8391 (state_stack_type, semantic_stack_type, location_stack_type): these.
8392 Private, not public.
8393 * tests/c++.at: New.
8394 * tests/testsuite.at, tests/Makefile.am: Adjust.
8395
72731bb7
AD
83962004-12-21 Akim Demaille <akim@epita.fr>
8397
8398 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
8399
9a0d8bec
AD
84002004-12-21 Akim Demaille <akim@epita.fr>
8401
8402 Don't impose std::string for filenames.
8403
8404 * data/lalr1.cc (b4_filename_type): New.
8405 (position::filename): Use it.
8406 (parser.hh): Move the inclusion of stack.hh and location.hh below
8407 the user code, so that needed headers for the filename type can be
8408 included first.
72731bb7
AD
8409 Forward declare them before the user code.
8410 * tests/Makefile.am (check-local, installcheck-local): Pass
8411 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 8412
99880de5
AD
84132004-12-20 Akim Demaille <akim@epita.fr>
8414
8415 Use more STL like names: my_class instead of MyClass.
8416
8417 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
8418 (SemanticStack, SemanticType, StateStack, StateType)
8419 (TokenNumberType, Stack, Slice, Traits, Parser::location)
8420 (Parser::value): Rename as...
8421 (location_stack, location_type, rhs_number_type, semantic_stack)
8422 (semantic_type, state_stack, state_type, token_number_type, stack)
8423 (slice, traits, parser::yylloc, parser::yylval): these.
8424
8425 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
8426
9bec482e
PE
84272004-12-19 Paul Eggert <eggert@cs.ucla.edu>
8428
8429 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
8430 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8431
f6fbd3da
PE
84322004-12-17 Paul Eggert <eggert@cs.ucla.edu>
8433
8434 Remove uses of 'short int' and 'unsigned short int'. This raises
8435 some arbitrary limits. It uses more memory but nowadays that's
8436 not much of an issue.
8437
8438 This change does not affect the generated parsers; that's a different
8439 task, as some users will want to conserve memory there.
8440
8441 Ideally we should use size_t to represent all object counts, and
8442 something like ptrdiff_t to represent signed differences of object
8443 counts; but that will require more code-cleanup than I have the
8444 time to do right now.
8445
8446 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
8447 Use size_t, not int or short int, to count objects.
8448 * src/closure.c (nritemset, closure): Likewise.
8449 * src/closure.h (nritemset, closure): Likewise.
8450 * src/nullable.c (nullable_compute): Likewise.
8451 * src/print.c (print_core): Likewise.
8452 * src/print_graph.c (print_core): Likewise.
8453 * src/state.c (state_compare, state_hash): Likewise.
8454 * src/state.h (struct state): Likewise.
8455 * src/tables.c (default_goto, goto_actions): Likewise.
8456
8457 * src/gram.h (rule_number, rule): Use int, not short int.
8458 * src/output.c (prepare_rules): Likewise.
8459 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
8460 errs, reductions): Likewise.
8461 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
8462 Likewise.
8463 * src/tables.c (vector_number, tally, action_number,
8464 ACTION_NUMBER_MINIMUM): Likewise.
8465 * src/output.c (muscle_insert_short_int_table): Remove.
8466
efeed023
AD
84672004-12-17 Akim Demaille <akim@epita.fr>
8468
8469 * data/lalr1.cc: Extensive Doxygenation.
8470 (error_): Rename as...
8471 (error): this, since it is visible to the user.
8472 Adjust callers.
8473 (Parser::message): Now an automatic variable from...
8474 (Parser::yyreport_syntax_error_): here.
8475 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
8476 Parser::error.
8477 * tests/input.at: Escape $.
8478
bc82c5a5
PE
84792004-12-16 Paul Eggert <eggert@cs.ucla.edu>
8480
8481 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
8482 Parenthesize rhs to avoid obscure problems with mistakes like
8483 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
8484 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
8485 b4_rhs_location): Likewise.
8486 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
8487 b4_rhs_location): Likewise.
8488
fd19f271
AD
84892004-12-16 Akim Demaille <akim@epita.fr>
8490
8491 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
8492 yacc.c: be sure to stay within yycheck_.
8493 * tests/actions.at: Re-enable C++ tests.
8494
10454ea4
AD
84952004-12-16 Akim Demaille <akim@epita.fr>
8496
8497 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
8498 real.
8499
c5b95ccf
AD
85002004-12-16 Akim Demaille <akim@epita.fr>
8501
8502 Use #define to handle the %name-prefix.
8503
8504 * data/glr.c, data/yacc.c: Comment changes.
8505 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
8506 so that one can refer to yylex in the parser file, and have it
8507 renamed, as is the case with other skeletons.
8508
617a8f12
AD
85092004-12-16 Akim Demaille <akim@epita.fr>
8510
8511 Move lalr1.cc internals into yy*.
8512
8513 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
8514 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
8515 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
8516 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
8517 (empty_, final_, terror_, errcode_, ntokens_)
8518 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
8519 (looka_, ilooka_, error_range_, nerrs_):
8520 Rename as...
8521 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
8522 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
8523 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
8524 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
8525 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
8526 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
8527 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
8528 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
8529 these.
8530
1e547e6e
PE
85312004-12-15 Paul Eggert <eggert@cs.ucla.edu>
8532
8533 Fix some problems reported by twlevo at xs4all.
8534 * src/symtab.c (symbol_new): Report an error if the input grammar
8535 contains too many symbols. This is better than calling abort() later.
8536 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
8537 (struct node, struct graph):
8538 Rename member expand to stretch. All uses changed.
8539 (struct graph): Remove member layoutalgorithm. All uses removed.
8540 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
8541 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
8542 All uses changed.
8543 (N_STRETCH): Rename from N_EXPAND. All uses changed.
8544
735d6bd4
AD
85452004-12-15 Akim Demaille <akim@epita.fr>
8546
8547 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
8548 Add more Doxygen comments.
8549 (symprint_, stack_print_, reduce_print_, destruct_, pop)
8550 (report_syntax_error_, translate_): Rename as...
8551 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
8552 (yypop_, yyreport_syntax_error_, yytranslate_): this.
8553
2e1f5829
AD
85542004-12-15 Akim Demaille <akim@epita.fr>
8555
8556 * data/lalr1.cc (lex_): Rename as...
8557 (yylex_): this.
8558 Move the trace here.
8559 Take the %name-prefix into account.
8560 Reported by Alexandre Duret-Lutz.
8561
a3cb6248
AD
85622004-12-15 Akim Demaille <akim@epita.fr>
8563
8564 Simplify the C++ parser constructor.
8565
8566 * data/lalr1.cc (debug_): Rename as...
8567 (yydebug_): so that the parser's internals are always in the yy*
8568 pseudo namespace.
8569 Adjust uses.
8570 (b4_parse_param_decl): Remove the leading comma as it is now only
8571 called as unique argument list.
8572 (Parser::Parser): Remove the constructor accepting a location and
8573 an initial debugging level.
8574 Remove from the other ctor the argument for the debugging level.
8575 (debug_level_type, debug_level, set_debug_level): New.
8576
8577 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
8578 constructor calls.
8579
07fed891
AD
85802004-12-15 Akim Demaille <akim@epita.fr>
8581
8582 Remove b4_root related material: failure experiment
a3cb6248 8583 (which goal was to allow to derive from a class).
07fed891
AD
8584
8585 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
8586 definitions and uses.
8587
e603eaa5
PE
85882004-12-14 Paul Eggert <eggert@cs.ucla.edu>
8589
8590 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
8591 not 2, since it's not portable to subtract 1 from the start of an
8592 array. The new item 0 is never set or used. All uses changed.
8593
8594 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
8595 the default definition of YYLLOC_DEFAULT. Problem reported
8596 by Frank Heckenbach.
8597
fafb007d
PE
85982004-12-12 Paul Eggert <eggert@cs.ucla.edu>
8599
8600 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
8601 the normal case and one for the error case. Just use the
8602 first one uniformly. Problem reported by Frank Heckenbach.
8603 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
8604 use exactly the same macro in both places.
8605 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
8606 so that the normal-case YYRHSLOC works for the error case too.
8607 All uses changed.
8608 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
8609 (YYLLOC_DEFAULT): Use the same macro as glr.c.
8610 * doc/bison.texinfo (Location Default Action): Don't claim that
8611 we have an array of locations. Use the same macro for both glr
8612 and lalr parsers. Mention YYRHSLOC. Mention what happens when
8613 the index is 0.
8614
48814dcd
PE
86152004-12-10 Paul Eggert <eggert@cs.ucla.edu>
8616
a4e1a53b
PE
8617 * HACKING: Update email addresses to send announcements to.
8618
48814dcd
PE
8619 * configure.ac (AC_INIT): Bump version to 1.875f.
8620
337116ba
PE
86212004-12-10 Paul Eggert <eggert@cs.ucla.edu>
8622
8623 * NEWS: Version 1.875e.
8624 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
8625
8626 * src/scan-skel.l: Include "complain.h", for "fatal".
8627
8628 * src/relation.h (relation_print, relation_digraph):
8629 Relation sizes are of type relation_node, not size_t (this is
8630 merely a doc fix, since the two types are equivalent).
8631 (relation_transpose): Relation sizes are of type relation_node,
8632 not int.
8633 * src/relation.c: Likewise.
8634 (top, infinity): Now of type relation_node, not int.
8635 (traverse, relation_transpose): Use relation_node, not int.
8636
8637 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
8638 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
8639 (yyparse): Remove unused local introduced in 2004-10-25 patch.
8640
8641 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 8642 specifying whether the test should be skipped. Use it tp
337116ba 8643 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 8644 fail on some hosts, and should be skipped.
337116ba 8645
da2a7671
PE
86462004-12-08 Paul Eggert <eggert@cs.ucla.edu>
8647
8648 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
8649 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
8650 unless otherwise specified below.
8651
8652 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
8653 to allocate kernel_base, kernel_items, kernel_size, since
8654 they needn't be initialized to 0.
8655 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
8656 * src/closure.c (new_closure): Likewise, for itemset.
8657 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
8658 * src/lalr.c (set_goto_map): Likewise, for temp_map.
8659 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
8660 (build_relations): Likewise for edge, states1, includes.
8661 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
8662 * src/reader.c (packgram): Likewise, for ritem, rules.
8663 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
8664 * src/relation.c (relation_digraph): Likewise for VERTICES.
8665 (relation_transpose): Likewise for new_R, end_R.
8666 * src/symtab.c (symbols_token_translations_init): Likewise for
8667 token_translations.
8668 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
8669 (token_actions): Likewise for yydefact, actrow, conflrow,
8670 conflict_list.
8671 (save_column): Likewise for froms[symno], tos[symno].
8672 (goto_actions): Likewise for state_count.
8673 (pack_table): Likewise for base, pos, check.
8674 (tables_generate): Likewise for width.
8675
8676 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
8677 for initial core. Just have a separate core, so we needn't worry
8678 about whether kernel_size and kernel_base are initialized.
8679
8680 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
8681 kernel_size, kernel_items): Remove unnecessary initialization.
8682 * src/conflicts.c (conflicts): Likewise.
8683 * src/derives.c (derives): Likewise.
8684 * src/muscle_tablc (muscle_insert): Likewise.
8685 * src/relation.c (relation_digraph): Likewise.
8686 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
8687 conflrow, conflict_table, conflict_list, table, check):
8688 Likewise.
8689
8690 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
8691 This is because all callers pass unsigned int.
8692 * src/closure.h (new_closure): Likewise.
8693
8694 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
8695 (build_relations): Initialize includes[i] in all cases.
8696 * src/reader.c (packgram): Always initialize rules[ruleno].prec
8697 and rules[ruleno].precsym. Initialize members in order.
8698 * src/relation.c (relation_transpose): Always initialize new_R[i]
8699 and end_R[i].
8700 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
8701
8702 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
8703 conflict_list[0] was always 0, but now it isn't initialized.
8704
8705 * src/table.c (table_grow): When conflict_table grew, the grown
8706 area wasn't cleared. Fix this.
8707
8708 * lib/.cvsignore: Add strdup.c, strdup.h.
8709 * m4/.cvsignore: Add strdup.m4.
8710
00baeeac
PE
87112004-12-07 Paul Eggert <eggert@cs.ucla.edu>
8712
8713 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
8714 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
8715 GOTO_NUMBER_MAXIMUM, since we occasionally compute
8716 ngotos + 1 without checking for overflow.
8717 (build_relations): Use END_NODE, not -1, to denote end of edges.
8718 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
8719 build_relations): Use goto_number, not int, for goto numbers.
8720 * src/tables.c (save_column, default_goto): Likewise.
8721
be3d9d42
AD
87222004-11-23 Akim Demaille <akim@epita.fr>
8723
8724 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
8725 of #defining from yystype.
8726 Don't typedef yystype, C++ does not need it.
8727 This lets it possible to forward declare it as union.
8728
78e526d5
PE
87292004-11-23 Paul Eggert <eggert@cs.ucla.edu>
8730
8731 * bootstrap (gnulib_modules): Add extensions.
8732 Problem reported by Jim Meyering.
8733
afbb696d
PE
87342004-11-22 Paul Eggert <eggert@cs.ucla.edu>
8735
8736 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
8737 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
8738 src/system.h, src/tables.c: XFREE -> free, to accommodate
8739 recent change to gnulib xalloc.h.
78e526d5 8740 Problem reported by Jim Meyering.
afbb696d 8741
c1f8f16a
AD
87422004-11-17 Akim Demaille <akim@epita.fr>
8743
8744 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
8745
db7e5eb5 87462004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
8747 Alexandre Duret-Lutz <adl@gnu.org>
8748
8749 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
8750 changes.
8751 (YYCDEBUG): Adjust.
8752 Use it instead of cdebug_.
8753 (Parser::debug_stream, Parser::set_debug_stream): New.
8754 (Parser::symprint_): Define cdebug_ for temporary backward
8755 compatibility.
8756 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
8757 debug_stream ().
8758
68e11668
AD
87592004-11-17 Akim Demaille <akim@epita.fr>
8760
8761 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
8762 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
8763 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
8764 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
8765
97cbc73e
PE
87662004-10-27 Paul Eggert <eggert@cs.ucla.edu>
8767
8768 * data/glr.c (yyloc_default): Remove; not used.
8769 Problem reported by Frank Heckenbach.
8770
e342c3be
AD
87712004-10-25 Akim Demaille <akim@epita.fr>
8772
8773 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
8774 Introduce another definition to address simple location arrays.
8775 (yyGLRStack): New member: yyerror_range.
8776 (yyrecoverSyntaxError, yyparse): Update it.
8777 (yyrecoverSyntaxError): Use it when shifting the error token to
8778 have an accurate range, equivalent to the one computed by both
8779 yacc.c and lalr1.cc.
8780 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
8781 that column numbers start at column 0, as per GNU Coding
8782 Standards, the others tests, and the doc.
8783 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
8784 Adjust to the above change (first column is 0).
8785 And adjust the location of the "<error>", now covering the whole
8786 line.
8787
93602feb 87882004-10-22 Akim Demaille <akim@epita.fr>
04098407 8789 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
8790
8791 Remove some arbitrary limits on goto numbers and relations.
8792 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
8793 initial values, since they're never used.
8794 (set_goto_map): ngotos is now unsigned, so test for overflow
8795 by seeing whether it wraps around to zero.
8796 * src/lalr.h (goto_number): Now size_t, not short int.
8797 (GOTO_NUMBER_MAXIMUM): Remove.
8798 * src/relation.c (relation_print, traverse, relation_transpose):
8799 Check for END_NODE rather than looking at sign.
8800 * src/relation.h (END_NODE): New macro.
8801 (relation_node): Now size_t, not short int.
8802
dba08b04
PE
88032004-10-22 Paul Eggert <eggert@cs.ucla.edu>
8804
8805 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
8806 keyword, not an identifier. Problem reported by Baron Schwartz in
8807 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
8808
df09ef2e
AD
88092004-10-11 Akim Demaille <akim@epita.fr>
8810
8811 * src/symtab.c (symbol_check_alias_consistency): Also check
8812 type names, destructors, and printers.
8813 Reported by Alexandre Duret-Lutz.
8814 Recode the handling of associativity and precedence in terms
8815 of symbol_precedence_set.
8816 Accept no redeclaration at all, not even equal to the previous
8817 value.
8818 (redeclaration): New.
8819 Use it to factor redeclaration complaints.
8820 (symbol_make_alias): Don't set the type of the alias, let
8821 symbol_check_alias_consistency do it as for other features.
8822 * src/symtab.h (symbol): Add new member prec_location, and
8823 type_location.
8824 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
8825 * tests/input.at (Incompatible Aliases): New.
8826
146bc99d
PE
88272004-10-09 Paul Eggert <eggert@cs.ucla.edu>
8828
8829 .cvsignore fixes to accommodate gnulib changes,
8830 and the practice of naming build directories "_build".
8831 * .cvsignore: Add "_*". Sort.
8832 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
8833 * m4/.cvsignore: Add "*_gl.m4".
8834
e503aa60
AD
88352004-10-06 Akim Demaille <akim@epita.fr>
8836
8837 * src/parse-gram.y (add_param): Fix the truncation of trailing
8838 spaces.
8839
b4a20338
AD
88402004-10-05 Akim Demaille <akim@epita.fr>
8841
8842 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
8843 whether the reducion was empty or not. This leaves room to
8844 improve the use of YYLLOC_DEFAULT in such a case.
8845 lalr1.cc is still experimental, so changing this is acceptable.
8846 And finally, there are probably not many users who changed the
8847 handling of locations in GLR, so changing is admissible too.
8848
8849 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
8850 empty reduction, set @$ to an empty location ending the previously
8851 stacked symbol.
8852 Adjust uses to make sure the code is triggered on empty
8853 reductions.
8854 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
8855 expected output: empty reductions have empty locations.
8856
f85a5e6f
AD
88572004-09-29 Akim Demaille <akim@epita.fr>
8858
8859 * data/lalr1.cc: Move towards a more standard C++ coding style
8860 for templates: Class < T > -> Class<T>.
8861
b203fc2c
AD
88622004-09-29 Akim Demaille <akim@epita.fr>
8863
8864 * data/lalr1.cc: Reinstall the former ctor, for sake of
8865 compatibility, but warn it will be removed.
8866 Move towards a more standard C++ coding style (i.e., type *var ->
8867 type* var).
8868
5b7e1e73
PE
88692004-09-27 Paul Eggert <eggert@cs.ucla.edu>
8870
3fee967f
PE
8871 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
8872 since it's less likely to work if NULs are involved in the future.
5b7e1e73 8873
0dcca5c2
AD
88742004-09-27 Akim Demaille <akim@epita.fr>
8875
8876 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
8877
6dde1c82
AD
88782004-09-27 Akim Demaille <akim@epita.fr>
8879
8880 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 8881 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
8882 and argument names.
8883 (b4_cc_constructor_call): Likewise.
8884
b233d555
AD
88852004-09-24 Akim Demaille <akim@epita.fr>
8886
8887 * src/parse-gram.y (add_param): Strip the leading and trailing
8888 blanks from a formal argument declaration.
8889 (YY_LOCATION_PRINT): New.
8890
619404e3
AD
88912004-09-24 Akim Demaille <akim@epita.fr>
8892
8893 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
8894 after the location.
8895
dd8d9022
AD
88962004-09-24 Akim Demaille <akim@epita.fr>
8897
8898 * doc/bison.texinfo (Table of Symbols): Sort.
8899
0092f063
AD
89002004-09-21 Akim Demaille <akim@epita.fr>
8901
8902 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
8903 the useless parentheses.
8904 Suggested by Paul Eggert.
8905
451364ed
AD
89062004-09-20 Akim Demaille <akim@epita.fr>
8907
8908 Let the initial-action act on the look-ahead, and use it for the
8909 "initial push" (corresponding to an hypothetical beginning-of-file).
8910 And let lalr1.cc honor %initial-action.
8911
8912 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
8913 example.
8914 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
8915 (Parser::Parser): Remove the ctor that used to initialize it.
8916 (Parser::parse): Like in the other skeletons, issue the "starting
8917 parse" message before any action.
8918 Honor %initial-action.
8919 Initialize the stacks with the lookahead.
8920 * data/yacc.c: Let $$ and @$ in %initial-action designate the
8921 look-ahead.
8922 Push them in the stacks.
8923 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
8924
18d192f0
AD
89252004-09-20 Akim Demaille <akim@epita.fr>
8926
8927 * doc/bison.texinfo (Initial Action Decl): New.
8928
b8458aa5
AD
89292004-09-20 Akim Demaille <akim@epita.fr>
8930
8931 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
8932 clearer criterion to define it.
8933 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
8934 When reducing on an empty RHS, use the latest stacked location as
8935 location.
8936 yylloc is not always available.
8937 * data/glr.c: Likewise.
8938 Also, honor initial-actions.
8939
3fc16193
AD
89402004-09-20 Akim Demaille <akim@epita.fr>
8941
8942 * data/yacc.c (YY_LOCATION_PRINT): New.
8943 Define when we know YYLTYPE's structure, i.e., when the default
8944 YYLLOC_DEFAULT is used.
8945 * data/c.m4 (b4_yysymprint_generate): Use it.
8946 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
8947 value of the result.
8948 (error_start_): Replace with...
8949 (error_range_): this location array.
8950 This allows to replace code relying on the implementation of
8951 locations by portable code.
8952 * data/yacc.c (yylerrsp): Replace with...
8953 (yyerror_range): this.
8954 Every time a token is popped, update yyerror_range[0], to have an
8955 accurate location for the error token.
8956 * data/glr.c (YY_LOCATION_PRINT): New.
8957 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
8958 deference a pointer.
8959 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
8960 report the location in %printers.
8961
8962 * src/scan-skel.l: Instead of abort, report error messages to ease
8963 understanding skeleton scanning failures.
8964
ecfe33e7
AD
89652004-09-16 Akim Demaille <akim@epita.fr>
8966
8967 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
8968 (iterator, const_iterator): these, to be more in the C++ spirit.
8969 Also, return reverse iterators so that when displaying the stack
8970 we display its bottom first.
8971 (Parser::stack_print_, Parser::reduce_print_): Match the messages
8972 from yacc.c.
8973 We should probably use vector here though.
8974
1576d44d
AD
89752004-09-16 Akim Demaille <akim@epita.fr>
8976
8977 Have more complete shift traces.
8978
8979 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
8980 to report Shifts instead of ad hoc YYDPRINTF invocations,
8981 including for the error token.
8982 * data/lalr1.cc (symprint_): Output the location.
8983 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
8984 output the location within the %printer.
8985 Activate GLR tests, at least to make sure they compile properly.
8986 They still don't pass though.
8987 * tests/calc.at: Adjust expect verbose output, since now "Entering
8988 state..." is on a different line than the "Shifting" message.
8989
9c66f418
AD
89902004-09-08 Akim Demaille <akim@epita.fr>
8991
8992 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
8993 Bison directive from the Bison file to the invocation of this
8994 macro, so that these directives are passed to
8995 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
8996 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
8997 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
8998 the extra Bison directives instead of the whole series.
8999 Change the grammar so that there are recoverable errors, and
9000 unrecoverable errors. Now we can have the parser give up before
9001 consuming the whole input. As a result we now can observe that
9002 the lookahead is freed when needed.
9003 Change the parser source to parse argv[1] instead of a hard coded
9004 string.
9005 Simplify yylex, and give a value and location to EOF.
9006 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
9007 passed directives already coded in the file.
9008 Add some tests to check the location of "error".
9009 For some tests, the C++ parser is correct, and not yacc.c.
9010 For other tests, they provide different, but unsatisfying, values,
9011 so keep the C++ value so that at least one parser is "correct"
9012 according to the test suite.
9013 (Actions after errors): Remove, this is subsumed by the
9014 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
9015
52d5733f
AD
90162004-09-06 Akim Demaille <akim@epita.fr>
9017
9018 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 9019 (Parser::pop): New.
52d5733f
AD
9020 Use it.
9021
a0e68930
AD
90222004-09-06 Akim Demaille <akim@epita.fr>
9023
9024 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
9025 argument, an informative message.
9026 Call YY_SYMBOL_PRINT.
9027 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
9028 * data/lalr1.cc (destruct_): Likewise.
9029 In addition, no longer depend on b4_yysymprint_generate and
9030 b4_yydestruct_generate to generate these functions, do it "by
9031 hand".
9032
e757bb10
AD
90332004-09-03 Akim Demaille <akim@epita.fr>
9034
9035 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
9036 invoked, yydestruct the lookahead.
9037 * tests/calc.at (Calculator $1): Update the expected lengths of
9038 traces: there is an added line for the discarded lookahead.
9039 * doc/bison.texinfo (Destructor Decl): Some rewording.
9040 Define "discarded" symbols.
9041
0fe1f06d
AD
90422004-09-02 Akim Demaille <akim@epita.fr>
9043
9044 * data/lalr1.cc (translate_, destruct_): No reason to be static.
9045
284acc8b
AD
90462004-09-02 Akim Demaille <akim@epita.fr>
9047
9048 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
9049 (YYDSYMPRINTF): Rename as...
9050 (YY_SYMBOL_PRINT): this.
9051 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
9052 two.
9053 Use it instead of direct symprint_ calls.
9054 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
9055 one.
9056
a5eb1ed2
AD
90572004-09-02 Akim Demaille <akim@epita.fr>
9058
b7c72fe1
AD
9059 * data/lalr1.cc (b4_yysymprint_generate): New.
9060 (symprint_): New member function, defined when YYDEBUG.
9061 Use it consistently instead of token/nterm debugging output by
9062 hand.
a5eb1ed2
AD
9063 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
9064 %printer calls to use cdebug_ when using lalr1.cc.
9065
417141dd
AD
90662004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
9067
9068 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
9069 with #ifdef YYDEBUG.
9070
2fa09258
AD
90712004-08-26 Akim Demaille <akim@epita.fr>
9072
9073 * doc/bison.texinfo (Implementing Loops): Rename as...
9074 (Implementing Gotos/Loops): this.
9075
9378b508
PE
90762004-08-13 Paul Eggert <eggert@cs.ucla.edu>
9077
9078 Adjust to latest gnulib.
9079 * bootstrap (gnulib_modules): Add xalloc-die.
9080 Set LC_ALL=C so that file names sort consistently.
9081 Prefer the gnulib copies of gettext.m4, glibc21.m4,
9082 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
9083 uintmax_t.m4, ulonglong.m4.
9084 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
9085 po.m4 since we are now using _gl.m4 instead.
9086
87a8ad5c
PE
90872004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
9088
9089 * src/scan-action.l: Remove. Scanning of semantic actions is
9090 handled in scan-gram.l.
9091
dca81a78
PE
90922004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
9093
9094 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
9095
9096 * src/location.h (struct): The file member is a uniqstr.
9097 (equal_boundaries): Use UNIQSTR_EQ for comparison.
9098
c9cbf7c5
PE
90992004-07-22 Paul Eggert <eggert@cs.ucla.edu>
9100
9101 Fix bug with non-%union parsers that have printers or destructors,
9102 which led to a Bison core dump. Reported by Peter Fales in
9103 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 9104
c9cbf7c5
PE
9105 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
9106 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
9107 not to our own type.
9108 * src/output.c (symbol_destructors_output, symbol_printers_output):
9109 Don't assume %union.
9110 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
9111 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
9112 UNION-FLAG. All callers changed.
9113 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
9114 Use type char, not unsigned int, when declaring an array of char;
9115 this lets us remove a cast.
9116 (Printers and Destructors): Add non-%union test cases.
9117
fa7e68c3
PE
91182004-06-21 Paul Eggert <eggert@cs.ucla.edu>
9119
9120 * doc/bison.texinfo: Minor editorial changes, mostly to the new
9121 GLR writeups. E.g., avoid frenchspacing and the future tense,
9122 change "lookahead" to "look-ahead", and change "wrt" to "with
9123 respect to".
2fa09258 9124
fa7e68c3
PE
91252004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9126
9127 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
9128 New sections, split off from the GLR Parsers section. Put the new
9129 Simple GLR Parser near the start of the GLR section, for clarity.
9130 Rewrite connective text.
9131
99a9344e
PE
91322004-06-21 Frank Heckenbach <frank@g-n-u.de>
9133
9134 * doc/bison.texinfo (Simple GLR Parsers): New section.
9135
8dd162d3
PE
91362004-06-21 Paul Eggert <eggert@cs.ucla.edu>
9137
9138 * NEWS, TODO, doc/bison.texinfo:
9139 Use "look-ahead" instead of "lookahead", to be consistent.
9140 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
9141 while we're fixing "look-ahead".
9142 * src/conflicts.c (shift_set): Renamed from shiftset.
9143 (look_ahead_set): Renamed from lookaheadset.
9144 * src/print.c: Likewise.
9145 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
9146 name for "lookahead".
9147 (report_types, usage): Likewise.
9148 * src/getargs.h (report_look_ahead_tokens): Renamed from
9149 report_lookaheads.
9150 * src/lalr.c (compute_look_ahead_tokens): Renamed from
9151 compute_lookaheads.
9152 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
9153 (look_ahead_tokens_print): Renamed from lookaheads_print.
9154 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
9155 state_rule_lookaheads_print.
9156 * src/state.h: Likewise.
9157 (reductions.look_ahead_tokens): Renamed from lookaheads.
9158 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
9159 AT_DATA_LOOKAHEADS_GRAMMAR.
9160
57a90331
PE
91612004-06-03 Paul Eggert <eggert@cs.ucla.edu>
9162
9163 * README: Update location of patched M4 distribution.
9164
8ed3234a
PE
91652004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
9166
9167 Don't assume the C++ compiler takes the same arguments as the C compiler
9168 (trivial change).
9169 * configure.ac (O0CXXFLAGS): New var.
9170 * tests/atlocal.in (CXXFLAGS): Use it.
9171
07971983
PE
91722004-05-29 Paul Eggert <eggert@cs.ucla.edu>
9173
9174 Fix some "make check" problems with C++ reported by
9175 Albert Chin-A-Young for Tru64 C++ in this thread:
9176 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
9177
9178 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
9179 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9180 Output to a .cc file for C++, not to a .c file.
9181 * tests/calc.at (AT_CHECK_CALC): Likewise.
9182 * tests/regression.at (AT_CHECK_DANCER): Likewise.
9183 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
9184
29058652
PE
91852004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
9186
9187 * tests/calc.at, tests/actions.at: Workaround for SGI
9188 C++ compiler. (trivial change)
9189
62cb8a99
PE
91902004-05-27 Paul Eggert <eggert@cs.ucla.edu>
9191
fd418816
PE
9192 Spent a few hours checking out which prerequisite versions the
9193 current sources actually require. I went all the way back to
9194 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
9195 a seemingly endless set of combinations of versions more recent
9196 than that. The bottom line is that the current sources require
9197 fairly recent versions of the build tools, and it'll be some work
9198 to change this.
9199 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
9200 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
9201 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
9202 Add comments explaining why those particular versions are
9203 currently needed.
2fa09258 9204
62cb8a99
PE
9205 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
9206 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 9207 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
9208
9209 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
9210 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
9211
caa52c10
PE
92122004-05-26 Paul Eggert <eggert@cs.ucla.edu>
9213
9214 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
9215 0.11.5. Suggested by Bruno Haible.
9216 * bootstrap: Remove gettext version checking.
9217
9218 * doc/bison.texinfo (Decl Summary): Also mention that %union
9219 can depend on prerequisite types. Problem reported by Tim
9220 Van Holder.
9221
4bfd5e4e
PE
92222004-05-25 Paul Eggert <eggert@cs.ucla.edu>
9223
2cef3017
PE
9224 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
9225 * README-alpha: Don't tell people not to package this.
9226
b9c85d5c
PE
9227 * bootstrap: Don't assume $(...) works; use `...` instead.
9228 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
9229 gettext better.
9230
4bfd5e4e
PE
9231 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
9232 put into the -d output file, and mention what to do if YYSTYPE is
9233 defined as a macro.
9234
6a36ff94
PE
92352004-05-24 Paul Eggert <eggert@cs.ucla.edu>
9236
6712933e
PE
9237 Undo change made earlier today: it caused autopoint to not bring
9238 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
9239 autopoint's.
9240
9241 * bootstrap: Check that gettext version matches what's in
9242 configure.ac. Warn users to ignore robots.txt ERROR 404.
9243 * bootstrap: Undo today's earlier change (logged below).
9244 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 9245
6a36ff94
PE
9246 The gettext version checking is causing more trouble than it's
9247 curing; remove it. Problem reported by Paul Hilfinger.
9248
9249 * bootstrap: Issue a warning that one can expect a message
9250 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
9251 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
9252
209ea708
PE
92532004-05-23 Paul Eggert <eggert@cs.ucla.edu>
9254
9255 Ensure that the C++ compiler used for testing actually works on a
9256 simple test program; if not, skip the C++-related tests. Problem
9257 reported by Vin Shelton in:
161a71f3 9258 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
9259
9260 * m4/cxx.m4: New file.
9261 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
9262 * tests/atlocal.in (BISON_CXX_WORKS): Add.
9263 * tests/local.at (AT_COMPILE_CXX): Use it.
9264
41ca2549
PE
92652004-05-21 Paul Eggert <eggert@cs.ucla.edu>
9266
383e69dc
PE
9267 * data/glr.c (yylloc): Output this macro even if locations are not
9268 being generated, as the GLR parser needs it even in that case.
9269 Problem reported by Troy A. Johnson
9270 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
9271
41ca2549
PE
9272 * configure.ac (AC_INIT): Update to 1.875e.
9273
e476c87d
PE
92742004-05-21 Paul Eggert <eggert@cs.ucla.edu>
9275
9276 * NEWS: Version 1.875d.
9277 * configure.ac (AC_INIT): Likewise.
9278 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
9279
9280 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
9281 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
9282 lalr1.cc runs afoul of the first, and the last two are no longer
9283 supported by GCC 3.4.0.
9284 * README: Mention GNU m4 1.4 or later; mention m4 patches.
9285 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
9286
233a88ad
PE
92872004-05-06 Paul Eggert <eggert@cs.ucla.edu>
9288
9289 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
9290 unsigned int, for compatibility with latest gnulib hash module.
9291 * src/state.c (state_hash, state_hasher): Likewise.
9292 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
9293 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 9294
12ffdd28
PE
92952004-05-03 Paul Eggert <eggert@cs.ucla.edu>
9296
9297 * NEWS: Unescaped newlines are no longer allowed in char & strings.
9298
9299 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
9300 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
9301 character and string literals.
9302 (unexpected_end): New function.
9303 (unexpected_eof): Use it.
9304 (unexpected_newline): New function.
9305 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
9306 actions.
e476c87d 9307
12ffdd28
PE
9308 * NEWS: Document %expect-rr.
9309
9310 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
9311 Fix typo by replacing $1 with $option.
9312 Remove more 'intl'-related files.
9668e2be 9313 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
9314
9315 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
9316 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
9317 strtoul.c.
9318 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
9319 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
9320 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
9321 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
9322 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
9323 * src/.cvsignore: Add *.output.
9324
9325 * src/parse-gram.y: Put copyright notice inside %{ %} so it
9326 gets copied to the output file.
e476c87d 9327
1f65350a
PE
93282004-04-28 Paul Eggert <eggert@twinsun.com>
9329
9330 Get files from the gnulib and po repositories, instead of relying
9331 on them being in our CVS. Upgrade to latest versions of gnulib
9332 and Automake.
9333
9334 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
9335 * bootstrap: Bootstrap from gnulib and po repositories.
9336 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
9337 * README-cvs: Document these changes. Remove version numbers from
9338 mentions of build tools, since they change so often. Mention Flex.
9339
9340 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
9341 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
9342 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
9343 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 9344 does this for us.
12ffdd28
PE
9345 (AC_ISC_POSIX): Remove; we no longer support this
9346 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
9347 (AC_HEADER_STDC): Remove: we now assume C89 or better.
9348 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
9349 Do not check for C89 headers, except for locale.h which is used
9350 by the Yacc library and must port to K&R hosts.
9351 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
9352 Do not check for C89 functions, except for setlocale which is
9353 used by the Yacc library.
9354 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
9355 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
9356 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
9357 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
9358 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
9359 AM_GNU_GETTEXT): Remove; now done by:
9360 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
9361 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
9362 for us.
9363
9364 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
9365 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
9366 Define to empty, as gnulib.mk will do the rest for us.
9367 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
9368 for us.
9369 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
9370 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
9371
9372 * src/files.c: Include gnulib's xstrndup.h.
9373
9374 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
9375 (REALLOC): Use xnrealloc, for likewise.
9376 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
9377 (strnlen, memrchr): Remove decls; functions no longer used.
9378 Include <stpcpy.h>.
9379
9380 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
9381 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
9382 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
9383 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
9384 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
9385 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
9386 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
9387 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
9388 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
9389 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
9390 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
9391 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9392 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
9393 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
9394 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
9395 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
9396 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
9397 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
9398 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
9399 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
9400 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
9401 Remove, as these files are now generated automatically
9402 by bootstrap or automake.
9403
9404 * po/ChangeLog: Remove: all but one entry was a duplicate
9405 of this file, and I moved that 2000-11-02 entry here.
9406
9407 * config/.cvsignore: Add Makefile, depcomp, install-sh.
9408 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
9409 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
9410 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
9411 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
9412 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
9413 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
9414 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
9415 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
9416 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
9417 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
9418 xstrndup.h.
9419 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
9420 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
9421 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
9422 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
9423 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
9424 * src/.cvsignore: Remove *_.c.
9425
9426
9427 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
9428 support it. (The latest stable gzip doesn't.)
9429
94302004-04-27 Paul Eggert <eggert@twinsun.com>
9431
9432 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
9433 case, as stos_ is now used by destructors due to the 2004-02-09
9434 change.
9435
9436 Remove more K&R C support.
9437 * lib/libiberty.y (PARAMS): Remove. All uses removed.
9438 * lib/subpipe.c (errno): Remove decl.
9439 Include <stdlib.h> unconditionally.
9440 (EXIT_FAILURE): Remove macro.
9441 * src/complain.c (vfprintf, strerror): Remove.
9442 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
9443 unconditionally.
9444 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
9445 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
9446 (strchr, strspn, memchr): Remove decls.
9447 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
9448 unconditionally. Do not declare perror.
9449 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
9450 unconditionally.
9451
9452 * src/complain.c (_): Remove useless defn, as system.h defines this.
9453
9454 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
9455 with latest obstack.h.
9456 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
9457 to procedure types, as obstack.h now does that for us.
9458 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
9459
9460 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
9461 so that this include file can stand alone.
9462 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
9463 does this now. Include subpipe.h first after config.h, to
9464 test whether it can stand alone.
9465
9466 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
9467 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
9468 unused declaration.
9469
9470 * tests/synclines.at (%union synch line): Put a dummy member in
9471 the union, because empty unions aren't allowed in C. Caught
9472 by GCC 3.4.0.
9473
4f16766c
PE
94742004-04-13 Jim Meyering <jim@meyering.net>
9475
9476 * src/conflicts.c (conflicts_print): Correct format string typo:
9477 use `%%' to produce literal `%'. (trivial change)
9478
779e7ceb
PE
94792004-03-30 Paul Eggert <eggert@twinsun.com>
9480
9481 * src/getargs.c (version): Update copyright year to 2004.
9482
9483 * data/c.m4 (b4_int_type): Use 'short int' rather than
9484 'short', and similarly for 'long', 'unsigned', etc.
9485 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
9486 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
9487 yy_yypstack, yydumpstack): Likewise.
9488 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
9489 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
9490 Likewise.
9491 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
9492 yy_stack_print, yyparse): Likewise.
9493 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
9494 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
9495 * lib/bitset.c (bitset_print): Likewise.
9496 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
9497 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9498 * lib/bitsetv.c (bitsetv_dump): Likewise.
9499 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
9500 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
9501 Likewise.
9502 * src/LR0.c (allocate_itemsets): Likewise.
9503 * src/gram.h (rule_number, rule): Likewise.
9504 * src/lalr.h (goto_number): Likewise.
9505 * src/nullable.c (nullable_compute): Likewise.
9506 * src/output.c (prepare_rules): Likewise.
9507 * src/relation.c (relation_print, relation_digraph): Likewise.
9508 * src/relation.h (relation_node): Likewise.
9509 * src/state.h (state_number, transitions, errs, reductions,
9510 struct state): Likewise.
9511 * src/symtab.h (symbol_number, struct symbol): Likewise.
9512 * src/tables.c (vector_number, tally, action_number,
9513 default_goto, goto_actions): Likewise.
9514 * tests/existing.at (GNU Cim Grammar): Likewise.
9515 * tests/regression.at (Web2c Actions): Likewise.
9516
9517 * src/output.c (muscle_insert_short_int_table): Renamed from
9518 muscle_insert_short_table. All uses changed.
9519
d6328241
PH
95202004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9521
9522 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
9523 (declaration): Replace expected_conflicts with expected_sr_conflicts.
9524 Add %expect-rr rule.
4f16766c 9525
d6328241
PH
9526 * src/scan-gram.l: Recognize %expect-rr.
9527
4f16766c 9528 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 9529 expected_conflicts.
4f16766c 9530 (expected_rr_conflicts): Declare.
d6328241
PH
9531
9532 * src/conflicts.c (expected_sr_conflicts): Rename from
9533 expected_conflicts.
9534 (expected_rr_conflicts): Define.
9535 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
9536 for GLR parsers.
9537 Use expected_sr_conflicts in place of expected_conflicts.
9538 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 9539
d6328241 9540 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 9541
1452af69
PE
95422004-03-08 Paul Eggert <eggert@gnu.org>
9543
9544 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 9545 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
9546
9547 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
9548 in lalr1.cc.
9549 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
9550 * src/scan-gram.l (scan_integer): New function.
9551 ({int}): Use it.
9552 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
9553 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
9554 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
9555 Say "long int", not "long", for uniformity with GNU style.
9556
006d217d
PE
95572004-02-25 Paul Eggert <eggert@twinsun.com>
9558
9559 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
9560 compilers. This fixes a problem with Intel's C++ compiler being
9561 chatty, reported by Guido Trentalancia in
161a71f3 9562 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 9563
c2729758
ADL
95642004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
9565
9566 Support %destructor and merge error locations in lalr1.cc.
9567
9568 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
9569 (Parser::stos_): Define unconditionally.
9570 (Parser::destruct_): New method. Generate its body with
9571 b4_yydestruct_generate.
9572 (Parser::error_start_): New attribute.
9573 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
9574 token which are discarded.
9575 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
9576 error_start_ when erroneous token are discarded.
9577 (Parser::parse) <yyerrlab1>: Compute the location of the error
9578 token so that it covers all the discarded tokens.
9579 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
9580 it can be called with `%skeleton "lalr1.cc"', and do that.
9581
dd0e0635
PE
95822004-02-02 Paul Eggert <eggert@twinsun.com>
9583
9584 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
9585 $(top_srcdir)/lib and ../lib. This fixes a bug reported
9586 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
9587 There's no need to mention top_builddir since Automake does that
9588 for us.
9589 (INCLUDES): Remove, as Automake says it's obsolescent.
9590 Contents migrated into AM_CPPFLAGS as described above.
9591 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
9592
95932004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9594
9595 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
9596 (yyreportSyntaxError): Handle case where lookahead token is
9597 YYEMPTY.
9598
be16239b
PH
95992004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9600
9601 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
9602 resulting parsers are compilable with C++.
9603
5fa90832
PE
96042003-12-23 Paul Eggert <eggert@twinsun.com>
9605
9606 * config/depcomp, config/install-sh: Sync with Automake 1.8.
9607 * src/output.c (output_skeleton): Rename local var.
9608 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
9609 Bison tokens, as this runs afoul of the 2003-10-07 change that
9610 disallowed NUL bytes in character constants or string literals.
9611
9612 * tests/local.at: Require Autoconf 2.59's Autotest.
9613 * tests/testsuite.at: Don't include local.at, since we now assume
9614 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
9615 including it.
9616 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
9617 multiple inclusion warnings.
dd0e0635 9618
b165c324
AD
96192003-12-02 Akim Demaille <akim@epita.fr>
9620
9621 * doc/bison.texinfo (How Can I Reset the Parser): More about start
9622 conditions.
9623 From Bruno Haible.
9624
26e06a21
ADL
96252003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
9626
9627 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
9628
92ac3705
PE
96292003-10-07 Paul Eggert <eggert@twinsun.com>
9630
6a5ecb38
PE
9631 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
9632 if testsuite doesn't exist.
9633
92ac3705
PE
9634 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
9635 literals, unfortunately.
9636 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
9637 Complain about NUL bytes in character constants or string literals.
9638
91d2c560
PE
96392003-10-05 Paul Eggert <eggert@twinsun.com>
9640
9641 * NEWS: Don't document %no-default-prec, as it's still
9642 too experimental.
9643 * doc/bison.texinfo: Document %no-default-prec only if
9644 the defaultprec flag is set. Normally it's not.
9645
0cc3da3a
PE
96462003-10-04 Paul Eggert <eggert@twinsun.com>
9647
9648 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
9649 non-modifiable lvalue, instead of a modifiable one.
9650 * doc/bison.texinfo (Actions): Document that $$ can
9651 be assigned to. Do not claim that $$ and $N are
9652 array element references: user code should not rely on this.
9653
22fccf95
PE
96542003-10-01 Paul Eggert <eggert@twinsun.com>
9655
9656 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
9657 (grammar_declaration): Use it.
9658 * src/scan-gram.l: New token %no-default-prec.
9659 * tests/conflicts.at: Revamp tests to use %no-default-prec.
9660 * NEWS, doc/bison.texinfo: Document the above.
9661
fc8f2965
AD
96622003-10-01 Akim Demaille <akim@epita.fr>
9663
9664 VCG no longer supports long_straight_phase.
9665
9666 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
9667 * src/print_graph.c (print_graph): Adjust.
9668
39a06c25
PE
96692003-09-30 Frank Heckenbach <frank@g-n-u.de>
9670 and Paul Eggert <eggert@twinsun.com>
9671
9672 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
9673 Table of Symbols): Document %default-prec.
9674 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
9675 (grammar_declaration): Set default_prec on %default-prec.
9676 * src/scan-gram.l (%default-prec): New token.
9677 * src/reader.h (default_prec): New flag.
9678 * src/reader.c: Likewise.
9679 (packgram): Handle it.
9680 * tests/conflicts.at (%default-prec without %prec,
9681 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 9682
39a06c25
PE
96832003-09-30 Paul Eggert <eggert@twinsun.com>
9684
9685 * tests/testsuite.at: Include local.at, not input.at, fixing
9686 a typo in the 2003-08-25 patch.
9687
62b6aef9
AD
96882003-08-27 Akim Demaille <akim@epita.fr>
9689
9690 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
9691 GCC warnings.
9692
89e1cc61
AD
96932003-08-26 Akim Demaille <akim@epita.fr>
9694
9695 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
9696 "<\#" to avoid magic from Gnus when posting parts of this script.
9697
a08460b0
AD
96982003-08-26 Akim Demaille <akim@epita.fr>
9699
9700 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
9701 (Parser::parse): here.
9702 Adjust: nerrs and errstatus is now replaced by...
9703 (Parser::nerrs_, Parser::errstatus_): New.
9704
603f1cfd
AD
97052003-08-25 Akim Demaille <akim@epita.fr>
9706
9707 * config/announce-gen, Makefile.cfg: New.
9708 * Makefile.am: Adjust.
9709 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
9710 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
9711
cd3684cf
AD
97122003-08-25 Akim Demaille <akim@epita.fr>
9713
9714 When reducing initial empty rules, Bison parser read an initial
9715 location that is not defined. This results in garbage, and that
9716 affects Bison's own parser. Therefore we need (i) to extend Bison
9717 to support a means to initialize this location, and (ii) to use
9718 this CVS Bison to fix CVS Bison's parser.
9719
9720 * src/reader.h, reader.c (epilogue_augment): Remove, replace
9721 with...
9722 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
9723 * src/parse-gram.y: Adjust.
9724 (%initial-action): New.
9725 (%error-verbose): Since we require CVS Bison, there is no reason
9726 not to use it.
9727 * src/scan-gram.l: Adjust.
9728 * src/Makefile.am (YACC): New, to make sure we use our own parser.
9729 * data/yacc.c (yyparse): Use b4_initial_action.
9730
4e03e201
AD
97312003-08-25 Akim Demaille <akim@epita.fr>
9732
9733 * doc/bison.texinfo: Don't promote stdout for error messages.
9734
8c182d05
AD
97352003-08-25 Akim Demaille <akim@epita.fr>
9736
9737 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
9738 From Alexandre Duret-Lutz.
9739
6a60c4cf
PE
97402003-08-25 Akim Demaille <akim@epita.fr>
9741
9742 Version 1.875c.
9743
25f66e1a
AD
97442003-08-25 Akim Demaille <akim@epita.fr>
9745
9746 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
9747 Use them.
9748
5348bfbe
AD
97492003-08-25 Akim Demaille <akim@epita.fr>
9750
9751 * data/lalr1.cc (Parser::reduce_print_): New.
9752 Use it.
9753
47301314
AD
97542003-08-25 Akim Demaille <akim@epita.fr>
9755
9756 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
9757 error recovery loops. This patch is based on
161a71f3 9758 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
9759 Also, augment the similarity between lalr1.cc and yacc.c.
9760 Note: the locations of error recovery rules are not correct yet.
9761
9762 * data/lalr1.cc: Comment changes to augment the similarity between
9763 lalr1.cc and yacc.c.
9764 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
9765 (yyerrlab1): Remove, but where it used to be (now the bottom part of
9766 yyerrlab), when hitting EOF, pop the whole stack here instead of
9767 merely falling thru the default error handling mechanism.
9768 (yyerrorlab): New label, with the old contents of YYERROR,
9769 plus the following change: pop the stack of rhs corresponding
9770 to the production that invoked YYERROR. That is how Yacc
9771 behaves (required by POSIX).
9772 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
9773 fail.
9774
1f7a61ff
AD
97752003-08-25 Akim Demaille <akim@epita.fr>
9776
9777 Tune local.at so that people can "autom4te -l autotest calc.at -o
9778 calc" for instance, to extract a sub test suite.
9779
9780 * tests/testsuite.at: Move the initialization, Autotest version
9781 requirement, and AT_TESTED invocation into...
9782 * tests/local.at: here.
9783 * tests/testsuite.at: Include it for compatibility with Autoconf
9784 2.57.
9785 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
9786 be ignore.
9787
327b5b56
PE
97882003-08-04 Paul Eggert <eggert@twinsun.com>
9789
9790 Rework code slightly to avoid gcc -Wtraditional warnings.
9791 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
9792 The returned value is now stored in *YY0. All callers changed.
9793 * src/output.c (merge_output): Adjust to the above change.
9794
0051e3ed
PE
97952003-07-26 Paul Eggert <eggert@twinsun.com>
9796
9797 * data/glr.c (YYASSERT): New macro.
9798 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
9799 yyresolveStates, yyprocessOneStack):
9800 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
9801 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 9802
137437c6
PE
98032003-07-25 Paul Eggert <eggert@twinsun.com>
9804
5b620e06
PE
9805 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
9806 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 9807 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
9808 by Frank Heckenbach, though I have omitted the structure-initialization
9809 part of his glr-knr.diff patch since I recall that the Portable
9810 C Compiler didn't require that change.
9811
137437c6
PE
9812 Let the user specify how to allocate and free memory.
9813 Derived from a suggestion by Frank Heckenbach in
161a71f3 9814 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
9815 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
9816 All uses of free, malloc, realloc changed to use these macros,
9817 and unnecessary casts removed.
9818 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
9819
ddb85ca5
PE
98202003-07-06 Matthias Mann <MatthiasMann@gmx.de>
9821
9822 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
9823 use s.empty() rather than s == "" to test for empty string; see
161a71f3 9824 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
9825 (trivial change)
9826
39910e09
AD
98272003-06-25 Akim Demaille <akim@epita.fr>
9828
9829 * config/depcomp, config/install-sh: Update from masters.
9830
0ae99356
PE
98312003-06-20 Paul Eggert <eggert@twinsun.com>
9832
9833 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
9834 and return properly parenthesized result.
9835 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
9836 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9837 Remove unnecessary parentheses from uses.
9838 * doc/bison.texinfo (Location Default Action): Describe the
9839 conventions for parentheses.
9840
cd05d13c
PE
98412003-06-19 Paul Eggert <eggert@twinsun.com>
9842
81fd08ca
PE
9843 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
9844 yyreportTree): Do not assume that size_t is the same width as int,
9845 when printing sizes. Print sizes using an unsigned format.
9846 Problem reported by Frank Heckenbach in
161a71f3 9847 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 9848
cd05d13c
PE
9849 Port to Forte Developer 7 C compiler.
9850 * data/glr.c (struct YYLTYPE): If locations are not being used,
9851 declare a single dummy member, as empty structs do not conform
9852 to the C standard.
9853 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
9854 the Forte Developer 7 C compiler complains that end-of-loop
9855 code is not reached.
9856
4dcf140b
PE
98572003-06-17 Paul Eggert <eggert@twinsun.com>
9858
9859 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
9860 avoid warnings from picky compilers about redefinition of PARAMS.
9861
8dd76bee
PE
98622003-06-17 Paul Eggert <eggert@twinsun.com>
9863
9864 Version 1.875b.
9865
9866 * NEWS: Document 1.875b.
9867
9868 * lib/bbitset.h: Do not include config.h; that's the includer's job.
9869 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
9870 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
9871 Don't use 'index' in comments, as it's a builtin fn on some hosts.
9872 * lib/bitset_stats.c: Include gettext.h unconditionally, as
9873 per recent gettext manual's suggestion.
9874 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
9875 Use prototypes, not old-style definitions.
9876 * lib/lbitset.c (lbitset_unused_clear): Likewise.
9877 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
9878 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
9879 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
9880 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
9881 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
9882 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
9883 vbitset_or_and_cmp, vbitset_copy): Likewise.
9884
9885 * lib/libiberty.h: Do not include config.h; that's the includer's job.
9886 Do not include <stdlib.h>.
9887 (PARAMS): Define unconditionally for C89.
9888 (ATTRIBUTE_NORETURN): Remove.
9889 (ATTRIBUTE_UNUSED): Define unconditionally.
9890
9891 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 9892 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
9893 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
9894 * lib/vbitset.c, lib/vbitset.h: New files.
9895 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9896 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
9897 from libbitset.
9898
9899 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
9900 `How Can I Reset @code{yyparse}', since texinfo does not allow
9901 arbitrary @ in node names.
9902
9903 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
9904 shouldn't be needed according to the gettext 0.12.1 documentation
9905 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 9906 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 9907 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 9908 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 9909
8dd76bee
PE
9910 * lib/.cvsignore: Add stdbool.h.
9911 * m4/.cvsignore: Add nls.m4, po.m4.
9912
9913 Upgrade to CVS gnulib.
9914 * stdbool_.h: File renamed from stdbool.h.in.
9915 * configure.ac (AM_STDBOOL_H): Invoke this instead of
9916 AC_HEADER_STDBOOL.
9917 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
9918 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
9919 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
9920 (MOSTLYCLEANFILES): New var.
9921 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
9922 (stdbool.h): New rule.
9923 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
9924 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
9925 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
9926 m4/quote.m4: Upgrade to today's gnulib.
9927
9928 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
9929 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
9930 the tests right now.
9931 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
9932 yyerror are declared before use; C99 requires this.
9933
25005f6a
PH
99342003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9935
9936 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
9937 first.
9938 (yyrecoverSyntaxError): Correct the logic for setting and testing
9939 yyerrState.
9940 Correct comment on handling EOF.
9941 Allow states with only a default reduction, rather than failing
8dd76bee 9942 (I can't quite reconstruct why these were not allowed before).
25005f6a 9943
137437c6 9944 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 9945 buffer overruns, corrupting state.
8dd76bee
PE
9946
9947 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
9948 definition.
9949 * src/reader.h (max_left_semantic_context): New variable declaration.
9950 * src/scan-gram.l (max_left_semantic_context): Define.
9951 (handle_action_dollar): Update max_left_semantic_context.
9952 * data/glr.c (YYMAXLEFT): New definition.
9953 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
9954 (yyresolveAction): Ditto.
9955
9956 Fixes to problems with location handling in GLR parsers reported by
9957 Frank Heckenbach (2003/06/05).
9958
9959 * data/glr.c (YYLTYPE): Make trivial if locations not used.
9960 (YYRHSLOC): Add parentheses, and define only if locations used.
9961 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
9962 locations not used.
9963 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
9964 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 9965
25005f6a
PH
9966 * tests/cxx-type.at: Exercise location information; update tests
9967 to differentiate output with and without locations.
8dd76bee 9968 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
9969 because default YYLTYPE not yet defined.
9970 Change semantic actions to compute strings, rather than printing
9971 them directly (to test proper passing of semantics values). Change
9972 output to prefix notation and update test data and expected results.
9973 (yylex): Track locations.
9974 (stmtMerge): Return value rather than printing, and include arguments
9975 in value.
8dd76bee 9976
711f40b7
PE
99772003-06-03 Paul Eggert <eggert@twinsun.com>
9978
9979 Avoid warnings generated by GCC 2.95.4 when Bison is
9980 configured with --enable-gcc-warnings.
9981 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
9982 yy::]b4_parser_class_name[::translate_,
9983 yy::Stack::operator[] (unsigned),
9984 yy::Stack::operator[] (unsigned) const,
9985 yy::Slice::operator[] (unsigned),
9986 yy::Slice::operator[] (unsigned) const):
9987 Rename local vars to avoid warnings.
9988 * tests/glr-regression.at (Improper handling of embedded actions
9989 and $-N in GLR parsers): Remove unused local variable from yylex.
9990 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
9991 (void) as arg when not pure, since we now assume C89 when building
9992 Bison. Pacify GCC by using parameter.
9993
ac695f7d
PE
99942003-06-02 Paul Eggert <eggert@twinsun.com>
9995
9996 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
9997 yy::Location::lines, yy::Location::columns): Rename arguments
9998 to avoid shadowing; this removes a warning generated by GCC 3.3.
9999
26ec81e0
PE
100002003-06-01 Paul Eggert <eggert@twinsun.com>
10001
10002 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
10003 to g++, as GCC 3.3 complains if you do it.
10004 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
10005 everything that WARNING_CFLAGS has, except omit warnings
10006 not suitable for C++.
10007 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
10008 * tests/atlocal.in (CXXFLAGS): New var.
10009 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
10010
10011 Fix a GLR parser bug I reported in February; see
161a71f3 10012 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
10013 The problem was that GLR parsers did not conform to the C standard,
10014 because actions like { $1 = $2 + $3; } expanded to expressions
10015 that invoked YYFILL in separate subexpressions, and YYFILL assigned
10016 to a local variable. The C standard says that expressions
10017 like (var = f ()) + (var = f ()) have undefined behavior.
10018 Another problem was that GCC sometimes issues warnings that
10019 yyfill and its parameters are unused.
10020
10021 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
10022 as possibly unused.
10023 (yyfill): New function.
10024 (YYFILL): Use it.
10025 (yyuserAction): Change type of yynormal to bool, so that it matches
10026 the new yyfill signature. Mark it as possibly unused.
10027
10028
10029 Follow up on a bug I reported in February, where a Bison-generated
10030 parser can loop. Provide a test case and a fix for yacc.c. I
10031 don't have a fix for lalr1.cc or for glr.c, unfortunately.
10032 The original bug report is in:
161a71f3 10033 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
10034
10035 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
10036 macro's size was becoming unwieldy.
10037 (yyerrlab): Do not discard an empty lookahead symbol, as this
10038 might destroy garbage.
10039 (yyerrorlab): New label, with the old contents of YYERROR,
10040 plus the following change: pop the stack of rhs corresponding
10041 to the production that invoked YYERROR. That is how Yacc
10042 behaves, and POSIX requires this behavior.
10043 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
10044 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
10045 Define 'alarm' to do nothing if unistd.h is not available.
10046 Add a new rule "exp: '-' error;" to test the above change to
10047 data/yacc.c. Use 'alarm' to abort any test taking longer than
10048 10 seconds, as it's probably looping.
10049 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
10050 Also, the new yacc.c generates two fewer diagnostics for an
10051 existing test.
10052
d0829076
PE
100532003-05-24 Paul Eggert <eggert@twinsun.com>
10054
c6ae27df
PE
10055 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
10056 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
10057 This fixes a problem reported by John Bowman when the Compaq/HP
10058 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
10059 -ansi -Wall -gall).
10060 * data/yacc.c (union yyalloc): Likewise.
10061 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 10062
d0829076
PE
10063 Switch from 'int' to 'bool' where that makes sense.
10064
10065 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
10066 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
10067 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
10068 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
10069 Return or accept bool, not int. All callers changed.
10070 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
10071 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
10072 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
10073 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
10074 bitset_or_and_cmp_): Likewise.
10075 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
10076 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
10077 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
10078 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
10079 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
10080 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
10081 bitset_stats_or_and_cmp): Likewise.
10082 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
10083 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
10084 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
10085 ebitset_xor_cmp): Likewise.
10086 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
10087 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
10088 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
10089 lbitset_xor_cmp): Likewise.
10090 * lib/bbitset.h: Include <stdbool.h>.
10091 (struct bitset_vtable): The following members now return bool, not
10092 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
10093 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
10094 or_and_cmp).
10095 * src/conflicts.c (count_rr_conflicts): Likewise.
10096 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
10097 All uses changed.
10098 * lib/ebitset.c (ebitset_obstack_init): Likewise.
10099 * lib/lbitset.c (lbitset_obstack_init): Likewise.
10100 * src/getargs.c (debug_flag, defines_flag, locations_flag,
10101 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
10102 graph_flag): Likewise.
10103 * src/getargs.h (debug_flag, defines_flag, locations_flag,
10104 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
10105 graph_flag): Likewise.
10106 * src/output.c (error_verbose): Likewise.
10107 * src/output.h (error_verbose): Likewise.
10108 * src/reader.c (start_flag, typed): Likewise.
10109 * src/reader.h (typed): Likewise.
10110 * src/getargs.c (LOCATIONS_OPTION): New constant.
10111 (long_options, getargs): Use it.
10112 * src/lalr.c (build_relations): Use bool, not int.
10113 * src/nullable.c (nullable_compute): Likewise.
10114 * src/print.c (print_reductions): Likewise.
10115 * src/tables.c (action_row, pack_vector): Likewise.
10116 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
10117 * src/output.c (prepare): Use it.
10118 * src/output.c (token_definitions_output,
10119 symbol_destructors_output, symbol_destructors_output): Use string,
10120 not boolean integer, to keep track of whether to output separator.
10121 * src/print_graph.c (print_core): Likewise.
10122 * src/state.c (state_rule_lookaheads_print): Likewise.
10123
10124 * config/install-sh: Sync from automake 1.7.5.
10125
6b2584b7
PE
101262003-05-14 Paul Eggert <eggert@twinsun.com>
10127
10128 * src/parse-gram.y (rules_or_grammar_declaration): Require a
10129 semicolon after a grammar declaration, in the interest of possible
10130 future changes to the Bison input language.
10131 Do not allow a stray semicolon at the start of the grammar.
10132 (rhses.1): Allow one or more semicolons after any rule, including
10133 just before "|" as required by POSIX.
10134 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
10135 grammar.
10136
caf37a36
ADL
101372003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
10138
10139 %parse-param support for lalr1.cc.
10140
10141 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
10142 b4_cc_constructor_calls, b4_cc_constructor_call,
10143 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
10144 definitions.
10145 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
10146 parse-param arguments.
10147 (yy::b4_parser_class_name): Declare instance variables to
10148 hold parse-param arguments.
10149 * tests/calc.at: s/value/semantic_value/ because value clashes
10150 with a member of yy::b4_parser_class_name. Adjust C++ code
10151 to handle %parse-param. Enable %parse-param test in C++.
10152
3ab37077
PE
101532003-05-12 Paul Eggert <eggert@twinsun.com>
10154
10155 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
10156 English a bit. Fix fclose typo. Change "const char" to "char
10157 const", and use ANSI C rather than K&R for "main". Suggest
10158 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
10159 and suggest yy_switch_to_buffer.
10160
101612003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
10162
10163 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
10164 C89. This avoids a diagnostic on compilers that define __STDC__
10165 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 10166 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 10167
e743727f
PE
101682003-05-03 Paul Eggert <eggert@twinsun.com>
10169
10170 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
10171 Do not overrun array bounds.
10172 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 10173 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 10174
916708d5
AD
101752003-04-29 Akim Demaille <akim@epita.fr>
10176
10177 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
10178 * src/getargs.c, src/getargs.h: here, as bool, not int.
10179 (nondeterministic_parser): New.
10180 * src/parse-gram.y, src/scan-gram.l: Support
10181 %nondeterministic-parser.
10182 * src/output.c (prepare): Use nondeterministic_parser instead
10183 of glr_parser where appropriate.
10184 * src/tables.c (conflict_row, action_row, save_row)
10185 (token_actions, token_actions, pack_vector): Ditto.
10186
a06ea4aa
AD
101872003-04-29 Akim Demaille <akim@epita.fr>
10188
10189 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
10190
211074ca
AD
101912003-04-29 Akim Demaille <akim@epita.fr>
10192
10193 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
10194 with %pure-parser and %locations to exercise the patch from Yakov
10195 Markovitch below.
10196
6175ffe3
PE
101972003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
10198
10199 * data/yacc.c: (b4_lex_param): Corrected for the case where
10200 %lex-param is provided and %pure-parser isn't.
10201
b1e95857
PE
102022003-04-27 Paul Eggert <eggert@twinsun.com>
10203
10204 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 10205 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
10206 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
10207 if it is not defined.
10208 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
10209
acda9df6
PE
102102003-04-26 Paul Eggert <eggert@twinsun.com>
10211
3470c57b
PE
10212 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
10213 Declare to be of type suitable for the ninf value itself, not of
10214 type suitable for the corresponding table, since the latter might
10215 be unsigned but the ninf value might be negative. This fixes a
10216 bug reported by Alexandre Duret-Lutz in
161a71f3 10217 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 10218
acda9df6
PE
10219 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
10220 invokes it. We shouldn't invoke it twice because it will attempt
10221 to put error.o in the archive twice. This fixes a glitch reported
10222 by Martin Mokrejs in
161a71f3 10223 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 10224
b5250f26
PE
102252003-04-21 Paul Eggert <eggert@twinsun.com>
10226
10227 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
10228 to gnulib.
10229
089ac0f1
PE
102302003-04-21 Yakov Markovitch <Markovitch@iso.ru>
10231
10232 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
10233 Fix obvious typo that results in uncompilable GLR parsers
10234 when both %pure-parser and %locations are used. (trivial change)
10235
5ededac6
PE
102362003-04-17 Paul Eggert <eggert@twinsun.com>
10237
1b8f2fff
PE
10238 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
10239 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
10240 Do not insert the expected token via unput, as this runs afoul
10241 of a POSIX-compatibility bug in flex 2.5.31.
10242 All uses changed to BEGIN the parent state,
10243 since we no longer insert the expected token via unput.
10244 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
10245 that is no longer emitted after the above change.
10246
5ededac6
PE
10247 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
10248 the first one. This change is from Paul Hilfinger, and it fixes
10249 regression reported by Werner Lemberg in
161a71f3 10250 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
10251
10252 (resolve_sr_conflict): Don't invoke state_errs_set
10253 unless one or more tokens have been explicitly made errors.
10254 Otherwise, the above change causes Bison to abort.
10255
10256 * tests/existing.at (GNU pic Grammar): New test case, taken from
10257 Lemberg's email.
10258
b8be9132
AD
102592003-03-31 Akim Demaille <akim@epita.fr>
10260
10261 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
10262
d423d460
AD
102632003-03-31 Akim Demaille <akim@epita.fr>
10264
10265 * src/output.c (prepare_symbols): Avoid trailing spaces in the
10266 output.
10267
c7e441b4
AD
102682003-03-31 Akim Demaille <akim@epita.fr>
10269
10270 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
10271 From Paul Hilfinger.
10272
231897ad
AD
102732003-03-29 Akim Demaille <akim@epita.fr>
10274
10275 * m4/error.m4: Do not put under dynamic conditions some code which
10276 expansion is under static control.
10277
5b066063
AD
102782003-03-29 Akim Demaille <akim@epita.fr>
10279
10280 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
10281
22a74fec
AD
102822003-03-29 Akim Demaille <akim@epita.fr>
10283
10284 * doc/bison.texinfo (Strings are Destroyed): New.
10285
0eee27e7
PE
102862003-03-13 Paul Eggert <eggert@twinsun.com>
10287
10288 * .cvsignore: Add configure.lineno.
10289 * src/.cvsignore: Add yacc.
10290 * tests/.cvsignore: Add testsuite.log.
10291 * doc/fdl.texi: Sync with latest FSF version.
10292
f61aad93
PE
102932003-03-12 Paul Eggert <eggert@twinsun.com>
10294
537636c7
PE
10295 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
10296 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
10297 cursor, instead of leaving it undefined. This fixes a bug
10298 reported by Tim Van Holder in
161a71f3 10299 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
10300 * tests/input.at (Torturing the Scanner): Test the scanner on
10301 an empty input file, which was Tim Van Holder's test case.
10302
10303 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
10304 <sys/resource.h> can be included, include sys/time.h and
10305 sys/times.h first, if available. This works around the SunOS
10306 4.1.4 porting bug reported by Bruce Becker in
161a71f3 10307 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
10308
10309 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
10310 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
10311 AC_HEADER_SYS_WAIT.
10312
f61aad93
PE
10313 Merge changes from gnulib. This was prompted because the CVS
10314 snapshot didn't build on Solaris 7 due to strnlen problems.
10315
10316 These changes need to be merged back into gnulib:
10317 * lib/hash.c: Include <stdbool.h> unconditionally.
10318 * m4/onceonly.m4 (m4_quote): New macro.
10319 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
10320 Quote AC_FOREACH variable-expansions properly.
10321 The 2003-01-03 obstack.h change also needs merging.
10322 {end of changes requiring merging}
5b066063 10323
f61aad93
PE
10324 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
10325 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
10326 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
10327 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
10328 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
10329 New files, imported from gnulib.
10330 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
10331 above.
10332
10333 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
10334 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
10335 gnulib sources.
10336
10337 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
10338 Add.
10339 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
10340 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
10341 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
10342 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
10343 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
10344 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
10345 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
10346 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
10347 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
10348 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
10349 (jm_PREREQ_ARGMATCH): Remove.
10350 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
10351 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
10352
10353 * src/system.h: Include <stdbool.h> unconditionally.
10354
10355 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
10356 assuming at least C89 in the bitset code for some time now.
10357
d2ffe116
AD
103582003-03-03 Akim Demaille <akim@epita.fr>
10359
10360 * ro.po: New.
10361
052826fd
AD
103622003-03-02 Akim Demaille <akim@epita.fr>
10363
10364 * doc/bison.texinfo (Table of Symbols): Reactivate the
10365 documentation for %lex-param, and %parse-param.
10366
c4749565
AD
103672003-03-02 Akim Demaille <akim@epita.fr>
10368
10369 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
10370 generate verbose error messages.
10371 Use the number of tokens as an upper bound in yytname, as it
10372 cannot be a non terminal.
10373
d5286af1
AD
103742003-03-02 Akim Demaille <akim@epita.fr>
10375
10376 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
10377 message.
10378
22e304a6
AD
103792003-03-02 Akim Demaille <akim@epita.fr>
10380
22e304a6
AD
10381 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
10382 Use them to exercise yycheck overrun.
10383 Based on Andrew Suffield's grammar.
10384
67a25fed
AD
103852003-03-02 Akim Demaille <akim@epita.fr>
10386
10387 Create tests/local.at for Bison generic testing macros.
10388
10389 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
10390 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
10391 This new file.
10392 * tests/calc.at (AT_CHECK_CALC): Adjust.
10393 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
10394 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
10395 * tests/local.at: here.
10396 (AT_COMPILE_CXX): Tags the tests using it as c++.
10397 Ignore the test if CXX is not functional.
10398
9c2b381f
PE
103992003-03-01 Paul Eggert <eggert@twinsun.com>
10400
10401 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
10402 not loc->end, since loc->end might contain garbage and this leads
10403 to undefined behavior on some platforms.
10404 (id_loc, token_start): Use (IF_LINTed) initial values that do not
10405 depend on *loc, so that the reader doesn't give the the false
10406 impression that *loc is initialized.
10407 (<INITIAL>"%%"): Do not bother setting code_start, since its value
10408 does not survive the return.
10409
0433ba88
AD
104102003-03-01 Akim Demaille <akim@epita.fr>
10411
10412 * src/scan-gram.l (code_start): Always initialize it when entering
10413 into yylex, as SC_EPILOGUE is activated *before* the corresponding
10414 yylex invocation. An alternative would be making it static, but
10415 then it starts with the second %%'s beginning, instead of its end.
10416
b305ea69
PE
104172003-02-28 Paul Eggert <eggert@twinsun.com>
10418
10419 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
10420 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 10421 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 10422
c3d25e01
PE
104232003-02-26 Paul Eggert <eggert@twinsun.com>
10424
10425 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
10426 Remove Sequent/Pyramid discussion (nobody uses them any more).
10427 Merge VMS and MS-DOS discussion; these ports may well be dead
10428 but let's keep mentioning them for now. Put <> around email
10429 addresses. Add copyright notice.
10430
c267ffbc
PE
104312003-02-24 Paul Eggert <eggert@twinsun.com>
10432
10433 * data/glr.c (yy_reduce_print): yylineno -> yylno,
10434 to avoid collision with flex use of yylineno.
10435 Problem reported by Bruce Lilly in
161a71f3 10436 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
10437 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10438 * data/yacc.c (yy_reduce_print): Likewise.
10439
10440 * config/depcomp: Sync with Automake 1.7.3.
10441
f939fc12
AD
104422003-02-21 Akim Demaille <akim@epita.fr>
10443
10444 * data/lalr1.cc: Use temporary variables instead of casts to
10445 change integer types.
10446 Suggested by Paul Eggert.
10447
95923bd6
AD
104482003-02-21 Akim Demaille <akim@epita.fr>
10449
10450 * doc/bison.texinfo: Use "location" consistently to refer to @n,
10451 to avoid confusions with lalr1.cc's notion of Position.
10452 Suggested by Paul Eggert.
10453
2cdc240e
AD
104542003-02-20 Akim Demaille <akim@epita.fr>
10455
10456 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
10457 before initial_columns.
10458 (location.hh): Use consistent variable names when defining the
10459 operator<<.
10460 Use "last" so that we subtract from Positions, not from unsigned.
10461
5d003116
AD
104622003-02-20 Akim Demaille <akim@epita.fr>
10463
10464 * data/lalr1.cc (position.hh): New subfile, including the extended
10465 and Doxygen'ed documentation of class Position.
10466 (location.hh): Use it.
10467 Document a` la Doxygen.
ba1ecc07 10468 With the help of Benoit Perrot.
5d003116 10469
d02b25f9
AD
104702003-02-20 Akim Demaille <akim@epita.fr>
10471
10472 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
10473 AT_YACC_IF.
10474 Redefine AT_YYERROR_SEES_LOC_IF using it.
10475 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
10476 not defined.
10477 Don't use the location in yy::Parser::error_ and
10478 yy::Parser::print_ when not %locations.
10479 Activate more lalr1.cc tests.
10480
0d1c3a04
AD
104812003-02-19 Akim Demaille <akim@epita.fr>
10482
10483 * data/lalr1.cc: When displaying a line number, be sure to make it
10484 an int.
10485
60a777aa
AD
104862003-02-19 Akim Demaille <akim@epita.fr>
10487
10488 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
10489 Remove, useless.
10490 (YYABORT, YYACCEPT, YYERROR): New.
10491 * tests/calc.at: Renable the lalr1.cc test.
10492
0b86fc41
AD
104932003-02-19 Akim Demaille <akim@epita.fr>
10494
10495 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
10496 error recovery, mixing with/without pops and discarding of the
10497 lookahead.
10498 Exercise YYERROR.
10499 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
10500
da99a5dc
PE
105012003-02-17 Paul Eggert <eggert@twinsun.com>
10502
10503 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
10504 * tests/testsuite.at (AT_COMPILE): Use them.
10505 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 10506 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 10507
93b8c255
PE
105082003-02-12 Paul Eggert <eggert@twinsun.com>
10509
10510 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
10511 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 10512 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
10513 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
10514 Check for malloc failure, for consistency with yacc.c.
10515 (yytname_size): Remove, for consistency with yacc.c.
10516
10517 The bug still remains in data/lalr1.cc, as I didn't have time
10518 to fix it there.
10519
7548fed2
AD
105202003-02-06 Akim Demaille <akim@epita.fr>
10521
10522 * configure.ac (GXX): Rename as...
10523 (CXX): this, to keep the original Autoconf semantics.
10524 Require 2.57.
10525 * data/lalr1.cc: Fix b4_copyright invocations.
10526 If YYDEBUG is not defined, don't depend upon name_ being defined.
10527 (location.hh): Include string and iostream.
10528 (Position::filename): New member.
10529 (Position::Position ()): New.
10530 (operator<< (Position)): New.
10531 (operator- (Position, int)): New.
10532 (Location::first, Location::last): Rename as...
10533 (Location::begin, Location::end): these, to mock the conventional
10534 iterator names.
10535 (operator<< (Location)): New.
10536 * tests/atlocal.in (CXX): New.
10537 * tests/testsuite.at (AT_COMPILE_CXX): New.
10538 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
10539 locations in a more synthetic way.
10540 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
10541 lalr1.cc is used.
10542 Adjust the C locations to match those from Emacs: first column is
10543 column 0.
10544 Change all the expected results.
10545 Conform to the GCS: simplify the locations when applicable.
10546 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
10547 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
10548 these CPP macros with the m4 macros new defined by...
10549 (AT_CHECK_PUSHDEFS): this, i.e.:
10550 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 10551 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
10552 New macros.
10553 (AT_CHECK_POPDEFS): Undefine them.
10554 (AT_CHECK_CALC_LALR1_CC): New.
10555 Use it for the first lalr1.cc test.
10556
43a176ef
AD
105572003-02-04 Akim Demaille <akim@epita.fr>
10558
10559 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
10560 Location as is defined.
10561
fc049e9c
AD
105622003-02-04 Akim Demaille <akim@epita.fr>
10563
10564 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
10565 name_ being defined.
10566
a737b216
PE
105672003-02-03 Paul Eggert <eggert@twinsun.com>
10568
10569 * src/gram.h (start_symbol): Remove unused decl.
10570
10571 Use more-consistent naming conventions for local vars.
10572
10573 * src/derives.c (derives_compute): Change type of local var from
10574 int to rule_number.
10575 * src/gram.c (grammar_rules_partial_print): Likewise.
10576 * src/print.c (print_core): Likewise.
10577 * src/reduce.c (reduce_grammar_tables): Likewise.
10578
10579 * src/gram.c (grammar_dump): Change name of item_number *
10580 local var from r to rp.
10581 * src/nullable.c (nullable_compute): Likewise.
10582
10583 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
10584
10585 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
10586 for symbol or symbol_number var.
10587 * src/reader.c (grammar_start_symbol_set): Likewise.
10588 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
10589 Likewise.
10590 * src/state.c (transitions_to): Likewise.
10591 * src/state.h: Likewise.
10592 * src/tables.c (symbol_number_to_vector_number): Likewise.
10593
10594 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
10595 char * var.
10596
10597 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
10598 var.
10599
10600 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
10601 var.
10602
10603 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
10604 Use str, not s, for char * var. Use ch, not c, for character var.
10605 Use size for size var.
10606
10607 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
10608 char * var.
10609 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
10610 uniqstr var.
10611 * src/uniqstr.h: Likewise.
10612
10613 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10614 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10615 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
10616 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
10617 param to have same name as that of enum, so that we don't use
10618 "s" to stand for a non-state.
10619
68e93ad5
AD
106202003-02-02 Akim Demaille <akim@epita.fr>
10621
10622 * src/scan-skel.l: Scan more than one inert character per yylex
10623 invocation.
10624
92898986
PE
106252003-02-01 Paul Eggert <eggert@twinsun.com>
10626
10627 Version 1.875a.
10628
1d9d5d71
PE
10629 * po/LINGUAS: Add ms.
10630
0435d061
AD
106312003-01-30 Akim Demaille <akim@epita.fr>
10632
10633 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
10634
6029a57f
PH
106352003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10636
10637 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
10638 of $1.
0435d061
AD
10639
10640 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 10641 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 10642 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 10643
6029a57f
PH
10644 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
10645 (b4_rhs_location): Ditto.
0435d061 10646 (yyfill): New function to copy from stack tree into array
6029a57f 10647 incrementally.
0435d061
AD
10648 (yyuserAction): Modify to allow incremental move of semantic values
10649 to rhs array when in GLR mode.
10650 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
10651 as needed.
10652 Remove dummy use of yystack, as there is now a guaranteed use.
10653 (yydoAction): Modify to allow incremental move of semantic values
10654 to rhs array when in GLR mode.
10655 (yyresolveAction): Ditto.
10656 (yyglrShiftDefer): Update comment.
0435d061 10657 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
10658 (yyglrReduce): Ditto.
10659 (yydoAction): Ditto
0435d061 10660
6029a57f
PH
10661 * tests/glr-regr1.at: Rename to ...
10662 * tests/glr-regression.at: Add new regression test for the problems
10663 described above (adapted from S. Eken).
10664 Update copyright notice.
10665 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
10666 * tests/Makefile.am: Ditto.
10667
6cee6297
PE
106682003-01-28 Paul Eggert <eggert@twinsun.com>
10669
10670 * data/lalr1.cc: Do not use @output_header_name@ unless
10671 b4_defines_flag is set. This fixes two bugs reported by
10672 Tim Van Holder in
161a71f3
PE
10673 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
10674 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 10675
b2a836b5
PE
106762003-01-21 Paul Eggert <eggert@twinsun.com>
10677
10678 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
10679 we don't need to worry about yyerrlab1 being reported as an
10680 "unused label" by non-GCC C compilers. The downside is that if
10681 locations are used then a couple of statements are duplicated each
10682 time YYERROR is invoked, but the upside is that the warnings
10683 should vanish.
10684 (yyerrlab1): Move code to YERROR.
10685 (yyerrlab2): Remove. Change uses back to yyerrlab1.
10686 This reverts some of the 2002-12-27 change.
10687
4196b931
PE
106882003-01-17 Paul Eggert <eggert@twinsun.com>
10689
10690 * src/output.c (symbol_printers_output): Fix typo that led
10691 to core dump. Problem reported by Antonio Rus in
161a71f3 10692 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 10693
3ae831b4
AD
106942003-01-13 Akim Demaille <akim@epita.fr>,
10695 Quoc Peyrot <chojin@lrde.epita.fr>,
10696 Robert Anisko <anisko_r@lrde.epita.fr>
10697
10698 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
10699 when the stacks contain one element, as the loop would otherwise
10700 free the last state, and then use the top state (the one we just
10701 popped). This means that the initial elements will not be freed
10702 explicitly, as is the case in yacc.c; it is not a problem, as
10703 these elements have fake values.
10704
e3aa65c5
PE
107052003-01-11 Paul Eggert <eggert@twinsun.com>
10706
10707 * NEWS: %expect-violations are now just warnings, reverting
10708 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
10709 bootstrapping problem reported by Matthias Klose; see
161a71f3 10710 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
10711 * src/conflicts.c (conflicts_print): Likewise.
10712 * tests/conflicts.at (%expect not enough, %expect too much,
10713 %expect with reduce conflicts): Likewise.
10714 * doc/bison.texinfo (Expect Decl): Document this. Also mention
10715 that the warning is enabled if the number of conflicts changes
10716 (not necessarily increases).
10717
10718 * src/getargs.c (version): Update copyright year.
10719
f0057011
AD
107202003-01-09 Akim Demaille <akim@epita.fr>
10721
10722 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
10723
1ee6d2a0
PE
107242003-01-08 Paul Eggert <eggert@twinsun.com>
10725
10726 * Makefile.maint (WGETFLAGS):
10727 New macro, containing "-C off" to disable proxy caches.
10728 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
10729 (rel-check): Use $(WGET) instead of wget.
10730
d4fd77c4
PE
107312003-01-06 Paul Eggert <eggert@twinsun.com>
10732
10733 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
10734 the GLR paper of Scott, Johnstone and Hussain.
10735
464c6927
PE
107362003-01-04 Paul Eggert <eggert@twinsun.com>
10737
d600ee67
PE
10738 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
10739 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
10740 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
10741 (EXTRA_LIBRARIES): New var, for liby.a.
10742 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
10743 (EXTRA_SCRIPTS): New var, for yacc.
10744
464c6927
PE
10745 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
10746 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
10747 Problem reported by Nelson H. F. Beebe.
10748
107492003-01-03 Paul Eggert <eggert@twinsun.com>
10750
10751 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
10752 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
10753 when compiling Bison 1.875's `bitset bset = obstack_alloc
10754 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
10755
10756 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
10757 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
10758 grow to a huge size with typical invocation.
d600ee67 10759
464c6927
PE
10760 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
10761 Use the pattern recommended by Autoconf 2.57, except also protect
10762 against double-definition.
10763 * src/system.h: Likewise.
10764 Portability issues reported by Nelson H. F. Beebe.
d600ee67 10765
464c6927
PE
10766 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
10767 All uses changed. Provide a definition in both C and C++.
10768 (yytrue, yyfalse): Define even if defined (__cplusplus).
10769
10770 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
10771 Reported by Nelson H. F. Beebe.
d600ee67 10772
464c6927
PE
10773 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
10774
0f42c7d5
PE
107752003-01-02 Paul Eggert <eggert@twinsun.com>
10776
10777 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
10778 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
10779 Bug reported by Nelson H. F. Beebe.
10780
dc546b0f
PE
107812003-01-01 Paul Eggert <eggert@twinsun.com>
10782
10783 * Version 1.875.
10784
2c09b6a7
PE
107852002-12-30 Paul Eggert <eggert@twinsun.com>
10786
10787 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
10788 Moved here from...
10789 (<INITIAL>","): Here. This causes stray "," to be treated
10790 more uniformly.
10791
dc546b0f 10792 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
10793 last brace in braced code when not in Yacc mode, for compatibility
10794 with Bison 1.35. This resurrects the 2001-12-15 patch to
10795 src/reader.c.
10796
10797 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
10798 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
10799
535c0f63
PE
108002002-12-28 Paul Eggert <eggert@twinsun.com>
10801
10802 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
10803 that of SYM's type. This fixes Debian bug 168069, reported by
10804 Thomas Olsson.
d600ee67 10805
963fcc17
PE
108062002-12-28 Paul Eggert <eggert@twinsun.com>
10807
10808 Version 1.75f.
10809
10810 Switch back to the Yacc style of conflict reports, undoing some
10811 of the 2002-07-30 change.
10812 * doc/bison.texinfo (Understanding): Use Yacc style for
10813 conflict reports. Also, use new way of locating rules.
10814 * src/conflicts.c (conflict_report):
10815 Renamed from conflict_report_yacc, removing the old
10816 'conflict_report'. Translate the entire conflict report at once,
10817 so that we don't assume that "," has the same interpretation in
10818 all languages.
10819 (conflicts_output): Use Yacc-style conflict report for each state,
10820 instead of our more-complicated style.
10821 (conflicts_print): Use Yacc-style conflict report, except print
10822 the input file name when not emulating Yacc.
10823 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
10824 Conflicted Reduction, %expect not enough, %expect too much,
10825 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
10826 * tests/existing.at (GNU Cim Grammar): Likewise.
10827 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
10828
10829 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
10830 fatal): Don't invoke fflush; it's not needed and it might even be
10831 harmful for stdout, as stdout might not be open.
10832 * src/reduce.c (reduce_print): Likewise.
10833
b1efe548
PE
108342002-12-27 Paul Eggert <eggert@twinsun.com>
10835
10836 Fix a bug where error locations were not being recorded correctly.
10837 This problem was originally reported by Paul Hilfinger in
161a71f3 10838 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
10839
10840 * data/yacc.c (yyparse): New local var yylerrsp, to record the
10841 top of the location stack's error locations.
10842 (yyerrlab): Set it. When discarding a token, push its location
10843 onto yylerrsp so that we don't lose track of the error's end.
10844 (yyerrlab1): Now is only the target of YYERROR, so that we can
10845 properly record the location of the action that failed. For GCC
10846 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
10847 GCC warning about yyerrlab1 being unused if YYERROR is unused.
10848 (yyerrlab2): New label, which yyerrlab now falls through to.
10849 Compute the error's location by applying YYLLOC_DEFAULT to
10850 the locations of all the symbols that went into the error.
10851 * doc/bison.texinfo (Location Default Action): Mention that
10852 YYLLOC_DEFAULT is also invoked for syntax errors.
10853 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10854 Error locations include the locations of all the tokens that were
10855 discarded, not just the last token.
d600ee67 10856
983c5c2c
PE
108572002-12-26 Paul Eggert <eggert@twinsun.com>
10858
b1efe548
PE
10859 * src/files.c: Include quote.h.
10860 (compute_output_file_names): Warn if we detect conflicting
10861 outputs to the same file. This should catch the misunderstanding
10862 exemplified by Debian Bug 165349, reported by Bruce Stephens..
10863
10864 * src/conflicts.c (conflicts_print): If the user specifies
10865 "%expect N", report an error if there are any reduce/reduce
10866 conflicts. This is what the manual says should happen.
10867 This fixes Debian bug 130890, reported by Anthony DeRobertis.
10868 * tests/conflicts.at (%expect with reduce conflicts): New test.
10869
983c5c2c
PE
10870 Don't use m4_include on relative file names, as it doesn't work as
10871 desired if there happens to be a file with that name under ".".
d600ee67 10872
983c5c2c
PE
10873 * m4sugar/version.m4: Remove; it was included but it wasn't used.
10874 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
10875 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
10876 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
10877 * src/output.c (output_skeleton): Use full path names when
10878 specifying a file to include; don't rely on include path, as
10879 it's unreliable when the working file contains a file with
10880 that name.
d600ee67 10881
983c5c2c
PE
108822002-12-25 Paul Eggert <eggert@twinsun.com>
10883
10884 Remove obsolete references to bison.simple and bison.hairy.
10885 Problem mentioned by Aubin Mahe in
161a71f3 10886 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
10887 * data/glr.c: Comment fix.
10888 * doc/bison.1: Remove references. Also, mention "yacc".
10889
10890 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
10891 with -g option.
10892
10893 * src/parse-gram.y (declaration): Use enum "report_states" rather
10894 than its numeric value 1.
10895
10896 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
10897 opening a new one. This fixes Debian bug 165349, reported by
10898 Bruce Stephens.
10899
23f2d9dc
PE
109002002-12-24 Paul Eggert <eggert@twinsun.com>
10901
10902 Version 1.75e.
10903
10904 * Makefile.maint (cvs-update): Don't assume that the shell
10905 supports $(...), as Solaris sh doesn't.
10906
10907 * src/parse-gram.y (lloc_default): Remove test for empty
10908 nonterminals at the end, since it didn't change the result.
10909
109102002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
10911
10912 If the user does not define YYSTYPE as a macro, Bison now declares it
10913 using typedef instead of defining it as a macro. POSIX requires this.
10914 For consistency, YYLTYPE is also declared instead of defined.
10915
10916 %union directives can now have a tag before the `{', e.g., the
10917 directive `%union foo {...}' now generates the C code
10918 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
10919 The default union tag is `YYSTYPE', for compatibility with Solaris 9
10920 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
10921 instead of `yyltype'.
10922
10923 `yystype' and `yyltype' are now obsolescent macros instead of being
10924 typedefs or tags; they are no longer documented and will be
10925 withdrawn in a future release.
10926
10927 * data/glr.c (b4_location_type): Remove.
10928 (YYSTYPE): Renamed from yystype.
10929 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
10930 (struct YYLTYPE): Renamed from struct yyltype.
10931 (YYLTYPE): Renamed from yyltype.
10932 (yyltype, yystype): New (and obsolescent) macros,
10933 for backward compatibility.
10934 * data/yacc.c: Likewise.
10935
10936 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
10937 does not specify a union tag. This is for compatibility with
10938 Solaris 9 yacc.
10939
10940 * src/parse-gram.y (add_param): 2nd arg is now char * not char
10941 const *, since it is now modified by stripping surrounding { }.
10942 (current_braced_code): Remove.
10943 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
10944 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
10945 trailing " {...}". Now of type <chars>.
10946 (grammar_declaration): Adjust to bundled tokens.
10947 (code_content): Remove; stripping is now done by add_param.
10948 (print_token_value): Print contents of bundled tokens.
10949 (token_name): New function.
10950
10951 * src/reader.h (braced_code, current_braced_code): Remove.
10952 (token_name): New decl.
10953
10954 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
10955 token_type, not braced_code code_kind. All uses changed.
10956 (SC_PRE_CODE): New state, for scanning after a keyword that
10957 has (or usually has) an immediately-following braced code.
10958 (token_type): New local var, to keep track of which token type
10959 to return when scanning braced code.
10960 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 10961 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
10962 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
10963 instead of returning a token type immediately.
10964 (<INITIAL>"{"): Set token type.
10965 (<SC_BRACED_CODE>"}"): Use it.
10966 (handle_action_dollar, handle_action_at): Now returns bool
10967 indicating success. Fail if ! current_rule; this prevents a core dump.
10968 (handle_symbol_code_dollar, handle_symbol_code_at):
10969 Remove; merge body into caller.
10970 (handle_dollar, handle_at): Complain in invalid contexts.
10971
10972 * NEWS, doc/bison.texinfo: Document the above.
10973 * NEWS: Fix years and program names in copyright notice.
10974
879ca4f8
PE
109752002-12-17 Paul Eggert <eggert@twinsun.com>
10976
10977 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
10978 Reporting, Table of Symbols): Omit mentions of %lex-param and
10979 %parse-param from the documentation for now.
10980
1c5fe69d
PE
109812002-12-15 Paul Eggert <eggert@twinsun.com>
10982
10983 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
10984 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
10985 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
10986 disagreed with the Bison documentation. Bug
10987 reported by Andrew Walrond.
d600ee67 10988
1c5fe69d
PE
10989 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
10990 as the caller now does that.
10991 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
10992 (YYEMPTY): Parenthesize right hand side, since others use it.
10993 (yyparse): Don't assume that our generated code is the only code
10994 that sets yychar.
10995
d1de5372
PE
109962002-12-13 Paul Eggert <eggert@twinsun.com>
10997
10998 Version 1.75d.
10999
11000 POSIX requires a "yacc" command.
11001 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
11002 (MOSTLYCLEANFILES): Add yacc.
11003 (yacc): New rule.
1c5fe69d 11004 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
11005 as an alias for bison y.
11006
11007 * po/LINGUAS: Add da.
d600ee67 11008
d1de5372
PE
11009 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
11010 problem with latest <getopt.h>.
11011 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
11012
11013 * doc/fdl.texi: Upgrade to 1.2.
11014 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
11015 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
11016 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
11017 gnulib.
11018 * config/install-sh: Sync with autotools.
11019
11020 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 11021 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
11022 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
11023 locations are requested.
11024 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
11025 locations are requested.
11026
d0f3fe23
PE
110272002-12-12 Paul Eggert <eggert@twinsun.com>
11028
11029 Remove unportable casts and storage allocation tricks.
11030 While we're at it, remove almost all casts, since they
11031 usually aren't needed and are a sign of trouble.
11032
11033 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
11034
11035 * src/derives.c (derives_compute): Do not subtract NTOKENS from
11036 the pointer DSET returned by malloc; this isn't portable.
11037 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
11038 Similarly for DERIVES.
11039 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
11040 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
11041 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
11042
11043 * src/derives.c (derives_compute): Do not bother invoking
11044 int_of_rule_number, since rule numbers are integers.
11045
11046 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
11047 rather than XMALLOC (char, N).
11048
11049 * src/files.c (filename_split): Rewrite to avoid cast.
11050
11051 * src/gram.h (symbol_number_as_item_number,
11052 item_number_as_symbol_number, rule_number_as_item_number,
11053 item_number_as_rule_number):
11054 Now inline functions rather than macros, to avoid casts.
11055 * src/state.h (state_number_as_int): Likewise.
11056 * src/tables.c (state_number_to_vector_number,
11057 symbol_number_to_vector_number): Likewise.
11058
11059 * src/gram.h (int_of_rule_number): Remove; no longer used.
11060
11061 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
11062 since the resulting storage is always stored into.
11063
11064 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
11065 where it's needed.
11066
11067 * src/muscle_tab.c (muscle_m4_output):
11068 Now inline. Return bool, not int.
11069 * src/state.c (state_compare): Likewise.
11070 * src/symtab.c (symbol_check_defined,
11071 symbol_check_alias_consistency, symbol_pack, symbol_translation,
11072 hash_compare_symbol, hash_symbol):
11073 Likewise.
11074 * src/uniqstr.c (uniqstr_print): Likewise.
11075 * src/muscle_tab.c (muscle_m4_output_processor):
11076 New function, to avoid casts.
11077 * src/state.c (state_comparator, stage_hasher): Likewise.
11078 * src/symtab.c (symbol_check_defined_processor,
11079 symbol_check_alias_consistency_processor, symbol_pack_processor,
11080 symbol_translation_processor, hash_symbol_comparator,
11081 hash_symbol_hasher): Likewise.
11082 * src/uniqstr.c (uniqstr_print_processor): Likewise.
11083 * src/muscle_tab.c (muscles_m4_output):
11084 Use new functions instead of casting old functions unportably.
11085 * src/state.c (state_hash_new): Likewise.
11086 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
11087 symbols_token_translations_init):
11088 Likewise.
11089 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
11090
11091 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
11092 var instead of casting to long, to avoid casts.
11093 (prepare_states): Use MALLOC rather than alloca, so that we don't
11094 have to worry about alloca.
11095 * src/state.c (state_hash_lookup): Likewise.
11096
11097 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
11098 local var instead of casting to unsigned char, to avoid casts.
11099
11100 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
11101 STATE_ALLOC): Remove.
11102 (transitions_new, errs_new, reductions_new, state_new): Use malloc
11103 rather than calloc, and use offsetof to avoid allocating slightly
11104 too much storage.
11105 (state_new): Initialize all members.
11106
11107 * src/state.c (state_hash): Use unsigned accumulator, not signed.
11108
11109 * src/symtab.c (symbol_free): Remove; unused.
11110 (symbol_get): Remove cast in lhs of assignment.
11111 (symbols_do): Now static. Accept generic arguments, not
11112 hashing-related ones.
11113
11114 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
11115 (symbol_processor): Remove.
11116 (symbols_do): Remove decl; now static.
11117
11118 * src/system.h (alloca): Remove; decl no longer needed.
11119 (<stddef.h>): Include, for offsetof.
11120 (<inttypes.>, <stdint.h>): Include if available.
11121 (uintptr_t): New type, if system lacks it.
11122 (CALLOC, MALLOC, REALLOC): New macros.
11123 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
11124 new macros.
11125
11126 * src/tables.c (table_size): Now int, to pacify GCC.
11127 (table_grow, table_ninf_remap): Use signed table size.
11128 (save_row): Don't bother initializing locals when not needed.
11129 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
11130 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
11131
11132 * src/vcg.h: Correct misspellings.
11133
11134 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
11135
11136
11137 * src/getargs.c (getargs): Don't assume EOF == -1.
11138
26b4a969
PE
111392002-12-09 Paul Eggert <eggert@twinsun.com>
11140
11141 Change identifier spellings to avoid collisions with names
11142 that are reserved by POSIX.
11143
11144 Don't use names ending in _t, since POSIX reserves them.
11145 For consistency, remove _e and _s endings -- they're weren't
11146 needed to remove ambiguity. All uses changed.
11147 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
11148 turn was just renamed from struniq_t.
11149 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
11150 which in turn was just renamed from struniq_processor_t.
11151 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
11152 in turn was renamed from hash_compare_struniq_t.
11153 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
11154 (state_list): Renamed from state_list_t.
11155 * src/assoc.h (assoc): Renamed from assoc_t.
11156 * src/conflicts.c (enum conflict_resolution): Renamed from
11157 enum conflict_resolution_e.
11158 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
11159 (rule_list): Renamed from rule_list_t.
11160 * src/getargs.h (enum trace): Renamed from enum trace_e.
11161 (enum report): Renamed from enum report_e.
11162 * src/gram.h (item_number): Renamed from item_number_t.
11163 (rule_number): Renamed from rule_number_t.
11164 (struct rule_s): Remove the "rule_s" part; not used.
11165 (rule): Renamed from rule_t.
11166 (rule_filter): Renamed from rule_filter_t.
11167 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
11168 (goto_list): Renamed from goto_list_t.
11169 * src/lalr.h (goto_number): Renamed from goto_number_t.
11170 * src/location.h (location): Renamed from location_t.
11171 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
11172 and moved here from:
11173 * src/muscle_tab.h (muscle_entry_t): here.
11174 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
11175 (rule_list): Renamed from rule_list_t.
11176 * src/print_graph.c (static_graph): Renamed from graph.
11177 * src/reader.h (braced_code): Renamed from braced_code_t.
11178 Remove brace_code_e tag.
11179 * src/relation.h (relation_node): Renamed from relation_node_t.
11180 (relation_nodes): Renamed from relation_nodes_t.
11181 (relation): Renamed from relation_t.
11182 * src/state.h (state_number): Renamed from state_number_t.
11183 (struct state): Renamed from struct state_s.
11184 (state): Renamed from state_t.
11185 (transitions): Renamed from transitions_t. Unused (and
11186 misspelled) transtion_s tag removed.
11187 (errs): Renamed from errs_t. Unused errs_s tag removed.
11188 (reductions): Renamed from reductions_t. Unused tag
11189 reductions_s removed.
11190 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
11191 (struct symbol_list): Renamed from struct symbol_list_s.
11192 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
11193 (struct symbol): Renamed from struct symbol_s.
11194 (symbol): Renamed from symbol_t.
11195 * src/tables.c (vector_number): Renamed from vector_number_t.
11196 (action_number): Renamed from action_t.
11197 * src/tables.h (base_number): Renamed from base_t.
11198 * src/vcg.h (enum color): Renamed from enum color_e.
11199 (enum textmode): Renamed from enum textmode_e.
11200 (enum shape): Renamed from enum shape_e.
11201 (struct colorentry): Renamed from struct colorentry_s.
11202 (struct classname): Renamed from struct classname_s.
11203 (struct infoname): Renamed from struct infoname_s.
11204 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
11205 (enum decision): Renamed from enum decision_e.
11206 (enum orientation): Renamed from enum orientation_e.
11207 (enum alignment): Renamed from enum alignment_e.
11208 (enum arrow_mode): Renamed from enum arrow_mode_e.
11209 (enum crossing_type): Renamed from enum crossing_type_e.
11210 (enum view): Renamed from enum view_e.
11211 (struct node): Renamed from struct node_s.
11212 (node): Renamed from node_t.
11213 (enum linestyle): Renamed from enum linestyle_e.
11214 (enum arrowstyle): Renamed from enum arrowstyle_e.
11215 (struct edge): Renamed from struct edge.
11216 (edge): Renamed from edge_t.
11217 (struct graph): Renamed from struct graph_s.
11218 (graph): Renamed from graph_t.
11219 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
11220 Rename value_t -> value.
11221 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
11222 value_t_as_yystype -> value_as_yystype.
11223
11224 Don't include <errno.h> in the mainstream code, since it
11225 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
11226 * lib/get-errno.c, lib/get-errno.h: New files.
11227 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
11228 get-errno.c.
11229 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
11230 * src/output.c (output_skeleton): Likewise.
11231 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
11232 instead of errno.
11233 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
11234 Likewise.
11235 (handle_action_dollar, handle_action_at): Likewise.
11236 * src/system.h: Do not include <errno.h>.
11237 (TAB_EXT): Renamed from EXT_TAB.
11238 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
11239
11240 Avoid str[a-z]*, since <string.h> reserves that name space.
11241 Change all instances of "struniq" in names to "uniqstr", and
11242 likewise for "STRUNIQ" and "UNIQSTR".
11243 * src/uniqstr.c: Renamed from src/struniq.c.
11244 * src/uniqstr.h: Renamed from src/struniq.h.
11245 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
11246 * src/files.c (strsuffix): Remove; unused.
11247 (concat2): Renamed from stringappend. Now static.
11248 * src/files.h (strsuffix, stringappend): Remove; unused.
11249 * src/parse-gram.y (<chars>): Renamed from <string>.
11250 (<uniqstr>): Renamed from <struniq>.
11251 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
11252 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
11253 (struct graph_s.expand): Renamed from struct graph_s.stretch.
11254 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
11255 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
11256 (N_EXPAND): Renamed from N_STRETCH.
11257
11258 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
11259 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
11260 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
11261 Remove; unused.
11262 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
11263 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
11264 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
11265 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
11266 (BASE_MAXIMUM): Renamed from BASE_MAX.
11267 (BASE_MINIMUM): Renamed from BASE_MIN.
11268 (ACTION_MAX): Remove; unused.
11269 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
11270 Unnecessary casts removed from above defines.
11271
11272
11273 Fix misspelling in names.
11274 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
11275 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
11276 G_NODE_ALIGNEMENT.
11277
11278
11279 * lib/timevar.c (timevar_report): Renamed from time_report,
11280 for consistency with other names.
11281 * lib/timevar.h (timevar_report): New decl.
11282 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
11283
11284
11285 Sort include-file uses.
11286
11287 Reorder all include files under src to be in the order "system.h".
11288 then the ../lib include files in angle brackets (alphabetized),
11289 then the . include files in double-quotes (alphabetized). Fix
11290 dependency breakages encountered in this process, as follows:
11291 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
11292 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
11293 * src/state.h: Include "symtab.h".
11294
996b1c7e
PE
112952002-12-08 Paul Eggert <eggert@twinsun.com>
11296
11297 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
11298 since this causes problems when __file__ contains character
11299 sequences like "@" that are treated specially by src/scan-skel.l.
11300 Instead, just use the file's basename. This fixes the bug
11301 reported by Martin Mokrejs in
161a71f3 11302 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 11303
e19c4e5d
PE
113042002-12-06 Paul Eggert <eggert@twinsun.com>
11305
11306 Add support for rules that do not have trailing semicolons, as
11307 POSIX requires. Improve the quality of locations in Bison
11308 diagnostics.
26b4a969 11309
e19c4e5d
PE
11310 * src/location.c: Include <quotearg.h>.
11311 (empty_location): Now const.
11312 (location_print): New function. Follow the recommendation of the
11313 GNU Coding Standards for locations that span file boundaries.
11314 * src/location.h: Do not include <quotearg.h>; no longer needed.
11315 (boundary): New type.
11316 (location_t): Use it. This allows locations to span file boundaries.
11317 All member uses changed: file -> start.file or end.file (as needed),
11318 first_line -> start.line, first_column -> start.column,
11319 last_line -> end.line, last_column -> end.column.
11320 (equal_boundaries): New function.
11321 (LOCATION_RESET, LOCATION_STEP): Remove.
11322 (LOCATION_PRINT): Remove. All callers changed to use location_print.
11323 (empty_location): Now const.
11324 (location_print): New decl.
11325 * src/parse-gram.y (lloc_default): New function, which handles
11326 empty locations more accurately.
11327 (YYLLOC_DEFAULT): Use it.
11328 (%token COLON): Remove.
11329 (%token ID_COLON): New token.
26b4a969 11330 (rules): Use it.
e19c4e5d
PE
11331 (declarations, rules): Remove trailing semicolon.
11332 (declaration, rules_or_grammar_declaration):
11333 Allow empty (";") declaration.
11334 (symbol_def): Remove empty actions; no longer needed.
11335 (rules_or_grammar_declaration): Remove trailing semicolon.
11336 (semi_colon.opt): Remove.
11337 * src/reader.h: Include location.h.
11338 (scanner_cursor): New decl.
11339 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
11340 rolling our own.
11341 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
11342 of *loc.
11343 (STEP): Remove. No longer needed, now that adjust_location does
11344 the work. All uses removed.
11345 (scanner_cursor): New var.
11346 (adjust_location): Renamed from extend_location. It now sets
11347 *loc and adjusts the scanner cursor. All uses changed.
11348 Don't bother testing for CR.
11349 (handle_syncline): Remove location arg; now updates scanner cursor.
11350 All callers changed.
11351 (unexpected_end_of_file): Now accepts start boundary of token or
11352 comment, not location. All callers changed. Update scanner cursor,
11353 not the location.
11354 (SC_AFTER_IDENTIFIER): New state.
11355 (context_state): Renamed from c_context. All uses changed.
11356 (id_loc, code_start, token_start): New local vars.
11357 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
11358 processing of Yacc white space and equivalents here.
11359 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
11360 instead of returning ID immediately, since we need to search for
11361 a subsequent colon.
11362 (<INITIAL>"'", "\""): Save token_start.
11363 (<INITIAL>"%{", "{", "%%"): Save code_start.
11364 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
11365 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
11366 BEGIN context_state at end, not INITIAL.
11367 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
11368 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
11369 Return correct token start.
11370 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
11371 the start of a character, string or multiline comment is found.
11372 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
11373 Reduction): Adjust reported locations to match the more-precise
11374 results now expected.
11375 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
11376 * tests/reduce.at (Useless Rules, Reduced Automaton,
11377 Underivable Rules): Likewise.
11378 * tests/regression.at (Invalid inputs): No longer `expecting ";"
11379 or "|"' now that so many other tokens are allowed by the new grammar.
11380
11381 * src/complain.h (current_file): Remove duplicate decl;
11382 current_file is now owned by files.h.
11383 * src/complain.c, src/scan-gram.l: Include files.h.
11384
113852002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 11386
e19c4e5d
PE
11387 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
11388 promotes to int; it might be unsigned int.
11389 * data/yacc.c (yy_reduce_print): Likewise.
11390
11391 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
11392 be #defined in the prologue, not in the Bison declarations.
11393 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 11394
b64755e3
PE
113952002-12-02 Paul Eggert <eggert@twinsun.com>
11396
11397 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
11398 * lib/strtoul.c: New file, from gnulib.
11399 This fixes a porting bug reported by Peter Klein in
161a71f3 11400 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 11401
6e746484
PE
114022002-11-30 Paul Eggert <eggert@twinsun.com>
11403
b64755e3
PE
11404 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
11405 and put only a forward declaration in the prologue. This is for
11406 consistency with the other scanner helper functions.
11407
6ba55592
PE
11408 Type clashes now generate warnings, not errors, since it
11409 appears that POSIX may allow some grammars with type clashes.
11410 * src/reader.c (grammar_current_rule_check): Warn about
11411 type clashes instead of complaining.
11412 * tests/input.at (Type Clashes): Expect warnings, not complaints.
11413
6e746484
PE
11414 Add Yacc library, since POSIX requires it.
11415 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
11416 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
11417 * lib/main.c, lib/yyerror.c: New files.
11418
11419 gram_error can be static; it need not be extern.
11420 * src/reader.h (gram_error): Remove decl.
11421 * src/parse-gram.y (gram_error): Now static. Add static decl.
11422 (print_token_value): Omit parameter names from forward decl,
11423 for consistency.
11424
88510f9c
PE
114252002-11-29 Paul Eggert <eggert@twinsun.com>
11426
6e746484
PE
11427 * doc/bison.texinfo: Emphasize that yylex and yyerror must
11428 be declared before being used. E.g., one should typically
11429 declare them in the prologue. Use GNU coding style in examples.
11430 Put "const" consistently after the type it modifies. Mention
11431 that C99 supports "inline". Mention that yyerror traditionally
11432 returns "int".
11433
88510f9c
PE
11434 %parse-param and %lex-param now take just one argument, the
11435 declaration; the argument name is deduced from the declaration.
11436
11437 * doc/bison.texinfo (Parser Function, Pure Calling, Error
11438 Reporting, Table of Symbols): Document this.
11439 * src/parse-gram.y (add_param): New function.
11440 (COMMA): Remove.
11441 (declaration): Implement new rule for %parse-param and %lex-param.
11442 * src/scan-gram.l: "," now elicits a warning, rather than being
11443 a token; this is more compatible with byacc.
11444 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
11445
bb92250c
PE
114462002-11-27 Paul Eggert <eggert@twinsun.com>
11447
11448 Rename identifiers to avoid real and potential collisions.
11449
11450 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
11451 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 11452 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
11453 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11454 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
11455 * src/parse-gram.y (print_token_value): Renamed from yyprint.
11456 All uses changed.
11457 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
11458 The name "yycontrol" violates the name space rules, and this stuff
11459 wasn't being used anyway.
11460 (input): Remove action; this stuff wasn't being used.
11461 (gram_error): Rename local variable yylloc -> loc.
11462 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
11463 (YY_DECL): Don't use "yy" at start of local variables.
11464 All uses changed, e.g., yylloc -> loc.
11465 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
11466 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
11467 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
11468 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
11469
11470 * src/parse-gram.y (gram_error): loc is now const *.
11471 * src/reader.h (gram_error): Likewise.
11472
3af4feb2
PE
114732002-11-24 Paul Eggert <eggert@twinsun.com>
11474
11475 Version 1.75c.
11476
11477 * tests/actions.at (Actions after errors): Use an output format
11478 more similar to that of the Printers and Destructors test.
11479 Test the position of the ';' token too.
11480 (Printers and Destructors): Likewise.
11481 (Printers and Destructors: %glr-parser): Remove for now, to avoid
11482 unnecessarily alarming people when the test fails.
11483
11484 * data/yacc.c (yyerrlab1): Move this label down, so that the
11485 parser does not discard the lookahead token if the user code
11486 invokes YYERROR. This change is required for POSIX conformance.
11487
11488 * lib/error.c: Sync with gnulib.
11489
114902002-11-22 Paul Eggert <eggert@twinsun.com>
11491
11492 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
11493 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
11494 * lib/xmalloc.c: Likewise.
26b4a969 11495
58004308
PE
114962002-11-20 Paul Eggert <eggert@twinsun.com>
11497
11498 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
11499
115002002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 11501
58004308
PE
11502 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
11503 should use `if (! x) abort ();' rather than `assert (x);', and
11504 anyway it's one less thing to worry about configuring.
11505
11506 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
11507 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
11508 and replace all instances of assert with abort.
11509 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
11510 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
11511
11512 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
11513 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
11514 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
11515 hash_find_entry, hash_rehash, hash_insert): Likewise.
11516 * src/conflicts.c (resolve_sr_conflict): Likewise.
11517 * src/lalr.c (set_goto_map, map_goto): Likewise.
11518 * src/nullable.c (nullable_compute): Likewise.
11519 * src/output.c (prepare_rules, token_definitions_output): Likewise.
11520 * src/reader.c (packgram, reader): Likewise.
11521 * src/state.c (state_new, state_free, state_transitions_set,
11522 state_reduction_find): Likewise.
11523 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
11524 symbol_pack): Likewise.
11525 * src/tables.c (conflict_row, pack_vector): Likewise.
11526 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
11527 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
11528 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
11529 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
11530
11531 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
11532 (ARGMATCH_CONSTRAINT): New macro.
11533 (ARGMATCH_ASSERT): Use it.
11534
11535 * src/system.h (verify): New macro.
11536 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
11537 rather than assert.
11538 * src/tables.c (tables_generate): Likewise.
11539
11540 * src/struniq.c (struniq_assert): Now returns void, and aborts
11541 if the assertion is false.
11542 (struniq_assert_p): Remove.
11543 * src/struniq.h: Likewise.
11544
76ae8198
PE
115452002-11-18 Paul Eggert <eggert@twinsun.com>
11546
11547 * data/glr.c (yygetLRActions): Replace `yyindex' with
11548 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
11549 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 11550 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 11551
d3c4e709
AD
115522002-11-18 Akim Demaille <akim@epita.fr>
11553
11554 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
11555 space.
11556 From Tim Van Holder.
11557
8d8a7238
PE
115582002-11-17 Paul Eggert <eggert@twinsun.com>
11559
11560 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
11561 to "SyntaxError" for consistency with my 2002-11-15 change.
11562
11563 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
11564 not define to {}, since this breaks the common use of `YYDPRINTF
11565 ((...));' if a single statement is desired (e.g. before `else').
11566 Work around GCC warnings by surrounding corresponding calls with
11567 {} if needed.
11568 (yyhasResolvedValue): Remove unused function.
11569 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
11570 loop body.
11571 (yyreportSyntaxError): Renamed from yyreportParseError.
11572 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
11573 All uses changed.
11574 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
11575 extern when possible. Remove unused initializations.
11576
b0937b22
AD
115772002-11-16 Akim Demaille <akim@epita.fr>
11578
11579 Augment the similarity between GLR and LALR traces.
11580
11581 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
11582 (YY_REDUCE_PRINT): New.
11583 (yyparse): Use them.
11584 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
11585 YYDPRINT here.
11586 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
11587 state reached after the reduction/recovery, since...
11588 (yyparse, yyprocessOneStack): Report the state we are entering in.
11589
c5e3e510
AD
115902002-11-16 Akim Demaille <akim@epita.fr>
11591
11592 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
11593 Add support for --trace=skeleton.
11594 * src/scan-skel.l: %option debug.
11595 Scan strings of non-@ or \n instead of character by character.
11596 (scan_skel): Handle trace_skeleton.
11597 (QPUTS): New.
11598 (@output_parser_name@, @output_header_name@): ``Restore'' their
11599 support (used to be M4 macros).
11600 * data/yacc.c: Quote larger chunks, a la glr.c.
11601 * data/lalr1.cc: Likewise.
11602 The header guards are no longer available, so use some other
11603 string than `YYLSP_NEEDED'.
11604
4c6cc1db
AD
116052002-11-16 Akim Demaille <akim@epita.fr>
11606
11607 Make the ``Printers and Destructors'' test more verbose, taking
11608 `yacc.c''s behavior as (possibly wrong) reference.
11609
11610 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
11611 instead of fprint on stdout.
11612 Set and report the last_line of the symbols.
11613 Consistently display values and locations.
11614
6d9e8019
PE
116152002-11-16 Paul Eggert <eggert@twinsun.com>
11616
11617 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
11618
6e649e65
PE
116192002-11-15 Paul Eggert <eggert@twinsun.com>
11620
b25d88f6
PE
11621 * tests/actions.at (Actions after errors): New test case.
11622
6e649e65
PE
11623 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
11624 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
11625 tests/action.at, tests/calc.at, tests/conflicts.at,
11626 tests/cxx-type.at, tests/regression.at:
11627 "parse error" -> "syntax error" for POSIX compatibility.
11628 "parsing stack overflow..." -> "parser stack overflow" so
11629 that code matches Bison documentation.
11630
0f39aab9
AD
116312002-11-15 Akim Demaille <akim@epita.fr>
11632
11633 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
11634 take two BRACED_CODE, not two string_content.
11635 Free the scanner's obstack when we are done.
11636 (code_content): New.
11637 * tests/calc.at: Adjust.
11638 * doc/bison.texinfo: Adjust.
11639 Also, make sure to include the `,' for these declarations.
11640
761c1926
AD
116412002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
11642
11643 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
11644 definition; avoids potential autoreconf problems.
11645
b0f98b10
AD
116462002-11-15 Akim Demaille <akim@epita.fr>
11647
11648 Always check the value returned by yyparse.
11649
11650 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
11651 returned by yyparse.
11652 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
11653 Adjust calls.
11654 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
11655 returned by yyparse.
11656
970785f1
PH
116572002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11658
11659 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
11660 on input.at test.
11661
8fcc7db1
PE
116622002-11-14 Paul Eggert <eggert@twinsun.com>
11663
7ec1b48e
PE
11664 * src/output.c (output_skeleton): Call xfopen instead of
11665 duplicating xfopen's body.
11666
cfff7583 11667 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 11668 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 11669
8fcc7db1
PE
11670 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
11671 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
11672 Group compiler. Instead, use "$CC -E bar.c". Include the .h
11673 file twice in the grammar, as an extra check.
11674
11675 * tests/input.at (Torturing the Scanner): Surround the
11676 backslash-newline tests with "#if 0", to make it less likely that
11677 we'll run into compiler bugs. Bring back solitary \ inside
11678 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 11679 test backslash-newline in C character constant.
8fcc7db1 11680
4e8d992c
AD
116812002-11-14 Akim Demaille <akim@epita.fr>
11682
11683 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
11684 status of the compiler.
f32b346d 11685 Calling `exit 1' is no longer needed.
4e8d992c
AD
11686 Reported by Nelson H. F. Beebe.
11687
9501dc6e
AD
116882002-11-14 Akim Demaille <akim@epita.fr>
11689
11690 * tests/atlocal.in (CPPFLAGS): We have config.h.
11691 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
11692 New.
11693 * tests/actions.at, tests/calc.at, tests/conflicts.at,
11694 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
11695 * tests/regression.at, tests/torture.at: Use them for all the
11696 grammars that are to be compiled.
11697 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
11698 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
11699 * doc/bison.texinfo (GLR Parsers): Document `inline'.
11700
18b519c0
AD
117012002-11-14 Akim Demaille <akim@epita.fr>
11702
11703 * doc/bison.texinfo: Various formatting changes (alignments in
11704 samples, additional @group/@end group, GCS in samples.
11705 Use @deffn instead of simple @table to define the directives,
11706 macros, variables etc.
11707
9a86cdb9
PE
117082002-11-13 Paul Eggert <eggert@twinsun.com>
11709
daa33def 11710 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 11711 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 11712
daa33def 11713 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 11714 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
11715 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
11716 * tests/headers.at (export YYLTYPE): Likewise.
11717
11718 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 11719 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 11720
9a86cdb9
PE
11721 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
11722 comments, since they're not portable. Use GNU coding style.
11723
9c1e26bd
AD
117242002-11-13 Akim Demaille <akim@epita.fr>
11725
11726 * data/yacc.c: Leave bigger chunks of quoted text.
11727 (YYDSYMPRINTF): New.
11728 Use it to report symbol activities.
11729 * data/glr.c (YYDSYMPRINTF): New.
11730 Use it.
11731
87f721cc
PE
117322002-11-12 Paul Eggert <eggert@twinsun.com>
11733
11734 Version 1.75b.
11735
11736 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
11737 (yyglrReduce): Return yyok, not 0.
11738 This should avoid the enumerated-type warnings reported
464c6927 11739 by Nelson H. F. Beebe in
161a71f3 11740 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
11741
11742 * lib/bbitset.h (BITSET_INLINE): Remove.
11743 * lib/bitset.h [! BITSET_INLINE]: Remove.
11744 (bitset_set, bitset_reset, bitset_test): Rename local vars
11745 to avoid shadowing warnings by GCC.
11746
11747 * data/glr.c (inline): Remove #define. It's the user's
11748 responsibility to #define it away, just like 'const'.
464c6927 11749 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 11750 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 11751
87f721cc
PE
11752 * Makefile.maint (po-check): Scan .l and .y files instead of the
11753 .c and the .h files that they generate. This fixes the bug
11754 reported by Tim Van Holder in:
161a71f3 11755 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
11756 Look for N_ as well as for _. Try to avoid matching #define for
11757 N_ and _.
11758 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
11759 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
11760 * src/scan-gram.l: Revamp regular expressions so that " and '
11761 do not confuse xgettext.
11762
11763 * src/struniq.h (struniq_new): Do not declare the return type
11764 to be 'const'; this violates the C standard.
11765 * src/struniq.c (struniq_new): Likewise.
11766
be14ade5
AD
117672002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
11768
11769 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
11770 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
11771 linker.
11772
05291fbc
AD
117732002-11-12 Akim Demaille <akim@epita.fr>
11774
11775 * Makefile.maint: Sync with Autoconf:
11776 (local_updates): New.
11777
1f5fd52e
AD
117782002-11-12 Akim Demaille <akim@epita.fr>
11779
11780 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
11781
283f1e64
AD
117822002-11-12 Akim Demaille <akim@epita.fr>
11783
11784 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
11785 locations.
11786
886b69d1
AD
117872002-11-12 Akim Demaille <akim@epita.fr>
11788
11789 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
11790 not yyvalue.
11791
3df37415
AD
117922002-11-12 Akim Demaille <akim@epita.fr>
11793
11794 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
11795 Use it to test the GLR parser.
11796
7bd6c77e
AD
117972002-11-12 Akim Demaille <akim@epita.fr>
11798
11799 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
11800 defines it.
11801 * data/glr.c (yystos): New.
11802 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
11803 (YYDSYMPRINT): New.
11804 (yyval): Don't define it, it is handled via M4.
11805 (yyrecoverParseError): Free verbosely the discarded symbols.
11806 * data/yacc.c (yysymprint): Remove, rather...
11807 (b4_yysymprint_generate): invoke.
11808 * data/c.m4 (b4_yysymprint_generate): New.
11809 Accept pointers as arguments, as opposed to the version from
11810 yacc.c.
11811 (b4_yydestruct_generate): Likewise.
11812 * tests/cations.at (Printers and Destructors): Use Bison directives
11813 instead of CPP macros.
11814 Don't rely on internal details.
11815
b0400cc6
AD
118162002-11-12 Akim Demaille <akim@epita.fr>
11817
11818 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
11819 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
11820 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
11821 it against YYEMPTY and so forth), work on yytoken (i.e., set
11822 it to YYEMPTY etc.).
11823 (yydestruct): Replace with a b4_yydestruct_generate invocation.
11824 (b4_symbol_actions): Remove.
11825 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
11826 for 0, end-of-input.
11827
72f889cc
AD
118282002-11-12 Akim Demaille <akim@epita.fr>
11829
11830 * doc/bison.texinfo (Destructor Decl): New.
11831
b1ae9233
AD
118322002-11-12 Akim Demaille <akim@epita.fr>
11833
11834 * src/tables.c (tables_generate): Use free for pointers that
11835 cannot be NULL, not XFREE.
11836 (pack_vector): Use assert, not fatal, for bound violations.
11837 * src/state.c (state_new): Likewise.
11838 * src/reader.c (reader): Likewise.
11839 * src/lalr.c (set_goto_map): Likewise.
72f889cc 11840 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
11841 the file name.
11842
7ec2d4cd
AD
118432002-11-12 Akim Demaille <akim@epita.fr>
11844
11845 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
11846 Restore.
11847 * src/scan-gram.l (last_string): Is global to the file, not to
11848 yylex.
11849 * src/parse-gram.y (input): Don't append the epilogue here,
11850 (epilogue.opt): do it here, and free the scanner's obstack.
11851 * src/reader.c (epilogue_set): Rename as...
11852 (epilogue_augment): this.
11853 * data/c.m4 (b4_epilogue): Defaults to empty.
11854
573a6cd3
AD
118552002-11-12 Akim Demaille <akim@epita.fr>
11856
11857 * src/getargs.c (long_options): Remove duplicates.
11858 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
11859 Remove.
11860 * doc/bison.rnh: Remove.
11861 * doc/bison.texinfo (VMS Invocation): Remove.
11862
95612cfa
AD
118632002-11-12 Akim Demaille <akim@epita.fr>
11864
11865 * src/struniq.h, src/struniq.c (struniq_t): Is const.
11866 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
11867
11868 Use struniq for symbols.
11869
11870 * src/symtab.h (symbol_t): The tag member is a struniq.
11871 (symbol_type_set): Adjust.
11872 * src/symtab.c (symbol_new): Takes a struniq.
11873 (symbol_free): Don't free the tag member.
11874 (hash_compare_symbol_t, hash_symbol_t): Rename as...
11875 (hash_compare_symbol, hash_symbol): these.
11876 Use the fact that tags as struniqs.
11877 (symbol_get): Use struniq_new.
11878 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
11879 Returns a strniq.
11880 * src/reader.h (merger_list, grammar_currentmerge_set): The name
11881 and type members are struniqs.
11882 * src/reader.c (get_merge_function)
11883 (grammar_current_rule_merge_set): Adjust.
11884 (TYPE, current_type): Are struniq.
11885
11886 Use struniq for file names.
11887
11888 * src/files.h, src/files.c (infile): Split into...
11889 (grammar_file, current_file): these.
11890 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
11891 * src/reduce.c (reduce_print): Likewise.
11892 * src/getargs.c (getargs): Likewise.
11893 * src/complain.h, src/complain.c: Likewise.
11894 * src/main.c (main): Call struniqs_new early enough to use it for
11895 file names.
11896 Don't free the input file name.
11897
3e6656f9
AD
118982002-11-12 Akim Demaille <akim@epita.fr>
11899
11900 * src/symtab.c (symbol_free): Remove dead deactivated code:
11901 type_name are properly removed.
11902 Don't use XFREE to free items that cannot be NULL.
11903 * src/struniq.h, src/struniq.c: New.
11904 * src/main.c (main): Initialize/free struniqs.
11905 * src/parse-gram.y (%union): Add astruniq member.
11906 (yyprint): Adjust.
11907 * src/scan-gram.l (<{tag}>): Return a struniq.
11908 Free the obstack bit that used to store it.
11909 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
11910
7672019c
PE
119112002-11-11 Paul Eggert <eggert@twinsun.com>
11912
11913 Revamp to fix many (but not all) of the C- and M4-related quoting
11914 problems. Among other things, this fixes the Bison bug reported
11915 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 11916 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
11917
11918 Use new @ escapes consistently. Represent brackets with @{ and @}
11919 rather than @<:@ and @:>@, since this works a bit better with dumb
11920 editors like vi. Represent @ with @@, since @ is now consistently
11921 an escape. Use @oline@ and @ofile@ rather than __oline__ and
11922 __ofile__, to avoid unexpected expansions. Similarly, use @output
11923 rather than #output.
11924
11925 * data/c.m4 (b4_copyright): Omit file name from comment, since
11926 the file name could contain "*/".
11927 (b4_synclines_flag): Don't quote the 2nd argument; it should already
11928 be quoted. All uses changed.
11929
11930 * data/glr.c: Use new @ escapes consistently.
11931 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
11932 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
11933 Remove, since they couldn't handle arbitrary characters in file
11934 names.
11935 * data/lalr1.cc: Likewise.
11936 * data/yacc.c: Likewise.
11937
11938 * src/files.c (output_infix): Remove; all uses removed.
11939 * src/files.h: Likewise.
11940
11941 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
11942 mishandled funny characters in file names, and anyway it isn't
11943 needed any more.
11944 * data/yacc.c: Likewise.
11945 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
11946
11947 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
11948 * data/yacc.c: Likewise.
11949
11950 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
11951 strings now.
11952 (muscle_init): Quote filename as a C string.
11953 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
11954 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
11955 * src/output.c (escaped_file_name_output): New function.
11956 (prepare_symbols): Quote tokens for M4.
11957 (prepare): Don't insert output_infix, output_prefix,
11958 output_parser_name, output_header_name; this is now down by scan-skel.
11959 Insert skeleton as a C string.
11960
11961 * src/output.c (user_actions_output, symbol_destructors_output,
11962 symbol_printers_output): Quote filenames for C and M4.
11963 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11964
11965 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
11966 escapes other than \\ and \'; this simplifies the code.
11967 (<SC_STRING>): Likewise, for \\ and \".
11968 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
11969 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
11970 Use new escapes @{ and @} for [ and ].
11971
11972 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
11973 them with auto vars.
11974 Switch to new escape scheme, where @ is the escape character uniformly.
11975 Abort if a stray escape character is found. Avoid unbounded input
11976 buffer when parsing non-escaped text.
11977
11978 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
11979 __oline__, #output, $@, and @{ do not have unintended meanings.
11980
acea4f3b
PE
119812002-11-09 Paul Eggert <eggert@twinsun.com>
11982
11983 Fix the test failure due to GCC warnings described in
161a71f3 11984 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
11985 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
11986 evaluate to 0 if it's impossible for NINF to be in the respective
11987 table.
11988 (yygetLRActions, yyrecoverParseError): Use them.
11989
11990 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
11991 counted in the token inserted at end of file. Now takes
11992 location_t *, not location_t, so that the location can be
11993 adjusted. All uses changed.
11994
11995 * tests/regression.at (Invalid inputs): Adjust wording in
11996 diagnostic to match the new behavior.
11997
11998 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
11999 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
12000 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
12001 abort ();'. This reduces the runtime of the "Many lookaheads"
12002 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
12003 GCC 3.2.
12004
20ef1ad5
PE
120052002-11-07 Paul Eggert <eggert@twinsun.com>
12006
12007 * src/parse-gram.y (CHARACTER): Remove unused token.
12008 All uses removed.
12009
12010 * src/scan-gram.l: Remove stack option. We no longer use the
12011 stack, since the stack was never deeper than 1; instead, use the
12012 new auto var c_context to record the stacked value.
12013
12014 Remove nounput option. At an unexpected end of file, we now unput
12015 the minimal input necessary to end cleanly; this simplifies the
12016 code.
12017
12018 Avoid unbounded token sizes where this is easy.
12019
12020 (unexpected_end_of_file): New function.
12021 Use it to systematize the error message on unexpected EOF.
12022 (last-string): Now auto, not static.
12023 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
12024 (scanner_last_string_free): Remove; not used.
12025 (percent_percent_count): Move decl to just before use.
12026 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
12027 not the (never otherwised-used) CHARACTER.
12028
93724f13
AD
120292002-11-07 Akim Demaille <akim@epita.fr>
12030
12031 Let yyerror always receive the msg as last argument, so that
12032 yyerror can be variadic.
12033
12034 * data/yacc.c (b4_yyerror_args): New.
12035 Use it when calling yyerror.
12036 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
12037 Use it when calling yyerror.
12038 * doc/bison.texinfo (Error Reporting): Adjust.
12039 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
12040 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
12041
6e40b4eb
AD
120422002-11-06 Akim Demaille <akim@epita.fr>
12043
12044 #line should have quoted strings.
12045 Ideally, this should be done by m4_quotearg.
12046
12047 * src/scan-skel.l: Include quotearg.h.
12048 Quote __ofile__.
12049 * src/output.c (symbol_printers_output)
12050 (symbol_destructors_output): Quote the file name.
12051
2dfbfc12
AD
120522002-11-06 Akim Demaille <akim@epita.fr>
12053
12054 * tests/regression.at (Invalid inputs): Adjust to the recent
12055 messages.
12056
437c2d80
AD
120572002-11-06 Akim Demaille <akim@epita.fr>
12058
12059 Restore --no-lines.
12060 Reported by Jim Kent.
12061
12062 * data/c.m4 (b4_syncline): New.
12063 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
12064 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
12065 * src/output.c (user_actions_output): Likewise.
12066 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 12067 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 12068
900c5db5
AD
120692002-11-06 Akim Demaille <akim@epita.fr>
12070
12071 * src/main.c (main): Free `infile'.
12072 * src/scan-gram.l (handle_syncline): New.
12073 Recognize `#line'.
12074 * src/output.c (user_actions_output, symbol_destructors_output)
12075 (symbol_printers_output): Use the location's file name, not
12076 infile.
12077 * src/reader.c (prologue_augment, epilogue_set): Likewise.
12078
e183b123 120792002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 12080
e183b123 12081 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 12082 either has GLR conflict entries.
e183b123 12083
193eb6b7
PE
120842002-11-05 Paul Eggert <eggert@twinsun.com>
12085
e183b123
PE
12086 * src/scan-gram.l: Use more accurate diagnostics, e.g.
12087 "integer out of range" rather than "invalid value".
12088 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
12089 accordingly.
12090
193eb6b7
PE
12091 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
12092 Also, remove one static variable in the scanner.
12093
12094 * src/scan-gram.l (braces_level): Now auto, not static.
12095 Initialize to zero if the compiler is being picky.
12096 (INITIAL): Clear braces_level instead of incrementing it.
12097 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
12098 as POSIX 1003.1-2001 requires.
12099 * src/system.h (IF_LINT): New macro, taken from coreutils.
12100 * configure.ac: Define "lint" if --enable-gcc-warnings.
12101
29c01725
AD
121022002-11-05 Akim Demaille <akim@epita.fr>
12103
12104 * src/scan-gram.l: When it starts with `%', complain about the
12105 whole directive, not just that `invalid character: %'.
12106
8aeac3ca
AD
121072002-11-04 Akim Demaille <akim@epita.fr>
12108
12109 * Makefile.maint: Update from Autoconf.
12110 (update, cvs-update, po-update, do-po-update): New.
12111
793a58bb
AD
121122002-11-04 Akim Demaille <akim@epita.fr>
12113
12114 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
12115 and yyerror.
12116 Have yyerror `use' its arguments.
12117 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
12118 returns true when location & yacc & pure & parse-param.
12119 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
12120
c4d720cd
AD
121212002-11-04 Akim Demaille <akim@epita.fr>
12122
12123 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
12124 clashes.
12125 * src/scan-gram.l: Use [\'] instead of ['] to pacify
12126 font-lock-mode.
12127 Use complain_at.
12128 Use quote, not quote_n since LOCATION_PRINT no longer uses the
12129 slot 0.
12130
613a0dc5
PE
121312002-11-03 Paul Eggert <eggert@twinsun.com>
12132
12133 * src/reader.c (get_merge_function, grammar_current_rule_check):
12134 Use consistent diagnostics for reporting type name clashes.
12135 Quote the types with <>, for consistency with Yacc.
12136 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
12137
2a8d363a
AD
121382002-11-03 Akim Demaille <akim@epita.fr>
12139
12140 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
12141 New.
12142 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
12143 (b4_parse_param): Remove.
12144 Use b4_identification.
12145 Propagate b4_pure_args where needed to pass them to yyerror.
12146 * data/glr.m4 (b4_parse_param): Remove.
12147 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
12148 (b4_lpure_formals): New.
12149 Use b4_identification.
12150 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
12151 b4_user_formals and b4_user_args.
12152 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
12153 (yyreportAmbiguity): When using a pure parser, also need
12154 the location, and the parse-params.
12155 Adjust callers.
12156 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
12157 When using a pure parser, also need the parse-params.
12158 Adjust callers.
12159 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
12160 (%pure-parser + %parse-param) LALR and GLR parsers.
12161 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
12162 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
12163 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
12164 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
12165 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
12166 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
12167 * doc/bison.texinfo: Untabify the whole file.
12168 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
12169 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
12170 (Error Reporting): Adjust to these new directives.
12171 Document %error-verbose, deprecate YYERROR_VERBOSE.
12172
9e32add8
AD
121732002-11-03 Akim Demaille <akim@epita.fr>
12174
12175 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
12176 AT_CHECK_CALC_GLR invocations to use % directives, instead of
12177 command line options.
12178 * tests/cxx-type.at: Formatting changes.
12179
b02d90a5
PE
121802002-11-03 Paul Eggert <eggert@twinsun.com>
12181
12182 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
12183 to count columns correctly, and to check for invalid inputs.
9e32add8 12184
b02d90a5
PE
12185 Use mbsnwidth to count columns correctly. Account for tabs, too.
12186 Include mbswidth.h.
12187 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
12188 (extend_location): New function.
12189 (YY_LINES): Remove.
12190
12191 Handle CRLF in C code rather than in Lex code.
12192 (YY_INPUT): New macro.
12193 (no_cr_read): New function.
12194
12195 Scan UCNs, even though we don't fully handle them yet.
12196 (convert_ucn_to_byte): New function.
12197
12198 Handle backslash-newline correctly in C code.
12199 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
12200 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
12201 all uses changed.
12202 (tag, splice): New EREs. Do not allow NUL or newline in tags.
12203 Use {splice} wherever C allows backslash-newline.
12204 YY_STEP after space, newline, vertical-tab.
12205 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 12206
b02d90a5
PE
12207 (letter, id): Don't assume ASCII; e.g., spell out a-z.
12208
12209 ({int}, handle_action_dollar, handle_action_at): Check for integer
12210 overflow.
9e32add8 12211
b02d90a5
PE
12212 (YY_STEP): Omit trailing semicolon, so that it's more like C.
12213
12214 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
12215 as well as \000. Check for UCHAR_MAX, not 255.
12216 Allow \x with an arbitrary positive number of digits, as in C.
12217 Check for overflow here.
12218 Allow \? and UCNs, for compatibility with C.
12219
12220 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
12221 with quote slot used by complain_at.
12222
12223 * tests/input.at: Add tests for backslash-newline, m4 quotes
12224 in symbols, long literals, and funny escapes in strings.
12225
12226 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
12227 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
12228 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
12229 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
12230 * m4/mbswidth.m4: New file, from GNU coreutils.
12231
12232 * doc/bison.texinfo (Grammar Outline): Document // comments.
12233 (Symbols): Document that trigraphs have no special meaning in Bison,
12234 nor is backslash-newline allowed.
12235 (Actions): Document that trigraphs have no special meaning.
12236
12237 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
12238 no longer used.
12239
122402002-11-02 Paul Eggert <eggert@twinsun.com>
12241
12242 * src/reader.c: Don't include quote.h; not needed.
12243 (get_merge_function): Reword warning to be consistent with
12244 type clash diagnostic in grammar_current_rule_check.
12245
12246 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
12247 bug in trigraph handling.
12248
12249 * src/output.c (prepare_symbols): When printing token names,
12250 escape "[" as "@<:@" and likewise for "]".
12251
12252 * src/system.h (errno): Remove declaration, as we are now
12253 assuming C89 or better, and C89 guarantees errno.
12254
762b212b
PE
122552002-10-30 Paul Eggert <eggert@twinsun.com>
12256
12257 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
12258 Check for close failures.
12259 * src/files.h (xfclose): Return void, not int, since it always
12260 returned zero.
12261 * src/files.c (xfclose): Likewise. Report I/O error if ferror
12262 indicates one.
12263 * src/output.c (output_skeleton): Use xfclose rather than fclose
12264 and ferror. xfclose now checks ferror.
12265
12266 * data/glr.c (YYLEFTMOST_STATE): Remove.
12267 (yyreportTree): Use a stack-based leftmost state. This avoids
12268 our continuing battles with bogus warnings about initializers.
12269
56100c60
AD
122702002-10-30 Akim Demaille <akim@epita.fr>
12271
12272 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
12273 #if.
12274
51b4a04c
PH
122752002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12276
12277 * tests/glr-regr1.at: New test for reported regressions.
12278 * tests/testsuite.at: Add glr-regr1.at test.
12279 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 12280
bf1ebda2
PE
122812002-10-24 Paul Eggert <eggert@twinsun.com>
12282
5c16c6b1
PE
12283 Version 1.75a.
12284
bf1ebda2
PE
12285 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
12286 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
12287 we use malloc. Don't assume 'A' through 'Z' are contiguous.
12288 Don't assume strdup exists; POSIX says its an XSI extension.
12289 Check for buffer overflow on input.
12290
b526ee61
AD
122912002-10-24 Akim Demaille <akim@epita.fr>
12292
12293 * src/output.c (output_skeleton): Don't disable M4sugar comments
12294 too soon: it results in comments being expanded.
12295 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
12296 first output.
12297
f1886bb2
AD
122982002-10-24 Akim Demaille <akim@epita.fr>
12299
12300 * data/yacc.c (m4_int_type): New.
12301 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
12302 char' as only yacc.c wants K&R portability.
12303 * data/glr.c (yysigned_char): Remove.
12304 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
12305 Reported by Quoc Peyrot.
12306
c5576256
PE
123072002-10-23 Paul Eggert <eggert@twinsun.com>
12308
12309 * src/main.c (main): With --trace=time, report times even if a
12310 non-fatal error occurs. Formerly, the times were reported in some
12311 such cases but not in others.
12312 * src/reader.c (reader): Just return if a complaint has been issued,
12313 instead of exiting, so that 'main' can report times.
12314
27b0ffea
AD
123152002-10-22 Akim Demaille <akim@epita.fr>
12316
12317 * src/system.h: Include sys/types.
12318 Reported by Bert Deknuydt.
12319
223a7883
PE
123202002-10-23 Paul Eggert <eggert@twinsun.com>
12321
12322 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
12323 Suggested by Art Haas.
12324
123252002-10-22 Paul Eggert <eggert@twinsun.com>
12326
12327 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
12328 decl; not needed any more.
12329 * src/main.c (main): Use return to exit, undoing yesterday's change.
12330 The last OS that we could find where this wouldn't work is
12331 SunOS 3.5, and that's too old to worry about now.
12332
12333 * data/glr.c (struct yyltype): Define members even when not
12334 doing locations. This is more consistent with yacc.c, and it
12335 works around the following bug reports:
161a71f3
PE
12336 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
12337 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 12338
223a7883
PE
12339 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
12340 @acronym consistently. Standardize on "Yacc" instead of "YACC",
12341 "Algol" instead of "ALGOL". Give a bit more history about BNF.
12342
8b76775a
AD
123432002-10-22 Akim Demaille <akim@epita.fr>
12344
12345 * data/README: New.
12346
6db10d14
PE
123472002-10-21 Paul Eggert <eggert@twinsun.com>
12348
12349 Be consistent about 'bool'; the old code used an enum in one
12350 module and an int in another, and this violates the C standard.
12351 * m4/stdbool.m4: New file, from coreutils 4.5.3.
12352 * configure.ac (AC_HEADER_STDBOOL): Add.
12353 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
12354 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
12355 * src/symtab.c (hash_compare_symbol_t): Likewise.
12356 * src/system.h (bool, false, true): Use a definition consistent
12357 with ../lib/hash.c. All uses changed.
12358
12359 * src/complain.c (warning_issued): Renamed from warn_message_count,
12360 so that we needn't worry about integer overflow (!).
12361 Now of type bool. All uses changed.
12362 (complaint_issued): Renamed from complain_message_count; likewise.
12363
12364 * src/main.c (main): Use exit to exit with failure.
27b0ffea 12365
6db10d14
PE
12366 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
12367 rather than 1 and 0.
12368 * src/main.c (main): Likewise.
12369 * src/getargs.c (getargs): Likewise.
12370 * src/reader.c (reader): Likewise.
12371
12372 * src/getarg.c (getargs): Remove duplicate code for
12373 "Try `bison --help'".
12374
12375 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
12376 What was that "2" for?
12377
12378 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
12379 * src/getargs.c (usage): Likewise.
12380
12381 * src/getargs.c (getargs): When there are too few operands, report
12382 the last one. When there are too many, report the first extra
12383 one. This is how diffutils does it.
12384
92a060fd
PE
123852002-10-20 Paul Eggert <eggert@twinsun.com>
12386
12387 Remove K&R vestiges.
12388 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
12389 * src/complain.c (VA_START): Remove. Assume prototypes.
12390 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
12391 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
12392 fatal): Assume prototypes.
12393 * src/complain.h: Assume prototypes.
12394 * src/system.h (PARAMS): Remove.
12395 Include <limits.h> unconditionally, since it's guaranteeed even
12396 for a freestanding C89 compiler.
12397 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
12398 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 12399
e7cb57c0
AD
124002002-10-20 Akim Demaille <akim@epita.fr>
12401
12402 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
12403 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
12404 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
12405 (yyresolveStates, yyresolveAction, yyresolveStack)
12406 (yyprocessOneStack): Use them.
12407 (yy_reduce_print): New.
12408 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
12409
0245f82d
AD
124102002-10-20 Akim Demaille <akim@epita.fr>
12411
12412 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
12413 arguments and output `void'.
12414 (b4_c_function): Rename as...
12415 (b4_c_function_def): this.
12416 (b4_c_function_decl, b4_c_ansi_function_def)
12417 (b4_c_ansi_function_decl): New.
12418 Change the interpretation of the arguments: before `int, foo', now
12419 `int foo, foo'.
12420 * data/yacc.c (yyparse): Prototype and define thanks to these.
12421 Adjust b4_c_function_def uses.
12422 * data/glr.c (yyparse): Likewise, but ANSI only.
12423
39912f52
AD
124242002-10-20 Akim Demaille <akim@epita.fr>
12425
12426 * src/output.c (prepare): Move the definition of `tokens_number',
12427 `nterms_number', `undef_token_number', `user_token_number_max'
12428 to...
12429 (prepare_tokens): Here.
12430 (prepare_tokens): Rename as...
12431 (prepare_symbols): this.
12432 (prepare): Move the definition of `rules_number' to...
12433 (prepare_rules): here.
12434 (prepare): Move the definition of `last', `final_state_number',
12435 `states_number' to...
12436 (prepare_states): here.
12437 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
12438
20c1e2ad
AD
124392002-10-20 Akim Demaille <akim@epita.fr>
12440
12441 * src/tables.h, src/tables.c, src/output.c: Comment changes.
12442
21964f43
AD
124432002-10-20 Akim Demaille <akim@epita.fr>
12444
12445 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
12446 * data/c.m4: here.
12447
66d30cd4
AD
124482002-10-20 Akim Demaille <akim@epita.fr>
12449
12450 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
12451 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
12452 `pair'.
12453 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
12454 `name' to...
12455 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
12456 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
12457 These.
12458
95f2c9fe
PE
124592002-10-19 Paul Eggert <eggert@twinsun.com>
12460
12461 Do not create a temporary file, as that involves security and
12462 cleanup headaches. Instead, use a pair of pipes.
12463 Derived from a suggestion by Florian Krohm.
12464 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
12465 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
12466 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
12467 (BISON_PREREQ_SUBPIPE): Add.
12468 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
12469 Add subpipe.h, subpipe.c.
12470 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
12471 * po/POTFILES.in: Add lib/subpipe.c.
12472 * src/output.c: Include "subpipe.h".
12473 (m4_invoke): Remove decl.
12474 (scan_skel): New decl.
12475 (output_skeleton): Use pipe rather than temporary file for m4 input.
12476 Check that m4sugar.m4 is readable, to avoid deadlock.
12477 Check for pipe I/O error.
12478 * src/scan-skel.l (readpipe): Remove decl.
12479 (scan_skel): New function, to be used in place of m4_invoke.
12480 Read from stream rather than file.
66d30cd4 12481
95f2c9fe
PE
12482 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
12483 float, as this generates a warning on Solaris 8 + GCC 3.2 with
12484 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
12485 this generates a more-accurate value anyway.
12486
12487 * lib/timevar.c (timervar_accumulate): Rename locals to
12488 avoid confusion with similarly-named more-global.
12489 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
12490
12491 * src/output.c (prepare): Use xstrdup to convert char const *
12492 to char *, to avoid GCC warning.
12493
c19988b7
AD
124942002-10-19 Akim Demaille <akim@epita.fr>
12495
12496 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
12497 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
12498 Use them to have `calc.y' ready for %pure-parser.
12499 * data/yacc.c (YYLEX): Pass a yylex return type to
12500 b4_c_function_call.
12501
ae7453f2
AD
125022002-10-19 Akim Demaille <akim@epita.fr>
12503
12504 Prototype support of %lex-param and %parse-param.
12505
12506 * src/parse-gram.y: Add the definition of the %lex-param and
12507 %parse-param tokens, plus their rules.
12508 Drop the `_' version of %glr-parser.
12509 Add the "," token.
12510 * src/scan-gram.l (INITIAL): Scan them.
12511 * src/muscle_tab.c: Comment changes.
12512 (muscle_insert, muscle_find): Rename `pair' as `probe'.
12513 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
12514 (muscle_entry_s): The `value' member is no longer const.
12515 Adjust all dependencies.
12516 * src/muscle_tab.c (muscle_init): Adjust: use
12517 MUSCLE_INSERT_STRING.
12518 Initialize the obstack earlier.
12519 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
12520 (muscle_pair_list_grow): New.
12521 * data/c.m4 (b4_c_function_call, b4_c_args): New.
12522 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
12523 * tests/calc.at: Use %locations, not --locations.
12524 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
12525
0e575721
AD
125262002-10-19 Akim Demaille <akim@epita.fr>
12527
12528 * src/getargs.c (usage): Take status as argument and exit
12529 accordingly.
12530 Report the traditional `Try ... --help' message when status != 0.
12531 (usage, version): Don't take a FILE * as arg, it is pointless.
12532 (getargs): When there is an incorrect number of arguments, make it
12533 an error, and report it GNUlically thanks to `usage ()'.
12534
724ce7f5
PE
125352002-10-18 Paul Eggert <eggert@twinsun.com>
12536
3a781eb2
PE
12537 * data/glr.c (yyreportParseError): Don't assume that sprintf
12538 yields the length of the printed string, as this is not true
12539 on SunOS 4.1.4. Reported by Peter Klein.
12540
724ce7f5
PE
12541 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
12542 * tests/conflicts.at (%nonassoc and eof): Likewise.
12543 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
12544
473d0a75
AD
125452002-10-17 Akim Demaille <akim@epita.fr>
12546
12547 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
12548 * src/getargs.c (trace_types, trace_args): Adjust.
12549 * src/reader.c (grammar_current_rule_prec_set)
12550 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
12551 Standardize error messages.
12552 And s/@prec/%prec/!
12553 (reader): Use trace_flag to enable scanner/parser debugging,
12554 instead of an adhoc scheme.
12555 * src/scan-gram.l: Remove trailing debugging code.
12556
e76d2469
PE
125572002-10-16 Paul Eggert <eggert@twinsun.com>
12558
93e2236a
PE
12559 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
12560 MUSCLE_TAB_H.
12561
e76d2469
PE
12562 * NEWS: Officially drop support for building Bison with K&R C,
12563 since it didn't work anyway and it's not worth worrying about.
12564 * Makefile.maint (wget_files): Remove ansi2knr.c.
12565 (ansi2knr.c-url_prefix): Remove.
12566 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
12567 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12568 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12569
5bd1c419
PE
125702002-10-15 Paul Eggert <eggert@twinsun.com>
12571
12572 Stop using the "enum_" trick for K&R-style function definitions;
12573 it confused me, and I was the author! Instead, assume that people
12574 who want to use K&R C compilers (when using these modules in GCC,
12575 perhaps?) will run ansi2knr.
12576
12577 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
12578 All uses of "enum_" changed to "enum ".
12579 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
12580 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 12581
5bd1c419
PE
12582 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
12583 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
12584 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
12585 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
12586 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
12587 abitset_not, abitset_ones, abitset_or, abitset_or_and,
12588 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
12589 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
12590 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
12591 Use function prototypes; this removes the need for declaring
12592 static functions simply to provide their prototypes.
12593 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
12594 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
12595 bitset_count_, bitset_create, bitset_dump, bitset_first,
12596 bitset_free, bitset_init, bitset_last, bitset_next,
12597 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
12598 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
12599 bitset_print, bitset_release_memory, bitset_toggle_,
12600 bitset_type_choose, bitset_type_get, bitset_type_name_get,
12601 debug_bitset): Likewise.
12602 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
12603 * lib/bitset_stats.c (bitset_log_histogram_print,
12604 bitset_percent_histogram_print, bitset_stats_and,
12605 bitset_stats_and_cmp, bitset_stats_and_or,
12606 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
12607 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
12608 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
12609 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
12610 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
12611 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
12612 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
12613 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
12614 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
12615 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
12616 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
12617 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
12618 bitset_stats_zero): Likewise.
12619 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12620 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12621 bitsetv_dump, debug_bitsetv): Likewise.
12622 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
12623 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
12624 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
12625 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
12626 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
12627 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
12628 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
12629 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
12630 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
12631 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
12632 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
12633 Likewise.
12634 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
12635 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
12636 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
12637 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
12638 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
12639 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
12640 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
12641 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
12642 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
12643 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
12644 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 12645
ae26e1f0
AD
126462002-10-14 Akim Demaille <akim@epita.fr>
12647
12648 Version 1.75.
12649
d43baf71
AD
126502002-10-14 Akim Demaille <akim@epita.fr>
12651
12652 * tests/Makefile.am (maintainer-check-posix): New.
12653
7ebc83e3
AD
126542002-10-14 Akim Demaille <akim@epita.fr>
12655
12656 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
12657 member.
12658
05846dae
AD
126592002-10-14 Akim Demaille <akim@epita.fr>
12660
12661 * src/tables.c (table_ninf_remap): base -> tab.
12662 Reported by Matt Rosing.
12663
1318e37d
PE
126642002-10-14 Paul Eggert <eggert@twinsun.com>
12665
447fbb17
PE
12666 * tests/action.at, tests/calc.at, tests/conflicts.at,
12667 tests/cxx-type.at, tests/headers.at, tests/input.at,
12668 tests/regression.at, tests/synclines.at, tests/torture.at:
12669 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
12670 so that the tests still work even if POSIXLY_CORRECT is set.
12671 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 12672
1318e37d
PE
12673 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
12674 for portability to K&R hosts. Fix typo: signed char is guaranteed
12675 only to 127, not to 128.
12676 * data/glr.c (yysigned_char): New type.
12677 * data/yacc.c (yysigned_char): Likewise.
12678 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
12679
cc0f0794
PE
126802002-10-13 Paul Eggert <eggert@twinsun.com>
12681
5038f418
PE
12682 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
12683 true due to limited range of data type" warning from GCC.
12684
cc0f0794
PE
12685 * data/c.m4 (b4_token_defines): Protect against double-inclusion
12686 by wrapping enum yytokentype's definition inside #ifndef
12687 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
12688
6fed0802
AD
126892002-10-13 Akim Demaille <akim@epita.fr>
12690
12691 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
12692 Un yy- yyrhs to avoid the name clash with the global YYRHS.
12693
32f0598d
AD
126942002-10-13 Akim Demaille <akim@epita.fr>
12695
12696 * Makefile.maint: Update from Autoconf 2.54.
12697 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
12698
7ea9a33f
AD
126992002-10-13 Akim Demaille <akim@epita.fr>
12700
12701 * src/print.c (print_state): Separate the list of solved conflicts
12702 from the other items.
12703 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
12704
ea99527d
AD
127052002-10-13 Akim Demaille <akim@epita.fr>
12706
12707 Let nondeterministic skeletons be usable with deterministic
12708 tables.
12709
12710 With the patch, GAWK compiled by GCC without -O2 passes its test
12711 suite using a GLR parser driven by LALR tables. It fails with -O2
12712 because `struct stat' gives two different answers on my machine:
12713 88 (definition of an auto var) and later 96 (memset on this var).
12714 Hence the stack is badly corrumpted. The headers inclusion is to
12715 blame: if I move the awk.h inclusion before GLR's system header
12716 inclusion, the two struct stat have the same size.
12717
12718 * src/tables.c (pack_table): Always create conflict_table.
12719 (token_actions): Always create conflict_list.
12720 * data/glr.c (YYFLAG): Remove, unused.
12721
f377f69f
AD
127222002-10-13 Akim Demaille <akim@epita.fr>
12723
12724 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
12725 (O0FLAGS): New.
12726 (VALGRIND, GXX): New.
12727 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
12728 * tests/bison.in: Run $PREBISON a pre-command.
12729 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
12730 (maintainer-check-g++): New.
12731 * Makefile.am (maintainer-check): New.
12732
2a1fe6ed
AD
127332002-10-13 Akim Demaille <akim@epita.fr>
12734
12735 * data/glr.c: Formatting changes.
12736 Tweak some trace messages to match yacc.c's.
12737
f50adbbd
AD
127382002-10-13 Akim Demaille <akim@epita.fr>
12739
12740 GLR parsers sometimes raise parse errors instead of performing the
12741 default reduction.
12742 Reported by Charles-Henry de Boysson.
12743
12744 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 12745 check the length of the traces when %glr.
f50adbbd
AD
12746 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
12747 GLR's traces.
12748 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
12749 Test GLR parsers.
12750 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
12751 (yyltype): Remove the yy prefix from the member names.
12752 (yytable): Complete its comment.
12753 (yygetLRActions): Map error action number from YYTABLE from
12754 YYTABLE_NINF to 0.
12755 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
12756 (which was a bug: it should have been YYTABEL_NINF, and yet it was
12757 not satisfying as we could compare an YYACTION computed from
12758 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
12759 only value for error actions.
12760 (yyreportParseError): In verbose parse error messages, don't issue
12761 `error' in the list of expected tokens.
12762 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
12763 next action to perform to match glr.c's decoding.
12764 (yytable): Complete its comment.
12765
bcbad5b9
PE
127662002-10-13 Paul Eggert <eggert@twinsun.com>
12767
12768 Fix problem reported by Henrik Grubbstroem in
161a71f3 12769 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
12770 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
12771 because the Bison parser reads the second action before reducing
12772 the first one.
12773 * src/scan-gram.l (rule_length): New static var.
12774 Use it to keep track of the rule length in the scanner, since
12775 we can't expect the parser to be in lock-step sync with the scanner.
12776 (handle_action_dollar, handle_action_at): Use this var.
12777 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 12778
14904b89
PE
127792002-10-12 Paul Eggert <eggert@twinsun.com>
12780
1fe611e5
PE
12781 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
12782 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
12783 Include <sys/time.h> when checking for clock_t and struct tms.
12784 Use same include order as source.
12785 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 12786 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 12787
1fe611e5
PE
12788 * lib/timevar.c: Update copyright date and clarify comments.
12789 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 12790
1fe611e5
PE
12791 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
12792 GCC version as of today, then merge Bison's changes.
12793 Change "GCC" to "Bison" in copyright notice. timevar.def's
12794 author is Akim, so change that too.
12795
98194095
PE
12796 * src/reader.c (grammar_current_rule_check):
12797 Don't worry about the default action if $$ is untyped.
12798 Prevents bogus warnings reported by Jim Gifford in
161a71f3 12799 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 12800
14904b89
PE
12801 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
12802 * data/glr.c, data/lalr1.cc, data/yacc.c:
12803 Output token definitions before the first part of user declarations.
12804 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 12805 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 12806
ff6dca18
PE
128072002-10-11 Paul Eggert <eggert@twinsun.com>
12808
12809 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
12810 (yyparse): here. This undoes some of the 2002-07-25 change.
12811 Compatibility problem reported by Ralf S. Engelschall with
12812 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
12813
eb714592
AD
128142002-10-11 Akim Demaille <akim@epita.fr>
12815
12816 * tests/regression.at Characters Escapes): New.
12817 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
12818 characters.
12819 Reported by Jan Nieuwenhuizen.
12820
b7195100
AD
128212002-10-11 Akim Demaille <akim@epita.fr>
12822
12823 * po/id.po: New.
12824
f28a0f2d
PE
128252002-10-10 Paul Eggert <eggert@twinsun.com>
12826
12827 Portability fixes for bitsets; this also avoids several GCC
12828 warnings.
12829
12830 * lib/abitset.c: Include <stddef.h>, for offsetof.
12831 * lib/lbitset.c: Likewise.
12832
12833 * lib/abitset.c (abitset_bytes): Return a size that is aligned
12834 properly for vectors of objects. Do not assume that adding a
12835 header size to a multiple of a word size yields a value that is
12836 properly aligned for the whole union.
12837 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12838
12839 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
12840 unique names for structures.
12841 * lib/ebitset.c (ebitset_bytes): Likewise.
12842 * lib/lbitset.c (lbitset_bytes): Likewise.
12843
12844 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
12845 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
12846 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
12847 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
12848 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
12849 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
12850 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
12851 to improve the type-checking that GCC can do.
12852 * lib/bitset.c (bitset_op4_cmp): Likewise.
12853 * lib/bitset_stats.c (bitset_stats_count,
12854 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
12855 bitset_stats_copy, bitset_stats_disjoint_p,
12856 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
12857 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
12858 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
12859 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
12860 bitset_stats_and_or_cmp, bitset_stats_andn_or,
12861 bitset_stats_andn_or_cmp, bitset_stats_or_and,
12862 bitset_stats_or_and_cmp): Likewise.
12863 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
12864 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
12865 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
12866 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
12867
12868 * lib/abitset.h: Include bitset.h, not bbitset.h.
12869 * lib/ebitset.h: Likewise.
12870 * lib/lbitset.h: Likewise.
12871
12872 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
12873 All instances of parameters of type enum bitset_opts are now of
12874 type enum_bitset_opts, to conform to the C Standard, and similarly
12875 for enum_bitset_type.
12876 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
12877 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
12878
12879 Do not use "struct bitset_struct" to mean different things in
12880 different modules. Not only is this confusing, it violates
12881 the C Standard, which requires that structure types in different
12882 modules must be compatible if one is to be passed to the other.
12883 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
12884 All instances of "struct bitset_struct *" replaced with "bitset".
12885 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
12886 (union bitset_union, struct abitset_struct, struct ebitset_struct,
12887 struct lbitset_struct, struct bitset_stats_struct): New types.
12888 All uses of struct bitset_struct changed to union bitset_union,
12889 etc.
ba0fe3c7 12890 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
12891 struct bitset_struct): Remove.
12892 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
12893 struct bitset_struct): Remove.
12894 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
12895 bitset_struct): Remove.
12896 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
12897 Likewise.
12898
12899 Do not call a function of type T using a call that assumes the
12900 function is of a different type U. Standard C requires that a
12901 function must be called with a type that is compatible with its
12902 definition.
12903 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12904 New decls.
12905 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12906 New functions.
12907 * lib/ebitset.c (PFV): Remove.
12908 * lib/lbitset.c (PFV): Likewise.
12909 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
12910 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
12911 decls.
12912 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
12913 (ebitset_vtable): Use them.
12914 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
12915 lbitset_xor): New functions.
12916 (lbitset_vtable): Use them.
12917
12918 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
12919 Declare.
12920
12921 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
12922 GCC warning.
12923 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
12924 Use offsetof, for simplicity.
12925
6fbe4984
PE
129262002-10-06 Paul Eggert <eggert@twinsun.com>
12927
12928 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
12929 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 12930 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
12931 which was inadvertently undone by the 2002-09-30 patch.
12932 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
12933 the same width as int.
12934
420f93c8
PE
129352002-10-04 Paul Eggert <eggert@twinsun.com>
12936
12937 Version 1.50.
12938
12939 * configure.ac (AC_INIT), NEWS: Increment version number.
12940
12941 * doc/bison.texinfo: Minor spelling, grammar, and white space
12942 fixes.
12943 (Symbols): Mention that any negative value returned from yylex
12944 signifies end-of-input. Warn about negative chars. Mention
12945 the portable Standard C character set.
12946
12947 The GNU coding standard says CFLAGS and YFLAGS are reserved
12948 for the installer to set.
12949 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
12950 * src/Makefile.am (AM_CFLAGS): Likewise.
12951 (AM_YFLAGS): Renamed from YFLAGS.
12952
12953 Fix some MAX and MIN problems.
12954 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
12955 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
12956 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
12957 * src/reader.c (reader): Use it.
12958
12959 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
12960 POSIX 1003.1-2001 has removed fgrep.
12961
129622002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
12963
12964 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
12965 interpreted as signed.
12966 * lib/ebitset.c (ebitset_list): Fix bug.
12967
ff68026d
PE
129682002-10-01 Paul Eggert <eggert@twinsun.com>
12969
12970 More fixes for 64-bit hosts and large bitsets.
12971
12972 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
12973 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
12974 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
12975 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
12976 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
12977 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
12978 bitset_count_): Likewise.
12979 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
12980 bitset_first, bitset_last): Likewise.
12981 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
12982 bitset_stats_list_reverse, bitset_stats_size,
12983 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
12984 Likewise.
12985 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12986 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12987 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12988 bitsetv_reflexive_transitive_closure): Likewise.
12989 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
12990 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
12991 Likewise.
12992 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
12993 Likewise.
420f93c8 12994
ff68026d
PE
12995 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
12996 Use size_t, not unsigned int, to count bytes.
12997 * lib/abitset.h (abitset_bytes): Likewise.
12998 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
12999 Likewise.
13000 * lib/bitset.h (bitset_bytes): Likewise.
13001 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
13002 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
13003 * lib/bitsetv.c (bitsetv_alloc): Likewise.
13004 * lib/ebitset.c (ebitset_bytes): Likewise.
13005 * lib/ebitset.h (ebitset_bytes): Likewise.
13006 * lib/lbitset.c (lbitset_bytes): Likewise.
13007 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 13008
ff68026d
PE
13009 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
13010 abitset_subset_p, abitset_disjoint_p, abitset_and,
13011 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
13012 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
13013 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
13014 abitset_or_and, abitset_or_and_cmp):
13015 Use bitset_windex instead of unsigned int.
13016 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
13017 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
13018 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
13019 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
13020 Likewise.
13021 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 13022
ff68026d
PE
13023 * lib/bitset.c (bitset_print):
13024 Use proper printf formats for widths of integer types.
13025 * lib/bitset_stats.c (bitset_percent_histogram_print,
13026 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
13027 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13028 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
13029 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 13030
ff68026d
PE
13031 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
13032 BITSET_SIZE_MAX): New macros.
13033 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
13034 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
13035 to BITSET_WINDEX_MAX.
13036
13037 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
13038 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
13039 since we now return the bitset_bindex type (not int).
13040
13041 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
13042 when computing sizes.
13043 * lib/ebitset.c (ebitset_elts_grow): Likewise.
13044
13045 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
13046 and avoid cast to unsigned.
13047
6aa452a6
AD
130482002-09-30 Akim Demaille <akim@epita.fr>
13049
13050 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
13051 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
13052 Updates from Michael Hayes.
13053
927f7817
AD
130542002-09-30 Art Haas <ahaas@neosoft.com>
13055
13056 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
13057 invocations.
13058 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
13059 defined.
13060
9738f41e
AD
130612002-09-27 Akim Demaille <akim@epita.fr>
13062
13063 Version 1.49c.
13064
a5c75d7f
AD
130652002-09-27 Akim Demaille <akim@epita.fr>
13066
13067 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
13068 (Because of AC_LIBSOURCE).
13069
8280e179
AD
130702002-09-27 Akim Demaille <akim@epita.fr>
13071
13072 Playing with Autoscan.
13073
13074 * configure.ac: Remove the old LIBOBJ tweaks.
13075 (AC_REPLACE_FUNCS): Add strrchr and strtol.
13076 * lib/strrchr.c: New.
13077 * lib/strtol.c: New, from the Coreutils 4.5.1.
13078
ae64af35
AD
130792002-09-27 Akim Demaille <akim@epita.fr>
13080
13081 Playing with Autoscan.
13082
13083 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
13084 * lib/Makefile.am (libbison_a_SOURCES): No longer include
13085 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
13086 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
13087 Coreutils 4.5.1.
13088
d1a1114f
AD
130892002-09-24 Akim Demaille <akim@epita.fr>
13090
13091 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
13092 (Frequently Asked Questions, Parser Stack Overflow): New.
13093
b906441c
AD
130942002-09-13 Akim Demaille <akim@epita.fr>
13095
13096 Playing with autoscan.
13097
13098 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
13099 * src/files.c (skeleton_find): Remove, unused.
13100 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
13101 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
13102
bd701811
AD
131032002-09-13 Akim Demaille <akim@epita.fr>
13104
13105 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
13106 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
13107
e0a13e7b
AD
131082002-09-13 Akim Demaille <akim@epita.fr>
13109
13110 * configure.ac: Require 2.54.
13111 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
13112 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
13113 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
13114 Remove, provided by Autoconf macros.
13115
c97011bf
AD
131162002-09-12 Akim Demaille <akim@epita.fr>
13117
13118 * m4/prereq.m4: Update, from Coreutils 4.5.1.
13119
d862b1be
AD
131202002-09-12 Akim Demaille <akim@epita.fr>
13121
13122 * m4/prereq.m4: Update, from Fileutils 4.1.5.
13123 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
13124 Reported by Martin Mokrejs.
13125
3d38c03a
AD
131262002-09-10 Akim Demaille <akim@epita.fr>
13127
13128 * src/parse-gram.y: Associate a human readable string to each
13129 token type.
13130 * tests/regression.at (Invalid inputs): Adjust.
13131
b6347355
AD
131322002-09-10 Gary V. Vaughan <gary@gnu.org>
13133
13134 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
13135 with an Autoconf-2.5x style configure.ac.
13136
09ba4ab2
PE
131372002-09-06 Paul Eggert <eggert@twinsun.com>
13138
13139 * doc/bison.texinfo (Conditions): Make explicit that the GPL
13140 exception applies only to yacc.c. This is a modification of a
13141 patch originally suggested by Akim Demaille.
13142
21846f69
AD
131432002-09-06 Akim Demaille <akim@epita.fr>
13144
09ba4ab2
PE
13145 * data/c.m4 (b4_copyright): Move the GPL exception comment from
13146 here to...
13147 * data/yacc.c: here.
13148
21846f69
AD
13149 * data/lalr1.cc (struct yyltype): Don't define it, since we use
13150 LocationType.
13151 (b4_ltype): Default to yy::Location from location.hh.
13152
c0ad8bf3
AD
131532002-09-04 Jim Meyering <jim@meyering.net>
13154
13155 * data/yacc.c: Guard the declaration of yytoknum also with
13156 `#ifdef YYPRINT', so it is declared only when used.
13157
3a93251e
AD
131582002-09-04 Akim Demaille <akim@epita.fr>
13159
13160 * configure.in: Rename as...
13161 * configure.ac: this.
13162 Bump to 1.49c.
13163
427c0dda
AD
131642002-09-04 Akim Demaille <akim@epita.fr>
13165
13166 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
13167 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
13168 translate maintainer only messages.
13169
6a254321
PE
131702002-08-12 Paul Eggert <eggert@twinsun.com>
13171
645e30d1
PE
13172 Version 1.49b.
13173
6a254321
PE
13174 * Makefile.am (SUBDIRS): Remove intl.
13175 (DISTCLEANFILES): Remove.
13176 * NEWS: Mention that GNU M4 is now required. Clarify what is
13177 meant by "larger grammars". Mention the pt_BR translation.
13178 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
13179 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
13180 Bump version from 0.11.2 to 0.11.5.
13181 (BISON_PREREQ_STAGE): Remove.
13182 (AM_GNU_GETTEXT): Use external gettext.
13183 (AC_OUTPUT): Remove intl/Makefile.
13184
13185 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
13186
13187 * data/glr.c: Include string.h, for strlen.
13188 (yyreportParseError): Use size_t for yysize.
13189 (yy_yypstack): No longer nested inside yypstates, as nested
13190 functions are not portable. Do not assume size_t is the
13191 same width as int.
13192 (yypstates): Do not assume that ptrdiff_t is the same width
13193 as int, and similarly for yyposn and YYINDEX.
13194
13195 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
13196
13197 * lib/Makefile.am (INCLUDES): Do not include from the intl
13198 directory, which has been removed.
13199 * src/Makefile.am (INCLUDES): Likewise.
13200
13201 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
13202 (bitsets_sources, additional_bitsets_sources, timevars_sources):
13203 New vars.
13204
13205 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
13206 * tests/Makefile.am (EXTRA_DIST): Likewise.
13207
13208 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
13209 Do not assume that bitset_windex is the same width as unsigned.
13210
13211 * lib/abitset.c (abitset_unused_clear): Do not assume that
13212 bitset_word is the same width as int.
13213 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
13214 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
13215 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
13216 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
13217 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
13218
13219 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
13220 portability to one's complement hosts!).
13221 * lib/ebitset.c (ebitset_op1): Likewise.
13222 * lib/lbitset.c (lbitset_op1): Likewise.
13223
13224 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
13225 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
13226 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
13227 Sync with fileutils.
13228 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
13229 lib/gettext.h: Sync with diffutils.
13230
13231 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
13232 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
13233
13234 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
13235 PROTOTYPES to check for prototypes, and "defined __STDC__" to
13236 check for void *.
13237
13238 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
13239 size_t; the old version tried to do this but casted improperly.
13240 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
13241 (bitset_test): Now returns int, not unsigned long.
13242
13243 * lib/bitset_stats.c: Include "gettext.h".
13244 (_): New macro.
13245 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
13246 name locals "index", as it generates unnecessary warnings on some
13247 hosts that have an "index" function.
13248
13249 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
13250 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
13251 they need translation.
13252 * src/LR0.c (state_list_append, new_itemsets, get_state,
13253 append_states, generate_states): Likewise.
13254 * src/assoc.c (assoc_to_string): Likewise.
13255 * src/closure.c (print_closure, set_firsts, closure): Likewise.
13256 * src/gram.c (grammar_dump): Likewise.
13257 * src/injections.c (injections_compute): Likewise.
13258 * src/lalr.c (lookaheads_print): Likewise.
13259 * src/relation.c (relation_transpose): Likewise.
13260 * src/scan-gram.l: Likewise.
13261 * src/tables.c (table_grow, pack_vector): Likewise.
13262
13263 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
13264 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
13265 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
13266 * m4/mbstate_t.m4: Sync with fileutils.
13267 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
13268
13269 * po/LINGUAS: Add pt_BR.
13270 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
13271 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
13272 lib/timevar.c.
13273 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
13274 manual recommends.
13275 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
13276
13277 * src/complain.c (strerror_r): Remove decl; not needed.
13278 (strerror): Use same pattern as ../lib/error.c.
13279
13280 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
13281
13282 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
13283
13284 * src/main.c (main): Cast result of bindtextdomain and textdomain
13285 to void, to avoid a GCC warning when --disable-nls is in effect.
13286
13287 * src/scan-gram.l: Use strings rather than escapes when possible,
13288 to minimize the number of warnings from xgettext.
13289 (handle_action_dollar, handle_action_at): Don't use isdigit,
13290 as it mishandles negative chars and it may not work as expected
13291 outside the C locale.
13292
13293 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
13294 this is a GCC extension and is not portable to other compilers.
13295
13296 * src/system.h (alloca): Use same pattern as ../lib/error.c.
13297 Do not include <ctype.h>; no longer needed.
13298 Do not include <malloc.h>; no longer needed (and generates
13299 warnings on OpenBSD 3.0).
13300
13301 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
13302 it's not portable.
13303
13304 * tests/regression.at: Do not use 'cc -c input.c -o input';
13305 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
13306
13307 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
13308 exit status as failure, not just exit status 1. Sun C exits
13309 with status 2 sometimes.
13310
13311 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
13312 Use it for the two large tests.
13313
c8f002c7
AD
133142002-08-02 Akim Demaille <akim@epita.fr>
13315
13316 * src/conflicts.c (conflicts_output): Don't output rules never
13317 reduced here, since anyway that computation doesn't work.
13318 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
13319 (rule_useless_p, rule_never_reduced_p): New.
13320 (grammar_rules_partial_print): Use a filter instead of a range.
13321 Display the title only if needed.
13322 (grammar_rules_print): Adjust.
13323 (grammar_rules_never_reduced_report): New.
13324 * src/tables.c (action_row): Move the computation of rules never
13325 reduced to...
13326 (token_actions): here.
13327 * src/main.c (main): Make the parser before making the report, so
13328 that rules never reduced are computed.
13329 Call grammar_rules_never_reduced_report.
13330 * src/print.c (print_results): Report rules never reduced.
13331 * tests/conflicts.at, tests/reduce.at: Adjust.
13332
cd08e51e
AD
133332002-08-01 Akim Demaille <akim@epita.fr>
13334
13335 Instead of attaching lookaheads and duplicating the rules being
13336 reduced by a state, attach the lookaheads to the reductions.
13337
13338 * src/state.h (state_t): Remove the `lookaheads',
13339 `lookaheads_rule' member.
13340 (reductions_t): Add a `lookaheads' member.
13341 Use a regular array for the `rules'.
13342 * src/state.c (reductions_new): Initialize the lookaheads member
13343 to 0.
13344 (state_rule_lookaheads_print): Adjust.
13345 * src/state.h, src/state.c (state_reductions_find): New.
13346 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
13347 (count_rr_conflicts): Adjust.
13348 * src/lalr.c (LArule): Remove.
13349 (add_lookback_edge): Adjust.
13350 (state_lookaheads_count): New.
13351 (states_lookaheads_initialize): Merge into...
13352 (initialize_LA): this.
13353 (lalr_free): Adjust.
13354 * src/main.c (main): Don't free nullable and derives too early: it
13355 is used by --verbose.
13356 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
13357
bb0027a9
AD
133582002-08-01 Akim Demaille <akim@epita.fr>
13359
13360 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
13361 `rule_number_t**'.
13362 (set_derives, free_derives): Rename as...
13363 (derives_compute, derives_free): this.
13364 Adjust all dependencies.
13365 * src/nullable.c (set_nullable, free_nullable): Rename as...
13366 (nullable_compute, nullable_free): these.
13367 (rule_list_t): Store rule_t *, not rule_number_t.
13368 * src/state.c (state_rule_lookaheads_print): Directly compare rule
13369 pointers, instead of their numbers.
13370 * src/main.c (main): Call nullable_free, and derives_free earlier,
13371 as they were lo longer used.
13372
3325ddc4
AD
133732002-08-01 Akim Demaille <akim@epita.fr>
13374
13375 * lib/timevar.c (get_time): Include children time.
13376 * src/lalr.h (LA, LArule): Don't export them: used with the
13377 state_t.
13378 * src/lalr.c (LA, LArule): Static.
13379 * src/lalr.h, src/lalr.c (lalr_free): New.
13380 * src/main.c (main): Call it.
13381 * src/tables.c (pack_vector): Check whether loc is >= to the
13382 table_size, not >.
13383 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
13384 (tables_generate): do it, since that's also it which allocates
13385 them.
13386 Don't free LA and LArule, main does.
13387
c6f1a33c
AD
133882002-07-31 Akim Demaille <akim@epita.fr>
13389
13390 Separate parser tables computation and output.
13391
13392 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
13393 (conflict_list, conflict_list_cnt, table, check, table_ninf)
13394 (yydefgoto, yydefact, high): Move to...
13395 * src/tables.h, src/tables.c: here.
13396 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
13397 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
13398 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
13399 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
13400 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
13401 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
13402 (action_row, save_row, token_actions, save_column, default_goto)
13403 (goto_actions, sort_actions, matching_state, pack_vector)
13404 (table_ninf_remap, pack_table, prepare_actions): Move to...
13405 * src/tables.c: here.
13406 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
13407 * src/output.c (token_actions, output_base, output_conflicts)
13408 (output_check): Merge into...
13409 (prepare_actions): this.
13410 (actions_output): Rename as...
13411 (user_actions_output): this.
13412 * src/main.c (main): Call tables_generate and tables_free.
13413
1509d42f
AD
134142002-07-31 Akim Demaille <akim@epita.fr>
13415
13416 Steal GCC's --time-report support.
13417
13418 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
13419 stolen/adjusted from GCC.
13420 * m4/stage.m4: Remove time related checks.
13421 * m4/timevar.m4: New.
13422 * configure.in: Adjust.
13423 * src/system.h: Adjust to using timevar.h.
13424 * src/getargs.h, src/getargs.c: Support trace_time for
13425 --trace=time.
13426 * src/main.c (stage): Remove.
13427 (main): Replace `stage' invocations with timevar calls.
13428 * src/output.c: Insert pertinent timevar calls.
13429
273a74fa
AD
134302002-07-31 Akim Demaille <akim@epita.fr>
13431
13432 Let --trace have arguments.
13433
13434 * src/getargs.h (enum trace_e): New.
13435 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
13436 (long_options, short_options): --trace/-T takes an optional
13437 argument.
13438 Change all the uses of trace_flag to reflect the new flags.
13439 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
13440
13441 Strengthen `stage' portability.
13442
13443 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
13444 * configure.in: Use it.
13445 Don't check for malloc.h and sys/times.h.
13446 * src/system.h: Include them when appropriate.
13447 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
13448 times and struct tms are available.
13449
217598da
AD
134502002-07-30 Akim Demaille <akim@epita.fr>
13451
13452 In verbose parse error message, don't report `error' as an
13453 expected token.
13454 * tests/actions.at (Printers and Destructors): Adjust.
13455 * tests/calc.at (Calculator $1): Adjust.
13456 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
13457 error message, do not report the parser accepts the error token in
13458 that state.
13459
52489d44
AD
134602002-07-30 Akim Demaille <akim@epita.fr>
13461
13462 Normalize conflict related messages.
13463
13464 * src/complain.h, src/complain.c (warn, complain): New.
13465 * src/conflicts.c (conflicts_print): Use them.
13466 (conflict_report_yacc): New, extracted from...
13467 (conflicts_print): here.
13468 * tests/conflicts.at, tests/existing.at: Adjust.
13469
e8832397
AD
134702002-07-30 Akim Demaille <akim@epita.fr>
13471
13472 Report rules which are never reduced by the parser: those hidden
13473 by conflicts.
13474
13475 * src/LR0.c (save_reductions): Don't make the final state too
13476 different: save its reduction (accept) instead of having a state
13477 without any action (no shift or goto, no reduce).
13478 Note: the final state is now a ``regular'' state, i.e., the
13479 parsers now contain `reduce 0' as default reduction.
13480 Nevertheless, since they decide to `accept' when yystate =
13481 final_state, they still will not reduce rule 0.
13482 * src/print.c (print_actions, print_reduction): Adjust.
13483 * src/output.c (action_row): Track reduced rules.
13484 (token_actions): Report rules never reduced.
13485 * tests/conflicts.at, tests/regression.at: Adjust.
13486
caf23d24
AD
134872002-07-30 Akim Demaille <akim@epita.fr>
13488
13489 `stage' was accidently included in a previous patch.
13490 Initiate its autoconfiscation.
13491
13492 * configure.in: Look for malloc.h and sys/times.h.
13493 * src/main.c (stage): Adjust.
13494 Report only when trace_flag.
13495
640748ee
AD
134962002-07-29 Akim Demaille <akim@epita.fr>
13497
13498 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
13499 state_number_t.
13500 (errs_t): symbol_t*, not symbol_number_t.
13501 (reductions_t): rule_t*, not rule_number_t.
13502 (FOR_EACH_SHIFT): New.
13503 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
13504 * src/print.c, src/print_graph.c: Adjust.
13505
88bce5a2
AD
135062002-07-29 Akim Demaille <akim@epita.fr>
13507
13508 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
13509
13510 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
13511 (endtoken, accept): these.
13512 * src/reader.c (reader): Set endtoken's default tag to "$end".
13513 Set undeftoken's tag to "$undefined" instead of "$undefined.".
13514 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
13515 Adjust.
13516
1bfb97db
AD
135172002-07-29 Akim Demaille <akim@epita.fr>
13518
13519 * src/reduce.c (reduce_grammar): When the language is empty,
13520 complain about the start symbol, not the axiom.
13521 Use its location.
13522 * tests/reduce.at (Empty Language): New.
13523
fc5734fe
AD
135242002-07-26 Akim Demaille <akim@epita.fr>
13525
13526 * src/reader.h, src/reader.c (gram_error): ... can't get
13527 yycontrol without making too strong assumptions on the parser
13528 itself.
13529 * src/output.c (prepare_tokens): Use the real 0th value of
13530 token_translations instead of `0'.
13531 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
13532 visible here.
13533 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
13534 for the time being: %locations ought to provide it to yyerror.
13535
3650b4b8
AD
135362002-07-25 Akim Demaille <akim@epita.fr>
13537
13538 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
13539 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
13540 * tests/regression.at (Web2c Actions): Adjust.
13541
4b3d3a8e
AD
135422002-07-25 Akim Demaille <akim@epita.fr>
13543
13544 Stop storing rules from 1 to nrules + 1.
13545
13546 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
13547 * src/nullable.c, src/output.c, src/print.c, src/reader.c
13548 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
13549 Iterate from 0 to nrules.
13550 Use rule_number_as_item_number and item_number_as_rule_number.
13551 Adjust to `derive' now containing possibly 0.
13552 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
13553 Handle the `- 1' part in rule numbers from/to item numbers.
13554 * src/conflicts.c (log_resolution): Fix the message which reversed
13555 shift and reduce.
13556 * src/output.c (action_row): Initialize default_rule to -1.
13557 (token_actions): Adjust.
13558 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
13559 expected output.
13560 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
13561
4a2a22f4
AD
135622002-07-25 Akim Demaille <akim@epita.fr>
13563
13564 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
13565 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
13566 (b4_c_knr_arg_decl): New.
13567 * data/yacc.c: Use it to define yysymprint, yydestruct, and
13568 yyreport_parse_error.
13569
b8df3223
AD
135702002-07-25 Akim Demaille <akim@epita.fr>
13571
13572 * data/yacc.c (yyreport_parse_error): New, extracted from...
13573 (yyparse): here.
13574 (yydestruct, yysymprint): Move above yyparse.
13575 Be K&R compliant.
13576
a762e609
AD
135772002-07-25 Akim Demaille <akim@epita.fr>
13578
13579 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
13580 replace...
13581 (b4_sint_type, b4_uint_type): these.
13582 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
13583 * tests/regression.at (Web2c Actions): Adjust.
13584
12b0043a
AD
135852002-07-25 Akim Demaille <akim@epita.fr>
13586
13587 * src/gram.h (TIEM_NUMBER_MAX): New.
13588 (item_number_of_rule_number, rule_number_of_item_number): Rename
13589 as...
13590 (rule_number_as_item_number, item_number_as_rule_number): these.
13591 Adjust dependencies.
13592 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
13593 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
13594 (symbol_number_to_vector_number): New.
13595 (order): Of vector_number_t* type.
13596 (base_t, BASE_MAX, BASE_MIN): New.
13597 (froms, tos, width, pos, check): Of base_t type.
13598 (action_number_t, ACTION_MIN, ACTION_MAX): New.
13599 (actrow): Of action_number_t type.
13600 (conflrow): Of unsigned int type.
13601 (table_ninf, base_ninf): New.
13602 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
13603 (muscle_insert_int_table, muscle_insert_base_table)
13604 (muscle_insert_rule_number_table): New.
13605 (prepare_tokens): Output `toknum' as int_table.
13606 (action_row): Returns a rule_number_t.
13607 Use ACTION_MIN, not SHRT_MIN.
13608 (token_actions): yydefact is rule_number_t*.
13609 (table_ninf_remap): New.
13610 (pack_table): Use it for `base' and `table'.
13611 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
13612 replaced with...
13613 (YYPACT_NINF, YYTABLE_NINF): these.
13614 (yypact, yytable): Compute their types instead of hard-coded
13615 `short'.
13616 * tests/regression.at (Web2c Actions): Adjust.
13617
5dde258a
AD
136182002-07-19 Akim Demaille <akim@epita.fr>
13619
13620 * src/scan-gram.l (id): Can start with an underscore.
13621
a945ec39
AD
136222002-07-16 Akim Demaille <akim@epita.fr>
13623
13624 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
13625 Adjust all former `associativity' dependencies.
13626 * src/symtab.c (symbol_new): Default associativity is `undef', not
13627 `right'.
13628 (symbol_check_alias_consistence): Adjust.
13629
fae437e8
AD
136302002-07-09 Akim Demaille <akim@epita.fr>
13631
13632 * doc/bison.texinfo: Properly set the ``header'' part.
13633 Use @dircategory ``GNU programming tools'' as per Texinfo's
13634 documentation.
13635 Use @copying.
13636
1a715ef2
AD
136372002-07-09 Akim Demaille <akim@epita.fr>
13638
13639 * lib/quotearg.h: Protect against multiple inclusions.
13640 * src/location.h (location_t): Add a `file' member.
13641 (LOCATION_RESET, LOCATION_PRINT): Adjust.
13642 * src/complain.c (warn_at, complain_at, fatal_at): Drop
13643 `error_one_per_line' support.
13644
a5d50994
AD
136452002-07-09 Akim Demaille <akim@epita.fr>
13646
13647 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
13648 * src/reader.c (lineno): Remove.
13649 Adjust all dependencies.
13650 (get_merge_function): Take a location and use complain_at.
13651 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
13652 * tests/regression.at (Invalid inputs, Mixing %token styles):
13653 Adjust.
13654
b275314e
AD
136552002-07-09 Akim Demaille <akim@epita.fr>
13656
13657 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
13658 recovery rule, and forbid extensions when --yacc.
13659 (gram_error): Use complain_at.
13660 * src/reader.c (reader): Exit if there were parse errors.
13661
865b9df1
AD
136622002-07-09 Akim Demaille <akim@epita.fr>
13663
13664 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
13665 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
13666 Reported by R Blake <blakers@mac.com>.
13667
c76e14da
AD
136682002-07-09 Akim Demaille <akim@epita.fr>
13669
13670 * data/yacc.c: Output the copyright notive in the header.
13671
7db2ed2d
AD
136722002-07-03 Akim Demaille <akim@epita.fr>
13673
13674 * src/output.c (froms, tos): Are state_number_t.
13675 (save_column): sp, sp1, and sp2 are state_number_t.
13676 (prepare): Rename `final' as `final_state_number', `nnts' as
13677 `nterms_number', `nrules' as `rules_number', `nstates' as
13678 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
13679 unused.
13680 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
13681 * data/lalr1.cc (nsym_): Remove, unused.
13682
e68e0410
AD
136832002-07-03 Akim Demaille <akim@epita.fr>
13684
13685 * src/lalr.h, src/lalr.c (goto_number_t): New.
13686 * src/lalr.c (goto_list_t): New.
13687 Propagate them.
13688 * src/nullable.c (rule_list_t): New.
13689 Propagate.
13690 * src/types.h: Remove.
13691
e1a4f3a4
AD
136922002-07-03 Akim Demaille <akim@epita.fr>
13693
13694 * src/closure.c (print_fderives): Use rule_rhs_print.
13695 * src/derives.c (print_derives): Use rule_rhs_print.
13696 (rule_list_t): New, replaces `shorts'.
13697 (set_derives): Add comments.
13698 * tests/sets.at (Nullable, Firsts): Adjust.
13699
536545f3
AD
137002002-07-03 Akim Demaille <akim@epita.fr>
13701
13702 * src/output.c (prepare_actions): Free `tally' and `width'.
13703 (prepare_actions): Allocate and free `order'.
13704 * src/symtab.c (symbols_free): Free `symbols'.
13705 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
13706 * src/output.c (m4_invoke): Move to...
13707 * src/scan-skel.l: here.
13708 (<<EOF>>): Close yyout, and free its name.
13709
8b752b00
AD
137102002-07-03 Akim Demaille <akim@epita.fr>
13711
13712 Fix some memory leaks, and fix a bug: state 0 was examined twice.
13713
13714 * src/LR0.c (new_state): Merge into...
13715 (state_list_append): this.
13716 (new_states): Merge into...
13717 (generate_states): here.
13718 (set_states): Don't ensure a proper `errs' state member here, do it...
13719 * src/conflicts.c (conflicts_solve): here.
13720 * src/state.h, src/state.c: Comment changes.
13721 (state_t): Rename member `shifts' as `transitions'.
13722 Adjust all dependencies.
13723 (errs_new): For consistency, also take the values as argument.
13724 (errs_dup): Remove.
13725 (state_errs_set): New.
13726 (state_reductions_set, state_transitions_set): Assert that no
13727 previous value was assigned.
13728 (state_free): New.
13729 (states_free): Use it.
13730 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
13731 temporary storage: use `errs' and `nerrs' as elsewhere.
13732 (set_conflicts): Allocate and free this `errs'.
13733
613f5e1a
AD
137342002-07-02 Akim Demaille <akim@epita.fr>
13735
13736 * lib/libiberty.h: New.
13737 * lib: Update the bitset implementation from upstream.
13738 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
13739 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
13740 * src/main.c: Adjust bitset stats calls.
13741
26e0cadc
PE
137422002-07-01 Paul Eggert <eggert@twinsun.com>
13743
13744 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
13745 char, so that negative chars don't collide with $.
13746
1154cced
AD
137472002-06-30 Akim Demaille <akim@epita.fr>
13748
13749 Have the GLR tests be `warning' checked, and fix the warnings.
13750
13751 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
13752 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
13753 (yyremoveDeletes): `yyi' and `yyj' are size_t.
13754 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
13755 (yyaddDeferredAction): static.
13756 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
13757 (yyreportParseError): yyprefix is const.
13758 yytokenp is used only when verbose.
13759 (yy__GNUC__): Replace with __GNUC__.
13760 (yypdumpstack): yyi is size_t.
13761 (yypreference): Un-yy local variables and arguments, to avoid
13762 clashes with `yyr1'. Anyway, we are not in the user name space.
13763 (yytname_size): be an int, as is compared with ints.
13764 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
13765 Use them.
13766 * tests/cxx-gram.at: Use quotation to protect $1.
13767 Use AT_COMPILE to enable warnings hunts.
13768 Prototype yylex and yyerror.
13769 `Use' argc.
13770 Include `string.h', not `strings.h'.
13771 Produce and prototype stmtMerge only when used.
13772 yylex takes a location.
13773
97650f4e
AD
137742002-06-30 Akim Demaille <akim@epita.fr>
13775
13776 We spend a lot of time in quotearg, in particular when --verbose.
13777
13778 * src/symtab.c (symbol_get): Store a quoted version of the key.
13779 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
13780 Adjust all callers.
13781
d2576365
AD
137822002-06-30 Akim Demaille <akim@epita.fr>
13783
13784 * src/state.h (reductions_t): Rename member `nreds' as num.
13785 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
13786 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
13787
ccaf65bc
AD
137882002-06-30 Akim Demaille <akim@epita.fr>
13789
13790 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
13791 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
13792 (shifts_to): Rename as...
13793 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
13794 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
13795 (TRANSITION_IS_DISABLED, transitions_to): these.
13796
87675353
AD
137972002-06-30 Akim Demaille <akim@epita.fr>
13798
13799 * src/print.c (print_shifts, print_gotos): Merge into...
13800 (print_transitions): this.
13801 (print_transitions, print_errs, print_reductions): Align the
13802 lookaheads columns.
13803 (print_core, print_transitions, print_errs, print_state,
13804 print_grammar): Output empty lines separator before, not after.
13805 (state_default_rule_compute): Rename as...
13806 (state_default_rule): this.
13807 * tests/conflicts.at (Defaulted Conflicted Reduction),
13808 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
13809 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
13810
ce4ccb4b
AD
138112002-06-30 Akim Demaille <akim@epita.fr>
13812
13813 Display items as we display rules.
13814
13815 * src/gram.h, src/gram.c (rule_lhs_print): New.
13816 * src/gram.c (grammar_rules_partial_print): Use it.
13817 * src/print.c (print_core): Likewise.
13818 * tests/conflicts.at (Defaulted Conflicted Reduction),
13819 (Unresolved SR Conflicts): Adjust.
13820 (Unresolved SR Conflicts): Adjust and rename as...
13821 (Resolved SR Conflicts): this, as was meant.
13822 * tests/regression.at (Web2c Report): Adjust.
13823
bc933ef1
AD
138242002-06-30 Akim Demaille <akim@epita.fr>
13825
13826 * src/print.c (state_default_rule_compute): New, extracted from...
13827 (print_reductions): here.
13828 Pessimize, but clarify the code.
13829 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
13830
53d4308d
AD
138312002-06-30 Akim Demaille <akim@epita.fr>
13832
13833 * src/output.c (action_row): Let default_rule be always a rule
13834 number.
13835
574fb2d5
AD
138362002-06-30 Akim Demaille <akim@epita.fr>
13837
13838 * src/closure.c (print_firsts, print_fderives, closure):
13839 Use BITSET_EXECUTE.
13840 * src/lalr.c (lookaheads_print): Likewise.
13841 * src/state.c (state_rule_lookaheads_print): Likewise.
13842 * src/print_graph.c (print_core): Likewise.
13843 * src/print.c (print_reductions): Likewise.
13844 * src/output.c (action_row): Likewise.
13845 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
13846
05811fd7
AD
138472002-06-30 Akim Demaille <akim@epita.fr>
13848
13849 * src/print_graph.c: Use report_flag.
13850
0e4d5753
AD
138512002-06-30 Akim Demaille <akim@epita.fr>
13852
13853 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
13854 to...
13855 * src/relation.h, src/relation.c (traverse, relation_digraph)
13856 (relation_print, relation_transpose): New.
13857
24c7d800
AD
138582002-06-30 Akim Demaille <akim@epita.fr>
13859
13860 * src/state.h, src/state.c (shifts_to): New.
13861 * src/lalr.c (build_relations): Use it.
13862
9222837b
AD
138632002-06-30 Akim Demaille <akim@epita.fr>
13864
13865 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
13866 (item_number_of_rule_number, rule_number_of_item_number): New.
13867 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
13868 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13869 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
13870 Propagate their use.
13871 Much remains to be done, in particular wrt `shorts' from types.h.
13872
260008e5
AD
138732002-06-30 Akim Demaille <akim@epita.fr>
13874
13875 * src/symtab.c (symbol_new): Initialize the `printer' member.
13876
8a731ca8
AD
138772002-06-30 Akim Demaille <akim@epita.fr>
13878
13879 * src/LR0.c (save_reductions): Remove, replaced by...
13880 * src/state.h, src/state.c (state_reductions_set): New.
13881 (reductions, errs): Rename as...
13882 (reductions_t, errs_t): these.
13883 Adjust all dependencies.
13884
32e1e0a4
AD
138852002-06-30 Akim Demaille <akim@epita.fr>
13886
13887 * src/LR0.c (state_list_t, state_list_append): New.
13888 (first_state, last_state): Now symbol_list_t.
13889 (this_state): Remove.
13890 (new_itemsets, append_states, save_reductions): Take a state_t as
13891 argument.
13892 (set_states, generate_states): Adjust.
13893 (save_shifts): Remove, replaced by...
13894 * src/state.h, src/state.c (state_shifts_set): New.
13895 (shifts): Rename as...
13896 (shifts_t): this.
13897 Adjust all dependencies.
13898 * src/state.h (state_t): Remove the `next' member.
13899
e5fb6710
AD
139002002-06-30 Akim Demaille <akim@epita.fr>
13901
13902 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
13903 escaped in slot 0.
13904
c7ca99d4
AD
139052002-06-30 Akim Demaille <akim@epita.fr>
13906
13907 Use hash.h for the state hash table.
13908
13909 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
13910 (allocate_storage): Use state_hash_new.
13911 (free_storage): Use state_hash_free.
13912 (new_state, get_state): Adjust.
13913 * src/lalr.h, src/lalr.c (states): Move to...
13914 * src/states.h (state_t): Remove the `link' member, no longer
13915 used.
13916 * src/states.h, src/states.c: here.
13917 (state_hash_new, state_hash_free, state_hash_lookup)
13918 (state_hash_insert, states_free): New.
13919 * src/states.c (state_table, state_compare, state_hash): New.
13920 * src/output.c (output_actions): Do not free states now, since we
13921 still need to know the final_state number in `prepare', called
13922 afterwards. Do it...
13923 * src/main.c (main): here: call states_free after `output'.
13924
df0e7316
AD
139252002-06-30 Akim Demaille <akim@epita.fr>
13926
13927 * src/state.h, src/state.c (state_new): New, extracted from...
13928 * src/LR0.c (new_state): here.
13929 * src/state.h (STATE_ALLOC): Move to...
13930 * src/state.c: here.
13931 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
13932 * src/state.h, src/state.c: here.
13933
39f41916
AD
139342002-06-30 Akim Demaille <akim@epita.fr>
13935
13936 * src/reader.c (gensym): Rename as...
13937 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
13938 (getsym): Rename as...
13939 (symbol_get): this.
13940
d57650a5
AD
139412002-06-30 Akim Demaille <akim@epita.fr>
13942
13943 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
13944 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
13945 * src/output.c, src/print.c, src/print_graph.c: Propagate.
13946 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
13947
5a08f1ce
AD
139482002-06-30 Akim Demaille <akim@epita.fr>
13949
13950 Make the test suite pass with warnings checked.
13951
13952 * tests/actions.at (Printers and Destructors): Improve.
13953 Avoid unsigned vs. signed issues.
13954 * tests/calc.at: Don't exercise the scanner here, do it...
13955 * tests/input.at (Torturing the Scanner): here.
13956
720623af
PH
139572002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13958
88e7e941 13959 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
13960 reorganize first lines parallel to yacc.c.
13961
fb8135fa
AD
139622002-06-28 Akim Demaille <akim@epita.fr>
13963
13964 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
13965 (b4_token_enum, b4_token_defines): New, factored from...
13966 * data/lalr1.cc, data/yacc.c, glr.c: here.
13967
41442480
AD
139682002-06-28 Akim Demaille <akim@epita.fr>
13969
13970 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
13971 unused variables.
13972 * src/output.c (merger_output): static.
13973
e0e5bf84
AD
139742002-06-28 Akim Demaille <akim@epita.fr>
13975
ba0fe3c7 13976 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
13977 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
13978 pacify GCC.
13979 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 13980
676385e2
PH
139812002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13982
13983 Accumulated changelog for new GLR parsing features.
13984
6a254321 13985 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
13986 conflicts_total_count.
13987 * src/conflicts.h: Ditto.
13988 * src/output.c (token_actions): Use the new name.
13989 (output_conflicts): Change conflp => conflict_list_heads, and
13990 confl => conflict_list for better readability.
13991 * data/glr.c: Use the new names.
13992 * NEWS: Add self to GLR announcement.
e0e5bf84 13993
676385e2
PH
13994 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
13995
13996 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
13997 Akim Demaille.
13998
13999 * data/bison.glr: Change name to glr.c
14000 * data/glr.c: Renamed from bison.glr.
14001 * data/Makefile.am: Add glr.c
e0e5bf84
AD
14002
14003 * src/getargs.c:
14004
676385e2 14005 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 14006 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 14007
676385e2
PH
14008 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14009
14010 * data/bison.glr: Be sure to restore the
14011 current #line when returning to the skeleton contents after having
14012 exposed the input file's #line.
14013
14014 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14015
14016 * data/bison.glr: Bring up to date with changes to bison.simple.
14017
14018 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14019
14020 * data/bison.glr: Correct definitions that use b4_prefix.
14021 Various reformatting.
14022 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
14023 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
14024 yytokenp argument; now part of stack.
14025 (yychar): Define to behave as documented.
14026 (yyclearin): Ditto.
e0e5bf84 14027
676385e2
PH
14028 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14029
14030 * src/reader.h: Add declaration for free_merger_functions.
14031
14032 * src/reader.c (merge_functions): New variable.
14033 (get_merge_function): New function.
14034 (free_merger_functions): New function.
14035 (readgram): Check for %prec that is not followed by a symbol.
14036 Handle %dprec and %merge declarations.
14037 (packgram): Initialize dprec and merger fields in rules array.
14038
14039 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
14040 conflict_list_cnt, conflict_list_free): New variables.
14041 (table_grow): Also grow conflict_table.
e0e5bf84 14042 (prepare_rules): Output dprec and merger tables.
676385e2 14043 (conflict_row): New function.
e0e5bf84 14044 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
14045 default reduction in conflicted states for GLR parser so that there
14046 are spaces for the conflict lists.
14047 (save_row): Also save conflict information.
14048 (token_actions): Allocate conflict list.
14049 (merger_output): New function.
14050 (pack_vector): Pack conflict table, too.
14051 (output_conflicts): New function to output yyconflp and yyconfl.
14052 (output_check): Allocate conflict_tos.
14053 (output_actions): Output conflict tables, also.
14054 (output_skeleton): Output b4_mergers definition.
14055 (prepare): Output b4_max_rhs_length definition.
14056 Use 'bison.glr' as default skeleton for GLR parsers.
14057
14058 * src/gram.c (glr_parser): New flag.
14059 (grammar_free): Call free_merger_functions.
14060
14061 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
14062 all pairs of conflicting reductions, rather than just all tokens
14063 causing conflicts. Needed to size conflict tables.
e0e5bf84 14064 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
14065 interface.
14066 (conflicts_print): Ditto.
14067 (count_total_conflicts): New function.
14068
14069 * src/reader.h (merger_list): New type.
14070 (merge_functions): New variable.
14071
14072 * src/lex.h (tok_dprec, tok_merge): New token types.
14073
14074 * src/gram.h (rule_s): Add dprec and merger fields.
14075 (glr_parser): New flag.
14076
14077 * src/conflicts.h (count_total_conflicts): New function.
14078
14079 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
14080
14081 * doc/bison.texinfo (Generalized LR Parsing): New section.
14082 (GLR Parsers): New section.
14083 (Language and Grammar): Mention GLR parsing.
14084 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
14085 Correct typo ("tge" -> "the").
14086
14087 * data/bison.glr: New skeleton for GLR parsing.
14088
14089 * tests/cxx-gram.at: New tests for GLR parsing.
14090
14091 * tests/testsuite.at: Include cxx-gram.at.
14092
14093 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 14094
676385e2
PH
14095 * src/parse-gram.y:
14096
14097 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
14098
14099 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 14100
b5480d74 141012002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
14102
14103 * src/options.h, src/options.c: Remove.
14104 * src/getargs.c (short_options, long_options): New.
14105
60491a94
AD
141062002-06-27 Akim Demaille <akim@epita.fr>
14107
14108 * data/bison.simple, data/bison.c++: Rename as...
14109 * data/yacc.c, data/lalr1.cc: these.
14110 * doc/bison.texinfo (Environment Variables): Remove.
14111
9be0c25b
AD
141122002-06-25 Raja R Harinath <harinath@cs.umn.edu>
14113
14114 * src/getargs.c (report_argmatch): Initialize strtok().
14115
1ae72863
AD
141162002-06-20 Akim Demaille <akim@epita.fr>
14117
14118 * data/bison.simple (b4_symbol_actions): New, replaces...
14119 (b4_symbol_destructor, b4_symbol_printer): these.
14120 (yysymprint): Be sure to call YYPRINT only for tokens, and using
14121 user token numbers.
14122
87542d29
AD
141232002-06-20 Akim Demaille <akim@epita.fr>
14124
14125 * data/bison.simple (yydestructor): Rename as...
14126 (yydestruct): this.
14127
1a31ed21
AD
141282002-06-20 Akim Demaille <akim@epita.fr>
14129
14130 * src/symtab.h, src/symtab.c (symbol_type_set)
14131 (symbol_destructor_set, symbol_precedence_set): The location is
14132 the last argument.
14133 Adjust all callers.
14134
e776192e
AD
141352002-06-20 Akim Demaille <akim@epita.fr>
14136
14137 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
14138 internals.
14139 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
14140 Takes a location.
14141 * src/symtab.h, src/symtab.c (symbol_class_set)
14142 (symbol_user_token_number_set): Likewise.
14143 Adjust all callers.
14144 Promote complain_at.
14145 * tests/input.at (Type Clashes): Adjust.
14146
5c1180b3
AD
141472002-06-20 Akim Demaille <akim@epita.fr>
14148
14149 * data/bison.simple (YYLEX): Fix the declaration when
14150 %pure-parser.
14151
e3170060
AD
141522002-06-20 Akim Demaille <akim@epita.fr>
14153
14154 * data/bison.simple (yysymprint): Don't print the token number,
14155 just its name.
14156 * tests/actions.at (Destructors): Rename as...
14157 (Printers and Destructors): this.
14158 Also exercise %printer.
14159
253862fd
AD
141602002-06-20 Akim Demaille <akim@epita.fr>
14161
14162 * data/bison.simple (YYDSYMPRINT): New.
14163 Use it to remove many of the #if YYDEBUG/if (yydebug).
14164
366eea36
AD
141652002-06-20 Akim Demaille <akim@epita.fr>
14166
14167 * src/symtab.h, src/symtab.c (symbol_t): printer and
14168 printer_location are new members.
14169 (symbol_printer_set): New.
14170 * src/parse-gram.y (PERCENT_PRINTER): New token.
14171 Handle its associated rule.
14172 * src/scan-gram.l: Adjust.
14173 (handle_destructor_at, handle_destructor_dollar): Rename as...
14174 (handle_symbol_code_at, handle_symbol_code_dollar): these.
14175 * src/output.c (symbol_printers_output): New.
14176 (output_skeleton): Call it.
14177 * data/bison.simple (yysymprint): New. Cannot be named yyprint
14178 since there are already many grammar files with a user `yyprint'.
14179 Replace the calls to YYPRINT to calls to yysymprint.
14180 * tests/calc.at: Adjust.
14181 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
14182 taking advantage of parser very internal details (stack size!).
14183
4f25ebb0
AD
141842002-06-20 Akim Demaille <akim@epita.fr>
14185
14186 * src/scan-gram.l: Complete the scanner with the missing patterns
14187 to pacify Flex.
14188 Use `quote' and `symbol_tag_get' where appropriate.
14189
93b68a0e
AD
141902002-06-19 Akim Demaille <akim@epita.fr>
14191
14192 * tests/actions.at (Destructors): Augment to test locations.
14193 * data/bison.simple (yydestructor): Pass it the current location
14194 if locations are enabled.
14195 Prototype only when __STDC__ or C++.
14196 Change the argument names to move into the yy name space: there is
14197 user code here.
14198
58612f1d
AD
141992002-06-19 Akim Demaille <akim@epita.fr>
14200
74310291
AD
14201 * data/bison.simple (b4_pure_if): New.
14202 Use it instead of #ifdef YYPURE.
14203
142042002-06-19 Akim Demaille <akim@epita.fr>
14205
14206 * data/bison.simple (b4_location_if): New.
58612f1d
AD
14207 Use it instead of #ifdef YYLSP_NEEDED.
14208
f25bfb75
AD
142092002-06-19 Akim Demaille <akim@epita.fr>
14210
14211 Prepare @$ in %destructor, but currently don't bind it in the
14212 skeleton, as %location use is not cleaned up yet.
14213
14214 * src/scan-gram.l (handle_dollar, handle_destructor_at)
14215 (handle_action_at): New.
14216 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
14217 a braced_code_t and a location as additional arguments.
14218 (handle_destructor_dollar): Instead of requiring `b4_eval', just
14219 unquote one when outputting `b4_dollar_dollar'.
14220 Adjust callers.
14221 * data/bison.simple (b4_eval): Remove.
14222 (b4_symbol_destructor): Adjust.
14223 * tests/input.at (Invalid @n): Adjust.
14224
c732d2c6
AD
142252002-06-19 Zack Weinberg <zack@codesourcery.com>
14226
14227 * doc/bison.texinfo: Document ability to have multiple
14228 prologue sections.
14229
8c165d89
AD
142302002-06-18 Akim Demaille <akim@epita.fr>
14231
14232 * src/files.c (compute_base_names): When computing the output file
14233 names from the input file name, strip the directory part.
14234
ca98bf57
AD
142352002-06-18 Akim Demaille <akim@epita.fr>
14236
14237 * data/bison.simple.new: Comment changes.
14238 Reported by Andreas Schwab.
14239
0bfb02ff
AD
142402002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
14241
14242 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
14243 there are no `label `yyoverflowlab' defined but not used' warnings
14244 when yyoverflow is defined.
14245
24c0aad7
AD
142462002-06-18 Akim Demaille <akim@epita.fr>
14247
14248 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
14249 new member.
14250 (symbol_destructor_set): Adjust.
14251 * src/output.c (symbol_destructors_output): Output the destructor
14252 locations.
14253 Output the symbol name.
14254 * data/bison.simple (b4_symbol_destructor): Adjust.
14255
5719c109
AD
142562002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
14257 and Akim Demaille <akim@epita.fr>
14258
14259 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
14260 what's left on the stack when the error recovery hits EOF.
14261 * tests/actions.at (Destructors): Complete to exercise this case.
14262
9280d3ef
AD
142632002-06-17 Akim Demaille <akim@epita.fr>
14264
14265 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
14266 arguments is really empty, not only equal to `[]'.
14267 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
14268 member.
14269 (symbol_destructor_set): New.
14270 * src/output.c (symbol_destructors_output): New.
14271 * src/reader.h (brace_code_t, current_braced_code): New.
14272 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
14273 (handle_dollar): Rename as...
14274 (handle_action_dollar): this.
14275 (handle_destructor_dollar): New.
14276 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
14277 (grammar_declaration): Use it.
14278 * data/bison.simple (yystos): Is always defined.
14279 (yydestructor): New.
14280 * tests/actions.at (Destructors): New.
14281 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
14282
dafdc66f
AD
142832002-06-17 Akim Demaille <akim@epita.fr>
14284
14285 * src/symlist.h, src/symlist.c (symbol_list_length): New.
14286 * src/scan-gram.l (handle_dollar, handle_at): Compute the
14287 rule_length only when needed.
14288 * src/output.c (actions_output, token_definitions_output): Output
14289 the full M4 block.
14290 * src/symtab.c: Don't access directly to the symbol tag, use
14291 symbol_tag_get.
14292 * src/parse-gram.y: Use symbol_list_free.
14293
56c47203
AD
142942002-06-17 Akim Demaille <akim@epita.fr>
14295
14296 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
14297 (symbol_list_prepend, get_type_name): Move to...
14298 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
14299 (symbol_list_prepend, symbol_list_n_type_name_get): here.
14300 Adjust all callers.
14301 (symbol_list_free): New.
14302 * src/scan-gram.l (handle_dollar): Takes a location.
14303 * tests/input.at (Invalid $n): Adjust.
14304
1e0bab92
AD
143052002-06-17 Akim Demaille <akim@epita.fr>
14306
14307 * src/reader.h, src/reader.c (symbol_list_new): Export it.
14308 (symbol_list_prepend): New.
14309 * src/parse-gram.y (%union): `list' is a new member.
14310 (symbols.1): New, replaces...
14311 (terms_to_prec.1, nterms_to_type.1): these.
14312 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
14313 Take a location as additional argument.
14314 Adjust all callers.
14315
04e60654
AD
143162002-06-15 Akim Demaille <akim@epita.fr>
14317
14318 * src/parse-gram.y: Move %token in the declaration section so that
14319 we don't depend upon CVS Bison.
14320
10e5b8bd
AD
143212002-06-15 Akim Demaille <akim@epita.fr>
14322
14323 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
14324 * src/print.c (print_core): Use it.
14325
9801d40c
AD
143262002-06-15 Akim Demaille <akim@epita.fr>
14327
14328 * src/conflicts.c (log_resolution): Accept the rule involved in
14329 the sr conflicts instead of the lookahead number that points to
14330 that rule.
14331 (flush_reduce): Accept the current lookahead vector as argument,
14332 instead of the index in LA.
14333 (resolve_sr_conflict): Accept the current number of lookahead
14334 bitset to consider for the STATE, instead of the index in LA.
14335 (set_conflicts): Adjust.
14336 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
14337
c0263492
AD
143382002-06-15 Akim Demaille <akim@epita.fr>
14339
14340 * src/state.h (state_t): Replace the `lookaheadsp' member, a
14341 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
14342 Adjust all dependencies.
14343 * src/lalr.c (initialize_lookaheads): Split into...
14344 (states_lookaheads_count, states_lookaheads_initialize): these.
14345 (lalr): Adjust.
14346
9757c359
AD
143472002-06-15 Akim Demaille <akim@epita.fr>
14348
14349 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
14350 out of...
14351 (grammar_rules_print): here.
14352 * src/reduce.c (reduce_output): Use it.
14353 * tests/reduce.at (Useless Rules, Reduced Automaton)
14354 (Underivable Rules): Adjust.
14355
6b98e4b5
AD
143562002-06-15 Akim Demaille <akim@epita.fr>
14357
14358 Copy BYacc's nice way to report the grammar.
14359
14360 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
14361 New.
14362 Don't print the rules' location, it is confusing and useless.
14363 (rule_print): Use grammar_rhs_print.
14364 * src/print.c (print_grammar): Use grammar_rules_print.
14365
6b98e4b5
AD
143662002-06-15 Akim Demaille <akim@epita.fr>
14367
14368 Complete and rationalize `useless thing' warnings.
14369
14370 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
14371 (symbol_tag_print): New.
14372 Use them everywhere in place of accessing directly the tag member.
14373 * src/gram.h, src/gram.c (rule_print): New.
14374 Use it where a rule used to be printed `by hand'.
14375 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
14376 (reduce_grammar_tables): Report the useless rules.
14377 (reduce_print): Useless things are a warning, not an error.
14378 Report it as such.
14379 * tests/reduce.at (Useless Nonterminals, Useless Rules):
14380 (Reduced Automaton, Underivable Rules): Adjust.
14381 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
14382 * tests/conflicts.at (Unresolved SR Conflicts)
14383 (Solved SR Conflicts): Adjust.
14384
ee000ba4
AD
143852002-06-15 Akim Demaille <akim@epita.fr>
14386
14387 Let symbols have a location.
14388
14389 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
14390 (getsym): Adjust.
14391 Adjust all callers.
14392 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
14393 Use location_t, not int.
14394 * src/symtab.c (symbol_check_defined): Take advantage of the
14395 location.
14396 * tests/regression.at (Invalid inputs): Adjust.
14397
8efe435c
AD
143982002-06-15 Akim Demaille <akim@epita.fr>
14399
14400 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
14401 (input): Don't try to initialize yylloc here, do it in the
14402 scanner.
14403 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
14404 * src/gram.h (rule_t): Change line and action_line into location
14405 and action_location, of location_t type.
14406 Adjust all dependencies.
14407 * src/location.h, src/location.c (empty_location): New.
14408 * src/reader.h, src/reader.c (grammar_start_symbol_set)
14409 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
14410 (grammar_current_rule_symbol_append)
14411 (grammar_current_rule_action_append): Expect a location as argument.
14412 * src/reader.c (grammar_midrule_action): Adjust to attach an
14413 action's location as dummy symbol location.
14414 * src/symtab.h, src/symtab.c (startsymbol_location): New.
14415 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
14416 the line numbers.
14417
1921f1d7
AD
144182002-06-14 Akim Demaille <akim@epita.fr>
14419
14420 Grammar declarations may be found in the grammar section.
14421
14422 * src/parse-gram.y (rules_or_grammar_declaration): New.
14423 (declarations): Each declaration may end with a semicolon, not
14424 just...
14425 (grammar_declaration): `"%union"'.
14426 (grammar): Branch to rules_or_grammar_declaration.
14427
4515534c
AD
144282002-06-14 Akim Demaille <akim@epita.fr>
14429
14430 * src/main.c (main): Invoke scanner_free.
14431
f958596b
AD
144322002-06-14 Akim Demaille <akim@epita.fr>
14433
14434 * src/output.c (m4_invoke): Extracted from...
14435 (output_skeleton): here.
14436 Free tempfile.
14437
2c569025
AD
144382002-06-14 Akim Demaille <akim@epita.fr>
14439
14440 * src/parse-gram.y (directives, directive, gram)
14441 (grammar_directives, precedence_directives, precedence_directive):
14442 Rename as...
14443 (declarations, declaration, grammar, grammar_declaration)
14444 (precedence_declaration, precedence_declarator): these.
14445 (symbol_declaration): New.
14446
592e8d4d
AD
144472002-06-14 Akim Demaille <akim@epita.fr>
14448
14449 * src/files.c (action_obstack): Remove, unused.
14450 (output_obstack): Remove it, and all its dependencies, as it is no
14451 longer needed.
14452 * src/reader.c (epilogue_set): Build the epilogue in the
14453 muscle_obstack.
14454 * src/output.h, src/output.c (muscle_obstack): Move to...
14455 * src/muscle_tab.h, src/muscle_tab.h: here.
14456 (muscle_init): Initialize muscle_obstack.
14457 (muscle_free): New.
14458 * src/main.c (main): Call it.
14459
0c15323d
AD
144602002-06-14 Akim Demaille <akim@epita.fr>
14461
14462 * src/location.h: New, extracted from...
14463 * src/reader.h: here.
14464 * src/Makefile.am (noinst_HEADERS): Merge into
14465 (bison_SOURCES): this.
14466 Add location.h.
14467 * src/parse-gram.y: Use location_t instead of Bison's.
14468 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
14469 Use location_t instead of ints.
14470
e96c9728
AD
144712002-06-14 Akim Demaille <akim@epita.fr>
14472
14473 * data/bison.simple, data/bison.c++: Be sure to restore the
14474 current #line when returning to the skeleton contents after having
14475 exposed the input file's #line.
14476
75d1fe16
AD
144772002-06-12 Akim Demaille <akim@epita.fr>
14478
14479 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
14480 eager.
14481 * tests/actions.at (Exotic Dollars): New.
14482
6c35d22c
AD
144832002-06-12 Akim Demaille <akim@epita.fr>
14484
14485 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
14486 ['"/] too eagerly.
14487 * tests/input.at (Torturing the Scanner): New.
14488
1d6412ad
AD
144892002-06-11 Akim Demaille <akim@epita.fr>
14490
14491 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
14492 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
14493 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
14494 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
14495 * src/reader.c (reader): Use it.
14496
4cdb01db
AD
144972002-06-11 Akim Demaille <akim@epita.fr>
14498
14499 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
14500 Adjust all callers.
14501 (scanner_last_string_free): New.
14502
44995b2e
AD
145032002-06-11 Akim Demaille <akim@epita.fr>
14504
14505 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
14506 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
14507 (last_string, YY_OBS_FREE): New.
14508 Use them when returning an ID.
14509
e9955c83
AD
145102002-06-11 Akim Demaille <akim@epita.fr>
14511
14512 Have Bison grammars parsed by a Bison grammar.
14513
14514 * src/reader.c, src/reader.h (prologue_augment): New.
14515 * src/reader.c (copy_definition): Remove.
14516
14517 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
14518 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
14519 (grammar_current_rule_prec_set, grammar_current_rule_check)
14520 (grammar_current_rule_symbol_append)
14521 (grammar_current_rule_action_append): Export.
14522 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
14523 (symbol_list_action_append): Remove.
14524 Hook the routines from reader.
14525 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
14526 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
14527
14528 * src/reader.c (read_declarations): Remove, unused.
14529
14530 * src/parse-gram.y: Handle the epilogue.
14531 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
14532 (grammar_start_symbol_set): this.
14533 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
14534 * src/reader.c (readgram): Remove, unused.
14535 (reader): Adjust to insert eoftoken and axiom where appropriate.
14536
14537 * src/reader.c (copy_dollar): Replace with...
14538 * src/scan-gram.h (handle_dollar): this.
14539 * src/parse-gram.y: Remove `%thong'.
14540
14541 * src/reader.c (copy_at): Replace with...
14542 * src/scan-gram.h (handle_at): this.
14543
14544 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
14545 New.
14546
14547 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
14548 time being.
14549
14550 * src/reader.h, src/reader.c (grammar_rule_end): New.
14551
14552 * src/parse.y (current_type, current_class): New.
14553 Implement `%nterm', `%token' support.
14554 Merge `%term' into `%token'.
14555 (string_as_id): New.
14556 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
14557 type name.
14558
14559 * src/parse-gram.y: Be sure to handle properly the beginning of
14560 rules.
14561
14562 * src/parse-gram.y: Handle %type.
14563 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
14564
14565 * src/parse-gram.y: More directives support.
14566 * src/options.c: No longer handle source directives.
14567
14568 * src/parse-gram.y: Fix %output.
14569
14570 * src/parse-gram.y: Handle %union.
14571 Use the prologue locations.
14572 * src/reader.c (parse_union_decl): Remove.
14573
14574 * src/reader.h, src/reader.c (epilogue_set): New.
14575 * src/parse-gram.y: Use it.
14576
14577 * data/bison.simple, data/bison.c++: b4_stype is now either not
14578 defined, then default to int, or to the contents of %union,
14579 without `union' itself.
14580 Adjust.
14581 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
14582
14583 * src/output.c (actions_output): Don't output braces, as they are
14584 already handled by the scanner.
14585
14586 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
14587 characters to themselves.
14588
14589 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
14590 that the epilogue has a proper #line.
14591
14592 * src/parse-gram.y: Handle precedence/associativity.
14593
14594 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
14595 a terminal.
14596 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
14597 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
14598 at all to define terminals that cannot be emitted.
14599
14600 * src/scan-gram.l: Escape M4 characters.
14601
14602 * src/scan-gram.l: Working properly with escapes in user
14603 strings/characters.
14604
14605 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
14606 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
14607 grammar.
14608 Use more modest sizes, as for the time being the parser does not
14609 release memory, and therefore the process swallows a huge amount
14610 of memory.
14611
14612 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
14613 stricter %token grammar.
14614
14615 * src/symtab.h (associativity): Add `undef_assoc'.
14616 (symbol_precedence_set): Do nothing when passed an undef_assoc.
14617 * src/symtab.c (symbol_check_alias_consistence): Adjust.
14618
14619 * tests/regression.at (Invalid %directive): Remove, as it is now
14620 meaningless.
14621 (Invalid inputs): Adjust to the new error messages.
14622 (Token definitions): The new grammar doesn't allow too many
14623 eccentricities.
14624
14625 * src/lex.h, src/lex.c: Remove.
14626 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
14627 (copy_character, copy_string2, copy_string, copy_identifier)
14628 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
14629 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
14630 (parse_action): Remove.
14631 * po/POTFILES.in: Adjust.
14632
2e047461
AD
146332002-06-11 Akim Demaille <akim@epita.fr>
14634
cd05d13c 14635 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
14636 rule's action member: return the action as a string.
14637 Don't require `rule_length' as an argument: compute it.
14638 (grammar_current_rule_symbol_append)
14639 (grammar_current_rule_action_append): New, eved out from
14640 (readgram): here.
14641 Remove `action_flag', `rulelength', unused now.
14642
9af3fbce
AD
146432002-06-11 Akim Demaille <akim@epita.fr>
14644
14645 * src/reader.c (grammar_current_rule_prec_set).
14646 (grammar_current_rule_check): New, eved out from...
14647 (readgram): here.
14648 Remove `xaction', `first_rhs': useless.
14649 * tests/input.at (Type clashes): New.
14650 * tests/existing.at (GNU Cim Grammar): Adjust.
14651
1485e106
AD
146522002-06-11 Akim Demaille <akim@epita.fr>
14653
14654 * src/reader.c (grammar_midrule_action): New, Eved out from
14655 (readgram): here.
14656
da4160c3
AD
146572002-06-11 Akim Demaille <akim@epita.fr>
14658
14659 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
14660 New.
14661 (readgram): Use them as replacement of inlined code, crule and
14662 crule1.
14663
f6d0f937
AD
146642002-06-11 Akim Demaille <akim@epita.fr>
14665
14666 * src/reader.c (grammar_end, grammar_symbol_append): New.
14667 (readgram): Use them.
14668 Make the use of `p' as local as possible.
14669
69078d4b
AD
146702002-06-10 Akim Demaille <akim@epita.fr>
14671
14672 GCJ's parser requires the tokens to be defined before the prologue.
14673
14674 * data/bison.simple: Output the token definition before the user's
14675 prologue.
14676 * tests/regression.at (Braces parsing, Duplicate string)
14677 (Mixing %token styles): Check the output from bison.
14678 (Early token definitions): New.
14679
5e424082
AD
146802002-06-10 Akim Demaille <akim@epita.fr>
14681
14682 * src/symtab.c (symbol_user_token_number_set): Don't complain when
14683 assigning twice the same user number to a token, so that we can
14684 use it in...
14685 * src/lex.c (lex): here.
14686 Also use `symbol_class_set' instead of hand written code.
14687 * src/reader.c (parse_assoc_decl): Likewise.
14688
44536b35
AD
146892002-06-10 Akim Demaille <akim@epita.fr>
14690
14691 * src/symtab.c, src/symtab.c (symbol_class_set)
14692 (symbol_user_token_number_set): New.
14693 * src/reader.c (parse_token_decl): Use them.
14694 Use a switch instead of ifs.
14695 Use a single argument.
14696
8b9f2372
AD
146972002-06-10 Akim Demaille <akim@epita.fr>
14698
14699 Remove `%thong' support as it is undocumented, unused, duplicates
14700 `%token's job, and creates useless e-mail traffic with people who
14701 want to know what it is, why it is undocumented, unused, and
14702 duplicates `%token's job.
14703
14704 * src/reader.c (parse_thong_decl): Remove.
14705 * src/options.c (option_table): Remove "thong".
14706 * src/lex.h (tok_thong): Remove.
14707
3ae2b51f
AD
147082002-06-10 Akim Demaille <akim@epita.fr>
14709
14710 * src/symtab.c, src/symtab.c (symbol_type_set)
14711 (symbol_precedence_set): New.
14712 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
14713 (value_components_used): Remove, unused.
14714
2f1afb73
AD
147152002-06-09 Akim Demaille <akim@epita.fr>
14716
14717 Move symbols handling code out of the reader.
14718
14719 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
14720 (axiom): Move to...
14721 * src/symtab.h, src/symtab.c: here.
14722
14723 * src/gram.c (start_symbol): Remove: use startsymbol->number.
14724 * src/reader.c (startval): Rename as...
14725 * src/symtab.h, src/symtab.c (startsymbol): this.
14726 * src/reader.c: Adjust.
14727
14728 * src/reader.c (symbol_check_defined, symbol_make_alias)
14729 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14730 (token_translations_init)
14731 Move to...
14732 * src/symtab.c: here.
14733 * src/reader.c (packsymbols): Move to...
14734 * src/symtab.h, src/symtab.c (symbols_pack): here.
14735 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
14736 argument.
14737
e9bca3ad
AD
147382002-06-03 Akim Demaille <akim@epita.fr>
14739
14740 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
14741 then statements.
14742
86eff183
AD
147432002-06-03 Akim Demaille <akim@epita.fr>
14744
14745 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
14746 structs with non literals.
14747 * src/scan-skel.l: never-interactive.
14748 * src/conflicts.c (enum conflict_resolution_e): No trailing
14749 comma.
14750 * src/getargs.c (usage): Split long literal strings.
14751 Reported by Hans Aberg.
14752
717be197
AD
147532002-05-28 Akim Demaille <akim@epita.fr>
14754
14755 * data/bison.c++: Use C++ ostreams.
14756 (cdebug_): New member.
14757
670ddffd
AD
147582002-05-28 Akim Demaille <akim@epita.fr>
14759
14760 * src/output.c (output_skeleton): Be sure to allocate enough room
14761 for `/' _and_ for `\0' in full_skeleton.
14762
769b430f
AD
147632002-05-28 Akim Demaille <akim@epita.fr>
14764
14765 * data/bison.c++: Catch up with bison.simple:
14766 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14767 and Paul Eggert <eggert@twinsun.com>: `error' handing.
14768 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
14769 and popping traces.
14770
7067cb36
PH
147712002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14772
14773 * src/output.c (output_skeleton): Put an explicit path in front of
14774 the skeleton file name, rather than relying on the -I directory,
14775 to partially alleviate effects of having a skeleton file lying around
14776 in the current directory.
769b430f 14777
4a713ec2
PH
147782002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14779
769b430f 14780 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
14781 obstack_printf should be obstack_fgrow1.
14782
b408954b
AD
147832002-05-26 Akim Demaille <akim@epita.fr>
14784
14785 * src/state.h (state_t): `solved_conflicts' is a new member.
14786 * src/LR0.c (new_state): Set it to 0.
14787 * src/conflicts.h, src/conflicts.c (print_conflicts)
14788 (free_conflicts, solve_conflicts): Rename as...
14789 (conflicts_print, conflicts_free, conflicts_solve): these.
14790 Adjust callers.
14791 * src/conflicts.c (enum conflict_resolution_e)
14792 (solved_conflicts_obstack): New, used by...
14793 (log_resolution): this.
14794 Adjust to attach the conflict resolution to each state.
14795 Complete the description with the precedence/associativity
14796 information.
14797 (resolve_sr_conflict): Adjust.
14798 * src/print.c (print_state): Output its solved_conflicts.
14799 * tests/conflicts.at (Unresolved SR Conflicts)
14800 (Solved SR Conflicts): Exercise --report=all.
14801
a49aecd5
AD
148022002-05-26 Akim Demaille <akim@epita.fr>
14803
14804 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14805 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14806 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
14807 (token_number_t, item_number_as_token_number)
14808 (token_number_as_item_number, muscle_insert_token_number_table):
14809 Rename as...
14810 (symbol_number_t, item_number_as_symbol_number)
14811 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
14812 these, since it is more appropriate.
14813
5504898e
AD
148142002-05-26 Akim Demaille <akim@epita.fr>
14815
14816 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
14817 `Error:' lines.
14818 * data/bison.simple (yystos) [YYDEBUG]: New.
14819 (yyparse) [YYDEBUG]: Display the symbols which are popped during
14820 error recovery.
14821 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
14822
ec3bc396
AD
148232002-05-25 Akim Demaille <akim@epita.fr>
14824
14825 * doc/bison.texinfo (Debugging): Split into...
14826 (Tracing): this new section, its former contents, and...
14827 (Understanding): this new section.
14828 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
14829 by...
14830 (report_flag): this.
14831 Adjust all dependencies.
14832 (report_args, report_types, report_argmatch): New.
14833 (usage, getargs): Report/support -r, --report.
14834 * src/options.h
14835 (struct option_table_struct): Rename as..,
14836 (struct option_table_s): this.
14837 Rename the `set_flag' member to `flag' to match with getopt_long's
14838 struct.
14839 * src/options.c (option_table): Split verbose into an entry for
14840 %verbose, and another for --verbose.
14841 Support --report/-r, so remove -r from the obsolete --raw.
14842 * src/print.c: Attach full item sets and lookaheads reports to
14843 report_flag instead of trace_flag.
14844 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
14845
78df8250
PE
148462002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14847 and Paul Eggert <eggert@twinsun.com>
769b430f 14848
78df8250
PE
14849 * data/bison.simple (yyparse): Correct error handling to conform to
14850 POSIX and yacc. Specifically, after syntax error is discovered,
14851 do not reduce further before shifting the error token.
14852 Clean up the code a bit by removing the labels yyerrdefault,
14853 yyerrhandle, yyerrpop.
14854 * NEWS: Document the above.
14855
c0c9ea05
PH
148562002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14857
14858 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
14859 type; it isn't always big enough, since it doesn't necessarily
14860 include non-terminals.
769b430f 14861 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
14862 the latter can be removed.
14863 (yy_token_number_type): Remove, only one use.
14864 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
14865 don't use TokenNumberType as element type.
769b430f 14866
c0c9ea05
PH
14867 * tests/regression.at: Modify expected output to agree with change
14868 to yyr1 and yytranslate.
769b430f 14869
6390a83f
FK
148702002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
14871
14872 * src/reader.c (parse_action): Use copy_character instead of
14873 obstack_1grow.
14874
db7c8e9a
AD
148752002-05-13 Akim Demaille <akim@epita.fr>
14876
14877 * tests/regression.at (Token definitions): Prototype yylex and
14878 yyerror.
14879
fcc61800
PH
148802002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14881
158c687b 14882 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
14883 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
14884 32-bit arithmetic.
14885 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
14886
5683e9b2
AD
148872002-05-07 Akim Demaille <akim@epita.fr>
14888
14889 * tests/synclines.at: Be sure to prototype yylex and yyerror to
14890 avoid GCC warnings.
14891
0c2d3f4c
AD
148922002-05-07 Akim Demaille <akim@epita.fr>
14893
14894 Kill GCC warnings.
14895
14896 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
14897 over the RHS of each rule.
14898 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
14899 * src/state.h (state_t): Member `nitems' is unsigned short.
14900 * src/LR0.c (get_state): Adjust.
14901 * src/reader.c (packgram): Likewise.
14902 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
14903 `Type'.
14904 (muscle_insert_int_table): Remove, unused.
14905 (prepare_rules): Remove `max'.
14906
1565b720
AD
149072002-05-06 Akim Demaille <akim@epita.fr>
14908
14909 * src/closure.c (print_firsts): Display of the symbol tags.
14910 (bitmatrix_print): Move to...
14911 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
14912 here.
14913 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
14914
cfaee611
AD
149152002-05-06 Akim Demaille <akim@epita.fr>
14916
14917 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
14918 hash_do_for_each.
14919
458be8e0
AD
149202002-05-06 Akim Demaille <akim@epita.fr>
14921
14922 * src/LR0.c (new_state, get_state): Instead of using the global
14923 `kernel_size' and `kernel_base', have two new arguments:
14924 `core_size' and `core'.
14925 Adjust callers.
14926
a900a624
AD
149272002-05-06 Akim Demaille <akim@epita.fr>
14928
14929 * src/reader.c (packgram): No longer end `ritem' with a 0
14930 sentinel: it is not used.
14931
d4e7d3a1
AD
149322002-05-05 Akim Demaille <akim@epita.fr>
14933
14934 New experimental feature: display the lookaheads in the report and
14935 graph.
14936
14937 * src/print (print_core): When --trace-flag, display the rules
14938 lookaheads.
14939 * src/print_graph.c (print_core): Likewise.
14940 Swap the arguments.
14941 Adjust caller.
14942
39ceb25b
AD
149432002-05-05 Akim Demaille <akim@epita.fr>
14944
14945 * tests/torture.at (Many lookaheads): New test.
14946
5372019f
AD
149472002-05-05 Akim Demaille <akim@epita.fr>
14948
14949 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
14950 (GENERATE_MUSCLE_INSERT_TABLE): this.
14951 (output_int_table, output_unsigned_int_table, output_short_table)
14952 (output_token_number_table, output_item_number_table): Replace with...
14953 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
14954 (muscle_insert_short_table, muscle_insert_token_number_table)
14955 (muscle_insert_item_number_table): these.
14956 Adjust all callers.
14957 (prepare_tokens): Don't free `translations', since...
14958 * src/reader.h, src/reader.c (grammar_free): do it.
14959 Move to...
14960 * src/gram.h, src/gram.c (grammar_free): here.
14961 * data/bison.simple, data/bison.c++: b4_token_number_max is now
14962 b4_translate_max.
14963
5df5f6d5
AD
149642002-05-05 Akim Demaille <akim@epita.fr>
14965
14966 * src/output.c (output_unsigned_int_table): New.
14967 (prepare_rules): `i' is unsigned.
14968 `prhs', `rline', `r2' are unsigned int.
14969 Rename muscle `rhs_number_max' as `rhs_max'.
14970 Output muscles `prhs_max', `rline_max', and `r2_max'.
14971 Free rline and r1.
14972 * data/bison.simple, data/bison.c++: Adjust to use these muscles
14973 to compute types instead of constant types.
14974 * tests/regression.at (Web2c Actions): Adjust.
14975
b87f8b21
AD
149762002-05-04 Akim Demaille <akim@epita.fr>
14977
14978 * src/symtab.h (SALIAS, SUNDEF): Rename as...
14979 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
14980 Adjust dependencies.
14981 * src/output.c (token_definitions_output): Be sure not to output a
14982 `#define 'a'' when fed with `%token 'a' "a"'.
14983 * tests/regression.at (Token definitions): New.
14984
8bb936e4
PE
149852002-05-03 Paul Eggert <eggert@twinsun.com>
14986
14987 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
14988 for K&R C.
14989
149902002-05-03 gettextize <bug-gnu-gettext@gnu.org>
14991
14992 * Makefile.am (SUBDIRS): Remove intl.
14993 (EXTRA_DIST): Add config/config.rpath.
14994
53c71a12
AD
149952002-05-03 Akim Demaille <akim@epita.fr>
14996
14997 * data/bison.simple (m4_if): Don't output empty enums.
14998 And actually, output valid enum definitions :(.
14999
289dd0cf
AD
150002002-05-03 Akim Demaille <akim@epita.fr>
15001
15002 * configure.bat: Remove, completely obsolete.
15003 * Makefile.am (EXTRA_DIST): Adjust.
15004 Don't distribute config.rpath...
15005 * config/Makefile.am (EXTRA_DIST): Do it.
15006
db85e524
AD
150072002-05-03 Akim Demaille <akim@epita.fr>
15008
15009 * configure.in (GETTEXT_VERSION): New.
15010 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
15011
83ccf991
AD
150122002-05-03 Akim Demaille <akim@epita.fr>
15013
15014 * data/bison.simple (b4_token_enum): New.
15015 (b4_token_defines): Use it to output tokens both as #define and
15016 enums.
15017 Suggested by Paul Eggert.
15018 * src/output.c (token_definitions_output): Don't output spurious
15019 white spaces.
15020
1f418995
AD
150212002-05-03 Akim Demaille <akim@epita.fr>
15022
15023 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
15024
45119f04
RA
150252002-05-02 Robert Anisko <robert@lrde.epita.fr>
15026
15027 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
15028 Update the stack class, give a try to deque as the default container.
15029
b2d52318
AD
150302002-05-02 Akim Demaille <akim@epita.fr>
15031
15032 * data/bison.simple (yyparse): Do not implement @$ = @1.
15033 (YYLLOC_DEFAULT): Adjust to do it.
15034 * doc/bison.texinfo (Location Default Action): Fix.
15035
3a8b4109
AD
150362002-05-02 Akim Demaille <akim@epita.fr>
15037
15038 * src/reader.c (parse_braces): Merge into...
15039 (parse_action): this.
15040
84614e13
AD
150412002-05-02 Akim Demaille <akim@epita.fr>
15042
15043 * configure.in (ALL_LINGUAS): Remove.
15044 * po/LINGUAS, hr.po: New.
15045
fdbcd8e2
AD
150462002-05-02 Akim Demaille <akim@epita.fr>
15047
15048 Remove the so called hairy (semantic) parsers.
15049
15050 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
15051 * src/gram.h, src/gram.c (semantic_parser): Remove.
15052 (rule_t): Remove the guard and guard_line members.
15053 * src/lex.h (token_t): remove tok_guard.
15054 * src/options.c (option_table): Remove %guard and %semantic_parser
15055 support.
15056 * src/output.c, src/output.h (guards_output): Remove.
15057 (prepare): Adjust.
15058 (token_definitions_output): Don't output the `T'
15059 tokens (???).
15060 (output_skeleton): Don't output the guards.
15061 * src/files.c, src/files.c (attrsfile): Remove.
15062 * src/reader.c (symbol_list): Remove the guard and guard_line
15063 members.
15064 Adjust dependencies.
15065 (parse_guard): Remove.
15066 * data/bison.hairy: Remove.
15067 * doc/bison.texinfo (Environment Variables): Remove occurrences of
15068 BISON_HAIRY.
15069
82b6cb3f
AD
150702002-05-02 Akim Demaille <akim@epita.fr>
15071
15072 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
15073 (parse_guard): Rename the formal argument `stack_offset' as
15074 `rule_length', which is more readable.
15075 Adjust callers.
15076 (copy_at, copy_dollar): Instead of outputting the hard coded
15077 values of $$, $n and so forth, output invocation to b4_lhs_value,
15078 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
15079 Note: this patch partially drops `semantic-parser' support: it
15080 always does `rule_length - n', where semantic parsers ought to
15081 always use `-n'.
82b6cb3f
AD
15082 * data/bison.simple, data/bison.c++ (b4_lhs_value)
15083 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
15084
6cbfbcc5
AD
150852002-05-02 Akim Demaille <akim@epita.fr>
15086
15087 * configure.in (AC_INIT): Bump to 1.49b.
15088 (AM_INIT_AUTOMAKE): Short invocation.
15089
b8548114
AD
150902002-05-02 Akim Demaille <akim@epita.fr>
15091
15092 Version 1.49a.
15093
c20cd1fa
AD
150942002-05-01 Akim Demaille <akim@epita.fr>
15095
15096 * src/skeleton.h: Remove.
15097
8a9566d4
AD
150982002-05-01 Akim Demaille <akim@epita.fr>
15099
15100 * src/skeleton.h: Fix the #endif.
15101 Reported by Magnus Fromreide.
15102
8c6d399a
PE
151032002-04-26 Paul Eggert <eggert@twinsun.com>
15104
15105 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
15106 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 15107 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 15108
2b7ed18a
RA
151092002-04-25 Robert Anisko <robert@lrde.epita.fr>
15110
15111 * src/scan-skel.l: Postprocess quadrigraphs.
15112
15113 * src/reader.c (copy_character): New function, used to output
15114 single characters while replacing `[' and `]' with quadrigraphs, to
15115 avoid troubles with M4 quotes.
15116 (copy_comment): Output characters with copy_character.
15117 (read_additionnal_code): Likewise.
15118 (copy_string2): Likewise.
15119 (copy_definition): Likewise.
15120
15121 * tests/calc.at: Exercise M4 quoting.
15122
34a89c50
AD
151232002-04-25 Akim Demaille <akim@epita.fr>
15124
15125 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
15126 between `!' and the command.
15127 Reported by Paul Eggert.
15128
0dd1580a
RA
151292002-04-24 Robert Anisko <robert@lrde.epita.fr>
15130
15131 * tests/calc.at: Exercise prologue splitting.
15132
15133 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
15134 `b4_post_prologue' instead of `b4_prologue'.
15135
15136 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
15137 muscles.
15138 (output): Free pre_prologue_obstack and post_prologue_obstack.
15139 * src/files.h, src/files.c (attrs_obstack): Remove.
15140 (pre_prologue_obstack, post_prologue_obstack): New.
15141 * src/reader.c (copy_definition): Add a parameter to specify the
15142 obstack to fill, instead of using attrs_obstack unconditionally.
15143 (read_declarations): Pass pre_prologue_obstack to copy_definition if
15144 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
15145
83c1796f
PE
151462002-04-23 Paul Eggert <eggert@twinsun.com>
15147
15148 * data/bison.simple: Remove unnecessary commentary and white
15149 space differences from 1_29-branch.
15150 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
15151
15152 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
15153 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
15154 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
15155 constructors or destructors.
15156
15157 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
15158
1207eeac
AD
151592002-04-23 Akim Demaille <akim@epita.fr>
15160
15161 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
15162 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
15163 location with columns.
15164 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
15165 All reported by Paul Eggert.
15166
78ab8f67
AD
151672002-04-22 Akim Demaille <akim@epita.fr>
15168
15169 * src/reduce.c (dump_grammar): Move to...
15170 * src/gram.h, src/gram.c (grammar_dump): here.
15171 Be sure to separate long item numbers.
15172 Don't read the members of a rule's prec if its nil.
15173
133c20e2
AD
151742002-04-22 Akim Demaille <akim@epita.fr>
15175
15176 * src/output.c (table_size, table_grow): New.
15177 (MAXTABLE): Remove, replace uses with table_size.
15178 (pack_vector): Instead of dying when the table is too big, grow it.
15179
9515e8a7
AD
151802002-04-22 Akim Demaille <akim@epita.fr>
15181
15182 * data/bison.simple (yyr1): Its type is that of a token number.
15183 * data/bison.c++ (r1_): Likewise.
15184 * tests/regression.at (Web2c Actions): Adjust.
15185
23c5a174
AD
151862002-04-22 Akim Demaille <akim@epita.fr>
15187
15188 * src/reader.c (token_translations_init): 256 is now the default
15189 value for the error token, i.e., it will be assigned another
15190 number if the user assigned 256 to one of her tokens.
15191 (reader): Don't force 256 to error.
15192 * doc/bison.texinfo (Symbols): Adjust.
15193 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
15194 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
15195 etc. instead of 10, 20, 30 (which was used to `jump' over error
15196 (256) and undefined (2)).
15197
5fbb0954
AD
151982002-04-22 Akim Demaille <akim@epita.fr>
15199
15200 Propagate more token_number_t.
15201
15202 * src/gram.h (token_number_as_item_number)
15203 (item_number_as_token_number): New.
15204 * src/output.c (GENERATE_OUTPUT_TABLE): New.
15205 Use it to create output_item_number_table and
15206 output_token_number_table.
15207 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
15208 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
15209 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
15210 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
15211
4f940944
AD
152122002-04-22 Akim Demaille <akim@epita.fr>
15213
15214 * src/output.h, src/output.c (get_lines_number): Remove.
15215
3ded9a63
AD
152162002-04-19 Akim Demaille <akim@epita.fr>
15217
15218 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
15219 as Lex/Flex'.
15220 (Debugging): More details about enabling the debugging features.
15221 (Table of Symbols): Describe $$, $n, @$, and @n.
15222 Suggested by Tim Josling.
15223
e0c471a9
AD
152242002-04-19 Akim Demaille <akim@epita.fr>
15225
15226 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
15227
fecc10cd
AD
152282002-04-10 Akim Demaille <akim@epita.fr>
15229
15230 * src/system.h: Rely on HAVE_LIMITS_H.
15231 Suggested by Paul Eggert.
15232
51dec47b
AD
152332002-04-09 Akim Demaille <akim@epita.fr>
15234
15235 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
15236 full stderr, and strip it according to the bison options, instead
15237 of composing the error message from different bits.
15238 This makes it easier to check for several error messages.
15239 Adjust all the invocations.
15240 Add an invocation exercising the error token.
15241 Add an invocation demonstrating a stupid error message.
15242 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
15243 Adjust the tests.
15244 Error message are for stderr, not stdout.
15245
007a50a4
AD
152462002-04-09 Akim Demaille <akim@epita.fr>
15247
15248 * src/gram.h, src/gram.c (error_token_number): Remove, use
15249 errtoken->number.
15250 * src/reader.c (reader): Don't specify the user token number (2)
15251 for $undefined, as it uselessly prevents using it.
15252 * src/gram.h (token_number_t): Move to...
15253 * src/symtab.h: here.
15254 (state_t.number): Is a token_number_t.
15255 * src/print.c, src/reader.c: Use undeftoken->number instead of
15256 hard coded 2.
15257 (Even though this 2 is not the same as above: the number of the
15258 undeftoken remains being 2, it is its user token number which
15259 might not be 2).
15260 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
15261 `user_token_number_max'.
15262 Output `undef_token_number'.
15263 * data/bison.simple, data/bison.c++: Use them.
15264 Be sure to map invalid yylex return values to
15265 `undef_token_number'. This saves us from gratuitous SEGV.
15266
15267 * tests/conflicts.at (Solved SR Conflicts)
15268 (Unresolved SR Conflicts): Adjust.
15269 * tests/regression.at (Web2c Actions): Adjust.
15270
06446ccf
AD
152712002-04-08 Akim Demaille <akim@epita.fr>
15272
15273 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
15274 Adding #line.
15275 Remove the duplicate `typedefs'.
15276 (RhsNumberType): Fix the declaration and various other typos.
15277 Use __ofile__.
15278 * data/bison.simple: Use __ofile__.
15279 * src/scan-skel.l: Handle __ofile__.
15280
62a3e4f0
AD
152812002-04-08 Akim Demaille <akim@epita.fr>
15282
15283 * src/gram.h (item_number_t): New, the type of item numbers in
15284 RITEM. Note that it must be able to code symbol numbers as
15285 positive number, and the negation of rule numbers as negative
15286 numbers.
15287 Adjust all dependencies (pretty many).
15288 * src/reduce.c (rule): Remove this `short *' pointer: use
15289 item_number_t.
15290 * src/system.h (MINSHORT, MAXSHORT): Remove.
15291 Include `limits.h'.
15292 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
15293 (shortcpy): Remove.
15294 (MAXTABLE): Move to...
15295 * src/output.c (MAXTABLE): here.
15296 (prepare_rules): Use output_int_table to output rhs.
15297 * data/bison.simple, data/bison.c++: Adjust.
15298 * tests/torture.at (Big triangle): Move the limit from 254 to
15299 500.
15300 * tests/regression.at (Web2c Actions): Ajust.
15301
15302 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
15303 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
15304 passes, but produces negative #line number, once fixed, GCC is
15305 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
15306 C), it passes.
15307 * src/state.h (state_h): Code input lines on ints, not shorts.
15308
bb88b0fc
AD
153092002-04-08 Akim Demaille <akim@epita.fr>
15310
15311 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
15312 and then the grammar.
15313
9a636f47
AD
153142002-04-08 Akim Demaille <akim@epita.fr>
15315
15316 * src/system.h: No longer using strndup.
15317
680e8701
AD
153182002-04-07 Akim Demaille <akim@epita.fr>
15319
15320 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
15321 * src/output.c (output_table_data): Return the longest number.
15322 (prepare_tokens): Output `token_number_max').
15323 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
15324 New.
15325 Use them to define yy_token_number_type/TokenNumberType.
15326 Use this type for yytranslate.
15327 * tests/torture.at (Big triangle): Push the limit from 124 to
15328 253.
15329 * tests/regression.at (Web2c Actions): Adjust.
15330
817e9f41
AD
153312002-04-07 Akim Demaille <akim@epita.fr>
15332
15333 * tests/torture.at (Big triangle): New.
15334 (GNU AWK Grammar, GNU Cim Grammar): Move to...
15335 * tests/existing.at: here.
15336
5123689b
AD
153372002-04-07 Akim Demaille <akim@epita.fr>
15338
15339 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
15340 nritems.
15341 Adjust dependencies.
15342
f3849179
AD
153432002-04-07 Akim Demaille <akim@epita.fr>
15344
15345 * src/reader.c: Normalize increments to prefix form.
15346
bd02036a
AD
153472002-04-07 Akim Demaille <akim@epita.fr>
15348
15349 * src/reader.c, symtab.c: Remove debugging code.
15350
db8837cb
AD
153512002-04-07 Akim Demaille <akim@epita.fr>
15352
15353 Rename all the `bucket's as `symbol_t'.
15354
15355 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
15356 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
15357 * src/symtab.c, src/symtab.h (bucket): Rename as...
15358 (symbol_t): this.
15359 (symbol_list_new, bucket_check_defined, bucket_make_alias)
15360 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
15361 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
15362 (buckets_new, buckets_free, buckets_do): Rename as...
15363 (symbol_list_new, symbol_check_defined, symbol_make_alias)
15364 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
15365 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
15366 (symbols_new, symbols_free, symbols_do): these.
15367
72a23c97
AD
153682002-04-07 Akim Demaille <akim@epita.fr>
15369
15370 Use lib/hash for the symbol table.
15371
15372 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
15373 EOF.
15374 * src/lex.c (lex): Set the `number' member of new terminals.
15375 * src/reader.c (bucket_check_defined, bucket_make_alias)
15376 (bucket_check_alias_consistence, bucket_translation): New.
15377 (reader, grammar_free, readgram, token_translations_init)
15378 (packsymbols): Adjust.
15379 (reader): Number the predefined tokens.
15380 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
15381 for predefined tokens.
15382 * src/symtab.h (bucket): Remove all the hash table related
15383 members.
15384 * src/symtab.c (symtab): Replace by...
15385 (bucket_table): this.
15386 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
15387 (buckets_new, buckets_do): New.
15388
280a38c3
AD
153892002-04-07 Akim Demaille <akim@epita.fr>
15390
15391 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
15392 (start_symbol, max_user_token_number, semantic_parser)
15393 (error_token_number): Initialize.
15394 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
15395 Initialize.
15396 (reader): Don't.
15397 (errtoken, eoftoken, undeftoken, axiom): Extern.
15398
03b31c0c
AD
153992002-04-07 Akim Demaille <akim@epita.fr>
15400
15401 * src/gram.h (rule_s): prec and precsym are now pointers
15402 to the bucket giving the priority/associativity.
15403 Member `associativity' removed: useless.
15404 * src/reduce.c, src/conflicts.c: Adjust.
15405
8b3df748
AD
154062002-04-07 Akim Demaille <akim@epita.fr>
15407
15408 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
15409 Properly escape the symbols' TAG when outputting them.
15410
e601aa1d
AD
154112002-04-07 Akim Demaille <akim@epita.fr>
15412
15413 * src/lalr.h (LA): Is a bitsetv, not bitset*.
15414
b0299a2e
AD
154152002-04-07 Akim Demaille <akim@epita.fr>
15416
15417 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
15418 (LArule): this, which is an array to rule_t*.
15419 * src/print.c, src/conflicts.c: Adjust.
15420
d7e1f00c
AD
154212002-04-07 Akim Demaille <akim@epita.fr>
15422
15423 * src/gram.h (rule_t): Rename `number' as `user_number'.
15424 `number' is a new member.
15425 Adjust dependencies.
15426 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
15427
cc9305dd
AD
154282002-04-07 Akim Demaille <akim@epita.fr>
15429
15430 As a result of the previous patch, it is no longer needed
15431 to reorder ritem itself.
15432
15433 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
15434
b0940840
AD
154352002-04-07 Akim Demaille <akim@epita.fr>
15436
15437 Be sure never to walk through RITEMS, but use only data related to
15438 the rules themselves. RITEMS should be banished.
15439
15440 * src/output.c (output_token_translations): Rename as...
15441 (prepare_tokens): this.
15442 In addition to `translate', prepare the muscles `tname' and
15443 `toknum', which were handled by...
15444 (output_rule_data): this.
15445 Remove, and move the remainder of its outputs into...
15446 (prepare_rules): this new routines, which also merges content from
15447 (output_gram): this.
15448 (prepare_rules): Be sure never to walk through RITEMS.
15449 (output_stos): Rename as...
15450 (prepare_stos): this.
15451 (output): Always invoke prepare_states, after all, just don't use it
15452 in the output if you don't need it.
15453
643a5994
AD
154542002-04-07 Akim Demaille <akim@epita.fr>
15455
15456 * src/LR0.c (new_state): Display `nstates' as the name of the
15457 newly created state.
15458 Adjust to initialize first_state and last_state if needed.
15459 Be sure to distinguish the initial from the final state.
15460 (new_states): Create the itemset of the initial state, and use
15461 new_state.
15462 * src/closure.c (closure): Now that the initial state has its
15463 items properly set, there is no need for a special case when
15464 creating `ruleset'.
15465
15466 As a result, now the rule 0, reducing to $axiom, is visible in the
15467 outputs. Adjust the test suite.
15468
15469 * tests/conflicts.at (Solved SR Conflicts)
15470 (Unresolved SR Conflicts): Adjust.
15471 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
15472 * tests/conflicts.at (S/R in initial): New.
15473
b4c4ccc2
AD
154742002-04-07 Akim Demaille <akim@epita.fr>
15475
15476 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
15477 the RHS of the rules.
15478 * src/output.c (output_gram): Likewise.
15479
bba97eb2
AD
154802002-04-07 Akim Demaille <akim@epita.fr>
15481
15482 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
15483 bucket.
15484 Adjust all dependencies.
15485 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
15486 `number' of the buckets too.
15487 * src/gram.h: Include `symtab.h'.
15488 (associativity): Move to...
15489 * src/symtab.h: here.
15490 No longer include `gram.h'.
15491
c3b407f4
AD
154922002-04-07 Akim Demaille <akim@epita.fr>
15493
15494 * src/gram.h, src/gram.c (rules_rhs_length): New.
15495 (ritem_longest_rhs): Use it.
15496 * src/gram.h (rule_t): `number' is a new member.
15497 * src/reader.c (packgram): Set it.
15498 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
15499 the end of `rules', and count them out of `nrules'.
15500 (reduce_output, dump_grammar): Adjust.
15501 * src/print.c (print_grammar): It is no longer needed to check for
15502 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
15503 * tests/reduce.at (Reduced Automaton): New test.
15504
11652ab3
AD
155052002-04-07 Akim Demaille <akim@epita.fr>
15506
15507 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
15508 lacking `+ 1' to nrules, Bison reported as useless a token if it
15509 was used solely to set the precedence of the last rule...
15510
26b23c1a
AD
155112002-04-07 Akim Demaille <akim@epita.fr>
15512
15513 * data/bison.c++, data/bison.simple: Don't output the current file
15514 name in #line, to avoid useless diffs between two identical
15515 outputs under different names.
15516
18bcecb0
AD
155172002-04-07 Akim Demaille <akim@epita.fr>
15518
15519 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
15520 Normalize loops to using `< nrules + 1', not `<= nrules'.
15521
fa770c86
AD
155222002-04-07 Akim Demaille <akim@epita.fr>
15523
15524 * TODO: Update.
15525
d9b739c3
AD
155262002-04-07 Akim Demaille <akim@epita.fr>
15527
15528 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
15529 bucket.value as bucket.number.
15530
99013900
AD
155312002-04-07 Akim Demaille <akim@epita.fr>
15532
15533 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
15534 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
15535 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
15536 RHS, instead of being an index in RITEMS.
15537
e966383b
PE
155382002-04-04 Paul Eggert <eggert@twinsun.com>
15539
15540 * doc/bison.texinfo: Update copyright date.
15541 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
15542 (Symbols): Warn about running Bison in one character set,
15543 but compiling and/or running in an incompatible one.
15544 Warn about character code 256, too.
15545
155462002-04-03 Paul Eggert <eggert@twinsun.com>
15547
15548 * src/bison.data (YYSTACK_ALLOC): Depend on whether
15549 YYERROR_VERBOSE is nonzero, not whether it is defined.
15550
15551 Merge changes from bison-1_29-branch.
c307773e 15552
8d6c48b9
PE
155532002-03-20 Paul Eggert <eggert@twinsun.com>
15554
15555 Merge fixes from Debian bison_1.34-1.diff.
15556
15557 * configure.in (AC_PREREQ): 2.53.
15558
e53c6322
AD
155592002-03-20 Akim Demaille <akim@epita.fr>
15560
15561 * src/conflicts.c (log_resolution): Argument `resolution' is const.
15562
9ffbeca7
PE
155632002-03-19 Paul Eggert <eggert@twinsun.com>
15564
21db0b2a
PE
15565 * src/bison.simple (YYCOPY): New macro.
15566 (YYSTACK_RELOCATE): Use it.
15567 Remove Type arg; no longer needed. All callers changed.
15568 (yymemcpy): Remove; no longer needed.
15569
9ffbeca7
PE
15570 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
15571 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15572
642cb8f8
AD
155732002-03-19 Akim Demaille <akim@epita.fr>
15574
15575 Test and fix the #line outputs.
15576
15577 * tests/atlocal.at (GCC): New.
15578 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 15579 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
15580 (Action synch line, Epilogue synch line): New tests.
15581 * src/reader.c (parse_union_decl): Define the muscle stype_line.
15582 * data/bison.simple, data/bison.c++: Use it.
15583
3c31a486
AD
155842002-03-19 Akim Demaille <akim@epita.fr>
15585
15586 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
15587 (Solved SR Conflicts, %expect not enough, %expect right)
15588 (%expect too much): Move to...
15589 * tests/conflicts.at: this new file.
15590
0d8bed56
AD
155912002-03-19 Akim Demaille <akim@epita.fr>
15592
15593 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
15594 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
15595 that we can move to enums for instance.
15596 * src/output.c (token_definitions_output): Output a list of
15597 `token-name, token-number' instead of the #define.
15598 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
15599
9208d17f
AD
156002002-03-14 Akim Demaille <akim@epita.fr>
15601
15602 Use Gettext 0.11.1.
15603
af27eacb
RA
156042002-03-09 Robert Anisko <robert@lrde.epita.fr>
15605
15606 * data/bison.c++: Make the user able to add members to the generated
15607 parser by subclassing.
15608
9101a310
RA
156092002-03-05 Robert Anisko <robert@lrde.epita.fr>
15610
15611 * src/reader.c (read_additionnal_code): `c' should be an integer, not
15612 a character.
15613 Reported by Nicolas Tisserand and Nicolas Burrus.
15614
fff9bf0b
RA
156152002-03-04 Robert Anisko <robert@lrde.epita.fr>
15616
15617 * src/reader.c: Warn about lacking semi-colons, do not complain.
15618
64dba31e
RA
156192002-03-04 Robert Anisko <robert@lrde.epita.fr>
15620
15621 * data/bison.c++: Remove a debug line.
15622
374f5a14
RA
156232002-03-04 Robert Anisko <robert@lrde.epita.fr>
15624
15625 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
15626 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
15627 provide a default implementation.
15628
bfcf1f3a
AD
156292002-03-04 Akim Demaille <akim@epita.fr>
15630
15631 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
15632 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
15633 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
15634 * tests/semantic.at (Parsing Guards): Similarly.
15635 * src/reader.at (readgram): Complain if the last rule is not ended
15636 with a semi-colon.
15637
65ccf9fc
AD
156382002-03-04 Akim Demaille <akim@epita.fr>
15639
15640 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
15641 * src/closure.c: here.
15642 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
15643 RTC.
15644 * src/warshall.h, src/warshall.c: Remove.
15645 * tests/sets.at (Broken Closure): Adjust.
15646
d0039cbc
AD
156472002-03-04 Akim Demaille <akim@epita.fr>
15648
15649 * src/output.c (output_skeleton): tempdir is const.
15650 bytes_read is unused.
15651
345cea78
AD
156522002-03-04 Akim Demaille <akim@epita.fr>
15653
15654 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
15655 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
15656 Update.
15657 From Michael Hayes.
15658
564801f7
AD
156592002-03-04 Akim Demaille <akim@epita.fr>
15660
15661 * src/closure.c (closure): `r' is unused.
15662
e5352bc7
AD
156632002-03-04 Akim Demaille <akim@epita.fr>
15664
15665 * tests/sets.at (Broken Closure): Add the ending `;'.
15666 * src/reader.at (readgram): Complain if a rule is not ended with a
15667 semi-colon.
15668
914feea9
AD
156692002-03-04 Akim Demaille <akim@epita.fr>
15670
15671 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
15672 (count_sr_conflicts): Use bitset_count.
15673 * src/reduce.c (inaccessable_symbols): Ditto.
15674 (bits_size): Remove.
15675 * src/warshall.h, src/warshall.c: Convert to bitsetv.
15676
f0250de6
AD
156772002-03-04 Akim Demaille <akim@epita.fr>
15678
15679 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
15680 * src/reduce.c: Remove the `bitset_zero's following the
15681 `bitset_create's, as now it is performed by the latter.
15682
ef017502
AD
156832002-03-04 Akim Demaille <akim@epita.fr>
15684
15685 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
15686 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
15687 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
15688 latest sources from Michael.
15689
76514394
AD
156902002-03-04 Akim Demaille <akim@epita.fr>
15691
15692 * src/output.c (output): Don't free the grammar.
15693 * src/reader.c (grammar_free): New.
15694 * src/main.c (main): Call it and don't free symtab here.
15695
55024580
AD
156962002-03-04 Akim Demaille <akim@epita.fr>
15697
15698 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
15699 before returning.
15700 Reported by Benoit Perrot.
15701
f9abaa2c
AD
157022002-03-04 Akim Demaille <akim@epita.fr>
15703
15704 Use bitset operations when possible, not loops over bits.
15705
15706 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
15707 bitset_or.
15708 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
15709 * src/reduce.c (useless_nonterminals): Formatting changes.
15710 * src/warshall.c (TC): Use bitset_or.
15711
0e721e75
AD
157122002-03-04 Akim Demaille <akim@epita.fr>
15713
15714 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
15715 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
15716 Ditto.
15717
0fb1ffb1
AD
157182002-03-04 Akim Demaille <akim@epita.fr>
15719
15720 * src/lalr.c (F): Now a bitset*.
15721 Adjust all dependencies.
15722
b86796bf
AD
157232002-03-04 Akim Demaille <akim@epita.fr>
15724
15725 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
15726 Adjust all dependencies.
15727
602bbf31
AD
157282002-03-04 Akim Demaille <akim@epita.fr>
15729
15730 * src/L0.c, src/LR0.h (nstates): Be size_t.
15731 Adjust comparisons (signed vs unsigned).
15732 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
15733 bitset*.
15734 Adjust all dependencies.
15735
d8a0245c
AD
157362002-03-04 Akim Demaille <akim@epita.fr>
15737
15738 * src/closure.c (firsts): Now, also a bitset.
15739 Adjust all dependencies.
15740 (varsetsize): Remove, now unused.
15741 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
15742
34ba9743
AD
157432002-03-04 Akim Demaille <akim@epita.fr>
15744
15745 * src/print.c: Convert to use bitset.h, not hand coded iterations
15746 over ints.
15747
ed86e78c
AD
157482002-03-04 Akim Demaille <akim@epita.fr>
15749
15750 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
15751
dfdb1797
AD
157522002-03-04 Akim Demaille <akim@epita.fr>
15753
15754 * src/closure.c (ruleset): Be a bitset.
15755 (rulesetsize): Remove.
15756
7086e707
AD
157572002-03-04 Akim Demaille <akim@epita.fr>
15758
15759 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
15760 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
15761 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
15762 * src/closure.c (fderives): Be an array of bitsets.
15763
98254360
RA
157642002-02-28 Robert Anisko <robert@lrde.epita.fr>
15765
15766 * data/bison.c++: Merge the two generated headers. Insert a copyright
15767 notice in each output file.
15768
a75c057f
AD
157692002-02-28 Akim Demaille <akim@epita.fr>
15770
15771 * data/bison.c++: Copy the prologue of bison.simple to fetch
15772 useful M4 definitions, such as b4_header_guard.
15773
06b00abc
AD
157742002-02-25 Akim Demaille <akim@epita.fr>
15775
15776 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
15777 translator friendly scheme for the bgr
15778 copyright notice.
06b00abc 15779
70e7d534
AD
157802002-02-25 Akim Demaille <akim@epita.fr>
15781
15782 * src/output.c (header_output): Remove, now handled completely via
15783 M4.
15784
abe017f6
AD
157852002-02-25 Akim Demaille <akim@epita.fr>
15786
15787 * m4/m4.m4: New, from CVS Autoconf.
15788 * configure.in: Invoke it.
15789 * src/output.c (output_skeleton): Use its result instead of the
15790 hard coded name.
15791
381fb12e
AD
157922002-02-25 Akim Demaille <akim@epita.fr>
15793
15794 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
15795 Fileutils 4.1.5.
15796 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
15797 * src/output.c (output_skeleton): Use mkstemp to create a real
15798 temporary file.
15799 Move the filling of `skeleton' and its muscle to...
15800 (prepare): here.
15801 (output): Move the definition of the prologue muscle to...
15802 (prepare): here.
15803 * src/system.h (DEFAULT_TMPDIR): New.
15804
6f38107f
PE
158052002-02-14 Paul Eggert <eggert@twinsun.com>
15806
15807 Remove the support for C++ namespace cleanliness; it was
15808 causing more problems than it was curing, since it didn't work
15809 properly on some nonstandard C++ compilers. This can wait
15810 for a proper C++ parser.
15811
15812 * NEWS: Document this.
15813 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
15814 of C++, as it's treated like C now.
15815 * src/bison.simple (YYSTD): Remove.
15816 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
15817 Treat C++ just like Standard C instead of trying to support
15818 namespace cleanliness.
15819
80cce3da
AD
158202002-02-14 Akim Demaille <akim@epita.fr>
15821
15822 * tests/regression.at (else): Adjust to Andreas' change.
15823
842e8679
AD
158242002-02-14 Akim Demaille <akim@epita.fr>
15825
15826 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
15827
4bda3f10
AD
158282002-02-13 Andreas Schwab <schwab@suse.de>
15829
15830 * src/output.c (output_rule_data): Don't output NULL, it might
15831 not be defined yet.
15832
4162fa07 158332002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 15834
4162fa07
RA
15835 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
15836 (Copyright notice): Update.
b418ecd8 15837
bd16a5dc
AD
158382002-02-11 Akim Demaille <akim@epita.fr>
15839
15840 * tests/regression.at (%nonassoc and eof): Don't include
15841 nonportable headers.
15842
8d69a1a3
RA
158432002-02-08 Robert Anisko <robert@lrde.epita.fr>
15844
15845 * data/bison.c++: Correct error recovery. Make the user able to
15846 initialize the starting location.
15847
9b2d0677
AD
158482002-02-07 Akim Demaille <akim@epita.fr>
15849
15850 * tests/input.at: New.
15851
69e2658b
RA
158522002-02-07 Robert Anisko <robert@lrde.epita.fr>
15853
15854 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 15855 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
15856 directives around tables only needed for debugging.
15857
4aacc3a7
RA
158582002-02-07 Robert Anisko <robert@lrde.epita.fr>
15859
15860 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
15861 C++ parsers.
15862 (yy::b4_name::parse): Use print_.
15863
762a801e
RA
158642002-02-07 Robert Anisko <robert@lrde.epita.fr>
15865
15866 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
15867
4bb2bc3f
RA
158682002-02-07 Robert Anisko <robert@lrde.epita.fr>
15869
15870 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
15871 C++ parsers.
15872 (yy::b4_name::parse): Build verbose error messages, and use error_.
15873
6b45a3ca
RA
158742002-02-06 Robert Anisko <robert@lrde.epita.fr>
15875
15876 * data/bison.c++: Fix m4 quoting in comments.
15877
50997c6e
RA
158782002-02-06 Robert Anisko <robert@lrde.epita.fr>
15879
15880 * data/bison.c++: Adjust the parser code. Fix some muscles that were
15881 not expanded by m4.
15882
3f3eed27
AD
158832002-02-05 Akim Demaille <akim@epita.fr>
15884
15885 * data/bison.c++: Adjust to the M4 back end.
15886 More is certainly needed.
15887
be2a1a68
AD
158882002-02-05 Akim Demaille <akim@epita.fr>
15889
15890 Give a try to M4 as a back end.
15891
15892 * lib/readpipe.c: New, from wdiff.
15893 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
15894 BISON_HAIRY.
15895 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
15896 specific values. Now it is m4 that performs the lookup.
15897 * src/parse-skel.y: Remove.
15898 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
15899 * src/output.c (actions_output, guards_output)
15900 (token_definitions_output): No longer keeps track of the output
15901 line number, hence remove the second argument.
15902 (guards_output): Check against the guard member of a rule, not the
15903 action member.
15904 Adjust callers.
15905 (output_skeleton): Don't look for the skeleton location, let m4 do
15906 that.
15907 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
15908 file will be used.
15909 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
15910 (prepare): Given that for the time being changesyntax is not
15911 usable in M4, rename the muscles using `-' to `_'.
15912 Define `defines_flag', `output_parser_name' and `output_header_name'.
15913 * src/output.h (actions_output, guards_output)
15914 (token_definitions_output): Adjust prototypes.
15915 * src/scan-skel.l: Instead of scanning the skeletons, it now
15916 processes the output of m4: `__oline__' and `#output'.
15917 * data/bison.simple: Adjust to be used by M4(sugar).
15918 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
15919 to date.
15920 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
15921 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
15922 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
15923 shamelessly stolen from CVS Autoconf.
15924
beda758b
AD
159252002-02-05 Akim Demaille <akim@epita.fr>
15926
15927 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
15928 * configure.in: Check for the declarations of free and malloc.
15929 * src/muscle_tab.c: Adjust.
15930
5ece6d43
AD
159312002-02-05 Akim Demaille <akim@epita.fr>
15932
15933 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
15934 which have no values.
15935
5bb18f9a
AD
159362002-02-05 Akim Demaille <akim@epita.fr>
15937
15938 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
15939 * data/: here.
15940
894dd62e
PE
159412002-01-29 Paul Eggert <eggert@twinsun.com>
15942
15943 * src/bison.simple (YYSIZE_T): Do not define merely because
15944 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
15945 On some platforms, <alloca.h> does not declare YYSTD (size_t).
15946
82841af7
AD
159472002-01-27 Akim Demaille <akim@epita.fr>
15948
15949 Fix `%nonassoc and eof'.
15950
15951 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
15952 which were not properly copied! Replace
15953 memcpy (res->errs, src->errs, src->nerrs);
15954 with
15955 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
15956 !!!
15957 * tests/regression.at (%nonassoc and eof): Adjust to newest
15958 Autotest: `.' is not in the PATH.
15959
318b76e9
AD
159602002-01-27 Akim Demaille <akim@epita.fr>
15961
15962 * tests/sets.at (AT_EXTRACT_SETS): New.
15963 (Nullable): Use it.
15964 (Firsts): New.
15965
30d2f3d5
AD
159662002-01-26 Akim Demaille <akim@epita.fr>
15967
15968 * tests/actions.at, tests/calc.at, tests/headers.at,
15969 * tests/torture.at: Adjust to the newest Autotest which no longer
15970 forces `.' in the PATH.
15971
30f8c395
AD
159722002-01-25 Akim Demaille <akim@epita.fr>
15973
15974 * tests/regression.at (%nonassoc and eof): New.
15975 Suggested by Robert Anisko.
15976
29ae55f1
AD
159772002-01-24 Akim Demaille <akim@epita.fr>
15978
15979 Bison dumps core when trying to complain about broken input files.
15980 Reported by Cris van Pelt.
15981
15982 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
15983 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
15984 into...
15985 (Invalid inputs): Strengthen: exercise parse_percent_token.
15986
2b548aa6
RA
159872002-01-24 Robert Anisko <robert.anisko@epita.fr>
15988
15989 * src/Makefile.am: Add bison.c++.
15990 * src/bison.c++: New skeleton.
15991
bb0146c2
AD
159922002-01-21 Paolo Bonzini <bonzini@gnu.org>
15993
15994 * po/it.po: New.
15995
bec30531
AD
159962002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
15997
15998 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
15999
fc6edc45
MA
160002002-01-20 Marc Autret <marc@gnu.org>
16001
16002 * src/files.c (compute_output_file_names): Fix
16003
5e5d5415
MA
160042002-01-20 Marc Autret <marc@gnu.org>
16005
16006 * tests/output.at: New test.
16007 * src/files.c (compute_base_names): Don't map extensions when
16008 the YACC flag is set, use defaults.
16009 Reported by Evgeny Stambulchik.
16010
44ea3fbd
MA
160112002-01-20 Marc Autret <marc@gnu.org>
16012
ba0fe3c7
PE
16013 * src/system.h: Need to define __attribute__ away for non-GCC
16014 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
16015 Suggested by Albert Chin-A-Young.
16016
338963d1
TVH
160172002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
16018
16019 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
16020 canonical definition.
16021 * src/system.h: Use the canonical definition for PARAMS (avoids
16022 a conflict with the macro from lib/hash.h).
16023
c57b2479
AD
160242002-01-11 Akim Demaille <akim@epita.fr>
16025
16026 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 16027 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 16028
b85810ae
AD
160292002-01-09 Akim Demaille <akim@epita.fr>
16030
16031 * src/files.c, src/files.h (output_infix): New.
16032 (tab_extension): Remove.
16033 (compute_base_names): Compute the former, drop the latter.
16034 * src/output.c (prepare): Insert the muscles `output-infix', and
16035 `output-suffix'.
16036 * src/parse-skel.y (string, string.1): New.
16037 (section.header): Use it.
16038 (section.yacc): Remove.
16039 (prefix): Remove too.
16040 * src/scan-skel.l: Adjust.
16041 * src/bison.simple, src/bison.hairy: Adjust.
16042
cae60122
AD
160432002-01-09 Akim Demaille <akim@epita.fr>
16044
16045 * configure.in (WERROR_CFLAGS): Compute it.
16046 * src/Makefile.am (CFLAGS): Pass it.
16047 * tests/atlocal.in (CFLAGS): Idem.
16048 * src/files.c: Fix a few warnings.
16049 (get_extension_index): Remove, unused.
16050
ae404801
AD
160512002-01-08 Akim Demaille <akim@epita.fr>
16052
16053 * src/getargs.c (AS_FILE_NAME): New.
16054 (getargs): Use it to convert DOSish file names.
16055 * src/files.c (base_name): Rename as full_base_name to avoid
16056 clashes with `base_name ()'.
16057 (filename_split): New.
16058 (compute_base_names): N-th rewrite, using filename_split.
16059
22312b71
AD
160602002-01-08 Akim Demaille <akim@epita.fr>
16061
16062 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
16063 New, stolen from the Fileutils 4.1.
16064 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16065 * configure.in: Check for the presence of memrchr, and of its
16066 prototype.
16067
a67cef01
TVH
160682002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
16069
16070 * lib/hash.h (__P): Added definition for this macro.
16071 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
16072 BUILT_SOURCES, to ensure they are generated first.
16073 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
16074 %error-verbose to allow bootstrapping with bison 1.30x.
16075
2b25d624
AD
160762002-01-06 Akim Demaille <akim@epita.fr>
16077
16078 * src/reader.c (parse_braces): Don't fetch the next char, the
16079 convention is to fetch on entry.
16080 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
16081 'switch' without a following semicolon.
16082 * tests/regression.at (braces parsing): New.
16083
3460813b
AD
160842002-01-06 Akim Demaille <akim@epita.fr>
16085
16086 Bison is dead wrong in its RR conflict reports.
16087
16088 * tests/torture.at (GNU Cim Grammar): New.
16089 * src/conflicts.c (count_rr_conflicts): Fix.
16090
73784c64
AD
160912002-01-06 Akim Demaille <akim@epita.fr>
16092
16093 Creating package.m4 from configure.ac causes too many problems.
16094
16095 * tests/Makefile.am (package.m4): Create it by hand,
16096 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
16097
25d81090
AD
160982002-01-06 Akim Demaille <akim@epita.fr>
16099
16100 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
16101 skeleton.h.
16102
a9b8959e
PE
161032002-01-04 Paul Eggert <eggert@twinsun.com>
16104
16105 * doc/bison.texinfo (Debugging):
16106 Remove YYSTDERR; it's no longer defined or used.
16107 Also, s/cstdio.h/cstdio/.
16108
25d81090
AD
161092002-01-03 Akim Demaille <akim@epita.fr>
16110
16111 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
16112
1109455c
AD
161132002-01-03 Akim Demaille <akim@epita.fr>
16114
16115 * src/parse-skel.y (process_skeleton): Don't bind the parser's
16116 tracing code to --trace, wait for a better --trace option, with
16117 args.
16118
7ea5e977
AD
161192002-01-03 Akim Demaille <akim@epita.fr>
16120
16121 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
16122 The ISO C++ standard is extremely clear about it: stderr is
16123 considered a macro, not a regular symbol (see table 94 `Header
16124 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
16125 Therefore std:: does not apply to it. It still does with fprintf.
16126 Also, s/cstdio.h/cstdio/.
16127
fab5b110
AD
161282002-01-03 Akim Demaille <akim@epita.fr>
16129
16130 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
16131 for non system headers.
16132
aed7fd9b
AD
161332002-01-02 Akim Demaille <akim@epita.fr>
16134
16135 Equip the skeleton chain with location tracking, runtime trace,
16136 pure parser and scanner.
16137
16138 * src/parse-skel.y: Request a pure parser, locations, and prefix
16139 renaming.
16140 (%union): Having several members with the same type does not help
16141 type mismatches, simplify.
16142 (YYPRINT, yyprint): New.
16143 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
16144 (skel_error): this.
16145 Handle locations.
16146 * src/scan-skel.l: Adjust to these changes.
16147 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
16148 (LOCATION_PRINT, skel_control_t): New.
16149
24fad99e
AD
161502001-12-30 Akim Demaille <akim@epita.fr>
16151
16152 * src/parse-skel.y: Get rid of the shift/reduce conflict:
16153 replace `gb' with BLANKS.
16154 * src/scan-skel.l: Adjust.
16155
a4b36db4
AD
161562001-12-30 Akim Demaille <akim@epita.fr>
16157
16158 * src/system.h: We don't need nor want bcopy.
16159 Throw away MS-DOS crap: we don't need getpid.
16160 * configure.in: We don't need strndup. It was even causing
16161 problems: because Flex includes the headers *before* us,
16162 _GNU_SOURCE is not defined by config.h, and therefore strndup was
16163 not visible.
16164 * lib/xstrndup.c: New.
16165 * src/scan-skel.l: Use it.
16166 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
16167 * src/parse-skel.y: Use %directives instead of #defines.
16168
1239777d
AD
161692001-12-30 Akim Demaille <akim@epita.fr>
16170
16171 * src/skeleton.h: New.
16172 * src/output.c (output_parser, output_master_parser): Remove, dead
16173 code.
16174 * src/output.h (get_lines_number, actions_output, guards_output)
16175 (token_definitions_output): Prototype them.
16176 * src/parse-skel.y: Add the license notice.
16177 Include output.h and skeleton.h.
16178 (process_skeleton): Returns void, and takes a single parameter.
16179 * src/scan-skel.l: Add the license notice.
16180 Include skeleton.h.
16181 Don't use %option yylineno: it seems that then Flex imagines
16182 REJECT has been used, and therefore it won't reallocate its
16183 buffers (which makes no other sense to me than a bug). It results
16184 in warnings for `unused: yy_flex_realloc'.
16185
9b3add5b
RA
161862001-12-30 Robert Anisko <robert.anisko@epita.fr>
16187
16188 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
16189 (MUSCLE_INSERT_PREFIX): ...to there.
16190 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
16191 (MUSCLE_INSERT_PREFIX): Move from here...
16192
16193 * src/bison.hairy: Add a section directive. Put braces around muscle
16194 names. This parser skeleton is still broken, but Bison should not
16195 choke on a bad muscle 'syntax'.
16196 * src/bison.simple: Add a section directive. Put braces around muscle
16197 names.
16198
16199 * src/files.h (strsuffix, stringappend): Add declarations.
16200 (tab_extension): Add declaration.
16201 (short_base_name): Add declaration.
16202
16203 * src/files.c (strsuffix, stringappend): No longer static. These
16204 functions are used in the skeleton parser.
16205 (tab_extension): New.
16206 (compute_base_names): Use the computations done in this function
fab5b110 16207 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
16208 names.
16209 (short_base_name): No longer static.
16210
16211 * src/output.c (output_skeleton): New.
16212 (output): Disable call to output_master_parser, and give a try to
16213 a new skeleton handling system.
16214 (guards_output, actions_output): No longer static.
16215 (token_definitions_output, get_lines_number): No longer static.
16216
16217 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
16218
fab5b110 16219 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
16220 parse-skel.y.
16221
16222 * src/parse-skel.y: New file.
16223 * src/scan-skel.l: New file.
16224
b5b61c61
AD
162252001-12-29 Akim Demaille <akim@epita.fr>
16226
16227 %name-prefix is broken.
16228
16229 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
16230 Adjust all dependencies.
16231 * tests/headers.at (export YYLTYPE): Strengthen this test: use
16232 %name-prefix.
16233
16234 Renaming yylval but not yylloc is not consistent. Now we do.
16235
16236 * src/bison.simple: Prefix yylloc if used.
16237 * doc/bison.texinfo (Decl Summary): Document that.
16238
8c9a50be
AD
162392001-12-29 Akim Demaille <akim@epita.fr>
16240
16241 * doc/bison.texinfo: Promote `%long-directive' over
16242 `%long_directive'.
16243 Remove all references to fixed-output-files, yacc is enough.
16244
d99361e6
AD
162452001-12-29 Akim Demaille <akim@epita.fr>
16246
16247 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
16248 user prologue. These are defaults.
16249 * tests/actions.at (Mid-rule actions): Make sure the user can
16250 define YYDEBUG and YYERROR_VERBOSE.
16251
b9cecb91
AD
162522001-12-29 Akim Demaille <akim@epita.fr>
16253
16254 * src/output.c (header_output): Don't forget to export YYLTYPE and
16255 yylloc.
16256 * tests/headers.at (export YYLTYPE): New, make sure it does.
16257 * tests/regression.at (%union and --defines, Invalid CPP headers):
16258 Move to...
16259 * tests/headers.at: here.
16260
aea13e97
AD
162612001-12-29 Akim Demaille <akim@epita.fr>
16262
16263 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
16264
931394cb
AD
162652001-12-29 Akim Demaille <akim@epita.fr>
16266
16267 * tests/actions.at (Mid-rule actions): Output on a single line
16268 instead of several.
16269
704a47c4
AD
162702001-12-29 Akim Demaille <akim@epita.fr>
16271
16272 * doc/bison.texinfo: Formatting changes.
16273
091e20bb
AD
162742001-12-29 Akim Demaille <akim@epita.fr>
16275
16276 Don't store the token defs in a muscle, just be ready to output it
16277 on command. Now possible via `symbols'. Fixes a memory leak.
16278
16279 * src/output.c (token_definitions_output): New.
16280 (output_parser, header_output): Use it.
16281 * src/reader.c (symbols_save): Remove.
16282
cce71710
AD
162832001-12-29 Akim Demaille <akim@epita.fr>
16284
16285 * src/bison.simple: Do not provide a default for YYSTYPE and
16286 YYLTYPE before the user's prologue. Otherwise it's hardly... a
16287 default.
16288
82c035a8
AD
162892001-12-29 Akim Demaille <akim@epita.fr>
16290
16291 Mid-rule actions are simply... ignored!
16292
16293 * src/reader.c (readgram): Be sure to attach mid-rule actions to
16294 the empty-rule associated to the dummy symbol, not to the host
16295 rule.
16296 * tests/actions.at (Mid-rule actions): New.
16297
8419d367
AD
162982001-12-29 Akim Demaille <akim@epita.fr>
16299
16300 Memory leak.
16301
16302 * src/reader.c (reader): Free grammar.
16303
375d5806
AD
163042001-12-29 Akim Demaille <akim@epita.fr>
16305
16306 Memory leak.
16307
16308 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
16309 since it allocates it for each state, although only one is needed.
16310 (allocate_storage): Do it here.
16311
f51cb8ff
AD
163122001-12-29 Akim Demaille <akim@epita.fr>
16313
16314 * src/options.h, src/options.c (create_long_option_table): Rename
16315 as...
16316 (long_option_table_new): this, with a clearer prototype.
16317 (percent_table): Remove, unused,
16318 * src/getargs.c (getargs): Adjust.
16319
29e88316
AD
163202001-12-29 Akim Demaille <akim@epita.fr>
16321
16322 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
16323 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
16324 as states.
16325
b9f71f19
AD
163262001-12-29 Akim Demaille <akim@epita.fr>
16327
16328 * src/lalr.c (build_relations): Rename `states' as `states1'.
16329 Sorry, I don't understand exactly what it is, no better name...
16330
1a2b5d37
AD
163312001-12-29 Akim Demaille <akim@epita.fr>
16332
16333 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
16334 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
16335 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
16336 as rules.
16337
1cca533e
AD
163382001-12-29 Akim Demaille <akim@epita.fr>
16339
16340 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
16341 ago.
16342
c03ae966
AD
163432001-12-29 Akim Demaille <akim@epita.fr>
16344
16345 * src/reader.c, src/reader.h (user_toknums): Remove.
16346 Adjust all users to use symbols[i]->user_token_number.
16347
5a670b1e
AD
163482001-12-29 Akim Demaille <akim@epita.fr>
16349
16350 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
16351 Adjust all users to use symbols[i]->prec or ->assoc.
16352
ad949da9
AD
163532001-12-29 Akim Demaille <akim@epita.fr>
16354
16355 * src/reader.c, src/reader.h (tags): Remove.
16356 Adjust all users to use symbols[i]->tag.
16357
0e78e603
AD
163582001-12-29 Akim Demaille <akim@epita.fr>
16359
16360 * src/gram.h, src/gram.c (symbols): New, similar to state_table
16361 and rule_table.
16362 * src/reader.c (packsymbols): Fill this table.
16363 Drop sprec.
16364 * src/conflicts.c (resolve_sr_conflict): Adjust.
16365 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
16366 single table.
16367 Use symbols[i]->tag instead of tags[i].
16368
213e640e
AD
163692001-12-29 Akim Demaille <akim@epita.fr>
16370
16371 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
16372 In addition, put a comment in there, to replace...
16373 * tests/regression.at (%union and C comments): Remove.
16374
e7b8bef1
AD
163752001-12-29 Akim Demaille <akim@epita.fr>
16376
16377 * tests/regression.at (Web2c Actions): Blindly move the actual
16378 output as expected output. The contents *seem* right to me, but I
16379 can't pretend reading perfectly parser tables... Nonetheless, all
16380 the other tests pass correctly, the table look OK, even though the
16381 presence of `$axiom' is to be noted: AFAICS it is useless (but
16382 harmless).
16383
b68e7744
AD
163842001-12-29 Akim Demaille <akim@epita.fr>
16385
16386 * src/reader.c (readgram): Don't add the rule 0 if there were no
16387 rules read. In other words, add it _after_ having performed
16388 grammar sanity checks.
16389 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
16390
78d5bae9
AD
163912001-12-29 Akim Demaille <akim@epita.fr>
16392
16393 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
16394 visible, and some states have now a different number.
16395
ff442794
AD
163962001-12-29 Akim Demaille <akim@epita.fr>
16397
16398 * src/reader.c (readgram): Bind the initial rule's lineno to that
16399 of the first rule.
16400 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
16401 (Solved SR Conflicts): Adjust rule 0's line number.
16402
610ab194
AD
164032001-12-29 Akim Demaille <akim@epita.fr>
16404
16405 Fix the `GAWK Grammar' failure.
16406
16407 * src/LR0.c (final_state): Initialize to -1 so that we do compute
16408 the reductions of the first state which was mistakenly confused
16409 with the final state because precisely final_state was initialized
16410 to 0.
16411 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
16412 now noticed by Bison.
16413 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
16414 have a reduction on $default.
16415
29d29c8f
AD
164162001-12-29 Akim Demaille <akim@epita.fr>
16417
16418 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
16419 rule line numbers.
16420 * src/closure.c (print_closure): Likewise.
16421 * src/derives.c (print_derives): Likewise.
16422 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
16423 now.
16424
7c6b64d0
AD
164252001-12-29 Akim Demaille <akim@epita.fr>
16426
16427 * src/lalr.c (lookaheads_print): New.
16428 (lalr): Call it when --trace-flag.
16429 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
16430 are dumped.
16431
3d4daee3
AD
164322001-12-29 Akim Demaille <akim@epita.fr>
16433
16434 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
16435 when walking through ritem, even via rule->rhs.
16436 * src/reduce.c (dump_grammar, useful_production, reduce_output)
16437 (useful_production, useless_nonterminals): Likewise.
16438 (reduce_grammar_tables): Likewise, plus update nritems.
16439 * src/nullable.c (set_nullable): Likewise.
16440 * src/lalr.c (build_relations): Likewise.
16441 * tests/sets.at (Nullable): Adjust.
16442 Fortunately, now, the $axiom is no longer nullable.
16443
9e7f6bbd
AD
164442001-12-29 Akim Demaille <akim@epita.fr>
16445
16446 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
16447 the 0-sentinel.
16448 * src/gram.c (ritem_longest_rhs): Likewise.
16449 * src/reduce.c (nonterminals_reduce): Likewise.
16450 * src/print_graph.c (print_graph): Likewise.
16451 * src/output.c (output_rule_data): Likewise.
16452 * src/nullable.c (set_nullable): Likewise.
16453
255ef638
AD
164542001-12-29 Akim Demaille <akim@epita.fr>
16455
16456 * src/output.c: Comment changes.
16457
0d8a7363
AD
164582001-12-27 Paul Eggert <eggert@twinsun.com>
16459
16460 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
16461 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
16462 Sparc, as they were causing more porting problems than the
16463 (minor) performance improvement was worth.
16464
16465 Also, catch up with 1.31's YYSTD.
16466
3db472b9
AD
164672001-12-27 Akim Demaille <akim@epita.fr>
16468
16469 * src/output.c (output_gram): Rely on nritems, not the
16470 0-sentinel. See below.
16471 Use -1 as separator, not 0.
16472 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
16473 Rely on -1 as separator in yyrhs, instead of 0.
16474 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
16475 twice `Now at end of input', therefore there are two lines less to
16476 expect.
16477
b365aa05
AD
164782001-12-27 Akim Demaille <akim@epita.fr>
16479
16480 * tests/regression.at (Unresolved SR Conflicts):
16481 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
16482 below.
16483
30171f79
AD
164842001-12-27 Akim Demaille <akim@epita.fr>
16485
16486 * src/LR0.c (new_state): Recognize the final state by the fact it
16487 is reached by eoftoken.
16488 (insert_start_shifting_state, insert_eof_shifting_state)
16489 (insert_accepting_state, augment_automaton): Remove, since now
16490 these states are automatically computed from the initial state.
16491 (generate_states): Adjust.
16492 * src/print.c: When reporting a rule number to the user, substract
16493 1, so that the axiom rule is rule 0, and the first user rule is 1.
16494 * src/reduce.c: Likewise.
16495 * src/print_graph.c (print_core): For the time being, just as for
16496 the report, depend upon --trace-flags to dump the full set of
16497 items.
16498 * src/reader.c (readgram): Once the grammar read, insert the rule
16499 0: `$axiom: START-SYMBOL $'.
16500 * tests/set.at: Adjust: rule 0 is now displayed, and since the
16501 number of the states has changed (the final state is no longer
16502 necessarily the last), catch up.
16503
75142d45
AD
165042001-12-27 Akim Demaille <akim@epita.fr>
16505
16506 Try to make the use of the eoftoken valid. Given that its value
16507 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
16508 is used instead of > 0 where appropriate, (ii), depend upon nritems
16509 instead of the 0-sentinel.
16510
16511 * src/gram.h, src/gram.c (nritems): New.
16512 Expected to be duplication of nitems, but for the time being...
16513 * src/reader.c (packgram): Assert nritems and nitems are equal.
16514 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
16515 * src/closure.c (print_closure, print_fderives): Likewise.
16516 * src/gram.c (ritem_print): Likewise.
16517 * src/print.c (print_core, print_grammar): Likewise.
16518 * src/print_graph.c: Likewise.
16519
b7c49edf
AD
165202001-12-27 Akim Demaille <akim@epita.fr>
16521
16522 * src/main.c (main): If there are complains after grammar
16523 reductions, then output the report anyway if requested, then die.
16524 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
16525 * src/reader.c (eoftoken): New.
16526 (parse_token_decl): If the token being defined has value `0', it
16527 is the eoftoken.
16528 (packsymbols): No longer hack `tags' to insert `$' by hand.
16529 Be sure to preserve the value of the eoftoken.
16530 (reader): Make sure eoftoken is defined.
16531 Initialize nsyms to 0: now eoftoken is created just like the others.
16532 * src/print.c (print_grammar): Don't special case the eof token.
16533 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
16534 lie anyway, albeit pleasant.
16535 * tests/calc.at: Exercise error messages with eoftoken.
16536 Change the grammar so that empty input is invalid.
16537 Adjust expectations.
16538 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
16539
ec2da99f
AD
165402001-12-27 Akim Demaille <akim@epita.fr>
16541
16542 * configure.in: Check the protos of strchr ans strspn.
16543 Replace strchr if needed.
16544 * src/system.h: Provide the protos of strchr, strspn and memchr if
16545 missing.
16546 * lib/strchr.c: New.
16547 * src/reader.c (symbols_save): Use strchr.
16548
8adfa272
AD
165492001-12-27 Akim Demaille <akim@epita.fr>
16550
16551 * src/print.c, src/print_graph.c (escape): New.
16552 Use it to quote the TAGS outputs.
16553 * src/print_graph.c (print_state): Now errors are in red, and
16554 reductions in green.
16555 Prefer high to wide: output the state number on a line of its own.
16556
80dac38c
AD
165572001-12-27 Akim Demaille <akim@epita.fr>
16558
16559 * src/state.h, src/state.c (reductions_new): New.
16560 * src/LR0.c (set_state_table): Let all the states have a
16561 `reductions', even if reduced to 0.
16562 (save_reductions): Adjust.
16563 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
16564 * src/print.c (print_reductions, print_actions): Adjust.
16565 * src/output.c (action_row): Adjust.
16566
2cec70b9
AD
165672001-12-27 Akim Demaille <akim@epita.fr>
16568
16569 * src/state.h, src/state.c (errs_new, errs_dup): New.
16570 * src/LR0.c (set_state_table): Let all the states have an errs,
16571 even if reduced to 0.
16572 * src/print.c (print_errs, print_reductions): Adjust.
16573 * src/output.c (output_actions, action_row): Adjust.
16574 * src/conflicts.c (resolve_sr_conflict): Adjust.
16575
13ca549a
AD
165762001-12-27 Akim Demaille <akim@epita.fr>
16577
16578 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
16579
5092aba5
AD
165802001-12-27 Akim Demaille <akim@epita.fr>
16581
16582 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
16583 * src/print.c: here.
16584 (lookaheadset, shiftset): New, used as additional storage by
16585 print_reductions.
16586 (print_results): Adjust.
16587 (print_shifts, print_gotos, print_errs): New, extracted from...
16588 (print_actions): here.
16589 * src/print_graph.c (print_actions): Remove dead code.
16590
11e2beca
AD
165912001-12-27 Akim Demaille <akim@epita.fr>
16592
16593 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
16594 `$n' and `@n'.
16595
dac3c910
AD
165962001-12-27 Akim Demaille <akim@epita.fr>
16597
16598 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
16599 (build_relations): Adjust.
16600
d0b0fefa
AD
166012001-12-27 Akim Demaille <akim@epita.fr>
16602
16603 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
16604 duplication.
16605
adc8c848
AD
166062001-12-27 Akim Demaille <akim@epita.fr>
16607
16608 * src/reader.c (packgram): Catch nitems overflows.
16609
14d293ac
AD
166102001-12-27 Akim Demaille <akim@epita.fr>
16611
16612 * src/files.c, src/files.h (guard_obstack): Remove.
16613 * src/output.c (output): Adjust.
16614 * src/reader.c (parse_braces): New, factoring...
16615 (copy_action, copy_guard): these two which are renamed as...
16616 (parse_action, parse_guard): these.
16617 As a voluntary consequence, using braces around guards is now
16618 mandatory.
16619
f499b062
AD
166202001-12-27 Akim Demaille <akim@epita.fr>
16621
16622 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
16623 * src/reader.c (symbol_list): `guard' and `guard_line' are new
16624 members.
16625 (symbol_list_new): Adjust.
16626 (copy_action): action_line is the first line, not the last.
16627 (copy_guard): Just as for actions, store the `action' only, not
16628 the switch/case/break flesh.
16629 Don't parse the user action that might follow the guard, let...
16630 (readgram): do it, i.e., now, there can be an action after a
16631 guard.
16632 In other words the guard is just explicitly optional.
16633 (packgram): Adjust.
16634 * src/output.c (guards_output): New.
16635 (output_parser): Call it when needed.
16636 (output): Also free the guard and attrs obstacks.
16637 * src/files.c, src/files.h (obstack_save): Remove.
16638 (output_files): Remove.
16639 As a result, if one needs the former `.act' file, using an
16640 appropriate skeleton which requires actions and guards is now
16641 required.
16642 * src/main.c (main): Adjust.
16643 * tests/semantic.at: New.
16644 * tests/regression.at: Use `input.y' as input file name.
16645 Avoid 8+3 problems by requiring input.c when the test needs the
16646 parser.
16647
d945f5cd
AD
166482001-12-27 Akim Demaille <akim@epita.fr>
16649
16650 * src/reader.c (symbol_list_new): Be sure to initialize all the
16651 fields.
16652
d200e455
AD
166532001-12-27 Akim Demaille <akim@epita.fr>
16654
16655 All the hacks using a final pseudo state are now useless.
16656
16657 * src/LR0.c (set_state_table): state_table holds exactly nstates.
16658 * src/lalr.c (nLA): New.
16659 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
16660 instead of lookaheadsp from the pseudo state (nstate + 1).
16661
f9507c28
AD
166622001-12-27 Akim Demaille <akim@epita.fr>
16663
16664 * src/output.c (action_row, token_actions): Use a state_t instead
16665 of a integer, and nlookaheads instead of the following state's
16666 lookaheadsp.
16667
065fbd27
AD
166682001-12-27 Akim Demaille <akim@epita.fr>
16669
16670 * src/conflicts.c (log_resolution, flush_shift)
16671 (resolve_sr_conflict, set_conflicts, solve_conflicts)
16672 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
16673 (conflicts_print, print_reductions): Use a state_t instead of an
16674 integer when referring to a state.
16675 As much as possible, depend upon nlookaheads, instead of the
16676 `lookaheadsp' member of the following state (since lookaheads of
16677 successive states are successive, the difference between state n + 1
16678 and n served as the number of lookaheads for state n).
16679 * src/lalr.c (add_lookback_edge): Likewise.
16680 * src/print.c (print_core, print_actions, print_state)
16681 (print_results): Likewise.
16682 * src/print_graph.c (print_core, print_actions, print_state)
16683 (print_graph): Likewise.
16684 * src/conflicts.h: Adjust.
16685
1b177bd7
AD
166862001-12-27 Akim Demaille <akim@epita.fr>
16687
16688 * src/bison.hairy: Formatting/comment changes.
16689 ANSIfy.
16690 Remove `register' indications.
16691 Add plenty of `static'.
16692
7742ddeb
AD
166932001-12-27 Akim Demaille <akim@epita.fr>
16694
16695 * src/output.c (prepare): Drop the muscle `ntbase' which
16696 duplicates ntokens.
16697 * src/bison.simple: Formatting/comment changes.
16698 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
16699 is an undocumented synonym.
16700
1fa14068
AD
167012001-12-22 Akim Demaille <akim@epita.fr>
16702
16703 * src/output.c (output_table_data): Change the prototype to use
16704 `int' for array ranges: some invocations do pass an int, not a
16705 short.
16706 Reported by Wayne Green.
16707
b9752825
AD
167082001-12-22 Akim Demaille <akim@epita.fr>
16709
16710 Some actions of web2c.y are improperly triggered.
16711 Reported by Mike Castle.
16712
16713 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
16714 * tests/regression.at (Web2c): Rename as...
16715 (Web2c Report): this.
16716 (Web2c Actions): New.
16717
776209d6
AD
167182001-12-22 Akim Demaille <akim@epita.fr>
16719
16720 Reductions in web2c.y are improperly reported.
16721 Reported by Mike Castle.
16722
16723 * src/conflicts.c (print_reductions): Fix.
16724 * tests/regression.at (Web2c): New.
16725
275fc3ad
AD
167262001-12-18 Akim Demaille <akim@epita.fr>
16727
16728 Some host fail on `assert (!"foo")', which expands to
16729 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
16730 Reported by Nelson Beebee.
16731
16732 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
16733 `#define it_succeeded 0' and `assert (it_succeeded)'.
16734
897668ee
MA
167352001-12-17 Marc Autret <autret_m@epita.fr>
16736
16737 * src/bison.simple: Don't hard code the skeleton line and filename.
16738 * src/output.c (output_parser): Rename 'line' as 'output_line'.
16739 New line counter 'skeleton_line' (skeleton-line muscle).
16740
ab3399e0
PE
167412001-12-17 Paul Eggert <eggert@twinsun.com>
16742
16743 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
16744 YYDEBUG must be defined to a nonzero value.
16745
16746 * src/bison.simple (yytname): Do not assume that the user defines
16747 YYDEBUG to a properly parenthesized expression.
16748
3877f72b
AD
167492001-12-17 Akim Demaille <akim@epita.fr>
16750
16751 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
16752 nlookaheads is a new member.
16753 Adjust all users.
16754 * src/lalr.h (nlookaheads): Remove this orphan declaration.
16755 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
16756 state.
776209d6 16757
331dbc1b
AD
167582001-12-17 Akim Demaille <akim@epita.fr>
16759
16760 * src/files.h, src/files.c (open_files, close_files): Remove.
16761 * src/main.c (main): Don't open/close files, nor invoke lex_free,
16762 let...
16763 * src/reader.c (reader): Do it.
776209d6 16764
be750e4c
AD
167652001-12-17 Akim Demaille <akim@epita.fr>
16766
16767 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 16768
709ae8c6
AD
167692001-12-17 Akim Demaille <akim@epita.fr>
16770
16771 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
16772 (flush_reduce): New.
16773 (resolve_sr_conflict): Adjust.
776209d6 16774
f87685c3
AD
167752001-12-17 Akim Demaille <akim@epita.fr>
16776
16777 * src/output.c (output_obstack): Be static and rename as...
16778 (format_obstack): this, to avoid any confusion with files.c's
16779 output_obstack.
16780 * src/reader.h (muscle_obstack): Move to...
16781 * src/output.h: here, since it's defined in output.c.
16782
837491d8
AD
167832001-12-17 Akim Demaille <akim@epita.fr>
16784
16785 * src/output.c (action_row, save_column, default_goto)
16786 (sort_actions, matching_state, pack_vector): Better variable
16787 locality.
16788
796d61fb
AD
167892001-12-17 Akim Demaille <akim@epita.fr>
16790
16791 * src/output.c: Various formatting changes.
776209d6 16792
64d15509
AD
167932001-12-17 Akim Demaille <akim@epita.fr>
16794
16795 * src/files.c (output_files): Free the output_obstack.
16796 * src/main.c (main): Call print and print_graph conditionally.
16797 * src/print.c (print): Work unconditionally.
16798 * src/print_graph.c (print_graph): Work unconditionally.
16799 * src/conflicts.c (log_resolution): Output only if verbose_flag.
16800
fbc8ecb7
MA
168012001-12-16 Marc Autret <autret_m@epita.fr>
16802
16803 * src/output.c (actions_output): Fix. When we use %no-lines,
16804 there is one less line per action.
16805
f0440388
MA
168062001-12-16 Marc Autret <autret_m@epita.fr>
16807
16808 * src/bison.simple: Remove a useless #line directive.
16809 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
16810 * src/output.c (get_lines_number): New.
776209d6 16811 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
16812 output muscles.
16813 Fix line numbering.
16814 (actions_output): Computes the number of lines taken by actions.
16815 (output_master_parser): Insert new skeleton which is the name of
16816 the output parser file name.
16817
a79986b8
MA
168182001-12-15 Marc Autret <autret_m@epita.fr>
16819
16820 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
16821
4ec8e00f
MA
168222001-12-15 Marc Autret <autret_m@epita.fr>
16823
16824 * src/output.c (output_gram): Keep track of the hairy one.
16825
1a4648ff
AD
168262001-12-15 Akim Demaille <akim@epita.fr>
16827
16828 Make `make distcheck' work.
16829
16830 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
16831 system.h which uses libgettext.h.
16832
9c2c67e6
AD
168332001-12-15 Akim Demaille <akim@epita.fr>
16834
16835 * src/nullable.c (set_nullable): Useless rules must be skipped,
16836 otherwise, since we range over their symbols, we might look at a
16837 nonterminal which no longer ``exists'', i.e., it is not counted in
16838 `nvars', hence we overflow our arrays.
16839
93ede233
AD
168402001-12-15 Akim Demaille <akim@epita.fr>
16841
16842 The header can also be produced directly, without any obstack!
16843 Yahoo!
16844
16845 * src/files.c, src/files.h (defines_obstack): Remove.
16846 (compute_header_macro): Global.
16847 (defines_obstack_save): Remove.
16848 * src/reader.c (parse_union_decl): No longer output to
16849 defines_obstack: its content can be found in the `stype' muscle
16850 anyway.
16851 (output_token_translations): Merge into...
16852 (symbols_output): this.
16853 Rename as...
16854 (symbols_save): this.
16855 (reader): Adjust.
16856 * src/output.c (header_output): New.
16857 (output): Call it.
16858
2666f928
AD
168592001-12-15 Akim Demaille <akim@epita.fr>
16860
16861 * src/reader.c (parse_union_decl): Instead of handling two obstack
16862 simultaneously, use one to define the `stype' muscle, and use the
16863 value of the latter to fill defines_obstack.
16864 (copy_comment): Remove.
16865 (copy_comment2): Work for a single obstack.
16866 Rename as...
16867 (copy_comment): this.
16868
428046f8
AD
168692001-12-15 Akim Demaille <akim@epita.fr>
16870
16871 * src/lex.c, src/lex.h (xgetc): No longer static.
16872 * src/reader.c (parse_union_decl): Revamp.
16873
ea52d706
AD
168742001-12-15 Akim Demaille <akim@epita.fr>
16875
16876 Still making progress in separating Bison into (i) input, (ii)
16877 process, (iii) output: now we can directly output the parser file
16878 without using table_obstack at all.
16879
16880 * src/files.c, src/files.h (table_obstack): Bye bye.
16881 (parser_file_name): New.
16882 * src/files.c (compute_output_file_names): Compute it.
16883 * src/output.c (actions_output, output_parser)
16884 (output_master_parser): To a file instead of an obstack.
16885
3f96f4dc
AD
168862001-12-15 Akim Demaille <akim@epita.fr>
16887
16888 Attach actions to rules, instead of pre-outputting them to
16889 actions_obstack.
16890
16891 * src/gram.h (rule_t): action and action_line are new members.
16892 * src/reader.c (symbol_list): Likewise.
16893 (copy_action): Save the actions within the rule.
16894 (packgram): Save them in rule_table.
16895 * src/output.c (actions_output): New.
16896 (output_parser): Use it on `%%actions'.
16897 (output_rule_data): Don't free rule_table.
16898 (output): Do it.
16899 (prepare): Don't save the `action' muscle.
16900 * src/bison.simple: s/%%action/%%actions/.
16901
51576fb3
AD
169022001-12-15 Akim Demaille <akim@epita.fr>
16903
16904 * src/reader.c (copy_action): When --yacc, don't append a `;'
16905 to the user action: let it fail if lacking.
dee049eb 16906 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 16907
2648a72d
AD
169082001-12-14 Akim Demaille <akim@epita.fr>
16909
16910 * src/lex.c (literalchar): Simply return the char you decoded, non
16911 longer mess around with obstacks and int pointers.
16912 Adjust all callers.
16913
92790e5b
AD
169142001-12-14 Akim Demaille <akim@epita.fr>
16915
16916 * src/lex.c (literalchar): Don't escape the special characters,
16917 just decode them, and keep them as char (before, eol was output as
16918 the 2 char string `\n' etc.).
16919 * src/output.c (output_rule_data): Use quotearg to output the
16920 token strings.
16921
927c1557
PE
169222001-12-13 Paul Eggert <eggert@twinsun.com>
16923
16924 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
16925 Do not infringe on the global user namespace when using C++.
16926 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
16927 All uses of `fprintf' and `stderr' changed.
16928
16929 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
16930
ed8e1f68
AD
169312001-12-13 Akim Demaille <akim@epita.fr>
16932
16933 The computation of nullable is broken: it doesn't handle empty
16934 RHS's properly.
16935
16936 * tests/torture.at (GNU AWK Grammar): New.
16937 * tests/sets.at (Nullable): New.
16938 * src/nullable.c (set_nullable): Instead of blindly looping over
16939 `ritems', loop over the rules, and then over their rhs's.
16940
16941 Work around Autotest bugs.
16942
16943 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
16944 frame, because Autotest understand lines starting with a `+' as
16945 traces from the shell. Then, they are not processed properly.
16946 Admittedly an Autotest bug, but we don't have time to wait for
16947 Autotest to catch up.
16948 * tests/regression.at (Broken Closure): Adjust to the new table
16949 frames.
16950 Move to...
16951 * tests/sets.at: here.
16952
cb581495
AD
169532001-12-13 Akim Demaille <akim@epita.fr>
16954
16955 * src/closure.c (closure): Use nrules instead of playing tricks
16956 with BITS_PER_WORD.
16957
2e729273
AD
169582001-12-13 Akim Demaille <akim@epita.fr>
16959
16960 * src/print.c (print_actions): Output the handling of `$' as the
16961 traces do: shifting the token EOF. Before EOF was treated as a
16962 nonterminal.
16963 * tests/regression.at: Adjust some tests.
16964 * src/print_graph.c (print_core): Complete the set of items via
16965 closure. The next-to-final and final states are still unsatisfying,
16966 but that's to be addressed elsewhere.
16967 No longer output the rule numbers, but do output the state number.
16968 A single loop for the shifts + gotos is enough, but picked a
16969 distinct color for each.
16970 (print_graph): Initialize and finalize closure.
16971
107f7dfb
AD
169722001-12-13 Akim Demaille <akim@epita.fr>
16973
16974 * src/reader.c (readgram): Remove dead code, an strip useless
16975 braces.
16976 (get_type): Remove, unused.
16977
9b53a24f
AD
169782001-12-12 Akim Demaille <akim@epita.fr>
16979
16980 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
16981 on that of lib/error.c.
16982
dbfb6dcd
AD
169832001-12-12 Akim Demaille <akim@epita.fr>
16984
16985 Some hosts don't like `/' in includes.
16986
16987 * src/system.h: Include libgettext.h without qualifying the path.
16988 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
16989 $(top_srcdir).
16990
c25fb648
MA
169912001-12-11 Marc Autret <autret_m@epita.fr>
16992
16993 * src/output.c (output_parser): Remove useless muscle.
16994
710ddc4f
MA
169952001-12-11 Marc Autret <autret_m@epita.fr>
16996
16997 * src/bison.simple: Remove #line just before %%epilogue. It
16998 is now handled in ...
16999 * src/reader.c (read_additionnal_code): Add the output of a
17000 #line for the epilogue.
17001
e83d80b8
MA
170022001-12-10 Marc Autret <autret_m@epita.fr>
17003
927c1557 17004 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
17005 replace precedent remove.
17006 * src/bison.simple: Remove #line before %%prologue because
17007 %%input-line is wrong at this time.
17008
971d5158
MA
170092001-12-10 Marc Autret <autret_m@epita.fr>
17010
17011 * src/reader.c (symbols_output): Clean up.
927c1557 17012 * src/output.c (output_gram, output): Clean up.
971d5158 17013
5edafffd
AD
170142001-12-10 Akim Demaille <akim@epita.fr>
17015
17016 * src/lalr.c (initialize_lookaheads): New. Extracted from...
17017 * src/LR0.c (set_state_table): here.
17018 * src/lalr.c (lalr): Call it.
17019
0279f8e9
AD
170202001-12-10 Akim Demaille <akim@epita.fr>
17021
17022 * src/state.h (shifts): Remove the `number' member: shifts are
17023 attached to state, hence no longer need to be labelled with a
17024 state number.
17025
190c4f5f
AD
170262001-12-10 Akim Demaille <akim@epita.fr>
17027
17028 Now that states have a complete set of members, the linked list of
17029 shifts is useless: just fill directly the state's shifts member.
17030
17031 * src/state.h (shifts): Remove the `next' member.
17032 * src/LR0.c (first_state, last_state): Remove.
17033 Adjust the callers.
17034 (augment_automaton): Don't look for the shifts that must be added
17035 a shift on EOF: it is those of the state we looked for! But now,
17036 since shifts are attached, it is no longer needed to looking
17037 merely by its id: its number.
17038
2a73b93d
AD
170392001-12-10 Akim Demaille <akim@epita.fr>
17040
17041 * src/LR0.c (augment_automaton): Better variable locality.
17042 Remove an impossible branch: if there is a state corresponding to
17043 the start symbol being shifted, then there is shift for the start
17044 symbol from the initial state.
17045
74392f6a
AD
170462001-12-10 Akim Demaille <akim@epita.fr>
17047
17048 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
17049 only when appropriate: when insert_start_shifting_state' is not
17050 invoked.
17051 * tests/regression.at (Rule Line Numbers): Adjust.
17052
37c82725
AD
170532001-12-10 Akim Demaille <akim@epita.fr>
17054
17055 * src/LR0.c (augment_automaton): Now that all states have shifts,
17056 merge the two cases addition shifts to the initial state.
17057
6a164e0c
AD
170582001-12-10 Akim Demaille <akim@epita.fr>
17059
17060 * src/lalr.c (set_state_table): Move to...
17061 * src/LR0.c: here.
17062 * src/lalr.c (lalr): Don't call it...
17063 * src/LR0.c (generate_states): do it.
17064 * src/LR0.h (first_state): Remove, only the table is used.
17065
7215de24
AD
170662001-12-10 Akim Demaille <akim@epita.fr>
17067
17068 * src/LR0.h (first_shift, first_reduction): Remove.
17069 * src/lalr.c: Don't use first_shift: find shifts through the
17070 states.
17071
80e25d4d
AD
170722001-12-10 Akim Demaille <akim@epita.fr>
17073
17074 * src/LR0.c: Attach shifts to states as soon as they are
17075 computed.
17076 * src/lalr.c (set_state_table): Instead of assigning shifts to
17077 state, just assert that the mapping was properly done.
17078
0ab3728b
AD
170792001-12-10 Akim Demaille <akim@epita.fr>
17080
17081 * src/LR0.c (insert_start_shift): Rename as...
17082 (insert_start_shifting_state): this.
17083 (insert_eof_shifting_state, insert_accepting_state): New.
17084 (augment_automaton): Adjust.
17085 Better locality of the variables.
17086 When looking if the start_symbol is shifted from the initial
17087 state, using `while (... symbol != start_symbol ...)' sounds
17088 better than `while (... symbol < start_symbol ...)': If fail
17089 to see how the order between symbols could be relevant!
17090
78af9bbc
AD
170912001-12-10 Akim Demaille <akim@epita.fr>
17092
17093 * src/getargs.h: Don't declare `spec_name_prefix' and
17094 `spec_file_prefix', declared by src/files.h.
17095 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
17096 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
17097 * src/output.c (prepare): Adjust.
17098 * src/reader.c (symbols_output): Likewise.
17099 * src/vmsgetargs.c: Vaguely adjust, but who cares?
17100
bdef2a41
AD
171012001-12-10 Akim Demaille <akim@epita.fr>
17102
17103 * src/muscle_tab.c (muscle_init): NULL is a better default than
17104 `"0"'.
17105
3735969c
AD
171062001-12-10 Akim Demaille <akim@epita.fr>
17107
17108 * src/reader.c (reader): Calling symbols_output once is enough.
17109
49701457
AD
171102001-12-10 Akim Demaille <akim@epita.fr>
17111
17112 Now that states have a complete set of members, the linked list of
17113 reductions is useless: just fill directly the state's reductions
17114 member.
17115
17116 * src/state.h (struct reductions): Remove member `number' and
17117 `next'.
17118 * src/LR0.c (first_reduction, last_reduction): Remove.
17119 (save_reductions): Don't link the new reductions, store them in
17120 this_state.
17121 * src/lalr.c (set_state_table): No need to attach reductions to
17122 states, it's already done.
17123 * src/output.c (output_actions): No longer free the shifts, then
17124 the reductions, then the states: free all the states and their
17125 members.
17126
0edad749
AD
171272001-12-10 Akim Demaille <akim@epita.fr>
17128
17129 * src/options.c (OPTN, DRTV, BOTH): New.
17130 (option_table): Use them.
17131
0edad749
AD
17132 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
17133 the job of system.h.
17134 * src/options.c: Don't include stdio.h and xalloc.h for the same
17135 reasons.
17136
5449dd0f
AD
171372001-12-10 Akim Demaille <akim@epita.fr>
17138
17139 * src/output.c (output, prepare): Make sure the values of the
17140 muscles `action' and `prologue' are 0-terminated.
17141
a870c567
AD
171422001-12-10 Akim Demaille <akim@epita.fr>
17143
17144 Clean up GCC warnings.
17145
17146 * src/reader.c (copy_action): `buf' is not used.
17147 (parse_skel_decl): Be static.
17148 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
17149 * src/options.h (create_long_option_table): Have a real prototype.
17150 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
17151 (hash_delete_at): Return const void *.
17152 Adjust casts to preserve the const.
17153
80df8768
AD
171542001-12-10 Akim Demaille <akim@epita.fr>
17155
17156 * configure.in: Require 2.52g.
17157 M4 is not needed, but AUTOM4TE is.
17158 * m4/m4.m4: Remove.
17159 * tests/Makefile.am: Adjust.
17160
f693ad14
AD
171612001-12-10 Akim Demaille <akim@epita.fr>
17162
17163 One structure for states is enough, even though theoretically
17164 there are LR(0) states and LALR(1) states.
17165
17166 * src/lalr.h (state_t): Remove.
17167 (state_table): Be state_t **, not state_t *.
17168 * src/state.h (core, CORE_ALLOC): Rename as...
17169 (state_t, STATE_ALLOC): this.
17170 Add the LALR(1) members: shifts, reductions, errs.
17171 * src/LR0.c (state_table): Rename as...
17172 (state_hash): this, to avoid name clashes with the global
17173 `state_table'.
17174 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
17175 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
17176
74ffbcb6
AD
171772001-12-10 Akim Demaille <akim@epita.fr>
17178
17179 Bison dumps core on bash.y.
17180 Reported by Pascal Bart.
17181
17182 * src/warshall.c (bitmatrix_print): New.
17183 (TC): Use it.
ba0fe3c7 17184 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
17185 j must be the outer loop.
17186 * tests/regression.at (Broken Closure): New.
17187
07708e19
AD
171882001-12-05 Akim Demaille <akim@epita.fr>
17189
17190 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
17191 its argument.
ba1ecc07 17192 Reported by Peter Hamorsky.
07708e19 17193
92b16366
AD
171942001-12-05 Akim Demaille <akim@epita.fr>
17195
17196 * src/conflicts.c (err_table): Remove.
17197 (resolve_sr_conflict): Adjust.
17198 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
17199 Rename as...
17200 (state_t.reductions, state_t.shifts): this.
17201
076ab033
AD
172022001-12-05 Akim Demaille <akim@epita.fr>
17203
17204 * src/reduce.c (reduce_grammar_tables): No longer disable the
17205 removal of useless rules via CPP but via `if (0)', so that the
17206 compiler still check the code is valid.
17207 For instance, it should have noticed `rline' no longer exists: use
17208 the `line' member of rule_t.
17209 * src/gram.c (dummy, rline): Remove, unused.
17210
3843c413
AD
172112001-12-05 Akim Demaille <akim@epita.fr>
17212
17213 * src/output.c (pack_vector): Use assert, not berror.
17214 * src/main.c (berror): Remove, unused.
17215
43168960
AD
172162001-12-05 Akim Demaille <akim@epita.fr>
17217
17218 New experimental feature: if --verbose --trace output all the
17219 items of a state, not only its kernel.
17220
17221 * src/print.c (print_core): If `trace_flag', then invoke closure
17222 before outputting the items of the state (print_core is no longer
17223 a correct name them).
17224 (print_results): Invoke new_closure/free_closure if needed.
17225
b2872512
AD
172262001-12-05 Akim Demaille <akim@epita.fr>
17227
17228 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
17229 * src/closure.c, src/closure.h (itemsetsize): Rename as...
17230 (nitemset): for consistency with the rest of the project.
17231
23cbcc6c
AD
172322001-12-05 Akim Demaille <akim@epita.fr>
17233
17234 * src/closure.c (print_closure): Improve.
17235 (closure): Use it for printing input and output.
17236
03ec521c
AD
172372001-12-05 Akim Demaille <akim@epita.fr>
17238
17239 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
17240 indexed by nonterminals.
17241
3a7456dd
AD
172422001-12-05 Akim Demaille <akim@epita.fr>
17243
17244 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
17245 what it was!).
17246 * src/warshall.h: Remove accidental duplication of the content.
17247
1cbcf2e7
AD
172482001-12-05 Akim Demaille <akim@epita.fr>
17249
17250 * src/closure.c (set_fderives): De-obfuscate.
17251
84182270
AD
172522001-12-05 Akim Demaille <akim@epita.fr>
17253
17254 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
17255
3f6f053c
AD
172562001-12-05 Akim Demaille <akim@epita.fr>
17257
17258 * src/closure.c (set_firsts): De-obfuscate.
17259
7a5350ba
AD
172602001-12-05 Akim Demaille <akim@epita.fr>
17261
17262 * src/output.c (action_row): De-obfuscate
17263 using the good o' techniques: arrays not pointers, variable
17264 locality, BITISSET, RESETBIT etc.
17265
d954473d
AD
172662001-12-05 Akim Demaille <akim@epita.fr>
17267
17268 Pessimize the code to simplify it: from now on, all the states
17269 have a valid SHIFTS, which NSHIFTS is possibly 0.
17270
17271 * src/LR0.c (shifts_new): Be global and move to..
17272 * src/state.c, src/state.h: here.
17273 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
17274 * src/print_graph: Adjust.
17275
9839bbe5
AD
172762001-12-05 Akim Demaille <akim@epita.fr>
17277
17278 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
17279 * src/conflicts.c: Use it.
17280 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
17281 incorrectly ``simplified''.
17282
9f136c07
AD
172832001-12-05 Akim Demaille <akim@epita.fr>
17284
17285 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
17286 using the good o' techniques: arrays not pointers, variable
17287 locality, BITISSET, RESETBIT etc.
17288
b608206e
AD
172892001-12-05 Akim Demaille <akim@epita.fr>
17290
17291 * src/state.h (SHIFT_SYMBOL): New.
17292 * src/conflicts.c: Use it to deobfuscate.
17293
52afa962
AD
172942001-12-05 Akim Demaille <akim@epita.fr>
17295
17296 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
17297 (print_reductions): De-obfuscate using the good o' techniques:
17298 arrays not pointers, variable locality, BITISSET.
17299
e74dc321
AD
173002001-12-05 Akim Demaille <akim@epita.fr>
17301
17302 * src/conflicts.c (print_reductions): Arrays, not pointers.
17303 Use BITISSET.
17304
768fca83
AD
173052001-12-05 Akim Demaille <akim@epita.fr>
17306
17307 * src/conflicts.c (print_reductions): Pessimize, but clarify.
17308
a17e599f
AD
173092001-12-05 Akim Demaille <akim@epita.fr>
17310
17311 * src/conflicts.c (print_reductions): Improve variable locality.
17312
a04bc341
AD
173132001-12-05 Akim Demaille <akim@epita.fr>
17314
17315 * src/conflicts.c (print_reductions): Pessimize, but clarify.
17316
c8ea038e
AD
173172001-12-05 Akim Demaille <akim@epita.fr>
17318
17319 * src/conflicts.c (print_reductions): Improve variable locality.
17320
aa2aab3c
AD
173212001-12-05 Akim Demaille <akim@epita.fr>
17322
17323 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
17324 * src/lalr.c: Use them.
17325
b178c8cc
AD
173262001-12-05 Akim Demaille <akim@epita.fr>
17327
17328 * src/LR0.c (augment_automaton): Formatting changes.
17329 Better variable locality.
17330
f67d13aa
AD
173312001-12-05 Akim Demaille <akim@epita.fr>
17332
17333 * src/lalr.c (matrix_print): New.
17334 (transpose): Use it.
17335 Use arrays instead of pointers.
17336
c2713865
AD
173372001-12-05 Akim Demaille <akim@epita.fr>
17338
17339 * src/lalr.c (maxrhs): Move to...
17340 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
17341 * src/lalr.c (build_relations): Adjust.
17342
9887c18a
AD
173432001-12-05 Akim Demaille <akim@epita.fr>
17344
17345 * src/lalr.c (transpose): Free the memory allocated to the
17346 argument, as it is replaced by the results by the unique caller.
17347 (build_relations): Merely invoke transpose: it handles the memory
17348 deallocation.
17349 Improve variable locality.
17350 Avoid variables used as mere abbreviations.
17351 (compute_lookaheads): Use arrays instead of pointers.
17352
4d4f699c
AD
173532001-12-05 Akim Demaille <akim@epita.fr>
17354
17355 * src/lalr.c (initialize_F): Improve variable locality.
17356 Avoid variables used as mere abbreviations.
17357
80a69750
AD
173582001-12-05 Akim Demaille <akim@epita.fr>
17359
17360 * src/derives.c (print_derives): Display the ruleno.
17361 * src/lalr.c (initialize_F, transpose): Better variable locality
17362 to improve readability.
17363 Avoid variables used as mere abbreviations.
17364
fe961097
AD
173652001-12-05 Akim Demaille <akim@epita.fr>
17366
17367 * src/lalr.c (traverse): Use arrays instead of pointers.
17368
e3e4e814
AD
173692001-12-05 Akim Demaille <akim@epita.fr>
17370
17371 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
17372 the handling of squeue.
17373 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
17374
630e182b
AD
173752001-12-05 Akim Demaille <akim@epita.fr>
17376
17377 Because useless nonterminals are now kept alive (instead of being
17378 `destroyed'), we now sometimes examine them, and store information
17379 related to them. Hence we need to know their number, and adjust
17380 memory allocations.
17381
17382 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
17383 static.
17384 * src/LR0.c (allocate_itemsets): The memory allocated to
17385 `symbol_count' was used for two different purpose: once to count
17386 the number of occurrences of each symbol, and later reassigned to
17387 `shift_symbol', containing the symbol that can be shifted from a
17388 given state.
17389 Deobfuscate, i.e., allocate, use and free `symbol_count' here
17390 only, and...
17391 (new_itemsets): Allocate `shift_symbol' here.
17392 (allocate_itemsets): symbol_count includes useless nonterminals.
17393 Make room for them.
17394 (free_storage): Use `free', not `XFREE', for pointers that cannot
17395 be null.
17396
81b51460
AD
173972001-12-05 Akim Demaille <akim@epita.fr>
17398
17399 * src/nullable.c (set_nullable): Deobfuscate the handling of
17400 ritem.
17401 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
17402
3067fbef
AD
174032001-12-05 Akim Demaille <akim@epita.fr>
17404
17405 * src/gram.c, src/gram.h (ritem_print): New.
17406 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
17407 (This useless function was defined only to work around VMS linkers
17408 that can't handle compilation units with variables only).
17409 * src/reduce.c (dump_grammar): Use it to trace the construction of
17410 ritem.
17411
c2bea5f9
PE
174122001-12-04 Paul Eggert <eggert@twinsun.com>
17413
7d27c823
PE
17414 * src/bison.simple (union yyalloc): Change member names
17415 to be the same as the stack names.
17416 (yyparse): yyptr is now union yyalloc *, not char *.
17417 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
17418 and may generate better code on some machines.
c2bea5f9
PE
17419 (yystpcpy): Use prototype if __STDC__ is defined, not just
17420 if __cplusplus is defined.
35687a9d 17421
2c8a9dfa
AD
174222001-11-30 Akim Demaille <akim@epita.fr>
17423
17424 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
17425 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
17426 Gettext doesn't compile cleanly, and dies with -Werror.
17427 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
17428 Include WARNING_CFLAGS here.
17429 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
17430 before being defined.
17431
f4e421e6
AD
174322001-11-27 Paul Eggert <eggert@twinsun.com>
17433
17434 * lib/quotearg.h (quotearg_n, quotearg_n_style):
17435 First arg is int, not unsigned.
17436 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
17437 (SIZE_MAX, UINT_MAX): New macros.
17438 (quotearg_n_options): Abort if N is negative.
17439 Avoid overflow check on hosts where size_t is 64 bits and int
17440 is 32 bits, as overflow is impossible there.
17441 Fix off-by-one typo that caused unnecessary reallocation.
17442
7093d0f5
AD
174432001-11-29 Paul Eggert <eggert@twinsun.com>
17444
17445 Name space cleanup in generated parser.
17446
17447 * doc/bison.texinfo (Bison Parser): Discuss system headers
17448 and their effect on the user name space.
17449
17450 * src/bison.simple:
17451 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
17452 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
17453 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
17454
17455 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
17456 on user names when possible.
17457
17458 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
17459 Simplify test for whather <alloca.h> exists.
17460
17461 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
17462
17463 (<stdio.h>): Include if YYDEBUG.
17464
17465 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
17466 ! defined (yyoverflow) && ! defined (yymemcpy).
17467
17468 (yymemcpy, yyparse): Rename local variables as needed so that
17469 they all begin with 'yy'.
17470
17471 (yystrlen, yystpcpy): New functions.
17472
17473 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
17474 All uses changed.
17475
17476 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
17477 instead of relying on string.h functions. Use YYSTACK_ALLOC
17478 and YYSTACK_FREE instead of malloc and free.
17479
fd51e5ff
AD
174802001-11-30 Akim Demaille <akim@epita.fr>
17481
17482 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
17483 before their first uses.
17484 (YYBISON, YYPURE): Move to the top of the output.
17485
7d13ff5f
AD
174862001-11-30 Akim Demaille <akim@epita.fr>
17487
17488 * tests/reduce.at (Useless Nonterminals): Fix.
17489
892a3995
AD
174902001-11-30 Akim Demaille <akim@epita.fr>
17491
17492 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
17493 if body instead of `;' to pacify GCC's warnings.
17494
68f1e3ed
AD
174952001-11-30 Akim Demaille <akim@epita.fr>
17496
17497 Instead of mapping the LHS of unused rules to -1, keep the LHS
17498 valid, but flag the rules as invalid.
17499
17500 * src/gram.h (rule_t): `useful' is a new member.
17501 * src/print.c (print_grammar): Adjust.
17502 * src/derives.c (set_derives): Likewise.
17503 * src/reader.c (packgram, reduce_output): Likewise.
17504 * src/reduce.c (reduce_grammar_tables): Likewise.
17505 * tests/reduce.at (Underivable Rules, Useless Rules): New.
17506
d2d1b42b
AD
175072001-11-30 Akim Demaille <akim@epita.fr>
17508
17509 * src/reduce.c (reduce_output): Formatting changes.
17510 * src/print.c (print_results, print_grammar): Likewise.
17511 * tests/regression.at (Rule Line Numbers)
17512 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
17513
760b53a8
AD
175142001-11-30 Akim Demaille <akim@epita.fr>
17515
17516 * src/reduce.c (nonterminals_reduce): Instead of throwing away
17517 useless nonterminals, move them at the end of the symbol arrays.
17518 (reduce_output): Adjust.
17519 * tests/reduce.at (Useless Nonterminals): Adjust.
17520
00238958
AD
175212001-11-30 Akim Demaille <akim@epita.fr>
17522
17523 * src/reduce.c: Various comment/formatting changes.
17524 (nonterminals_reduce): New, extracted from...
17525 (reduce_grammar_tables): here.
17526 (reduce_grammar): Call nonterminals_reduce.
17527
396452de
PE
175282001-11-29 Paul Eggert <eggert@twinsun.com>
17529
17530 * src/bison.simple (YYSTACK_REALLOC): Remove.
17531 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
17532 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
17533 New macros.
17534 (union yyalloc): New type.
17535 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
17536 an arbitrary restriction on hosts where size_t is wider than int.
17537
17538 (yyparse): Don't dump core if alloca or malloc fails; instead, report
17539 a parser stack overflow. Allocate just one block of memory for all
17540 three stacks, instead of allocating three blocks; this typically is
17541 faster and reduces fragmentation.
17542
17543 Do not limit the number of items in the stack to a value that fits
17544 in 'int', as this is an arbitrary limit on hosts with 64-bit
17545 size_t and 32-bit int.
17546
147e184c
MA
175472001-11-29 Marc Autret <autret_m@epita.fr>
17548
17549 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
17550 of defining YYERROR_VERBOSE.
17551 [AT_DATA]: $4 is now out of C declarations in the prologue.
17552
426cf563
MA
175532001-11-28 Marc Autret <autret_m@epita.fr>
17554
17555 * src/reader.c (parse_dquoted_param): New.
17556 (parse_skel_decl): Use it.
17557 * src/lex.h: Add its prototype.
17558 * src/lex.c (literalchar): Become not static.
17559
c7925b99
MA
175602001-11-28 Marc Autret <autret_m@epita.fr>
17561
17562 * src/output.h: And put its extern declaration here.
17563 * src/output.c (error_verbose): Define here.
17564 (prepare): Echo name modification.
17565 * src/getargs.h: Clean its extern declaration.
17566 * src/getargs.c (error_verbose_flag): Remove.
17567 (getargs): Remove case 'e'.
17568 * src/options.c (option_table): 'error-verbose' is now seen as simple
17569 percent option.
17570 Include output.h.
17571
17572 * src/reader.c (read_declarations): Remove case tok_include.
17573 (parse_include_decl): Remove.
17574 * src/lex.h (token_t): Remove tok_include.
17575 * src/options.c (option_table): 'include' is now a simple command line
17576 option.
17577
5b5d1929
MA
175782001-11-28 Marc Autret <autret_m@epita.fr>
17579
17580 * src/bison.simple: Adjust muscle names.
17581 * src/muscle_tab.c (muscle_init): Also rename the muscles.
17582 * src/output.c (prepare): s/_/-/ for the muscles names.
17583 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
17584
8850be4b
MA
175852001-11-28 Marc Autret <autret_m@epita.fr>
17586
17587 * src/bison.simple: Fix debug.
17588 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
17589
4a38e613
AD
175902001-11-28 Akim Demaille <akim@epita.fr>
17591
17592 * src/LR0.c (shifts_new): New.
17593 (save_shifts, insert_start_shift, augment_automaton): Use it.
17594
4b35e1c1
AD
175952001-11-28 Akim Demaille <akim@epita.fr>
17596
17597 * src/closure.c (closure): `b' and `ruleno' denote the same value:
17598 keep ruleno only.
17599
d2b04478
AD
176002001-11-28 Akim Demaille <akim@epita.fr>
17601
17602 * src/closure.c (closure): Instead of looping over word in array
17603 then bits in words, loop over bits in array.
17604
2c4c30aa
AD
176052001-11-28 Akim Demaille <akim@epita.fr>
17606
17607 * src/closure.c (closure): No longer optimize the special case
17608 where all the bits of `ruleset[r]' are set to 0, to make the code
17609 clearer.
17610
576890b7
AD
176112001-11-28 Akim Demaille <akim@epita.fr>
17612
17613 * src/closure.c (closure): `r' and `c' are new variables, used to
17614 de-obfuscate accesses to RULESET and CORE.
17615
cb487d7d
AD
176162001-11-28 Akim Demaille <akim@epita.fr>
17617
17618 * src/reduce.c (reduce_print): Use ngettext.
17619 (dump_grammar): Improve the trace accuracy.
17620
6013d43f
AD
176212001-11-28 Akim Demaille <akim@epita.fr>
17622
17623 * src/reduce.c (dump_grammar): Don't translate trace messages.
17624
cb4956ee
AD
176252001-11-28 Akim Demaille <akim@epita.fr>
17626
17627 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
17628 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
17629 as all tags are free'ed afterwards.
17630 From Enrico Scholz.
17631
648185ab
PE
176322001-11-27 Paul Eggert <eggert@twinsun.com>
17633
17634 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
17635 use alloca when we didn't want to, and vice versa.
17636
68254a03
MA
176372001-11-27 Marc Autret <autret_m@epita.fr>
17638
9113b58f
AD
17639 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
17640 initialization.
68254a03
MA
17641 * src/output.c (prepare): Remove its update.
17642
04d843a2
MA
176432001-11-27 Marc Autret <autret_m@epita.fr>
17644
17645 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
17646 Use %error-verbose.
17647
d2079671 176482001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
17649
17650 * src/bison.simple: Remove YYERROR_VERBOSE using.
17651 Use %%error_verbose.
17652 (yyparse): Likewise.
17653 * src/output.c (prepare): Give its final value.
17654 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
17655 * src/getargs.h: Add its extern declaration.
17656 * src/getargs.c (error_verbose_flag): New int.
17657 (getargs): Update to catch new case.
17658 * src/options.c (option_table): 'error-verbose' is a new option.
17659 (shortopts): Update.
17660
e0327bc8
AD
176612001-11-27 Akim Demaille <akim@epita.fr>
17662
17663 * src/system.h: Use intl/libgettext.h.
17664 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
17665
000f1a3c
AD
176662001-11-27 Akim Demaille <akim@epita.fr>
17667
17668 * tests/torture.at (Exploding the Stack Size with Malloc):
17669 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
17670
26cfe0be
AD
176712001-11-27 Akim Demaille <akim@epita.fr>
17672
17673 * src/files.c: Include error.h.
17674 Reported by Hans Aberg.
17675
f6bd5427
MA
176762001-11-26 Marc Autret <autret_m@epita.fr>
17677
d2079671 17678 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
17679 (read_declarations): Add case tok_include.
17680 * src/getargs.h (include): Add its extern definition.
17681 * src/getargs.c (include): New const char *.
17682 (getargs): Add case '-I'.
17683 * src/options.c (option_table): Add include as command line and
17684 percent option.
17685 * src/lex.h (token_t): Add tok_include.
17686
2ca209c1
AD
176872001-11-26 Akim Demaille <akim@epita.fr>
17688
17689 * src/reader.c (readgram): Make sure rules for mid-rule actions
17690 have a lineno equal to that of their host rule.
17691 Reported by Hans Aberg.
17692 * tests/regression.at (Rule Line Numbers): New.
17693
0e41b407
AD
176942001-11-26 Akim Demaille <akim@epita.fr>
17695
17696 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
17697 size_ts.
17698
176992001-11-26 Akim Demaille <akim@epita.fr>
17700
17701 * src/complain.c, src/complain.h (error): Remove, provided by
17702 lib/error.[ch].
17703
e0c40012
AD
177042001-11-26 Akim Demaille <akim@epita.fr>
17705
17706 * src/reader.c (read_declarations): Don't abort on tok_illegal,
17707 issue an error message.
17708 * tests/regression.at (Invalid %directive): New.
17709 Reported by Hans Aberg.
17710
5e147124
AD
177112001-11-26 Akim Demaille <akim@epita.fr>
17712
17713 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
17714 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17715
a034c8b8
AD
177162001-11-26 Akim Demaille <akim@epita.fr>
17717
17718 * src/conflicts.c (conflicts_print): Don't complain at all when
17719 there are no reduce/reduce conflicts, and as many shift/reduce
17720 conflicts as expected.
17721 * tests/regression.at (%expect right): Adjust.
17722
c64a20f3
AD
177232001-11-23 Akim Demaille <akim@epita.fr>
17724
17725 * lib/alloca.c: Update, from fileutils.
17726
5b0d29bb
AD
177272001-11-23 Akim Demaille <akim@epita.fr>
17728
17729 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
17730
722c4bfe
AD
177312001-11-23 Akim Demaille <akim@epita.fr>
17732
17733 * src/system.h: Include alloca.h.
17734 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
17735
6255b435
AD
177362001-11-23 Akim Demaille <akim@epita.fr>
17737
17738 * src/print_graph.c (print_actions): Remove `rule', unused.
17739 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
17740 pacify GCC's signed < unsigned warnings.
17741 * src/closure.c (itemsetsize): Likewise.
17742 * src/reader.c (symbol_list_new): Static.
17743
b29b2ed5
AD
177442001-11-23 Akim Demaille <akim@epita.fr>
17745
17746 Attaching lineno to buckets is stupid, since only one copy of each
17747 symbol is kept, only the line of the first occurrence is kept too.
17748
17749 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
17750 * src/reader.c (rline_allocated): Remove, unused.
17751 (symbol_list): Have a `line' member.
17752 (symbol_list_new): New.
17753 (readgram): Use it.
17754 * src/print.c (print_grammar): Output the rule line numbers.
17755 * tests/regression.at (Solved SR Conflicts)
17756 (Unresolved SR Conflicts): Adjust.
17757 Reported by Hans Aberg.
17758
a81b1d4a
MA
177592001-11-22 Marc Autret <autret_m@epita.fr>
17760
17761 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
17762
c1ecb3c1
MA
177632001-11-22 Marc Autret <autret_m@epita.fr>
17764
17765 * src/muscle_tab.c (muscle_init): Remove initialization of
17766 skeleton muscle.
17767 * src/output.c (output_master_parser): Do it here.
17768
fbe01355
AD
177692001-11-20 Akim Demaille <akim@epita.fr>
17770
17771 * po/sv.po: New.
17772 * configure.in (ALL_LINGUAS): Adjust.
17773 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
17774 longer contains strings to translate.
17775
81e895c0
AD
177762001-11-19 Akim Demaille <akim@epita.fr>
17777
17778 * src/conflicts.c (conflicts_print): Add a missing \n.
17779
6bb1878b
AD
177802001-11-19 Akim Demaille <akim@epita.fr>
17781
17782 * src/nullable.c (nullable_print): New.
17783 (set_nullable): Call it when tracing.
17784 Better locality of variables.
17785
d9ec2d07
AD
177862001-11-19 Akim Demaille <akim@epita.fr>
17787
17788 * src/print.c (print_actions): Better locality of variables.
17789
720e5c1b
AD
177902001-11-19 Akim Demaille <akim@epita.fr>
17791
17792 * src/derives.c (print_derives): Fix and enrich.
17793 * src/closure.c (print_fderives): Likewise.
17794
fb908786
AD
177952001-11-19 Akim Demaille <akim@epita.fr>
17796
17797 * src/closure.c (itemsetend): Remove, replaced with...
17798 (itemsetsize): new.
17799
125ecb56
AD
178002001-11-19 Akim Demaille <akim@epita.fr>
17801
17802 * src/LR0.c (kernel_end): Remove, replaced with...
17803 (kernel_size): new.
17804
d8cf039f
AD
178052001-11-19 Akim Demaille <akim@epita.fr>
17806
17807 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
17808 to clarify.
17809
7bec0760
AD
178102001-11-19 Akim Demaille <akim@epita.fr>
17811
17812 * src/closure.c (closure): Use arrays instead of pointers to clarify.
17813
c87d4863
AD
178142001-11-19 Akim Demaille <akim@epita.fr>
17815
17816 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
17817 trace messages.
17818 * src/LR0.c: Likewise.
17819 (allocate_itemsets): Use arrays instead of pointers to clarify.
17820
9bfe901c
AD
178212001-11-19 Akim Demaille <akim@epita.fr>
17822
17823 * src/getargs.c (statistics_flag): Replace with...
17824 (trace_flag): New.
17825 (longopts): Accept --trace instead of --statistics.
17826 * src/getargs.h, src/options.c: Adjust.
17827 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
17828 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
17829
97db7bd4
AD
178302001-11-19 Akim Demaille <akim@epita.fr>
17831
cc72668c 17832 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
17833 pointers to clarify the code.
17834 (save_reductions, save_shifts): Factor common parts of alternatives.
17835
2c5f66ed
AD
178362001-11-19 Akim Demaille <akim@epita.fr>
17837
17838 * src/LR0.c (new_state, get_state): Complete TRACE code.
17839 * src/closure.c: Include `reader.h' to get `tags', needed by the
17840 trace code.
17841 Rename the conditional DEBUG as TRACE.
17842 Output consistently TRACEs to stderr, not stdout.
17843 * src/derives.c: Likewise.
17844 * src/reduce.c: (inaccessable_symbols): Using if is better style
17845 than goto.
17846 Use `#if TRACE' instead of `#if 0' for tracing code.
17847
300f275f
AD
178482001-11-19 Akim Demaille <akim@epita.fr>
17849
17850 * src/system.h (LIST_FREE, shortcpy): New.
17851 * src/LR0.c: Use them.
17852 * src/output.c (free_itemsets, free_reductions, free_shifts):
17853 Remove, replaced by LIST_FREE.
17854
f59c437a
AD
178552001-11-19 Akim Demaille <akim@epita.fr>
17856
17857 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
17858 (REDUCTIONS_ALLOC): New.
17859 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
17860 allocation.
17861
6986fd9e
AD
178622001-11-19 Akim Demaille <akim@epita.fr>
17863
17864 * src/LR0.c (new_state): Complete trace code.
17865 * src/nullable.c (set_nullable): Don't translate traces.
17866
4bc30f78
AD
178672001-11-19 Akim Demaille <akim@epita.fr>
17868
17869 * src/print_graph.c (print_core): Better locality of variables.
17870 * src/print.c (print_core): Likewise.
17871
08a946e0
AD
178722001-11-19 Akim Demaille <akim@epita.fr>
17873
17874 * src/vcg.c: You do the output, so you are responsible of the
17875 handling of VCG syntax, in particular: use quotearg.
17876 * src/print_graph.c: Don't.
17877 (print_actions): Don't output the actions as part of the nodes,
17878 since that's the job of the edges.
17879 (print_state): Don't output by hand: fill the node description,
9bfe901c 17880 and ask for its output.
08a946e0 17881
f0473484
AD
178822001-11-19 Akim Demaille <akim@epita.fr>
17883
cc72668c
AD
17884 * src/bison.simple (yyparse): When verbosely reporting an error,
17885 no longer put additional quotes around token names.
f0473484
AD
17886 * tests/calc.at: Adjust.
17887
e41dc700
AD
178882001-11-19 Akim Demaille <akim@epita.fr>
17889
17890 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
17891 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
17892 * src/output.c: Adjust.
17893
652a871c
AD
178942001-11-19 Akim Demaille <akim@epita.fr>
17895
17896 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
17897 (rule_t): this.
17898 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
17899
b2ed6e58
AD
179002001-11-19 Akim Demaille <akim@epita.fr>
17901
17902 * src/gram.h (rule_t): New.
17903 (rule_table): New.
17904 (rrhs, rlhs): Remove, part of state_t.
17905 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
17906 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17907 * src/reader.c, src/reduce.c: Adjust.
17908
edad7067
AD
179092001-11-19 Akim Demaille <akim@epita.fr>
17910
17911 * src/reader.c (symbols_output): New, extracted from...
17912 (packsymbols): Here.
17913 (reader): Call it.
17914
3feec034
AD
179152001-11-19 Akim Demaille <akim@epita.fr>
17916
17917 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
17918 (maxrhs): this new function.
17919
ddcd5fdf
AD
179202001-11-19 Akim Demaille <akim@epita.fr>
17921
cc72668c 17922 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
17923 Adjust.
17924
bb527fc2
AD
179252001-11-19 Akim Demaille <akim@epita.fr>
17926
cc72668c 17927 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
17928 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17929 * src/lalr.c: Adjust.
17930
a845a697
AD
179312001-11-19 Akim Demaille <akim@epita.fr>
17932
17933 * src/lalr.c (initialize_LA): Only initialize LA. Let...
17934 (set_state_table): handle the `lookaheads' members.
17935
f004bf6a
AD
179362001-11-19 Akim Demaille <akim@epita.fr>
17937
cc72668c
AD
17938 * src/lalr.h (lookaheads): Removed array, whose contents is now
17939 a member of...
f004bf6a
AD
17940 (state_t): this structure.
17941 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17942 Adjust.
17943
de326cc0
AD
179442001-11-19 Akim Demaille <akim@epita.fr>
17945
cc72668c
AD
17946 * src/lalr.h (consistent): Removed array, whose contents is now
17947 a member of...
de326cc0
AD
17948 (state_t): this structure.
17949 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17950 Adjust.
17951
90b4416b
AD
179522001-11-19 Akim Demaille <akim@epita.fr>
17953
cc72668c
AD
17954 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
17955 contents are now members of...
90b4416b
AD
17956 (state_t): this structure.
17957 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17958 Adjust.
17959
9703cc49
AD
179602001-11-19 Akim Demaille <akim@epita.fr>
17961
17962 * src/lalr.h (state_t): New.
17963 (state_table): Be a state_t * instead of a core **.
17964 (accessing_symbol): Remove, part of state_t.
17965 * src/lalr.c: Adjust.
17966 (set_accessing_symbol): Merge into...
17967 (set_state_table): this.
17968 * src/print_graph.c, src/conflicts.c: Adjust.
17969
d803322e
AD
179702001-11-14 Akim Demaille <akim@epita.fr>
17971
17972 * tests/calc.at, tests/output.at, tests/regression.at,
17973 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
17974 now the tests are run in private dirs, therefore AC_CLEANUP and
17975 family can be simplified to 0-ary.
17976 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
17977 use abs. path to find config.h.
17978 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
17979 stderr, there can be way too much random noise.
17980 Instead pass -Werror to GCC and rely on the exit status.
17981 Reported by Wolfram Wagner.
17982
3d76b07d
AD
179832001-11-14 Akim Demaille <akim@epita.fr>
17984
17985 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
17986 defined only if yyoverflow is defined, to avoid `warning: unused
17987 variable `yyvs1''.
17988 Reported by The Test Suite.
17989
09b503c8
AD
179902001-11-14 Akim Demaille <akim@epita.fr>
17991
17992 * src/print.c: Include reduce.h.
17993 Reported by Hans Aberg.
17994
179952001-11-14 Akim Demaille <akim@epita.fr>
17996
17997 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
17998 Revert a previous patch: these are really const.
17999 * src/conflicts.c (conflict_report): Additional useless pair of
18000 braces to pacify GCC's warnings for `if () if () {} else {}'.
18001 * src/lex.c (parse_percent_token): Replace equal_offset with
18002 arg_offset.
18003 arg is const.
18004 Be sure to strdup `arg' when used, since there is no reason for
18005 token_buffer not to change.
18006
0f37a994
AD
180072001-11-14 Akim Demaille <akim@epita.fr>
18008
18009 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
18010 definition.
18011 * src/main.c (main): Use them.
18012 Suggested by Hans Aberg.
18013
d39d93b8
AD
180142001-11-12 Akim Demaille <akim@epita.fr>
18015
18016 * src/system.h (ngettext): Now that we use ngettext, be sure to
18017 provide a default definition when NLS are not used.
18018
9edcd895
AD
180192001-11-12 Akim Demaille <akim@epita.fr>
18020
18021 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
18022 Use @kbd to denote user input.
18023 (Language and Grammar): ANSIfy the example.
18024 Adjust its layout for info/notinfo.
18025 (Location Tracking Calc): Output error messages to stderr.
18026 Output locations in a more GNUtically correct way.
18027 Fix a couple of Englishos.
18028 Adjust @group/@end group pairs.
18029
7da99ede
AD
180302001-11-12 Akim Demaille <akim@epita.fr>
18031
e3aa65c5 18032 %expect was not functioning at all.
7da99ede
AD
18033
18034 * src/conflicts.c (expected_conflicts): Set to -1.
18035 (conflict_report): Use ngettext.
18036 (conflicts_print): Check %expect and make its violation an error.
18037 * doc/bison.texinfo (Expect Decl): Adjust.
18038 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
18039 * tests/regression.at (%expect not enough, %expect right)
18040 (%expect too much): New.
18041
ba9dda1a
AD
180422001-11-12 Akim Demaille <akim@epita.fr>
18043
18044 * tests/regression.at (Conflicts): Rename as...
18045 (Unresolved SR Conflicts): this.
18046 (Solved SR Conflicts): New.
18047
337c5bd1
AD
180482001-11-12 Akim Demaille <akim@epita.fr>
18049
18050 * src/reduce.c (print_results): Rename as...
18051 (reduce_output): This.
18052 Output to OUT, passed as argument, instead of output_obstack.
18053 (dump_grammar): Likewise.
18054 (reduce_free): New.
18055 Also free V1.
18056 (reduce_grammar): No longer call reduce_output, since...
18057 * src/print.c (print_results): do it.
18058 * src/main.c (main): Call reduce_free;
18059
c73a41af
AD
180602001-11-12 Akim Demaille <akim@epita.fr>
18061
18062 * src/conflicts.c (print_reductions): Accept OUT as argument.
18063 Output to it, not to output_obstack.
18064 * src/print.c (print_actions): Adjust.
18065
0df87bb6
AD
180662001-11-12 Akim Demaille <akim@epita.fr>
18067
18068 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
18069 the result instead of using...
18070 (src_total, rrc_total, src_count, rrc_count): Remove.
18071 (any_conflicts): Remove.
18072 (print_conflicts): Split into...
18073 (conflicts_print, conflicts_output): New.
18074 * src/conflicts.h: Adjust.
18075 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 18076 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
18077 * tests/regression.at (Conflicts): New.
18078 Reported by Tom Lane.
18079
e4d3d4de
AD
180802001-11-12 Akim Demaille <akim@epita.fr>
18081
18082 * tests/regression.at (Invalid input): Remove, duplicate with
18083 ``Invalid input: 1''.
18084
6d7d248e
AD
180852001-11-12 Akim Demaille <akim@epita.fr>
18086
18087 * tests/torture.at (AT_DATA_STACK_TORTURE)
18088 (Exploding the Stack Size with Alloca)
18089 (Exploding the Stack Size with Malloc): New.
18090
e9e4c321
AD
180912001-11-12 Akim Demaille <akim@epita.fr>
18092
18093 * src/bison.simple (YYSTACK_REALLOC): New.
18094 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 18095 Reported by Per Allansson.
e9e4c321 18096
5f7e0832
AD
180972001-11-12 Pascal Bart <pascal.bart@epita.fr>
18098
18099 * src/bison.simple: Define type yystype instead of YYSTYPE, and
18100 define CPP macro, which substitute YYSTYPE by yystype.
18101 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
18102 with yyltype/YYLTYPE. This allows inclusion of the generated
18103 header within the parser if the compiler, such as GGC, accepts
18104 multiple equivalent #defines.
18105 From Akim.
18106
e3f1699f
AD
181072001-11-05 Akim Demaille <akim@epita.fr>
18108
18109 * src/reader.c (symbols_output): New, extracted from...
18110 (packsymbols): here.
18111 (reader): Adjust.
18112
65be0866
AD
181132001-11-05 Akim Demaille <akim@epita.fr>
18114
18115 * src/lex.c (parse_percent_token): s/quotearg/quote/.
18116
e4d910bf
AD
181172001-11-05 Akim Demaille <akim@epita.fr>
18118
18119 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
18120 pattern.
18121
951366c1
AD
181222001-11-05 Akim Demaille <akim@epita.fr>
18123
18124 * src/options.h (struct option_table_struct): set_flags is void*.
18125 * src/options.c (longopts): Support `--output' and `%output'.
18126 (usage): Adjust.
18127 * src/lex.h (tok_setopt): Remove, replaced with...
18128 (tok_intopt, tok_stropt): these new guys.
18129 * src/lex.c (getopt.h): Not needed.
18130 (token_buffer, unlexed_token_buffer): Not const.
18131 (percent_table): Promote `-' over `_' in directive names.
18132 Active `%name-prefix', `file-prefix', and `output'.
18133 (parse_percent_token): Accept possible arguments to directives.
18134 Promote `-' over `_' in directive names.
18135
d8988b2f
AD
181362001-11-04 Akim Demaille <akim@epita.fr>
18137
18138 * doc/bison.texinfo (Decl Summary): Split the list into
18139 `directives for grammars' and `directives for bison'.
18140 Sort'em.
18141 Add description of `%name-prefix', `file-prefix', and `output'.
18142 Promote `-' over `_' in directive names.
18143 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
18144 Simplify the description of `--name-prefix'.
18145 Promote `-' over `_' in directive names.
18146 Promote `--output' over `--output-file'.
18147 Fix the description of `--defines'.
18148 * tests/output.at: Exercise %file-prefix and %output.
18149
6468d18e
AD
181502001-11-02 Akim Demaille <akim@epita.fr>
18151
18152 * doc/refcard.tex: Update.
18153
6b7e85b9
AD
181542001-11-02 Akim Demaille <akim@epita.fr>
18155
18156 * src/symtab.h (SUNDEF): New.
18157 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
18158 stand for `uninitialized', instead of 0.
18159 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
18160 * src/lex.c (lex): Adjust.
18161
18162 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
18163 Number it 0.
18164 Let yylex return it instead of a plain 0.
18165 Reported by Dick Streefland.
18166
cd5aafcf
AD
181672001-11-02 Akim Demaille <akim@epita.fr>
18168
18169 * tests/regression.at (Mixing %token styles): New test.
18170
037ca2f1
AD
181712001-11-02 Akim Demaille <akim@epita.fr>
18172
18173 * src/reader.c (parse_thong_decl): Formatting changes.
18174 (token_translations_init): New, extracted from...
18175 (packsymbols): Here.
18176 Adjust.
18177
270a173c
AD
181782001-11-01 Akim Demaille <akim@epita.fr>
18179
18180 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
18181 Check that `9foo.y' produces correct cpp guards.
18182 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
18183 guards.
18184 Reported by Wwp.
18185
561f9a30
AD
181862001-11-01 Akim Demaille <akim@epita.fr>
18187
18188 * tests/regression.at (Invalid input: 2): New.
18189 * src/lex.c (unlexed_token_buffer): New.
18190 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
18191 too.
18192 Reported by Wwp.
18193
f987e9d2
AD
181942001-11-01 Akim Demaille <akim@epita.fr>
18195
18196 * tests/calc.at: Catch up with 1.30.
18197 * configure.in: Bump to 1.49a.
18198 Adjust to newer Autotest.
18199
0846f581
PB
182002001-10-19 Pascal Bart <pascal.bart@epita.fr>
18201
18202 * src/conflicts.c: Move global variables rrc_total and src_total ...
18203 (print_conflicts): here.
18204 * src/output.c (output): Free global variable user_toknums.
18205 * src/lex.c (token_obstack): Become static.
18206
3c1a79b3
AD
182072001-10-18 Akim Demaille <akim@epita.fr>
18208
18209 * tests/atlocal.in (GCC): Add.
18210 * tests/calc.at: s/m4_match/m4_bmatch/.
18211 s/m4_patsubst/m4_bpatsubst/.
18212 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
18213 * configure.in: AC_SUBST(GCC).
18214
5d52e7d0
MA
182152001-10-14 Marc Autret <autret_m@epita.fr>
18216
18217 * src/options.c (create_long_option_table): Fix.
18218
631aa1d3
AD
182192001-10-10 Akim Demaille <akim@epita.fr>
18220
18221 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
18222
f6ec6d13
AD
182232001-10-04 Akim Demaille <akim@epita.fr>
18224
18225 * src/reader.c (parse_union_decl): Push the caracters in
18226 union_obstack, not attrs_obstack.
18227
342b8b6e
AD
182282001-10-04 Akim Demaille <akim@epita.fr>
18229
18230 Merge in the branch 1.29.
18231
18232 * src/reader.c (packsymbols): Use a temporary obstack for
18233 `%%tokendef', since output_stack is already used elsewhere.
18234
18235 2001-10-02 Akim Demaille <akim@epita.fr>
18236
18237 Bump 1.29d.
18238
18239 2001-10-02 Akim Demaille <akim@epita.fr>
18240
18241 Version 1.29c.
18242
18243 2001-10-02 Akim Demaille <akim@epita.fr>
18244
18245 * tests/regression.at (Invalid CPP headers): New.
18246 From Alexander Belopolsky.
18247 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
18248
18249 2001-10-02 Akim Demaille <akim@epita.fr>
18250
18251 * tests/regression.at (Invalid input): New.
18252 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
18253 Reported by Shura.
18254
18255 2001-10-02 Akim Demaille <akim@epita.fr>
18256
18257 * tests/calc.at: Now that --debug works, the tests must be adjusted.
18258
18259 2001-10-02 Akim Demaille <akim@epita.fr>
18260
18261 * src/output.c (output_parser): Assert `skeleton'.
18262 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
18263 systems.
18264 From Shura.
18265
18266 2001-10-01 Marc Autret <autret_m@epita.fr>
18267
18268 * src/lex.h: Echo modifications.
18269 * src/lex.c (unlex): Parameter is now token_t.
18270 From Hans Aberg.
18271
18272 2001-10-01 Marc Autret <autret_m@epita.fr>
18273
18274 * src/main.c: Include lex.h.
18275 From Hans Aberg.
18276
18277 2001-09-29 Akim Demaille <akim@epita.fr>
18278
18279 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
18280
18281 2001-09-28 Akim Demaille <akim@epita.fr>
18282
18283 * tests/testsuite.at: Update to newer Autotest.
18284 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
18285
18286 2001-09-27 Akim Demaille <akim@epita.fr>
18287
18288 Position independent wrapper.
18289
18290 * tests/bison: Remove.
18291 * tests/bison.in: New.
18292 * configure.in: Adjust.
18293
18294 2001-09-27 Paul Eggert <eggert@twinsun.com>
18295
18296 Port quotearg fixes from tar 1.13.24.
18297
18298 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
18299 tm to be declared.
18300 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
18301 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
18302
18303 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
18304 * m4/mbrtowc.m4: New file.
18305 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
18306 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
18307
18308 2001-09-27 Akim Demaille <akim@epita.fr>
18309
18310 Bump to 1.29c.
18311
18312 2001-09-27 Akim Demaille <akim@epita.fr>
18313
18314 Version 1.29b.
18315
18316 2001-09-25 Akim Demaille <akim@epita.fr>
18317
18318 * src/system.h: Include `xalloc.h'.
18319 Remove it from the C files.
18320 * src/files.c (output_files): Free the obstacks.
18321 * src/lex.c (init_lex): Rename as...
18322 (lex_init): this.
18323 (lex_free): New.
18324 * src/main.c (main): Use it.
18325
18326 2001-09-24 Marc Autret <autret_m@epita.fr>
18327
18328 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
18329 to output informations in fout (FILE*).
18330 (open_graph, close_graph): Likewise.
18331 (output_graph, output_edge, output_node): Likewise.
18332 * src/vcg.h: Update function prototypes.
18333 * src/print_graph.c (print_graph): Open output graph file.
18334 (print_actions): Adjust.
18335 * src/files.h: Remove extern declaration.
18336 * src/files.c: Remove graph_obstack declaration.
18337 (open_files): Remove graph_obstack initialization.
18338 (output_files): Remove graph_obstack saving.
18339
18340 2001-09-24 Marc Autret <autret_m@epita.fr>
18341
18342 * src/files.c (compute_output_file_names): Fix.
18343
18344 2001-09-24 Marc Autret <autret_m@epita.fr>,
18345 Akim Demaille <akim@epita.fr>
18346
18347 * src/reader.c (reader): Remove call to free_symtab ().
18348 * src/main.c (main): Call it here.
18349 Include symtab.h.
18350 * src/conflicts.c (initialize_conflicts): Rename as...
18351 (solve_conflicts): this.
18352 * src/print.c (print_core, print_actions, print_state)
18353 (print_grammar): Dump to a file instead a `output_obstack'.
18354 (print_results): Dump `output_obstack', and then proceed with the
18355 FILE *.
18356 * src/files.c (compute_output_file_names, close_files): New.
18357 (output_files): Adjust.
18358 * src/main.c (main): Adjust.
18359
18360 2001-09-23 Marc Autret <autret_m@epita.fr>
18361
18362 * src/files.c (compute_header_macro): Computes header macro name
18363 from spec_defines_file when given.
18364
18365 2001-09-23 Marc Autret <autret_m@epita.fr>
18366
18367 * src/files.c (output_files): Add default extensions.
18368
18369 2001-09-22 Akim Demaille <akim@epita.fr>
18370
18371 * src/conflicts.c (finalize_conflicts): Rename as...
18372 (free_conflicts): this.
18373
18374 2001-09-22 Akim Demaille <akim@epita.fr>
18375
18376 * src/gram.c (gram_free): Rename back as...
18377 (dummy): this.
18378 (output_token_translations): Free `token_translations'.
18379 * src/symtab.c (free_symtab): Free the tag field.
18380
18381 2001-09-22 Akim Demaille <akim@epita.fr>
18382
18383 Remove `translations' as it is always set to true.
18384
18385 * src/gram.h: Adjust.
18386 * src/reader.c (packsymbols, parse_token_decl): Adjust
18387 * src/print.c (print_grammar): Adjust.
18388 * src/output.c (output_token_translations): Adjust.
18389 * src/lex.c (lex): Adjust.
18390 * src/gram.c: Be sure the set pointers to NULL.
18391 (dummy): Rename as...
18392 (gram_free): this.
18393
18394 2001-09-22 Akim Demaille <akim@epita.fr>
18395
18396 * configure.in: Invoke AM_LIB_DMALLOC.
18397 * src/system.h: Use dmalloc.
18398 * src/LR0.c: Be sure to have pointers initialized to NULL.
18399 (allocate_itemsets): Allocate kernel_items only if needed.
18400
18401 2001-09-22 Akim Demaille <akim@epita.fr>
18402
18403 * configure.in: Bump to 1.29b.
18404 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
18405 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
18406 need xmalloc.c in calc.y.
18407 From Pascal Bart.
18408
18409 2001-09-21 Akim Demaille <akim@epita.fr>
18410
18411 Version 1.29a.
18412 * Makefile.maint, config/config.guess, config/config.sub,
18413 * config/missing: Update from masters.
18414 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
18415 upon package.m4.
18416 * configure.in (ALL_LINGUAS): Add `tr'.
18417
18418 2001-09-21 Akim Demaille <akim@epita.fr>
18419
18420 * tests/Makefile.am (package.m4): Move to...
18421 ($(srcdir)/$(TESTSUITE)): here.
18422
18423 2001-09-20 Akim Demaille <akim@epita.fr>
18424
18425 * src/complain.c: No longer try to be standalone: use system.h.
18426 Don't assume __STDC__ is defined to 1. Just test if it is defined.
18427 * src/complain.h: Likewise.
18428 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
18429 Remove the unused variable `n'.
18430 From Albert Chin-A-Young.
18431
18432 2001-09-18 Marc Autret <autret_m@epita.fr>
18433
18434 * doc/bison.1: Update.
18435 * doc/bison.texinfo (Bison Options): Update --defines and --graph
18436 descriptions.
18437 (Option Cross Key): Update.
18438 Add --graph.
18439
18440 2001-09-18 Marc Autret <autret_m@epita.fr>
18441
18442 * tests/regression.at: New test (comment in %union).
18443
18444 2001-09-18 Marc Autret <autret_m@epita.fr>
18445
18446 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
18447 do that.
18448 Reported by Keith Browne.
18449
18450 2001-09-18 Marc Autret <autret_m@epita.fr>
18451
18452 * tests/output.at: Add tests for --defines and --graph.
18453
18454 2001-09-18 Marc Autret <autret_m@epita.fr>
18455
18456 * tests/output.at: Removes tests of %{header,src}_extension features.
18457
18458 2001-09-18 Akim Demaille <akim@epita.fr>
18459
18460 * tests/Makefile.am (package.m4): New.
18461 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
18462 (_AT_CHECK_CALC_ERROR): Likewise.
18463 Factor the `, ' part of verbose error messages.
18464
18465 2001-09-18 Marc Autret <autret_m@epita.fr>
18466
18467 * src/getargs.c (longopts): Declare --defines and --graph as options
18468 with optional arguments.
18469 * src/files.h: Add extern declarations.
18470 * src/files.c (spec_graph_file, spec_defines_file): New.
18471 (output_files): Update.
18472 Remove CPP-outed code.
18473
18474 2001-09-18 Marc Autret <autret_m@epita.fr>
18475
18476 Turn off %{source,header}_extension feature.
18477
18478 * src/files.c (compute_exts_from_gf): Update.
18479 (compute_exts_from_src): Update.
18480 (output_files): CPP-out useless code.
18481 * src/files.h: Remove {header,source}_extension extern declarations.
18482 * src/reader.c (parse_dquoted_param): CPP-out.
18483 (parse_header_extension_decl): Remove.
18484 (parse_source_extension_decl): Remove.
18485 (read_declarations): Remove cases tok_{hdrext,srcext}.
18486 * src/lex.c (percent_table): Remove {header,source}_extension entries.
18487 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
18488
18489 2001-09-10 Akim Demaille <akim@epita.fr>
18490
18491 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
18492 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
18493 (AT_CHECK_OUTPUT): this.
18494 Merely check ls' exit status, its output is useless.
18495
18496 2001-09-10 Akim Demaille <akim@epita.fr>
18497
18498 * tests/calc.at: Use m4_match.
18499 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
18500
18501 2001-09-10 Marc Autret <autret_m@epita.fr>,
18502 Akim Demaille <akim@epita.fr>
18503
18504 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
18505 enum color_e.
18506 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
18507 to `normal'.
18508 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
18509 * src/lex.h: Adjust prototype.
18510 (token_t): Add `tok_undef'.
18511 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
18512 (parse_percent_token): Now returns token_t.
18513 Add default statement in switch.
18514 (lex): Separate `c' as an input variable, from the token_t result
18515 part.
18516 (unlexed): Is a token_t.
18517
18518 2001-09-10 Akim Demaille <akim@epita.fr>
18519
18520 * configure.in: Bump to 1.29a.
18521
18522 2001-09-07 Akim Demaille <akim@epita.fr>
18523
18524 Version 1.29.
18525
18526 2001-08-30 Akim Demaille <akim@epita.fr>
18527
18528 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
18529 * m4/atconfig.m4: Remove.
18530 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
18531 * tests/bison: New.
18532 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
18533 m4_if, m4_patsubst, and m4_regexp.
18534 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
18535 `input' file instead of echo.
18536
18537 2001-08-29 Akim Demaille <akim@epita.fr>
18538
18539 Bump to 1.28e.
18540
18541 2001-08-29 Akim Demaille <akim@epita.fr>
18542
18543 Version 1.28d.
18544
18545 2001-08-29 Paul Eggert <eggert@twinsun.com>
18546
18547 * src/bison.simple (yyparse): Don't take the address of an
18548 item before the start of an array, as that doesn't conform to
18549 the C Standard.
18550
18551 2001-08-29 Robert Anisko <anisko_r@epita.fr>
18552
18553 * doc/bison.texinfo (Location Tracking Calc): New node.
18554
18555 2001-08-29 Paul Eggert <eggert@twinsun.com>
18556
18557 * src/output.c (output): Do not define const, as this now
18558 causes more problems than it cures.
18559
18560 2001-08-29 Akim Demaille <akim@epita.fr>
18561
18562 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
18563 the nodes.
18564 Be sure to tag the `detailmenu'.
18565
18566 2001-08-29 Akim Demaille <akim@epita.fr>
18567
18568 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
18569 download in a tmp dir.
18570
18571 2001-08-28 Marc Autret <autret_m@epita.fr>
18572
18573 * config/depcomp: New file.
18574
18575 2001-08-28 Marc Autret <autret_m@epita.fr>
18576
18577 * doc/bison.1 (mandoc): Adjust.
18578 From Juan Manuel Guerrero.
18579
18580 2001-08-28 Marc Autret <autret_m@epita.fr>
18581
18582 * src/print_graph.c (print_state): Fix.
18583
18584 2001-08-27 Marc Autret <autret_m@epita.fr>
18585
18586 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
18587 char * members.
18588 Echo modifications to the functions prototypes.
18589 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
18590
18591 2001-08-27 Marc Autret <autret_m@epita.fr>
18592
18593 * src/vcg.c: Include `xalloc.h'.
18594 (add_colorentry): New.
18595 (add_classname): New.
18596 (add_infoname): New.
18597 * src/vcg.h: Add new prototypes.
18598
18599 2001-08-27 Akim Demaille <akim@epita.fr>
18600
18601 * Makefile.maint: Sync. again with CVS Autoconf.
18602
18603 2001-08-27 Akim Demaille <akim@epita.fr>
18604
18605 * Makefile.maint: Formatting changes.
18606 (po-update, cvs-update, update): New targets.
18607 (AMTAR): Remove.
18608
18609 2001-08-27 Akim Demaille <akim@epita.fr>
18610
18611 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18612 * Makefile.maint: Sync. with CVS Autoconf.
18613
18614 2001-08-27 Marc Autret <autret_m@epita.fr>
18615
18616 * src/vcg.h (struct infoname_s): New.
18617 (struct colorentry_s): New.
18618 (graph_s): New fields {vertical,horizontal}_order in structure.
18619 Add `infoname' field.
18620 Add `colorentry' field;
18621 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
18622 (G_HORIZONTAL_ORDER): New.
18623 (G_INFONAME): New.
18624 (G_COLORENTRY): New.
18625 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
18626 Add output of `infoname'.
18627 Add output of `colorentry'.
18628
18629 2001-08-27 Marc Autret <autret_m@epita.fr>
18630
18631 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
18632 This one shadowed a global parameter.
18633
18634 2001-08-24 Marc Autret <autret_m@epita.fr>
18635
18636 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
18637 instead of `unsigned'.
18638 (print_state): Do not call obstack_object_size () in obstack_grow ()
18639 to avoid macro variables shadowing.
18640
18641 2001-08-23 Marc Autret <autret_m@epita.fr>
18642
18643 * src/lex.c (percent_table): Typo: s/naem/name/.
18644 Add graph option.
18645 Normalize new options declarations.
18646
18647 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
18648
18649 * tests/suite.at: Exercise %header_extension and %source_extension.
18650
18651 2001-08-16 Marc Autret <autret_m@epita.fr>
18652
18653 * src/reader.c (parse_dquoted_param): New.
18654 (parse_header_extension_decl): Use it.
18655 (parse_source_extension_decl): Likewise.
18656
18657 2001-08-16 Marc Autret <autret_m@epita.fr>
18658
18659 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
18660 (get_xxxx_str): Use assert () instead of complain ().
18661 Remove return invokations in default cases.
18662 (get_decision_str): Modify default behaviour. Remove second argument.
18663 Echo modifications on calls.
18664 (output_graph): Fix.
18665
18666 2001-08-16 Marc Autret <autret_m@epita.fr>
18667
18668 * src/getargs.c (usage): Update with ``-g, --graph''.
18669
18670 2001-08-16 Marc Autret <autret_m@epita.fr>
18671
18672 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
18673 (Option Cross Key): Likewise.
18674 * doc/bison.1: Update.
18675
1c8c2190
PB
186762001-09-25 Pascal Bart <pascal.bart@epita.fr>
18677
18678 * src/output.c (output_master_parser): Don't finish action_obstack.
18679 (output_parser): Don't care about the muscle action, here.
18680 (prepare): Copy the action_obstack in the action muscle.
18681 (output): Free action_obstack.
18682
180d45ba
PB
186832001-09-23 Pascal Bart <pascal.bart@epita.fr>
18684
18685 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
18686 will contain `%union' declaration.
18687 (parse_union_decl): Delete #line directive output.
18688 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
18689 informations about %union.
18690 (parse_union_decl): Copy the union_obstack in the muscle stype.
18691 * src/bison.simple: Add new #line directive.
18692 Add typdef %%stype YYSTYPE.
18693
c51d1a19
PB
186942001-09-23 Pascal Bart <pascal.bart@epita.fr>
18695
18696 * src/bison.simple: Add new `#line' directive.
18697
6f9344da
PB
186982001-09-22 Pascal Bart <pascal.bart@epita.fr>
18699
18700 * src/bison.simple: New `#line' directive.
18701 * src/output.c (output_parser): Support new dynamic muscle input_line.
18702
652def80
MA
187032001-09-22 Marc Autret <autret_m@epita.fr>
18704
18705 * src/output.c (output_master_parser): New.
18706 (output_parser): Be more re-entrant.
18707
25b222fa
MA
187082001-09-21 Marc Autret <autret_m@epita.fr>
18709
18710 * src/reader.c (copy_definition, parse_union_decl): Update and use
18711 `linef' muscle.
18712 (copy_action): Likewise.
18713 Use obstack_1grow ().
18714 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
18715
6bc35ae5
MA
187162001-09-21 Marc Autret <autret_m@epita.fr>
18717
18718 * src/options.c (option_table): Adjust.
18719 * src/lex.c (parse_percent_token): Fix.
18720
c0629aa1
PB
187212001-09-20 Pascal Bart <pascal.bart@epita.fr>
18722
18723 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 18724
82b6d266
PB
187252001-09-20 Pascal Bart <pascal.bart@epita.fr>
18726
18727 * src/lex.c (parse_percent_token): Change type of variable `tx', which
18728 is now an option_table_struct*.
18729 (option_strcmp): New function option_strcmp.
18730 (parse_percent_token): Call option_strcmp.
18731 * src/getargs.c (xalloc.h, options.h): Include it.
18732 (getargs): Call create_long_option_table.
18733 (getargs): Free longopts at the end of the function.
18734 (shortopts): Move in options.c.
18735 * src/options.c (create_long_option_table): New function. Convert
18736 information from option_table to option structure.
18737 * src/reader.c (options.h): Include it.
18738
18739 * src/Makefile.am: Adjust.
18740 * src/options.c (option_table): Create from longopts and percent_table.
18741 * src/getargs.c (longopts): Delete.
18742 * src/lex.c (struct percent_table_struct): Delete.
18743 (percent_table): Delete.
18744 (options.h): Include it.
18745 * src/options.c: Create.
18746 * src/options.h: Create.
18747 Declare enum opt_access_e.
18748 Define struct option_table_struct.
18749
75f5aaea
MA
187502001-09-20 Marc Autret <autret_m@epita.fr>
18751
18752 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
18753 sections of Bison.
18754
f508cb0a
PB
187552001-09-19 Pascal Bart <pascal.bart@epita.fr>
18756
18757 * src/bison.simple: s/%%filename/%%skeleton.
18758 * src/muscle_tab.c (getargs.h): Include it.
18759 (muscle_init): Insert new muscle skeleton.
18760
13105fc1
PB
187612001-09-18 Pascal Bart <pascal.bart@epita.fr>
18762
18763 * src/output.c (output_parser): Delete unused variable actions_dumped.
18764
b0c4483e
PB
187652001-09-07 Pascal Bart <pascal.bart@epita.fr>
18766
18767 * src/output.c (output): Delete call to reader_output_yylsp.
18768 * src/reader.c (reader): Likewise.
ba0fe3c7 18769 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 18770
11d82f03
MA
187712001-09-02 Marc Autret <autret_m@epita.fr>
18772
18773 * src/reader.c: Include muscle_tab.h.
18774 (parse_union_decl): Update.
18775 (parse_macro_decl): Rename parse_muscle_decl.
18776 Update to use renamed functions and variable.
18777 (read_declarations, copy_action, read_additionnal_code, : Updated
18778 with correct variables and functions names.
18779 (packsymbols, reader): Likewise.
342b8b6e 18780
11d82f03 18781 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 18782
11d82f03
MA
18783 * src/output.c: Include muscle_tab.h
18784 In all functions using macro_insert, change by using muscle_insert ().
18785 (macro_obstack): Rename muscle_obstack.
18786 Echo modifications in the whole file.
18787 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
18788 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
18789 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
18790
18791 * src/muscle_tab.h: Update double inclusion macros.
18792 (macro_entry_s): Rename muscle_entry_s.
18793 Update prototypes.
342b8b6e 18794
11d82f03
MA
18795 * src/muscle_tab.c: Include muscle_tab.h.
18796 Rename macro_tabble to muscle_table.
18797 (mhash1, mhash2, mcmp): Use muscle_entry.
18798 (macro_init): Rename muscle_init. Update.
18799 (macro_insert): Rename muscle_insert. Update.
18800 (macro_find): Rename muscle_find. Update.
18801
18802 * src/main.c: Include muscle_tab.h.
18803 (main): Call muscle_init ().
18804 * src/Makefile.am (bison_SOURCES): Echo modifications.
18805
93a37297
MA
188062001-09-02 Marc Autret <autret_m@epita.fr>
18807
f753cd62 18808 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 18809
f753cd62
MA
18810 * src/muscle_tab.c, src/muscle_tab.h: Add files.
18811
188122001-09-02 Marc Autret <autret_m@epita.fr>
18813
18814 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 18815
682d48cd
PB
188162001-09-01 Pascal Bart <pascal.bart@epita.fr>
18817
342b8b6e 18818 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
18819 filename.
18820
087c8fda
MA
188212001-09-01 Marc Autret <autret_m@epita.fr>
18822
18823 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
18824 to an explicit value to activate the feature. We do it here.
18825
dda680cb
PB
188262001-08-31 Pascal Bart <pascal.bart@epita.fr>
18827
18828 * src/output.c (prepare): Delete the `filename' muscule insertion.
18829 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
18830 (parse_union_decl): Likewise.
18831 * src/macrotab.c (macro_init): Initialize filename by infile.
18832
9e644e64
MA
188332001-08-31 Marc Autret <autret_m@epita.fr>
18834
18835 * src/bison.simple (YYLSP_NEEDED): New definition.
18836 * src/output.c (prepare): Add macro insertion of `locations_flag'
18837
17da6427
PB
188382001-08-31 Pascal Bart <pascal.bart@epita.fr>
18839
18840 * src/output.c (prepare): Delete insertion of previous muscles,
18841 and insert the `prefix' muscles.
18842 * src/macrotab.c (macro_init): Likewise.
18843 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 18844 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
18845 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
18846 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 18847 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
18848 name_prefix.
18849
e8cb70b9
PB
188502001-08-31 Pascal Bart <pascal.bart@epita.fr>
18851
18852 * src/main.c (main): Standardize.
18853 * src/output.c (output_table_data, output_parser): Likewise.
18854 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
18855
63c2d5de
MA
188562001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
18857
342b8b6e 18858 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
18859 %%epilogue.
18860 * src/output.c (output): Rename %%declarations to %%prologue.
18861 * src/bison.simple: Echo modifications.
342b8b6e 18862
d8cb5183
MA
188632001-08-31 Marc Autret <autret_m@epita.fr>
18864
18865 * src/reader.c (readgram): CleanUp.
18866 (output_token_defines): Likewise.
18867 (packsymbols): Likewise.
18868 (reader): Likewise.
18869 * src/output.c (output): CPP-out useless code.
18870
6c686258
PB
188712001-08-31 Pascal Bart <pascal.bart@epita.fr>
18872
342b8b6e 18873 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
18874 output_trailers and output_headers.
18875 * src/output.h: Remove obsolete functions prototypes of output_headers
18876 and output_trailers.
18877
8f451ef7
PB
188782001-08-30 Pascal Bart <pascal.bart@epita.fr>
18879
18880 * src/main.c: Include macrotab.h.
342b8b6e 18881 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
18882 Adjust functions prototypes.
18883 * src/macrotab.c (macro_insert): Constify key and value.
18884 (macro_find): Constify key.
18885 (macro_insert): Include 'xalloc.h'
18886 (macro_insert): Use XMALLOC.
18887 (macro_find): Constify return value.
18888 * src/output.c (output_table_data): Rename table to table_data.
18889 (output_parser): Constify macro_key, macro_value.
18890
997b6fd0 188912001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
18892
18893 * src/reader.c (parse_skel_decl): New.
342b8b6e 18894 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
18895 * src/lex.h (token_t): New token `tok_skel'.
18896 * src/lex.c (percent_table): Add skeleton option entry.
18897 Standardize.
18898
ff48177d
MA
188992001-08-29 Marc Autret <autret_m@epita.fr>
18900
18901 * src/bison.simple: Add %%user_code directive at the end.
18902 * src/reader.c (read_additionnal_code): New.
18903 (reader): Use it.
18904 * src/output.c (output_program): Remove.
18905 (output): Update.
18906
b33160bf
MA
189072001-08-28 Marc Autret <autret_m@epita.fr>
18908
18909 * src/output.c (output_actions): Clean up.
4e5caae2 18910 (output_gram): CPP-out useless code.
b33160bf
MA
18911 * src/reader.c (reader): Clean up, CPP-out useless code.
18912
d1a2daf7
PB
189132001-08-28 Pascal Bart <pascal.bart@epita.fr>
18914
342b8b6e 18915 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 18916 directive.
d1a2daf7
PB
18917 * src/bison.simple: Add `%%definitions'.
18918
2b763dfe
MA
189192001-08-28 Marc Autret <autret_m@epita.fr>
18920
18921 * config/depcomp: New file.
18922
f1a87ef6
PE
189232001-08-27 Paul Eggert <eggert@twinsun.com>
18924
18925 * src/bison.simple (yyparse): Don't take the address of an
18926 item before the start of an array, as that doesn't conform to
18927 the C Standard.
18928
82e236e2
RA
189292001-08-27 Robert Anisko <robert.anisko@epita.fr>
18930
f1a87ef6 18931 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
18932 obstack. It was done too late here.
18933
18934 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
18935 completely wrong.
18936 (reader): Initialize the macro obstack here, since we need it to grow
18937 '%define' directives.
18938
18939 * src/reader.h: Declare the macro obstack as extern.
18940
b0cfa28a
RA
189412001-08-27 Robert Anisko <robert.anisko@epita.fr>
18942
18943 * src/output.c (output_parser): Fix. Store single '%' characters in
18944 the output obstack instead of throwing them away.
18945
6fc74234
AD
189462001-08-27 Akim Demaille <akim@epita.fr>
18947
18948 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18949
9c76d118
RA
189502001-08-25 Robert Anisko <robert.anisko@epita.fr>
18951
18952 * lib/Makefile.am: Adjust.
18953
a8289c62
RA
189542001-08-25 Robert Anisko <robert.anisko@epita.fr>
18955
18956 * src/bison.simple: Update and add '%%' directives.
18957
b6610515
RA
189582001-08-25 Robert Anisko <robert.anisko@epita.fr>
18959
18960 * src/reader.c (reader): Remove calls to 'output_headers' and
18961 'output_trailers'. Remove some C output.
18962 (readgram): Disable a piece of code that was writing a default
18963 definition for 'YYSTYPE'.
18964 (reader_output_yylsp): Remove.
18965 (packsymbols): Output token defintions to a macro.
18966 (copy_definition): Disable C output.
6fc74234 18967
b6610515
RA
18968 * src/reader.c (parse_macro_decl): New function used to parse macro
18969 declarations.
18970 (copy_string2): Put the body of copy_string into this new function.
18971 Add a parameter to let the caller choose whether he wants to copy the
18972 string delimiters or not.
18973 (copy_string): Be a simple call to copy_string2 with the last argument
18974 bound to true.
18975 (read_declarations): Add case for macro definition.
18976 (copy_identifier): New.
6fc74234 18977 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
18978 rather than lex.
18979
26f609ff
RA
189802001-08-25 Robert Anisko <robert.anisko@epita.fr>
18981
18982 * src/output.c (prepare): Add prefixed names.
18983 (output_parser): Output semantic actions.
18984 (output_parser): Fix bug on '%%line' directives.
6fc74234 18985
26f609ff
RA
18986 * src/output.c (output_headers): Remove. The C code printed by this
18987 function should now be in the skeletons.
18988 (output_trailers): Remove.
18989 (output): Disable call to 'reader_output_yylsp'.
18990 (output_rule_data): Do not output tables to the table obstack.
18991
18992 * src/output.c: Remove some C dedicated output.
18993 Improve the use of macro and output obstacks.
18994 (output_defines): Remove.
6fc74234 18995
26f609ff
RA
18996 * src/output.c (output_token_translations): Associate 'translate'
18997 table with a macro. No output to the table obstack.
18998 (output_gram): Same for 'rhs' and 'prhs'.
18999 (output_stos): Same for 'stos'.
19000 (output_rule_data): Same for 'r1' and 'r2'.
19001 (token_actions): Same for 'defact'.
19002 (goto_actions): Same for 'defgoto'.
19003 (output_base): Same for 'pact' and 'pgoto'.
19004 (output_table): Same for 'table'.
19005 (output_check): Same for 'check'.
6fc74234 19006
26f609ff
RA
19007 * src/output.c (output_table_data): New function.
19008 (output_short_table): Remove.
19009 (output_short_or_char_table): Remove.
6fc74234 19010
26f609ff
RA
19011 * src/output.c (output_parser): Replace most of the skeleton copy code
19012 with something new. Skeletons are now processed character by character
19013 rather than line by line, and Bison looks for '%%' macros. This is the
19014 first step in making Bison's output process (a lot) more flexible.
19015 (output_parser): Use the macro table.
19016
6f43b113
RA
190172001-08-25 Robert Anisko <robert.anisko@epita.fr>
19018
19019 * src/main.c (main): Initialize the macro table.
19020
dd3127cf
RA
190212001-08-25 Robert Anisko <robert.anisko@epita.fr>
19022
19023 * src/lex.c (percent_table): Add tok_define.
19024 * src/lex.h: Add tok_define.
19025
aa321494
RA
190262001-08-25 Robert Anisko <robert.anisko@epita.fr>
19027
19028 * src/macrotab.c: New file.
19029 * src/macrotab.h: New file.
19030 * src/Makefile.am: Update.
19031
68bd3b6b
RA
190322001-08-25 Robert Anisko <robert.anisko@epita.fr>
19033
19034 * lib/hash.c: New file.
19035 * lib/hash.h: New file.
19036 * lib/Makefile.am: Update.
19037
45f8dd1e
AD
190382001-08-15 Akim Demaille <akim@epita.fr>
19039
19040 Version 1.28c.
19041
40a64a7a 190422001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
19043
19044 * src/reader.c (readgram): Indent output macro YYSTYPE.
19045 (packsymbols): Likewise.
19046 (output_token_defines): Likewise.
19047 * src/files.c: Standardize.
19048 (compute_header_macro): New.
19049 (defines_obstack_save): New. Use compute_header_macro.
19050 (output_files): Update. Use defines_obstack_save.
19051
f9a8293a
AD
190522001-08-15 Akim Demaille <akim@epita.fr>
19053
19054 * doc/bison.texinfo (Table of Symbols): Document
19055 YYSTACK_USE_ALLOCA.
19056
150ca7a7
AD
190572001-08-15 Akim Demaille <akim@epita.fr>
19058
19059 * missing: Update from CVS Automake.
19060 * config/config.guess, config/config.sub, config/texinfo.tex:
19061 Update from gnu.org.
19062
69b5cec4
AD
190632001-08-15 Akim Demaille <akim@epita.fr>
19064
19065 * Makefile.maint: Sync with CVS Autoconf.
19066
f2b5126e
PB
190672001-08-14 Pascal Bart <pascal.bart@epita.fr>
19068
69b5cec4 19069 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
19070 `fdl.texi'.
19071 * doc/fdl.texi: Add to package.
19072
4ecbf796
MA
190732001-08-14 Marc Autret <autret_m@epita.fr>
19074
19075 Turn on %{source,header}_extension features.
19076
69b5cec4 19077 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
19078 source_extension.
19079 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 19080 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
19081 between options.
19082
95fb5662
MA
190832001-08-14 Marc Autret <autret_m@epita.fr>
19084
19085 * src/files.c (compute_base_names): Add extensions computing when
19086 `--file-prefix' used.
19087 Standardize function calls.
19088
78d09da9
MA
190892001-08-13 Marc Autret <autret_m@epita.fr>
19090
69b5cec4 19091 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
19092 defining it (defined but null disables alloca).
19093
5a009f2c
MA
190942001-08-13 Marc Autret <autret_m@epita.fr>
19095
19096 * src/bison.simple (_yy_memcpy): CPP reformat.
19097
1e41465a
PB
190982001-08-13 Pascal Bart <pascal.bart@epita.fr>
19099
19100 * tests/atconfig.in (CPPFLAGS): Fix.
19101
c67a198d
PB
191022001-08-10 Pascal Bart <pascal.bart@epita.fr>
19103
79282c6c 19104 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
19105 `gpl.texi'.
19106 * doc/gpl.texi: Add to package.
19107
09a6de7e
MA
191082001-08-10 Marc Autret <autret_m@epita.fr>
19109
19110 * src/print_graph.h: Fix.
19111 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
19112
b77b9ee0
AD
191132001-08-10 Akim Demaille <akim@epita.fr>
19114
19115 * src/system.h: Provide default declarations for stpcpy, strndup,
19116 and strnlen.
19117
3e259915
MA
191182001-08-10 Robert Anisko <anisko_r@epita.fr>
19119
19120 * doc/bison.texinfo (Locations): Update @$ stuff.
19121
ca96bc2d
MA
191222001-08-09 Robert Anisko <anisko_r@epita.fr>
19123
19124 * src/bison.simple (YYLLOC_DEFAULT): Update.
19125 (yyparse): Adjust.
19126
fdc6758b
MA
191272001-08-08 Marc Autret <autret_m@epita.fr>
19128
b77b9ee0 19129 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
19130 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
19131 Reported by Fabrice Bauzac.
957d4dbf 19132
600cad3b
MA
191332001-08-08 Marc Autret <autret_m@epita.fr>
19134
19135 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
19136 * src/vcg.c (output_node): Fix.
19137 * src/vcg.h: Cleanup.
19138 * src/print_graph.c: Add comments.
b77b9ee0 19139 (node_output_size): New global variable. Simplify the formatting of
600cad3b 19140 the VCG graph output.
b77b9ee0 19141 (print_actions): Unused code is now used. It notifies the final state
600cad3b 19142 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 19143 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
19144 blue.
19145 Get the current node name and node_obstack by argument.
19146 (node_obstack): New variable.
19147 (print_state): Manage node_obstack.
19148 (print_core): Use node_obstack given by argument.
19149 A node is not only computed here but in print_actions also.
19150 (print_graph): CPP out useless code instead of commenting it.
19151
976e528f
AD
191522001-08-07 Pascal Bart <pascal.bart@epita.fr>
19153
19154 * tests/atconfig.in (CPPFLAGS): Fix.
19155
20e8e5ca
AD
191562001-08-07 Akim Demaille <akim@epita.fr>
19157
19158 * src/print_graph.c (quote): New.
19159 (print_core): Use it.
19160
957d4dbf 191612001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 19162
3e3da797
AD
19163 * src/vcg.c (complain.h): Include it.
19164 Unepitaize `return' invocations.
c4b66126 19165 [NDEBUG] (main): Remove.
79282c6c 19166 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
19167 * src/files.c (open_files): Initialize graph_obstack.
19168 * src/print_graph.c (print_actions): CPP out useless code.
19169 (print_core): Don't output the last `\n' in labels.
19170 Use `quote'.
19171 * src/files.c (output_files): Output the VCG file.
19172 * src/main.c (main): Invoke print_graph ();
3e3da797 19173
957d4dbf 191742001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
19175
19176 Automaton VCG graph output.
19177 Using option ``-g'' or long option ``--graph'', you can generate
19178 a gram_filename.vcg file containing a VCG description of the LALR (1)
19179 automaton of your grammar.
19180
19181 * src/main.c: Call to print_graph() function.
19182 * src/getargs.h: Update.
19183 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
19184 (graph_flag): New flag.
19185 (longopts): Update.
19186 (getargs): Add case `g'.
19187 * src/files.c (graph_obstack): New obstack struct.
19188 (open_files): Initialize new obstack.
19189 (output_files): Saves graph_obstack if required.
19190 * src/files.h (graph_obstack): New extern declaration.
19191 * src/Makefile.am: Add new source files.
19192
927c1557 191932001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
19194
19195 * src/print_graph.c, src/print_graph.h (graph): New.
19196 * src/vcg.h: New file.
19197 * src/vcg.c: New file, VCG graph handling.
19198
7333d403
AD
191992001-08-06 Marc Autret <autret_m@epita.fr>
19200
19201 Add of %source_extension and %header_extension which specify
19202 the source or/and the header output file extension.
19203
19204 * src/files.c (compute_base_names): Remove initialisation of
19205 src_extension and header_extension.
19206 (compute_exts_from_gf): Update.
19207 (compute_exts_from_src): Update.
19208 (output_files): Update.
19209 * src/reader.c (parse_header_extension_decl): New.
19210 (parse_source_extension_decl): New.
19211 (read_declarations): New case statements for the new tokens.
19212 * src/lex.c (percent_table): Add entries for %source_extension
19213 and %header_extension.
19214 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
19215
84163231
AD
192162001-08-06 Marc Autret <autret_m@epita.fr>
19217
19218 * configure.in: Bump to 1.28c.
19219 * doc/bison.texinfo: Texinfo thingies.
19220
8303fc42
AD
192212001-08-04 Pascal Bart <pascal.bart@epita.fr>
19222
19223 * tests/atconfig.in (CPPFLAGS): Add.
19224 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
19225
70a84437
AD
192262001-08-03 Akim Demaille <akim@epita.fr>
19227
19228 Version 1.28b.
19229
2ce10144
AD
192302001-08-03 Akim Demaille <akim@epita.fr>
19231
19232 * tests/Makefile.am (check-local): Ship testsuite.
19233 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
19234 Include `string.h'.
19235
1e3e4bc1
AD
192362001-08-03 Akim Demaille <akim@epita.fr>
19237
19238 * configure.in: Try using -Wformat when compiling.
19239
42b45b7f
AD
192402001-08-03 Akim Demaille <akim@epita.fr>
19241
19242 * configure.in: Bump to 1.28b.
19243
8f13fe33
AD
192442001-08-03 Akim Demaille <akim@epita.fr>
19245
19246 * src/complain.c: Adjust strerror_r portability issues.
19247
b37ba92c
AD
192482001-08-03 Akim Demaille <akim@epita.fr>
19249
19250 Version 1.28a.
19251
b0ce6046
AD
192522001-08-03 Akim Demaille <akim@epita.fr>
19253
19254 * src/getargs.c, src/getarg.h (skeleton)): Constify.
19255 * src/lex.c (literalchar): Avoid name clashes on `buf'.
19256 * src/getargs.c: Include complain.h.
19257 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
19258 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
19259
d01c415b
AD
192602001-08-03 Akim Demaille <akim@epita.fr>
19261
19262 * src/reader.c (readgram): Display hidden chars in error messages.
19263
459dd1a6
AD
192642001-08-03 Akim Demaille <akim@epita.fr>
19265
19266 Update to gettext 0.10.39.
19267
53b74c0c
AD
192682001-08-03 Akim Demaille <akim@epita.fr>
19269
19270 * lib/strspn.c: New.
19271
234a3be3
AD
192722001-08-01 Marc Autret <autret_m@epita.fr>
19273
19274 * doc/bison.texinfo: Update.
19275 * doc/bison.1 (mandoc): Update.
19276 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
19277 * src/files.c: Support output files extensions computing.
19278 (src_extension): New static variable.
19279 (header_extension): New static variable.
19280 (tr): New function.
19281 (get_extension_index): New function, gets the index of an extension
19282 filename in a string.
19283 (compute_exts_from_gf): New function, computes extensions from the
19284 grammar file extension.
19285 (compute_exts_from_src): New functions, computes extensions from the
19286 C source file extension, file given by ``-o'' option.
19287 (compute_base_names): Update.
19288 (output_files): Update.
19289
847bf1f5
AD
192902001-08-01 Robert Anisko <anisko_r@epita.fr>
19291
d995fee7 19292 * doc/bison.texi: Document @$.
847bf1f5
AD
19293 (Locations): New section.
19294
d074a105
AD
192952001-07-18 Akim Demaille <akim@epita.fr>
19296
19297 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
19298 * config/prev-version.txt, config/move-if-change: New.
19299 * Makefile.am: Adjust.
19300
3419715d
AD
193012001-07-08 Pascal Bart <pascal.bart@epita.fr>
19302
19303 * src/bison.simple (yyparse): Suppress warning `comparaison
19304 between signed and unsigned'.
19305
62ab6972
AD
193062001-07-05 Pascal Bart <pascal.bart@epita.fr>
19307
19308 * src/getargs.h (raw_flag): Remove.
19309 * src/getargs.c: Die on `-r'/`--raw'.
19310 * src/lex.c (parse_percent_token): Die on `%raw'.
19311 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
19312 * tests/calc.at: Suppress test with option `--raw'.
19313
1e24cc5b
AD
193142001-07-14 Akim Demaille <akim@epita.fr>
19315
19316 * config/: New.
19317 * configure.in: Require Autoconf 2.50.
19318 Update to gettext 0.10.38.
19319
32dfccf8
AD
193202001-03-16 Akim Demaille <akim@epita.fr>
19321
19322 * doc/bison.texinfo: ANSIfy the examples.
19323
cd5bd6ac
AD
193242001-03-16 Akim Demaille <akim@epita.fr>
19325
19326 * getargs.c (skeleton): New variable.
19327 (longopts): --skeleton is a new option.
19328 (shortopts, getargs): -S is a new option.
19329 * getargs.h: Declare skeleton.
19330 * output.c (output_parser): Use it.
19331
5141b016
AD
193322001-03-16 Akim Demaille <akim@epita.fr>
19333
19334 * m4/strerror_r.m4: New.
19335 * m4/error.m4: Run AC_FUNC_STRERROR_R.
19336 * lib/error.h, lib/error.c: Update.
19337
447992b9
AD
193382001-03-16 Akim Demaille <akim@epita.fr>
19339
19340 * src/getargs.c (longopts): Clean up.
19341
274d42ce
AD
193422001-02-21 Akim Demaille <akim@epita.fr>
19343
19344 * src/reader.c (gensym): `gensym_count' is your own.
19345 Use a static buf to create the symbol name, as token_buffer is no
19346 longer a buffer.
19347
22c821f3
AD
193482001-02-08 Akim Demaille <akim@epita.fr>
19349
19350 * src/conflicts.c (conflict_report): Be sure not to append to res
19351 between two calls, which could happen if both first sprintf were
19352 skipped, but not the first cp += strlen.
19353
18569462
AD
193542001-02-08 Akim Demaille <akim@epita.fr>
19355
19356 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
19357 New, from fileutils 4.0.37.
19358 * configure.in: Require Autoconf 2.49c. I took some time before
19359 making this decision. This is the only way out for portability
19360 issues in Bison, it would mean way too much duplicate effort to
19361 import in Bison features implemented in 2.49c since 2.13.
19362 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
19363
0d8f3c8a
AD
193642001-02-02 Akim Demaille <akim@epita.fr>
19365
19366 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 19367 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 19368
f17bcd1f
AD
193692001-01-19 Akim Demaille <akim@epita.fr>
19370
19371 Get rid of the ad hoc handling of token_buffer in the scanner: use
19372 the obstacks.
19373
19374 * src/lex.c (token_obstack): New.
19375 (init_lex): Initialize it. No longer call...
19376 (grow_token_buffer): this. Remove it.
19377 Adjust all the places which used it to use the obstack.
19378
511e79b3
AD
193792001-01-19 Akim Demaille <akim@epita.fr>
19380
19381 * src/lex.h: Rename all the tokens:
19382 s/\bENDFILE\b/tok_eof/g;
19383 s/\bIDENTIFIER\b/tok_identifier/g;
19384 etc.
19385 Let them be enums, not #define, to ease debugging.
19386 Adjust all the code.
19387
0d6508ef
AD
193882001-01-18 Akim Demaille <akim@epita.fr>
19389
19390 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
19391 * src/lex.c (maxtoken, grow_token_buffer): Static.
19392
6deb4447
AD
193932001-01-18 Akim Demaille <akim@epita.fr>
19394
19395 Since we now use obstacks, more % directives can be enabled.
19396
19397 * src/lex.c (percent_table): Also accept `%yacc',
19398 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
19399 `%debug'.
19400 Handle the actions for `%semantic_parser' and `%pure_parser' here,
19401 instead of returning a token.
19402 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
19403 * src/reader.c (read_declarations): Adjust.
19404 * src/files.c (open_files): Don't call `compute_base_names', don't
19405 compute `attrsfile' since they depend upon data which might be
19406 *in* the input file now.
19407 (output_files): Do it here.
19408 * src/output.c (output_headers): Document the fact that this patch
19409 introduces a guaranteed SEGV for semantic parsers.
19410 * doc/bison.texinfo: Document them.
19411 * tests/suite.at: Exercise these %options.
19412
ff4423cc
AD
194132000-12-20 Akim Demaille <akim@epita.fr>
19414
19415 Also handle the output file (--verbose) with obstacks.
19416
19417 * files.c (foutput): Remove.
19418 (output_obstack): New.
19419 Adjust all dependencies.
19420 * src/conflicts.c: Return a string.
19421 * src/system.h (obstack_grow_string): Rename as...
19422 (obstack_sgrow): this. Be ready to work with non literals.
19423 (obstack_fgrow4): New.
19424
956dba3a
AD
194252000-12-20 Akim Demaille <akim@epita.fr>
19426
19427 * src/files.c (open_files): Fix the computation of short_base_name
19428 in the case of `-o foo.tab.c'.
19429
337bab46
AD
194302000-12-20 Akim Demaille <akim@epita.fr>
19431
19432 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
19433 (copy_dollar): Now that everything uses obstacks, get rid of the
19434 FILE * parameters.
19435
5d3214b8
AD
194362000-12-20 Akim Demaille <akim@epita.fr>
19437
19438 * src/files.c (open_files): Actually the `.output' file is based
19439 on the short_base_name, not base_name.
19440 * tests/suite.at (Checking output file names): Adjust.
19441
29092a57
AD
194422000-12-20 Akim Demaille <akim@epita.fr>
19443
19444 * src/bison.s1: Remove, we now use directly...
19445 * src/bison.simple: this.
19446 * src/Makefile.am: Use pkgdata instead of data.
19447
ea5607fd
AD
194482000-12-20 Akim Demaille <akim@epita.fr>
19449
19450 * src/files.c (guard_obstack): New.
19451 (open_files): Initialize it.
19452 (output_files): Dump it...
19453 * src/files.h: Export it.
19454 * src/reader.c (copy_guard): Use it.
19455
27110317
AD
194562000-12-19 Akim Demaille <akim@epita.fr>
19457
19458 * src/files.c (outfile, defsfile, actfile): Removed as global
19459 vars.
19460 (open_files): Don't compute them.
19461 (output_files): Adjust.
19462 (base_name, short_base_name): Be global.
19463 Adjust dependencies.
19464
19c50364
AD
194652000-12-19 Akim Demaille <akim@epita.fr>
19466
19467 * src/files.c (strsuffix): New.
19468 (stringappend): Be just like strcat but allocate.
19469 (base_names): Eve out from open_files.
19470 Try to simplify the rather hairy computation of base_name and
19471 short_base_name.
19472 (open_files): Use it.
19473 * tests/suite.at (Checking output file names): New test.
19474
573c1d9f
AD
194752000-12-19 Akim Demaille <akim@epita.fr>
19476
19477 * src/system.h (obstack_grow_literal_string): Rename as...
19478 (obstack_grow_string): this.
19479 * src/output.c (output_parser): Recognize `%% actions' instead of
19480 `$'.
19481 * src/bison.s1: s/$/%% actions/.
19482 * src/bison.hairy: Likewise.
19483
ef7ddedd
AD
194842000-12-19 Akim Demaille <akim@epita.fr>
19485
19486 * src/output.c (output_parser): Compute the `#line' lines when
19487 there are.
19488 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
19489 Suggested by Hans Aberg.
19490
ff61dabd
AD
194912000-12-19 Akim Demaille <akim@epita.fr>
19492
19493 Let the handling of the skeleton files be local to the procedures
19494 that use it.
19495
19496 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
19497 longer static.
19498 (fparser, open_extra_files): Remove.
19499 (open_files, output_files): Don't take care of fparser.
19500 * src/files.h: Adjust.
19501 * src/output.c (output_parser): Open and close the file to the
19502 skeleton.
19503 * src/reader.c (read_declarations): When %semantic_parser, open
19504 fguard.
19505
55b96341
AD
195062000-12-19 Akim Demaille <akim@epita.fr>
19507
19508 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
19509 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
19510
358c15b7
AD
195112000-12-19 Akim Demaille <akim@epita.fr>
19512
19513 * src/files.c (open_files): Yipee! We no longer need all the code
19514 looking for `/tmp' since we have no tmp file.
19515
7de3329e
AD
195162000-12-19 Akim Demaille <akim@epita.fr>
19517
19518 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
19519 New macros.
19520 * src/files.c (open_files): Less dependency on MSDOS etc.
19521
3abcd459
AD
195222000-12-14 Akim Demaille <akim@epita.fr>
19523
19524 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
19525 Provide a default definition.
19526 Use it when executing the default @ action.
19527 * src/reader.c (reader_output_yylsp): No longer include
19528 `timestamp' and `text' in the default YYLTYPE.
19529
2a91a95e
AD
195302000-12-12 Akim Demaille <akim@epita.fr>
19531
19532 * src/reader.c (copy_definition, parse_union_decl, copy_action)
19533 (copy_guard): Quote the file names.
19534 Reported by Laurent Mascherpa.
19535
14d3eb9b
AD
195362000-12-12 Akim Demaille <akim@epita.fr>
19537
19538 * src/output.c (output_headers, output_program, output): Be sure
19539 to escape special characters when outputting filenames.
19540 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
19541 (output_headers): Don't depend on them, Use ACTSTR.
19542
d7045ec6
AD
195432000-11-17 Akim Demaille <akim@epita.fr>
19544
19545 * lib/obstack.h: Formatting changes.
19546 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
19547 prevents type checking.
19548 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
19549 cast the value to (void *): assigning a `foo *' to a `void *'
19550 variable is valid.
19551 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
19552 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
19553 append characters.
19554
6fd54b73
AD
195552000-11-17 Akim Demaille <akim@epita.fr>
19556
19557 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
19558 as...
19559 (suite.m4, regression.m4, calc.m4): these.
19560 * tests/atgeneral.m4: Update from CVS Autoconf.
19561
4c50eae6
AD
195622000-11-17 Akim Demaille <akim@epita.fr>
19563
19564 * tests/regression.m4 (%union and --defines): New test,
19565 demonstrating a current bug in the obstack implementation.
19566
a35f64ea
AD
195672000-11-17 Akim Demaille <akim@epita.fr>
19568
19569 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
19570 macros.
19571 Use them to declare the variables which are global or local to
19572 `yyparse'.
19573
7de23534
AD
195742000-11-17 Akim Demaille <akim@epita.fr>
19575
19576 * acconfig.h: Remove, no longer used.
19577
aa7815f5
AD
195782000-11-07 Akim Demaille <akim@epita.fr>
19579
19580 * src: s/Copyright (C)/Copyright/g.
19581
5af1f549
AD
195822000-11-07 Akim Demaille <akim@epita.fr>
19583
19584 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
19585 defining.
19586 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
19587
553e2b22
AD
195882000-11-07 Akim Demaille <akim@epita.fr>
19589
19590 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
19591 Merge in a single CPP if/else.
19592
8a4f41d6
AD
195932000-11-07 Akim Demaille <akim@epita.fr>
19594
19595 * src/output.c (output): Remove useless variables.
19596 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
19597 argument `data' for consistency with the prototypes.
19598 Qualify it `const'.
19599 (obstack_copy, obstack_copy0): Rename the second argument as
19600 `address' for consistency. Qualify it `const'.
19601 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
19602 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
19603 `const' their input argument (`data' or `address').
19604 Adjust the corresponding macros to include `const' in casts.
19605
095a3fb5
AD
196062000-11-03 Akim Demaille <akim@epita.fr>
19607
19608 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
19609 s/PFILE1/BISON_HAIRY/.
19610 Adjust dependencies.
19611
d1cdce7c
AD
196122000-11-03 Akim Demaille <akim@epita.fr>
19613
090c5ebf 19614 For some reason, this was not applied.
d1cdce7c
AD
19615
19616 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
19617 `unlink': it's no longer used.
19618
9311529b
AD
196192000-11-03 Akim Demaille <akim@epita.fr>
19620
19621 * src/files.c (skeleton_find): New function, eved out of...
19622 (open_files, open_extra_files): here.
19623
d8880f69
AD
196242000-11-03 Akim Demaille <akim@epita.fr>
19625
19626 Don't use `atexit'.
19627
19628 * src/files.c (obstack_save): New function.
19629 (done): Rename as...
19630 (output_files): this.
19631 Use `obstack_save'.
19632 * src/main.c (main): Don't use `atexit' to register `done', since
19633 it no longer has to remove tmp files, just call `output_files'
19634 when there are no errors.
19635
0dbb648e
AD
196362000-11-02 Akim Demaille <akim@epita.fr>
19637
19638 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
19639 `unlink': it's no longer used.
19640 * src/files.h: Formatting changes.
19641
896fe5c1
AD
196422000-11-02 Akim Demaille <akim@epita.fr>
19643
19644 Remove the last uses of mktemp and unlink/delete.
19645
19646 * src/files.c (fdefines, ftable): Removed.
19647 (defines_ostack, table_obstack): New.
19648 Adjust dependencies of the former into uses of the latter.
19649 * src/output.c (output_short_or_char_table, output_short_table):
19650 Convert to using obstacks.
19651 * src/reader.c (copy_comment2): Accept one FILE * and two
19652 obstacks.
19653 (output_token_defines, reader_output_yylsp): Use obstacks.
19654 * src/system.h (obstack_fgrow3): New.
1f65350a 19655 * po/POTFILES.in: Adjust.
896fe5c1 19656
dd60faec
AD
196572000-11-01 Akim Demaille <akim@epita.fr>
19658
19659 Change each use of `fattrs' into a use of `attrs_obstack'.
19660
19661 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
19662 * src/files.c (fattrs): Remove.
19663 (attrs_obstack): New.
19664 Adjust all dependencies.
19665 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
19666
8c7ebe49
AD
196672000-11-01 Akim Demaille <akim@epita.fr>
19668
19669 Introduce obstacks.
19670 Change each use of `faction' into a use of `action_obstack'.
19671
19672 * lib/obstack.h, lib/obstack.c: New files.
19673 * src/files.c (faction): Remove.
19674 (action_obstack): New.
19675 Adjust all dependencies.
19676
77aee789
AD
196772000-10-20 Akim Demaille <akim@epita.fr>
19678
19679 * lib/quote.h (PARAMS): New macro. Use it.
19680
43591cec
AD
196812000-10-16 Akim Demaille <akim@epita.fr>
19682
19683 * src/output.c (output_short_or_char_table): New function.
19684 (output_short_table, output_token_translations): Use it.
19685 (goto_actions): Use output_short_table.
19686
1e9798d5
AD
196872000-10-16 Akim Demaille <akim@epita.fr>
19688
19689 * src/symtab.c (bucket_new): New function.
19690 (getsym): Use it.
19691
19692 * src/output.c (output_short_table): New argument to display the
19693 comment associated with the table.
19694 Adjust dependencies.
19695 (output_gram): Use it.
19696 (output_rule_data): Nicer output layout for YYTNAME.
19697
f282676b
AD
196982000-10-16 Akim Demaille <akim@epita.fr>
19699
19700 * src/lex.c (read_typename): New function.
19701 (lex): Use it.
19702 * src/reader.c (copy_dollar): Likewise.
19703
550a72a3
AD
197042000-10-16 Akim Demaille <akim@epita.fr>
19705
19706 * src/reader.c (copy_comment2): Expect the input stream to be on
19707 the `/' which is suspected to open a comment, instead of being
19708 called after `//' or `/*' was read.
19709 (copy_comment, copy_definition, parse_union_decl, copy_action)
19710 (copy_guard): Adjust.
19711
131e2fef
AD
197122000-10-16 Akim Demaille <akim@epita.fr>
19713
19714 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
19715 `read_signed_integer'.
19716
79282c5a
AD
197172000-10-16 Akim Demaille <akim@epita.fr>
19718
19719 * src/reader.c (copy_dollar): New function.
19720 (copy_guard, copy_action): Use it.
19721
ff4a34be
AD
197222000-10-16 Akim Demaille <akim@epita.fr>
19723
19724 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
19725 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
19726 New files, from Fileutils 4.0.27.
19727 * src/main.c (printable_version): Remove.
19728 * src/lex.c, src/reader.c: Use `quote'.
19729
197302000-10-04 Akim Demaille <akim@epita.fr>
19731
19732 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
19733
14ded682
AD
197342000-10-04 Akim Demaille <akim@epita.fr>
19735
19736 * doc/bison.texinfo: Various typos spotted by Neil Booth.
19737
8e03724b
AD
197382000-10-04 Akim Demaille <akim@epita.fr>
19739
19740 When a literal string is used to define two different tokens,
19741 `bison -v' segfaults.
19742 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
19743
19744 * tests/regression.m4: New file.
19745 Include the core of the sample provided by Piotr Gackiewicz.
19746 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
19747 properly.
19748
a9e64249
AD
197492000-10-04 Akim Demaille <akim@epita.fr>
19750
19751 * src/reader.c (parse_expect_decl): Keep `count' within the size
19752 of `buffer'.
19753 From Neil Booth.
19754
da9abf43
AD
197552000-10-02 Paul Eggert <eggert@twinsun.com>
19756
19757 * bison.s1 (yyparse): Assign the default value
19758 unconditionally, to avoid a GCC warning and make the parser a
19759 tad smaller.
19760
c33638bb
AD
197612000-10-02 Akim Demaille <akim@epita.fr>
19762
19763 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
19764 options.
19765
444c570a
AD
197662000-10-02 Akim Demaille <akim@epita.fr>
19767
19768 * src/derives.c, src/print.c, src/reduce.c: To ease the
19769 translation, move some `\n' out of the translated strings.
19770
89cab50d
AD
197712000-10-02 Akim Demaille <akim@epita.fr>
19772
19773 The location tracking mechanism is precious for parse error
19774 messages. Nevertheless, it is enabled only when `@n' is used in
19775 the grammar, which is a different issue (you can use it in error
19776 message, but not in the grammar per se). Therefore, there should
19777 be another means to enable it.
19778
19779 * src/getargs.c (getargs): Support `--locations'.
19780 (usage): Report it.
19781 * src/getargs.h (locationsflag): Export it.
19782 * src/lex.c (percent_table): Support `%locations'.
19783 * src/reader.c (yylsp_needed): Remove this variable, now replaced
19784 with `locationsflag'.
19785 * doc/bison.texinfo: Document `--locations' and `%locations'.
19786 Sort the options.
19787 * tests/calc.m4: Test it.
19788
19789 For regularity of the names, replace each
19790 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
19791 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
19792 In addition replace each `flag' with `_flag'.
19793
d6c2cba0
AD
197942000-10-02 Akim Demaille <akim@epita.fr>
19795
19796 Also test parse error messages, including with YYERROR_VERBOSE.
19797
19798 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
19799 associative).
19800 Use it to check the computations.
19801 Use it to check `nonassoc' is honored.
19802 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
19803 `--yyerror-verbose'.
19804 (_AT_CHECK_CALC): Adjust to this option.
19805 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
19806
5a35a6cb
AD
198072000-10-02 Akim Demaille <akim@epita.fr>
19808
19809 Test also `--verbose', `--defines' and `--name-prefix'. Testing
19810 the latter demonstrates a flaw in the handling of non debugging
19811 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
19812 was used in order to simplify:
19813
19814 #if YYDEBUG
19815 if (yydebug)
19816 {
19817 ...
19818 }
19819 #endif
19820
19821 into
19822
19823 if (yydebug)
19824 {
19825 ...
19826 }
19827
19828 unfortunately this leads to a CPP conflict when
19829 `--name-prefix=foo' is used since it produces `#define yydebug
19830 foodebug'.
19831
19832 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
19833 (YYDPRINTF): New macro.
19834 Spread its use.
19835 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
19836 the bison options.
19837 Also test `--verbose', `--defines' and `--name-prefix'.
19838
71da9eea
AD
198392000-10-02 Akim Demaille <akim@epita.fr>
19840
19841 Improve the readability of the produced parsers.
19842
19843 * src/bison.s1: Formatting changes.
19844 Improve the comment related to the `$' mark.
19845 (yydefault): Don't fall through to `yyresume': `goto' there.
19846 * src/output.c (output_parser): When the `$' is met, skip the end
19847 of its line.
19848 New variable, `number_of_dollar_signs', to check there's exactly
19849 one `$' in the parser skeleton.
19850
95e36146
AD
198512000-10-02 Akim Demaille <akim@epita.fr>
19852
19853 * lib/xstrdup.c: New file, from the fileutils.
19854 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
19855 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
19856 instead of strlen + xmalloc + strcpy.
19857 * src/symtab.c (copys): Remove, use xstrdup instead.
19858
d7020c20
AD
198592000-10-02 Akim Demaille <akim@epita.fr>
19860
19861 * src/gram.h (associativity): New enum type which replaces the
19862 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
19863 `right_assoc', `left_assoc' and `non_assoc'.
19864 Adjust all dependencies.
19865 * src/reader.c: Formatting changes.
19866 (LTYPESTR): Don't define it, use it as a literal in
19867 `reader_output_yylsp'.
19868 * src/symtab.h (symbol_class): New enum type which replaces the
19869 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
19870 `sunknown', `stoken and `snterm'.
19871
1916f98e
AD
198722000-10-02 Akim Demaille <akim@epita.fr>
19873
19874 * src/getargs.c (fixed_outfiles): Rename as...
19875 (yaccflag): for consistency and accuracy.
19876 Adjust dependencies.
19877
d7913476
AD
198782000-10-02 Akim Demaille <akim@epita.fr>
19879
19880 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
19881 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
19882 difficult and introduced a lot of core dump. It turns out that
19883 Bison used an implementation of `xmalloc' based on `calloc', and
19884 at various places it does depend upon the initialization to 0. I
19885 have not tried to isolate the pertinent places, and all the former
19886 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
19887 someone should address this issue.
19888
19889 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
19890 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
19891 files.
19892 Adjust dependencies.
19893 * src/warshall.h: New file.
19894 Propagate.
19895
340ef489
AD
198962000-10-02 Akim Demaille <akim@epita.fr>
19897
19898 Various anti-`extern in *.c' changes.
19899
19900 * src/system.h: Include `assert.h'.
19901
b2ca4022
AD
199022000-10-02 Akim Demaille <akim@epita.fr>
19903
19904 * src/state.h (nstates, final_state, first_state, first_shift)
19905 (first_reduction): Move their exportation from here...
19906 * src/LR0.h: to here.
19907 Adjust dependencies.
19908 * src/getargs.c (statisticsflag): New variable.
19909 Add support for `--statistics'.
19910 Adjust dependencies.
19911
19912 Remove a lot of now useless `extern' statements in most files.
19913
403b315b
AD
199142000-10-02 Akim Demaille <akim@epita.fr>
19915
19916 * src/LR0.h: New file.
19917 Propagate its use.
19918
07a58c13
AD
199192000-10-02 Akim Demaille <akim@epita.fr>
19920
19921 * src/print.h: New file.
19922 Propagate its use.
19923 * src/print.c: Formatting and ordering changes.
19924 (verbose, terse): Replace with...
19925 (print_results): this new function.
19926 Adjust dependencies.
19927
0619caf0
AD
199282000-10-02 Akim Demaille <akim@epita.fr>
19929
19930 * src/conflicts.c (conflict_report): New function.
19931 (conflict_log, verbose_conflict_log): Replace with...
19932 (print_conflicts): this function.
19933 Adjust dependencies.
19934 * src/conflicts.h: New file.
19935 Propagate its inclusion.
19936
3519ec76
AD
199372000-10-02 Akim Demaille <akim@epita.fr>
19938
19939 * src/nullable.h: New file.
19940 Propagate its inclusion.
19941 * src/nullable.c: Formatting changes.
19942
015acc48
AD
199432000-10-02 Akim Demaille <akim@epita.fr>
19944
19945 * src/reduce.h: New file.
19946 Propagate its inclusion.
19947 * src/reduce.c: Topological sort and other formatting changes.
19948 (bool, TRUE, FALSE): Move their definition to...
19949 * src/system.h: here.
19950
8963a27b
AD
199512000-10-02 Akim Demaille <akim@epita.fr>
19952
19953 * src/files.c: Formatting changes.
19954 (tryopen, tryclose, openfiles): Rename as...
19955 (xfopen, xfclose, open_files): this.
19956 (stringappend): static.
19957 * src/files.h: Complete the list of exported symbols.
19958 Propagate its use.
19959
a70083a3
AD
199602000-10-02 Akim Demaille <akim@epita.fr>
19961
19962 * src/reader.h: New file.
19963 Propagate its use instead of tedious list of `extern' and
19964 prototypes.
19965 * src/reader.c: Formatting changes, topological sort,
19966 s/register//.
19967
abadc117
AD
199682000-10-02 Akim Demaille <akim@epita.fr>
19969
19970 * src/lex.h: Prototype `lex.c' exported functions.
19971 * src/reader.c: Adjust.
19972 * src/lex.c: Formatting changes.
19973 (safegetc): Rename as...
19974 (xgetc): this.
19975
720d742f
AD
199762000-10-02 Akim Demaille <akim@epita.fr>
19977
19978 * src/lalr.h: New file.
19979 Propagate its inclusion instead of prototypes and `extern'.
19980 * src/lalr.c: Formatting changes, topological sorting etc.
19981
f2acea59
AD
199822000-10-02 Akim Demaille <akim@epita.fr>
19983
19984 * src/output.c (token_actions): Introduce a temporary array,
19985 YYDEFACT, that makes it possible for this function to use
19986 output_short_table.
19987
d019d655
AD
199882000-10-02 Akim Demaille <akim@epita.fr>
19989
19990 `user_toknums' is output as a `short[]' in `output.c', while it is
19991 defined as a `int[]' in `reader.c'. For consistency with the
19992 other output tables, `user_toknums' is now defined as a table of
19993 shorts.
19994
19995 * src/reader.c (user_toknums): Be a short table instead of an int
19996 table.
19997 Adjust dependencies.
19998
19999 Factor the short table outputs.
20000
20001 * src/output.c (output_short_table): New function.
20002 * src/output.c (output_gram, output_stos, output_rule_data)
20003 (output_base, output_table, output_check): Use it.
20004
6c89f1c1
AD
200052000-10-02 Akim Demaille <akim@epita.fr>
20006
20007 * src/output.c (output): Topological sort of the functions, in
20008 order to get rid of the `static' prototypes.
20009 No longer use `register'.
20010 * src/output.h: New file.
20011 Propagate its inclusion in files explicitly prototyping functions
20012 from output.c.
20013
d9efd181
AD
200142000-09-21 Akim Demaille <akim@epita.fr>
20015
20016 * src/atgeneral.m4: Update from Autoconf.
20017
c29240e7 200182000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
20019
20020 * src/closure.h: New file.
20021 * src/closure.c: Formatting changes, topological sort over the
20022 functions, use of closure.h.
20023 (initialize_closure, finalize_closure): Rename as...
20024 (new_closure, free_closure): these. Adjust dependencies.
20025 * src/LR0.c: Formatting changes, topological sort, use of
20026 cloture.h.
20027 (initialize_states): Rename as...
20028 (new_states): this.
20029 * src/Makefile.am (noinst_HEADERS): Adjust.
20030
499daa50
AD
200312000-09-20 Akim Demaille <akim@epita.fr>
20032
20033 * src/acconfig.h: Don't protect config.h against multiple
20034 inclusion.
20035 Don't define PARAMS.
20036 * src/system.h: Define PARAMS.
20037 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
20038 purpose of config.h. system.h must not try to fix wrong
20039 definitions in config.h.
20040
cc84fd5d
AD
200412000-09-20 Akim Demaille <akim@epita.fr>
20042
20043 * src/derives.h: New file.
20044 * src/main.c, src/derives.h: Use it.
20045 Formatting changes.
20046 * src/Makefile.am (noinst_HEADERS): Adjust.
20047
db5b3a89
AD
200482000-09-20 Akim Demaille <akim@epita.fr>
20049
20050 * tests/atgeneral.m4: Update from Autoconf.
20051 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
20052 (AT_CHECK_CALC): New macros.
20053 Use these macros to test bison with options `', `--raw',
20054 `--debug', `--yacc', `--yacc --debug'.
20055
ceed8467
AD
200562000-09-19 Akim Demaille <akim@epita.fr>
20057
20058 * src/output.c: Formatting changes.
20059 * src/machine.h: Remove, leaving its contents in...
20060 * src/system.h: here.
20061 Include stdio.h.
20062 Adjust all dependencies on stdio.h and machine.h.
20063 * src/getargs.h: New file.
20064 Let all `extern' declarations about getargs.c be replaced with
20065 inclusion of `getargs.h'.
20066 * src/Makefile.am (noinst_HEADERS): Adjust.
20067
20068 * tests/calc.m4 (yyin): Be initialized in main, not on the global
20069 scope.
20070 (yyerror): Returns void, not int.
20071 * doc/bison.texinfo: Formatting changes.
20072
05a1d24b
AD
200732000-09-19 Akim Demaille <akim@epita.fr>
20074
20075 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
20076 portable.
20077
cbd25751
AD
200782000-09-18 Akim Demaille <akim@epita.fr>
20079
20080 * configure.in: Append WARNING_CFLAGS to CFLAGS.
20081 * src/Makefile.am (INCLUDES): Don't.
20082 Be ready to fetch headers in lib/.
20083
13863333
AD
200842000-09-18 Akim Demaille <akim@epita.fr>
20085
20086 * doc/bison.texinfo: Update the copyright.
20087 ANSIfy and GNUify the examples.
20088 Remove the old menu.
20089
0d533154
AD
200902000-09-18 Akim Demaille <akim@epita.fr>
20091
20092 First set of tests: use the `calc' example from the documentation.
20093
20094 * src/bison.s1 (yyparse): Condition the code using `yytname' which
20095 is defined only when YYDEBUG is.
20096 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
20097 * src/files.c (tryopen, tryclose): Formatting changes.
20098 Move to the top and be static.
20099 * src/reader.c (read_signed_integer): Likewise.
20100 * tests/calc.m4: New file.
20101 * Makefile.am, suite.m4: Adjust.
20102 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
20103
e79137ac
AD
201042000-09-18 Akim Demaille <akim@epita.fr>
20105
20106 Add support for an Autotest test suite for Bison.
20107
20108 * m4/m4.m4, m4/atconfig.m4: New files.
20109 * m4/Makefile.am (EXTRA_DIST): Adjust.
20110 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
20111 files.
20112 * src/getargs.c: Display a more standard --version message.
20113 * src/reader.c (reader): Formatting changes.
20114 No longer depend upon VERSION_STRING.
20115 * configure.in: No longer use `dnl'.
20116 Set up the test suite and the new directory `tests/.
20117 (VERSION_STRING): Remove.
20118
27821bff
AD
201192000-04-14 Akim Demaille <akim@epita.fr>
20120
20121 * src/reader.c (copy_comment2): New function, same as former
20122 `copy_comment', but outputs into two FILE *.
20123 (copy_comment): Use it.
20124 (parse_union_decl): Use it.
20125 (get_type, parse_start_decl): Use the same `invalid' message.
20126 (parse_start_decl, parse_union_decl): Use the same `multiple'
20127 message.
20128 (parse_union_decl, copy_guard, copy_action): Use the same
20129 `unmatched' message.
20130 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
20131
cfe5fbc0
AD
201322000-03-31 Akim Demaille <akim@epita.fr>
20133
20134 * src/files.c (tryopen, tryclose): Move to the top.
20135 Be static.
20136
cb7db13e
AD
201372000-03-31 Akim Demaille <akim@epita.fr>
20138
20139 * src/main.c (main): Don't call `done', exit does it.
20140
a0f6b076
AD
201412000-03-31 Akim Demaille <akim@epita.fr>
20142
36281465
AD
20143 * allocate.c: s/return (foo)/return foo/.
20144 * lalr.c: Likewise.
20145 * LR0.c: Likewise.
20146 * output.c: Likewise.
20147 * reader.c: Likewise.
20148 * symtab.c: Likewise.
20149 * vmsgetargs.c: Likewise.
20150
201512000-03-31 Akim Demaille <akim@epita.fr>
20152
20153 Clean up the error reporting functions.
a0f6b076
AD
20154
20155 * src/report.c: New file.
20156 * src/report.h: Likewise.
20157 * src/Makefile.am: Adjust.
20158 * m4/error.m4: New file.
20159 * m4/Makefile.am: Adjust.
20160 * configure.in (jm_PREREQ_ERROR): Call it.
20161 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
20162 Remove.
20163 (fatal, fatals): Remove. All callers use complain.c::fatal.
20164 (warn, warni, warns, warnss, warnss): Remove. All callers use
20165 complain.c::complain.
20166 (toomany): Remove, use fatal instead.
20167 * src/files.c (done): No argument, use complain_message_count.
20168 * src/main.c (main): Register `done' to `atexit'.
20169
20170 * src/getargs.c (usage): More `fputs', less `fprintf'.
20171
18539825
AD
201722000-03-28 Akim Demaille <akim@epita.fr>
20173
20174 * lib/: New directory.
20175 * Makefile.am (SUBDIRS): Adjust.
20176 * configure.in: Adjust.
20177 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
20178 useless.
20179 * src/alloca.c: Moved to lib/.
20180 * src/getopt.c: Likewise.
20181 * src/getopt1.c: Likewise.
20182 * src/getopt.h: Likewise.
20183 * src/ansi2knr.c: Likewise.
20184 * src/ansi2knr.1: Likewise.
20185 * src/Makefile.am: Adjust.
20186 * lib/Makefile.am: New file.
20187
9f306f2a
AD
201882000-03-28 Akim Demaille <akim@epita.fr>
20189
20190 * src/getargs.c (usage): Refresh the help message.
20191
0ba347b6
AD
201922000-03-17 Akim Demaille <akim@epita.fr>
20193
20194 * src/getopt1.c: Updated from textutils 2.0e
20195 * src/getopt.c: Likewise.
20196 * src/getopt.h: Likewise.
20197
dbe7f271
AD
201982000-03-17 Akim Demaille <akim@epita.fr>
20199
20200 * src/Makefile.am (bison.simple): Fix the awk program: quote only
20201 the file name, not the whole `#line LINE FILE'.
20202
75bbe78d
AD
202032000-03-17 Akim Demaille <akim@epita.fr>
20204
20205 On syntax errors, report the token on which we choked.
20206
aa5fd0ee
AD
20207 * src/bison.s1 (yyparse): In the label yyerrlab, when
20208 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 20209
7b306f52
AD
202102000-03-17 Akim Demaille <akim@epita.fr>
20211
aa5fd0ee 20212 * src/reader.c (copy_at): New function.
7b306f52
AD
20213 (copy_guard): Use it.
20214 (copy_action): Use it.
20215
e87b5700
AD
202162000-03-17 Akim Demaille <akim@epita.fr>
20217
20218 Be kind to translators, save some useless translations.
20219
aa5fd0ee 20220 * src/main.c (banner): New function.
e87b5700
AD
20221 (fatal_banner): Use it.
20222 (warn_banner): Use it.
20223
ae3c3164
AD
202242000-03-17 Akim Demaille <akim@epita.fr>
20225
aa5fd0ee
AD
20226 * src/reader.c (copy_definition): Use copy_string and
20227 copy_comment. Removed now unused `match', `ended',
20228 `cplus_comment'.
ae3c3164
AD
20229 (copy_comment, copy_string): Moved, to be visible from
20230 copy_definition.
20231
4dc58e7c
AD
202322000-03-17 Akim Demaille <akim@epita.fr>
20233
aa5fd0ee
AD
20234 * src/reader.c (copy_string): Declare `static inline'. No
20235 problems with inline, since it is checked by configure.
4dc58e7c
AD
20236 (copy_comment): Likewise.
20237
0a6384c4
AD
202382000-03-17 Akim Demaille <akim@epita.fr>
20239
aa5fd0ee 20240 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 20241
3cef001a
AD
202422000-03-17 Akim Demaille <akim@epita.fr>
20243
aa5fd0ee 20244 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
20245 (copy_action): Use it. Removed now unused `match', `ended',
20246 `cplus_comment'.
20247 (copy_guard): Likewise.
20248
ca36d2ef
AD
202492000-03-17 Akim Demaille <akim@epita.fr>
20250
aa5fd0ee 20251 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
20252 (copy_action): Use it.
20253 (copy_guard): Likewise.
20254
6666f98f
AD
202552000-03-17 Akim Demaille <akim@epita.fr>
20256
20257 Change the handling of @s so that they behave exactly like $s.
20258 There is now a pseudo variable @$ (readble and writable), location
20259 of the lhs of the rule (by default ranging from the location of
20260 the first symbol of the rhs, to the location of the last symbol,
20261 or, if the rhs is empty, YYLLOC).
20262
20263 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
20264 yyval.
20265 (yyparse): When providing a default semantic action, provide a
20266 default location action.
20267 (after the $): No longer change `*YYLSP', just stack YYLOC the
20268 same way you stack YYVAL.
20269 * src/reader.c (read_declarations): Use warns.
20270 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
20271 (copy_action, case '@'): Likewise.
20272 Use a standard error message, to save useless work from
20273 translators.
20274
41aca2e0
AD
202752000-03-17 Akim Demaille <akim@epita.fr>
20276
aa5fd0ee
AD
20277 * src/bison.s1: Formatting and cosmetics changes.
20278 * src/reader.c: Likewise.
41aca2e0
AD
20279 Update the Copyright notice.
20280
dc08c1d5
AD
202812000-03-17 Akim Demaille <akim@epita.fr>
20282
aa5fd0ee
AD
20283 * src/bison.s1 (#line): All set to `#line' only, since the
20284 Makefile now handles them.
dc08c1d5 20285
9ee3c97b
AD
202862000-03-16 Akim Demaille <akim@epita.fr>
20287
20288 * src/output.c (output_rule_data): Output the documentation of
20289 some of the tables.
20290 (Copyright notice): Update.
20291 Formatting changes.
20292
0de741ca
AD
202932000-03-16 Akim Demaille <akim@epita.fr>
20294
20295 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
20296 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
20297 One `#if YYDEBUG' remains, since it uses variables which are
20298 defined only if `YYDEBUG != 0'.
20299
bb10be54
AD
203002000-03-16 Akim Demaille <akim@epita.fr>
20301
20302 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
20303 and related variables so that the similarities are highlighted.
20304
b07b484a
AD
203052000-03-16 Akim Demaille <akim@epita.fr>
20306
20307 * src/bison.s1: Properly indent CPP directives.
20308
361f60b3
AD
203092000-03-16 Akim Demaille <akim@epita.fr>
20310
20311 * src/bison.s1: Properly indent the `alloca' CPP section.
20312
8c44d3ec
AD
203132000-03-16 Akim Demaille <akim@epita.fr>
20314
20315 Do not hard code values of directories in `configure.in'.
20316 Update the `configure' tool chain.
20317
20318 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
20319 src/makefile.am.
20320 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
20321 (AC_OUTPUT): Add m4/Makefile.
20322 Bump to bison 1.28a, 1.29 has never been released.
20323 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
20324 handled via src/Makefile.am.
20325 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
20326 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
20327 autoheader.
20328 * Makefile.am (SUBDIRS): Add m4.
20329 (ACLOCAL_AM_FLAGS): New variable.
20330 (AUTOMAKE_OPTIONS): Add check-news.
20331 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
20332 the proper line number and file name.
20333 (DEFS): Propagate the location of bison library files and of the
20334 locale files.
20335 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
20336 builddir.
20337 * acinclude.m4: Remove, replaced by the directory m4.
20338 * m4/Makefile.am (EXTRA_DIST): New variable.
20339 * m4/gettext.m4: New file, from the fileutils.
20340 * m4/lcmessage.m4: Likewise
20341 * m4/progtest.m4: Likewise.
20342 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
20343
f95997e7
AD
203442000-03-10 Akim Demaille <akim@epita.fr>
20345
20346 * src/closure.c:
20347 Formatting changes of various comments.
20348 Respect the GNU coding standards at various places.
20349 Don't use `_()' when no translation is needed.
20350
203511999-12-13 Jesse Thilo <jthilo@gnu.org>
20352
20353 * src/files.c:
20354 OS/2 honors TMPDIR environment variable.
20355
203561999-12-13 Jesse Thilo <jthilo@gnu.org>
20357
20358 * doc/bison.texinfo: Tweaked spelling and grammar.
20359 Updated ISBN.
20360 Removed reference to price of printed copy.
20361 Mention BISON_SIMPLE and BISON_HAIRY.
20362
203631999-12-13 Jesse Thilo <jthilo@gnu.org>
20364
20365 * configure.in, NEWS:
20366 Bison 1.29 released.
20367
203681999-10-27 Jesse Thilo <jthilo@gnu.org>
20369
20370 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
20371 Added reference card.
20372
203731999-07-26 Jesse Thilo <jthilo@gnu.org>
20374
20375 * po/ru.po: Added Russian translation.
20376
203771999-07-26 Jesse Thilo <jthilo@gnu.org>
20378
20379 * configure.in: Added Russian translation.
20380
203811999-07-06 Jesse Thilo <jthilo@gnu.org>
20382
20383 * configure.in, NEWS, README:
20384 Released version 1.28.
20385
203861999-06-14 Jesse Thilo <jthilo@gnu.org>
20387
20388 * src/system.h:
20389 Squashed redefinition warning on some systems.
20390
20391 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
20392 Have configure build version string instead of relying on ANSI string
20393 concatentation.
20394
203951999-06-14 Jesse Thilo <jthilo@gnu.org>
20396
20397 * po/POTFILES.in: Got rid of version.c.
20398
203991999-06-14 Jesse Thilo <jthilo@gnu.org>
20400
20401 * acconfig.h, configure.in:
20402 Have configure build version string instead of relying on ANSI string
20403 concatentation.
20404
204051999-06-08 Jesse Thilo <jthilo@gnu.org>
20406
20407 * doc/bison.1:
20408 Dropped mention of `+' for long-named options.
20409
204101999-05-30 Jesse Thilo <jthilo@gnu.org>
20411
20412 * src/files.c: Added <unistd.h> for unlink().
20413
20414 * src/Makefile.am, src/system.h:
20415 I18n fixes.
20416
204171999-05-30 Jesse Thilo <jthilo@gnu.org>
20418
20419 * README: Added a FAQ list.
20420
20421 * configure.in, acconfig.h:
20422 I18n fixes.
20423
204241999-05-30 Jesse Thilo <jthilo@gnu.org>
20425
20426 * doc/FAQ, doc/Makefile.am:
20427 Added a FAQ list.
20428
204291999-05-19 Jesse Thilo <jthilo@gnu.org>
20430
20431 * src/alloc.h, src/symtab.h, src/version.c:
20432 Protected inclusion of "config.h" with HAVE_CONFIG_H.
20433
204341999-04-18 Jesse Thilo <jthilo@gnu.org>
20435
20436 * src/.cvsignore, src/Makefile.am:
20437 Reorganized: sources in `src', documentation in `doc'.
20438
20439 * src/lex.c (literalchar):
20440 fixed the code for escaping double quotes (thanks
20441 Jonathan Czisny.)
20442
204431999-04-18 Jesse Thilo <jthilo@gnu.org>
20444
20445 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
20446 Adjusted paths to reflect directory reorganization.
20447
204481999-04-18 Jesse Thilo <jthilo@gnu.org>
20449
20450 * doc/.cvsignore, doc/Makefile.am:
20451 Reorganized: sources in `src', documentation in `doc'.
20452
204531999-04-18 Jesse Thilo <jthilo@gnu.org>
20454
20455 * configure.in:
20456 Updated AC_INIT file to reflect directory reorganization.
20457
20458 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
20459 Reorganized: sources in `src', documentation in `doc'.
20460
204611999-04-13 Jesse Thilo <jthilo@gnu.org>
20462
20463 * src/allocate.c:
20464 Don't declare calloc() and realloc() if not necessary.
20465
204661999-04-13 Jesse Thilo <jthilo@gnu.org>
20467
20468 * configure.in, acconfig.h, acinclude.m4:
20469 Don't declare calloc() and realloc() if not necessary.
20470
204711999-03-23 Jesse Thilo <jthilo@gnu.org>
20472
20473 * po/.cvsignore: Added i18n support.
20474
204751999-03-23 Jesse Thilo <jthilo@gnu.org>
20476
20477 * acconfig.h, configure.in, Makefile.am:
20478 Added i18n support.
20479
204801999-03-22 Jesse Thilo <jthilo@gnu.org>
20481
20482 * src/bison.s1: Fixed #line numbers.
20483
204841999-03-15 Jesse Thilo <jthilo@gnu.org>
20485
20486 * po/es.po, po/fr.po, po/nl.po, po/de.po:
20487 Added PO files from Translation Project.
20488
204891999-03-03 Jesse Thilo <jthilo@gnu.org>
20490
20491 * Makefile.am:
20492 Added support for non-ANSI compilers (ansi2knr).
20493
204941999-02-16 Jesse Thilo <jthilo@gnu.org>
20495
20496 * configure.in: Bumped version number to 1.27.
20497
20498 * Makefile.am:
20499 Added `bison.simple' to list of files removed by `make distclean'.
20500
205011999-02-12 Jesse Thilo <jthilo@gnu.org>
20502
20503 * src/files.c, src/files.h:
20504 Defined locations of parser files in config.h instead of Makefile.
20505
205061999-02-12 Jesse Thilo <jthilo@gnu.org>
20507
20508 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
20509 Defined locations of parser files in config.h instead of Makefile.
20510
205111999-02-09 Jesse Thilo <jthilo@gnu.org>
20512
20513 * Makefile.am:
20514 Removed inappropriate use of $< macro.
20515
205161999-02-05 Jesse Thilo <jthilo@gnu.org>
20517
20518 * po/Makefile.in.in, po/POTFILES.in:
20519 Add `po' directory skeleton.
20520
205211999-01-27 Jesse Thilo <jthilo@gnu.org>
20522
20523 * README: Document help-bison list.
20524
20525 * configure.in: Add check for mkstemp().
20526
205271999-01-20 Jesse Thilo <jthilo@gnu.org>
20528
20529 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
20530 Hush a few compiler warnings.
20531
20532 * src/files.c:
20533 Add tryclose(), which verifies that fclose was successful.
20534 Hush a couple of compiler warnings.
20535
205361999-01-20 Jesse Thilo <jthilo@gnu.org>
20537
20538 * Makefile.am, OChangeLog:
20539 ChangeLog is now automatically generated. Include the old version as
20540 OChangeLog.
20541
205421999-01-14 Jesse Thilo <jthilo@gnu.org>
20543
20544 * 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:
20545 Update FSF address.
20546
205471999-01-14 Jesse Thilo <jthilo@gnu.org>
20548
20549 * doc/bison.texinfo: Fix formatting glitch.
20550
20551 * doc/bison.texinfo: Update FSF address.
20552
205531999-01-14 Jesse Thilo <jthilo@gnu.org>
20554
20555 * acconfig.h: Update FSF address.
20556
205571999-01-08 Jesse Thilo <jthilo@gnu.org>
20558
20559 * src/system.h:
20560 Don't define PACKAGE here, since config.h defines it.
20561
205621998-12-30 Jesse Thilo <jthilo@gnu.org>
20563
20564 * src/reader.c: Update copyright date.
20565
20566 * src/main.c:
20567 Ditch sprintf to statically-sized buffers in fatal/warn functions in
20568 favor of output directly to stderr (avoids buffer overruns).
20569
20570 * src/reader.c: Some checks for premature EOF.
20571
20572 * 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:
20573 Use prototypes if the compiler understands them.
20574
20575 * src/files.c: Honor TMPDIR on Unix hosts.
20576 Use prototypes if the compiler understands them.
20577
20578 * src/reader.c:
20579 Fix a couple of buffer overrun bugs.
20580 Use prototypes if the compiler understands them.
20581
20582 * src/system.h: Include unistd.h and ctype.h.
20583 Use #ifdef instead of #if for NLS symbols.
20584
205851998-12-30 Jesse Thilo <jthilo@gnu.org>
20586
20587 * doc/bison.texinfo:
20588 Delete comment "consider using @set for edition number, etc..." since
20589 we now are doing so.
20590
205911998-12-30 Jesse Thilo <jthilo@gnu.org>
20592
20593 * configure.in:
20594 Use prototypes if the compiler understands them.
20595
20596 * NEWS: Document 1.26 highlights.
20597
20598 * Makefile.am: Require Automake 1.3 or later.
20599
20600 * acconfig.h:
20601 Use prototypes if the compiler understands them.
20602
206031998-12-29 Jesse Thilo <jthilo@gnu.org>
20604
20605 * src/version.c:
20606 Use VERSION symbol from automake for version number.
20607
206081998-12-29 Jesse Thilo <jthilo@gnu.org>
20609
20610 * acconfig.h, configure.in, version.cin:
20611 Use VERSION symbol from automake for version number.
20612
206131998-11-28 Jesse Thilo <jthilo@gnu.org>
20614
20615 * Makefile.am:
20616 Distribute original version of simple parser (bison.s1), not built
20617 version (bison.simple).
20618
206191998-11-28 Jesse Thilo <jthilo@gnu.org>
20620
20621 * doc/bison.texinfo: Add info dir entry.
20622
20623 * doc/bison.texinfo:
20624 Let automake put version number into documentation.
20625
206261998-11-26 Jesse Thilo <jthilo@gnu.org>
20627
20628 * src/bison.cld, src/build.com, src/vmshlp.mar:
20629 Add non-RCS files from /gd/gnu/bison.
20630
206311998-11-26 Jesse Thilo <jthilo@gnu.org>
20632
20633 * doc/bison.1:
20634 Document the BISON_HAIRY and BISON_SIMPLE variables.
20635
206361998-11-25 Jesse Thilo <jthilo@gnu.org>
20637
20638 * src/version.c: Build version.c automatically.
20639
20640 * src/reader.c:
20641 Fix token numbering (used to start at 258, not 257).
20642
20643 * src/system.h: Include config.h.
20644
20645 * src/getargs.c: Update bug report address.
20646
20647 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
20648 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
20649
206501998-11-25 Jesse Thilo <jthilo@gnu.org>
20651
20652 * Makefile.am:
20653 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
20654
20655 * configure.in, version.cin:
20656 Build version.c automatically.
20657
20658 * AUTHORS: Add AUTHORS file.
20659
20660 * README: Update bug report address.
20661
20662 * bison.simple:
20663 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
20664
20665 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
20666 Add automake stuff.
20667
206681998-11-25 Jesse Thilo <jthilo@gnu.org>
20669
20670 * doc/bison.texinfo: Clean up some formatting.
20671
206721998-05-05 Richard Stallman <rms@gnu.org>
20673
20674 * doc/bison.texinfo:
20675 Explain better why to make a pure parser.
20676
206771998-01-05 Richard Stallman <rms@gnu.org>
20678
20679 * src/files.c (openfiles):
20680 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
20681 find a temporary directory, if possible. Do not unlink files while
20682 they are open.
20683
206841997-08-25 Richard Stallman <rms@gnu.org>
20685
20686 * src/reader.c (stack_offset;):
20687 Change some warni to warns.
20688
20689 * src/lex.c (literalchar): Use warns, not warni.
20690
206911997-06-28 Richard Stallman <rms@gnu.org>
20692
20693 * src/bison.s1: Add a Bison version comment.
20694
20695 * src/main.c (fatal, warn, berror):
20696 Use program_name.
20697
206981997-06-28 Richard Stallman <rms@gnu.org>
20699
20700 * Makefile.in (bison_version): New variable.
20701 (dist): Use that variable.
20702 (bison.s1): Substitute the Bison version into bison.simple.
20703
20704 * bison.simple: Add a Bison version comment.
20705
207061997-06-18 Richard Stallman <rms@gnu.org>
20707
20708 * src/main.c (fatal, warn, berror):
20709 Make error messages standard.
20710 (toomany): Improve error message text.
20711
20712 * 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:
20713 new.h renamed to alloc.h.
20714
207151997-06-18 Richard Stallman <rms@gnu.org>
20716
20717 * Makefile.in: new.h renamed to alloc.h.
20718
207191997-05-24 Richard Stallman <rms@gnu.org>
20720
20721 * src/lex.c (literalchar):
20722 Fix the code for escaping \, " and '.
20723
20724 (lex): Avoid trouble when there are many chars
20725 to discard in a char literal with just several chars in it.
20726
207271997-05-17 Richard Stallman <rms@gnu.org>
20728
20729 * src/bison.s1:
20730 Use malloc, if using alloca is troublesome.
20731 (YYSTACK_USE_ALLOCA): New flag macro.
20732 Define it for some systems and compilers.
20733 (YYSTACK_ALLOC): New macro.
20734 (yyparse): Use YYSTACK_ALLOC to allocate stack.
20735 If it was malloc'd, free it.
20736
207371997-05-17 Richard Stallman <rms@gnu.org>
20738
20739 * bison.simple:
20740 Use malloc, if using alloca is troublesome.
20741 (YYSTACK_USE_ALLOCA): New flag macro.
20742 Define it for some systems and compilers.
20743 (YYSTACK_ALLOC): New macro.
20744 (yyparse): Use YYSTACK_ALLOC to allocate stack.
20745 If it was malloc'd, free it.
20746
207471997-04-23 Richard Stallman <rms@gnu.org>
20748
20749 * src/bison.s1:
20750 (alloca) [__hpux]: Always define as __builtin_alloca.
20751
207521997-04-23 Richard Stallman <rms@gnu.org>
20753
20754 * bison.simple:
20755 (alloca) [__hpux]: Always define as __builtin_alloca.
20756
207571997-04-22 Richard Stallman <rms@gnu.org>
20758
20759 * src/bison.s1:
20760 [__hpux]: Include alloca.h (right for HPUX 10)
20761 instead of declaring alloca (right for HPUX 9).
20762
20763 * src/bison.s1 (__yy_memcpy):
20764 Declare arg `count' as unsigned int.
20765 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
20766
207671997-04-22 Richard Stallman <rms@gnu.org>
20768
20769 * bison.simple:
20770 [__hpux]: Include alloca.h (right for HPUX 10)
20771 instead of declaring alloca (right for HPUX 9).
20772
20773 * bison.simple (__yy_memcpy):
20774 Declare arg `count' as unsigned int.
20775 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
20776
207771997-01-03 Richard Stallman <rms@gnu.org>
20778
20779 * src/allocate.c: [__STDC__ or _MSC_VER]:
20780 Declare calloc and realloc to return void *.
20781
207821997-01-02 Richard Stallman <rms@gnu.org>
20783
20784 * src/system.h:
20785 [_MSC_VER]: Include stdlib.h and process.h.
20786 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
20787
20788 * src/main.c (main): Return FAILURE as a value.
20789 (printable_version): Declare arg as int, not char.
20790
207911997-01-02 Richard Stallman <rms@gnu.org>
20792
20793 * Makefile.in (dist):
20794 Explicitly check for symlinks, and copy them.
20795
207961996-12-19 Richard Stallman <rms@gnu.org>
20797
20798 * src/files.c:
20799 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
20800
208011996-12-18 Paul Eggert <eggert@gnu.org>
20802
20803 * src/bison.s1 (yyparse):
20804 If __GNUC__ and YYPARSE_PARAM are both defined,
20805 declare yyparse to have a void * argument.
20806
208071996-12-18 Paul Eggert <eggert@gnu.org>
20808
20809 * bison.simple (yyparse):
20810 If __GNUC__ and YYPARSE_PARAM are both defined,
20811 declare yyparse to have a void * argument.
20812
208131996-12-17 Richard Stallman <rms@gnu.org>
20814
20815 * src/reduce.c (nbits): Add some casts.
20816
208171996-08-12 Richard Stallman <rms@gnu.org>
20818
20819 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
20820
208211996-08-12 Richard Stallman <rms@gnu.org>
20822
20823 * bison.simple: Test _MSDOS as well as _MSDOS_.
20824
208251996-07-31 Richard Stallman <rms@gnu.org>
20826
20827 * src/bison.s1:
20828 [__sun && __i386]: Include alloca.h.
20829
208301996-07-31 Richard Stallman <rms@gnu.org>
20831
20832 * bison.simple:
20833 [__sun && __i386]: Include alloca.h.
20834
208351996-07-30 Richard Stallman <rms@gnu.org>
20836
20837 * src/bison.s1: Comment change.
20838
20839 * src/bison.s1: Test _MSDOS_, not MSDOS.
20840
208411996-07-30 Richard Stallman <rms@gnu.org>
20842
20843 * bison.simple: Comment change.
20844
20845 * bison.simple: Test _MSDOS_, not MSDOS.
20846
208471996-06-01 Richard Stallman <rms@gnu.org>
20848
20849 * 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:
20850 Insert `_' macro around many string constants.
20851
20852 * src/main.c:
20853 Insert `_' macro around many string constants.
20854
20855 (main): Call setlocale, bindtextdomain and textdomain.
20856
20857 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
20858 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
20859 [ENABLE_NLS]: Include libintl.h.
20860 [ENABLE_NLS] (gettext): Define.
20861 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
20862 (N_, PACKAGE, LOCALEDIR): New macros.
20863
208641996-06-01 Richard Stallman <rms@gnu.org>
20865
20866 * POTFILES.in: New file.
20867
20868 * Makefile.in (allocate.o):
20869 Define target explicitly.
20870
20871 * Makefile.in (CFLAGS): Set to @CFLAGS@.
20872 (LDFLAGS): Set to @LDFLAGS@.
20873 (configure): Run autoconf only if preceding `cd' succeeds.
20874 (bison.s1): Redirect output to temporary file then move the
20875 temporary to the target, rather than redirecting directly to bison.s1.
20876 (clean): Remove config.status and config.log.
20877 (distclean): Don't remove config.status here.
20878
208791996-05-12 Richard Stallman <rms@gnu.org>
20880
20881 * src/bison.s1:
20882 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20883
208841996-05-12 Richard Stallman <rms@gnu.org>
20885
20886 * bison.simple:
20887 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20888
208891996-05-11 Richard Stallman <rms@gnu.org>
20890
20891 * src/bison.s1 (__yy_memcpy):
20892 Really reorder the args, as was supposedly done on Feb 14 1995.
20893 (yyparse): Calls changed accordingly.
20894
208951996-05-11 Richard Stallman <rms@gnu.org>
20896
20897 * Makefile.in (dist): Don't use $(srcdir).
20898
20899 * bison.simple (__yy_memcpy):
20900 Really reorder the args, as was supposedly done on Feb 14 1995.
20901 (yyparse): Calls changed accordingly.
20902
209031996-01-27 Richard Stallman <rms@gnu.org>
20904
20905 * src/output.c (output_rule_data):
20906 Test YYERROR_VERBOSE in the conditional
20907 around the definition of ttyname.
20908
209091995-12-29 Richard Stallman <rms@gnu.org>
20910
20911 * src/bison.s1:
20912 Fix line numbers in #line commands.
20913
209141995-12-29 Richard Stallman <rms@gnu.org>
20915
20916 * bison.simple:
20917 Fix line numbers in #line commands.
20918
209191995-12-27 Richard Stallman <rms@gnu.org>
20920
20921 * src/bison.s1 (YYPARSE_PARAM_DECL):
20922 In C++, make it always null.
20923 (YYPARSE_PARAM_ARG): New macro.
20924 (yyparse): Use YYPARSE_PARAM_ARG.
20925
209261995-12-27 Richard Stallman <rms@gnu.org>
20927
20928 * bison.simple (YYPARSE_PARAM_DECL):
20929 In C++, make it always null.
20930 (YYPARSE_PARAM_ARG): New macro.
20931 (yyparse): Use YYPARSE_PARAM_ARG.
20932
209331995-11-29 Richard Stallman <rms@gnu.org>
20934
20935 * doc/bison.texinfo:
20936 Describe literal string tokens, %raw, %no_lines, %token_table.
20937
209381995-11-29 Daniel Hagerty <hag@gnu.org>
20939
20940 * doc/bison.texinfo: Fixed update date
20941
209421995-10-16 Richard Stallman <rms@gnu.org>
20943
20944 * src/version.c: Version 1.25.
20945
209461995-10-16 Richard Stallman <rms@gnu.org>
20947
20948 * NEWS: *** empty log message ***
20949
209501995-10-16 Richard Stallman <rms@gnu.org>
20951
20952 * doc/bison.1, doc/bison.rnh:
20953 Add new options.
20954
209551995-10-15 Richard Stallman <rms@gnu.org>
20956
20957 * src/vmsgetargs.c, src/getargs.c:
20958 Added -n, -k, and -raw switches.
20959 (noparserflag, toknumflag, rawtoknumflag): New variables.
20960
20961 * src/symtab.h (SALIAS):
20962 New #define for adding aliases to %token.
20963 (struct bucket): Added `alias' field.
20964
20965 * src/reduce.c (reduce_grammar):
20966 Revise error message.
20967 (print_notices): Remove final `.' from error message.
20968
20969 * src/reader.c (reader_output_yylsp):
20970 New function.
20971 (readgram): Use `#if 0' around code that accepted %command
20972 inside grammar rules: The documentation doesn't allow it,
20973 and it will fail since the %command processors scan for the next %.
20974 (parse_token_decl): Extended the %token
20975 declaration to allow a multi-character symbol as an alias.
20976 (parse_thong_decl): New function.
20977 (read_declarations): Added %thong declarations.
20978 (read_declarations): Handle NOOP to deal with allowing
20979 % declarations as another means to specify the flags.
20980 (readgram): Allow %prec prior to semantics embedded in a rule.
20981 (skip_to_char, read_declarations, copy_definition)
20982 (parse_token_decl, parse_start_decl, parse_type_decl)
20983 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
20984 (get_type_name, copy_guard, copy_action, readgram)
20985 (get_type, packsymbols): Revised most error messages.
20986 Changed `fatal' to `warnxxx' to avoid aborting for error.
20987 Revised and use multiple warnxxx functions to avoid using VARARGS1.
20988 (read_declarations): Improve the error message for
20989 an invalid character. Do not abort.
20990 (read_declarations, copy_guard, copy_action): Use
20991 printable_version to avoid unprintable characters in printed output.
20992 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
20993 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
20994 Allow the type of a non-terminal can be given
20995 more than once, as long as all specifications give the same type.
20996
20997 * src/output.c:
20998 (output_headers, output_trailers, output, output_gram)
20999 (output_rule_data): Implement noparserflag variable.
21000 Implement toknumflag variable.
21001 (output): Call reader_output_yylsp to output LTYPESTR.
21002
21003 * src/main.c (main):
21004 If reader sees an error, don't process the grammar.
21005 (fatals): Updated to not use VARARGS1.
21006 (printable_version, int_to_string, warn, warni, warns, warnss)
21007 (warnsss): New error reporting functions. Avoid abort for error.
21008
21009 * src/lex.h:
21010 Added THONG and NOOP for alias processing.
21011 Added SETOPT for the new code that allows setting options with %flags.
21012
21013 * src/lex.c:
21014 Include getopt.h. Add some extern decls.
21015 (safegetc): New function to deal with EOF gracefully.
21016 (literalchar); new function to deal with reading \ escapes.
21017 (lex): Use literalchar.
21018 (lex): Implemented "..." tokens.
21019 (literalchar, lex, parse_percent_token): Made tokenbuffer
21020 always contain the token. This includes growing the token
21021 buffer while reading an integer.
21022 (parse_percent_token): Replaced if-else statement with percent_table.
21023 (parse_percent_token): Added % declarations as another
21024 way to specify the flags -n, -l, and -r. Also added hooks for
21025 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
21026 major changes to files.c.
21027 (lex) Retain in the incoming stream a character following
21028 an incorrect '/'.
21029 (skip_white_space, lex): Revised most error messages
21030 and changed fatal to warn to avoid aborting.
21031 (percent_table): Added %thong declarations.
21032
21033 * src/gram.h: Comment changes.
21034
21035 * src/files.c (openfiles, open_extra_files, done):
21036 Add faction flag
21037 and actfile file. Handle noparserflag. Both for -n switch.
21038
21039 * src/conflicts.c (resolve_sr_conflict):
21040 Remove use of alloca.
21041
210421995-06-01 Jim Meyering <meyering@gnu.org>
21043
21044 * doc/bison.texinfo: *** empty log message ***
21045
210461995-05-06 Richard Stallman <rms@gnu.org>
21047
21048 * src/bison.s1: Comment change.
21049
210501995-05-06 Richard Stallman <rms@gnu.org>
21051
21052 * bison.simple: Comment change.
21053
210541995-05-03 Richard Stallman <rms@gnu.org>
21055
21056 * src/version.c: Version now 1.24.
21057
21058 * src/bison.s1: Change distribution terms.
21059
21060 * src/version.c: Version now 1.23.
21061
210621995-05-03 Richard Stallman <rms@gnu.org>
21063
21064 * doc/bison.texinfo:
21065 Rewrite "Conditions for Using Bison".
21066 Update version to 1.24.
21067
210681995-05-03 Richard Stallman <rms@gnu.org>
21069
21070 * bison.simple: Change distribution terms.
21071
210721995-02-23 Richard Stallman <rms@gnu.org>
21073
21074 * src/files.c: Test __VMS_POSIX as well as VMS.
21075
210761995-02-14 Jim Meyering <meyering@gnu.org>
21077
21078 * src/bison.s1 (__yy_memcpy):
21079 Renamed from __yy_bcopy to avoid
21080 confusion. Reverse FROM and TO arguments to be consistent with
21081 those of memcpy.
21082
210831995-02-14 Jim Meyering <meyering@gnu.org>
21084
21085 * bison.simple (__yy_memcpy):
21086 Renamed from __yy_bcopy to avoid
21087 confusion. Reverse FROM and TO arguments to be consistent with
21088 those of memcpy.
21089
210901994-11-10 David J. MacKenzie <djm@gnu.org>
21091
21092 * NEWS: reformat
21093
21094 * NEWS: New file.
21095
21096 * Makefile.in (DISTFILES): Include NEWS.
21097
21098 * Makefile.in (DISTFILES):
21099 Include install-sh, not install.sh.
21100
21101 * configure.in: Update to Autoconf v2 macro names.
21102
211031994-10-05 David J. MacKenzie <djm@gnu.org>
21104
21105 * Makefile.in: fix typo
21106
21107 * Makefile.in (prefix, exec_prefix):
21108 Let configure set them.
21109
211101994-09-28 David J. MacKenzie <djm@gnu.org>
21111
21112 * Makefile.in: Set datadir to $(prefix)/share.
21113
211141994-09-15 Richard Stallman <rms@gnu.org>
21115
21116 * src/bison.s1:
21117 Update copyright notice and GPL version.
21118
211191994-09-15 Richard Stallman <rms@gnu.org>
21120
21121 * bison.simple:
21122 Update copyright notice and GPL version.
21123
211241994-07-12 Richard Stallman <rms@gnu.org>
21125
21126 * src/reduce.c, src/reader.c:
21127 entered into RCS
21128
211291994-05-05 David J. MacKenzie <djm@gnu.org>
21130
21131 * Makefile.in: entered into RCS
21132
211331994-03-26 Richard Stallman <rms@gnu.org>
21134
21135 * src/bison.s1: entered into RCS
21136
211371994-03-26 Richard Stallman <rms@gnu.org>
21138
21139 * bison.simple: entered into RCS
21140
211411994-03-25 Richard Stallman <rms@gnu.org>
21142
21143 * src/main.c: entered into RCS
21144
211451994-03-24 Richard Stallman <rms@gnu.org>
21146
21147 * src/conflicts.c: entered into RCS
21148
211491994-01-02 Richard Stallman <rms@gnu.org>
21150
21151 * Makefile.in: *** empty log message ***
21152
211531993-11-21 Richard Stallman <rms@gnu.org>
21154
21155 * src/bison.s1: *** empty log message ***
21156
211571993-11-21 Richard Stallman <rms@gnu.org>
21158
21159 * doc/bison.texinfo: entered into RCS
21160
21161 * doc/bison.texinfo: *** empty log message ***
21162
211631993-11-21 Richard Stallman <rms@gnu.org>
21164
21165 * bison.simple: *** empty log message ***
21166
211671993-10-25 David J. MacKenzie <djm@gnu.org>
21168
21169 * doc/bison.texinfo: *** empty log message ***
21170
211711993-10-19 Richard Stallman <rms@gnu.org>
21172
21173 * src/bison.s1: *** empty log message ***
21174
211751993-10-19 Richard Stallman <rms@gnu.org>
21176
21177 * bison.simple: *** empty log message ***
21178
211791993-10-14 Richard Stallman <rms@gnu.org>
21180
21181 * src/bison.s1: *** empty log message ***
21182
211831993-10-14 Richard Stallman <rms@gnu.org>
21184
21185 * bison.simple: *** empty log message ***
21186
211871993-09-14 David J. MacKenzie <djm@gnu.org>
21188
21189 * doc/bison.texinfo: *** empty log message ***
21190
211911993-09-13 Noah Friedman <friedman@gnu.org>
21192
21193 * Makefile.in: *** empty log message ***
21194
211951993-09-10 Richard Stallman <rms@gnu.org>
21196
21197 * src/conflicts.c: *** empty log message ***
21198
21199 * src/system.h: entered into RCS
21200
212011993-09-10 Richard Stallman <rms@gnu.org>
21202
21203 * doc/bison.1: entered into RCS
21204
212051993-09-06 Noah Friedman <friedman@gnu.org>
21206
21207 * src/version.c: entered into RCS
21208
212091993-09-06 Noah Friedman <friedman@gnu.org>
21210
21211 * Makefile.in: *** empty log message ***
21212
212131993-07-30 David J. MacKenzie <djm@gnu.org>
21214
21215 * Makefile.in: *** empty log message ***
21216
212171993-07-24 Richard Stallman <rms@gnu.org>
21218
21219 * src/bison.s1: *** empty log message ***
21220
212211993-07-24 Richard Stallman <rms@gnu.org>
21222
21223 * bison.simple: *** empty log message ***
21224
212251993-07-08 David J. MacKenzie <djm@gnu.org>
21226
21227 * Makefile.in: *** empty log message ***
21228
212291993-07-04 Richard Stallman <rms@gnu.org>
21230
21231 * src/bison.s1: *** empty log message ***
21232
212331993-07-04 Richard Stallman <rms@gnu.org>
21234
21235 * bison.simple: *** empty log message ***
21236
212371993-06-26 David J. MacKenzie <djm@gnu.org>
21238
21239 * src/getargs.c: entered into RCS
21240
212411993-06-26 David J. MacKenzie <djm@gnu.org>
21242
21243 * doc/bison.texinfo: *** empty log message ***
21244
21245 * doc/bison.1: New file.
21246
212471993-06-25 Richard Stallman <rms@gnu.org>
21248
21249 * src/getargs.c: New file.
21250
212511993-06-16 Richard Stallman <rms@gnu.org>
21252
21253 * src/bison.s1: *** empty log message ***
21254
212551993-06-16 Richard Stallman <rms@gnu.org>
21256
21257 * bison.simple: *** empty log message ***
21258
212591993-06-03 Richard Stallman <rms@gnu.org>
21260
21261 * src/bison.s1: New file.
21262
212631993-06-03 Richard Stallman <rms@gnu.org>
21264
21265 * doc/bison.texinfo: *** empty log message ***
21266
212671993-06-03 Richard Stallman <rms@gnu.org>
21268
21269 * bison.simple: New file.
21270
212711993-05-19 Richard Stallman <rms@gnu.org>
21272
21273 * doc/bison.texinfo: New file.
21274
212751993-05-07 Noah Friedman <friedman@gnu.org>
21276
21277 * Makefile.in: *** empty log message ***
21278
212791993-04-28 Noah Friedman <friedman@gnu.org>
21280
21281 * src/reader.c: *** empty log message ***
21282
212831993-04-23 Noah Friedman <friedman@gnu.org>
21284
21285 * src/alloc.h: entered into RCS
21286
212871993-04-20 David J. MacKenzie <djm@gnu.org>
21288
21289 * src/version.c: *** empty log message ***
21290
21291 * src/files.c, src/allocate.c:
21292 entered into RCS
21293
21294 * src/reader.c: *** empty log message ***
21295
21296 * src/lex.c: entered into RCS
21297
21298 * src/conflicts.c: New file.
21299
21300 * src/symtab.c: entered into RCS
21301
21302 * src/alloc.h: New file.
21303
21304 * src/LR0.c: entered into RCS
21305
213061993-04-18 Noah Friedman <friedman@gnu.org>
21307
21308 * src/reader.c: New file.
21309
21310 * src/version.c: *** empty log message ***
21311
213121993-04-18 Noah Friedman <friedman@gnu.org>
21313
21314 * Makefile.in: *** empty log message ***
21315
213161993-04-17 Noah Friedman <friedman@gnu.org>
21317
21318 * Makefile.in: *** empty log message ***
21319
213201993-04-15 Richard Stallman <rms@gnu.org>
21321
21322 * src/main.c, src/files.c:
21323 New file.
21324
213251993-04-15 Noah Friedman <friedman@gnu.org>
21326
21327 * configure.in: entered into RCS
21328
21329 * configure.in: *** empty log message ***
21330
21331 * configure.in: New file.
21332
213331993-04-14 Richard Stallman <rms@gnu.org>
21334
21335 * Makefile.in: New file.
21336
213371993-04-13 Richard Stallman <rms@gnu.org>
21338
21339 * src/version.c: New file.
21340
213411993-03-25 Richard Stallman <rms@gnu.org>
21342
21343 * src/output.c: entered into RCS
21344
213451992-09-25 Richard Stallman <rms@gnu.org>
21346
21347 * configure.bat: entered into RCS
21348
213491992-06-22 Richard Stallman <rms@gnu.org>
21350
21351 * src/vmsgetargs.c: entered into RCS
21352
213531992-06-22 Richard Stallman <rms@gnu.org>
21354
21355 * doc/bison.rnh: entered into RCS
21356
213571992-04-20 David J. MacKenzie <djm@gnu.org>
21358
21359 * README: entered into RCS
21360
213611992-01-22 Richard Stallman <rms@gnu.org>
21362
21363 * src/machine.h: entered into RCS
21364
213651991-12-21 Richard Stallman <rms@gnu.org>
21366
21367 * src/lalr.c, src/closure.c:
21368 entered into RCS
21369
213701991-12-20 Richard Stallman <rms@gnu.org>
21371
21372 * src/state.h: entered into RCS
21373
213741991-12-18 Richard Stallman <rms@gnu.org>
21375
21376 * src/print.c, src/nullable.c, src/derives.c:
21377 entered into RCS
21378
213791991-11-03 David J. MacKenzie <djm@gnu.org>
21380
21381 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
21382 entered into RCS
21383
213841988-09-09 Richard Stallman <rms@gnu.org>
21385
21386 * src/bison.hairy: entered into RCS
21387
213881987-12-16 Richard Stallman <rms@gnu.org>
21389
21390 * REFERENCES: entered into RCS
dc546b0f 21391
f294a2c2 21392
04098407 21393 -----
f294a2c2 21394
04098407 21395 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
f490771b
JD
21396 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
21397 2007, 2008, 2009 Free Software Foundation, Inc.
f294a2c2 21398
04098407
PE
21399 Copying and distribution of this file, with or without
21400 modification, are permitted provided the copyright notice and this
21401 notice are preserved.