]> git.saurik.com Git - bison.git/blob - ChangeLog
Don't add a semicolon to actions for %skeleton or %language.
[bison.git] / ChangeLog
1 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Don't add a semicolon to actions for %skeleton or %language.
4 It breaks Java test cases as reported by Akim Demaille.
5 * src/scan-code.l: Implement.
6
7 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
8
9 Clean up %skeleton and %language priority implementation.
10 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
11 remove static qualifier because others will soon need to see it.
12 (language_prio): Likewise.
13 (getargs): Use command_line_prio rather than 0.
14 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
15 enum fields.
16 (skeleton_prio): Extern it.
17 (language_prio): Extern it.
18 * src/parse-gram.y: Use grammar_prio rather than 1.
19
20 2008-11-07 Akim Demaille <demaille@gostai.com>
21
22 Moving push traces into yypush_.
23 * data/lalr1.cc (yypush_): Now takes a optional trace message.
24 Adjust all uses.
25
26 2008-11-07 Akim Demaille <demaille@gostai.com>
27
28 The single-stack C++ parser is now the standard one.
29 * data/lalr1.cc: Rename as...
30 * data/lalr1-split.cc: this.
31 * data/lalr1-fusion.cc: Rename as...
32 * data/lalr1.cc: this.
33 * etc/bench.pl.in: Adjust.
34
35 2008-11-07 Akim Demaille <demaille@gostai.com>
36
37 Avoid empty-if warnings.
38 Reported by Quentin Hocquet.
39
40 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
41 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
42
43 2008-11-07 Akim Demaille <demaille@gostai.com>
44
45 Pass command line location to skeleton_arg and language_argmatch.
46 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
47 The location argument is now mandatory.
48 Adjust all dependencies.
49 (getargs): Use command_line_location.
50
51 2008-11-07 Akim Demaille <demaille@gostai.com>
52
53 -D, --define.
54 * src/getargs.c (usage): Document -D.
55 Fix help string for --locations.
56 (command_line_location): New.
57 (short_options, long_options, getargs): Support -D, --define.
58 (getargs): Move -d support at the right place.
59 * doc/bison.texinfo (Bison Options): Update.
60 * tests/input.at (%define, --define): New.
61
62 2008-11-07 Akim Demaille <demaille@gostai.com>
63
64 Initialize the muscle table before parsing the command line.
65 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
66 (getargs): Define file_name.
67 * src/main.c (main): Initialize muscle_tab before calling
68 getargs.
69 * src/muscle_tab.c (muscle_init): No longer define file_name, as
70 its value is not available yet.
71
72 2008-11-07 Akim Demaille <demaille@gostai.com>
73
74 Locations without columns for command line arguments.
75 * src/location.c (location_print): Don't display negative columns.
76 * src/location.h: Document this.
77
78 2008-11-07 Akim Demaille <demaille@gostai.com>
79
80 Fix --help.
81 * src/getargs.c (usage): Fix help string for -W.
82
83 2008-11-07 Akim Demaille <demaille@gostai.com>
84
85 Handle more general types of option arguments.
86 * build-aux/cross-options.pl: The argument ends at the first
87 space, not the first non-symbol character.
88 Use @var for each word appearing the argument description.
89
90 2008-11-07 Akim Demaille <demaille@gostai.com>
91
92 Destroy the variants that remain on the stack in case of error.
93 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
94 destructor.
95 Display the value only if yymsg is nonnull.
96 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
97
98 2008-11-07 Akim Demaille <demaille@gostai.com>
99
100 Add "%define assert" to variants.
101 This is used to help the user catch cases where some value gets
102 ovewritten by a new one. This should not happen, as this will
103 probably leak.
104
105 Unfortunately this uncovered a bug in the C++ parser itself: the
106 lookahead value was not destroyed between two calls to yylex. For
107 instance if the previous lookahead was a std::string, and then an int,
108 then the value of the std::string was correctly taken (i.e., the
109 lookahead was now an empty string), but std::string structure itself
110 was not reclaimed.
111
112 This is now done in variant::build(other&) (which is used to take the
113 value of the lookahead): other is not only stolen from its value, it
114 is also destroyed. This incurs a new performance penalty of a few
115 percent, and union becomes faster again.
116
117 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
118 (b4_variant_if): New.
119 (variant::built): New.
120 Use it whereever the status of the variant changes.
121 * etc/bench.pl.in: Check the penalty of %define assert.
122
123 2008-11-07 Akim Demaille <demaille@gostai.com>
124
125 Use "%define variant" in bench.pl.
126 * etc/bench.pl.in: No longer use the pseudo directive %variants,
127 just use %define variants.
128
129 2008-11-07 Akim Demaille <demaille@gostai.com>
130
131 Regen.
132 * src/parse-gram.h, src/parse-gram.c: Regen.
133
134 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
135
136 Fix user actions without a trailing semicolon.
137 Reported by Sergei Steshenko at
138 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
139 * THANKS (Sergei Steshenko): Add.
140 * src/scan-code.l (SC_RULE_ACTION): Fix it.
141 * tests/regression.at (Fix user actions without a trailing semicolon):
142 New test case.
143
144 2008-11-04 Akim Demaille <demaille@gostai.com>
145
146 Use b4_copyright_years.
147 * data/yacc.c (b4_copyright_years): New.
148 Fix its value according to the comments in the file.
149 Use it and undefine it.
150
151 2008-11-04 Akim Demaille <demaille@gostai.com>
152
153 Formatting changes.
154 * data/lalr1-fusion.cc, src/parse-gram.y: here.
155
156 2008-11-04 Akim Demaille <demaille@gostai.com>
157
158 Formatting changes.
159 * data/lalr1-fusion.cc: here.
160
161 2008-11-04 Akim Demaille <demaille@gostai.com>
162
163 Use strict on bench.pl.
164 * etc/bench.pl.in (&run, &generate_grammar): New.
165 Rename the grammar generating functions for consistency.
166 Change the interface so that the list of benches to run is passed
167 as (optionless) arguments.
168 (&compile): Use &run.
169
170 2008-11-04 Akim Demaille <demaille@gostai.com>
171
172 Remove spurious initial empty lines.
173 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
174 * data/yacc.c: End the @output lines with an @.
175
176 2008-11-04 Akim Demaille <demaille@gostai.com>
177
178 Improve the display of sizes.
179 * etc/bench.p.in: Higher precision.
180 Sort by decreasing size.
181
182 2008-11-04 Akim Demaille <demaille@gostai.com>
183
184 Don't memcpy C++ structures.
185 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
186 arguments.
187 (variant::build): New overload for
188 copy-construction-that-destroys.
189 (variant::swap): New.
190 (parser::yypush_): Use it in variant mode.
191
192 2008-11-04 Akim Demaille <demaille@gostai.com>
193
194 Better defaults for bench.pl.
195 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
196 default values.
197 Adjust &verbose uses.
198 (-q, --quiet): New.
199
200 2008-11-04 Akim Demaille <demaille@gostai.com>
201
202 Make variant.yy more complex.
203 std::list cannot be copied via memcpy, they are more demanding than
204 std::string. Use one std::list to strengthen the test.
205
206 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
207 Adjust.
208 Create a list of strings, instead of a single large string.
209
210 2008-11-04 Akim Demaille <demaille@gostai.com>
211
212 bench.pl --bench.
213 * etc/bench.pl.in (--bench, $bench): New.
214
215 2008-11-04 Akim Demaille <demaille@gostai.com>
216
217 Sort methods.
218 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
219 Define it after as().
220
221 2008-11-04 Akim Demaille <demaille@gostai.com>
222
223 Useless parens.
224 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
225
226 2008-11-04 Akim Demaille <demaille@gostai.com>
227
228 Issue missing synclines after user actions.
229 * data/c.m4 (b4_case): Issue synclines on the output file.
230
231 2008-11-04 Akim Demaille <demaille@gostai.com>
232
233 Remove trailing empty line.
234 * data/lalr1-fusion.cc: Don't add an empty line after the user's
235 epilogue.
236
237 2008-11-04 Akim Demaille <demaille@gostai.com>
238
239 Fix output of copyright years.
240 * data/bison.m4 (b4_copyright): Fix the indentation of the
241 copyright year paragraph.
242 Use b4_copyright_years when no years are given.
243 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
244 (b4_copyright_years): New.
245 Use it.
246
247 2008-11-04 Akim Demaille <demaille@gostai.com>
248
249 Avoid the spurious initial empty line.
250 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
251 the end of @output request to suppress the empty line that
252 results.
253
254 2008-11-04 Akim Demaille <demaille@gostai.com>
255
256 Remove parser::rhs_number_type.
257 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
258 (yyrhs_): Use b4_table_define.
259
260 2008-11-04 Akim Demaille <demaille@gostai.com>
261
262 Fix iteration type.
263 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
264
265 2008-11-04 Akim Demaille <demaille@gostai.com>
266
267 Factor the declaration of the integer tables.
268 * data/lalr1-fusion.cc (b4_table_define): New.
269 Use it.
270
271 2008-11-03 Akim Demaille <demaille@gostai.com>
272
273 Fix indentation of tables in lalr1.cc
274 * data/lalr1-fusion.cc: Fix the indentation.
275
276 2008-11-03 Akim Demaille <demaille@gostai.com>
277
278 Destroy the lhs symbols after reduction.
279 * data/lalr1-fusion.cc (parse): After the user action, when in
280 variant mode, destroy the lhs symbols.
281
282 2008-11-03 Akim Demaille <demaille@gostai.com>
283
284 Simplify yysyntax_error_ use.
285 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
286 type, but make it unnamed in the declaration when it is not used.
287
288 2008-11-03 Akim Demaille <demaille@gostai.com>
289
290 Let yy::variant::build return an lvalue.
291 * data/lalr1-fusion.cc (variant::build): Return a reference to the
292 object.
293
294 2008-11-03 Akim Demaille <demaille@gostai.com>
295
296 Define yy::variant only when needed.
297 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
298 used.
299
300 2008-11-03 Akim Demaille <demaille@gostai.com>
301
302 Bench the three-stack lalr1.cc.
303 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
304 one-stack one.
305
306 2008-11-03 Akim Demaille <demaille@gostai.com>
307
308 Fail on parse error in calc++.
309 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
310 status.
311 * examples/calc++/test ($me, $number, $exit, run): New.
312 Use them to propagate errors to the exit status.
313
314 2008-11-03 Akim Demaille <demaille@gostai.com>
315
316 Don't specify the skeleton twice in the example.
317 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
318 file does what is needed.
319
320 2008-11-03 Akim Demaille <demaille@gostai.com>
321
322 bench: Improve output.
323 * etc/bench.pl.in (bench_grammar): Tune the printf format.
324
325 2008-11-03 Akim Demaille <demaille@gostai.com>
326
327 bench: check impact of %debug on variants.
328 * etc/bench.pl.in (variant_grammar): Fix the computation of
329 $variant.
330 Generate a grammar file that can work with or without %debug.
331 Do use the @directive.
332 (bench_variant_parser): Check impact of %debug.
333 (@directives): Rename all the occurrences to...
334 (@directive): this, for consistency.
335
336 2008-11-03 Akim Demaille <demaille@gostai.com>
337
338 bench: report the size too.
339 * etc/bench.pl.in ($iterations): Defaults to -3.
340 (&bench_grammar): Require hireswallclock.
341 Compute and display the size of the result.
342 More comments.
343
344 2008-11-03 Akim Demaille <demaille@gostai.com>
345
346 bench: More use of the verbosity level.
347 * etc/bench.pl.in ($verbose, &verbose): New.
348 Use them.
349 More POD documentation.
350
351 2008-11-03 Akim Demaille <demaille@gostai.com>
352
353 bench.pl: a command line interface
354 * etc/bench.pl.in: More doc.
355 Some fixes in the documentation.
356 ($cflags, $iterations, &help, &getopt): New.
357 Use them.
358 (&variant_grammar): Let the number of stages be 10 times what is
359 specified.
360
361 2008-11-03 Akim Demaille <demaille@gostai.com>
362
363 Bench the use of Boost.Variants.
364 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
365 New.
366 (&compile): Be ready to compile C++ parsers.
367 (&bench_push_parser): Move debug information to the outermost
368 level.
369 * THANKS: Add Michiel De Wilde.
370
371 2008-11-03 Akim Demaille <demaille@gostai.com>
372
373 bench.pl: Pass directives as a list instead of as a string.
374 * etc/bench.pl.in (&directives): New.
375 (&triangular_grammar, &calc_grammar): Use it to format the Bison
376 directives.
377 (&triangular_grammar): Do use the directives (were ignored).
378 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
379 directives.
380
381 2008-11-03 Akim Demaille <demaille@gostai.com>
382
383 Improve genericity of bench.pl.
384 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
385 argument.
386 (&bench_push_parser): New.
387 Call it.
388
389 2008-11-03 Akim Demaille <demaille@gostai.com>
390
391 Add documentation to bench.pl.
392 * etc/bench.pl.in: Comment changes.
393
394 2008-11-03 Akim Demaille <demaille@gostai.com>
395
396 Fuse the three stacks into a single one.
397 In order to make it easy to perform benchmarks to ensure that there are no
398 performance loss, lalr1.cc is forked into lalr1-fusion.cc. Eventually,
399 lalr1-fusion.cc will replace lalr1.cc.
400
401 Meanwhile, to make sure that lalr1-fusion.cc is correctly exercized by the
402 test suite, the user must install a symbolic link from lalr1.cc to it.
403
404 Instead of having three stacks (state, value, location), use a stack
405 of triples. This considerably simplifies the code (and it will be
406 easier not to require locations as currently does the C++ parser),
407 and also gives a 10% speedup according to etc/bench (probably mainly since
408 memory allocation is done once instead of three times).
409
410 Another motivation is to make it easier to destruct properly
411 semantic values: now that they are bound to their state (hence
412 symbol type) it will be easier to call the appropriate destructor.
413
414 These changes should probably benefit the C parser too.
415
416 * data/lalr1.cc: Copy as... * data/lalr1-fusion.cc: this new
417 file.
418 (b4_rhs_value, b4_rhs_location): New definitions overriding those
419 from c++.m4.
420 (state_stack_type, semantic_stack_type, location_stack_type)
421 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
422 (data_type, stack_type, yystack_): New.
423 (YYLLOC_DEFAULT, yypush_): Adjust.
424 (yyerror_range): Now based on data_type, not location_type.
425
426 2008-11-03 Akim Demaille <demaille@gostai.com>
427
428 Push the state, value, and location at the same time.
429 This is needed to prepare a forthcoming patch that fuses the three
430 stacks into one.
431
432 * data/lalr1.cc (parser::yypush_): New.
433 (parser::yynewstate): Change the semantics: instead of arriving to
434 this label when value and location have been pushed, but yystate
435 is to be pushed on the state stack, now the three of them must
436 have been pushed before. yystate still must be the new state.
437 This allows to use yypush_ everywhere instead of individual
438 handling of the stacks.
439
440 2008-11-03 Akim Demaille <demaille@gostai.com>
441
442 Prefer references to pointers.
443 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
444 definition to use references instead of pointers.
445 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
446 Take the value and location as references.
447 Adjust callers.
448
449 2008-11-03 Akim Demaille <demaille@gostai.com>
450
451 stack::size instead of stack::height.
452 * data/lalr1.cc (stack::height): Rename as...
453 (stack::size): this.
454 Fix the output type.
455 Comment changes.
456
457 2008-11-03 Akim Demaille <demaille@gostai.com>
458
459 Use variants to support objects as semantic values.
460 This patch was inspired by work by Michiel De Wilde. But he used Boost
461 variants which (i) requires Boost on the user side, (ii) is slow, and
462 (iii) has useless overhead (the parser knows the type of the semantic value
463 there is no reason to duplicate this information as Boost.Variants do).
464
465 This implementation reserves a buffer large enough to store the largest
466 objects. yy::variant implements this buffer. It was implemented with
467 Quentin Hocquet.
468
469 * src/output.c (type_names_output): New.
470 (output_skeleton): Invoke it.
471 * data/c++.m4 (b4_variant_if): New.
472 (b4_symbol_value): If needed, provide a definition for variants.
473 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
474 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
475 (b4_char_sizeof, yy::variant): New.
476 (parser::parse): If variants are requested, define
477 parser::union_type, parser::variant, change the definition of
478 semantic_type, construct $$ before running the user action instead
479 of performing a default $$ = $1.
480 * examples/variant.yy: New.
481 Based on an example by Michiel De Wilde.
482
483 2008-11-03 Akim Demaille <demaille@gostai.com>
484
485 Parameterize the extraction of semantic values.
486 To make future changes easier, no longer rely on ".TYPE" being the
487 way to get a semantic value.
488
489 * data/c.m4 (b4_symbol_value): New.
490 Use it.
491 * data/c++.m4, data/yacc.c: Use it.
492 * data/glr.c: Use b4_symbol_value.
493 (b4_rhs_data): New.
494 Use it.
495
496 2008-11-03 Akim Demaille <demaille@gostai.com>
497
498 Prepare easier M4 changes.
499 * data/lalr1.cc: Use escaped [] instead of literals to prepare
500 future changes.
501
502 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
503
504 Initiate further development.
505 * NEWS: Create an empty section for new entries.
506 * gnulib: Update submodule to HEAD.
507
508 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
509
510 * NEWS: Version 2.4.
511
512 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
513
514 Prepare for next release.
515 * NEWS: Briefly mention changes since 2.3b.
516 * README: Say GNU m4 1.4.6, which we've been requiring in release
517 announcements already, not 1.4.3, which breaks the build.
518
519 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
520
521 Say %language is experimental.
522 We're thinking of extending it's effect on output file naming. See the
523 thread at
524 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
525 * NEWS: Say it's experimental.
526 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
527 recommend it over %skeleton for now.
528 (Bison Options): Likewise.
529 (C++ Bison Interface): Use %skeleton not %language.
530 (Calc++ Parser): Use %skeleton not %language.
531 * src/getargs.c (usage): Say it's experimental.
532
533 2008-11-01 Di-an Jan <dianj@freeshell.org>
534 Paolo Bonzini <bonzini@gnu.org>
535
536 Support all Java parser class modifiers.
537 * data/java.m4 (b4_percent_define_get3): New.
538 (b4_final_if, b4_strictfp_if): New.
539 * data/lalr1.java (final, strictfp, extends, implements): Support.
540 * doc/bison.texinfo (final, strictfp, extends, implements): Add
541 documentation.
542 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
543 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
544 (AT_CHECK_JAVA_GREP): New.
545 (Java parser class modifiers): New test.
546 (Java parser class extends and implements): New test.
547
548 Model exception propagation better with throws and lex_throws.
549 * data/java.m4 (b4_list2): New.
550 (throws): Change default.
551 * data/lalr1.java (yyaction): Add throws.
552 (parse): Add lex_throws in addition to throws.
553 * doc/bison.texinfo (throws, lex_throws): Add documentation.
554 * tests/java.at (Java throws specifications): New test.
555
556 Improve documentation for Java parsers.
557 * doc/bison.texinfo (Java Parsers): Add subsections.
558 Don't quote first argument of %define.
559 (Java Bison Interface): Document output files. Move documentation
560 of parser class and merge into Java Parser Interface. Document
561 features that error out. Document directives with no effect.
562 Move note about Javadoc higher.
563 (Java Semantic Values): Explicitly mention stype.
564 Document that generic types cannot be used.
565 (Java Location Values): Use @deftypeivar. Document constructors.
566 Correct return value for toString.
567 (Java Parser Interface): List undocumented constants/fields.
568 Move documentation of fields added by %parse-param closer to list
569 of members. Document that token names are added as fields.
570 Document constructors accurately. Remove error method.
571 (Java Scanner Interface): Move note on %pure-parser to Java Bison
572 Interface. Describe %code lexer and yylex accutately.
573 Remove documentation that does not match the code.
574 (Java Action Features): New.
575 (Java Differences): Add reference. Add item on semantic values.
576 Add note about @{ ... @}. Clarify %% epilogue placement.
577 (Java Declarations Summary): New.
578
579 Fix Java skeleton.
580 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
581 (b4_remove_comma): Quote test argument.
582 (b4_identification): Remove "bison" field.
583 * tests/java.at (Java parser class and package names): New test.
584 (Java %parse-param and %lex-param): New test.
585 (Java stype, position_class and location_class): New test.
586
587 2008-10-31 Di-an Jan <dianj@freeshell.org>
588
589 * data/lalr1.jave: Update copyright years.
590 (YYParser): Correct name of "generated from" file in Javadoc:
591 use b4_file_name instead of @ofile@.
592 (Location constructor): Correct Javadoc parameter name.
593 (yylloc): Add missing opening m4 quote after b4_location_if.
594 This removes a stray [ in the Javadoc of Lexer.getStartPos.
595 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
596 (YYParser constructor): Correct Javadoc parameter name.
597
598 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
599
600 Always put auxiliary code files in the same dir as other output files.
601 * src/files.c (compute_file_name_parts): When the user specifies
602 --output but not --file-prefix, extract the directory prefix from the
603 file prefix not from the grammar file name. This affects the location
604 of files like location.hh generated by the C++ skeleton. The includes
605 in the other output files require this fix.
606 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
607 for expected output files.
608 (Output files): Add a test for the above.
609
610 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
611
612 * gnulib: Update submodule to HEAD.
613
614 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
615
616 Update copyright year.
617 * src/files.c: Here.
618
619 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
620
621 Don't overwrite the input file.
622 * src/files.c (output_file_name_check): Fatal error if using input file
623 for output.
624 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
625 argument.
626 (Conflicting output files): Add test.
627
628 2008-10-28 Akim Demaille <demaille@gostai.com>
629
630 Space changes.
631 * data/lalr1.cc: Formatting changes.
632
633 2008-10-28 Akim Demaille <demaille@gostai.com>
634
635 Don't define debugging functions when !YYDEBUG.
636 * data/lalr1.cc (debug_stream, set_debug_stream)
637 (debug_level_type, debug_level, set_debug_level): Don't
638 declare them when YYDEBUG is not defined.
639 The implementation are already YYDEBUG-aware.
640
641 2008-10-28 Akim Demaille <demaille@gostai.com>
642
643 Prefer "continue" for empty loop bodies.
644 * etc/bench.pl.in: Use "continue" instead of {}.
645
646 2008-10-28 Akim Demaille <demaille@gostai.com>
647
648 Space and comments changes.
649 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
650 * data/c.m4, data/lalr1.cc: Space changes.
651
652 2008-10-28 Akim Demaille <demaille@gostai.com>
653
654 Make gnulib a submodule.
655 * gnulib: New.
656 * .gitmodules (gnulib): New.
657
658 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
659
660 Fix yyerror_range for user-defined location type in C++. Reported by
661 Georg Sauthoff at
662 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
663 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
664 * THANKS (Georg Sauthoff): Add.
665
666 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
667
668 Update several administrative files mainly to facilitate releasing.
669 * HACKING (Administrivia): Make the git-merge-changelog notes more
670 helpful.
671 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
672 (Release Procedure): Update for git and add numerous details that were
673 previously missing.
674 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
675 * maint.mk (announcement): Don't list bison as a bootstrap tool so
676 that announcements don't claim we bootstrapped with whatever bison
677 happened to be in PATH. Add flex as a bootstrap tool.
678 * Makefile.maint: Remove, previously replaced by maint.mk.
679 * Makefile.cfg: Remove, and migrate settings to...
680 * cfg.mk: ... here for the sake of `make announcement'.
681 * bootstrap.conf (gnulib_modules): Add announce-gen.
682 * README: Say GNU Bison instead of just Bison. Suggested by Karl
683 Berry.
684
685 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
686
687 Small but important bugfixes for the Java skeleton.
688 * data/lalr1.java (yyerror): Change Location to b4_location_type.
689 (yy_symbol_print): Call toString on yyvaluep.
690
691 2008-08-29 Akim Demaille <demaille@gostai.com>
692
693 Clarify UPDATED use.
694 * doc/bison.texinfo: It refers to the last edition of this file,
695 not to the release date of Bison.
696 Reported by Joel E. Denny.
697
698 2008-08-29 Akim Demaille <demaille@gostai.com>
699
700 * README: Update FAQ pointer.
701 Reported by Joel E. Denny.
702
703 2008-08-27 Eric Blake <ebb9@byu.net>
704
705 Resync m4sugar from autoconf.
706 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
707 (m4_init): Adjust to latest m4.git changes.
708 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
709 effects.
710 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
711 (_m4_list_cmp): Reduce side effects.
712
713 2008-08-27 Akim Demaille <demaille@gostai.com>
714
715 Check yyerrok in calc.at.
716 * tests/calc.at (calc.y): Use yyerrok on "( error )".
717 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
718 expected.
719
720 2008-08-27 Akim Demaille <demaille@gostai.com>
721
722 Support yyerrok in lalr1.cc.
723 YYBACKUP is still to import back into lalr1.cc.
724 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
725
726 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
727
728 For maintainer-check*, don't recompile for a $(VERSION) update.
729 * cfg.mk: New file.
730 (_is-dist-target): Override the one in GNUmakefile.
731 * Makefile.am (EXTRA_DIST): Add cfg.mk.
732
733 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
734
735 Update for recent change to gnulib.
736 * src/parse-gram.y: Don't include strverscmp.h. It comes from
737 string.h now.
738
739 2008-08-15 Eric Blake <ebb9@byu.net>
740
741 Remaining m4sugar merge from autoconf.
742 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
743 * data/m4sugar/foreach.m4: New file, copied from autoconf.
744 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
745 * src/output.c (output_skeleton): Tell m4 how to find it.
746
747 Partial m4sugar merge from autoconf: m4_map.
748 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
749 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
750 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
751 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
752 for empty list.
753 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
754 Likewise.
755 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
756 declares it.
757
758 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
759
760 Keep .version and PACKAGE_VERSION in sync.
761 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
762 dependency, and add comments justifying this in more detail. Discussed
763 starting at
764 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
765
766 2008-08-06 Eric Blake <ebb9@byu.net>
767
768 Partial m4sugar merge from autoconf: m4_shiftn.
769 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
770 (m4_shift2, m4_shift3): New macros.
771 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
772 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
773 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
774 * data/java.m4 (b4_remove_comma): Likewise.
775
776 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
777 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
778 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
779 (m4_init): Consolidate wrapped text into single m4_wrap.
780 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
781 in wrapped text.
782
783 2008-08-05 Eric Blake <ebb9@byu.net>
784
785 Partial m4sugar merge from autoconf: builtins, version.m4.
786 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
787 (m4_prepend): Remove, as it is unused and inherently quadratic,
788 whereas m4_append is linear in newer m4.
789 (m4_mkstemp): New builtin.
790 (m4_symbols): Make rename conditional.
791 (m4_version_prereq): Ensure fatal error if used in bison, which
792 intentionally lacks version.m4.
793
794 Fix comments in m4sugar.
795 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
796
797 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
798
799 Update for recent .gitignore fix in Gnulib.
800 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
801 anchored .gitignore entries.
802
803 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
804
805 Set gnu or gnits strictness.
806 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
807 development and gnits strictness for releases. Based on Eric Blake's
808 suggestion at
809 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
810
811 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
812
813 * NEWS: Clarify documentation of %language.
814
815 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
816
817 Support usage of git-merge-changelog.
818 * .gitattributes: New.
819 * HACKING: Document usage of git-merge-changelog.
820 * bootstrap: Install git-merge-changelog entries in .git/config
821 if appropriate.
822
823 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
824
825 Remove remaining dependence on CVS Id keyword.
826 * ChangeLog: For the sake of people still using CVS, don't use dollars
827 when mentioning Id.
828 * data/xslt/bison.xsl: Remove Id from header comments, where it was
829 unusual anyway.
830 * data/xslt/xml2dot.xsl: Likewise.
831 * data/xslt/xml2text.xsl: Likewise.
832 * data/xslt/xml2xhtml.xsl: Likewise.
833 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
834 * doc/Makefile.am (neutralize): Remove, no longer needed.
835 (.x.1): Don't use neutralize.
836 (edit): Don't substitute for ID.
837 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
838
839 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
840
841 Fix dependence on computed configure variables.
842 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
843 $(top_srcdir)/configure.ac so that changes to computed variables, such
844 as PACKAGE_VERSION, are seen.
845 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
846
847 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
848
849 Update copyright dates for recent changes.
850 * Makefile.am: Here.
851 * src/Makefile.am: Here.
852 * src/reduce.c: Here.
853 * tests/reduce.at: Here.
854
855 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
856
857 Use git-version-gen for version names between releases.
858 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
859 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
860 * .prev-version: New.
861 * .version.in: Remove.
862 * ChangeLog: Remove the Id previously used for capturing the CVS
863 revision.
864 * GNUmakefile: Remove, now copied from Gnulib.
865 * Makefile.am: Add code suggested by comments in
866 build-aux/git-version-gen.
867 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
868 .prev-version, and .version.
869 * NEWS (2.3b+): Rename to...
870 (?.?): ... this because we're dropping the "+" version naming scheme,
871 but, in general, we still can't be sure of our next release name.
872 * bootstrap: Add a quick hack to remove from .gitignore the
873 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
874 entry. This should really be fixed in gnulib instead.
875 * bootstrap.conf (gnulib_modules): Add gnumakefile.
876 * configure.ac (AC_INIT): Set version name by invoking
877 build-aux/git-version-gen.
878 (AC_CONFIG_FILES): Remove .version, now generated by
879 build-aux/git-version-gen.
880 * maint.mk: New, copied from coreutils.
881 * doc/.cvsignore (bison.1): Add.
882 * doc/.gitignore (/bison.1): Add.
883 * doc/bison.1: Remove, generated.
884 * src/.cvsignore (revision.c): Remove.
885 * src/.gitignore (/revision.c): Remove.
886 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
887 (BUILT_SOURCES): Remove revision.c.
888 (revision.c): Remove.
889 * src/getargs.c (version): Don't print revision after the VERSION.
890 * src/revision.h: Remove.
891
892 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
893
894 Fix untranslatable composition of sentences. Reported by Goran
895 Uddeborg at
896 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
897 * THANKS (Goran Uddeborg): Add.
898 * src/reduce.c (reduce_print): Report the number of nonterminals and
899 rules useless in the grammar in separate sentences.
900 * tests/reduce.at (Useless Rules): Update output.
901 (Reduced Automaton): Likewise.
902 (Underivable Rules): Likewise.
903 (Empty Language): Likewise.
904
905 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
906
907 Fix some .gitignore and .cvsignore problems.
908 * bootstrap (insert_sorted_if_absent): Replace all uses with...
909 (insert_vc_ignore): ... this new function, which prepends `/' to all
910 .gitignore entries before passing them to insert_sorted_if_absent.
911 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
912 .cvsignore files are maintained even though Bison developers run
913 bootstrap while using Git.
914 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
915 unneeded by Bison.
916 (gnulib): Add.
917 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
918 unneeded. Reported by Eric Blake.
919 * lib/.gitignore (/*~): Add.
920 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
921 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
922 Blake.
923 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
924
925 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
926
927 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
928 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
929 * bootstrap.conf (gnulib_modules): Add unsetenv.
930 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
931 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
932 (/setenv.m4): Add.
933 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
934 the first argument because it may become position-dependent, and unset
935 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
936 Add comments explaining these issues in more detail.
937
938 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
939
940 Add .gitignore everywhere based on .cvsignore.
941 * .gitignore: New.
942 * build-aux/.gitignore: New.
943 * data/.gitignore: New.
944 * doc/.gitignore: New.
945 * etc/.gitignore: New.
946 * examples/.gitignore: New.
947 * examples/calc++/.gitignore: New.
948 * lib/.gitignore: New.
949 * m4/.gitignore: New.
950 * po/.gitignore: New.
951 * runtime-po/.gitignore: New.
952 * src/.gitignore: New.
953 * tests/.gitignore: New.
954
955 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
956
957 * NEWS (2.3b+): New section, empty for now.
958 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
959
960 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
961
962 * NEWS (2.3b): Update release date since there has been a delay in
963 getting the announcements and tarballs out.
964
965 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
966
967 * NEWS: Version 2.3b.
968 * configure.ac (AC_INIT): Likewise.
969 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
970
971 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
972
973 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
974 been doing it for years.
975 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
976 (Release Procedure): Add FIXME about make alpha being unmaintained.
977
978 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
979
980 * data/yacc.c: Reformat m4 a little for readability.
981 * src/lalr.c (build_relations): Correct comment.
982
983 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
984
985 DJGPP specific issue.
986 * djgpp/config.sed: Fixes required to run configure scripts generated
987 by autoconf 2.62.
988
989 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
990
991 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
992 coordinator@translationproject.org.
993
994 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
995
996 * THANKS: Add Eric Blake.
997
998 2008-04-23 Eric Blake <ebb9@byu.net>
999
1000 Revert prior patch, by working around autoconf regression.
1001 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
1002 ("Output file name: ("): Uncomment test.
1003 ("Output file name: )"): Likewise.
1004 Based on an idea from Noah Misch.
1005
1006 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1007
1008 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
1009 2.61. Reported by Juan Manuel Guerrero at
1010 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
1011 * tests/output.at ("Output file name: ("): Comment out test case for
1012 now.
1013 ("Output file name: )"): Likewise.
1014
1015 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1016
1017 * GNUmakefile: Update git-version-gen invocation so make dist
1018 succeeds.
1019
1020 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1021
1022 Update to the current gnulib CVS repository, and fix trigraph handling
1023 in Bison.
1024 * bootstrap: Update gnulib CVS repository URL.
1025 (symlink_to_dir): Encapsulate the code that guarantees the destination
1026 directory exists into...
1027 (check_dst_dir): ... this new function, and...
1028 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
1029 fail when copying files into lib/uniwidth/.
1030 * src/output.c (prepare_symbols): When writing yytname muscles, where
1031 symbol names will be encoded in C-string literals, tell quotearg to
1032 escape trigraphs. This used to be the default in gnulib.
1033 * tests/regression.at (Token definitions): Because of the change in
1034 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
1035 escapes trigraphs in symbol names. Thus, yytname no longer has
1036 trigraphs unnecessarily doubly escaped. Update test case output.
1037 Extend test case to be sure Bison's own error messages will no longer
1038 have trigraphs in symbol names unnecessarily escaped once.
1039
1040 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1041
1042 Fix make dist infinite loop reported by Juan Manuel Guerrero at
1043 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
1044 * .cvsignore: Add .version.
1045 * .version.in: New.
1046 * bootstrap.conf (gnulib_modules): Add git-version-gen.
1047 * configure.ac (AC_CONFIG_FILES): Add .version.
1048 * build-aux/.cvsignore: Add git-version-gen.
1049
1050 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
1051
1052 * NEWS (2.3a+): Mention that -g now takes an argument.
1053 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
1054 consistency. Update the -g and -x entries now that they take
1055 arguments. Use brackets to indicate optional arguments.
1056 * src/getargs.c (usage): Explain the relationship between arguments of
1057 long and short options more completely. Document --defines and -d
1058 separately since the former takes an argument but, for POSIX Yacc, the
1059 latter does not.
1060 (short_options): Let -W take an optional argument like --warnings.
1061 (getargs): Sort cases.
1062
1063 2008-02-28 Akim Demaille <demaille@gostai.com>
1064
1065 * doc/bison.texinfo: Fix a few typos.
1066
1067 2008-02-28 Akim Demaille <akim@epita.fr>
1068
1069 * doc/bison.texinfo (Bison Options): Document -W.
1070 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
1071
1072 2008-02-28 Akim Demaille <akim@epita.fr>
1073
1074 * src/getargs.c (short_options): Split and sort for readability.
1075 -g and -x take optional arguments, just like their long options.
1076 * build-aux/cross-options.pl: Use /x to make the regexp easier to
1077 understand.
1078 Fix the handling of $opt which resulted in all the argument to be
1079 considered as optional.
1080
1081 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1082
1083 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
1084 say its interface is experimental.
1085 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
1086 Java.
1087 (Bison Options): In the -L and --language entry, mention Java.
1088 (Java Bison Interface): Say the interface is experimental.
1089 * src/getargs.c (usage): Mention -L and --language.
1090
1091 * NEWS (2.3a+): Say the push parsing interface is experimental.
1092 * doc/bison.texinfo (Push Decl): Likewise.
1093 (Decl Summary): Likewise in the "%define api.push_pull" entry.
1094 (Push Parser Function): Likewise.
1095 (Pull Parser Function): Likewise.
1096 (Parser Create Function): Likewise.
1097 (Parser Delete Function): Likewise.
1098 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
1099 yypull_parse, and yypush_parse entries.
1100
1101 * NEWS (2.3a+): Mention XML support, and say the schema is
1102 experimental.
1103 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
1104 * src/getargs.c (usage): Say the XML schema is experimental.
1105
1106 * NEWS (2.3a+): Say option instead of flag.
1107
1108 2008-02-21 Wojciech Polak <polak@gnu.org>
1109
1110 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
1111 text.
1112
1113 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
1114
1115 Fix impure push parser compile error reported by Bob Rossi at
1116 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
1117 * data/yacc.c: Clean up whitespace in the output a little.
1118 (yypstate_allocated): Define for impure push parsers regardless of
1119 whether the pull interface is also requested.
1120 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
1121 check impure push parsers without the pull interface.
1122
1123 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
1124 yyerror takes arguments specified by %parse-param while yypstate_new
1125 does not.
1126 * doc/bison.texinfo (Parser Create Function): Document that
1127 yypstate_new returns 0 for multiple impure parser instances.
1128 * tests/push.at (Push Parsing: Multiple impure instances): Update
1129 expected stderr output.
1130
1131 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1132
1133 * runtime-po/POTFILES.in (push.c): Remove.
1134
1135 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
1136
1137 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
1138 * data/push.c: Rename to...
1139 * data/yacc.c: ... this, overwriting it.
1140 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
1141 `%push-pull-parser' -> `%define api.push_pull "both"'.
1142 Remove old yacc.c tests, and update push.c tests to yacc.c.
1143
1144 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
1145
1146 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
1147 `"%code top" blocks' instead of `%code "top" blocks'.
1148 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
1149 Clean up whitespace in the output a little.
1150
1151 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
1152
1153 Fix documentation problems reported by Tim Josling at
1154 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
1155 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
1156 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
1157 integers. Explain the effect of literal string aliases on error
1158 messages. Copy token 0 documentation from the C++ skeleton
1159 documentation.
1160
1161 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
1162
1163 Accept a token number in a %left, %right, or %nonassoc for POSIX
1164 conformance. Reported by Tim Josling at
1165 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
1166 * NEWS (2.3a+): Mention.
1167 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
1168 and code numbers are treated by precedence declarations.
1169 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
1170 of symbols.1.
1171 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
1172 of symbol.
1173 (symbol.prec): New, just like symbol but allows INT.
1174 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
1175 longer holds.
1176 * tests/regression.at (Token number in precedence declaration): New
1177 test case.
1178
1179 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1180
1181 DJGPP specific issues.
1182 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
1183 be changed. Copyright timestamp adjusted.
1184 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
1185 be changed. Copyright timestamp adjusted.
1186 * djgpp/config.site: Copyright timestamp adjusted.
1187 * djgpp/config_h.sed: Copyright timestamp adjusted.
1188 * djgpp/djunpack.bat: Copyright timestamp adjusted.
1189 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
1190 filename translation list.
1191 * djgpp/subpipe.c (init_subpipe): Check the environment variables
1192 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
1193 files shall be created. Before trying to use the temp dir where the
1194 environment variable points to check that the dir really exists. If
1195 not default to the cwd as temp dir. Copyright timestamp adjusted.
1196 * djgpp/subpipe.h: Copyright timestamp adjusted.
1197 * djgpp/testsuite.sed: Copyright timestamp adjusted.
1198
1199 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
1200
1201 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
1202
1203 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
1204
1205 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
1206 Problem reported by Claudio Saavedra in
1207 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
1208
1209 2008-01-05 Wojciech Polak <polak@gnu.org>
1210
1211 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
1212 document's title with the input grammar file name.
1213
1214 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
1215
1216 Automate regression testing of the XML/XSLT implementation. Discussed
1217 starting at
1218 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
1219 * configure.ac (XSLTPROC): New substitution.
1220 * Makefile.am (maintainer-xml-check): New phony target invoking...
1221 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
1222 invoking make maintainer-check with BISON_TEST_XML=1.
1223 * tests/atlocal.in (XSLTPROC): New.
1224 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
1225 not to report reachable memory when Bison is expected to have a
1226 non-zero exit status and (2) to compare XML/XSLT output with --graph
1227 and --report=all output for every working grammar when
1228 BISON_TEST_XML=1.
1229 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
1230 (AT_BISON_CHECK_XML): New.
1231 (AT_QUELL_VALGRIND): New.
1232 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
1233 (AT_CHECK): ... don't redefine this since this was the old way to
1234 quell Valgrind.
1235 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
1236 AT_BISON_CHECK invocations.
1237 * tests/c++.at: Likewise.
1238 * tests/calc.at: Likewise.
1239 * tests/conflicts.at: Likewise.
1240 * tests/cxx-type.at: Likewise.
1241 * tests/existing.at: Likewise.
1242 * tests/glr-regression.at: Likewise.
1243 * tests/headers.at: Likewise.
1244 * tests/input.at: Likewise.
1245 * tests/java.at: Likewise.
1246 * tests/output.at: Likewise.
1247 * tests/push.at: Likewise.
1248 * tests/reduce.at: Likewise.
1249 * tests/regression.at: Likewise.
1250 * tests/sets.at: Likewise.
1251 * tests/skeletons.at: Likewise.
1252 * tests/synclines.at: Likewise.
1253 * tests/torture.at: Likewise.
1254 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
1255 tends to hang xsltproc.
1256 (Big horizontal): Likewise.
1257
1258 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
1259
1260 In XML output, remove redundant class attribute on symbol element.
1261 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
1262 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
1263 look up a symbol to determine whether it's a nonterminal or terminal.
1264 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
1265 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
1266
1267 Add prec/assoc information to XML output.
1268 * src/gram.c (grammar_rules_print_xml): For each rule that has a
1269 %prec, add a percent_prec attribute.
1270 * src/print-xml.c (print_grammar): For each terminal that has a
1271 precedence or associativity, add a prec or assoc attribute.
1272 (xml_indent): New.
1273 (xml_puts): Use xml_indent.
1274 (xml_printf): Use xml_indent.
1275 * src/print-xml.h (xml_indent): Prototype.
1276
1277 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
1278 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
1279
1280 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
1281
1282 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
1283 (bison:ruleByNumber): ... this for clarity.
1284 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
1285 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
1286 (xsl:template match="reduction"): Update.
1287 (xsl:template match="item"): Update.
1288 (xsl:template match="reduction"): Update.
1289
1290 In the XML output, don't print the list of rules where symbols appear.
1291 Compute it in XSLT instead. Discussed at
1292 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
1293 * data/xslt/bison.xsl (bison:ruleByLhs): New.
1294 (bison:ruleByRhs): New.
1295 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
1296 bison:ruleByRhs.
1297 (xsl:template match="terminal/rule"): Remove.
1298 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
1299 bison:ruleByRhs.
1300 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
1301 Remove.
1302 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
1303 bison:ruleByRhs and mode="number-link" for rule template.
1304 (xsl:template match="terminal/rule"): Remove.
1305 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
1306 bison:ruleByRhs and mode="number-link" for rule template.
1307 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
1308 Rewrite as...
1309 (xsl:template match="rule" mode="number-link"): ... this.
1310 * src/print-xml.c (print_grammar): Don't print the list of rules.
1311
1312 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
1313
1314 Don't let --report affect XML output; always print all information.
1315 Discussed at
1316 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
1317 * src/conflicts.c (log_resolution): Implement.
1318 * src/print-xml.c (print_core): Implement.
1319 (print_state): Implement.
1320 (print_xml): Implement.
1321
1322 * NEWS (2.3a+): Fix quotes.
1323 * src/parse-gram.y (prologue_declaration): For consistency with -v,
1324 don't let %verbose clear the list specified by --report.
1325
1326 2007-11-26 Akim Demaille <akim@epita.fr>
1327
1328 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
1329
1330 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
1331
1332 In the XML output, list useless and unused symbols and rules with the
1333 useful ones and add a "usefulness" attribute. Discussed starting at
1334 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
1335 * src/gram.c (grammar_rules_partial_print_xml): Remove.
1336 (grammar_rules_print_xml): Print all rules instead of just those
1337 useful in the grammar, and add a "usefulness" attribute.
1338 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
1339 * src/print-xml.c (print_rules_useless_in_parser): Remove.
1340 (print_grammar): Print all nonterminals instead of just useful ones,
1341 and add a "usefulness" attribute to nonterminals and terminals.
1342 (print_xml): Don't print a separate "reductions" or
1343 "rules-useless-in-parser" element.
1344 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
1345 (reduce_xml): Remove.
1346 (reduce_token_unused_in_grammar): New.
1347 (reduce_nonterminal_useless_in_grammar): New.
1348 * src/reduce.h (reduce_xml): Remove prototype.
1349 (reduce_token_unused_in_grammar): Add prototype.
1350 (reduce_nonterminal_useless_in_grammar): Add prototype.
1351 * data/xslt/xml2text.xsl: Update for XML changes.
1352 * data/xslt/xml2xhtml.xsl: Update for XML changes.
1353 * tests/reduce.at (Useless Terminals): Update output.
1354 (Useless Rules): Update output.
1355 (Reduced Automaton): Update output.
1356
1357 Say "Terminals unused in grammar" instead of "Unused terminals".
1358 * NEWS (2.3a+): Update.
1359 * doc/bison.texinfo (Understanding): Update example output.
1360 * src/reduce.c (reduce_output): Implement.
1361 * data/xslt/xml2text.xsl: Implement.
1362 * data/xslt/xml2xhtml.xsl: Implement.
1363
1364 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1365
1366 Accept --report-file=FILE to override the default `.output' filename.
1367 * NEWS (2.3a+): Mention.
1368 * doc/bison.texinfo (Bison Options): Add an entry.
1369 * src/files.c (compute_output_file_names): Don't override
1370 spec_verbose_file if already set.
1371 * src/getargs.c (usage): Document --report-file.
1372 (REPORT_FILE_OPTION): New anonymous enum member.
1373 (long_options): Add entry for it.
1374 (getargs): Add case for it setting spec_verbose_file.
1375
1376 * build-aux/cross-options.pl: Don't record a short option just because
1377 there's an arg.
1378 * doc/.cvsignore: Add yacc.1.
1379
1380 2007-11-14 Akim Demaille <akim@epita.fr>
1381
1382 * doc/yacc.1.in: New.
1383 * configure.ac, doc/Makefile.am: Adjust.
1384 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
1385 config.h symbol.
1386 Use AC_SUBST for assignments too.
1387 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
1388
1389 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
1390
1391 * src/gram.c: Remove comments that duplicate comments in gram.h.
1392
1393 When reporting useless rules and nonterminals, say "useless in grammar"
1394 instead of "useless", and say "useless in parser" instead of "never
1395 reduced". Discussed starting at
1396 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
1397 * NEWS (2.3a+): Mention this change.
1398 * data/xslt/xml2text.xsl: Update output text and expected input XML
1399 element names to match changes below.
1400 * data/xslt/xml2xhtml.xsl: Likewise.
1401 (xsl:template match="bison-xml-report"): Add missing entry in Table of
1402 Contents: "Rules useless in parser due to conflicts".
1403 * doc/bison.texinfo (Decl Summary): Reword a little.
1404 (Understanding): Update example output for changes below.
1405 * src/gram.c: (rule_useful_p): Rename to...
1406 (rule_useful_in_grammar_p): ... this.
1407 (rule_useless_p): Rename to...
1408 (rule_useless_in_grammar_p): ... this.
1409 (rule_never_reduced_p): Rename to...
1410 (rule_useless_in_parser_p): ... this.
1411 (grammar_rules_print): Update for renames.
1412 (grammar_rules_print_xml): Update for renames.
1413 (grammar_rules_never_reduced_report): Rename to...
1414 (grammar_rules_useless_report): ... this since it is used for either
1415 kind of useless rule.
1416 * src/gram.h: Reword comments and update function names in prototypes.
1417 * src/main.c (main): Say "rule useless in parser due to conflicts".
1418 * src/print-xml.c (print_rules_never_reduced): Rename to...
1419 (print_rules_useless_in_parser): ... this, and rename output XML
1420 element "rules-never-reduced" to "rules-useless-in-parser".
1421 (print_xml): Update for rename.
1422 * src/print.c (print_results): Say "Rules useless in parser due to
1423 conflicts".
1424 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
1425 (nonterminals_reduce): Say "nonterminal useless in grammar".
1426 (reduce_output): Say "Nonterminals useless in grammar".
1427 Say "Rules useless in grammar".
1428 (reduce_xml): Rename output XML element "useless" to
1429 "useless-in-grammar".
1430 (reduce_print): Don't report the count of grammatically useless rules
1431 as "rules never reduced" just because %yacc is specified.
1432 In the correct report of this count, say nonterminal(s) and rule(s)
1433 "useless in grammar".
1434 * tests/conflicts.at (S/R in initial): Update expected output.
1435 (Defaulted Conflicted Reduction): Likewise.
1436 (Unreachable States After Conflict Resolution): Likewise.
1437 * tests/existing.at (GNU pic Grammar): Likewise.
1438 * tests/reduce.at (Useless Nonterminals): Likewise.
1439 (Useless Rules): Likewise.
1440 (Reduced Automaton): Likewise.
1441 (Underivable Rules): Likewise.
1442 (Empty Language): Likewise.
1443
1444 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
1445
1446 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
1447 here document and before the EOF so that BSD's implementation of Bourne
1448 shell doesn't parse the delimiter as part of the here document.
1449 * doc/.cvsignore: Add cross-options.texi.
1450 * src/getargs.c (usage): Add a blank line after the warning categories.
1451
1452 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
1453
1454 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
1455
1456 2007-11-05 Akim Demaille <akim@epita.fr>
1457
1458 Remove Id: from bison.1.
1459 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
1460 (perl -0777 -pi -e 's/\.PP\nId): New.
1461 (.x.1): Use it to ignore the version control revision.
1462
1463 2007-11-05 Akim Demaille <demaille@gostai.com>
1464
1465 * build-aux/Makefile.am: Ship cross-options.pl.
1466 * doc/Makefile.am: Always refer to cross-options.texi with
1467 $(srcdir).
1468 (MAINTAINERCLEANFILES): Add it.
1469
1470 2007-11-04 Akim Demaille <demaille@gostai.com>
1471
1472 Generate the long/short option cross-table.
1473 * build-aux/cross-options.pl: New.
1474 * doc/Makefile.am (cross-options.texi): New.
1475 * doc/bison.texinfo: Use it.
1476
1477 2007-11-04 Akim Demaille <demaille@gostai.com>
1478
1479 Generate bison.1 using help2man.
1480 * doc/common.x, doc/bison.x: New.
1481 * doc/Makefile.am (bison.1, .x.1): New.
1482 The code is taken from autoconf-2.61/man/Makefile.am.
1483 * configure.ac: Look for help2man.
1484
1485 2007-11-04 Akim Demaille <demaille@gostai.com>
1486
1487 Complete --help.
1488 * src/getargs.c (usage): Document -W, make it clear that -d,
1489 -g and -x have optional arguments.
1490
1491 2007-11-04 Akim Demaille <demaille@gostai.com>
1492
1493 Find sha1sum when named gsha1sum.
1494 * bootstrap (find_tool): New.
1495 ($SHA1SUM): New.
1496
1497 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1498
1499 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
1500 at
1501 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
1502 * NEWS (2.3a+): Mention.
1503 * data/bison.m4 (b4_pure_if): Don't define it here.
1504 * data/c.m4 (b4_identification): Depend on individual skeletons to
1505 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
1506 values of the %define variables api.pure or api.push_pull. Define
1507 YYPURE, YYPUSH, and YYPULL accordingly.
1508 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
1509 glr.cc has already defined b4_pure_flag.
1510 * data/push.c: Define b4_pure_if based on `%define api.pure'.
1511 Remove YYPUSH and YYPULL since they're back in b4_identification again.
1512 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
1513 * doc/bison.texinfo (Pure Decl): Update.
1514 (Push Decl): Update.
1515 (Decl Summary): Add api.pure to %define entry.
1516 In %pure-parser entry, say it's deprecated and reference %define.
1517 (Pure Calling): Update.
1518 (Error Reporting): Update.
1519 (C++ Scanner Interface): Update.
1520 (How Can I Reset the Parser): Update.
1521 (Table of Symbols): In %pure-parser entry, say it's deprecated and
1522 reference %define.
1523 * src/getargs.c (pure_parser): Remove global variable.
1524 * src/getargs.h (pure_parser): Remove extern.
1525 * src/output.c (prepare): Don't define pure_flag muscle.
1526 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
1527 wrapper around `%define api.pure'.
1528 * tests/calc.at (Simple LALR Calculator): Update.
1529 (Simple GLR Calculator): Update.
1530 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
1531 Update.
1532 (GLR: Resolve ambiguity, pure, locations): Update.
1533 (GLR: Merge conflicting parses, pure, no locations): Update.
1534 (GLR: Merge conflicting parses, pure, locations): Update.
1535 * tests/glr-regression.at (Uninitialized location when reporting
1536 ambiguity): Update
1537 * tests/input.at (Unused %define api.pure): New test case.
1538 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
1539 AT_PURE_IF and AT_PURE_AND_LOC_IF.
1540 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
1541
1542 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1543
1544 %define push_pull -> %define api.push_pull. Discussed starting at
1545 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
1546 * data/push.c: Expect the new name.
1547 * data/yacc.c: Likewise.
1548 * doc/bison.texinfo (Push Decl): Update.
1549 (Decl Summary): Update %define entry.
1550 (Push Parser Function): Update.
1551 (Pull Parser Function): Update.
1552 (Parser Create Function): Update.
1553 (Parser Delete Function): Update.
1554 * tests/calc.at (Simple LALR Calculator): Update.
1555 * tests/input.at (%define enum variables): Update.
1556 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
1557 (Push Parsing: Multiple impure instances): Update.
1558 (Push Parsing: Unsupported Skeletons): Update.
1559 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
1560 (Exploding the Stack Size with Malloc): Update.
1561
1562 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
1563 other entries some.
1564
1565 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
1566
1567 For the XML output's terminal element, rename @number to @token-number,
1568 and add @symbol-number. In the nonterminal element, rename @number to
1569 @symbol-number. Discussed starting at
1570 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
1571 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
1572 renames.
1573 (xsl:template match="nonterminal"): Likewise.
1574 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
1575 (xsl:template match="nonterminal"): Likewise.
1576 * src/print-xml.c (print_grammar): Implement.
1577
1578 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
1579
1580 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
1581 2007-10-11 change, the child elements here are items not rules.
1582 (xsl:template match="item"): New.
1583 (xsl:template match="rule"): Update for new reduced itemset.
1584 (xsl:template match="point"): Remove.
1585 (xsl:template match="empty"): For consistency with --graph, don't
1586 output "/* empty */".
1587 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
1588 line-wrap, don't pass a negative value as first-line-length since this
1589 won't work with the following changes.
1590 (xsl:template name="line-wrap"): Simplify slightly.
1591 (xsl:template name="ws-search"): Eliminate recursion.
1592 * src/print_graph.c (print_core): Don't print a reduction's lookahead
1593 set next to an item whose dot is not at the end of the RHS even if it
1594 happens to be associated with the same rule.
1595
1596 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
1597
1598 Add %define lr.keep_unreachable_states.
1599 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
1600 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
1601 * src/main.c (main): Implement it.
1602 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1603 Extend to test it, and fix a typo.
1604
1605 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
1606
1607 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
1608 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
1609 the example .output text.
1610 * tests/regression.at (Extra lookahead sets in report): Improve wording
1611 of comments.
1612
1613 2007-10-17 Wojciech Polak <polak@gnu.org>
1614
1615 * src/print-xml.c (print_grammar): Renamed
1616 <terminal> and <nonterminal> attributes:
1617 "type" to "number" and "symbol" to "name".
1618 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
1619 Use new attribute names.
1620 (xsl:template match="nonterminal"): Likewise.
1621 * data/xslt/xml2xhtml.xsl: Likewise.
1622
1623 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
1624
1625 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
1626 (Option Cross Key): Likewise.
1627
1628 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
1629 next to an item whose dot is not at the end of the RHS even if it
1630 happens to be associated with the same rule.
1631 * src/print.c (print_core): Likewise.
1632 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
1633 (Resolved SR Conflicts): Update output.
1634 * tests/regression.at (Extra lookahead sets in report): New test case.
1635
1636 2007-10-11 Wojciech Polak <polak@gnu.org>
1637
1638 * src/print-xml.c (print_core): Remove item set
1639 redundancy.
1640 * data/xslt/bison.xsl (bison:ruleNumber): New key.
1641 Improve processing time. Suggested by Joel E. Denny.
1642 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
1643 Write xsl:param "required" attribute as comment.
1644 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
1645 (xsl:template match="rule"): Support new reduced itemset.
1646 (xsl:template match="point"): Remove.
1647 * data/xslt/xml2xhtml.xsl: Likewise.
1648
1649 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
1650
1651 * src/getargs.c (version): Update copyright year.
1652
1653 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
1654
1655 Make xml2dot.xsl and --graph produce the same output.
1656 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
1657 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
1658 escaped later.
1659 (xsl:template name="output-node"): Use the new escape template instead
1660 of the string-replace template directly.
1661 (xsl:template name="output-edge"): Likewise.
1662 (xsl:template name="escape"): New, escapes backslashes and newlines in
1663 addition to quotation marks.
1664 * src/graphviz.c (start_graph, output_node, output_edge): Add
1665 whitespace to output for legibility.
1666
1667 Make xml2text.xsl and --report produce the same output, and remove the
1668 XML "conflicts" element since a conflict summary is easily extracted
1669 from the automaton.
1670 * data/xslt/bison.xsl: New.
1671 (xsl:template match="state" mode="bison:count-conflicts): New.
1672 * data/xslt/xml2text.xsl: Import bison.xsl.
1673 (xsl:template match="bison-xml-report"): Instead of styling the
1674 "conflicts" element, style the "automaton" element with mode
1675 "conflicts". Unlike the former, the latter lists S/R and R/R
1676 conflicts for a state on the same line.
1677 (xsl:template match="conflicts"): Remove.
1678 (xsl:template match="conflict"): Remove.
1679 (xsl:template match="terminal"): Line-wrap the list of rules in which
1680 the terminal is used.
1681 (xsl:template match="nonterminal"): Likewise for nonterminals.
1682 (xsl:template match="automaton" mode="conflicts"): New.
1683 (xsl:template match="state" mode="conflicts"): New.
1684 (xsl:template name="line-wrap"): New.
1685 (xsl:template name="ws-search"): New.
1686 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
1687 (xsl:template match="bison-xml-report"): Instead of styling the
1688 "conflicts" element, style the "automaton" element with mode
1689 "conflicts."
1690 (xsl:template match="conflicts"): Remove.
1691 (xsl:template match="conflict"): Remove.
1692 (xsl:template match="automaton" mode="conflicts"): New.
1693 (xsl:template match="state" mode="conflicts): New.
1694 * src/conflicts.c (conflicts_output_xml): Remove.
1695 * src/conflicts.h (conflicts_output_xml): Remove prototype.
1696 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
1697 * src/print.c (print_grammar): Consistently wrap at the 66th column so
1698 the corresponding XSLT is easier. Also, never wrap between a word and
1699 the comma that follows it.
1700
1701 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
1702
1703 Improve C++ namespace support. Discussed starting at
1704 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
1705 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
1706 b4_namespace_close): New macros that interpret the %define variable
1707 "namespace" so its value can contain "::" to indicate nested
1708 namespaces.
1709 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
1710 the above macros.
1711 * data/lalr1.cc (b4_namespace): Likewise.
1712 * data/location.cc (b4_namespace): Likewise.
1713 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
1714 inside a new table in the general %define entry. Document `%define
1715 namespace' there as well. Point the %name-prefix entry to it since it
1716 explains it more completely in the case of C++.
1717 (C++ Bison Interface): Mention `%define namespace' instead of
1718 %name-prefix.
1719 (Table of Symbols): Remove the `%define push_pull' entry. The %define
1720 entry suffices.
1721 * tests/c++.at (Relative namespace references): New test case.
1722 (Absolute namespace references): New test case.
1723 (Syntactically invalid namespace references): New test case.
1724 * tests/input.at (C++ namespace reference errors): New test case.
1725
1726 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
1727
1728 Add syncline support and location accessor to internal %define
1729 interfaces.
1730 * data/bison.m4 (b4_percent_define_get_loc): New.
1731 (b4_percent_define_get_syncline): New.
1732 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
1733 (b4_percent_define_default): Record defining location as line 1 rather
1734 than 0 for the sake of synchronizing #line's, and define
1735 b4_percent_define_syncline(VARIABLE).
1736 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
1737 * src/muscle_tab.c (muscle_syncline_grow): New.
1738 (muscle_code_grow): Use muscle_syncline_grow.
1739 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
1740 define b4_percent_define_syncline(VARIABLE).
1741 (muscle_percent_define_get_loc): New.
1742 (muscle_percent_define_get_syncline): New.
1743 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
1744 remove some unused variables.
1745 (muscle_percent_define_default): Record defining location as line 1
1746 rather than 0 for the sake of synchronizing #line's, and define
1747 b4_percent_define_syncline(VARIABLE).
1748 (muscle_percent_define_check_values): Use
1749 muscle_percent_define_get_loc.
1750 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
1751 (muscle_percent_define_get_syncline): Prototype.
1752 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1753 defaults): Update output for location change.
1754 (Complaining during macro argument expansion): Extend to test
1755 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
1756
1757 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
1758
1759 Fix some error-reporting macro bugs.
1760 * data/bison.m4 (b4_cat): New.
1761 (b4_error, b4_error_at): Use b4_cat to send error directives directly
1762 to stdout so they don't become arguments to other macros. Update
1763 comments and add examples.
1764 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
1765 add examples.
1766 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
1767 after printing the error directive so that M4 doesn't report subsequent
1768 problems that are induced by this problem.
1769 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
1770 instead of just in them. Recognize @\n in both places. Both expand to
1771 the empty string. Needed by b4_cat.
1772 * tests/skeletons.at (Complaining during macro argument expansion):
1773 New test case.
1774 (Fatal errors make M4 exit immediately): New test case.
1775
1776 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
1777
1778 Implement --print-datadir.
1779 * src/getargs.c (usage): Mention.
1780 (PRINT_DATADIR_OPTION): New anonymous enum member.
1781 (long_options): Add entry for it.
1782 (getargs): Add case for it calling compute_pkgdatadir.
1783 * src/output.c (output_skeleton): Encapsulate data directory
1784 computation from here...
1785 (prepare): ... and from here...
1786 (compute_pkgdatadir): ... into this new function.
1787 * src/output.h (compute_pkgdatadir): Prototype.
1788
1789 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
1790
1791 * src/print-xml.c (escape_bufs): New static global variable
1792 replacing...
1793 (xml_escape_n): ... the static local variable buf here.
1794 (print_xml): Free memory for escape_bufs.
1795 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
1796
1797 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
1798
1799 Replace `%push-parser' and `%push-pull-parser' with
1800 `%define push_pull "push"' and `%define push_pull "both"'.
1801 `%define push_pull "pull"' is the default.
1802 * doc/bison.texinfo (Push Decl, Push Parser Function,
1803 Pull Parser Function, Parser Create Function, Parser Delete Function):
1804 Update declarations.
1805 (Decl Summary, Table of Symbols): Replace %push-parser and
1806 %push-pull-parser entries with a %define push_pull entry.
1807 * data/bison.m4 (b4_percent_define_check_values): New macro.
1808 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
1809 definitions...
1810 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
1811 definitions...
1812 * data/push.c: ... to here and compute them from the value of the
1813 %define variable push_pull.
1814 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
1815 parsing requests here...
1816 * data/yacc.c: ... hack this to switch to push.c any time
1817 b4_use_push_pull_flag or the %define variable push_pull is set. This
1818 will go away when we mv push.c yacc.c.
1819 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
1820 push parsing is not supported since unused %define variables are
1821 reported anyway.
1822 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
1823 * src/muscle_tab.h (muscle_percent_define_check_values): Update
1824 comments for consistency with b4_percent_define_check_values.
1825 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
1826 muscles.
1827 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
1828 Remove.
1829 (prologue_declaration): Remove %push-parser and %push-pull-parser
1830 rules.
1831 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
1832 * tests/calc.at: Update declarations.
1833 * tests/input.at (%define enum variables): New test case.
1834 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
1835 declaration.
1836 (Push Parsing: Multiple impure instances): Update declaration.
1837 (Push Parsing: Unsupported Skeletons): New test case.
1838 * tests/torture.at (Exploding the Stack Size with Alloca): Update
1839 declaration.
1840 (Exploding the Stack Size with Malloc): Update declaration.
1841
1842 2007-09-24 Wojciech Polak <polak@gnu.org>
1843
1844 Add XSLT transformations.
1845
1846 * data/xslt/xml2dot.xsl: Transform XML into DOT.
1847 * data/xslt/xml2text.xsl: Transform XML into plain text.
1848 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
1849 * data/Makefile.am (xsltdir): New variable.
1850 (dist_xslt_DATA): Add xslt/*.xsl files.
1851
1852 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
1853
1854 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
1855 Problem reported by Wojciech Polak.
1856 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
1857 (xml_printf): Undo change I made on 21 September; that is,
1858 indent 2 spaces, not 1.
1859
1860 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
1861
1862 Pacify ./configure --enable-gcc-warnings.
1863 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
1864 `char const *' instead of `char *'.
1865 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
1866 local variable `sep'.
1867
1868 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
1869
1870 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
1871 elsewhere.
1872 * src/print-xml.c: Prefer "const" after types; that's more consistent.
1873 (xml_printf): Indent just 1 space for level.
1874 (e_char, xlate_char): Remove.
1875 (xml_escape_string): Rewrite to avoid undefined behavior (used
1876 storage that was freed from the stack).
1877 (xml_escape_n): Don't bother checking for subscript error.
1878
1879 2007-09-21 Wojciech Polak <polak@gnu.org>
1880
1881 Add Bison XML Automaton Report.
1882
1883 Add support for an -x option to generate an XML report.
1884 It is not documented yet.
1885 * src/print-xml.c: New file.
1886 * src/print-xml.h: Likewise.
1887 * lib/timevar.def (TV_XML): New var.
1888 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
1889 * src/conflicts.c: Include print-xml.h.
1890 (solved_conflicts_xml_obstack): New var.
1891 (log_resolution, conflicts_solve, conflicts_free):
1892 Add support for XML report.
1893 (conflicts_output_val): New function.
1894 * src/conflicts.h (conflicts_output_val): New decl.
1895 * src/files.c (spec_xml_file): New var.
1896 (compute_output_file_names, output_file_names_free): Add XML support.
1897 * src/files.h (spec_xml_file): New decl.
1898 * src/getargs.c (xml_flag): New var.
1899 (usage, short_options, long_options, getargs): Add XML support.
1900 * src/getargs.h (xml_flag): New decl.
1901 * src/gram.c: Include print-xml.h.
1902 (rule_lhs_print_xml, rule_rhs_print_xml):
1903 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
1904 New functions.
1905 * src/gram.h: Declare external ones.
1906 * src/main.c: Include print-xml.h.
1907 (main): Add XML support.
1908 * src/reduce.c: Include print-xml.h.
1909 (reduce_xml): New function.
1910 * src/reduce.h: Declare it.
1911 * src/state.c: Include print-xml.h.
1912 (state_new): Add XML support.
1913 (state_rule_lookahead_tokens_print_xml): New function.
1914 * src/state.h: Declare it.
1915 (struct state): New member solved_conflicts_xml.
1916 * src/symtab.c (symbol_class_get_string): New function.
1917 * src/symtab.h: Declare it.
1918
1919 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
1920
1921 * GNUmakefile: Switch to coreutils's version.
1922 * bootstrap: Likewise.
1923 * Makefile.cfg: Adjust to new GNUmakefile.
1924 * README-hacking: Likewise.
1925
1926 Import from gnulib:
1927
1928 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
1929 Bruno Haible <bruno@clisp.org>
1930
1931 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
1932 and is a script that invokes bison. Tighten the code. Add comments.
1933
1934 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
1935
1936 Spell "boolean" as "Boolean". Reported by Akim Demaille.
1937 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
1938 * doc/bison.texinfo (Decl Summary): Fix.
1939 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
1940 * tests/input.at (Boolean %define variables): Update output.
1941 * tests/skeletons.at (%define boolean variables: invalid skeleton
1942 defaults): Rename to...
1943 (%define Boolean variables: invalid skeleton defaults): ... this and
1944 update output.
1945
1946 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
1947
1948 In impure push mode, don't allow more than one yypstate to be allocated
1949 since multiple impure parsers would corrupt yynerrs.
1950 * data/push.c (yypstate_allocated): New static global variable
1951 initialized to 0.
1952 (yypull_parse): If yypstate_new returns 0, don't report it as memory
1953 exhaustion if yypstate_allocated is 1, but still return 2.
1954 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
1955 already 1. Otherwise, set it to 1.
1956 (yypstate_delete): Set it to 0.
1957 * tests/push.at (Push Parsing: Multiple impure instances): New test
1958 case.
1959
1960 2007-08-17 Bob Rossi <bob@brasko.net>
1961
1962 * doc/bison.texinfo (Push Decl): Document the push parser.
1963 (Table of Symbols): Ditto.
1964 (Pure Decl): Ditto.
1965 (Decl Summary): Ditto.
1966 (Multiple Parsers, Push Parser Function, Pull Parser Function,
1967 Parser Create Function, Parser Delete Function):
1968 Add new push parser symbols.
1969 (Table of Symbols): Document push-parser, push-pull-parser,
1970 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
1971
1972 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
1973
1974 Update to GPLv3.
1975 * doc/gpl-3.0.texi: New file.
1976 * doc/gpl.texi: Remove.
1977 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
1978 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
1979 * README-hacking, TODO, bootstrap, bootstrap.conf:
1980 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
1981 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
1982 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
1983 * data/lalr1.cc, data/lalr1.java, data/location.cc:
1984 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
1985 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
1986 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
1987 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
1988 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
1989 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
1990 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
1991 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
1992 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
1993 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
1994 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
1995 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
1996 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
1997 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
1998 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
1999 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
2000 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
2001 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
2002 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
2003 * src/complain.c, src/complain.h, src/conflicts.c:
2004 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
2005 * src/files.h, src/flex-scanner.h, src/getargs.c:
2006 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
2007 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
2008 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
2009 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
2010 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
2011 * src/print.c, src/print.h, src/print_graph.c:
2012 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
2013 * src/reduce.h, src/relation.c, src/relation.h:
2014 * src/revision.h, src/scan-code.h, src/scan-code.l:
2015 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
2016 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
2017 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
2018 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
2019 * tests/Makefile.am, tests/actions.at, tests/c++.at:
2020 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
2021 * tests/existing.at, tests/glr-regression.at:
2022 * tests/headers.at, tests/input.at, tests/java.at:
2023 * tests/local.at, tests/output.at, tests/push.at:
2024 * tests/reduce.at, tests/regression.at, tests/sets.at:
2025 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
2026 * tests/torture.at:
2027 Update to GPLv3.
2028
2029 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
2030
2031 Get rid of broken %no-parser, -n, and --no-parser implementation and
2032 documentation.
2033 * TODO: Don't mention them.
2034 * doc/bison.1: Likewise.
2035 * doc/bison.texinfo (Decl Summary): Likewise.
2036 (Bison Options): Likewise.
2037 (Option Cross Key): Likewise.
2038 * src/getargs.c (no_parser_flag): Remove global variable.
2039 (usage): Don't print description of -n and --no-parser.
2040 (long_options): Remove --no-parser entry here.
2041 (getargs): Remove -n case in the switch here.
2042 * src/getargs.h (no_parser_flag): Remove extern.
2043 * tests/regression.at (Web2c Actions): Remove comment that mentions
2044 --no-parser.
2045
2046 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
2047
2048 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
2049 name user variables starting with `yy'. Just pass NULL instead of a
2050 dummy local &yylval to yypush_parse.
2051 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
2052 starting with `yy'.
2053
2054 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
2055
2056 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
2057 true since it's then always used regardless of whether yyoverflow is
2058 defined. Reported by Christian Burger at
2059 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
2060 * THANKS: Add Christian Burger.
2061
2062 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
2063 node names: say "Decl Summary" not "Bison Declaration Summary".
2064
2065 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
2066
2067 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
2068 determine whether this function has already complained about an invalid
2069 value for a %define boolean variable, don't check whether Bison has
2070 ever examined the value. As written, the check was a tautology.
2071 Instead, record and check for this complaint using a separate muscle.
2072
2073 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2074
2075 Fix push parsing memory leak reported by Brandon Lucia at
2076 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
2077 * THANKS: Add Brandon Lucia.
2078 * data/push.c (yypstate_delete): Free the stack if it was reallocated
2079 but the parse never completed and thus freed it.
2080 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
2081 * tests/testsuite.at: Include push.at.
2082 * test/push.at: New.
2083 (Push Parsing: Memory Leak for Early Deletion): New test case.
2084
2085 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
2086
2087 Improve handling of multiple S/R conflicts in the same state and of S/R
2088 conflicts involving multiple reductions.
2089 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
2090 set for a state here or Bison will abort if it is reassigned on a
2091 later conflicted reduction in the same state.
2092 Similarly, don't finalize and assign the solved conflicts report here
2093 or it will be lost if it is reassigned on a later conflicted reduction
2094 in the same state.
2095 (set_conflicts): Instead, assign them both here after all S/R conflicts
2096 in the state have been fully examined.
2097 * src/print.c (shift_set): Rename to...
2098 (no_reduce_set): ... this.
2099 (print_reductions): Update for rename, and add %nonassoc error action
2100 tokens to no_reduce_set so that, when printing the first remaining
2101 reduction on an error action token, the reduction is enclosed in
2102 brackets.
2103 (print_results): Update for rename.
2104 * tests/conflicts.at (Solved conflicts report for multiple reductions
2105 in a state): New test case.
2106 (%nonassoc error actions for multiple reductions in a state): New test
2107 case.
2108
2109 * src/main.c (main): Don't depend on C99 features.
2110
2111 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2112
2113 * build-aux/.cvsignore: Add compile.
2114 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
2115 uniwidth.
2116
2117 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
2118
2119 * bootstrap (slurp): Create target directories that don't exist.
2120 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
2121
2122 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
2123
2124 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
2125 than item number.
2126 * closure.c (closure): Likewise.
2127 * state.h (reductions): Comment sorting of rules.
2128 (state): Comment sorting of items.
2129
2130 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
2131
2132 Fix C++ test cases after recent Gnulib changes. Discussed starting at
2133 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
2134 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
2135 definition in order to avoid Gnulib headers since we don't use config.h
2136 here.
2137 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
2138 rather than AT_DATA so that config.h is included.
2139
2140 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
2141
2142 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
2143 instead of fprintf. Guard these functions with #if YYDEBUG instead of
2144 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
2145 and so that YYFPRINTF is guaranteed to be defined here.
2146
2147 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
2148
2149 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
2150 with...
2151 (muscle_percent_define_check_values): ... this more helpful function.
2152 Again, it's not used yet, but it will be.
2153 * src/muscle_tab.h: Likewise.
2154
2155 Improve some comments in parser table construction.
2156 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
2157 (generate_states): Don't mention ruleset, which is internal to closure.
2158 * src/closure.c (closure): Explain sorting of core and itemset, which
2159 is required for this function to behave correctly.
2160 * src/closure.h (closure): Mention sorting.
2161
2162 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
2163
2164 * src/lalr.c (state_lookahead_tokens_count): For code readability,
2165 move the check for disabled transitions to an aver since conflict
2166 resolution hasn't happened yet.
2167
2168 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
2169 labels a state as inconsistent just because it has error transitions.
2170 The original form of this check appeared in revision 1.1 of lalr.c,
2171 which was committed on 1991-12-21. Now (at least), changing the
2172 consistency label on such a state appears to have no useful effect in
2173 any of the places it is examined, which I enumerate below. The key
2174 point to understanding each item in this enumeration is that a state
2175 with an error transition is labelled consistent in the first place only
2176 if it has no rules, so the check cannot matter for states that have
2177 rules. (1) Labelling a state as inconsistent will cause set_conflicts
2178 to try to identify its conflicts, and a state must have *rules* to have
2179 conflicts. (2) Labelling a state as inconsistent will affect how
2180 action_row sets the default *rule* for the state. (3) Labelling a
2181 state as inconsistent will cause build_relations to add lookback edges
2182 to *rules* in that state.
2183 * src/state.h (struct state): Word the comment for member consistent
2184 more carefully.
2185
2186 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2187
2188 Don't depend on C99 features.
2189 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
2190 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
2191 * src/reader.c (check_and_convert_grammar): Fix for-loop.
2192 * src/state.c (state_mark_reachable_states): Fix for-loop.
2193 (state_remove_unreachable_states): Fix for-loop.
2194
2195 Don't widen struct state with member reachable just to temporarily
2196 record reachability. Instead, use a local bitset.
2197 * src/state.h (struct state): Remove member.
2198 * src/state.c (state_new): Don't initialize it.
2199 (state_mark_reachable_states): Rename to...
2200 (state_record_reachable_states): ... this, and use bitset.
2201 (state_remove_unreachable_states): Use bitset.
2202
2203 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
2204
2205 * src/Makefile.am (yacc): Quote target action commands properly so
2206 that the yacc script isn't corrupt. Reported by Hans Aberg at
2207 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
2208
2209 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
2210 the case of pure parsers. Reported by Frans Englich at
2211 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
2212 * THANKS: Add Frans Englich.
2213
2214 * NEWS (2.3a+): In the %code entry, reference section `Bison
2215 Declaration Summary' from the manual now since the %code summary has
2216 moved there.
2217 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
2218 in the rules section must be terminated by semicolons.
2219
2220 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2221
2222 Extend the front-end API for %define variables to more completely
2223 mirror the back-end. This will be useful in the future.
2224 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
2225 Update comments to mention the new front-end counterparts of these
2226 macros.
2227 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
2228 for muscle_string_decode and muscle_location_decode.
2229 (muscle_string_decode): New static function.
2230 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
2231 (muscle_percent_define_get, muscle_percent_define_ifdef): New
2232 functions.
2233 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
2234 muscle_percent_define_get to mimic the b4_percent_define_flag_if
2235 implementation more closely.
2236 (muscle_percent_define_invalid_value): New function.
2237 * src/muscle_tab.h (muscle_percent_define_get,
2238 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
2239 Prototype.
2240
2241 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2242
2243 * NEWS (2.3a+): Mention yesterday's state-removal change.
2244 (2.3a): Remove the %language entry, which was added after 2.3a.
2245 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
2246 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
2247 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
2248 tests/existing.at: Update copyright date.
2249
2250 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2251
2252 If conflict resolution makes states unreachable, remove those states,
2253 report rules that are then unused, and don't report conflicts in those
2254 states.
2255 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
2256 New global function.
2257 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
2258 function.
2259 * src/main.c (main): After conflict resolution, remove the unreachable
2260 states and update all data structures that reference states by number.
2261 * src/state.c (state_new): Initialize each state's reachable member to
2262 false.
2263 (state_mark_reachable_states): New static function.
2264 (state_remove_unreachable_states): New global function.
2265 * src/state.h (struct state): Add member bool reachable.
2266 (state_remove_unreachable_states): Prototype.
2267 * tests/conflicts.at (Unreachable States After Conflict Resolution):
2268 New test case.
2269 * tests/existing.at (GNU pic Grammar): Update test case output now that
2270 an unused rule is discovered.
2271
2272 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2273
2274 Minor code cleanup in parser table construction.
2275 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
2276 (new_itemsets, save_reductions): Update for rename to nitemset.
2277 * src/closure.c (nritemset): Rename to...
2278 (nitemset): ... this since the "r" appears to meaningless and isn't
2279 used in the comments.
2280 (closure): Update for rename.
2281 * src/closure.h (nritemset): Update extern to...
2282 (nitemset): ... this.
2283 * src/lalr.c (LA): Fix a typo in comments.
2284 * src/print.c (print_core): Update for rename to nitemset.
2285 * src/print_graph.c (print_graph): Likewise.
2286 * src/state.h: Fix some typos in header comments.
2287
2288 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
2289
2290 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
2291 still sticks to ASCII. Sorry!
2292
2293 * README-hacking: New file, taken mostly from coreutils, with changes
2294 for Bison. Contains much of the contents of:
2295 * README-cvs: Remove.
2296 * bootstrap: Sync from gnulib.
2297 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
2298 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
2299
2300 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
2301
2302 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
2303 Setzer.
2304 (Java Differences): Fix some typos.
2305 * THANKS: Add Sebastian Setzer.
2306
2307 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
2308
2309 * data/java.m4 (b4_single_class_if): Remove.
2310 (b4_abstract_if): Look at "%define abstract".
2311 (b4_lexer_if): New.
2312 (b4_union_name): Rename...
2313 (b4_yystype): ... to this. Map to "%define stype".
2314 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
2315 b4_maybe_throws): Fix quoting.
2316 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
2317 * data/lalr1.java (Lexer interface): Always define.
2318 (Lexer interface within parser class): Remove.
2319 (YYLexer class): New, used when "%code lexer" is present.
2320 (constructor): When "%code lexer" is used, pass %lex-param
2321 to the lexer constructor.
2322 (yylex, yyparse): Remove %lex-param from method invocations
2323 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
2324
2325 * doc/bison.texinfo (Java Bison Interface): Mention "%define
2326 abstract". Rename "%define union_name" to "%define stype".
2327 Rename method names according to previous patch.
2328 (Java Scanner Interface): Describe "%code lexer" instead of
2329 "%pure-parser" and "%define single_class".
2330 (Java Differences): Mention "%code lexer".
2331
2332 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
2333 Include scanner here, using macros from tests/local.at.
2334 (AT_DATA_CALC_Y): Remove final argument.
2335 (_AT_CHECK_JAVA_CALC): Likewise.
2336 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
2337 of %locations and %error-verbose.
2338 (main): Test with and without %lex-param.
2339 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
2340 (AT_BISON_OPTION_POPDEFS): Pop it.
2341
2342 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2343
2344 DJGPP spefic issue. Inhibit the use of disallowed characters for
2345 file name genertion on Win98, WinXP, etc. These are |<>":?*\
2346 and concern testsuite case 46.
2347 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
2348 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
2349 * djgpp/config.bat: Inhibit the use of disallowed characters.
2350
2351 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2352
2353 Miscellaneous %define and %code cleanup.
2354 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
2355 values are interpreted.
2356 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
2357 documentation a little more.
2358 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
2359 muscle_percent_define_insert, muscle_percent_code_grow): New
2360 functions/macros.
2361 * src/muscle_tab.h (muscle_percent_define_insert,
2362 muscle_percent_code_grow): Prototype.
2363 * src/parse-gram.y (prologue_declaration): Use
2364 muscle_percent_define_insert and muscle_percent_code_grow when parsing
2365 %define and %code directives.
2366
2367 Make it easy to share %define boolean variables between the front-end
2368 and back-end. Though not used yet, this will be useful in the future.
2369 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
2370 Bison uses of names rather than just skeleton uses of names.
2371 (b4_percent_define_get, b4_percent_define_ifdef): Rename
2372 b4_percent_define_skeleton_variables(VARIABLE) to
2373 b4_percent_define_bison_variables(VARIABLE).
2374 (b4_percent_code_get, b4_percent_code_ifdef): Rename
2375 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
2376 b4_percent_code_bison_qualifiers(QUALIFIER).
2377 (b4_check_user_names_wrap): Update for renames.
2378 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
2379 muscle_percent_define_default): New functions mimicking
2380 b4_percent_define_flag_if and b4_percent_define_default.
2381
2382 For %define variables, report locations for invalid values and
2383 redefinitions.
2384 * data/bison.m4 (b4_percent_define_flag_if): Read
2385 b4_percent_define_loc(VARIABLE) to report the location of an invalid
2386 value for VARIABLE.
2387 (b4_percent_define_default): Save a special location in
2388 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
2389 must later be reported as invalid.
2390 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
2391 functions.
2392 (muscle_percent_define_insert): Record the location of VARIABLE in
2393 muscle percent_define_loc(VARIABLE), and use it to report the previous
2394 location for a redefinition.
2395 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
2396 (muscle_percent_define_default): Update like b4_percent_define_default.
2397 (muscle_grow_user_name_list): Rename to...
2398 (muscle_user_name_list_grow): ... this for consistency and use
2399 muscle_location_grow.
2400 * src/muscle_tab.h (muscle_location_grow): Prototype.
2401 * tests/input.at (%define errors): Update expected output.
2402 * tests/skeletons.at (%define boolean variables: invalid skeleton
2403 defaults): New test case.
2404
2405 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
2406
2407 * src/print.c (lookahead_set, state_default_rule): Remove.
2408 (print_reductions): Replace state_default_rule invocation with
2409 equivalent use of yydefact, which was computed in token_actions in
2410 tables.c.
2411 (print_results): Don't allocate lookahead_set.
2412
2413 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
2414
2415 * data/lalr1.java: Prefix all private members with yy.
2416
2417 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
2418
2419 Use YYFPRINTF instead of fprintf where appropriate. Reported by
2420 Sebastien Fricker at
2421 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
2422 * THANKS: Add Sebastien Fricker.
2423 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
2424 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
2425 accept a variable number of arguments.
2426
2427 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2428
2429 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
2430
2431 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2432
2433 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
2434 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
2435 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
2436
2437 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
2438
2439 Undo my 2007-02-07 change, switching back to the c-strcase module
2440 introduced in the 2007-02-03 change. Bruno Haible reported that
2441 the 2007-02-07 change would be dangerous in Turkish if we add a
2442 language whose name contains "i", since "i" is not lowercase "I"
2443 in Turkish.
2444 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
2445 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
2446 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
2447 * m4/.cvsignore: Remove strcase.m4.
2448 * src/getargs.c: Revert 2007-02-07 change, as follows.
2449 Include c-strcase.h.
2450 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
2451
2452 2007-02-11 Bruno Haible <bruno@clisp.org>
2453
2454 Enable the Java related testsuite tests when the only Java compiler
2455 found is a gcj < 4.3. Discussed at
2456 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
2457 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
2458
2459 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
2460
2461 * data/Makefile.am: Update copyright date.
2462 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
2463 yypstate_new returns NULL.
2464 (yypstate_new): Return NULL if malloc does.
2465 * src/reader.c (packgram): Move translation of rule actions from the
2466 beginning of packgram to...
2467 (check_and_convert_grammar): ... here right before packgram is invoked
2468 so it's easier to write more complete comments, and remove redundant
2469 code.
2470
2471 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
2472
2473 As in semantic actions, make @$ in %initial-action, %destructor, and
2474 %printer imply %locations.
2475 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
2476 scanning @$.
2477 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
2478 (@$ in %initial-action implies %locations,
2479 @$ in %destructor implies %locations,
2480 @$ in %printer implies %locations): ... these new test cases.
2481
2482 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
2483
2484 Undo most of the 2007-02-03 change, switching to the strcase module
2485 now that gnulib strcase has been fixed.
2486 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
2487 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
2488 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
2489 * m4/.cvsignore: Add strcase.m4.
2490 * src/getargs.c: Revert 2007-02-03 change, as follows.
2491 Don't include c-strcase.h.
2492 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
2493 strcasecmp has "unspecified behavior" outside the POSIX locale,
2494 but it works fine in practice if at least one argument is ASCII,
2495 as is the case in Bison.
2496
2497 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
2498
2499 * tests/java.at: Skip tests if only one of javac/java is present.
2500 Reported by Joel E. Denny.
2501 * tests/atlocal.in: Adjust copyright years.
2502
2503 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
2504
2505 * data/lalr1.java (Stack): Work around old verifiers that disallow
2506 access to the private fields of an inner class, from the outer class.
2507 We can make Stack's fields public because user code doesn't have access
2508 to the instance of Stack used by parse(). Reported by Paul Eggert.
2509
2510 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
2511
2512 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
2513 the right spot for these files?
2514 * bootstrap.conf (gnulib_modules): Add c-strcase.
2515 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
2516 c-strncasecmp.c.
2517 * src/getargs.c: Include c-strcase.h.
2518 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
2519 to avoid unspecified behavior.
2520
2521 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
2522
2523 * doc/bison.texinfo (Decl Summary): Correct typo.
2524
2525 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
2526
2527 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
2528 Complain if the value does not match empty, "true" or "false".
2529 * data/c++.m4: Adjust default definitions of %define variables.
2530 * data/java.m4: Adjust default definitions of %define variables.
2531 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
2532 to above behavior.
2533 * tests/input.at (Boolean %define variables): Test new behavior.
2534
2535 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
2536
2537 * NEWS: Mention java.
2538 * TODO: Remove things that are done.
2539 * bootstrap.conf: Add javacomp-script and javaexec-script.
2540 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
2541
2542 * data/Makefile.am: Add new files.
2543 * data/java-skel.m4: New.
2544 * data/java.m4: New.
2545 * data/lalr1.java: New.
2546
2547 * doc/bison.texinfo: Put "A Complete C++ Example" under
2548 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
2549 under Other Languages.
2550
2551 * src/getargs.c (valid_languages): Add Java.
2552 * src/getargs.h (struct bison_language): Update size of string fields.
2553
2554 * tests/Makefile.am: Add java.at.
2555 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
2556 * tests/java.at: New.
2557 * tests/testsuite.at: Include it.
2558
2559 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
2560
2561 Clean up.
2562 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
2563 at_directive_argv arguments so these no longer have to be global
2564 variables. Also, update the implementation for the following changes.
2565 (fail_for_at_directive_too_many_args,
2566 fail_for_at_directive_too_few_args): Add at_directive_name argument.
2567 (at_directive_name): Remove as at_directive_argv[0] will be used for
2568 this now.
2569 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
2570 for the directive name.
2571 (at_directive_argc, at_directive_argv): Make these local within
2572 skel_lex instead of global.
2573 (INITIAL): Update directive start action for above changes.
2574 (SC_AT_DIRECTIVE_ARG): Rename to...
2575 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
2576 (SC_AT_DIRECTIVE_SKIP_WS): Update.
2577 (scan_skel): Move yylex_destroy to...
2578 (skel_scanner_free): ... here.
2579 * tests/skeletons.at (installed skeleton file name): Rename to...
2580 (installed skeleton file names): ... this.
2581
2582 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
2583
2584 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
2585 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
2586 Summary" not "Directives".
2587 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
2588 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
2589 since the former is now the more complete one.
2590 (Prologue Alternatives): Likewise and do the same for %defines.
2591 (Table of Symbols): Add summary of %code, add summary of %define, and
2592 move full %code documentation to...
2593 (Decl Summary): ... here for consistency with other entries in these
2594 sections.
2595 Move %define entry in order to keep this list alphabetized.
2596 Reword %define entry a little to put less emphasis on the skeleton
2597 concept, which most users shouldn't have to think about.
2598
2599 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
2600
2601 Adjust to recent gnulib changes.
2602 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
2603 Add string.h, string_.h, unistd_.h, wchar_.h.
2604 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
2605 * src/system.h: Don't include <stpcpy.h>; this is now done by
2606 <string.h>.
2607
2608 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
2609
2610 Simplify implementation of unqualified %code, implement macros for
2611 uniform treatment of boolean %define flags. Document %define.
2612 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
2613 b4_percent_code_ifdef): New.
2614 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
2615 * data/c++.m4: Define default value for global_tokens_and_yystype.
2616 * data/glr.cc: Likewise.
2617 * data/location.cc: Use b4_percent_define_flag_if.
2618
2619 * doc/bison.texinfo (Decl Summary): Document %define.
2620
2621 * src/parse-gram.y (Unqualified %code): Change muscle name to
2622 b4_percent_code().
2623 (content.opt): Default to empty.
2624
2625 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
2626
2627 Implement support for relative and absolute skeleton file names.
2628 Discussed starting at
2629 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
2630 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
2631 (Bison Options): Document in --skeleton entry.
2632 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
2633 full_skeleton can't necessarily hold all of pkgdatadir.
2634 If the specified skeleton file name contains a `/', don't prepend
2635 pkgdatadir.
2636 * src/parse-gram.y (prologue_declaration): If the specified skeleton
2637 file name contains a `/', prepend the grammar file directory.
2638 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
2639 * skeletons.at: New file.
2640 (relative skeleton file names): New test case.
2641 (installed skeleton file names): New test case.
2642 * tests/testsuite.at: Include skeletons.at.
2643
2644 * bootstrap: Update copyright to 2007.
2645
2646 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
2647
2648 * bootstrap: Remove occurrences of .#bootmp from the files.
2649
2650 2007-01-17 Akim Demaille <akim@epita.fr>
2651
2652 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
2653 nonterminals.
2654 Use per-type %printer.
2655
2656 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
2657
2658 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
2659 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2660 djgpp/config.site, src/files.c, src/files.h, src/main.c,
2661 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
2662 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
2663 tests/glr-regression.at, tests/input.at, tests/local.at,
2664 tests/output.at, tests/torture.at: Update copyright to 2007.
2665
2666 2007-01-16 Akim Demaille <akim@epita.fr>
2667
2668 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
2669 error code.
2670 (Calc++ Scanner): Exit with failure if we can't open the input
2671 file.
2672 Accept "-" standing for stdin.
2673 (Calc++ Top Level): Print the result only if the parsing was
2674 successful.
2675
2676 2007-01-16 Akim Demaille <akim@epita.fr>
2677
2678 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
2679
2680 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
2681 and Joel E. Denny <jdenny@ces.clemson.edu>
2682
2683 Clean up %define and %code implementation in M4 some. Most
2684 importantly, rename all related macros to be in the b4_percent_define
2685 and b4_percent_code namespaces. Also, complete support for `.' in
2686 %define variable names and %code qualifiers.
2687 * data/bison.m4 (b4_check_user_names): Check for special
2688 "SKELETON-NAMESPACE(name)" macros instead of using two nested
2689 m4_foreach loops.
2690 (b4_get_percent_define, b4_get_percent_code): Rename to...
2691 (b4_percent_define_get, b4_percent_code_get): ... these.
2692 Extend documentation with examples.
2693 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
2694 b4_percent_define_skeleton_variables and
2695 b4_percent_code_skeleton_qualifiers.
2696 Expect any value for the %define variable `foo' to be stored in the
2697 macro named `b4_percent_define(foo)'; expect any %code blocks for the
2698 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
2699 expect any unqualified %code blocks to be stored in a macro named
2700 `b4_percent_code_unqualified'.
2701 Use m4_indir so that %define variable names and %code qualifiers can
2702 contain `.', which is allowed by the grammar parser.
2703 (b4_percent_define_default): New macro to set a default value for a
2704 %define variable.
2705 (m4_wrap): Update wrapped code, and fix some underquoting.
2706 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
2707 Expect grammar uses of %define variables and %code qualifiers to be
2708 defined in b4_percent_define_user_variables and
2709 b4_percent_code_user_qualifiers.
2710 * data/c++.m4: Use b4_percent_define_default rather than
2711 m4_define_default. Fix some underquoting. Skeleton usage of %define
2712 variable define_location_comparison now implies skeleton usage of
2713 %define variable filename_type.
2714 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2715 data/push.c, data/yacc.c: Update macro names.
2716 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
2717 muscle names.
2718
2719 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2720
2721 DJGPP specific issues.
2722
2723 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
2724 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
2725
2726 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2727
2728 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
2729 run parsers in all tests so that Valgrind is invoked during
2730 maintainer-check-valgrind.
2731 (Duplicate representation of merged trees): Free all semantic values.
2732 (Duplicated user destructor for lookahead): Likewise.
2733
2734 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2735
2736 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
2737 command-line prefix.
2738 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
2739 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
2740 miss Valgrind messages.
2741 (Exploding the Stack Size with Malloc): Likewise.
2742
2743 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2744
2745 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
2746 locals. Reported by Juan Manuel Guerrero at
2747 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
2748 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
2749 Fix some indentation also.
2750 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
2751 explaining this issue.
2752
2753 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
2754 and Joel E. Denny <jdenny@ces.clemson.edu>
2755
2756 Simplify union and prologue handling, and escape union and lex/parse
2757 params with digraphs.
2758 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
2759 values to the empty string since these are no longer guaranteed
2760 initialized by the front-end.
2761 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
2762 braces around b4_user_stype since this is no longer done by the
2763 front-end.
2764 * src/files.c, src/files.h (pre_prologue_obstack,
2765 post_prologue_obstack): Remove.
2766 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
2767 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
2768 with digraphs. This fixes lex params and parse params.
2769 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
2770 * src/output.c (prepare): Remove muscle insertion of the prologues.
2771 (output): Remove freeing of pre_prologue_obstack and
2772 post_prologue_obstack.
2773 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
2774 than prologue_augment for prologue parsing so you don't need prologue
2775 obstacks.
2776 (grammar_declaration): For %union RHS, use `braceless' instead of
2777 "{...}" so that braces are already stripped and code is escaped with
2778 digraphs.
2779 * src/reader.c (prologue_augment): Remove.
2780 (reader): Remove initialization of pre_prologue_obstack and
2781 post_prologue_obstack.
2782 * src/reader.h (prologue_augment): Remove.
2783
2784 * data/c.m4: Remove stray parenthesis.
2785
2786 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2787
2788 Remove quotes from variables names in %define directives and from
2789 qualifiers in %code directives, and restrict the characters that are
2790 allowed in them to M4-friendly ones. For %define, continue to support
2791 the quoted form as a deprecated feature. Discussed starting at
2792 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
2793 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
2794 %code.
2795 * doc/bison.texinfo (Prologue Alternatives): Update.
2796 (Decl Summary): In %defines entry, update mention of `%code requires'
2797 and `%code provides'.
2798 (C++ Location Values): Update %define uses.
2799 (Calc++ Parser Interface): Likewise.
2800 (Calc++ Parser): Likewise, and update `%code requires' uses.
2801 (Table of Symbols): Update %code documentation.
2802 * src/parse-gram.y (prologue_declaration): For %define variables, use
2803 `variable' instead of `STRING'.
2804 (grammar_declaration): For %code qualifiers, use `ID' instead of
2805 `STRING'.
2806 (variable): New nonterminal that takes an `ID' or a `STRING'.
2807 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
2808 and %define uses.
2809 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
2810 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
2811 (%define errors): Update %define uses.
2812
2813 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2814
2815 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
2816 instead of muscle_insert for %define values so that M4-special
2817 characters are replaced with digraphs.
2818 * tests/input.at (%define errors): Extend to check weird values.
2819
2820 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2821
2822 Instead of having skeletons declare all valid %define variables and
2823 %code qualifiers, provide macros that retrieve the associated values
2824 and build these lists automatically. Thus Bison will now warn when a
2825 variable or qualifier is not used by the skeleton in the current
2826 invocation regardless of whether it might sometimes be used by that
2827 skeleton in other invocations. Also, move all %define value macros to
2828 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
2829 form, which is replaced by %code.
2830 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
2831 (b4_check_user_names): ... this, and change the series of valid name
2832 arguments to a single list argument for names used in the skeleton
2833 similar to the existing list argument for names used in the grammar.
2834 Warn instead of complaining.
2835 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
2836 values and %code code, to format %code code properly, and to build
2837 lists of all %define variables and %code qualifiers used in the
2838 skeleton: b4_skeleton_percent_define_variables and
2839 b4_skeleton_percent_code_qualifiers.
2840 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
2841 Remove, and...
2842 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
2843 the skeleton names lists can finish building first. In place of
2844 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
2845 expect the lists b4_user_percent_define_variables and
2846 b4_user_percent_code_qualifiers.
2847 * data/c++.m4: Where setting default values for b4_parser_class_name,
2848 b4_location_type, b4_filename_type, b4_namespace, and
2849 b4_define_location_comparison, update their names to the
2850 b4_percent_define_ namespace.
2851 * data/glr.c: Don't use b4_check_percent_define_variables and
2852 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
2853 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
2854 (b4_parser_class_name, b4_namespace): Define these using
2855 b4_get_percent_define for parser_class_name and namespace.
2856 * data/location.cc: Use b4_get_percent_define.
2857 * data/push.c: Don't use b4_check_percent_define_variables and
2858 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
2859 * data/yacc.c: Likewise, and don't call m4_exit in
2860 b4_use_push_for_pull_if or m4_wrap code will never execute.
2861 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
2862 Rename to...
2863 (muscle_grow_user_name_list): ... this for consistency with the
2864 terminology used in bison.m4.
2865 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
2866 %define variable names, and rename muscle used_percent_define_variables
2867 to user_percent_define_variables.
2868 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
2869 user_percent_code_qualifiers.
2870 (content): Remove.
2871 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
2872 {CODE} form is no longer accepted.
2873 * tests/input.at (Reject bad %code qualifiers): Rename to...
2874 (Reject unused %code qualifiers): ... this, and update test output.
2875 (%define error): Update test output.
2876
2877 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
2878
2879 Check for unrecognized %define variables similar to checking for
2880 unrecognized %code qualifiers. Check for redefined %define variables.
2881 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
2882 generalizes...
2883 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
2884 (b4_check_percent_define_variables): New, also wraps it.
2885 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
2886 variables using b4_check_percent_define_variables.
2887 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
2888 all those exercised in the test suite and all those listed in the
2889 `Default values' section of c++.m4. Are there others?
2890 * data/push.c, data/yacc.c: Declare no valid %define variables.
2891 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
2892 similar to muscle_find, but it works even when the muscle stores a
2893 const value.
2894 (muscle_grow_used_name_list): New function for constructing the used
2895 name list muscles that b4_check_for_unrecognized_names requires.
2896 * src/parse-gram.y (prologue_declaration): Warn if a variable is
2897 %define'd more than once. Define the b4_used_percent_define_variables
2898 muscle with muscle_grow_used_name_list.
2899 (grammar_declaration): Abbreviate %code code with
2900 muscle_grow_used_name_list.
2901 * tests/input.at (%define errors): New.
2902
2903 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2904
2905 Provide warn_at, complain_at, and fatal_at function callbacks to the
2906 skeletons, and use this for %code qualifier complaints.
2907 * data/bison.m4 (b4_error_at): New, invoked by...
2908 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
2909 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
2910 @fatal_at(...@) directives.
2911 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
2912 qualifiers in b4_used_percent_code_qualifiers and to use
2913 b4_complain_at.
2914 * src/location.c, src/location.h (boundary_set_from_string): New global
2915 function.
2916 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
2917 function.
2918 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
2919 to b4_used_percent_code_qualifiers.
2920 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
2921 function.
2922 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
2923 (lineno): Rename to...
2924 (out_lineno): ... this so I don't misunderstand it again.
2925 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
2926 here; these newlines are in the input but not the output file.
2927 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
2928 (at_directive_perform): ... this new static function, and add handling
2929 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
2930 directives.
2931 * tests/input.at (Reject bad %code qualifiers): Update test output with
2932 locations and extend.
2933
2934 * tests/output.at (Output file name: [, Output file name: ]): Remove
2935 bogus comment about these tests failing.
2936
2937 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2938
2939 Clean up b4_check_percent_code_qualifiers a little.
2940 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
2941 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
2942 documentation and add examples.
2943 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
2944 qualifiers here.
2945
2946 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2947
2948 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
2949 unreliable -- especially when they're hidden inside another macro.
2950 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
2951 data/c.m4: Remove m4_divert(-1).
2952 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2953 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
2954 m4_divert_push(0) and m4_divert_pop(0).
2955 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
2956 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
2957 pushed and popped by m4sugar, should be first on the stack.
2958
2959 Provide warn, complain, and fatal function callbacks to the skeletons.
2960 This provides more flexibility than m4_fatal, improves the error
2961 message format, and captures messages for translation. Discussed
2962 starting at
2963 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
2964 * data/bison.m4 (b4_error): New, invoked by...
2965 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
2966 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
2967 directives. Because these M4 macros might be called when the current
2968 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
2969 the previous removal of uses of m4_divert, which caused trouble.
2970 (b4_check_percent_code_qualifiers): Use b4_complain instead of
2971 m4_fatal to report unrecognized %code qualifiers.
2972 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
2973 push parser requests.
2974 * data/glr.c: Use b4_complain instead of m4_fatal to report
2975 non-deterministic push parser requests.
2976 Update @output usage to @output(...@) form.
2977 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
2978 report missing %defines. Update @output usage to @output(...@) form.
2979 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
2980 @output(...@) form.
2981 * src/main.c (main): Invoke skel_scanner_free.
2982 * src/scan-skel.h (skel_scanner_free): Prototype new function.
2983 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
2984 obstack_for_string from flex-scanner.h.
2985 (YY_DECL): Use to declare skel_lex static.
2986 (decode_at_digraphs): Remove; now handled in the new
2987 SC_AT_DIRECTIVE_ARG start condition.
2988 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
2989 functions.
2990 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
2991 at_directive_argv): New static globals.
2992 (INITIAL): Use fail_for_invalid_at.
2993 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
2994 recognize the start of a generalized `@directive(...@)' form and
2995 start...
2996 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
2997 directive args (using the new obstack_for_string), to decode the
2998 contained @ diagraphs, and to perform the directive. It recognizes
2999 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
3000 @output(...@).
3001 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
3002 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
3003 `@,'.
3004 (scan_skel): Initialize obstack_for_string on the first call.
3005 (skel_scanner_free): New function to free obstack_for_string.
3006 * tests/input.at (Reject bad %code qualifiers): Update test output.
3007
3008 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
3009
3010 Consolidate the 4 prologue alternative directives (%code, %requires,
3011 %provides, and %code-top) into a single %code directive with an
3012 optional qualifier field. Discussed at
3013 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
3014 * NEWS (2.3a+): Rewrite the existing entry for the prologue
3015 alternatives.
3016 * doc/bison.texinfo (Prologue Alternatives): Update.
3017 (Decl Summary): Update to %code "requires" and %code "provides".
3018 (Calc++ Parser): Update to %code "requires".
3019 (Table of Symbols): Remove entries for %requires, %provides, and
3020 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
3021 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
3022 are replaced by b4_percent_code_provides and b4_percent_code_requires,
3023 which are skeleton-specific.
3024 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
3025 declare what %code qualifiers it supports and to complain if any other
3026 qualifiers were used in the grammar.
3027 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
3028 and b4_user_code([b4_percent_code_provides]) in place of
3029 b4_user_requires and b4_user_provides.
3030 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
3031 Add b4_user_code([b4_percent_code_top]) and
3032 b4_user_code([b4_percent_code]).
3033 Invoke b4_check_percent_code_qualifiers.
3034 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
3035 PERCENT_REQUIRES): Remove.
3036 (grammar_declaration): Remove RHS's for %code-top, %provides, and
3037 %requires. Rewrite the %code RHS as the unqualified form defining the
3038 muscle b4_percent_code. Add another RHS for the qualified %code form,
3039 which defines muscles of the form b4_percent_code_QUALIFIER and the
3040 b4_used_percent_code_qualifiers muscle.
3041 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
3042 PERCENT_REQUIRES): Remove.
3043 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
3044 %code "requires" and %code "provides".
3045 * tests/input.at (Reject bad %code qualifiers): New.
3046
3047 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
3048
3049 Use the new code_props interface for destructors and printers.
3050 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
3051 printer_location members, and change the type of the destructor and
3052 printer members to code_props.
3053 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
3054 symbol_printer_get, semantic_type_destructor_set,
3055 semantic_type_printer_set, default_tagged_destructor_set,
3056 default_tagless_destructor_set, default_tagged_printer_set,
3057 default_tagless_printer_set): Use code_props in arguments and return
3058 types in place of char const * and location.
3059 (symbol_destructor_location_get, symbol_printer_location_get): Remove
3060 since the locations are now contained in the return of
3061 symbol_destructor_get and symbol_printer_get.
3062 * src/output.c (symbol_destructors_output, symbol_printers_output):
3063 Replace with...
3064 (symbol_code_props_output): ... this to eliminate duplicate code.
3065 (output_skeleton): Update to use symbol_code_props_output.
3066 * src/reader.c (symbol_should_be_used): Update use of
3067 symbol_destructor_get.
3068 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
3069 Update uses of the various _destructor_set and _printer_set functions.
3070 * src/symtab.c: (default_tagged_destructor_location,
3071 default_tagless_destructor_location, default_tagged_printer_location,
3072 default_tagless_printer_location): Remove since we...
3073 (default_tagged_destructor, default_tagless_destructor,
3074 default_tagged_printer, default_tagless_printer): ... change the type
3075 of these to code_props.
3076 (symbol_new, semantic_type_new, symbol_destructor_set,
3077 semantic_type_destructor_set, symbol_destructor_get,
3078 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
3079 symbol_check_alias_consistency, default_tagged_destructor_set,
3080 default_tagless_destructor_set, default_tagged_printer_set,
3081 default_tagless_printer_set): Update.
3082 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
3083 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
3084 code_props members.
3085 (symbol_print): Use SYMBOL_CODE_PRINT.
3086
3087 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
3088
3089 Use the new code_props interface for rule actions.
3090 * src/symlist.h (symbol_list): Replace action, action_location, and
3091 used members with a code_props action_props member.
3092 * src/reader.c (symbol_should_be_used, grammar_rule_check,
3093 grammar_midrule_action, grammar_current_rule_merge_set,
3094 grammar_current_rule_symbol_append, packgram): Update.
3095 * src/scan-code.h (translate_rule_action): Remove, no longer used.
3096 * src/scan-code.l (handle_action_dollar): Update.
3097 (translate_rule_action): Remove, no longer used.
3098 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
3099
3100 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
3101
3102 Use the new code_props interface in parse-gram.y.
3103 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
3104 Update all uses of translate_* functions to use the new code_props
3105 interface and to use gram_scanner_last_string_free and
3106 code_scanner_last_string_free where possible.
3107 (grammar_declaration): symbol_list_destructor_set and
3108 symbol_list_printer_set now perform the translation, so don't do it
3109 here. Use gram_scanner_last_string_free where possible.
3110 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
3111 translate_code): Remove, no longer used.
3112 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
3113 symbol_list_printer_set): Perform code translation here rather than
3114 depending on the caller to do so.
3115
3116 * src/symlist.h (struct symbol_list): Correct some documentation typos.
3117 * src/scan-gram.h (gram_last_string): Remove declaration.
3118 * src/scan-gram.l (last_string): Declare it static.
3119
3120 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
3121
3122 Encapsulate code properties and related functionality for the various
3123 destructors, printers, and actions into a code_props structure and
3124 interface. This patch merely implements code_props in scan-code.h and
3125 scan-code.l. Future patches will rewrite other modules to use it.
3126 Discussed starting at
3127 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
3128 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
3129 consistently initialize const structs that have an empty location
3130 field.
3131 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
3132 to ensure consistency.
3133 * src/scan-code.h (code_props): New structure.
3134 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
3135 function, macro, and const global variable for initializing a
3136 code_props with no code.
3137 (code_props_plain_init, code_props_symbol_action_init,
3138 code_props_rule_action_init, code_props_translate_code): The rest of
3139 the new code_props functional interface. Among other things, the init
3140 functions set the code_props kind field so that
3141 code_props_translate_code will know whether to behave like
3142 translate_symbol_action, translate_rule_action, or translate_code.
3143 These old translate functions must remain until all other modules are
3144 updated to use the new code_props interface.
3145 (code_scanner_last_string_free): New function similar to
3146 gram_scanner_last_string_free.
3147 (code_scanner_free): Add documentation.
3148 * src/scan-code.l: Implement the new interface.
3149 (code_lex): Make it static, add a code_props* argument, and remove the
3150 rule argument.
3151 (last_string): New static global similar to the one in scan-gram.l.
3152 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
3153 instead of rule.
3154 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
3155 code_props since Bison may one day use this information for destructors
3156 and printers.
3157 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
3158 (handle_action_dollar): Use symbol_list_n_get and set used flag
3159 directly since symbol_list_n_used_set is removed.
3160 (translate_action): Add a code_props* argument and remove the rule,
3161 action, and location arguments. Pass the code_props* on to code_lex.
3162 (translate_rule_action, translate_symbol_action, translate_code):
3163 Rewrite as wrappers around the new code_props interface.
3164 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
3165 it would eventually need to break the encapsulation of code_props.
3166
3167 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
3168
3169 * etc/.cvsignore: New.
3170
3171 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
3172
3173 Add maintainer-push-check to run maintainer-check using push parsing in
3174 place of pull parsing where available.
3175 * Makefile.am (maintainer-push-check): New.
3176 * data/bison.m4 (b4_use_push_for_pull_if): New.
3177 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
3178 appropriately based on their existing values.
3179 (yypush_parse): Don't print push-parser-specific diagnostics if push
3180 parsing is being used in place of pull parsing.
3181 * data/yacc.c: If push parsing should replace pull parsing, redirect to
3182 push.c.
3183 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
3184 variable, and insert b4_use_push_for_pull_flag into muscles.
3185 * tests/Makefile.am (maintainer-push-check): New.
3186
3187 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
3188
3189 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
3190 (whether successful or failed) so that yypush_parse can be invoked
3191 again to start a new parse using the same yypstate.
3192 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
3193 check multiple yypull_parse invocations on the same yypstate. For pull
3194 mode, extend to check multiple yyparse invocations.
3195 (Exploding the Stack Size with Alloca): Extend to try with
3196 %push-pull-parser.
3197 (Exploding the Stack Size with Malloc): Likewise.
3198
3199 * tests/calc.at (Simple LALR Calculator): Don't specify
3200 %skeleton "push.c" since %push-pull-parser implies that now.
3201 * tests/headers.at (export YYLTYPE): Don't check for the push
3202 declarations. Otherwise, this test case can't be used to see if push
3203 mode can truly emulate pull mode.
3204 * tests/input.at (Torturing the Scanner): Likewise.
3205 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
3206 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
3207 AT_YACC_IF, which now includes the case of push mode since %skeleton
3208 need not be used for push mode. This will be more intuitive once
3209 push.c is renamed to yacc.c.
3210
3211 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
3212
3213 For push mode, convert yyparse from a macro to a function, invoke yylex
3214 instead of passing a yylexp argument to yypull_parse, and don't
3215 generate yypull_parse or yyparse unless %push-pull-parser is declared.
3216 Discussed starting at
3217 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
3218 * data/bison.m4 (b4_pull_if): New.
3219 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
3220 * data/push.c: Improve M4 quoting a little.
3221 (b4_generate_macro_args, b4_parenthesize): Remove.
3222 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
3223 any time a pull parser is requested.
3224 Don't #define this as a wrapper around yypull_parse. Instead, when
3225 both push and pull are requested, make it a function that does that
3226 same thing.
3227 (yypull_parse): If there's a b4_prefix, #define this to
3228 b4_prefix[pull_parse] when both push and pull are requested.
3229 Don't define this as a function unless both push and pull are
3230 requested.
3231 Remove the yylexp argument and hard-code yylex invocation instead.
3232 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
3233 %push-parser.
3234 * src/getargs.c (pull_parser): New global initialized to true.
3235 * getargs.h (pull_parser): extern it.
3236 * src/output.c (prepare): Insert pull_flag muscle.
3237 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
3238 (prologue_declaration): Set both push_parser and pull_parser = true for
3239 %push-pull-parser. Set push_parser = true and pull_parser = false for
3240 %push-parser.
3241 * src/scan-gram.l: Don't accept %push_parser as an alternative to
3242 %push-parser since there's no backward-compatibility concern here.
3243 Scan %push-pull-parser.
3244 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
3245 instead of %push-parser.
3246 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
3247 prototype it in the module that calls yyparse.
3248 * tests/input.at (Torturing the Scanner): Likewise.
3249 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
3250
3251 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
3252
3253 Update etc/bench.pl. Optimize push mode a little (the yyn change
3254 deserves most of the credit).
3255 * Makefile.am (SUBDIRS): Add etc subdirectory.
3256 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
3257 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
3258 yytoken, yyval, and yyloc declarations to...
3259 (yyparse or yypush_parse): ... here to improve performance. For
3260 yypush_parse invocations after the first, be sure to assign yyn its old
3261 value again.
3262 (yypstate_new): Don't bother initializing the yyresult field since the
3263 initial value isn't used.
3264 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
3265 remove the #define that, in push mode, set it to yyps->NAME.
3266 * etc/Makefile.am: New.
3267 * etc/bench.pl: Remove and build it instead from...
3268 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
3269 "tests/bison" from the build directory by default rather than just
3270 invoking "bison" from $PATH.
3271 (calc_grammar): Update push parser code: don't declare yylval globally,
3272 don't define yyparse_wrapper, and don't #define yyparse.
3273 (bench_grammar): Update to check all working combinations of yacc.c,
3274 push.c, impure, pure, pull, and push.
3275
3276 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
3277
3278 For push mode, add pull wrappers around yypush_parse.
3279 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
3280 (yypull_parse): New function wrapping yypush_parse.
3281 (yyparse): New #define wrapping yypull_parse.
3282 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
3283 is declared.
3284 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
3285 prototype yylex in the module that calls yyparse, and don't prototype
3286 yyparse there. Otherwise, the yyparse expansion won't compile.
3287 * tests/input.at (Torturing the Scanner): Likewise.
3288
3289 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
3290
3291 Enable push parsers to operate in impure mode. Thus, %push-parser no
3292 longer implies %pure-parser. The point of this change is to move
3293 towards being able to test the push parser code by running the entire
3294 test suite as if %push-parser had been declared.
3295 * data/push.c (yypush_parse): For impure mode, remove the
3296 yypushed_char, yypushed_val, and yypushed_loc arguments.
3297 Instead, declare these as local variables initialized to the global
3298 yychar, yylval, and yylloc.
3299 For the first yypush_parse invocation only, restore the initial values
3300 of these global variables when it's time to read a token since they
3301 have been overwritten.
3302 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
3303 %push-parser.
3304 * tests/calc.at (Simple LALR(1) Calculator): Always declare
3305 %pure-parser along with %push-parser since this test case was designed
3306 for pure push parsers.
3307 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
3308 (AT_YACC_OR_PUSH_IF): New.
3309 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
3310 add a note that it's still wrong for some cases (as it has been for a
3311 while).
3312 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
3313 %push-parser no longer implies %pure-parser.
3314
3315 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3316
3317 Remove some unnecessary differences between the pull parser code and
3318 the push parser code. This patch enables yynerrs in push mode.
3319 * data/push.c: Reformat M4 a little.
3320 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
3321 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
3322 because push mode is on. Instead, if pure mode is on, move yynerrs
3323 to...
3324 (b4_declare_parser_state_variables): ... here.
3325 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
3326 to yyps->NAME so it can be used in yypush_parse.
3327 (yypush_parse): Don't omit uses of yynerrs in push mode.
3328
3329 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3330
3331 Fix bug such that the first pushed token's value and location are
3332 sometimes overwritten (sometimes by %initial-action) before being used.
3333 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
3334 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
3335 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
3336 more closely mimic the pull parser logic.
3337 Don't copy the pushed token to yychar, yylval, and yylloc until it's
3338 time to read a token, which is after any initialization of yylval and
3339 yylloc.
3340 (gottoken): Rename label to...
3341 (yyread_pushed_token): ... for clarity and to avoid infringing on the
3342 user namespace.
3343
3344 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3345
3346 Rearrange initialization of the parser state variables so that the
3347 skeleton doesn't have to have a copy for pull mode and another for push
3348 mode. This patch also fixes at least a bug such that yylloc was not
3349 initialized (with b4_location_initial_line and
3350 b4_location_initial_column) upon calling yypush_parse. However, that
3351 initialization now overwrites the first token's location;
3352 %initial-action assigning @$ already did the same thing, and both bugs
3353 will be fixed in a later patch.
3354 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
3355 (b4_declare_parser_state_variables): Remove initialization of yytoken,
3356 yyss, yyvs, yyls, and yystacksize.
3357 (yypstate_new): Remove initialization of some yypstate fields: yystate,
3358 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
3359 yylsp.
3360 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
3361 yyps->NAME so it can be used in yypush_parse.
3362 (yyparse or yypush_parse): For yypush_parse, don't print the
3363 "Starting parse" diagnostic for invocations after the first.
3364 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
3365 yypush_parse, only do it for the first invocation.
3366 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
3367 initialization to occur in yypush_parse but only on the first
3368 invocation.
3369
3370 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
3371
3372 * data/push.c: Add CPP guards around push parser declarations in both
3373 the header and the code file.
3374 In the code file, move the push parser declarations to the same place
3375 they appear in the header file.
3376 Clean up the M4 some, especially the inconsistent underquoting in
3377 some b4_c_function_def and b4_c_function_decl uses.
3378
3379 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
3380
3381 Encapsulate the push parser state variables into an M4 macro so the
3382 push skeleton doesn't have to list them again for pull mode's yyparse.
3383 For push mode, remove yypush_parse's local equivalents of these
3384 variables to eliminate unnecessary copying between the two sets at
3385 run-time. This patch also fixes at least a bug related to multiple
3386 %initial-action invocations in push mode.
3387 * data/push.c (b4_declare_parser_variables): Rename to...
3388 (b4_declare_scanner_communication_variables): ... this for clarity and
3389 update both uses.
3390 (b4_declare_yyparse_variables): Remove and move its contents to the one
3391 spot where it was invoked.
3392 (b4_declare_parser_state_variables): New macro containing the parser
3393 state variables required by push mode.
3394 (struct yypstate): Replace all fields but yynew with
3395 b4_declare_parser_state_variables.
3396 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
3397 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
3398 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
3399 (yyparse or yypush_parse): For yyparse in pull mode, replace local
3400 parser state variable declarations with
3401 b4_declare_parser_state_variables.
3402 Don't initialize parser state variables when calling yypush_parse since
3403 yypstate_new already does that.
3404 Invoke the user's initial action only upon the first yypush_parse
3405 invocation.
3406 Remove all code that copies between the local parser state variables
3407 and the yypstate.
3408
3409 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
3410
3411 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
3412 prevent a name collision in a future patch where these names will
3413 sometimes be #define'd.
3414 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
3415 since it no longer has the same name as the existing argument.
3416 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
3417
3418 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
3419 and Joel E. Denny <jdenny@ces.clemson.edu>
3420
3421 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3422 that the argument is case-insensitive, and there's no `=' here.
3423 For the %skeleton entry, mention that %language is better.
3424 (Bison Options): Likewise for --language and --skeleton. Move the
3425 --skeleton entry so that the `Tuning the parser' section is sorted
3426 alphabetically on long options.
3427 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
3428 %language directive in detail here; cross-reference the %language
3429 documentation instead.
3430 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
3431 `%require "2.3b"' so that the example is always up-to-date.
3432 (Table of Symbols): Add entries for %language and %skeleton.
3433 * examples/extexi (normalize): Instead of replacing every %require
3434 argument with the current Bison version, just substitute for
3435 `@value{VERSION}'. This guarantees that we're testing what actually
3436 appears in the documentation.
3437 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
3438 rather than `@VERSION@'.
3439
3440 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
3441
3442 * NEWS: Reword the %language news a bit, and put it earlier.
3443
3444 * src/getargs.c (skeleton_arg): Last arg is now location const *.
3445 Rewrite to simplify the logic.
3446 (language_argmatch): Likewise.
3447 (program_name): We now own this var.
3448 * src/getargs.h (struct bison_language): Use char[] rather than
3449 const char *.
3450
3451 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
3452 Java is supported.
3453 * src/complain.c (program_name): Remove decl; no longer needed.
3454 * src/main.c (program_name): Remove; now belongs to getargs.
3455
3456 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
3457
3458 * NEWS: Document %language.
3459
3460 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
3461
3462 * data/c-skel.m4, data/c++-skel.m4: New files.
3463 * data/glr.c: Complain on push parsers.
3464
3465 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
3466 over %skeleton.
3467 (Decl Summary): Document %language and %skeleton.
3468 (Command line): Document -L.
3469
3470 * examples/extexi: Rewrite %require directive.
3471 * examples/calc++/Makefile.am: Pass VERSION to extexi.
3472
3473 * src/files.c (compute_exts_from_gc): Look in language structure
3474 for .y extension.
3475 (compute_file_name_parts): Check whether .tab should be added.
3476 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
3477 (language, skeleton_arg, language_argmatch): New.
3478 (long_options): Add --language.
3479 (getargs): Use skeleton_arg, add -L/--language.
3480 * src/getargs.h: Include location.h.
3481 (struct bison_language, language, skeleton_arg, language_argmatch): New.
3482 * src/output.c (prepare): Pick default skeleton from struct language.
3483 Don't dispatch C skeletons here.
3484 * src/parse-gram.y (PERCENT_LANGUAGE): New.
3485 (prologue_declaration): Add "%language" rule, use skeleton_arg.
3486 * src/scan-gram.l ("%language"): New rule.
3487
3488 * tests/calc.at: Test %skeleton and %language.
3489 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
3490 (AT_GLR_IF): Look for %skeleton "glr.cc".
3491 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
3492 (AT_YACC_IF): Reject %language.
3493
3494 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
3495
3496 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
3497 since it wasn't used; only the typedef name 'semantic_type' is needed.
3498 Also, omit trailing white space.
3499
3500 * bootstrap: Sync from coreutils.
3501 (gnulib_extra_files): Add build-aux/announce.gen.
3502 (slurp): Adjust .gitignore files like .cvsignore files.
3503 * build-aux/announce-gen: Remove from CVS, since bootstrap
3504 now creates this.
3505
3506 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
3507
3508 Make %push-parser imply %pure-parser. This fixes several bugs; see
3509 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
3510 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
3511 pure_parser = true.
3512 * data/push.c: Don't bother testing b4_push_if when deciding whether
3513 to expand b4_declare_parser_variables globally.
3514 (yypush_parse): Likewise in here.
3515
3516 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
3517 (yy_reduce_print): Reformat M4 for readability.
3518
3519 2006-12-15 Bob Rossi <bob@brasko.net>
3520 and Joel Denny <jdenny@ces.clemson.edu>
3521
3522 * data/push.c (yypstate): Add typedef, and update all uses of
3523 struct yypstate to just yypstate.
3524 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
3525
3526 2006-12-14 Bob Rossi <bob@brasko.net>
3527
3528 * data/push.c (yypush_parse): Declare prototype regardless of
3529 %locations option.
3530
3531 2006-12-14 Bob Rossi <bob@brasko.net>
3532
3533 * data/push.c (yyparse): Remove the prototype and the #define when in
3534 push-parser mode.
3535
3536 2006-12-13 Bob Rossi <bob@brasko.net>
3537
3538 * data/push.c (yypstate_init): Rename to...
3539 (yypstate_new): ... this and use b4_c_function_def.
3540 (yypstate_delete): New.
3541 (yypush_parse): Change parameters yynval and yynlloc to be const.
3542 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
3543 yypstate_delete functions.
3544
3545 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
3546
3547 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
3548 strange test case titles. Reported by Bob Rossi.
3549
3550 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
3551
3552 * TODO: Add pointer to Sylvain Schmitz's work on static detection
3553 of potential ambiguities in GLR grammers.
3554
3555 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
3556
3557 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
3558 `bison ', use m4_index instead of m4_substr since chopping up a string
3559 containing M4-special characters causes problems here.
3560
3561 Fix a couple of bugs related to special characters in user-specified
3562 file names, and make it easier for skeletons to compute output file
3563 names with the same file name prefix as Bison-computed output file
3564 names.
3565 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
3566 b4_parser_file_name and b4_spec_defines_file instead of
3567 @output_parser_name@ and @output_header_name@, which are now redundant.
3568 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
3569 b4_parser_file_name, b4_spec_defines_file, and the new
3570 @basename(FILENAME@) instead of @output_parser_name@ and
3571 @output_header_name@, which inappropriately escaped the file names as
3572 C string literals.
3573 * src/files.c (all_but_ext): Remove static qualifier.
3574 (compute_output_file_names): Move `free (all_but_ext)' to...
3575 (output_file_names_free): ... here since all_but_ext is needed later.
3576 * src/files.h (all_but_ext): Extern.
3577 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
3578 exactly what MUSCLE_INSERT_STRING used to do.
3579 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
3580 characters are escaped properly.
3581 * src/output.c (prepare): Define muscle file_name_all_but_ext as
3582 all_but_ext.
3583 For pkgdatadir muscle, maintain previous functionality by using
3584 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
3585 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
3586 digraphs would never be expanded. Hopefully no one has M4-special
3587 characters in his Bison installation path.
3588 * src/scan-skel.l: Don't parse @output_header_name@ and
3589 @output_parser_name@ anymore since they're now redundant.
3590 In @output, use decode_at_digraphs.
3591 Parse a new @basename command that invokes last_component.
3592 (decode_at_digraphs): New.
3593 (BASE_QPUTS): Remove unused.
3594 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
3595 (Output file name): New tests.
3596
3597 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
3598
3599 Warn about output files that are generated by the skeletons and that
3600 conflict with other output files.
3601 * data/glr.c: Don't generate the header file here when glr.cc does.
3602 * src/files.c (file_names, file_names_count): New static globals.
3603 (compute_output_file_names): Invoke output_file_name_check for files
3604 not generated by the skeletons and remove existing checks.
3605 (output_file_name_check): New function that warns about conflicting
3606 output file names.
3607 (output_file_names_free): Free file_names.
3608 * src/files.h (output_file_name_check): Declare.
3609 * src/scan-skel.l: Invoke output_file_name_check for files generated by
3610 the skeletons.
3611 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
3612 (Conflicting output files): New tests.
3613
3614 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3615
3616 * doc/bison.texinfo: Fix a couple of typos.
3617
3618 2006-12-08 Bob Rossi <bob@brasko.net>
3619
3620 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
3621 Rename to...
3622 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
3623 update all uses.
3624 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
3625 (yypush_parse): Rename yypvars argument to yyps and remove redundant
3626 local pv.
3627 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
3628 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
3629
3630 2006-12-07 Bob Rossi <bob@brasko.net>
3631 and Joel Denny <jdenny@ces.clemson.edu>
3632
3633 * data/push.c (yypvarsinit): Change return type from void* to struct
3634 yypvars*. No longer cast to void* on return.
3635 (struct yypvars): Remove yylen since it need not be remembered between
3636 yypushparse invocations.
3637 (yypushparse): Don't copy between yylen and pv->yylen.
3638
3639 2006-12-05 Bob Rossi <bob@brasko.net>
3640
3641 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
3642 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
3643 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
3644 (struct yypvars): Remove b4_declare_parser_variables.
3645 (yypvarsinit): Remove init code for removed variables.
3646 (global scope): Do not declare b4_declare_parser_variables if
3647 push or pure mode.
3648 (yypushparse): Add b4_declare_parser_variables.
3649 Init new local variables, and remove init code for removed
3650 yypvars variables.
3651 (yyparse): Delete.
3652 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
3653 and yyparse for other modes.
3654 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
3655 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
3656 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
3657 (AT_PURE_LEX_IF): True if pure or push parser.
3658
3659 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
3660
3661 Document Yacc prologue alternatives and default %destructor's and
3662 %printer's as experimental. Don't mention Java yet. Discussed at
3663 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
3664 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
3665 (2.3a): Annotate this entry to say the old forms of these features were
3666 also experimental.
3667 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
3668 Table of Symbols): Say they're experimental. Comment out any mention
3669 of Java (we'll want this back eventually).
3670
3671 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3672
3673 Support a file name argument to %defines. Deprecate `=' in
3674 %file-prefix, %name-prefix, and %output. Discussed at
3675 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
3676 * NEWS (2.3a+): Mention.
3677 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
3678 form of %defines, and remove `=' from entries for %file-prefix,
3679 %name-prefix, and %output.
3680 * src/parse-gram.y (prologue_declaration): Implement.
3681 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
3682 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
3683 all but one occurrence of %name-prefix.
3684 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
3685 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
3686 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
3687 occurrence of each of %file-prefix and %output. Add check for %defines
3688 with argument.
3689 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
3690 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
3691 Remove the `=' from %output.
3692
3693 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
3694
3695 Don't escape $ in test case titles since Autoconf 2.61 now does that
3696 correctly.
3697 * tests/actions.at (Default %printer and %destructor are not for error
3698 or $undefined): Here.
3699 (Default %printer and %destructor are not for $accept): Here.
3700 * tests/input.at (Invalid $n and @n): Here.
3701
3702 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
3703
3704 Rename <!> to <>. Discussed starting at
3705 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
3706 * NEWS (2.3a+): Update.
3707 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3708 Update.
3709 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
3710 * src/scan-gram.l (INITIAL): Implement.
3711 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
3712 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
3713 comment.
3714 * tests/actions.at (Default tagless %printer and %destructor,
3715 Default tagged and per-type %printer and %destructor,
3716 Default %printer and %destructor are not for error or $undefined,
3717 Default %printer and %destructor are not for $accept,
3718 Default %printer and %destructor for mid-rule values): Update.
3719 * tests/input.at (Default %printer and %destructor redeclared,
3720 Unused values with default %destructor): Update.
3721
3722 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3723
3724 Don't let %prec take a nonterminal.
3725 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
3726 token.
3727 * tests/input.at (%prec takes a token): New test checking that %prec
3728 won't take a nonterminal.
3729
3730 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3731
3732 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
3733 it was double-quoted.
3734 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
3735 grammar is maintained with Bison's highest standards.
3736 * src/getargs.c: Fix some typos in Doxygen comments.
3737
3738 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3739
3740 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
3741 later. Reported by Paul Eggert in
3742 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
3743 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
3744 * src/scan-code.l (translate_action): Don't bother invoking
3745 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
3746 (code_scanner_free): Instead of invoking
3747 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
3748 which frees more.
3749 * src/scan-gram.l (gram_scanner_free): Likewise.
3750 * src/scan-skel.l (scan_skel): Likewise.
3751
3752 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3753
3754 * src/files.c (tr): Change return type to void.
3755 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
3756 has been called previously for the same key.
3757 (muscle_find): Return storage instead of value so that
3758 --enable-gcc-warnings doesn't produce warnings that the return discards
3759 const. aver that the value and storage are the same since storage
3760 could potentially be NULL when value is not.
3761 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
3762 same as 0.
3763
3764 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
3765
3766 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
3767 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
3768 us a slightly cleaner distribution, and also works.
3769 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
3770 gnulib changes.
3771
3772 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
3773 and Paul Eggert <eggert@cs.ucla.edu>
3774
3775 Don't let Bison leak memory except when it complains.
3776 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
3777 (spec_defines_file, dir_prefix): Now char *, not const char *,
3778 since they are freed.
3779 * src/files.c: Likewise.
3780 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
3781 Likewise.
3782 (tr): Now operates in-place. All uses changed.
3783 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
3784 values.
3785 (compute_file_name_parts, compute_output_file_names): Don't store
3786 read-only data in variables that will be freed.
3787 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
3788 src_extension, and header_extension.
3789 (output_file_names_free): New public function to free
3790 spec_verbose_file, spec_graph_file, spec_defines_file,
3791 parser_file_name, and dir_prefix.
3792 * src/getargs.c (getargs): Don't store read-only data in variables that
3793 will be freed.
3794 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
3795 (which previously existed but was unused), and quotearg_free.
3796 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
3797 * src/muscle_tab.c: Likewise.
3798 (muscle_entry): Make the value char const *,
3799 and add a new storage member that is char * and can be freed.
3800 (muscle_entry_free): New private function.
3801 (muscle_init): Use it instead of free.
3802 (muscle_insert, muscle_grow): Update and use new storage member.
3803 (muscle_code_grow): Free the string passed to muscle_grow
3804 since it's not needed anymore.
3805 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
3806 add a new `char *code' member.
3807 ("{...}"): Declare semantic type as code.
3808 * src/scan-code.h (translate_rule_action):
3809 (translate_symbol_action, translate_code, translate_action): Return
3810 `char const *' rather than `char *' since external code should not free
3811 these strings.
3812 * src/scan-code.l: Likewise.
3813 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
3814 which is "{...}" in the parser.
3815 * tests/Makefile.am (maintainer-check-valgrind): Set
3816 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
3817 Valgrind.
3818 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
3819 complain.
3820 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
3821 expecting a non-zero exit status sets --leak-check=summary and
3822 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
3823 this case, and we don't want to hear about it.
3824
3825 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
3826
3827 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
3828 instead of from the template, to simplify configuration a bit.
3829 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
3830 and m4/wint_t.m4, as they are needed with the latest gnulib.
3831
3832 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3833
3834 Disable unset/unused mid-rule value warnings by default, and recognize
3835 --warnings=midrule-values to enable them. Discussed starting at
3836 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
3837 * NEWS (2.3a+): Mention.
3838 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
3839 warnings): Add entry for midrule-values subargument.
3840 * src/reader.c (symbol_should_be_used): Don't return true just because
3841 the value is a set/used mid-rule value unless
3842 --warnings=midrule-values was specified.
3843 * tests/input.at (Unused values, Unused values before symbol
3844 declarations): Run tests with and without --warnings=midrule-values.
3845
3846 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
3847 than LIST_FREE directly.
3848
3849 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3850
3851 Finish implementing --warnings=error, which should not be implied by
3852 --warnings=all (or by its synonyms -W and --warnings without
3853 subarguments).
3854 * src/complain.c (set_warning_issued): New function to report that
3855 warnings are being treated as errors and to record an error if so.
3856 Invoke...
3857 (warn_at, warn): ... here.
3858 * src/getargs.c (warnings_args, warnings_types): Reorder so that
3859 "error - warnings are errors" does not appear above "all - all of the
3860 above".
3861 (getargs): For -W and --warnings without subarguments, don't let
3862 FLAGS_ARGMATCH set warnings_error in warnings_flag.
3863 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
3864
3865 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3866
3867 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
3868 empty subargument list. For example: `bison --warnings= parser.y'.
3869
3870 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3871
3872 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
3873 the parser header file so that gcc doesn't warn.
3874
3875 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3876
3877 Split the default %destructor/%printer into two kinds: <*> and <!>.
3878 Discussed starting at
3879 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
3880 * NEWS (2.3a+): Mention.
3881 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
3882 previous change today related to mid-rules.
3883 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3884 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
3885 (TYPE_TAG_ANY): Add as <*>.
3886 (TYPE_TAG_NONE): Add as <!>.
3887 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
3888 for <*> and <!>.
3889 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
3890 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
3891 * src/symlist.c (symbol_list_default_new): Split into tagged and
3892 tagless versions.
3893 (symbol_list_destructor_set, symbol_list_printer_set): Split
3894 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
3895 SYMLIST_DEFAULT_TAGLESS.
3896 * src/symlist.h: Update symbol_list_default*_new prototypes.
3897 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
3898 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
3899 * src/symtab.c (default_destructor, default_destructor_location,
3900 default_printer, default_printer_location): Split each into tagged and
3901 tagless versions.
3902 (symbol_destructor_get, symbol_destructor_location_get,
3903 symbol_printer_get, symbol_printer_location_get): Implement tagged
3904 default and tagless default cases.
3905 (default_destructor_set, default_printer_set): Split each into tagged
3906 and tagless versions.
3907 * src/symtab.h: Update prototypes.
3908 * tests/actions.at (Default %printer and %destructor): Rename to...
3909 (Default tagless %printer and %destructor): ... this, and extend.
3910 (Per-type %printer and %destructor): Rename to...
3911 (Default tagged and per-type %printer and %destructor): ... this, and
3912 extend.
3913 (Default %printer and %destructor for user-defined end token): Extend.
3914 (Default %printer and %destructor are not for error or $undefined):
3915 Update.
3916 (Default %printer and %destructor are not for $accept): Update.
3917 (Default %printer and %destructor for mid-rule values): Extend.
3918 * tests/input.at (Default %printer and %destructor redeclared): Extend.
3919 (Unused values with default %destructor): Extend.
3920
3921 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3922
3923 Don't apply the default %destructor/%printer to an unreferenced midrule
3924 value. Mentioned at
3925 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
3926 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
3927 like $@n instead of just @n so that the default %destructor/%printer
3928 logic doesn't see them as user-defined symbols.
3929 (symbol_is_dummy): Check for both forms of the name.
3930 * src/reader.c (packgram): Remove the `$' from each midrule symbol
3931 name for which the midrule value is referenced in any action.
3932 * tests/actions.at (Default %printer and %destructor for mid-rule
3933 values): New test.
3934 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
3935 for change to dummy symbol names.
3936
3937 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3938
3939 Warn about unset midrule $$ if the corresponding $n is used.
3940 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
3941 $n usage.
3942 (packgram): Before invoking grammar_rule_check on any rule, make sure
3943 all actions have already been scanned in order to set `used' flags.
3944 Otherwise, checking that a midrule's $$ is set will not always work
3945 properly because the midrule check must forward-reference the midrule's
3946 parent rule.
3947 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
3948 warning.
3949
3950 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3951
3952 More improvements to the documentation of the prologue alternatives:
3953 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
3954 Bison manual.
3955 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
3956 some text to clarify the relative importance of the new directives and
3957 to show how these directives may be viewed as code labels.
3958
3959 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
3960
3961 Similar to the recently removed %before-header, add %code-top as the
3962 alternative to the pre-prologue. Mentioned at
3963 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
3964 Also, let the prologue alternatives appear in the grammar section.
3965 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
3966 (prologue_declaration): Move the existing prologue alternatives to...
3967 (grammar_declaration): ... here and add %code-top.
3968 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
3969
3970 Clean up and extend documentation for the prologue alternatives.
3971 * NEWS (2.3a+): Describe prologue alternatives.
3972 * doc/bison.texinfo (Prologue): Move discussion of prologue
3973 alternatives to...
3974 (Prologue Alternatives): ... this new section, and extend it to discuss
3975 all 4 directives in detail.
3976 (Table of Symbols): Clean up discussion of prologue alternatives and
3977 add %code-top.
3978
3979 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3980
3981 DJGPP specific issues.
3982
3983 * djgpp/config.bat: config.hin has been moved to lib. Adjust
3984 config.bat accordingly.
3985 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
3986 * djgpp/config.site: Likewise.
3987
3988 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
3989
3990 Replace %*-header with %provides, %requires, %code. See discussion at
3991 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
3992
3993 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
3994 (b4_user_start_header): Remove.
3995 * data/glr.c: Use new macros instead of b4_*start_header
3996 and b4_*end_header.
3997 * data/glr.cc: Likewise.
3998 * data/lalr1.cc: Likewise.
3999 * data/push.c: Likewise.
4000 * data/yacc.c: Likewise.
4001
4002 * doc/bison.texinfo: Remove %before-header, rename
4003 %{start,end,after}-header to %requires, %provides, %code.
4004
4005 * src/parse-gram.y: Likewise (also rename token names accordingly).
4006 * src/scan-gram.l: Likewise.
4007 * tests/actions.at: Likewise.
4008
4009 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
4010
4011 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
4012 Problem reported by Joel E. Denny.
4013
4014 2006-10-14 Jim Meyering <jim@meyering.net>
4015
4016 (Sync from coreutils.)
4017 Work also when the working directory (with e.g. coreutils sources)
4018 is version controlled with git, rather than CVS.
4019 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
4020 rather than CVS.
4021 In messages and comments, say e.g., "checked-out sources",
4022 rather than "CVS sources".
4023 (version_controlled_file): New function. Work for git as well as
4024 for CVS. Don't use grep's -q option.
4025 (slurp): Call it here, in place of CVS-specific code.
4026
4027 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
4028
4029 Fix testsuite for ./configure --enable-gcc-warnings:
4030 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
4031 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
4032 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
4033 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
4034 * test/regression.at (Diagnostic that expects two alternatives):
4035 Likewise.
4036
4037 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
4038
4039 * bootstrap.conf (gnulib_modules): Add config-h.
4040 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
4041 worry about HAVE_CONFIG_H.
4042 * lib/abitset.c: Likewise.
4043 * lib/bitset.c: Likewise.
4044 * lib/bitset_stats.c: Likewise.
4045 * lib/bitsetv-print.c: Likewise.
4046 * lib/bitsetv.c: Likewise.
4047 * lib/ebitset.c: Likewise.
4048 * lib/get-errno.c: Likewise.
4049 * lib/lbitset.c: Likewise.
4050 * lib/subpipe.c: Likewise.
4051 * lib/timevar.c: Likewise.
4052 * lib/vbitset.c: Likewise.
4053 * lib/bitset.c: Include "bitset.h" first, to test interface.
4054 * lib/bitset_stats.c: Include "bitset_stats.h" first.
4055 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
4056 * lib/bitsetv.c: Include "bitsetv.h" first.
4057 * lib/get-errno.c: Include "get-errno.h" first.
4058 * m4/.cvsignore: Add config-h.m4.
4059 * tests/actions.at (Default %printer and %destructor for ...):
4060 Adjust expected line numbers in output to reflect removal of #if
4061 HAVE_CONFIG_H lines.
4062 * tests/glr-regression.at (Missed %merge type warnings when ...):
4063 Likewise.
4064 * tests/regression.at (Braced code in declaration in rules section):
4065 Likewise.
4066 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
4067 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
4068 Include <config.h> unconditionally.
4069
4070 * bootstrap: Sync from coreutils, as follows:
4071
4072 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
4073
4074 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
4075 variable was sometimes used without being initialized. This
4076 messed up the installation of the INSTALL file in some cases.
4077
4078 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
4079
4080 * bootstrap (usage, main program, symlink_to_gnulib): Add option
4081 --copy. Inspired by a suggestion from Bruno Haible.
4082
4083 2006-10-03 Jim Meyering <jim@meyering.net>
4084
4085 * bootstrap: Undo last change to this file, since now gnulib-tool
4086 sticks with the automake default in generating dependencies.
4087
4088 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
4089
4090 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
4091 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
4092
4093 * doc/bison.1: Add copyright notice.
4094
4095 * data/glr.c: Don't include <stdarg.h>; not used.
4096
4097 * NEWS: The -g and --graph options now output graphs in Graphviz
4098 DOT format, not VCG format.
4099 * doc/bison.1: Likewise.
4100 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
4101 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
4102 of this change in
4103 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
4104 * TODO: Remove Graphviz entry.
4105 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
4106 remove vcg.c, vcg.h, vcg_defaults.h.
4107 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
4108 * src/graphviz.c, src/graphviz.h: New files.
4109 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
4110 * src/files.h: Make comment more generic.
4111 * src/main.c (main): Likewise.
4112 * src/print_graph.h: Likewise.
4113 * src/getargs.c (usage): Make usage description more generic.
4114 * src/print_graph.c: Include graphviz.h rather than vcg.h.
4115 (static_graph, fgraph): Remove. All uses changed to pass
4116 arguments instead of sharing a static var.
4117 (print_core, print_actions, print_state, print_graph):
4118 Output graphviz format rather than VCG format.
4119 * tests/.cvsignore: Remove *.vcg; add *.dot.
4120 * tests/output.at: Expect *.dot files, not *.vcg files.
4121
4122 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
4123 accommodates the 2006-10-08 change.
4124
4125 2006-10-11 Bob Rossi <bob@brasko.net>
4126
4127 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
4128 (b4_yyssa, b4_yyerror_range): New macros.
4129 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
4130 (yypvarsinit): Remove init of removed fields.
4131 (yypushparse): Remove use of removed fields; use new macros instead.
4132
4133 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
4134
4135 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
4136 in a push parser. Reindent slightly to match yacc.c better.
4137
4138 2006-10-11 Bob Rossi <bob@brasko.net>
4139
4140 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
4141 yymsg_alloc fields.
4142 (yypvarsinit, yypushparse): Remove init of removed fields.
4143 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
4144
4145 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
4146
4147 * THANKS: Add Paolo Bonzini and Bob Rossi.
4148
4149 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
4150
4151 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
4152 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
4153 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
4154 b4_define_user_cde and uses): Remove.
4155 (b4_comment, b4_prefix, b4_sync_start): New.
4156 * data/bison.m4: New file, with most of the content removed from c.m4.
4157 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
4158 * src/output.c (output_skeleton): Pass bison.m4.
4159 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
4160 only if specified.
4161
4162 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
4163
4164 Fix test failure reported by Tom Lane in
4165 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
4166 and try to make such failures easier to catch in the future.
4167 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
4168 that's now the caller's responsibility.
4169 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
4170 Set yychar = YYEOF if it's negative.
4171 * tests/actions.at (yylex): Abort if asked to read past EOF.
4172 * tests/conflicts.at (yylex): Likewise.
4173 * tests/cxx-type.at (yylex): Likewise.
4174 * tests/glr-regression.at (yylex): Likewise.
4175 * tests/input.at (yylex): Likewise.
4176 * tests/regression.at (yylex): Likewise.
4177 * tests/torture.at (yylex): Likewise.
4178
4179 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
4180
4181 Fix problems with translating English-language diagnostics.
4182 * bootstrap: Fix bug introduced in recent bootstrap changes, with
4183 respect to bison-runtime pot generation. The YY_ stuff
4184 wasn't being captured.
4185 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
4186 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
4187 * runtime-po/POTFILES.in: Add data/push.c.
4188
4189 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
4190
4191 Merge bootstrap changes from coreutils.
4192
4193 2006-09-28 Jim Meyering <jim@meyering.net>
4194
4195 Automatically generated dependencies are important even
4196 when all of the sources in a directory come from gnulib.
4197 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
4198 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
4199
4200 2006-09-23 Jim Meyering <jim@meyering.net>
4201
4202 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
4203
4204 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4205
4206 * bootstrap: Add support for --force.
4207 (usage): New function. Describe usage less tersely.
4208 (CVS_only_file): New var.
4209
4210 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
4211
4212 * data/push.c (YYPUSH_MORE): Make it an enum instead.
4213 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
4214 Adjust white space and comments to match GNU style better.
4215
4216 2006-09-20 Bob Rossi <bob@brasko.net>
4217
4218 * data/push.c (yyresult_get): Remove function.
4219 (YYPUSH_MORE): Add #define.
4220 (yypushparse): Modify return value.
4221
4222 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4223
4224 * stamp-h.in: Remove; no longer needed.
4225 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
4226 Remove config.h, config.hin, intl (no longer created).
4227 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
4228 stamp-h1.
4229
4230 Sync bootstrap from coreutils, as follows:
4231
4232 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
4233
4234 * bootstrap (symlink_to_gnulib): New function.
4235 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
4236 to copies-of-gnulib.
4237 (cp_mark_as_generated, slurp, gnulib_files):
4238 Avoid making a copy if it's the same as the old version.
4239 (gnulib_files): Add support for this variable (used by Bison).
4240
4241 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4242
4243 * src/getargs.c (usage): Rework to use conventions similar to
4244 coreutils, to make translation a bit easier and the code a bit
4245 smaller. Problem reported by Tim Van Holder.
4246
4247 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
4248
4249 Use some of gnulib's new modules, taken from coreutils.
4250
4251 * bootstrap: Sync from coreutils, except add support for gnulib_files.
4252 * bootstrap.conf: New file.
4253 (gnulib_modules): Add configmake, inttypes, unistd.
4254 (XGETTEXT_OPTIONS): Add complain, complain_at,
4255 fatal, fatal_at, warn, warn_at, unexpected_end.
4256 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
4257 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
4258 (gl_EARLY): Add.
4259 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
4260 (gl_INIT): Add
4261 (GNULIB_AUTOCONF_SNIPPET): Remove.
4262 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
4263 the pickiest.
4264 * lib/.cvsignore: Add inttypes_.h.
4265 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
4266 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
4267 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
4268 no-longer-necessary initializations.
4269 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
4270 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
4271 use the unistd module.
4272 * src/system.h: Likewise.
4273 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
4274 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
4275 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
4276 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
4277 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
4278 * src/system.h: Include inttypes.h unconditionally, now that we
4279 use the inttypes module. Don't bother to include stdint.h, since
4280 inttypes.h now does that for us.
4281 (LOCALEDIR): Remove, now that we use the configmake module.
4282 * src/getargs.c: Include configmake.h.
4283 * src/main.c: Likewise.
4284 * src/output.c: Likewise.
4285 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
4286 not from $abs_top_builddir, since config.h moved.
4287
4288
4289 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
4290 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
4291
4292 * src/parse-gram.y (symbol_declaration): Don't put statements
4293 before declarations; it's not portable to C89.
4294 * src/scan-code.l (handle_action_at): Likewise.
4295
4296 * src/scan-code.l: Always initialize braces_level; the old code
4297 left it uninitialized and therefore had undefined behavior.
4298
4299 Don't attempt to redefine 'assert', since it runs afoul of
4300 systems where standard headers (mistakenly) include <assert.h>.
4301 Instead, define and use our own alternative, called 'aver'.
4302 * src/reader.c: Don't include assert.h, since we no longer
4303 use assert.
4304 * src/scan-code.l: Likewise.
4305 * src/system.h (assert): Remove, replacing with....
4306 (aver): New function, taking a bool arg. All uses changed.
4307 * src/tables.c (pack_vector): Ensure that aver arg is bool,
4308 not merely an integer.
4309
4310 2006-09-15 Bob Rossi <bob@brasko.net>
4311
4312 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
4313 * data/c.m4 (YYPUSH): New.
4314 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
4315 * src/getargs.c (push_parser): New var.
4316 * src/getargs.h (push_parser): New declaration.
4317 * src/output.c (prepare): Add macro insertion of `push_flag'.
4318 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
4319 (prologue_declaration): Parse %push-parser.
4320 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
4321 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
4322 list of removed lines from the traces observed.
4323 (AT_CHECK_CALC_LALR): Added push parser tests.
4324
4325 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
4326
4327 * NEWS: Version 2.3a.
4328 * configure.ac (AC_INIT): Likewise.
4329
4330 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
4331 "#define YYSTYPE int" that caused "make maintainer-check" to fail
4332 due to header ordering dependencies. I don't know why the #define
4333 was there.
4334
4335 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
4336 runtime cost when YYDEBUG is not defined, and so that some tests
4337 that used to fail now work. Problem and initial suggestion by
4338 Paolo Bonzini.
4339 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
4340 * data/glr.cc (b4_parser_class_name):
4341 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
4342 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
4343 (yydebug_) [YYDEBUG]: New member.
4344 (yycdebug_): Now defined only if YYDEBUG.
4345 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
4346 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
4347 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
4348 if YYYDEBUG.
4349 (debug_stream, set_debug_stream, debug_level, set_debug_level):
4350 Define only if YYDEBUG.
4351 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
4352 set_debug_level.
4353 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
4354 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
4355 AT_CHECK_CALC_GLR_CC that are working now.
4356
4357 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
4358
4359 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
4360 We don't need them in glr.cc, and glr.c defines them.
4361 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
4362 assumes that defining it to anything is the same as defining
4363 it to 1. Problem reported by Paolo Bonzini.
4364
4365 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
4366
4367 * data/c.m4 (b4_null, b4_case): Define.
4368 * src/output.c (prepare_symbols): Use b4_null.
4369 (user_actions_output): Use b4_case.
4370
4371 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
4372
4373 * data/glr.c (b4_shared_declarations): Put start-header first,
4374 before any #includes that we generate, so that feature-test
4375 macros work. Problem reported by Michael Deutschmann in
4376 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
4377 * data/lalr1.cc: Likewise.
4378 * doc/bison.texinfo (Prologue): Document that feature-test macros
4379 should be defined before any Bison declarations.
4380 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
4381 that depend on location.hh after, not before, Bison decls, since
4382 we now include location.hh after the first user prologue.
4383
4384 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
4385 Sander Brandenburg in
4386 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
4387 Also, fix minor white space and comment issues.
4388 (Prologue): Mention that it's better to define feature-test macros
4389 before Bison declarations. Problem reported by Michael Deutschmann.
4390
4391 * README-cvs: Fix typo: "&" should be "&&". Problem reported
4392 by Jim Meyering.
4393 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
4394 This adjusts to recent gnulib changes.
4395
4396 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
4397
4398 Finish implementation of per-type %destructor/%printer. Discussed
4399 starting at
4400 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
4401 and
4402 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
4403 * NEWS (2.3+): Add a description of this feature to the default
4404 %destructor/%printer description.
4405 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
4406 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4407 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
4408 list node contains a semantic type.
4409 * src/symtab.c, src/symtab.h: Extend with a table that associates
4410 semantic types with their %destructor's and %printer's.
4411 (semantic_type_from_uniqstr, semantic_type_get,
4412 semantic_type_destructor_set, semantic_type_printer_set): New functions
4413 composing the public interface of that table.
4414 (symbol_destructor_get, symbol_destructor_location_get,
4415 symbol_printer_get, symbol_printer_location_get): If there's no
4416 per-symbol %destructor/%printer, look up the per-type before trying
4417 the default.
4418 * tests/actions.at (Per-type %printer and %destructor): New test case.
4419 * tests/input.at (Default %printer and %destructor redeclared):
4420 Extend to check that multiple occurrences of %symbol-default in a
4421 single %destructor/%printer declaration is an error.
4422 (Per-type %printer and %destructor redeclared, Unused values with
4423 per-type %destructor): New test cases.
4424
4425 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
4426
4427 Require default %destructor/%printer to be declared using
4428 %symbol-default instead of an empty symbol list, and start working on
4429 new per-type %destructor/%printer. Discussed at
4430 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
4431 * NEWS (2.3+): Add %symbol-default to example.
4432 * bison.texinfo (Freeing Discarded Symbols): Likewise.
4433 (Table of Symbols): Add entry for %symbol-default.
4434 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
4435 (generic_symlist, generic_symlist_item): New nonterminals for creating
4436 a list in which each item is a symbol, semantic type, or
4437 %symbol-default.
4438 (grammar_declaration): Use generic_symlist in %destructor and %printer
4439 declarations instead of symbols.1 or an empty list.
4440 (symbol_declaration, precedence_declaration, symbols.1): Update actions
4441 for changes to symbol_list.
4442 * src/reader.c: Update for changes to symbol_list.
4443 * src/scan-code.l: Likewise.
4444 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
4445 * src/symlist.c, src/symlist.h: Extend such that a list node may
4446 represent a semantic type or a %symbol-default in addition to just an
4447 ordinary symbol. Add switched functions for setting %destructor's and
4448 %printer's.
4449 * tests/actions.at, tests/input.at: Add %symbol-default to all default
4450 %destructor/%printer declarations.
4451
4452 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
4453
4454 Whether the default %destructor/%printer applies to a particular symbol
4455 isn't a question of whether the user *declares* that symbol (in %token,
4456 for example). It's a question of whether the user by any means
4457 *defines* the symbol at all (by simply using a char token, for
4458 example). $end is defined by Bison whereas any other token with token
4459 number 0 is defined by the user. The error token is always defined by
4460 Bison regardless of whether the user declares it with %token, but we
4461 may one day let the user define error as a nonterminal instead.
4462 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
4463 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
4464 the meaning of "user-defined".
4465 * tests/actions.at (Default %printer and %destructor for user-declared
4466 end token): Rename to...
4467 (Default %printer and %destructor for user-defined end token): ...
4468 this.
4469
4470 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
4471 computation of whether to apply the default, don't maintain a list of
4472 every Bison-defined symbol. Instead, just check for a first character
4473 of '$', which a user symbol cannot have, and check for the error token.
4474
4475 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
4476
4477 Don't apply the default %destructor or %printer to the error token,
4478 $undefined, or $accept. This change fits the general rule that the
4479 default %destructor and %printer are only for user-declared symbols,
4480 and it solves several difficulties that are described in the new test
4481 cases listed below.
4482 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
4483 * tests/actions.at (Default %printer and %destructor are not for error
4484 or $undefined, Default %printer and %destructor are not for $accept):
4485 New test cases.
4486
4487 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
4488
4489 Allow %start after the first rule.
4490 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
4491 when parsing the first rule.
4492 (check_and_convert_grammar): Search for it here after all grammar
4493 declarations have been parsed. Skip midrules, which have dummy LHS
4494 nonterminals.
4495 * src/symtab.c (symbol_is_dummy): New function.
4496 * src/symtab.h (symbol_is_dummy): Declare it.
4497 * tests/input.at (%start after first rule): New test.
4498
4499 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
4500
4501 Redo some of the previous commit: add back the ability to use
4502 non-aliased/undeclared string literals since it might be useful to
4503 those declaring %token-table.
4504 * src/reader.c (check_and_convert_grammar): Undo changes in previous
4505 commit: don't worry about complaints from symbols_pack.
4506 * src/symtab.c (symbol_new, symbol_class_set,
4507 symbol_check_alias_consistency): Undo changes in previous commit: count
4508 each string literal as a new symbol and token, assign it a symbol
4509 number, and don't complain about non-aliased string literals.
4510 (symbols_pack): Since symbol_make_alias still does not decrement symbol
4511 and token counts but does still set aliased tokens to the same number,
4512 symbol_pack_processor now leaves empty slots in the symbols array.
4513 Remove those slots.
4514 * tests/regression.at (Undeclared string literal): Remove test case
4515 added in previous commit since non-aliased string literals are allowed
4516 again.
4517 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
4518 remove unnecessary string literal declarations.
4519 * tests/sets.at (Firsts): Likewise.
4520
4521 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
4522
4523 Don't allow an undeclared string literal, but allow a string literal to
4524 be used before its declaration.
4525 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
4526 symbols_pack complained.
4527 * src/symtab.c (symbol_new): Don't count a string literal as a new
4528 symbol.
4529 (symbol_class_set): Don't count a string literal as a new token, and
4530 don't assign it a symbol number since symbol_make_alias does that.
4531 (symbol_make_alias): It's not necessary to decrement the symbol and
4532 token counts anymore. Don't assume that an alias declaration occurs
4533 before any uses of the identifier or string, and thus don't assert that
4534 one of them has the highest symbol number so far.
4535 (symbol_check_alias_consistency): Complain if there's a string literal
4536 that wasn't declared as an alias.
4537 (symbols_pack): Bail if symbol_check_alias_consistency failed since
4538 symbol_pack asserts that every token has been assigned a symbol number
4539 although undeclared string literals have not.
4540 * tests/regression.at (String alias declared after use, Undeclared
4541 string literal): New test cases.
4542 (Characters Escapes, Web2c Actions): Declare string literals as
4543 aliases.
4544 * tests/sets.at (Firsts): Likewise.
4545
4546 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
4547
4548 In the grammar scanner, STRING_FINISH unclosed constructs and return
4549 them to the parser in order to improve error messages.
4550 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
4551 SC_BRACED_CODE, SC_PROLOGUE): Implement.
4552 * tests/input.at (Unclosed constructs): New test case.
4553 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
4554 seen.
4555
4556 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
4557 unused global.
4558
4559 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
4560
4561 Handle string aliases for character tokens correctly.
4562 * src/symtab.c (symbol_user_token_number_set): If the token has an
4563 alias, check and set its alias's user token number instead of its own,
4564 which is set to indicate the alias. Previously, every occurrence of
4565 the character token in the grammar overwrote that alias indicator with
4566 the character code.
4567 * tests/input.at (String aliases for character tokens): New test.
4568
4569 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
4570
4571 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
4572
4573 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
4574
4575 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
4576 to prevent failures when building on older platforms.
4577 Check for autopoint failure.
4578 Set XGETTEXT_OPTIONS to values that check for C format strings,
4579 so that translators are warned about them (this also helps
4580 prevent core dumps).
4581
4582 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
4583 function, since it simplifies our code a bit.
4584
4585 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
4586 rather than -W, so we don't get bogus warnings about sign comparisons.
4587 Add -Wpointer-arith, since that warning is useful (it reports code
4588 that does not conform to C89 and that some compilers reject).
4589 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
4590 since it's no longer needed.
4591
4592 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
4593
4594 Clean up scanners a bit.
4595 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
4596 definitions so gcc won't warn when obstack_for_string is unused.
4597 * src/scan-code.l: config.h and system.h are already #include'd by
4598 scan-code-c.c, so get rid of them here.
4599 * src/scan-gram.l: Likewise.
4600 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
4601 definitions rather than duplicating the rest of it.
4602 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
4603
4604 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
4605
4606 Suppress signed/unsigned comparison warnings for yycheck.
4607 * data/c.m4 (b4_safest_int_type): New macro.
4608 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
4609 a signed int type, cast it to b4_safest_int_type first.
4610 * data/yacc.c: Likewise.
4611 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
4612 also overwritten.
4613
4614 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
4615
4616 * doc/bison.texinfo: Fix some typos.
4617
4618 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
4619
4620 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
4621 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
4622
4623 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
4624 the latest gnulib does this a different way.
4625 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
4626 translation was patched, so stop omitting it.
4627
4628 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
4629
4630 Enable declaration of default %printer/%destructor. Make the parser
4631 use these for all user-declared grammar symbols for which the user does
4632 not declare a specific %printer/%destructor. Thus, the parser uses it
4633 for token 0 if the user declares it but not if Bison generates it as
4634 $end. Discussed starting at
4635 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
4636 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
4637 and
4638 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
4639 * NEWS (2.3+): Mention.
4640 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
4641 declare a %destructor for a mid-rule's semantic value. It's just
4642 impossible to declare one specific to it.
4643 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
4644 code. Describe default %destructor form.
4645 * src/parse-gram.y (grammar_declaration): Parse default
4646 %printer/%destructor declarations.
4647 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
4648 and symbol_destructor_location_get rather than accessing the destructor
4649 and destructor_location members of struct symbol.
4650 (symbol_printers_output): Likewise but for %printer's.
4651 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
4652 again.
4653 * src/symtab.c (default_destructor, default_destructor_location,
4654 default_printer, default_printer_location): New static global
4655 variables to record the default %destructor and %printer.
4656 (symbol_destructor_get, symbol_destructor_location_get,
4657 symbol_printer_get, symbol_printer_location_get): New functions to
4658 compute the appropriate %destructor and %printer for a symbol.
4659 (default_destructor_set, default_printer_set): New functions to set the
4660 default %destructor and %printer.
4661 * src/symtab.h: Prototype all those new functions.
4662 * tests/actions.at (Default %printer and %destructor): New test to
4663 check that the right %printer and %destructor are called, that they're
4664 not called for $end, and that $$ and @$ work correctly.
4665 (Default %printer and %destructor for user-declared end token): New
4666 test to check that the default %printer and %destructor are called for
4667 a user-declared end token.
4668 * tests/input.at (Default %printer and %destructor redeclared, Unused
4669 values with default %destructor): New tests to check related grammar
4670 warnings and errors.
4671
4672 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
4673
4674 Clean up handling of %destructor for the end token (token 0).
4675 Discussed starting at
4676 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
4677 and
4678 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
4679
4680 Make the skeletons consistent in how they pop the end token and invoke
4681 its %destructor.
4682 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
4683 state, which has token number 0, since this would invoke the
4684 %destructor for the end token.
4685 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
4686 until after shifting the end token, or else it won't be popped.
4687 * data/yacc.c (yyparse): Likewise.
4688
4689 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
4690 it's the end token. Upon termination, destroy an unshifted lookahead
4691 even when it's the end token.
4692 * data/lalr1.cc (yy::parser::parse): Likewise.
4693 * data/yacc.c (yyparse): Likewise.
4694
4695 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
4696 value warnings for the end token when the user gives the end token a
4697 %destructor.
4698
4699 * tests/actions.at (Printers and Destructors): Test all the above.
4700
4701 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
4702
4703 Update to latest gnulib and gettext versions.
4704 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
4705 Add fopen-safer.
4706 (gnulib_files): Add m4/warning.m4. Don't worry about files
4707 overwritten by autopoint.
4708 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
4709 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
4710 rejects them.
4711 Don't use autoreconf; instead, invoke autopoint etc. by hand,
4712 so that we can remove the intl files at a better time.
4713 (intl_files_to_remove): Remove aclocal.m4, since it gets
4714 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
4715 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
4716 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
4717 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
4718 Remove datarootdir hack; no longer needed.
4719 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
4720 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
4721 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
4722 strdup.h.
4723 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
4724 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
4725
4726 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
4727
4728 * bootstrap: Adjust to today's change to gnulib-tool by invoking
4729 it with --assume-autoconf='latest-stable'.
4730
4731 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
4732
4733 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
4734 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
4735 YYSTYPE' and `{'.
4736 * src/muscle_tab.h (muscle_grow): Replace the header comments with
4737 those from muscle_tab.c since the old ones are misleading.
4738
4739 2006-07-13 Akim Demaille <akim@epita.fr>
4740
4741 Support %define "KEY" {VALUE}.
4742 * src/scan-code.h, src/scan-code.l (translate_action)
4743 (translate_rule_action, translate_symbol_action, translate_code):
4744 Return char *, not const char *.
4745 * src/parse-gram.y (declaration): Rename as...
4746 (prologue_declaration): this.
4747 (string_content): Remove this nonterminal, use STRING.
4748 (braceless, content, content.opt): New nonterminal.
4749 Use them.
4750 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
4751 as value.
4752 * src/scan-gram.l (getargs.h): Don't include it.
4753
4754 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
4755
4756 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
4757 rather than a for-loop that declares a local bool variable. This
4758 should work around a compatibility problem with a Cray x1e C++
4759 compiler reported by Hung Nguyen in
4760 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
4761 The for-loop was introduced in the 2004-11-17 change but I don't
4762 know why it was needed.
4763
4764 2006-07-12 Akim Demaille <akim@epita.fr>
4765
4766 * data/c.m4: Comment changes.
4767
4768 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
4769
4770 * src/complain.c (error_message, ERROR_MESSAGE): New.
4771 To factor...
4772 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
4773 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
4774
4775 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
4776
4777 * NEWS: Instead of %union, you can define and use your own union type
4778 YYSTYPE if your grammar contains at least one <type> tag.
4779 Your YYSTYPE need not be a macro; it can be a typedef.
4780 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
4781 (Union Decl, Decl Summary): Document this.
4782 * data/glr.c (YYSTYPE): Implement this.
4783 * data/glr.cc (YYSTYPE): Likewise.
4784 * data/lalr1.cc (YYSTYPE): Likewise.
4785 * data/yacc.c (YYSTYPE): Likewise.
4786 * src/output.c (prepare): Output tag_seen_flag.
4787 * src/parse-gram.y (declaration, grammar_declaration):
4788 Use 'union_seen' rather than 'typed' to determine whether
4789 %union has been seen, since grammars can now be typed without
4790 %union.
4791 (symbol_declaration, type.opt, symbol_def):
4792 Keep track of whether a tag has been seen.
4793 * src/reader.c (union_seen, tag_seen): New vars.
4794 (typed): remove.
4795 * src/reader.h (union_seen, tag_seen, typed): Likewise.
4796 * src/scan-code.l (untyped_var_seen): New variable.
4797 (handle_action_dollar): Adjust to above changes.
4798 (handle_action_dollar, handle_action_at):
4799 Improve overflow checking for outlandish numbers.
4800 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
4801 avoid new diagnostics generated by above changes.
4802 * tests/regression.at (YYSTYPE typedef): Add test to check
4803 for type tags without %union.
4804
4805 * src/symlist.c (symbol_list_length): Return int, not unsigned
4806 int, since callers expect int. This may need to get revisited
4807 once we have proper integer overflow checking.
4808
4809 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
4810 object is now static.
4811
4812 * src/getargs.c (flags_argmatch): Return void, not int,
4813 to pacify ./configure --enable-gcc-warnings.
4814
4815 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
4816 since last_string is already defined to FLEX_PREFIX (last_string).
4817
4818 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
4819
4820 Implement --warnings/-W.
4821 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
4822 replaced by...
4823 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
4824 Adjust callers.
4825 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
4826 (warnings_args, warnings_types): New.
4827 (getargs, short_options, long_options): Accept -W/--warnings.
4828 Sort the options by alphabetical order, upper case letter right
4829 before its lower case.
4830
4831 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4832
4833 Change %merge result type clash warnings to errors. Discussed at
4834 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
4835 * src/reader.c (record_merge_function_type): Use complain_at.
4836 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4837 declared later): Update test case results.
4838
4839 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
4840
4841 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
4842 to be in alphabetical order.
4843 (trace_args): Spelling fixes.
4844
4845 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
4846
4847 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
4848 so they don't collide with user-defined macros.
4849 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
4850 this was never guaranteed, and now that we're using gnulib stdint,
4851 which defines int_fast16_t to long int, the problem is exposed.
4852
4853 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
4854
4855 * data/c.m4 (b4_basename): Simplify a bit, since we don't
4856 need the full POSIX semantics (and weren't implementing them
4857 anyway).
4858
4859 Adjust to Autoconf 2.60 and today's gnulib.
4860 * bootstrap (gnulib_modules): Add stdint.
4861 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
4862 no longer copies it.
4863 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
4864 since stdint needs the former and wcwidth (which is now required
4865 by mbswidth) needs the latter.
4866 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
4867 work around a compatibility glitch between gettext 0.14.6 and
4868 Autoconf 2.60.
4869 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
4870 Do not check for uintptr_t, since new stdint module does the right
4871 thing.
4872 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
4873 Add stdint.h, stdint_.h, wcwidth.h.
4874 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
4875 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
4876 stdint.m4, wchar_t.m4, wcwidth.m4.
4877 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
4878 usual order for ../lib/*.h files.
4879 (file_name_split): Use last_component, not base_name, to adjust
4880 to gnulib changes.
4881 * src/parse-gram.h: Include <strverscmp.h> in the usual order
4882 for ../lib/*.h files.
4883 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
4884 Define unconditionally, since we now assume the stdint module.
4885 * src/scan-skel.l: Include <dirname.h>.
4886 (BASE_QPUTS): Use last_component, not base_name.
4887 * src/system.h: Include <unlocked-io.h> in the usual order
4888 for ../lib/*.h files. Include <stdint.h> unconditionally,
4889 since we now use the stdint module.
4890 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
4891 HAVE_UINTPTR_T, since we now use the stdint module.
4892 (base_name): Remove decl, since files now include <dirname.h>
4893 to get the decl.
4894
4895 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
4896
4897 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
4898 New, default to 1.
4899 * data/yacc.c, data/glr.c, data/location.cc: Use them.
4900 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
4901 default.
4902 * tests/calc.at: Adjust.
4903
4904 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
4905
4906 * data/c.m4 (b4_basename): New.
4907 (b4_syncline): Also output the location of its invocation (from
4908 the skeleton).
4909 (b4_user_action, b4_define_user_action, b4_user_actions)
4910 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
4911 (b4_user_stype): New.
4912 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
4913
4914 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
4915
4916 In the grammar file, the first column is 1 not 0 on the first line as
4917 on every other line.
4918 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
4919 * tests/input.at (Torturing the Scanner): Update output.
4920
4921 * src/scan-gram.l (scanner_cursor): Declare it static.
4922
4923 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
4924
4925 In warnings, say "previous declaration" rather than "first
4926 declaration".
4927 * src/symtab.c (redeclaration): Do that here.
4928 * src/reader.c (record_merge_function_type): In the case of a result
4929 type clash, report the previous declaration rather than the very first
4930 one in the grammar file.
4931 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4932 declared later): Add a third declaration to check this behavior.
4933 * tests/input.at (Incompatible Aliases): Update output.
4934
4935 2006-06-27 Akim Demaille <akim@epita.fr>
4936
4937 * doc/Doxyfile.in: New.
4938 * doc/Makefile.am: Use it.
4939 * src/lalr.h, src/symtab.h: Initial doxygenation.
4940
4941 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4942
4943 Don't miss %merge result type warnings just because the LHS types are
4944 declared after the %merge. This continues the effort of the previous
4945 patch.
4946 * src/reader.c (get_merge_function): Don't set the merger type yet.
4947 (record_merge_function_type): New function for setting the merger type
4948 and checking for clashes.
4949 (grammar_current_rule_merge_set): Set the location of the %merge for
4950 the current rule.
4951 (packgram): Invoke record_merge_function_type for each rule now that
4952 all symbol type declarations have been parsed.
4953 * src/reader.h (merger_list.type_declaration_location): New member
4954 storing the location of the first %merge from which the type for this
4955 merging function was derived.
4956 * src/symlist.h (symbol_list.merger_declaration_location): New member
4957 storing the location of a rule's %merge, if any.
4958 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4959 declared later): New test to catch the error fixed by the above patch.
4960
4961 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4962
4963 Get action warnings (grammar_rule_check) right even when symbol
4964 declarations appear after the rules. Discussed at
4965 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
4966 and
4967 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
4968 Don't mistake the type of $$ in a midrule to be that of its parent
4969 rule's $$.
4970 * src/reader.c (grammar_current_rule_end): Don't invoke
4971 grammar_rule_check yet since not all symbol declarations may have been
4972 parsed yet.
4973 (grammar_midrule_action): Likewise.
4974 Don't record whether the midrule's $$ has been used yet since actions
4975 haven't been translated yet.
4976 Record the midrule's parent rule and its RHS index within the parent
4977 rule.
4978 (grammar_current_rule_action_append): Don't translate the action yet
4979 since not all symbol declarations may have been parsed yet and, thus,
4980 warnings about types for $$, $n, @$, and @n can't be reported yet.
4981 (packgram): Translate the action and invoke grammar_rule_check now that
4982 all symbol declarations have been parsed.
4983 * src/scan-code.l (handle_action_dollar): Now that this is invoked
4984 after parsing the entire grammar file, the symbol list here in the case
4985 of a midrule is actually the midrule's empty RHS, so reference its
4986 parent rule's RHS where necessary.
4987 On the other hand, now that you can already know it's a midrule, you
4988 aren't forced to think $$ has the same type as its parent rule's $$.
4989 (handle_action_at): In the case of a midrule, reference the parent rule
4990 where necessary.
4991 * src/symlist.c (symbol_list_new): Initialize new midrule-related
4992 members.
4993 (symbol_list_length): Now that this is invoked after all rules have
4994 been parsed, a NULL symbol (rather than a NULL symbol list node)
4995 terminates a rule. symbol_list_print already does this correctly.
4996 * src/symlist.h (symbol_list.midrule_parent_rule,
4997 symbol_list.midrule_parent_rhs_index): New members so that midrules can
4998 remember their relationships with their parents.
4999 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
5000 fixed by the above patch.
5001 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
5002 implementing...
5003 (Unused values): ... this old test case and...
5004 (Unused values before symbol declarations): ... this new test case.
5005 This one is the same as `Unused values' except that all symbol
5006 declarations appear after the rules in order to catch the rest of the
5007 errors fixed by the above patch.
5008
5009 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
5010
5011 More cleanup.
5012 * src/reader.c (current_rule): Declare it static since it's no longer
5013 used outside this file.
5014 (grammar_current_rule_action_append): Remove redundant arguments from
5015 translate_rule_action invocation.
5016 * src/reader.h (current_rule): Remove this unused extern.
5017 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
5018 * src/scan-code.l (translate_rule_action): Likewise.
5019
5020 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
5021
5022 Clean up yesterday's patch.
5023 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
5024 to...
5025 * src/reader.c (grammar_current_rule_action_append): ... here for
5026 consistency with grammar_current_rule_symbol_append.
5027 * tests/regression.at (Braced code in declaration in rules section):
5028 Make yyerror and yylex static as usual.
5029
5030 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
5031
5032 Fix bug that mistakes braced code in a declaration in the rules section
5033 to be a rule action. Mentioned at
5034 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
5035 * src/scan-gram.l: Move midrule action detection from the start of the
5036 scanning of any braced code to...
5037 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
5038 action. For readability, use $2 and @2 rather than the equivalent
5039 global variables.
5040 * tests/regression.at (Braced code in declaration in rules section):
5041 New test to catch the error fixed by the above patch.
5042
5043 Work on code readability some.
5044 * src/scan-code.l (current_rule): Get rid of this misleading and
5045 redundant declaration: it's actually extern'ed in reader.h.
5046 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
5047 translate_action): Add a rule argument and use it instead of the global
5048 current_rule.
5049 (translate_rule_action): This already receives current_rule through an
5050 argument, so pass it on to translate_action instead of assigning
5051 current_rule to current_rule.
5052 (translate_symbol_action, translate_code): Pass rule = NULL to
5053 translate_action.
5054
5055 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
5056
5057 Rename %before-definitions to %start-header and %after-definitions to
5058 %end-header. Don't use these declarations to separate pre-prologue
5059 blocks from post-prologue blocks. Add new order-independent
5060 declarations %before-header and %after-header as alternatives to the
5061 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
5062 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
5063 * NEWS (2.3+): Update for these changes.
5064 * data/glr.c (b4_before_definitions): Update to...
5065 (b4_start_header): ... this.
5066 (b4_after_definitions): Update to...
5067 (b4_end_header): ... this.
5068 * data/glr.cc: Likewise.
5069 * data/lalr1.cc: Likewise.
5070 * data/yacc.c: Likewise.
5071 * doc/bison.texinfo (The prologue): Update names, and replace remaining
5072 prologue blocks with %*-header declarations.
5073 (Calc++ Parser): Likewise.
5074 (Decl Summary): Update names.
5075 (Table of Symbols): Update description.
5076 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
5077 (PERCENT_END_HEADER): ... this.
5078 (PERCENT_BEFORE_DEFINITIONS): Update to...
5079 (PERCENT_START_HEADER): ... this.
5080 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
5081 (declaration): Update token names and m4 macro names.
5082 When parsing %end-header and %start-header, invoke translate_code
5083 before muscle_code_grow, and no longer set global booleans to remember
5084 whether these declarations have been seen.
5085 Parse new %after-header and %before-header.
5086 * src/reader.c (before_definitions, after_definitions): Remove.
5087 (prologue_augment): Accept a new bool argument to specify whether to
5088 augment the pre-prologue or post-prologue.
5089 * src/reader.h (before_definitions, after_definitions): Remove these
5090 extern's.
5091 (prologue_augment): Add new bool argument.
5092 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
5093 (PERCENT_END_HEADER): ... this.
5094 (PERCENT_BEFORE_DEFINITIONS): Update to...
5095 (PERCENT_START_HEADER): ... this.
5096 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
5097 * tests/actions.at (Printers and Destructors): Update names.
5098
5099 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
5100
5101 Add comparison operators for C++ location classes. Discussed at
5102 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
5103 * data/c++.m4 (b4_define_location_comparison): New boolean %define
5104 declaration indicating whether filename_type has an operator==. If
5105 filename_type is `std::string', it defaults to `1', `0' otherwise.
5106 * data/location.cc: Iff b4_define_location_comparison is `1', add
5107 operator== and operator!= for class position and for class location.
5108
5109 Some minor fixes.
5110 * src/scan-action.l: Remove unused file.
5111 * src/symtab.c (symbol_printer_set): Use printer_location not
5112 destructor_location.
5113 * src/symtab.h (struct symbol): Replace incorrect source comment for
5114 printer members.
5115 * tests/input.at (Incompatible Aliases): Update output with correct
5116 printer location.
5117
5118 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
5119
5120 Don't put the pre-prologue in the header file. For the yacc.c code
5121 file and the glr.c header and code files, move the pre-prologue before
5122 the token definitions. Add new %before-definitions and
5123 %after-definitions to declare code that will go in both the header file
5124 and code file. Discussed at
5125 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
5126 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
5127 and
5128 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
5129 * NEWS (2.3+): Describe these changes.
5130 * data/glr.c (b4_pre_prologue): Move from within to before...
5131 (b4_shared_declarations): ... this.
5132 Add new b4_before_definitions before b4_token_enums.
5133 Add new b4_after_definitions at the end.
5134 * data/glr.cc (b4_pre_prologue): Replace with...
5135 (b4_before_definitions): ... this in the header file.
5136 (b4_after_definitions): New near the end of the header file.
5137 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
5138 code file right before including the header file.
5139 (b4_before_definitions): New in the previous position of
5140 b4_pre_prologue in the header file.
5141 (b4_after_definitions): New near the end of the header file.
5142 * data/yacc.c: Clean up some m4 quoting especially in the header file.
5143 (b4_token_enums_defines): In the code file, move to right before
5144 YYSTYPE for consistency with the header file.
5145 (b4_before_definitions): New right before b4_token_enums_defines in
5146 both the header and code file.
5147 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
5148 header and code file.
5149 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
5150 of prologues for %union dependencies.
5151 (Decl Summary): In %defines description, mention the effect of
5152 %before-definitions and %after-definitions on the header file.
5153 (Calc++ Parser): Forward declare driver in a %before-definitions rather
5154 than in the pre-prologue so that make check succeeds.
5155 (Table of Symbols): Add entries for %before-definitions and
5156 %after-definitions.
5157 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
5158 %before-definitions.
5159 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
5160 (declaration): Parse those declarations and append to
5161 b4_before_definitions and b4_after_definitions, respectively.
5162 * src/reader.c (before_definitions, after_definitions): New bools to
5163 track whether those declarations have been seen.
5164 (prologue_augment): Add to the post-prologue if %union,
5165 %before-definitions, or %after-definitions has been seen.
5166 * src/reader.h (before_definitions, after_definitions): New extern's.
5167 * src/scan-gram.l: Scan the new declarations.
5168 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
5169 prologue block in a %before-definitions or a %after-definitions based
5170 on whether the %union is declared.
5171 * tests/regression.at (Early token definitions with --yacc, Early token
5172 definitions without --yacc): Move tests for token definitions into the
5173 post-prologue since token names are no longer defined in the
5174 pre-prologue.
5175
5176 2006-06-20 Akim Demaille <akim@epita.fr>
5177
5178 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
5179 (symbol_get): Use it.
5180 * src/parse-gram.y: Use it.
5181
5182 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
5183
5184 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
5185 build succeeds when configured with --enable-gcc-warnings.
5186
5187 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
5188
5189 * src/parse-gram.y (char_name): New function.
5190 (CHAR, STRING, string_content): For %printer, properly escape.
5191 (ID): Prefer fputs to fprintf.
5192 (id): Reindent to be consistent with other rules.
5193 Properly quote char.
5194
5195 The Translation Project changed its way of publishing translations
5196 to maintainers. I haven't received any responses to my request
5197 for supporting the old way, or for documenting the new way. I
5198 have modified 'bootstrap' to use screen scraping
5199 (in this case, HTML scraping). This is unreliable and inelegant,
5200 but I don't see any better way. Yuck.
5201 * bootstrap (TP_URL, WGET_COMMAND): New vars.
5202 (get_translations): New function, which uses HTML scraping to
5203 deduce locations of latest translations.
5204 Use this function to grab both bison and bison-runtime .po files.
5205 Don't bother priming the pump for the runtime-po domain any more,
5206 as it's now translated better than bison is.
5207
5208 2006-06-19 Akim Demaille <akim@epita.fr>
5209
5210 * src/scan-gram.l: No longer "parse" things after `%union' until
5211 `{'. Rather, return a single "%union" token.
5212 No longer make symbols: return strings, and leave the conversion
5213 to symbols to the parser.
5214 (SC_PRE_CODE, token_type): Remove.
5215 * src/parse-gram.y (%union): New field `character'.
5216 Sort tokens.
5217 (CHAR): New token.
5218 (ID, ID_COLON): Now that the scanner no longer makes them
5219 identifiers, adjust all uses to invoke symbol_get.
5220 (id_colon): New, wraps the conversion from string to symbol.
5221 (%union): Accept a possible union_name.
5222 (symbol): Now can be a char.
5223 * data/c.m4 (b4_union_name): Leave a default value.
5224 * data/glr.c, data/yacc.c: Use it.
5225
5226 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
5227
5228 For associating token numbers with token names for "yacc.c", don't use
5229 #define statements unless `--yacc' is specified; always use enum
5230 yytokentype. Most important discussions start at:
5231 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
5232 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
5233 and
5234 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
5235 * NEWS (2.3+): Mention.
5236 * data/c.m4 (b4_yacc_if): New.
5237 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
5238 token #define's.
5239 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
5240 on token name definitions.
5241 * src/getargs.c (usage): Capitalize `Yacc' in English.
5242 * src/output.c (prepare): Define b4_yacc_flag.
5243 * tests/regression.at (Early token definitions): Test that tokens names
5244 are defined before the pre-prologue not just before the post-prologue.
5245 Remove this test case and copy to...
5246 (Early token definitions with --yacc): ... this to test #define's.
5247 (Early token definitions without --yacc): ... and this to test enums.
5248
5249 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
5250
5251 * NEWS: Reword the post-2.3 change to not be so optimistic about
5252 removing the old "look-ahead" spelling.
5253 Update previous look-ahead/lookahead change reports.
5254 * REFERENCES: look-ahead -> lookahead (since that's
5255 what he actually wrote).
5256 * doc/refcard.tex: look ahead -> lookahead,
5257 look-ahead -> lookahead
5258
5259 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
5260
5261 For consistency, use `lookahead' instead of `look-ahead' or
5262 `look_ahead'. Discussed starting at
5263 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
5264 and then at
5265 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
5266 * NEWS: For the next release, note the change to `--report'.
5267 * TODO, doc/bison.1: Update English.
5268 * doc/bison.texinfo: Update English.
5269 (Understanding Your Parser, Bison Options): Document as
5270 `--report=lookahead' rather than `--report=look-ahead'.
5271 * src/conflicts.c: Update English in comments.
5272 (lookahead_set): Rename from look_ahead_set.
5273 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
5274 (resolve_sr_conflict): Rename local look_ahead_tokens to
5275 lookahead_tokens, and update other uses.
5276 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
5277 count_rr_conflicts, conflicts_free): Update uses.
5278 * src/getargs.c (report_args): Move "lookahead" before alternate
5279 spellings.
5280 (report_types): Update uses.
5281 (usage): For `--report' usage description, state `lookahead' spelling
5282 rather than `look-ahead'.
5283 * src/getargs.h (report.report_lookahead_tokens): Rename from
5284 report_look_ahead_tokens.
5285 * src/lalr.c: Update English in comments.
5286 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
5287 (state_lookahead_tokens_count): Rename from
5288 state_look_ahead_tokens_count.
5289 Rename local n_look_ahead_tokens to n_lookahead_tokens.
5290 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
5291 Rename local n_look_ahead_tokens to n_lookahead_tokens.
5292 Update other uses.
5293 Update English in output.
5294 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
5295 * src/print.c: Update English in comments.
5296 (lookahead_set): Rename from look_ahead_set.
5297 (print_reduction): Rename argument lookahead_token from
5298 look_ahead_token.
5299 (print_core, state_default_rule, print_reductions, print_results):
5300 Update uses.
5301 * src/print_graph.c: Update English in comments.
5302 (print_core): Update uses.
5303 * src/state.c: Update English in comments.
5304 (reductions_new): Update uses.
5305 (state_rule_lookahead_tokens_print): Rename from
5306 state_rule_look_ahead_tokens_print, and update other uses.
5307 * src/state.h: Update English in comments.
5308 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
5309 (state_rule_lookahead_tokens_print): Rename from
5310 state_rule_look_ahead_tokens_print.
5311 * src/tables.c: Update English in comments.
5312 (conflict_row, action_row): Update uses.
5313 * tests/glr-regression.at
5314 (Incorrect lookahead during deterministic GLR,
5315 Incorrect lookahead during nondeterministic GLR): Rename
5316 print_look_ahead to print_lookahead.
5317 * tests/torture.at: Update English in comments.
5318 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
5319 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
5320 (Many lookahead tokens): Update uses.
5321 * data/glr.c: Update English in comments.
5322 * lalr1.cc: Likewise.
5323 * yacc.c: Likewise.
5324 * src/conflicts.h: Likewise.
5325 * src/lalr.h: Likewise.
5326 * src/main.c: Likewise.
5327 * src/output.c: Likewise.
5328 * src/parse-gram.c: Likewise.
5329 * src/tables.h: Likewise.
5330 * tests/calc.at: Likewise.
5331
5332 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
5333
5334 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
5335
5336 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
5337
5338 * TODO: Add request from Nelson H. F. Beebe to be able to install
5339 Bison without installing the yacc script.
5340
5341 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
5342
5343 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
5344 and yytext if they're already #define'd.
5345 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
5346 * src/scan-code-c.c: ... here.
5347 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
5348 <config.h>.
5349
5350 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
5351
5352 Get Bison to build again when configured with --enable-gcc-warnings.
5353 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
5354 missing #include's.
5355 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
5356 loc argument as it shadows a global.
5357 * src/scan-gram.l: Remove stray comma that prevents boundary_set
5358 invocation.
5359
5360 * src/.cvsignore: Add scan-code.c.
5361
5362 2006-06-07 Akim Demaille <akim@epita.fr>
5363
5364 * src/scan-gram.l: Move the "add a trailing ; to actions" code
5365 to...
5366 * src/scan-code.l: here.
5367 * tests/input.at (Torturing the Scanner): Fix another location
5368 error.
5369
5370 2006-06-07 Akim Demaille <akim@epita.fr>
5371
5372 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
5373
5374 2006-06-06 Akim Demaille <akim@epita.fr>
5375
5376 Extract the parsing of user actions from the grammar scanner.
5377 As a consequence, the relation between the grammar scanner and
5378 parser is much simpler. We can also split "composite tokens" back
5379 into simple tokens.
5380 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
5381 * src/scan-gram.l (add_column_width, adjust_location): Move to and
5382 rename as...
5383 * src/location.h, src/location.c (add_column_width)
5384 (location_compute): these.
5385 Fix the column count: the initial column is 0.
5386 (location_print): Be robust to ending column being 0.
5387 * src/location.h (boundary_set): New.
5388 * src/main.c: Adjust to scanner_free being renamed as
5389 gram_scanner_free.
5390 * src/output.c: Include scan-code.h.
5391 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
5392 Use boundary_set.
5393 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
5394 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
5395 which is now, again, a separate token.
5396 Adjust all dependencies.
5397 Whereever actions with $ and @ are used, use translate_code.
5398 (action): Remove this nonterminal which is now useless.
5399 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
5400 (grammar_current_rule_action_append): Use translate_code.
5401 (packgram): Bound check ruleno, itemno, and rule_length.
5402 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
5403 (last_string, last_braced_code_loc, max_left_semantic_context)
5404 (scanner_initialize, scanner_free, scanner_last_string_free)
5405 (gram_out, gram_lineno, YY_DECL_): Move to...
5406 * src/scan-gram.h: this new file.
5407 (YY_DECL): Rename as...
5408 (GRAM_DECL): this.
5409 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
5410 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
5411 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
5412 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
5413 Move these declarations, and...
5414 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
5415 these to...
5416 * src/flex-scanner.h: this new file.
5417 * src/scan-gram.l (rule_length, rule_length_overflow)
5418 (increment_rule_length): Remove.
5419 (last_braced_code_loc): Rename as...
5420 (gram_last_braced_code_loc): this.
5421 Adjust to the changes of the parser.
5422 Move all the handling of $ and @ into...
5423 * src/scan-code.l: here.
5424 * src/scan-gram.l (handle_dollar, handle_at): Remove.
5425 (handle_action_dollar, handle_action_at): Move to...
5426 * src/scan-code.l: here.
5427 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
5428 scan-code.h, scan-code-c.c, scan-gram.h.
5429 (EXTRA_bison_SOURCES): Add scan-code.l.
5430 (BUILT_SOURCES): Add scan-code.c.
5431 (yacc): Be robust to white spaces.
5432
5433 * tests/conflicts.at, tests/input.at, tests/reduce.at,
5434 * tests/regression.at: Adjust the column numbers.
5435 * tests/regression.at: Adjust the error message.
5436
5437 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
5438
5439 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
5440 Use Akim's wording from
5441 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
5442
5443 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
5444
5445 Between Bison releases, manually append `+' to the previous Bison
5446 release number, and use that as a signal to automatically print the
5447 ChangeLog's CVS Id keyword from --version. Discussed starting at
5448 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
5449 * ChangeLog: Add Id header.
5450 * configure.ac (AC_INIT): Append `+' to `2.3'.
5451 * src/.cvsignore: Add revision.c.
5452 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
5453 (BUILT_SOURCES): Add revision.c.
5454 (revision.c): New target rule. This file defines a new global variable
5455 named revision. It initializes it with either the Id from ChangeLog
5456 or, if VERSION doesn't contain `+', with the empty string.
5457 * src/getargs.c (version): Print the value of revision.
5458 * src/revision.h: Extern revision.
5459
5460 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
5461
5462 * NEWS: Version 2.3.
5463 * configure.ac (AC_INIT): Likewise.
5464
5465 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
5466
5467 * data/glr.c (YYRECOVERING): Define to be a function-like macro
5468 with no arguments, not as an object-like macro. This is for
5469 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
5470 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
5471 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
5472 Document this.
5473
5474 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
5475
5476 * src/getargs.c (usage): Back out yesterday's modification of the
5477 --help output so that we don't have to wait for translation before
5478 releasing 2.3.
5479
5480 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
5481
5482 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
5483 Problem reported by Akim Demaille.
5484
5485 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
5486
5487 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
5488
5489 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
5490
5491 * data/yacc.c (yy_reduce_print): Omit trailing white space in
5492 generated source code. Problem reported by Frans Englich in
5493 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
5494
5495 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
5496
5497 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
5498 shell, not within 'make', so that 'make' by an ordinary builder
5499 (using GNU make) does not worry about configuring gzip. This also
5500 works around a bug reported independently by Keith Thompson and by
5501 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
5502 stderr rather than stdout, messing up the build logs.
5503
5504 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
5505
5506 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
5507 to make sure that YYID will never be unused. This fixes a 'make
5508 maintainer-check' failure caused by the recent changes to the 'Trivial
5509 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
5510 not used.
5511 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
5512
5513 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
5514
5515 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
5516 state before an empty RHS is always resolved here. Only the location
5517 of that state is guaranteed to be resolved, and that's enough. This
5518 fixes the remaining bug reported by Derek M. Jones in
5519 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
5520 * tests/glr-regression.at (Uninitialized location when reporting
5521 ambiguity): Test the above case.
5522 Also, the embedded comments in this test case claim it checks the case
5523 of an empty RHS that has inherited the initial location. However, the
5524 corresponding LHS was already resolved, so yyresolveLocations didn't
5525 actually have reason to modify it. Fix this by forcing
5526 nondeterministic operation at the beginning of the parse.
5527
5528 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
5529
5530 * data/c.m4 (b4_yy_symbol_print_generate):
5531 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
5532 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
5533 of the bugs reported today by Derek M Jones in
5534 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
5535 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
5536 defined to be a type name without parens or brackets.
5537 (Location Type): Similarly for YYLTYPE.
5538 * tests/regression.at (Trivial grammars): Put in a test for this
5539 bug that will be caught by 'make maintainer-check' (though not,
5540 alas, by 'make check' unless your compiler is picky).
5541
5542 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
5543
5544 * NEWS: Version 2.2.
5545 * configure.ac (AC_INIT): Likewise.
5546
5547 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
5548
5549 * data/glr.c (yyreportTree): Make room in yystates for the state
5550 preceding the RHS. This fixes the segmentation fault reported by Derek
5551 M. Jones in
5552 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
5553 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
5554 to the user. Reported for yyreportTree by Derek M. Jones later in the
5555 same thread.
5556 * THANKS: Add Derek M. Jones.
5557 Update my email address.
5558 Fix typo in Steve Murphy's name.
5559
5560 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
5561
5562 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
5563 checking against YYLAST that caused the parser to miss a potential
5564 alternative in its diagnostic.
5565 Problem reported by Maria Jose Moron Fernandez in
5566 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
5567 * data/lalr1.cc (yysyntax_error_): Likewise.
5568 * data/yacc.c (yysyntax_error): Likewise.
5569 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
5570 tokens, in case we run into an older C compiler.
5571 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
5572 Use them to check for the off-by-one error fixed above.
5573
5574 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
5575 YYSIZE_T, not size_t.
5576 * tests/regression.at (Trivial grammars): New test, to catch
5577 the error fixed by the above patch.
5578
5579 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
5580
5581 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
5582 scheme.
5583 Reported by Steve Murphy.
5584
5585 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
5586
5587 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
5588 * data/glr.cc: b4_location_flag is now b4_locations_flag.
5589
5590 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
5591
5592 Implement --trace=m4.
5593 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
5594 * src/output.c (output_skeleton): When set, pass -dV to m4.
5595
5596 Factor the handling of flags in m4.
5597 * src/output.c (prepare): Rename the muscle names debug, defines,
5598 error_verbose to debug_flag, defines_flag, error_verbose_flag.
5599 * data/c.m4: Adjust.
5600 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
5601 Use b4_define_flag_if to define other b4_FLAG_if macros.
5602 (b4_location_if): As a consequence, rename as...
5603 (b4_locations_if): this, for consistency.
5604 Adjust all the skeletons.
5605
5606 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
5607
5608 * etc/bench.pm: Shorten bench names.
5609
5610 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
5611
5612 * src/output.h, src/output.c (error_verbose): Move to...
5613 * src/getargs.h, src/getargs.c: here.
5614 Sort the flags.
5615 Adjust dependencies.
5616
5617 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
5618
5619 * data/c.m4 (b4_copyright): Put the special exception for Bison
5620 skeletons here, so we don't have to put it in each skeleton. All
5621 uses changed. Suggested by Akim Demaille. Also, wrap the
5622 copyright notice, in case it is longer than 80 columns. Replace
5623 comma by newline after title.
5624
5625 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
5626
5627 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
5628 incompatibility, not a bug. Mention that it wasn't fixed as of
5629 flex 2.5.33.
5630
5631 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
5632
5633 * examples/extexi: Enforce the precedence of concatenation over
5634 >>.
5635 Reported by Tommy Nordgren.
5636
5637 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
5638
5639 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
5640 with the member "token".
5641 Reported by Martin Nylin.
5642
5643 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
5644
5645 * data/glr.c: Switch to Bison 2.2 special-exception language in
5646 the copyright notice. Use more-regular format for titles and
5647 copyright notices.
5648 * data/glr.cc: Likewise.
5649 * data/location.cc: Likewise.
5650 * data/yacc.cc: Likewise.
5651 * doc/bison.texinfo (Conditions): Document this.
5652 * NEWS: likewise. Upgrade version to 2.2.
5653
5654 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
5655
5656 * data/glr.cc: Remove dead code.
5657
5658 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
5659
5660 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
5661 that variable and the line breaks the bootstrap. Problem reported
5662 by Juan M. Guerrero.
5663
5664 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
5665
5666 * doc/bison.texinfo (Multiple start-symbols): New.
5667
5668 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
5669
5670 * etc/README, etc/bench.pl: New.
5671
5672 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
5673
5674 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
5675 rule.
5676 Reported by Mickael Labau.
5677 * tests/input.at (Torturing the Scanner): Test it.
5678
5679 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
5680
5681 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
5682 Problem reported by Bob Rossi.
5683
5684 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
5685
5686 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
5687 and didn't really work.
5688 For the index, use @ifnotinfo, not @iftex.
5689 Minor cleanups of spacing and terminology.
5690
5691 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
5692
5693 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
5694 of AT_NAME_PREFIX when %name-prefix is not used.
5695
5696 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
5697
5698 Apply --prefix to C++ skeletons too: they change the namespace.
5699 The test suite already exercize these cases.
5700 * data/c++.m4 (b4_namespace): New.
5701 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
5702 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
5703 * data/yacc.c, data/glr.c: Remove a useless `[]'.
5704 * doc/bison.texinfo: Document it.
5705 (Option Cross Key): Use @multitable in all formats. It looks
5706 nicer, even in TeX outputs.
5707 (Rules): Use the same code whatever the output type is.
5708 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
5709 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
5710 * tests/calc.at: Use it, instead of hard coding `yy'.
5711
5712 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
5713
5714 * TODO: Remove dead items.
5715
5716 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
5717
5718 * doc/FAQ: Remove, merged into...
5719 * doc/bison.texinfo (FAQ): this.
5720 * doc/Makefile.am (EXTRA_DIST): Adjust.
5721
5722 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
5723
5724 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
5725 even if empty.
5726 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
5727 * doc/bison.texinfo (Calc++ Scanner): Use it.
5728
5729 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
5730
5731 Fix two nits reported by twlevo, plus one more that I discovered.
5732
5733 * src/assoc.h (assoc_to_string): Give a name to the arg, as
5734 this is the usual Bison style.
5735 * src/location.h (location_print): Likewise.
5736
5737 * src/reader.h (token_name): Likewise.
5738
5739 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
5740
5741 Fix some nits reported by twlevo.
5742 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
5743 and "POSIX". Use more-modern syntax for URLs. Mention C++
5744 and ask for Java. Don't hardwire OS version numbers. Add
5745 copyright notice.
5746 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
5747 * src/conflicts.c (solved_conflicts_obstack): Now static.
5748
5749 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5750
5751 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
5752 page. Say "you can use it" not "you may use it" as on the web page;
5753 we're describing capabilities not granting permission.
5754
5755 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
5756
5757 * data/glr.c (yyresolveLocations): Rename local variables to avoid
5758 shadowing warnings. Use usual patter for iterating through RHS.
5759 * tests/glr-regression.at
5760 (Uninitialized location when reporting ambiguity):
5761 Modify yylex so that it uses its argument, rather than trying
5762 to rely on ARGSUSED (which doesn't work for gcc with warnings).
5763 const char -> char const.
5764
5765 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
5766 Don't use tabs inside commands; it messes up 'ps'.
5767 Problem reported by twlevo.
5768
5769 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
5770
5771 * tests/glr-regression.at (Uninitialized location when reporting
5772 ambiguity): New test case.
5773 * data/glr.c (yyresolveLocations): New function, which uses
5774 YYLLOC_DEFAULT.
5775 (yyresolveValue): Invoke yyresolveLocations before reporting an
5776 ambiguity.
5777 * doc/bison.texinfo (Default Action for Locations): Note
5778 YYLLOC_DEFAULT's usage for ambiguity locations.
5779 (GLR Semantic Actions): Cross-reference those notes.
5780
5781 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
5782
5783 * tests/glr-regression.at (Leaked semantic values when reporting
5784 ambiguity): Remove unnecessary union and type declarations.
5785 (Leaked lookahead after nondeterministic parse syntax error): New test
5786 case.
5787 * data/glr.c (yyparse): Check for zero stacks remaining before
5788 attempting to shift the lookahead so that you don't lose it.
5789
5790 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5791
5792 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
5793 * tests/glr-regression.at (Leaked semantic values when reporting
5794 ambiguity): New test case.
5795 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
5796 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
5797 now unnecessary yystackp parameter.
5798 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
5799 destructors can be called.
5800
5801 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
5802 in existing testcases.
5803
5804 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5805
5806 Don't leak semantic values for parent RHS when a user action cuts the
5807 parser, and clean up related code a bit.
5808 * tests/glr-regression.at (Leaked merged semantic value if user action
5809 cuts parse): Rename to...
5810 (Leaked semantic values if user action cuts parse): ... this. Add check
5811 for leaked parent RHS values.
5812 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
5813 between an unresolved state (non-empty chain of semantic options) and
5814 an incomplete one (signaled by an empty chain).
5815 (yyresolveStates): Document the interface. Move all manipulation of a
5816 successfully or unsuccessfully resolved yyGLRState to...
5817 (yyresolveValue): ... here so that yyresolveValue always leaves a
5818 yyGLRState with consistent data and thus is easier to understand.
5819 Remove the yyvalp and yylocp parameters since they are always just
5820 taken from the yys parameter. When reporting a discarded merged value
5821 in debugging output, note that it is incompletely merged. Document the
5822 interface.
5823 (yyresolveAction): If resolving any of the RHS states fails, destroy
5824 them all rather than leaking them. Thus, as long as user actions are
5825 written to clean up the RHS correctly, yyresolveAction always cleans up
5826 the RHS of a semantic option. Document the interface.
5827
5828 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
5829
5830 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
5831 led to a segmentation fault in GNU Pascal. Problem reported
5832 by Waldek Hebisch.
5833
5834 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
5835
5836 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
5837 mid-rule action inside a nonterminal symbol in order to declare a
5838 destructor for its semantic value.
5839
5840 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
5841
5842 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
5843 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
5844 __cplusplus && ! defined _STDLIB_H && !
5845 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
5846 defined free))]: Include <stdlib.h> rather than rolling our own
5847 declarations of malloc and free, to avoid problems with
5848 incompatible declarations (using 'throw') C++'s stdlib.h. This
5849 should fix Debian bug 340012
5850 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
5851 reported by Guillaume Melquiond.
5852
5853 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
5854
5855 * NEWS: Clarify symbols versus types in unused-value warnings.
5856
5857 * configure.ac (AC_INIT): Bump version number.
5858
5859 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
5860
5861 * NEWS: Version 2.1a.
5862 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
5863 since C99 requires this.
5864
5865 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
5866
5867 * m4/c-working.m4: New file.
5868 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
5869
5870 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
5871
5872 * Makefile.maint: Merge from coreutils.
5873
5874 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
5875
5876 More portability fixes for problems summarized by Nelson H. F. Beebe.
5877
5878 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
5879 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
5880 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
5881 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
5882 messes up because C++ code is compiled in 32-bit mode but linked
5883 in 64-bit mode.
5884
5885 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
5886
5887 More portability fixes for problems summarized by Nelson H. F. Beebe.
5888
5889 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
5890 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
5891
5892 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
5893 nodist_PROGRAMS, since we don't need to actually compile the
5894 example if we're just doing a plain 'make'. This avoids bothering
5895 the installer unnecessarily about problems due to weird C++
5896 compilers.
5897
5898 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
5899
5900 More portability fixes for problems summarized by Nelson H. F. Beebe.
5901
5902 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
5903 than #include "...", and compile with -I'.'. The old method was
5904 not portable, according to Posix and the C standard, and it does
5905 not work with Sun C 5.7, where previous #line directives affect
5906 the working directory used in later #include "..." directives.
5907
5908 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5909
5910 Various DJGGP specific issues in /djgpp
5911
5912 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
5913
5914 More portability fixes for problems summarized by Nelson H. F. Beebe.
5915
5916 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
5917 '#include <map>' works and that you can apply ++ to iterators.
5918
5919 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
5920
5921 Work around portability problems summarized by Nelson H. F. Beebe in
5922 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
5923
5924 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5925 that '#include <string>' works.
5926
5927 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
5928 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
5929 "warning: sorry: semantics of inline function static data `const
5930 unsigned char translate_table[262]' are wrong (you'll wind up with
5931 multiple copies)".
5932
5933 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
5934 or, xor to not_, and_, or_, and xor_, respectively. This works
5935 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
5936 random system header somewhere that includes the equivalent of
5937 <iso646.h>.
5938
5939 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
5940 -E" works; it apparently doesn't work with PathScale EKO Compiler
5941 Suite Version 2.0.
5942
5943 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
5944
5945 During deterministic GLR operation, user actions should be able to
5946 influence the parse by changing yychar. To make this easier to fix and
5947 to make glr.c easier to evolve in general, don't maintain yytoken in
5948 parallel with yychar; just compute yytoken when needed.
5949 * tests/glr-regression.at (Incorrect lookahead during deterministic
5950 GLR): Check that setting yychar in a user action has the intended
5951 effect.
5952 * data/glr.c (yyGLRStack): Remove yytokenp member.
5953 (yyclearin): Don't set *yytokenp.
5954 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
5955 yychar rather than *yytokenp to determine the current lookahead.
5956 Compute yytoken locally when needed.
5957 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
5958 point to.
5959
5960 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
5961 after `--report' documentation.
5962
5963 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
5964
5965 * src/parse-gram.y (grammar_declaration): Location of printer
5966 symbol is @1, not list->location. Bug reported by twlevo.
5967 * tests/input.at (Incompatible Aliases): Adjust to above change.
5968
5969 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
5970
5971 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
5972 all the test at once. This makes the output easier to read in the
5973 normal case.
5974
5975 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
5976 got from <http://bro-ids.org/download.html>. The bug is that
5977 when two actions appeared in succession, the second one was
5978 scanned before the first one was added to the grammar rule
5979 as a midrule action. Bison then output the incorrect warning
5980 "parse.y:905.17-906.36: warning: unused value: $3".
5981 * src/parse-gram.y (BRACED_CODE, action): These are no longer
5982 associated with a value.
5983 (rhs): Don't invoke grammar_current_rule_action_append.
5984 (action): Invoke it here instead.
5985 * src/reader.c (grammar_midrule_action): Now extern.
5986 (grammar_current_rule_action_append): Don't invoke
5987 grammar_midrule_action; that is now the scanner's job.
5988 * src/reader.h (last_string, last_braced_code_loc):
5989 (grammar_midrule_action): New decls.
5990 * src/scan-gram.l (last_string): Now extern, sigh.
5991 (last_braced_code_loc): New extern variable.
5992 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
5993 rule already has an action.
5994 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
5995 * tests/input.at (AT_CHECK_UNUSED_VALUES):
5996 Add some tests to check that the above changes fixed the bug.
5997
5998 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
5999
6000 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
6001 All used changed. Check whether the symbol has a destructor,
6002 not whether it is typed.
6003 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
6004 that the values are still reported as unused. All line numbers
6005 adjusted.
6006
6007 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
6008
6009 Work around a bug in bro 0.8, which underparenthesizes its
6010 definition of YYLLOC_DEFAULT.
6011 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
6012 their arguments.
6013 * data/lalr1.cc: Likewise.
6014 * data/yacc.cc: Likewise.
6015
6016 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
6017
6018 Work around a bug in Pike 7.0, and give the Pike folks a
6019 better way to override the usual int widths.
6020 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
6021 user can override the types.
6022 (short): #undef, to work around a bug in Pike 7.0.
6023 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
6024 (union yyalloc.yyss): Use yytype_int16 rather than short.
6025 All uses changed.
6026 (yysigned_char): Remove.
6027 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
6028 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
6029 * tests/regression.at (Web2c Actions): Adjust to above changes.
6030
6031 * src/reader.c (check_and_convert_grammar): New function.
6032 (reader): Close the input file even if something went wrong during
6033 parsing. Minor file descriptor leak reported by twlevo.
6034
6035 * src/assoc.c (assoc_to_string): Use a default: abort (); case
6036 to pacify gcc -Wswitch-default.
6037 * src/scan-gram.l (adjust_location): Use a default: break; case
6038 to pacify gcc -Wswitch-default.
6039 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
6040 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6041 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6042 Move these decls to scan-skel.l, since they don't need to be
6043 visible elsewhere.
6044 * src/scan-skel.l: Accept the above decls.
6045 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
6046 is used.
6047
6048 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
6049
6050 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
6051 since we don't want to insist on a version number at the start
6052 of the changelog every time.
6053 * Makefile.maint: Sync from coreutils a bit better.
6054 (sc_trailing_blank): Renamed from sc_trailing_space.
6055 All uses changed.
6056 (sc_no_if_have_config_h, sc_require_config_h):
6057 (sc_prohibit_assert_without_use): New rules.
6058 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
6059 (sc_dd_max_sym_length): Fix leading spaces in rule.
6060 (sc_system_h_headers): Prefix with @.
6061 (sc_useless_cpp_parens, m4-check): Output line numbers.
6062 (changelog-check): Allow version only in head.
6063 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
6064 satisfy new Makefile.maint rule.
6065 * data/glr.c: Likewise.
6066 * data/glr.cc: Likewise.
6067 * data/lalr1.cc: Likewise.
6068 * data/yacc.c: Likewise.
6069 * lib/ebitsetv.c: Likewise.
6070 * lib/lbitset.c: Likewise.
6071 * lib/subpipe.c: Likewise.
6072 * lib/timevar.c: Likewise.
6073 * src/system.h: Likewise.
6074 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
6075 * djgpp/Makefile.maint: Add copyright notice.
6076 * djgpp/README.in: Likewise.
6077 * djgpp/config.bat: Likewise.
6078 * djgpp/config.site: Likewise.
6079 * djgpp/config_h.sed: Likewise.
6080 * djgpp/djunpack.bat: Likewise.
6081 * djgpp/config.sed: Fix copyright notice to match standard format.
6082 * djgpp/subpipe.h: Likewise.
6083 * lib/bitsetv-print.c: Likewise.
6084 * lib/bitsetv.c: Likewise.
6085 * lib/subpipe.h: Likewise.
6086 * lib/timevar.c: Likewise.
6087 * lib/timevar.h: Likewise.
6088 * djgpp/subpipe.c: Use standard recipe for config.h.
6089 * lib/abitset.c: Likewise.
6090 * lib/bitset.c: Likewise.
6091 * lib/bitset_stats.c: Likewise.
6092 * lib/bitsetv-print.c: Likewise.
6093 * lib/bitsetv.c: Likewise.
6094 * lib/ebitsetv.c: Likewise.
6095 * lib/get-errno.c: Likewise.
6096 * lib/lbitset.c: Likewise.
6097 * lib/subpipe.c: Likewise.
6098 * lib/timevar.c: Likewise.
6099 * lib/vbitset.c: Likewise.
6100 * tests/local.at: Likewise.
6101 * src/scan-gram.l: Don't include verify.h, since system.h does
6102 that for us.
6103 * .x-sc_require_config_h: New file.
6104 * .x-sc_unmarked_diagnostics: New file.
6105
6106 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
6107
6108 Be a bit more systematic about using 'abort'.
6109 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
6110 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
6111 Put 'default: abort ();' before some other case, to satisfy older
6112 pedantic compilers.
6113 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6114 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
6115 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
6116 * src/conflicts.c (resolve_sr_conflict): Likewise.
6117 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
6118 (get_decision_str, get_orientation_str, get_node_alignment_str):
6119 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
6120 (get_linestyle_str, get_arrowstyle_str): Likewise.
6121 * src/conflicts.c (resolve_sr_conflict):
6122 Use a default case rather than one for the one remaining enum
6123 value, to catch invalid enum values as well.
6124 * src/lalr.c (set_goto_map, map_goto):
6125 Prefer "assert (FOO);" to "if (!FOO) abort ();".
6126 * src/nullable.c (nullable_compute, token_definitions_output):
6127 Likewise.
6128 * src/reader.c (packgram, reader): Likewise.
6129 * src/state.c (transitions_to, state_new, state_reduction_find):
6130 Likewise.
6131 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
6132 (symbol_pack): Likewise.
6133 * src/tables.c (conflict_row, pack_vector): Likewise.
6134 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
6135 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
6136 * src/system.h: Don't include <assert.h>.
6137 (assert): New macro.
6138
6139 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
6140 (Destructor Decl, Parser Function, Pure Calling):
6141 Describe rules for braces inside C code more carefully.
6142
6143 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
6144
6145 Fix some porting glitches found by Nelson H. F. Beebe.
6146 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
6147 compilers that don't understand that abort () does not return.
6148 * src/state.c (transitions_to): Likewise.
6149 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
6150 that '#include <cstdlib>' works.
6151 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
6152 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
6153 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
6154 for the benefit of some pre-C99 compilers.
6155
6156 * bootstrap: Undo changes to gnulib files that autoreconf made.
6157
6158 Minor fixups to get 'make maintainer-check' to work.
6159 * configure.ac: Don't use -Wnested-externs, as it's incompatible
6160 with the new verify.h implementation.
6161 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
6162 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
6163 * data/yacc.c (YYUSE): Likewise.
6164 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
6165 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
6166 * src/parse-gram.y (declaration): Don't pass a string constant
6167 to a function that expects char *, since GCC might complain
6168 about the constant value.
6169 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
6170 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
6171 before #defining them.
6172 * tests/glr-regression.at
6173 (Incorrectly initialized location for empty right-hand side in GLR):
6174 In yyerror, use the msg arg.
6175 (Corrupted semantic options if user action cuts parse):
6176 (Incorrect lookahead during deterministic GLR):
6177 (Incorrect lookahead during nondeterministic GLR):
6178 Don't name a local var 'index'; it shadows string.h's 'index'.
6179
6180 2006-01-19 Akim Demaille <akim@epita.fr>
6181
6182 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
6183 location, not just parts of it.
6184
6185 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
6186
6187 * NEWS: Document the fact that multiple %unions are now allowed.
6188 * doc/bison.texinfo (Union Decl): Likewise.
6189 * TODO: This feature is now implemented, so remove it from
6190 the wishlist.
6191
6192 * Makefile.maint: Merge with coreutils Makefile.maint.
6193 (CVS_LIST): Use build-aux version if available.
6194 (VERSION_REGEXP): New macro.
6195 (syntax-check-rules): Add sc_no_if_have_config_h,
6196 sc_prohibit_assert_without_use, sc_require_config_h,
6197 sc_useless_cpp_parens.
6198 (sc_obsolete_symbols): Check for O_NDELAY.
6199 (sc_dd_max_sym_length): Track coreutils.
6200 (sc_unmarked_diagnostics): Look in all files, not just *.c.
6201 (sc_useless_cpp_parens): New rule.
6202 (news-date-check): Look for version or today's date.
6203 (changelog-check): Don't require version number near head.
6204 (copyright-check): Use current year instead of hardwiring 2005.
6205 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
6206 (announcement): Add --gpg-key-ID.
6207
6208 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
6209 with "file system".
6210
6211 Avoid undefined behavior that addressed just before the start of an
6212 array. Problem reported by twlevo.
6213 * src/reader.c (packgram): Prepend a new sentinel before ritem.
6214 * src/lalr.c (build_relations): Rely on new sentinel.
6215 * src/gram.c (gram_free): Adjust to new sentinel.
6216
6217 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
6218
6219 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
6220 yylookaheadNeeds. All uses updated.
6221 (yysplitStack): Rename local yynewLookaheadStatuses to
6222 yynewLookaheadNeeds.
6223 * data/glr-regression.at (Incorrect lookahead during nondeterministic
6224 GLR): In comments, change `lookahead status' to `lookahead need'.
6225
6226 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6227
6228 * data/glr.c (yysplitStack): A little stylistic rewrite.
6229
6230 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6231
6232 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
6233
6234 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
6235
6236 * doc/bison.texinfo: Fix some typos.
6237 (GLR Semantic Actions): New subsection discussing special
6238 considerations because GLR semantic actions might be deferred.
6239 (Actions): Mention look-ahead usage of yylval.
6240 (Actions and Locations): Mention look-ahead usage of yylloc.
6241 (Special Features for Use in Actions): Add YYEOF entry and mention it
6242 in the yychar entry.
6243 In the yychar entry, remove mention of the local yychar case (pure
6244 parser) since this is irrelevant information when writing semantic
6245 actions and since it's already discussed in `Table of Symbols' where
6246 yychar is otherwise described as an external variable.
6247 In the yychar entry, don't call it the `current' look-ahead since it
6248 isn't when semantic actions are deferred.
6249 In the yychar and yyclearin entries, add note about deferred semantic
6250 actions.
6251 Add yylloc and yylval entries discussing look-ahead usage.
6252 (Look-Ahead Tokens): When discussing yychar, don't call it the
6253 `current' look-ahead, and do mention yylval and yylloc.
6254 (Error Recovery): Cross-reference `Action Features' when mentioning
6255 yyclearin.
6256 (Table of Symbols): In the yychar entry, don't call it the `current'
6257 look-ahead.
6258 In the yylloc and yylval entries, mention look-ahead usage.
6259
6260 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6261
6262 * tests/glr-regression.at: Update copyright year to 2006.
6263
6264 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6265
6266 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
6267 use during nondeterministic operation to track which stacks have
6268 actually needed the current lookahead.
6269 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
6270 Allocate, deallocate, resize, and otherwise shuffle space for
6271 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
6272 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
6273 appropriately during nondeterministic operation.
6274 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
6275 members to store the current lookahead to be used by the deferred
6276 user action.
6277 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
6278 from which the RHS is taken. Set the lookahead members of the new
6279 yySemanticOption according to the lookahead status for stack yyk.
6280 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
6281 yyaddDeferredAction.
6282 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
6283 members of yySemanticOption before invoking yyuserAction, and then set
6284 them back to their current values afterward.
6285 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
6286 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
6287 * tests/glr-regression.at: Remove `.' from the ends of recent test case
6288 titles for consistency.
6289 (Leaked merged semantic value if user action cuts parse): In order to
6290 suppress lint warnings, use arguments in merge function, and assign
6291 char value < 128 in main.
6292 (Incorrect lookahead during deterministic GLR): New test case.
6293 (Incorrect lookahead during nondeterministic GLR): New test case.
6294
6295 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6296
6297 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
6298 !yyvaluep as signal that no semantic value is available to print.
6299 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
6300 to print a semantic value.
6301
6302 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6303
6304 * tests/glr-regression.at: For consistency with my newer test cases,
6305 don't thank myself.
6306
6307 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
6308
6309 * data/glr.c (yyresolveValue): When merging semantic options, if at
6310 least one user action succeeds but a later one cuts the parse, then
6311 destroy the semantic value before returning rather than leaking it.
6312 (yyresolveStates): If a user action cuts the parse and thus
6313 yyresolveValue fails, ignore the (unset) semantic value rather than
6314 corrupting the yyGLRState, and empty the semantic options list since
6315 the user actions should have called all necessary destructors.
6316 Simplify code with YYCHK.
6317 * tests/glr-regression.at (Corrupted semantic options if user action
6318 cuts parse): New test case.
6319 (Undesirable destructors if user action cuts parse): New test case.
6320 Before applying any of this patch, this test case never actually failed
6321 for me... but only because the corrupted semantic options usually
6322 masked this bug.
6323 (Leaked merged semantic value if user action cuts parse): New test
6324 case.
6325
6326 2006-01-05 Akim Demaille <akim@epita.fr>
6327
6328 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
6329
6330 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
6331
6332 * data/c.m4 (b4_c_modern): New macro, with a new provision for
6333 _MSC_VER. Problem reported by Cenzato Marco.
6334 (b4_c_function_def): Use it.
6335 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
6336 b4_c_modern.
6337 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
6338 than rolling our own.
6339
6340 2006-01-04 Akim Demaille <akim@epita.fr>
6341
6342 Also warn about non-used mid-rule values.
6343 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
6344 member.
6345 (symbol_list_new): Adjust.
6346 * src/reader.c (symbol_typed_p): New.
6347 (grammar_rule_check): Use it.
6348 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
6349 Check its rule.
6350 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
6351 Use it.
6352 * tests/actions.at (Exotic Dollars): Adjust.
6353
6354 2006-01-04 Akim Demaille <akim@epita.fr>
6355
6356 * src/reader.c (grammar_midrule_action): If $$ is set in a
6357 mid-rule, move the `used' bit to its lhs.
6358 * tests/input.at (Unused values): New.
6359 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
6360
6361 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
6362
6363 * doc/bison.texinfo (Bison Options): Say more accurately what
6364 --yacc does.
6365 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
6366 about declarations in the grammar when in Yacc mode, as POSIX does
6367 not require a diagnostic when the grammar uses extensions.
6368
6369 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
6370
6371 Warn about dubious constructions like "%token T T".
6372 Reported by twlevo.
6373 * src/symtab.h (struct symbol.declared): New member.
6374 * src/symtab.c (symbol_new): Initialize it to false.
6375 (symbol_class_set): New arg DECLARING, specifying whether
6376 this is a declaration that we want to warn about, if there
6377 is more than one of them. All uses changed.
6378
6379 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
6380 Allow multiple %union directives, whose contents concatenate.
6381 * src/parse-gram.y (grammar_declaration): Likewise.
6382 Use muscle_code_grow, so that we don't need stype_line any more.
6383 All uses changed.
6384
6385 * src/muscle_tab.c (muscle_grow): Fix comment.
6386
6387 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
6388 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
6389 Update copyright year to 2006.
6390
6391 2006-01-03 Akim Demaille <akim@epita.fr>
6392
6393 Have glr.cc pass (some of) the calc.at tests.
6394 * data/glr.cc (b4_parse_param_orig): New.
6395 (b4_parse_param): Improve its definition, and bound it more
6396 clearly in the skeleton.
6397 (b4_epilogue): Append, instead of prepending, in order to keep
6398 #line consistency.
6399 Simplify the generation of auxiliary functions: locations and
6400 purity are mandated.
6401 (b4_global_tokens_and_yystype): Honor it.
6402 * data/location.cc (c++.m4): Don't include it.
6403 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
6404 and AT_SKEL_CC_IF.
6405 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
6406 AT_LALR1_CC_IF.
6407 Be sure to initialize the first position's filename.
6408 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
6409 mandated anyway.
6410 (AT_CHECK_CALC_GLR_CC): New.
6411 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
6412
6413 2006-01-02 Akim Demaille <akim@epita.fr>
6414
6415 * src/output.c (output_skeleton): Don't hard wire the inclusion of
6416 c.m4.
6417 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
6418 * data/glr.cc: Do not include stack.hh.
6419
6420 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6421
6422 * data/glr.c: Reformat whitespace with tabs.
6423 (b4_lpure_formals): Remove this unused m4 macro.
6424 * tests/cxx-type.at: Reformat whitespace with tabs.
6425 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
6426 since it's a member. Rename type to isNterm for clarity.
6427
6428 2005-12-29 Akim <akim@sulaco.local>
6429
6430 Let glr.cc catch up with symbol_value_print.
6431 * data/glr.cc (b4_yysymprint_generate): Replace by...
6432 (b4_yy_symbol_print_generate): this.
6433 (yy_symbol_print, yy_symbol_value_print): Declare them.
6434
6435 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
6436
6437 * src/location.h (boundary): Note that a line or column equal
6438 to INT_MAX indicates an overflow.
6439 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
6440 (rule_length_overflow, increment_rule_length, add_column_width):
6441 New functions.
6442 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
6443 (<SC_BRACED_CODE>"}"):
6444 Use increment_rule_length rather than incrementing it by hand.
6445 (adjust_location, handle_syncline): Diagnose overflow.
6446 (handle_action_dollar, handle_action_at):
6447 Fix bug with monstrosities like $-2147483648.
6448 Remove now-unnecessary checks.
6449 (scan_integer): Verify assumptions and remove now-unnecessary checks.
6450 (convert_ucn_to_byte): Verify assumptions.
6451 (handle_syncline): New arg LOC. All callers changed.
6452 Don't store through a value derived from char const * pointer.
6453
6454 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
6455 GCC warnings.
6456
6457 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
6458
6459 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
6460 Remove unnecessary forward static decls.
6461
6462 2005-12-27 Akim Demaille <akim@epita.fr>
6463
6464 * src/reader.c (grammar_current_rule_check): Also check that $$
6465 is used.
6466 Take the rule to check as argument, hence rename as...
6467 (grammar_rule_check): this.
6468 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
6469 Rename as...
6470 (grammar_rule_begin, grammar_rule_end): these, for consistency.
6471 (grammar_midrule_action, grammar_symbol_append): Now static.
6472 * tests/torture.at (input): Don't rely on the default action
6473 being always performed.
6474 * tests/calc.at: "Set" $$ even when the action is "cut" with
6475 YYERROR or other.
6476 * tests/actions.at (Exotic Dollars): Instead of using unused
6477 values, check that the warning is issued.
6478
6479 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
6480
6481 * NEWS: Improve wording for unused-value warnings.
6482
6483 2005-12-22 Akim Demaille <akim@epita.fr>
6484
6485 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
6486 (b4_yysymprint_generate): Rename as...
6487 (b4_yy_symbol_print_generate): this.
6488 Generate yy_symbol_print instead of yysymprint.
6489 Generate also yy_symbol_value_print, and use it.
6490
6491 2005-12-22 Akim Demaille <akim@epita.fr>
6492
6493 * NEWS: Warn about unused values.
6494 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
6495 a `used' member.
6496 (symbol_list_n_get, symbol_list_n_used_set): New.
6497 (symbol_list_n_type_name_get): Use symbol_list_n_get.
6498 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
6499 * src/reader.c (grammar_current_rule_check): Check that values are
6500 used.
6501 * src/symtab.c (symbol_print): Accept 0.
6502 * tests/existing.at: Remove the type information.
6503 Empty the actions.
6504 Remove useless actions (beware of mid-rule actions: perl -000
6505 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
6506 * tests/actions.at (Exotic Dollars): Use unused values.
6507 * tests/calc.at: Likewise.
6508 * tests/glr-regression.at (No users destructors if stack 0 deleted):
6509 Likewise.
6510
6511 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
6512 rule_useful_p.
6513
6514 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
6515
6516 Undo 2005-12-01 tentative license wording change. The wording is
6517 still being reviewed by the lawyers, and we don't want to wait for
6518 them before publishing a test release. For now, revert to the
6519 previous wording.
6520 * NEWS: Undo 2005-12-01 change.
6521 * data/glr.c: Revert to previous license wording.
6522 * data/glr.cc: Likewise.
6523 * data/lalr1.cc: Likewise.
6524 * data/location.cc: Likewise.
6525 * data/yacc.c: Likewise.
6526
6527 * NEWS: Reword %destructor vs YYABORT etc.
6528 * data/glr.c: Use American spacing, for consistency.
6529 * data/glr.cc: Likewise.
6530 * data/lalr1.cc: Likewise.
6531 * data/yacc.c: Likewise.
6532 * data/yacc.c: Reformat comments slightly.
6533 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
6534 for consistency. Fix some spelling errors and reword recently-included
6535 text slightly.
6536 * tests/cxx-type.at: Cast results of malloc, for C++.
6537
6538 2005-12-21 Joel E. Denny <address@hidden>
6539
6540 * tests/cxx-type.at: Construct a tree, count the parents of shared
6541 nodes, and free each node once and only once. Previously, the memory
6542 for semantic values was leaked instead.
6543
6544 2005-12-21 Joel E. Denny <address@hidden>
6545
6546 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
6547 (yylval, yylloc): If pure, #define to yystackp->yyval and
6548 yystackp->yyloc similar to yychar and yynerrs.
6549 (yyparse): If pure, remove local yylval and yylloc. Add local
6550 yystackp to accommodate pure definitions of yylval and yylloc.
6551 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
6552 yylvalp and yyllocp to &yylval and &yylloc.
6553 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
6554 namespace. Previously, nerrs and char were missing, but lval and lloc
6555 weren't necessary.
6556 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
6557 yylvalp and yyllocp parameters since, if pure, these are now always
6558 accessible through yystackp. If not pure, they are still accessible
6559 globally.
6560 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
6561 `if (YYID (N))' to pacify lint.
6562
6563 2005-12-21 Akim Demaille <akim@epita.fr>
6564
6565 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
6566 destroy the RHS symbols of a rule.
6567 * data/yacc.c (yylen): Initialize to 0.
6568 Keep its value to the number of items to possibly shift.
6569 In particular, a regular successful parse that ends on YYFINAL by
6570 a (internal) YYACCEPT must not have yylen != 0.
6571 (yyerrorlab, yyreturn): Pop the RHS.
6572 Reorder a bit to emphasize the `shifting' bits of code.
6573 (YYPOPSTACK): Now accept a number of items to pop.
6574 * data/lalr1.cc: Likewise.
6575 * data/glr.c: Formatting changes.
6576 Use goto instead of fall through.
6577 * doc/bison.texinfo (Destructor Decl): Complete.
6578
6579 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6580
6581 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6582 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
6583 * djgpp/config.bat: Replace every occurence of the file name
6584 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
6585 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
6586 * djgpp/config.sed: Replace every occurence of the file name
6587 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
6588 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
6589 * djgpp/djunpack.bat: DJGPP specific file.
6590 * djgpp/fnchange.lst: DJGPP specific file.
6591 * djgpp/README.in: Add new information about how to unpack the bison
6592 source on MSDOS and other systems which have 8.3 file name restrictions
6593 using djunpack.bat and fnchange.lst.
6594
6595 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
6596
6597 * bootstrap (build_cvs_prefix): Remove; unused.
6598 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
6599 when getting gnulib.
6600
6601 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
6602
6603 * data/glr.c: Reorder typedef declarations for structs to match order
6604 of struct declarations.
6605 Rename yystack everywhere to yystackp except in yyparse where it's not
6606 a pointer.
6607 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
6608 consistency.
6609 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
6610 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
6611 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
6612 lint.
6613
6614 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
6615
6616 * tests/sets.at (Accept): Fix typos in regular expression used to
6617 sed out the final state number.
6618
6619 Work around portability problem on Solaris 10: flex-generated
6620 files include <stdio.h> before <config.h>, which messes up
6621 because the latter defines __EXTENSIONS__. Address the problem
6622 by creating two new little files that include <config.h> first,
6623 then include the flex-generated files. Rewrite everyone else
6624 to include <config.h> first, as well.
6625 * lib/timevar.c: Always include "config.h".
6626 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
6627 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
6628 (EXTRA_bison_SOURCES): New macro.
6629 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
6630 * src/system.h: Don't include config.h.
6631 * src/LR0.c: Include <config.h> first.
6632 * src/assoc.c: Likewise.
6633 * src/closure.c: Likewise.
6634 * src/complain.c: Likewise.
6635 * src/conflicts.c: Likewise.
6636 * src/derives.c: Likewise.
6637 * src/files.c: Likewise.
6638 * src/getargs.c: Likewise.
6639 * src/gram.c: Likewise.
6640 * src/lalr.c: Likewise.
6641 * src/location.c: Likewise.
6642 * src/main.c: Likewise.
6643 * src/muscle_tab.c: Likewise.
6644 * src/nullable.c: Likewise.
6645 * src/output.c: Likewise.
6646 * src/parse-gram.y: Likewise.
6647 * src/print.c: Likewise.
6648 * src/print_graph.c: Likewise.
6649 * src/reader.c: Likewise.
6650 * src/reduce.c: Likewise.
6651 * src/relation.c: Likewise.
6652 * src/state.c: Likewise.
6653 * src/symlist.c: Likewise.
6654 * src/symtab.c: Likewise.
6655 * src/tables.c: Likewise.
6656 * src/uniqstr.c: Likewise.
6657 * src/vcg.c: Likewise.
6658
6659 * src/parse-gram.y: Fix minor problems uncovered by lint.
6660 (current_lhs, current_lhs_location): Now static.
6661 (current_assoc): Remove unused variable.
6662
6663 Cleanups so that Bison-generated parsers have less lint.
6664 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
6665 Prepend /*ARGSUSED*/, for lint's sake.
6666 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
6667 definition if 'lint' is defined.
6668 (YYID): New macro (or function, if lint).
6669 All uses of /*CONSTCOND*/0 replaced by YYID(0).
6670 * data/yacc.c: Likewise.
6671 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
6672 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
6673 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
6674 is C++ only.
6675 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
6676 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
6677 Use YYID(0) rather than 0, for lint.
6678 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
6679 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
6680
6681 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
6682
6683 * tests/glr-regression.at
6684 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6685 Close memory leak reported by twlevo.
6686
6687 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
6688
6689 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
6690 all stacks.
6691 (yyparse): Iterate another stack in order to call user destructors.
6692 * tests/glr-regression.at (No users destructors if stack 0 deleted):
6693 New test case.
6694 (Duplicated user destructor for lookahead): This test now is expected
6695 to succeed.
6696
6697 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
6698
6699 * NEWS: Document the following change.
6700 * data/yacc.c: Say "parser skeleton" rather than "file", since
6701 it's no longer just a file.
6702 * data/glr.c: Grant a special exception for C GLR parsers, that
6703 reads like the already-existing exception for C LALR(1) parsers.
6704 * data/glr.cc: Likewise.
6705 * data/lalr1.cc: Likewise.
6706 * data/location.cc: Likewise.
6707 * data/yacc.c: Reword the "written by" statement to clarify that
6708 it was the parser skeleton, not the entire output file.
6709 * data/glr.c: Written by Paul Hilfinger.
6710 * data/glr.cc: Written by Akim Demaille.
6711 * data/lalr1.cc: Likewise.
6712
6713 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
6714
6715 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
6716 Fix typos in previous change that broke 'make check'.
6717 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
6718 supported in C.
6719 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
6720 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
6721 We can revert this once things settle down.
6722
6723 * src/conflicts.c (conflicts_print): Don't print file name twice
6724 when %expect fails because there were no conflicts.
6725 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
6726 change.
6727 * tests/conflicts.at (%expect not enough, %expect too much):
6728 (%expect with reduce conflicts): Adjust to new behavior.
6729
6730 2005-11-18 Akim Demaille <akim@epita.fr>
6731
6732 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
6733 errors.
6734 * NEWS: Document this.
6735 * doc/bison.texinfo (Expect Decl): Likewise.
6736
6737 2005-11-16 Akim Demaille <akim@epita.fr>
6738
6739 Generalize the display of semantic values and locations in traces.
6740 * data/glr.c (yy_reduce_print): Fix indices (again).
6741 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
6742 literal integers.
6743 * data/lalr1.cc (yyreduce_print): Rename as...
6744 (yy_reduce_print): this.
6745 Display values and locations.
6746 * data/yacc.c (yy_reduce_print): Likewise.
6747 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
6748 (yysymprint): Move higher to be visible from yy_reduce_print).
6749 (yyparse): Adjust.
6750 * tests/calc.at: Adjust the expected length of the traces.
6751
6752 2005-11-14 Akim Demaille <akim@epita.fr>
6753
6754 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
6755 from 1 to N, while values and location start at 0.
6756 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
6757
6758 2005-11-14 Akim Demaille <akim@epita.fr>
6759
6760 * data/glr.c (yy_reduce_print): Fix the $ number.
6761
6762 2005-11-14 Akim Demaille <akim@epita.fr>
6763
6764 "Use" parse parameters.
6765 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
6766 * data/glr.c, data/glr.cc: Use them.
6767 * data/glr.c (YYUSE): Have a C++ definition that supports
6768 non-pointer types.
6769
6770 2005-11-14 Akim Demaille <akim@epita.fr>
6771
6772 * data/glr.c (yyexpandGLRStack): Declare only if defined.
6773
6774 2005-11-14 Akim Demaille <akim@epita.fr>
6775
6776 * data/glr.cc: New.
6777 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
6778
6779 2005-11-12 Akim Demaille <akim@epita.fr>
6780
6781 Let position and location be PODs.
6782 * data/location.cc (position::initialize, location::initialize): New.
6783 (position::position, location::location): Define only if
6784 b4_location_constructors is defined.
6785 * data/lalr1.cc (b4_location_constructors): Define it for backward
6786 compatibility.
6787 * doc/bison.texinfo (Initial Action Decl): Use initialize.
6788
6789 2005-11-12 Akim Demaille <akim@epita.fr>
6790
6791 * data/lalr1.cc: Move the body of the ctor and dtor into the
6792 parser file (instead of the header).
6793 Wrap the implementations in a "namespace yy".
6794
6795 2005-11-12 Akim Demaille <akim@epita.fr>
6796
6797 Have glr.c include its header file when created.
6798 * data/glr.c (b4_shared_declarations): New.
6799 Output them verbatim in the parser if !%defines, otherwise
6800 output then in the header file, and include it instead.
6801
6802 2005-11-11 Akim Demaille <akim@epita.fr>
6803
6804 * data/glr.c: Comment changes.
6805
6806 2005-11-11 Akim Demaille <akim@epita.fr>
6807
6808 When yydebug, report semantic and location values for reductions.
6809 * data/glr.c (yy_reduce_print): Report the semantic values and the
6810 locations.
6811 (YY_REDUCE_PRINT): Adjust.
6812 (yyglrReduce): Use them.
6813 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
6814 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
6815 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
6816 traces.
6817
6818 2005-11-10 Akim Demaille <akim@epita.fr>
6819
6820 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
6821 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
6822 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
6823
6824 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
6825
6826 * m4/cxx.m4, examples/Makefile.am: Don't build
6827 examples/calc++ if no C++ compiler is available. (trivial change)
6828
6829 2005-11-09 Akim Demaille <akim@epita.fr>
6830
6831 * src/scan-skel.l: Use a couple of asserts.
6832
6833 2005-11-03 Akim Demaille <akim@epita.fr>
6834
6835 In some (weird) cases, the final state number is incorrect.
6836 Reported by Alexandre Duret-Lutz.
6837 * src/LR0.c (state_list_append): Remove the computation of
6838 final_state.
6839 (save_reductions): Do it here.
6840 (get_state): Alpha conversion.
6841 (generate_states): Use a for loop.
6842 * src/gram.h (item_number_is_rule_number)
6843 (item_number_is_symbol_number): New.
6844 * src/state.c: Use assert.
6845 * src/system.h: Include assert.h.
6846 * tests/sets.at (Accept): New.
6847
6848 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6849
6850 * data/glr.c (yyfill): Adjust comment.
6851 (yyresolveAction): Initialize default location properly
6852 for empty right-hand sides.
6853 (yydoAction): Ditto.
6854 Add comment explaining apparently dead code.
6855 * tests/glr-regression.at
6856 (Incorrectly initialized location for empty right-hand side in GLR):
6857 New test.
6858
6859 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
6860
6861 * bootstrap (cleanup_gnulib): New function. Use it to clean up
6862 gnulib when interrupted. This fixes some race conditions and
6863 works around some portability problems (one noted by Paul
6864 Hilfinger).
6865
6866 2005-10-22 Akim <akim@epita.fr>
6867
6868 * Makefile.cfg: Adjust to config -> build-aux.
6869 Reported by twledo.
6870
6871 2005-10-21 Akim Demaille <akim@epita.fr>
6872
6873 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
6874 the %parse-params.
6875 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
6876 * data/yacc.c (b4_Pure_if): Rename as...
6877 (b4_yacc_pure_if): this.
6878 (YY_SYMBOL_PRINT, yyparse): Adjust.
6879 * doc/bison.texinfo: Formatting changes.
6880
6881 2005-10-21 Akim Demaille <akim@epita.fr>
6882
6883 Finish the transition config -> build-aux.
6884 * configure.ac, Makefile.am: Use build-aux.
6885 * config/prev-version, config/announce-gen, config/Makefile.am:
6886 Move to...
6887 * build-aux/prev-version, build-aux/announce-gen,
6888 * build-aux/Makefile.am: here.
6889
6890 2005-10-14 Akim Demaille <akim@epita.fr>
6891
6892 * examples/calc++/test: Use set -x only when VERBOSE.
6893
6894 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
6895
6896 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
6897 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
6898
6899 2005-10-13 Akim Demaille <akim@epita.fr>
6900
6901 * src/scan-skel.l: Output the base name parts of the parser and
6902 header file names.
6903 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
6904 additional checks.
6905 Use this to exercise C++ outputs in subdirs.
6906 Reported by Oleg Smolsky.
6907
6908 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
6909
6910 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
6911 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
6912 Problem reported by John P. Hartmann.
6913 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
6914 already defined it.
6915
6916 2005-10-12 Akim Demaille <akim@epita.fr>
6917
6918 * src/parse-gram.y (version_check): Exit 63 to please missing
6919 (stands for "version mismatch).
6920 * tests/input.at, doc/bison.texinfo: Adjust.
6921
6922 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
6923
6924 Work around portability problems with Visual Age C compiler
6925 (xlc and xlC_r) reported by John P. Hartmann.
6926 * data/location.cc (initial_column, initial_line): Remove.
6927 All uses replaced by 0 and 1.
6928 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
6929 that xlc complains about.
6930 * src/scan-skel.l (skel_wrap): Likewise.
6931 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
6932 as __STDC__.
6933 * data/yacc.c (YYMODERN_C): New macro, which also looks at
6934 __STDC_VERSION__. Use it everywhere instead of looking at
6935 __STDC__ and __cplusplus.
6936
6937 2005-10-10 Akim Demaille <akim@epita.fr>
6938
6939 * examples/calc++/test: Be quiet unless VERBOSE.
6940
6941 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
6942
6943 * data/c.m4 (yydestruct, yysymprint):
6944 Use YYUSE instead of casting to void.
6945 * data/glr.c (YYUSE): New macro.
6946 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6947 Use it instead of rolling our own.
6948 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6949 (YYCHK1):
6950 Use /*CONSTCOND*/ to suppress lint warnings.
6951 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6952 (YY_STACK_PRINT): Use 'false' not '0'.
6953 (YYUSE): New macro.
6954 (yysymprint_, yydestruct_): Use it instead of rolling our own.
6955 * data/yacc.c (YYUSE): New macro.
6956 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
6957 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
6958 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
6959
6960
6961 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
6962 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
6963
6964 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
6965
6966 Undo the parts of the unlocked-I/O change that substituted
6967 putc or puts for printf. This might hurt performance a bit,
6968 but some people prefer the printf style.
6969 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
6970 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
6971 All uses replaced by YYFPRINTF and YYDPRINTF.
6972 * data/yacc.c: Likewise.
6973 * lib/bitset.c (bitset_print): Likewise.
6974 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
6975 putc and puts.
6976 * lib/lbitset.c (debug_lbitset): Likewise.
6977 * src/closure.c (print_firsts, print_fderives): Likewise.
6978 * src/gram.c (grammar_dump): Likewise.
6979 * src/lalr.c (look_ahead_tokens_print): Likewise.
6980 * src/output.c (escaped_output): Likewise.
6981 (user_actions_output): Break apart two printfs.
6982 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
6983 * src/reduce.c (reduce_print): Likewise.
6984 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
6985 * src/system.h: Include unlocked-io.h rathe than stdio.h.
6986
6987 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6988 Use assignments rather than casts-to-void to suppress
6989 unused-variable warnings. This pacifies 'lint'.
6990 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
6991 unused-variable warnings.
6992
6993 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6994
6995 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6996
6997 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
6998
6999 Use unlocked I/O for a minor performance improvement on hosts like
7000 GNU/Linux and Solaris that support unlocked I/O. The basic idea
7001 is to use the gnlib unlocked-io module, and to prefer putc and
7002 puts to printf when either will work (since the latter doesn't
7003 come in an unlocked flavor).
7004 * bootstrap (gnulib_modules): Add unlocked-io.
7005 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
7006 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
7007 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
7008 and similarly for puts and putc and printf.
7009 * data/yacc.c: Likewise.
7010 * lib/bitset.c (bitset_print): Likewise.
7011 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
7012 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
7013 to printf.
7014 * lib/lbitset.c (debug_lbitset): Likewise.
7015 * src/closure.c (print_firsts, print_fderives): Likewise.
7016 * src/gram.c (grammar_dump): Likewise.
7017 * src/lalr.c (look_ahead_tokens_print): Likewise.
7018 * src/output.c (escaped_output): Likewise.
7019 (user_actions_output): Coalesce two printfs.
7020 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
7021 * src/reduce.c (reduce_print): Likewise.
7022 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
7023 * src/system.h: Include unlocked-io.h rather than stdio.h.
7024
7025 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
7026 this confuses xgettext.
7027
7028 2005-10-02 Akim Demaille <akim@epita.fr>
7029
7030 * bootstrap (gnulib_modules): Add strverscmp.
7031 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
7032 * m4/.cvsignore: Add strverscmp.m4.
7033 * src/parse-gram.y (%require): New token, new rule.
7034 (version_check): New.
7035 * src/scan-gram.l (%require): Adjust.
7036 * tests/input.at (AT_REQUIRE): New.
7037 Use it.
7038 * doc/bison.texinfo (Require Decl): New.
7039 (Calc++ Parser): Use %require.
7040
7041 2005-10-02 Akim Demaille <akim@epita.fr>
7042
7043 * data/location.cc: New.
7044
7045 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
7046 Akim Demaille <akim@epita.fr>
7047
7048 Make sure -odir/foo.cc creates dir/location.hh etc.
7049 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
7050 (spec_file_prefix, spec_verbose_file, spec_graph_file)
7051 (spec_defines_file): Now const.
7052 (dir_prefix): New.
7053 (short_base_name): Remove.
7054 * src/files.c: Adjust.
7055 (dirname.h): Include.
7056 (base_name): Don't prototype it.
7057 (finput): Remove, duplicates gram_in.
7058 (full_base_name, short_base_name): Replace by...
7059 (all_but_ext, all_but_tab_ext): these.
7060 (compute_base_names): Rename as...
7061 (compute_file_name_parts): this.
7062 Update to compute the new variables, including dir_prefix.
7063 Adjust dependencies.
7064 * src/output.c (prepare): Output them.
7065 * src/reader.c: Adjust to use gram_in, not finput.
7066 * src/scan-skel.l (@dir_prefix@): New.
7067
7068 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7069
7070 * lib/subpipe.c: New function end_of_output_subpipe() added
7071 to allow support for non-posix systems. This is a no-op function
7072 for posix systems.
7073
7074 * lib/subpipe.h: New function end_of_output_subpipe() added
7075 to allow support for non-posix systems. This is a no-op function
7076 for posix systems.
7077
7078 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
7079 handle the lack of pipe/fork functionality on non-posix systems.
7080
7081 * djgpp/Makefile.maint: DJGPP specific file.
7082
7083 * djgpp/README.in: DJGPP specific file.
7084
7085 * djgpp/config.bat: DJGPP specific configuration file.
7086
7087 * djgpp/config.sed: DJGPP specific configuration file.
7088
7089 * djgpp/config.site: DJGPP specific configuration file.
7090
7091 * djgpp/config_h.sed: DJGPP specific configuration file.
7092
7093 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
7094
7095 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
7096
7097 2005-10-02 Akim Demaille <akim@epita.fr>
7098
7099 * data/location.cc: New, extract from...
7100 * data/lalr1.cc: here.
7101 (location.hh): Include it after the user prologue, in case the
7102 filename type is defined by the user.
7103 Forward declation location and position before the pre-prologue.
7104 (yyresult_): Rename as...
7105 (yyresult): this, it's a local variable, not an attribute.
7106 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
7107
7108 2005-10-01 Akim Demaille <akim@epita.fr>
7109
7110 * examples/extexi: Restore the #line generation.
7111
7112 2005-09-30 Akim Demaille <akim@epita.fr>,
7113 Alexandre Duret-Lutz <adl@gnu.org>
7114
7115 Move the token type and YYSTYPE in the parser class.
7116 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
7117 (parser::token): New, from the moved free definition of tokens.
7118 (parser::semantic_value): Now a full definition instead of an
7119 indirection to YYSTYPE.
7120 (b4_post_prologue): No longer included in the header file, but
7121 in the implementation file.
7122 * doc/bison.texi (C+ Language Interface): Update.
7123 * src/parse-gram.y: Support unary %define.
7124 * tests/actions.at: Define global_tokens_and_yystype for backward
7125 compatibility until we update the tests.
7126 * tests/calc.at: Idem.
7127 (first_line, first_column, last_line, last_column): Define for lalr1.cc
7128 to simplify the code.
7129
7130 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
7131
7132 Port to SunOS 4.1.4, which lacks strtoul and strerror.
7133 Ah, the good old days! Problem reported by Peter Klein.
7134 * bootstrap (gnulib_modules): Add strerror, strtoul.
7135 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
7136 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
7137
7138 2005-09-29 Akim Demaille <akim@epita.fr>
7139
7140 * data/c.m4 (b4_error_verbose_if): New.
7141 * data/lalr1.cc: Use it.
7142 (YYERROR_VERBOSE_IF): Remove.
7143 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
7144 parser members, replaced by...
7145 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
7146 local variables.
7147 (yysyntax_error_): Takes the state number as argument.
7148 (yyreduce_print_): Use the argument yyrule, not the former
7149 attribute yyn_.
7150
7151 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
7152
7153 * bootstrap (gnulib_modules): Add verify.
7154 * lib/.cvsignore: Add verify.h.
7155 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
7156 * src/system.h (verify): Remove.
7157 Include verify.h instead.
7158 * src/tables.c (tables_generate): Use new API for 'verify'.
7159
7160 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
7161
7162 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
7163 local variables whose names begin with 'yy'.
7164 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7165 Trivial changes from Joel E. Denny.
7166
7167 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
7168 it itself.
7169 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
7170 don't use alloca any more.
7171
7172 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
7173 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
7174 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
7175 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
7176 to match yacc.c, to test more hosts.
7177
7178 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
7179
7180 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
7181 doesn't affect behavior.
7182 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
7183 Solaris, AIX, MSC.
7184 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
7185 This works a bit better with glibc, if user code has already included
7186 stdlib.h.
7187 * doc/bison.texinfo (Bison Parser): Document that users can't
7188 arbitrarily use malloc and free for other purposes. Document
7189 that <alloca.h> and <malloc.h> might be included.
7190 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
7191 user must declare alloca.
7192
7193 * HACKING (release): Forwarn the Translation Project about
7194 stable releses.
7195
7196 2005-09-20 Akim Demaille <akim@epita.fr>
7197
7198 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
7199
7200 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
7201
7202 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
7203 (YYSTACK_ALLOC_MAXIMUM): Use it.
7204 (yysyntax_error): New function.
7205 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
7206 multiple syntax errors are reported, and alloca is being used.
7207 Instead, reallocate buffers twice as big each time, so that
7208 we waste at most half the allocated memory. Start with a small
7209 (128-byte) buffer that will suffice in most cases anyway.
7210 Use yysyntax_error to do most of the work.
7211
7212 * doc/bison.texinfo (Error Reporting, Table of Symbols):
7213 yynerrs is the number of errors reported, not the number of
7214 errors encountered.
7215
7216 * tests/glr-regression.at (Duplicated user destructor for lookahead):
7217 Mark it as expected to fail.
7218 Cast result of malloc; problem reported by twlevo@xs4all.nl.
7219 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
7220 Don't start user-code symbols with "yy", to avoid name space problems.
7221
7222 2005-09-19 Akim Demaille <akim@epita.fr>
7223
7224 Remove the traits, failed experiment.
7225 It never proved useful, and anyway because of the current
7226 definition, it was not possible to have several specialization of
7227 this traits, making it useless.
7228 * data/lalr1.cc (yy:traits): Remove.
7229 Inline its definitions in the parser class.
7230
7231 2005-09-19 Akim Demaille <akim@epita.fr>
7232
7233 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
7234 least Mac OSX with a /usr/local install of gettext.
7235
7236 2005-09-19 Akim Demaille <akim@epita.fr>
7237
7238 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
7239 and yytoken for similarity with the other skeletons.
7240
7241 2005-09-19 Akim Demaille <akim@epita.fr>
7242
7243 * NEWS, configure.ac: update version number to 2.1a.
7244
7245 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
7246
7247 * NEWS: Version 2.1.
7248
7249 * NEWS: Remove notice of yytname change, since it was never in an
7250 official release.
7251 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
7252 diagnostic.
7253 * src/output.c (prepare): Likewise.
7254 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
7255 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
7256 is not defined. This is an awful hack, but it's enough for now.
7257 All callers changed.
7258 * tests/glr-regression-at (make_value): Args are const pointers now,
7259 to avoid GCC warning.
7260 (Duplicated user destructor for lookahead): New test. Currently
7261 skipped. It fails on my host but I'm not sure it'll always fail.
7262
7263 2005-09-16 Akim Demaille <akim@epita.fr>
7264
7265 * src/symtab.h (struct symbol): Declare the printer and destructor
7266 as const, to avoid accidental calls to free.
7267 (symbol_destructor_set, symbol_printer_set): Adjust.
7268 * src/symtab.c: Adjust.
7269
7270 2005-09-16 Akim Demaille <akim@epita.fr>
7271
7272 * data/c.m4 (b4_token_enums): New.
7273 (b4_token_defines): Rename as...
7274 (b4_token_enums_defines): this.
7275 (b4_token_defines): New, output only the #defines.
7276 * data/yacc.c, data/glr.c: Adjust.
7277 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
7278 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
7279 as default values.
7280
7281 2005-09-16 Akim Demaille <akim@epita.fr>
7282
7283 * data/lalr1.cc (yylex_): Remove, inline its code.
7284 (yyreport_syntax_error_): Remove, replaced by...
7285 (yysyntax_error_): this which returns a string and leaves to the
7286 caller the call to the users' error function.
7287 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
7288 Move from members of the parser object...
7289 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
7290 to local variables of the parse function.
7291
7292 2005-09-16 Akim Demaille <akim@epita.fr>
7293
7294 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
7295 since it's in Bison's name space.
7296
7297 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
7298
7299 * data/glr.c (yyresolveValue): Add default case to pacify
7300 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
7301
7302 * NEWS: Document when yyparse started to return 2.
7303 * doc/bison.texinfo (Parser Function): Document when yyparse
7304 returns 2.
7305
7306 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
7307 (b4_filename_type): Renamed back from b4_file_name_type. All uses
7308 changed.
7309 (class position): file_name -> filename (reverting). All uses changed.
7310
7311 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
7312
7313 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
7314 do anything if $@ exists. This reverts part of the 2005-07-07
7315 patch.
7316
7317 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
7318
7319 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
7320 contains obsolete information and isn't worth distributing as a
7321 separate file anyway.
7322 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
7323 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
7324 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
7325 (yyparse): Abort if user code uses longjmp to throw an unexpected
7326 value.
7327
7328 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
7329
7330 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
7331 Suggested by twlevo@xs4all.nl.
7332
7333 * data/glr.c (YYCHK1): Do not assume YYE is in range.
7334 This avoids a diagnostic from gcc -Wswitch-enum.
7335 Problem reported by twlevo@xs4all.nl.
7336
7337 * doc/bison.texinfo: Don't use "filename", as per GNU coding
7338 standards. Use "file name" or "file" or "name", depending on
7339 the context.
7340 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
7341 not to hack/foo.tab.c.
7342 (Calc++ Top Level): 2nd arg of main is not const.
7343 * data/glr.c: b4_filename -> b4_file_name.
7344 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
7345 All uses changed.
7346 (class position): filename -> file_name. All uses changed.
7347 * data/yacc.c: b4_filename -> b4_file_name.
7348 * lib/bitset.h: filename -> file_name in local vars.
7349 * lib/bitset_stats.c: Likewise.
7350 * src/files.c: Likewise.
7351 * src/scan-skel.l ("@output ".*\n): Likewise.
7352 * src/files.c (file_name_split): Renamed from filename_split.
7353 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
7354
7355 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
7356
7357 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
7358 to accommodate latest gnulib.
7359
7360 * tests/glr-regression.at (Duplicate representation of merged trees):
7361 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
7362
7363 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
7364 needed.
7365
7366 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
7367
7368 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
7369 All uses changed. Invoke user destructor after an error during a
7370 split parse (trivial change from Joel E. Denny).
7371
7372 * tests/glr-regression.at
7373 (User destructor after an error during a split parse): New test case.
7374 Problem reported by Joel E. Denny in:
7375 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
7376
7377 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
7378
7379 * README-cvs: Give URLs for recommended tools.
7380 Mention Gzip version problem, and bootstrapping issues.
7381 Remove troubleshooting section, as it's somewhat obsolete.
7382
7383 * bootstrap (no_cache): New var, to accommodate different wget
7384 variants. Use it instead of '-C off'. Problem reported by
7385 twlevo@xs4all.nl.
7386
7387 * data/glr.c (yydestroyStackItem): New function.
7388 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
7389 debugging information. Problem reported by Joel E. Denny.
7390
7391 2005-08-25 Akim Demaille <akim@epita.fr>
7392
7393 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
7394
7395 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
7396
7397 * data/glr.c (yyrecoverSyntaxError, yyreturn):
7398 Don't invoke destructor on unresolved entries.
7399 * tests/glr-regression.at
7400 (User destructor for unresolved GLR semantic value): New test case.
7401 Problem reported by Joel E. Denny in:
7402 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
7403
7404 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
7405
7406 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
7407 Add strnlen.c.
7408 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
7409 lib-prefix.m4, po.m4.
7410
7411 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
7412 in yydestruct diagnostic, since it might not be an error.
7413 Problem reported by Joel Denny near end of
7414 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
7415 * data/lalr1.cc (yyerturn): Likewise.
7416 * data/yacc.c (yyreturn): Likewise.
7417 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
7418
7419 * src/files.c: Remove obsolete FIXME comment.
7420
7421 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
7422 with the other templates, and to fix bogus run-on messages such
7423 as the one reported at the end of
7424 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
7425 All callers changed to avoid the newline.
7426 (yyprocessOneStack): Output two lines rather than one, to accommodate
7427 the above change. This changes the debug output format slightly.
7428
7429 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
7430 reported by Joel E. Denny in
7431 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
7432 (trivial change).
7433 * tests/glr-regression.at (Duplicate representation of merged trees):
7434 New test, from Joel E. Denny in:
7435 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
7436 * THANKS: Add Joel E. Denny.
7437
7438 * configure.ac (AC_INIT): Bump to 2.0c.
7439
7440 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
7441
7442 * NEWS: Version 2.0b.
7443
7444 * Makefile.am (SUBDIRS): Put examples before tests, so that
7445 "make check" doesn't finish with "All 1 tests passed".
7446
7447 * tests/regression.at (Token definitions): Don't rely on
7448 AT_PARSER_CHECK for data that contains backslashes. It currently
7449 uses 'echo', and 'echo' isn't portable if its argument contains
7450 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
7451 that the byte '\0xff' is not printable in the C locale; it is,
7452 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
7453 not printable, so use '\0x81' to test.
7454
7455 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
7456 version of GCC, since the macro is used with non-GCC compilers.
7457
7458 Fix core dump reported by Pablo De Napoli in
7459 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
7460 * tests/regression.at (Invalid inputs with {}): New test.
7461 * src/parse-gram.y (token_name): Translate type before using
7462 it as an index.
7463
7464 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
7465 the user's name space. All uses changed to __attribute__
7466 ((__unused__)).
7467 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
7468 Add __attribute__ ((__noreturn__)).
7469
7470 * etc/clcommit: Remove. We weren't using it, and it failed
7471 "make maintainer-distcheck".
7472 * Makefile.maint: Merge from coreutils.
7473 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
7474 (syntax-check-rules): Change list of rules as described below.
7475 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
7476 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
7477 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
7478 (sc_trailing_space): New rules.
7479 (sc_xalloc_h_in_src): Remove.
7480 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
7481 (sc_space_tab, sc_error_exit_success, sc_changelog):
7482 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
7483 (makefile-check, po-check, author_mark_check):
7484 (makefile_path_separator_check, copyright-check):
7485 Use grep -n, to make it easier to find violations.
7486 Use CVS_LIST and CVS_LIST_EXCEPT.
7487 (header_regexp, h_re): Remove.
7488 (dd_c): New macro.
7489 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
7490 (my-distcheck): Use more-modern GCC flags.
7491 (signatures, %.asc): Remove.
7492 (rel-files, announcement): Remove signatures.
7493 Restore old updating code, even though we don't use it, so
7494 that we're the same as coreutils.
7495 (alpha, beta, major): Depend on news-date-check.
7496 Make the upload commands.
7497
7498 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
7499 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
7500 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
7501 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
7502 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
7503 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
7504 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
7505 * tests/sets.at: Likewise.
7506
7507 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
7508 we comment out the Autoconf version number.
7509 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
7510 it's error-prone and "make maintainer-distcheck" rejects it.
7511
7512 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
7513 Indent calls to "error" to pacify "make maintainer-distcheck",
7514 when the calls are not intended to be translated.
7515 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
7516
7517 * src/Makefile.am (DEFS): Use +=, to pacify
7518 "make maintainer-distcheck".
7519 (bison_SOURCES): Add scan-skel.h.
7520 (sc_tight_scope): New rule, from coreutils.
7521
7522 * src/files.c (src_extension, header_extension):
7523 Now static, not extern.
7524 * src/getargs.c (short_options): Likewise.
7525 * src/muscle_tab.c (muscle_table): Likewise.
7526 * src/parse-gram.y (current_class, current_type, current_prec):
7527 Likewise.
7528 * src/reader.c (grammar_end, previous_rule_end): Likewise.
7529 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
7530 * src/main.c (main): Cast bindtextdomain and textdomain calls to
7531 void, to avoid warning when NLS is disabled.
7532 * src/output.c: Include scan-skel.h.
7533 (scan_skel): Remove decl, since scan-skel.h does this.
7534 (output_skeleton):
7535 Indent calls to "error" to pacify "make maintainer-distcheck".
7536 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
7537 * src/reader.h (gram_end, gram_lineno): New decls to pacify
7538 "make maintainer-distcheck".
7539 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
7540 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
7541 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
7542 (skel_lex_destroy, scan_skel): Move these decls to...
7543 * src/scan-skel.h: New file.
7544 * src/uniqstr.c (uniqstr_assert):
7545 Indent calls to "error" to pacify "make maintainer-distcheck".
7546
7547 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
7548 not @VAR@.
7549
7550 * tests/torture.at: Revamp to avoid misuse of atoi that
7551 "make maintainer-distcheck" complained about.
7552
7553 * examples/extexi (message): Don't print a message more than once,
7554 and omit line-number decoration that makes Emacs compile think
7555 that informative messages are worth worrying about.
7556
7557 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
7558
7559 * configure.ac: Update version number.
7560
7561 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
7562 accidentally.
7563 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
7564 autogenerated by the maintainer.
7565 * examples/calc++/.cvsignore: Add *.yy.
7566
7567 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
7568 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7569 * lib/bitsetv.c (bitsetv_alloc): Likewise.
7570
7571 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
7572
7573 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
7574 from maintainer-distcheck about casting the argument of 'free'.
7575
7576 * NEWS: Mention recent yytname changes.
7577 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
7578
7579 * bootstrap: For translations that have not yet been upgraded to
7580 the new runtime-po domain, prime the pump by extracting the
7581 relevant strings from the obsolete translations. This code can be
7582 removed once the bison-runtime domain has been translated by each
7583 team.
7584
7585 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
7586 now that token names are already quoted.
7587
7588 Fix problem reported by Anthony Heading.
7589 * data/glr.c (YYTOKEN_TABLE): New macro.
7590 (yytname): Define if YYTOKEN_TABLE.
7591 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
7592 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
7593 (YYERROR_VERBOSE): Define the same way the other skeletons do.
7594 * src/output.c (prepare_symbols): Output token_table_flag.
7595
7596 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
7597
7598 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
7599 again if the first call fails.
7600
7601 * data/glr.c (yytnamerr): New function.
7602 (yyreportSyntaxError): Use it to dequote most string literals.
7603 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
7604 with other skeletons. All uses changed.
7605 (yytnameerr_): New function.
7606 (yyreport_syntax_error): Use it to dequote most string literals.
7607 * data/yacc.c (yytnamerr): New function.
7608 (yyerrlab): Use it to decode most string literals.
7609 * doc/bison.texinfo (Decl Summary, Calling Convention):
7610 Clarify quoting convention of yytname.
7611 * src/output.c (prepare_symbols): Quote all names. This undoes
7612 the 2005-04-17 change, which is now accomplished (mostly) via
7613 changes in the parsers as described above.
7614 * tests/regression.at (Token definitions, Web2c Actions):
7615 Undo most 2005-04-17 change here, too.
7616
7617 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
7618
7619 Fix more problems reported by twlevo@xs4all.nl.
7620 * tests/cxx-type.at: Don't pipe output of ./types through sed to
7621 remove trailing spaces. This loses the exit status of ./types,
7622 and isn't needed since ./types shouldn't be emitting trailing
7623 spaces.
7624 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
7625 as the stack isn't valid in that case.
7626
7627 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7628 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7629 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7630 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
7631 is used.
7632 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
7633 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7634 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7635 Likewise.
7636
7637 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
7638 overly-picky compilers that reject 'char *foo = "bar";'.
7639
7640 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
7641 to FILE * parameter, not to stderr. This fixes a typo introduced
7642 in the 2005-07-12 change.
7643
7644 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
7645 warnings from GCC 4.
7646
7647 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
7648 (yyglrShiftDefer, yysplitStack):
7649 Remove unused parameters b4_pure_formals. All uses changed.
7650 (yyglrShift): Remove unused parameters b4_user_formals.
7651 All uses changed.
7652 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
7653
7654 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
7655
7656 Destructor cleanups and regularization among the three skeletons.
7657 * NEWS: Document the behavior changes.
7658 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
7659 stack before failing, as the cleanup code will do it for us now.
7660 * data/lalr1.cc (yyerrlab): Likewise.
7661 * data/glr.c (yyparse): Pop everything off the stack before
7662 freeing it, so that destructors get called properly.
7663 * data/lalr1.cc (yyreturn): Likewise.
7664 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
7665 This is more consistent.
7666 * doc/bison.texinfo (Destructor Decl): Mention more reasons
7667 why destructors might be called. 1.875 -> 2.1.
7668 (Destructor Decl, Decl Summary, Table of Symbols):
7669 Some English-language cleanups for %destructor.
7670 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7671 Add output line for destructor of start symbol.
7672 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
7673 because of that same extra output line.
7674
7675 * NEWS: Document minor wording changes in diagnostics of
7676 Bison-generated parsers.
7677 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
7678 Remove unused formals. All uses changed.
7679 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
7680 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
7681 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
7682 Rename yyoverflowab to yyexhaustedlab.
7683 When memory exhaustion occurs during syntax-error reporting,
7684 report it separately rather than in a single diagnostic; this
7685 eases translation.
7686 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
7687 (Memory Exhausted): Renamed from Parser Stack Overflow.
7688 Revamp wording slightly to prefer "memory exhaustion".
7689 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
7690
7691 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
7692
7693 Add i18n support to the GLR skeleton. Partially fix the C++
7694 skeleton; a C++ expert needs to finish this. Remove debugging
7695 msgids; there's little point to having them translated, since they
7696 can be understood only by someone who can read the
7697 (English-language) source code.
7698
7699 Generate runtime-po/bison-runtime.pot automatically, so that we
7700 don't have to worry about garbage getting in that file. We'll
7701 make sure after the next official release that old msgids don't
7702 get lost. See
7703 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
7704
7705 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
7706 Now auto-generated.
7707 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
7708 Fix typos in explanations of the runtime file.
7709 * bootstrap: Change gettext keyword from YYI18N to YY_.
7710 Use standard Makefile.in.in in runtime-po, since we'll arrange
7711 for backward-compatible bison-runtime.po files in a different way.
7712 * data/glr.c (YY_): New macro, from yacc.c.
7713 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
7714 Translate messages intended for users.
7715 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
7716 the wording in the other skeletons. We don't know that the memory
7717 is virtual.
7718 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
7719 Use same method that yacc.c uses.
7720 Don't translate debugging messages.
7721 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
7722 it doesn't work (yet), and requires C++ expertise to fix.
7723 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
7724 Move defn to a more logical place, to be consistent with other
7725 skeletons.
7726 Don't translate debugging messages.
7727 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
7728 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
7729 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
7730 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
7731
7732 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
7733 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
7734 void, not int.
7735 * tests/glr-regression.at (Badly Collapsed GLR States):
7736 Likewise.
7737 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
7738 yylex should return 0 at EOF rather than aborting.
7739
7740 Improve tests for stack overflow in GLR parser.
7741 Problem reported by twlevo@xs4all.nl.
7742 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
7743 All uses removed.
7744 (yyStackOverflow): Just longjmp, but with value 2 so that caller
7745 can handle the problem.
7746 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
7747 (yyparse): New local variable yyresult to record the result.
7748 Use result of setjmp to set it, rather than storing itinto
7749 struct.
7750 (yyDone): Remove label.
7751 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
7752 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
7753 if YYABORT is used).
7754 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
7755 yyparse status; put status > 1 into diagnostic.
7756 Check that status==2 works.
7757 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
7758 Use exit status 3 for failure to open (which shouldn't happen).
7759
7760 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
7761
7762 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
7763 1 on syntax error; just let yyparse do its thing.
7764 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
7765 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
7766 (Exploding the Stack Size with Alloca):
7767 (Exploding the Stack Size with Malloc):
7768 Expect exit status 2, not 1, since the parser is supposed to blow
7769 its stack. Problem reported by twlevo@xs4all.nl.
7770
7771 * data/glr.c (yyparse): Don't assume that the initial calls
7772 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
7773 Print a stack-overflow message and fail instead.
7774 Initialize the line-number information before creating the stack,
7775 so that the stack-overflow message can report line zero safely.
7776
7777 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
7778
7779 Fix problems reported by twlevo@xs4all.nl.
7780 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
7781 (yyuserMerge): Provide a default case if b4_mergers is empty.
7782 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
7783 * tests/glr-regression.at
7784 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
7785 Add casts to pacify C++ compilers.
7786 * tests/glr-regression.at (Improper merging of GLR delayed action
7787 sets): Declare yylex before using it.
7788 * tests/Makefile.am (maintainer-check-g++): Fix a stray
7789 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
7790 test for valgrind; valgrind is independent of g++.
7791 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
7792 for compatibility with POSIX 1003.1-2001 (if running coreutils).
7793 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
7794 Use a destructor, so that we can expand the stack. Change
7795 YYSTYPE to char * so that we can free it. Cast result of malloc.
7796
7797 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7798
7799 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
7800 a valgrind failure. Problem reported by twlevo@xs4all.nl.
7801
7802 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
7803
7804 * PACKAGING: New file, suggested by Bruno Haible and taken from
7805 similar wording in gettext's PACKAGING file.
7806 * NEWS: Mention PACKAGING.
7807 * Makefile.am (EXTRA_DIST): Add PACKAGING.
7808
7809 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
7810
7811 * NEWS: Document recent i18n improvements.
7812 * bootstrap: Get runtime translations into runtime-po.
7813 Create runtime-po files automatically, if possible.
7814 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
7815 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
7816 does not infringe on the user's name space.
7817 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
7818 * doc/bison.texinfo (Internationalization): Revamp the English
7819 and Texinfo syntax a bit, to try to make it clearer.
7820 (Bison Options, Option Cross Key): Mention --print-localedir.
7821 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
7822 YYENABLE_NLS. Quote a bit more.
7823 * runtime-po/.cvsignore: New file.
7824 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
7825 * runtime-po/Rules-quot: Remove; now created by bootstrap.
7826 * runtime-po/quot.sed: Likewise.
7827 * runtime-po/boldquot.sed: Likewise.
7828 * runtime-po/en@quot.header: Likewise.
7829 * runtime-po/en@boldquot.header: Likewise.
7830 * runtime-po/insert-header.sin: Likewise.
7831 * runtime-po/remove-potcdate.sin: Likewise.
7832 * runtime-po/Makevars: Likewise.
7833 * runtime-po/LINGUAS: Likewise.
7834 * runtime-po/de.po: Likewise; we will rely on the translation project
7835 to maintain this, so "bootstrap" should get it.
7836 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
7837 its value.
7838 * src/main.c (main): Bind the bison-runtime domain, too.
7839
7840 2005-07-12 Bruno Haible <bruno@clisp.org>
7841
7842 * data/yacc.c: Include <libintl.h> when NLS is enabled.
7843 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
7844 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
7845 * runtime-po: New directory.
7846 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
7847 $(DOMAIN).pot-update rule, so that old messages are never dropped.
7848 * runtime-po/Rules-quot: New file, copied from po/.
7849 * runtime-po/quot.sed: Likewise.
7850 * runtime-po/boldquot.sed: Likewise.
7851 * runtime-po/en@quot.header: Likewise.
7852 * runtime-po/en@boldquot.header: Likewise.
7853 * runtime-po/insert-header.sin: Likewise.
7854 * runtime-po/remove-potcdate.sin: Likewise.
7855 * runtime-po/Makevars: New file.
7856 * runtime-po/POTFILES.in: New file.
7857 * runtime-po/LINGUAS: New file.
7858 * runtime-po/bison-runtime.pot: New file.
7859 * runtime-po/de.po: New file.
7860 * m4/bison.m4: New file.
7861 * Makefile.am (SUBDIRS): Add runtime-po.
7862 (aclocaldir, aclocal_DATA): New variables.
7863 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
7864 Define aclocaldir.
7865 * src/getargs.c (usage): Document --print-localedir option.
7866 (PRINT_LOCALEDIR_OPTION): New enum item.
7867 (long_options): Add --print-localedir option.
7868 (getargs): Handle --print-localedir option.
7869 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
7870 (Internationalization): New section.
7871
7872 2005-07-12 Akim Demaille <akim@epita.fr>
7873
7874 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
7875 for consistency with the rest of the code.
7876 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
7877 Add separators.
7878
7879 2005-07-12 Akim Demaille <akim@epita.fr>
7880
7881 * src/parse-gram.y: Use %printer instead of YYPRINT.
7882
7883 2005-07-12 Akim Demaille <akim@epita.fr>
7884
7885 * src/symtab.h, src/symtab.c (symbol_print): New.
7886 * src/symlist.h, src/symlist.c (symbol_list_print): New.
7887 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
7888
7889 2005-07-12 Akim Demaille <akim@epita.fr>
7890
7891 * data/glr.c (b4_syncline): Fix (swap) the definitions of
7892 b4_at_dollar and b4_dollar_dollar.
7893
7894 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
7895
7896 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
7897 and Pennello's paper.
7898
7899 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
7900
7901 * data/yacc.c (yyparse): Undo previous patch. Instead,
7902 set yylsp[0] and yyvsp[0] only if the initial action
7903 sets yylloc and yylval, respectively.
7904
7905 * data/yacc.c (yyparse): In the initial action, set
7906 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
7907 This avoids the use of undefined variables if the initial
7908 action does not set yylloc and/or yylval.
7909
7910 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
7911
7912 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
7913 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
7914 Remove from CVS. These files are automatically generated.
7915 * examples/extexi: Clarify that this file is now part of Bison,
7916 not GNU M4, and that it works with any POSIX-compatible Awk.
7917 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
7918 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
7919 so that we also get calc++-parser.yy. Geneate it.
7920 Use $(AWK), not gawk, since any conforming Awk will do.
7921 Put comment before action, since older 'make' can't handle comment
7922 in action.
7923 $(BUILT_SOURCES): List all built sources, not just some of them.
7924 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
7925 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
7926 $($(calc_sources_generated)): Remove unnecessary test for existence
7927 of target. (This had a shell syntax error anyway; a stray "x".)
7928 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
7929 calc++-parser.yy.
7930 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
7931
7932 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
7933 implied by the other modules.
7934
7935 2005-07-06 Akim Demaille <akim@epita.fr>
7936
7937 Bind examples/calc++ to the package.
7938 * examples/calc++/Makefile: Remove, replaced by...
7939 * examples/calc++/Makefile.am: ... this new file.
7940 * examples/calc++/test: Remove input.
7941 * examples/calc++/compile: Remove.
7942 * examples/Makefile.am: New.
7943 * configure.ac, Makefile.am: Adjust.
7944 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
7945
7946 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
7947
7948 * data/glr.c (yyFail): Drastically simplify; since the format argument
7949 never had any % directives, we can simply pass it to yyerror.
7950 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
7951 be modified later, as that is the usual style in glr.c.
7952 Problems reported by Paul Hilfinger.
7953
7954 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
7955 and size overflow errors.
7956 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
7957 in case the user prolog sets feature-test macros like _GNU_SOURCE.
7958 (YYSIZEMAX): New macro.
7959 (yystpcpy): New function, taken from yacc.c.
7960 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
7961 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
7962 so that we don't have to maintain their signatures.
7963 (yyFail): Check for buffer overflow, by using vsnprintf rather
7964 than vsprintf. Allocate a bigger buffer if possible.
7965 Report an error if buffer allocation fails.
7966 (yyStackOverflow): New function.
7967 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
7968 the initialization was successful. It might fail if storage was
7969 exhausted.
7970 (yyexpandGLRStack): Add more checks for storage allocation failure.
7971 Use yyStackOverflow to report failures.
7972 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
7973 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
7974 Don't assume stack number fits in int.
7975 (yysplitStack): Check for storage allocation failure.
7976 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
7977 can print diagnostics on storage allocation failure. All callers
7978 changed.
7979 (yyresolveValue): Use yybool for boolean.
7980 (yyreportSyntaxError): Check for size-calculation overflow.
7981 This code is taken from yacc.c.
7982 (yyparse): Check for storage allocation errors when allocating
7983 the initial stack.
7984
7985 2005-07-05 Akim Demaille <akim@epita.fr>
7986
7987 Extract calc++ from the documentation.
7988 * doc/bison.texinfo (Calc++): Add the extraction marks.
7989 * examples/extexi: New, from the aborted GNU Programming 2E.
7990 Separate the different paragraph of a file with empty lines.
7991 * examples/Makefile: Use it to extract the whole calc++ example.
7992
7993 2005-06-24 Akim Demaille <akim@epita.fr>
7994
7995 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
7996 class typedefs.
7997
7998 2005-06-22 Akim Demaille <akim@epita.fr>
7999
8000 * doc/bison.texinfo (C++ Language Interface): First stab.
8001 (C++ Parsers): Remove.
8002
8003 2005-06-22 Akim Demaille <akim@epita.fr>
8004
8005 * data/lalr1.cc (yylex_): Honor %lex-param.
8006
8007 2005-06-22 Akim Demaille <akim@epita.fr>
8008
8009 Start a set of simple examples.
8010 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
8011 * examples/calc++/calc++-driver.hh,
8012 * examples/calc++/calc++-parser.yy,
8013 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
8014 * examples/calc++/compile, examples/calc++/test: New.
8015
8016 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
8017
8018 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
8019 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
8020 which stems from the 2005-05-27 patch.
8021
8022 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8023
8024 * data/glr.c: Modify treatment of unused parameters to permit use
8025 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
8026
8027 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
8028
8029 Fix infringement on user name space reported by Janos Zoltan Szabo.
8030 * data/yacc.c (yyparse): strlen -> yystrlen.
8031
8032 2005-05-30 Akim Demaille <akim@epita.fr>
8033
8034 * data/lalr1.cc (_): New.
8035 Translate the various messages.
8036
8037 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
8038
8039 Fix infringement on user name space reported by Bruno Haible.
8040 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
8041 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
8042 the user's name space.
8043 (alloca): Include <stdlib.h> to get it, if it's not built in.
8044 (YYMALLOC, YYFREE): Define only if needed.
8045 (malloc, free): Declare, but only if needed, as this infringes on
8046 the user name space.
8047
8048 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
8049
8050 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
8051 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
8052 with %d format.
8053 * lib/ebitset.c (min, max): Undef before defining.
8054 * lib/vbitset.c (min, max): Likewise.
8055 * lib/subpipe.c (create_subpipe): Save local variables in case
8056 vfork clobbers them.
8057
8058 2005-05-24 Bruno Haible <bruno@clisp.org>
8059
8060 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
8061 error message syntax used by gcc-4.0.
8062
8063 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
8064
8065 * README: Mention m4 1.4.3. Remove obsolete advice about
8066 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
8067
8068 * bootstrap: Remove workaround for problem I encountered with
8069 gettext 0.14.1; it seems to be fixed now.
8070
8071 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
8072
8073 * NEWS: Version 2.0a.
8074
8075 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
8076 the previous change.
8077
8078 Various maintainer cleanups.
8079 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
8080 conftest*, for benefit of CVS commands run at the same time as
8081 "configure". Add build-aux, since "bootstrap" now creates it and
8082 its subfiles.
8083 * Makefile.cfg (move_if_change): Remove.
8084 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
8085 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
8086 (po_repo, do-po-update, po-update, wget_files, get-targets):
8087 (config.guess-url_prefix, config.sub-url_prefix):
8088 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
8089 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
8090 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
8091 Remove.
8092 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
8093 this is now the recommended name.
8094 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
8095 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
8096 ylwrap. These files now go into build-aux.
8097 * config/move-if-change: Remove.
8098 * config/prev-version.txt: Bump from 1.75 to 2.0.
8099
8100 * bootstrap: Add stdio-safer, unistd-safer modules.
8101 Remove m4/glibc2.m4 (introduced by latest gnulib, but
8102 we don't need it).
8103 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
8104 fopen-safer.c, stdio-safer.h, unistd-safer.h.
8105 * lib/subpipe.c: Include "unistd-safer.h".
8106 (create_subpipe): Make sure all the newly-created
8107 file descriptors are > 2, so that diagnostics don't
8108 get sent down them (which might cause Bison to hang, in theory).
8109 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
8110 * src/files.c (xfopen): Use fopen_safer, not fopen.
8111
8112 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
8113 yesterday's yacc.c fix.
8114
8115 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
8116
8117 * data/glr.c, data/lalr1.cc: Update copyright date.
8118
8119 Fix a destructor bug reported by Wolfgang Spraul in
8120 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
8121 * data/yacc.c (yyabortlab): Don't call destructor, and
8122 don't set yychar to EMPTY.
8123 (yyoverflowlab): Don't call destructor.
8124 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
8125 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
8126 since we no longer output the message "discarding lookahead token
8127 end of input ()".
8128
8129 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8130
8131 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
8132 fix a small glitch in debugging output.
8133 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
8134 after YY_SYMBOL_PRINT where needed.
8135
8136 (struct yyGLRState): Add some comments.
8137 (struct yySemanticOption): Add some comments.
8138 (union yyGLRStackItem): Add comment.
8139
8140 (yymergeOptionSets): Correct this to properly perform the union,
8141 avoiding infinite reported by Michael Rosien.
8142 Update comment.
8143
8144 * tests/glr-regression.at: Add test for GLR merging error reported
8145 by M. Rosien.
8146
8147 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
8148
8149 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
8150 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
8151 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
8152 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
8153 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
8154 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
8155 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
8156 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
8157 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
8158 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
8159 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
8160 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
8161 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
8162 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
8163 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
8164 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
8165 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
8166 src/derives.h, src/files.c, src/files.h, src/getargs.c,
8167 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
8168 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
8169 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
8170 src/output.h, src/parse-gram.c, src/parse-gram.h,
8171 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
8172 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
8173 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
8174 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
8175 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
8176 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
8177 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
8178 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
8179 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
8180 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
8181 tests/reduce.at, tests/regression.at, tests/sets.at,
8182 tests/synclines.at, tests/testsuite.at, tests/torture.at:
8183 Update FSF postal mail address.
8184
8185 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
8186
8187 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
8188 Problem reported by Ralf Menzel.
8189
8190 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
8191
8192 * tests/actions.at: Test that stack overflow invokes destructors.
8193 From Marcus Holland-Moritz.
8194 * data/yacc.c (yyerrlab): Move the code that destroys the stack
8195 from here....
8196 (yyreturn): to here. That way, destructors are called properly
8197 even if the stack overflows, or the user calls YYACCEPT or
8198 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
8199 (yyoverflowlab): Destroy the lookahead.
8200
8201 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
8202
8203 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
8204
8205 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
8206
8207 * NEWS: Bison-generated C parsers no longer quote literal strings
8208 associated with tokens.
8209 * src/output.c (prepare_symbols): Don't escape strings,
8210 since users don't want to see C escapes.
8211 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
8212 in diagnostics.
8213 * tests/input.at (Torturing the Scanner): Likewise.
8214 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
8215
8216 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
8217
8218 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
8219 the data size is known to be too small and we can't increase it.
8220 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
8221
8222 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
8223
8224 * src/parse-gram.y: Include quotearg.h.
8225 (string_as_id): Quote $1 before using it as a key, since the
8226 lexer no longer quotes it for us.
8227 (string_content): Don't strip quotes, since lexer no longer
8228 quotes it for us.
8229 * src/scan-gram.l: Include quotearg.h.
8230 ("\""): Omit quote.
8231 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
8232 a key, since the rest of the lexer doesn't quote it.
8233 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
8234 * tests/regression.at (Token definitions): Check for backslashes
8235 in token strings.
8236
8237 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
8238 (YYSIZE_T): Define to unsigned long int when using an older compiler.
8239 (yyparse): Revamp code to generate long syntax error message, to
8240 make it easier to translate, and to avoid problems with arithmetic
8241 overflow. Change "virtual memory" to "memory" in diagnostic, since
8242 we don't know whether the memory is virtual.
8243
8244 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
8245
8246 * NEWS: Bison-generated C parsers now use the _ macro to
8247 translate strings.
8248 * data/yacc.c (_) [!defined _]: New macro.
8249 All English strings wrapped inside this macro.
8250 * doc/bison.texinfo (Bison Parser): Document _.
8251 * po/POTFILES.in: Include src/parse-gram.c, since it now
8252 includes translateable strings that parse-gram.y doesn't.
8253
8254 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
8255
8256 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
8257 reverting the 2004-10-11 change to this function.
8258 (symbol_check_alias_consistency): Don't call symbol_type_set
8259 if the type name is already correct.
8260 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
8261
8262 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
8263
8264 * tests/regression.at (Token definitions): Don't use a token named
8265 c, as that generates a "#define c ..." that runs afoul of buggy
8266 stdlib.h that uses the identifier c as a member of struct
8267 drand48_data. Problem reported by Horst Wente.
8268
8269 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
8270
8271 * bootstrap: Change translation URL from
8272 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
8273 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
8274 redirection glitches. Problem reported by twlevo@xs4all.nl.
8275
8276 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
8277
8278 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
8279 after operands; POSIX says this isn't portable for the c99 command.
8280
8281 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
8282
8283 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
8284 immediately if a data overrun has occurred; this may help us track
8285 down what may be a spurious failure on MacOS.
8286
8287 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
8288
8289 Respond to problems reported by twlevo@xs4all.nl.
8290
8291 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
8292
8293 * src/vcg.h: Comment fix.
8294 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
8295 (G_CMAX): Change to -1 instead of INT_MAX.
8296
8297 * data/yacc.c (yyparse): Omit spaces before #line.
8298
8299 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
8300
8301 * src/tables.c (state_number_to_vector_number): Put it inside an
8302 "#if 0", since it's not currently used. Problem reported by
8303 Roland McGrath.
8304
8305 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
8306
8307 * src/output.c (escaped_output): Renamed from
8308 escaped_file_name_output, since we now use it for symbol tags as
8309 well. All uses changed.
8310 (symbol_destructors_output, symbol_printers_output):
8311 Escape symbol tags too.
8312 Problem reported by Matyas Forstner in
8313 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
8314
8315 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
8316 not needed.
8317 * src/output.c (user_actions_output, token_definitions_output,
8318 symbol_destructors_output, symbol_printers_output): Likewise.
8319 * src/reader.c (prologue_augment): Likewise.
8320 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
8321
8322 * src/vcg.c (output_edge): Don't quote linestyle arg.
8323 Problem reported by twlevo@xs4all.nl.
8324
8325 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
8326
8327 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
8328 example, reported by Derek M Jones. Also, make the example even
8329 more outrageous, to better illustrate how bad the problem is.
8330
8331 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
8332
8333 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
8334 putsym. Typo reported by Sebastian Piping.
8335
8336 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
8337
8338 * doc/bison.texinfo (Language and Grammar): some -> same
8339 (Epilogue): int he -> in the
8340 Typos reported by Sebastian Piping via Justin Pence.
8341
8342 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
8343
8344 * tests/glr-regression.at (Improper handling of embedded actions
8345 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
8346 embedded actions and $-N in GLR parsers", work around an Autoconf bug
8347 with dollar signs in test names.
8348 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
8349 for a similar reason.
8350
8351 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
8352
8353 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
8354 wants to redefine G_VIEW.
8355
8356 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
8357
8358 * src/vcg.c (get_view_str): Remove case for normal_view.
8359 Problem reported by twlevo@xs4all.nl.
8360
8361 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
8362
8363 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
8364 Problem reported by twlevo@xs4all.nl.
8365
8366 * doc/bison.texinfo: Change @dircategory from "GNU programming
8367 tools" to "Software development". Requested by Richard Stallman
8368 via Karl Berry.
8369
8370 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
8371
8372 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
8373 Problem reported by twlevo@xs4all.nl.
8374
8375 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
8376
8377 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
8378 keyword; it's not needed with modern compilers, and it doesn't
8379 affect correctness with older compilers. Suggested by
8380 twlevo@xs4all.nl.
8381
8382 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
8383
8384 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
8385 gcc -Wswitch-default.
8386 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
8387 * data/yacc.c (yyparse): Likewise.
8388
8389 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
8390
8391 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
8392 already. Let config.h define any nonstandard values.
8393
8394 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
8395
8396 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
8397 for the benefit of slower hosts. Problem reported by
8398 Nelson H. F. Beebe.
8399
8400 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
8401
8402 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
8403 being defined and not used.
8404 * data/lalr1.cc (yyparse): Likewise.
8405 Use "if (false)" rather than "if (0)".
8406
8407 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
8408
8409 * TODO: Mention that we should allow NUL bytes in tokens.
8410
8411 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
8412
8413 * src/scan-skel.l (<<EOF>>): Don't close standard output.
8414 Problem reported by Hans Aberg.
8415
8416 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
8417
8418 * src/getargs.c (version): Happy new year; update overall
8419 program copyright date from 2004 to 2005.
8420
8421 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
8422 Problem reported by Hans Aberg.
8423 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
8424 (Output file names.): Add a test for the case when standard output
8425 is closed.
8426
8427 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
8428
8429 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
8430 to fix an oversight in the Bison 2.0 manual.
8431
8432 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
8433
8434 * NEWS: Version 2.0. Reformat the existing news items since
8435 1.875, so that related items are grouped together.
8436 * configure.ac (AC_INIT): Bump version to 2.0.
8437 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
8438
8439 * tests/torture.at (Exploding the Stack Size with Alloca): Set
8440 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
8441 otherwise, we're not testing alloca. Unfortunately there's no
8442 simple way to consult HAVE_ALLOCA here.
8443
8444 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
8445 for yymsg, too.
8446
8447 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
8448 hand. This avoids a warning about comparing int to size_t when
8449 GCC warnings are enabled.
8450
8451 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
8452
8453 * NEWS: Bison-generated parsers no longer default to using the
8454 alloca function (when available) to extend the parser stack, due
8455 to widespread problems in unchecked stack-overflow detection.
8456 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
8457 responsibility to set it to a positive value. This lets the user
8458 specify a value that is not a preprocessor constant.
8459 * data/yacc.c (YYMAXDEPTH): Likewise.
8460 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
8461 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
8462 to be a compile-time constant. However, explain the constraints on it.
8463 Also, explain the constraints on YYINITDEPTH.
8464 (Table of Symbols): Explain that alloca is no longer the default.
8465 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
8466 to 1.
8467
8468 * doc/bison.texinfo (Location Default Action): Mention that n must
8469 be zero when k is zero. Suggested by Frank Heckenbach.
8470
8471 2004-12-22 Akim Demaille <akim@epita.fr>
8472
8473 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
8474 (parser::state_type, parser::semantic_type, parser::location_type):
8475 Private, not public.
8476 (parser::parse): Return ints, not bool.
8477 Returning a bool introduces a problem: 0 corresponds to false, and
8478 it seems weird to return false on success. Returning true changes
8479 the conventions for yyparse.
8480 Alternatively we could return void and send an exception.
8481 There is no clear consensus (yet?).
8482 (state_stack, semantic_stack, location_stack): Rename as...
8483 (state_stack_type, semantic_stack_type, location_stack_type): these.
8484 Private, not public.
8485 * tests/c++.at: New.
8486 * tests/testsuite.at, tests/Makefile.am: Adjust.
8487
8488 2004-12-21 Akim Demaille <akim@epita.fr>
8489
8490 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
8491
8492 2004-12-21 Akim Demaille <akim@epita.fr>
8493
8494 Don't impose std::string for filenames.
8495
8496 * data/lalr1.cc (b4_filename_type): New.
8497 (position::filename): Use it.
8498 (parser.hh): Move the inclusion of stack.hh and location.hh below
8499 the user code, so that needed headers for the filename type can be
8500 included first.
8501 Forward declare them before the user code.
8502 * tests/Makefile.am (check-local, installcheck-local): Pass
8503 TESTSUITEFLAGS to the TESTSUITE.
8504
8505 2004-12-20 Akim Demaille <akim@epita.fr>
8506
8507 Use more STL like names: my_class instead of MyClass.
8508
8509 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
8510 (SemanticStack, SemanticType, StateStack, StateType)
8511 (TokenNumberType, Stack, Slice, Traits, Parser::location)
8512 (Parser::value): Rename as...
8513 (location_stack, location_type, rhs_number_type, semantic_stack)
8514 (semantic_type, state_stack, state_type, token_number_type, stack)
8515 (slice, traits, parser::yylloc, parser::yylval): these.
8516
8517 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
8518
8519 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
8520
8521 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
8522 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8523
8524 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
8525
8526 Remove uses of 'short int' and 'unsigned short int'. This raises
8527 some arbitrary limits. It uses more memory but nowadays that's
8528 not much of an issue.
8529
8530 This change does not affect the generated parsers; that's a different
8531 task, as some users will want to conserve memory there.
8532
8533 Ideally we should use size_t to represent all object counts, and
8534 something like ptrdiff_t to represent signed differences of object
8535 counts; but that will require more code-cleanup than I have the
8536 time to do right now.
8537
8538 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
8539 Use size_t, not int or short int, to count objects.
8540 * src/closure.c (nritemset, closure): Likewise.
8541 * src/closure.h (nritemset, closure): Likewise.
8542 * src/nullable.c (nullable_compute): Likewise.
8543 * src/print.c (print_core): Likewise.
8544 * src/print_graph.c (print_core): Likewise.
8545 * src/state.c (state_compare, state_hash): Likewise.
8546 * src/state.h (struct state): Likewise.
8547 * src/tables.c (default_goto, goto_actions): Likewise.
8548
8549 * src/gram.h (rule_number, rule): Use int, not short int.
8550 * src/output.c (prepare_rules): Likewise.
8551 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
8552 errs, reductions): Likewise.
8553 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
8554 Likewise.
8555 * src/tables.c (vector_number, tally, action_number,
8556 ACTION_NUMBER_MINIMUM): Likewise.
8557 * src/output.c (muscle_insert_short_int_table): Remove.
8558
8559 2004-12-17 Akim Demaille <akim@epita.fr>
8560
8561 * data/lalr1.cc: Extensive Doxygenation.
8562 (error_): Rename as...
8563 (error): this, since it is visible to the user.
8564 Adjust callers.
8565 (Parser::message): Now an automatic variable from...
8566 (Parser::yyreport_syntax_error_): here.
8567 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
8568 Parser::error.
8569 * tests/input.at: Escape $.
8570
8571 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
8572
8573 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
8574 Parenthesize rhs to avoid obscure problems with mistakes like
8575 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
8576 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
8577 b4_rhs_location): Likewise.
8578 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
8579 b4_rhs_location): Likewise.
8580
8581 2004-12-16 Akim Demaille <akim@epita.fr>
8582
8583 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
8584 yacc.c: be sure to stay within yycheck_.
8585 * tests/actions.at: Re-enable C++ tests.
8586
8587 2004-12-16 Akim Demaille <akim@epita.fr>
8588
8589 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
8590 real.
8591
8592 2004-12-16 Akim Demaille <akim@epita.fr>
8593
8594 Use #define to handle the %name-prefix.
8595
8596 * data/glr.c, data/yacc.c: Comment changes.
8597 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
8598 so that one can refer to yylex in the parser file, and have it
8599 renamed, as is the case with other skeletons.
8600
8601 2004-12-16 Akim Demaille <akim@epita.fr>
8602
8603 Move lalr1.cc internals into yy*.
8604
8605 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
8606 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
8607 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
8608 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
8609 (empty_, final_, terror_, errcode_, ntokens_)
8610 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
8611 (looka_, ilooka_, error_range_, nerrs_):
8612 Rename as...
8613 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
8614 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
8615 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
8616 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
8617 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
8618 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
8619 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
8620 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
8621 these.
8622
8623 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
8624
8625 Fix some problems reported by twlevo at xs4all.
8626 * src/symtab.c (symbol_new): Report an error if the input grammar
8627 contains too many symbols. This is better than calling abort() later.
8628 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
8629 (struct node, struct graph):
8630 Rename member expand to stretch. All uses changed.
8631 (struct graph): Remove member layoutalgorithm. All uses removed.
8632 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
8633 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
8634 All uses changed.
8635 (N_STRETCH): Rename from N_EXPAND. All uses changed.
8636
8637 2004-12-15 Akim Demaille <akim@epita.fr>
8638
8639 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
8640 Add more Doxygen comments.
8641 (symprint_, stack_print_, reduce_print_, destruct_, pop)
8642 (report_syntax_error_, translate_): Rename as...
8643 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
8644 (yypop_, yyreport_syntax_error_, yytranslate_): this.
8645
8646 2004-12-15 Akim Demaille <akim@epita.fr>
8647
8648 * data/lalr1.cc (lex_): Rename as...
8649 (yylex_): this.
8650 Move the trace here.
8651 Take the %name-prefix into account.
8652 Reported by Alexandre Duret-Lutz.
8653
8654 2004-12-15 Akim Demaille <akim@epita.fr>
8655
8656 Simplify the C++ parser constructor.
8657
8658 * data/lalr1.cc (debug_): Rename as...
8659 (yydebug_): so that the parser's internals are always in the yy*
8660 pseudo namespace.
8661 Adjust uses.
8662 (b4_parse_param_decl): Remove the leading comma as it is now only
8663 called as unique argument list.
8664 (Parser::Parser): Remove the constructor accepting a location and
8665 an initial debugging level.
8666 Remove from the other ctor the argument for the debugging level.
8667 (debug_level_type, debug_level, set_debug_level): New.
8668
8669 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
8670 constructor calls.
8671
8672 2004-12-15 Akim Demaille <akim@epita.fr>
8673
8674 Remove b4_root related material: failure experiment
8675 (which goal was to allow to derive from a class).
8676
8677 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
8678 definitions and uses.
8679
8680 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
8681
8682 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
8683 not 2, since it's not portable to subtract 1 from the start of an
8684 array. The new item 0 is never set or used. All uses changed.
8685
8686 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
8687 the default definition of YYLLOC_DEFAULT. Problem reported
8688 by Frank Heckenbach.
8689
8690 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
8691
8692 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
8693 the normal case and one for the error case. Just use the
8694 first one uniformly. Problem reported by Frank Heckenbach.
8695 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
8696 use exactly the same macro in both places.
8697 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
8698 so that the normal-case YYRHSLOC works for the error case too.
8699 All uses changed.
8700 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
8701 (YYLLOC_DEFAULT): Use the same macro as glr.c.
8702 * doc/bison.texinfo (Location Default Action): Don't claim that
8703 we have an array of locations. Use the same macro for both glr
8704 and lalr parsers. Mention YYRHSLOC. Mention what happens when
8705 the index is 0.
8706
8707 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
8708
8709 * HACKING: Update email addresses to send announcements to.
8710
8711 * configure.ac (AC_INIT): Bump version to 1.875f.
8712
8713 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
8714
8715 * NEWS: Version 1.875e.
8716 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
8717
8718 * src/scan-skel.l: Include "complain.h", for "fatal".
8719
8720 * src/relation.h (relation_print, relation_digraph):
8721 Relation sizes are of type relation_node, not size_t (this is
8722 merely a doc fix, since the two types are equivalent).
8723 (relation_transpose): Relation sizes are of type relation_node,
8724 not int.
8725 * src/relation.c: Likewise.
8726 (top, infinity): Now of type relation_node, not int.
8727 (traverse, relation_transpose): Use relation_node, not int.
8728
8729 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
8730 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
8731 (yyparse): Remove unused local introduced in 2004-10-25 patch.
8732
8733 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
8734 specifying whether the test should be skipped. Use it tp
8735 specify that the [%defines %skeleton "lalr1.cc"] tests currently
8736 fail on some hosts, and should be skipped.
8737
8738 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
8739
8740 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
8741 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
8742 unless otherwise specified below.
8743
8744 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
8745 to allocate kernel_base, kernel_items, kernel_size, since
8746 they needn't be initialized to 0.
8747 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
8748 * src/closure.c (new_closure): Likewise, for itemset.
8749 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
8750 * src/lalr.c (set_goto_map): Likewise, for temp_map.
8751 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
8752 (build_relations): Likewise for edge, states1, includes.
8753 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
8754 * src/reader.c (packgram): Likewise, for ritem, rules.
8755 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
8756 * src/relation.c (relation_digraph): Likewise for VERTICES.
8757 (relation_transpose): Likewise for new_R, end_R.
8758 * src/symtab.c (symbols_token_translations_init): Likewise for
8759 token_translations.
8760 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
8761 (token_actions): Likewise for yydefact, actrow, conflrow,
8762 conflict_list.
8763 (save_column): Likewise for froms[symno], tos[symno].
8764 (goto_actions): Likewise for state_count.
8765 (pack_table): Likewise for base, pos, check.
8766 (tables_generate): Likewise for width.
8767
8768 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
8769 for initial core. Just have a separate core, so we needn't worry
8770 about whether kernel_size and kernel_base are initialized.
8771
8772 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
8773 kernel_size, kernel_items): Remove unnecessary initialization.
8774 * src/conflicts.c (conflicts): Likewise.
8775 * src/derives.c (derives): Likewise.
8776 * src/muscle_tablc (muscle_insert): Likewise.
8777 * src/relation.c (relation_digraph): Likewise.
8778 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
8779 conflrow, conflict_table, conflict_list, table, check):
8780 Likewise.
8781
8782 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
8783 This is because all callers pass unsigned int.
8784 * src/closure.h (new_closure): Likewise.
8785
8786 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
8787 (build_relations): Initialize includes[i] in all cases.
8788 * src/reader.c (packgram): Always initialize rules[ruleno].prec
8789 and rules[ruleno].precsym. Initialize members in order.
8790 * src/relation.c (relation_transpose): Always initialize new_R[i]
8791 and end_R[i].
8792 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
8793
8794 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
8795 conflict_list[0] was always 0, but now it isn't initialized.
8796
8797 * src/table.c (table_grow): When conflict_table grew, the grown
8798 area wasn't cleared. Fix this.
8799
8800 * lib/.cvsignore: Add strdup.c, strdup.h.
8801 * m4/.cvsignore: Add strdup.m4.
8802
8803 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
8804
8805 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
8806 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
8807 GOTO_NUMBER_MAXIMUM, since we occasionally compute
8808 ngotos + 1 without checking for overflow.
8809 (build_relations): Use END_NODE, not -1, to denote end of edges.
8810 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
8811 build_relations): Use goto_number, not int, for goto numbers.
8812 * src/tables.c (save_column, default_goto): Likewise.
8813
8814 2004-11-23 Akim Demaille <akim@epita.fr>
8815
8816 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
8817 of #defining from yystype.
8818 Don't typedef yystype, C++ does not need it.
8819 This lets it possible to forward declare it as union.
8820
8821 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
8822
8823 * bootstrap (gnulib_modules): Add extensions.
8824 Problem reported by Jim Meyering.
8825
8826 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
8827
8828 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
8829 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
8830 src/system.h, src/tables.c: XFREE -> free, to accommodate
8831 recent change to gnulib xalloc.h.
8832 Problem reported by Jim Meyering.
8833
8834 2004-11-17 Akim Demaille <akim@epita.fr>
8835
8836 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
8837
8838 2004-11-17 Akim Demaille <akim@epita.fr>,
8839 Alexandre Duret-Lutz <adl@gnu.org>
8840
8841 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
8842 changes.
8843 (YYCDEBUG): Adjust.
8844 Use it instead of cdebug_.
8845 (Parser::debug_stream, Parser::set_debug_stream): New.
8846 (Parser::symprint_): Define cdebug_ for temporary backward
8847 compatibility.
8848 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
8849 debug_stream ().
8850
8851 2004-11-17 Akim Demaille <akim@epita.fr>
8852
8853 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
8854 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
8855 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
8856 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
8857
8858 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
8859
8860 * data/glr.c (yyloc_default): Remove; not used.
8861 Problem reported by Frank Heckenbach.
8862
8863 2004-10-25 Akim Demaille <akim@epita.fr>
8864
8865 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
8866 Introduce another definition to address simple location arrays.
8867 (yyGLRStack): New member: yyerror_range.
8868 (yyrecoverSyntaxError, yyparse): Update it.
8869 (yyrecoverSyntaxError): Use it when shifting the error token to
8870 have an accurate range, equivalent to the one computed by both
8871 yacc.c and lalr1.cc.
8872 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
8873 that column numbers start at column 0, as per GNU Coding
8874 Standards, the others tests, and the doc.
8875 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
8876 Adjust to the above change (first column is 0).
8877 And adjust the location of the "<error>", now covering the whole
8878 line.
8879
8880 2004-10-22 Akim Demaille <akim@epita.fr>
8881 and Paul Eggert <eggert@cs.ucla.edu>
8882
8883 Remove some arbitrary limits on goto numbers and relations.
8884 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
8885 initial values, since they're never used.
8886 (set_goto_map): ngotos is now unsigned, so test for overflow
8887 by seeing whether it wraps around to zero.
8888 * src/lalr.h (goto_number): Now size_t, not short int.
8889 (GOTO_NUMBER_MAXIMUM): Remove.
8890 * src/relation.c (relation_print, traverse, relation_transpose):
8891 Check for END_NODE rather than looking at sign.
8892 * src/relation.h (END_NODE): New macro.
8893 (relation_node): Now size_t, not short int.
8894
8895 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
8896
8897 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
8898 keyword, not an identifier. Problem reported by Baron Schwartz in
8899 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
8900
8901 2004-10-11 Akim Demaille <akim@epita.fr>
8902
8903 * src/symtab.c (symbol_check_alias_consistency): Also check
8904 type names, destructors, and printers.
8905 Reported by Alexandre Duret-Lutz.
8906 Recode the handling of associativity and precedence in terms
8907 of symbol_precedence_set.
8908 Accept no redeclaration at all, not even equal to the previous
8909 value.
8910 (redeclaration): New.
8911 Use it to factor redeclaration complaints.
8912 (symbol_make_alias): Don't set the type of the alias, let
8913 symbol_check_alias_consistency do it as for other features.
8914 * src/symtab.h (symbol): Add new member prec_location, and
8915 type_location.
8916 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
8917 * tests/input.at (Incompatible Aliases): New.
8918
8919 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
8920
8921 .cvsignore fixes to accommodate gnulib changes,
8922 and the practice of naming build directories "_build".
8923 * .cvsignore: Add "_*". Sort.
8924 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
8925 * m4/.cvsignore: Add "*_gl.m4".
8926
8927 2004-10-06 Akim Demaille <akim@epita.fr>
8928
8929 * src/parse-gram.y (add_param): Fix the truncation of trailing
8930 spaces.
8931
8932 2004-10-05 Akim Demaille <akim@epita.fr>
8933
8934 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
8935 whether the reducion was empty or not. This leaves room to
8936 improve the use of YYLLOC_DEFAULT in such a case.
8937 lalr1.cc is still experimental, so changing this is acceptable.
8938 And finally, there are probably not many users who changed the
8939 handling of locations in GLR, so changing is admissible too.
8940
8941 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
8942 empty reduction, set @$ to an empty location ending the previously
8943 stacked symbol.
8944 Adjust uses to make sure the code is triggered on empty
8945 reductions.
8946 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
8947 expected output: empty reductions have empty locations.
8948
8949 2004-09-29 Akim Demaille <akim@epita.fr>
8950
8951 * data/lalr1.cc: Move towards a more standard C++ coding style
8952 for templates: Class < T > -> Class<T>.
8953
8954 2004-09-29 Akim Demaille <akim@epita.fr>
8955
8956 * data/lalr1.cc: Reinstall the former ctor, for sake of
8957 compatibility, but warn it will be removed.
8958 Move towards a more standard C++ coding style (i.e., type *var ->
8959 type* var).
8960
8961 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
8962
8963 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
8964 since it's less likely to work if NULs are involved in the future.
8965
8966 2004-09-27 Akim Demaille <akim@epita.fr>
8967
8968 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
8969
8970 2004-09-27 Akim Demaille <akim@epita.fr>
8971
8972 * data/lalr1.cc (b4_parse_param_decl_1): New.
8973 (b4_parse_param_decl): Use it to have different names between attribute
8974 and argument names.
8975 (b4_cc_constructor_call): Likewise.
8976
8977 2004-09-24 Akim Demaille <akim@epita.fr>
8978
8979 * src/parse-gram.y (add_param): Strip the leading and trailing
8980 blanks from a formal argument declaration.
8981 (YY_LOCATION_PRINT): New.
8982
8983 2004-09-24 Akim Demaille <akim@epita.fr>
8984
8985 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
8986 after the location.
8987
8988 2004-09-24 Akim Demaille <akim@epita.fr>
8989
8990 * doc/bison.texinfo (Table of Symbols): Sort.
8991
8992 2004-09-21 Akim Demaille <akim@epita.fr>
8993
8994 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
8995 the useless parentheses.
8996 Suggested by Paul Eggert.
8997
8998 2004-09-20 Akim Demaille <akim@epita.fr>
8999
9000 Let the initial-action act on the look-ahead, and use it for the
9001 "initial push" (corresponding to an hypothetical beginning-of-file).
9002 And let lalr1.cc honor %initial-action.
9003
9004 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
9005 example.
9006 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
9007 (Parser::Parser): Remove the ctor that used to initialize it.
9008 (Parser::parse): Like in the other skeletons, issue the "starting
9009 parse" message before any action.
9010 Honor %initial-action.
9011 Initialize the stacks with the lookahead.
9012 * data/yacc.c: Let $$ and @$ in %initial-action designate the
9013 look-ahead.
9014 Push them in the stacks.
9015 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
9016
9017 2004-09-20 Akim Demaille <akim@epita.fr>
9018
9019 * doc/bison.texinfo (Initial Action Decl): New.
9020
9021 2004-09-20 Akim Demaille <akim@epita.fr>
9022
9023 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
9024 clearer criterion to define it.
9025 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
9026 When reducing on an empty RHS, use the latest stacked location as
9027 location.
9028 yylloc is not always available.
9029 * data/glr.c: Likewise.
9030 Also, honor initial-actions.
9031
9032 2004-09-20 Akim Demaille <akim@epita.fr>
9033
9034 * data/yacc.c (YY_LOCATION_PRINT): New.
9035 Define when we know YYLTYPE's structure, i.e., when the default
9036 YYLLOC_DEFAULT is used.
9037 * data/c.m4 (b4_yysymprint_generate): Use it.
9038 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
9039 value of the result.
9040 (error_start_): Replace with...
9041 (error_range_): this location array.
9042 This allows to replace code relying on the implementation of
9043 locations by portable code.
9044 * data/yacc.c (yylerrsp): Replace with...
9045 (yyerror_range): this.
9046 Every time a token is popped, update yyerror_range[0], to have an
9047 accurate location for the error token.
9048 * data/glr.c (YY_LOCATION_PRINT): New.
9049 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
9050 deference a pointer.
9051 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
9052 report the location in %printers.
9053
9054 * src/scan-skel.l: Instead of abort, report error messages to ease
9055 understanding skeleton scanning failures.
9056
9057 2004-09-16 Akim Demaille <akim@epita.fr>
9058
9059 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
9060 (iterator, const_iterator): these, to be more in the C++ spirit.
9061 Also, return reverse iterators so that when displaying the stack
9062 we display its bottom first.
9063 (Parser::stack_print_, Parser::reduce_print_): Match the messages
9064 from yacc.c.
9065 We should probably use vector here though.
9066
9067 2004-09-16 Akim Demaille <akim@epita.fr>
9068
9069 Have more complete shift traces.
9070
9071 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
9072 to report Shifts instead of ad hoc YYDPRINTF invocations,
9073 including for the error token.
9074 * data/lalr1.cc (symprint_): Output the location.
9075 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
9076 output the location within the %printer.
9077 Activate GLR tests, at least to make sure they compile properly.
9078 They still don't pass though.
9079 * tests/calc.at: Adjust expect verbose output, since now "Entering
9080 state..." is on a different line than the "Shifting" message.
9081
9082 2004-09-08 Akim Demaille <akim@epita.fr>
9083
9084 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
9085 Bison directive from the Bison file to the invocation of this
9086 macro, so that these directives are passed to
9087 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
9088 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
9089 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
9090 the extra Bison directives instead of the whole series.
9091 Change the grammar so that there are recoverable errors, and
9092 unrecoverable errors. Now we can have the parser give up before
9093 consuming the whole input. As a result we now can observe that
9094 the lookahead is freed when needed.
9095 Change the parser source to parse argv[1] instead of a hard coded
9096 string.
9097 Simplify yylex, and give a value and location to EOF.
9098 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
9099 passed directives already coded in the file.
9100 Add some tests to check the location of "error".
9101 For some tests, the C++ parser is correct, and not yacc.c.
9102 For other tests, they provide different, but unsatisfying, values,
9103 so keep the C++ value so that at least one parser is "correct"
9104 according to the test suite.
9105 (Actions after errors): Remove, this is subsumed by the
9106 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
9107
9108 2004-09-06 Akim Demaille <akim@epita.fr>
9109
9110 * data/lalr1.cc: Adjust the indentation of the labels.
9111 (Parser::pop): New.
9112 Use it.
9113
9114 2004-09-06 Akim Demaille <akim@epita.fr>
9115
9116 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
9117 argument, an informative message.
9118 Call YY_SYMBOL_PRINT.
9119 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
9120 * data/lalr1.cc (destruct_): Likewise.
9121 In addition, no longer depend on b4_yysymprint_generate and
9122 b4_yydestruct_generate to generate these functions, do it "by
9123 hand".
9124
9125 2004-09-03 Akim Demaille <akim@epita.fr>
9126
9127 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
9128 invoked, yydestruct the lookahead.
9129 * tests/calc.at (Calculator $1): Update the expected lengths of
9130 traces: there is an added line for the discarded lookahead.
9131 * doc/bison.texinfo (Destructor Decl): Some rewording.
9132 Define "discarded" symbols.
9133
9134 2004-09-02 Akim Demaille <akim@epita.fr>
9135
9136 * data/lalr1.cc (translate_, destruct_): No reason to be static.
9137
9138 2004-09-02 Akim Demaille <akim@epita.fr>
9139
9140 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
9141 (YYDSYMPRINTF): Rename as...
9142 (YY_SYMBOL_PRINT): this.
9143 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
9144 two.
9145 Use it instead of direct symprint_ calls.
9146 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
9147 one.
9148
9149 2004-09-02 Akim Demaille <akim@epita.fr>
9150
9151 * data/lalr1.cc (b4_yysymprint_generate): New.
9152 (symprint_): New member function, defined when YYDEBUG.
9153 Use it consistently instead of token/nterm debugging output by
9154 hand.
9155 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
9156 %printer calls to use cdebug_ when using lalr1.cc.
9157
9158 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
9159
9160 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
9161 with #ifdef YYDEBUG.
9162
9163 2004-08-26 Akim Demaille <akim@epita.fr>
9164
9165 * doc/bison.texinfo (Implementing Loops): Rename as...
9166 (Implementing Gotos/Loops): this.
9167
9168 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
9169
9170 Adjust to latest gnulib.
9171 * bootstrap (gnulib_modules): Add xalloc-die.
9172 Set LC_ALL=C so that file names sort consistently.
9173 Prefer the gnulib copies of gettext.m4, glibc21.m4,
9174 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
9175 uintmax_t.m4, ulonglong.m4.
9176 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
9177 po.m4 since we are now using _gl.m4 instead.
9178
9179 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
9180
9181 * src/scan-action.l: Remove. Scanning of semantic actions is
9182 handled in scan-gram.l.
9183
9184 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
9185
9186 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
9187
9188 * src/location.h (struct): The file member is a uniqstr.
9189 (equal_boundaries): Use UNIQSTR_EQ for comparison.
9190
9191 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
9192
9193 Fix bug with non-%union parsers that have printers or destructors,
9194 which led to a Bison core dump. Reported by Peter Fales in
9195 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
9196
9197 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
9198 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
9199 not to our own type.
9200 * src/output.c (symbol_destructors_output, symbol_printers_output):
9201 Don't assume %union.
9202 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
9203 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
9204 UNION-FLAG. All callers changed.
9205 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
9206 Use type char, not unsigned int, when declaring an array of char;
9207 this lets us remove a cast.
9208 (Printers and Destructors): Add non-%union test cases.
9209
9210 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
9211
9212 * doc/bison.texinfo: Minor editorial changes, mostly to the new
9213 GLR writeups. E.g., avoid frenchspacing and the future tense,
9214 change "lookahead" to "look-ahead", and change "wrt" to "with
9215 respect to".
9216
9217 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9218
9219 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
9220 New sections, split off from the GLR Parsers section. Put the new
9221 Simple GLR Parser near the start of the GLR section, for clarity.
9222 Rewrite connective text.
9223
9224 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
9225
9226 * doc/bison.texinfo (Simple GLR Parsers): New section.
9227
9228 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
9229
9230 * NEWS, TODO, doc/bison.texinfo:
9231 Use "look-ahead" instead of "lookahead", to be consistent.
9232 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
9233 while we're fixing "look-ahead".
9234 * src/conflicts.c (shift_set): Renamed from shiftset.
9235 (look_ahead_set): Renamed from lookaheadset.
9236 * src/print.c: Likewise.
9237 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
9238 name for "lookahead".
9239 (report_types, usage): Likewise.
9240 * src/getargs.h (report_look_ahead_tokens): Renamed from
9241 report_lookaheads.
9242 * src/lalr.c (compute_look_ahead_tokens): Renamed from
9243 compute_lookaheads.
9244 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
9245 (look_ahead_tokens_print): Renamed from lookaheads_print.
9246 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
9247 state_rule_lookaheads_print.
9248 * src/state.h: Likewise.
9249 (reductions.look_ahead_tokens): Renamed from lookaheads.
9250 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
9251 AT_DATA_LOOKAHEADS_GRAMMAR.
9252
9253 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
9254
9255 * README: Update location of patched M4 distribution.
9256
9257 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
9258
9259 Don't assume the C++ compiler takes the same arguments as the C compiler
9260 (trivial change).
9261 * configure.ac (O0CXXFLAGS): New var.
9262 * tests/atlocal.in (CXXFLAGS): Use it.
9263
9264 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
9265
9266 Fix some "make check" problems with C++ reported by
9267 Albert Chin-A-Young for Tru64 C++ in this thread:
9268 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
9269
9270 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
9271 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9272 Output to a .cc file for C++, not to a .c file.
9273 * tests/calc.at (AT_CHECK_CALC): Likewise.
9274 * tests/regression.at (AT_CHECK_DANCER): Likewise.
9275 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
9276
9277 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
9278
9279 * tests/calc.at, tests/actions.at: Workaround for SGI
9280 C++ compiler. (trivial change)
9281
9282 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
9283
9284 Spent a few hours checking out which prerequisite versions the
9285 current sources actually require. I went all the way back to
9286 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
9287 a seemingly endless set of combinations of versions more recent
9288 than that. The bottom line is that the current sources require
9289 fairly recent versions of the build tools, and it'll be some work
9290 to change this.
9291 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
9292 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
9293 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
9294 Add comments explaining why those particular versions are
9295 currently needed.
9296
9297 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
9298 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
9299 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
9300
9301 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
9302 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
9303
9304 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
9305
9306 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
9307 0.11.5. Suggested by Bruno Haible.
9308 * bootstrap: Remove gettext version checking.
9309
9310 * doc/bison.texinfo (Decl Summary): Also mention that %union
9311 can depend on prerequisite types. Problem reported by Tim
9312 Van Holder.
9313
9314 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
9315
9316 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
9317 * README-alpha: Don't tell people not to package this.
9318
9319 * bootstrap: Don't assume $(...) works; use `...` instead.
9320 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
9321 gettext better.
9322
9323 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
9324 put into the -d output file, and mention what to do if YYSTYPE is
9325 defined as a macro.
9326
9327 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
9328
9329 Undo change made earlier today: it caused autopoint to not bring
9330 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
9331 autopoint's.
9332
9333 * bootstrap: Check that gettext version matches what's in
9334 configure.ac. Warn users to ignore robots.txt ERROR 404.
9335 * bootstrap: Undo today's earlier change (logged below).
9336 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
9337
9338 The gettext version checking is causing more trouble than it's
9339 curing; remove it. Problem reported by Paul Hilfinger.
9340
9341 * bootstrap: Issue a warning that one can expect a message
9342 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
9343 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
9344
9345 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
9346
9347 Ensure that the C++ compiler used for testing actually works on a
9348 simple test program; if not, skip the C++-related tests. Problem
9349 reported by Vin Shelton in:
9350 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
9351
9352 * m4/cxx.m4: New file.
9353 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
9354 * tests/atlocal.in (BISON_CXX_WORKS): Add.
9355 * tests/local.at (AT_COMPILE_CXX): Use it.
9356
9357 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
9358
9359 * data/glr.c (yylloc): Output this macro even if locations are not
9360 being generated, as the GLR parser needs it even in that case.
9361 Problem reported by Troy A. Johnson
9362 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
9363
9364 * configure.ac (AC_INIT): Update to 1.875e.
9365
9366 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
9367
9368 * NEWS: Version 1.875d.
9369 * configure.ac (AC_INIT): Likewise.
9370 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
9371
9372 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
9373 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
9374 lalr1.cc runs afoul of the first, and the last two are no longer
9375 supported by GCC 3.4.0.
9376 * README: Mention GNU m4 1.4 or later; mention m4 patches.
9377 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
9378
9379 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
9380
9381 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
9382 unsigned int, for compatibility with latest gnulib hash module.
9383 * src/state.c (state_hash, state_hasher): Likewise.
9384 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
9385 * src/uniqstr.c (hash_uniqstr): Likewise.
9386
9387 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
9388
9389 * NEWS: Unescaped newlines are no longer allowed in char & strings.
9390
9391 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
9392 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
9393 character and string literals.
9394 (unexpected_end): New function.
9395 (unexpected_eof): Use it.
9396 (unexpected_newline): New function.
9397 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
9398 actions.
9399
9400 * NEWS: Document %expect-rr.
9401
9402 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
9403 Fix typo by replacing $1 with $option.
9404 Remove more 'intl'-related files.
9405 Don't DEFUN AM_INTL_SUBDIR twice.
9406
9407 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
9408 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
9409 strtoul.c.
9410 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
9411 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
9412 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
9413 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
9414 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
9415 * src/.cvsignore: Add *.output.
9416
9417 * src/parse-gram.y: Put copyright notice inside %{ %} so it
9418 gets copied to the output file.
9419
9420 2004-04-28 Paul Eggert <eggert@twinsun.com>
9421
9422 Get files from the gnulib and po repositories, instead of relying
9423 on them being in our CVS. Upgrade to latest versions of gnulib
9424 and Automake.
9425
9426 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
9427 * bootstrap: Bootstrap from gnulib and po repositories.
9428 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
9429 * README-cvs: Document these changes. Remove version numbers from
9430 mentions of build tools, since they change so often. Mention Flex.
9431
9432 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
9433 (gl_USE_SYSTEM_EXTENSIONS): Add.
9434 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
9435 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
9436 does this for us.
9437 (AC_ISC_POSIX): Remove; we no longer support this
9438 ancient OS, as it gets in the way of latest Autoconf & gnulib.
9439 (AC_HEADER_STDC): Remove: we now assume C89 or better.
9440 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
9441 Do not check for C89 headers, except for locale.h which is used
9442 by the Yacc library and must port to K&R hosts.
9443 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
9444 Do not check for C89 functions, except for setlocale which is
9445 used by the Yacc library.
9446 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
9447 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
9448 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
9449 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
9450 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
9451 AM_GNU_GETTEXT): Remove; now done by:
9452 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
9453 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
9454 for us.
9455
9456 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
9457 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
9458 Define to empty, as gnulib.mk will do the rest for us.
9459 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
9460 for us.
9461 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
9462 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
9463
9464 * src/files.c: Include gnulib's xstrndup.h.
9465
9466 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
9467 (REALLOC): Use xnrealloc, for likewise.
9468 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
9469 (strnlen, memrchr): Remove decls; functions no longer used.
9470 Include <stpcpy.h>.
9471
9472 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
9473 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
9474 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
9475 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
9476 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
9477 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
9478 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
9479 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
9480 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
9481 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
9482 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
9483 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9484 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
9485 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
9486 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
9487 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
9488 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
9489 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
9490 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
9491 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
9492 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
9493 Remove, as these files are now generated automatically
9494 by bootstrap or automake.
9495
9496 * po/ChangeLog: Remove: all but one entry was a duplicate
9497 of this file, and I moved that 2000-11-02 entry here.
9498
9499 * config/.cvsignore: Add Makefile, depcomp, install-sh.
9500 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
9501 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
9502 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
9503 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
9504 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
9505 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
9506 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
9507 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
9508 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
9509 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
9510 xstrndup.h.
9511 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
9512 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
9513 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
9514 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
9515 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
9516 * src/.cvsignore: Remove *_.c.
9517
9518
9519 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
9520 support it. (The latest stable gzip doesn't.)
9521
9522 2004-04-27 Paul Eggert <eggert@twinsun.com>
9523
9524 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
9525 case, as stos_ is now used by destructors due to the 2004-02-09
9526 change.
9527
9528 Remove more K&R C support.
9529 * lib/libiberty.y (PARAMS): Remove. All uses removed.
9530 * lib/subpipe.c (errno): Remove decl.
9531 Include <stdlib.h> unconditionally.
9532 (EXIT_FAILURE): Remove macro.
9533 * src/complain.c (vfprintf, strerror): Remove.
9534 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
9535 unconditionally.
9536 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
9537 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
9538 (strchr, strspn, memchr): Remove decls.
9539 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
9540 unconditionally. Do not declare perror.
9541 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
9542 unconditionally.
9543
9544 * src/complain.c (_): Remove useless defn, as system.h defines this.
9545
9546 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
9547 with latest obstack.h.
9548 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
9549 to procedure types, as obstack.h now does that for us.
9550 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
9551
9552 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
9553 so that this include file can stand alone.
9554 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
9555 does this now. Include subpipe.h first after config.h, to
9556 test whether it can stand alone.
9557
9558 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
9559 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
9560 unused declaration.
9561
9562 * tests/synclines.at (%union synch line): Put a dummy member in
9563 the union, because empty unions aren't allowed in C. Caught
9564 by GCC 3.4.0.
9565
9566 2004-04-13 Jim Meyering <jim@meyering.net>
9567
9568 * src/conflicts.c (conflicts_print): Correct format string typo:
9569 use `%%' to produce literal `%'. (trivial change)
9570
9571 2004-03-30 Paul Eggert <eggert@twinsun.com>
9572
9573 * src/getargs.c (version): Update copyright year to 2004.
9574
9575 * data/c.m4 (b4_int_type): Use 'short int' rather than
9576 'short', and similarly for 'long', 'unsigned', etc.
9577 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
9578 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
9579 yy_yypstack, yydumpstack): Likewise.
9580 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
9581 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
9582 Likewise.
9583 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
9584 yy_stack_print, yyparse): Likewise.
9585 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
9586 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
9587 * lib/bitset.c (bitset_print): Likewise.
9588 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
9589 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9590 * lib/bitsetv.c (bitsetv_dump): Likewise.
9591 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
9592 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
9593 Likewise.
9594 * src/LR0.c (allocate_itemsets): Likewise.
9595 * src/gram.h (rule_number, rule): Likewise.
9596 * src/lalr.h (goto_number): Likewise.
9597 * src/nullable.c (nullable_compute): Likewise.
9598 * src/output.c (prepare_rules): Likewise.
9599 * src/relation.c (relation_print, relation_digraph): Likewise.
9600 * src/relation.h (relation_node): Likewise.
9601 * src/state.h (state_number, transitions, errs, reductions,
9602 struct state): Likewise.
9603 * src/symtab.h (symbol_number, struct symbol): Likewise.
9604 * src/tables.c (vector_number, tally, action_number,
9605 default_goto, goto_actions): Likewise.
9606 * tests/existing.at (GNU Cim Grammar): Likewise.
9607 * tests/regression.at (Web2c Actions): Likewise.
9608
9609 * src/output.c (muscle_insert_short_int_table): Renamed from
9610 muscle_insert_short_table. All uses changed.
9611
9612 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9613
9614 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
9615 (declaration): Replace expected_conflicts with expected_sr_conflicts.
9616 Add %expect-rr rule.
9617
9618 * src/scan-gram.l: Recognize %expect-rr.
9619
9620 * src/conflicts.h (expected_sr_conflicts): Rename from
9621 expected_conflicts.
9622 (expected_rr_conflicts): Declare.
9623
9624 * src/conflicts.c (expected_sr_conflicts): Rename from
9625 expected_conflicts.
9626 (expected_rr_conflicts): Define.
9627 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
9628 for GLR parsers.
9629 Use expected_sr_conflicts in place of expected_conflicts.
9630 Warn if expected_rr_conflicts used in non-GLR parser.
9631
9632 * doc/bison.texinfo: Add documentation for %expect-rr.
9633
9634 2004-03-08 Paul Eggert <eggert@gnu.org>
9635
9636 Add support for hex token numbers. Suggested by Odd Arild Olsen in
9637 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
9638
9639 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
9640 in lalr1.cc.
9641 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
9642 * src/scan-gram.l (scan_integer): New function.
9643 ({int}): Use it.
9644 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
9645 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
9646 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
9647 Say "long int", not "long", for uniformity with GNU style.
9648
9649 2004-02-25 Paul Eggert <eggert@twinsun.com>
9650
9651 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
9652 compilers. This fixes a problem with Intel's C++ compiler being
9653 chatty, reported by Guido Trentalancia in
9654 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
9655
9656 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
9657
9658 Support %destructor and merge error locations in lalr1.cc.
9659
9660 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
9661 (Parser::stos_): Define unconditionally.
9662 (Parser::destruct_): New method. Generate its body with
9663 b4_yydestruct_generate.
9664 (Parser::error_start_): New attribute.
9665 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
9666 token which are discarded.
9667 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
9668 error_start_ when erroneous token are discarded.
9669 (Parser::parse) <yyerrlab1>: Compute the location of the error
9670 token so that it covers all the discarded tokens.
9671 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
9672 it can be called with `%skeleton "lalr1.cc"', and do that.
9673
9674 2004-02-02 Paul Eggert <eggert@twinsun.com>
9675
9676 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
9677 $(top_srcdir)/lib and ../lib. This fixes a bug reported
9678 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
9679 There's no need to mention top_builddir since Automake does that
9680 for us.
9681 (INCLUDES): Remove, as Automake says it's obsolescent.
9682 Contents migrated into AM_CPPFLAGS as described above.
9683 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
9684
9685 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9686
9687 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
9688 (yyreportSyntaxError): Handle case where lookahead token is
9689 YYEMPTY.
9690
9691 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9692
9693 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
9694 resulting parsers are compilable with C++.
9695
9696 2003-12-23 Paul Eggert <eggert@twinsun.com>
9697
9698 * config/depcomp, config/install-sh: Sync with Automake 1.8.
9699 * src/output.c (output_skeleton): Rename local var.
9700 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
9701 Bison tokens, as this runs afoul of the 2003-10-07 change that
9702 disallowed NUL bytes in character constants or string literals.
9703
9704 * tests/local.at: Require Autoconf 2.59's Autotest.
9705 * tests/testsuite.at: Don't include local.at, since we now assume
9706 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
9707 including it.
9708 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
9709 multiple inclusion warnings.
9710
9711 2003-12-02 Akim Demaille <akim@epita.fr>
9712
9713 * doc/bison.texinfo (How Can I Reset the Parser): More about start
9714 conditions.
9715 From Bruno Haible.
9716
9717 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
9718
9719 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
9720
9721 2003-10-07 Paul Eggert <eggert@twinsun.com>
9722
9723 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
9724 if testsuite doesn't exist.
9725
9726 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
9727 literals, unfortunately.
9728 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
9729 Complain about NUL bytes in character constants or string literals.
9730
9731 2003-10-05 Paul Eggert <eggert@twinsun.com>
9732
9733 * NEWS: Don't document %no-default-prec, as it's still
9734 too experimental.
9735 * doc/bison.texinfo: Document %no-default-prec only if
9736 the defaultprec flag is set. Normally it's not.
9737
9738 2003-10-04 Paul Eggert <eggert@twinsun.com>
9739
9740 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
9741 non-modifiable lvalue, instead of a modifiable one.
9742 * doc/bison.texinfo (Actions): Document that $$ can
9743 be assigned to. Do not claim that $$ and $N are
9744 array element references: user code should not rely on this.
9745
9746 2003-10-01 Paul Eggert <eggert@twinsun.com>
9747
9748 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
9749 (grammar_declaration): Use it.
9750 * src/scan-gram.l: New token %no-default-prec.
9751 * tests/conflicts.at: Revamp tests to use %no-default-prec.
9752 * NEWS, doc/bison.texinfo: Document the above.
9753
9754 2003-10-01 Akim Demaille <akim@epita.fr>
9755
9756 VCG no longer supports long_straight_phase.
9757
9758 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
9759 * src/print_graph.c (print_graph): Adjust.
9760
9761 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
9762 and Paul Eggert <eggert@twinsun.com>
9763
9764 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
9765 Table of Symbols): Document %default-prec.
9766 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
9767 (grammar_declaration): Set default_prec on %default-prec.
9768 * src/scan-gram.l (%default-prec): New token.
9769 * src/reader.h (default_prec): New flag.
9770 * src/reader.c: Likewise.
9771 (packgram): Handle it.
9772 * tests/conflicts.at (%default-prec without %prec,
9773 %default-prec with %prec, %default-prec 1): New tests.
9774
9775 2003-09-30 Paul Eggert <eggert@twinsun.com>
9776
9777 * tests/testsuite.at: Include local.at, not input.at, fixing
9778 a typo in the 2003-08-25 patch.
9779
9780 2003-08-27 Akim Demaille <akim@epita.fr>
9781
9782 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
9783 GCC warnings.
9784
9785 2003-08-26 Akim Demaille <akim@epita.fr>
9786
9787 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
9788 "<\#" to avoid magic from Gnus when posting parts of this script.
9789
9790 2003-08-26 Akim Demaille <akim@epita.fr>
9791
9792 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
9793 (Parser::parse): here.
9794 Adjust: nerrs and errstatus is now replaced by...
9795 (Parser::nerrs_, Parser::errstatus_): New.
9796
9797 2003-08-25 Akim Demaille <akim@epita.fr>
9798
9799 * config/announce-gen, Makefile.cfg: New.
9800 * Makefile.am: Adjust.
9801 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
9802 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
9803
9804 2003-08-25 Akim Demaille <akim@epita.fr>
9805
9806 When reducing initial empty rules, Bison parser read an initial
9807 location that is not defined. This results in garbage, and that
9808 affects Bison's own parser. Therefore we need (i) to extend Bison
9809 to support a means to initialize this location, and (ii) to use
9810 this CVS Bison to fix CVS Bison's parser.
9811
9812 * src/reader.h, reader.c (epilogue_augment): Remove, replace
9813 with...
9814 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
9815 * src/parse-gram.y: Adjust.
9816 (%initial-action): New.
9817 (%error-verbose): Since we require CVS Bison, there is no reason
9818 not to use it.
9819 * src/scan-gram.l: Adjust.
9820 * src/Makefile.am (YACC): New, to make sure we use our own parser.
9821 * data/yacc.c (yyparse): Use b4_initial_action.
9822
9823 2003-08-25 Akim Demaille <akim@epita.fr>
9824
9825 * doc/bison.texinfo: Don't promote stdout for error messages.
9826
9827 2003-08-25 Akim Demaille <akim@epita.fr>
9828
9829 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
9830 From Alexandre Duret-Lutz.
9831
9832 2003-08-25 Akim Demaille <akim@epita.fr>
9833
9834 Version 1.875c.
9835
9836 2003-08-25 Akim Demaille <akim@epita.fr>
9837
9838 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
9839 Use them.
9840
9841 2003-08-25 Akim Demaille <akim@epita.fr>
9842
9843 * data/lalr1.cc (Parser::reduce_print_): New.
9844 Use it.
9845
9846 2003-08-25 Akim Demaille <akim@epita.fr>
9847
9848 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
9849 error recovery loops. This patch is based on
9850 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
9851 Also, augment the similarity between lalr1.cc and yacc.c.
9852 Note: the locations of error recovery rules are not correct yet.
9853
9854 * data/lalr1.cc: Comment changes to augment the similarity between
9855 lalr1.cc and yacc.c.
9856 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
9857 (yyerrlab1): Remove, but where it used to be (now the bottom part of
9858 yyerrlab), when hitting EOF, pop the whole stack here instead of
9859 merely falling thru the default error handling mechanism.
9860 (yyerrorlab): New label, with the old contents of YYERROR,
9861 plus the following change: pop the stack of rhs corresponding
9862 to the production that invoked YYERROR. That is how Yacc
9863 behaves (required by POSIX).
9864 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
9865 fail.
9866
9867 2003-08-25 Akim Demaille <akim@epita.fr>
9868
9869 Tune local.at so that people can "autom4te -l autotest calc.at -o
9870 calc" for instance, to extract a sub test suite.
9871
9872 * tests/testsuite.at: Move the initialization, Autotest version
9873 requirement, and AT_TESTED invocation into...
9874 * tests/local.at: here.
9875 * tests/testsuite.at: Include it for compatibility with Autoconf
9876 2.57.
9877 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
9878 be ignore.
9879
9880 2003-08-04 Paul Eggert <eggert@twinsun.com>
9881
9882 Rework code slightly to avoid gcc -Wtraditional warnings.
9883 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
9884 The returned value is now stored in *YY0. All callers changed.
9885 * src/output.c (merge_output): Adjust to the above change.
9886
9887 2003-07-26 Paul Eggert <eggert@twinsun.com>
9888
9889 * data/glr.c (YYASSERT): New macro.
9890 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
9891 yyresolveStates, yyprocessOneStack):
9892 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
9893 Derived from a suggestion by Frank Heckenbach.
9894
9895 2003-07-25 Paul Eggert <eggert@twinsun.com>
9896
9897 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
9898 for portability to K&R C (after ansi2knr, presumably). See
9899 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
9900 by Frank Heckenbach, though I have omitted the structure-initialization
9901 part of his glr-knr.diff patch since I recall that the Portable
9902 C Compiler didn't require that change.
9903
9904 Let the user specify how to allocate and free memory.
9905 Derived from a suggestion by Frank Heckenbach in
9906 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
9907 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
9908 All uses of free, malloc, realloc changed to use these macros,
9909 and unnecessary casts removed.
9910 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
9911
9912 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
9913
9914 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
9915 use s.empty() rather than s == "" to test for empty string; see
9916 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
9917 (trivial change)
9918
9919 2003-06-25 Akim Demaille <akim@epita.fr>
9920
9921 * config/depcomp, config/install-sh: Update from masters.
9922
9923 2003-06-20 Paul Eggert <eggert@twinsun.com>
9924
9925 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
9926 and return properly parenthesized result.
9927 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
9928 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9929 Remove unnecessary parentheses from uses.
9930 * doc/bison.texinfo (Location Default Action): Describe the
9931 conventions for parentheses.
9932
9933 2003-06-19 Paul Eggert <eggert@twinsun.com>
9934
9935 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
9936 yyreportTree): Do not assume that size_t is the same width as int,
9937 when printing sizes. Print sizes using an unsigned format.
9938 Problem reported by Frank Heckenbach in
9939 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
9940
9941 Port to Forte Developer 7 C compiler.
9942 * data/glr.c (struct YYLTYPE): If locations are not being used,
9943 declare a single dummy member, as empty structs do not conform
9944 to the C standard.
9945 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
9946 the Forte Developer 7 C compiler complains that end-of-loop
9947 code is not reached.
9948
9949 2003-06-17 Paul Eggert <eggert@twinsun.com>
9950
9951 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
9952 avoid warnings from picky compilers about redefinition of PARAMS.
9953
9954 2003-06-17 Paul Eggert <eggert@twinsun.com>
9955
9956 Version 1.875b.
9957
9958 * NEWS: Document 1.875b.
9959
9960 * lib/bbitset.h: Do not include config.h; that's the includer's job.
9961 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
9962 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
9963 Don't use 'index' in comments, as it's a builtin fn on some hosts.
9964 * lib/bitset_stats.c: Include gettext.h unconditionally, as
9965 per recent gettext manual's suggestion.
9966 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
9967 Use prototypes, not old-style definitions.
9968 * lib/lbitset.c (lbitset_unused_clear): Likewise.
9969 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
9970 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
9971 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
9972 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
9973 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
9974 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
9975 vbitset_or_and_cmp, vbitset_copy): Likewise.
9976
9977 * lib/libiberty.h: Do not include config.h; that's the includer's job.
9978 Do not include <stdlib.h>.
9979 (PARAMS): Define unconditionally for C89.
9980 (ATTRIBUTE_NORETURN): Remove.
9981 (ATTRIBUTE_UNUSED): Define unconditionally.
9982
9983 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
9984 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
9985 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
9986 * lib/vbitset.c, lib/vbitset.h: New files.
9987 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9988 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
9989 from libbitset.
9990
9991 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
9992 `How Can I Reset @code{yyparse}', since texinfo does not allow
9993 arbitrary @ in node names.
9994
9995 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
9996 shouldn't be needed according to the gettext 0.12.1 documentation
9997 but which seem to be needed anyway: codeset.m4 glibc21.m4
9998 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
9999 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
10000 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
10001
10002 * lib/.cvsignore: Add stdbool.h.
10003 * m4/.cvsignore: Add nls.m4, po.m4.
10004
10005 Upgrade to CVS gnulib.
10006 * stdbool_.h: File renamed from stdbool.h.in.
10007 * configure.ac (AM_STDBOOL_H): Invoke this instead of
10008 AC_HEADER_STDBOOL.
10009 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
10010 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
10011 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
10012 (MOSTLYCLEANFILES): New var.
10013 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
10014 (stdbool.h): New rule.
10015 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
10016 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
10017 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
10018 m4/quote.m4: Upgrade to today's gnulib.
10019
10020 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
10021 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
10022 the tests right now.
10023 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
10024 yyerror are declared before use; C99 requires this.
10025
10026 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10027
10028 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
10029 first.
10030 (yyrecoverSyntaxError): Correct the logic for setting and testing
10031 yyerrState.
10032 Correct comment on handling EOF.
10033 Allow states with only a default reduction, rather than failing
10034 (I can't quite reconstruct why these were not allowed before).
10035
10036 Fixes to avoid problem that $-N rules in GLR parsers can cause
10037 buffer overruns, corrupting state.
10038
10039 * src/output.c (prepare_rules): Output max_left_semantic_context
10040 definition.
10041 * src/reader.h (max_left_semantic_context): New variable declaration.
10042 * src/scan-gram.l (max_left_semantic_context): Define.
10043 (handle_action_dollar): Update max_left_semantic_context.
10044 * data/glr.c (YYMAXLEFT): New definition.
10045 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
10046 (yyresolveAction): Ditto.
10047
10048 Fixes to problems with location handling in GLR parsers reported by
10049 Frank Heckenbach (2003/06/05).
10050
10051 * data/glr.c (YYLTYPE): Make trivial if locations not used.
10052 (YYRHSLOC): Add parentheses, and define only if locations used.
10053 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
10054 locations not used.
10055 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
10056 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
10057
10058 * tests/cxx-type.at: Exercise location information; update tests
10059 to differentiate output with and without locations.
10060 Remove forward declarations of yylex and yyerror---caused errors
10061 because default YYLTYPE not yet defined.
10062 Change semantic actions to compute strings, rather than printing
10063 them directly (to test proper passing of semantics values). Change
10064 output to prefix notation and update test data and expected results.
10065 (yylex): Track locations.
10066 (stmtMerge): Return value rather than printing, and include arguments
10067 in value.
10068
10069 2003-06-03 Paul Eggert <eggert@twinsun.com>
10070
10071 Avoid warnings generated by GCC 2.95.4 when Bison is
10072 configured with --enable-gcc-warnings.
10073 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
10074 yy::]b4_parser_class_name[::translate_,
10075 yy::Stack::operator[] (unsigned),
10076 yy::Stack::operator[] (unsigned) const,
10077 yy::Slice::operator[] (unsigned),
10078 yy::Slice::operator[] (unsigned) const):
10079 Rename local vars to avoid warnings.
10080 * tests/glr-regression.at (Improper handling of embedded actions
10081 and $-N in GLR parsers): Remove unused local variable from yylex.
10082 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
10083 (void) as arg when not pure, since we now assume C89 when building
10084 Bison. Pacify GCC by using parameter.
10085
10086 2003-06-02 Paul Eggert <eggert@twinsun.com>
10087
10088 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
10089 yy::Location::lines, yy::Location::columns): Rename arguments
10090 to avoid shadowing; this removes a warning generated by GCC 3.3.
10091
10092 2003-06-01 Paul Eggert <eggert@twinsun.com>
10093
10094 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
10095 to g++, as GCC 3.3 complains if you do it.
10096 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
10097 everything that WARNING_CFLAGS has, except omit warnings
10098 not suitable for C++.
10099 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
10100 * tests/atlocal.in (CXXFLAGS): New var.
10101 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
10102
10103 Fix a GLR parser bug I reported in February; see
10104 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
10105 The problem was that GLR parsers did not conform to the C standard,
10106 because actions like { $1 = $2 + $3; } expanded to expressions
10107 that invoked YYFILL in separate subexpressions, and YYFILL assigned
10108 to a local variable. The C standard says that expressions
10109 like (var = f ()) + (var = f ()) have undefined behavior.
10110 Another problem was that GCC sometimes issues warnings that
10111 yyfill and its parameters are unused.
10112
10113 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
10114 as possibly unused.
10115 (yyfill): New function.
10116 (YYFILL): Use it.
10117 (yyuserAction): Change type of yynormal to bool, so that it matches
10118 the new yyfill signature. Mark it as possibly unused.
10119
10120
10121 Follow up on a bug I reported in February, where a Bison-generated
10122 parser can loop. Provide a test case and a fix for yacc.c. I
10123 don't have a fix for lalr1.cc or for glr.c, unfortunately.
10124 The original bug report is in:
10125 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
10126
10127 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
10128 macro's size was becoming unwieldy.
10129 (yyerrlab): Do not discard an empty lookahead symbol, as this
10130 might destroy garbage.
10131 (yyerrorlab): New label, with the old contents of YYERROR,
10132 plus the following change: pop the stack of rhs corresponding
10133 to the production that invoked YYERROR. That is how Yacc
10134 behaves, and POSIX requires this behavior.
10135 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
10136 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
10137 Define 'alarm' to do nothing if unistd.h is not available.
10138 Add a new rule "exp: '-' error;" to test the above change to
10139 data/yacc.c. Use 'alarm' to abort any test taking longer than
10140 10 seconds, as it's probably looping.
10141 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
10142 Also, the new yacc.c generates two fewer diagnostics for an
10143 existing test.
10144
10145 2003-05-24 Paul Eggert <eggert@twinsun.com>
10146
10147 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
10148 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
10149 This fixes a problem reported by John Bowman when the Compaq/HP
10150 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
10151 -ansi -Wall -gall).
10152 * data/yacc.c (union yyalloc): Likewise.
10153 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
10154
10155 Switch from 'int' to 'bool' where that makes sense.
10156
10157 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
10158 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
10159 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
10160 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
10161 Return or accept bool, not int. All callers changed.
10162 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
10163 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
10164 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
10165 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
10166 bitset_or_and_cmp_): Likewise.
10167 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
10168 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
10169 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
10170 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
10171 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
10172 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
10173 bitset_stats_or_and_cmp): Likewise.
10174 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
10175 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
10176 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
10177 ebitset_xor_cmp): Likewise.
10178 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
10179 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
10180 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
10181 lbitset_xor_cmp): Likewise.
10182 * lib/bbitset.h: Include <stdbool.h>.
10183 (struct bitset_vtable): The following members now return bool, not
10184 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
10185 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
10186 or_and_cmp).
10187 * src/conflicts.c (count_rr_conflicts): Likewise.
10188 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
10189 All uses changed.
10190 * lib/ebitset.c (ebitset_obstack_init): Likewise.
10191 * lib/lbitset.c (lbitset_obstack_init): Likewise.
10192 * src/getargs.c (debug_flag, defines_flag, locations_flag,
10193 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
10194 graph_flag): Likewise.
10195 * src/getargs.h (debug_flag, defines_flag, locations_flag,
10196 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
10197 graph_flag): Likewise.
10198 * src/output.c (error_verbose): Likewise.
10199 * src/output.h (error_verbose): Likewise.
10200 * src/reader.c (start_flag, typed): Likewise.
10201 * src/reader.h (typed): Likewise.
10202 * src/getargs.c (LOCATIONS_OPTION): New constant.
10203 (long_options, getargs): Use it.
10204 * src/lalr.c (build_relations): Use bool, not int.
10205 * src/nullable.c (nullable_compute): Likewise.
10206 * src/print.c (print_reductions): Likewise.
10207 * src/tables.c (action_row, pack_vector): Likewise.
10208 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
10209 * src/output.c (prepare): Use it.
10210 * src/output.c (token_definitions_output,
10211 symbol_destructors_output, symbol_destructors_output): Use string,
10212 not boolean integer, to keep track of whether to output separator.
10213 * src/print_graph.c (print_core): Likewise.
10214 * src/state.c (state_rule_lookaheads_print): Likewise.
10215
10216 * config/install-sh: Sync from automake 1.7.5.
10217
10218 2003-05-14 Paul Eggert <eggert@twinsun.com>
10219
10220 * src/parse-gram.y (rules_or_grammar_declaration): Require a
10221 semicolon after a grammar declaration, in the interest of possible
10222 future changes to the Bison input language.
10223 Do not allow a stray semicolon at the start of the grammar.
10224 (rhses.1): Allow one or more semicolons after any rule, including
10225 just before "|" as required by POSIX.
10226 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
10227 grammar.
10228
10229 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
10230
10231 %parse-param support for lalr1.cc.
10232
10233 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
10234 b4_cc_constructor_calls, b4_cc_constructor_call,
10235 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
10236 definitions.
10237 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
10238 parse-param arguments.
10239 (yy::b4_parser_class_name): Declare instance variables to
10240 hold parse-param arguments.
10241 * tests/calc.at: s/value/semantic_value/ because value clashes
10242 with a member of yy::b4_parser_class_name. Adjust C++ code
10243 to handle %parse-param. Enable %parse-param test in C++.
10244
10245 2003-05-12 Paul Eggert <eggert@twinsun.com>
10246
10247 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
10248 English a bit. Fix fclose typo. Change "const char" to "char
10249 const", and use ANSI C rather than K&R for "main". Suggest
10250 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
10251 and suggest yy_switch_to_buffer.
10252
10253 2003-05-05 Paul Eggert <eggert@twinsun.com>
10254
10255 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
10256 C89. This avoids a diagnostic on compilers that define __STDC__
10257 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
10258 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
10259
10260 2003-05-03 Paul Eggert <eggert@twinsun.com>
10261
10262 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
10263 Do not overrun array bounds.
10264 This should fix a bug reported today by Olatunji Oluwabukunmi in
10265 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
10266
10267 2003-04-29 Akim Demaille <akim@epita.fr>
10268
10269 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
10270 * src/getargs.c, src/getargs.h: here, as bool, not int.
10271 (nondeterministic_parser): New.
10272 * src/parse-gram.y, src/scan-gram.l: Support
10273 %nondeterministic-parser.
10274 * src/output.c (prepare): Use nondeterministic_parser instead
10275 of glr_parser where appropriate.
10276 * src/tables.c (conflict_row, action_row, save_row)
10277 (token_actions, token_actions, pack_vector): Ditto.
10278
10279 2003-04-29 Akim Demaille <akim@epita.fr>
10280
10281 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
10282
10283 2003-04-29 Akim Demaille <akim@epita.fr>
10284
10285 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
10286 with %pure-parser and %locations to exercise the patch from Yakov
10287 Markovitch below.
10288
10289 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
10290
10291 * data/yacc.c: (b4_lex_param): Corrected for the case where
10292 %lex-param is provided and %pure-parser isn't.
10293
10294 2003-04-27 Paul Eggert <eggert@twinsun.com>
10295
10296 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
10297 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
10298 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
10299 if it is not defined.
10300 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
10301
10302 2003-04-26 Paul Eggert <eggert@twinsun.com>
10303
10304 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
10305 Declare to be of type suitable for the ninf value itself, not of
10306 type suitable for the corresponding table, since the latter might
10307 be unsigned but the ninf value might be negative. This fixes a
10308 bug reported by Alexandre Duret-Lutz in
10309 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
10310
10311 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
10312 invokes it. We shouldn't invoke it twice because it will attempt
10313 to put error.o in the archive twice. This fixes a glitch reported
10314 by Martin Mokrejs in
10315 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
10316
10317 2003-04-21 Paul Eggert <eggert@twinsun.com>
10318
10319 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
10320 to gnulib.
10321
10322 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
10323
10324 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
10325 Fix obvious typo that results in uncompilable GLR parsers
10326 when both %pure-parser and %locations are used. (trivial change)
10327
10328 2003-04-17 Paul Eggert <eggert@twinsun.com>
10329
10330 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
10331 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
10332 Do not insert the expected token via unput, as this runs afoul
10333 of a POSIX-compatibility bug in flex 2.5.31.
10334 All uses changed to BEGIN the parent state,
10335 since we no longer insert the expected token via unput.
10336 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
10337 that is no longer emitted after the above change.
10338
10339 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
10340 the first one. This change is from Paul Hilfinger, and it fixes
10341 regression reported by Werner Lemberg in
10342 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
10343
10344 (resolve_sr_conflict): Don't invoke state_errs_set
10345 unless one or more tokens have been explicitly made errors.
10346 Otherwise, the above change causes Bison to abort.
10347
10348 * tests/existing.at (GNU pic Grammar): New test case, taken from
10349 Lemberg's email.
10350
10351 2003-03-31 Akim Demaille <akim@epita.fr>
10352
10353 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
10354
10355 2003-03-31 Akim Demaille <akim@epita.fr>
10356
10357 * src/output.c (prepare_symbols): Avoid trailing spaces in the
10358 output.
10359
10360 2003-03-31 Akim Demaille <akim@epita.fr>
10361
10362 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
10363 From Paul Hilfinger.
10364
10365 2003-03-29 Akim Demaille <akim@epita.fr>
10366
10367 * m4/error.m4: Do not put under dynamic conditions some code which
10368 expansion is under static control.
10369
10370 2003-03-29 Akim Demaille <akim@epita.fr>
10371
10372 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
10373
10374 2003-03-29 Akim Demaille <akim@epita.fr>
10375
10376 * doc/bison.texinfo (Strings are Destroyed): New.
10377
10378 2003-03-13 Paul Eggert <eggert@twinsun.com>
10379
10380 * .cvsignore: Add configure.lineno.
10381 * src/.cvsignore: Add yacc.
10382 * tests/.cvsignore: Add testsuite.log.
10383 * doc/fdl.texi: Sync with latest FSF version.
10384
10385 2003-03-12 Paul Eggert <eggert@twinsun.com>
10386
10387 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
10388 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
10389 cursor, instead of leaving it undefined. This fixes a bug
10390 reported by Tim Van Holder in
10391 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
10392 * tests/input.at (Torturing the Scanner): Test the scanner on
10393 an empty input file, which was Tim Van Holder's test case.
10394
10395 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
10396 <sys/resource.h> can be included, include sys/time.h and
10397 sys/times.h first, if available. This works around the SunOS
10398 4.1.4 porting bug reported by Bruce Becker in
10399 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
10400
10401 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
10402 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
10403 AC_HEADER_SYS_WAIT.
10404
10405 Merge changes from gnulib. This was prompted because the CVS
10406 snapshot didn't build on Solaris 7 due to strnlen problems.
10407
10408 These changes need to be merged back into gnulib:
10409 * lib/hash.c: Include <stdbool.h> unconditionally.
10410 * m4/onceonly.m4 (m4_quote): New macro.
10411 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
10412 Quote AC_FOREACH variable-expansions properly.
10413 The 2003-01-03 obstack.h change also needs merging.
10414 {end of changes requiring merging}
10415
10416 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
10417 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
10418 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
10419 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
10420 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
10421 New files, imported from gnulib.
10422 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
10423 above.
10424
10425 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
10426 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
10427 gnulib sources.
10428
10429 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
10430 Add.
10431 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
10432 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
10433 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
10434 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
10435 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
10436 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
10437 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
10438 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
10439 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
10440 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
10441 (jm_PREREQ_ARGMATCH): Remove.
10442 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
10443 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
10444
10445 * src/system.h: Include <stdbool.h> unconditionally.
10446
10447 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
10448 assuming at least C89 in the bitset code for some time now.
10449
10450 2003-03-03 Akim Demaille <akim@epita.fr>
10451
10452 * ro.po: New.
10453
10454 2003-03-02 Akim Demaille <akim@epita.fr>
10455
10456 * doc/bison.texinfo (Table of Symbols): Reactivate the
10457 documentation for %lex-param, and %parse-param.
10458
10459 2003-03-02 Akim Demaille <akim@epita.fr>
10460
10461 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
10462 generate verbose error messages.
10463 Use the number of tokens as an upper bound in yytname, as it
10464 cannot be a non terminal.
10465
10466 2003-03-02 Akim Demaille <akim@epita.fr>
10467
10468 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
10469 message.
10470
10471 2003-03-02 Akim Demaille <akim@epita.fr>
10472
10473 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
10474 Use them to exercise yycheck overrun.
10475 Based on Andrew Suffield's grammar.
10476
10477 2003-03-02 Akim Demaille <akim@epita.fr>
10478
10479 Create tests/local.at for Bison generic testing macros.
10480
10481 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
10482 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
10483 This new file.
10484 * tests/calc.at (AT_CHECK_CALC): Adjust.
10485 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
10486 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
10487 * tests/local.at: here.
10488 (AT_COMPILE_CXX): Tags the tests using it as c++.
10489 Ignore the test if CXX is not functional.
10490
10491 2003-03-01 Paul Eggert <eggert@twinsun.com>
10492
10493 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
10494 not loc->end, since loc->end might contain garbage and this leads
10495 to undefined behavior on some platforms.
10496 (id_loc, token_start): Use (IF_LINTed) initial values that do not
10497 depend on *loc, so that the reader doesn't give the the false
10498 impression that *loc is initialized.
10499 (<INITIAL>"%%"): Do not bother setting code_start, since its value
10500 does not survive the return.
10501
10502 2003-03-01 Akim Demaille <akim@epita.fr>
10503
10504 * src/scan-gram.l (code_start): Always initialize it when entering
10505 into yylex, as SC_EPILOGUE is activated *before* the corresponding
10506 yylex invocation. An alternative would be making it static, but
10507 then it starts with the second %%'s beginning, instead of its end.
10508
10509 2003-02-28 Paul Eggert <eggert@twinsun.com>
10510
10511 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
10512 around a UnixWare 7.1.1 porting bug reported by John Hughes in
10513 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
10514
10515 2003-02-26 Paul Eggert <eggert@twinsun.com>
10516
10517 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
10518 Remove Sequent/Pyramid discussion (nobody uses them any more).
10519 Merge VMS and MS-DOS discussion; these ports may well be dead
10520 but let's keep mentioning them for now. Put <> around email
10521 addresses. Add copyright notice.
10522
10523 2003-02-24 Paul Eggert <eggert@twinsun.com>
10524
10525 * data/glr.c (yy_reduce_print): yylineno -> yylno,
10526 to avoid collision with flex use of yylineno.
10527 Problem reported by Bruce Lilly in
10528 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
10529 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10530 * data/yacc.c (yy_reduce_print): Likewise.
10531
10532 * config/depcomp: Sync with Automake 1.7.3.
10533
10534 2003-02-21 Akim Demaille <akim@epita.fr>
10535
10536 * data/lalr1.cc: Use temporary variables instead of casts to
10537 change integer types.
10538 Suggested by Paul Eggert.
10539
10540 2003-02-21 Akim Demaille <akim@epita.fr>
10541
10542 * doc/bison.texinfo: Use "location" consistently to refer to @n,
10543 to avoid confusions with lalr1.cc's notion of Position.
10544 Suggested by Paul Eggert.
10545
10546 2003-02-20 Akim Demaille <akim@epita.fr>
10547
10548 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
10549 before initial_columns.
10550 (location.hh): Use consistent variable names when defining the
10551 operator<<.
10552 Use "last" so that we subtract from Positions, not from unsigned.
10553
10554 2003-02-20 Akim Demaille <akim@epita.fr>
10555
10556 * data/lalr1.cc (position.hh): New subfile, including the extended
10557 and Doxygen'ed documentation of class Position.
10558 (location.hh): Use it.
10559 Document a` la Doxygen.
10560 With the help of Benoit Perrot.
10561
10562 2003-02-20 Akim Demaille <akim@epita.fr>
10563
10564 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
10565 AT_YACC_IF.
10566 Redefine AT_YYERROR_SEES_LOC_IF using it.
10567 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
10568 not defined.
10569 Don't use the location in yy::Parser::error_ and
10570 yy::Parser::print_ when not %locations.
10571 Activate more lalr1.cc tests.
10572
10573 2003-02-19 Akim Demaille <akim@epita.fr>
10574
10575 * data/lalr1.cc: When displaying a line number, be sure to make it
10576 an int.
10577
10578 2003-02-19 Akim Demaille <akim@epita.fr>
10579
10580 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
10581 Remove, useless.
10582 (YYABORT, YYACCEPT, YYERROR): New.
10583 * tests/calc.at: Renable the lalr1.cc test.
10584
10585 2003-02-19 Akim Demaille <akim@epita.fr>
10586
10587 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
10588 error recovery, mixing with/without pops and discarding of the
10589 lookahead.
10590 Exercise YYERROR.
10591 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
10592
10593 2003-02-17 Paul Eggert <eggert@twinsun.com>
10594
10595 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
10596 * tests/testsuite.at (AT_COMPILE): Use them.
10597 This fixes the testsuite problem reported by Robert Lentz in
10598 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
10599
10600 2003-02-12 Paul Eggert <eggert@twinsun.com>
10601
10602 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
10603 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
10604 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
10605 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
10606 Check for malloc failure, for consistency with yacc.c.
10607 (yytname_size): Remove, for consistency with yacc.c.
10608
10609 The bug still remains in data/lalr1.cc, as I didn't have time
10610 to fix it there.
10611
10612 2003-02-06 Akim Demaille <akim@epita.fr>
10613
10614 * configure.ac (GXX): Rename as...
10615 (CXX): this, to keep the original Autoconf semantics.
10616 Require 2.57.
10617 * data/lalr1.cc: Fix b4_copyright invocations.
10618 If YYDEBUG is not defined, don't depend upon name_ being defined.
10619 (location.hh): Include string and iostream.
10620 (Position::filename): New member.
10621 (Position::Position ()): New.
10622 (operator<< (Position)): New.
10623 (operator- (Position, int)): New.
10624 (Location::first, Location::last): Rename as...
10625 (Location::begin, Location::end): these, to mock the conventional
10626 iterator names.
10627 (operator<< (Location)): New.
10628 * tests/atlocal.in (CXX): New.
10629 * tests/testsuite.at (AT_COMPILE_CXX): New.
10630 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
10631 locations in a more synthetic way.
10632 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
10633 lalr1.cc is used.
10634 Adjust the C locations to match those from Emacs: first column is
10635 column 0.
10636 Change all the expected results.
10637 Conform to the GCS: simplify the locations when applicable.
10638 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
10639 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
10640 these CPP macros with the m4 macros new defined by...
10641 (AT_CHECK_PUSHDEFS): this, i.e.:
10642 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
10643 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
10644 New macros.
10645 (AT_CHECK_POPDEFS): Undefine them.
10646 (AT_CHECK_CALC_LALR1_CC): New.
10647 Use it for the first lalr1.cc test.
10648
10649 2003-02-04 Akim Demaille <akim@epita.fr>
10650
10651 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
10652 Location as is defined.
10653
10654 2003-02-04 Akim Demaille <akim@epita.fr>
10655
10656 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
10657 name_ being defined.
10658
10659 2003-02-03 Paul Eggert <eggert@twinsun.com>
10660
10661 * src/gram.h (start_symbol): Remove unused decl.
10662
10663 Use more-consistent naming conventions for local vars.
10664
10665 * src/derives.c (derives_compute): Change type of local var from
10666 int to rule_number.
10667 * src/gram.c (grammar_rules_partial_print): Likewise.
10668 * src/print.c (print_core): Likewise.
10669 * src/reduce.c (reduce_grammar_tables): Likewise.
10670
10671 * src/gram.c (grammar_dump): Change name of item_number *
10672 local var from r to rp.
10673 * src/nullable.c (nullable_compute): Likewise.
10674
10675 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
10676
10677 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
10678 for symbol or symbol_number var.
10679 * src/reader.c (grammar_start_symbol_set): Likewise.
10680 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
10681 Likewise.
10682 * src/state.c (transitions_to): Likewise.
10683 * src/state.h: Likewise.
10684 * src/tables.c (symbol_number_to_vector_number): Likewise.
10685
10686 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
10687 char * var.
10688
10689 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
10690 var.
10691
10692 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
10693 var.
10694
10695 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
10696 Use str, not s, for char * var. Use ch, not c, for character var.
10697 Use size for size var.
10698
10699 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
10700 char * var.
10701 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
10702 uniqstr var.
10703 * src/uniqstr.h: Likewise.
10704
10705 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10706 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10707 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
10708 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
10709 param to have same name as that of enum, so that we don't use
10710 "s" to stand for a non-state.
10711
10712 2003-02-02 Akim Demaille <akim@epita.fr>
10713
10714 * src/scan-skel.l: Scan more than one inert character per yylex
10715 invocation.
10716
10717 2003-02-01 Paul Eggert <eggert@twinsun.com>
10718
10719 Version 1.875a.
10720
10721 * po/LINGUAS: Add ms.
10722
10723 2003-01-30 Akim Demaille <akim@epita.fr>
10724
10725 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
10726
10727 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10728
10729 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
10730 of $1.
10731
10732 Changes in response to error report by S. Eken: GLR mode does not
10733 handle negative $ indices or $ indices in embedded rules correctly.
10734 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
10735
10736 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
10737 (b4_rhs_location): Ditto.
10738 (yyfill): New function to copy from stack tree into array
10739 incrementally.
10740 (yyuserAction): Modify to allow incremental move of semantic values
10741 to rhs array when in GLR mode.
10742 Define YYFILL to use in user-defined actions to fill semantic array
10743 as needed.
10744 Remove dummy use of yystack, as there is now a guaranteed use.
10745 (yydoAction): Modify to allow incremental move of semantic values
10746 to rhs array when in GLR mode.
10747 (yyresolveAction): Ditto.
10748 (yyglrShiftDefer): Update comment.
10749 (yyresolveStates): Use X == NULL for pointers, not !X.
10750 (yyglrReduce): Ditto.
10751 (yydoAction): Ditto
10752
10753 * tests/glr-regr1.at: Rename to ...
10754 * tests/glr-regression.at: Add new regression test for the problems
10755 described above (adapted from S. Eken).
10756 Update copyright notice.
10757 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
10758 * tests/Makefile.am: Ditto.
10759
10760 2003-01-28 Paul Eggert <eggert@twinsun.com>
10761
10762 * data/lalr1.cc: Do not use @output_header_name@ unless
10763 b4_defines_flag is set. This fixes two bugs reported by
10764 Tim Van Holder in
10765 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
10766 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
10767
10768 2003-01-21 Paul Eggert <eggert@twinsun.com>
10769
10770 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
10771 we don't need to worry about yyerrlab1 being reported as an
10772 "unused label" by non-GCC C compilers. The downside is that if
10773 locations are used then a couple of statements are duplicated each
10774 time YYERROR is invoked, but the upside is that the warnings
10775 should vanish.
10776 (yyerrlab1): Move code to YERROR.
10777 (yyerrlab2): Remove. Change uses back to yyerrlab1.
10778 This reverts some of the 2002-12-27 change.
10779
10780 2003-01-17 Paul Eggert <eggert@twinsun.com>
10781
10782 * src/output.c (symbol_printers_output): Fix typo that led
10783 to core dump. Problem reported by Antonio Rus in
10784 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
10785
10786 2003-01-13 Akim Demaille <akim@epita.fr>,
10787 Quoc Peyrot <chojin@lrde.epita.fr>,
10788 Robert Anisko <anisko_r@lrde.epita.fr>
10789
10790 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
10791 when the stacks contain one element, as the loop would otherwise
10792 free the last state, and then use the top state (the one we just
10793 popped). This means that the initial elements will not be freed
10794 explicitly, as is the case in yacc.c; it is not a problem, as
10795 these elements have fake values.
10796
10797 2003-01-11 Paul Eggert <eggert@twinsun.com>
10798
10799 * NEWS: %expect-violations are now just warnings, reverting
10800 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
10801 bootstrapping problem reported by Matthias Klose; see
10802 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
10803 * src/conflicts.c (conflicts_print): Likewise.
10804 * tests/conflicts.at (%expect not enough, %expect too much,
10805 %expect with reduce conflicts): Likewise.
10806 * doc/bison.texinfo (Expect Decl): Document this. Also mention
10807 that the warning is enabled if the number of conflicts changes
10808 (not necessarily increases).
10809
10810 * src/getargs.c (version): Update copyright year.
10811
10812 2003-01-09 Akim Demaille <akim@epita.fr>
10813
10814 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
10815
10816 2003-01-08 Paul Eggert <eggert@twinsun.com>
10817
10818 * Makefile.maint (WGETFLAGS):
10819 New macro, containing "-C off" to disable proxy caches.
10820 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
10821 (rel-check): Use $(WGET) instead of wget.
10822
10823 2003-01-06 Paul Eggert <eggert@twinsun.com>
10824
10825 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
10826 the GLR paper of Scott, Johnstone and Hussain.
10827
10828 2003-01-04 Paul Eggert <eggert@twinsun.com>
10829
10830 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
10831 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
10832 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
10833 (EXTRA_LIBRARIES): New var, for liby.a.
10834 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
10835 (EXTRA_SCRIPTS): New var, for yacc.
10836
10837 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
10838 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
10839 Problem reported by Nelson H. F. Beebe.
10840
10841 2003-01-03 Paul Eggert <eggert@twinsun.com>
10842
10843 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
10844 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
10845 when compiling Bison 1.875's `bitset bset = obstack_alloc
10846 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
10847
10848 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
10849 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
10850 grow to a huge size with typical invocation.
10851
10852 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
10853 Use the pattern recommended by Autoconf 2.57, except also protect
10854 against double-definition.
10855 * src/system.h: Likewise.
10856 Portability issues reported by Nelson H. F. Beebe.
10857
10858 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
10859 All uses changed. Provide a definition in both C and C++.
10860 (yytrue, yyfalse): Define even if defined (__cplusplus).
10861
10862 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
10863 Reported by Nelson H. F. Beebe.
10864
10865 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
10866
10867 2003-01-02 Paul Eggert <eggert@twinsun.com>
10868
10869 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
10870 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
10871 Bug reported by Nelson H. F. Beebe.
10872
10873 2003-01-01 Paul Eggert <eggert@twinsun.com>
10874
10875 * Version 1.875.
10876
10877 2002-12-30 Paul Eggert <eggert@twinsun.com>
10878
10879 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
10880 Moved here from...
10881 (<INITIAL>","): Here. This causes stray "," to be treated
10882 more uniformly.
10883
10884 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
10885 last brace in braced code when not in Yacc mode, for compatibility
10886 with Bison 1.35. This resurrects the 2001-12-15 patch to
10887 src/reader.c.
10888
10889 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
10890 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
10891
10892 2002-12-28 Paul Eggert <eggert@twinsun.com>
10893
10894 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
10895 that of SYM's type. This fixes Debian bug 168069, reported by
10896 Thomas Olsson.
10897
10898 2002-12-28 Paul Eggert <eggert@twinsun.com>
10899
10900 Version 1.75f.
10901
10902 Switch back to the Yacc style of conflict reports, undoing some
10903 of the 2002-07-30 change.
10904 * doc/bison.texinfo (Understanding): Use Yacc style for
10905 conflict reports. Also, use new way of locating rules.
10906 * src/conflicts.c (conflict_report):
10907 Renamed from conflict_report_yacc, removing the old
10908 'conflict_report'. Translate the entire conflict report at once,
10909 so that we don't assume that "," has the same interpretation in
10910 all languages.
10911 (conflicts_output): Use Yacc-style conflict report for each state,
10912 instead of our more-complicated style.
10913 (conflicts_print): Use Yacc-style conflict report, except print
10914 the input file name when not emulating Yacc.
10915 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
10916 Conflicted Reduction, %expect not enough, %expect too much,
10917 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
10918 * tests/existing.at (GNU Cim Grammar): Likewise.
10919 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
10920
10921 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
10922 fatal): Don't invoke fflush; it's not needed and it might even be
10923 harmful for stdout, as stdout might not be open.
10924 * src/reduce.c (reduce_print): Likewise.
10925
10926 2002-12-27 Paul Eggert <eggert@twinsun.com>
10927
10928 Fix a bug where error locations were not being recorded correctly.
10929 This problem was originally reported by Paul Hilfinger in
10930 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
10931
10932 * data/yacc.c (yyparse): New local var yylerrsp, to record the
10933 top of the location stack's error locations.
10934 (yyerrlab): Set it. When discarding a token, push its location
10935 onto yylerrsp so that we don't lose track of the error's end.
10936 (yyerrlab1): Now is only the target of YYERROR, so that we can
10937 properly record the location of the action that failed. For GCC
10938 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
10939 GCC warning about yyerrlab1 being unused if YYERROR is unused.
10940 (yyerrlab2): New label, which yyerrlab now falls through to.
10941 Compute the error's location by applying YYLLOC_DEFAULT to
10942 the locations of all the symbols that went into the error.
10943 * doc/bison.texinfo (Location Default Action): Mention that
10944 YYLLOC_DEFAULT is also invoked for syntax errors.
10945 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10946 Error locations include the locations of all the tokens that were
10947 discarded, not just the last token.
10948
10949 2002-12-26 Paul Eggert <eggert@twinsun.com>
10950
10951 * src/files.c: Include quote.h.
10952 (compute_output_file_names): Warn if we detect conflicting
10953 outputs to the same file. This should catch the misunderstanding
10954 exemplified by Debian Bug 165349, reported by Bruce Stephens..
10955
10956 * src/conflicts.c (conflicts_print): If the user specifies
10957 "%expect N", report an error if there are any reduce/reduce
10958 conflicts. This is what the manual says should happen.
10959 This fixes Debian bug 130890, reported by Anthony DeRobertis.
10960 * tests/conflicts.at (%expect with reduce conflicts): New test.
10961
10962 Don't use m4_include on relative file names, as it doesn't work as
10963 desired if there happens to be a file with that name under ".".
10964
10965 * m4sugar/version.m4: Remove; it was included but it wasn't used.
10966 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
10967 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
10968 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
10969 * src/output.c (output_skeleton): Use full path names when
10970 specifying a file to include; don't rely on include path, as
10971 it's unreliable when the working file contains a file with
10972 that name.
10973
10974 2002-12-25 Paul Eggert <eggert@twinsun.com>
10975
10976 Remove obsolete references to bison.simple and bison.hairy.
10977 Problem mentioned by Aubin Mahe in
10978 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
10979 * data/glr.c: Comment fix.
10980 * doc/bison.1: Remove references. Also, mention "yacc".
10981
10982 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
10983 with -g option.
10984
10985 * src/parse-gram.y (declaration): Use enum "report_states" rather
10986 than its numeric value 1.
10987
10988 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
10989 opening a new one. This fixes Debian bug 165349, reported by
10990 Bruce Stephens.
10991
10992 2002-12-24 Paul Eggert <eggert@twinsun.com>
10993
10994 Version 1.75e.
10995
10996 * Makefile.maint (cvs-update): Don't assume that the shell
10997 supports $(...), as Solaris sh doesn't.
10998
10999 * src/parse-gram.y (lloc_default): Remove test for empty
11000 nonterminals at the end, since it didn't change the result.
11001
11002 2002-12-24 Paul Eggert <eggert@twinsun.com>
11003
11004 If the user does not define YYSTYPE as a macro, Bison now declares it
11005 using typedef instead of defining it as a macro. POSIX requires this.
11006 For consistency, YYLTYPE is also declared instead of defined.
11007
11008 %union directives can now have a tag before the `{', e.g., the
11009 directive `%union foo {...}' now generates the C code
11010 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
11011 The default union tag is `YYSTYPE', for compatibility with Solaris 9
11012 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
11013 instead of `yyltype'.
11014
11015 `yystype' and `yyltype' are now obsolescent macros instead of being
11016 typedefs or tags; they are no longer documented and will be
11017 withdrawn in a future release.
11018
11019 * data/glr.c (b4_location_type): Remove.
11020 (YYSTYPE): Renamed from yystype.
11021 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
11022 (struct YYLTYPE): Renamed from struct yyltype.
11023 (YYLTYPE): Renamed from yyltype.
11024 (yyltype, yystype): New (and obsolescent) macros,
11025 for backward compatibility.
11026 * data/yacc.c: Likewise.
11027
11028 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
11029 does not specify a union tag. This is for compatibility with
11030 Solaris 9 yacc.
11031
11032 * src/parse-gram.y (add_param): 2nd arg is now char * not char
11033 const *, since it is now modified by stripping surrounding { }.
11034 (current_braced_code): Remove.
11035 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
11036 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
11037 trailing " {...}". Now of type <chars>.
11038 (grammar_declaration): Adjust to bundled tokens.
11039 (code_content): Remove; stripping is now done by add_param.
11040 (print_token_value): Print contents of bundled tokens.
11041 (token_name): New function.
11042
11043 * src/reader.h (braced_code, current_braced_code): Remove.
11044 (token_name): New decl.
11045
11046 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
11047 token_type, not braced_code code_kind. All uses changed.
11048 (SC_PRE_CODE): New state, for scanning after a keyword that
11049 has (or usually has) an immediately-following braced code.
11050 (token_type): New local var, to keep track of which token type
11051 to return when scanning braced code.
11052 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
11053 <INITIAL>"%parse-param", <INITIAL>"%printer",
11054 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
11055 instead of returning a token type immediately.
11056 (<INITIAL>"{"): Set token type.
11057 (<SC_BRACED_CODE>"}"): Use it.
11058 (handle_action_dollar, handle_action_at): Now returns bool
11059 indicating success. Fail if ! current_rule; this prevents a core dump.
11060 (handle_symbol_code_dollar, handle_symbol_code_at):
11061 Remove; merge body into caller.
11062 (handle_dollar, handle_at): Complain in invalid contexts.
11063
11064 * NEWS, doc/bison.texinfo: Document the above.
11065 * NEWS: Fix years and program names in copyright notice.
11066
11067 2002-12-17 Paul Eggert <eggert@twinsun.com>
11068
11069 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
11070 Reporting, Table of Symbols): Omit mentions of %lex-param and
11071 %parse-param from the documentation for now.
11072
11073 2002-12-15 Paul Eggert <eggert@twinsun.com>
11074
11075 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
11076 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
11077 lookahead symbol, and which sets yychar in parser actions) and it
11078 disagreed with the Bison documentation. Bug
11079 reported by Andrew Walrond.
11080
11081 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
11082 as the caller now does that.
11083 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
11084 (YYEMPTY): Parenthesize right hand side, since others use it.
11085 (yyparse): Don't assume that our generated code is the only code
11086 that sets yychar.
11087
11088 2002-12-13 Paul Eggert <eggert@twinsun.com>
11089
11090 Version 1.75d.
11091
11092 POSIX requires a "yacc" command.
11093 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
11094 (MOSTLYCLEANFILES): Add yacc.
11095 (yacc): New rule.
11096 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
11097 as an alias for bison y.
11098
11099 * po/LINGUAS: Add da.
11100
11101 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
11102 problem with latest <getopt.h>.
11103 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
11104
11105 * doc/fdl.texi: Upgrade to 1.2.
11106 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
11107 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
11108 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
11109 gnulib.
11110 * config/install-sh: Sync with autotools.
11111
11112 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
11113 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
11114 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
11115 locations are requested.
11116 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
11117 locations are requested.
11118
11119 2002-12-12 Paul Eggert <eggert@twinsun.com>
11120
11121 Remove unportable casts and storage allocation tricks.
11122 While we're at it, remove almost all casts, since they
11123 usually aren't needed and are a sign of trouble.
11124
11125 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
11126
11127 * src/derives.c (derives_compute): Do not subtract NTOKENS from
11128 the pointer DSET returned by malloc; this isn't portable.
11129 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
11130 Similarly for DERIVES.
11131 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
11132 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
11133 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
11134
11135 * src/derives.c (derives_compute): Do not bother invoking
11136 int_of_rule_number, since rule numbers are integers.
11137
11138 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
11139 rather than XMALLOC (char, N).
11140
11141 * src/files.c (filename_split): Rewrite to avoid cast.
11142
11143 * src/gram.h (symbol_number_as_item_number,
11144 item_number_as_symbol_number, rule_number_as_item_number,
11145 item_number_as_rule_number):
11146 Now inline functions rather than macros, to avoid casts.
11147 * src/state.h (state_number_as_int): Likewise.
11148 * src/tables.c (state_number_to_vector_number,
11149 symbol_number_to_vector_number): Likewise.
11150
11151 * src/gram.h (int_of_rule_number): Remove; no longer used.
11152
11153 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
11154 since the resulting storage is always stored into.
11155
11156 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
11157 where it's needed.
11158
11159 * src/muscle_tab.c (muscle_m4_output):
11160 Now inline. Return bool, not int.
11161 * src/state.c (state_compare): Likewise.
11162 * src/symtab.c (symbol_check_defined,
11163 symbol_check_alias_consistency, symbol_pack, symbol_translation,
11164 hash_compare_symbol, hash_symbol):
11165 Likewise.
11166 * src/uniqstr.c (uniqstr_print): Likewise.
11167 * src/muscle_tab.c (muscle_m4_output_processor):
11168 New function, to avoid casts.
11169 * src/state.c (state_comparator, stage_hasher): Likewise.
11170 * src/symtab.c (symbol_check_defined_processor,
11171 symbol_check_alias_consistency_processor, symbol_pack_processor,
11172 symbol_translation_processor, hash_symbol_comparator,
11173 hash_symbol_hasher): Likewise.
11174 * src/uniqstr.c (uniqstr_print_processor): Likewise.
11175 * src/muscle_tab.c (muscles_m4_output):
11176 Use new functions instead of casting old functions unportably.
11177 * src/state.c (state_hash_new): Likewise.
11178 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
11179 symbols_token_translations_init):
11180 Likewise.
11181 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
11182
11183 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
11184 var instead of casting to long, to avoid casts.
11185 (prepare_states): Use MALLOC rather than alloca, so that we don't
11186 have to worry about alloca.
11187 * src/state.c (state_hash_lookup): Likewise.
11188
11189 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
11190 local var instead of casting to unsigned char, to avoid casts.
11191
11192 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
11193 STATE_ALLOC): Remove.
11194 (transitions_new, errs_new, reductions_new, state_new): Use malloc
11195 rather than calloc, and use offsetof to avoid allocating slightly
11196 too much storage.
11197 (state_new): Initialize all members.
11198
11199 * src/state.c (state_hash): Use unsigned accumulator, not signed.
11200
11201 * src/symtab.c (symbol_free): Remove; unused.
11202 (symbol_get): Remove cast in lhs of assignment.
11203 (symbols_do): Now static. Accept generic arguments, not
11204 hashing-related ones.
11205
11206 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
11207 (symbol_processor): Remove.
11208 (symbols_do): Remove decl; now static.
11209
11210 * src/system.h (alloca): Remove; decl no longer needed.
11211 (<stddef.h>): Include, for offsetof.
11212 (<inttypes.>, <stdint.h>): Include if available.
11213 (uintptr_t): New type, if system lacks it.
11214 (CALLOC, MALLOC, REALLOC): New macros.
11215 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
11216 new macros.
11217
11218 * src/tables.c (table_size): Now int, to pacify GCC.
11219 (table_grow, table_ninf_remap): Use signed table size.
11220 (save_row): Don't bother initializing locals when not needed.
11221 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
11222 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
11223
11224 * src/vcg.h: Correct misspellings.
11225
11226 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
11227
11228
11229 * src/getargs.c (getargs): Don't assume EOF == -1.
11230
11231 2002-12-09 Paul Eggert <eggert@twinsun.com>
11232
11233 Change identifier spellings to avoid collisions with names
11234 that are reserved by POSIX.
11235
11236 Don't use names ending in _t, since POSIX reserves them.
11237 For consistency, remove _e and _s endings -- they're weren't
11238 needed to remove ambiguity. All uses changed.
11239 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
11240 turn was just renamed from struniq_t.
11241 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
11242 which in turn was just renamed from struniq_processor_t.
11243 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
11244 in turn was renamed from hash_compare_struniq_t.
11245 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
11246 (state_list): Renamed from state_list_t.
11247 * src/assoc.h (assoc): Renamed from assoc_t.
11248 * src/conflicts.c (enum conflict_resolution): Renamed from
11249 enum conflict_resolution_e.
11250 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
11251 (rule_list): Renamed from rule_list_t.
11252 * src/getargs.h (enum trace): Renamed from enum trace_e.
11253 (enum report): Renamed from enum report_e.
11254 * src/gram.h (item_number): Renamed from item_number_t.
11255 (rule_number): Renamed from rule_number_t.
11256 (struct rule_s): Remove the "rule_s" part; not used.
11257 (rule): Renamed from rule_t.
11258 (rule_filter): Renamed from rule_filter_t.
11259 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
11260 (goto_list): Renamed from goto_list_t.
11261 * src/lalr.h (goto_number): Renamed from goto_number_t.
11262 * src/location.h (location): Renamed from location_t.
11263 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
11264 and moved here from:
11265 * src/muscle_tab.h (muscle_entry_t): here.
11266 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
11267 (rule_list): Renamed from rule_list_t.
11268 * src/print_graph.c (static_graph): Renamed from graph.
11269 * src/reader.h (braced_code): Renamed from braced_code_t.
11270 Remove brace_code_e tag.
11271 * src/relation.h (relation_node): Renamed from relation_node_t.
11272 (relation_nodes): Renamed from relation_nodes_t.
11273 (relation): Renamed from relation_t.
11274 * src/state.h (state_number): Renamed from state_number_t.
11275 (struct state): Renamed from struct state_s.
11276 (state): Renamed from state_t.
11277 (transitions): Renamed from transitions_t. Unused (and
11278 misspelled) transtion_s tag removed.
11279 (errs): Renamed from errs_t. Unused errs_s tag removed.
11280 (reductions): Renamed from reductions_t. Unused tag
11281 reductions_s removed.
11282 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
11283 (struct symbol_list): Renamed from struct symbol_list_s.
11284 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
11285 (struct symbol): Renamed from struct symbol_s.
11286 (symbol): Renamed from symbol_t.
11287 * src/tables.c (vector_number): Renamed from vector_number_t.
11288 (action_number): Renamed from action_t.
11289 * src/tables.h (base_number): Renamed from base_t.
11290 * src/vcg.h (enum color): Renamed from enum color_e.
11291 (enum textmode): Renamed from enum textmode_e.
11292 (enum shape): Renamed from enum shape_e.
11293 (struct colorentry): Renamed from struct colorentry_s.
11294 (struct classname): Renamed from struct classname_s.
11295 (struct infoname): Renamed from struct infoname_s.
11296 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
11297 (enum decision): Renamed from enum decision_e.
11298 (enum orientation): Renamed from enum orientation_e.
11299 (enum alignment): Renamed from enum alignment_e.
11300 (enum arrow_mode): Renamed from enum arrow_mode_e.
11301 (enum crossing_type): Renamed from enum crossing_type_e.
11302 (enum view): Renamed from enum view_e.
11303 (struct node): Renamed from struct node_s.
11304 (node): Renamed from node_t.
11305 (enum linestyle): Renamed from enum linestyle_e.
11306 (enum arrowstyle): Renamed from enum arrowstyle_e.
11307 (struct edge): Renamed from struct edge.
11308 (edge): Renamed from edge_t.
11309 (struct graph): Renamed from struct graph_s.
11310 (graph): Renamed from graph_t.
11311 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
11312 Rename value_t -> value.
11313 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
11314 value_t_as_yystype -> value_as_yystype.
11315
11316 Don't include <errno.h> in the mainstream code, since it
11317 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
11318 * lib/get-errno.c, lib/get-errno.h: New files.
11319 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
11320 get-errno.c.
11321 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
11322 * src/output.c (output_skeleton): Likewise.
11323 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
11324 instead of errno.
11325 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
11326 Likewise.
11327 (handle_action_dollar, handle_action_at): Likewise.
11328 * src/system.h: Do not include <errno.h>.
11329 (TAB_EXT): Renamed from EXT_TAB.
11330 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
11331
11332 Avoid str[a-z]*, since <string.h> reserves that name space.
11333 Change all instances of "struniq" in names to "uniqstr", and
11334 likewise for "STRUNIQ" and "UNIQSTR".
11335 * src/uniqstr.c: Renamed from src/struniq.c.
11336 * src/uniqstr.h: Renamed from src/struniq.h.
11337 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
11338 * src/files.c (strsuffix): Remove; unused.
11339 (concat2): Renamed from stringappend. Now static.
11340 * src/files.h (strsuffix, stringappend): Remove; unused.
11341 * src/parse-gram.y (<chars>): Renamed from <string>.
11342 (<uniqstr>): Renamed from <struniq>.
11343 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
11344 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
11345 (struct graph_s.expand): Renamed from struct graph_s.stretch.
11346 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
11347 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
11348 (N_EXPAND): Renamed from N_STRETCH.
11349
11350 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
11351 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
11352 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
11353 Remove; unused.
11354 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
11355 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
11356 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
11357 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
11358 (BASE_MAXIMUM): Renamed from BASE_MAX.
11359 (BASE_MINIMUM): Renamed from BASE_MIN.
11360 (ACTION_MAX): Remove; unused.
11361 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
11362 Unnecessary casts removed from above defines.
11363
11364
11365 Fix misspelling in names.
11366 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
11367 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
11368 G_NODE_ALIGNEMENT.
11369
11370
11371 * lib/timevar.c (timevar_report): Renamed from time_report,
11372 for consistency with other names.
11373 * lib/timevar.h (timevar_report): New decl.
11374 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
11375
11376
11377 Sort include-file uses.
11378
11379 Reorder all include files under src to be in the order "system.h".
11380 then the ../lib include files in angle brackets (alphabetized),
11381 then the . include files in double-quotes (alphabetized). Fix
11382 dependency breakages encountered in this process, as follows:
11383 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
11384 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
11385 * src/state.h: Include "symtab.h".
11386
11387 2002-12-08 Paul Eggert <eggert@twinsun.com>
11388
11389 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
11390 since this causes problems when __file__ contains character
11391 sequences like "@" that are treated specially by src/scan-skel.l.
11392 Instead, just use the file's basename. This fixes the bug
11393 reported by Martin Mokrejs in
11394 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
11395
11396 2002-12-06 Paul Eggert <eggert@twinsun.com>
11397
11398 Add support for rules that do not have trailing semicolons, as
11399 POSIX requires. Improve the quality of locations in Bison
11400 diagnostics.
11401
11402 * src/location.c: Include <quotearg.h>.
11403 (empty_location): Now const.
11404 (location_print): New function. Follow the recommendation of the
11405 GNU Coding Standards for locations that span file boundaries.
11406 * src/location.h: Do not include <quotearg.h>; no longer needed.
11407 (boundary): New type.
11408 (location_t): Use it. This allows locations to span file boundaries.
11409 All member uses changed: file -> start.file or end.file (as needed),
11410 first_line -> start.line, first_column -> start.column,
11411 last_line -> end.line, last_column -> end.column.
11412 (equal_boundaries): New function.
11413 (LOCATION_RESET, LOCATION_STEP): Remove.
11414 (LOCATION_PRINT): Remove. All callers changed to use location_print.
11415 (empty_location): Now const.
11416 (location_print): New decl.
11417 * src/parse-gram.y (lloc_default): New function, which handles
11418 empty locations more accurately.
11419 (YYLLOC_DEFAULT): Use it.
11420 (%token COLON): Remove.
11421 (%token ID_COLON): New token.
11422 (rules): Use it.
11423 (declarations, rules): Remove trailing semicolon.
11424 (declaration, rules_or_grammar_declaration):
11425 Allow empty (";") declaration.
11426 (symbol_def): Remove empty actions; no longer needed.
11427 (rules_or_grammar_declaration): Remove trailing semicolon.
11428 (semi_colon.opt): Remove.
11429 * src/reader.h: Include location.h.
11430 (scanner_cursor): New decl.
11431 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
11432 rolling our own.
11433 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
11434 of *loc.
11435 (STEP): Remove. No longer needed, now that adjust_location does
11436 the work. All uses removed.
11437 (scanner_cursor): New var.
11438 (adjust_location): Renamed from extend_location. It now sets
11439 *loc and adjusts the scanner cursor. All uses changed.
11440 Don't bother testing for CR.
11441 (handle_syncline): Remove location arg; now updates scanner cursor.
11442 All callers changed.
11443 (unexpected_end_of_file): Now accepts start boundary of token or
11444 comment, not location. All callers changed. Update scanner cursor,
11445 not the location.
11446 (SC_AFTER_IDENTIFIER): New state.
11447 (context_state): Renamed from c_context. All uses changed.
11448 (id_loc, code_start, token_start): New local vars.
11449 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
11450 processing of Yacc white space and equivalents here.
11451 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
11452 instead of returning ID immediately, since we need to search for
11453 a subsequent colon.
11454 (<INITIAL>"'", "\""): Save token_start.
11455 (<INITIAL>"%{", "{", "%%"): Save code_start.
11456 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
11457 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
11458 BEGIN context_state at end, not INITIAL.
11459 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
11460 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
11461 Return correct token start.
11462 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
11463 the start of a character, string or multiline comment is found.
11464 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
11465 Reduction): Adjust reported locations to match the more-precise
11466 results now expected.
11467 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
11468 * tests/reduce.at (Useless Rules, Reduced Automaton,
11469 Underivable Rules): Likewise.
11470 * tests/regression.at (Invalid inputs): No longer `expecting ";"
11471 or "|"' now that so many other tokens are allowed by the new grammar.
11472
11473 * src/complain.h (current_file): Remove duplicate decl;
11474 current_file is now owned by files.h.
11475 * src/complain.c, src/scan-gram.l: Include files.h.
11476
11477 2002-12-06 Paul Eggert <eggert@twinsun.com>
11478
11479 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
11480 promotes to int; it might be unsigned int.
11481 * data/yacc.c (yy_reduce_print): Likewise.
11482
11483 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
11484 be #defined in the prologue, not in the Bison declarations.
11485 This fixes Debian Bug 102878, reported by Shaul Karl.
11486
11487 2002-12-02 Paul Eggert <eggert@twinsun.com>
11488
11489 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
11490 * lib/strtoul.c: New file, from gnulib.
11491 This fixes a porting bug reported by Peter Klein in
11492 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
11493
11494 2002-11-30 Paul Eggert <eggert@twinsun.com>
11495
11496 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
11497 and put only a forward declaration in the prologue. This is for
11498 consistency with the other scanner helper functions.
11499
11500 Type clashes now generate warnings, not errors, since it
11501 appears that POSIX may allow some grammars with type clashes.
11502 * src/reader.c (grammar_current_rule_check): Warn about
11503 type clashes instead of complaining.
11504 * tests/input.at (Type Clashes): Expect warnings, not complaints.
11505
11506 Add Yacc library, since POSIX requires it.
11507 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
11508 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
11509 * lib/main.c, lib/yyerror.c: New files.
11510
11511 gram_error can be static; it need not be extern.
11512 * src/reader.h (gram_error): Remove decl.
11513 * src/parse-gram.y (gram_error): Now static. Add static decl.
11514 (print_token_value): Omit parameter names from forward decl,
11515 for consistency.
11516
11517 2002-11-29 Paul Eggert <eggert@twinsun.com>
11518
11519 * doc/bison.texinfo: Emphasize that yylex and yyerror must
11520 be declared before being used. E.g., one should typically
11521 declare them in the prologue. Use GNU coding style in examples.
11522 Put "const" consistently after the type it modifies. Mention
11523 that C99 supports "inline". Mention that yyerror traditionally
11524 returns "int".
11525
11526 %parse-param and %lex-param now take just one argument, the
11527 declaration; the argument name is deduced from the declaration.
11528
11529 * doc/bison.texinfo (Parser Function, Pure Calling, Error
11530 Reporting, Table of Symbols): Document this.
11531 * src/parse-gram.y (add_param): New function.
11532 (COMMA): Remove.
11533 (declaration): Implement new rule for %parse-param and %lex-param.
11534 * src/scan-gram.l: "," now elicits a warning, rather than being
11535 a token; this is more compatible with byacc.
11536 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
11537
11538 2002-11-27 Paul Eggert <eggert@twinsun.com>
11539
11540 Rename identifiers to avoid real and potential collisions.
11541
11542 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
11543 to avoid collision with lex macro described by Bruce Lilly in
11544 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
11545 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11546 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
11547 * src/parse-gram.y (print_token_value): Renamed from yyprint.
11548 All uses changed.
11549 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
11550 The name "yycontrol" violates the name space rules, and this stuff
11551 wasn't being used anyway.
11552 (input): Remove action; this stuff wasn't being used.
11553 (gram_error): Rename local variable yylloc -> loc.
11554 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
11555 (YY_DECL): Don't use "yy" at start of local variables.
11556 All uses changed, e.g., yylloc -> loc.
11557 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
11558 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
11559 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
11560 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
11561
11562 * src/parse-gram.y (gram_error): loc is now const *.
11563 * src/reader.h (gram_error): Likewise.
11564
11565 2002-11-24 Paul Eggert <eggert@twinsun.com>
11566
11567 Version 1.75c.
11568
11569 * tests/actions.at (Actions after errors): Use an output format
11570 more similar to that of the Printers and Destructors test.
11571 Test the position of the ';' token too.
11572 (Printers and Destructors): Likewise.
11573 (Printers and Destructors: %glr-parser): Remove for now, to avoid
11574 unnecessarily alarming people when the test fails.
11575
11576 * data/yacc.c (yyerrlab1): Move this label down, so that the
11577 parser does not discard the lookahead token if the user code
11578 invokes YYERROR. This change is required for POSIX conformance.
11579
11580 * lib/error.c: Sync with gnulib.
11581
11582 2002-11-22 Paul Eggert <eggert@twinsun.com>
11583
11584 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
11585 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
11586 * lib/xmalloc.c: Likewise.
11587
11588 2002-11-20 Paul Eggert <eggert@twinsun.com>
11589
11590 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
11591
11592 2002-11-20 Paul Eggert <eggert@twinsun.com>
11593
11594 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
11595 should use `if (! x) abort ();' rather than `assert (x);', and
11596 anyway it's one less thing to worry about configuring.
11597
11598 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
11599 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
11600 and replace all instances of assert with abort.
11601 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
11602 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
11603
11604 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
11605 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
11606 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
11607 hash_find_entry, hash_rehash, hash_insert): Likewise.
11608 * src/conflicts.c (resolve_sr_conflict): Likewise.
11609 * src/lalr.c (set_goto_map, map_goto): Likewise.
11610 * src/nullable.c (nullable_compute): Likewise.
11611 * src/output.c (prepare_rules, token_definitions_output): Likewise.
11612 * src/reader.c (packgram, reader): Likewise.
11613 * src/state.c (state_new, state_free, state_transitions_set,
11614 state_reduction_find): Likewise.
11615 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
11616 symbol_pack): Likewise.
11617 * src/tables.c (conflict_row, pack_vector): Likewise.
11618 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
11619 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
11620 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
11621 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
11622
11623 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
11624 (ARGMATCH_CONSTRAINT): New macro.
11625 (ARGMATCH_ASSERT): Use it.
11626
11627 * src/system.h (verify): New macro.
11628 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
11629 rather than assert.
11630 * src/tables.c (tables_generate): Likewise.
11631
11632 * src/struniq.c (struniq_assert): Now returns void, and aborts
11633 if the assertion is false.
11634 (struniq_assert_p): Remove.
11635 * src/struniq.h: Likewise.
11636
11637 2002-11-18 Paul Eggert <eggert@twinsun.com>
11638
11639 * data/glr.c (yygetLRActions): Replace `yyindex' with
11640 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
11641 This fixes the regression with Sun ONE Studio 7 cc that I reported in
11642 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
11643
11644 2002-11-18 Akim Demaille <akim@epita.fr>
11645
11646 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
11647 space.
11648 From Tim Van Holder.
11649
11650 2002-11-17 Paul Eggert <eggert@twinsun.com>
11651
11652 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
11653 to "SyntaxError" for consistency with my 2002-11-15 change.
11654
11655 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
11656 not define to {}, since this breaks the common use of `YYDPRINTF
11657 ((...));' if a single statement is desired (e.g. before `else').
11658 Work around GCC warnings by surrounding corresponding calls with
11659 {} if needed.
11660 (yyhasResolvedValue): Remove unused function.
11661 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
11662 loop body.
11663 (yyreportSyntaxError): Renamed from yyreportParseError.
11664 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
11665 All uses changed.
11666 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
11667 extern when possible. Remove unused initializations.
11668
11669 2002-11-16 Akim Demaille <akim@epita.fr>
11670
11671 Augment the similarity between GLR and LALR traces.
11672
11673 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
11674 (YY_REDUCE_PRINT): New.
11675 (yyparse): Use them.
11676 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
11677 YYDPRINT here.
11678 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
11679 state reached after the reduction/recovery, since...
11680 (yyparse, yyprocessOneStack): Report the state we are entering in.
11681
11682 2002-11-16 Akim Demaille <akim@epita.fr>
11683
11684 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
11685 Add support for --trace=skeleton.
11686 * src/scan-skel.l: %option debug.
11687 Scan strings of non-@ or \n instead of character by character.
11688 (scan_skel): Handle trace_skeleton.
11689 (QPUTS): New.
11690 (@output_parser_name@, @output_header_name@): ``Restore'' their
11691 support (used to be M4 macros).
11692 * data/yacc.c: Quote larger chunks, a la glr.c.
11693 * data/lalr1.cc: Likewise.
11694 The header guards are no longer available, so use some other
11695 string than `YYLSP_NEEDED'.
11696
11697 2002-11-16 Akim Demaille <akim@epita.fr>
11698
11699 Make the ``Printers and Destructors'' test more verbose, taking
11700 `yacc.c''s behavior as (possibly wrong) reference.
11701
11702 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
11703 instead of fprint on stdout.
11704 Set and report the last_line of the symbols.
11705 Consistently display values and locations.
11706
11707 2002-11-16 Paul Eggert <eggert@twinsun.com>
11708
11709 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
11710
11711 2002-11-15 Paul Eggert <eggert@twinsun.com>
11712
11713 * tests/actions.at (Actions after errors): New test case.
11714
11715 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
11716 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
11717 tests/action.at, tests/calc.at, tests/conflicts.at,
11718 tests/cxx-type.at, tests/regression.at:
11719 "parse error" -> "syntax error" for POSIX compatibility.
11720 "parsing stack overflow..." -> "parser stack overflow" so
11721 that code matches Bison documentation.
11722
11723 2002-11-15 Akim Demaille <akim@epita.fr>
11724
11725 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
11726 take two BRACED_CODE, not two string_content.
11727 Free the scanner's obstack when we are done.
11728 (code_content): New.
11729 * tests/calc.at: Adjust.
11730 * doc/bison.texinfo: Adjust.
11731 Also, make sure to include the `,' for these declarations.
11732
11733 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
11734
11735 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
11736 definition; avoids potential autoreconf problems.
11737
11738 2002-11-15 Akim Demaille <akim@epita.fr>
11739
11740 Always check the value returned by yyparse.
11741
11742 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
11743 returned by yyparse.
11744 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
11745 Adjust calls.
11746 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
11747 returned by yyparse.
11748
11749 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11750
11751 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
11752 on input.at test.
11753
11754 2002-11-14 Paul Eggert <eggert@twinsun.com>
11755
11756 * src/output.c (output_skeleton): Call xfopen instead of
11757 duplicating xfopen's body.
11758
11759 Fix bugs reported by Nelson H. F. Beebe in
11760 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
11761
11762 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
11763 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
11764 Group compiler. Instead, use "$CC -E bar.c". Include the .h
11765 file twice in the grammar, as an extra check.
11766
11767 * tests/input.at (Torturing the Scanner): Surround the
11768 backslash-newline tests with "#if 0", to make it less likely that
11769 we'll run into compiler bugs. Bring back solitary \ inside
11770 comment, but add a closing comment to work around HP C bug. Don't
11771 test backslash-newline in C character constant.
11772
11773 2002-11-14 Akim Demaille <akim@epita.fr>
11774
11775 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
11776 status of the compiler.
11777 Calling `exit 1' is no longer needed.
11778 Reported by Nelson H. F. Beebe.
11779
11780 2002-11-14 Akim Demaille <akim@epita.fr>
11781
11782 * tests/atlocal.in (CPPFLAGS): We have config.h.
11783 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
11784 New.
11785 * tests/actions.at, tests/calc.at, tests/conflicts.at,
11786 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
11787 * tests/regression.at, tests/torture.at: Use them for all the
11788 grammars that are to be compiled.
11789 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
11790 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
11791 * doc/bison.texinfo (GLR Parsers): Document `inline'.
11792
11793 2002-11-14 Akim Demaille <akim@epita.fr>
11794
11795 * doc/bison.texinfo: Various formatting changes (alignments in
11796 samples, additional @group/@end group, GCS in samples.
11797 Use @deffn instead of simple @table to define the directives,
11798 macros, variables etc.
11799
11800 2002-11-13 Paul Eggert <eggert@twinsun.com>
11801
11802 Fix some bugs reported by Albert Chin-A-Young in
11803 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
11804
11805 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
11806 -o c"; the HP C compiler chatters during compilation.
11807 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
11808 * tests/headers.at (export YYLTYPE): Likewise.
11809
11810 * tests/input.at (Torturing the Scanner): Remove lines containing
11811 solitary backslashes, as they tickle a bug in the HP C compiler.
11812
11813 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
11814 comments, since they're not portable. Use GNU coding style.
11815
11816 2002-11-13 Akim Demaille <akim@epita.fr>
11817
11818 * data/yacc.c: Leave bigger chunks of quoted text.
11819 (YYDSYMPRINTF): New.
11820 Use it to report symbol activities.
11821 * data/glr.c (YYDSYMPRINTF): New.
11822 Use it.
11823
11824 2002-11-12 Paul Eggert <eggert@twinsun.com>
11825
11826 Version 1.75b.
11827
11828 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
11829 (yyglrReduce): Return yyok, not 0.
11830 This should avoid the enumerated-type warnings reported
11831 by Nelson H. F. Beebe in
11832 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
11833
11834 * lib/bbitset.h (BITSET_INLINE): Remove.
11835 * lib/bitset.h [! BITSET_INLINE]: Remove.
11836 (bitset_set, bitset_reset, bitset_test): Rename local vars
11837 to avoid shadowing warnings by GCC.
11838
11839 * data/glr.c (inline): Remove #define. It's the user's
11840 responsibility to #define it away, just like 'const'.
11841 This fixes one of the bugs reported by Nelson H. F. Beebe in
11842 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
11843
11844 * Makefile.maint (po-check): Scan .l and .y files instead of the
11845 .c and the .h files that they generate. This fixes the bug
11846 reported by Tim Van Holder in:
11847 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
11848 Look for N_ as well as for _. Try to avoid matching #define for
11849 N_ and _.
11850 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
11851 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
11852 * src/scan-gram.l: Revamp regular expressions so that " and '
11853 do not confuse xgettext.
11854
11855 * src/struniq.h (struniq_new): Do not declare the return type
11856 to be 'const'; this violates the C standard.
11857 * src/struniq.c (struniq_new): Likewise.
11858
11859 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
11860
11861 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
11862 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
11863 linker.
11864
11865 2002-11-12 Akim Demaille <akim@epita.fr>
11866
11867 * Makefile.maint: Sync with Autoconf:
11868 (local_updates): New.
11869
11870 2002-11-12 Akim Demaille <akim@epita.fr>
11871
11872 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
11873
11874 2002-11-12 Akim Demaille <akim@epita.fr>
11875
11876 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
11877 locations.
11878
11879 2002-11-12 Akim Demaille <akim@epita.fr>
11880
11881 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
11882 not yyvalue.
11883
11884 2002-11-12 Akim Demaille <akim@epita.fr>
11885
11886 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
11887 Use it to test the GLR parser.
11888
11889 2002-11-12 Akim Demaille <akim@epita.fr>
11890
11891 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
11892 defines it.
11893 * data/glr.c (yystos): New.
11894 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
11895 (YYDSYMPRINT): New.
11896 (yyval): Don't define it, it is handled via M4.
11897 (yyrecoverParseError): Free verbosely the discarded symbols.
11898 * data/yacc.c (yysymprint): Remove, rather...
11899 (b4_yysymprint_generate): invoke.
11900 * data/c.m4 (b4_yysymprint_generate): New.
11901 Accept pointers as arguments, as opposed to the version from
11902 yacc.c.
11903 (b4_yydestruct_generate): Likewise.
11904 * tests/cations.at (Printers and Destructors): Use Bison directives
11905 instead of CPP macros.
11906 Don't rely on internal details.
11907
11908 2002-11-12 Akim Demaille <akim@epita.fr>
11909
11910 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
11911 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
11912 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
11913 it against YYEMPTY and so forth), work on yytoken (i.e., set
11914 it to YYEMPTY etc.).
11915 (yydestruct): Replace with a b4_yydestruct_generate invocation.
11916 (b4_symbol_actions): Remove.
11917 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
11918 for 0, end-of-input.
11919
11920 2002-11-12 Akim Demaille <akim@epita.fr>
11921
11922 * doc/bison.texinfo (Destructor Decl): New.
11923
11924 2002-11-12 Akim Demaille <akim@epita.fr>
11925
11926 * src/tables.c (tables_generate): Use free for pointers that
11927 cannot be NULL, not XFREE.
11928 (pack_vector): Use assert, not fatal, for bound violations.
11929 * src/state.c (state_new): Likewise.
11930 * src/reader.c (reader): Likewise.
11931 * src/lalr.c (set_goto_map): Likewise.
11932 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
11933 the file name.
11934
11935 2002-11-12 Akim Demaille <akim@epita.fr>
11936
11937 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
11938 Restore.
11939 * src/scan-gram.l (last_string): Is global to the file, not to
11940 yylex.
11941 * src/parse-gram.y (input): Don't append the epilogue here,
11942 (epilogue.opt): do it here, and free the scanner's obstack.
11943 * src/reader.c (epilogue_set): Rename as...
11944 (epilogue_augment): this.
11945 * data/c.m4 (b4_epilogue): Defaults to empty.
11946
11947 2002-11-12 Akim Demaille <akim@epita.fr>
11948
11949 * src/getargs.c (long_options): Remove duplicates.
11950 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
11951 Remove.
11952 * doc/bison.rnh: Remove.
11953 * doc/bison.texinfo (VMS Invocation): Remove.
11954
11955 2002-11-12 Akim Demaille <akim@epita.fr>
11956
11957 * src/struniq.h, src/struniq.c (struniq_t): Is const.
11958 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
11959
11960 Use struniq for symbols.
11961
11962 * src/symtab.h (symbol_t): The tag member is a struniq.
11963 (symbol_type_set): Adjust.
11964 * src/symtab.c (symbol_new): Takes a struniq.
11965 (symbol_free): Don't free the tag member.
11966 (hash_compare_symbol_t, hash_symbol_t): Rename as...
11967 (hash_compare_symbol, hash_symbol): these.
11968 Use the fact that tags as struniqs.
11969 (symbol_get): Use struniq_new.
11970 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
11971 Returns a strniq.
11972 * src/reader.h (merger_list, grammar_currentmerge_set): The name
11973 and type members are struniqs.
11974 * src/reader.c (get_merge_function)
11975 (grammar_current_rule_merge_set): Adjust.
11976 (TYPE, current_type): Are struniq.
11977
11978 Use struniq for file names.
11979
11980 * src/files.h, src/files.c (infile): Split into...
11981 (grammar_file, current_file): these.
11982 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
11983 * src/reduce.c (reduce_print): Likewise.
11984 * src/getargs.c (getargs): Likewise.
11985 * src/complain.h, src/complain.c: Likewise.
11986 * src/main.c (main): Call struniqs_new early enough to use it for
11987 file names.
11988 Don't free the input file name.
11989
11990 2002-11-12 Akim Demaille <akim@epita.fr>
11991
11992 * src/symtab.c (symbol_free): Remove dead deactivated code:
11993 type_name are properly removed.
11994 Don't use XFREE to free items that cannot be NULL.
11995 * src/struniq.h, src/struniq.c: New.
11996 * src/main.c (main): Initialize/free struniqs.
11997 * src/parse-gram.y (%union): Add astruniq member.
11998 (yyprint): Adjust.
11999 * src/scan-gram.l (<{tag}>): Return a struniq.
12000 Free the obstack bit that used to store it.
12001 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
12002
12003 2002-11-11 Paul Eggert <eggert@twinsun.com>
12004
12005 Revamp to fix many (but not all) of the C- and M4-related quoting
12006 problems. Among other things, this fixes the Bison bug reported
12007 by Jan Hubicka when processing the Bash grammar; see:
12008 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
12009
12010 Use new @ escapes consistently. Represent brackets with @{ and @}
12011 rather than @<:@ and @:>@, since this works a bit better with dumb
12012 editors like vi. Represent @ with @@, since @ is now consistently
12013 an escape. Use @oline@ and @ofile@ rather than __oline__ and
12014 __ofile__, to avoid unexpected expansions. Similarly, use @output
12015 rather than #output.
12016
12017 * data/c.m4 (b4_copyright): Omit file name from comment, since
12018 the file name could contain "*/".
12019 (b4_synclines_flag): Don't quote the 2nd argument; it should already
12020 be quoted. All uses changed.
12021
12022 * data/glr.c: Use new @ escapes consistently.
12023 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
12024 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
12025 Remove, since they couldn't handle arbitrary characters in file
12026 names.
12027 * data/lalr1.cc: Likewise.
12028 * data/yacc.c: Likewise.
12029
12030 * src/files.c (output_infix): Remove; all uses removed.
12031 * src/files.h: Likewise.
12032
12033 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
12034 mishandled funny characters in file names, and anyway it isn't
12035 needed any more.
12036 * data/yacc.c: Likewise.
12037 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
12038
12039 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
12040 * data/yacc.c: Likewise.
12041
12042 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
12043 strings now.
12044 (muscle_init): Quote filename as a C string.
12045 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
12046 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
12047 * src/output.c (escaped_file_name_output): New function.
12048 (prepare_symbols): Quote tokens for M4.
12049 (prepare): Don't insert output_infix, output_prefix,
12050 output_parser_name, output_header_name; this is now down by scan-skel.
12051 Insert skeleton as a C string.
12052
12053 * src/output.c (user_actions_output, symbol_destructors_output,
12054 symbol_printers_output): Quote filenames for C and M4.
12055 * src/reader.c (prologue_augment, epilogue_set): Likewise.
12056
12057 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
12058 escapes other than \\ and \'; this simplifies the code.
12059 (<SC_STRING>): Likewise, for \\ and \".
12060 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
12061 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
12062 Use new escapes @{ and @} for [ and ].
12063
12064 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
12065 them with auto vars.
12066 Switch to new escape scheme, where @ is the escape character uniformly.
12067 Abort if a stray escape character is found. Avoid unbounded input
12068 buffer when parsing non-escaped text.
12069
12070 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
12071 __oline__, #output, $@, and @{ do not have unintended meanings.
12072
12073 2002-11-09 Paul Eggert <eggert@twinsun.com>
12074
12075 Fix the test failure due to GCC warnings described in
12076 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
12077 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
12078 evaluate to 0 if it's impossible for NINF to be in the respective
12079 table.
12080 (yygetLRActions, yyrecoverParseError): Use them.
12081
12082 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
12083 counted in the token inserted at end of file. Now takes
12084 location_t *, not location_t, so that the location can be
12085 adjusted. All uses changed.
12086
12087 * tests/regression.at (Invalid inputs): Adjust wording in
12088 diagnostic to match the new behavior.
12089
12090 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
12091 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
12092 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
12093 abort ();'. This reduces the runtime of the "Many lookaheads"
12094 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
12095 GCC 3.2.
12096
12097 2002-11-07 Paul Eggert <eggert@twinsun.com>
12098
12099 * src/parse-gram.y (CHARACTER): Remove unused token.
12100 All uses removed.
12101
12102 * src/scan-gram.l: Remove stack option. We no longer use the
12103 stack, since the stack was never deeper than 1; instead, use the
12104 new auto var c_context to record the stacked value.
12105
12106 Remove nounput option. At an unexpected end of file, we now unput
12107 the minimal input necessary to end cleanly; this simplifies the
12108 code.
12109
12110 Avoid unbounded token sizes where this is easy.
12111
12112 (unexpected_end_of_file): New function.
12113 Use it to systematize the error message on unexpected EOF.
12114 (last-string): Now auto, not static.
12115 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
12116 (scanner_last_string_free): Remove; not used.
12117 (percent_percent_count): Move decl to just before use.
12118 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
12119 not the (never otherwised-used) CHARACTER.
12120
12121 2002-11-07 Akim Demaille <akim@epita.fr>
12122
12123 Let yyerror always receive the msg as last argument, so that
12124 yyerror can be variadic.
12125
12126 * data/yacc.c (b4_yyerror_args): New.
12127 Use it when calling yyerror.
12128 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
12129 Use it when calling yyerror.
12130 * doc/bison.texinfo (Error Reporting): Adjust.
12131 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
12132 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
12133
12134 2002-11-06 Akim Demaille <akim@epita.fr>
12135
12136 #line should have quoted strings.
12137 Ideally, this should be done by m4_quotearg.
12138
12139 * src/scan-skel.l: Include quotearg.h.
12140 Quote __ofile__.
12141 * src/output.c (symbol_printers_output)
12142 (symbol_destructors_output): Quote the file name.
12143
12144 2002-11-06 Akim Demaille <akim@epita.fr>
12145
12146 * tests/regression.at (Invalid inputs): Adjust to the recent
12147 messages.
12148
12149 2002-11-06 Akim Demaille <akim@epita.fr>
12150
12151 Restore --no-lines.
12152 Reported by Jim Kent.
12153
12154 * data/c.m4 (b4_syncline): New.
12155 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
12156 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
12157 * src/output.c (user_actions_output): Likewise.
12158 (prepare): Define 'b4_synclines_flag'.
12159 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
12160
12161 2002-11-06 Akim Demaille <akim@epita.fr>
12162
12163 * src/main.c (main): Free `infile'.
12164 * src/scan-gram.l (handle_syncline): New.
12165 Recognize `#line'.
12166 * src/output.c (user_actions_output, symbol_destructors_output)
12167 (symbol_printers_output): Use the location's file name, not
12168 infile.
12169 * src/reader.c (prologue_augment, epilogue_set): Likewise.
12170
12171 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12172
12173 * src/tables.c (matching_state): Don't allow states to match if
12174 either has GLR conflict entries.
12175
12176 2002-11-05 Paul Eggert <eggert@twinsun.com>
12177
12178 * src/scan-gram.l: Use more accurate diagnostics, e.g.
12179 "integer out of range" rather than "invalid value".
12180 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
12181 accordingly.
12182
12183 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
12184 Also, remove one static variable in the scanner.
12185
12186 * src/scan-gram.l (braces_level): Now auto, not static.
12187 Initialize to zero if the compiler is being picky.
12188 (INITIAL): Clear braces_level instead of incrementing it.
12189 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
12190 as POSIX 1003.1-2001 requires.
12191 * src/system.h (IF_LINT): New macro, taken from coreutils.
12192 * configure.ac: Define "lint" if --enable-gcc-warnings.
12193
12194 2002-11-05 Akim Demaille <akim@epita.fr>
12195
12196 * src/scan-gram.l: When it starts with `%', complain about the
12197 whole directive, not just that `invalid character: %'.
12198
12199 2002-11-04 Akim Demaille <akim@epita.fr>
12200
12201 * Makefile.maint: Update from Autoconf.
12202 (update, cvs-update, po-update, do-po-update): New.
12203
12204 2002-11-04 Akim Demaille <akim@epita.fr>
12205
12206 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
12207 and yyerror.
12208 Have yyerror `use' its arguments.
12209 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
12210 returns true when location & yacc & pure & parse-param.
12211 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
12212
12213 2002-11-04 Akim Demaille <akim@epita.fr>
12214
12215 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
12216 clashes.
12217 * src/scan-gram.l: Use [\'] instead of ['] to pacify
12218 font-lock-mode.
12219 Use complain_at.
12220 Use quote, not quote_n since LOCATION_PRINT no longer uses the
12221 slot 0.
12222
12223 2002-11-03 Paul Eggert <eggert@twinsun.com>
12224
12225 * src/reader.c (get_merge_function, grammar_current_rule_check):
12226 Use consistent diagnostics for reporting type name clashes.
12227 Quote the types with <>, for consistency with Yacc.
12228 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
12229
12230 2002-11-03 Akim Demaille <akim@epita.fr>
12231
12232 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
12233 New.
12234 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
12235 (b4_parse_param): Remove.
12236 Use b4_identification.
12237 Propagate b4_pure_args where needed to pass them to yyerror.
12238 * data/glr.m4 (b4_parse_param): Remove.
12239 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
12240 (b4_lpure_formals): New.
12241 Use b4_identification.
12242 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
12243 b4_user_formals and b4_user_args.
12244 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
12245 (yyreportAmbiguity): When using a pure parser, also need
12246 the location, and the parse-params.
12247 Adjust callers.
12248 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
12249 When using a pure parser, also need the parse-params.
12250 Adjust callers.
12251 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
12252 (%pure-parser + %parse-param) LALR and GLR parsers.
12253 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
12254 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
12255 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
12256 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
12257 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
12258 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
12259 * doc/bison.texinfo: Untabify the whole file.
12260 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
12261 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
12262 (Error Reporting): Adjust to these new directives.
12263 Document %error-verbose, deprecate YYERROR_VERBOSE.
12264
12265 2002-11-03 Akim Demaille <akim@epita.fr>
12266
12267 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
12268 AT_CHECK_CALC_GLR invocations to use % directives, instead of
12269 command line options.
12270 * tests/cxx-type.at: Formatting changes.
12271
12272 2002-11-03 Paul Eggert <eggert@twinsun.com>
12273
12274 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
12275 to count columns correctly, and to check for invalid inputs.
12276
12277 Use mbsnwidth to count columns correctly. Account for tabs, too.
12278 Include mbswidth.h.
12279 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
12280 (extend_location): New function.
12281 (YY_LINES): Remove.
12282
12283 Handle CRLF in C code rather than in Lex code.
12284 (YY_INPUT): New macro.
12285 (no_cr_read): New function.
12286
12287 Scan UCNs, even though we don't fully handle them yet.
12288 (convert_ucn_to_byte): New function.
12289
12290 Handle backslash-newline correctly in C code.
12291 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
12292 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
12293 all uses changed.
12294 (tag, splice): New EREs. Do not allow NUL or newline in tags.
12295 Use {splice} wherever C allows backslash-newline.
12296 YY_STEP after space, newline, vertical-tab.
12297 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
12298
12299 (letter, id): Don't assume ASCII; e.g., spell out a-z.
12300
12301 ({int}, handle_action_dollar, handle_action_at): Check for integer
12302 overflow.
12303
12304 (YY_STEP): Omit trailing semicolon, so that it's more like C.
12305
12306 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
12307 as well as \000. Check for UCHAR_MAX, not 255.
12308 Allow \x with an arbitrary positive number of digits, as in C.
12309 Check for overflow here.
12310 Allow \? and UCNs, for compatibility with C.
12311
12312 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
12313 with quote slot used by complain_at.
12314
12315 * tests/input.at: Add tests for backslash-newline, m4 quotes
12316 in symbols, long literals, and funny escapes in strings.
12317
12318 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
12319 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
12320 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
12321 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
12322 * m4/mbswidth.m4: New file, from GNU coreutils.
12323
12324 * doc/bison.texinfo (Grammar Outline): Document // comments.
12325 (Symbols): Document that trigraphs have no special meaning in Bison,
12326 nor is backslash-newline allowed.
12327 (Actions): Document that trigraphs have no special meaning.
12328
12329 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
12330 no longer used.
12331
12332 2002-11-02 Paul Eggert <eggert@twinsun.com>
12333
12334 * src/reader.c: Don't include quote.h; not needed.
12335 (get_merge_function): Reword warning to be consistent with
12336 type clash diagnostic in grammar_current_rule_check.
12337
12338 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
12339 bug in trigraph handling.
12340
12341 * src/output.c (prepare_symbols): When printing token names,
12342 escape "[" as "@<:@" and likewise for "]".
12343
12344 * src/system.h (errno): Remove declaration, as we are now
12345 assuming C89 or better, and C89 guarantees errno.
12346
12347 2002-10-30 Paul Eggert <eggert@twinsun.com>
12348
12349 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
12350 Check for close failures.
12351 * src/files.h (xfclose): Return void, not int, since it always
12352 returned zero.
12353 * src/files.c (xfclose): Likewise. Report I/O error if ferror
12354 indicates one.
12355 * src/output.c (output_skeleton): Use xfclose rather than fclose
12356 and ferror. xfclose now checks ferror.
12357
12358 * data/glr.c (YYLEFTMOST_STATE): Remove.
12359 (yyreportTree): Use a stack-based leftmost state. This avoids
12360 our continuing battles with bogus warnings about initializers.
12361
12362 2002-10-30 Akim Demaille <akim@epita.fr>
12363
12364 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
12365 #if.
12366
12367 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12368
12369 * tests/glr-regr1.at: New test for reported regressions.
12370 * tests/testsuite.at: Add glr-regr1.at test.
12371 * tests/Makefile.am: Add glr-regr1.at test.
12372
12373 2002-10-24 Paul Eggert <eggert@twinsun.com>
12374
12375 Version 1.75a.
12376
12377 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
12378 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
12379 we use malloc. Don't assume 'A' through 'Z' are contiguous.
12380 Don't assume strdup exists; POSIX says its an XSI extension.
12381 Check for buffer overflow on input.
12382
12383 2002-10-24 Akim Demaille <akim@epita.fr>
12384
12385 * src/output.c (output_skeleton): Don't disable M4sugar comments
12386 too soon: it results in comments being expanded.
12387 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
12388 first output.
12389
12390 2002-10-24 Akim Demaille <akim@epita.fr>
12391
12392 * data/yacc.c (m4_int_type): New.
12393 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
12394 char' as only yacc.c wants K&R portability.
12395 * data/glr.c (yysigned_char): Remove.
12396 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
12397 Reported by Quoc Peyrot.
12398
12399 2002-10-23 Paul Eggert <eggert@twinsun.com>
12400
12401 * src/main.c (main): With --trace=time, report times even if a
12402 non-fatal error occurs. Formerly, the times were reported in some
12403 such cases but not in others.
12404 * src/reader.c (reader): Just return if a complaint has been issued,
12405 instead of exiting, so that 'main' can report times.
12406
12407 2002-10-22 Akim Demaille <akim@epita.fr>
12408
12409 * src/system.h: Include sys/types.
12410 Reported by Bert Deknuydt.
12411
12412 2002-10-23 Paul Eggert <eggert@twinsun.com>
12413
12414 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
12415 Suggested by Art Haas.
12416
12417 2002-10-22 Paul Eggert <eggert@twinsun.com>
12418
12419 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
12420 decl; not needed any more.
12421 * src/main.c (main): Use return to exit, undoing yesterday's change.
12422 The last OS that we could find where this wouldn't work is
12423 SunOS 3.5, and that's too old to worry about now.
12424
12425 * data/glr.c (struct yyltype): Define members even when not
12426 doing locations. This is more consistent with yacc.c, and it
12427 works around the following bug reports:
12428 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
12429 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
12430
12431 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
12432 @acronym consistently. Standardize on "Yacc" instead of "YACC",
12433 "Algol" instead of "ALGOL". Give a bit more history about BNF.
12434
12435 2002-10-22 Akim Demaille <akim@epita.fr>
12436
12437 * data/README: New.
12438
12439 2002-10-21 Paul Eggert <eggert@twinsun.com>
12440
12441 Be consistent about 'bool'; the old code used an enum in one
12442 module and an int in another, and this violates the C standard.
12443 * m4/stdbool.m4: New file, from coreutils 4.5.3.
12444 * configure.ac (AC_HEADER_STDBOOL): Add.
12445 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
12446 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
12447 * src/symtab.c (hash_compare_symbol_t): Likewise.
12448 * src/system.h (bool, false, true): Use a definition consistent
12449 with ../lib/hash.c. All uses changed.
12450
12451 * src/complain.c (warning_issued): Renamed from warn_message_count,
12452 so that we needn't worry about integer overflow (!).
12453 Now of type bool. All uses changed.
12454 (complaint_issued): Renamed from complain_message_count; likewise.
12455
12456 * src/main.c (main): Use exit to exit with failure.
12457
12458 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
12459 rather than 1 and 0.
12460 * src/main.c (main): Likewise.
12461 * src/getargs.c (getargs): Likewise.
12462 * src/reader.c (reader): Likewise.
12463
12464 * src/getarg.c (getargs): Remove duplicate code for
12465 "Try `bison --help'".
12466
12467 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
12468 What was that "2" for?
12469
12470 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
12471 * src/getargs.c (usage): Likewise.
12472
12473 * src/getargs.c (getargs): When there are too few operands, report
12474 the last one. When there are too many, report the first extra
12475 one. This is how diffutils does it.
12476
12477 2002-10-20 Paul Eggert <eggert@twinsun.com>
12478
12479 Remove K&R vestiges.
12480 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
12481 * src/complain.c (VA_START): Remove. Assume prototypes.
12482 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
12483 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
12484 fatal): Assume prototypes.
12485 * src/complain.h: Assume prototypes.
12486 * src/system.h (PARAMS): Remove.
12487 Include <limits.h> unconditionally, since it's guaranteeed even
12488 for a freestanding C89 compiler.
12489 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
12490 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
12491
12492 2002-10-20 Akim Demaille <akim@epita.fr>
12493
12494 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
12495 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
12496 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
12497 (yyresolveStates, yyresolveAction, yyresolveStack)
12498 (yyprocessOneStack): Use them.
12499 (yy_reduce_print): New.
12500 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
12501
12502 2002-10-20 Akim Demaille <akim@epita.fr>
12503
12504 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
12505 arguments and output `void'.
12506 (b4_c_function): Rename as...
12507 (b4_c_function_def): this.
12508 (b4_c_function_decl, b4_c_ansi_function_def)
12509 (b4_c_ansi_function_decl): New.
12510 Change the interpretation of the arguments: before `int, foo', now
12511 `int foo, foo'.
12512 * data/yacc.c (yyparse): Prototype and define thanks to these.
12513 Adjust b4_c_function_def uses.
12514 * data/glr.c (yyparse): Likewise, but ANSI only.
12515
12516 2002-10-20 Akim Demaille <akim@epita.fr>
12517
12518 * src/output.c (prepare): Move the definition of `tokens_number',
12519 `nterms_number', `undef_token_number', `user_token_number_max'
12520 to...
12521 (prepare_tokens): Here.
12522 (prepare_tokens): Rename as...
12523 (prepare_symbols): this.
12524 (prepare): Move the definition of `rules_number' to...
12525 (prepare_rules): here.
12526 (prepare): Move the definition of `last', `final_state_number',
12527 `states_number' to...
12528 (prepare_states): here.
12529 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
12530
12531 2002-10-20 Akim Demaille <akim@epita.fr>
12532
12533 * src/tables.h, src/tables.c, src/output.c: Comment changes.
12534
12535 2002-10-20 Akim Demaille <akim@epita.fr>
12536
12537 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
12538 * data/c.m4: here.
12539
12540 2002-10-20 Akim Demaille <akim@epita.fr>
12541
12542 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
12543 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
12544 `pair'.
12545 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
12546 `name' to...
12547 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
12548 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
12549 These.
12550
12551 2002-10-19 Paul Eggert <eggert@twinsun.com>
12552
12553 Do not create a temporary file, as that involves security and
12554 cleanup headaches. Instead, use a pair of pipes.
12555 Derived from a suggestion by Florian Krohm.
12556 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
12557 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
12558 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
12559 (BISON_PREREQ_SUBPIPE): Add.
12560 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
12561 Add subpipe.h, subpipe.c.
12562 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
12563 * po/POTFILES.in: Add lib/subpipe.c.
12564 * src/output.c: Include "subpipe.h".
12565 (m4_invoke): Remove decl.
12566 (scan_skel): New decl.
12567 (output_skeleton): Use pipe rather than temporary file for m4 input.
12568 Check that m4sugar.m4 is readable, to avoid deadlock.
12569 Check for pipe I/O error.
12570 * src/scan-skel.l (readpipe): Remove decl.
12571 (scan_skel): New function, to be used in place of m4_invoke.
12572 Read from stream rather than file.
12573
12574 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
12575 float, as this generates a warning on Solaris 8 + GCC 3.2 with
12576 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
12577 this generates a more-accurate value anyway.
12578
12579 * lib/timevar.c (timervar_accumulate): Rename locals to
12580 avoid confusion with similarly-named more-global.
12581 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
12582
12583 * src/output.c (prepare): Use xstrdup to convert char const *
12584 to char *, to avoid GCC warning.
12585
12586 2002-10-19 Akim Demaille <akim@epita.fr>
12587
12588 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
12589 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
12590 Use them to have `calc.y' ready for %pure-parser.
12591 * data/yacc.c (YYLEX): Pass a yylex return type to
12592 b4_c_function_call.
12593
12594 2002-10-19 Akim Demaille <akim@epita.fr>
12595
12596 Prototype support of %lex-param and %parse-param.
12597
12598 * src/parse-gram.y: Add the definition of the %lex-param and
12599 %parse-param tokens, plus their rules.
12600 Drop the `_' version of %glr-parser.
12601 Add the "," token.
12602 * src/scan-gram.l (INITIAL): Scan them.
12603 * src/muscle_tab.c: Comment changes.
12604 (muscle_insert, muscle_find): Rename `pair' as `probe'.
12605 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
12606 (muscle_entry_s): The `value' member is no longer const.
12607 Adjust all dependencies.
12608 * src/muscle_tab.c (muscle_init): Adjust: use
12609 MUSCLE_INSERT_STRING.
12610 Initialize the obstack earlier.
12611 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
12612 (muscle_pair_list_grow): New.
12613 * data/c.m4 (b4_c_function_call, b4_c_args): New.
12614 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
12615 * tests/calc.at: Use %locations, not --locations.
12616 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
12617
12618 2002-10-19 Akim Demaille <akim@epita.fr>
12619
12620 * src/getargs.c (usage): Take status as argument and exit
12621 accordingly.
12622 Report the traditional `Try ... --help' message when status != 0.
12623 (usage, version): Don't take a FILE * as arg, it is pointless.
12624 (getargs): When there is an incorrect number of arguments, make it
12625 an error, and report it GNUlically thanks to `usage ()'.
12626
12627 2002-10-18 Paul Eggert <eggert@twinsun.com>
12628
12629 * data/glr.c (yyreportParseError): Don't assume that sprintf
12630 yields the length of the printed string, as this is not true
12631 on SunOS 4.1.4. Reported by Peter Klein.
12632
12633 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
12634 * tests/conflicts.at (%nonassoc and eof): Likewise.
12635 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
12636
12637 2002-10-17 Akim Demaille <akim@epita.fr>
12638
12639 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
12640 * src/getargs.c (trace_types, trace_args): Adjust.
12641 * src/reader.c (grammar_current_rule_prec_set)
12642 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
12643 Standardize error messages.
12644 And s/@prec/%prec/!
12645 (reader): Use trace_flag to enable scanner/parser debugging,
12646 instead of an adhoc scheme.
12647 * src/scan-gram.l: Remove trailing debugging code.
12648
12649 2002-10-16 Paul Eggert <eggert@twinsun.com>
12650
12651 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
12652 MUSCLE_TAB_H.
12653
12654 * NEWS: Officially drop support for building Bison with K&R C,
12655 since it didn't work anyway and it's not worth worrying about.
12656 * Makefile.maint (wget_files): Remove ansi2knr.c.
12657 (ansi2knr.c-url_prefix): Remove.
12658 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
12659 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12660 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12661
12662 2002-10-15 Paul Eggert <eggert@twinsun.com>
12663
12664 Stop using the "enum_" trick for K&R-style function definitions;
12665 it confused me, and I was the author! Instead, assume that people
12666 who want to use K&R C compilers (when using these modules in GCC,
12667 perhaps?) will run ansi2knr.
12668
12669 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
12670 All uses of "enum_" changed to "enum ".
12671 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
12672 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
12673
12674 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
12675 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
12676 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
12677 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
12678 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
12679 abitset_not, abitset_ones, abitset_or, abitset_or_and,
12680 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
12681 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
12682 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
12683 Use function prototypes; this removes the need for declaring
12684 static functions simply to provide their prototypes.
12685 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
12686 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
12687 bitset_count_, bitset_create, bitset_dump, bitset_first,
12688 bitset_free, bitset_init, bitset_last, bitset_next,
12689 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
12690 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
12691 bitset_print, bitset_release_memory, bitset_toggle_,
12692 bitset_type_choose, bitset_type_get, bitset_type_name_get,
12693 debug_bitset): Likewise.
12694 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
12695 * lib/bitset_stats.c (bitset_log_histogram_print,
12696 bitset_percent_histogram_print, bitset_stats_and,
12697 bitset_stats_and_cmp, bitset_stats_and_or,
12698 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
12699 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
12700 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
12701 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
12702 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
12703 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
12704 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
12705 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
12706 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
12707 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
12708 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
12709 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
12710 bitset_stats_zero): Likewise.
12711 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12712 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12713 bitsetv_dump, debug_bitsetv): Likewise.
12714 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
12715 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
12716 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
12717 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
12718 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
12719 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
12720 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
12721 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
12722 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
12723 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
12724 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
12725 Likewise.
12726 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
12727 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
12728 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
12729 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
12730 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
12731 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
12732 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
12733 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
12734 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
12735 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
12736 lbitset_xor_cmp, lbitset_zero): Likewise.
12737
12738 2002-10-14 Akim Demaille <akim@epita.fr>
12739
12740 Version 1.75.
12741
12742 2002-10-14 Akim Demaille <akim@epita.fr>
12743
12744 * tests/Makefile.am (maintainer-check-posix): New.
12745
12746 2002-10-14 Akim Demaille <akim@epita.fr>
12747
12748 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
12749 member.
12750
12751 2002-10-14 Akim Demaille <akim@epita.fr>
12752
12753 * src/tables.c (table_ninf_remap): base -> tab.
12754 Reported by Matt Rosing.
12755
12756 2002-10-14 Paul Eggert <eggert@twinsun.com>
12757
12758 * tests/action.at, tests/calc.at, tests/conflicts.at,
12759 tests/cxx-type.at, tests/headers.at, tests/input.at,
12760 tests/regression.at, tests/synclines.at, tests/torture.at:
12761 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
12762 so that the tests still work even if POSIXLY_CORRECT is set.
12763 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
12764
12765 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
12766 for portability to K&R hosts. Fix typo: signed char is guaranteed
12767 only to 127, not to 128.
12768 * data/glr.c (yysigned_char): New type.
12769 * data/yacc.c (yysigned_char): Likewise.
12770 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
12771
12772 2002-10-13 Paul Eggert <eggert@twinsun.com>
12773
12774 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
12775 true due to limited range of data type" warning from GCC.
12776
12777 * data/c.m4 (b4_token_defines): Protect against double-inclusion
12778 by wrapping enum yytokentype's definition inside #ifndef
12779 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
12780
12781 2002-10-13 Akim Demaille <akim@epita.fr>
12782
12783 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
12784 Un yy- yyrhs to avoid the name clash with the global YYRHS.
12785
12786 2002-10-13 Akim Demaille <akim@epita.fr>
12787
12788 * Makefile.maint: Update from Autoconf 2.54.
12789 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
12790
12791 2002-10-13 Akim Demaille <akim@epita.fr>
12792
12793 * src/print.c (print_state): Separate the list of solved conflicts
12794 from the other items.
12795 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
12796
12797 2002-10-13 Akim Demaille <akim@epita.fr>
12798
12799 Let nondeterministic skeletons be usable with deterministic
12800 tables.
12801
12802 With the patch, GAWK compiled by GCC without -O2 passes its test
12803 suite using a GLR parser driven by LALR tables. It fails with -O2
12804 because `struct stat' gives two different answers on my machine:
12805 88 (definition of an auto var) and later 96 (memset on this var).
12806 Hence the stack is badly corrumpted. The headers inclusion is to
12807 blame: if I move the awk.h inclusion before GLR's system header
12808 inclusion, the two struct stat have the same size.
12809
12810 * src/tables.c (pack_table): Always create conflict_table.
12811 (token_actions): Always create conflict_list.
12812 * data/glr.c (YYFLAG): Remove, unused.
12813
12814 2002-10-13 Akim Demaille <akim@epita.fr>
12815
12816 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
12817 (O0FLAGS): New.
12818 (VALGRIND, GXX): New.
12819 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
12820 * tests/bison.in: Run $PREBISON a pre-command.
12821 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
12822 (maintainer-check-g++): New.
12823 * Makefile.am (maintainer-check): New.
12824
12825 2002-10-13 Akim Demaille <akim@epita.fr>
12826
12827 * data/glr.c: Formatting changes.
12828 Tweak some trace messages to match yacc.c's.
12829
12830 2002-10-13 Akim Demaille <akim@epita.fr>
12831
12832 GLR parsers sometimes raise parse errors instead of performing the
12833 default reduction.
12834 Reported by Charles-Henry de Boysson.
12835
12836 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
12837 check the length of the traces when %glr.
12838 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
12839 GLR's traces.
12840 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
12841 Test GLR parsers.
12842 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
12843 (yyltype): Remove the yy prefix from the member names.
12844 (yytable): Complete its comment.
12845 (yygetLRActions): Map error action number from YYTABLE from
12846 YYTABLE_NINF to 0.
12847 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
12848 (which was a bug: it should have been YYTABEL_NINF, and yet it was
12849 not satisfying as we could compare an YYACTION computed from
12850 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
12851 only value for error actions.
12852 (yyreportParseError): In verbose parse error messages, don't issue
12853 `error' in the list of expected tokens.
12854 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
12855 next action to perform to match glr.c's decoding.
12856 (yytable): Complete its comment.
12857
12858 2002-10-13 Paul Eggert <eggert@twinsun.com>
12859
12860 Fix problem reported by Henrik Grubbstroem in
12861 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
12862 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
12863 because the Bison parser reads the second action before reducing
12864 the first one.
12865 * src/scan-gram.l (rule_length): New static var.
12866 Use it to keep track of the rule length in the scanner, since
12867 we can't expect the parser to be in lock-step sync with the scanner.
12868 (handle_action_dollar, handle_action_at): Use this var.
12869 * tests/actions.at (Exotic Dollars): Test for the problem.
12870
12871 2002-10-12 Paul Eggert <eggert@twinsun.com>
12872
12873 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
12874 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
12875 Include <sys/time.h> when checking for clock_t and struct tms.
12876 Use same include order as source.
12877 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
12878 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
12879
12880 * lib/timevar.c: Update copyright date and clarify comments.
12881 (get_time) [IN_GCC]: Keep the GCC version for reference.
12882
12883 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
12884 GCC version as of today, then merge Bison's changes.
12885 Change "GCC" to "Bison" in copyright notice. timevar.def's
12886 author is Akim, so change that too.
12887
12888 * src/reader.c (grammar_current_rule_check):
12889 Don't worry about the default action if $$ is untyped.
12890 Prevents bogus warnings reported by Jim Gifford in
12891 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
12892
12893 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
12894 * data/glr.c, data/lalr1.cc, data/yacc.c:
12895 Output token definitions before the first part of user declarations.
12896 Fixes compatibility problem reported by Jim Gifford for kbd in
12897 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
12898
12899 2002-10-11 Paul Eggert <eggert@twinsun.com>
12900
12901 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
12902 (yyparse): here. This undoes some of the 2002-07-25 change.
12903 Compatibility problem reported by Ralf S. Engelschall with
12904 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
12905
12906 2002-10-11 Akim Demaille <akim@epita.fr>
12907
12908 * tests/regression.at Characters Escapes): New.
12909 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
12910 characters.
12911 Reported by Jan Nieuwenhuizen.
12912
12913 2002-10-11 Akim Demaille <akim@epita.fr>
12914
12915 * po/id.po: New.
12916
12917 2002-10-10 Paul Eggert <eggert@twinsun.com>
12918
12919 Portability fixes for bitsets; this also avoids several GCC
12920 warnings.
12921
12922 * lib/abitset.c: Include <stddef.h>, for offsetof.
12923 * lib/lbitset.c: Likewise.
12924
12925 * lib/abitset.c (abitset_bytes): Return a size that is aligned
12926 properly for vectors of objects. Do not assume that adding a
12927 header size to a multiple of a word size yields a value that is
12928 properly aligned for the whole union.
12929 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12930
12931 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
12932 unique names for structures.
12933 * lib/ebitset.c (ebitset_bytes): Likewise.
12934 * lib/lbitset.c (lbitset_bytes): Likewise.
12935
12936 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
12937 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
12938 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
12939 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
12940 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
12941 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
12942 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
12943 to improve the type-checking that GCC can do.
12944 * lib/bitset.c (bitset_op4_cmp): Likewise.
12945 * lib/bitset_stats.c (bitset_stats_count,
12946 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
12947 bitset_stats_copy, bitset_stats_disjoint_p,
12948 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
12949 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
12950 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
12951 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
12952 bitset_stats_and_or_cmp, bitset_stats_andn_or,
12953 bitset_stats_andn_or_cmp, bitset_stats_or_and,
12954 bitset_stats_or_and_cmp): Likewise.
12955 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
12956 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
12957 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
12958 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
12959
12960 * lib/abitset.h: Include bitset.h, not bbitset.h.
12961 * lib/ebitset.h: Likewise.
12962 * lib/lbitset.h: Likewise.
12963
12964 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
12965 All instances of parameters of type enum bitset_opts are now of
12966 type enum_bitset_opts, to conform to the C Standard, and similarly
12967 for enum_bitset_type.
12968 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
12969 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
12970
12971 Do not use "struct bitset_struct" to mean different things in
12972 different modules. Not only is this confusing, it violates
12973 the C Standard, which requires that structure types in different
12974 modules must be compatible if one is to be passed to the other.
12975 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
12976 All instances of "struct bitset_struct *" replaced with "bitset".
12977 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
12978 (union bitset_union, struct abitset_struct, struct ebitset_struct,
12979 struct lbitset_struct, struct bitset_stats_struct): New types.
12980 All uses of struct bitset_struct changed to union bitset_union,
12981 etc.
12982 * lib/abitset.c (struct abitset_struct, abitset,
12983 struct bitset_struct): Remove.
12984 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
12985 struct bitset_struct): Remove.
12986 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
12987 bitset_struct): Remove.
12988 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
12989 Likewise.
12990
12991 Do not call a function of type T using a call that assumes the
12992 function is of a different type U. Standard C requires that a
12993 function must be called with a type that is compatible with its
12994 definition.
12995 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12996 New decls.
12997 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12998 New functions.
12999 * lib/ebitset.c (PFV): Remove.
13000 * lib/lbitset.c (PFV): Likewise.
13001 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
13002 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
13003 decls.
13004 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
13005 (ebitset_vtable): Use them.
13006 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
13007 lbitset_xor): New functions.
13008 (lbitset_vtable): Use them.
13009
13010 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
13011 Declare.
13012
13013 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
13014 GCC warning.
13015 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
13016 Use offsetof, for simplicity.
13017
13018 2002-10-06 Paul Eggert <eggert@twinsun.com>
13019
13020 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
13021 the same width as int. This reapplies a hunk of the 2002-08-12 patch
13022 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
13023 which was inadvertently undone by the 2002-09-30 patch.
13024 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
13025 the same width as int.
13026
13027 2002-10-04 Paul Eggert <eggert@twinsun.com>
13028
13029 Version 1.50.
13030
13031 * configure.ac (AC_INIT), NEWS: Increment version number.
13032
13033 * doc/bison.texinfo: Minor spelling, grammar, and white space
13034 fixes.
13035 (Symbols): Mention that any negative value returned from yylex
13036 signifies end-of-input. Warn about negative chars. Mention
13037 the portable Standard C character set.
13038
13039 The GNU coding standard says CFLAGS and YFLAGS are reserved
13040 for the installer to set.
13041 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
13042 * src/Makefile.am (AM_CFLAGS): Likewise.
13043 (AM_YFLAGS): Renamed from YFLAGS.
13044
13045 Fix some MAX and MIN problems.
13046 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
13047 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
13048 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
13049 * src/reader.c (reader): Use it.
13050
13051 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
13052 POSIX 1003.1-2001 has removed fgrep.
13053
13054 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
13055
13056 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
13057 interpreted as signed.
13058 * lib/ebitset.c (ebitset_list): Fix bug.
13059
13060 2002-10-01 Paul Eggert <eggert@twinsun.com>
13061
13062 More fixes for 64-bit hosts and large bitsets.
13063
13064 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
13065 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
13066 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
13067 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
13068 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
13069 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
13070 bitset_count_): Likewise.
13071 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
13072 bitset_first, bitset_last): Likewise.
13073 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
13074 bitset_stats_list_reverse, bitset_stats_size,
13075 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
13076 Likewise.
13077 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13078 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
13079 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
13080 bitsetv_reflexive_transitive_closure): Likewise.
13081 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
13082 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
13083 Likewise.
13084 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
13085 Likewise.
13086
13087 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
13088 Use size_t, not unsigned int, to count bytes.
13089 * lib/abitset.h (abitset_bytes): Likewise.
13090 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
13091 Likewise.
13092 * lib/bitset.h (bitset_bytes): Likewise.
13093 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
13094 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
13095 * lib/bitsetv.c (bitsetv_alloc): Likewise.
13096 * lib/ebitset.c (ebitset_bytes): Likewise.
13097 * lib/ebitset.h (ebitset_bytes): Likewise.
13098 * lib/lbitset.c (lbitset_bytes): Likewise.
13099 * lib/lbitset.h (lbitset_bytes): Likewise.
13100
13101 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
13102 abitset_subset_p, abitset_disjoint_p, abitset_and,
13103 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
13104 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
13105 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
13106 abitset_or_and, abitset_or_and_cmp):
13107 Use bitset_windex instead of unsigned int.
13108 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
13109 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
13110 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
13111 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
13112 Likewise.
13113 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
13114
13115 * lib/bitset.c (bitset_print):
13116 Use proper printf formats for widths of integer types.
13117 * lib/bitset_stats.c (bitset_percent_histogram_print,
13118 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
13119 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13120 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
13121 * lib/lbitset.c (lbitset_bytes): Likewise.
13122
13123 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
13124 BITSET_SIZE_MAX): New macros.
13125 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
13126 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
13127 to BITSET_WINDEX_MAX.
13128
13129 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
13130 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
13131 since we now return the bitset_bindex type (not int).
13132
13133 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
13134 when computing sizes.
13135 * lib/ebitset.c (ebitset_elts_grow): Likewise.
13136
13137 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
13138 and avoid cast to unsigned.
13139
13140 2002-09-30 Akim Demaille <akim@epita.fr>
13141
13142 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
13143 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
13144 Updates from Michael Hayes.
13145
13146 2002-09-30 Art Haas <ahaas@neosoft.com>
13147
13148 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
13149 invocations.
13150 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
13151 defined.
13152
13153 2002-09-27 Akim Demaille <akim@epita.fr>
13154
13155 Version 1.49c.
13156
13157 2002-09-27 Akim Demaille <akim@epita.fr>
13158
13159 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
13160 (Because of AC_LIBSOURCE).
13161
13162 2002-09-27 Akim Demaille <akim@epita.fr>
13163
13164 Playing with Autoscan.
13165
13166 * configure.ac: Remove the old LIBOBJ tweaks.
13167 (AC_REPLACE_FUNCS): Add strrchr and strtol.
13168 * lib/strrchr.c: New.
13169 * lib/strtol.c: New, from the Coreutils 4.5.1.
13170
13171 2002-09-27 Akim Demaille <akim@epita.fr>
13172
13173 Playing with Autoscan.
13174
13175 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
13176 * lib/Makefile.am (libbison_a_SOURCES): No longer include
13177 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
13178 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
13179 Coreutils 4.5.1.
13180
13181 2002-09-24 Akim Demaille <akim@epita.fr>
13182
13183 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
13184 (Frequently Asked Questions, Parser Stack Overflow): New.
13185
13186 2002-09-13 Akim Demaille <akim@epita.fr>
13187
13188 Playing with autoscan.
13189
13190 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
13191 * src/files.c (skeleton_find): Remove, unused.
13192 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
13193 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
13194
13195 2002-09-13 Akim Demaille <akim@epita.fr>
13196
13197 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
13198 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
13199
13200 2002-09-13 Akim Demaille <akim@epita.fr>
13201
13202 * configure.ac: Require 2.54.
13203 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
13204 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
13205 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
13206 Remove, provided by Autoconf macros.
13207
13208 2002-09-12 Akim Demaille <akim@epita.fr>
13209
13210 * m4/prereq.m4: Update, from Coreutils 4.5.1.
13211
13212 2002-09-12 Akim Demaille <akim@epita.fr>
13213
13214 * m4/prereq.m4: Update, from Fileutils 4.1.5.
13215 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
13216 Reported by Martin Mokrejs.
13217
13218 2002-09-10 Akim Demaille <akim@epita.fr>
13219
13220 * src/parse-gram.y: Associate a human readable string to each
13221 token type.
13222 * tests/regression.at (Invalid inputs): Adjust.
13223
13224 2002-09-10 Gary V. Vaughan <gary@gnu.org>
13225
13226 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
13227 with an Autoconf-2.5x style configure.ac.
13228
13229 2002-09-06 Paul Eggert <eggert@twinsun.com>
13230
13231 * doc/bison.texinfo (Conditions): Make explicit that the GPL
13232 exception applies only to yacc.c. This is a modification of a
13233 patch originally suggested by Akim Demaille.
13234
13235 2002-09-06 Akim Demaille <akim@epita.fr>
13236
13237 * data/c.m4 (b4_copyright): Move the GPL exception comment from
13238 here to...
13239 * data/yacc.c: here.
13240
13241 * data/lalr1.cc (struct yyltype): Don't define it, since we use
13242 LocationType.
13243 (b4_ltype): Default to yy::Location from location.hh.
13244
13245 2002-09-04 Jim Meyering <jim@meyering.net>
13246
13247 * data/yacc.c: Guard the declaration of yytoknum also with
13248 `#ifdef YYPRINT', so it is declared only when used.
13249
13250 2002-09-04 Akim Demaille <akim@epita.fr>
13251
13252 * configure.in: Rename as...
13253 * configure.ac: this.
13254 Bump to 1.49c.
13255
13256 2002-09-04 Akim Demaille <akim@epita.fr>
13257
13258 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
13259 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
13260 translate maintainer only messages.
13261
13262 2002-08-12 Paul Eggert <eggert@twinsun.com>
13263
13264 Version 1.49b.
13265
13266 * Makefile.am (SUBDIRS): Remove intl.
13267 (DISTCLEANFILES): Remove.
13268 * NEWS: Mention that GNU M4 is now required. Clarify what is
13269 meant by "larger grammars". Mention the pt_BR translation.
13270 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
13271 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
13272 Bump version from 0.11.2 to 0.11.5.
13273 (BISON_PREREQ_STAGE): Remove.
13274 (AM_GNU_GETTEXT): Use external gettext.
13275 (AC_OUTPUT): Remove intl/Makefile.
13276
13277 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
13278
13279 * data/glr.c: Include string.h, for strlen.
13280 (yyreportParseError): Use size_t for yysize.
13281 (yy_yypstack): No longer nested inside yypstates, as nested
13282 functions are not portable. Do not assume size_t is the
13283 same width as int.
13284 (yypstates): Do not assume that ptrdiff_t is the same width
13285 as int, and similarly for yyposn and YYINDEX.
13286
13287 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
13288
13289 * lib/Makefile.am (INCLUDES): Do not include from the intl
13290 directory, which has been removed.
13291 * src/Makefile.am (INCLUDES): Likewise.
13292
13293 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
13294 (bitsets_sources, additional_bitsets_sources, timevars_sources):
13295 New vars.
13296
13297 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
13298 * tests/Makefile.am (EXTRA_DIST): Likewise.
13299
13300 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
13301 Do not assume that bitset_windex is the same width as unsigned.
13302
13303 * lib/abitset.c (abitset_unused_clear): Do not assume that
13304 bitset_word is the same width as int.
13305 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
13306 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
13307 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
13308 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
13309 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
13310
13311 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
13312 portability to one's complement hosts!).
13313 * lib/ebitset.c (ebitset_op1): Likewise.
13314 * lib/lbitset.c (lbitset_op1): Likewise.
13315
13316 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
13317 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
13318 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
13319 Sync with fileutils.
13320 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
13321 lib/gettext.h: Sync with diffutils.
13322
13323 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
13324 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
13325
13326 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
13327 PROTOTYPES to check for prototypes, and "defined __STDC__" to
13328 check for void *.
13329
13330 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
13331 size_t; the old version tried to do this but casted improperly.
13332 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
13333 (bitset_test): Now returns int, not unsigned long.
13334
13335 * lib/bitset_stats.c: Include "gettext.h".
13336 (_): New macro.
13337 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
13338 name locals "index", as it generates unnecessary warnings on some
13339 hosts that have an "index" function.
13340
13341 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
13342 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
13343 they need translation.
13344 * src/LR0.c (state_list_append, new_itemsets, get_state,
13345 append_states, generate_states): Likewise.
13346 * src/assoc.c (assoc_to_string): Likewise.
13347 * src/closure.c (print_closure, set_firsts, closure): Likewise.
13348 * src/gram.c (grammar_dump): Likewise.
13349 * src/injections.c (injections_compute): Likewise.
13350 * src/lalr.c (lookaheads_print): Likewise.
13351 * src/relation.c (relation_transpose): Likewise.
13352 * src/scan-gram.l: Likewise.
13353 * src/tables.c (table_grow, pack_vector): Likewise.
13354
13355 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
13356 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
13357 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
13358 * m4/mbstate_t.m4: Sync with fileutils.
13359 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
13360
13361 * po/LINGUAS: Add pt_BR.
13362 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
13363 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
13364 lib/timevar.c.
13365 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
13366 manual recommends.
13367 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
13368
13369 * src/complain.c (strerror_r): Remove decl; not needed.
13370 (strerror): Use same pattern as ../lib/error.c.
13371
13372 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
13373
13374 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
13375
13376 * src/main.c (main): Cast result of bindtextdomain and textdomain
13377 to void, to avoid a GCC warning when --disable-nls is in effect.
13378
13379 * src/scan-gram.l: Use strings rather than escapes when possible,
13380 to minimize the number of warnings from xgettext.
13381 (handle_action_dollar, handle_action_at): Don't use isdigit,
13382 as it mishandles negative chars and it may not work as expected
13383 outside the C locale.
13384
13385 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
13386 this is a GCC extension and is not portable to other compilers.
13387
13388 * src/system.h (alloca): Use same pattern as ../lib/error.c.
13389 Do not include <ctype.h>; no longer needed.
13390 Do not include <malloc.h>; no longer needed (and generates
13391 warnings on OpenBSD 3.0).
13392
13393 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
13394 it's not portable.
13395
13396 * tests/regression.at: Do not use 'cc -c input.c -o input';
13397 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
13398
13399 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
13400 exit status as failure, not just exit status 1. Sun C exits
13401 with status 2 sometimes.
13402
13403 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
13404 Use it for the two large tests.
13405
13406 2002-08-02 Akim Demaille <akim@epita.fr>
13407
13408 * src/conflicts.c (conflicts_output): Don't output rules never
13409 reduced here, since anyway that computation doesn't work.
13410 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
13411 (rule_useless_p, rule_never_reduced_p): New.
13412 (grammar_rules_partial_print): Use a filter instead of a range.
13413 Display the title only if needed.
13414 (grammar_rules_print): Adjust.
13415 (grammar_rules_never_reduced_report): New.
13416 * src/tables.c (action_row): Move the computation of rules never
13417 reduced to...
13418 (token_actions): here.
13419 * src/main.c (main): Make the parser before making the report, so
13420 that rules never reduced are computed.
13421 Call grammar_rules_never_reduced_report.
13422 * src/print.c (print_results): Report rules never reduced.
13423 * tests/conflicts.at, tests/reduce.at: Adjust.
13424
13425 2002-08-01 Akim Demaille <akim@epita.fr>
13426
13427 Instead of attaching lookaheads and duplicating the rules being
13428 reduced by a state, attach the lookaheads to the reductions.
13429
13430 * src/state.h (state_t): Remove the `lookaheads',
13431 `lookaheads_rule' member.
13432 (reductions_t): Add a `lookaheads' member.
13433 Use a regular array for the `rules'.
13434 * src/state.c (reductions_new): Initialize the lookaheads member
13435 to 0.
13436 (state_rule_lookaheads_print): Adjust.
13437 * src/state.h, src/state.c (state_reductions_find): New.
13438 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
13439 (count_rr_conflicts): Adjust.
13440 * src/lalr.c (LArule): Remove.
13441 (add_lookback_edge): Adjust.
13442 (state_lookaheads_count): New.
13443 (states_lookaheads_initialize): Merge into...
13444 (initialize_LA): this.
13445 (lalr_free): Adjust.
13446 * src/main.c (main): Don't free nullable and derives too early: it
13447 is used by --verbose.
13448 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
13449
13450 2002-08-01 Akim Demaille <akim@epita.fr>
13451
13452 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
13453 `rule_number_t**'.
13454 (set_derives, free_derives): Rename as...
13455 (derives_compute, derives_free): this.
13456 Adjust all dependencies.
13457 * src/nullable.c (set_nullable, free_nullable): Rename as...
13458 (nullable_compute, nullable_free): these.
13459 (rule_list_t): Store rule_t *, not rule_number_t.
13460 * src/state.c (state_rule_lookaheads_print): Directly compare rule
13461 pointers, instead of their numbers.
13462 * src/main.c (main): Call nullable_free, and derives_free earlier,
13463 as they were lo longer used.
13464
13465 2002-08-01 Akim Demaille <akim@epita.fr>
13466
13467 * lib/timevar.c (get_time): Include children time.
13468 * src/lalr.h (LA, LArule): Don't export them: used with the
13469 state_t.
13470 * src/lalr.c (LA, LArule): Static.
13471 * src/lalr.h, src/lalr.c (lalr_free): New.
13472 * src/main.c (main): Call it.
13473 * src/tables.c (pack_vector): Check whether loc is >= to the
13474 table_size, not >.
13475 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
13476 (tables_generate): do it, since that's also it which allocates
13477 them.
13478 Don't free LA and LArule, main does.
13479
13480 2002-07-31 Akim Demaille <akim@epita.fr>
13481
13482 Separate parser tables computation and output.
13483
13484 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
13485 (conflict_list, conflict_list_cnt, table, check, table_ninf)
13486 (yydefgoto, yydefact, high): Move to...
13487 * src/tables.h, src/tables.c: here.
13488 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
13489 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
13490 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
13491 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
13492 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
13493 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
13494 (action_row, save_row, token_actions, save_column, default_goto)
13495 (goto_actions, sort_actions, matching_state, pack_vector)
13496 (table_ninf_remap, pack_table, prepare_actions): Move to...
13497 * src/tables.c: here.
13498 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
13499 * src/output.c (token_actions, output_base, output_conflicts)
13500 (output_check): Merge into...
13501 (prepare_actions): this.
13502 (actions_output): Rename as...
13503 (user_actions_output): this.
13504 * src/main.c (main): Call tables_generate and tables_free.
13505
13506 2002-07-31 Akim Demaille <akim@epita.fr>
13507
13508 Steal GCC's --time-report support.
13509
13510 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
13511 stolen/adjusted from GCC.
13512 * m4/stage.m4: Remove time related checks.
13513 * m4/timevar.m4: New.
13514 * configure.in: Adjust.
13515 * src/system.h: Adjust to using timevar.h.
13516 * src/getargs.h, src/getargs.c: Support trace_time for
13517 --trace=time.
13518 * src/main.c (stage): Remove.
13519 (main): Replace `stage' invocations with timevar calls.
13520 * src/output.c: Insert pertinent timevar calls.
13521
13522 2002-07-31 Akim Demaille <akim@epita.fr>
13523
13524 Let --trace have arguments.
13525
13526 * src/getargs.h (enum trace_e): New.
13527 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
13528 (long_options, short_options): --trace/-T takes an optional
13529 argument.
13530 Change all the uses of trace_flag to reflect the new flags.
13531 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
13532
13533 Strengthen `stage' portability.
13534
13535 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
13536 * configure.in: Use it.
13537 Don't check for malloc.h and sys/times.h.
13538 * src/system.h: Include them when appropriate.
13539 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
13540 times and struct tms are available.
13541
13542 2002-07-30 Akim Demaille <akim@epita.fr>
13543
13544 In verbose parse error message, don't report `error' as an
13545 expected token.
13546 * tests/actions.at (Printers and Destructors): Adjust.
13547 * tests/calc.at (Calculator $1): Adjust.
13548 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
13549 error message, do not report the parser accepts the error token in
13550 that state.
13551
13552 2002-07-30 Akim Demaille <akim@epita.fr>
13553
13554 Normalize conflict related messages.
13555
13556 * src/complain.h, src/complain.c (warn, complain): New.
13557 * src/conflicts.c (conflicts_print): Use them.
13558 (conflict_report_yacc): New, extracted from...
13559 (conflicts_print): here.
13560 * tests/conflicts.at, tests/existing.at: Adjust.
13561
13562 2002-07-30 Akim Demaille <akim@epita.fr>
13563
13564 Report rules which are never reduced by the parser: those hidden
13565 by conflicts.
13566
13567 * src/LR0.c (save_reductions): Don't make the final state too
13568 different: save its reduction (accept) instead of having a state
13569 without any action (no shift or goto, no reduce).
13570 Note: the final state is now a ``regular'' state, i.e., the
13571 parsers now contain `reduce 0' as default reduction.
13572 Nevertheless, since they decide to `accept' when yystate =
13573 final_state, they still will not reduce rule 0.
13574 * src/print.c (print_actions, print_reduction): Adjust.
13575 * src/output.c (action_row): Track reduced rules.
13576 (token_actions): Report rules never reduced.
13577 * tests/conflicts.at, tests/regression.at: Adjust.
13578
13579 2002-07-30 Akim Demaille <akim@epita.fr>
13580
13581 `stage' was accidently included in a previous patch.
13582 Initiate its autoconfiscation.
13583
13584 * configure.in: Look for malloc.h and sys/times.h.
13585 * src/main.c (stage): Adjust.
13586 Report only when trace_flag.
13587
13588 2002-07-29 Akim Demaille <akim@epita.fr>
13589
13590 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
13591 state_number_t.
13592 (errs_t): symbol_t*, not symbol_number_t.
13593 (reductions_t): rule_t*, not rule_number_t.
13594 (FOR_EACH_SHIFT): New.
13595 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
13596 * src/print.c, src/print_graph.c: Adjust.
13597
13598 2002-07-29 Akim Demaille <akim@epita.fr>
13599
13600 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
13601
13602 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
13603 (endtoken, accept): these.
13604 * src/reader.c (reader): Set endtoken's default tag to "$end".
13605 Set undeftoken's tag to "$undefined" instead of "$undefined.".
13606 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
13607 Adjust.
13608
13609 2002-07-29 Akim Demaille <akim@epita.fr>
13610
13611 * src/reduce.c (reduce_grammar): When the language is empty,
13612 complain about the start symbol, not the axiom.
13613 Use its location.
13614 * tests/reduce.at (Empty Language): New.
13615
13616 2002-07-26 Akim Demaille <akim@epita.fr>
13617
13618 * src/reader.h, src/reader.c (gram_error): ... can't get
13619 yycontrol without making too strong assumptions on the parser
13620 itself.
13621 * src/output.c (prepare_tokens): Use the real 0th value of
13622 token_translations instead of `0'.
13623 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
13624 visible here.
13625 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
13626 for the time being: %locations ought to provide it to yyerror.
13627
13628 2002-07-25 Akim Demaille <akim@epita.fr>
13629
13630 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
13631 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
13632 * tests/regression.at (Web2c Actions): Adjust.
13633
13634 2002-07-25 Akim Demaille <akim@epita.fr>
13635
13636 Stop storing rules from 1 to nrules + 1.
13637
13638 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
13639 * src/nullable.c, src/output.c, src/print.c, src/reader.c
13640 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
13641 Iterate from 0 to nrules.
13642 Use rule_number_as_item_number and item_number_as_rule_number.
13643 Adjust to `derive' now containing possibly 0.
13644 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
13645 Handle the `- 1' part in rule numbers from/to item numbers.
13646 * src/conflicts.c (log_resolution): Fix the message which reversed
13647 shift and reduce.
13648 * src/output.c (action_row): Initialize default_rule to -1.
13649 (token_actions): Adjust.
13650 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
13651 expected output.
13652 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
13653
13654 2002-07-25 Akim Demaille <akim@epita.fr>
13655
13656 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
13657 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
13658 (b4_c_knr_arg_decl): New.
13659 * data/yacc.c: Use it to define yysymprint, yydestruct, and
13660 yyreport_parse_error.
13661
13662 2002-07-25 Akim Demaille <akim@epita.fr>
13663
13664 * data/yacc.c (yyreport_parse_error): New, extracted from...
13665 (yyparse): here.
13666 (yydestruct, yysymprint): Move above yyparse.
13667 Be K&R compliant.
13668
13669 2002-07-25 Akim Demaille <akim@epita.fr>
13670
13671 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
13672 replace...
13673 (b4_sint_type, b4_uint_type): these.
13674 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
13675 * tests/regression.at (Web2c Actions): Adjust.
13676
13677 2002-07-25 Akim Demaille <akim@epita.fr>
13678
13679 * src/gram.h (TIEM_NUMBER_MAX): New.
13680 (item_number_of_rule_number, rule_number_of_item_number): Rename
13681 as...
13682 (rule_number_as_item_number, item_number_as_rule_number): these.
13683 Adjust dependencies.
13684 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
13685 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
13686 (symbol_number_to_vector_number): New.
13687 (order): Of vector_number_t* type.
13688 (base_t, BASE_MAX, BASE_MIN): New.
13689 (froms, tos, width, pos, check): Of base_t type.
13690 (action_number_t, ACTION_MIN, ACTION_MAX): New.
13691 (actrow): Of action_number_t type.
13692 (conflrow): Of unsigned int type.
13693 (table_ninf, base_ninf): New.
13694 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
13695 (muscle_insert_int_table, muscle_insert_base_table)
13696 (muscle_insert_rule_number_table): New.
13697 (prepare_tokens): Output `toknum' as int_table.
13698 (action_row): Returns a rule_number_t.
13699 Use ACTION_MIN, not SHRT_MIN.
13700 (token_actions): yydefact is rule_number_t*.
13701 (table_ninf_remap): New.
13702 (pack_table): Use it for `base' and `table'.
13703 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
13704 replaced with...
13705 (YYPACT_NINF, YYTABLE_NINF): these.
13706 (yypact, yytable): Compute their types instead of hard-coded
13707 `short'.
13708 * tests/regression.at (Web2c Actions): Adjust.
13709
13710 2002-07-19 Akim Demaille <akim@epita.fr>
13711
13712 * src/scan-gram.l (id): Can start with an underscore.
13713
13714 2002-07-16 Akim Demaille <akim@epita.fr>
13715
13716 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
13717 Adjust all former `associativity' dependencies.
13718 * src/symtab.c (symbol_new): Default associativity is `undef', not
13719 `right'.
13720 (symbol_check_alias_consistence): Adjust.
13721
13722 2002-07-09 Akim Demaille <akim@epita.fr>
13723
13724 * doc/bison.texinfo: Properly set the ``header'' part.
13725 Use @dircategory ``GNU programming tools'' as per Texinfo's
13726 documentation.
13727 Use @copying.
13728
13729 2002-07-09 Akim Demaille <akim@epita.fr>
13730
13731 * lib/quotearg.h: Protect against multiple inclusions.
13732 * src/location.h (location_t): Add a `file' member.
13733 (LOCATION_RESET, LOCATION_PRINT): Adjust.
13734 * src/complain.c (warn_at, complain_at, fatal_at): Drop
13735 `error_one_per_line' support.
13736
13737 2002-07-09 Akim Demaille <akim@epita.fr>
13738
13739 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
13740 * src/reader.c (lineno): Remove.
13741 Adjust all dependencies.
13742 (get_merge_function): Take a location and use complain_at.
13743 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
13744 * tests/regression.at (Invalid inputs, Mixing %token styles):
13745 Adjust.
13746
13747 2002-07-09 Akim Demaille <akim@epita.fr>
13748
13749 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
13750 recovery rule, and forbid extensions when --yacc.
13751 (gram_error): Use complain_at.
13752 * src/reader.c (reader): Exit if there were parse errors.
13753
13754 2002-07-09 Akim Demaille <akim@epita.fr>
13755
13756 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
13757 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
13758 Reported by R Blake <blakers@mac.com>.
13759
13760 2002-07-09 Akim Demaille <akim@epita.fr>
13761
13762 * data/yacc.c: Output the copyright notive in the header.
13763
13764 2002-07-03 Akim Demaille <akim@epita.fr>
13765
13766 * src/output.c (froms, tos): Are state_number_t.
13767 (save_column): sp, sp1, and sp2 are state_number_t.
13768 (prepare): Rename `final' as `final_state_number', `nnts' as
13769 `nterms_number', `nrules' as `rules_number', `nstates' as
13770 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
13771 unused.
13772 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
13773 * data/lalr1.cc (nsym_): Remove, unused.
13774
13775 2002-07-03 Akim Demaille <akim@epita.fr>
13776
13777 * src/lalr.h, src/lalr.c (goto_number_t): New.
13778 * src/lalr.c (goto_list_t): New.
13779 Propagate them.
13780 * src/nullable.c (rule_list_t): New.
13781 Propagate.
13782 * src/types.h: Remove.
13783
13784 2002-07-03 Akim Demaille <akim@epita.fr>
13785
13786 * src/closure.c (print_fderives): Use rule_rhs_print.
13787 * src/derives.c (print_derives): Use rule_rhs_print.
13788 (rule_list_t): New, replaces `shorts'.
13789 (set_derives): Add comments.
13790 * tests/sets.at (Nullable, Firsts): Adjust.
13791
13792 2002-07-03 Akim Demaille <akim@epita.fr>
13793
13794 * src/output.c (prepare_actions): Free `tally' and `width'.
13795 (prepare_actions): Allocate and free `order'.
13796 * src/symtab.c (symbols_free): Free `symbols'.
13797 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
13798 * src/output.c (m4_invoke): Move to...
13799 * src/scan-skel.l: here.
13800 (<<EOF>>): Close yyout, and free its name.
13801
13802 2002-07-03 Akim Demaille <akim@epita.fr>
13803
13804 Fix some memory leaks, and fix a bug: state 0 was examined twice.
13805
13806 * src/LR0.c (new_state): Merge into...
13807 (state_list_append): this.
13808 (new_states): Merge into...
13809 (generate_states): here.
13810 (set_states): Don't ensure a proper `errs' state member here, do it...
13811 * src/conflicts.c (conflicts_solve): here.
13812 * src/state.h, src/state.c: Comment changes.
13813 (state_t): Rename member `shifts' as `transitions'.
13814 Adjust all dependencies.
13815 (errs_new): For consistency, also take the values as argument.
13816 (errs_dup): Remove.
13817 (state_errs_set): New.
13818 (state_reductions_set, state_transitions_set): Assert that no
13819 previous value was assigned.
13820 (state_free): New.
13821 (states_free): Use it.
13822 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
13823 temporary storage: use `errs' and `nerrs' as elsewhere.
13824 (set_conflicts): Allocate and free this `errs'.
13825
13826 2002-07-02 Akim Demaille <akim@epita.fr>
13827
13828 * lib/libiberty.h: New.
13829 * lib: Update the bitset implementation from upstream.
13830 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
13831 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
13832 * src/main.c: Adjust bitset stats calls.
13833
13834 2002-07-01 Paul Eggert <eggert@twinsun.com>
13835
13836 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
13837 char, so that negative chars don't collide with $.
13838
13839 2002-06-30 Akim Demaille <akim@epita.fr>
13840
13841 Have the GLR tests be `warning' checked, and fix the warnings.
13842
13843 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
13844 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
13845 (yyremoveDeletes): `yyi' and `yyj' are size_t.
13846 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
13847 (yyaddDeferredAction): static.
13848 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
13849 (yyreportParseError): yyprefix is const.
13850 yytokenp is used only when verbose.
13851 (yy__GNUC__): Replace with __GNUC__.
13852 (yypdumpstack): yyi is size_t.
13853 (yypreference): Un-yy local variables and arguments, to avoid
13854 clashes with `yyr1'. Anyway, we are not in the user name space.
13855 (yytname_size): be an int, as is compared with ints.
13856 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
13857 Use them.
13858 * tests/cxx-gram.at: Use quotation to protect $1.
13859 Use AT_COMPILE to enable warnings hunts.
13860 Prototype yylex and yyerror.
13861 `Use' argc.
13862 Include `string.h', not `strings.h'.
13863 Produce and prototype stmtMerge only when used.
13864 yylex takes a location.
13865
13866 2002-06-30 Akim Demaille <akim@epita.fr>
13867
13868 We spend a lot of time in quotearg, in particular when --verbose.
13869
13870 * src/symtab.c (symbol_get): Store a quoted version of the key.
13871 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
13872 Adjust all callers.
13873
13874 2002-06-30 Akim Demaille <akim@epita.fr>
13875
13876 * src/state.h (reductions_t): Rename member `nreds' as num.
13877 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
13878 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
13879
13880 2002-06-30 Akim Demaille <akim@epita.fr>
13881
13882 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
13883 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
13884 (shifts_to): Rename as...
13885 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
13886 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
13887 (TRANSITION_IS_DISABLED, transitions_to): these.
13888
13889 2002-06-30 Akim Demaille <akim@epita.fr>
13890
13891 * src/print.c (print_shifts, print_gotos): Merge into...
13892 (print_transitions): this.
13893 (print_transitions, print_errs, print_reductions): Align the
13894 lookaheads columns.
13895 (print_core, print_transitions, print_errs, print_state,
13896 print_grammar): Output empty lines separator before, not after.
13897 (state_default_rule_compute): Rename as...
13898 (state_default_rule): this.
13899 * tests/conflicts.at (Defaulted Conflicted Reduction),
13900 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
13901 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
13902
13903 2002-06-30 Akim Demaille <akim@epita.fr>
13904
13905 Display items as we display rules.
13906
13907 * src/gram.h, src/gram.c (rule_lhs_print): New.
13908 * src/gram.c (grammar_rules_partial_print): Use it.
13909 * src/print.c (print_core): Likewise.
13910 * tests/conflicts.at (Defaulted Conflicted Reduction),
13911 (Unresolved SR Conflicts): Adjust.
13912 (Unresolved SR Conflicts): Adjust and rename as...
13913 (Resolved SR Conflicts): this, as was meant.
13914 * tests/regression.at (Web2c Report): Adjust.
13915
13916 2002-06-30 Akim Demaille <akim@epita.fr>
13917
13918 * src/print.c (state_default_rule_compute): New, extracted from...
13919 (print_reductions): here.
13920 Pessimize, but clarify the code.
13921 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
13922
13923 2002-06-30 Akim Demaille <akim@epita.fr>
13924
13925 * src/output.c (action_row): Let default_rule be always a rule
13926 number.
13927
13928 2002-06-30 Akim Demaille <akim@epita.fr>
13929
13930 * src/closure.c (print_firsts, print_fderives, closure):
13931 Use BITSET_EXECUTE.
13932 * src/lalr.c (lookaheads_print): Likewise.
13933 * src/state.c (state_rule_lookaheads_print): Likewise.
13934 * src/print_graph.c (print_core): Likewise.
13935 * src/print.c (print_reductions): Likewise.
13936 * src/output.c (action_row): Likewise.
13937 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
13938
13939 2002-06-30 Akim Demaille <akim@epita.fr>
13940
13941 * src/print_graph.c: Use report_flag.
13942
13943 2002-06-30 Akim Demaille <akim@epita.fr>
13944
13945 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
13946 to...
13947 * src/relation.h, src/relation.c (traverse, relation_digraph)
13948 (relation_print, relation_transpose): New.
13949
13950 2002-06-30 Akim Demaille <akim@epita.fr>
13951
13952 * src/state.h, src/state.c (shifts_to): New.
13953 * src/lalr.c (build_relations): Use it.
13954
13955 2002-06-30 Akim Demaille <akim@epita.fr>
13956
13957 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
13958 (item_number_of_rule_number, rule_number_of_item_number): New.
13959 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
13960 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13961 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
13962 Propagate their use.
13963 Much remains to be done, in particular wrt `shorts' from types.h.
13964
13965 2002-06-30 Akim Demaille <akim@epita.fr>
13966
13967 * src/symtab.c (symbol_new): Initialize the `printer' member.
13968
13969 2002-06-30 Akim Demaille <akim@epita.fr>
13970
13971 * src/LR0.c (save_reductions): Remove, replaced by...
13972 * src/state.h, src/state.c (state_reductions_set): New.
13973 (reductions, errs): Rename as...
13974 (reductions_t, errs_t): these.
13975 Adjust all dependencies.
13976
13977 2002-06-30 Akim Demaille <akim@epita.fr>
13978
13979 * src/LR0.c (state_list_t, state_list_append): New.
13980 (first_state, last_state): Now symbol_list_t.
13981 (this_state): Remove.
13982 (new_itemsets, append_states, save_reductions): Take a state_t as
13983 argument.
13984 (set_states, generate_states): Adjust.
13985 (save_shifts): Remove, replaced by...
13986 * src/state.h, src/state.c (state_shifts_set): New.
13987 (shifts): Rename as...
13988 (shifts_t): this.
13989 Adjust all dependencies.
13990 * src/state.h (state_t): Remove the `next' member.
13991
13992 2002-06-30 Akim Demaille <akim@epita.fr>
13993
13994 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
13995 escaped in slot 0.
13996
13997 2002-06-30 Akim Demaille <akim@epita.fr>
13998
13999 Use hash.h for the state hash table.
14000
14001 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
14002 (allocate_storage): Use state_hash_new.
14003 (free_storage): Use state_hash_free.
14004 (new_state, get_state): Adjust.
14005 * src/lalr.h, src/lalr.c (states): Move to...
14006 * src/states.h (state_t): Remove the `link' member, no longer
14007 used.
14008 * src/states.h, src/states.c: here.
14009 (state_hash_new, state_hash_free, state_hash_lookup)
14010 (state_hash_insert, states_free): New.
14011 * src/states.c (state_table, state_compare, state_hash): New.
14012 * src/output.c (output_actions): Do not free states now, since we
14013 still need to know the final_state number in `prepare', called
14014 afterwards. Do it...
14015 * src/main.c (main): here: call states_free after `output'.
14016
14017 2002-06-30 Akim Demaille <akim@epita.fr>
14018
14019 * src/state.h, src/state.c (state_new): New, extracted from...
14020 * src/LR0.c (new_state): here.
14021 * src/state.h (STATE_ALLOC): Move to...
14022 * src/state.c: here.
14023 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
14024 * src/state.h, src/state.c: here.
14025
14026 2002-06-30 Akim Demaille <akim@epita.fr>
14027
14028 * src/reader.c (gensym): Rename as...
14029 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
14030 (getsym): Rename as...
14031 (symbol_get): this.
14032
14033 2002-06-30 Akim Demaille <akim@epita.fr>
14034
14035 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
14036 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
14037 * src/output.c, src/print.c, src/print_graph.c: Propagate.
14038 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
14039
14040 2002-06-30 Akim Demaille <akim@epita.fr>
14041
14042 Make the test suite pass with warnings checked.
14043
14044 * tests/actions.at (Printers and Destructors): Improve.
14045 Avoid unsigned vs. signed issues.
14046 * tests/calc.at: Don't exercise the scanner here, do it...
14047 * tests/input.at (Torturing the Scanner): here.
14048
14049 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14050
14051 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
14052 reorganize first lines parallel to yacc.c.
14053
14054 2002-06-28 Akim Demaille <akim@epita.fr>
14055
14056 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
14057 (b4_token_enum, b4_token_defines): New, factored from...
14058 * data/lalr1.cc, data/yacc.c, glr.c: here.
14059
14060 2002-06-28 Akim Demaille <akim@epita.fr>
14061
14062 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
14063 unused variables.
14064 * src/output.c (merger_output): static.
14065
14066 2002-06-28 Akim Demaille <akim@epita.fr>
14067
14068 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
14069 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
14070 pacify GCC.
14071 * src/output.c (save_row): Initialize all the variables to pacify GCC.
14072
14073 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14074
14075 Accumulated changelog for new GLR parsing features.
14076
14077 * src/conflicts.c (count_total_conflicts): Change name to
14078 conflicts_total_count.
14079 * src/conflicts.h: Ditto.
14080 * src/output.c (token_actions): Use the new name.
14081 (output_conflicts): Change conflp => conflict_list_heads, and
14082 confl => conflict_list for better readability.
14083 * data/glr.c: Use the new names.
14084 * NEWS: Add self to GLR announcement.
14085
14086 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
14087
14088 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
14089 Akim Demaille.
14090
14091 * data/bison.glr: Change name to glr.c
14092 * data/glr.c: Renamed from bison.glr.
14093 * data/Makefile.am: Add glr.c
14094
14095 * src/getargs.c:
14096
14097 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
14098 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
14099
14100 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14101
14102 * data/bison.glr: Be sure to restore the
14103 current #line when returning to the skeleton contents after having
14104 exposed the input file's #line.
14105
14106 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14107
14108 * data/bison.glr: Bring up to date with changes to bison.simple.
14109
14110 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14111
14112 * data/bison.glr: Correct definitions that use b4_prefix.
14113 Various reformatting.
14114 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
14115 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
14116 yytokenp argument; now part of stack.
14117 (yychar): Define to behave as documented.
14118 (yyclearin): Ditto.
14119
14120 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14121
14122 * src/reader.h: Add declaration for free_merger_functions.
14123
14124 * src/reader.c (merge_functions): New variable.
14125 (get_merge_function): New function.
14126 (free_merger_functions): New function.
14127 (readgram): Check for %prec that is not followed by a symbol.
14128 Handle %dprec and %merge declarations.
14129 (packgram): Initialize dprec and merger fields in rules array.
14130
14131 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
14132 conflict_list_cnt, conflict_list_free): New variables.
14133 (table_grow): Also grow conflict_table.
14134 (prepare_rules): Output dprec and merger tables.
14135 (conflict_row): New function.
14136 (action_row): Output conflict lists for GLR parser. Don't use
14137 default reduction in conflicted states for GLR parser so that there
14138 are spaces for the conflict lists.
14139 (save_row): Also save conflict information.
14140 (token_actions): Allocate conflict list.
14141 (merger_output): New function.
14142 (pack_vector): Pack conflict table, too.
14143 (output_conflicts): New function to output yyconflp and yyconfl.
14144 (output_check): Allocate conflict_tos.
14145 (output_actions): Output conflict tables, also.
14146 (output_skeleton): Output b4_mergers definition.
14147 (prepare): Output b4_max_rhs_length definition.
14148 Use 'bison.glr' as default skeleton for GLR parsers.
14149
14150 * src/gram.c (glr_parser): New flag.
14151 (grammar_free): Call free_merger_functions.
14152
14153 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
14154 all pairs of conflicting reductions, rather than just all tokens
14155 causing conflicts. Needed to size conflict tables.
14156 (conflicts_output): Modify call to count_rr_conflicts for new
14157 interface.
14158 (conflicts_print): Ditto.
14159 (count_total_conflicts): New function.
14160
14161 * src/reader.h (merger_list): New type.
14162 (merge_functions): New variable.
14163
14164 * src/lex.h (tok_dprec, tok_merge): New token types.
14165
14166 * src/gram.h (rule_s): Add dprec and merger fields.
14167 (glr_parser): New flag.
14168
14169 * src/conflicts.h (count_total_conflicts): New function.
14170
14171 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
14172
14173 * doc/bison.texinfo (Generalized LR Parsing): New section.
14174 (GLR Parsers): New section.
14175 (Language and Grammar): Mention GLR parsing.
14176 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
14177 Correct typo ("tge" -> "the").
14178
14179 * data/bison.glr: New skeleton for GLR parsing.
14180
14181 * tests/cxx-gram.at: New tests for GLR parsing.
14182
14183 * tests/testsuite.at: Include cxx-gram.at.
14184
14185 * tests/Makefile.am: Add cxx-gram.at.
14186
14187 * src/parse-gram.y:
14188
14189 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
14190
14191 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
14192
14193 2002-06-27 Akim Demaille <akim@epita.fr>
14194
14195 * src/options.h, src/options.c: Remove.
14196 * src/getargs.c (short_options, long_options): New.
14197
14198 2002-06-27 Akim Demaille <akim@epita.fr>
14199
14200 * data/bison.simple, data/bison.c++: Rename as...
14201 * data/yacc.c, data/lalr1.cc: these.
14202 * doc/bison.texinfo (Environment Variables): Remove.
14203
14204 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
14205
14206 * src/getargs.c (report_argmatch): Initialize strtok().
14207
14208 2002-06-20 Akim Demaille <akim@epita.fr>
14209
14210 * data/bison.simple (b4_symbol_actions): New, replaces...
14211 (b4_symbol_destructor, b4_symbol_printer): these.
14212 (yysymprint): Be sure to call YYPRINT only for tokens, and using
14213 user token numbers.
14214
14215 2002-06-20 Akim Demaille <akim@epita.fr>
14216
14217 * data/bison.simple (yydestructor): Rename as...
14218 (yydestruct): this.
14219
14220 2002-06-20 Akim Demaille <akim@epita.fr>
14221
14222 * src/symtab.h, src/symtab.c (symbol_type_set)
14223 (symbol_destructor_set, symbol_precedence_set): The location is
14224 the last argument.
14225 Adjust all callers.
14226
14227 2002-06-20 Akim Demaille <akim@epita.fr>
14228
14229 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
14230 internals.
14231 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
14232 Takes a location.
14233 * src/symtab.h, src/symtab.c (symbol_class_set)
14234 (symbol_user_token_number_set): Likewise.
14235 Adjust all callers.
14236 Promote complain_at.
14237 * tests/input.at (Type Clashes): Adjust.
14238
14239 2002-06-20 Akim Demaille <akim@epita.fr>
14240
14241 * data/bison.simple (YYLEX): Fix the declaration when
14242 %pure-parser.
14243
14244 2002-06-20 Akim Demaille <akim@epita.fr>
14245
14246 * data/bison.simple (yysymprint): Don't print the token number,
14247 just its name.
14248 * tests/actions.at (Destructors): Rename as...
14249 (Printers and Destructors): this.
14250 Also exercise %printer.
14251
14252 2002-06-20 Akim Demaille <akim@epita.fr>
14253
14254 * data/bison.simple (YYDSYMPRINT): New.
14255 Use it to remove many of the #if YYDEBUG/if (yydebug).
14256
14257 2002-06-20 Akim Demaille <akim@epita.fr>
14258
14259 * src/symtab.h, src/symtab.c (symbol_t): printer and
14260 printer_location are new members.
14261 (symbol_printer_set): New.
14262 * src/parse-gram.y (PERCENT_PRINTER): New token.
14263 Handle its associated rule.
14264 * src/scan-gram.l: Adjust.
14265 (handle_destructor_at, handle_destructor_dollar): Rename as...
14266 (handle_symbol_code_at, handle_symbol_code_dollar): these.
14267 * src/output.c (symbol_printers_output): New.
14268 (output_skeleton): Call it.
14269 * data/bison.simple (yysymprint): New. Cannot be named yyprint
14270 since there are already many grammar files with a user `yyprint'.
14271 Replace the calls to YYPRINT to calls to yysymprint.
14272 * tests/calc.at: Adjust.
14273 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
14274 taking advantage of parser very internal details (stack size!).
14275
14276 2002-06-20 Akim Demaille <akim@epita.fr>
14277
14278 * src/scan-gram.l: Complete the scanner with the missing patterns
14279 to pacify Flex.
14280 Use `quote' and `symbol_tag_get' where appropriate.
14281
14282 2002-06-19 Akim Demaille <akim@epita.fr>
14283
14284 * tests/actions.at (Destructors): Augment to test locations.
14285 * data/bison.simple (yydestructor): Pass it the current location
14286 if locations are enabled.
14287 Prototype only when __STDC__ or C++.
14288 Change the argument names to move into the yy name space: there is
14289 user code here.
14290
14291 2002-06-19 Akim Demaille <akim@epita.fr>
14292
14293 * data/bison.simple (b4_pure_if): New.
14294 Use it instead of #ifdef YYPURE.
14295
14296 2002-06-19 Akim Demaille <akim@epita.fr>
14297
14298 * data/bison.simple (b4_location_if): New.
14299 Use it instead of #ifdef YYLSP_NEEDED.
14300
14301 2002-06-19 Akim Demaille <akim@epita.fr>
14302
14303 Prepare @$ in %destructor, but currently don't bind it in the
14304 skeleton, as %location use is not cleaned up yet.
14305
14306 * src/scan-gram.l (handle_dollar, handle_destructor_at)
14307 (handle_action_at): New.
14308 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
14309 a braced_code_t and a location as additional arguments.
14310 (handle_destructor_dollar): Instead of requiring `b4_eval', just
14311 unquote one when outputting `b4_dollar_dollar'.
14312 Adjust callers.
14313 * data/bison.simple (b4_eval): Remove.
14314 (b4_symbol_destructor): Adjust.
14315 * tests/input.at (Invalid @n): Adjust.
14316
14317 2002-06-19 Zack Weinberg <zack@codesourcery.com>
14318
14319 * doc/bison.texinfo: Document ability to have multiple
14320 prologue sections.
14321
14322 2002-06-18 Akim Demaille <akim@epita.fr>
14323
14324 * src/files.c (compute_base_names): When computing the output file
14325 names from the input file name, strip the directory part.
14326
14327 2002-06-18 Akim Demaille <akim@epita.fr>
14328
14329 * data/bison.simple.new: Comment changes.
14330 Reported by Andreas Schwab.
14331
14332 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
14333
14334 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
14335 there are no `label `yyoverflowlab' defined but not used' warnings
14336 when yyoverflow is defined.
14337
14338 2002-06-18 Akim Demaille <akim@epita.fr>
14339
14340 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
14341 new member.
14342 (symbol_destructor_set): Adjust.
14343 * src/output.c (symbol_destructors_output): Output the destructor
14344 locations.
14345 Output the symbol name.
14346 * data/bison.simple (b4_symbol_destructor): Adjust.
14347
14348 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
14349 and Akim Demaille <akim@epita.fr>
14350
14351 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
14352 what's left on the stack when the error recovery hits EOF.
14353 * tests/actions.at (Destructors): Complete to exercise this case.
14354
14355 2002-06-17 Akim Demaille <akim@epita.fr>
14356
14357 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
14358 arguments is really empty, not only equal to `[]'.
14359 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
14360 member.
14361 (symbol_destructor_set): New.
14362 * src/output.c (symbol_destructors_output): New.
14363 * src/reader.h (brace_code_t, current_braced_code): New.
14364 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
14365 (handle_dollar): Rename as...
14366 (handle_action_dollar): this.
14367 (handle_destructor_dollar): New.
14368 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
14369 (grammar_declaration): Use it.
14370 * data/bison.simple (yystos): Is always defined.
14371 (yydestructor): New.
14372 * tests/actions.at (Destructors): New.
14373 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
14374
14375 2002-06-17 Akim Demaille <akim@epita.fr>
14376
14377 * src/symlist.h, src/symlist.c (symbol_list_length): New.
14378 * src/scan-gram.l (handle_dollar, handle_at): Compute the
14379 rule_length only when needed.
14380 * src/output.c (actions_output, token_definitions_output): Output
14381 the full M4 block.
14382 * src/symtab.c: Don't access directly to the symbol tag, use
14383 symbol_tag_get.
14384 * src/parse-gram.y: Use symbol_list_free.
14385
14386 2002-06-17 Akim Demaille <akim@epita.fr>
14387
14388 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
14389 (symbol_list_prepend, get_type_name): Move to...
14390 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
14391 (symbol_list_prepend, symbol_list_n_type_name_get): here.
14392 Adjust all callers.
14393 (symbol_list_free): New.
14394 * src/scan-gram.l (handle_dollar): Takes a location.
14395 * tests/input.at (Invalid $n): Adjust.
14396
14397 2002-06-17 Akim Demaille <akim@epita.fr>
14398
14399 * src/reader.h, src/reader.c (symbol_list_new): Export it.
14400 (symbol_list_prepend): New.
14401 * src/parse-gram.y (%union): `list' is a new member.
14402 (symbols.1): New, replaces...
14403 (terms_to_prec.1, nterms_to_type.1): these.
14404 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
14405 Take a location as additional argument.
14406 Adjust all callers.
14407
14408 2002-06-15 Akim Demaille <akim@epita.fr>
14409
14410 * src/parse-gram.y: Move %token in the declaration section so that
14411 we don't depend upon CVS Bison.
14412
14413 2002-06-15 Akim Demaille <akim@epita.fr>
14414
14415 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
14416 * src/print.c (print_core): Use it.
14417
14418 2002-06-15 Akim Demaille <akim@epita.fr>
14419
14420 * src/conflicts.c (log_resolution): Accept the rule involved in
14421 the sr conflicts instead of the lookahead number that points to
14422 that rule.
14423 (flush_reduce): Accept the current lookahead vector as argument,
14424 instead of the index in LA.
14425 (resolve_sr_conflict): Accept the current number of lookahead
14426 bitset to consider for the STATE, instead of the index in LA.
14427 (set_conflicts): Adjust.
14428 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
14429
14430 2002-06-15 Akim Demaille <akim@epita.fr>
14431
14432 * src/state.h (state_t): Replace the `lookaheadsp' member, a
14433 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
14434 Adjust all dependencies.
14435 * src/lalr.c (initialize_lookaheads): Split into...
14436 (states_lookaheads_count, states_lookaheads_initialize): these.
14437 (lalr): Adjust.
14438
14439 2002-06-15 Akim Demaille <akim@epita.fr>
14440
14441 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
14442 out of...
14443 (grammar_rules_print): here.
14444 * src/reduce.c (reduce_output): Use it.
14445 * tests/reduce.at (Useless Rules, Reduced Automaton)
14446 (Underivable Rules): Adjust.
14447
14448 2002-06-15 Akim Demaille <akim@epita.fr>
14449
14450 Copy BYacc's nice way to report the grammar.
14451
14452 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
14453 New.
14454 Don't print the rules' location, it is confusing and useless.
14455 (rule_print): Use grammar_rhs_print.
14456 * src/print.c (print_grammar): Use grammar_rules_print.
14457
14458 2002-06-15 Akim Demaille <akim@epita.fr>
14459
14460 Complete and rationalize `useless thing' warnings.
14461
14462 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
14463 (symbol_tag_print): New.
14464 Use them everywhere in place of accessing directly the tag member.
14465 * src/gram.h, src/gram.c (rule_print): New.
14466 Use it where a rule used to be printed `by hand'.
14467 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
14468 (reduce_grammar_tables): Report the useless rules.
14469 (reduce_print): Useless things are a warning, not an error.
14470 Report it as such.
14471 * tests/reduce.at (Useless Nonterminals, Useless Rules):
14472 (Reduced Automaton, Underivable Rules): Adjust.
14473 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
14474 * tests/conflicts.at (Unresolved SR Conflicts)
14475 (Solved SR Conflicts): Adjust.
14476
14477 2002-06-15 Akim Demaille <akim@epita.fr>
14478
14479 Let symbols have a location.
14480
14481 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
14482 (getsym): Adjust.
14483 Adjust all callers.
14484 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
14485 Use location_t, not int.
14486 * src/symtab.c (symbol_check_defined): Take advantage of the
14487 location.
14488 * tests/regression.at (Invalid inputs): Adjust.
14489
14490 2002-06-15 Akim Demaille <akim@epita.fr>
14491
14492 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
14493 (input): Don't try to initialize yylloc here, do it in the
14494 scanner.
14495 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
14496 * src/gram.h (rule_t): Change line and action_line into location
14497 and action_location, of location_t type.
14498 Adjust all dependencies.
14499 * src/location.h, src/location.c (empty_location): New.
14500 * src/reader.h, src/reader.c (grammar_start_symbol_set)
14501 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
14502 (grammar_current_rule_symbol_append)
14503 (grammar_current_rule_action_append): Expect a location as argument.
14504 * src/reader.c (grammar_midrule_action): Adjust to attach an
14505 action's location as dummy symbol location.
14506 * src/symtab.h, src/symtab.c (startsymbol_location): New.
14507 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
14508 the line numbers.
14509
14510 2002-06-14 Akim Demaille <akim@epita.fr>
14511
14512 Grammar declarations may be found in the grammar section.
14513
14514 * src/parse-gram.y (rules_or_grammar_declaration): New.
14515 (declarations): Each declaration may end with a semicolon, not
14516 just...
14517 (grammar_declaration): `"%union"'.
14518 (grammar): Branch to rules_or_grammar_declaration.
14519
14520 2002-06-14 Akim Demaille <akim@epita.fr>
14521
14522 * src/main.c (main): Invoke scanner_free.
14523
14524 2002-06-14 Akim Demaille <akim@epita.fr>
14525
14526 * src/output.c (m4_invoke): Extracted from...
14527 (output_skeleton): here.
14528 Free tempfile.
14529
14530 2002-06-14 Akim Demaille <akim@epita.fr>
14531
14532 * src/parse-gram.y (directives, directive, gram)
14533 (grammar_directives, precedence_directives, precedence_directive):
14534 Rename as...
14535 (declarations, declaration, grammar, grammar_declaration)
14536 (precedence_declaration, precedence_declarator): these.
14537 (symbol_declaration): New.
14538
14539 2002-06-14 Akim Demaille <akim@epita.fr>
14540
14541 * src/files.c (action_obstack): Remove, unused.
14542 (output_obstack): Remove it, and all its dependencies, as it is no
14543 longer needed.
14544 * src/reader.c (epilogue_set): Build the epilogue in the
14545 muscle_obstack.
14546 * src/output.h, src/output.c (muscle_obstack): Move to...
14547 * src/muscle_tab.h, src/muscle_tab.h: here.
14548 (muscle_init): Initialize muscle_obstack.
14549 (muscle_free): New.
14550 * src/main.c (main): Call it.
14551
14552 2002-06-14 Akim Demaille <akim@epita.fr>
14553
14554 * src/location.h: New, extracted from...
14555 * src/reader.h: here.
14556 * src/Makefile.am (noinst_HEADERS): Merge into
14557 (bison_SOURCES): this.
14558 Add location.h.
14559 * src/parse-gram.y: Use location_t instead of Bison's.
14560 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
14561 Use location_t instead of ints.
14562
14563 2002-06-14 Akim Demaille <akim@epita.fr>
14564
14565 * data/bison.simple, data/bison.c++: Be sure to restore the
14566 current #line when returning to the skeleton contents after having
14567 exposed the input file's #line.
14568
14569 2002-06-12 Akim Demaille <akim@epita.fr>
14570
14571 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
14572 eager.
14573 * tests/actions.at (Exotic Dollars): New.
14574
14575 2002-06-12 Akim Demaille <akim@epita.fr>
14576
14577 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
14578 ['"/] too eagerly.
14579 * tests/input.at (Torturing the Scanner): New.
14580
14581 2002-06-11 Akim Demaille <akim@epita.fr>
14582
14583 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
14584 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
14585 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
14586 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
14587 * src/reader.c (reader): Use it.
14588
14589 2002-06-11 Akim Demaille <akim@epita.fr>
14590
14591 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
14592 Adjust all callers.
14593 (scanner_last_string_free): New.
14594
14595 2002-06-11 Akim Demaille <akim@epita.fr>
14596
14597 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
14598 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
14599 (last_string, YY_OBS_FREE): New.
14600 Use them when returning an ID.
14601
14602 2002-06-11 Akim Demaille <akim@epita.fr>
14603
14604 Have Bison grammars parsed by a Bison grammar.
14605
14606 * src/reader.c, src/reader.h (prologue_augment): New.
14607 * src/reader.c (copy_definition): Remove.
14608
14609 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
14610 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
14611 (grammar_current_rule_prec_set, grammar_current_rule_check)
14612 (grammar_current_rule_symbol_append)
14613 (grammar_current_rule_action_append): Export.
14614 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
14615 (symbol_list_action_append): Remove.
14616 Hook the routines from reader.
14617 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
14618 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
14619
14620 * src/reader.c (read_declarations): Remove, unused.
14621
14622 * src/parse-gram.y: Handle the epilogue.
14623 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
14624 (grammar_start_symbol_set): this.
14625 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
14626 * src/reader.c (readgram): Remove, unused.
14627 (reader): Adjust to insert eoftoken and axiom where appropriate.
14628
14629 * src/reader.c (copy_dollar): Replace with...
14630 * src/scan-gram.h (handle_dollar): this.
14631 * src/parse-gram.y: Remove `%thong'.
14632
14633 * src/reader.c (copy_at): Replace with...
14634 * src/scan-gram.h (handle_at): this.
14635
14636 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
14637 New.
14638
14639 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
14640 time being.
14641
14642 * src/reader.h, src/reader.c (grammar_rule_end): New.
14643
14644 * src/parse.y (current_type, current_class): New.
14645 Implement `%nterm', `%token' support.
14646 Merge `%term' into `%token'.
14647 (string_as_id): New.
14648 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
14649 type name.
14650
14651 * src/parse-gram.y: Be sure to handle properly the beginning of
14652 rules.
14653
14654 * src/parse-gram.y: Handle %type.
14655 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
14656
14657 * src/parse-gram.y: More directives support.
14658 * src/options.c: No longer handle source directives.
14659
14660 * src/parse-gram.y: Fix %output.
14661
14662 * src/parse-gram.y: Handle %union.
14663 Use the prologue locations.
14664 * src/reader.c (parse_union_decl): Remove.
14665
14666 * src/reader.h, src/reader.c (epilogue_set): New.
14667 * src/parse-gram.y: Use it.
14668
14669 * data/bison.simple, data/bison.c++: b4_stype is now either not
14670 defined, then default to int, or to the contents of %union,
14671 without `union' itself.
14672 Adjust.
14673 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
14674
14675 * src/output.c (actions_output): Don't output braces, as they are
14676 already handled by the scanner.
14677
14678 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
14679 characters to themselves.
14680
14681 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
14682 that the epilogue has a proper #line.
14683
14684 * src/parse-gram.y: Handle precedence/associativity.
14685
14686 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
14687 a terminal.
14688 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
14689 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
14690 at all to define terminals that cannot be emitted.
14691
14692 * src/scan-gram.l: Escape M4 characters.
14693
14694 * src/scan-gram.l: Working properly with escapes in user
14695 strings/characters.
14696
14697 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
14698 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
14699 grammar.
14700 Use more modest sizes, as for the time being the parser does not
14701 release memory, and therefore the process swallows a huge amount
14702 of memory.
14703
14704 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
14705 stricter %token grammar.
14706
14707 * src/symtab.h (associativity): Add `undef_assoc'.
14708 (symbol_precedence_set): Do nothing when passed an undef_assoc.
14709 * src/symtab.c (symbol_check_alias_consistence): Adjust.
14710
14711 * tests/regression.at (Invalid %directive): Remove, as it is now
14712 meaningless.
14713 (Invalid inputs): Adjust to the new error messages.
14714 (Token definitions): The new grammar doesn't allow too many
14715 eccentricities.
14716
14717 * src/lex.h, src/lex.c: Remove.
14718 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
14719 (copy_character, copy_string2, copy_string, copy_identifier)
14720 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
14721 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
14722 (parse_action): Remove.
14723 * po/POTFILES.in: Adjust.
14724
14725 2002-06-11 Akim Demaille <akim@epita.fr>
14726
14727 * src/reader.c (parse_action): Don't store directly into the
14728 rule's action member: return the action as a string.
14729 Don't require `rule_length' as an argument: compute it.
14730 (grammar_current_rule_symbol_append)
14731 (grammar_current_rule_action_append): New, eved out from
14732 (readgram): here.
14733 Remove `action_flag', `rulelength', unused now.
14734
14735 2002-06-11 Akim Demaille <akim@epita.fr>
14736
14737 * src/reader.c (grammar_current_rule_prec_set).
14738 (grammar_current_rule_check): New, eved out from...
14739 (readgram): here.
14740 Remove `xaction', `first_rhs': useless.
14741 * tests/input.at (Type clashes): New.
14742 * tests/existing.at (GNU Cim Grammar): Adjust.
14743
14744 2002-06-11 Akim Demaille <akim@epita.fr>
14745
14746 * src/reader.c (grammar_midrule_action): New, Eved out from
14747 (readgram): here.
14748
14749 2002-06-11 Akim Demaille <akim@epita.fr>
14750
14751 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
14752 New.
14753 (readgram): Use them as replacement of inlined code, crule and
14754 crule1.
14755
14756 2002-06-11 Akim Demaille <akim@epita.fr>
14757
14758 * src/reader.c (grammar_end, grammar_symbol_append): New.
14759 (readgram): Use them.
14760 Make the use of `p' as local as possible.
14761
14762 2002-06-10 Akim Demaille <akim@epita.fr>
14763
14764 GCJ's parser requires the tokens to be defined before the prologue.
14765
14766 * data/bison.simple: Output the token definition before the user's
14767 prologue.
14768 * tests/regression.at (Braces parsing, Duplicate string)
14769 (Mixing %token styles): Check the output from bison.
14770 (Early token definitions): New.
14771
14772 2002-06-10 Akim Demaille <akim@epita.fr>
14773
14774 * src/symtab.c (symbol_user_token_number_set): Don't complain when
14775 assigning twice the same user number to a token, so that we can
14776 use it in...
14777 * src/lex.c (lex): here.
14778 Also use `symbol_class_set' instead of hand written code.
14779 * src/reader.c (parse_assoc_decl): Likewise.
14780
14781 2002-06-10 Akim Demaille <akim@epita.fr>
14782
14783 * src/symtab.c, src/symtab.c (symbol_class_set)
14784 (symbol_user_token_number_set): New.
14785 * src/reader.c (parse_token_decl): Use them.
14786 Use a switch instead of ifs.
14787 Use a single argument.
14788
14789 2002-06-10 Akim Demaille <akim@epita.fr>
14790
14791 Remove `%thong' support as it is undocumented, unused, duplicates
14792 `%token's job, and creates useless e-mail traffic with people who
14793 want to know what it is, why it is undocumented, unused, and
14794 duplicates `%token's job.
14795
14796 * src/reader.c (parse_thong_decl): Remove.
14797 * src/options.c (option_table): Remove "thong".
14798 * src/lex.h (tok_thong): Remove.
14799
14800 2002-06-10 Akim Demaille <akim@epita.fr>
14801
14802 * src/symtab.c, src/symtab.c (symbol_type_set)
14803 (symbol_precedence_set): New.
14804 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
14805 (value_components_used): Remove, unused.
14806
14807 2002-06-09 Akim Demaille <akim@epita.fr>
14808
14809 Move symbols handling code out of the reader.
14810
14811 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
14812 (axiom): Move to...
14813 * src/symtab.h, src/symtab.c: here.
14814
14815 * src/gram.c (start_symbol): Remove: use startsymbol->number.
14816 * src/reader.c (startval): Rename as...
14817 * src/symtab.h, src/symtab.c (startsymbol): this.
14818 * src/reader.c: Adjust.
14819
14820 * src/reader.c (symbol_check_defined, symbol_make_alias)
14821 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14822 (token_translations_init)
14823 Move to...
14824 * src/symtab.c: here.
14825 * src/reader.c (packsymbols): Move to...
14826 * src/symtab.h, src/symtab.c (symbols_pack): here.
14827 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
14828 argument.
14829
14830 2002-06-03 Akim Demaille <akim@epita.fr>
14831
14832 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
14833 then statements.
14834
14835 2002-06-03 Akim Demaille <akim@epita.fr>
14836
14837 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
14838 structs with non literals.
14839 * src/scan-skel.l: never-interactive.
14840 * src/conflicts.c (enum conflict_resolution_e): No trailing
14841 comma.
14842 * src/getargs.c (usage): Split long literal strings.
14843 Reported by Hans Aberg.
14844
14845 2002-05-28 Akim Demaille <akim@epita.fr>
14846
14847 * data/bison.c++: Use C++ ostreams.
14848 (cdebug_): New member.
14849
14850 2002-05-28 Akim Demaille <akim@epita.fr>
14851
14852 * src/output.c (output_skeleton): Be sure to allocate enough room
14853 for `/' _and_ for `\0' in full_skeleton.
14854
14855 2002-05-28 Akim Demaille <akim@epita.fr>
14856
14857 * data/bison.c++: Catch up with bison.simple:
14858 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14859 and Paul Eggert <eggert@twinsun.com>: `error' handing.
14860 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
14861 and popping traces.
14862
14863 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14864
14865 * src/output.c (output_skeleton): Put an explicit path in front of
14866 the skeleton file name, rather than relying on the -I directory,
14867 to partially alleviate effects of having a skeleton file lying around
14868 in the current directory.
14869
14870 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14871
14872 * src/conflicts.c (log_resolution): Correct typo:
14873 obstack_printf should be obstack_fgrow1.
14874
14875 2002-05-26 Akim Demaille <akim@epita.fr>
14876
14877 * src/state.h (state_t): `solved_conflicts' is a new member.
14878 * src/LR0.c (new_state): Set it to 0.
14879 * src/conflicts.h, src/conflicts.c (print_conflicts)
14880 (free_conflicts, solve_conflicts): Rename as...
14881 (conflicts_print, conflicts_free, conflicts_solve): these.
14882 Adjust callers.
14883 * src/conflicts.c (enum conflict_resolution_e)
14884 (solved_conflicts_obstack): New, used by...
14885 (log_resolution): this.
14886 Adjust to attach the conflict resolution to each state.
14887 Complete the description with the precedence/associativity
14888 information.
14889 (resolve_sr_conflict): Adjust.
14890 * src/print.c (print_state): Output its solved_conflicts.
14891 * tests/conflicts.at (Unresolved SR Conflicts)
14892 (Solved SR Conflicts): Exercise --report=all.
14893
14894 2002-05-26 Akim Demaille <akim@epita.fr>
14895
14896 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14897 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14898 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
14899 (token_number_t, item_number_as_token_number)
14900 (token_number_as_item_number, muscle_insert_token_number_table):
14901 Rename as...
14902 (symbol_number_t, item_number_as_symbol_number)
14903 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
14904 these, since it is more appropriate.
14905
14906 2002-05-26 Akim Demaille <akim@epita.fr>
14907
14908 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
14909 `Error:' lines.
14910 * data/bison.simple (yystos) [YYDEBUG]: New.
14911 (yyparse) [YYDEBUG]: Display the symbols which are popped during
14912 error recovery.
14913 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
14914
14915 2002-05-25 Akim Demaille <akim@epita.fr>
14916
14917 * doc/bison.texinfo (Debugging): Split into...
14918 (Tracing): this new section, its former contents, and...
14919 (Understanding): this new section.
14920 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
14921 by...
14922 (report_flag): this.
14923 Adjust all dependencies.
14924 (report_args, report_types, report_argmatch): New.
14925 (usage, getargs): Report/support -r, --report.
14926 * src/options.h
14927 (struct option_table_struct): Rename as..,
14928 (struct option_table_s): this.
14929 Rename the `set_flag' member to `flag' to match with getopt_long's
14930 struct.
14931 * src/options.c (option_table): Split verbose into an entry for
14932 %verbose, and another for --verbose.
14933 Support --report/-r, so remove -r from the obsolete --raw.
14934 * src/print.c: Attach full item sets and lookaheads reports to
14935 report_flag instead of trace_flag.
14936 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
14937
14938 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14939 and Paul Eggert <eggert@twinsun.com>
14940
14941 * data/bison.simple (yyparse): Correct error handling to conform to
14942 POSIX and yacc. Specifically, after syntax error is discovered,
14943 do not reduce further before shifting the error token.
14944 Clean up the code a bit by removing the labels yyerrdefault,
14945 yyerrhandle, yyerrpop.
14946 * NEWS: Document the above.
14947
14948 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14949
14950 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
14951 type; it isn't always big enough, since it doesn't necessarily
14952 include non-terminals.
14953 (yytranslate): Expand definition of yy_token_number_type, so that
14954 the latter can be removed.
14955 (yy_token_number_type): Remove, only one use.
14956 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
14957 don't use TokenNumberType as element type.
14958
14959 * tests/regression.at: Modify expected output to agree with change
14960 to yyr1 and yytranslate.
14961
14962 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
14963
14964 * src/reader.c (parse_action): Use copy_character instead of
14965 obstack_1grow.
14966
14967 2002-05-13 Akim Demaille <akim@epita.fr>
14968
14969 * tests/regression.at (Token definitions): Prototype yylex and
14970 yyerror.
14971
14972 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14973
14974 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
14975 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
14976 32-bit arithmetic.
14977 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
14978
14979 2002-05-07 Akim Demaille <akim@epita.fr>
14980
14981 * tests/synclines.at: Be sure to prototype yylex and yyerror to
14982 avoid GCC warnings.
14983
14984 2002-05-07 Akim Demaille <akim@epita.fr>
14985
14986 Kill GCC warnings.
14987
14988 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
14989 over the RHS of each rule.
14990 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
14991 * src/state.h (state_t): Member `nitems' is unsigned short.
14992 * src/LR0.c (get_state): Adjust.
14993 * src/reader.c (packgram): Likewise.
14994 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
14995 `Type'.
14996 (muscle_insert_int_table): Remove, unused.
14997 (prepare_rules): Remove `max'.
14998
14999 2002-05-06 Akim Demaille <akim@epita.fr>
15000
15001 * src/closure.c (print_firsts): Display of the symbol tags.
15002 (bitmatrix_print): Move to...
15003 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
15004 here.
15005 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
15006
15007 2002-05-06 Akim Demaille <akim@epita.fr>
15008
15009 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
15010 hash_do_for_each.
15011
15012 2002-05-06 Akim Demaille <akim@epita.fr>
15013
15014 * src/LR0.c (new_state, get_state): Instead of using the global
15015 `kernel_size' and `kernel_base', have two new arguments:
15016 `core_size' and `core'.
15017 Adjust callers.
15018
15019 2002-05-06 Akim Demaille <akim@epita.fr>
15020
15021 * src/reader.c (packgram): No longer end `ritem' with a 0
15022 sentinel: it is not used.
15023
15024 2002-05-05 Akim Demaille <akim@epita.fr>
15025
15026 New experimental feature: display the lookaheads in the report and
15027 graph.
15028
15029 * src/print (print_core): When --trace-flag, display the rules
15030 lookaheads.
15031 * src/print_graph.c (print_core): Likewise.
15032 Swap the arguments.
15033 Adjust caller.
15034
15035 2002-05-05 Akim Demaille <akim@epita.fr>
15036
15037 * tests/torture.at (Many lookaheads): New test.
15038
15039 2002-05-05 Akim Demaille <akim@epita.fr>
15040
15041 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
15042 (GENERATE_MUSCLE_INSERT_TABLE): this.
15043 (output_int_table, output_unsigned_int_table, output_short_table)
15044 (output_token_number_table, output_item_number_table): Replace with...
15045 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
15046 (muscle_insert_short_table, muscle_insert_token_number_table)
15047 (muscle_insert_item_number_table): these.
15048 Adjust all callers.
15049 (prepare_tokens): Don't free `translations', since...
15050 * src/reader.h, src/reader.c (grammar_free): do it.
15051 Move to...
15052 * src/gram.h, src/gram.c (grammar_free): here.
15053 * data/bison.simple, data/bison.c++: b4_token_number_max is now
15054 b4_translate_max.
15055
15056 2002-05-05 Akim Demaille <akim@epita.fr>
15057
15058 * src/output.c (output_unsigned_int_table): New.
15059 (prepare_rules): `i' is unsigned.
15060 `prhs', `rline', `r2' are unsigned int.
15061 Rename muscle `rhs_number_max' as `rhs_max'.
15062 Output muscles `prhs_max', `rline_max', and `r2_max'.
15063 Free rline and r1.
15064 * data/bison.simple, data/bison.c++: Adjust to use these muscles
15065 to compute types instead of constant types.
15066 * tests/regression.at (Web2c Actions): Adjust.
15067
15068 2002-05-04 Akim Demaille <akim@epita.fr>
15069
15070 * src/symtab.h (SALIAS, SUNDEF): Rename as...
15071 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
15072 Adjust dependencies.
15073 * src/output.c (token_definitions_output): Be sure not to output a
15074 `#define 'a'' when fed with `%token 'a' "a"'.
15075 * tests/regression.at (Token definitions): New.
15076
15077 2002-05-03 Paul Eggert <eggert@twinsun.com>
15078
15079 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
15080 for K&R C.
15081
15082 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
15083
15084 * Makefile.am (SUBDIRS): Remove intl.
15085 (EXTRA_DIST): Add config/config.rpath.
15086
15087 2002-05-03 Akim Demaille <akim@epita.fr>
15088
15089 * data/bison.simple (m4_if): Don't output empty enums.
15090 And actually, output valid enum definitions :(.
15091
15092 2002-05-03 Akim Demaille <akim@epita.fr>
15093
15094 * configure.bat: Remove, completely obsolete.
15095 * Makefile.am (EXTRA_DIST): Adjust.
15096 Don't distribute config.rpath...
15097 * config/Makefile.am (EXTRA_DIST): Do it.
15098
15099 2002-05-03 Akim Demaille <akim@epita.fr>
15100
15101 * configure.in (GETTEXT_VERSION): New.
15102 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
15103
15104 2002-05-03 Akim Demaille <akim@epita.fr>
15105
15106 * data/bison.simple (b4_token_enum): New.
15107 (b4_token_defines): Use it to output tokens both as #define and
15108 enums.
15109 Suggested by Paul Eggert.
15110 * src/output.c (token_definitions_output): Don't output spurious
15111 white spaces.
15112
15113 2002-05-03 Akim Demaille <akim@epita.fr>
15114
15115 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
15116
15117 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
15118
15119 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
15120 Update the stack class, give a try to deque as the default container.
15121
15122 2002-05-02 Akim Demaille <akim@epita.fr>
15123
15124 * data/bison.simple (yyparse): Do not implement @$ = @1.
15125 (YYLLOC_DEFAULT): Adjust to do it.
15126 * doc/bison.texinfo (Location Default Action): Fix.
15127
15128 2002-05-02 Akim Demaille <akim@epita.fr>
15129
15130 * src/reader.c (parse_braces): Merge into...
15131 (parse_action): this.
15132
15133 2002-05-02 Akim Demaille <akim@epita.fr>
15134
15135 * configure.in (ALL_LINGUAS): Remove.
15136 * po/LINGUAS, hr.po: New.
15137
15138 2002-05-02 Akim Demaille <akim@epita.fr>
15139
15140 Remove the so called hairy (semantic) parsers.
15141
15142 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
15143 * src/gram.h, src/gram.c (semantic_parser): Remove.
15144 (rule_t): Remove the guard and guard_line members.
15145 * src/lex.h (token_t): remove tok_guard.
15146 * src/options.c (option_table): Remove %guard and %semantic_parser
15147 support.
15148 * src/output.c, src/output.h (guards_output): Remove.
15149 (prepare): Adjust.
15150 (token_definitions_output): Don't output the `T'
15151 tokens (???).
15152 (output_skeleton): Don't output the guards.
15153 * src/files.c, src/files.c (attrsfile): Remove.
15154 * src/reader.c (symbol_list): Remove the guard and guard_line
15155 members.
15156 Adjust dependencies.
15157 (parse_guard): Remove.
15158 * data/bison.hairy: Remove.
15159 * doc/bison.texinfo (Environment Variables): Remove occurrences of
15160 BISON_HAIRY.
15161
15162 2002-05-02 Akim Demaille <akim@epita.fr>
15163
15164 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
15165 (parse_guard): Rename the formal argument `stack_offset' as
15166 `rule_length', which is more readable.
15167 Adjust callers.
15168 (copy_at, copy_dollar): Instead of outputting the hard coded
15169 values of $$, $n and so forth, output invocation to b4_lhs_value,
15170 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
15171 Note: this patch partially drops `semantic-parser' support: it
15172 always does `rule_length - n', where semantic parsers ought to
15173 always use `-n'.
15174 * data/bison.simple, data/bison.c++ (b4_lhs_value)
15175 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
15176
15177 2002-05-02 Akim Demaille <akim@epita.fr>
15178
15179 * configure.in (AC_INIT): Bump to 1.49b.
15180 (AM_INIT_AUTOMAKE): Short invocation.
15181
15182 2002-05-02 Akim Demaille <akim@epita.fr>
15183
15184 Version 1.49a.
15185
15186 2002-05-01 Akim Demaille <akim@epita.fr>
15187
15188 * src/skeleton.h: Remove.
15189
15190 2002-05-01 Akim Demaille <akim@epita.fr>
15191
15192 * src/skeleton.h: Fix the #endif.
15193 Reported by Magnus Fromreide.
15194
15195 2002-04-26 Paul Eggert <eggert@twinsun.com>
15196
15197 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
15198 Define if we define YYSTYPE and YYLTYPE, respectively.
15199 (YYCOPY): Fix [] quoting problem in the non-GCC case.
15200
15201 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
15202
15203 * src/scan-skel.l: Postprocess quadrigraphs.
15204
15205 * src/reader.c (copy_character): New function, used to output
15206 single characters while replacing `[' and `]' with quadrigraphs, to
15207 avoid troubles with M4 quotes.
15208 (copy_comment): Output characters with copy_character.
15209 (read_additionnal_code): Likewise.
15210 (copy_string2): Likewise.
15211 (copy_definition): Likewise.
15212
15213 * tests/calc.at: Exercise M4 quoting.
15214
15215 2002-04-25 Akim Demaille <akim@epita.fr>
15216
15217 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
15218 between `!' and the command.
15219 Reported by Paul Eggert.
15220
15221 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
15222
15223 * tests/calc.at: Exercise prologue splitting.
15224
15225 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
15226 `b4_post_prologue' instead of `b4_prologue'.
15227
15228 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
15229 muscles.
15230 (output): Free pre_prologue_obstack and post_prologue_obstack.
15231 * src/files.h, src/files.c (attrs_obstack): Remove.
15232 (pre_prologue_obstack, post_prologue_obstack): New.
15233 * src/reader.c (copy_definition): Add a parameter to specify the
15234 obstack to fill, instead of using attrs_obstack unconditionally.
15235 (read_declarations): Pass pre_prologue_obstack to copy_definition if
15236 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
15237
15238 2002-04-23 Paul Eggert <eggert@twinsun.com>
15239
15240 * data/bison.simple: Remove unnecessary commentary and white
15241 space differences from 1_29-branch.
15242 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
15243
15244 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
15245 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
15246 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
15247 constructors or destructors.
15248
15249 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
15250
15251 2002-04-23 Akim Demaille <akim@epita.fr>
15252
15253 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
15254 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
15255 location with columns.
15256 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
15257 All reported by Paul Eggert.
15258
15259 2002-04-22 Akim Demaille <akim@epita.fr>
15260
15261 * src/reduce.c (dump_grammar): Move to...
15262 * src/gram.h, src/gram.c (grammar_dump): here.
15263 Be sure to separate long item numbers.
15264 Don't read the members of a rule's prec if its nil.
15265
15266 2002-04-22 Akim Demaille <akim@epita.fr>
15267
15268 * src/output.c (table_size, table_grow): New.
15269 (MAXTABLE): Remove, replace uses with table_size.
15270 (pack_vector): Instead of dying when the table is too big, grow it.
15271
15272 2002-04-22 Akim Demaille <akim@epita.fr>
15273
15274 * data/bison.simple (yyr1): Its type is that of a token number.
15275 * data/bison.c++ (r1_): Likewise.
15276 * tests/regression.at (Web2c Actions): Adjust.
15277
15278 2002-04-22 Akim Demaille <akim@epita.fr>
15279
15280 * src/reader.c (token_translations_init): 256 is now the default
15281 value for the error token, i.e., it will be assigned another
15282 number if the user assigned 256 to one of her tokens.
15283 (reader): Don't force 256 to error.
15284 * doc/bison.texinfo (Symbols): Adjust.
15285 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
15286 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
15287 etc. instead of 10, 20, 30 (which was used to `jump' over error
15288 (256) and undefined (2)).
15289
15290 2002-04-22 Akim Demaille <akim@epita.fr>
15291
15292 Propagate more token_number_t.
15293
15294 * src/gram.h (token_number_as_item_number)
15295 (item_number_as_token_number): New.
15296 * src/output.c (GENERATE_OUTPUT_TABLE): New.
15297 Use it to create output_item_number_table and
15298 output_token_number_table.
15299 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
15300 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
15301 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
15302 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
15303
15304 2002-04-22 Akim Demaille <akim@epita.fr>
15305
15306 * src/output.h, src/output.c (get_lines_number): Remove.
15307
15308 2002-04-19 Akim Demaille <akim@epita.fr>
15309
15310 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
15311 as Lex/Flex'.
15312 (Debugging): More details about enabling the debugging features.
15313 (Table of Symbols): Describe $$, $n, @$, and @n.
15314 Suggested by Tim Josling.
15315
15316 2002-04-19 Akim Demaille <akim@epita.fr>
15317
15318 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
15319
15320 2002-04-10 Akim Demaille <akim@epita.fr>
15321
15322 * src/system.h: Rely on HAVE_LIMITS_H.
15323 Suggested by Paul Eggert.
15324
15325 2002-04-09 Akim Demaille <akim@epita.fr>
15326
15327 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
15328 full stderr, and strip it according to the bison options, instead
15329 of composing the error message from different bits.
15330 This makes it easier to check for several error messages.
15331 Adjust all the invocations.
15332 Add an invocation exercising the error token.
15333 Add an invocation demonstrating a stupid error message.
15334 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
15335 Adjust the tests.
15336 Error message are for stderr, not stdout.
15337
15338 2002-04-09 Akim Demaille <akim@epita.fr>
15339
15340 * src/gram.h, src/gram.c (error_token_number): Remove, use
15341 errtoken->number.
15342 * src/reader.c (reader): Don't specify the user token number (2)
15343 for $undefined, as it uselessly prevents using it.
15344 * src/gram.h (token_number_t): Move to...
15345 * src/symtab.h: here.
15346 (state_t.number): Is a token_number_t.
15347 * src/print.c, src/reader.c: Use undeftoken->number instead of
15348 hard coded 2.
15349 (Even though this 2 is not the same as above: the number of the
15350 undeftoken remains being 2, it is its user token number which
15351 might not be 2).
15352 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
15353 `user_token_number_max'.
15354 Output `undef_token_number'.
15355 * data/bison.simple, data/bison.c++: Use them.
15356 Be sure to map invalid yylex return values to
15357 `undef_token_number'. This saves us from gratuitous SEGV.
15358
15359 * tests/conflicts.at (Solved SR Conflicts)
15360 (Unresolved SR Conflicts): Adjust.
15361 * tests/regression.at (Web2c Actions): Adjust.
15362
15363 2002-04-08 Akim Demaille <akim@epita.fr>
15364
15365 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
15366 Adding #line.
15367 Remove the duplicate `typedefs'.
15368 (RhsNumberType): Fix the declaration and various other typos.
15369 Use __ofile__.
15370 * data/bison.simple: Use __ofile__.
15371 * src/scan-skel.l: Handle __ofile__.
15372
15373 2002-04-08 Akim Demaille <akim@epita.fr>
15374
15375 * src/gram.h (item_number_t): New, the type of item numbers in
15376 RITEM. Note that it must be able to code symbol numbers as
15377 positive number, and the negation of rule numbers as negative
15378 numbers.
15379 Adjust all dependencies (pretty many).
15380 * src/reduce.c (rule): Remove this `short *' pointer: use
15381 item_number_t.
15382 * src/system.h (MINSHORT, MAXSHORT): Remove.
15383 Include `limits.h'.
15384 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
15385 (shortcpy): Remove.
15386 (MAXTABLE): Move to...
15387 * src/output.c (MAXTABLE): here.
15388 (prepare_rules): Use output_int_table to output rhs.
15389 * data/bison.simple, data/bison.c++: Adjust.
15390 * tests/torture.at (Big triangle): Move the limit from 254 to
15391 500.
15392 * tests/regression.at (Web2c Actions): Ajust.
15393
15394 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
15395 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
15396 passes, but produces negative #line number, once fixed, GCC is
15397 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
15398 C), it passes.
15399 * src/state.h (state_h): Code input lines on ints, not shorts.
15400
15401 2002-04-08 Akim Demaille <akim@epita.fr>
15402
15403 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
15404 and then the grammar.
15405
15406 2002-04-08 Akim Demaille <akim@epita.fr>
15407
15408 * src/system.h: No longer using strndup.
15409
15410 2002-04-07 Akim Demaille <akim@epita.fr>
15411
15412 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
15413 * src/output.c (output_table_data): Return the longest number.
15414 (prepare_tokens): Output `token_number_max').
15415 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
15416 New.
15417 Use them to define yy_token_number_type/TokenNumberType.
15418 Use this type for yytranslate.
15419 * tests/torture.at (Big triangle): Push the limit from 124 to
15420 253.
15421 * tests/regression.at (Web2c Actions): Adjust.
15422
15423 2002-04-07 Akim Demaille <akim@epita.fr>
15424
15425 * tests/torture.at (Big triangle): New.
15426 (GNU AWK Grammar, GNU Cim Grammar): Move to...
15427 * tests/existing.at: here.
15428
15429 2002-04-07 Akim Demaille <akim@epita.fr>
15430
15431 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
15432 nritems.
15433 Adjust dependencies.
15434
15435 2002-04-07 Akim Demaille <akim@epita.fr>
15436
15437 * src/reader.c: Normalize increments to prefix form.
15438
15439 2002-04-07 Akim Demaille <akim@epita.fr>
15440
15441 * src/reader.c, symtab.c: Remove debugging code.
15442
15443 2002-04-07 Akim Demaille <akim@epita.fr>
15444
15445 Rename all the `bucket's as `symbol_t'.
15446
15447 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
15448 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
15449 * src/symtab.c, src/symtab.h (bucket): Rename as...
15450 (symbol_t): this.
15451 (symbol_list_new, bucket_check_defined, bucket_make_alias)
15452 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
15453 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
15454 (buckets_new, buckets_free, buckets_do): Rename as...
15455 (symbol_list_new, symbol_check_defined, symbol_make_alias)
15456 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
15457 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
15458 (symbols_new, symbols_free, symbols_do): these.
15459
15460 2002-04-07 Akim Demaille <akim@epita.fr>
15461
15462 Use lib/hash for the symbol table.
15463
15464 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
15465 EOF.
15466 * src/lex.c (lex): Set the `number' member of new terminals.
15467 * src/reader.c (bucket_check_defined, bucket_make_alias)
15468 (bucket_check_alias_consistence, bucket_translation): New.
15469 (reader, grammar_free, readgram, token_translations_init)
15470 (packsymbols): Adjust.
15471 (reader): Number the predefined tokens.
15472 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
15473 for predefined tokens.
15474 * src/symtab.h (bucket): Remove all the hash table related
15475 members.
15476 * src/symtab.c (symtab): Replace by...
15477 (bucket_table): this.
15478 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
15479 (buckets_new, buckets_do): New.
15480
15481 2002-04-07 Akim Demaille <akim@epita.fr>
15482
15483 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
15484 (start_symbol, max_user_token_number, semantic_parser)
15485 (error_token_number): Initialize.
15486 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
15487 Initialize.
15488 (reader): Don't.
15489 (errtoken, eoftoken, undeftoken, axiom): Extern.
15490
15491 2002-04-07 Akim Demaille <akim@epita.fr>
15492
15493 * src/gram.h (rule_s): prec and precsym are now pointers
15494 to the bucket giving the priority/associativity.
15495 Member `associativity' removed: useless.
15496 * src/reduce.c, src/conflicts.c: Adjust.
15497
15498 2002-04-07 Akim Demaille <akim@epita.fr>
15499
15500 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
15501 Properly escape the symbols' TAG when outputting them.
15502
15503 2002-04-07 Akim Demaille <akim@epita.fr>
15504
15505 * src/lalr.h (LA): Is a bitsetv, not bitset*.
15506
15507 2002-04-07 Akim Demaille <akim@epita.fr>
15508
15509 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
15510 (LArule): this, which is an array to rule_t*.
15511 * src/print.c, src/conflicts.c: Adjust.
15512
15513 2002-04-07 Akim Demaille <akim@epita.fr>
15514
15515 * src/gram.h (rule_t): Rename `number' as `user_number'.
15516 `number' is a new member.
15517 Adjust dependencies.
15518 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
15519
15520 2002-04-07 Akim Demaille <akim@epita.fr>
15521
15522 As a result of the previous patch, it is no longer needed
15523 to reorder ritem itself.
15524
15525 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
15526
15527 2002-04-07 Akim Demaille <akim@epita.fr>
15528
15529 Be sure never to walk through RITEMS, but use only data related to
15530 the rules themselves. RITEMS should be banished.
15531
15532 * src/output.c (output_token_translations): Rename as...
15533 (prepare_tokens): this.
15534 In addition to `translate', prepare the muscles `tname' and
15535 `toknum', which were handled by...
15536 (output_rule_data): this.
15537 Remove, and move the remainder of its outputs into...
15538 (prepare_rules): this new routines, which also merges content from
15539 (output_gram): this.
15540 (prepare_rules): Be sure never to walk through RITEMS.
15541 (output_stos): Rename as...
15542 (prepare_stos): this.
15543 (output): Always invoke prepare_states, after all, just don't use it
15544 in the output if you don't need it.
15545
15546 2002-04-07 Akim Demaille <akim@epita.fr>
15547
15548 * src/LR0.c (new_state): Display `nstates' as the name of the
15549 newly created state.
15550 Adjust to initialize first_state and last_state if needed.
15551 Be sure to distinguish the initial from the final state.
15552 (new_states): Create the itemset of the initial state, and use
15553 new_state.
15554 * src/closure.c (closure): Now that the initial state has its
15555 items properly set, there is no need for a special case when
15556 creating `ruleset'.
15557
15558 As a result, now the rule 0, reducing to $axiom, is visible in the
15559 outputs. Adjust the test suite.
15560
15561 * tests/conflicts.at (Solved SR Conflicts)
15562 (Unresolved SR Conflicts): Adjust.
15563 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
15564 * tests/conflicts.at (S/R in initial): New.
15565
15566 2002-04-07 Akim Demaille <akim@epita.fr>
15567
15568 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
15569 the RHS of the rules.
15570 * src/output.c (output_gram): Likewise.
15571
15572 2002-04-07 Akim Demaille <akim@epita.fr>
15573
15574 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
15575 bucket.
15576 Adjust all dependencies.
15577 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
15578 `number' of the buckets too.
15579 * src/gram.h: Include `symtab.h'.
15580 (associativity): Move to...
15581 * src/symtab.h: here.
15582 No longer include `gram.h'.
15583
15584 2002-04-07 Akim Demaille <akim@epita.fr>
15585
15586 * src/gram.h, src/gram.c (rules_rhs_length): New.
15587 (ritem_longest_rhs): Use it.
15588 * src/gram.h (rule_t): `number' is a new member.
15589 * src/reader.c (packgram): Set it.
15590 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
15591 the end of `rules', and count them out of `nrules'.
15592 (reduce_output, dump_grammar): Adjust.
15593 * src/print.c (print_grammar): It is no longer needed to check for
15594 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
15595 * tests/reduce.at (Reduced Automaton): New test.
15596
15597 2002-04-07 Akim Demaille <akim@epita.fr>
15598
15599 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
15600 lacking `+ 1' to nrules, Bison reported as useless a token if it
15601 was used solely to set the precedence of the last rule...
15602
15603 2002-04-07 Akim Demaille <akim@epita.fr>
15604
15605 * data/bison.c++, data/bison.simple: Don't output the current file
15606 name in #line, to avoid useless diffs between two identical
15607 outputs under different names.
15608
15609 2002-04-07 Akim Demaille <akim@epita.fr>
15610
15611 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
15612 Normalize loops to using `< nrules + 1', not `<= nrules'.
15613
15614 2002-04-07 Akim Demaille <akim@epita.fr>
15615
15616 * TODO: Update.
15617
15618 2002-04-07 Akim Demaille <akim@epita.fr>
15619
15620 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
15621 bucket.value as bucket.number.
15622
15623 2002-04-07 Akim Demaille <akim@epita.fr>
15624
15625 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
15626 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
15627 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
15628 RHS, instead of being an index in RITEMS.
15629
15630 2002-04-04 Paul Eggert <eggert@twinsun.com>
15631
15632 * doc/bison.texinfo: Update copyright date.
15633 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
15634 (Symbols): Warn about running Bison in one character set,
15635 but compiling and/or running in an incompatible one.
15636 Warn about character code 256, too.
15637
15638 2002-04-03 Paul Eggert <eggert@twinsun.com>
15639
15640 * src/bison.data (YYSTACK_ALLOC): Depend on whether
15641 YYERROR_VERBOSE is nonzero, not whether it is defined.
15642
15643 Merge changes from bison-1_29-branch.
15644
15645 2002-03-20 Paul Eggert <eggert@twinsun.com>
15646
15647 Merge fixes from Debian bison_1.34-1.diff.
15648
15649 * configure.in (AC_PREREQ): 2.53.
15650
15651 2002-03-20 Akim Demaille <akim@epita.fr>
15652
15653 * src/conflicts.c (log_resolution): Argument `resolution' is const.
15654
15655 2002-03-19 Paul Eggert <eggert@twinsun.com>
15656
15657 * src/bison.simple (YYCOPY): New macro.
15658 (YYSTACK_RELOCATE): Use it.
15659 Remove Type arg; no longer needed. All callers changed.
15660 (yymemcpy): Remove; no longer needed.
15661
15662 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
15663 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15664
15665 2002-03-19 Akim Demaille <akim@epita.fr>
15666
15667 Test and fix the #line outputs.
15668
15669 * tests/atlocal.at (GCC): New.
15670 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
15671 (Prologue synch line, %union synch line, Postprologue synch line)
15672 (Action synch line, Epilogue synch line): New tests.
15673 * src/reader.c (parse_union_decl): Define the muscle stype_line.
15674 * data/bison.simple, data/bison.c++: Use it.
15675
15676 2002-03-19 Akim Demaille <akim@epita.fr>
15677
15678 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
15679 (Solved SR Conflicts, %expect not enough, %expect right)
15680 (%expect too much): Move to...
15681 * tests/conflicts.at: this new file.
15682
15683 2002-03-19 Akim Demaille <akim@epita.fr>
15684
15685 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
15686 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
15687 that we can move to enums for instance.
15688 * src/output.c (token_definitions_output): Output a list of
15689 `token-name, token-number' instead of the #define.
15690 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
15691
15692 2002-03-14 Akim Demaille <akim@epita.fr>
15693
15694 Use Gettext 0.11.1.
15695
15696 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
15697
15698 * data/bison.c++: Make the user able to add members to the generated
15699 parser by subclassing.
15700
15701 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
15702
15703 * src/reader.c (read_additionnal_code): `c' should be an integer, not
15704 a character.
15705 Reported by Nicolas Tisserand and Nicolas Burrus.
15706
15707 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
15708
15709 * src/reader.c: Warn about lacking semi-colons, do not complain.
15710
15711 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
15712
15713 * data/bison.c++: Remove a debug line.
15714
15715 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
15716
15717 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
15718 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
15719 provide a default implementation.
15720
15721 2002-03-04 Akim Demaille <akim@epita.fr>
15722
15723 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
15724 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
15725 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
15726 * tests/semantic.at (Parsing Guards): Similarly.
15727 * src/reader.at (readgram): Complain if the last rule is not ended
15728 with a semi-colon.
15729
15730 2002-03-04 Akim Demaille <akim@epita.fr>
15731
15732 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
15733 * src/closure.c: here.
15734 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
15735 RTC.
15736 * src/warshall.h, src/warshall.c: Remove.
15737 * tests/sets.at (Broken Closure): Adjust.
15738
15739 2002-03-04 Akim Demaille <akim@epita.fr>
15740
15741 * src/output.c (output_skeleton): tempdir is const.
15742 bytes_read is unused.
15743
15744 2002-03-04 Akim Demaille <akim@epita.fr>
15745
15746 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
15747 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
15748 Update.
15749 From Michael Hayes.
15750
15751 2002-03-04 Akim Demaille <akim@epita.fr>
15752
15753 * src/closure.c (closure): `r' is unused.
15754
15755 2002-03-04 Akim Demaille <akim@epita.fr>
15756
15757 * tests/sets.at (Broken Closure): Add the ending `;'.
15758 * src/reader.at (readgram): Complain if a rule is not ended with a
15759 semi-colon.
15760
15761 2002-03-04 Akim Demaille <akim@epita.fr>
15762
15763 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
15764 (count_sr_conflicts): Use bitset_count.
15765 * src/reduce.c (inaccessable_symbols): Ditto.
15766 (bits_size): Remove.
15767 * src/warshall.h, src/warshall.c: Convert to bitsetv.
15768
15769 2002-03-04 Akim Demaille <akim@epita.fr>
15770
15771 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
15772 * src/reduce.c: Remove the `bitset_zero's following the
15773 `bitset_create's, as now it is performed by the latter.
15774
15775 2002-03-04 Akim Demaille <akim@epita.fr>
15776
15777 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
15778 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
15779 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
15780 latest sources from Michael.
15781
15782 2002-03-04 Akim Demaille <akim@epita.fr>
15783
15784 * src/output.c (output): Don't free the grammar.
15785 * src/reader.c (grammar_free): New.
15786 * src/main.c (main): Call it and don't free symtab here.
15787
15788 2002-03-04 Akim Demaille <akim@epita.fr>
15789
15790 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
15791 before returning.
15792 Reported by Benoit Perrot.
15793
15794 2002-03-04 Akim Demaille <akim@epita.fr>
15795
15796 Use bitset operations when possible, not loops over bits.
15797
15798 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
15799 bitset_or.
15800 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
15801 * src/reduce.c (useless_nonterminals): Formatting changes.
15802 * src/warshall.c (TC): Use bitset_or.
15803
15804 2002-03-04 Akim Demaille <akim@epita.fr>
15805
15806 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
15807 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
15808 Ditto.
15809
15810 2002-03-04 Akim Demaille <akim@epita.fr>
15811
15812 * src/lalr.c (F): Now a bitset*.
15813 Adjust all dependencies.
15814
15815 2002-03-04 Akim Demaille <akim@epita.fr>
15816
15817 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
15818 Adjust all dependencies.
15819
15820 2002-03-04 Akim Demaille <akim@epita.fr>
15821
15822 * src/L0.c, src/LR0.h (nstates): Be size_t.
15823 Adjust comparisons (signed vs unsigned).
15824 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
15825 bitset*.
15826 Adjust all dependencies.
15827
15828 2002-03-04 Akim Demaille <akim@epita.fr>
15829
15830 * src/closure.c (firsts): Now, also a bitset.
15831 Adjust all dependencies.
15832 (varsetsize): Remove, now unused.
15833 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
15834
15835 2002-03-04 Akim Demaille <akim@epita.fr>
15836
15837 * src/print.c: Convert to use bitset.h, not hand coded iterations
15838 over ints.
15839
15840 2002-03-04 Akim Demaille <akim@epita.fr>
15841
15842 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
15843
15844 2002-03-04 Akim Demaille <akim@epita.fr>
15845
15846 * src/closure.c (ruleset): Be a bitset.
15847 (rulesetsize): Remove.
15848
15849 2002-03-04 Akim Demaille <akim@epita.fr>
15850
15851 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
15852 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
15853 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
15854 * src/closure.c (fderives): Be an array of bitsets.
15855
15856 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
15857
15858 * data/bison.c++: Merge the two generated headers. Insert a copyright
15859 notice in each output file.
15860
15861 2002-02-28 Akim Demaille <akim@epita.fr>
15862
15863 * data/bison.c++: Copy the prologue of bison.simple to fetch
15864 useful M4 definitions, such as b4_header_guard.
15865
15866 2002-02-25 Akim Demaille <akim@epita.fr>
15867
15868 * src/getargs.c (version): Give the name of the authors, and use a
15869 translator friendly scheme for the bgr
15870 copyright notice.
15871
15872 2002-02-25 Akim Demaille <akim@epita.fr>
15873
15874 * src/output.c (header_output): Remove, now handled completely via
15875 M4.
15876
15877 2002-02-25 Akim Demaille <akim@epita.fr>
15878
15879 * m4/m4.m4: New, from CVS Autoconf.
15880 * configure.in: Invoke it.
15881 * src/output.c (output_skeleton): Use its result instead of the
15882 hard coded name.
15883
15884 2002-02-25 Akim Demaille <akim@epita.fr>
15885
15886 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
15887 Fileutils 4.1.5.
15888 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
15889 * src/output.c (output_skeleton): Use mkstemp to create a real
15890 temporary file.
15891 Move the filling of `skeleton' and its muscle to...
15892 (prepare): here.
15893 (output): Move the definition of the prologue muscle to...
15894 (prepare): here.
15895 * src/system.h (DEFAULT_TMPDIR): New.
15896
15897 2002-02-14 Paul Eggert <eggert@twinsun.com>
15898
15899 Remove the support for C++ namespace cleanliness; it was
15900 causing more problems than it was curing, since it didn't work
15901 properly on some nonstandard C++ compilers. This can wait
15902 for a proper C++ parser.
15903
15904 * NEWS: Document this.
15905 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
15906 of C++, as it's treated like C now.
15907 * src/bison.simple (YYSTD): Remove.
15908 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
15909 Treat C++ just like Standard C instead of trying to support
15910 namespace cleanliness.
15911
15912 2002-02-14 Akim Demaille <akim@epita.fr>
15913
15914 * tests/regression.at (else): Adjust to Andreas' change.
15915
15916 2002-02-14 Akim Demaille <akim@epita.fr>
15917
15918 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
15919
15920 2002-02-13 Andreas Schwab <schwab@suse.de>
15921
15922 * src/output.c (output_rule_data): Don't output NULL, it might
15923 not be defined yet.
15924
15925 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
15926
15927 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
15928 (Copyright notice): Update.
15929
15930 2002-02-11 Akim Demaille <akim@epita.fr>
15931
15932 * tests/regression.at (%nonassoc and eof): Don't include
15933 nonportable headers.
15934
15935 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
15936
15937 * data/bison.c++: Correct error recovery. Make the user able to
15938 initialize the starting location.
15939
15940 2002-02-07 Akim Demaille <akim@epita.fr>
15941
15942 * tests/input.at: New.
15943
15944 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15945
15946 * data/bison.c++: Replace some direct m4 expansions by constants. Be
15947 more consistent when naming methods and variables. Put preprocessor
15948 directives around tables only needed for debugging.
15949
15950 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15951
15952 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
15953 C++ parsers.
15954 (yy::b4_name::parse): Use print_.
15955
15956 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15957
15958 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
15959
15960 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15961
15962 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
15963 C++ parsers.
15964 (yy::b4_name::parse): Build verbose error messages, and use error_.
15965
15966 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
15967
15968 * data/bison.c++: Fix m4 quoting in comments.
15969
15970 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
15971
15972 * data/bison.c++: Adjust the parser code. Fix some muscles that were
15973 not expanded by m4.
15974
15975 2002-02-05 Akim Demaille <akim@epita.fr>
15976
15977 * data/bison.c++: Adjust to the M4 back end.
15978 More is certainly needed.
15979
15980 2002-02-05 Akim Demaille <akim@epita.fr>
15981
15982 Give a try to M4 as a back end.
15983
15984 * lib/readpipe.c: New, from wdiff.
15985 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
15986 BISON_HAIRY.
15987 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
15988 specific values. Now it is m4 that performs the lookup.
15989 * src/parse-skel.y: Remove.
15990 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
15991 * src/output.c (actions_output, guards_output)
15992 (token_definitions_output): No longer keeps track of the output
15993 line number, hence remove the second argument.
15994 (guards_output): Check against the guard member of a rule, not the
15995 action member.
15996 Adjust callers.
15997 (output_skeleton): Don't look for the skeleton location, let m4 do
15998 that.
15999 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
16000 file will be used.
16001 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
16002 (prepare): Given that for the time being changesyntax is not
16003 usable in M4, rename the muscles using `-' to `_'.
16004 Define `defines_flag', `output_parser_name' and `output_header_name'.
16005 * src/output.h (actions_output, guards_output)
16006 (token_definitions_output): Adjust prototypes.
16007 * src/scan-skel.l: Instead of scanning the skeletons, it now
16008 processes the output of m4: `__oline__' and `#output'.
16009 * data/bison.simple: Adjust to be used by M4(sugar).
16010 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
16011 to date.
16012 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
16013 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
16014 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
16015 shamelessly stolen from CVS Autoconf.
16016
16017 2002-02-05 Akim Demaille <akim@epita.fr>
16018
16019 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
16020 * configure.in: Check for the declarations of free and malloc.
16021 * src/muscle_tab.c: Adjust.
16022
16023 2002-02-05 Akim Demaille <akim@epita.fr>
16024
16025 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
16026 which have no values.
16027
16028 2002-02-05 Akim Demaille <akim@epita.fr>
16029
16030 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
16031 * data/: here.
16032
16033 2002-01-29 Paul Eggert <eggert@twinsun.com>
16034
16035 * src/bison.simple (YYSIZE_T): Do not define merely because
16036 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
16037 On some platforms, <alloca.h> does not declare YYSTD (size_t).
16038
16039 2002-01-27 Akim Demaille <akim@epita.fr>
16040
16041 Fix `%nonassoc and eof'.
16042
16043 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
16044 which were not properly copied! Replace
16045 memcpy (res->errs, src->errs, src->nerrs);
16046 with
16047 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
16048 !!!
16049 * tests/regression.at (%nonassoc and eof): Adjust to newest
16050 Autotest: `.' is not in the PATH.
16051
16052 2002-01-27 Akim Demaille <akim@epita.fr>
16053
16054 * tests/sets.at (AT_EXTRACT_SETS): New.
16055 (Nullable): Use it.
16056 (Firsts): New.
16057
16058 2002-01-26 Akim Demaille <akim@epita.fr>
16059
16060 * tests/actions.at, tests/calc.at, tests/headers.at,
16061 * tests/torture.at: Adjust to the newest Autotest which no longer
16062 forces `.' in the PATH.
16063
16064 2002-01-25 Akim Demaille <akim@epita.fr>
16065
16066 * tests/regression.at (%nonassoc and eof): New.
16067 Suggested by Robert Anisko.
16068
16069 2002-01-24 Akim Demaille <akim@epita.fr>
16070
16071 Bison dumps core when trying to complain about broken input files.
16072 Reported by Cris van Pelt.
16073
16074 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
16075 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
16076 into...
16077 (Invalid inputs): Strengthen: exercise parse_percent_token.
16078
16079 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
16080
16081 * src/Makefile.am: Add bison.c++.
16082 * src/bison.c++: New skeleton.
16083
16084 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
16085
16086 * po/it.po: New.
16087
16088 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
16089
16090 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
16091
16092 2002-01-20 Marc Autret <marc@gnu.org>
16093
16094 * src/files.c (compute_output_file_names): Fix
16095
16096 2002-01-20 Marc Autret <marc@gnu.org>
16097
16098 * tests/output.at: New test.
16099 * src/files.c (compute_base_names): Don't map extensions when
16100 the YACC flag is set, use defaults.
16101 Reported by Evgeny Stambulchik.
16102
16103 2002-01-20 Marc Autret <marc@gnu.org>
16104
16105 * src/system.h: Need to define __attribute__ away for non-GCC
16106 compilers as well (i.e., the vendor C compiler).
16107 Suggested by Albert Chin-A-Young.
16108
16109 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
16110
16111 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
16112 canonical definition.
16113 * src/system.h: Use the canonical definition for PARAMS (avoids
16114 a conflict with the macro from lib/hash.h).
16115
16116 2002-01-11 Akim Demaille <akim@epita.fr>
16117
16118 * configure.in: Use AC_FUNC_STRNLEN.
16119 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
16120
16121 2002-01-09 Akim Demaille <akim@epita.fr>
16122
16123 * src/files.c, src/files.h (output_infix): New.
16124 (tab_extension): Remove.
16125 (compute_base_names): Compute the former, drop the latter.
16126 * src/output.c (prepare): Insert the muscles `output-infix', and
16127 `output-suffix'.
16128 * src/parse-skel.y (string, string.1): New.
16129 (section.header): Use it.
16130 (section.yacc): Remove.
16131 (prefix): Remove too.
16132 * src/scan-skel.l: Adjust.
16133 * src/bison.simple, src/bison.hairy: Adjust.
16134
16135 2002-01-09 Akim Demaille <akim@epita.fr>
16136
16137 * configure.in (WERROR_CFLAGS): Compute it.
16138 * src/Makefile.am (CFLAGS): Pass it.
16139 * tests/atlocal.in (CFLAGS): Idem.
16140 * src/files.c: Fix a few warnings.
16141 (get_extension_index): Remove, unused.
16142
16143 2002-01-08 Akim Demaille <akim@epita.fr>
16144
16145 * src/getargs.c (AS_FILE_NAME): New.
16146 (getargs): Use it to convert DOSish file names.
16147 * src/files.c (base_name): Rename as full_base_name to avoid
16148 clashes with `base_name ()'.
16149 (filename_split): New.
16150 (compute_base_names): N-th rewrite, using filename_split.
16151
16152 2002-01-08 Akim Demaille <akim@epita.fr>
16153
16154 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
16155 New, stolen from the Fileutils 4.1.
16156 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16157 * configure.in: Check for the presence of memrchr, and of its
16158 prototype.
16159
16160 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
16161
16162 * lib/hash.h (__P): Added definition for this macro.
16163 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
16164 BUILT_SOURCES, to ensure they are generated first.
16165 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
16166 %error-verbose to allow bootstrapping with bison 1.30x.
16167
16168 2002-01-06 Akim Demaille <akim@epita.fr>
16169
16170 * src/reader.c (parse_braces): Don't fetch the next char, the
16171 convention is to fetch on entry.
16172 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
16173 'switch' without a following semicolon.
16174 * tests/regression.at (braces parsing): New.
16175
16176 2002-01-06 Akim Demaille <akim@epita.fr>
16177
16178 Bison is dead wrong in its RR conflict reports.
16179
16180 * tests/torture.at (GNU Cim Grammar): New.
16181 * src/conflicts.c (count_rr_conflicts): Fix.
16182
16183 2002-01-06 Akim Demaille <akim@epita.fr>
16184
16185 Creating package.m4 from configure.ac causes too many problems.
16186
16187 * tests/Makefile.am (package.m4): Create it by hand,
16188 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
16189
16190 2002-01-06 Akim Demaille <akim@epita.fr>
16191
16192 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
16193 skeleton.h.
16194
16195 2002-01-04 Paul Eggert <eggert@twinsun.com>
16196
16197 * doc/bison.texinfo (Debugging):
16198 Remove YYSTDERR; it's no longer defined or used.
16199 Also, s/cstdio.h/cstdio/.
16200
16201 2002-01-03 Akim Demaille <akim@epita.fr>
16202
16203 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
16204
16205 2002-01-03 Akim Demaille <akim@epita.fr>
16206
16207 * src/parse-skel.y (process_skeleton): Don't bind the parser's
16208 tracing code to --trace, wait for a better --trace option, with
16209 args.
16210
16211 2002-01-03 Akim Demaille <akim@epita.fr>
16212
16213 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
16214 The ISO C++ standard is extremely clear about it: stderr is
16215 considered a macro, not a regular symbol (see table 94 `Header
16216 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
16217 Therefore std:: does not apply to it. It still does with fprintf.
16218 Also, s/cstdio.h/cstdio/.
16219
16220 2002-01-03 Akim Demaille <akim@epita.fr>
16221
16222 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
16223 for non system headers.
16224
16225 2002-01-02 Akim Demaille <akim@epita.fr>
16226
16227 Equip the skeleton chain with location tracking, runtime trace,
16228 pure parser and scanner.
16229
16230 * src/parse-skel.y: Request a pure parser, locations, and prefix
16231 renaming.
16232 (%union): Having several members with the same type does not help
16233 type mismatches, simplify.
16234 (YYPRINT, yyprint): New.
16235 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
16236 (skel_error): this.
16237 Handle locations.
16238 * src/scan-skel.l: Adjust to these changes.
16239 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
16240 (LOCATION_PRINT, skel_control_t): New.
16241
16242 2001-12-30 Akim Demaille <akim@epita.fr>
16243
16244 * src/parse-skel.y: Get rid of the shift/reduce conflict:
16245 replace `gb' with BLANKS.
16246 * src/scan-skel.l: Adjust.
16247
16248 2001-12-30 Akim Demaille <akim@epita.fr>
16249
16250 * src/system.h: We don't need nor want bcopy.
16251 Throw away MS-DOS crap: we don't need getpid.
16252 * configure.in: We don't need strndup. It was even causing
16253 problems: because Flex includes the headers *before* us,
16254 _GNU_SOURCE is not defined by config.h, and therefore strndup was
16255 not visible.
16256 * lib/xstrndup.c: New.
16257 * src/scan-skel.l: Use it.
16258 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
16259 * src/parse-skel.y: Use %directives instead of #defines.
16260
16261 2001-12-30 Akim Demaille <akim@epita.fr>
16262
16263 * src/skeleton.h: New.
16264 * src/output.c (output_parser, output_master_parser): Remove, dead
16265 code.
16266 * src/output.h (get_lines_number, actions_output, guards_output)
16267 (token_definitions_output): Prototype them.
16268 * src/parse-skel.y: Add the license notice.
16269 Include output.h and skeleton.h.
16270 (process_skeleton): Returns void, and takes a single parameter.
16271 * src/scan-skel.l: Add the license notice.
16272 Include skeleton.h.
16273 Don't use %option yylineno: it seems that then Flex imagines
16274 REJECT has been used, and therefore it won't reallocate its
16275 buffers (which makes no other sense to me than a bug). It results
16276 in warnings for `unused: yy_flex_realloc'.
16277
16278 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
16279
16280 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
16281 (MUSCLE_INSERT_PREFIX): ...to there.
16282 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
16283 (MUSCLE_INSERT_PREFIX): Move from here...
16284
16285 * src/bison.hairy: Add a section directive. Put braces around muscle
16286 names. This parser skeleton is still broken, but Bison should not
16287 choke on a bad muscle 'syntax'.
16288 * src/bison.simple: Add a section directive. Put braces around muscle
16289 names.
16290
16291 * src/files.h (strsuffix, stringappend): Add declarations.
16292 (tab_extension): Add declaration.
16293 (short_base_name): Add declaration.
16294
16295 * src/files.c (strsuffix, stringappend): No longer static. These
16296 functions are used in the skeleton parser.
16297 (tab_extension): New.
16298 (compute_base_names): Use the computations done in this function
16299 to guess if the generated parsers should have '.tab' in their
16300 names.
16301 (short_base_name): No longer static.
16302
16303 * src/output.c (output_skeleton): New.
16304 (output): Disable call to output_master_parser, and give a try to
16305 a new skeleton handling system.
16306 (guards_output, actions_output): No longer static.
16307 (token_definitions_output, get_lines_number): No longer static.
16308
16309 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
16310
16311 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
16312 parse-skel.y.
16313
16314 * src/parse-skel.y: New file.
16315 * src/scan-skel.l: New file.
16316
16317 2001-12-29 Akim Demaille <akim@epita.fr>
16318
16319 %name-prefix is broken.
16320
16321 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
16322 Adjust all dependencies.
16323 * tests/headers.at (export YYLTYPE): Strengthen this test: use
16324 %name-prefix.
16325
16326 Renaming yylval but not yylloc is not consistent. Now we do.
16327
16328 * src/bison.simple: Prefix yylloc if used.
16329 * doc/bison.texinfo (Decl Summary): Document that.
16330
16331 2001-12-29 Akim Demaille <akim@epita.fr>
16332
16333 * doc/bison.texinfo: Promote `%long-directive' over
16334 `%long_directive'.
16335 Remove all references to fixed-output-files, yacc is enough.
16336
16337 2001-12-29 Akim Demaille <akim@epita.fr>
16338
16339 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
16340 user prologue. These are defaults.
16341 * tests/actions.at (Mid-rule actions): Make sure the user can
16342 define YYDEBUG and YYERROR_VERBOSE.
16343
16344 2001-12-29 Akim Demaille <akim@epita.fr>
16345
16346 * src/output.c (header_output): Don't forget to export YYLTYPE and
16347 yylloc.
16348 * tests/headers.at (export YYLTYPE): New, make sure it does.
16349 * tests/regression.at (%union and --defines, Invalid CPP headers):
16350 Move to...
16351 * tests/headers.at: here.
16352
16353 2001-12-29 Akim Demaille <akim@epita.fr>
16354
16355 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
16356
16357 2001-12-29 Akim Demaille <akim@epita.fr>
16358
16359 * tests/actions.at (Mid-rule actions): Output on a single line
16360 instead of several.
16361
16362 2001-12-29 Akim Demaille <akim@epita.fr>
16363
16364 * doc/bison.texinfo: Formatting changes.
16365
16366 2001-12-29 Akim Demaille <akim@epita.fr>
16367
16368 Don't store the token defs in a muscle, just be ready to output it
16369 on command. Now possible via `symbols'. Fixes a memory leak.
16370
16371 * src/output.c (token_definitions_output): New.
16372 (output_parser, header_output): Use it.
16373 * src/reader.c (symbols_save): Remove.
16374
16375 2001-12-29 Akim Demaille <akim@epita.fr>
16376
16377 * src/bison.simple: Do not provide a default for YYSTYPE and
16378 YYLTYPE before the user's prologue. Otherwise it's hardly... a
16379 default.
16380
16381 2001-12-29 Akim Demaille <akim@epita.fr>
16382
16383 Mid-rule actions are simply... ignored!
16384
16385 * src/reader.c (readgram): Be sure to attach mid-rule actions to
16386 the empty-rule associated to the dummy symbol, not to the host
16387 rule.
16388 * tests/actions.at (Mid-rule actions): New.
16389
16390 2001-12-29 Akim Demaille <akim@epita.fr>
16391
16392 Memory leak.
16393
16394 * src/reader.c (reader): Free grammar.
16395
16396 2001-12-29 Akim Demaille <akim@epita.fr>
16397
16398 Memory leak.
16399
16400 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
16401 since it allocates it for each state, although only one is needed.
16402 (allocate_storage): Do it here.
16403
16404 2001-12-29 Akim Demaille <akim@epita.fr>
16405
16406 * src/options.h, src/options.c (create_long_option_table): Rename
16407 as...
16408 (long_option_table_new): this, with a clearer prototype.
16409 (percent_table): Remove, unused,
16410 * src/getargs.c (getargs): Adjust.
16411
16412 2001-12-29 Akim Demaille <akim@epita.fr>
16413
16414 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
16415 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
16416 as states.
16417
16418 2001-12-29 Akim Demaille <akim@epita.fr>
16419
16420 * src/lalr.c (build_relations): Rename `states' as `states1'.
16421 Sorry, I don't understand exactly what it is, no better name...
16422
16423 2001-12-29 Akim Demaille <akim@epita.fr>
16424
16425 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
16426 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
16427 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
16428 as rules.
16429
16430 2001-12-29 Akim Demaille <akim@epita.fr>
16431
16432 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
16433 ago.
16434
16435 2001-12-29 Akim Demaille <akim@epita.fr>
16436
16437 * src/reader.c, src/reader.h (user_toknums): Remove.
16438 Adjust all users to use symbols[i]->user_token_number.
16439
16440 2001-12-29 Akim Demaille <akim@epita.fr>
16441
16442 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
16443 Adjust all users to use symbols[i]->prec or ->assoc.
16444
16445 2001-12-29 Akim Demaille <akim@epita.fr>
16446
16447 * src/reader.c, src/reader.h (tags): Remove.
16448 Adjust all users to use symbols[i]->tag.
16449
16450 2001-12-29 Akim Demaille <akim@epita.fr>
16451
16452 * src/gram.h, src/gram.c (symbols): New, similar to state_table
16453 and rule_table.
16454 * src/reader.c (packsymbols): Fill this table.
16455 Drop sprec.
16456 * src/conflicts.c (resolve_sr_conflict): Adjust.
16457 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
16458 single table.
16459 Use symbols[i]->tag instead of tags[i].
16460
16461 2001-12-29 Akim Demaille <akim@epita.fr>
16462
16463 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
16464 In addition, put a comment in there, to replace...
16465 * tests/regression.at (%union and C comments): Remove.
16466
16467 2001-12-29 Akim Demaille <akim@epita.fr>
16468
16469 * tests/regression.at (Web2c Actions): Blindly move the actual
16470 output as expected output. The contents *seem* right to me, but I
16471 can't pretend reading perfectly parser tables... Nonetheless, all
16472 the other tests pass correctly, the table look OK, even though the
16473 presence of `$axiom' is to be noted: AFAICS it is useless (but
16474 harmless).
16475
16476 2001-12-29 Akim Demaille <akim@epita.fr>
16477
16478 * src/reader.c (readgram): Don't add the rule 0 if there were no
16479 rules read. In other words, add it _after_ having performed
16480 grammar sanity checks.
16481 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
16482
16483 2001-12-29 Akim Demaille <akim@epita.fr>
16484
16485 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
16486 visible, and some states have now a different number.
16487
16488 2001-12-29 Akim Demaille <akim@epita.fr>
16489
16490 * src/reader.c (readgram): Bind the initial rule's lineno to that
16491 of the first rule.
16492 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
16493 (Solved SR Conflicts): Adjust rule 0's line number.
16494
16495 2001-12-29 Akim Demaille <akim@epita.fr>
16496
16497 Fix the `GAWK Grammar' failure.
16498
16499 * src/LR0.c (final_state): Initialize to -1 so that we do compute
16500 the reductions of the first state which was mistakenly confused
16501 with the final state because precisely final_state was initialized
16502 to 0.
16503 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
16504 now noticed by Bison.
16505 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
16506 have a reduction on $default.
16507
16508 2001-12-29 Akim Demaille <akim@epita.fr>
16509
16510 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
16511 rule line numbers.
16512 * src/closure.c (print_closure): Likewise.
16513 * src/derives.c (print_derives): Likewise.
16514 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
16515 now.
16516
16517 2001-12-29 Akim Demaille <akim@epita.fr>
16518
16519 * src/lalr.c (lookaheads_print): New.
16520 (lalr): Call it when --trace-flag.
16521 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
16522 are dumped.
16523
16524 2001-12-29 Akim Demaille <akim@epita.fr>
16525
16526 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
16527 when walking through ritem, even via rule->rhs.
16528 * src/reduce.c (dump_grammar, useful_production, reduce_output)
16529 (useful_production, useless_nonterminals): Likewise.
16530 (reduce_grammar_tables): Likewise, plus update nritems.
16531 * src/nullable.c (set_nullable): Likewise.
16532 * src/lalr.c (build_relations): Likewise.
16533 * tests/sets.at (Nullable): Adjust.
16534 Fortunately, now, the $axiom is no longer nullable.
16535
16536 2001-12-29 Akim Demaille <akim@epita.fr>
16537
16538 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
16539 the 0-sentinel.
16540 * src/gram.c (ritem_longest_rhs): Likewise.
16541 * src/reduce.c (nonterminals_reduce): Likewise.
16542 * src/print_graph.c (print_graph): Likewise.
16543 * src/output.c (output_rule_data): Likewise.
16544 * src/nullable.c (set_nullable): Likewise.
16545
16546 2001-12-29 Akim Demaille <akim@epita.fr>
16547
16548 * src/output.c: Comment changes.
16549
16550 2001-12-27 Paul Eggert <eggert@twinsun.com>
16551
16552 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
16553 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
16554 Sparc, as they were causing more porting problems than the
16555 (minor) performance improvement was worth.
16556
16557 Also, catch up with 1.31's YYSTD.
16558
16559 2001-12-27 Akim Demaille <akim@epita.fr>
16560
16561 * src/output.c (output_gram): Rely on nritems, not the
16562 0-sentinel. See below.
16563 Use -1 as separator, not 0.
16564 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
16565 Rely on -1 as separator in yyrhs, instead of 0.
16566 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
16567 twice `Now at end of input', therefore there are two lines less to
16568 expect.
16569
16570 2001-12-27 Akim Demaille <akim@epita.fr>
16571
16572 * tests/regression.at (Unresolved SR Conflicts):
16573 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
16574 below.
16575
16576 2001-12-27 Akim Demaille <akim@epita.fr>
16577
16578 * src/LR0.c (new_state): Recognize the final state by the fact it
16579 is reached by eoftoken.
16580 (insert_start_shifting_state, insert_eof_shifting_state)
16581 (insert_accepting_state, augment_automaton): Remove, since now
16582 these states are automatically computed from the initial state.
16583 (generate_states): Adjust.
16584 * src/print.c: When reporting a rule number to the user, substract
16585 1, so that the axiom rule is rule 0, and the first user rule is 1.
16586 * src/reduce.c: Likewise.
16587 * src/print_graph.c (print_core): For the time being, just as for
16588 the report, depend upon --trace-flags to dump the full set of
16589 items.
16590 * src/reader.c (readgram): Once the grammar read, insert the rule
16591 0: `$axiom: START-SYMBOL $'.
16592 * tests/set.at: Adjust: rule 0 is now displayed, and since the
16593 number of the states has changed (the final state is no longer
16594 necessarily the last), catch up.
16595
16596 2001-12-27 Akim Demaille <akim@epita.fr>
16597
16598 Try to make the use of the eoftoken valid. Given that its value
16599 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
16600 is used instead of > 0 where appropriate, (ii), depend upon nritems
16601 instead of the 0-sentinel.
16602
16603 * src/gram.h, src/gram.c (nritems): New.
16604 Expected to be duplication of nitems, but for the time being...
16605 * src/reader.c (packgram): Assert nritems and nitems are equal.
16606 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
16607 * src/closure.c (print_closure, print_fderives): Likewise.
16608 * src/gram.c (ritem_print): Likewise.
16609 * src/print.c (print_core, print_grammar): Likewise.
16610 * src/print_graph.c: Likewise.
16611
16612 2001-12-27 Akim Demaille <akim@epita.fr>
16613
16614 * src/main.c (main): If there are complains after grammar
16615 reductions, then output the report anyway if requested, then die.
16616 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
16617 * src/reader.c (eoftoken): New.
16618 (parse_token_decl): If the token being defined has value `0', it
16619 is the eoftoken.
16620 (packsymbols): No longer hack `tags' to insert `$' by hand.
16621 Be sure to preserve the value of the eoftoken.
16622 (reader): Make sure eoftoken is defined.
16623 Initialize nsyms to 0: now eoftoken is created just like the others.
16624 * src/print.c (print_grammar): Don't special case the eof token.
16625 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
16626 lie anyway, albeit pleasant.
16627 * tests/calc.at: Exercise error messages with eoftoken.
16628 Change the grammar so that empty input is invalid.
16629 Adjust expectations.
16630 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
16631
16632 2001-12-27 Akim Demaille <akim@epita.fr>
16633
16634 * configure.in: Check the protos of strchr ans strspn.
16635 Replace strchr if needed.
16636 * src/system.h: Provide the protos of strchr, strspn and memchr if
16637 missing.
16638 * lib/strchr.c: New.
16639 * src/reader.c (symbols_save): Use strchr.
16640
16641 2001-12-27 Akim Demaille <akim@epita.fr>
16642
16643 * src/print.c, src/print_graph.c (escape): New.
16644 Use it to quote the TAGS outputs.
16645 * src/print_graph.c (print_state): Now errors are in red, and
16646 reductions in green.
16647 Prefer high to wide: output the state number on a line of its own.
16648
16649 2001-12-27 Akim Demaille <akim@epita.fr>
16650
16651 * src/state.h, src/state.c (reductions_new): New.
16652 * src/LR0.c (set_state_table): Let all the states have a
16653 `reductions', even if reduced to 0.
16654 (save_reductions): Adjust.
16655 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
16656 * src/print.c (print_reductions, print_actions): Adjust.
16657 * src/output.c (action_row): Adjust.
16658
16659 2001-12-27 Akim Demaille <akim@epita.fr>
16660
16661 * src/state.h, src/state.c (errs_new, errs_dup): New.
16662 * src/LR0.c (set_state_table): Let all the states have an errs,
16663 even if reduced to 0.
16664 * src/print.c (print_errs, print_reductions): Adjust.
16665 * src/output.c (output_actions, action_row): Adjust.
16666 * src/conflicts.c (resolve_sr_conflict): Adjust.
16667
16668 2001-12-27 Akim Demaille <akim@epita.fr>
16669
16670 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
16671
16672 2001-12-27 Akim Demaille <akim@epita.fr>
16673
16674 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
16675 * src/print.c: here.
16676 (lookaheadset, shiftset): New, used as additional storage by
16677 print_reductions.
16678 (print_results): Adjust.
16679 (print_shifts, print_gotos, print_errs): New, extracted from...
16680 (print_actions): here.
16681 * src/print_graph.c (print_actions): Remove dead code.
16682
16683 2001-12-27 Akim Demaille <akim@epita.fr>
16684
16685 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
16686 `$n' and `@n'.
16687
16688 2001-12-27 Akim Demaille <akim@epita.fr>
16689
16690 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
16691 (build_relations): Adjust.
16692
16693 2001-12-27 Akim Demaille <akim@epita.fr>
16694
16695 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
16696 duplication.
16697
16698 2001-12-27 Akim Demaille <akim@epita.fr>
16699
16700 * src/reader.c (packgram): Catch nitems overflows.
16701
16702 2001-12-27 Akim Demaille <akim@epita.fr>
16703
16704 * src/files.c, src/files.h (guard_obstack): Remove.
16705 * src/output.c (output): Adjust.
16706 * src/reader.c (parse_braces): New, factoring...
16707 (copy_action, copy_guard): these two which are renamed as...
16708 (parse_action, parse_guard): these.
16709 As a voluntary consequence, using braces around guards is now
16710 mandatory.
16711
16712 2001-12-27 Akim Demaille <akim@epita.fr>
16713
16714 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
16715 * src/reader.c (symbol_list): `guard' and `guard_line' are new
16716 members.
16717 (symbol_list_new): Adjust.
16718 (copy_action): action_line is the first line, not the last.
16719 (copy_guard): Just as for actions, store the `action' only, not
16720 the switch/case/break flesh.
16721 Don't parse the user action that might follow the guard, let...
16722 (readgram): do it, i.e., now, there can be an action after a
16723 guard.
16724 In other words the guard is just explicitly optional.
16725 (packgram): Adjust.
16726 * src/output.c (guards_output): New.
16727 (output_parser): Call it when needed.
16728 (output): Also free the guard and attrs obstacks.
16729 * src/files.c, src/files.h (obstack_save): Remove.
16730 (output_files): Remove.
16731 As a result, if one needs the former `.act' file, using an
16732 appropriate skeleton which requires actions and guards is now
16733 required.
16734 * src/main.c (main): Adjust.
16735 * tests/semantic.at: New.
16736 * tests/regression.at: Use `input.y' as input file name.
16737 Avoid 8+3 problems by requiring input.c when the test needs the
16738 parser.
16739
16740 2001-12-27 Akim Demaille <akim@epita.fr>
16741
16742 * src/reader.c (symbol_list_new): Be sure to initialize all the
16743 fields.
16744
16745 2001-12-27 Akim Demaille <akim@epita.fr>
16746
16747 All the hacks using a final pseudo state are now useless.
16748
16749 * src/LR0.c (set_state_table): state_table holds exactly nstates.
16750 * src/lalr.c (nLA): New.
16751 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
16752 instead of lookaheadsp from the pseudo state (nstate + 1).
16753
16754 2001-12-27 Akim Demaille <akim@epita.fr>
16755
16756 * src/output.c (action_row, token_actions): Use a state_t instead
16757 of a integer, and nlookaheads instead of the following state's
16758 lookaheadsp.
16759
16760 2001-12-27 Akim Demaille <akim@epita.fr>
16761
16762 * src/conflicts.c (log_resolution, flush_shift)
16763 (resolve_sr_conflict, set_conflicts, solve_conflicts)
16764 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
16765 (conflicts_print, print_reductions): Use a state_t instead of an
16766 integer when referring to a state.
16767 As much as possible, depend upon nlookaheads, instead of the
16768 `lookaheadsp' member of the following state (since lookaheads of
16769 successive states are successive, the difference between state n + 1
16770 and n served as the number of lookaheads for state n).
16771 * src/lalr.c (add_lookback_edge): Likewise.
16772 * src/print.c (print_core, print_actions, print_state)
16773 (print_results): Likewise.
16774 * src/print_graph.c (print_core, print_actions, print_state)
16775 (print_graph): Likewise.
16776 * src/conflicts.h: Adjust.
16777
16778 2001-12-27 Akim Demaille <akim@epita.fr>
16779
16780 * src/bison.hairy: Formatting/comment changes.
16781 ANSIfy.
16782 Remove `register' indications.
16783 Add plenty of `static'.
16784
16785 2001-12-27 Akim Demaille <akim@epita.fr>
16786
16787 * src/output.c (prepare): Drop the muscle `ntbase' which
16788 duplicates ntokens.
16789 * src/bison.simple: Formatting/comment changes.
16790 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
16791 is an undocumented synonym.
16792
16793 2001-12-22 Akim Demaille <akim@epita.fr>
16794
16795 * src/output.c (output_table_data): Change the prototype to use
16796 `int' for array ranges: some invocations do pass an int, not a
16797 short.
16798 Reported by Wayne Green.
16799
16800 2001-12-22 Akim Demaille <akim@epita.fr>
16801
16802 Some actions of web2c.y are improperly triggered.
16803 Reported by Mike Castle.
16804
16805 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
16806 * tests/regression.at (Web2c): Rename as...
16807 (Web2c Report): this.
16808 (Web2c Actions): New.
16809
16810 2001-12-22 Akim Demaille <akim@epita.fr>
16811
16812 Reductions in web2c.y are improperly reported.
16813 Reported by Mike Castle.
16814
16815 * src/conflicts.c (print_reductions): Fix.
16816 * tests/regression.at (Web2c): New.
16817
16818 2001-12-18 Akim Demaille <akim@epita.fr>
16819
16820 Some host fail on `assert (!"foo")', which expands to
16821 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
16822 Reported by Nelson Beebee.
16823
16824 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
16825 `#define it_succeeded 0' and `assert (it_succeeded)'.
16826
16827 2001-12-17 Marc Autret <autret_m@epita.fr>
16828
16829 * src/bison.simple: Don't hard code the skeleton line and filename.
16830 * src/output.c (output_parser): Rename 'line' as 'output_line'.
16831 New line counter 'skeleton_line' (skeleton-line muscle).
16832
16833 2001-12-17 Paul Eggert <eggert@twinsun.com>
16834
16835 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
16836 YYDEBUG must be defined to a nonzero value.
16837
16838 * src/bison.simple (yytname): Do not assume that the user defines
16839 YYDEBUG to a properly parenthesized expression.
16840
16841 2001-12-17 Akim Demaille <akim@epita.fr>
16842
16843 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
16844 nlookaheads is a new member.
16845 Adjust all users.
16846 * src/lalr.h (nlookaheads): Remove this orphan declaration.
16847 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
16848 state.
16849
16850 2001-12-17 Akim Demaille <akim@epita.fr>
16851
16852 * src/files.h, src/files.c (open_files, close_files): Remove.
16853 * src/main.c (main): Don't open/close files, nor invoke lex_free,
16854 let...
16855 * src/reader.c (reader): Do it.
16856
16857 2001-12-17 Akim Demaille <akim@epita.fr>
16858
16859 * src/conflicts.c (print_reductions): Formatting changes.
16860
16861 2001-12-17 Akim Demaille <akim@epita.fr>
16862
16863 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
16864 (flush_reduce): New.
16865 (resolve_sr_conflict): Adjust.
16866
16867 2001-12-17 Akim Demaille <akim@epita.fr>
16868
16869 * src/output.c (output_obstack): Be static and rename as...
16870 (format_obstack): this, to avoid any confusion with files.c's
16871 output_obstack.
16872 * src/reader.h (muscle_obstack): Move to...
16873 * src/output.h: here, since it's defined in output.c.
16874
16875 2001-12-17 Akim Demaille <akim@epita.fr>
16876
16877 * src/output.c (action_row, save_column, default_goto)
16878 (sort_actions, matching_state, pack_vector): Better variable
16879 locality.
16880
16881 2001-12-17 Akim Demaille <akim@epita.fr>
16882
16883 * src/output.c: Various formatting changes.
16884
16885 2001-12-17 Akim Demaille <akim@epita.fr>
16886
16887 * src/files.c (output_files): Free the output_obstack.
16888 * src/main.c (main): Call print and print_graph conditionally.
16889 * src/print.c (print): Work unconditionally.
16890 * src/print_graph.c (print_graph): Work unconditionally.
16891 * src/conflicts.c (log_resolution): Output only if verbose_flag.
16892
16893 2001-12-16 Marc Autret <autret_m@epita.fr>
16894
16895 * src/output.c (actions_output): Fix. When we use %no-lines,
16896 there is one less line per action.
16897
16898 2001-12-16 Marc Autret <autret_m@epita.fr>
16899
16900 * src/bison.simple: Remove a useless #line directive.
16901 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
16902 * src/output.c (get_lines_number): New.
16903 (output_parser): Adjust, now takes care about the lines of a
16904 output muscles.
16905 Fix line numbering.
16906 (actions_output): Computes the number of lines taken by actions.
16907 (output_master_parser): Insert new skeleton which is the name of
16908 the output parser file name.
16909
16910 2001-12-15 Marc Autret <autret_m@epita.fr>
16911
16912 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
16913
16914 2001-12-15 Marc Autret <autret_m@epita.fr>
16915
16916 * src/output.c (output_gram): Keep track of the hairy one.
16917
16918 2001-12-15 Akim Demaille <akim@epita.fr>
16919
16920 Make `make distcheck' work.
16921
16922 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
16923 system.h which uses libgettext.h.
16924
16925 2001-12-15 Akim Demaille <akim@epita.fr>
16926
16927 * src/nullable.c (set_nullable): Useless rules must be skipped,
16928 otherwise, since we range over their symbols, we might look at a
16929 nonterminal which no longer ``exists'', i.e., it is not counted in
16930 `nvars', hence we overflow our arrays.
16931
16932 2001-12-15 Akim Demaille <akim@epita.fr>
16933
16934 The header can also be produced directly, without any obstack!
16935 Yahoo!
16936
16937 * src/files.c, src/files.h (defines_obstack): Remove.
16938 (compute_header_macro): Global.
16939 (defines_obstack_save): Remove.
16940 * src/reader.c (parse_union_decl): No longer output to
16941 defines_obstack: its content can be found in the `stype' muscle
16942 anyway.
16943 (output_token_translations): Merge into...
16944 (symbols_output): this.
16945 Rename as...
16946 (symbols_save): this.
16947 (reader): Adjust.
16948 * src/output.c (header_output): New.
16949 (output): Call it.
16950
16951 2001-12-15 Akim Demaille <akim@epita.fr>
16952
16953 * src/reader.c (parse_union_decl): Instead of handling two obstack
16954 simultaneously, use one to define the `stype' muscle, and use the
16955 value of the latter to fill defines_obstack.
16956 (copy_comment): Remove.
16957 (copy_comment2): Work for a single obstack.
16958 Rename as...
16959 (copy_comment): this.
16960
16961 2001-12-15 Akim Demaille <akim@epita.fr>
16962
16963 * src/lex.c, src/lex.h (xgetc): No longer static.
16964 * src/reader.c (parse_union_decl): Revamp.
16965
16966 2001-12-15 Akim Demaille <akim@epita.fr>
16967
16968 Still making progress in separating Bison into (i) input, (ii)
16969 process, (iii) output: now we can directly output the parser file
16970 without using table_obstack at all.
16971
16972 * src/files.c, src/files.h (table_obstack): Bye bye.
16973 (parser_file_name): New.
16974 * src/files.c (compute_output_file_names): Compute it.
16975 * src/output.c (actions_output, output_parser)
16976 (output_master_parser): To a file instead of an obstack.
16977
16978 2001-12-15 Akim Demaille <akim@epita.fr>
16979
16980 Attach actions to rules, instead of pre-outputting them to
16981 actions_obstack.
16982
16983 * src/gram.h (rule_t): action and action_line are new members.
16984 * src/reader.c (symbol_list): Likewise.
16985 (copy_action): Save the actions within the rule.
16986 (packgram): Save them in rule_table.
16987 * src/output.c (actions_output): New.
16988 (output_parser): Use it on `%%actions'.
16989 (output_rule_data): Don't free rule_table.
16990 (output): Do it.
16991 (prepare): Don't save the `action' muscle.
16992 * src/bison.simple: s/%%action/%%actions/.
16993
16994 2001-12-15 Akim Demaille <akim@epita.fr>
16995
16996 * src/reader.c (copy_action): When --yacc, don't append a `;'
16997 to the user action: let it fail if lacking.
16998 Suggested by Arnold Robbins and Tom Tromey.
16999
17000 2001-12-14 Akim Demaille <akim@epita.fr>
17001
17002 * src/lex.c (literalchar): Simply return the char you decoded, non
17003 longer mess around with obstacks and int pointers.
17004 Adjust all callers.
17005
17006 2001-12-14 Akim Demaille <akim@epita.fr>
17007
17008 * src/lex.c (literalchar): Don't escape the special characters,
17009 just decode them, and keep them as char (before, eol was output as
17010 the 2 char string `\n' etc.).
17011 * src/output.c (output_rule_data): Use quotearg to output the
17012 token strings.
17013
17014 2001-12-13 Paul Eggert <eggert@twinsun.com>
17015
17016 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
17017 Do not infringe on the global user namespace when using C++.
17018 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
17019 All uses of `fprintf' and `stderr' changed.
17020
17021 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
17022
17023 2001-12-13 Akim Demaille <akim@epita.fr>
17024
17025 The computation of nullable is broken: it doesn't handle empty
17026 RHS's properly.
17027
17028 * tests/torture.at (GNU AWK Grammar): New.
17029 * tests/sets.at (Nullable): New.
17030 * src/nullable.c (set_nullable): Instead of blindly looping over
17031 `ritems', loop over the rules, and then over their rhs's.
17032
17033 Work around Autotest bugs.
17034
17035 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
17036 frame, because Autotest understand lines starting with a `+' as
17037 traces from the shell. Then, they are not processed properly.
17038 Admittedly an Autotest bug, but we don't have time to wait for
17039 Autotest to catch up.
17040 * tests/regression.at (Broken Closure): Adjust to the new table
17041 frames.
17042 Move to...
17043 * tests/sets.at: here.
17044
17045 2001-12-13 Akim Demaille <akim@epita.fr>
17046
17047 * src/closure.c (closure): Use nrules instead of playing tricks
17048 with BITS_PER_WORD.
17049
17050 2001-12-13 Akim Demaille <akim@epita.fr>
17051
17052 * src/print.c (print_actions): Output the handling of `$' as the
17053 traces do: shifting the token EOF. Before EOF was treated as a
17054 nonterminal.
17055 * tests/regression.at: Adjust some tests.
17056 * src/print_graph.c (print_core): Complete the set of items via
17057 closure. The next-to-final and final states are still unsatisfying,
17058 but that's to be addressed elsewhere.
17059 No longer output the rule numbers, but do output the state number.
17060 A single loop for the shifts + gotos is enough, but picked a
17061 distinct color for each.
17062 (print_graph): Initialize and finalize closure.
17063
17064 2001-12-13 Akim Demaille <akim@epita.fr>
17065
17066 * src/reader.c (readgram): Remove dead code, an strip useless
17067 braces.
17068 (get_type): Remove, unused.
17069
17070 2001-12-12 Akim Demaille <akim@epita.fr>
17071
17072 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
17073 on that of lib/error.c.
17074
17075 2001-12-12 Akim Demaille <akim@epita.fr>
17076
17077 Some hosts don't like `/' in includes.
17078
17079 * src/system.h: Include libgettext.h without qualifying the path.
17080 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
17081 $(top_srcdir).
17082
17083 2001-12-11 Marc Autret <autret_m@epita.fr>
17084
17085 * src/output.c (output_parser): Remove useless muscle.
17086
17087 2001-12-11 Marc Autret <autret_m@epita.fr>
17088
17089 * src/bison.simple: Remove #line just before %%epilogue. It
17090 is now handled in ...
17091 * src/reader.c (read_additionnal_code): Add the output of a
17092 #line for the epilogue.
17093
17094 2001-12-10 Marc Autret <autret_m@epita.fr>
17095
17096 * src/reader.c (copy_definition): Re-use CPP-outed code which
17097 replace precedent remove.
17098 * src/bison.simple: Remove #line before %%prologue because
17099 %%input-line is wrong at this time.
17100
17101 2001-12-10 Marc Autret <autret_m@epita.fr>
17102
17103 * src/reader.c (symbols_output): Clean up.
17104 * src/output.c (output_gram, output): Clean up.
17105
17106 2001-12-10 Akim Demaille <akim@epita.fr>
17107
17108 * src/lalr.c (initialize_lookaheads): New. Extracted from...
17109 * src/LR0.c (set_state_table): here.
17110 * src/lalr.c (lalr): Call it.
17111
17112 2001-12-10 Akim Demaille <akim@epita.fr>
17113
17114 * src/state.h (shifts): Remove the `number' member: shifts are
17115 attached to state, hence no longer need to be labelled with a
17116 state number.
17117
17118 2001-12-10 Akim Demaille <akim@epita.fr>
17119
17120 Now that states have a complete set of members, the linked list of
17121 shifts is useless: just fill directly the state's shifts member.
17122
17123 * src/state.h (shifts): Remove the `next' member.
17124 * src/LR0.c (first_state, last_state): Remove.
17125 Adjust the callers.
17126 (augment_automaton): Don't look for the shifts that must be added
17127 a shift on EOF: it is those of the state we looked for! But now,
17128 since shifts are attached, it is no longer needed to looking
17129 merely by its id: its number.
17130
17131 2001-12-10 Akim Demaille <akim@epita.fr>
17132
17133 * src/LR0.c (augment_automaton): Better variable locality.
17134 Remove an impossible branch: if there is a state corresponding to
17135 the start symbol being shifted, then there is shift for the start
17136 symbol from the initial state.
17137
17138 2001-12-10 Akim Demaille <akim@epita.fr>
17139
17140 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
17141 only when appropriate: when insert_start_shifting_state' is not
17142 invoked.
17143 * tests/regression.at (Rule Line Numbers): Adjust.
17144
17145 2001-12-10 Akim Demaille <akim@epita.fr>
17146
17147 * src/LR0.c (augment_automaton): Now that all states have shifts,
17148 merge the two cases addition shifts to the initial state.
17149
17150 2001-12-10 Akim Demaille <akim@epita.fr>
17151
17152 * src/lalr.c (set_state_table): Move to...
17153 * src/LR0.c: here.
17154 * src/lalr.c (lalr): Don't call it...
17155 * src/LR0.c (generate_states): do it.
17156 * src/LR0.h (first_state): Remove, only the table is used.
17157
17158 2001-12-10 Akim Demaille <akim@epita.fr>
17159
17160 * src/LR0.h (first_shift, first_reduction): Remove.
17161 * src/lalr.c: Don't use first_shift: find shifts through the
17162 states.
17163
17164 2001-12-10 Akim Demaille <akim@epita.fr>
17165
17166 * src/LR0.c: Attach shifts to states as soon as they are
17167 computed.
17168 * src/lalr.c (set_state_table): Instead of assigning shifts to
17169 state, just assert that the mapping was properly done.
17170
17171 2001-12-10 Akim Demaille <akim@epita.fr>
17172
17173 * src/LR0.c (insert_start_shift): Rename as...
17174 (insert_start_shifting_state): this.
17175 (insert_eof_shifting_state, insert_accepting_state): New.
17176 (augment_automaton): Adjust.
17177 Better locality of the variables.
17178 When looking if the start_symbol is shifted from the initial
17179 state, using `while (... symbol != start_symbol ...)' sounds
17180 better than `while (... symbol < start_symbol ...)': If fail
17181 to see how the order between symbols could be relevant!
17182
17183 2001-12-10 Akim Demaille <akim@epita.fr>
17184
17185 * src/getargs.h: Don't declare `spec_name_prefix' and
17186 `spec_file_prefix', declared by src/files.h.
17187 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
17188 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
17189 * src/output.c (prepare): Adjust.
17190 * src/reader.c (symbols_output): Likewise.
17191 * src/vmsgetargs.c: Vaguely adjust, but who cares?
17192
17193 2001-12-10 Akim Demaille <akim@epita.fr>
17194
17195 * src/muscle_tab.c (muscle_init): NULL is a better default than
17196 `"0"'.
17197
17198 2001-12-10 Akim Demaille <akim@epita.fr>
17199
17200 * src/reader.c (reader): Calling symbols_output once is enough.
17201
17202 2001-12-10 Akim Demaille <akim@epita.fr>
17203
17204 Now that states have a complete set of members, the linked list of
17205 reductions is useless: just fill directly the state's reductions
17206 member.
17207
17208 * src/state.h (struct reductions): Remove member `number' and
17209 `next'.
17210 * src/LR0.c (first_reduction, last_reduction): Remove.
17211 (save_reductions): Don't link the new reductions, store them in
17212 this_state.
17213 * src/lalr.c (set_state_table): No need to attach reductions to
17214 states, it's already done.
17215 * src/output.c (output_actions): No longer free the shifts, then
17216 the reductions, then the states: free all the states and their
17217 members.
17218
17219 2001-12-10 Akim Demaille <akim@epita.fr>
17220
17221 * src/options.c (OPTN, DRTV, BOTH): New.
17222 (option_table): Use them.
17223
17224 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
17225 the job of system.h.
17226 * src/options.c: Don't include stdio.h and xalloc.h for the same
17227 reasons.
17228
17229 2001-12-10 Akim Demaille <akim@epita.fr>
17230
17231 * src/output.c (output, prepare): Make sure the values of the
17232 muscles `action' and `prologue' are 0-terminated.
17233
17234 2001-12-10 Akim Demaille <akim@epita.fr>
17235
17236 Clean up GCC warnings.
17237
17238 * src/reader.c (copy_action): `buf' is not used.
17239 (parse_skel_decl): Be static.
17240 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
17241 * src/options.h (create_long_option_table): Have a real prototype.
17242 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
17243 (hash_delete_at): Return const void *.
17244 Adjust casts to preserve the const.
17245
17246 2001-12-10 Akim Demaille <akim@epita.fr>
17247
17248 * configure.in: Require 2.52g.
17249 M4 is not needed, but AUTOM4TE is.
17250 * m4/m4.m4: Remove.
17251 * tests/Makefile.am: Adjust.
17252
17253 2001-12-10 Akim Demaille <akim@epita.fr>
17254
17255 One structure for states is enough, even though theoretically
17256 there are LR(0) states and LALR(1) states.
17257
17258 * src/lalr.h (state_t): Remove.
17259 (state_table): Be state_t **, not state_t *.
17260 * src/state.h (core, CORE_ALLOC): Rename as...
17261 (state_t, STATE_ALLOC): this.
17262 Add the LALR(1) members: shifts, reductions, errs.
17263 * src/LR0.c (state_table): Rename as...
17264 (state_hash): this, to avoid name clashes with the global
17265 `state_table'.
17266 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
17267 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
17268
17269 2001-12-10 Akim Demaille <akim@epita.fr>
17270
17271 Bison dumps core on bash.y.
17272 Reported by Pascal Bart.
17273
17274 * src/warshall.c (bitmatrix_print): New.
17275 (TC): Use it.
17276 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
17277 j must be the outer loop.
17278 * tests/regression.at (Broken Closure): New.
17279
17280 2001-12-05 Akim Demaille <akim@epita.fr>
17281
17282 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
17283 its argument.
17284 Reported by Peter Hamorsky.
17285
17286 2001-12-05 Akim Demaille <akim@epita.fr>
17287
17288 * src/conflicts.c (err_table): Remove.
17289 (resolve_sr_conflict): Adjust.
17290 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
17291 Rename as...
17292 (state_t.reductions, state_t.shifts): this.
17293
17294 2001-12-05 Akim Demaille <akim@epita.fr>
17295
17296 * src/reduce.c (reduce_grammar_tables): No longer disable the
17297 removal of useless rules via CPP but via `if (0)', so that the
17298 compiler still check the code is valid.
17299 For instance, it should have noticed `rline' no longer exists: use
17300 the `line' member of rule_t.
17301 * src/gram.c (dummy, rline): Remove, unused.
17302
17303 2001-12-05 Akim Demaille <akim@epita.fr>
17304
17305 * src/output.c (pack_vector): Use assert, not berror.
17306 * src/main.c (berror): Remove, unused.
17307
17308 2001-12-05 Akim Demaille <akim@epita.fr>
17309
17310 New experimental feature: if --verbose --trace output all the
17311 items of a state, not only its kernel.
17312
17313 * src/print.c (print_core): If `trace_flag', then invoke closure
17314 before outputting the items of the state (print_core is no longer
17315 a correct name them).
17316 (print_results): Invoke new_closure/free_closure if needed.
17317
17318 2001-12-05 Akim Demaille <akim@epita.fr>
17319
17320 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
17321 * src/closure.c, src/closure.h (itemsetsize): Rename as...
17322 (nitemset): for consistency with the rest of the project.
17323
17324 2001-12-05 Akim Demaille <akim@epita.fr>
17325
17326 * src/closure.c (print_closure): Improve.
17327 (closure): Use it for printing input and output.
17328
17329 2001-12-05 Akim Demaille <akim@epita.fr>
17330
17331 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
17332 indexed by nonterminals.
17333
17334 2001-12-05 Akim Demaille <akim@epita.fr>
17335
17336 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
17337 what it was!).
17338 * src/warshall.h: Remove accidental duplication of the content.
17339
17340 2001-12-05 Akim Demaille <akim@epita.fr>
17341
17342 * src/closure.c (set_fderives): De-obfuscate.
17343
17344 2001-12-05 Akim Demaille <akim@epita.fr>
17345
17346 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
17347
17348 2001-12-05 Akim Demaille <akim@epita.fr>
17349
17350 * src/closure.c (set_firsts): De-obfuscate.
17351
17352 2001-12-05 Akim Demaille <akim@epita.fr>
17353
17354 * src/output.c (action_row): De-obfuscate
17355 using the good o' techniques: arrays not pointers, variable
17356 locality, BITISSET, RESETBIT etc.
17357
17358 2001-12-05 Akim Demaille <akim@epita.fr>
17359
17360 Pessimize the code to simplify it: from now on, all the states
17361 have a valid SHIFTS, which NSHIFTS is possibly 0.
17362
17363 * src/LR0.c (shifts_new): Be global and move to..
17364 * src/state.c, src/state.h: here.
17365 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
17366 * src/print_graph: Adjust.
17367
17368 2001-12-05 Akim Demaille <akim@epita.fr>
17369
17370 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
17371 * src/conflicts.c: Use it.
17372 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
17373 incorrectly ``simplified''.
17374
17375 2001-12-05 Akim Demaille <akim@epita.fr>
17376
17377 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
17378 using the good o' techniques: arrays not pointers, variable
17379 locality, BITISSET, RESETBIT etc.
17380
17381 2001-12-05 Akim Demaille <akim@epita.fr>
17382
17383 * src/state.h (SHIFT_SYMBOL): New.
17384 * src/conflicts.c: Use it to deobfuscate.
17385
17386 2001-12-05 Akim Demaille <akim@epita.fr>
17387
17388 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
17389 (print_reductions): De-obfuscate using the good o' techniques:
17390 arrays not pointers, variable locality, BITISSET.
17391
17392 2001-12-05 Akim Demaille <akim@epita.fr>
17393
17394 * src/conflicts.c (print_reductions): Arrays, not pointers.
17395 Use BITISSET.
17396
17397 2001-12-05 Akim Demaille <akim@epita.fr>
17398
17399 * src/conflicts.c (print_reductions): Pessimize, but clarify.
17400
17401 2001-12-05 Akim Demaille <akim@epita.fr>
17402
17403 * src/conflicts.c (print_reductions): Improve variable locality.
17404
17405 2001-12-05 Akim Demaille <akim@epita.fr>
17406
17407 * src/conflicts.c (print_reductions): Pessimize, but clarify.
17408
17409 2001-12-05 Akim Demaille <akim@epita.fr>
17410
17411 * src/conflicts.c (print_reductions): Improve variable locality.
17412
17413 2001-12-05 Akim Demaille <akim@epita.fr>
17414
17415 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
17416 * src/lalr.c: Use them.
17417
17418 2001-12-05 Akim Demaille <akim@epita.fr>
17419
17420 * src/LR0.c (augment_automaton): Formatting changes.
17421 Better variable locality.
17422
17423 2001-12-05 Akim Demaille <akim@epita.fr>
17424
17425 * src/lalr.c (matrix_print): New.
17426 (transpose): Use it.
17427 Use arrays instead of pointers.
17428
17429 2001-12-05 Akim Demaille <akim@epita.fr>
17430
17431 * src/lalr.c (maxrhs): Move to...
17432 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
17433 * src/lalr.c (build_relations): Adjust.
17434
17435 2001-12-05 Akim Demaille <akim@epita.fr>
17436
17437 * src/lalr.c (transpose): Free the memory allocated to the
17438 argument, as it is replaced by the results by the unique caller.
17439 (build_relations): Merely invoke transpose: it handles the memory
17440 deallocation.
17441 Improve variable locality.
17442 Avoid variables used as mere abbreviations.
17443 (compute_lookaheads): Use arrays instead of pointers.
17444
17445 2001-12-05 Akim Demaille <akim@epita.fr>
17446
17447 * src/lalr.c (initialize_F): Improve variable locality.
17448 Avoid variables used as mere abbreviations.
17449
17450 2001-12-05 Akim Demaille <akim@epita.fr>
17451
17452 * src/derives.c (print_derives): Display the ruleno.
17453 * src/lalr.c (initialize_F, transpose): Better variable locality
17454 to improve readability.
17455 Avoid variables used as mere abbreviations.
17456
17457 2001-12-05 Akim Demaille <akim@epita.fr>
17458
17459 * src/lalr.c (traverse): Use arrays instead of pointers.
17460
17461 2001-12-05 Akim Demaille <akim@epita.fr>
17462
17463 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
17464 the handling of squeue.
17465 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
17466
17467 2001-12-05 Akim Demaille <akim@epita.fr>
17468
17469 Because useless nonterminals are now kept alive (instead of being
17470 `destroyed'), we now sometimes examine them, and store information
17471 related to them. Hence we need to know their number, and adjust
17472 memory allocations.
17473
17474 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
17475 static.
17476 * src/LR0.c (allocate_itemsets): The memory allocated to
17477 `symbol_count' was used for two different purpose: once to count
17478 the number of occurrences of each symbol, and later reassigned to
17479 `shift_symbol', containing the symbol that can be shifted from a
17480 given state.
17481 Deobfuscate, i.e., allocate, use and free `symbol_count' here
17482 only, and...
17483 (new_itemsets): Allocate `shift_symbol' here.
17484 (allocate_itemsets): symbol_count includes useless nonterminals.
17485 Make room for them.
17486 (free_storage): Use `free', not `XFREE', for pointers that cannot
17487 be null.
17488
17489 2001-12-05 Akim Demaille <akim@epita.fr>
17490
17491 * src/nullable.c (set_nullable): Deobfuscate the handling of
17492 ritem.
17493 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
17494
17495 2001-12-05 Akim Demaille <akim@epita.fr>
17496
17497 * src/gram.c, src/gram.h (ritem_print): New.
17498 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
17499 (This useless function was defined only to work around VMS linkers
17500 that can't handle compilation units with variables only).
17501 * src/reduce.c (dump_grammar): Use it to trace the construction of
17502 ritem.
17503
17504 2001-12-04 Paul Eggert <eggert@twinsun.com>
17505
17506 * src/bison.simple (union yyalloc): Change member names
17507 to be the same as the stack names.
17508 (yyparse): yyptr is now union yyalloc *, not char *.
17509 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
17510 and may generate better code on some machines.
17511 (yystpcpy): Use prototype if __STDC__ is defined, not just
17512 if __cplusplus is defined.
17513
17514 2001-11-30 Akim Demaille <akim@epita.fr>
17515
17516 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
17517 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
17518 Gettext doesn't compile cleanly, and dies with -Werror.
17519 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
17520 Include WARNING_CFLAGS here.
17521 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
17522 before being defined.
17523
17524 2001-11-27 Paul Eggert <eggert@twinsun.com>
17525
17526 * lib/quotearg.h (quotearg_n, quotearg_n_style):
17527 First arg is int, not unsigned.
17528 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
17529 (SIZE_MAX, UINT_MAX): New macros.
17530 (quotearg_n_options): Abort if N is negative.
17531 Avoid overflow check on hosts where size_t is 64 bits and int
17532 is 32 bits, as overflow is impossible there.
17533 Fix off-by-one typo that caused unnecessary reallocation.
17534
17535 2001-11-29 Paul Eggert <eggert@twinsun.com>
17536
17537 Name space cleanup in generated parser.
17538
17539 * doc/bison.texinfo (Bison Parser): Discuss system headers
17540 and their effect on the user name space.
17541
17542 * src/bison.simple:
17543 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
17544 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
17545 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
17546
17547 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
17548 on user names when possible.
17549
17550 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
17551 Simplify test for whather <alloca.h> exists.
17552
17553 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
17554
17555 (<stdio.h>): Include if YYDEBUG.
17556
17557 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
17558 ! defined (yyoverflow) && ! defined (yymemcpy).
17559
17560 (yymemcpy, yyparse): Rename local variables as needed so that
17561 they all begin with 'yy'.
17562
17563 (yystrlen, yystpcpy): New functions.
17564
17565 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
17566 All uses changed.
17567
17568 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
17569 instead of relying on string.h functions. Use YYSTACK_ALLOC
17570 and YYSTACK_FREE instead of malloc and free.
17571
17572 2001-11-30 Akim Demaille <akim@epita.fr>
17573
17574 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
17575 before their first uses.
17576 (YYBISON, YYPURE): Move to the top of the output.
17577
17578 2001-11-30 Akim Demaille <akim@epita.fr>
17579
17580 * tests/reduce.at (Useless Nonterminals): Fix.
17581
17582 2001-11-30 Akim Demaille <akim@epita.fr>
17583
17584 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
17585 if body instead of `;' to pacify GCC's warnings.
17586
17587 2001-11-30 Akim Demaille <akim@epita.fr>
17588
17589 Instead of mapping the LHS of unused rules to -1, keep the LHS
17590 valid, but flag the rules as invalid.
17591
17592 * src/gram.h (rule_t): `useful' is a new member.
17593 * src/print.c (print_grammar): Adjust.
17594 * src/derives.c (set_derives): Likewise.
17595 * src/reader.c (packgram, reduce_output): Likewise.
17596 * src/reduce.c (reduce_grammar_tables): Likewise.
17597 * tests/reduce.at (Underivable Rules, Useless Rules): New.
17598
17599 2001-11-30 Akim Demaille <akim@epita.fr>
17600
17601 * src/reduce.c (reduce_output): Formatting changes.
17602 * src/print.c (print_results, print_grammar): Likewise.
17603 * tests/regression.at (Rule Line Numbers)
17604 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
17605
17606 2001-11-30 Akim Demaille <akim@epita.fr>
17607
17608 * src/reduce.c (nonterminals_reduce): Instead of throwing away
17609 useless nonterminals, move them at the end of the symbol arrays.
17610 (reduce_output): Adjust.
17611 * tests/reduce.at (Useless Nonterminals): Adjust.
17612
17613 2001-11-30 Akim Demaille <akim@epita.fr>
17614
17615 * src/reduce.c: Various comment/formatting changes.
17616 (nonterminals_reduce): New, extracted from...
17617 (reduce_grammar_tables): here.
17618 (reduce_grammar): Call nonterminals_reduce.
17619
17620 2001-11-29 Paul Eggert <eggert@twinsun.com>
17621
17622 * src/bison.simple (YYSTACK_REALLOC): Remove.
17623 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
17624 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
17625 New macros.
17626 (union yyalloc): New type.
17627 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
17628 an arbitrary restriction on hosts where size_t is wider than int.
17629
17630 (yyparse): Don't dump core if alloca or malloc fails; instead, report
17631 a parser stack overflow. Allocate just one block of memory for all
17632 three stacks, instead of allocating three blocks; this typically is
17633 faster and reduces fragmentation.
17634
17635 Do not limit the number of items in the stack to a value that fits
17636 in 'int', as this is an arbitrary limit on hosts with 64-bit
17637 size_t and 32-bit int.
17638
17639 2001-11-29 Marc Autret <autret_m@epita.fr>
17640
17641 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
17642 of defining YYERROR_VERBOSE.
17643 [AT_DATA]: $4 is now out of C declarations in the prologue.
17644
17645 2001-11-28 Marc Autret <autret_m@epita.fr>
17646
17647 * src/reader.c (parse_dquoted_param): New.
17648 (parse_skel_decl): Use it.
17649 * src/lex.h: Add its prototype.
17650 * src/lex.c (literalchar): Become not static.
17651
17652 2001-11-28 Marc Autret <autret_m@epita.fr>
17653
17654 * src/output.h: And put its extern declaration here.
17655 * src/output.c (error_verbose): Define here.
17656 (prepare): Echo name modification.
17657 * src/getargs.h: Clean its extern declaration.
17658 * src/getargs.c (error_verbose_flag): Remove.
17659 (getargs): Remove case 'e'.
17660 * src/options.c (option_table): 'error-verbose' is now seen as simple
17661 percent option.
17662 Include output.h.
17663
17664 * src/reader.c (read_declarations): Remove case tok_include.
17665 (parse_include_decl): Remove.
17666 * src/lex.h (token_t): Remove tok_include.
17667 * src/options.c (option_table): 'include' is now a simple command line
17668 option.
17669
17670 2001-11-28 Marc Autret <autret_m@epita.fr>
17671
17672 * src/bison.simple: Adjust muscle names.
17673 * src/muscle_tab.c (muscle_init): Also rename the muscles.
17674 * src/output.c (prepare): s/_/-/ for the muscles names.
17675 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
17676
17677 2001-11-28 Marc Autret <autret_m@epita.fr>
17678
17679 * src/bison.simple: Fix debug.
17680 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
17681
17682 2001-11-28 Akim Demaille <akim@epita.fr>
17683
17684 * src/LR0.c (shifts_new): New.
17685 (save_shifts, insert_start_shift, augment_automaton): Use it.
17686
17687 2001-11-28 Akim Demaille <akim@epita.fr>
17688
17689 * src/closure.c (closure): `b' and `ruleno' denote the same value:
17690 keep ruleno only.
17691
17692 2001-11-28 Akim Demaille <akim@epita.fr>
17693
17694 * src/closure.c (closure): Instead of looping over word in array
17695 then bits in words, loop over bits in array.
17696
17697 2001-11-28 Akim Demaille <akim@epita.fr>
17698
17699 * src/closure.c (closure): No longer optimize the special case
17700 where all the bits of `ruleset[r]' are set to 0, to make the code
17701 clearer.
17702
17703 2001-11-28 Akim Demaille <akim@epita.fr>
17704
17705 * src/closure.c (closure): `r' and `c' are new variables, used to
17706 de-obfuscate accesses to RULESET and CORE.
17707
17708 2001-11-28 Akim Demaille <akim@epita.fr>
17709
17710 * src/reduce.c (reduce_print): Use ngettext.
17711 (dump_grammar): Improve the trace accuracy.
17712
17713 2001-11-28 Akim Demaille <akim@epita.fr>
17714
17715 * src/reduce.c (dump_grammar): Don't translate trace messages.
17716
17717 2001-11-28 Akim Demaille <akim@epita.fr>
17718
17719 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
17720 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
17721 as all tags are free'ed afterwards.
17722 From Enrico Scholz.
17723
17724 2001-11-27 Paul Eggert <eggert@twinsun.com>
17725
17726 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
17727 use alloca when we didn't want to, and vice versa.
17728
17729 2001-11-27 Marc Autret <autret_m@epita.fr>
17730
17731 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
17732 initialization.
17733 * src/output.c (prepare): Remove its update.
17734
17735 2001-11-27 Marc Autret <autret_m@epita.fr>
17736
17737 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
17738 Use %error-verbose.
17739
17740 2001-11-27 Marc Autret <autret_m@epita.fr>
17741
17742 * src/bison.simple: Remove YYERROR_VERBOSE using.
17743 Use %%error_verbose.
17744 (yyparse): Likewise.
17745 * src/output.c (prepare): Give its final value.
17746 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
17747 * src/getargs.h: Add its extern declaration.
17748 * src/getargs.c (error_verbose_flag): New int.
17749 (getargs): Update to catch new case.
17750 * src/options.c (option_table): 'error-verbose' is a new option.
17751 (shortopts): Update.
17752
17753 2001-11-27 Akim Demaille <akim@epita.fr>
17754
17755 * src/system.h: Use intl/libgettext.h.
17756 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
17757
17758 2001-11-27 Akim Demaille <akim@epita.fr>
17759
17760 * tests/torture.at (Exploding the Stack Size with Malloc):
17761 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
17762
17763 2001-11-27 Akim Demaille <akim@epita.fr>
17764
17765 * src/files.c: Include error.h.
17766 Reported by Hans Aberg.
17767
17768 2001-11-26 Marc Autret <autret_m@epita.fr>
17769
17770 * src/reader.c (parse_include_decl): New, not yet implemented.
17771 (read_declarations): Add case tok_include.
17772 * src/getargs.h (include): Add its extern definition.
17773 * src/getargs.c (include): New const char *.
17774 (getargs): Add case '-I'.
17775 * src/options.c (option_table): Add include as command line and
17776 percent option.
17777 * src/lex.h (token_t): Add tok_include.
17778
17779 2001-11-26 Akim Demaille <akim@epita.fr>
17780
17781 * src/reader.c (readgram): Make sure rules for mid-rule actions
17782 have a lineno equal to that of their host rule.
17783 Reported by Hans Aberg.
17784 * tests/regression.at (Rule Line Numbers): New.
17785
17786 2001-11-26 Akim Demaille <akim@epita.fr>
17787
17788 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
17789 size_ts.
17790
17791 2001-11-26 Akim Demaille <akim@epita.fr>
17792
17793 * src/complain.c, src/complain.h (error): Remove, provided by
17794 lib/error.[ch].
17795
17796 2001-11-26 Akim Demaille <akim@epita.fr>
17797
17798 * src/reader.c (read_declarations): Don't abort on tok_illegal,
17799 issue an error message.
17800 * tests/regression.at (Invalid %directive): New.
17801 Reported by Hans Aberg.
17802
17803 2001-11-26 Akim Demaille <akim@epita.fr>
17804
17805 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
17806 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17807
17808 2001-11-26 Akim Demaille <akim@epita.fr>
17809
17810 * src/conflicts.c (conflicts_print): Don't complain at all when
17811 there are no reduce/reduce conflicts, and as many shift/reduce
17812 conflicts as expected.
17813 * tests/regression.at (%expect right): Adjust.
17814
17815 2001-11-23 Akim Demaille <akim@epita.fr>
17816
17817 * lib/alloca.c: Update, from fileutils.
17818
17819 2001-11-23 Akim Demaille <akim@epita.fr>
17820
17821 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
17822
17823 2001-11-23 Akim Demaille <akim@epita.fr>
17824
17825 * src/system.h: Include alloca.h.
17826 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
17827
17828 2001-11-23 Akim Demaille <akim@epita.fr>
17829
17830 * src/print_graph.c (print_actions): Remove `rule', unused.
17831 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
17832 pacify GCC's signed < unsigned warnings.
17833 * src/closure.c (itemsetsize): Likewise.
17834 * src/reader.c (symbol_list_new): Static.
17835
17836 2001-11-23 Akim Demaille <akim@epita.fr>
17837
17838 Attaching lineno to buckets is stupid, since only one copy of each
17839 symbol is kept, only the line of the first occurrence is kept too.
17840
17841 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
17842 * src/reader.c (rline_allocated): Remove, unused.
17843 (symbol_list): Have a `line' member.
17844 (symbol_list_new): New.
17845 (readgram): Use it.
17846 * src/print.c (print_grammar): Output the rule line numbers.
17847 * tests/regression.at (Solved SR Conflicts)
17848 (Unresolved SR Conflicts): Adjust.
17849 Reported by Hans Aberg.
17850
17851 2001-11-22 Marc Autret <autret_m@epita.fr>
17852
17853 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
17854
17855 2001-11-22 Marc Autret <autret_m@epita.fr>
17856
17857 * src/muscle_tab.c (muscle_init): Remove initialization of
17858 skeleton muscle.
17859 * src/output.c (output_master_parser): Do it here.
17860
17861 2001-11-20 Akim Demaille <akim@epita.fr>
17862
17863 * po/sv.po: New.
17864 * configure.in (ALL_LINGUAS): Adjust.
17865 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
17866 longer contains strings to translate.
17867
17868 2001-11-19 Akim Demaille <akim@epita.fr>
17869
17870 * src/conflicts.c (conflicts_print): Add a missing \n.
17871
17872 2001-11-19 Akim Demaille <akim@epita.fr>
17873
17874 * src/nullable.c (nullable_print): New.
17875 (set_nullable): Call it when tracing.
17876 Better locality of variables.
17877
17878 2001-11-19 Akim Demaille <akim@epita.fr>
17879
17880 * src/print.c (print_actions): Better locality of variables.
17881
17882 2001-11-19 Akim Demaille <akim@epita.fr>
17883
17884 * src/derives.c (print_derives): Fix and enrich.
17885 * src/closure.c (print_fderives): Likewise.
17886
17887 2001-11-19 Akim Demaille <akim@epita.fr>
17888
17889 * src/closure.c (itemsetend): Remove, replaced with...
17890 (itemsetsize): new.
17891
17892 2001-11-19 Akim Demaille <akim@epita.fr>
17893
17894 * src/LR0.c (kernel_end): Remove, replaced with...
17895 (kernel_size): new.
17896
17897 2001-11-19 Akim Demaille <akim@epita.fr>
17898
17899 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
17900 to clarify.
17901
17902 2001-11-19 Akim Demaille <akim@epita.fr>
17903
17904 * src/closure.c (closure): Use arrays instead of pointers to clarify.
17905
17906 2001-11-19 Akim Demaille <akim@epita.fr>
17907
17908 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
17909 trace messages.
17910 * src/LR0.c: Likewise.
17911 (allocate_itemsets): Use arrays instead of pointers to clarify.
17912
17913 2001-11-19 Akim Demaille <akim@epita.fr>
17914
17915 * src/getargs.c (statistics_flag): Replace with...
17916 (trace_flag): New.
17917 (longopts): Accept --trace instead of --statistics.
17918 * src/getargs.h, src/options.c: Adjust.
17919 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
17920 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
17921
17922 2001-11-19 Akim Demaille <akim@epita.fr>
17923
17924 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
17925 pointers to clarify the code.
17926 (save_reductions, save_shifts): Factor common parts of alternatives.
17927
17928 2001-11-19 Akim Demaille <akim@epita.fr>
17929
17930 * src/LR0.c (new_state, get_state): Complete TRACE code.
17931 * src/closure.c: Include `reader.h' to get `tags', needed by the
17932 trace code.
17933 Rename the conditional DEBUG as TRACE.
17934 Output consistently TRACEs to stderr, not stdout.
17935 * src/derives.c: Likewise.
17936 * src/reduce.c: (inaccessable_symbols): Using if is better style
17937 than goto.
17938 Use `#if TRACE' instead of `#if 0' for tracing code.
17939
17940 2001-11-19 Akim Demaille <akim@epita.fr>
17941
17942 * src/system.h (LIST_FREE, shortcpy): New.
17943 * src/LR0.c: Use them.
17944 * src/output.c (free_itemsets, free_reductions, free_shifts):
17945 Remove, replaced by LIST_FREE.
17946
17947 2001-11-19 Akim Demaille <akim@epita.fr>
17948
17949 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
17950 (REDUCTIONS_ALLOC): New.
17951 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
17952 allocation.
17953
17954 2001-11-19 Akim Demaille <akim@epita.fr>
17955
17956 * src/LR0.c (new_state): Complete trace code.
17957 * src/nullable.c (set_nullable): Don't translate traces.
17958
17959 2001-11-19 Akim Demaille <akim@epita.fr>
17960
17961 * src/print_graph.c (print_core): Better locality of variables.
17962 * src/print.c (print_core): Likewise.
17963
17964 2001-11-19 Akim Demaille <akim@epita.fr>
17965
17966 * src/vcg.c: You do the output, so you are responsible of the
17967 handling of VCG syntax, in particular: use quotearg.
17968 * src/print_graph.c: Don't.
17969 (print_actions): Don't output the actions as part of the nodes,
17970 since that's the job of the edges.
17971 (print_state): Don't output by hand: fill the node description,
17972 and ask for its output.
17973
17974 2001-11-19 Akim Demaille <akim@epita.fr>
17975
17976 * src/bison.simple (yyparse): When verbosely reporting an error,
17977 no longer put additional quotes around token names.
17978 * tests/calc.at: Adjust.
17979
17980 2001-11-19 Akim Demaille <akim@epita.fr>
17981
17982 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
17983 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
17984 * src/output.c: Adjust.
17985
17986 2001-11-19 Akim Demaille <akim@epita.fr>
17987
17988 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
17989 (rule_t): this.
17990 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
17991
17992 2001-11-19 Akim Demaille <akim@epita.fr>
17993
17994 * src/gram.h (rule_t): New.
17995 (rule_table): New.
17996 (rrhs, rlhs): Remove, part of state_t.
17997 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
17998 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17999 * src/reader.c, src/reduce.c: Adjust.
18000
18001 2001-11-19 Akim Demaille <akim@epita.fr>
18002
18003 * src/reader.c (symbols_output): New, extracted from...
18004 (packsymbols): Here.
18005 (reader): Call it.
18006
18007 2001-11-19 Akim Demaille <akim@epita.fr>
18008
18009 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
18010 (maxrhs): this new function.
18011
18012 2001-11-19 Akim Demaille <akim@epita.fr>
18013
18014 * src/lalr.c (F): New macro to access the variable F.
18015 Adjust.
18016
18017 2001-11-19 Akim Demaille <akim@epita.fr>
18018
18019 * src/lalr.h (LA): New macro to access the variable LA.
18020 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18021 * src/lalr.c: Adjust.
18022
18023 2001-11-19 Akim Demaille <akim@epita.fr>
18024
18025 * src/lalr.c (initialize_LA): Only initialize LA. Let...
18026 (set_state_table): handle the `lookaheads' members.
18027
18028 2001-11-19 Akim Demaille <akim@epita.fr>
18029
18030 * src/lalr.h (lookaheads): Removed array, whose contents is now
18031 a member of...
18032 (state_t): this structure.
18033 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18034 Adjust.
18035
18036 2001-11-19 Akim Demaille <akim@epita.fr>
18037
18038 * src/lalr.h (consistent): Removed array, whose contents is now
18039 a member of...
18040 (state_t): this structure.
18041 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18042 Adjust.
18043
18044 2001-11-19 Akim Demaille <akim@epita.fr>
18045
18046 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
18047 contents are now members of...
18048 (state_t): this structure.
18049 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18050 Adjust.
18051
18052 2001-11-19 Akim Demaille <akim@epita.fr>
18053
18054 * src/lalr.h (state_t): New.
18055 (state_table): Be a state_t * instead of a core **.
18056 (accessing_symbol): Remove, part of state_t.
18057 * src/lalr.c: Adjust.
18058 (set_accessing_symbol): Merge into...
18059 (set_state_table): this.
18060 * src/print_graph.c, src/conflicts.c: Adjust.
18061
18062 2001-11-14 Akim Demaille <akim@epita.fr>
18063
18064 * tests/calc.at, tests/output.at, tests/regression.at,
18065 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
18066 now the tests are run in private dirs, therefore AC_CLEANUP and
18067 family can be simplified to 0-ary.
18068 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
18069 use abs. path to find config.h.
18070 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
18071 stderr, there can be way too much random noise.
18072 Instead pass -Werror to GCC and rely on the exit status.
18073 Reported by Wolfram Wagner.
18074
18075 2001-11-14 Akim Demaille <akim@epita.fr>
18076
18077 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
18078 defined only if yyoverflow is defined, to avoid `warning: unused
18079 variable `yyvs1''.
18080 Reported by The Test Suite.
18081
18082 2001-11-14 Akim Demaille <akim@epita.fr>
18083
18084 * src/print.c: Include reduce.h.
18085 Reported by Hans Aberg.
18086
18087 2001-11-14 Akim Demaille <akim@epita.fr>
18088
18089 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
18090 Revert a previous patch: these are really const.
18091 * src/conflicts.c (conflict_report): Additional useless pair of
18092 braces to pacify GCC's warnings for `if () if () {} else {}'.
18093 * src/lex.c (parse_percent_token): Replace equal_offset with
18094 arg_offset.
18095 arg is const.
18096 Be sure to strdup `arg' when used, since there is no reason for
18097 token_buffer not to change.
18098
18099 2001-11-14 Akim Demaille <akim@epita.fr>
18100
18101 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
18102 definition.
18103 * src/main.c (main): Use them.
18104 Suggested by Hans Aberg.
18105
18106 2001-11-12 Akim Demaille <akim@epita.fr>
18107
18108 * src/system.h (ngettext): Now that we use ngettext, be sure to
18109 provide a default definition when NLS are not used.
18110
18111 2001-11-12 Akim Demaille <akim@epita.fr>
18112
18113 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
18114 Use @kbd to denote user input.
18115 (Language and Grammar): ANSIfy the example.
18116 Adjust its layout for info/notinfo.
18117 (Location Tracking Calc): Output error messages to stderr.
18118 Output locations in a more GNUtically correct way.
18119 Fix a couple of Englishos.
18120 Adjust @group/@end group pairs.
18121
18122 2001-11-12 Akim Demaille <akim@epita.fr>
18123
18124 %expect was not functioning at all.
18125
18126 * src/conflicts.c (expected_conflicts): Set to -1.
18127 (conflict_report): Use ngettext.
18128 (conflicts_print): Check %expect and make its violation an error.
18129 * doc/bison.texinfo (Expect Decl): Adjust.
18130 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
18131 * tests/regression.at (%expect not enough, %expect right)
18132 (%expect too much): New.
18133
18134 2001-11-12 Akim Demaille <akim@epita.fr>
18135
18136 * tests/regression.at (Conflicts): Rename as...
18137 (Unresolved SR Conflicts): this.
18138 (Solved SR Conflicts): New.
18139
18140 2001-11-12 Akim Demaille <akim@epita.fr>
18141
18142 * src/reduce.c (print_results): Rename as...
18143 (reduce_output): This.
18144 Output to OUT, passed as argument, instead of output_obstack.
18145 (dump_grammar): Likewise.
18146 (reduce_free): New.
18147 Also free V1.
18148 (reduce_grammar): No longer call reduce_output, since...
18149 * src/print.c (print_results): do it.
18150 * src/main.c (main): Call reduce_free;
18151
18152 2001-11-12 Akim Demaille <akim@epita.fr>
18153
18154 * src/conflicts.c (print_reductions): Accept OUT as argument.
18155 Output to it, not to output_obstack.
18156 * src/print.c (print_actions): Adjust.
18157
18158 2001-11-12 Akim Demaille <akim@epita.fr>
18159
18160 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
18161 the result instead of using...
18162 (src_total, rrc_total, src_count, rrc_count): Remove.
18163 (any_conflicts): Remove.
18164 (print_conflicts): Split into...
18165 (conflicts_print, conflicts_output): New.
18166 * src/conflicts.h: Adjust.
18167 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
18168 * src/print.c (print_grammar): Issue `\n' between two rules.
18169 * tests/regression.at (Conflicts): New.
18170 Reported by Tom Lane.
18171
18172 2001-11-12 Akim Demaille <akim@epita.fr>
18173
18174 * tests/regression.at (Invalid input): Remove, duplicate with
18175 ``Invalid input: 1''.
18176
18177 2001-11-12 Akim Demaille <akim@epita.fr>
18178
18179 * tests/torture.at (AT_DATA_STACK_TORTURE)
18180 (Exploding the Stack Size with Alloca)
18181 (Exploding the Stack Size with Malloc): New.
18182
18183 2001-11-12 Akim Demaille <akim@epita.fr>
18184
18185 * src/bison.simple (YYSTACK_REALLOC): New.
18186 (yyparse) [!yyoverflow]: Use it and free the old stack.
18187 Reported by Per Allansson.
18188
18189 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
18190
18191 * src/bison.simple: Define type yystype instead of YYSTYPE, and
18192 define CPP macro, which substitute YYSTYPE by yystype.
18193 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
18194 with yyltype/YYLTYPE. This allows inclusion of the generated
18195 header within the parser if the compiler, such as GGC, accepts
18196 multiple equivalent #defines.
18197 From Akim.
18198
18199 2001-11-05 Akim Demaille <akim@epita.fr>
18200
18201 * src/reader.c (symbols_output): New, extracted from...
18202 (packsymbols): here.
18203 (reader): Adjust.
18204
18205 2001-11-05 Akim Demaille <akim@epita.fr>
18206
18207 * src/lex.c (parse_percent_token): s/quotearg/quote/.
18208
18209 2001-11-05 Akim Demaille <akim@epita.fr>
18210
18211 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
18212 pattern.
18213
18214 2001-11-05 Akim Demaille <akim@epita.fr>
18215
18216 * src/options.h (struct option_table_struct): set_flags is void*.
18217 * src/options.c (longopts): Support `--output' and `%output'.
18218 (usage): Adjust.
18219 * src/lex.h (tok_setopt): Remove, replaced with...
18220 (tok_intopt, tok_stropt): these new guys.
18221 * src/lex.c (getopt.h): Not needed.
18222 (token_buffer, unlexed_token_buffer): Not const.
18223 (percent_table): Promote `-' over `_' in directive names.
18224 Active `%name-prefix', `file-prefix', and `output'.
18225 (parse_percent_token): Accept possible arguments to directives.
18226 Promote `-' over `_' in directive names.
18227
18228 2001-11-04 Akim Demaille <akim@epita.fr>
18229
18230 * doc/bison.texinfo (Decl Summary): Split the list into
18231 `directives for grammars' and `directives for bison'.
18232 Sort'em.
18233 Add description of `%name-prefix', `file-prefix', and `output'.
18234 Promote `-' over `_' in directive names.
18235 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
18236 Simplify the description of `--name-prefix'.
18237 Promote `-' over `_' in directive names.
18238 Promote `--output' over `--output-file'.
18239 Fix the description of `--defines'.
18240 * tests/output.at: Exercise %file-prefix and %output.
18241
18242 2001-11-02 Akim Demaille <akim@epita.fr>
18243
18244 * doc/refcard.tex: Update.
18245
18246 2001-11-02 Akim Demaille <akim@epita.fr>
18247
18248 * src/symtab.h (SUNDEF): New.
18249 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
18250 stand for `uninitialized', instead of 0.
18251 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
18252 * src/lex.c (lex): Adjust.
18253
18254 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
18255 Number it 0.
18256 Let yylex return it instead of a plain 0.
18257 Reported by Dick Streefland.
18258
18259 2001-11-02 Akim Demaille <akim@epita.fr>
18260
18261 * tests/regression.at (Mixing %token styles): New test.
18262
18263 2001-11-02 Akim Demaille <akim@epita.fr>
18264
18265 * src/reader.c (parse_thong_decl): Formatting changes.
18266 (token_translations_init): New, extracted from...
18267 (packsymbols): Here.
18268 Adjust.
18269
18270 2001-11-01 Akim Demaille <akim@epita.fr>
18271
18272 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
18273 Check that `9foo.y' produces correct cpp guards.
18274 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
18275 guards.
18276 Reported by Wwp.
18277
18278 2001-11-01 Akim Demaille <akim@epita.fr>
18279
18280 * tests/regression.at (Invalid input: 2): New.
18281 * src/lex.c (unlexed_token_buffer): New.
18282 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
18283 too.
18284 Reported by Wwp.
18285
18286 2001-11-01 Akim Demaille <akim@epita.fr>
18287
18288 * tests/calc.at: Catch up with 1.30.
18289 * configure.in: Bump to 1.49a.
18290 Adjust to newer Autotest.
18291
18292 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
18293
18294 * src/conflicts.c: Move global variables rrc_total and src_total ...
18295 (print_conflicts): here.
18296 * src/output.c (output): Free global variable user_toknums.
18297 * src/lex.c (token_obstack): Become static.
18298
18299 2001-10-18 Akim Demaille <akim@epita.fr>
18300
18301 * tests/atlocal.in (GCC): Add.
18302 * tests/calc.at: s/m4_match/m4_bmatch/.
18303 s/m4_patsubst/m4_bpatsubst/.
18304 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
18305 * configure.in: AC_SUBST(GCC).
18306
18307 2001-10-14 Marc Autret <autret_m@epita.fr>
18308
18309 * src/options.c (create_long_option_table): Fix.
18310
18311 2001-10-10 Akim Demaille <akim@epita.fr>
18312
18313 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
18314
18315 2001-10-04 Akim Demaille <akim@epita.fr>
18316
18317 * src/reader.c (parse_union_decl): Push the caracters in
18318 union_obstack, not attrs_obstack.
18319
18320 2001-10-04 Akim Demaille <akim@epita.fr>
18321
18322 Merge in the branch 1.29.
18323
18324 * src/reader.c (packsymbols): Use a temporary obstack for
18325 `%%tokendef', since output_stack is already used elsewhere.
18326
18327 2001-10-02 Akim Demaille <akim@epita.fr>
18328
18329 Bump 1.29d.
18330
18331 2001-10-02 Akim Demaille <akim@epita.fr>
18332
18333 Version 1.29c.
18334
18335 2001-10-02 Akim Demaille <akim@epita.fr>
18336
18337 * tests/regression.at (Invalid CPP headers): New.
18338 From Alexander Belopolsky.
18339 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
18340
18341 2001-10-02 Akim Demaille <akim@epita.fr>
18342
18343 * tests/regression.at (Invalid input): New.
18344 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
18345 Reported by Shura.
18346
18347 2001-10-02 Akim Demaille <akim@epita.fr>
18348
18349 * tests/calc.at: Now that --debug works, the tests must be adjusted.
18350
18351 2001-10-02 Akim Demaille <akim@epita.fr>
18352
18353 * src/output.c (output_parser): Assert `skeleton'.
18354 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
18355 systems.
18356 From Shura.
18357
18358 2001-10-01 Marc Autret <autret_m@epita.fr>
18359
18360 * src/lex.h: Echo modifications.
18361 * src/lex.c (unlex): Parameter is now token_t.
18362 From Hans Aberg.
18363
18364 2001-10-01 Marc Autret <autret_m@epita.fr>
18365
18366 * src/main.c: Include lex.h.
18367 From Hans Aberg.
18368
18369 2001-09-29 Akim Demaille <akim@epita.fr>
18370
18371 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
18372
18373 2001-09-28 Akim Demaille <akim@epita.fr>
18374
18375 * tests/testsuite.at: Update to newer Autotest.
18376 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
18377
18378 2001-09-27 Akim Demaille <akim@epita.fr>
18379
18380 Position independent wrapper.
18381
18382 * tests/bison: Remove.
18383 * tests/bison.in: New.
18384 * configure.in: Adjust.
18385
18386 2001-09-27 Paul Eggert <eggert@twinsun.com>
18387
18388 Port quotearg fixes from tar 1.13.24.
18389
18390 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
18391 tm to be declared.
18392 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
18393 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
18394
18395 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
18396 * m4/mbrtowc.m4: New file.
18397 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
18398 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
18399
18400 2001-09-27 Akim Demaille <akim@epita.fr>
18401
18402 Bump to 1.29c.
18403
18404 2001-09-27 Akim Demaille <akim@epita.fr>
18405
18406 Version 1.29b.
18407
18408 2001-09-25 Akim Demaille <akim@epita.fr>
18409
18410 * src/system.h: Include `xalloc.h'.
18411 Remove it from the C files.
18412 * src/files.c (output_files): Free the obstacks.
18413 * src/lex.c (init_lex): Rename as...
18414 (lex_init): this.
18415 (lex_free): New.
18416 * src/main.c (main): Use it.
18417
18418 2001-09-24 Marc Autret <autret_m@epita.fr>
18419
18420 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
18421 to output informations in fout (FILE*).
18422 (open_graph, close_graph): Likewise.
18423 (output_graph, output_edge, output_node): Likewise.
18424 * src/vcg.h: Update function prototypes.
18425 * src/print_graph.c (print_graph): Open output graph file.
18426 (print_actions): Adjust.
18427 * src/files.h: Remove extern declaration.
18428 * src/files.c: Remove graph_obstack declaration.
18429 (open_files): Remove graph_obstack initialization.
18430 (output_files): Remove graph_obstack saving.
18431
18432 2001-09-24 Marc Autret <autret_m@epita.fr>
18433
18434 * src/files.c (compute_output_file_names): Fix.
18435
18436 2001-09-24 Marc Autret <autret_m@epita.fr>,
18437 Akim Demaille <akim@epita.fr>
18438
18439 * src/reader.c (reader): Remove call to free_symtab ().
18440 * src/main.c (main): Call it here.
18441 Include symtab.h.
18442 * src/conflicts.c (initialize_conflicts): Rename as...
18443 (solve_conflicts): this.
18444 * src/print.c (print_core, print_actions, print_state)
18445 (print_grammar): Dump to a file instead a `output_obstack'.
18446 (print_results): Dump `output_obstack', and then proceed with the
18447 FILE *.
18448 * src/files.c (compute_output_file_names, close_files): New.
18449 (output_files): Adjust.
18450 * src/main.c (main): Adjust.
18451
18452 2001-09-23 Marc Autret <autret_m@epita.fr>
18453
18454 * src/files.c (compute_header_macro): Computes header macro name
18455 from spec_defines_file when given.
18456
18457 2001-09-23 Marc Autret <autret_m@epita.fr>
18458
18459 * src/files.c (output_files): Add default extensions.
18460
18461 2001-09-22 Akim Demaille <akim@epita.fr>
18462
18463 * src/conflicts.c (finalize_conflicts): Rename as...
18464 (free_conflicts): this.
18465
18466 2001-09-22 Akim Demaille <akim@epita.fr>
18467
18468 * src/gram.c (gram_free): Rename back as...
18469 (dummy): this.
18470 (output_token_translations): Free `token_translations'.
18471 * src/symtab.c (free_symtab): Free the tag field.
18472
18473 2001-09-22 Akim Demaille <akim@epita.fr>
18474
18475 Remove `translations' as it is always set to true.
18476
18477 * src/gram.h: Adjust.
18478 * src/reader.c (packsymbols, parse_token_decl): Adjust
18479 * src/print.c (print_grammar): Adjust.
18480 * src/output.c (output_token_translations): Adjust.
18481 * src/lex.c (lex): Adjust.
18482 * src/gram.c: Be sure the set pointers to NULL.
18483 (dummy): Rename as...
18484 (gram_free): this.
18485
18486 2001-09-22 Akim Demaille <akim@epita.fr>
18487
18488 * configure.in: Invoke AM_LIB_DMALLOC.
18489 * src/system.h: Use dmalloc.
18490 * src/LR0.c: Be sure to have pointers initialized to NULL.
18491 (allocate_itemsets): Allocate kernel_items only if needed.
18492
18493 2001-09-22 Akim Demaille <akim@epita.fr>
18494
18495 * configure.in: Bump to 1.29b.
18496 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
18497 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
18498 need xmalloc.c in calc.y.
18499 From Pascal Bart.
18500
18501 2001-09-21 Akim Demaille <akim@epita.fr>
18502
18503 Version 1.29a.
18504 * Makefile.maint, config/config.guess, config/config.sub,
18505 * config/missing: Update from masters.
18506 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
18507 upon package.m4.
18508 * configure.in (ALL_LINGUAS): Add `tr'.
18509
18510 2001-09-21 Akim Demaille <akim@epita.fr>
18511
18512 * tests/Makefile.am (package.m4): Move to...
18513 ($(srcdir)/$(TESTSUITE)): here.
18514
18515 2001-09-20 Akim Demaille <akim@epita.fr>
18516
18517 * src/complain.c: No longer try to be standalone: use system.h.
18518 Don't assume __STDC__ is defined to 1. Just test if it is defined.
18519 * src/complain.h: Likewise.
18520 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
18521 Remove the unused variable `n'.
18522 From Albert Chin-A-Young.
18523
18524 2001-09-18 Marc Autret <autret_m@epita.fr>
18525
18526 * doc/bison.1: Update.
18527 * doc/bison.texinfo (Bison Options): Update --defines and --graph
18528 descriptions.
18529 (Option Cross Key): Update.
18530 Add --graph.
18531
18532 2001-09-18 Marc Autret <autret_m@epita.fr>
18533
18534 * tests/regression.at: New test (comment in %union).
18535
18536 2001-09-18 Marc Autret <autret_m@epita.fr>
18537
18538 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
18539 do that.
18540 Reported by Keith Browne.
18541
18542 2001-09-18 Marc Autret <autret_m@epita.fr>
18543
18544 * tests/output.at: Add tests for --defines and --graph.
18545
18546 2001-09-18 Marc Autret <autret_m@epita.fr>
18547
18548 * tests/output.at: Removes tests of %{header,src}_extension features.
18549
18550 2001-09-18 Akim Demaille <akim@epita.fr>
18551
18552 * tests/Makefile.am (package.m4): New.
18553 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
18554 (_AT_CHECK_CALC_ERROR): Likewise.
18555 Factor the `, ' part of verbose error messages.
18556
18557 2001-09-18 Marc Autret <autret_m@epita.fr>
18558
18559 * src/getargs.c (longopts): Declare --defines and --graph as options
18560 with optional arguments.
18561 * src/files.h: Add extern declarations.
18562 * src/files.c (spec_graph_file, spec_defines_file): New.
18563 (output_files): Update.
18564 Remove CPP-outed code.
18565
18566 2001-09-18 Marc Autret <autret_m@epita.fr>
18567
18568 Turn off %{source,header}_extension feature.
18569
18570 * src/files.c (compute_exts_from_gf): Update.
18571 (compute_exts_from_src): Update.
18572 (output_files): CPP-out useless code.
18573 * src/files.h: Remove {header,source}_extension extern declarations.
18574 * src/reader.c (parse_dquoted_param): CPP-out.
18575 (parse_header_extension_decl): Remove.
18576 (parse_source_extension_decl): Remove.
18577 (read_declarations): Remove cases tok_{hdrext,srcext}.
18578 * src/lex.c (percent_table): Remove {header,source}_extension entries.
18579 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
18580
18581 2001-09-10 Akim Demaille <akim@epita.fr>
18582
18583 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
18584 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
18585 (AT_CHECK_OUTPUT): this.
18586 Merely check ls' exit status, its output is useless.
18587
18588 2001-09-10 Akim Demaille <akim@epita.fr>
18589
18590 * tests/calc.at: Use m4_match.
18591 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
18592
18593 2001-09-10 Marc Autret <autret_m@epita.fr>,
18594 Akim Demaille <akim@epita.fr>
18595
18596 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
18597 enum color_e.
18598 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
18599 to `normal'.
18600 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
18601 * src/lex.h: Adjust prototype.
18602 (token_t): Add `tok_undef'.
18603 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
18604 (parse_percent_token): Now returns token_t.
18605 Add default statement in switch.
18606 (lex): Separate `c' as an input variable, from the token_t result
18607 part.
18608 (unlexed): Is a token_t.
18609
18610 2001-09-10 Akim Demaille <akim@epita.fr>
18611
18612 * configure.in: Bump to 1.29a.
18613
18614 2001-09-07 Akim Demaille <akim@epita.fr>
18615
18616 Version 1.29.
18617
18618 2001-08-30 Akim Demaille <akim@epita.fr>
18619
18620 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
18621 * m4/atconfig.m4: Remove.
18622 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
18623 * tests/bison: New.
18624 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
18625 m4_if, m4_patsubst, and m4_regexp.
18626 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
18627 `input' file instead of echo.
18628
18629 2001-08-29 Akim Demaille <akim@epita.fr>
18630
18631 Bump to 1.28e.
18632
18633 2001-08-29 Akim Demaille <akim@epita.fr>
18634
18635 Version 1.28d.
18636
18637 2001-08-29 Paul Eggert <eggert@twinsun.com>
18638
18639 * src/bison.simple (yyparse): Don't take the address of an
18640 item before the start of an array, as that doesn't conform to
18641 the C Standard.
18642
18643 2001-08-29 Robert Anisko <anisko_r@epita.fr>
18644
18645 * doc/bison.texinfo (Location Tracking Calc): New node.
18646
18647 2001-08-29 Paul Eggert <eggert@twinsun.com>
18648
18649 * src/output.c (output): Do not define const, as this now
18650 causes more problems than it cures.
18651
18652 2001-08-29 Akim Demaille <akim@epita.fr>
18653
18654 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
18655 the nodes.
18656 Be sure to tag the `detailmenu'.
18657
18658 2001-08-29 Akim Demaille <akim@epita.fr>
18659
18660 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
18661 download in a tmp dir.
18662
18663 2001-08-28 Marc Autret <autret_m@epita.fr>
18664
18665 * config/depcomp: New file.
18666
18667 2001-08-28 Marc Autret <autret_m@epita.fr>
18668
18669 * doc/bison.1 (mandoc): Adjust.
18670 From Juan Manuel Guerrero.
18671
18672 2001-08-28 Marc Autret <autret_m@epita.fr>
18673
18674 * src/print_graph.c (print_state): Fix.
18675
18676 2001-08-27 Marc Autret <autret_m@epita.fr>
18677
18678 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
18679 char * members.
18680 Echo modifications to the functions prototypes.
18681 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
18682
18683 2001-08-27 Marc Autret <autret_m@epita.fr>
18684
18685 * src/vcg.c: Include `xalloc.h'.
18686 (add_colorentry): New.
18687 (add_classname): New.
18688 (add_infoname): New.
18689 * src/vcg.h: Add new prototypes.
18690
18691 2001-08-27 Akim Demaille <akim@epita.fr>
18692
18693 * Makefile.maint: Sync. again with CVS Autoconf.
18694
18695 2001-08-27 Akim Demaille <akim@epita.fr>
18696
18697 * Makefile.maint: Formatting changes.
18698 (po-update, cvs-update, update): New targets.
18699 (AMTAR): Remove.
18700
18701 2001-08-27 Akim Demaille <akim@epita.fr>
18702
18703 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18704 * Makefile.maint: Sync. with CVS Autoconf.
18705
18706 2001-08-27 Marc Autret <autret_m@epita.fr>
18707
18708 * src/vcg.h (struct infoname_s): New.
18709 (struct colorentry_s): New.
18710 (graph_s): New fields {vertical,horizontal}_order in structure.
18711 Add `infoname' field.
18712 Add `colorentry' field;
18713 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
18714 (G_HORIZONTAL_ORDER): New.
18715 (G_INFONAME): New.
18716 (G_COLORENTRY): New.
18717 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
18718 Add output of `infoname'.
18719 Add output of `colorentry'.
18720
18721 2001-08-27 Marc Autret <autret_m@epita.fr>
18722
18723 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
18724 This one shadowed a global parameter.
18725
18726 2001-08-24 Marc Autret <autret_m@epita.fr>
18727
18728 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
18729 instead of `unsigned'.
18730 (print_state): Do not call obstack_object_size () in obstack_grow ()
18731 to avoid macro variables shadowing.
18732
18733 2001-08-23 Marc Autret <autret_m@epita.fr>
18734
18735 * src/lex.c (percent_table): Typo: s/naem/name/.
18736 Add graph option.
18737 Normalize new options declarations.
18738
18739 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
18740
18741 * tests/suite.at: Exercise %header_extension and %source_extension.
18742
18743 2001-08-16 Marc Autret <autret_m@epita.fr>
18744
18745 * src/reader.c (parse_dquoted_param): New.
18746 (parse_header_extension_decl): Use it.
18747 (parse_source_extension_decl): Likewise.
18748
18749 2001-08-16 Marc Autret <autret_m@epita.fr>
18750
18751 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
18752 (get_xxxx_str): Use assert () instead of complain ().
18753 Remove return invokations in default cases.
18754 (get_decision_str): Modify default behaviour. Remove second argument.
18755 Echo modifications on calls.
18756 (output_graph): Fix.
18757
18758 2001-08-16 Marc Autret <autret_m@epita.fr>
18759
18760 * src/getargs.c (usage): Update with ``-g, --graph''.
18761
18762 2001-08-16 Marc Autret <autret_m@epita.fr>
18763
18764 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
18765 (Option Cross Key): Likewise.
18766 * doc/bison.1: Update.
18767
18768 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
18769
18770 * src/output.c (output_master_parser): Don't finish action_obstack.
18771 (output_parser): Don't care about the muscle action, here.
18772 (prepare): Copy the action_obstack in the action muscle.
18773 (output): Free action_obstack.
18774
18775 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
18776
18777 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
18778 will contain `%union' declaration.
18779 (parse_union_decl): Delete #line directive output.
18780 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
18781 informations about %union.
18782 (parse_union_decl): Copy the union_obstack in the muscle stype.
18783 * src/bison.simple: Add new #line directive.
18784 Add typdef %%stype YYSTYPE.
18785
18786 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
18787
18788 * src/bison.simple: Add new `#line' directive.
18789
18790 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
18791
18792 * src/bison.simple: New `#line' directive.
18793 * src/output.c (output_parser): Support new dynamic muscle input_line.
18794
18795 2001-09-22 Marc Autret <autret_m@epita.fr>
18796
18797 * src/output.c (output_master_parser): New.
18798 (output_parser): Be more re-entrant.
18799
18800 2001-09-21 Marc Autret <autret_m@epita.fr>
18801
18802 * src/reader.c (copy_definition, parse_union_decl): Update and use
18803 `linef' muscle.
18804 (copy_action): Likewise.
18805 Use obstack_1grow ().
18806 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
18807
18808 2001-09-21 Marc Autret <autret_m@epita.fr>
18809
18810 * src/options.c (option_table): Adjust.
18811 * src/lex.c (parse_percent_token): Fix.
18812
18813 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
18814
18815 * src/options.c (symtab.h): Include it, need by lex.h.
18816
18817 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
18818
18819 * src/lex.c (parse_percent_token): Change type of variable `tx', which
18820 is now an option_table_struct*.
18821 (option_strcmp): New function option_strcmp.
18822 (parse_percent_token): Call option_strcmp.
18823 * src/getargs.c (xalloc.h, options.h): Include it.
18824 (getargs): Call create_long_option_table.
18825 (getargs): Free longopts at the end of the function.
18826 (shortopts): Move in options.c.
18827 * src/options.c (create_long_option_table): New function. Convert
18828 information from option_table to option structure.
18829 * src/reader.c (options.h): Include it.
18830
18831 * src/Makefile.am: Adjust.
18832 * src/options.c (option_table): Create from longopts and percent_table.
18833 * src/getargs.c (longopts): Delete.
18834 * src/lex.c (struct percent_table_struct): Delete.
18835 (percent_table): Delete.
18836 (options.h): Include it.
18837 * src/options.c: Create.
18838 * src/options.h: Create.
18839 Declare enum opt_access_e.
18840 Define struct option_table_struct.
18841
18842 2001-09-20 Marc Autret <autret_m@epita.fr>
18843
18844 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
18845 sections of Bison.
18846
18847 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
18848
18849 * src/bison.simple: s/%%filename/%%skeleton.
18850 * src/muscle_tab.c (getargs.h): Include it.
18851 (muscle_init): Insert new muscle skeleton.
18852
18853 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
18854
18855 * src/output.c (output_parser): Delete unused variable actions_dumped.
18856
18857 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
18858
18859 * src/output.c (output): Delete call to reader_output_yylsp.
18860 * src/reader.c (reader): Likewise.
18861 * src/reader.h: Delete declaration of reader_output_yylsp.
18862
18863 2001-09-02 Marc Autret <autret_m@epita.fr>
18864
18865 * src/reader.c: Include muscle_tab.h.
18866 (parse_union_decl): Update.
18867 (parse_macro_decl): Rename parse_muscle_decl.
18868 Update to use renamed functions and variable.
18869 (read_declarations, copy_action, read_additionnal_code, : Updated
18870 with correct variables and functions names.
18871 (packsymbols, reader): Likewise.
18872
18873 * src/reader.h (muscle_obstack): Extern declaration update.
18874
18875 * src/output.c: Include muscle_tab.h
18876 In all functions using macro_insert, change by using muscle_insert ().
18877 (macro_obstack): Rename muscle_obstack.
18878 Echo modifications in the whole file.
18879 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
18880 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
18881 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
18882
18883 * src/muscle_tab.h: Update double inclusion macros.
18884 (macro_entry_s): Rename muscle_entry_s.
18885 Update prototypes.
18886
18887 * src/muscle_tab.c: Include muscle_tab.h.
18888 Rename macro_tabble to muscle_table.
18889 (mhash1, mhash2, mcmp): Use muscle_entry.
18890 (macro_init): Rename muscle_init. Update.
18891 (macro_insert): Rename muscle_insert. Update.
18892 (macro_find): Rename muscle_find. Update.
18893
18894 * src/main.c: Include muscle_tab.h.
18895 (main): Call muscle_init ().
18896 * src/Makefile.am (bison_SOURCES): Echo modifications.
18897
18898 2001-09-02 Marc Autret <autret_m@epita.fr>
18899
18900 Now the files macro_tab.[ch] are named muscle_tab.[ch].
18901
18902 * src/muscle_tab.c, src/muscle_tab.h: Add files.
18903
18904 2001-09-02 Marc Autret <autret_m@epita.fr>
18905
18906 * src/macrotab.c, src/macrotab.h: Remove.
18907
18908 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
18909
18910 * src/reader.c (copy_guard): Use muscle to specify the `#line'
18911 filename.
18912
18913 2001-09-01 Marc Autret <autret_m@epita.fr>
18914
18915 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
18916 to an explicit value to activate the feature. We do it here.
18917
18918 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
18919
18920 * src/output.c (prepare): Delete the `filename' muscule insertion.
18921 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
18922 (parse_union_decl): Likewise.
18923 * src/macrotab.c (macro_init): Initialize filename by infile.
18924
18925 2001-08-31 Marc Autret <autret_m@epita.fr>
18926
18927 * src/bison.simple (YYLSP_NEEDED): New definition.
18928 * src/output.c (prepare): Add macro insertion of `locations_flag'
18929
18930 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
18931
18932 * src/output.c (prepare): Delete insertion of previous muscles,
18933 and insert the `prefix' muscles.
18934 * src/macrotab.c (macro_init): Likewise.
18935 (macro_init): Initialization prefix directive by `yy'.
18936 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
18937 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
18938 yylval, yydebug, yyerror, yynerrs and yyparse.
18939 New directive `#define' to substitute yydebug, ... with option
18940 name_prefix.
18941
18942 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
18943
18944 * src/main.c (main): Standardize.
18945 * src/output.c (output_table_data, output_parser): Likewise.
18946 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
18947
18948 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
18949
18950 * src/reader.c (read_additionnal_code): Rename %%user_code to
18951 %%epilogue.
18952 * src/output.c (output): Rename %%declarations to %%prologue.
18953 * src/bison.simple: Echo modifications.
18954
18955 2001-08-31 Marc Autret <autret_m@epita.fr>
18956
18957 * src/reader.c (readgram): CleanUp.
18958 (output_token_defines): Likewise.
18959 (packsymbols): Likewise.
18960 (reader): Likewise.
18961 * src/output.c (output): CPP-out useless code.
18962
18963 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
18964
18965 * src/reader.c (reader): Delete obsolete call to function
18966 output_trailers and output_headers.
18967 * src/output.h: Remove obsolete functions prototypes of output_headers
18968 and output_trailers.
18969
18970 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
18971
18972 * src/main.c: Include macrotab.h.
18973 * src/macrotab.h (macro_entry_s): Constify fields.
18974 Adjust functions prototypes.
18975 * src/macrotab.c (macro_insert): Constify key and value.
18976 (macro_find): Constify key.
18977 (macro_insert): Include 'xalloc.h'
18978 (macro_insert): Use XMALLOC.
18979 (macro_find): Constify return value.
18980 * src/output.c (output_table_data): Rename table to table_data.
18981 (output_parser): Constify macro_key, macro_value.
18982
18983 2001-08-30 Marc Autret <autret_m@epita.fr>
18984
18985 * src/reader.c (parse_skel_decl): New.
18986 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
18987 * src/lex.h (token_t): New token `tok_skel'.
18988 * src/lex.c (percent_table): Add skeleton option entry.
18989 Standardize.
18990
18991 2001-08-29 Marc Autret <autret_m@epita.fr>
18992
18993 * src/bison.simple: Add %%user_code directive at the end.
18994 * src/reader.c (read_additionnal_code): New.
18995 (reader): Use it.
18996 * src/output.c (output_program): Remove.
18997 (output): Update.
18998
18999 2001-08-28 Marc Autret <autret_m@epita.fr>
19000
19001 * src/output.c (output_actions): Clean up.
19002 (output_gram): CPP-out useless code.
19003 * src/reader.c (reader): Clean up, CPP-out useless code.
19004
19005 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
19006
19007 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
19008 directive.
19009 * src/bison.simple: Add `%%definitions'.
19010
19011 2001-08-28 Marc Autret <autret_m@epita.fr>
19012
19013 * config/depcomp: New file.
19014
19015 2001-08-27 Paul Eggert <eggert@twinsun.com>
19016
19017 * src/bison.simple (yyparse): Don't take the address of an
19018 item before the start of an array, as that doesn't conform to
19019 the C Standard.
19020
19021 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
19022
19023 * src/output.c (output): Remove the initialization of the macro
19024 obstack. It was done too late here.
19025
19026 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
19027 completely wrong.
19028 (reader): Initialize the macro obstack here, since we need it to grow
19029 '%define' directives.
19030
19031 * src/reader.h: Declare the macro obstack as extern.
19032
19033 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
19034
19035 * src/output.c (output_parser): Fix. Store single '%' characters in
19036 the output obstack instead of throwing them away.
19037
19038 2001-08-27 Akim Demaille <akim@epita.fr>
19039
19040 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
19041
19042 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19043
19044 * lib/Makefile.am: Adjust.
19045
19046 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19047
19048 * src/bison.simple: Update and add '%%' directives.
19049
19050 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19051
19052 * src/reader.c (reader): Remove calls to 'output_headers' and
19053 'output_trailers'. Remove some C output.
19054 (readgram): Disable a piece of code that was writing a default
19055 definition for 'YYSTYPE'.
19056 (reader_output_yylsp): Remove.
19057 (packsymbols): Output token defintions to a macro.
19058 (copy_definition): Disable C output.
19059
19060 * src/reader.c (parse_macro_decl): New function used to parse macro
19061 declarations.
19062 (copy_string2): Put the body of copy_string into this new function.
19063 Add a parameter to let the caller choose whether he wants to copy the
19064 string delimiters or not.
19065 (copy_string): Be a simple call to copy_string2 with the last argument
19066 bound to true.
19067 (read_declarations): Add case for macro definition.
19068 (copy_identifier): New.
19069 (parse_macro_decl): Read macro identifiers using copy_identifier
19070 rather than lex.
19071
19072 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19073
19074 * src/output.c (prepare): Add prefixed names.
19075 (output_parser): Output semantic actions.
19076 (output_parser): Fix bug on '%%line' directives.
19077
19078 * src/output.c (output_headers): Remove. The C code printed by this
19079 function should now be in the skeletons.
19080 (output_trailers): Remove.
19081 (output): Disable call to 'reader_output_yylsp'.
19082 (output_rule_data): Do not output tables to the table obstack.
19083
19084 * src/output.c: Remove some C dedicated output.
19085 Improve the use of macro and output obstacks.
19086 (output_defines): Remove.
19087
19088 * src/output.c (output_token_translations): Associate 'translate'
19089 table with a macro. No output to the table obstack.
19090 (output_gram): Same for 'rhs' and 'prhs'.
19091 (output_stos): Same for 'stos'.
19092 (output_rule_data): Same for 'r1' and 'r2'.
19093 (token_actions): Same for 'defact'.
19094 (goto_actions): Same for 'defgoto'.
19095 (output_base): Same for 'pact' and 'pgoto'.
19096 (output_table): Same for 'table'.
19097 (output_check): Same for 'check'.
19098
19099 * src/output.c (output_table_data): New function.
19100 (output_short_table): Remove.
19101 (output_short_or_char_table): Remove.
19102
19103 * src/output.c (output_parser): Replace most of the skeleton copy code
19104 with something new. Skeletons are now processed character by character
19105 rather than line by line, and Bison looks for '%%' macros. This is the
19106 first step in making Bison's output process (a lot) more flexible.
19107 (output_parser): Use the macro table.
19108
19109 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19110
19111 * src/main.c (main): Initialize the macro table.
19112
19113 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19114
19115 * src/lex.c (percent_table): Add tok_define.
19116 * src/lex.h: Add tok_define.
19117
19118 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19119
19120 * src/macrotab.c: New file.
19121 * src/macrotab.h: New file.
19122 * src/Makefile.am: Update.
19123
19124 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19125
19126 * lib/hash.c: New file.
19127 * lib/hash.h: New file.
19128 * lib/Makefile.am: Update.
19129
19130 2001-08-15 Akim Demaille <akim@epita.fr>
19131
19132 Version 1.28c.
19133
19134 2001-08-15 Marc Autret <autret_m@epita.fr>
19135
19136 * src/reader.c (readgram): Indent output macro YYSTYPE.
19137 (packsymbols): Likewise.
19138 (output_token_defines): Likewise.
19139 * src/files.c: Standardize.
19140 (compute_header_macro): New.
19141 (defines_obstack_save): New. Use compute_header_macro.
19142 (output_files): Update. Use defines_obstack_save.
19143
19144 2001-08-15 Akim Demaille <akim@epita.fr>
19145
19146 * doc/bison.texinfo (Table of Symbols): Document
19147 YYSTACK_USE_ALLOCA.
19148
19149 2001-08-15 Akim Demaille <akim@epita.fr>
19150
19151 * missing: Update from CVS Automake.
19152 * config/config.guess, config/config.sub, config/texinfo.tex:
19153 Update from gnu.org.
19154
19155 2001-08-15 Akim Demaille <akim@epita.fr>
19156
19157 * Makefile.maint: Sync with CVS Autoconf.
19158
19159 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
19160
19161 * doc/bison.texinfo: Include GNU Free Documentation License from
19162 `fdl.texi'.
19163 * doc/fdl.texi: Add to package.
19164
19165 2001-08-14 Marc Autret <autret_m@epita.fr>
19166
19167 Turn on %{source,header}_extension features.
19168
19169 * src/lex.c (percent_table): Un-CPP out header_extension and
19170 source_extension.
19171 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
19172 (compute_exts_from_src): Remove conditions. It restores priorities
19173 between options.
19174
19175 2001-08-14 Marc Autret <autret_m@epita.fr>
19176
19177 * src/files.c (compute_base_names): Add extensions computing when
19178 `--file-prefix' used.
19179 Standardize function calls.
19180
19181 2001-08-13 Marc Autret <autret_m@epita.fr>
19182
19183 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
19184 defining it (defined but null disables alloca).
19185
19186 2001-08-13 Marc Autret <autret_m@epita.fr>
19187
19188 * src/bison.simple (_yy_memcpy): CPP reformat.
19189
19190 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
19191
19192 * tests/atconfig.in (CPPFLAGS): Fix.
19193
19194 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
19195
19196 * doc/bison.texinfo: Include GNU General Public License from
19197 `gpl.texi'.
19198 * doc/gpl.texi: Add to package.
19199
19200 2001-08-10 Marc Autret <autret_m@epita.fr>
19201
19202 * src/print_graph.h: Fix.
19203 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
19204
19205 2001-08-10 Akim Demaille <akim@epita.fr>
19206
19207 * src/system.h: Provide default declarations for stpcpy, strndup,
19208 and strnlen.
19209
19210 2001-08-10 Robert Anisko <anisko_r@epita.fr>
19211
19212 * doc/bison.texinfo (Locations): Update @$ stuff.
19213
19214 2001-08-09 Robert Anisko <anisko_r@epita.fr>
19215
19216 * src/bison.simple (YYLLOC_DEFAULT): Update.
19217 (yyparse): Adjust.
19218
19219 2001-08-08 Marc Autret <autret_m@epita.fr>
19220
19221 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
19222 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
19223 Reported by Fabrice Bauzac.
19224
19225 2001-08-08 Marc Autret <autret_m@epita.fr>
19226
19227 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
19228 * src/vcg.c (output_node): Fix.
19229 * src/vcg.h: Cleanup.
19230 * src/print_graph.c: Add comments.
19231 (node_output_size): New global variable. Simplify the formatting of
19232 the VCG graph output.
19233 (print_actions): Unused code is now used. It notifies the final state
19234 and no action states in the VCG graph. It also give the reduce actions.
19235 The `shift and goto' edges are red and the `go to state' edges are
19236 blue.
19237 Get the current node name and node_obstack by argument.
19238 (node_obstack): New variable.
19239 (print_state): Manage node_obstack.
19240 (print_core): Use node_obstack given by argument.
19241 A node is not only computed here but in print_actions also.
19242 (print_graph): CPP out useless code instead of commenting it.
19243
19244 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
19245
19246 * tests/atconfig.in (CPPFLAGS): Fix.
19247
19248 2001-08-07 Akim Demaille <akim@epita.fr>
19249
19250 * src/print_graph.c (quote): New.
19251 (print_core): Use it.
19252
19253 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
19254
19255 * src/vcg.c (complain.h): Include it.
19256 Unepitaize `return' invocations.
19257 [NDEBUG] (main): Remove.
19258 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
19259 * src/files.c (open_files): Initialize graph_obstack.
19260 * src/print_graph.c (print_actions): CPP out useless code.
19261 (print_core): Don't output the last `\n' in labels.
19262 Use `quote'.
19263 * src/files.c (output_files): Output the VCG file.
19264 * src/main.c (main): Invoke print_graph ();
19265
19266 2001-08-06 Marc Autret <autret_m@epita.fr>
19267
19268 Automaton VCG graph output.
19269 Using option ``-g'' or long option ``--graph'', you can generate
19270 a gram_filename.vcg file containing a VCG description of the LALR (1)
19271 automaton of your grammar.
19272
19273 * src/main.c: Call to print_graph() function.
19274 * src/getargs.h: Update.
19275 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
19276 (graph_flag): New flag.
19277 (longopts): Update.
19278 (getargs): Add case `g'.
19279 * src/files.c (graph_obstack): New obstack struct.
19280 (open_files): Initialize new obstack.
19281 (output_files): Saves graph_obstack if required.
19282 * src/files.h (graph_obstack): New extern declaration.
19283 * src/Makefile.am: Add new source files.
19284
19285 2001-08-06 Marc Autret <autret_m@epita.fr>
19286
19287 * src/print_graph.c, src/print_graph.h (graph): New.
19288 * src/vcg.h: New file.
19289 * src/vcg.c: New file, VCG graph handling.
19290
19291 2001-08-06 Marc Autret <autret_m@epita.fr>
19292
19293 Add of %source_extension and %header_extension which specify
19294 the source or/and the header output file extension.
19295
19296 * src/files.c (compute_base_names): Remove initialisation of
19297 src_extension and header_extension.
19298 (compute_exts_from_gf): Update.
19299 (compute_exts_from_src): Update.
19300 (output_files): Update.
19301 * src/reader.c (parse_header_extension_decl): New.
19302 (parse_source_extension_decl): New.
19303 (read_declarations): New case statements for the new tokens.
19304 * src/lex.c (percent_table): Add entries for %source_extension
19305 and %header_extension.
19306 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
19307
19308 2001-08-06 Marc Autret <autret_m@epita.fr>
19309
19310 * configure.in: Bump to 1.28c.
19311 * doc/bison.texinfo: Texinfo thingies.
19312
19313 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
19314
19315 * tests/atconfig.in (CPPFLAGS): Add.
19316 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
19317
19318 2001-08-03 Akim Demaille <akim@epita.fr>
19319
19320 Version 1.28b.
19321
19322 2001-08-03 Akim Demaille <akim@epita.fr>
19323
19324 * tests/Makefile.am (check-local): Ship testsuite.
19325 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
19326 Include `string.h'.
19327
19328 2001-08-03 Akim Demaille <akim@epita.fr>
19329
19330 * configure.in: Try using -Wformat when compiling.
19331
19332 2001-08-03 Akim Demaille <akim@epita.fr>
19333
19334 * configure.in: Bump to 1.28b.
19335
19336 2001-08-03 Akim Demaille <akim@epita.fr>
19337
19338 * src/complain.c: Adjust strerror_r portability issues.
19339
19340 2001-08-03 Akim Demaille <akim@epita.fr>
19341
19342 Version 1.28a.
19343
19344 2001-08-03 Akim Demaille <akim@epita.fr>
19345
19346 * src/getargs.c, src/getarg.h (skeleton)): Constify.
19347 * src/lex.c (literalchar): Avoid name clashes on `buf'.
19348 * src/getargs.c: Include complain.h.
19349 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
19350 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
19351
19352 2001-08-03 Akim Demaille <akim@epita.fr>
19353
19354 * src/reader.c (readgram): Display hidden chars in error messages.
19355
19356 2001-08-03 Akim Demaille <akim@epita.fr>
19357
19358 Update to gettext 0.10.39.
19359
19360 2001-08-03 Akim Demaille <akim@epita.fr>
19361
19362 * lib/strspn.c: New.
19363
19364 2001-08-01 Marc Autret <autret_m@epita.fr>
19365
19366 * doc/bison.texinfo: Update.
19367 * doc/bison.1 (mandoc): Update.
19368 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
19369 * src/files.c: Support output files extensions computing.
19370 (src_extension): New static variable.
19371 (header_extension): New static variable.
19372 (tr): New function.
19373 (get_extension_index): New function, gets the index of an extension
19374 filename in a string.
19375 (compute_exts_from_gf): New function, computes extensions from the
19376 grammar file extension.
19377 (compute_exts_from_src): New functions, computes extensions from the
19378 C source file extension, file given by ``-o'' option.
19379 (compute_base_names): Update.
19380 (output_files): Update.
19381
19382 2001-08-01 Robert Anisko <anisko_r@epita.fr>
19383
19384 * doc/bison.texi: Document @$.
19385 (Locations): New section.
19386
19387 2001-07-18 Akim Demaille <akim@epita.fr>
19388
19389 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
19390 * config/prev-version.txt, config/move-if-change: New.
19391 * Makefile.am: Adjust.
19392
19393 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
19394
19395 * src/bison.simple (yyparse): Suppress warning `comparaison
19396 between signed and unsigned'.
19397
19398 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
19399
19400 * src/getargs.h (raw_flag): Remove.
19401 * src/getargs.c: Die on `-r'/`--raw'.
19402 * src/lex.c (parse_percent_token): Die on `%raw'.
19403 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
19404 * tests/calc.at: Suppress test with option `--raw'.
19405
19406 2001-07-14 Akim Demaille <akim@epita.fr>
19407
19408 * config/: New.
19409 * configure.in: Require Autoconf 2.50.
19410 Update to gettext 0.10.38.
19411
19412 2001-03-16 Akim Demaille <akim@epita.fr>
19413
19414 * doc/bison.texinfo: ANSIfy the examples.
19415
19416 2001-03-16 Akim Demaille <akim@epita.fr>
19417
19418 * getargs.c (skeleton): New variable.
19419 (longopts): --skeleton is a new option.
19420 (shortopts, getargs): -S is a new option.
19421 * getargs.h: Declare skeleton.
19422 * output.c (output_parser): Use it.
19423
19424 2001-03-16 Akim Demaille <akim@epita.fr>
19425
19426 * m4/strerror_r.m4: New.
19427 * m4/error.m4: Run AC_FUNC_STRERROR_R.
19428 * lib/error.h, lib/error.c: Update.
19429
19430 2001-03-16 Akim Demaille <akim@epita.fr>
19431
19432 * src/getargs.c (longopts): Clean up.
19433
19434 2001-02-21 Akim Demaille <akim@epita.fr>
19435
19436 * src/reader.c (gensym): `gensym_count' is your own.
19437 Use a static buf to create the symbol name, as token_buffer is no
19438 longer a buffer.
19439
19440 2001-02-08 Akim Demaille <akim@epita.fr>
19441
19442 * src/conflicts.c (conflict_report): Be sure not to append to res
19443 between two calls, which could happen if both first sprintf were
19444 skipped, but not the first cp += strlen.
19445
19446 2001-02-08 Akim Demaille <akim@epita.fr>
19447
19448 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
19449 New, from fileutils 4.0.37.
19450 * configure.in: Require Autoconf 2.49c. I took some time before
19451 making this decision. This is the only way out for portability
19452 issues in Bison, it would mean way too much duplicate effort to
19453 import in Bison features implemented in 2.49c since 2.13.
19454 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
19455
19456 2001-02-02 Akim Demaille <akim@epita.fr>
19457
19458 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
19459 * lib/xalloc.h, lib/xmalloc.c: Update.
19460
19461 2001-01-19 Akim Demaille <akim@epita.fr>
19462
19463 Get rid of the ad hoc handling of token_buffer in the scanner: use
19464 the obstacks.
19465
19466 * src/lex.c (token_obstack): New.
19467 (init_lex): Initialize it. No longer call...
19468 (grow_token_buffer): this. Remove it.
19469 Adjust all the places which used it to use the obstack.
19470
19471 2001-01-19 Akim Demaille <akim@epita.fr>
19472
19473 * src/lex.h: Rename all the tokens:
19474 s/\bENDFILE\b/tok_eof/g;
19475 s/\bIDENTIFIER\b/tok_identifier/g;
19476 etc.
19477 Let them be enums, not #define, to ease debugging.
19478 Adjust all the code.
19479
19480 2001-01-18 Akim Demaille <akim@epita.fr>
19481
19482 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
19483 * src/lex.c (maxtoken, grow_token_buffer): Static.
19484
19485 2001-01-18 Akim Demaille <akim@epita.fr>
19486
19487 Since we now use obstacks, more % directives can be enabled.
19488
19489 * src/lex.c (percent_table): Also accept `%yacc',
19490 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
19491 `%debug'.
19492 Handle the actions for `%semantic_parser' and `%pure_parser' here,
19493 instead of returning a token.
19494 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
19495 * src/reader.c (read_declarations): Adjust.
19496 * src/files.c (open_files): Don't call `compute_base_names', don't
19497 compute `attrsfile' since they depend upon data which might be
19498 *in* the input file now.
19499 (output_files): Do it here.
19500 * src/output.c (output_headers): Document the fact that this patch
19501 introduces a guaranteed SEGV for semantic parsers.
19502 * doc/bison.texinfo: Document them.
19503 * tests/suite.at: Exercise these %options.
19504
19505 2000-12-20 Akim Demaille <akim@epita.fr>
19506
19507 Also handle the output file (--verbose) with obstacks.
19508
19509 * files.c (foutput): Remove.
19510 (output_obstack): New.
19511 Adjust all dependencies.
19512 * src/conflicts.c: Return a string.
19513 * src/system.h (obstack_grow_string): Rename as...
19514 (obstack_sgrow): this. Be ready to work with non literals.
19515 (obstack_fgrow4): New.
19516
19517 2000-12-20 Akim Demaille <akim@epita.fr>
19518
19519 * src/files.c (open_files): Fix the computation of short_base_name
19520 in the case of `-o foo.tab.c'.
19521
19522 2000-12-20 Akim Demaille <akim@epita.fr>
19523
19524 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
19525 (copy_dollar): Now that everything uses obstacks, get rid of the
19526 FILE * parameters.
19527
19528 2000-12-20 Akim Demaille <akim@epita.fr>
19529
19530 * src/files.c (open_files): Actually the `.output' file is based
19531 on the short_base_name, not base_name.
19532 * tests/suite.at (Checking output file names): Adjust.
19533
19534 2000-12-20 Akim Demaille <akim@epita.fr>
19535
19536 * src/bison.s1: Remove, we now use directly...
19537 * src/bison.simple: this.
19538 * src/Makefile.am: Use pkgdata instead of data.
19539
19540 2000-12-20 Akim Demaille <akim@epita.fr>
19541
19542 * src/files.c (guard_obstack): New.
19543 (open_files): Initialize it.
19544 (output_files): Dump it...
19545 * src/files.h: Export it.
19546 * src/reader.c (copy_guard): Use it.
19547
19548 2000-12-19 Akim Demaille <akim@epita.fr>
19549
19550 * src/files.c (outfile, defsfile, actfile): Removed as global
19551 vars.
19552 (open_files): Don't compute them.
19553 (output_files): Adjust.
19554 (base_name, short_base_name): Be global.
19555 Adjust dependencies.
19556
19557 2000-12-19 Akim Demaille <akim@epita.fr>
19558
19559 * src/files.c (strsuffix): New.
19560 (stringappend): Be just like strcat but allocate.
19561 (base_names): Eve out from open_files.
19562 Try to simplify the rather hairy computation of base_name and
19563 short_base_name.
19564 (open_files): Use it.
19565 * tests/suite.at (Checking output file names): New test.
19566
19567 2000-12-19 Akim Demaille <akim@epita.fr>
19568
19569 * src/system.h (obstack_grow_literal_string): Rename as...
19570 (obstack_grow_string): this.
19571 * src/output.c (output_parser): Recognize `%% actions' instead of
19572 `$'.
19573 * src/bison.s1: s/$/%% actions/.
19574 * src/bison.hairy: Likewise.
19575
19576 2000-12-19 Akim Demaille <akim@epita.fr>
19577
19578 * src/output.c (output_parser): Compute the `#line' lines when
19579 there are.
19580 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
19581 Suggested by Hans Aberg.
19582
19583 2000-12-19 Akim Demaille <akim@epita.fr>
19584
19585 Let the handling of the skeleton files be local to the procedures
19586 that use it.
19587
19588 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
19589 longer static.
19590 (fparser, open_extra_files): Remove.
19591 (open_files, output_files): Don't take care of fparser.
19592 * src/files.h: Adjust.
19593 * src/output.c (output_parser): Open and close the file to the
19594 skeleton.
19595 * src/reader.c (read_declarations): When %semantic_parser, open
19596 fguard.
19597
19598 2000-12-19 Akim Demaille <akim@epita.fr>
19599
19600 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
19601 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
19602
19603 2000-12-19 Akim Demaille <akim@epita.fr>
19604
19605 * src/files.c (open_files): Yipee! We no longer need all the code
19606 looking for `/tmp' since we have no tmp file.
19607
19608 2000-12-19 Akim Demaille <akim@epita.fr>
19609
19610 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
19611 New macros.
19612 * src/files.c (open_files): Less dependency on MSDOS etc.
19613
19614 2000-12-14 Akim Demaille <akim@epita.fr>
19615
19616 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
19617 Provide a default definition.
19618 Use it when executing the default @ action.
19619 * src/reader.c (reader_output_yylsp): No longer include
19620 `timestamp' and `text' in the default YYLTYPE.
19621
19622 2000-12-12 Akim Demaille <akim@epita.fr>
19623
19624 * src/reader.c (copy_definition, parse_union_decl, copy_action)
19625 (copy_guard): Quote the file names.
19626 Reported by Laurent Mascherpa.
19627
19628 2000-12-12 Akim Demaille <akim@epita.fr>
19629
19630 * src/output.c (output_headers, output_program, output): Be sure
19631 to escape special characters when outputting filenames.
19632 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
19633 (output_headers): Don't depend on them, Use ACTSTR.
19634
19635 2000-11-17 Akim Demaille <akim@epita.fr>
19636
19637 * lib/obstack.h: Formatting changes.
19638 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
19639 prevents type checking.
19640 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
19641 cast the value to (void *): assigning a `foo *' to a `void *'
19642 variable is valid.
19643 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
19644 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
19645 append characters.
19646
19647 2000-11-17 Akim Demaille <akim@epita.fr>
19648
19649 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
19650 as...
19651 (suite.m4, regression.m4, calc.m4): these.
19652 * tests/atgeneral.m4: Update from CVS Autoconf.
19653
19654 2000-11-17 Akim Demaille <akim@epita.fr>
19655
19656 * tests/regression.m4 (%union and --defines): New test,
19657 demonstrating a current bug in the obstack implementation.
19658
19659 2000-11-17 Akim Demaille <akim@epita.fr>
19660
19661 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
19662 macros.
19663 Use them to declare the variables which are global or local to
19664 `yyparse'.
19665
19666 2000-11-17 Akim Demaille <akim@epita.fr>
19667
19668 * acconfig.h: Remove, no longer used.
19669
19670 2000-11-07 Akim Demaille <akim@epita.fr>
19671
19672 * src: s/Copyright (C)/Copyright/g.
19673
19674 2000-11-07 Akim Demaille <akim@epita.fr>
19675
19676 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
19677 defining.
19678 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
19679
19680 2000-11-07 Akim Demaille <akim@epita.fr>
19681
19682 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
19683 Merge in a single CPP if/else.
19684
19685 2000-11-07 Akim Demaille <akim@epita.fr>
19686
19687 * src/output.c (output): Remove useless variables.
19688 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
19689 argument `data' for consistency with the prototypes.
19690 Qualify it `const'.
19691 (obstack_copy, obstack_copy0): Rename the second argument as
19692 `address' for consistency. Qualify it `const'.
19693 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
19694 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
19695 `const' their input argument (`data' or `address').
19696 Adjust the corresponding macros to include `const' in casts.
19697
19698 2000-11-03 Akim Demaille <akim@epita.fr>
19699
19700 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
19701 s/PFILE1/BISON_HAIRY/.
19702 Adjust dependencies.
19703
19704 2000-11-03 Akim Demaille <akim@epita.fr>
19705
19706 For some reason, this was not applied.
19707
19708 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
19709 `unlink': it's no longer used.
19710
19711 2000-11-03 Akim Demaille <akim@epita.fr>
19712
19713 * src/files.c (skeleton_find): New function, eved out of...
19714 (open_files, open_extra_files): here.
19715
19716 2000-11-03 Akim Demaille <akim@epita.fr>
19717
19718 Don't use `atexit'.
19719
19720 * src/files.c (obstack_save): New function.
19721 (done): Rename as...
19722 (output_files): this.
19723 Use `obstack_save'.
19724 * src/main.c (main): Don't use `atexit' to register `done', since
19725 it no longer has to remove tmp files, just call `output_files'
19726 when there are no errors.
19727
19728 2000-11-02 Akim Demaille <akim@epita.fr>
19729
19730 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
19731 `unlink': it's no longer used.
19732 * src/files.h: Formatting changes.
19733
19734 2000-11-02 Akim Demaille <akim@epita.fr>
19735
19736 Remove the last uses of mktemp and unlink/delete.
19737
19738 * src/files.c (fdefines, ftable): Removed.
19739 (defines_ostack, table_obstack): New.
19740 Adjust dependencies of the former into uses of the latter.
19741 * src/output.c (output_short_or_char_table, output_short_table):
19742 Convert to using obstacks.
19743 * src/reader.c (copy_comment2): Accept one FILE * and two
19744 obstacks.
19745 (output_token_defines, reader_output_yylsp): Use obstacks.
19746 * src/system.h (obstack_fgrow3): New.
19747 * po/POTFILES.in: Adjust.
19748
19749 2000-11-01 Akim Demaille <akim@epita.fr>
19750
19751 Change each use of `fattrs' into a use of `attrs_obstack'.
19752
19753 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
19754 * src/files.c (fattrs): Remove.
19755 (attrs_obstack): New.
19756 Adjust all dependencies.
19757 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
19758
19759 2000-11-01 Akim Demaille <akim@epita.fr>
19760
19761 Introduce obstacks.
19762 Change each use of `faction' into a use of `action_obstack'.
19763
19764 * lib/obstack.h, lib/obstack.c: New files.
19765 * src/files.c (faction): Remove.
19766 (action_obstack): New.
19767 Adjust all dependencies.
19768
19769 2000-10-20 Akim Demaille <akim@epita.fr>
19770
19771 * lib/quote.h (PARAMS): New macro. Use it.
19772
19773 2000-10-16 Akim Demaille <akim@epita.fr>
19774
19775 * src/output.c (output_short_or_char_table): New function.
19776 (output_short_table, output_token_translations): Use it.
19777 (goto_actions): Use output_short_table.
19778
19779 2000-10-16 Akim Demaille <akim@epita.fr>
19780
19781 * src/symtab.c (bucket_new): New function.
19782 (getsym): Use it.
19783
19784 * src/output.c (output_short_table): New argument to display the
19785 comment associated with the table.
19786 Adjust dependencies.
19787 (output_gram): Use it.
19788 (output_rule_data): Nicer output layout for YYTNAME.
19789
19790 2000-10-16 Akim Demaille <akim@epita.fr>
19791
19792 * src/lex.c (read_typename): New function.
19793 (lex): Use it.
19794 * src/reader.c (copy_dollar): Likewise.
19795
19796 2000-10-16 Akim Demaille <akim@epita.fr>
19797
19798 * src/reader.c (copy_comment2): Expect the input stream to be on
19799 the `/' which is suspected to open a comment, instead of being
19800 called after `//' or `/*' was read.
19801 (copy_comment, copy_definition, parse_union_decl, copy_action)
19802 (copy_guard): Adjust.
19803
19804 2000-10-16 Akim Demaille <akim@epita.fr>
19805
19806 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
19807 `read_signed_integer'.
19808
19809 2000-10-16 Akim Demaille <akim@epita.fr>
19810
19811 * src/reader.c (copy_dollar): New function.
19812 (copy_guard, copy_action): Use it.
19813
19814 2000-10-16 Akim Demaille <akim@epita.fr>
19815
19816 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
19817 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
19818 New files, from Fileutils 4.0.27.
19819 * src/main.c (printable_version): Remove.
19820 * src/lex.c, src/reader.c: Use `quote'.
19821
19822 2000-10-04 Akim Demaille <akim@epita.fr>
19823
19824 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
19825
19826 2000-10-04 Akim Demaille <akim@epita.fr>
19827
19828 * doc/bison.texinfo: Various typos spotted by Neil Booth.
19829
19830 2000-10-04 Akim Demaille <akim@epita.fr>
19831
19832 When a literal string is used to define two different tokens,
19833 `bison -v' segfaults.
19834 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
19835
19836 * tests/regression.m4: New file.
19837 Include the core of the sample provided by Piotr Gackiewicz.
19838 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
19839 properly.
19840
19841 2000-10-04 Akim Demaille <akim@epita.fr>
19842
19843 * src/reader.c (parse_expect_decl): Keep `count' within the size
19844 of `buffer'.
19845 From Neil Booth.
19846
19847 2000-10-02 Paul Eggert <eggert@twinsun.com>
19848
19849 * bison.s1 (yyparse): Assign the default value
19850 unconditionally, to avoid a GCC warning and make the parser a
19851 tad smaller.
19852
19853 2000-10-02 Akim Demaille <akim@epita.fr>
19854
19855 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
19856 options.
19857
19858 2000-10-02 Akim Demaille <akim@epita.fr>
19859
19860 * src/derives.c, src/print.c, src/reduce.c: To ease the
19861 translation, move some `\n' out of the translated strings.
19862
19863 2000-10-02 Akim Demaille <akim@epita.fr>
19864
19865 The location tracking mechanism is precious for parse error
19866 messages. Nevertheless, it is enabled only when `@n' is used in
19867 the grammar, which is a different issue (you can use it in error
19868 message, but not in the grammar per se). Therefore, there should
19869 be another means to enable it.
19870
19871 * src/getargs.c (getargs): Support `--locations'.
19872 (usage): Report it.
19873 * src/getargs.h (locationsflag): Export it.
19874 * src/lex.c (percent_table): Support `%locations'.
19875 * src/reader.c (yylsp_needed): Remove this variable, now replaced
19876 with `locationsflag'.
19877 * doc/bison.texinfo: Document `--locations' and `%locations'.
19878 Sort the options.
19879 * tests/calc.m4: Test it.
19880
19881 For regularity of the names, replace each
19882 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
19883 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
19884 In addition replace each `flag' with `_flag'.
19885
19886 2000-10-02 Akim Demaille <akim@epita.fr>
19887
19888 Also test parse error messages, including with YYERROR_VERBOSE.
19889
19890 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
19891 associative).
19892 Use it to check the computations.
19893 Use it to check `nonassoc' is honored.
19894 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
19895 `--yyerror-verbose'.
19896 (_AT_CHECK_CALC): Adjust to this option.
19897 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
19898
19899 2000-10-02 Akim Demaille <akim@epita.fr>
19900
19901 Test also `--verbose', `--defines' and `--name-prefix'. Testing
19902 the latter demonstrates a flaw in the handling of non debugging
19903 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
19904 was used in order to simplify:
19905
19906 #if YYDEBUG
19907 if (yydebug)
19908 {
19909 ...
19910 }
19911 #endif
19912
19913 into
19914
19915 if (yydebug)
19916 {
19917 ...
19918 }
19919
19920 unfortunately this leads to a CPP conflict when
19921 `--name-prefix=foo' is used since it produces `#define yydebug
19922 foodebug'.
19923
19924 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
19925 (YYDPRINTF): New macro.
19926 Spread its use.
19927 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
19928 the bison options.
19929 Also test `--verbose', `--defines' and `--name-prefix'.
19930
19931 2000-10-02 Akim Demaille <akim@epita.fr>
19932
19933 Improve the readability of the produced parsers.
19934
19935 * src/bison.s1: Formatting changes.
19936 Improve the comment related to the `$' mark.
19937 (yydefault): Don't fall through to `yyresume': `goto' there.
19938 * src/output.c (output_parser): When the `$' is met, skip the end
19939 of its line.
19940 New variable, `number_of_dollar_signs', to check there's exactly
19941 one `$' in the parser skeleton.
19942
19943 2000-10-02 Akim Demaille <akim@epita.fr>
19944
19945 * lib/xstrdup.c: New file, from the fileutils.
19946 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
19947 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
19948 instead of strlen + xmalloc + strcpy.
19949 * src/symtab.c (copys): Remove, use xstrdup instead.
19950
19951 2000-10-02 Akim Demaille <akim@epita.fr>
19952
19953 * src/gram.h (associativity): New enum type which replaces the
19954 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
19955 `right_assoc', `left_assoc' and `non_assoc'.
19956 Adjust all dependencies.
19957 * src/reader.c: Formatting changes.
19958 (LTYPESTR): Don't define it, use it as a literal in
19959 `reader_output_yylsp'.
19960 * src/symtab.h (symbol_class): New enum type which replaces the
19961 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
19962 `sunknown', `stoken and `snterm'.
19963
19964 2000-10-02 Akim Demaille <akim@epita.fr>
19965
19966 * src/getargs.c (fixed_outfiles): Rename as...
19967 (yaccflag): for consistency and accuracy.
19968 Adjust dependencies.
19969
19970 2000-10-02 Akim Demaille <akim@epita.fr>
19971
19972 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
19973 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
19974 difficult and introduced a lot of core dump. It turns out that
19975 Bison used an implementation of `xmalloc' based on `calloc', and
19976 at various places it does depend upon the initialization to 0. I
19977 have not tried to isolate the pertinent places, and all the former
19978 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
19979 someone should address this issue.
19980
19981 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
19982 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
19983 files.
19984 Adjust dependencies.
19985 * src/warshall.h: New file.
19986 Propagate.
19987
19988 2000-10-02 Akim Demaille <akim@epita.fr>
19989
19990 Various anti-`extern in *.c' changes.
19991
19992 * src/system.h: Include `assert.h'.
19993
19994 2000-10-02 Akim Demaille <akim@epita.fr>
19995
19996 * src/state.h (nstates, final_state, first_state, first_shift)
19997 (first_reduction): Move their exportation from here...
19998 * src/LR0.h: to here.
19999 Adjust dependencies.
20000 * src/getargs.c (statisticsflag): New variable.
20001 Add support for `--statistics'.
20002 Adjust dependencies.
20003
20004 Remove a lot of now useless `extern' statements in most files.
20005
20006 2000-10-02 Akim Demaille <akim@epita.fr>
20007
20008 * src/LR0.h: New file.
20009 Propagate its use.
20010
20011 2000-10-02 Akim Demaille <akim@epita.fr>
20012
20013 * src/print.h: New file.
20014 Propagate its use.
20015 * src/print.c: Formatting and ordering changes.
20016 (verbose, terse): Replace with...
20017 (print_results): this new function.
20018 Adjust dependencies.
20019
20020 2000-10-02 Akim Demaille <akim@epita.fr>
20021
20022 * src/conflicts.c (conflict_report): New function.
20023 (conflict_log, verbose_conflict_log): Replace with...
20024 (print_conflicts): this function.
20025 Adjust dependencies.
20026 * src/conflicts.h: New file.
20027 Propagate its inclusion.
20028
20029 2000-10-02 Akim Demaille <akim@epita.fr>
20030
20031 * src/nullable.h: New file.
20032 Propagate its inclusion.
20033 * src/nullable.c: Formatting changes.
20034
20035 2000-10-02 Akim Demaille <akim@epita.fr>
20036
20037 * src/reduce.h: New file.
20038 Propagate its inclusion.
20039 * src/reduce.c: Topological sort and other formatting changes.
20040 (bool, TRUE, FALSE): Move their definition to...
20041 * src/system.h: here.
20042
20043 2000-10-02 Akim Demaille <akim@epita.fr>
20044
20045 * src/files.c: Formatting changes.
20046 (tryopen, tryclose, openfiles): Rename as...
20047 (xfopen, xfclose, open_files): this.
20048 (stringappend): static.
20049 * src/files.h: Complete the list of exported symbols.
20050 Propagate its use.
20051
20052 2000-10-02 Akim Demaille <akim@epita.fr>
20053
20054 * src/reader.h: New file.
20055 Propagate its use instead of tedious list of `extern' and
20056 prototypes.
20057 * src/reader.c: Formatting changes, topological sort,
20058 s/register//.
20059
20060 2000-10-02 Akim Demaille <akim@epita.fr>
20061
20062 * src/lex.h: Prototype `lex.c' exported functions.
20063 * src/reader.c: Adjust.
20064 * src/lex.c: Formatting changes.
20065 (safegetc): Rename as...
20066 (xgetc): this.
20067
20068 2000-10-02 Akim Demaille <akim@epita.fr>
20069
20070 * src/lalr.h: New file.
20071 Propagate its inclusion instead of prototypes and `extern'.
20072 * src/lalr.c: Formatting changes, topological sorting etc.
20073
20074 2000-10-02 Akim Demaille <akim@epita.fr>
20075
20076 * src/output.c (token_actions): Introduce a temporary array,
20077 YYDEFACT, that makes it possible for this function to use
20078 output_short_table.
20079
20080 2000-10-02 Akim Demaille <akim@epita.fr>
20081
20082 `user_toknums' is output as a `short[]' in `output.c', while it is
20083 defined as a `int[]' in `reader.c'. For consistency with the
20084 other output tables, `user_toknums' is now defined as a table of
20085 shorts.
20086
20087 * src/reader.c (user_toknums): Be a short table instead of an int
20088 table.
20089 Adjust dependencies.
20090
20091 Factor the short table outputs.
20092
20093 * src/output.c (output_short_table): New function.
20094 * src/output.c (output_gram, output_stos, output_rule_data)
20095 (output_base, output_table, output_check): Use it.
20096
20097 2000-10-02 Akim Demaille <akim@epita.fr>
20098
20099 * src/output.c (output): Topological sort of the functions, in
20100 order to get rid of the `static' prototypes.
20101 No longer use `register'.
20102 * src/output.h: New file.
20103 Propagate its inclusion in files explicitly prototyping functions
20104 from output.c.
20105
20106 2000-09-21 Akim Demaille <akim@epita.fr>
20107
20108 * src/atgeneral.m4: Update from Autoconf.
20109
20110 2000-09-21 Akim Demaille <akim@epita.fr>
20111
20112 * src/closure.h: New file.
20113 * src/closure.c: Formatting changes, topological sort over the
20114 functions, use of closure.h.
20115 (initialize_closure, finalize_closure): Rename as...
20116 (new_closure, free_closure): these. Adjust dependencies.
20117 * src/LR0.c: Formatting changes, topological sort, use of
20118 cloture.h.
20119 (initialize_states): Rename as...
20120 (new_states): this.
20121 * src/Makefile.am (noinst_HEADERS): Adjust.
20122
20123 2000-09-20 Akim Demaille <akim@epita.fr>
20124
20125 * src/acconfig.h: Don't protect config.h against multiple
20126 inclusion.
20127 Don't define PARAMS.
20128 * src/system.h: Define PARAMS.
20129 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
20130 purpose of config.h. system.h must not try to fix wrong
20131 definitions in config.h.
20132
20133 2000-09-20 Akim Demaille <akim@epita.fr>
20134
20135 * src/derives.h: New file.
20136 * src/main.c, src/derives.h: Use it.
20137 Formatting changes.
20138 * src/Makefile.am (noinst_HEADERS): Adjust.
20139
20140 2000-09-20 Akim Demaille <akim@epita.fr>
20141
20142 * tests/atgeneral.m4: Update from Autoconf.
20143 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
20144 (AT_CHECK_CALC): New macros.
20145 Use these macros to test bison with options `', `--raw',
20146 `--debug', `--yacc', `--yacc --debug'.
20147
20148 2000-09-19 Akim Demaille <akim@epita.fr>
20149
20150 * src/output.c: Formatting changes.
20151 * src/machine.h: Remove, leaving its contents in...
20152 * src/system.h: here.
20153 Include stdio.h.
20154 Adjust all dependencies on stdio.h and machine.h.
20155 * src/getargs.h: New file.
20156 Let all `extern' declarations about getargs.c be replaced with
20157 inclusion of `getargs.h'.
20158 * src/Makefile.am (noinst_HEADERS): Adjust.
20159
20160 * tests/calc.m4 (yyin): Be initialized in main, not on the global
20161 scope.
20162 (yyerror): Returns void, not int.
20163 * doc/bison.texinfo: Formatting changes.
20164
20165 2000-09-19 Akim Demaille <akim@epita.fr>
20166
20167 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
20168 portable.
20169
20170 2000-09-18 Akim Demaille <akim@epita.fr>
20171
20172 * configure.in: Append WARNING_CFLAGS to CFLAGS.
20173 * src/Makefile.am (INCLUDES): Don't.
20174 Be ready to fetch headers in lib/.
20175
20176 2000-09-18 Akim Demaille <akim@epita.fr>
20177
20178 * doc/bison.texinfo: Update the copyright.
20179 ANSIfy and GNUify the examples.
20180 Remove the old menu.
20181
20182 2000-09-18 Akim Demaille <akim@epita.fr>
20183
20184 First set of tests: use the `calc' example from the documentation.
20185
20186 * src/bison.s1 (yyparse): Condition the code using `yytname' which
20187 is defined only when YYDEBUG is.
20188 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
20189 * src/files.c (tryopen, tryclose): Formatting changes.
20190 Move to the top and be static.
20191 * src/reader.c (read_signed_integer): Likewise.
20192 * tests/calc.m4: New file.
20193 * Makefile.am, suite.m4: Adjust.
20194 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
20195
20196 2000-09-18 Akim Demaille <akim@epita.fr>
20197
20198 Add support for an Autotest test suite for Bison.
20199
20200 * m4/m4.m4, m4/atconfig.m4: New files.
20201 * m4/Makefile.am (EXTRA_DIST): Adjust.
20202 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
20203 files.
20204 * src/getargs.c: Display a more standard --version message.
20205 * src/reader.c (reader): Formatting changes.
20206 No longer depend upon VERSION_STRING.
20207 * configure.in: No longer use `dnl'.
20208 Set up the test suite and the new directory `tests/.
20209 (VERSION_STRING): Remove.
20210
20211 2000-04-14 Akim Demaille <akim@epita.fr>
20212
20213 * src/reader.c (copy_comment2): New function, same as former
20214 `copy_comment', but outputs into two FILE *.
20215 (copy_comment): Use it.
20216 (parse_union_decl): Use it.
20217 (get_type, parse_start_decl): Use the same `invalid' message.
20218 (parse_start_decl, parse_union_decl): Use the same `multiple'
20219 message.
20220 (parse_union_decl, copy_guard, copy_action): Use the same
20221 `unmatched' message.
20222 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
20223
20224 2000-03-31 Akim Demaille <akim@epita.fr>
20225
20226 * src/files.c (tryopen, tryclose): Move to the top.
20227 Be static.
20228
20229 2000-03-31 Akim Demaille <akim@epita.fr>
20230
20231 * src/main.c (main): Don't call `done', exit does it.
20232
20233 2000-03-31 Akim Demaille <akim@epita.fr>
20234
20235 * allocate.c: s/return (foo)/return foo/.
20236 * lalr.c: Likewise.
20237 * LR0.c: Likewise.
20238 * output.c: Likewise.
20239 * reader.c: Likewise.
20240 * symtab.c: Likewise.
20241 * vmsgetargs.c: Likewise.
20242
20243 2000-03-31 Akim Demaille <akim@epita.fr>
20244
20245 Clean up the error reporting functions.
20246
20247 * src/report.c: New file.
20248 * src/report.h: Likewise.
20249 * src/Makefile.am: Adjust.
20250 * m4/error.m4: New file.
20251 * m4/Makefile.am: Adjust.
20252 * configure.in (jm_PREREQ_ERROR): Call it.
20253 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
20254 Remove.
20255 (fatal, fatals): Remove. All callers use complain.c::fatal.
20256 (warn, warni, warns, warnss, warnss): Remove. All callers use
20257 complain.c::complain.
20258 (toomany): Remove, use fatal instead.
20259 * src/files.c (done): No argument, use complain_message_count.
20260 * src/main.c (main): Register `done' to `atexit'.
20261
20262 * src/getargs.c (usage): More `fputs', less `fprintf'.
20263
20264 2000-03-28 Akim Demaille <akim@epita.fr>
20265
20266 * lib/: New directory.
20267 * Makefile.am (SUBDIRS): Adjust.
20268 * configure.in: Adjust.
20269 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
20270 useless.
20271 * src/alloca.c: Moved to lib/.
20272 * src/getopt.c: Likewise.
20273 * src/getopt1.c: Likewise.
20274 * src/getopt.h: Likewise.
20275 * src/ansi2knr.c: Likewise.
20276 * src/ansi2knr.1: Likewise.
20277 * src/Makefile.am: Adjust.
20278 * lib/Makefile.am: New file.
20279
20280 2000-03-28 Akim Demaille <akim@epita.fr>
20281
20282 * src/getargs.c (usage): Refresh the help message.
20283
20284 2000-03-17 Akim Demaille <akim@epita.fr>
20285
20286 * src/getopt1.c: Updated from textutils 2.0e
20287 * src/getopt.c: Likewise.
20288 * src/getopt.h: Likewise.
20289
20290 2000-03-17 Akim Demaille <akim@epita.fr>
20291
20292 * src/Makefile.am (bison.simple): Fix the awk program: quote only
20293 the file name, not the whole `#line LINE FILE'.
20294
20295 2000-03-17 Akim Demaille <akim@epita.fr>
20296
20297 On syntax errors, report the token on which we choked.
20298
20299 * src/bison.s1 (yyparse): In the label yyerrlab, when
20300 YYERROR_VERBOSE, add yychar in msg.
20301
20302 2000-03-17 Akim Demaille <akim@epita.fr>
20303
20304 * src/reader.c (copy_at): New function.
20305 (copy_guard): Use it.
20306 (copy_action): Use it.
20307
20308 2000-03-17 Akim Demaille <akim@epita.fr>
20309
20310 Be kind to translators, save some useless translations.
20311
20312 * src/main.c (banner): New function.
20313 (fatal_banner): Use it.
20314 (warn_banner): Use it.
20315
20316 2000-03-17 Akim Demaille <akim@epita.fr>
20317
20318 * src/reader.c (copy_definition): Use copy_string and
20319 copy_comment. Removed now unused `match', `ended',
20320 `cplus_comment'.
20321 (copy_comment, copy_string): Moved, to be visible from
20322 copy_definition.
20323
20324 2000-03-17 Akim Demaille <akim@epita.fr>
20325
20326 * src/reader.c (copy_string): Declare `static inline'. No
20327 problems with inline, since it is checked by configure.
20328 (copy_comment): Likewise.
20329
20330 2000-03-17 Akim Demaille <akim@epita.fr>
20331
20332 * src/reader.c (packsymbols): Formatting changes.
20333
20334 2000-03-17 Akim Demaille <akim@epita.fr>
20335
20336 * src/reader.c (copy_comment): New function, factored out from:
20337 (copy_action): Use it. Removed now unused `match', `ended',
20338 `cplus_comment'.
20339 (copy_guard): Likewise.
20340
20341 2000-03-17 Akim Demaille <akim@epita.fr>
20342
20343 * src/reader.c (copy_string): New function, factored out from:
20344 (copy_action): Use it.
20345 (copy_guard): Likewise.
20346
20347 2000-03-17 Akim Demaille <akim@epita.fr>
20348
20349 Change the handling of @s so that they behave exactly like $s.
20350 There is now a pseudo variable @$ (readble and writable), location
20351 of the lhs of the rule (by default ranging from the location of
20352 the first symbol of the rhs, to the location of the last symbol,
20353 or, if the rhs is empty, YYLLOC).
20354
20355 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
20356 yyval.
20357 (yyparse): When providing a default semantic action, provide a
20358 default location action.
20359 (after the $): No longer change `*YYLSP', just stack YYLOC the
20360 same way you stack YYVAL.
20361 * src/reader.c (read_declarations): Use warns.
20362 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
20363 (copy_action, case '@'): Likewise.
20364 Use a standard error message, to save useless work from
20365 translators.
20366
20367 2000-03-17 Akim Demaille <akim@epita.fr>
20368
20369 * src/bison.s1: Formatting and cosmetics changes.
20370 * src/reader.c: Likewise.
20371 Update the Copyright notice.
20372
20373 2000-03-17 Akim Demaille <akim@epita.fr>
20374
20375 * src/bison.s1 (#line): All set to `#line' only, since the
20376 Makefile now handles them.
20377
20378 2000-03-16 Akim Demaille <akim@epita.fr>
20379
20380 * src/output.c (output_rule_data): Output the documentation of
20381 some of the tables.
20382 (Copyright notice): Update.
20383 Formatting changes.
20384
20385 2000-03-16 Akim Demaille <akim@epita.fr>
20386
20387 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
20388 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
20389 One `#if YYDEBUG' remains, since it uses variables which are
20390 defined only if `YYDEBUG != 0'.
20391
20392 2000-03-16 Akim Demaille <akim@epita.fr>
20393
20394 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
20395 and related variables so that the similarities are highlighted.
20396
20397 2000-03-16 Akim Demaille <akim@epita.fr>
20398
20399 * src/bison.s1: Properly indent CPP directives.
20400
20401 2000-03-16 Akim Demaille <akim@epita.fr>
20402
20403 * src/bison.s1: Properly indent the `alloca' CPP section.
20404
20405 2000-03-16 Akim Demaille <akim@epita.fr>
20406
20407 Do not hard code values of directories in `configure.in'.
20408 Update the `configure' tool chain.
20409
20410 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
20411 src/makefile.am.
20412 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
20413 (AC_OUTPUT): Add m4/Makefile.
20414 Bump to bison 1.28a, 1.29 has never been released.
20415 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
20416 handled via src/Makefile.am.
20417 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
20418 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
20419 autoheader.
20420 * Makefile.am (SUBDIRS): Add m4.
20421 (ACLOCAL_AM_FLAGS): New variable.
20422 (AUTOMAKE_OPTIONS): Add check-news.
20423 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
20424 the proper line number and file name.
20425 (DEFS): Propagate the location of bison library files and of the
20426 locale files.
20427 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
20428 builddir.
20429 * acinclude.m4: Remove, replaced by the directory m4.
20430 * m4/Makefile.am (EXTRA_DIST): New variable.
20431 * m4/gettext.m4: New file, from the fileutils.
20432 * m4/lcmessage.m4: Likewise
20433 * m4/progtest.m4: Likewise.
20434 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
20435
20436 2000-03-10 Akim Demaille <akim@epita.fr>
20437
20438 * src/closure.c:
20439 Formatting changes of various comments.
20440 Respect the GNU coding standards at various places.
20441 Don't use `_()' when no translation is needed.
20442
20443 1999-12-13 Jesse Thilo <jthilo@gnu.org>
20444
20445 * src/files.c:
20446 OS/2 honors TMPDIR environment variable.
20447
20448 1999-12-13 Jesse Thilo <jthilo@gnu.org>
20449
20450 * doc/bison.texinfo: Tweaked spelling and grammar.
20451 Updated ISBN.
20452 Removed reference to price of printed copy.
20453 Mention BISON_SIMPLE and BISON_HAIRY.
20454
20455 1999-12-13 Jesse Thilo <jthilo@gnu.org>
20456
20457 * configure.in, NEWS:
20458 Bison 1.29 released.
20459
20460 1999-10-27 Jesse Thilo <jthilo@gnu.org>
20461
20462 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
20463 Added reference card.
20464
20465 1999-07-26 Jesse Thilo <jthilo@gnu.org>
20466
20467 * po/ru.po: Added Russian translation.
20468
20469 1999-07-26 Jesse Thilo <jthilo@gnu.org>
20470
20471 * configure.in: Added Russian translation.
20472
20473 1999-07-06 Jesse Thilo <jthilo@gnu.org>
20474
20475 * configure.in, NEWS, README:
20476 Released version 1.28.
20477
20478 1999-06-14 Jesse Thilo <jthilo@gnu.org>
20479
20480 * src/system.h:
20481 Squashed redefinition warning on some systems.
20482
20483 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
20484 Have configure build version string instead of relying on ANSI string
20485 concatentation.
20486
20487 1999-06-14 Jesse Thilo <jthilo@gnu.org>
20488
20489 * po/POTFILES.in: Got rid of version.c.
20490
20491 1999-06-14 Jesse Thilo <jthilo@gnu.org>
20492
20493 * acconfig.h, configure.in:
20494 Have configure build version string instead of relying on ANSI string
20495 concatentation.
20496
20497 1999-06-08 Jesse Thilo <jthilo@gnu.org>
20498
20499 * doc/bison.1:
20500 Dropped mention of `+' for long-named options.
20501
20502 1999-05-30 Jesse Thilo <jthilo@gnu.org>
20503
20504 * src/files.c: Added <unistd.h> for unlink().
20505
20506 * src/Makefile.am, src/system.h:
20507 I18n fixes.
20508
20509 1999-05-30 Jesse Thilo <jthilo@gnu.org>
20510
20511 * README: Added a FAQ list.
20512
20513 * configure.in, acconfig.h:
20514 I18n fixes.
20515
20516 1999-05-30 Jesse Thilo <jthilo@gnu.org>
20517
20518 * doc/FAQ, doc/Makefile.am:
20519 Added a FAQ list.
20520
20521 1999-05-19 Jesse Thilo <jthilo@gnu.org>
20522
20523 * src/alloc.h, src/symtab.h, src/version.c:
20524 Protected inclusion of "config.h" with HAVE_CONFIG_H.
20525
20526 1999-04-18 Jesse Thilo <jthilo@gnu.org>
20527
20528 * src/.cvsignore, src/Makefile.am:
20529 Reorganized: sources in `src', documentation in `doc'.
20530
20531 * src/lex.c (literalchar):
20532 fixed the code for escaping double quotes (thanks
20533 Jonathan Czisny.)
20534
20535 1999-04-18 Jesse Thilo <jthilo@gnu.org>
20536
20537 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
20538 Adjusted paths to reflect directory reorganization.
20539
20540 1999-04-18 Jesse Thilo <jthilo@gnu.org>
20541
20542 * doc/.cvsignore, doc/Makefile.am:
20543 Reorganized: sources in `src', documentation in `doc'.
20544
20545 1999-04-18 Jesse Thilo <jthilo@gnu.org>
20546
20547 * configure.in:
20548 Updated AC_INIT file to reflect directory reorganization.
20549
20550 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
20551 Reorganized: sources in `src', documentation in `doc'.
20552
20553 1999-04-13 Jesse Thilo <jthilo@gnu.org>
20554
20555 * src/allocate.c:
20556 Don't declare calloc() and realloc() if not necessary.
20557
20558 1999-04-13 Jesse Thilo <jthilo@gnu.org>
20559
20560 * configure.in, acconfig.h, acinclude.m4:
20561 Don't declare calloc() and realloc() if not necessary.
20562
20563 1999-03-23 Jesse Thilo <jthilo@gnu.org>
20564
20565 * po/.cvsignore: Added i18n support.
20566
20567 1999-03-23 Jesse Thilo <jthilo@gnu.org>
20568
20569 * acconfig.h, configure.in, Makefile.am:
20570 Added i18n support.
20571
20572 1999-03-22 Jesse Thilo <jthilo@gnu.org>
20573
20574 * src/bison.s1: Fixed #line numbers.
20575
20576 1999-03-15 Jesse Thilo <jthilo@gnu.org>
20577
20578 * po/es.po, po/fr.po, po/nl.po, po/de.po:
20579 Added PO files from Translation Project.
20580
20581 1999-03-03 Jesse Thilo <jthilo@gnu.org>
20582
20583 * Makefile.am:
20584 Added support for non-ANSI compilers (ansi2knr).
20585
20586 1999-02-16 Jesse Thilo <jthilo@gnu.org>
20587
20588 * configure.in: Bumped version number to 1.27.
20589
20590 * Makefile.am:
20591 Added `bison.simple' to list of files removed by `make distclean'.
20592
20593 1999-02-12 Jesse Thilo <jthilo@gnu.org>
20594
20595 * src/files.c, src/files.h:
20596 Defined locations of parser files in config.h instead of Makefile.
20597
20598 1999-02-12 Jesse Thilo <jthilo@gnu.org>
20599
20600 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
20601 Defined locations of parser files in config.h instead of Makefile.
20602
20603 1999-02-09 Jesse Thilo <jthilo@gnu.org>
20604
20605 * Makefile.am:
20606 Removed inappropriate use of $< macro.
20607
20608 1999-02-05 Jesse Thilo <jthilo@gnu.org>
20609
20610 * po/Makefile.in.in, po/POTFILES.in:
20611 Add `po' directory skeleton.
20612
20613 1999-01-27 Jesse Thilo <jthilo@gnu.org>
20614
20615 * README: Document help-bison list.
20616
20617 * configure.in: Add check for mkstemp().
20618
20619 1999-01-20 Jesse Thilo <jthilo@gnu.org>
20620
20621 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
20622 Hush a few compiler warnings.
20623
20624 * src/files.c:
20625 Add tryclose(), which verifies that fclose was successful.
20626 Hush a couple of compiler warnings.
20627
20628 1999-01-20 Jesse Thilo <jthilo@gnu.org>
20629
20630 * Makefile.am, OChangeLog:
20631 ChangeLog is now automatically generated. Include the old version as
20632 OChangeLog.
20633
20634 1999-01-14 Jesse Thilo <jthilo@gnu.org>
20635
20636 * 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:
20637 Update FSF address.
20638
20639 1999-01-14 Jesse Thilo <jthilo@gnu.org>
20640
20641 * doc/bison.texinfo: Fix formatting glitch.
20642
20643 * doc/bison.texinfo: Update FSF address.
20644
20645 1999-01-14 Jesse Thilo <jthilo@gnu.org>
20646
20647 * acconfig.h: Update FSF address.
20648
20649 1999-01-08 Jesse Thilo <jthilo@gnu.org>
20650
20651 * src/system.h:
20652 Don't define PACKAGE here, since config.h defines it.
20653
20654 1998-12-30 Jesse Thilo <jthilo@gnu.org>
20655
20656 * src/reader.c: Update copyright date.
20657
20658 * src/main.c:
20659 Ditch sprintf to statically-sized buffers in fatal/warn functions in
20660 favor of output directly to stderr (avoids buffer overruns).
20661
20662 * src/reader.c: Some checks for premature EOF.
20663
20664 * 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:
20665 Use prototypes if the compiler understands them.
20666
20667 * src/files.c: Honor TMPDIR on Unix hosts.
20668 Use prototypes if the compiler understands them.
20669
20670 * src/reader.c:
20671 Fix a couple of buffer overrun bugs.
20672 Use prototypes if the compiler understands them.
20673
20674 * src/system.h: Include unistd.h and ctype.h.
20675 Use #ifdef instead of #if for NLS symbols.
20676
20677 1998-12-30 Jesse Thilo <jthilo@gnu.org>
20678
20679 * doc/bison.texinfo:
20680 Delete comment "consider using @set for edition number, etc..." since
20681 we now are doing so.
20682
20683 1998-12-30 Jesse Thilo <jthilo@gnu.org>
20684
20685 * configure.in:
20686 Use prototypes if the compiler understands them.
20687
20688 * NEWS: Document 1.26 highlights.
20689
20690 * Makefile.am: Require Automake 1.3 or later.
20691
20692 * acconfig.h:
20693 Use prototypes if the compiler understands them.
20694
20695 1998-12-29 Jesse Thilo <jthilo@gnu.org>
20696
20697 * src/version.c:
20698 Use VERSION symbol from automake for version number.
20699
20700 1998-12-29 Jesse Thilo <jthilo@gnu.org>
20701
20702 * acconfig.h, configure.in, version.cin:
20703 Use VERSION symbol from automake for version number.
20704
20705 1998-11-28 Jesse Thilo <jthilo@gnu.org>
20706
20707 * Makefile.am:
20708 Distribute original version of simple parser (bison.s1), not built
20709 version (bison.simple).
20710
20711 1998-11-28 Jesse Thilo <jthilo@gnu.org>
20712
20713 * doc/bison.texinfo: Add info dir entry.
20714
20715 * doc/bison.texinfo:
20716 Let automake put version number into documentation.
20717
20718 1998-11-26 Jesse Thilo <jthilo@gnu.org>
20719
20720 * src/bison.cld, src/build.com, src/vmshlp.mar:
20721 Add non-RCS files from /gd/gnu/bison.
20722
20723 1998-11-26 Jesse Thilo <jthilo@gnu.org>
20724
20725 * doc/bison.1:
20726 Document the BISON_HAIRY and BISON_SIMPLE variables.
20727
20728 1998-11-25 Jesse Thilo <jthilo@gnu.org>
20729
20730 * src/version.c: Build version.c automatically.
20731
20732 * src/reader.c:
20733 Fix token numbering (used to start at 258, not 257).
20734
20735 * src/system.h: Include config.h.
20736
20737 * src/getargs.c: Update bug report address.
20738
20739 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
20740 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
20741
20742 1998-11-25 Jesse Thilo <jthilo@gnu.org>
20743
20744 * Makefile.am:
20745 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
20746
20747 * configure.in, version.cin:
20748 Build version.c automatically.
20749
20750 * AUTHORS: Add AUTHORS file.
20751
20752 * README: Update bug report address.
20753
20754 * bison.simple:
20755 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
20756
20757 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
20758 Add automake stuff.
20759
20760 1998-11-25 Jesse Thilo <jthilo@gnu.org>
20761
20762 * doc/bison.texinfo: Clean up some formatting.
20763
20764 1998-05-05 Richard Stallman <rms@gnu.org>
20765
20766 * doc/bison.texinfo:
20767 Explain better why to make a pure parser.
20768
20769 1998-01-05 Richard Stallman <rms@gnu.org>
20770
20771 * src/files.c (openfiles):
20772 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
20773 find a temporary directory, if possible. Do not unlink files while
20774 they are open.
20775
20776 1997-08-25 Richard Stallman <rms@gnu.org>
20777
20778 * src/reader.c (stack_offset;):
20779 Change some warni to warns.
20780
20781 * src/lex.c (literalchar): Use warns, not warni.
20782
20783 1997-06-28 Richard Stallman <rms@gnu.org>
20784
20785 * src/bison.s1: Add a Bison version comment.
20786
20787 * src/main.c (fatal, warn, berror):
20788 Use program_name.
20789
20790 1997-06-28 Richard Stallman <rms@gnu.org>
20791
20792 * Makefile.in (bison_version): New variable.
20793 (dist): Use that variable.
20794 (bison.s1): Substitute the Bison version into bison.simple.
20795
20796 * bison.simple: Add a Bison version comment.
20797
20798 1997-06-18 Richard Stallman <rms@gnu.org>
20799
20800 * src/main.c (fatal, warn, berror):
20801 Make error messages standard.
20802 (toomany): Improve error message text.
20803
20804 * 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:
20805 new.h renamed to alloc.h.
20806
20807 1997-06-18 Richard Stallman <rms@gnu.org>
20808
20809 * Makefile.in: new.h renamed to alloc.h.
20810
20811 1997-05-24 Richard Stallman <rms@gnu.org>
20812
20813 * src/lex.c (literalchar):
20814 Fix the code for escaping \, " and '.
20815
20816 (lex): Avoid trouble when there are many chars
20817 to discard in a char literal with just several chars in it.
20818
20819 1997-05-17 Richard Stallman <rms@gnu.org>
20820
20821 * src/bison.s1:
20822 Use malloc, if using alloca is troublesome.
20823 (YYSTACK_USE_ALLOCA): New flag macro.
20824 Define it for some systems and compilers.
20825 (YYSTACK_ALLOC): New macro.
20826 (yyparse): Use YYSTACK_ALLOC to allocate stack.
20827 If it was malloc'd, free it.
20828
20829 1997-05-17 Richard Stallman <rms@gnu.org>
20830
20831 * bison.simple:
20832 Use malloc, if using alloca is troublesome.
20833 (YYSTACK_USE_ALLOCA): New flag macro.
20834 Define it for some systems and compilers.
20835 (YYSTACK_ALLOC): New macro.
20836 (yyparse): Use YYSTACK_ALLOC to allocate stack.
20837 If it was malloc'd, free it.
20838
20839 1997-04-23 Richard Stallman <rms@gnu.org>
20840
20841 * src/bison.s1:
20842 (alloca) [__hpux]: Always define as __builtin_alloca.
20843
20844 1997-04-23 Richard Stallman <rms@gnu.org>
20845
20846 * bison.simple:
20847 (alloca) [__hpux]: Always define as __builtin_alloca.
20848
20849 1997-04-22 Richard Stallman <rms@gnu.org>
20850
20851 * src/bison.s1:
20852 [__hpux]: Include alloca.h (right for HPUX 10)
20853 instead of declaring alloca (right for HPUX 9).
20854
20855 * src/bison.s1 (__yy_memcpy):
20856 Declare arg `count' as unsigned int.
20857 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
20858
20859 1997-04-22 Richard Stallman <rms@gnu.org>
20860
20861 * bison.simple:
20862 [__hpux]: Include alloca.h (right for HPUX 10)
20863 instead of declaring alloca (right for HPUX 9).
20864
20865 * bison.simple (__yy_memcpy):
20866 Declare arg `count' as unsigned int.
20867 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
20868
20869 1997-01-03 Richard Stallman <rms@gnu.org>
20870
20871 * src/allocate.c: [__STDC__ or _MSC_VER]:
20872 Declare calloc and realloc to return void *.
20873
20874 1997-01-02 Richard Stallman <rms@gnu.org>
20875
20876 * src/system.h:
20877 [_MSC_VER]: Include stdlib.h and process.h.
20878 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
20879
20880 * src/main.c (main): Return FAILURE as a value.
20881 (printable_version): Declare arg as int, not char.
20882
20883 1997-01-02 Richard Stallman <rms@gnu.org>
20884
20885 * Makefile.in (dist):
20886 Explicitly check for symlinks, and copy them.
20887
20888 1996-12-19 Richard Stallman <rms@gnu.org>
20889
20890 * src/files.c:
20891 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
20892
20893 1996-12-18 Paul Eggert <eggert@gnu.org>
20894
20895 * src/bison.s1 (yyparse):
20896 If __GNUC__ and YYPARSE_PARAM are both defined,
20897 declare yyparse to have a void * argument.
20898
20899 1996-12-18 Paul Eggert <eggert@gnu.org>
20900
20901 * bison.simple (yyparse):
20902 If __GNUC__ and YYPARSE_PARAM are both defined,
20903 declare yyparse to have a void * argument.
20904
20905 1996-12-17 Richard Stallman <rms@gnu.org>
20906
20907 * src/reduce.c (nbits): Add some casts.
20908
20909 1996-08-12 Richard Stallman <rms@gnu.org>
20910
20911 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
20912
20913 1996-08-12 Richard Stallman <rms@gnu.org>
20914
20915 * bison.simple: Test _MSDOS as well as _MSDOS_.
20916
20917 1996-07-31 Richard Stallman <rms@gnu.org>
20918
20919 * src/bison.s1:
20920 [__sun && __i386]: Include alloca.h.
20921
20922 1996-07-31 Richard Stallman <rms@gnu.org>
20923
20924 * bison.simple:
20925 [__sun && __i386]: Include alloca.h.
20926
20927 1996-07-30 Richard Stallman <rms@gnu.org>
20928
20929 * src/bison.s1: Comment change.
20930
20931 * src/bison.s1: Test _MSDOS_, not MSDOS.
20932
20933 1996-07-30 Richard Stallman <rms@gnu.org>
20934
20935 * bison.simple: Comment change.
20936
20937 * bison.simple: Test _MSDOS_, not MSDOS.
20938
20939 1996-06-01 Richard Stallman <rms@gnu.org>
20940
20941 * 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:
20942 Insert `_' macro around many string constants.
20943
20944 * src/main.c:
20945 Insert `_' macro around many string constants.
20946
20947 (main): Call setlocale, bindtextdomain and textdomain.
20948
20949 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
20950 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
20951 [ENABLE_NLS]: Include libintl.h.
20952 [ENABLE_NLS] (gettext): Define.
20953 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
20954 (N_, PACKAGE, LOCALEDIR): New macros.
20955
20956 1996-06-01 Richard Stallman <rms@gnu.org>
20957
20958 * POTFILES.in: New file.
20959
20960 * Makefile.in (allocate.o):
20961 Define target explicitly.
20962
20963 * Makefile.in (CFLAGS): Set to @CFLAGS@.
20964 (LDFLAGS): Set to @LDFLAGS@.
20965 (configure): Run autoconf only if preceding `cd' succeeds.
20966 (bison.s1): Redirect output to temporary file then move the
20967 temporary to the target, rather than redirecting directly to bison.s1.
20968 (clean): Remove config.status and config.log.
20969 (distclean): Don't remove config.status here.
20970
20971 1996-05-12 Richard Stallman <rms@gnu.org>
20972
20973 * src/bison.s1:
20974 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20975
20976 1996-05-12 Richard Stallman <rms@gnu.org>
20977
20978 * bison.simple:
20979 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20980
20981 1996-05-11 Richard Stallman <rms@gnu.org>
20982
20983 * src/bison.s1 (__yy_memcpy):
20984 Really reorder the args, as was supposedly done on Feb 14 1995.
20985 (yyparse): Calls changed accordingly.
20986
20987 1996-05-11 Richard Stallman <rms@gnu.org>
20988
20989 * Makefile.in (dist): Don't use $(srcdir).
20990
20991 * bison.simple (__yy_memcpy):
20992 Really reorder the args, as was supposedly done on Feb 14 1995.
20993 (yyparse): Calls changed accordingly.
20994
20995 1996-01-27 Richard Stallman <rms@gnu.org>
20996
20997 * src/output.c (output_rule_data):
20998 Test YYERROR_VERBOSE in the conditional
20999 around the definition of ttyname.
21000
21001 1995-12-29 Richard Stallman <rms@gnu.org>
21002
21003 * src/bison.s1:
21004 Fix line numbers in #line commands.
21005
21006 1995-12-29 Richard Stallman <rms@gnu.org>
21007
21008 * bison.simple:
21009 Fix line numbers in #line commands.
21010
21011 1995-12-27 Richard Stallman <rms@gnu.org>
21012
21013 * src/bison.s1 (YYPARSE_PARAM_DECL):
21014 In C++, make it always null.
21015 (YYPARSE_PARAM_ARG): New macro.
21016 (yyparse): Use YYPARSE_PARAM_ARG.
21017
21018 1995-12-27 Richard Stallman <rms@gnu.org>
21019
21020 * bison.simple (YYPARSE_PARAM_DECL):
21021 In C++, make it always null.
21022 (YYPARSE_PARAM_ARG): New macro.
21023 (yyparse): Use YYPARSE_PARAM_ARG.
21024
21025 1995-11-29 Richard Stallman <rms@gnu.org>
21026
21027 * doc/bison.texinfo:
21028 Describe literal string tokens, %raw, %no_lines, %token_table.
21029
21030 1995-11-29 Daniel Hagerty <hag@gnu.org>
21031
21032 * doc/bison.texinfo: Fixed update date
21033
21034 1995-10-16 Richard Stallman <rms@gnu.org>
21035
21036 * src/version.c: Version 1.25.
21037
21038 1995-10-16 Richard Stallman <rms@gnu.org>
21039
21040 * NEWS: *** empty log message ***
21041
21042 1995-10-16 Richard Stallman <rms@gnu.org>
21043
21044 * doc/bison.1, doc/bison.rnh:
21045 Add new options.
21046
21047 1995-10-15 Richard Stallman <rms@gnu.org>
21048
21049 * src/vmsgetargs.c, src/getargs.c:
21050 Added -n, -k, and -raw switches.
21051 (noparserflag, toknumflag, rawtoknumflag): New variables.
21052
21053 * src/symtab.h (SALIAS):
21054 New #define for adding aliases to %token.
21055 (struct bucket): Added `alias' field.
21056
21057 * src/reduce.c (reduce_grammar):
21058 Revise error message.
21059 (print_notices): Remove final `.' from error message.
21060
21061 * src/reader.c (reader_output_yylsp):
21062 New function.
21063 (readgram): Use `#if 0' around code that accepted %command
21064 inside grammar rules: The documentation doesn't allow it,
21065 and it will fail since the %command processors scan for the next %.
21066 (parse_token_decl): Extended the %token
21067 declaration to allow a multi-character symbol as an alias.
21068 (parse_thong_decl): New function.
21069 (read_declarations): Added %thong declarations.
21070 (read_declarations): Handle NOOP to deal with allowing
21071 % declarations as another means to specify the flags.
21072 (readgram): Allow %prec prior to semantics embedded in a rule.
21073 (skip_to_char, read_declarations, copy_definition)
21074 (parse_token_decl, parse_start_decl, parse_type_decl)
21075 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
21076 (get_type_name, copy_guard, copy_action, readgram)
21077 (get_type, packsymbols): Revised most error messages.
21078 Changed `fatal' to `warnxxx' to avoid aborting for error.
21079 Revised and use multiple warnxxx functions to avoid using VARARGS1.
21080 (read_declarations): Improve the error message for
21081 an invalid character. Do not abort.
21082 (read_declarations, copy_guard, copy_action): Use
21083 printable_version to avoid unprintable characters in printed output.
21084 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
21085 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
21086 Allow the type of a non-terminal can be given
21087 more than once, as long as all specifications give the same type.
21088
21089 * src/output.c:
21090 (output_headers, output_trailers, output, output_gram)
21091 (output_rule_data): Implement noparserflag variable.
21092 Implement toknumflag variable.
21093 (output): Call reader_output_yylsp to output LTYPESTR.
21094
21095 * src/main.c (main):
21096 If reader sees an error, don't process the grammar.
21097 (fatals): Updated to not use VARARGS1.
21098 (printable_version, int_to_string, warn, warni, warns, warnss)
21099 (warnsss): New error reporting functions. Avoid abort for error.
21100
21101 * src/lex.h:
21102 Added THONG and NOOP for alias processing.
21103 Added SETOPT for the new code that allows setting options with %flags.
21104
21105 * src/lex.c:
21106 Include getopt.h. Add some extern decls.
21107 (safegetc): New function to deal with EOF gracefully.
21108 (literalchar); new function to deal with reading \ escapes.
21109 (lex): Use literalchar.
21110 (lex): Implemented "..." tokens.
21111 (literalchar, lex, parse_percent_token): Made tokenbuffer
21112 always contain the token. This includes growing the token
21113 buffer while reading an integer.
21114 (parse_percent_token): Replaced if-else statement with percent_table.
21115 (parse_percent_token): Added % declarations as another
21116 way to specify the flags -n, -l, and -r. Also added hooks for
21117 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
21118 major changes to files.c.
21119 (lex) Retain in the incoming stream a character following
21120 an incorrect '/'.
21121 (skip_white_space, lex): Revised most error messages
21122 and changed fatal to warn to avoid aborting.
21123 (percent_table): Added %thong declarations.
21124
21125 * src/gram.h: Comment changes.
21126
21127 * src/files.c (openfiles, open_extra_files, done):
21128 Add faction flag
21129 and actfile file. Handle noparserflag. Both for -n switch.
21130
21131 * src/conflicts.c (resolve_sr_conflict):
21132 Remove use of alloca.
21133
21134 1995-06-01 Jim Meyering <meyering@gnu.org>
21135
21136 * doc/bison.texinfo: *** empty log message ***
21137
21138 1995-05-06 Richard Stallman <rms@gnu.org>
21139
21140 * src/bison.s1: Comment change.
21141
21142 1995-05-06 Richard Stallman <rms@gnu.org>
21143
21144 * bison.simple: Comment change.
21145
21146 1995-05-03 Richard Stallman <rms@gnu.org>
21147
21148 * src/version.c: Version now 1.24.
21149
21150 * src/bison.s1: Change distribution terms.
21151
21152 * src/version.c: Version now 1.23.
21153
21154 1995-05-03 Richard Stallman <rms@gnu.org>
21155
21156 * doc/bison.texinfo:
21157 Rewrite "Conditions for Using Bison".
21158 Update version to 1.24.
21159
21160 1995-05-03 Richard Stallman <rms@gnu.org>
21161
21162 * bison.simple: Change distribution terms.
21163
21164 1995-02-23 Richard Stallman <rms@gnu.org>
21165
21166 * src/files.c: Test __VMS_POSIX as well as VMS.
21167
21168 1995-02-14 Jim Meyering <meyering@gnu.org>
21169
21170 * src/bison.s1 (__yy_memcpy):
21171 Renamed from __yy_bcopy to avoid
21172 confusion. Reverse FROM and TO arguments to be consistent with
21173 those of memcpy.
21174
21175 1995-02-14 Jim Meyering <meyering@gnu.org>
21176
21177 * bison.simple (__yy_memcpy):
21178 Renamed from __yy_bcopy to avoid
21179 confusion. Reverse FROM and TO arguments to be consistent with
21180 those of memcpy.
21181
21182 1994-11-10 David J. MacKenzie <djm@gnu.org>
21183
21184 * NEWS: reformat
21185
21186 * NEWS: New file.
21187
21188 * Makefile.in (DISTFILES): Include NEWS.
21189
21190 * Makefile.in (DISTFILES):
21191 Include install-sh, not install.sh.
21192
21193 * configure.in: Update to Autoconf v2 macro names.
21194
21195 1994-10-05 David J. MacKenzie <djm@gnu.org>
21196
21197 * Makefile.in: fix typo
21198
21199 * Makefile.in (prefix, exec_prefix):
21200 Let configure set them.
21201
21202 1994-09-28 David J. MacKenzie <djm@gnu.org>
21203
21204 * Makefile.in: Set datadir to $(prefix)/share.
21205
21206 1994-09-15 Richard Stallman <rms@gnu.org>
21207
21208 * src/bison.s1:
21209 Update copyright notice and GPL version.
21210
21211 1994-09-15 Richard Stallman <rms@gnu.org>
21212
21213 * bison.simple:
21214 Update copyright notice and GPL version.
21215
21216 1994-07-12 Richard Stallman <rms@gnu.org>
21217
21218 * src/reduce.c, src/reader.c:
21219 entered into RCS
21220
21221 1994-05-05 David J. MacKenzie <djm@gnu.org>
21222
21223 * Makefile.in: entered into RCS
21224
21225 1994-03-26 Richard Stallman <rms@gnu.org>
21226
21227 * src/bison.s1: entered into RCS
21228
21229 1994-03-26 Richard Stallman <rms@gnu.org>
21230
21231 * bison.simple: entered into RCS
21232
21233 1994-03-25 Richard Stallman <rms@gnu.org>
21234
21235 * src/main.c: entered into RCS
21236
21237 1994-03-24 Richard Stallman <rms@gnu.org>
21238
21239 * src/conflicts.c: entered into RCS
21240
21241 1994-01-02 Richard Stallman <rms@gnu.org>
21242
21243 * Makefile.in: *** empty log message ***
21244
21245 1993-11-21 Richard Stallman <rms@gnu.org>
21246
21247 * src/bison.s1: *** empty log message ***
21248
21249 1993-11-21 Richard Stallman <rms@gnu.org>
21250
21251 * doc/bison.texinfo: entered into RCS
21252
21253 * doc/bison.texinfo: *** empty log message ***
21254
21255 1993-11-21 Richard Stallman <rms@gnu.org>
21256
21257 * bison.simple: *** empty log message ***
21258
21259 1993-10-25 David J. MacKenzie <djm@gnu.org>
21260
21261 * doc/bison.texinfo: *** empty log message ***
21262
21263 1993-10-19 Richard Stallman <rms@gnu.org>
21264
21265 * src/bison.s1: *** empty log message ***
21266
21267 1993-10-19 Richard Stallman <rms@gnu.org>
21268
21269 * bison.simple: *** empty log message ***
21270
21271 1993-10-14 Richard Stallman <rms@gnu.org>
21272
21273 * src/bison.s1: *** empty log message ***
21274
21275 1993-10-14 Richard Stallman <rms@gnu.org>
21276
21277 * bison.simple: *** empty log message ***
21278
21279 1993-09-14 David J. MacKenzie <djm@gnu.org>
21280
21281 * doc/bison.texinfo: *** empty log message ***
21282
21283 1993-09-13 Noah Friedman <friedman@gnu.org>
21284
21285 * Makefile.in: *** empty log message ***
21286
21287 1993-09-10 Richard Stallman <rms@gnu.org>
21288
21289 * src/conflicts.c: *** empty log message ***
21290
21291 * src/system.h: entered into RCS
21292
21293 1993-09-10 Richard Stallman <rms@gnu.org>
21294
21295 * doc/bison.1: entered into RCS
21296
21297 1993-09-06 Noah Friedman <friedman@gnu.org>
21298
21299 * src/version.c: entered into RCS
21300
21301 1993-09-06 Noah Friedman <friedman@gnu.org>
21302
21303 * Makefile.in: *** empty log message ***
21304
21305 1993-07-30 David J. MacKenzie <djm@gnu.org>
21306
21307 * Makefile.in: *** empty log message ***
21308
21309 1993-07-24 Richard Stallman <rms@gnu.org>
21310
21311 * src/bison.s1: *** empty log message ***
21312
21313 1993-07-24 Richard Stallman <rms@gnu.org>
21314
21315 * bison.simple: *** empty log message ***
21316
21317 1993-07-08 David J. MacKenzie <djm@gnu.org>
21318
21319 * Makefile.in: *** empty log message ***
21320
21321 1993-07-04 Richard Stallman <rms@gnu.org>
21322
21323 * src/bison.s1: *** empty log message ***
21324
21325 1993-07-04 Richard Stallman <rms@gnu.org>
21326
21327 * bison.simple: *** empty log message ***
21328
21329 1993-06-26 David J. MacKenzie <djm@gnu.org>
21330
21331 * src/getargs.c: entered into RCS
21332
21333 1993-06-26 David J. MacKenzie <djm@gnu.org>
21334
21335 * doc/bison.texinfo: *** empty log message ***
21336
21337 * doc/bison.1: New file.
21338
21339 1993-06-25 Richard Stallman <rms@gnu.org>
21340
21341 * src/getargs.c: New file.
21342
21343 1993-06-16 Richard Stallman <rms@gnu.org>
21344
21345 * src/bison.s1: *** empty log message ***
21346
21347 1993-06-16 Richard Stallman <rms@gnu.org>
21348
21349 * bison.simple: *** empty log message ***
21350
21351 1993-06-03 Richard Stallman <rms@gnu.org>
21352
21353 * src/bison.s1: New file.
21354
21355 1993-06-03 Richard Stallman <rms@gnu.org>
21356
21357 * doc/bison.texinfo: *** empty log message ***
21358
21359 1993-06-03 Richard Stallman <rms@gnu.org>
21360
21361 * bison.simple: New file.
21362
21363 1993-05-19 Richard Stallman <rms@gnu.org>
21364
21365 * doc/bison.texinfo: New file.
21366
21367 1993-05-07 Noah Friedman <friedman@gnu.org>
21368
21369 * Makefile.in: *** empty log message ***
21370
21371 1993-04-28 Noah Friedman <friedman@gnu.org>
21372
21373 * src/reader.c: *** empty log message ***
21374
21375 1993-04-23 Noah Friedman <friedman@gnu.org>
21376
21377 * src/alloc.h: entered into RCS
21378
21379 1993-04-20 David J. MacKenzie <djm@gnu.org>
21380
21381 * src/version.c: *** empty log message ***
21382
21383 * src/files.c, src/allocate.c:
21384 entered into RCS
21385
21386 * src/reader.c: *** empty log message ***
21387
21388 * src/lex.c: entered into RCS
21389
21390 * src/conflicts.c: New file.
21391
21392 * src/symtab.c: entered into RCS
21393
21394 * src/alloc.h: New file.
21395
21396 * src/LR0.c: entered into RCS
21397
21398 1993-04-18 Noah Friedman <friedman@gnu.org>
21399
21400 * src/reader.c: New file.
21401
21402 * src/version.c: *** empty log message ***
21403
21404 1993-04-18 Noah Friedman <friedman@gnu.org>
21405
21406 * Makefile.in: *** empty log message ***
21407
21408 1993-04-17 Noah Friedman <friedman@gnu.org>
21409
21410 * Makefile.in: *** empty log message ***
21411
21412 1993-04-15 Richard Stallman <rms@gnu.org>
21413
21414 * src/main.c, src/files.c:
21415 New file.
21416
21417 1993-04-15 Noah Friedman <friedman@gnu.org>
21418
21419 * configure.in: entered into RCS
21420
21421 * configure.in: *** empty log message ***
21422
21423 * configure.in: New file.
21424
21425 1993-04-14 Richard Stallman <rms@gnu.org>
21426
21427 * Makefile.in: New file.
21428
21429 1993-04-13 Richard Stallman <rms@gnu.org>
21430
21431 * src/version.c: New file.
21432
21433 1993-03-25 Richard Stallman <rms@gnu.org>
21434
21435 * src/output.c: entered into RCS
21436
21437 1992-09-25 Richard Stallman <rms@gnu.org>
21438
21439 * configure.bat: entered into RCS
21440
21441 1992-06-22 Richard Stallman <rms@gnu.org>
21442
21443 * src/vmsgetargs.c: entered into RCS
21444
21445 1992-06-22 Richard Stallman <rms@gnu.org>
21446
21447 * doc/bison.rnh: entered into RCS
21448
21449 1992-04-20 David J. MacKenzie <djm@gnu.org>
21450
21451 * README: entered into RCS
21452
21453 1992-01-22 Richard Stallman <rms@gnu.org>
21454
21455 * src/machine.h: entered into RCS
21456
21457 1991-12-21 Richard Stallman <rms@gnu.org>
21458
21459 * src/lalr.c, src/closure.c:
21460 entered into RCS
21461
21462 1991-12-20 Richard Stallman <rms@gnu.org>
21463
21464 * src/state.h: entered into RCS
21465
21466 1991-12-18 Richard Stallman <rms@gnu.org>
21467
21468 * src/print.c, src/nullable.c, src/derives.c:
21469 entered into RCS
21470
21471 1991-11-03 David J. MacKenzie <djm@gnu.org>
21472
21473 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
21474 entered into RCS
21475
21476 1988-09-09 Richard Stallman <rms@gnu.org>
21477
21478 * src/bison.hairy: entered into RCS
21479
21480 1987-12-16 Richard Stallman <rms@gnu.org>
21481
21482 * REFERENCES: entered into RCS
21483
21484
21485 -----
21486
21487 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
21488 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
21489 Free Software Foundation, Inc.
21490
21491 Copying and distribution of this file, with or without
21492 modification, are permitted provided the copyright notice and this
21493 notice are preserved.