]> git.saurik.com Git - bison.git/blob - ChangeLog
Regen.
[bison.git] / ChangeLog
1 2008-11-26 Akim Demaille <demaille@gostai.com>
2
3 Regen.
4 * src/parse-gram.h, src/parse-gram.c: Regen.
5
6 2008-11-26 Akim Demaille <demaille@gostai.com>
7
8 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
9 * data/lalr1.cc (b4_tables_map): Move to...
10 * data/bison.m4: here.
11 Update the comment for yytable during the flight.
12 (b4_tables_declare, b4_tables_define): New.
13 * data/lalr1.cc: Use them.
14 * data/c.m4 (b4_table_define): New.
15 * data/yacc.c: Use b4_tables_define instead of output the tables
16 by hand.
17 * tests/regression.at (Web2c Actions): Adjust the expected output,
18 the order of the tables changed.
19
20 2008-11-26 Akim Demaille <demaille@gostai.com>
21
22 Get rid of (yy)rhs and (yy)prhs.
23 These tables are no longer needed in the parsers, and they don't seem to
24 be useful. They are not documented either.
25
26 * src/output.c (prepare_rules): Get rid of rhs and prhs.
27 Adjust the computation of (yy)r2.
28
29 2008-11-26 Akim Demaille <demaille@gostai.com>
30
31 Rule length is unsigned.
32 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
33
34 2008-11-26 Akim Demaille <demaille@gostai.com>
35
36 Get rid of lalr1-split.cc.
37 It was no longer maintainer.
38
39 * data/lalr1-split.cc: Remove.
40 * etc/bench.pl.in (bench_fusion_parser): Remove.
41 Adjust.
42
43 2008-11-26 Akim Demaille <demaille@gostai.com>
44
45 Use yy* consistently.
46 * data/glr.c: Now that yyrhs no longer exists as a global
47 variable, rename local "rhs" variables into "yyrhs" for
48 consistency.
49
50 2008-11-25 Akim Demaille <demaille@gostai.com>
51
52 Get rid of yyrhs and yyprhs in glr.c.
53 * data/glr.c (yyrhs, yyprhs): Remove.
54 Instead, use the state stack and yystos.
55
56 2008-11-25 Akim Demaille <demaille@gostai.com>
57
58 Flag glr tests.
59 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
60 as an Autotest keyword.
61
62 2008-11-25 Akim Demaille <demaille@gostai.com>
63
64 Prefer TESTSUITE_FLAGS.
65 TESTSUITEFLAGS is barely readable.
66
67 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
68 for backward compatibility.
69 Use the former instead of the latter.
70
71 2008-11-25 Akim Demaille <demaille@gostai.com>
72
73 Get rid of yyrhs and yyprhs in larl1.java.
74 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
75 (yy_reduce_print): Rather, use yystos_ and the state stack.
76
77 2008-11-25 Akim Demaille <demaille@gostai.com>
78
79 Formatting changes.
80
81 2008-11-25 Akim Demaille <demaille@gostai.com>
82
83 Get rid of yyrhs and yyprhs in yacc.c.
84 They were used to get the symbol types, given a rule number, when
85 displaying the top of the stack before a reduction. But the symbol type
86 is available from the state stack. This has two be benefits: two tables
87 less in the parser (making it smaller), and a more consistent use of the
88 three stacks which will help to fuse them.
89
90 * data/yacc.c (yyprhs, yyrhs): Remove.
91 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
92 (yy_reduce_print): Take yyssp as argument.
93 Use it, together with yystos, to get the symbol type.
94 * tests/regression.at (Web2c Report): Remove these tables from the
95 expected output.
96
97 2008-11-25 Akim Demaille <demaille@gostai.com>
98
99 b4_tables_map.
100 The point is to factor the generation of the tables across skeletons.
101 This is language dependant.
102
103 * data/c.m4 (b4_comment_): New.
104 Should be usable to define how to generate tables independently of
105 the language.
106 (b4_c_comment): New.
107 (b4_comment): Bounce to b4_c_comment.
108 Now support $2 = [PREFIX] for indentation.
109 * data/lalr1.cc (b4_table_declare): Don't output a comment if
110 there is no comment.
111 Indent it properly when there is one.
112 Output the ending semicolon.
113 (b4_table_define): Space changes.
114 Output the ending semicolon.
115 (b4_tables_map): New.
116 Use it twice instead of declaring and defining the (integral)
117 tables by hand.
118
119 2008-11-25 Akim Demaille <demaille@gostai.com>
120
121 b4_table_declare.
122 * data/lalr1.cc (b4_table_declare): New.
123 Use it to declare the tables defined with b4_table_define.
124 (b4_table_define): Declare a third arg to match b4_table_declare
125 signature.
126 Move all the comments around invocations of b4_table_define into
127 the invocations itselves.
128 Move things around to have the order for declarations and
129 definitions.
130
131 2008-11-25 Akim Demaille <demaille@gostai.com>
132
133 Formatting changes.
134 * data/lalr1.java: here.
135
136 2008-11-25 Akim Demaille <demaille@gostai.com>
137
138 b4_args is more general than only C++.
139 * data/lalr1.cc (b4_args, _b4_args): Move to...
140 * data/bison.m4: here.
141
142 2008-11-21 Di-an Jan <dianj@freeshell.org>
143
144 Implement no-XXX arguments for --warnings, --report, --trace.
145 * src/getargs.c (flags_argmatch): Handles no-XXX.
146 Fix typo in doxygen comment.
147
148 2008-11-21 Akim Demaille <demaille@gostai.com>
149
150 Display the changes in cross-options.texi.
151 * build-aux/cross-options.pl ($sep): New, to separate items.
152 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
153 changes.
154
155 2008-11-20 Di-an Jan <dianj@freeshell.org>
156
157 Improves options in the manual.
158 * doc/bison.texinfo (-g, -x): Add space before argument.
159 (Option Cross Key): Implement FIXME: listing directives also.
160 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
161 (Short Option): Special case -d. Put arguments inside @option.
162 (Bison Directive): Add column, automatically extracted from
163 src/scan-gram.l (actual name passed as the first argument)
164 with special case for %define.
165 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
166 to build-aux/cross-options.pl.
167 * src/getargs.c (usage): Document limitations of cross-options.pl.
168 * src/scan-gram.l: Likewise.
169
170 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
171
172 Fix unexpanded macros in GLR defines file.
173 Reported by Csaba Raduly at
174 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
175 * THANKS (Csaba Raduly): Add.
176 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
177 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
178 lexer in a separate module that includes the defines file.
179 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
180 source.
181 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
182 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
183 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
184 (AT_DATA_SOURCE_PROLOGUE): New.
185 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
186 (AT_DATA_SOURCE): New.
187 (AT_FULL_COMPILE): Extend to support an additional source file.
188
189 2008-11-18 Akim Demaille <demaille@gostai.com>
190
191 More TODO.
192 * TODO: More short term issues.
193
194 2008-11-18 Akim Demaille <demaille@gostai.com>
195
196 Regen.
197 * src/parse-gram.h, src/parse-gram.c: Regen.
198
199 2008-11-18 Akim Demaille <demaille@gostai.com>
200
201 Use b4_subtract where possible.
202 * data/lalr1.cc (b4_subtract): Move to...
203 * data/bison.m4: here.
204 * data/glr.c (b4_rhs_data): Use it.
205 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
206
207 2008-11-18 Akim Demaille <demaille@gostai.com>
208
209 Remove incorrect mode specification.
210 * data/glr.cc: Don't pretend it's C code.
211
212 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
213
214 Simplify last patch slightly.
215 * src/getargs.c (getargs): Here.
216
217 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
218
219 Fix last warning from --enable-gcc-warnings.
220 * src/getargs.c (getargs): Don't assign const address to non-const
221 pointer.
222
223 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
224
225 Don't let maintainer-*-check targets force a version update.
226 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
227 handled.
228
229 2008-11-17 Di-an Jan <dianj@freeshell.org>
230
231 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
232 Align menus. Adjust word wrapping. Use node names for menu names.
233 (Examples): Don't abbreviate node names.
234 (LocalWords): Remove abbreviations.
235 (Copying): Make description a sentence.
236 (Java Action Features): Remove period to match the rest of menu.
237
238 2008-11-17 Di-an Jan <dianj@freeshell.org>
239
240 Handles several --enable-gcc-warnings.
241 * src/getargs.c (command_line_location): Set parameters to void.
242 * src/output.c (symbol_type_name_cmp): Make static.
243 (symbols_by_type_name): Set parameters to void.
244 (symbol_definitions_output): Remove unused parameter. Rename as...
245 (prepare_symbol_definitions): this.
246 (muscles_output): Move symbol_definitions_output to...
247 (output): here as prepare_symbol_definitions.
248 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
249 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
250
251 2008-11-17 Di-an Jan <dianj@freeshell.org>
252
253 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
254 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
255
256 2008-11-16 Akim Demaille <demaille@gostai.com>
257
258 Add missing $(EXEEXT).
259 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
260 "src/bison$(EXEEXT)".
261 Reported by Di-an Jan.
262
263 2008-11-15 Akim Demaille <demaille@gostai.com>
264
265 * TODO: Update.
266
267 2008-11-15 Akim Demaille <demaille@gostai.com>
268
269 Formatting changes.
270 * tests/input.at: here.
271
272 2008-11-15 Akim Demaille <demaille@gostai.com>
273
274 Remove duplicate header inclusion.
275 * src/LR0.c: here.
276
277 2008-11-15 Akim Demaille <demaille@gostai.com>
278
279 * src/parse-gram.h, src/parse-gram.c: Regen.
280
281 2008-11-15 Akim Demaille <demaille@gostai.com>
282
283 Support parametric types.
284
285 There are two issues to handle: first scanning nested angle
286 bracket pairs to support types such as std::pair< std::string,
287 std::list<std::string> > >.
288
289 Another issue is to address idiosyncracies of C++: do not glue two
290 closing angle brackets together (otherwise it's operator>>), and
291 avoid sticking blindly a TYPE to the opening <, as it can result
292 in '<:' which is a digraph for '['.
293
294 * src/scan-gram.l (brace_level): Rename as...
295 (nesting): this.
296 (SC_TAG): New.
297 Implement support for complex tags.
298 (tag): Accept
299 , but not <.
300 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
301 (b4_symbol_variant): Leave space around types as parameters.
302 * examples/variant.yy: Use nested template types and leading ::.
303 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
304 Rename as...
305 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
306 * tests/c++.at: Test parametric types.
307
308 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
309
310 Test token.prefix.
311 This is not sufficient, but we test at least that the make_SYMBOL
312 interface is not affected by token.prefix. A more general test
313 will be implemented when the support of token.prefix is generalized
314 to more skeletons.
315
316 * tests/c++.at: One more variant test, using token.prefix.
317
318 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
319
320 Test the make_TOKEN interface.
321 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
322 Factor the common code in yylex.
323 Use it to test "%define lex_symbol".
324
325 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
326
327 Formatting change.
328
329 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
330
331 Simplify code for variants bench marks.
332 * etc/bench.pl.in (&generate_grammar_list): Define and use
333 location_type.
334 Factor the common code in yylex.
335
336 2008-11-15 Akim Demaille <demaille@gostai.com>
337
338 Better error message.
339 * bootstrap (find_tool): Fix the error message.
340
341 2008-11-15 Akim Demaille <demaille@gostai.com>
342
343 Update variant.yy to newest interface.
344 * examples/variant.yy: Define lex_symbol.
345 Adjust.
346
347 2008-11-15 Akim Demaille <demaille@gostai.com>
348
349 Don't use locations in variant.yy.
350 * examples/variant.yy: Adjust to not using locations.
351
352 2008-11-15 Akim Demaille <demaille@gostai.com>
353
354 Comment changes.
355 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
356 comments for the license.
357
358 2008-11-15 Akim Demaille <demaille@gostai.com>
359
360 Remove tests/Makefile.am.
361 * tests/Makefile.am: Rename as...
362 * tests/local.mk: this.
363 * Makefile.am, configure.ac: Adjust.
364 * Makefile.am (DISTCLEANFILES): Define.
365 (maintainer-check, maintainer-xml-check, maintainer-push-check):
366 Remove, we no longer need to bounce to the real targets.
367
368 2008-11-15 Akim Demaille <demaille@gostai.com>
369
370 Comment changes.
371
372 2008-11-15 Akim Demaille <demaille@gostai.com>
373
374 djgpp/local.mk.
375 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
376 * djgpp/local.mk: this new file.
377
378 2008-11-15 Akim Demaille <demaille@gostai.com>
379
380 Remove doc/Makefile.am.
381 * doc/Makefile.am: Rename as...
382 * doc/local.mk: this.
383 Adjust paths
384 * Makefile.am, configure.ac: Adjust.
385 * Makefile.am (MOSTLYCLEANFILES): New.
386 * src/local.mk: Adjust.
387
388 2008-11-15 Akim Demaille <demaille@gostai.com>
389
390 Move sc_tight_scope into maint.mk.
391 It does not work, and I don't know how it was supposed to work: it
392 seems to be looking for sources in the build tree. I just moved
393 it at a better place, fixing it is still required.
394
395 * src/local.mk (echo): Remove.
396 (sc_tight_scope): Move to...
397 * maint.mk: here.
398
399 2008-11-15 Akim Demaille <demaille@gostai.com>
400
401 Regen.
402 * src/parse-gram.h, src/parse-gram.h: Regen.
403
404 2008-11-15 Akim Demaille <demaille@gostai.com>
405
406 Remove src/Makefile.am.
407 * src/Makefile.am: Rename as...
408 * src/local.mk: this.
409 Prefix all the paths with src/.
410 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
411 (AM_CPPFLAGS): Find find in builddir/src.
412 (YACC): Move the flags into...
413 (AM_YFLAGS): here.
414 * maint.mk (sc_tight_scope): Disable.
415 It used to bounce to the version in src/Makefile.am which is now
416 part of this very Makefile.
417 * Makefile.am, configure.ac: Adjust.
418 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
419 include "..." to find files "here": we are no longer in src/, so
420 qualify the includes with src/.
421 * doc/Makefile.am (PREPATH): No longer include the top_builddir
422 prefix.
423 (.x.1): Adjust to be able to create src/foo from the top level
424 Makefile, instead of going bounce to src/Makefile the creation of
425 foo.
426
427 2008-11-15 Akim Demaille <demaille@gostai.com>
428
429 Remove useless variable.
430 * doc/Makefile.am (srcsrcdir): Remove.
431
432 2008-11-15 Akim Demaille <demaille@gostai.com>
433
434 Remove data/Makefile.am.
435 * data/Makefile.am: Rename as...
436 * data/local.mk: this.
437 Adjust paths.
438 * Makefile.am, configure.ac: Adjust.
439
440 2008-11-15 Akim Demaille <demaille@gostai.com>
441
442 Remove etc/Makefile.am.
443 * etc/Makefile.am: Rename as...
444 * etc/local.mk: this.
445 Adjust.
446 * Makefile.am, configure.ac: Adjust.
447
448 2008-11-15 Akim Demaille <demaille@gostai.com>
449
450 Remove examples/local.mk.
451 examples/calc++/Makefile.am might be interesting to keep as is, since
452 it is an example in itself.
453
454 * examples/Makefile.am: Rename as...
455 * examples/local.mk: this.
456 Adjust.
457 * Makefile.am, configure.ac: Adjust.
458
459 2008-11-15 Akim Demaille <demaille@gostai.com>
460
461 Remove build-aux/Makefile.am.
462 Recursive Makefiles are really way too slow, let's get rid of some of
463 them.
464
465 * build-aux/Makefile.am: Rename as...
466 * build-aux/local.mk: this.
467 Adjust paths.
468 * Makefile.am, configure.ac: Adjust.
469
470 2008-11-15 Akim Demaille <demaille@gostai.com>
471
472 Provide convenience constructors for locations and positions.
473 * data/location.cc (position::position): Accept file, line and
474 column as arguments with default values.
475 Always qualify initial line and column literals as unsigned.
476 (location::location): Provide convenience constructors.
477
478 2008-11-15 Akim Demaille <demaille@gostai.com>
479
480 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
481 token type.
482 Using template buys us nothing, and makes it uselessly complex to
483 construct a symbol. Besides, it could not be generalized to other
484 languages, while make_FOO would work in C/Java etc.
485
486 * data/lalr1.cc (b4_symbol_): New.
487 (b4_symbol): Use it.
488 (b4_symbol_constructor_declaration_)
489 (b4_symbol_constructor_definition_): Instead of generating
490 specializations of an overloaded template function, just generate
491 several functions whose names are forged from the token names
492 without the token.prefix.
493 (b4_symbol_constructor_declarations): Generate them for all the
494 symbols, not just by class of symbol type, now that instead of
495 specializing a function template by the token, we generate a
496 function named after the token.
497 (b4_symbol_constructor_specialization_)
498 (b4_symbol_constructor_specializations): Remove.
499 * etc/bench.pl.in: Adjust to this new API.
500
501 2008-11-13 Akim Demaille <demaille@gostai.com>
502
503 %define token.prefix.
504 Provide a means to add a prefix to the name of the tokens as
505 output in the generated files. Because of name clashes, it is
506 good to have such a prefix such as TOK_ that protects from names
507 such as EOF, FILE etc. But it clutters the grammar itself.
508
509 * data/bison.m4 (token.prefix): Empty by default.
510 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
511 * data/lalr1.cc (b4_symbol): Ditto.
512
513 2008-11-13 Akim Demaille <demaille@gostai.com>
514
515 Compute at M4 time some of the subtractions.
516 * data/lalr1.cc (b4_subtract): New.
517 (b4_rhs_data): Use it.
518
519 2008-11-13 Akim Demaille <demaille@gostai.com>
520
521 symbol::token.
522 This allows the user to get the type of a token returned by yylex.
523
524 * data/lalr1.cc (symbol::token): New.
525 (yytoknum_): Define when %define lex_symbol, independently of
526 %debug.
527 (yytoken_number_): Move into...
528 (symbol::token): here, since that's the only use.
529 The other one is YYPRINT which was not officially supported
530 by lalr1.cc, and anyway it did not work since YYPRINT uses this
531 array under a different name (yytoknum).
532
533 2008-11-13 Akim Demaille <demaille@gostai.com>
534
535 YYERRCODE.
536 * TODO (YYERRCODE): Mention the case of $undef.
537
538 2008-11-13 Akim Demaille <demaille@gostai.com>
539
540 TODO: YYPRINT.
541 * TODO (YYPRINT): New.
542
543 2008-11-13 Akim Demaille <demaille@gostai.com>
544
545 Comment changes.
546 * data/lalr1.cc, data/yacc.c: Fix the description of the
547 yytranslate and yytoknum tables.
548
549 2008-11-13 Akim Demaille <demaille@gostai.com>
550
551 Define make_symbol in the header.
552 To reach good performances these functions should be inlined (yet
553 this is to measure precisely). To this end they must be available
554 to the caller.
555
556 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
557 location_type with the class name.
558 Since will now be output in the header, declare "inline".
559 No longer use b4_symbol_constructor_specializations, but
560 b4_symbol_constructor_definitions in the header.
561 Don't call it in the *.cc file.
562
563 2008-11-13 Akim Demaille <demaille@gostai.com>
564
565 Define yytranslate in the header for lex_symbol.
566 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
567 into the header file when using %define lex_symbol.
568 (yytranslate_): Declare inline.
569
570 2008-11-13 Akim Demaille <demaille@gostai.com>
571
572 Define the constructors of symbol_type in
573 b4_symbol_constructor_definitions.
574 The constructors are called by the make_symbol functions, which a
575 forthcoming patch will move elsewhere. Hence the interest of
576 putting them together.
577
578 The stack_symbol_type does not need to be moved, it is used only
579 by the parser.
580
581 * data/lalr1.cc: Move symbol_type and symbol_base_type
582 constructors into...
583 (b4_symbol_constructor_definitions): here.
584 Adjust.
585
586 2008-11-13 Akim Demaille <demaille@gostai.com>
587
588 Make it easier to move the definition of yytranslate_.
589 Forthcoming changes will make it possible to use yytranslate_
590 from outside the parser implementation file.
591
592 * data/lalr1.cc (b4_yytranslate_definition): New.
593 Use it.
594
595 2008-11-13 Akim Demaille <demaille@gostai.com>
596
597 Remove useless class specification.
598 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
599 to refer to the class name to use a type defined by the class for
600 arguments of member functions.
601
602 2008-11-13 Akim Demaille <demaille@gostai.com>
603
604 Finer input type for yytranslate.
605 This patch is debatable: the tradition expects yylex to return an int
606 which happens to correspond to token_number (which is an enum). This
607 allows for instance to return characters (such as '*' etc.). But this
608 goes against the stronger typing I am trying to have with the new
609 lex interface which return a symbol_type. So in this case, feed
610 yytranslate_ with a token_type.
611
612 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
613 expect a token_type.
614
615 2008-11-13 Akim Demaille <demaille@gostai.com>
616
617 Honor lex-params in %define lex_symbol mode.
618 * data/lalr1.cc: Use b4_lex_param.
619
620 2008-11-13 Akim Demaille <demaille@gostai.com>
621
622 Simplify names.
623 * src/output.c (symbol_definitions_output): Rename symbol
624 attributes type_name and has_type_name as type and has_type.
625 * data/lalr1.cc: Adjust uses.
626
627 2008-11-13 Akim Demaille <demaille@gostai.com>
628
629 Use b4_type_names for the union type.
630 The union used to compute the size of the variant used to iterate
631 over the type of all the symbols, with a lot of redundancy. Now
632 iterate over the lists of symbols having the same type-name.
633
634 * data/lalr1.cc (b4_char_sizeof_): New.
635 (b4_char_sizeof): Use it.
636 Adjust to be called with a list of numbers instead of a single
637 number.
638 Adjust its caller for new-line issues.
639
640 2008-11-13 Akim Demaille <demaille@gostai.com>
641
642 Define the "identifier" of a symbol.
643 Symbols may have several string representations, for instance if
644 they have an alias. What I call its "id" is a string that can be
645 used as an identifier. May not exist.
646
647 Currently the symbols which have the "tag_is_id" flag set are
648 those that don't have an alias. Look harder for the id.
649
650 * src/output.c (is_identifier): Move to...
651 * src/symtab.c (is_identifier): here.
652 * src/symtab.h, src/symtab.c (symbol_id_get): New.
653 * src/output.c (symbol_definitions_output): Use it to define "id"
654 and "has_id".
655 Remove the definition of "tag_is_id".
656 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
657 "tag_is_id" were used to produce code.
658 We still use "tag" for documentation.
659
660 2008-11-11 Akim Demaille <demaille@gostai.com>
661
662 Locations are no longer required by lalr1.cc.
663 * data/lalr1.cc (_b4_args, b4_args): New.
664 Adjust all uses of locations to make them optional.
665 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
666 (AT_CHECK_NAMESPACE): Check the use of locations.
667 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
668 without locations with lalr1.cc.
669 Test these cases.
670 * tests/output.at: Check lalr1.cc with and without location
671 support.
672 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
673 Don't use locations.
674
675 2008-11-11 Akim Demaille <demaille@gostai.com>
676
677 AT_FULL_COMPILE.
678 * tests/local.at (AT_FULL_COMPILE): New.
679 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
680
681 2008-11-11 Akim Demaille <demaille@gostai.com>
682
683 Support parens in calc++.
684 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
685 * examples/calc++/test (run): Check the expected output.
686 Adjust callers.
687 Check parens too.
688
689 2008-11-11 Akim Demaille <demaille@gostai.com>
690
691 Simplify lalr1.cc since %defines is mandatory.
692 * data/lalr1.cc: Remove useless calls to b4_defines_if.
693
694 2008-11-11 Akim Demaille <demaille@gostai.com>
695
696 TODO: yyfmt.
697 * TODO (yysyntax_error): New item.
698
699 2008-11-11 Akim Demaille <demaille@gostai.com>
700
701 Prefer M4 to CPP.
702 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
703 YYERROR_VERBOSE.
704
705 2008-11-11 Akim Demaille <demaille@gostai.com>
706
707 Support i18n of the parse error messages.
708 * TODO (lalr1.cc/I18n): Remove.
709 * data/lalr1.cc (yysyntax_error_): Support the translation of the
710 error messages, as done in yacc.c.
711 Stay within the yy* pseudo namespace.
712
713 2008-11-11 Akim Demaille <demaille@gostai.com>
714
715 More TODO.
716 * TODO (single stack, yysyntax_error): New.
717
718 2008-11-11 Akim Demaille <demaille@gostai.com>
719
720 Make it possible to return a symbol_type from yylex.
721 * data/lalr1.cc (b4_lex_symbol_if): New.
722 (parse): When lex_symbol is defined, expected yylex to return the
723 complete lookahead.
724 * etc/bench.pl.in (generate_grammar_list): Extend to support this
725 yylex interface.
726 (bench_variant_parser): Exercise it.
727
728 2008-11-11 Akim Demaille <demaille@gostai.com>
729
730 Remove useless bench case.
731 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
732 no longer used.
733
734 2008-11-11 Akim Demaille <demaille@gostai.com>
735
736 Improve display of directives.
737 * etc/bench.pl.in (parse_term): Don't add useless eol.
738
739 2008-11-11 Akim Demaille <demaille@gostai.com>
740
741 Use string_cast in the bench.
742 * etc/bench.pl.in (generate_grammar_list): Define and use
743 string_cast.
744
745 2008-11-11 Akim Demaille <demaille@gostai.com>
746
747 Replace yychar with a Boolean.
748 * data/lalr1.cc (parse::yychar): Replace by...
749 (parse::yyempty): this.
750
751 2008-11-11 Akim Demaille <demaille@gostai.com>
752
753 Factor the tables.
754 * TODO: New item.
755
756 2008-11-11 Akim Demaille <demaille@gostai.com>
757
758 Let yytranslate handle the eof case.
759 * data/lalr1.cc (yytranslate_): Handle the EOF case.
760 Adjust callers.
761 No longer expect yychar to be equal to yyeof_, rather, test the
762 lookahead's (translated) kind.
763
764 2008-11-11 Akim Demaille <demaille@gostai.com>
765
766 yychar cannot be empty in yyerrlab.
767 * TODO (yychar == yyempty_): New.
768 * data/lalr1.cc: Remove the handling of this case.
769 This eases forthcoming changes related to yychar and yytranslate.
770
771 2008-11-11 Akim Demaille <demaille@gostai.com>
772
773 Bench: syntactic sugar for %define/#define.
774 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
775 (&bench_push_parser, bench_variant_parser): Use this feature.
776 (&eat): New.
777 Use it.
778
779 2008-11-11 Akim Demaille <demaille@gostai.com>
780
781 Less memory pressure on the "list" bench.
782 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
783 the values, to limit memory pressure.
784
785 2008-11-11 Akim Demaille <demaille@gostai.com>
786
787 Introduce make_symbol.
788 make_symbol provides a means to construct a full symbol (kind,
789 value, location) in a single shot. It is meant to be a Symbol
790 constructor, parameterized by the symbol kind so that overloading
791 would prevent incorrect kind/value pairs. Unfortunately
792 parameterized constructors do not work well in C++ (unless the
793 parameter also appears as an argument, which is not acceptable),
794 hence the use of a function instead of a constructor.
795
796 * data/lalr1.cc (b4_symbol_constructor_declaration_)
797 (b4_symbol_constructor_declarations)
798 (b4_symbol_constructor_specialization_)
799 (b4_symbol_constructor_specializations)
800 (b4_symbol_constructor_definition_)
801 (b4_symbol_constructor_definitions): New.
802 Use them where appropriate to generate declaration, declaration of
803 the specializations, and implementations of the templated
804 overloaded function "make_symbol".
805 (variant::variant): Always define a default ctor.
806 Also provide a copy ctor.
807 (symbol_base_type, symbol_type): New ctor overloads for value-less
808 symbols.
809 (symbol_type): Now public, so that functions such as yylex can use
810 it.
811
812 2008-11-11 Akim Demaille <demaille@gostai.com>
813
814 Inform m4 whether a tag is a valid id.
815 * src/output.c (is_identifier): New.
816 (symbol_definitions_output): Use it to define tag_is_id.
817 But maybe this should be done at m4 level?
818
819 2008-11-11 Akim Demaille <demaille@gostai.com>
820
821 Test 214 was failing: it greps with a pattern containing [ ]*
822 which obviously meant to catch spaces and tabs, but contained only
823 spaces. Tabulations in sources are a nuisance, so to simplify the
824 matter, get rid of all the tabulations in the Java sources. The
825 other skeletons will be treated equally later.
826
827 * data/java.m4, data/lalr1.java: Untabify.
828 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
829 tabulations are no longer generated.
830
831 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
832
833 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
834 * configure.ac: Adjust usage.
835 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
836 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
837 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
838
839 2008-11-10 Di-an Jan <dianj@freeshell.org>
840
841 Workaround Java's ``code too large'' problem for parser tables
842 in most cases, by using one function per initialization.
843 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
844 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
845 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
846 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
847 (yytname_): Use b4_typed_parser_table.
848 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
849 ``code too large'' error.
850
851 2008-11-10 Di-an Jan <dianj@freeshell.org>
852
853 * NEWS: Document them.
854
855 General Java skeleton improvements.
856 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
857 using gcj < 4.3 in the testsuite, according to comments in
858 gnulib/m4/javacomp.m4.
859 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
860 location_type, position_type): Remove extraneous brackets from
861 b4_percent_define_default.
862 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
863 m4_define and m4_define_default.
864 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
865 which marks the end of user code with appropriate syncline, like all
866 the other skeletons.
867 (b4_user_post_prologue): Add. Don't silently drop.
868 (yylex): Remove.
869 (parse): Inline yylex.
870 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
871 (%{...%}): Fix typo of %code imports.
872 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
873
874 Support annotations on parser class with %define annotations.
875 * data/lalr1.java (annotations): Add to parser class modifier.
876 * doc/bison.texinfo (Java Parser Interface): Document
877 %define annotations.
878 (Java Declarations Summary): Document %define annotations.
879 * tests/java.at (Java parser class modifiers): Test annotations.
880
881 Do not generate code for %error-verbose unless requested.
882 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
883 Make private. Make conditional on %error-verbose.
884 (getErrorVerbose, setErrorVerbose): New.
885 (yytnamerr_): Make conditional on %error-verbose.
886 (yysyntax_error): Make some code conditional on %error-verbose.
887 * doc/bison.texinfo (Java Bison Interface): Remove the parts
888 about %error-verbose having no effect.
889 (getErrorVerbose, setErrorVerbose): Document.
890
891 Move constants for token names to Lexer interface.
892 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
893 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
894 (parse): Qualify EOF to Lexer.EOF.
895 * doc/bison.texinfo (Java Parser Interface): Move documentation of
896 EOF and token names to Java Lexer Interface.
897 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
898
899 Make yyerror public.
900 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
901 (yyerror): Change to public. Add Javadoc comments. Use longer
902 parameter names. Make the body rather than the declarator
903 conditional on %locations.
904 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
905
906 Allow user to add code to the constructor with %code init.
907 * data/java.m4 (b4_init_throws): New, for %define init_throws.
908 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
909 Add %code init to the front of the constructor body.
910 * doc/bison.texinfo (YYParser.YYParser): Document %code init
911 and %define init_throws.
912 (Java Declarations Summary): Document %code init and
913 %define init_throws.
914 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
915 (Java constructor init and init_throws): Add tests.
916
917 2008-11-10 Akim Demaille <demaille@gostai.com>
918
919 Update TODO.
920 * TODO (-D): is implemented.
921 (associativity): Same precedence must have the same associativity.
922 For instance, how can a * b / c be parsed if * is %left and / is
923 %right?
924 (YYERRORCODE, YYFAIL, YYBACKUP): New.
925
926 2008-11-10 Akim Demaille <demaille@gostai.com>
927
928 Formatting changes.
929
930 2008-11-10 Akim Demaille <demaille@gostai.com>
931
932 More information about the symbols.
933 * src/output.c (type_names_output): Document all the symbols,
934 including those that don't have a type-name.
935 (symbol_definitions_output): Define "is_token" and
936 "has_type_name".
937 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
938 type-name, now that they are defined too in b4_type_names.
939
940 2008-11-10 Akim Demaille <demaille@gostai.com>
941
942 Regen.
943
944 2008-11-10 Akim Demaille <demaille@gostai.com>
945
946 Make parser::yytranslate static.
947 Small speedup (1%) on the list grammar. And makes yytranslate_
948 available in non member functions.
949
950 * data/lalr1.cc (yytranslate_): Does not need to be a instance
951 function.
952
953 2008-11-10 Akim Demaille <demaille@gostai.com>
954
955 Avoid trailing spaces.
956 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
957 * data/lalr1.cc: Don't indent before rule and symbol actions, as
958 they can be empty, and anyway this incorrectly indents the first
959 action.
960
961 2008-11-10 Akim Demaille <demaille@gostai.com>
962
963 Comment changes.
964
965 2008-11-10 Akim Demaille <demaille@gostai.com>
966
967 Use "enum" for integral constants.
968 This is just nicer to read, I observed no speedup.
969
970 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
971 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
972 (yyuser_token_number_max_, yyundef_token_): Move into...
973 (yytranslate_): here.
974
975 2008-11-10 Akim Demaille <demaille@gostai.com>
976
977 Shortcuts in bench directives.
978 * etc/bench.pl.in (parse_dirs): New.
979 Use it.
980 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
981 Create the benches in "benches/".
982
983 2008-11-10 Akim Demaille <demaille@gostai.com>
984
985 Formatting changes.
986 * data/lalr1.cc: here.
987
988 2008-11-10 Akim Demaille <demaille@gostai.com>
989
990 Adjust verbose message to using emacs.
991 * etc/bench.pl.in: Inform compilation-mode when we change the
992 directory.
993 (generate_grammar_list): Recognize %define "variant" in addition
994 to %define variant.
995
996 2008-11-10 Akim Demaille <demaille@gostai.com>
997
998 Classify symbols by type-name.
999 * src/uniqstr.h (UNIQSTR_CMP): New.
1000 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
1001 (type_names_output): New.
1002 (muscles_output): Use it.
1003 * data/lalr1.cc (b4_symbol_action_): Remove.
1004 (b4_symbol_case_, b4_type_action_): New.
1005 Adjust uses of b4_symbol_action_ to use b4_type_action_.
1006
1007 2008-11-10 Akim Demaille <demaille@gostai.com>
1008
1009 Change the handling of the symbols in the skeletons.
1010 Before we were using tables which lines were the symbols and which
1011 columns were things like number, tag, type-name etc. It is was
1012 difficult to extend: each time a column was added, all the numbers had
1013 to be updated (you asked for colon $2, not for "tag"). Also, it was
1014 hard to filter these tables when only a subset of the symbols (say the
1015 tokens, or the nterms, or the tokens that have and external number
1016 *and* a type-name) was of interest.
1017
1018 Now instead of monolithic tables, we define one macro per cell. For
1019 instance "b4_symbol(0, tag)" is a macro name which contents is
1020 self-decriptive. The macro "b4_symbol" provides easier access to
1021 these cells.
1022
1023 * src/output.c (type_names_output): Remove.
1024 (symbol_numbers_output, symbol_definitions_output): New.
1025 (muscles_output): Call them.
1026 (prepare_symbols): Define b4_symbols_number.
1027
1028 2008-11-10 Akim Demaille <demaille@gostai.com>
1029
1030 --trace=muscles
1031 * src/getargs.h, src/getargs.c (trace_muscle): New.
1032 (trace_types, trace_args): Support it.
1033 * src/output.c (output_skeleton): Use it.
1034
1035 2008-11-10 Akim Demaille <demaille@gostai.com>
1036
1037 muscles_output.
1038 * src/output.c (muscles_output): New, extracted from...
1039 (output_skeleton): here.
1040 Adjust.
1041
1042 2008-11-10 Akim Demaille <demaille@gostai.com>
1043
1044 Formatting changes.
1045
1046 2008-11-10 Akim Demaille <demaille@gostai.com>
1047
1048 Update the variant example.
1049 * examples/variant.yy: Formatting changes.
1050 One stage build.
1051
1052 2008-11-10 Akim Demaille <demaille@gostai.com>
1053
1054 Support constructor with an argument.
1055 This improves the "list" bench by 2%.
1056
1057 * data/lalr1.cc (variant::build): Add an overloaded version with
1058 an argument.
1059 * tests/c++.at (AT_CHECK_VARIANT): Check it.
1060
1061 2008-11-10 Akim Demaille <demaille@gostai.com>
1062
1063 Test variants.
1064 * tests/c++.at (AT_CHECK_VARIANTS): New.
1065 Use it with and without %define assert.
1066
1067 2008-11-10 Akim Demaille <demaille@gostai.com>
1068
1069 Add %precedence support.
1070 Unfortunately it is not possible to reuse the %prec directive. This
1071 is because to please POSIX, we do not require to end the rules with a
1072 semicolon. As a result,
1073
1074 foo: bar %prec baz
1075
1076 is ambiguous: either a rule which precedence is that of baz, or a rule,
1077 and then a declaration of the precedence of the token baz.
1078
1079 * doc/bison.texinfo: Document %precedence.
1080 (Precedence Only): New.
1081 * src/assoc.h, src/assoc.c (precedence_assoc): New.
1082 * src/conflicts.c (resolve_sr_conflict): Support it.
1083 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
1084 Parse it.
1085 * tests/calc.at: Use %precedence for NEG.
1086 * tests/conflicts.at (%precedence does not suffice)
1087 (%precedence suffices): New tests.
1088
1089 2008-11-09 Akim Demaille <demaille@gostai.com>
1090
1091 Make benches in a sub dirs.
1092 * etc/bench.pl.in ($dir): New.
1093 Use it.
1094 Check the use of constructors with an argument.
1095 (bench_variant_parser): Fix.
1096
1097 2008-11-09 Akim Demaille <demaille@gostai.com>
1098
1099 fix eof condition
1100
1101 2008-11-09 Akim Demaille <demaille@gostai.com>
1102
1103 Fix --help.
1104
1105 2008-11-09 Akim Demaille <demaille@gostai.com>
1106
1107 Require the generation of parse-gram.output.
1108 * src/Makefile.am (YACC): Pass --report=all.
1109
1110 2008-11-09 Akim Demaille <demaille@gostai.com>
1111
1112 Formatting changes.
1113
1114 2008-11-09 Akim Demaille <demaille@gostai.com>
1115
1116 Update TODO.
1117 * TODO: Remove obsolete items.
1118 Update others.
1119
1120 2008-11-09 Akim Demaille <demaille@gostai.com>
1121
1122 Enhance bench.pl.
1123 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
1124 (@token, $grammar, $bench): New.
1125 (generate_grammar_variant): Rename as...
1126 (generate_grammar_list): this.
1127 (generate_grammar): Adjust.
1128 (bench_grammar): Rename as...
1129 (bench): this.
1130 Use it in the various bench-marking routines.
1131 (-b, -g): New options.
1132
1133 2008-11-09 Akim Demaille <demaille@gostai.com>
1134
1135 Use a static hierarchy for symbols in the C++ parser.
1136 * data/lalr1.cc (symbol_base_type, symbol_type)
1137 (stack_symbol_type): Make it a static hierarchy.
1138 Adjust dependencies.
1139
1140 2008-11-09 Akim Demaille <demaille@gostai.com>
1141
1142 bench.pl -d, --directive.
1143 * etc/bench.pl.in (@directive): New.
1144 (&bench_grammar): Use it.
1145 (&bench_list_grammar): New, to provide access to the "variant"
1146 grammar.
1147 Use it.
1148 (getopts): Support -d, --directive.
1149
1150 2008-11-09 Akim Demaille <demaille@gostai.com>
1151
1152 Use inline for small operations.
1153 * data/lalr1.cc (symbol_base_type, symbol_type)
1154 (stack_symbol_type): Declare constructor and other operations as
1155 inline.
1156 (yy_destroy_): Inline.
1157
1158 2008-11-09 Akim Demaille <demaille@gostai.com>
1159
1160 Introduce a hierarchy for symbols.
1161 * data/lalr1.cc (symbol_base_type, symbol_type): New.
1162 (data_type): Rename as...
1163 (stack_symbol_type): this.
1164 Derive from symbol_base_type.
1165 (yy_symbol_value_print_): Merge into...
1166 (yy_symbol_print_): this.
1167 Rename as...
1168 (yy_print_): this.
1169 (yydestruct_): Rename as...
1170 (yy_destroy_): this.
1171 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
1172 (parser::parse): yyla is now of symbol_type.
1173 Use its type member instead of yytoken.
1174
1175 2008-11-09 Akim Demaille <demaille@gostai.com>
1176
1177 Rename data_type and stack_symbol_type.
1178 * data/lalr1.cc (data_type): Rename as...
1179 (stack_symbol_type): this.
1180
1181 2008-11-09 Akim Demaille <demaille@gostai.com>
1182
1183 Handle semantic value and location together.
1184 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
1185 yydata.value and yydata.location.
1186 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
1187 (YY_SYMBOL_PRINT): Now take semantic value and location as a
1188 single arg.
1189 Adjust all callers.
1190 (yydestruct_): New overload for a stack symbol.
1191
1192 2008-11-09 Akim Demaille <demaille@gostai.com>
1193
1194 Push a complete symbol, not connected parts.
1195 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
1196 state, value and location.
1197 Adjust callers.
1198
1199 2008-11-09 Akim Demaille <demaille@gostai.com>
1200
1201 Agregate yylval and yylloc.
1202 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
1203 (parser::yyla): this.
1204
1205 2008-11-09 Akim Demaille <demaille@gostai.com>
1206
1207 Rely on the state stack to display reduction traces.
1208 To display rhs symbols before a reduction, we used information
1209 about the rule reduced, which required the tables yyrhs and
1210 yyprhs. Now use rely only on the state stack to get the same
1211 information.
1212
1213 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
1214 Use them.
1215 (parser::yyrhs_, parser::yyprhs_): Remove.
1216 (parser::yy_reduce_print_): Use the state stack.
1217
1218 2008-11-09 Akim Demaille <demaille@gostai.com>
1219
1220 Fuse yyval and yyloc into yylhs.
1221 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
1222 yylhs.
1223 (parse): Replace yyval and yyloc with yylhs.value and
1224 yylhs.location.
1225 After a user action, compute yylhs.state earlier.
1226 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
1227 fresh error_token.
1228
1229 2008-11-09 Di-an Jan <dianj@freeshell.org>
1230
1231 Remove unused variable.
1232 * src/output.c (type_names_output): Remove unused variable sep.
1233
1234 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
1235
1236 Change tests/output.at quoting.
1237 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
1238 expanding arguments.
1239
1240 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1241
1242 Don't add a semicolon to actions for %skeleton or %language.
1243 It breaks Java test cases as reported by Akim Demaille.
1244 * src/scan-code.l: Implement.
1245
1246 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1247
1248 Clean up %skeleton and %language priority implementation.
1249 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1250 remove static qualifier because others will soon need to see it.
1251 (language_prio): Likewise.
1252 (getargs): Use command_line_prio rather than 0.
1253 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1254 enum fields.
1255 (skeleton_prio): Extern it.
1256 (language_prio): Extern it.
1257 * src/parse-gram.y: Use grammar_prio rather than 1.
1258
1259 2008-11-07 Akim Demaille <demaille@gostai.com>
1260
1261 Moving push traces into yypush_.
1262 * data/lalr1.cc (yypush_): Now takes a optional trace message.
1263 Adjust all uses.
1264
1265 2008-11-07 Akim Demaille <demaille@gostai.com>
1266
1267 The single-stack C++ parser is now the standard one.
1268 * data/lalr1.cc: Rename as...
1269 * data/lalr1-split.cc: this.
1270 * data/lalr1-fusion.cc: Rename as...
1271 * data/lalr1.cc: this.
1272 * etc/bench.pl.in: Adjust.
1273
1274 2008-11-07 Akim Demaille <demaille@gostai.com>
1275
1276 Avoid empty-if warnings.
1277 Reported by Quentin Hocquet.
1278
1279 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
1280 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
1281
1282 2008-11-07 Akim Demaille <demaille@gostai.com>
1283
1284 Pass command line location to skeleton_arg and language_argmatch.
1285 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
1286 The location argument is now mandatory.
1287 Adjust all dependencies.
1288 (getargs): Use command_line_location.
1289
1290 2008-11-07 Akim Demaille <demaille@gostai.com>
1291
1292 -D, --define.
1293 * src/getargs.c (usage): Document -D.
1294 Fix help string for --locations.
1295 (command_line_location): New.
1296 (short_options, long_options, getargs): Support -D, --define.
1297 (getargs): Move -d support at the right place.
1298 * doc/bison.texinfo (Bison Options): Update.
1299 * tests/input.at (%define, --define): New.
1300
1301 2008-11-07 Akim Demaille <demaille@gostai.com>
1302
1303 Initialize the muscle table before parsing the command line.
1304 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
1305 (getargs): Define file_name.
1306 * src/main.c (main): Initialize muscle_tab before calling
1307 getargs.
1308 * src/muscle_tab.c (muscle_init): No longer define file_name, as
1309 its value is not available yet.
1310
1311 2008-11-07 Akim Demaille <demaille@gostai.com>
1312
1313 Locations without columns for command line arguments.
1314 * src/location.c (location_print): Don't display negative columns.
1315 * src/location.h: Document this.
1316
1317 2008-11-07 Akim Demaille <demaille@gostai.com>
1318
1319 Fix --help.
1320 * src/getargs.c (usage): Fix help string for -W.
1321
1322 2008-11-07 Akim Demaille <demaille@gostai.com>
1323
1324 Handle more general types of option arguments.
1325 * build-aux/cross-options.pl: The argument ends at the first
1326 space, not the first non-symbol character.
1327 Use @var for each word appearing the argument description.
1328
1329 2008-11-07 Akim Demaille <demaille@gostai.com>
1330
1331 Destroy the variants that remain on the stack in case of error.
1332 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
1333 destructor.
1334 Display the value only if yymsg is nonnull.
1335 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
1336
1337 2008-11-07 Akim Demaille <demaille@gostai.com>
1338
1339 Add "%define assert" to variants.
1340 This is used to help the user catch cases where some value gets
1341 ovewritten by a new one. This should not happen, as this will
1342 probably leak.
1343
1344 Unfortunately this uncovered a bug in the C++ parser itself: the
1345 lookahead value was not destroyed between two calls to yylex. For
1346 instance if the previous lookahead was a std::string, and then an int,
1347 then the value of the std::string was correctly taken (i.e., the
1348 lookahead was now an empty string), but std::string structure itself
1349 was not reclaimed.
1350
1351 This is now done in variant::build(other&) (which is used to take the
1352 value of the lookahead): other is not only stolen from its value, it
1353 is also destroyed. This incurs a new performance penalty of a few
1354 percent, and union becomes faster again.
1355
1356 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
1357 (b4_variant_if): New.
1358 (variant::built): New.
1359 Use it whereever the status of the variant changes.
1360 * etc/bench.pl.in: Check the penalty of %define assert.
1361
1362 2008-11-07 Akim Demaille <demaille@gostai.com>
1363
1364 Use "%define variant" in bench.pl.
1365 * etc/bench.pl.in: No longer use the pseudo directive %variants,
1366 just use %define variants.
1367
1368 2008-11-07 Akim Demaille <demaille@gostai.com>
1369
1370 Regen.
1371 * src/parse-gram.h, src/parse-gram.c: Regen.
1372
1373 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
1374
1375 Fix user actions without a trailing semicolon.
1376 Reported by Sergei Steshenko at
1377 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1378 * THANKS (Sergei Steshenko): Add.
1379 * src/scan-code.l (SC_RULE_ACTION): Fix it.
1380 * tests/regression.at (Fix user actions without a trailing semicolon):
1381 New test case.
1382
1383 2008-11-04 Akim Demaille <demaille@gostai.com>
1384
1385 Use b4_copyright_years.
1386 * data/yacc.c (b4_copyright_years): New.
1387 Fix its value according to the comments in the file.
1388 Use it and undefine it.
1389
1390 2008-11-04 Akim Demaille <demaille@gostai.com>
1391
1392 Formatting changes.
1393 * data/lalr1-fusion.cc, src/parse-gram.y: here.
1394
1395 2008-11-04 Akim Demaille <demaille@gostai.com>
1396
1397 Formatting changes.
1398 * data/lalr1-fusion.cc: here.
1399
1400 2008-11-04 Akim Demaille <demaille@gostai.com>
1401
1402 Use strict on bench.pl.
1403 * etc/bench.pl.in (&run, &generate_grammar): New.
1404 Rename the grammar generating functions for consistency.
1405 Change the interface so that the list of benches to run is passed
1406 as (optionless) arguments.
1407 (&compile): Use &run.
1408
1409 2008-11-04 Akim Demaille <demaille@gostai.com>
1410
1411 Remove spurious initial empty lines.
1412 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1413 * data/yacc.c: End the @output lines with an @.
1414
1415 2008-11-04 Akim Demaille <demaille@gostai.com>
1416
1417 Improve the display of sizes.
1418 * etc/bench.p.in: Higher precision.
1419 Sort by decreasing size.
1420
1421 2008-11-04 Akim Demaille <demaille@gostai.com>
1422
1423 Don't memcpy C++ structures.
1424 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
1425 arguments.
1426 (variant::build): New overload for
1427 copy-construction-that-destroys.
1428 (variant::swap): New.
1429 (parser::yypush_): Use it in variant mode.
1430
1431 2008-11-04 Akim Demaille <demaille@gostai.com>
1432
1433 Better defaults for bench.pl.
1434 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
1435 default values.
1436 Adjust &verbose uses.
1437 (-q, --quiet): New.
1438
1439 2008-11-04 Akim Demaille <demaille@gostai.com>
1440
1441 Make variant.yy more complex.
1442 std::list cannot be copied via memcpy, they are more demanding than
1443 std::string. Use one std::list to strengthen the test.
1444
1445 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
1446 Adjust.
1447 Create a list of strings, instead of a single large string.
1448
1449 2008-11-04 Akim Demaille <demaille@gostai.com>
1450
1451 bench.pl --bench.
1452 * etc/bench.pl.in (--bench, $bench): New.
1453
1454 2008-11-04 Akim Demaille <demaille@gostai.com>
1455
1456 Sort methods.
1457 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
1458 Define it after as().
1459
1460 2008-11-04 Akim Demaille <demaille@gostai.com>
1461
1462 Useless parens.
1463 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
1464
1465 2008-11-04 Akim Demaille <demaille@gostai.com>
1466
1467 Issue missing synclines after user actions.
1468 * data/c.m4 (b4_case): Issue synclines on the output file.
1469
1470 2008-11-04 Akim Demaille <demaille@gostai.com>
1471
1472 Remove trailing empty line.
1473 * data/lalr1-fusion.cc: Don't add an empty line after the user's
1474 epilogue.
1475
1476 2008-11-04 Akim Demaille <demaille@gostai.com>
1477
1478 Fix output of copyright years.
1479 * data/bison.m4 (b4_copyright): Fix the indentation of the
1480 copyright year paragraph.
1481 Use b4_copyright_years when no years are given.
1482 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
1483 (b4_copyright_years): New.
1484 Use it.
1485
1486 2008-11-04 Akim Demaille <demaille@gostai.com>
1487
1488 Avoid the spurious initial empty line.
1489 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
1490 the end of @output request to suppress the empty line that
1491 results.
1492
1493 2008-11-04 Akim Demaille <demaille@gostai.com>
1494
1495 Remove parser::rhs_number_type.
1496 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
1497 (yyrhs_): Use b4_table_define.
1498
1499 2008-11-04 Akim Demaille <demaille@gostai.com>
1500
1501 Fix iteration type.
1502 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
1503
1504 2008-11-04 Akim Demaille <demaille@gostai.com>
1505
1506 Factor the declaration of the integer tables.
1507 * data/lalr1-fusion.cc (b4_table_define): New.
1508 Use it.
1509
1510 2008-11-03 Akim Demaille <demaille@gostai.com>
1511
1512 Fix indentation of tables in lalr1.cc
1513 * data/lalr1-fusion.cc: Fix the indentation.
1514
1515 2008-11-03 Akim Demaille <demaille@gostai.com>
1516
1517 Destroy the lhs symbols after reduction.
1518 * data/lalr1-fusion.cc (parse): After the user action, when in
1519 variant mode, destroy the lhs symbols.
1520
1521 2008-11-03 Akim Demaille <demaille@gostai.com>
1522
1523 Simplify yysyntax_error_ use.
1524 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
1525 type, but make it unnamed in the declaration when it is not used.
1526
1527 2008-11-03 Akim Demaille <demaille@gostai.com>
1528
1529 Let yy::variant::build return an lvalue.
1530 * data/lalr1-fusion.cc (variant::build): Return a reference to the
1531 object.
1532
1533 2008-11-03 Akim Demaille <demaille@gostai.com>
1534
1535 Define yy::variant only when needed.
1536 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
1537 used.
1538
1539 2008-11-03 Akim Demaille <demaille@gostai.com>
1540
1541 Bench the three-stack lalr1.cc.
1542 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
1543 one-stack one.
1544
1545 2008-11-03 Akim Demaille <demaille@gostai.com>
1546
1547 Fail on parse error in calc++.
1548 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
1549 status.
1550 * examples/calc++/test ($me, $number, $exit, run): New.
1551 Use them to propagate errors to the exit status.
1552
1553 2008-11-03 Akim Demaille <demaille@gostai.com>
1554
1555 Don't specify the skeleton twice in the example.
1556 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
1557 file does what is needed.
1558
1559 2008-11-03 Akim Demaille <demaille@gostai.com>
1560
1561 bench: Improve output.
1562 * etc/bench.pl.in (bench_grammar): Tune the printf format.
1563
1564 2008-11-03 Akim Demaille <demaille@gostai.com>
1565
1566 bench: check impact of %debug on variants.
1567 * etc/bench.pl.in (variant_grammar): Fix the computation of
1568 $variant.
1569 Generate a grammar file that can work with or without %debug.
1570 Do use the @directive.
1571 (bench_variant_parser): Check impact of %debug.
1572 (@directives): Rename all the occurrences to...
1573 (@directive): this, for consistency.
1574
1575 2008-11-03 Akim Demaille <demaille@gostai.com>
1576
1577 bench: report the size too.
1578 * etc/bench.pl.in ($iterations): Defaults to -3.
1579 (&bench_grammar): Require hireswallclock.
1580 Compute and display the size of the result.
1581 More comments.
1582
1583 2008-11-03 Akim Demaille <demaille@gostai.com>
1584
1585 bench: More use of the verbosity level.
1586 * etc/bench.pl.in ($verbose, &verbose): New.
1587 Use them.
1588 More POD documentation.
1589
1590 2008-11-03 Akim Demaille <demaille@gostai.com>
1591
1592 bench.pl: a command line interface
1593 * etc/bench.pl.in: More doc.
1594 Some fixes in the documentation.
1595 ($cflags, $iterations, &help, &getopt): New.
1596 Use them.
1597 (&variant_grammar): Let the number of stages be 10 times what is
1598 specified.
1599
1600 2008-11-03 Akim Demaille <demaille@gostai.com>
1601
1602 Bench the use of Boost.Variants.
1603 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
1604 New.
1605 (&compile): Be ready to compile C++ parsers.
1606 (&bench_push_parser): Move debug information to the outermost
1607 level.
1608 * THANKS: Add Michiel De Wilde.
1609
1610 2008-11-03 Akim Demaille <demaille@gostai.com>
1611
1612 bench.pl: Pass directives as a list instead of as a string.
1613 * etc/bench.pl.in (&directives): New.
1614 (&triangular_grammar, &calc_grammar): Use it to format the Bison
1615 directives.
1616 (&triangular_grammar): Do use the directives (were ignored).
1617 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
1618 directives.
1619
1620 2008-11-03 Akim Demaille <demaille@gostai.com>
1621
1622 Improve genericity of bench.pl.
1623 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
1624 argument.
1625 (&bench_push_parser): New.
1626 Call it.
1627
1628 2008-11-03 Akim Demaille <demaille@gostai.com>
1629
1630 Add documentation to bench.pl.
1631 * etc/bench.pl.in: Comment changes.
1632
1633 2008-11-03 Akim Demaille <demaille@gostai.com>
1634
1635 Fuse the three stacks into a single one.
1636
1637 In order to make it easy to perform benchmarks to ensure that
1638 there are no performance loss, lalr1.cc is forked into
1639 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
1640 lalr1.cc.
1641
1642 Meanwhile, to make sure that lalr1-fusion.cc is correctly
1643 exercized by the test suite, the user must install a symbolic link
1644 from lalr1.cc to it.
1645
1646 Instead of having three stacks (state, value, location), use a
1647 stack of triples. This considerably simplifies the code (and it
1648 will be easier not to require locations as currently does the C++
1649 parser), and also gives a 10% speedup according to
1650 etc/bench (probably mainly since memory allocation is done once
1651 instead of three times).
1652
1653 Another motivation is to make it easier to destruct properly
1654 semantic values: now that they are bound to their state (hence
1655 symbol type) it will be easier to call the appropriate destructor.
1656
1657 These changes should probably benefit the C parser too.
1658
1659 * data/lalr1.cc: Copy as...
1660 * data/lalr1-fusion.cc: this new file.
1661 (b4_rhs_value, b4_rhs_location): New definitions overriding those
1662 from c++.m4.
1663 (state_stack_type, semantic_stack_type, location_stack_type)
1664 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
1665 (data_type, stack_type, yystack_): New.
1666 (YYLLOC_DEFAULT, yypush_): Adjust.
1667 (yyerror_range): Now based on data_type, not location_type.
1668
1669 2008-11-03 Akim Demaille <demaille@gostai.com>
1670
1671 Push the state, value, and location at the same time.
1672 This is needed to prepare a forthcoming patch that fuses the three
1673 stacks into one.
1674
1675 * data/lalr1.cc (parser::yypush_): New.
1676 (parser::yynewstate): Change the semantics: instead of arriving to
1677 this label when value and location have been pushed, but yystate
1678 is to be pushed on the state stack, now the three of them must
1679 have been pushed before. yystate still must be the new state.
1680 This allows to use yypush_ everywhere instead of individual
1681 handling of the stacks.
1682
1683 2008-11-03 Akim Demaille <demaille@gostai.com>
1684
1685 Prefer references to pointers.
1686 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
1687 definition to use references instead of pointers.
1688 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
1689 Take the value and location as references.
1690 Adjust callers.
1691
1692 2008-11-03 Akim Demaille <demaille@gostai.com>
1693
1694 stack::size instead of stack::height.
1695 * data/lalr1.cc (stack::height): Rename as...
1696 (stack::size): this.
1697 Fix the output type.
1698 Comment changes.
1699
1700 2008-11-03 Akim Demaille <demaille@gostai.com>
1701
1702 Use variants to support objects as semantic values.
1703 This patch was inspired by work by Michiel De Wilde. But he used
1704 Boost variants which (i) requires Boost on the user side, (ii) is
1705 slow, and (iii) has useless overhead (the parser knows the type of
1706 the semantic value there is no reason to duplicate this
1707 information as Boost.Variants do).
1708
1709 This implementation reserves a buffer large enough to store the
1710 largest objects. yy::variant implements this buffer. It was
1711 implemented with Quentin Hocquet.
1712
1713 * src/output.c (type_names_output): New.
1714 (output_skeleton): Invoke it.
1715 * data/c++.m4 (b4_variant_if): New.
1716 (b4_symbol_value): If needed, provide a definition for variants.
1717 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
1718 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
1719 (b4_char_sizeof, yy::variant): New.
1720 (parser::parse): If variants are requested, define
1721 parser::union_type, parser::variant, change the definition of
1722 semantic_type, construct $$ before running the user action instead
1723 of performing a default $$ = $1.
1724 * examples/variant.yy: New.
1725 Based on an example by Michiel De Wilde.
1726
1727 2008-11-03 Akim Demaille <demaille@gostai.com>
1728
1729 Parameterize the extraction of semantic values.
1730 To make future changes easier, no longer rely on ".TYPE" being the
1731 way to get a semantic value.
1732
1733 * data/c.m4 (b4_symbol_value): New.
1734 Use it.
1735 * data/c++.m4, data/yacc.c: Use it.
1736 * data/glr.c: Use b4_symbol_value.
1737 (b4_rhs_data): New.
1738 Use it.
1739
1740 2008-11-03 Akim Demaille <demaille@gostai.com>
1741
1742 Prepare easier M4 changes.
1743 * data/lalr1.cc: Use escaped [] instead of literals to prepare
1744 future changes.
1745
1746 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1747
1748 Initiate further development.
1749 * NEWS: Create an empty section for new entries.
1750 * gnulib: Update submodule to HEAD.
1751
1752 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1753
1754 * NEWS: Version 2.4.
1755
1756 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1757
1758 Prepare for next release.
1759 * NEWS: Briefly mention changes since 2.3b.
1760 * README: Say GNU m4 1.4.6, which we've been requiring in release
1761 announcements already, not 1.4.3, which breaks the build.
1762
1763 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1764
1765 Say %language is experimental.
1766 We're thinking of extending it's effect on output file naming. See the
1767 thread at
1768 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
1769 * NEWS: Say it's experimental.
1770 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
1771 recommend it over %skeleton for now.
1772 (Bison Options): Likewise.
1773 (C++ Bison Interface): Use %skeleton not %language.
1774 (Calc++ Parser): Use %skeleton not %language.
1775 * src/getargs.c (usage): Say it's experimental.
1776
1777 2008-11-01 Di-an Jan <dianj@freeshell.org>
1778 Paolo Bonzini <bonzini@gnu.org>
1779
1780 Support all Java parser class modifiers.
1781 * data/java.m4 (b4_percent_define_get3): New.
1782 (b4_final_if, b4_strictfp_if): New.
1783 * data/lalr1.java (final, strictfp, extends, implements): Support.
1784 * doc/bison.texinfo (final, strictfp, extends, implements): Add
1785 documentation.
1786 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
1787 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
1788 (AT_CHECK_JAVA_GREP): New.
1789 (Java parser class modifiers): New test.
1790 (Java parser class extends and implements): New test.
1791
1792 Model exception propagation better with throws and lex_throws.
1793 * data/java.m4 (b4_list2): New.
1794 (throws): Change default.
1795 * data/lalr1.java (yyaction): Add throws.
1796 (parse): Add lex_throws in addition to throws.
1797 * doc/bison.texinfo (throws, lex_throws): Add documentation.
1798 * tests/java.at (Java throws specifications): New test.
1799
1800 Improve documentation for Java parsers.
1801 * doc/bison.texinfo (Java Parsers): Add subsections.
1802 Don't quote first argument of %define.
1803 (Java Bison Interface): Document output files. Move documentation
1804 of parser class and merge into Java Parser Interface. Document
1805 features that error out. Document directives with no effect.
1806 Move note about Javadoc higher.
1807 (Java Semantic Values): Explicitly mention stype.
1808 Document that generic types cannot be used.
1809 (Java Location Values): Use @deftypeivar. Document constructors.
1810 Correct return value for toString.
1811 (Java Parser Interface): List undocumented constants/fields.
1812 Move documentation of fields added by %parse-param closer to list
1813 of members. Document that token names are added as fields.
1814 Document constructors accurately. Remove error method.
1815 (Java Scanner Interface): Move note on %pure-parser to Java Bison
1816 Interface. Describe %code lexer and yylex accutately.
1817 Remove documentation that does not match the code.
1818 (Java Action Features): New.
1819 (Java Differences): Add reference. Add item on semantic values.
1820 Add note about @{ ... @}. Clarify %% epilogue placement.
1821 (Java Declarations Summary): New.
1822
1823 Fix Java skeleton.
1824 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
1825 (b4_remove_comma): Quote test argument.
1826 (b4_identification): Remove "bison" field.
1827 * tests/java.at (Java parser class and package names): New test.
1828 (Java %parse-param and %lex-param): New test.
1829 (Java stype, position_class and location_class): New test.
1830
1831 2008-10-31 Di-an Jan <dianj@freeshell.org>
1832
1833 * data/lalr1.jave: Update copyright years.
1834 (YYParser): Correct name of "generated from" file in Javadoc:
1835 use b4_file_name instead of @ofile@.
1836 (Location constructor): Correct Javadoc parameter name.
1837 (yylloc): Add missing opening m4 quote after b4_location_if.
1838 This removes a stray [ in the Javadoc of Lexer.getStartPos.
1839 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
1840 (YYParser constructor): Correct Javadoc parameter name.
1841
1842 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
1843
1844 Always put auxiliary code files in the same dir as other output files.
1845 * src/files.c (compute_file_name_parts): When the user specifies
1846 --output but not --file-prefix, extract the directory prefix from the
1847 file prefix not from the grammar file name. This affects the location
1848 of files like location.hh generated by the C++ skeleton. The includes
1849 in the other output files require this fix.
1850 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
1851 for expected output files.
1852 (Output files): Add a test for the above.
1853
1854 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
1855
1856 * gnulib: Update submodule to HEAD.
1857
1858 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1859
1860 Update copyright year.
1861 * src/files.c: Here.
1862
1863 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
1864
1865 Don't overwrite the input file.
1866 * src/files.c (output_file_name_check): Fatal error if using input file
1867 for output.
1868 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
1869 argument.
1870 (Conflicting output files): Add test.
1871
1872 2008-10-28 Akim Demaille <demaille@gostai.com>
1873
1874 Space changes.
1875 * data/lalr1.cc: Formatting changes.
1876
1877 2008-10-28 Akim Demaille <demaille@gostai.com>
1878
1879 Don't define debugging functions when !YYDEBUG.
1880 * data/lalr1.cc (debug_stream, set_debug_stream)
1881 (debug_level_type, debug_level, set_debug_level): Don't
1882 declare them when YYDEBUG is not defined.
1883 The implementation are already YYDEBUG-aware.
1884
1885 2008-10-28 Akim Demaille <demaille@gostai.com>
1886
1887 Prefer "continue" for empty loop bodies.
1888 * etc/bench.pl.in: Use "continue" instead of {}.
1889
1890 2008-10-28 Akim Demaille <demaille@gostai.com>
1891
1892 Space and comments changes.
1893 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
1894 * data/c.m4, data/lalr1.cc: Space changes.
1895
1896 2008-10-28 Akim Demaille <demaille@gostai.com>
1897
1898 Make gnulib a submodule.
1899 * gnulib: New.
1900 * .gitmodules (gnulib): New.
1901
1902 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
1903
1904 Fix yyerror_range for user-defined location type in C++. Reported by
1905 Georg Sauthoff at
1906 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
1907 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
1908 * THANKS (Georg Sauthoff): Add.
1909
1910 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
1911
1912 Update several administrative files mainly to facilitate releasing.
1913 * HACKING (Administrivia): Make the git-merge-changelog notes more
1914 helpful.
1915 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
1916 (Release Procedure): Update for git and add numerous details that were
1917 previously missing.
1918 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
1919 * maint.mk (announcement): Don't list bison as a bootstrap tool so
1920 that announcements don't claim we bootstrapped with whatever bison
1921 happened to be in PATH. Add flex as a bootstrap tool.
1922 * Makefile.maint: Remove, previously replaced by maint.mk.
1923 * Makefile.cfg: Remove, and migrate settings to...
1924 * cfg.mk: ... here for the sake of `make announcement'.
1925 * bootstrap.conf (gnulib_modules): Add announce-gen.
1926 * README: Say GNU Bison instead of just Bison. Suggested by Karl
1927 Berry.
1928
1929 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
1930
1931 Small but important bugfixes for the Java skeleton.
1932 * data/lalr1.java (yyerror): Change Location to b4_location_type.
1933 (yy_symbol_print): Call toString on yyvaluep.
1934
1935 2008-08-29 Akim Demaille <demaille@gostai.com>
1936
1937 Clarify UPDATED use.
1938 * doc/bison.texinfo: It refers to the last edition of this file,
1939 not to the release date of Bison.
1940 Reported by Joel E. Denny.
1941
1942 2008-08-29 Akim Demaille <demaille@gostai.com>
1943
1944 * README: Update FAQ pointer.
1945 Reported by Joel E. Denny.
1946
1947 2008-08-27 Eric Blake <ebb9@byu.net>
1948
1949 Resync m4sugar from autoconf.
1950 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
1951 (m4_init): Adjust to latest m4.git changes.
1952 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
1953 effects.
1954 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
1955 (_m4_list_cmp): Reduce side effects.
1956
1957 2008-08-27 Akim Demaille <demaille@gostai.com>
1958
1959 Check yyerrok in calc.at.
1960 * tests/calc.at (calc.y): Use yyerrok on "( error )".
1961 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
1962 expected.
1963
1964 2008-08-27 Akim Demaille <demaille@gostai.com>
1965
1966 Support yyerrok in lalr1.cc.
1967 YYBACKUP is still to import back into lalr1.cc.
1968 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
1969
1970 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
1971
1972 For maintainer-check*, don't recompile for a $(VERSION) update.
1973 * cfg.mk: New file.
1974 (_is-dist-target): Override the one in GNUmakefile.
1975 * Makefile.am (EXTRA_DIST): Add cfg.mk.
1976
1977 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
1978
1979 Update for recent change to gnulib.
1980 * src/parse-gram.y: Don't include strverscmp.h. It comes from
1981 string.h now.
1982
1983 2008-08-15 Eric Blake <ebb9@byu.net>
1984
1985 Remaining m4sugar merge from autoconf.
1986 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
1987 * data/m4sugar/foreach.m4: New file, copied from autoconf.
1988 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
1989 * src/output.c (output_skeleton): Tell m4 how to find it.
1990
1991 Partial m4sugar merge from autoconf: m4_map.
1992 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
1993 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
1994 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
1995 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
1996 for empty list.
1997 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
1998 Likewise.
1999 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2000 declares it.
2001
2002 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2003
2004 Keep .version and PACKAGE_VERSION in sync.
2005 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2006 dependency, and add comments justifying this in more detail. Discussed
2007 starting at
2008 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2009
2010 2008-08-06 Eric Blake <ebb9@byu.net>
2011
2012 Partial m4sugar merge from autoconf: m4_shiftn.
2013 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2014 (m4_shift2, m4_shift3): New macros.
2015 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2016 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2017 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2018 * data/java.m4 (b4_remove_comma): Likewise.
2019
2020 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2021 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2022 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2023 (m4_init): Consolidate wrapped text into single m4_wrap.
2024 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2025 in wrapped text.
2026
2027 2008-08-05 Eric Blake <ebb9@byu.net>
2028
2029 Partial m4sugar merge from autoconf: builtins, version.m4.
2030 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2031 (m4_prepend): Remove, as it is unused and inherently quadratic,
2032 whereas m4_append is linear in newer m4.
2033 (m4_mkstemp): New builtin.
2034 (m4_symbols): Make rename conditional.
2035 (m4_version_prereq): Ensure fatal error if used in bison, which
2036 intentionally lacks version.m4.
2037
2038 Fix comments in m4sugar.
2039 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2040
2041 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2042
2043 Update for recent .gitignore fix in Gnulib.
2044 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2045 anchored .gitignore entries.
2046
2047 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2048
2049 Set gnu or gnits strictness.
2050 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2051 development and gnits strictness for releases. Based on Eric Blake's
2052 suggestion at
2053 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2054
2055 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2056
2057 * NEWS: Clarify documentation of %language.
2058
2059 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2060
2061 Support usage of git-merge-changelog.
2062 * .gitattributes: New.
2063 * HACKING: Document usage of git-merge-changelog.
2064 * bootstrap: Install git-merge-changelog entries in .git/config
2065 if appropriate.
2066
2067 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2068
2069 Remove remaining dependence on CVS Id keyword.
2070 * ChangeLog: For the sake of people still using CVS, don't use dollars
2071 when mentioning Id.
2072 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2073 unusual anyway.
2074 * data/xslt/xml2dot.xsl: Likewise.
2075 * data/xslt/xml2text.xsl: Likewise.
2076 * data/xslt/xml2xhtml.xsl: Likewise.
2077 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2078 * doc/Makefile.am (neutralize): Remove, no longer needed.
2079 (.x.1): Don't use neutralize.
2080 (edit): Don't substitute for ID.
2081 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2082
2083 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2084
2085 Fix dependence on computed configure variables.
2086 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2087 $(top_srcdir)/configure.ac so that changes to computed variables, such
2088 as PACKAGE_VERSION, are seen.
2089 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2090
2091 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2092
2093 Update copyright dates for recent changes.
2094 * Makefile.am: Here.
2095 * src/Makefile.am: Here.
2096 * src/reduce.c: Here.
2097 * tests/reduce.at: Here.
2098
2099 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2100
2101 Use git-version-gen for version names between releases.
2102 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2103 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2104 * .prev-version: New.
2105 * .version.in: Remove.
2106 * ChangeLog: Remove the Id previously used for capturing the CVS
2107 revision.
2108 * GNUmakefile: Remove, now copied from Gnulib.
2109 * Makefile.am: Add code suggested by comments in
2110 build-aux/git-version-gen.
2111 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2112 .prev-version, and .version.
2113 * NEWS (2.3b+): Rename to...
2114 (?.?): ... this because we're dropping the "+" version naming scheme,
2115 but, in general, we still can't be sure of our next release name.
2116 * bootstrap: Add a quick hack to remove from .gitignore the
2117 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2118 entry. This should really be fixed in gnulib instead.
2119 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2120 * configure.ac (AC_INIT): Set version name by invoking
2121 build-aux/git-version-gen.
2122 (AC_CONFIG_FILES): Remove .version, now generated by
2123 build-aux/git-version-gen.
2124 * maint.mk: New, copied from coreutils.
2125 * doc/.cvsignore (bison.1): Add.
2126 * doc/.gitignore (/bison.1): Add.
2127 * doc/bison.1: Remove, generated.
2128 * src/.cvsignore (revision.c): Remove.
2129 * src/.gitignore (/revision.c): Remove.
2130 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2131 (BUILT_SOURCES): Remove revision.c.
2132 (revision.c): Remove.
2133 * src/getargs.c (version): Don't print revision after the VERSION.
2134 * src/revision.h: Remove.
2135
2136 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2137
2138 Fix untranslatable composition of sentences. Reported by Goran
2139 Uddeborg at
2140 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2141 * THANKS (Goran Uddeborg): Add.
2142 * src/reduce.c (reduce_print): Report the number of nonterminals and
2143 rules useless in the grammar in separate sentences.
2144 * tests/reduce.at (Useless Rules): Update output.
2145 (Reduced Automaton): Likewise.
2146 (Underivable Rules): Likewise.
2147 (Empty Language): Likewise.
2148
2149 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2150
2151 Fix some .gitignore and .cvsignore problems.
2152 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2153 (insert_vc_ignore): ... this new function, which prepends `/' to all
2154 .gitignore entries before passing them to insert_sorted_if_absent.
2155 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2156 .cvsignore files are maintained even though Bison developers run
2157 bootstrap while using Git.
2158 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2159 unneeded by Bison.
2160 (gnulib): Add.
2161 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2162 unneeded. Reported by Eric Blake.
2163 * lib/.gitignore (/*~): Add.
2164 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2165 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2166 Blake.
2167 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2168
2169 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2170
2171 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2172 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2173 * bootstrap.conf (gnulib_modules): Add unsetenv.
2174 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2175 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2176 (/setenv.m4): Add.
2177 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2178 the first argument because it may become position-dependent, and unset
2179 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2180 Add comments explaining these issues in more detail.
2181
2182 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2183
2184 Add .gitignore everywhere based on .cvsignore.
2185 * .gitignore: New.
2186 * build-aux/.gitignore: New.
2187 * data/.gitignore: New.
2188 * doc/.gitignore: New.
2189 * etc/.gitignore: New.
2190 * examples/.gitignore: New.
2191 * examples/calc++/.gitignore: New.
2192 * lib/.gitignore: New.
2193 * m4/.gitignore: New.
2194 * po/.gitignore: New.
2195 * runtime-po/.gitignore: New.
2196 * src/.gitignore: New.
2197 * tests/.gitignore: New.
2198
2199 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2200
2201 * NEWS (2.3b+): New section, empty for now.
2202 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2203
2204 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2205
2206 * NEWS (2.3b): Update release date since there has been a delay in
2207 getting the announcements and tarballs out.
2208
2209 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2210
2211 * NEWS: Version 2.3b.
2212 * configure.ac (AC_INIT): Likewise.
2213 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2214
2215 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2216
2217 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2218 been doing it for years.
2219 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2220 (Release Procedure): Add FIXME about make alpha being unmaintained.
2221
2222 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2223
2224 * data/yacc.c: Reformat m4 a little for readability.
2225 * src/lalr.c (build_relations): Correct comment.
2226
2227 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2228
2229 DJGPP specific issue.
2230 * djgpp/config.sed: Fixes required to run configure scripts generated
2231 by autoconf 2.62.
2232
2233 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2234
2235 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2236 coordinator@translationproject.org.
2237
2238 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2239
2240 * THANKS: Add Eric Blake.
2241
2242 2008-04-23 Eric Blake <ebb9@byu.net>
2243
2244 Revert prior patch, by working around autoconf regression.
2245 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2246 ("Output file name: ("): Uncomment test.
2247 ("Output file name: )"): Likewise.
2248 Based on an idea from Noah Misch.
2249
2250 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2251
2252 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2253 2.61. Reported by Juan Manuel Guerrero at
2254 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2255 * tests/output.at ("Output file name: ("): Comment out test case for
2256 now.
2257 ("Output file name: )"): Likewise.
2258
2259 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2260
2261 * GNUmakefile: Update git-version-gen invocation so make dist
2262 succeeds.
2263
2264 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2265
2266 Update to the current gnulib CVS repository, and fix trigraph handling
2267 in Bison.
2268 * bootstrap: Update gnulib CVS repository URL.
2269 (symlink_to_dir): Encapsulate the code that guarantees the destination
2270 directory exists into...
2271 (check_dst_dir): ... this new function, and...
2272 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2273 fail when copying files into lib/uniwidth/.
2274 * src/output.c (prepare_symbols): When writing yytname muscles, where
2275 symbol names will be encoded in C-string literals, tell quotearg to
2276 escape trigraphs. This used to be the default in gnulib.
2277 * tests/regression.at (Token definitions): Because of the change in
2278 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2279 escapes trigraphs in symbol names. Thus, yytname no longer has
2280 trigraphs unnecessarily doubly escaped. Update test case output.
2281 Extend test case to be sure Bison's own error messages will no longer
2282 have trigraphs in symbol names unnecessarily escaped once.
2283
2284 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2285
2286 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2287 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2288 * .cvsignore: Add .version.
2289 * .version.in: New.
2290 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2291 * configure.ac (AC_CONFIG_FILES): Add .version.
2292 * build-aux/.cvsignore: Add git-version-gen.
2293
2294 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2295
2296 * NEWS (2.3a+): Mention that -g now takes an argument.
2297 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2298 consistency. Update the -g and -x entries now that they take
2299 arguments. Use brackets to indicate optional arguments.
2300 * src/getargs.c (usage): Explain the relationship between arguments of
2301 long and short options more completely. Document --defines and -d
2302 separately since the former takes an argument but, for POSIX Yacc, the
2303 latter does not.
2304 (short_options): Let -W take an optional argument like --warnings.
2305 (getargs): Sort cases.
2306
2307 2008-02-28 Akim Demaille <demaille@gostai.com>
2308
2309 * doc/bison.texinfo: Fix a few typos.
2310
2311 2008-02-28 Akim Demaille <akim@epita.fr>
2312
2313 * doc/bison.texinfo (Bison Options): Document -W.
2314 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2315
2316 2008-02-28 Akim Demaille <akim@epita.fr>
2317
2318 * src/getargs.c (short_options): Split and sort for readability.
2319 -g and -x take optional arguments, just like their long options.
2320 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2321 understand.
2322 Fix the handling of $opt which resulted in all the argument to be
2323 considered as optional.
2324
2325 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2326
2327 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2328 say its interface is experimental.
2329 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2330 Java.
2331 (Bison Options): In the -L and --language entry, mention Java.
2332 (Java Bison Interface): Say the interface is experimental.
2333 * src/getargs.c (usage): Mention -L and --language.
2334
2335 * NEWS (2.3a+): Say the push parsing interface is experimental.
2336 * doc/bison.texinfo (Push Decl): Likewise.
2337 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2338 (Push Parser Function): Likewise.
2339 (Pull Parser Function): Likewise.
2340 (Parser Create Function): Likewise.
2341 (Parser Delete Function): Likewise.
2342 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2343 yypull_parse, and yypush_parse entries.
2344
2345 * NEWS (2.3a+): Mention XML support, and say the schema is
2346 experimental.
2347 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2348 * src/getargs.c (usage): Say the XML schema is experimental.
2349
2350 * NEWS (2.3a+): Say option instead of flag.
2351
2352 2008-02-21 Wojciech Polak <polak@gnu.org>
2353
2354 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2355 text.
2356
2357 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
2358
2359 Fix impure push parser compile error reported by Bob Rossi at
2360 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
2361 * data/yacc.c: Clean up whitespace in the output a little.
2362 (yypstate_allocated): Define for impure push parsers regardless of
2363 whether the pull interface is also requested.
2364 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
2365 check impure push parsers without the pull interface.
2366
2367 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
2368 yyerror takes arguments specified by %parse-param while yypstate_new
2369 does not.
2370 * doc/bison.texinfo (Parser Create Function): Document that
2371 yypstate_new returns 0 for multiple impure parser instances.
2372 * tests/push.at (Push Parsing: Multiple impure instances): Update
2373 expected stderr output.
2374
2375 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2376
2377 * runtime-po/POTFILES.in (push.c): Remove.
2378
2379 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2380
2381 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
2382 * data/push.c: Rename to...
2383 * data/yacc.c: ... this, overwriting it.
2384 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
2385 `%push-pull-parser' -> `%define api.push_pull "both"'.
2386 Remove old yacc.c tests, and update push.c tests to yacc.c.
2387
2388 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2389
2390 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
2391 `"%code top" blocks' instead of `%code "top" blocks'.
2392 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
2393 Clean up whitespace in the output a little.
2394
2395 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2396
2397 Fix documentation problems reported by Tim Josling at
2398 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
2399 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
2400 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
2401 integers. Explain the effect of literal string aliases on error
2402 messages. Copy token 0 documentation from the C++ skeleton
2403 documentation.
2404
2405 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2406
2407 Accept a token number in a %left, %right, or %nonassoc for POSIX
2408 conformance. Reported by Tim Josling at
2409 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
2410 * NEWS (2.3a+): Mention.
2411 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
2412 and code numbers are treated by precedence declarations.
2413 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
2414 of symbols.1.
2415 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
2416 of symbol.
2417 (symbol.prec): New, just like symbol but allows INT.
2418 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
2419 longer holds.
2420 * tests/regression.at (Token number in precedence declaration): New
2421 test case.
2422
2423 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2424
2425 DJGPP specific issues.
2426 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
2427 be changed. Copyright timestamp adjusted.
2428 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
2429 be changed. Copyright timestamp adjusted.
2430 * djgpp/config.site: Copyright timestamp adjusted.
2431 * djgpp/config_h.sed: Copyright timestamp adjusted.
2432 * djgpp/djunpack.bat: Copyright timestamp adjusted.
2433 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
2434 filename translation list.
2435 * djgpp/subpipe.c (init_subpipe): Check the environment variables
2436 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
2437 files shall be created. Before trying to use the temp dir where the
2438 environment variable points to check that the dir really exists. If
2439 not default to the cwd as temp dir. Copyright timestamp adjusted.
2440 * djgpp/subpipe.h: Copyright timestamp adjusted.
2441 * djgpp/testsuite.sed: Copyright timestamp adjusted.
2442
2443 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
2444
2445 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
2446
2447 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
2448
2449 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
2450 Problem reported by Claudio Saavedra in
2451 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
2452
2453 2008-01-05 Wojciech Polak <polak@gnu.org>
2454
2455 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
2456 document's title with the input grammar file name.
2457
2458 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
2459
2460 Automate regression testing of the XML/XSLT implementation. Discussed
2461 starting at
2462 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
2463 * configure.ac (XSLTPROC): New substitution.
2464 * Makefile.am (maintainer-xml-check): New phony target invoking...
2465 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
2466 invoking make maintainer-check with BISON_TEST_XML=1.
2467 * tests/atlocal.in (XSLTPROC): New.
2468 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
2469 not to report reachable memory when Bison is expected to have a
2470 non-zero exit status and (2) to compare XML/XSLT output with --graph
2471 and --report=all output for every working grammar when
2472 BISON_TEST_XML=1.
2473 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
2474 (AT_BISON_CHECK_XML): New.
2475 (AT_QUELL_VALGRIND): New.
2476 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
2477 (AT_CHECK): ... don't redefine this since this was the old way to
2478 quell Valgrind.
2479 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
2480 AT_BISON_CHECK invocations.
2481 * tests/c++.at: Likewise.
2482 * tests/calc.at: Likewise.
2483 * tests/conflicts.at: Likewise.
2484 * tests/cxx-type.at: Likewise.
2485 * tests/existing.at: Likewise.
2486 * tests/glr-regression.at: Likewise.
2487 * tests/headers.at: Likewise.
2488 * tests/input.at: Likewise.
2489 * tests/java.at: Likewise.
2490 * tests/output.at: Likewise.
2491 * tests/push.at: Likewise.
2492 * tests/reduce.at: Likewise.
2493 * tests/regression.at: Likewise.
2494 * tests/sets.at: Likewise.
2495 * tests/skeletons.at: Likewise.
2496 * tests/synclines.at: Likewise.
2497 * tests/torture.at: Likewise.
2498 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
2499 tends to hang xsltproc.
2500 (Big horizontal): Likewise.
2501
2502 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2503
2504 In XML output, remove redundant class attribute on symbol element.
2505 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
2506 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
2507 look up a symbol to determine whether it's a nonterminal or terminal.
2508 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
2509 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
2510
2511 Add prec/assoc information to XML output.
2512 * src/gram.c (grammar_rules_print_xml): For each rule that has a
2513 %prec, add a percent_prec attribute.
2514 * src/print-xml.c (print_grammar): For each terminal that has a
2515 precedence or associativity, add a prec or assoc attribute.
2516 (xml_indent): New.
2517 (xml_puts): Use xml_indent.
2518 (xml_printf): Use xml_indent.
2519 * src/print-xml.h (xml_indent): Prototype.
2520
2521 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
2522 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2523
2524 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2525
2526 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
2527 (bison:ruleByNumber): ... this for clarity.
2528 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
2529 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
2530 (xsl:template match="reduction"): Update.
2531 (xsl:template match="item"): Update.
2532 (xsl:template match="reduction"): Update.
2533
2534 In the XML output, don't print the list of rules where symbols appear.
2535 Compute it in XSLT instead. Discussed at
2536 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
2537 * data/xslt/bison.xsl (bison:ruleByLhs): New.
2538 (bison:ruleByRhs): New.
2539 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
2540 bison:ruleByRhs.
2541 (xsl:template match="terminal/rule"): Remove.
2542 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2543 bison:ruleByRhs.
2544 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2545 Remove.
2546 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
2547 bison:ruleByRhs and mode="number-link" for rule template.
2548 (xsl:template match="terminal/rule"): Remove.
2549 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2550 bison:ruleByRhs and mode="number-link" for rule template.
2551 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2552 Rewrite as...
2553 (xsl:template match="rule" mode="number-link"): ... this.
2554 * src/print-xml.c (print_grammar): Don't print the list of rules.
2555
2556 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2557
2558 Don't let --report affect XML output; always print all information.
2559 Discussed at
2560 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
2561 * src/conflicts.c (log_resolution): Implement.
2562 * src/print-xml.c (print_core): Implement.
2563 (print_state): Implement.
2564 (print_xml): Implement.
2565
2566 * NEWS (2.3a+): Fix quotes.
2567 * src/parse-gram.y (prologue_declaration): For consistency with -v,
2568 don't let %verbose clear the list specified by --report.
2569
2570 2007-11-26 Akim Demaille <akim@epita.fr>
2571
2572 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
2573
2574 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
2575
2576 In the XML output, list useless and unused symbols and rules with the
2577 useful ones and add a "usefulness" attribute. Discussed starting at
2578 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
2579 * src/gram.c (grammar_rules_partial_print_xml): Remove.
2580 (grammar_rules_print_xml): Print all rules instead of just those
2581 useful in the grammar, and add a "usefulness" attribute.
2582 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
2583 * src/print-xml.c (print_rules_useless_in_parser): Remove.
2584 (print_grammar): Print all nonterminals instead of just useful ones,
2585 and add a "usefulness" attribute to nonterminals and terminals.
2586 (print_xml): Don't print a separate "reductions" or
2587 "rules-useless-in-parser" element.
2588 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
2589 (reduce_xml): Remove.
2590 (reduce_token_unused_in_grammar): New.
2591 (reduce_nonterminal_useless_in_grammar): New.
2592 * src/reduce.h (reduce_xml): Remove prototype.
2593 (reduce_token_unused_in_grammar): Add prototype.
2594 (reduce_nonterminal_useless_in_grammar): Add prototype.
2595 * data/xslt/xml2text.xsl: Update for XML changes.
2596 * data/xslt/xml2xhtml.xsl: Update for XML changes.
2597 * tests/reduce.at (Useless Terminals): Update output.
2598 (Useless Rules): Update output.
2599 (Reduced Automaton): Update output.
2600
2601 Say "Terminals unused in grammar" instead of "Unused terminals".
2602 * NEWS (2.3a+): Update.
2603 * doc/bison.texinfo (Understanding): Update example output.
2604 * src/reduce.c (reduce_output): Implement.
2605 * data/xslt/xml2text.xsl: Implement.
2606 * data/xslt/xml2xhtml.xsl: Implement.
2607
2608 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2609
2610 Accept --report-file=FILE to override the default `.output' filename.
2611 * NEWS (2.3a+): Mention.
2612 * doc/bison.texinfo (Bison Options): Add an entry.
2613 * src/files.c (compute_output_file_names): Don't override
2614 spec_verbose_file if already set.
2615 * src/getargs.c (usage): Document --report-file.
2616 (REPORT_FILE_OPTION): New anonymous enum member.
2617 (long_options): Add entry for it.
2618 (getargs): Add case for it setting spec_verbose_file.
2619
2620 * build-aux/cross-options.pl: Don't record a short option just because
2621 there's an arg.
2622 * doc/.cvsignore: Add yacc.1.
2623
2624 2007-11-14 Akim Demaille <akim@epita.fr>
2625
2626 * doc/yacc.1.in: New.
2627 * configure.ac, doc/Makefile.am: Adjust.
2628 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
2629 config.h symbol.
2630 Use AC_SUBST for assignments too.
2631 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
2632
2633 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2634
2635 * src/gram.c: Remove comments that duplicate comments in gram.h.
2636
2637 When reporting useless rules and nonterminals, say "useless in grammar"
2638 instead of "useless", and say "useless in parser" instead of "never
2639 reduced". Discussed starting at
2640 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
2641 * NEWS (2.3a+): Mention this change.
2642 * data/xslt/xml2text.xsl: Update output text and expected input XML
2643 element names to match changes below.
2644 * data/xslt/xml2xhtml.xsl: Likewise.
2645 (xsl:template match="bison-xml-report"): Add missing entry in Table of
2646 Contents: "Rules useless in parser due to conflicts".
2647 * doc/bison.texinfo (Decl Summary): Reword a little.
2648 (Understanding): Update example output for changes below.
2649 * src/gram.c: (rule_useful_p): Rename to...
2650 (rule_useful_in_grammar_p): ... this.
2651 (rule_useless_p): Rename to...
2652 (rule_useless_in_grammar_p): ... this.
2653 (rule_never_reduced_p): Rename to...
2654 (rule_useless_in_parser_p): ... this.
2655 (grammar_rules_print): Update for renames.
2656 (grammar_rules_print_xml): Update for renames.
2657 (grammar_rules_never_reduced_report): Rename to...
2658 (grammar_rules_useless_report): ... this since it is used for either
2659 kind of useless rule.
2660 * src/gram.h: Reword comments and update function names in prototypes.
2661 * src/main.c (main): Say "rule useless in parser due to conflicts".
2662 * src/print-xml.c (print_rules_never_reduced): Rename to...
2663 (print_rules_useless_in_parser): ... this, and rename output XML
2664 element "rules-never-reduced" to "rules-useless-in-parser".
2665 (print_xml): Update for rename.
2666 * src/print.c (print_results): Say "Rules useless in parser due to
2667 conflicts".
2668 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
2669 (nonterminals_reduce): Say "nonterminal useless in grammar".
2670 (reduce_output): Say "Nonterminals useless in grammar".
2671 Say "Rules useless in grammar".
2672 (reduce_xml): Rename output XML element "useless" to
2673 "useless-in-grammar".
2674 (reduce_print): Don't report the count of grammatically useless rules
2675 as "rules never reduced" just because %yacc is specified.
2676 In the correct report of this count, say nonterminal(s) and rule(s)
2677 "useless in grammar".
2678 * tests/conflicts.at (S/R in initial): Update expected output.
2679 (Defaulted Conflicted Reduction): Likewise.
2680 (Unreachable States After Conflict Resolution): Likewise.
2681 * tests/existing.at (GNU pic Grammar): Likewise.
2682 * tests/reduce.at (Useless Nonterminals): Likewise.
2683 (Useless Rules): Likewise.
2684 (Reduced Automaton): Likewise.
2685 (Underivable Rules): Likewise.
2686 (Empty Language): Likewise.
2687
2688 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2689
2690 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
2691 here document and before the EOF so that BSD's implementation of Bourne
2692 shell doesn't parse the delimiter as part of the here document.
2693 * doc/.cvsignore: Add cross-options.texi.
2694 * src/getargs.c (usage): Add a blank line after the warning categories.
2695
2696 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
2697
2698 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
2699
2700 2007-11-05 Akim Demaille <akim@epita.fr>
2701
2702 Remove Id: from bison.1.
2703 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
2704 (perl -0777 -pi -e 's/\.PP\nId): New.
2705 (.x.1): Use it to ignore the version control revision.
2706
2707 2007-11-05 Akim Demaille <demaille@gostai.com>
2708
2709 * build-aux/Makefile.am: Ship cross-options.pl.
2710 * doc/Makefile.am: Always refer to cross-options.texi with
2711 $(srcdir).
2712 (MAINTAINERCLEANFILES): Add it.
2713
2714 2007-11-04 Akim Demaille <demaille@gostai.com>
2715
2716 Generate the long/short option cross-table.
2717 * build-aux/cross-options.pl: New.
2718 * doc/Makefile.am (cross-options.texi): New.
2719 * doc/bison.texinfo: Use it.
2720
2721 2007-11-04 Akim Demaille <demaille@gostai.com>
2722
2723 Generate bison.1 using help2man.
2724 * doc/common.x, doc/bison.x: New.
2725 * doc/Makefile.am (bison.1, .x.1): New.
2726 The code is taken from autoconf-2.61/man/Makefile.am.
2727 * configure.ac: Look for help2man.
2728
2729 2007-11-04 Akim Demaille <demaille@gostai.com>
2730
2731 Complete --help.
2732 * src/getargs.c (usage): Document -W, make it clear that -d,
2733 -g and -x have optional arguments.
2734
2735 2007-11-04 Akim Demaille <demaille@gostai.com>
2736
2737 Find sha1sum when named gsha1sum.
2738 * bootstrap (find_tool): New.
2739 ($SHA1SUM): New.
2740
2741 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2742
2743 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
2744 at
2745 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
2746 * NEWS (2.3a+): Mention.
2747 * data/bison.m4 (b4_pure_if): Don't define it here.
2748 * data/c.m4 (b4_identification): Depend on individual skeletons to
2749 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
2750 values of the %define variables api.pure or api.push_pull. Define
2751 YYPURE, YYPUSH, and YYPULL accordingly.
2752 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
2753 glr.cc has already defined b4_pure_flag.
2754 * data/push.c: Define b4_pure_if based on `%define api.pure'.
2755 Remove YYPUSH and YYPULL since they're back in b4_identification again.
2756 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
2757 * doc/bison.texinfo (Pure Decl): Update.
2758 (Push Decl): Update.
2759 (Decl Summary): Add api.pure to %define entry.
2760 In %pure-parser entry, say it's deprecated and reference %define.
2761 (Pure Calling): Update.
2762 (Error Reporting): Update.
2763 (C++ Scanner Interface): Update.
2764 (How Can I Reset the Parser): Update.
2765 (Table of Symbols): In %pure-parser entry, say it's deprecated and
2766 reference %define.
2767 * src/getargs.c (pure_parser): Remove global variable.
2768 * src/getargs.h (pure_parser): Remove extern.
2769 * src/output.c (prepare): Don't define pure_flag muscle.
2770 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
2771 wrapper around `%define api.pure'.
2772 * tests/calc.at (Simple LALR Calculator): Update.
2773 (Simple GLR Calculator): Update.
2774 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
2775 Update.
2776 (GLR: Resolve ambiguity, pure, locations): Update.
2777 (GLR: Merge conflicting parses, pure, no locations): Update.
2778 (GLR: Merge conflicting parses, pure, locations): Update.
2779 * tests/glr-regression.at (Uninitialized location when reporting
2780 ambiguity): Update
2781 * tests/input.at (Unused %define api.pure): New test case.
2782 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
2783 AT_PURE_IF and AT_PURE_AND_LOC_IF.
2784 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
2785
2786 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2787
2788 %define push_pull -> %define api.push_pull. Discussed starting at
2789 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
2790 * data/push.c: Expect the new name.
2791 * data/yacc.c: Likewise.
2792 * doc/bison.texinfo (Push Decl): Update.
2793 (Decl Summary): Update %define entry.
2794 (Push Parser Function): Update.
2795 (Pull Parser Function): Update.
2796 (Parser Create Function): Update.
2797 (Parser Delete Function): Update.
2798 * tests/calc.at (Simple LALR Calculator): Update.
2799 * tests/input.at (%define enum variables): Update.
2800 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
2801 (Push Parsing: Multiple impure instances): Update.
2802 (Push Parsing: Unsupported Skeletons): Update.
2803 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
2804 (Exploding the Stack Size with Malloc): Update.
2805
2806 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
2807 other entries some.
2808
2809 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
2810
2811 For the XML output's terminal element, rename @number to @token-number,
2812 and add @symbol-number. In the nonterminal element, rename @number to
2813 @symbol-number. Discussed starting at
2814 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
2815 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
2816 renames.
2817 (xsl:template match="nonterminal"): Likewise.
2818 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
2819 (xsl:template match="nonterminal"): Likewise.
2820 * src/print-xml.c (print_grammar): Implement.
2821
2822 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2823
2824 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
2825 2007-10-11 change, the child elements here are items not rules.
2826 (xsl:template match="item"): New.
2827 (xsl:template match="rule"): Update for new reduced itemset.
2828 (xsl:template match="point"): Remove.
2829 (xsl:template match="empty"): For consistency with --graph, don't
2830 output "/* empty */".
2831 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
2832 line-wrap, don't pass a negative value as first-line-length since this
2833 won't work with the following changes.
2834 (xsl:template name="line-wrap"): Simplify slightly.
2835 (xsl:template name="ws-search"): Eliminate recursion.
2836 * src/print_graph.c (print_core): Don't print a reduction's lookahead
2837 set next to an item whose dot is not at the end of the RHS even if it
2838 happens to be associated with the same rule.
2839
2840 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
2841
2842 Add %define lr.keep_unreachable_states.
2843 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
2844 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
2845 * src/main.c (main): Implement it.
2846 * tests/conflicts.at (Unreachable States After Conflict Resolution):
2847 Extend to test it, and fix a typo.
2848
2849 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
2850
2851 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
2852 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
2853 the example .output text.
2854 * tests/regression.at (Extra lookahead sets in report): Improve wording
2855 of comments.
2856
2857 2007-10-17 Wojciech Polak <polak@gnu.org>
2858
2859 * src/print-xml.c (print_grammar): Renamed
2860 <terminal> and <nonterminal> attributes:
2861 "type" to "number" and "symbol" to "name".
2862 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
2863 Use new attribute names.
2864 (xsl:template match="nonterminal"): Likewise.
2865 * data/xslt/xml2xhtml.xsl: Likewise.
2866
2867 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
2868
2869 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
2870 (Option Cross Key): Likewise.
2871
2872 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
2873 next to an item whose dot is not at the end of the RHS even if it
2874 happens to be associated with the same rule.
2875 * src/print.c (print_core): Likewise.
2876 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
2877 (Resolved SR Conflicts): Update output.
2878 * tests/regression.at (Extra lookahead sets in report): New test case.
2879
2880 2007-10-11 Wojciech Polak <polak@gnu.org>
2881
2882 * src/print-xml.c (print_core): Remove item set
2883 redundancy.
2884 * data/xslt/bison.xsl (bison:ruleNumber): New key.
2885 Improve processing time. Suggested by Joel E. Denny.
2886 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
2887 Write xsl:param "required" attribute as comment.
2888 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
2889 (xsl:template match="rule"): Support new reduced itemset.
2890 (xsl:template match="point"): Remove.
2891 * data/xslt/xml2xhtml.xsl: Likewise.
2892
2893 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
2894
2895 * src/getargs.c (version): Update copyright year.
2896
2897 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
2898
2899 Make xml2dot.xsl and --graph produce the same output.
2900 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
2901 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
2902 escaped later.
2903 (xsl:template name="output-node"): Use the new escape template instead
2904 of the string-replace template directly.
2905 (xsl:template name="output-edge"): Likewise.
2906 (xsl:template name="escape"): New, escapes backslashes and newlines in
2907 addition to quotation marks.
2908 * src/graphviz.c (start_graph, output_node, output_edge): Add
2909 whitespace to output for legibility.
2910
2911 Make xml2text.xsl and --report produce the same output, and remove the
2912 XML "conflicts" element since a conflict summary is easily extracted
2913 from the automaton.
2914 * data/xslt/bison.xsl: New.
2915 (xsl:template match="state" mode="bison:count-conflicts): New.
2916 * data/xslt/xml2text.xsl: Import bison.xsl.
2917 (xsl:template match="bison-xml-report"): Instead of styling the
2918 "conflicts" element, style the "automaton" element with mode
2919 "conflicts". Unlike the former, the latter lists S/R and R/R
2920 conflicts for a state on the same line.
2921 (xsl:template match="conflicts"): Remove.
2922 (xsl:template match="conflict"): Remove.
2923 (xsl:template match="terminal"): Line-wrap the list of rules in which
2924 the terminal is used.
2925 (xsl:template match="nonterminal"): Likewise for nonterminals.
2926 (xsl:template match="automaton" mode="conflicts"): New.
2927 (xsl:template match="state" mode="conflicts"): New.
2928 (xsl:template name="line-wrap"): New.
2929 (xsl:template name="ws-search"): New.
2930 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
2931 (xsl:template match="bison-xml-report"): Instead of styling the
2932 "conflicts" element, style the "automaton" element with mode
2933 "conflicts."
2934 (xsl:template match="conflicts"): Remove.
2935 (xsl:template match="conflict"): Remove.
2936 (xsl:template match="automaton" mode="conflicts"): New.
2937 (xsl:template match="state" mode="conflicts): New.
2938 * src/conflicts.c (conflicts_output_xml): Remove.
2939 * src/conflicts.h (conflicts_output_xml): Remove prototype.
2940 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
2941 * src/print.c (print_grammar): Consistently wrap at the 66th column so
2942 the corresponding XSLT is easier. Also, never wrap between a word and
2943 the comma that follows it.
2944
2945 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
2946
2947 Improve C++ namespace support. Discussed starting at
2948 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
2949 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
2950 b4_namespace_close): New macros that interpret the %define variable
2951 "namespace" so its value can contain "::" to indicate nested
2952 namespaces.
2953 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
2954 the above macros.
2955 * data/lalr1.cc (b4_namespace): Likewise.
2956 * data/location.cc (b4_namespace): Likewise.
2957 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
2958 inside a new table in the general %define entry. Document `%define
2959 namespace' there as well. Point the %name-prefix entry to it since it
2960 explains it more completely in the case of C++.
2961 (C++ Bison Interface): Mention `%define namespace' instead of
2962 %name-prefix.
2963 (Table of Symbols): Remove the `%define push_pull' entry. The %define
2964 entry suffices.
2965 * tests/c++.at (Relative namespace references): New test case.
2966 (Absolute namespace references): New test case.
2967 (Syntactically invalid namespace references): New test case.
2968 * tests/input.at (C++ namespace reference errors): New test case.
2969
2970 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
2971
2972 Add syncline support and location accessor to internal %define
2973 interfaces.
2974 * data/bison.m4 (b4_percent_define_get_loc): New.
2975 (b4_percent_define_get_syncline): New.
2976 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
2977 (b4_percent_define_default): Record defining location as line 1 rather
2978 than 0 for the sake of synchronizing #line's, and define
2979 b4_percent_define_syncline(VARIABLE).
2980 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
2981 * src/muscle_tab.c (muscle_syncline_grow): New.
2982 (muscle_code_grow): Use muscle_syncline_grow.
2983 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
2984 define b4_percent_define_syncline(VARIABLE).
2985 (muscle_percent_define_get_loc): New.
2986 (muscle_percent_define_get_syncline): New.
2987 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
2988 remove some unused variables.
2989 (muscle_percent_define_default): Record defining location as line 1
2990 rather than 0 for the sake of synchronizing #line's, and define
2991 b4_percent_define_syncline(VARIABLE).
2992 (muscle_percent_define_check_values): Use
2993 muscle_percent_define_get_loc.
2994 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
2995 (muscle_percent_define_get_syncline): Prototype.
2996 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2997 defaults): Update output for location change.
2998 (Complaining during macro argument expansion): Extend to test
2999 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3000
3001 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3002
3003 Fix some error-reporting macro bugs.
3004 * data/bison.m4 (b4_cat): New.
3005 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3006 to stdout so they don't become arguments to other macros. Update
3007 comments and add examples.
3008 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3009 add examples.
3010 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3011 after printing the error directive so that M4 doesn't report subsequent
3012 problems that are induced by this problem.
3013 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3014 instead of just in them. Recognize @\n in both places. Both expand to
3015 the empty string. Needed by b4_cat.
3016 * tests/skeletons.at (Complaining during macro argument expansion):
3017 New test case.
3018 (Fatal errors make M4 exit immediately): New test case.
3019
3020 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3021
3022 Implement --print-datadir.
3023 * src/getargs.c (usage): Mention.
3024 (PRINT_DATADIR_OPTION): New anonymous enum member.
3025 (long_options): Add entry for it.
3026 (getargs): Add case for it calling compute_pkgdatadir.
3027 * src/output.c (output_skeleton): Encapsulate data directory
3028 computation from here...
3029 (prepare): ... and from here...
3030 (compute_pkgdatadir): ... into this new function.
3031 * src/output.h (compute_pkgdatadir): Prototype.
3032
3033 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3034
3035 * src/print-xml.c (escape_bufs): New static global variable
3036 replacing...
3037 (xml_escape_n): ... the static local variable buf here.
3038 (print_xml): Free memory for escape_bufs.
3039 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3040
3041 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3042
3043 Replace `%push-parser' and `%push-pull-parser' with
3044 `%define push_pull "push"' and `%define push_pull "both"'.
3045 `%define push_pull "pull"' is the default.
3046 * doc/bison.texinfo (Push Decl, Push Parser Function,
3047 Pull Parser Function, Parser Create Function, Parser Delete Function):
3048 Update declarations.
3049 (Decl Summary, Table of Symbols): Replace %push-parser and
3050 %push-pull-parser entries with a %define push_pull entry.
3051 * data/bison.m4 (b4_percent_define_check_values): New macro.
3052 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3053 definitions...
3054 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3055 definitions...
3056 * data/push.c: ... to here and compute them from the value of the
3057 %define variable push_pull.
3058 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3059 parsing requests here...
3060 * data/yacc.c: ... hack this to switch to push.c any time
3061 b4_use_push_pull_flag or the %define variable push_pull is set. This
3062 will go away when we mv push.c yacc.c.
3063 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3064 push parsing is not supported since unused %define variables are
3065 reported anyway.
3066 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3067 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3068 comments for consistency with b4_percent_define_check_values.
3069 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3070 muscles.
3071 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3072 Remove.
3073 (prologue_declaration): Remove %push-parser and %push-pull-parser
3074 rules.
3075 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3076 * tests/calc.at: Update declarations.
3077 * tests/input.at (%define enum variables): New test case.
3078 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3079 declaration.
3080 (Push Parsing: Multiple impure instances): Update declaration.
3081 (Push Parsing: Unsupported Skeletons): New test case.
3082 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3083 declaration.
3084 (Exploding the Stack Size with Malloc): Update declaration.
3085
3086 2007-09-24 Wojciech Polak <polak@gnu.org>
3087
3088 Add XSLT transformations.
3089
3090 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3091 * data/xslt/xml2text.xsl: Transform XML into plain text.
3092 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3093 * data/Makefile.am (xsltdir): New variable.
3094 (dist_xslt_DATA): Add xslt/*.xsl files.
3095
3096 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3097
3098 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3099 Problem reported by Wojciech Polak.
3100 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3101 (xml_printf): Undo change I made on 21 September; that is,
3102 indent 2 spaces, not 1.
3103
3104 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3105
3106 Pacify ./configure --enable-gcc-warnings.
3107 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3108 `char const *' instead of `char *'.
3109 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3110 local variable `sep'.
3111
3112 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3113
3114 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3115 elsewhere.
3116 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3117 (xml_printf): Indent just 1 space for level.
3118 (e_char, xlate_char): Remove.
3119 (xml_escape_string): Rewrite to avoid undefined behavior (used
3120 storage that was freed from the stack).
3121 (xml_escape_n): Don't bother checking for subscript error.
3122
3123 2007-09-21 Wojciech Polak <polak@gnu.org>
3124
3125 Add Bison XML Automaton Report.
3126
3127 Add support for an -x option to generate an XML report.
3128 It is not documented yet.
3129 * src/print-xml.c: New file.
3130 * src/print-xml.h: Likewise.
3131 * lib/timevar.def (TV_XML): New var.
3132 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3133 * src/conflicts.c: Include print-xml.h.
3134 (solved_conflicts_xml_obstack): New var.
3135 (log_resolution, conflicts_solve, conflicts_free):
3136 Add support for XML report.
3137 (conflicts_output_val): New function.
3138 * src/conflicts.h (conflicts_output_val): New decl.
3139 * src/files.c (spec_xml_file): New var.
3140 (compute_output_file_names, output_file_names_free): Add XML support.
3141 * src/files.h (spec_xml_file): New decl.
3142 * src/getargs.c (xml_flag): New var.
3143 (usage, short_options, long_options, getargs): Add XML support.
3144 * src/getargs.h (xml_flag): New decl.
3145 * src/gram.c: Include print-xml.h.
3146 (rule_lhs_print_xml, rule_rhs_print_xml):
3147 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3148 New functions.
3149 * src/gram.h: Declare external ones.
3150 * src/main.c: Include print-xml.h.
3151 (main): Add XML support.
3152 * src/reduce.c: Include print-xml.h.
3153 (reduce_xml): New function.
3154 * src/reduce.h: Declare it.
3155 * src/state.c: Include print-xml.h.
3156 (state_new): Add XML support.
3157 (state_rule_lookahead_tokens_print_xml): New function.
3158 * src/state.h: Declare it.
3159 (struct state): New member solved_conflicts_xml.
3160 * src/symtab.c (symbol_class_get_string): New function.
3161 * src/symtab.h: Declare it.
3162
3163 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3164
3165 * GNUmakefile: Switch to coreutils's version.
3166 * bootstrap: Likewise.
3167 * Makefile.cfg: Adjust to new GNUmakefile.
3168 * README-hacking: Likewise.
3169
3170 Import from gnulib:
3171
3172 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3173 Bruno Haible <bruno@clisp.org>
3174
3175 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3176 and is a script that invokes bison. Tighten the code. Add comments.
3177
3178 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3179
3180 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3181 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3182 * doc/bison.texinfo (Decl Summary): Fix.
3183 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3184 * tests/input.at (Boolean %define variables): Update output.
3185 * tests/skeletons.at (%define boolean variables: invalid skeleton
3186 defaults): Rename to...
3187 (%define Boolean variables: invalid skeleton defaults): ... this and
3188 update output.
3189
3190 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3191
3192 In impure push mode, don't allow more than one yypstate to be allocated
3193 since multiple impure parsers would corrupt yynerrs.
3194 * data/push.c (yypstate_allocated): New static global variable
3195 initialized to 0.
3196 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3197 exhaustion if yypstate_allocated is 1, but still return 2.
3198 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3199 already 1. Otherwise, set it to 1.
3200 (yypstate_delete): Set it to 0.
3201 * tests/push.at (Push Parsing: Multiple impure instances): New test
3202 case.
3203
3204 2007-08-17 Bob Rossi <bob@brasko.net>
3205
3206 * doc/bison.texinfo (Push Decl): Document the push parser.
3207 (Table of Symbols): Ditto.
3208 (Pure Decl): Ditto.
3209 (Decl Summary): Ditto.
3210 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3211 Parser Create Function, Parser Delete Function):
3212 Add new push parser symbols.
3213 (Table of Symbols): Document push-parser, push-pull-parser,
3214 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3215
3216 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3217
3218 Update to GPLv3.
3219 * doc/gpl-3.0.texi: New file.
3220 * doc/gpl.texi: Remove.
3221 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3222 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3223 * README-hacking, TODO, bootstrap, bootstrap.conf:
3224 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3225 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3226 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3227 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3228 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3229 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3230 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3231 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3232 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3233 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3234 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3235 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3236 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3237 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3238 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3239 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3240 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3241 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3242 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3243 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3244 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3245 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3246 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3247 * src/complain.c, src/complain.h, src/conflicts.c:
3248 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3249 * src/files.h, src/flex-scanner.h, src/getargs.c:
3250 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3251 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3252 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3253 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3254 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3255 * src/print.c, src/print.h, src/print_graph.c:
3256 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3257 * src/reduce.h, src/relation.c, src/relation.h:
3258 * src/revision.h, src/scan-code.h, src/scan-code.l:
3259 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3260 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3261 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3262 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3263 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3264 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3265 * tests/existing.at, tests/glr-regression.at:
3266 * tests/headers.at, tests/input.at, tests/java.at:
3267 * tests/local.at, tests/output.at, tests/push.at:
3268 * tests/reduce.at, tests/regression.at, tests/sets.at:
3269 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3270 * tests/torture.at:
3271 Update to GPLv3.
3272
3273 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3274
3275 Get rid of broken %no-parser, -n, and --no-parser implementation and
3276 documentation.
3277 * TODO: Don't mention them.
3278 * doc/bison.1: Likewise.
3279 * doc/bison.texinfo (Decl Summary): Likewise.
3280 (Bison Options): Likewise.
3281 (Option Cross Key): Likewise.
3282 * src/getargs.c (no_parser_flag): Remove global variable.
3283 (usage): Don't print description of -n and --no-parser.
3284 (long_options): Remove --no-parser entry here.
3285 (getargs): Remove -n case in the switch here.
3286 * src/getargs.h (no_parser_flag): Remove extern.
3287 * tests/regression.at (Web2c Actions): Remove comment that mentions
3288 --no-parser.
3289
3290 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3291
3292 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3293 name user variables starting with `yy'. Just pass NULL instead of a
3294 dummy local &yylval to yypush_parse.
3295 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3296 starting with `yy'.
3297
3298 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3299
3300 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3301 true since it's then always used regardless of whether yyoverflow is
3302 defined. Reported by Christian Burger at
3303 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3304 * THANKS: Add Christian Burger.
3305
3306 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3307 node names: say "Decl Summary" not "Bison Declaration Summary".
3308
3309 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3310
3311 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3312 determine whether this function has already complained about an invalid
3313 value for a %define boolean variable, don't check whether Bison has
3314 ever examined the value. As written, the check was a tautology.
3315 Instead, record and check for this complaint using a separate muscle.
3316
3317 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3318
3319 Fix push parsing memory leak reported by Brandon Lucia at
3320 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3321 * THANKS: Add Brandon Lucia.
3322 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3323 but the parse never completed and thus freed it.
3324 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3325 * tests/testsuite.at: Include push.at.
3326 * test/push.at: New.
3327 (Push Parsing: Memory Leak for Early Deletion): New test case.
3328
3329 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3330
3331 Improve handling of multiple S/R conflicts in the same state and of S/R
3332 conflicts involving multiple reductions.
3333 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3334 set for a state here or Bison will abort if it is reassigned on a
3335 later conflicted reduction in the same state.
3336 Similarly, don't finalize and assign the solved conflicts report here
3337 or it will be lost if it is reassigned on a later conflicted reduction
3338 in the same state.
3339 (set_conflicts): Instead, assign them both here after all S/R conflicts
3340 in the state have been fully examined.
3341 * src/print.c (shift_set): Rename to...
3342 (no_reduce_set): ... this.
3343 (print_reductions): Update for rename, and add %nonassoc error action
3344 tokens to no_reduce_set so that, when printing the first remaining
3345 reduction on an error action token, the reduction is enclosed in
3346 brackets.
3347 (print_results): Update for rename.
3348 * tests/conflicts.at (Solved conflicts report for multiple reductions
3349 in a state): New test case.
3350 (%nonassoc error actions for multiple reductions in a state): New test
3351 case.
3352
3353 * src/main.c (main): Don't depend on C99 features.
3354
3355 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3356
3357 * build-aux/.cvsignore: Add compile.
3358 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
3359 uniwidth.
3360
3361 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
3362
3363 * bootstrap (slurp): Create target directories that don't exist.
3364 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
3365
3366 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3367
3368 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
3369 than item number.
3370 * closure.c (closure): Likewise.
3371 * state.h (reductions): Comment sorting of rules.
3372 (state): Comment sorting of items.
3373
3374 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
3375
3376 Fix C++ test cases after recent Gnulib changes. Discussed starting at
3377 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
3378 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
3379 definition in order to avoid Gnulib headers since we don't use config.h
3380 here.
3381 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
3382 rather than AT_DATA so that config.h is included.
3383
3384 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
3385
3386 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
3387 instead of fprintf. Guard these functions with #if YYDEBUG instead of
3388 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
3389 and so that YYFPRINTF is guaranteed to be defined here.
3390
3391 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3392
3393 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
3394 with...
3395 (muscle_percent_define_check_values): ... this more helpful function.
3396 Again, it's not used yet, but it will be.
3397 * src/muscle_tab.h: Likewise.
3398
3399 Improve some comments in parser table construction.
3400 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
3401 (generate_states): Don't mention ruleset, which is internal to closure.
3402 * src/closure.c (closure): Explain sorting of core and itemset, which
3403 is required for this function to behave correctly.
3404 * src/closure.h (closure): Mention sorting.
3405
3406 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
3407
3408 * src/lalr.c (state_lookahead_tokens_count): For code readability,
3409 move the check for disabled transitions to an aver since conflict
3410 resolution hasn't happened yet.
3411
3412 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
3413 labels a state as inconsistent just because it has error transitions.
3414 The original form of this check appeared in revision 1.1 of lalr.c,
3415 which was committed on 1991-12-21. Now (at least), changing the
3416 consistency label on such a state appears to have no useful effect in
3417 any of the places it is examined, which I enumerate below. The key
3418 point to understanding each item in this enumeration is that a state
3419 with an error transition is labelled consistent in the first place only
3420 if it has no rules, so the check cannot matter for states that have
3421 rules. (1) Labelling a state as inconsistent will cause set_conflicts
3422 to try to identify its conflicts, and a state must have *rules* to have
3423 conflicts. (2) Labelling a state as inconsistent will affect how
3424 action_row sets the default *rule* for the state. (3) Labelling a
3425 state as inconsistent will cause build_relations to add lookback edges
3426 to *rules* in that state.
3427 * src/state.h (struct state): Word the comment for member consistent
3428 more carefully.
3429
3430 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3431
3432 Don't depend on C99 features.
3433 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
3434 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
3435 * src/reader.c (check_and_convert_grammar): Fix for-loop.
3436 * src/state.c (state_mark_reachable_states): Fix for-loop.
3437 (state_remove_unreachable_states): Fix for-loop.
3438
3439 Don't widen struct state with member reachable just to temporarily
3440 record reachability. Instead, use a local bitset.
3441 * src/state.h (struct state): Remove member.
3442 * src/state.c (state_new): Don't initialize it.
3443 (state_mark_reachable_states): Rename to...
3444 (state_record_reachable_states): ... this, and use bitset.
3445 (state_remove_unreachable_states): Use bitset.
3446
3447 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
3448
3449 * src/Makefile.am (yacc): Quote target action commands properly so
3450 that the yacc script isn't corrupt. Reported by Hans Aberg at
3451 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
3452
3453 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
3454 the case of pure parsers. Reported by Frans Englich at
3455 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
3456 * THANKS: Add Frans Englich.
3457
3458 * NEWS (2.3a+): In the %code entry, reference section `Bison
3459 Declaration Summary' from the manual now since the %code summary has
3460 moved there.
3461 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
3462 in the rules section must be terminated by semicolons.
3463
3464 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
3465
3466 Extend the front-end API for %define variables to more completely
3467 mirror the back-end. This will be useful in the future.
3468 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
3469 Update comments to mention the new front-end counterparts of these
3470 macros.
3471 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
3472 for muscle_string_decode and muscle_location_decode.
3473 (muscle_string_decode): New static function.
3474 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
3475 (muscle_percent_define_get, muscle_percent_define_ifdef): New
3476 functions.
3477 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
3478 muscle_percent_define_get to mimic the b4_percent_define_flag_if
3479 implementation more closely.
3480 (muscle_percent_define_invalid_value): New function.
3481 * src/muscle_tab.h (muscle_percent_define_get,
3482 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
3483 Prototype.
3484
3485 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3486
3487 * NEWS (2.3a+): Mention yesterday's state-removal change.
3488 (2.3a): Remove the %language entry, which was added after 2.3a.
3489 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
3490 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
3491 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
3492 tests/existing.at: Update copyright date.
3493
3494 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3495
3496 If conflict resolution makes states unreachable, remove those states,
3497 report rules that are then unused, and don't report conflicts in those
3498 states.
3499 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
3500 New global function.
3501 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
3502 function.
3503 * src/main.c (main): After conflict resolution, remove the unreachable
3504 states and update all data structures that reference states by number.
3505 * src/state.c (state_new): Initialize each state's reachable member to
3506 false.
3507 (state_mark_reachable_states): New static function.
3508 (state_remove_unreachable_states): New global function.
3509 * src/state.h (struct state): Add member bool reachable.
3510 (state_remove_unreachable_states): Prototype.
3511 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3512 New test case.
3513 * tests/existing.at (GNU pic Grammar): Update test case output now that
3514 an unused rule is discovered.
3515
3516 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3517
3518 Minor code cleanup in parser table construction.
3519 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
3520 (new_itemsets, save_reductions): Update for rename to nitemset.
3521 * src/closure.c (nritemset): Rename to...
3522 (nitemset): ... this since the "r" appears to meaningless and isn't
3523 used in the comments.
3524 (closure): Update for rename.
3525 * src/closure.h (nritemset): Update extern to...
3526 (nitemset): ... this.
3527 * src/lalr.c (LA): Fix a typo in comments.
3528 * src/print.c (print_core): Update for rename to nitemset.
3529 * src/print_graph.c (print_graph): Likewise.
3530 * src/state.h: Fix some typos in header comments.
3531
3532 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
3533
3534 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
3535 still sticks to ASCII. Sorry!
3536
3537 * README-hacking: New file, taken mostly from coreutils, with changes
3538 for Bison. Contains much of the contents of:
3539 * README-cvs: Remove.
3540 * bootstrap: Sync from gnulib.
3541 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
3542 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
3543
3544 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
3545
3546 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
3547 Setzer.
3548 (Java Differences): Fix some typos.
3549 * THANKS: Add Sebastian Setzer.
3550
3551 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
3552
3553 * data/java.m4 (b4_single_class_if): Remove.
3554 (b4_abstract_if): Look at "%define abstract".
3555 (b4_lexer_if): New.
3556 (b4_union_name): Rename...
3557 (b4_yystype): ... to this. Map to "%define stype".
3558 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
3559 b4_maybe_throws): Fix quoting.
3560 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
3561 * data/lalr1.java (Lexer interface): Always define.
3562 (Lexer interface within parser class): Remove.
3563 (YYLexer class): New, used when "%code lexer" is present.
3564 (constructor): When "%code lexer" is used, pass %lex-param
3565 to the lexer constructor.
3566 (yylex, yyparse): Remove %lex-param from method invocations
3567 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
3568
3569 * doc/bison.texinfo (Java Bison Interface): Mention "%define
3570 abstract". Rename "%define union_name" to "%define stype".
3571 Rename method names according to previous patch.
3572 (Java Scanner Interface): Describe "%code lexer" instead of
3573 "%pure-parser" and "%define single_class".
3574 (Java Differences): Mention "%code lexer".
3575
3576 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
3577 Include scanner here, using macros from tests/local.at.
3578 (AT_DATA_CALC_Y): Remove final argument.
3579 (_AT_CHECK_JAVA_CALC): Likewise.
3580 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
3581 of %locations and %error-verbose.
3582 (main): Test with and without %lex-param.
3583 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
3584 (AT_BISON_OPTION_POPDEFS): Pop it.
3585
3586 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3587
3588 DJGPP spefic issue. Inhibit the use of disallowed characters for
3589 file name genertion on Win98, WinXP, etc. These are |<>":?*\
3590 and concern testsuite case 46.
3591 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
3592 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
3593 * djgpp/config.bat: Inhibit the use of disallowed characters.
3594
3595 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3596
3597 Miscellaneous %define and %code cleanup.
3598 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
3599 values are interpreted.
3600 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
3601 documentation a little more.
3602 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
3603 muscle_percent_define_insert, muscle_percent_code_grow): New
3604 functions/macros.
3605 * src/muscle_tab.h (muscle_percent_define_insert,
3606 muscle_percent_code_grow): Prototype.
3607 * src/parse-gram.y (prologue_declaration): Use
3608 muscle_percent_define_insert and muscle_percent_code_grow when parsing
3609 %define and %code directives.
3610
3611 Make it easy to share %define boolean variables between the front-end
3612 and back-end. Though not used yet, this will be useful in the future.
3613 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
3614 Bison uses of names rather than just skeleton uses of names.
3615 (b4_percent_define_get, b4_percent_define_ifdef): Rename
3616 b4_percent_define_skeleton_variables(VARIABLE) to
3617 b4_percent_define_bison_variables(VARIABLE).
3618 (b4_percent_code_get, b4_percent_code_ifdef): Rename
3619 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
3620 b4_percent_code_bison_qualifiers(QUALIFIER).
3621 (b4_check_user_names_wrap): Update for renames.
3622 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
3623 muscle_percent_define_default): New functions mimicking
3624 b4_percent_define_flag_if and b4_percent_define_default.
3625
3626 For %define variables, report locations for invalid values and
3627 redefinitions.
3628 * data/bison.m4 (b4_percent_define_flag_if): Read
3629 b4_percent_define_loc(VARIABLE) to report the location of an invalid
3630 value for VARIABLE.
3631 (b4_percent_define_default): Save a special location in
3632 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
3633 must later be reported as invalid.
3634 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
3635 functions.
3636 (muscle_percent_define_insert): Record the location of VARIABLE in
3637 muscle percent_define_loc(VARIABLE), and use it to report the previous
3638 location for a redefinition.
3639 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
3640 (muscle_percent_define_default): Update like b4_percent_define_default.
3641 (muscle_grow_user_name_list): Rename to...
3642 (muscle_user_name_list_grow): ... this for consistency and use
3643 muscle_location_grow.
3644 * src/muscle_tab.h (muscle_location_grow): Prototype.
3645 * tests/input.at (%define errors): Update expected output.
3646 * tests/skeletons.at (%define boolean variables: invalid skeleton
3647 defaults): New test case.
3648
3649 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
3650
3651 * src/print.c (lookahead_set, state_default_rule): Remove.
3652 (print_reductions): Replace state_default_rule invocation with
3653 equivalent use of yydefact, which was computed in token_actions in
3654 tables.c.
3655 (print_results): Don't allocate lookahead_set.
3656
3657 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
3658
3659 * data/lalr1.java: Prefix all private members with yy.
3660
3661 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
3662
3663 Use YYFPRINTF instead of fprintf where appropriate. Reported by
3664 Sebastien Fricker at
3665 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
3666 * THANKS: Add Sebastien Fricker.
3667 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
3668 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
3669 accept a variable number of arguments.
3670
3671 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3672
3673 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
3674
3675 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3676
3677 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
3678 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
3679 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
3680
3681 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
3682
3683 Undo my 2007-02-07 change, switching back to the c-strcase module
3684 introduced in the 2007-02-03 change. Bruno Haible reported that
3685 the 2007-02-07 change would be dangerous in Turkish if we add a
3686 language whose name contains "i", since "i" is not lowercase "I"
3687 in Turkish.
3688 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
3689 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
3690 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
3691 * m4/.cvsignore: Remove strcase.m4.
3692 * src/getargs.c: Revert 2007-02-07 change, as follows.
3693 Include c-strcase.h.
3694 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
3695
3696 2007-02-11 Bruno Haible <bruno@clisp.org>
3697
3698 Enable the Java related testsuite tests when the only Java compiler
3699 found is a gcj < 4.3. Discussed at
3700 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
3701 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
3702
3703 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
3704
3705 * data/Makefile.am: Update copyright date.
3706 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
3707 yypstate_new returns NULL.
3708 (yypstate_new): Return NULL if malloc does.
3709 * src/reader.c (packgram): Move translation of rule actions from the
3710 beginning of packgram to...
3711 (check_and_convert_grammar): ... here right before packgram is invoked
3712 so it's easier to write more complete comments, and remove redundant
3713 code.
3714
3715 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
3716
3717 As in semantic actions, make @$ in %initial-action, %destructor, and
3718 %printer imply %locations.
3719 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
3720 scanning @$.
3721 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
3722 (@$ in %initial-action implies %locations,
3723 @$ in %destructor implies %locations,
3724 @$ in %printer implies %locations): ... these new test cases.
3725
3726 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
3727
3728 Undo most of the 2007-02-03 change, switching to the strcase module
3729 now that gnulib strcase has been fixed.
3730 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
3731 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
3732 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
3733 * m4/.cvsignore: Add strcase.m4.
3734 * src/getargs.c: Revert 2007-02-03 change, as follows.
3735 Don't include c-strcase.h.
3736 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
3737 strcasecmp has "unspecified behavior" outside the POSIX locale,
3738 but it works fine in practice if at least one argument is ASCII,
3739 as is the case in Bison.
3740
3741 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
3742
3743 * tests/java.at: Skip tests if only one of javac/java is present.
3744 Reported by Joel E. Denny.
3745 * tests/atlocal.in: Adjust copyright years.
3746
3747 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
3748
3749 * data/lalr1.java (Stack): Work around old verifiers that disallow
3750 access to the private fields of an inner class, from the outer class.
3751 We can make Stack's fields public because user code doesn't have access
3752 to the instance of Stack used by parse(). Reported by Paul Eggert.
3753
3754 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
3755
3756 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
3757 the right spot for these files?
3758 * bootstrap.conf (gnulib_modules): Add c-strcase.
3759 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
3760 c-strncasecmp.c.
3761 * src/getargs.c: Include c-strcase.h.
3762 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
3763 to avoid unspecified behavior.
3764
3765 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
3766
3767 * doc/bison.texinfo (Decl Summary): Correct typo.
3768
3769 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
3770
3771 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
3772 Complain if the value does not match empty, "true" or "false".
3773 * data/c++.m4: Adjust default definitions of %define variables.
3774 * data/java.m4: Adjust default definitions of %define variables.
3775 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
3776 to above behavior.
3777 * tests/input.at (Boolean %define variables): Test new behavior.
3778
3779 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
3780
3781 * NEWS: Mention java.
3782 * TODO: Remove things that are done.
3783 * bootstrap.conf: Add javacomp-script and javaexec-script.
3784 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
3785
3786 * data/Makefile.am: Add new files.
3787 * data/java-skel.m4: New.
3788 * data/java.m4: New.
3789 * data/lalr1.java: New.
3790
3791 * doc/bison.texinfo: Put "A Complete C++ Example" under
3792 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
3793 under Other Languages.
3794
3795 * src/getargs.c (valid_languages): Add Java.
3796 * src/getargs.h (struct bison_language): Update size of string fields.
3797
3798 * tests/Makefile.am: Add java.at.
3799 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
3800 * tests/java.at: New.
3801 * tests/testsuite.at: Include it.
3802
3803 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
3804
3805 Clean up.
3806 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
3807 at_directive_argv arguments so these no longer have to be global
3808 variables. Also, update the implementation for the following changes.
3809 (fail_for_at_directive_too_many_args,
3810 fail_for_at_directive_too_few_args): Add at_directive_name argument.
3811 (at_directive_name): Remove as at_directive_argv[0] will be used for
3812 this now.
3813 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
3814 for the directive name.
3815 (at_directive_argc, at_directive_argv): Make these local within
3816 skel_lex instead of global.
3817 (INITIAL): Update directive start action for above changes.
3818 (SC_AT_DIRECTIVE_ARG): Rename to...
3819 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
3820 (SC_AT_DIRECTIVE_SKIP_WS): Update.
3821 (scan_skel): Move yylex_destroy to...
3822 (skel_scanner_free): ... here.
3823 * tests/skeletons.at (installed skeleton file name): Rename to...
3824 (installed skeleton file names): ... this.
3825
3826 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
3827
3828 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3829 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
3830 Summary" not "Directives".
3831 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
3832 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
3833 since the former is now the more complete one.
3834 (Prologue Alternatives): Likewise and do the same for %defines.
3835 (Table of Symbols): Add summary of %code, add summary of %define, and
3836 move full %code documentation to...
3837 (Decl Summary): ... here for consistency with other entries in these
3838 sections.
3839 Move %define entry in order to keep this list alphabetized.
3840 Reword %define entry a little to put less emphasis on the skeleton
3841 concept, which most users shouldn't have to think about.
3842
3843 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
3844
3845 Adjust to recent gnulib changes.
3846 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
3847 Add string.h, string_.h, unistd_.h, wchar_.h.
3848 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
3849 * src/system.h: Don't include <stpcpy.h>; this is now done by
3850 <string.h>.
3851
3852 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
3853
3854 Simplify implementation of unqualified %code, implement macros for
3855 uniform treatment of boolean %define flags. Document %define.
3856 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
3857 b4_percent_code_ifdef): New.
3858 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
3859 * data/c++.m4: Define default value for global_tokens_and_yystype.
3860 * data/glr.cc: Likewise.
3861 * data/location.cc: Use b4_percent_define_flag_if.
3862
3863 * doc/bison.texinfo (Decl Summary): Document %define.
3864
3865 * src/parse-gram.y (Unqualified %code): Change muscle name to
3866 b4_percent_code().
3867 (content.opt): Default to empty.
3868
3869 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
3870
3871 Implement support for relative and absolute skeleton file names.
3872 Discussed starting at
3873 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
3874 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
3875 (Bison Options): Document in --skeleton entry.
3876 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
3877 full_skeleton can't necessarily hold all of pkgdatadir.
3878 If the specified skeleton file name contains a `/', don't prepend
3879 pkgdatadir.
3880 * src/parse-gram.y (prologue_declaration): If the specified skeleton
3881 file name contains a `/', prepend the grammar file directory.
3882 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
3883 * skeletons.at: New file.
3884 (relative skeleton file names): New test case.
3885 (installed skeleton file names): New test case.
3886 * tests/testsuite.at: Include skeletons.at.
3887
3888 * bootstrap: Update copyright to 2007.
3889
3890 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
3891
3892 * bootstrap: Remove occurrences of .#bootmp from the files.
3893
3894 2007-01-17 Akim Demaille <akim@epita.fr>
3895
3896 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
3897 nonterminals.
3898 Use per-type %printer.
3899
3900 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
3901
3902 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
3903 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3904 djgpp/config.site, src/files.c, src/files.h, src/main.c,
3905 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
3906 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
3907 tests/glr-regression.at, tests/input.at, tests/local.at,
3908 tests/output.at, tests/torture.at: Update copyright to 2007.
3909
3910 2007-01-16 Akim Demaille <akim@epita.fr>
3911
3912 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
3913 error code.
3914 (Calc++ Scanner): Exit with failure if we can't open the input
3915 file.
3916 Accept "-" standing for stdin.
3917 (Calc++ Top Level): Print the result only if the parsing was
3918 successful.
3919
3920 2007-01-16 Akim Demaille <akim@epita.fr>
3921
3922 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
3923
3924 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
3925 and Joel E. Denny <jdenny@ces.clemson.edu>
3926
3927 Clean up %define and %code implementation in M4 some. Most
3928 importantly, rename all related macros to be in the b4_percent_define
3929 and b4_percent_code namespaces. Also, complete support for `.' in
3930 %define variable names and %code qualifiers.
3931 * data/bison.m4 (b4_check_user_names): Check for special
3932 "SKELETON-NAMESPACE(name)" macros instead of using two nested
3933 m4_foreach loops.
3934 (b4_get_percent_define, b4_get_percent_code): Rename to...
3935 (b4_percent_define_get, b4_percent_code_get): ... these.
3936 Extend documentation with examples.
3937 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
3938 b4_percent_define_skeleton_variables and
3939 b4_percent_code_skeleton_qualifiers.
3940 Expect any value for the %define variable `foo' to be stored in the
3941 macro named `b4_percent_define(foo)'; expect any %code blocks for the
3942 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
3943 expect any unqualified %code blocks to be stored in a macro named
3944 `b4_percent_code_unqualified'.
3945 Use m4_indir so that %define variable names and %code qualifiers can
3946 contain `.', which is allowed by the grammar parser.
3947 (b4_percent_define_default): New macro to set a default value for a
3948 %define variable.
3949 (m4_wrap): Update wrapped code, and fix some underquoting.
3950 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
3951 Expect grammar uses of %define variables and %code qualifiers to be
3952 defined in b4_percent_define_user_variables and
3953 b4_percent_code_user_qualifiers.
3954 * data/c++.m4: Use b4_percent_define_default rather than
3955 m4_define_default. Fix some underquoting. Skeleton usage of %define
3956 variable define_location_comparison now implies skeleton usage of
3957 %define variable filename_type.
3958 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3959 data/push.c, data/yacc.c: Update macro names.
3960 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
3961 muscle names.
3962
3963 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3964
3965 DJGPP specific issues.
3966
3967 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
3968 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
3969
3970 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3971
3972 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
3973 run parsers in all tests so that Valgrind is invoked during
3974 maintainer-check-valgrind.
3975 (Duplicate representation of merged trees): Free all semantic values.
3976 (Duplicated user destructor for lookahead): Likewise.
3977
3978 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3979
3980 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
3981 command-line prefix.
3982 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
3983 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
3984 miss Valgrind messages.
3985 (Exploding the Stack Size with Malloc): Likewise.
3986
3987 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3988
3989 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
3990 locals. Reported by Juan Manuel Guerrero at
3991 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
3992 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
3993 Fix some indentation also.
3994 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
3995 explaining this issue.
3996
3997 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
3998 and Joel E. Denny <jdenny@ces.clemson.edu>
3999
4000 Simplify union and prologue handling, and escape union and lex/parse
4001 params with digraphs.
4002 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4003 values to the empty string since these are no longer guaranteed
4004 initialized by the front-end.
4005 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4006 braces around b4_user_stype since this is no longer done by the
4007 front-end.
4008 * src/files.c, src/files.h (pre_prologue_obstack,
4009 post_prologue_obstack): Remove.
4010 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4011 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4012 with digraphs. This fixes lex params and parse params.
4013 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4014 * src/output.c (prepare): Remove muscle insertion of the prologues.
4015 (output): Remove freeing of pre_prologue_obstack and
4016 post_prologue_obstack.
4017 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4018 than prologue_augment for prologue parsing so you don't need prologue
4019 obstacks.
4020 (grammar_declaration): For %union RHS, use `braceless' instead of
4021 "{...}" so that braces are already stripped and code is escaped with
4022 digraphs.
4023 * src/reader.c (prologue_augment): Remove.
4024 (reader): Remove initialization of pre_prologue_obstack and
4025 post_prologue_obstack.
4026 * src/reader.h (prologue_augment): Remove.
4027
4028 * data/c.m4: Remove stray parenthesis.
4029
4030 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4031
4032 Remove quotes from variables names in %define directives and from
4033 qualifiers in %code directives, and restrict the characters that are
4034 allowed in them to M4-friendly ones. For %define, continue to support
4035 the quoted form as a deprecated feature. Discussed starting at
4036 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4037 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4038 %code.
4039 * doc/bison.texinfo (Prologue Alternatives): Update.
4040 (Decl Summary): In %defines entry, update mention of `%code requires'
4041 and `%code provides'.
4042 (C++ Location Values): Update %define uses.
4043 (Calc++ Parser Interface): Likewise.
4044 (Calc++ Parser): Likewise, and update `%code requires' uses.
4045 (Table of Symbols): Update %code documentation.
4046 * src/parse-gram.y (prologue_declaration): For %define variables, use
4047 `variable' instead of `STRING'.
4048 (grammar_declaration): For %code qualifiers, use `ID' instead of
4049 `STRING'.
4050 (variable): New nonterminal that takes an `ID' or a `STRING'.
4051 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4052 and %define uses.
4053 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4054 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4055 (%define errors): Update %define uses.
4056
4057 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4058
4059 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4060 instead of muscle_insert for %define values so that M4-special
4061 characters are replaced with digraphs.
4062 * tests/input.at (%define errors): Extend to check weird values.
4063
4064 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4065
4066 Instead of having skeletons declare all valid %define variables and
4067 %code qualifiers, provide macros that retrieve the associated values
4068 and build these lists automatically. Thus Bison will now warn when a
4069 variable or qualifier is not used by the skeleton in the current
4070 invocation regardless of whether it might sometimes be used by that
4071 skeleton in other invocations. Also, move all %define value macros to
4072 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4073 form, which is replaced by %code.
4074 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4075 (b4_check_user_names): ... this, and change the series of valid name
4076 arguments to a single list argument for names used in the skeleton
4077 similar to the existing list argument for names used in the grammar.
4078 Warn instead of complaining.
4079 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4080 values and %code code, to format %code code properly, and to build
4081 lists of all %define variables and %code qualifiers used in the
4082 skeleton: b4_skeleton_percent_define_variables and
4083 b4_skeleton_percent_code_qualifiers.
4084 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4085 Remove, and...
4086 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4087 the skeleton names lists can finish building first. In place of
4088 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4089 expect the lists b4_user_percent_define_variables and
4090 b4_user_percent_code_qualifiers.
4091 * data/c++.m4: Where setting default values for b4_parser_class_name,
4092 b4_location_type, b4_filename_type, b4_namespace, and
4093 b4_define_location_comparison, update their names to the
4094 b4_percent_define_ namespace.
4095 * data/glr.c: Don't use b4_check_percent_define_variables and
4096 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4097 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4098 (b4_parser_class_name, b4_namespace): Define these using
4099 b4_get_percent_define for parser_class_name and namespace.
4100 * data/location.cc: Use b4_get_percent_define.
4101 * data/push.c: Don't use b4_check_percent_define_variables and
4102 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4103 * data/yacc.c: Likewise, and don't call m4_exit in
4104 b4_use_push_for_pull_if or m4_wrap code will never execute.
4105 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4106 Rename to...
4107 (muscle_grow_user_name_list): ... this for consistency with the
4108 terminology used in bison.m4.
4109 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4110 %define variable names, and rename muscle used_percent_define_variables
4111 to user_percent_define_variables.
4112 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4113 user_percent_code_qualifiers.
4114 (content): Remove.
4115 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4116 {CODE} form is no longer accepted.
4117 * tests/input.at (Reject bad %code qualifiers): Rename to...
4118 (Reject unused %code qualifiers): ... this, and update test output.
4119 (%define error): Update test output.
4120
4121 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4122
4123 Check for unrecognized %define variables similar to checking for
4124 unrecognized %code qualifiers. Check for redefined %define variables.
4125 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4126 generalizes...
4127 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4128 (b4_check_percent_define_variables): New, also wraps it.
4129 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4130 variables using b4_check_percent_define_variables.
4131 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4132 all those exercised in the test suite and all those listed in the
4133 `Default values' section of c++.m4. Are there others?
4134 * data/push.c, data/yacc.c: Declare no valid %define variables.
4135 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4136 similar to muscle_find, but it works even when the muscle stores a
4137 const value.
4138 (muscle_grow_used_name_list): New function for constructing the used
4139 name list muscles that b4_check_for_unrecognized_names requires.
4140 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4141 %define'd more than once. Define the b4_used_percent_define_variables
4142 muscle with muscle_grow_used_name_list.
4143 (grammar_declaration): Abbreviate %code code with
4144 muscle_grow_used_name_list.
4145 * tests/input.at (%define errors): New.
4146
4147 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4148
4149 Provide warn_at, complain_at, and fatal_at function callbacks to the
4150 skeletons, and use this for %code qualifier complaints.
4151 * data/bison.m4 (b4_error_at): New, invoked by...
4152 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4153 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4154 @fatal_at(...@) directives.
4155 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4156 qualifiers in b4_used_percent_code_qualifiers and to use
4157 b4_complain_at.
4158 * src/location.c, src/location.h (boundary_set_from_string): New global
4159 function.
4160 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4161 function.
4162 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4163 to b4_used_percent_code_qualifiers.
4164 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4165 function.
4166 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4167 (lineno): Rename to...
4168 (out_lineno): ... this so I don't misunderstand it again.
4169 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4170 here; these newlines are in the input but not the output file.
4171 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4172 (at_directive_perform): ... this new static function, and add handling
4173 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4174 directives.
4175 * tests/input.at (Reject bad %code qualifiers): Update test output with
4176 locations and extend.
4177
4178 * tests/output.at (Output file name: [, Output file name: ]): Remove
4179 bogus comment about these tests failing.
4180
4181 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4182
4183 Clean up b4_check_percent_code_qualifiers a little.
4184 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4185 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4186 documentation and add examples.
4187 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4188 qualifiers here.
4189
4190 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4191
4192 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4193 unreliable -- especially when they're hidden inside another macro.
4194 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4195 data/c.m4: Remove m4_divert(-1).
4196 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4197 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4198 m4_divert_push(0) and m4_divert_pop(0).
4199 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
4200 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4201 pushed and popped by m4sugar, should be first on the stack.
4202
4203 Provide warn, complain, and fatal function callbacks to the skeletons.
4204 This provides more flexibility than m4_fatal, improves the error
4205 message format, and captures messages for translation. Discussed
4206 starting at
4207 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4208 * data/bison.m4 (b4_error): New, invoked by...
4209 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4210 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4211 directives. Because these M4 macros might be called when the current
4212 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4213 the previous removal of uses of m4_divert, which caused trouble.
4214 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4215 m4_fatal to report unrecognized %code qualifiers.
4216 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4217 push parser requests.
4218 * data/glr.c: Use b4_complain instead of m4_fatal to report
4219 non-deterministic push parser requests.
4220 Update @output usage to @output(...@) form.
4221 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4222 report missing %defines. Update @output usage to @output(...@) form.
4223 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4224 @output(...@) form.
4225 * src/main.c (main): Invoke skel_scanner_free.
4226 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4227 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4228 obstack_for_string from flex-scanner.h.
4229 (YY_DECL): Use to declare skel_lex static.
4230 (decode_at_digraphs): Remove; now handled in the new
4231 SC_AT_DIRECTIVE_ARG start condition.
4232 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4233 functions.
4234 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4235 at_directive_argv): New static globals.
4236 (INITIAL): Use fail_for_invalid_at.
4237 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4238 recognize the start of a generalized `@directive(...@)' form and
4239 start...
4240 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4241 directive args (using the new obstack_for_string), to decode the
4242 contained @ diagraphs, and to perform the directive. It recognizes
4243 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4244 @output(...@).
4245 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4246 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4247 `@,'.
4248 (scan_skel): Initialize obstack_for_string on the first call.
4249 (skel_scanner_free): New function to free obstack_for_string.
4250 * tests/input.at (Reject bad %code qualifiers): Update test output.
4251
4252 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4253
4254 Consolidate the 4 prologue alternative directives (%code, %requires,
4255 %provides, and %code-top) into a single %code directive with an
4256 optional qualifier field. Discussed at
4257 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4258 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4259 alternatives.
4260 * doc/bison.texinfo (Prologue Alternatives): Update.
4261 (Decl Summary): Update to %code "requires" and %code "provides".
4262 (Calc++ Parser): Update to %code "requires".
4263 (Table of Symbols): Remove entries for %requires, %provides, and
4264 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4265 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4266 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4267 which are skeleton-specific.
4268 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4269 declare what %code qualifiers it supports and to complain if any other
4270 qualifiers were used in the grammar.
4271 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4272 and b4_user_code([b4_percent_code_provides]) in place of
4273 b4_user_requires and b4_user_provides.
4274 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4275 Add b4_user_code([b4_percent_code_top]) and
4276 b4_user_code([b4_percent_code]).
4277 Invoke b4_check_percent_code_qualifiers.
4278 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4279 PERCENT_REQUIRES): Remove.
4280 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4281 %requires. Rewrite the %code RHS as the unqualified form defining the
4282 muscle b4_percent_code. Add another RHS for the qualified %code form,
4283 which defines muscles of the form b4_percent_code_QUALIFIER and the
4284 b4_used_percent_code_qualifiers muscle.
4285 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4286 PERCENT_REQUIRES): Remove.
4287 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4288 %code "requires" and %code "provides".
4289 * tests/input.at (Reject bad %code qualifiers): New.
4290
4291 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4292
4293 Use the new code_props interface for destructors and printers.
4294 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4295 printer_location members, and change the type of the destructor and
4296 printer members to code_props.
4297 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4298 symbol_printer_get, semantic_type_destructor_set,
4299 semantic_type_printer_set, default_tagged_destructor_set,
4300 default_tagless_destructor_set, default_tagged_printer_set,
4301 default_tagless_printer_set): Use code_props in arguments and return
4302 types in place of char const * and location.
4303 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4304 since the locations are now contained in the return of
4305 symbol_destructor_get and symbol_printer_get.
4306 * src/output.c (symbol_destructors_output, symbol_printers_output):
4307 Replace with...
4308 (symbol_code_props_output): ... this to eliminate duplicate code.
4309 (output_skeleton): Update to use symbol_code_props_output.
4310 * src/reader.c (symbol_should_be_used): Update use of
4311 symbol_destructor_get.
4312 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4313 Update uses of the various _destructor_set and _printer_set functions.
4314 * src/symtab.c: (default_tagged_destructor_location,
4315 default_tagless_destructor_location, default_tagged_printer_location,
4316 default_tagless_printer_location): Remove since we...
4317 (default_tagged_destructor, default_tagless_destructor,
4318 default_tagged_printer, default_tagless_printer): ... change the type
4319 of these to code_props.
4320 (symbol_new, semantic_type_new, symbol_destructor_set,
4321 semantic_type_destructor_set, symbol_destructor_get,
4322 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4323 symbol_check_alias_consistency, default_tagged_destructor_set,
4324 default_tagless_destructor_set, default_tagged_printer_set,
4325 default_tagless_printer_set): Update.
4326 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4327 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4328 code_props members.
4329 (symbol_print): Use SYMBOL_CODE_PRINT.
4330
4331 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4332
4333 Use the new code_props interface for rule actions.
4334 * src/symlist.h (symbol_list): Replace action, action_location, and
4335 used members with a code_props action_props member.
4336 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4337 grammar_midrule_action, grammar_current_rule_merge_set,
4338 grammar_current_rule_symbol_append, packgram): Update.
4339 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4340 * src/scan-code.l (handle_action_dollar): Update.
4341 (translate_rule_action): Remove, no longer used.
4342 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4343
4344 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4345
4346 Use the new code_props interface in parse-gram.y.
4347 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4348 Update all uses of translate_* functions to use the new code_props
4349 interface and to use gram_scanner_last_string_free and
4350 code_scanner_last_string_free where possible.
4351 (grammar_declaration): symbol_list_destructor_set and
4352 symbol_list_printer_set now perform the translation, so don't do it
4353 here. Use gram_scanner_last_string_free where possible.
4354 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4355 translate_code): Remove, no longer used.
4356 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4357 symbol_list_printer_set): Perform code translation here rather than
4358 depending on the caller to do so.
4359
4360 * src/symlist.h (struct symbol_list): Correct some documentation typos.
4361 * src/scan-gram.h (gram_last_string): Remove declaration.
4362 * src/scan-gram.l (last_string): Declare it static.
4363
4364 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4365
4366 Encapsulate code properties and related functionality for the various
4367 destructors, printers, and actions into a code_props structure and
4368 interface. This patch merely implements code_props in scan-code.h and
4369 scan-code.l. Future patches will rewrite other modules to use it.
4370 Discussed starting at
4371 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
4372 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
4373 consistently initialize const structs that have an empty location
4374 field.
4375 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
4376 to ensure consistency.
4377 * src/scan-code.h (code_props): New structure.
4378 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
4379 function, macro, and const global variable for initializing a
4380 code_props with no code.
4381 (code_props_plain_init, code_props_symbol_action_init,
4382 code_props_rule_action_init, code_props_translate_code): The rest of
4383 the new code_props functional interface. Among other things, the init
4384 functions set the code_props kind field so that
4385 code_props_translate_code will know whether to behave like
4386 translate_symbol_action, translate_rule_action, or translate_code.
4387 These old translate functions must remain until all other modules are
4388 updated to use the new code_props interface.
4389 (code_scanner_last_string_free): New function similar to
4390 gram_scanner_last_string_free.
4391 (code_scanner_free): Add documentation.
4392 * src/scan-code.l: Implement the new interface.
4393 (code_lex): Make it static, add a code_props* argument, and remove the
4394 rule argument.
4395 (last_string): New static global similar to the one in scan-gram.l.
4396 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
4397 instead of rule.
4398 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
4399 code_props since Bison may one day use this information for destructors
4400 and printers.
4401 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
4402 (handle_action_dollar): Use symbol_list_n_get and set used flag
4403 directly since symbol_list_n_used_set is removed.
4404 (translate_action): Add a code_props* argument and remove the rule,
4405 action, and location arguments. Pass the code_props* on to code_lex.
4406 (translate_rule_action, translate_symbol_action, translate_code):
4407 Rewrite as wrappers around the new code_props interface.
4408 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
4409 it would eventually need to break the encapsulation of code_props.
4410
4411 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4412
4413 * etc/.cvsignore: New.
4414
4415 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4416
4417 Add maintainer-push-check to run maintainer-check using push parsing in
4418 place of pull parsing where available.
4419 * Makefile.am (maintainer-push-check): New.
4420 * data/bison.m4 (b4_use_push_for_pull_if): New.
4421 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
4422 appropriately based on their existing values.
4423 (yypush_parse): Don't print push-parser-specific diagnostics if push
4424 parsing is being used in place of pull parsing.
4425 * data/yacc.c: If push parsing should replace pull parsing, redirect to
4426 push.c.
4427 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
4428 variable, and insert b4_use_push_for_pull_flag into muscles.
4429 * tests/Makefile.am (maintainer-push-check): New.
4430
4431 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4432
4433 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
4434 (whether successful or failed) so that yypush_parse can be invoked
4435 again to start a new parse using the same yypstate.
4436 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
4437 check multiple yypull_parse invocations on the same yypstate. For pull
4438 mode, extend to check multiple yyparse invocations.
4439 (Exploding the Stack Size with Alloca): Extend to try with
4440 %push-pull-parser.
4441 (Exploding the Stack Size with Malloc): Likewise.
4442
4443 * tests/calc.at (Simple LALR Calculator): Don't specify
4444 %skeleton "push.c" since %push-pull-parser implies that now.
4445 * tests/headers.at (export YYLTYPE): Don't check for the push
4446 declarations. Otherwise, this test case can't be used to see if push
4447 mode can truly emulate pull mode.
4448 * tests/input.at (Torturing the Scanner): Likewise.
4449 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
4450 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
4451 AT_YACC_IF, which now includes the case of push mode since %skeleton
4452 need not be used for push mode. This will be more intuitive once
4453 push.c is renamed to yacc.c.
4454
4455 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4456
4457 For push mode, convert yyparse from a macro to a function, invoke yylex
4458 instead of passing a yylexp argument to yypull_parse, and don't
4459 generate yypull_parse or yyparse unless %push-pull-parser is declared.
4460 Discussed starting at
4461 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
4462 * data/bison.m4 (b4_pull_if): New.
4463 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
4464 * data/push.c: Improve M4 quoting a little.
4465 (b4_generate_macro_args, b4_parenthesize): Remove.
4466 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
4467 any time a pull parser is requested.
4468 Don't #define this as a wrapper around yypull_parse. Instead, when
4469 both push and pull are requested, make it a function that does that
4470 same thing.
4471 (yypull_parse): If there's a b4_prefix, #define this to
4472 b4_prefix[pull_parse] when both push and pull are requested.
4473 Don't define this as a function unless both push and pull are
4474 requested.
4475 Remove the yylexp argument and hard-code yylex invocation instead.
4476 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
4477 %push-parser.
4478 * src/getargs.c (pull_parser): New global initialized to true.
4479 * getargs.h (pull_parser): extern it.
4480 * src/output.c (prepare): Insert pull_flag muscle.
4481 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
4482 (prologue_declaration): Set both push_parser and pull_parser = true for
4483 %push-pull-parser. Set push_parser = true and pull_parser = false for
4484 %push-parser.
4485 * src/scan-gram.l: Don't accept %push_parser as an alternative to
4486 %push-parser since there's no backward-compatibility concern here.
4487 Scan %push-pull-parser.
4488 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
4489 instead of %push-parser.
4490 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
4491 prototype it in the module that calls yyparse.
4492 * tests/input.at (Torturing the Scanner): Likewise.
4493 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
4494
4495 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
4496
4497 Update etc/bench.pl. Optimize push mode a little (the yyn change
4498 deserves most of the credit).
4499 * Makefile.am (SUBDIRS): Add etc subdirectory.
4500 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
4501 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
4502 yytoken, yyval, and yyloc declarations to...
4503 (yyparse or yypush_parse): ... here to improve performance. For
4504 yypush_parse invocations after the first, be sure to assign yyn its old
4505 value again.
4506 (yypstate_new): Don't bother initializing the yyresult field since the
4507 initial value isn't used.
4508 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
4509 remove the #define that, in push mode, set it to yyps->NAME.
4510 * etc/Makefile.am: New.
4511 * etc/bench.pl: Remove and build it instead from...
4512 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
4513 "tests/bison" from the build directory by default rather than just
4514 invoking "bison" from $PATH.
4515 (calc_grammar): Update push parser code: don't declare yylval globally,
4516 don't define yyparse_wrapper, and don't #define yyparse.
4517 (bench_grammar): Update to check all working combinations of yacc.c,
4518 push.c, impure, pure, pull, and push.
4519
4520 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4521
4522 For push mode, add pull wrappers around yypush_parse.
4523 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
4524 (yypull_parse): New function wrapping yypush_parse.
4525 (yyparse): New #define wrapping yypull_parse.
4526 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
4527 is declared.
4528 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
4529 prototype yylex in the module that calls yyparse, and don't prototype
4530 yyparse there. Otherwise, the yyparse expansion won't compile.
4531 * tests/input.at (Torturing the Scanner): Likewise.
4532
4533 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4534
4535 Enable push parsers to operate in impure mode. Thus, %push-parser no
4536 longer implies %pure-parser. The point of this change is to move
4537 towards being able to test the push parser code by running the entire
4538 test suite as if %push-parser had been declared.
4539 * data/push.c (yypush_parse): For impure mode, remove the
4540 yypushed_char, yypushed_val, and yypushed_loc arguments.
4541 Instead, declare these as local variables initialized to the global
4542 yychar, yylval, and yylloc.
4543 For the first yypush_parse invocation only, restore the initial values
4544 of these global variables when it's time to read a token since they
4545 have been overwritten.
4546 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
4547 %push-parser.
4548 * tests/calc.at (Simple LALR(1) Calculator): Always declare
4549 %pure-parser along with %push-parser since this test case was designed
4550 for pure push parsers.
4551 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
4552 (AT_YACC_OR_PUSH_IF): New.
4553 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
4554 add a note that it's still wrong for some cases (as it has been for a
4555 while).
4556 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
4557 %push-parser no longer implies %pure-parser.
4558
4559 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4560
4561 Remove some unnecessary differences between the pull parser code and
4562 the push parser code. This patch enables yynerrs in push mode.
4563 * data/push.c: Reformat M4 a little.
4564 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
4565 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
4566 because push mode is on. Instead, if pure mode is on, move yynerrs
4567 to...
4568 (b4_declare_parser_state_variables): ... here.
4569 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
4570 to yyps->NAME so it can be used in yypush_parse.
4571 (yypush_parse): Don't omit uses of yynerrs in push mode.
4572
4573 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4574
4575 Fix bug such that the first pushed token's value and location are
4576 sometimes overwritten (sometimes by %initial-action) before being used.
4577 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
4578 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
4579 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
4580 more closely mimic the pull parser logic.
4581 Don't copy the pushed token to yychar, yylval, and yylloc until it's
4582 time to read a token, which is after any initialization of yylval and
4583 yylloc.
4584 (gottoken): Rename label to...
4585 (yyread_pushed_token): ... for clarity and to avoid infringing on the
4586 user namespace.
4587
4588 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4589
4590 Rearrange initialization of the parser state variables so that the
4591 skeleton doesn't have to have a copy for pull mode and another for push
4592 mode. This patch also fixes at least a bug such that yylloc was not
4593 initialized (with b4_location_initial_line and
4594 b4_location_initial_column) upon calling yypush_parse. However, that
4595 initialization now overwrites the first token's location;
4596 %initial-action assigning @$ already did the same thing, and both bugs
4597 will be fixed in a later patch.
4598 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
4599 (b4_declare_parser_state_variables): Remove initialization of yytoken,
4600 yyss, yyvs, yyls, and yystacksize.
4601 (yypstate_new): Remove initialization of some yypstate fields: yystate,
4602 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
4603 yylsp.
4604 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
4605 yyps->NAME so it can be used in yypush_parse.
4606 (yyparse or yypush_parse): For yypush_parse, don't print the
4607 "Starting parse" diagnostic for invocations after the first.
4608 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
4609 yypush_parse, only do it for the first invocation.
4610 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
4611 initialization to occur in yypush_parse but only on the first
4612 invocation.
4613
4614 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4615
4616 * data/push.c: Add CPP guards around push parser declarations in both
4617 the header and the code file.
4618 In the code file, move the push parser declarations to the same place
4619 they appear in the header file.
4620 Clean up the M4 some, especially the inconsistent underquoting in
4621 some b4_c_function_def and b4_c_function_decl uses.
4622
4623 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4624
4625 Encapsulate the push parser state variables into an M4 macro so the
4626 push skeleton doesn't have to list them again for pull mode's yyparse.
4627 For push mode, remove yypush_parse's local equivalents of these
4628 variables to eliminate unnecessary copying between the two sets at
4629 run-time. This patch also fixes at least a bug related to multiple
4630 %initial-action invocations in push mode.
4631 * data/push.c (b4_declare_parser_variables): Rename to...
4632 (b4_declare_scanner_communication_variables): ... this for clarity and
4633 update both uses.
4634 (b4_declare_yyparse_variables): Remove and move its contents to the one
4635 spot where it was invoked.
4636 (b4_declare_parser_state_variables): New macro containing the parser
4637 state variables required by push mode.
4638 (struct yypstate): Replace all fields but yynew with
4639 b4_declare_parser_state_variables.
4640 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
4641 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
4642 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
4643 (yyparse or yypush_parse): For yyparse in pull mode, replace local
4644 parser state variable declarations with
4645 b4_declare_parser_state_variables.
4646 Don't initialize parser state variables when calling yypush_parse since
4647 yypstate_new already does that.
4648 Invoke the user's initial action only upon the first yypush_parse
4649 invocation.
4650 Remove all code that copies between the local parser state variables
4651 and the yypstate.
4652
4653 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4654
4655 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
4656 prevent a name collision in a future patch where these names will
4657 sometimes be #define'd.
4658 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
4659 since it no longer has the same name as the existing argument.
4660 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
4661
4662 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
4663 and Joel E. Denny <jdenny@ces.clemson.edu>
4664
4665 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4666 that the argument is case-insensitive, and there's no `=' here.
4667 For the %skeleton entry, mention that %language is better.
4668 (Bison Options): Likewise for --language and --skeleton. Move the
4669 --skeleton entry so that the `Tuning the parser' section is sorted
4670 alphabetically on long options.
4671 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
4672 %language directive in detail here; cross-reference the %language
4673 documentation instead.
4674 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
4675 `%require "2.3b"' so that the example is always up-to-date.
4676 (Table of Symbols): Add entries for %language and %skeleton.
4677 * examples/extexi (normalize): Instead of replacing every %require
4678 argument with the current Bison version, just substitute for
4679 `@value{VERSION}'. This guarantees that we're testing what actually
4680 appears in the documentation.
4681 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
4682 rather than `@VERSION@'.
4683
4684 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4685
4686 * NEWS: Reword the %language news a bit, and put it earlier.
4687
4688 * src/getargs.c (skeleton_arg): Last arg is now location const *.
4689 Rewrite to simplify the logic.
4690 (language_argmatch): Likewise.
4691 (program_name): We now own this var.
4692 * src/getargs.h (struct bison_language): Use char[] rather than
4693 const char *.
4694
4695 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
4696 Java is supported.
4697 * src/complain.c (program_name): Remove decl; no longer needed.
4698 * src/main.c (program_name): Remove; now belongs to getargs.
4699
4700 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
4701
4702 * NEWS: Document %language.
4703
4704 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
4705
4706 * data/c-skel.m4, data/c++-skel.m4: New files.
4707 * data/glr.c: Complain on push parsers.
4708
4709 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
4710 over %skeleton.
4711 (Decl Summary): Document %language and %skeleton.
4712 (Command line): Document -L.
4713
4714 * examples/extexi: Rewrite %require directive.
4715 * examples/calc++/Makefile.am: Pass VERSION to extexi.
4716
4717 * src/files.c (compute_exts_from_gc): Look in language structure
4718 for .y extension.
4719 (compute_file_name_parts): Check whether .tab should be added.
4720 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
4721 (language, skeleton_arg, language_argmatch): New.
4722 (long_options): Add --language.
4723 (getargs): Use skeleton_arg, add -L/--language.
4724 * src/getargs.h: Include location.h.
4725 (struct bison_language, language, skeleton_arg, language_argmatch): New.
4726 * src/output.c (prepare): Pick default skeleton from struct language.
4727 Don't dispatch C skeletons here.
4728 * src/parse-gram.y (PERCENT_LANGUAGE): New.
4729 (prologue_declaration): Add "%language" rule, use skeleton_arg.
4730 * src/scan-gram.l ("%language"): New rule.
4731
4732 * tests/calc.at: Test %skeleton and %language.
4733 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
4734 (AT_GLR_IF): Look for %skeleton "glr.cc".
4735 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
4736 (AT_YACC_IF): Reject %language.
4737
4738 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4739
4740 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
4741 since it wasn't used; only the typedef name 'semantic_type' is needed.
4742 Also, omit trailing white space.
4743
4744 * bootstrap: Sync from coreutils.
4745 (gnulib_extra_files): Add build-aux/announce.gen.
4746 (slurp): Adjust .gitignore files like .cvsignore files.
4747 * build-aux/announce-gen: Remove from CVS, since bootstrap
4748 now creates this.
4749
4750 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
4751
4752 Make %push-parser imply %pure-parser. This fixes several bugs; see
4753 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
4754 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
4755 pure_parser = true.
4756 * data/push.c: Don't bother testing b4_push_if when deciding whether
4757 to expand b4_declare_parser_variables globally.
4758 (yypush_parse): Likewise in here.
4759
4760 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
4761 (yy_reduce_print): Reformat M4 for readability.
4762
4763 2006-12-15 Bob Rossi <bob@brasko.net>
4764 and Joel Denny <jdenny@ces.clemson.edu>
4765
4766 * data/push.c (yypstate): Add typedef, and update all uses of
4767 struct yypstate to just yypstate.
4768 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
4769
4770 2006-12-14 Bob Rossi <bob@brasko.net>
4771
4772 * data/push.c (yypush_parse): Declare prototype regardless of
4773 %locations option.
4774
4775 2006-12-14 Bob Rossi <bob@brasko.net>
4776
4777 * data/push.c (yyparse): Remove the prototype and the #define when in
4778 push-parser mode.
4779
4780 2006-12-13 Bob Rossi <bob@brasko.net>
4781
4782 * data/push.c (yypstate_init): Rename to...
4783 (yypstate_new): ... this and use b4_c_function_def.
4784 (yypstate_delete): New.
4785 (yypush_parse): Change parameters yynval and yynlloc to be const.
4786 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
4787 yypstate_delete functions.
4788
4789 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
4790
4791 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
4792 strange test case titles. Reported by Bob Rossi.
4793
4794 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
4795
4796 * TODO: Add pointer to Sylvain Schmitz's work on static detection
4797 of potential ambiguities in GLR grammers.
4798
4799 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
4800
4801 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
4802 `bison ', use m4_index instead of m4_substr since chopping up a string
4803 containing M4-special characters causes problems here.
4804
4805 Fix a couple of bugs related to special characters in user-specified
4806 file names, and make it easier for skeletons to compute output file
4807 names with the same file name prefix as Bison-computed output file
4808 names.
4809 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
4810 b4_parser_file_name and b4_spec_defines_file instead of
4811 @output_parser_name@ and @output_header_name@, which are now redundant.
4812 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
4813 b4_parser_file_name, b4_spec_defines_file, and the new
4814 @basename(FILENAME@) instead of @output_parser_name@ and
4815 @output_header_name@, which inappropriately escaped the file names as
4816 C string literals.
4817 * src/files.c (all_but_ext): Remove static qualifier.
4818 (compute_output_file_names): Move `free (all_but_ext)' to...
4819 (output_file_names_free): ... here since all_but_ext is needed later.
4820 * src/files.h (all_but_ext): Extern.
4821 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
4822 exactly what MUSCLE_INSERT_STRING used to do.
4823 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
4824 characters are escaped properly.
4825 * src/output.c (prepare): Define muscle file_name_all_but_ext as
4826 all_but_ext.
4827 For pkgdatadir muscle, maintain previous functionality by using
4828 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
4829 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
4830 digraphs would never be expanded. Hopefully no one has M4-special
4831 characters in his Bison installation path.
4832 * src/scan-skel.l: Don't parse @output_header_name@ and
4833 @output_parser_name@ anymore since they're now redundant.
4834 In @output, use decode_at_digraphs.
4835 Parse a new @basename command that invokes last_component.
4836 (decode_at_digraphs): New.
4837 (BASE_QPUTS): Remove unused.
4838 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
4839 (Output file name): New tests.
4840
4841 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
4842
4843 Warn about output files that are generated by the skeletons and that
4844 conflict with other output files.
4845 * data/glr.c: Don't generate the header file here when glr.cc does.
4846 * src/files.c (file_names, file_names_count): New static globals.
4847 (compute_output_file_names): Invoke output_file_name_check for files
4848 not generated by the skeletons and remove existing checks.
4849 (output_file_name_check): New function that warns about conflicting
4850 output file names.
4851 (output_file_names_free): Free file_names.
4852 * src/files.h (output_file_name_check): Declare.
4853 * src/scan-skel.l: Invoke output_file_name_check for files generated by
4854 the skeletons.
4855 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
4856 (Conflicting output files): New tests.
4857
4858 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4859
4860 * doc/bison.texinfo: Fix a couple of typos.
4861
4862 2006-12-08 Bob Rossi <bob@brasko.net>
4863
4864 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
4865 Rename to...
4866 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
4867 update all uses.
4868 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
4869 (yypush_parse): Rename yypvars argument to yyps and remove redundant
4870 local pv.
4871 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
4872 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
4873
4874 2006-12-07 Bob Rossi <bob@brasko.net>
4875 and Joel Denny <jdenny@ces.clemson.edu>
4876
4877 * data/push.c (yypvarsinit): Change return type from void* to struct
4878 yypvars*. No longer cast to void* on return.
4879 (struct yypvars): Remove yylen since it need not be remembered between
4880 yypushparse invocations.
4881 (yypushparse): Don't copy between yylen and pv->yylen.
4882
4883 2006-12-05 Bob Rossi <bob@brasko.net>
4884
4885 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
4886 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
4887 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
4888 (struct yypvars): Remove b4_declare_parser_variables.
4889 (yypvarsinit): Remove init code for removed variables.
4890 (global scope): Do not declare b4_declare_parser_variables if
4891 push or pure mode.
4892 (yypushparse): Add b4_declare_parser_variables.
4893 Init new local variables, and remove init code for removed
4894 yypvars variables.
4895 (yyparse): Delete.
4896 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
4897 and yyparse for other modes.
4898 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
4899 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
4900 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
4901 (AT_PURE_LEX_IF): True if pure or push parser.
4902
4903 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
4904
4905 Document Yacc prologue alternatives and default %destructor's and
4906 %printer's as experimental. Don't mention Java yet. Discussed at
4907 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
4908 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
4909 (2.3a): Annotate this entry to say the old forms of these features were
4910 also experimental.
4911 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
4912 Table of Symbols): Say they're experimental. Comment out any mention
4913 of Java (we'll want this back eventually).
4914
4915 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4916
4917 Support a file name argument to %defines. Deprecate `=' in
4918 %file-prefix, %name-prefix, and %output. Discussed at
4919 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
4920 * NEWS (2.3a+): Mention.
4921 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
4922 form of %defines, and remove `=' from entries for %file-prefix,
4923 %name-prefix, and %output.
4924 * src/parse-gram.y (prologue_declaration): Implement.
4925 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
4926 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
4927 all but one occurrence of %name-prefix.
4928 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
4929 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
4930 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
4931 occurrence of each of %file-prefix and %output. Add check for %defines
4932 with argument.
4933 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
4934 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
4935 Remove the `=' from %output.
4936
4937 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
4938
4939 Don't escape $ in test case titles since Autoconf 2.61 now does that
4940 correctly.
4941 * tests/actions.at (Default %printer and %destructor are not for error
4942 or $undefined): Here.
4943 (Default %printer and %destructor are not for $accept): Here.
4944 * tests/input.at (Invalid $n and @n): Here.
4945
4946 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
4947
4948 Rename <!> to <>. Discussed starting at
4949 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
4950 * NEWS (2.3a+): Update.
4951 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
4952 Update.
4953 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
4954 * src/scan-gram.l (INITIAL): Implement.
4955 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
4956 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
4957 comment.
4958 * tests/actions.at (Default tagless %printer and %destructor,
4959 Default tagged and per-type %printer and %destructor,
4960 Default %printer and %destructor are not for error or $undefined,
4961 Default %printer and %destructor are not for $accept,
4962 Default %printer and %destructor for mid-rule values): Update.
4963 * tests/input.at (Default %printer and %destructor redeclared,
4964 Unused values with default %destructor): Update.
4965
4966 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
4967
4968 Don't let %prec take a nonterminal.
4969 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
4970 token.
4971 * tests/input.at (%prec takes a token): New test checking that %prec
4972 won't take a nonterminal.
4973
4974 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4975
4976 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
4977 it was double-quoted.
4978 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
4979 grammar is maintained with Bison's highest standards.
4980 * src/getargs.c: Fix some typos in Doxygen comments.
4981
4982 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4983
4984 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
4985 later. Reported by Paul Eggert in
4986 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
4987 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
4988 * src/scan-code.l (translate_action): Don't bother invoking
4989 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
4990 (code_scanner_free): Instead of invoking
4991 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
4992 which frees more.
4993 * src/scan-gram.l (gram_scanner_free): Likewise.
4994 * src/scan-skel.l (scan_skel): Likewise.
4995
4996 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4997
4998 * src/files.c (tr): Change return type to void.
4999 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5000 has been called previously for the same key.
5001 (muscle_find): Return storage instead of value so that
5002 --enable-gcc-warnings doesn't produce warnings that the return discards
5003 const. aver that the value and storage are the same since storage
5004 could potentially be NULL when value is not.
5005 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5006 same as 0.
5007
5008 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5009
5010 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5011 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5012 us a slightly cleaner distribution, and also works.
5013 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5014 gnulib changes.
5015
5016 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5017 and Paul Eggert <eggert@cs.ucla.edu>
5018
5019 Don't let Bison leak memory except when it complains.
5020 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5021 (spec_defines_file, dir_prefix): Now char *, not const char *,
5022 since they are freed.
5023 * src/files.c: Likewise.
5024 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5025 Likewise.
5026 (tr): Now operates in-place. All uses changed.
5027 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5028 values.
5029 (compute_file_name_parts, compute_output_file_names): Don't store
5030 read-only data in variables that will be freed.
5031 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5032 src_extension, and header_extension.
5033 (output_file_names_free): New public function to free
5034 spec_verbose_file, spec_graph_file, spec_defines_file,
5035 parser_file_name, and dir_prefix.
5036 * src/getargs.c (getargs): Don't store read-only data in variables that
5037 will be freed.
5038 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5039 (which previously existed but was unused), and quotearg_free.
5040 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5041 * src/muscle_tab.c: Likewise.
5042 (muscle_entry): Make the value char const *,
5043 and add a new storage member that is char * and can be freed.
5044 (muscle_entry_free): New private function.
5045 (muscle_init): Use it instead of free.
5046 (muscle_insert, muscle_grow): Update and use new storage member.
5047 (muscle_code_grow): Free the string passed to muscle_grow
5048 since it's not needed anymore.
5049 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5050 add a new `char *code' member.
5051 ("{...}"): Declare semantic type as code.
5052 * src/scan-code.h (translate_rule_action):
5053 (translate_symbol_action, translate_code, translate_action): Return
5054 `char const *' rather than `char *' since external code should not free
5055 these strings.
5056 * src/scan-code.l: Likewise.
5057 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5058 which is "{...}" in the parser.
5059 * tests/Makefile.am (maintainer-check-valgrind): Set
5060 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5061 Valgrind.
5062 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5063 complain.
5064 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5065 expecting a non-zero exit status sets --leak-check=summary and
5066 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5067 this case, and we don't want to hear about it.
5068
5069 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5070
5071 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5072 instead of from the template, to simplify configuration a bit.
5073 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5074 and m4/wint_t.m4, as they are needed with the latest gnulib.
5075
5076 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5077
5078 Disable unset/unused mid-rule value warnings by default, and recognize
5079 --warnings=midrule-values to enable them. Discussed starting at
5080 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5081 * NEWS (2.3a+): Mention.
5082 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5083 warnings): Add entry for midrule-values subargument.
5084 * src/reader.c (symbol_should_be_used): Don't return true just because
5085 the value is a set/used mid-rule value unless
5086 --warnings=midrule-values was specified.
5087 * tests/input.at (Unused values, Unused values before symbol
5088 declarations): Run tests with and without --warnings=midrule-values.
5089
5090 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5091 than LIST_FREE directly.
5092
5093 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5094
5095 Finish implementing --warnings=error, which should not be implied by
5096 --warnings=all (or by its synonyms -W and --warnings without
5097 subarguments).
5098 * src/complain.c (set_warning_issued): New function to report that
5099 warnings are being treated as errors and to record an error if so.
5100 Invoke...
5101 (warn_at, warn): ... here.
5102 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5103 "error - warnings are errors" does not appear above "all - all of the
5104 above".
5105 (getargs): For -W and --warnings without subarguments, don't let
5106 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5107 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5108
5109 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5110
5111 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5112 empty subargument list. For example: `bison --warnings= parser.y'.
5113
5114 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5115
5116 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5117 the parser header file so that gcc doesn't warn.
5118
5119 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5120
5121 Split the default %destructor/%printer into two kinds: <*> and <!>.
5122 Discussed starting at
5123 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5124 * NEWS (2.3a+): Mention.
5125 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5126 previous change today related to mid-rules.
5127 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
5128 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
5129 (TYPE_TAG_ANY): Add as <*>.
5130 (TYPE_TAG_NONE): Add as <!>.
5131 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5132 for <*> and <!>.
5133 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5134 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5135 * src/symlist.c (symbol_list_default_new): Split into tagged and
5136 tagless versions.
5137 (symbol_list_destructor_set, symbol_list_printer_set): Split
5138 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5139 SYMLIST_DEFAULT_TAGLESS.
5140 * src/symlist.h: Update symbol_list_default*_new prototypes.
5141 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5142 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5143 * src/symtab.c (default_destructor, default_destructor_location,
5144 default_printer, default_printer_location): Split each into tagged and
5145 tagless versions.
5146 (symbol_destructor_get, symbol_destructor_location_get,
5147 symbol_printer_get, symbol_printer_location_get): Implement tagged
5148 default and tagless default cases.
5149 (default_destructor_set, default_printer_set): Split each into tagged
5150 and tagless versions.
5151 * src/symtab.h: Update prototypes.
5152 * tests/actions.at (Default %printer and %destructor): Rename to...
5153 (Default tagless %printer and %destructor): ... this, and extend.
5154 (Per-type %printer and %destructor): Rename to...
5155 (Default tagged and per-type %printer and %destructor): ... this, and
5156 extend.
5157 (Default %printer and %destructor for user-defined end token): Extend.
5158 (Default %printer and %destructor are not for error or $undefined):
5159 Update.
5160 (Default %printer and %destructor are not for $accept): Update.
5161 (Default %printer and %destructor for mid-rule values): Extend.
5162 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5163 (Unused values with default %destructor): Extend.
5164
5165 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5166
5167 Don't apply the default %destructor/%printer to an unreferenced midrule
5168 value. Mentioned at
5169 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5170 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5171 like $@n instead of just @n so that the default %destructor/%printer
5172 logic doesn't see them as user-defined symbols.
5173 (symbol_is_dummy): Check for both forms of the name.
5174 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5175 name for which the midrule value is referenced in any action.
5176 * tests/actions.at (Default %printer and %destructor for mid-rule
5177 values): New test.
5178 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5179 for change to dummy symbol names.
5180
5181 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5182
5183 Warn about unset midrule $$ if the corresponding $n is used.
5184 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5185 $n usage.
5186 (packgram): Before invoking grammar_rule_check on any rule, make sure
5187 all actions have already been scanned in order to set `used' flags.
5188 Otherwise, checking that a midrule's $$ is set will not always work
5189 properly because the midrule check must forward-reference the midrule's
5190 parent rule.
5191 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5192 warning.
5193
5194 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5195
5196 More improvements to the documentation of the prologue alternatives:
5197 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5198 Bison manual.
5199 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5200 some text to clarify the relative importance of the new directives and
5201 to show how these directives may be viewed as code labels.
5202
5203 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5204
5205 Similar to the recently removed %before-header, add %code-top as the
5206 alternative to the pre-prologue. Mentioned at
5207 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5208 Also, let the prologue alternatives appear in the grammar section.
5209 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5210 (prologue_declaration): Move the existing prologue alternatives to...
5211 (grammar_declaration): ... here and add %code-top.
5212 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5213
5214 Clean up and extend documentation for the prologue alternatives.
5215 * NEWS (2.3a+): Describe prologue alternatives.
5216 * doc/bison.texinfo (Prologue): Move discussion of prologue
5217 alternatives to...
5218 (Prologue Alternatives): ... this new section, and extend it to discuss
5219 all 4 directives in detail.
5220 (Table of Symbols): Clean up discussion of prologue alternatives and
5221 add %code-top.
5222
5223 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5224
5225 DJGPP specific issues.
5226
5227 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5228 config.bat accordingly.
5229 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5230 * djgpp/config.site: Likewise.
5231
5232 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
5233
5234 Replace %*-header with %provides, %requires, %code. See discussion at
5235 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5236
5237 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5238 (b4_user_start_header): Remove.
5239 * data/glr.c: Use new macros instead of b4_*start_header
5240 and b4_*end_header.
5241 * data/glr.cc: Likewise.
5242 * data/lalr1.cc: Likewise.
5243 * data/push.c: Likewise.
5244 * data/yacc.c: Likewise.
5245
5246 * doc/bison.texinfo: Remove %before-header, rename
5247 %{start,end,after}-header to %requires, %provides, %code.
5248
5249 * src/parse-gram.y: Likewise (also rename token names accordingly).
5250 * src/scan-gram.l: Likewise.
5251 * tests/actions.at: Likewise.
5252
5253 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5254
5255 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5256 Problem reported by Joel E. Denny.
5257
5258 2006-10-14 Jim Meyering <jim@meyering.net>
5259
5260 (Sync from coreutils.)
5261 Work also when the working directory (with e.g. coreutils sources)
5262 is version controlled with git, rather than CVS.
5263 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5264 rather than CVS.
5265 In messages and comments, say e.g., "checked-out sources",
5266 rather than "CVS sources".
5267 (version_controlled_file): New function. Work for git as well as
5268 for CVS. Don't use grep's -q option.
5269 (slurp): Call it here, in place of CVS-specific code.
5270
5271 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5272
5273 Fix testsuite for ./configure --enable-gcc-warnings:
5274 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5275 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5276 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5277 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5278 * test/regression.at (Diagnostic that expects two alternatives):
5279 Likewise.
5280
5281 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5282
5283 * bootstrap.conf (gnulib_modules): Add config-h.
5284 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5285 worry about HAVE_CONFIG_H.
5286 * lib/abitset.c: Likewise.
5287 * lib/bitset.c: Likewise.
5288 * lib/bitset_stats.c: Likewise.
5289 * lib/bitsetv-print.c: Likewise.
5290 * lib/bitsetv.c: Likewise.
5291 * lib/ebitset.c: Likewise.
5292 * lib/get-errno.c: Likewise.
5293 * lib/lbitset.c: Likewise.
5294 * lib/subpipe.c: Likewise.
5295 * lib/timevar.c: Likewise.
5296 * lib/vbitset.c: Likewise.
5297 * lib/bitset.c: Include "bitset.h" first, to test interface.
5298 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5299 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5300 * lib/bitsetv.c: Include "bitsetv.h" first.
5301 * lib/get-errno.c: Include "get-errno.h" first.
5302 * m4/.cvsignore: Add config-h.m4.
5303 * tests/actions.at (Default %printer and %destructor for ...):
5304 Adjust expected line numbers in output to reflect removal of #if
5305 HAVE_CONFIG_H lines.
5306 * tests/glr-regression.at (Missed %merge type warnings when ...):
5307 Likewise.
5308 * tests/regression.at (Braced code in declaration in rules section):
5309 Likewise.
5310 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5311 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5312 Include <config.h> unconditionally.
5313
5314 * bootstrap: Sync from coreutils, as follows:
5315
5316 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5317
5318 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5319 variable was sometimes used without being initialized. This
5320 messed up the installation of the INSTALL file in some cases.
5321
5322 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5323
5324 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5325 --copy. Inspired by a suggestion from Bruno Haible.
5326
5327 2006-10-03 Jim Meyering <jim@meyering.net>
5328
5329 * bootstrap: Undo last change to this file, since now gnulib-tool
5330 sticks with the automake default in generating dependencies.
5331
5332 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5333
5334 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5335 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5336
5337 * doc/bison.1: Add copyright notice.
5338
5339 * data/glr.c: Don't include <stdarg.h>; not used.
5340
5341 * NEWS: The -g and --graph options now output graphs in Graphviz
5342 DOT format, not VCG format.
5343 * doc/bison.1: Likewise.
5344 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
5345 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5346 of this change in
5347 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
5348 * TODO: Remove Graphviz entry.
5349 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5350 remove vcg.c, vcg.h, vcg_defaults.h.
5351 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5352 * src/graphviz.c, src/graphviz.h: New files.
5353 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5354 * src/files.h: Make comment more generic.
5355 * src/main.c (main): Likewise.
5356 * src/print_graph.h: Likewise.
5357 * src/getargs.c (usage): Make usage description more generic.
5358 * src/print_graph.c: Include graphviz.h rather than vcg.h.
5359 (static_graph, fgraph): Remove. All uses changed to pass
5360 arguments instead of sharing a static var.
5361 (print_core, print_actions, print_state, print_graph):
5362 Output graphviz format rather than VCG format.
5363 * tests/.cvsignore: Remove *.vcg; add *.dot.
5364 * tests/output.at: Expect *.dot files, not *.vcg files.
5365
5366 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
5367 accommodates the 2006-10-08 change.
5368
5369 2006-10-11 Bob Rossi <bob@brasko.net>
5370
5371 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
5372 (b4_yyssa, b4_yyerror_range): New macros.
5373 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
5374 (yypvarsinit): Remove init of removed fields.
5375 (yypushparse): Remove use of removed fields; use new macros instead.
5376
5377 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5378
5379 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
5380 in a push parser. Reindent slightly to match yacc.c better.
5381
5382 2006-10-11 Bob Rossi <bob@brasko.net>
5383
5384 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
5385 yymsg_alloc fields.
5386 (yypvarsinit, yypushparse): Remove init of removed fields.
5387 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
5388
5389 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5390
5391 * THANKS: Add Paolo Bonzini and Bob Rossi.
5392
5393 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
5394
5395 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
5396 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
5397 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
5398 b4_define_user_cde and uses): Remove.
5399 (b4_comment, b4_prefix, b4_sync_start): New.
5400 * data/bison.m4: New file, with most of the content removed from c.m4.
5401 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
5402 * src/output.c (output_skeleton): Pass bison.m4.
5403 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
5404 only if specified.
5405
5406 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
5407
5408 Fix test failure reported by Tom Lane in
5409 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
5410 and try to make such failures easier to catch in the future.
5411 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
5412 that's now the caller's responsibility.
5413 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
5414 Set yychar = YYEOF if it's negative.
5415 * tests/actions.at (yylex): Abort if asked to read past EOF.
5416 * tests/conflicts.at (yylex): Likewise.
5417 * tests/cxx-type.at (yylex): Likewise.
5418 * tests/glr-regression.at (yylex): Likewise.
5419 * tests/input.at (yylex): Likewise.
5420 * tests/regression.at (yylex): Likewise.
5421 * tests/torture.at (yylex): Likewise.
5422
5423 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
5424
5425 Fix problems with translating English-language diagnostics.
5426 * bootstrap: Fix bug introduced in recent bootstrap changes, with
5427 respect to bison-runtime pot generation. The YY_ stuff
5428 wasn't being captured.
5429 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
5430 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
5431 * runtime-po/POTFILES.in: Add data/push.c.
5432
5433 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5434
5435 Merge bootstrap changes from coreutils.
5436
5437 2006-09-28 Jim Meyering <jim@meyering.net>
5438
5439 Automatically generated dependencies are important even
5440 when all of the sources in a directory come from gnulib.
5441 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
5442 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
5443
5444 2006-09-23 Jim Meyering <jim@meyering.net>
5445
5446 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
5447
5448 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5449
5450 * bootstrap: Add support for --force.
5451 (usage): New function. Describe usage less tersely.
5452 (CVS_only_file): New var.
5453
5454 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
5455
5456 * data/push.c (YYPUSH_MORE): Make it an enum instead.
5457 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
5458 Adjust white space and comments to match GNU style better.
5459
5460 2006-09-20 Bob Rossi <bob@brasko.net>
5461
5462 * data/push.c (yyresult_get): Remove function.
5463 (YYPUSH_MORE): Add #define.
5464 (yypushparse): Modify return value.
5465
5466 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5467
5468 * stamp-h.in: Remove; no longer needed.
5469 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
5470 Remove config.h, config.hin, intl (no longer created).
5471 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
5472 stamp-h1.
5473
5474 Sync bootstrap from coreutils, as follows:
5475
5476 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
5477
5478 * bootstrap (symlink_to_gnulib): New function.
5479 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
5480 to copies-of-gnulib.
5481 (cp_mark_as_generated, slurp, gnulib_files):
5482 Avoid making a copy if it's the same as the old version.
5483 (gnulib_files): Add support for this variable (used by Bison).
5484
5485 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5486
5487 * src/getargs.c (usage): Rework to use conventions similar to
5488 coreutils, to make translation a bit easier and the code a bit
5489 smaller. Problem reported by Tim Van Holder.
5490
5491 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
5492
5493 Use some of gnulib's new modules, taken from coreutils.
5494
5495 * bootstrap: Sync from coreutils, except add support for gnulib_files.
5496 * bootstrap.conf: New file.
5497 (gnulib_modules): Add configmake, inttypes, unistd.
5498 (XGETTEXT_OPTIONS): Add complain, complain_at,
5499 fatal, fatal_at, warn, warn_at, unexpected_end.
5500 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
5501 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
5502 (gl_EARLY): Add.
5503 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
5504 (gl_INIT): Add
5505 (GNULIB_AUTOCONF_SNIPPET): Remove.
5506 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
5507 the pickiest.
5508 * lib/.cvsignore: Add inttypes_.h.
5509 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
5510 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
5511 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
5512 no-longer-necessary initializations.
5513 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
5514 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
5515 use the unistd module.
5516 * src/system.h: Likewise.
5517 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
5518 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
5519 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
5520 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
5521 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
5522 * src/system.h: Include inttypes.h unconditionally, now that we
5523 use the inttypes module. Don't bother to include stdint.h, since
5524 inttypes.h now does that for us.
5525 (LOCALEDIR): Remove, now that we use the configmake module.
5526 * src/getargs.c: Include configmake.h.
5527 * src/main.c: Likewise.
5528 * src/output.c: Likewise.
5529 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
5530 not from $abs_top_builddir, since config.h moved.
5531
5532
5533 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
5534 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
5535
5536 * src/parse-gram.y (symbol_declaration): Don't put statements
5537 before declarations; it's not portable to C89.
5538 * src/scan-code.l (handle_action_at): Likewise.
5539
5540 * src/scan-code.l: Always initialize braces_level; the old code
5541 left it uninitialized and therefore had undefined behavior.
5542
5543 Don't attempt to redefine 'assert', since it runs afoul of
5544 systems where standard headers (mistakenly) include <assert.h>.
5545 Instead, define and use our own alternative, called 'aver'.
5546 * src/reader.c: Don't include assert.h, since we no longer
5547 use assert.
5548 * src/scan-code.l: Likewise.
5549 * src/system.h (assert): Remove, replacing with....
5550 (aver): New function, taking a bool arg. All uses changed.
5551 * src/tables.c (pack_vector): Ensure that aver arg is bool,
5552 not merely an integer.
5553
5554 2006-09-15 Bob Rossi <bob@brasko.net>
5555
5556 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
5557 * data/c.m4 (YYPUSH): New.
5558 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
5559 * src/getargs.c (push_parser): New var.
5560 * src/getargs.h (push_parser): New declaration.
5561 * src/output.c (prepare): Add macro insertion of `push_flag'.
5562 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
5563 (prologue_declaration): Parse %push-parser.
5564 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
5565 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
5566 list of removed lines from the traces observed.
5567 (AT_CHECK_CALC_LALR): Added push parser tests.
5568
5569 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
5570
5571 * NEWS: Version 2.3a.
5572 * configure.ac (AC_INIT): Likewise.
5573
5574 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
5575 "#define YYSTYPE int" that caused "make maintainer-check" to fail
5576 due to header ordering dependencies. I don't know why the #define
5577 was there.
5578
5579 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
5580 runtime cost when YYDEBUG is not defined, and so that some tests
5581 that used to fail now work. Problem and initial suggestion by
5582 Paolo Bonzini.
5583 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
5584 * data/glr.cc (b4_parser_class_name):
5585 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
5586 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
5587 (yydebug_) [YYDEBUG]: New member.
5588 (yycdebug_): Now defined only if YYDEBUG.
5589 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
5590 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
5591 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
5592 if YYYDEBUG.
5593 (debug_stream, set_debug_stream, debug_level, set_debug_level):
5594 Define only if YYDEBUG.
5595 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
5596 set_debug_level.
5597 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
5598 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
5599 AT_CHECK_CALC_GLR_CC that are working now.
5600
5601 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
5602
5603 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
5604 We don't need them in glr.cc, and glr.c defines them.
5605 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
5606 assumes that defining it to anything is the same as defining
5607 it to 1. Problem reported by Paolo Bonzini.
5608
5609 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
5610
5611 * data/c.m4 (b4_null, b4_case): Define.
5612 * src/output.c (prepare_symbols): Use b4_null.
5613 (user_actions_output): Use b4_case.
5614
5615 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
5616
5617 * data/glr.c (b4_shared_declarations): Put start-header first,
5618 before any #includes that we generate, so that feature-test
5619 macros work. Problem reported by Michael Deutschmann in
5620 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
5621 * data/lalr1.cc: Likewise.
5622 * doc/bison.texinfo (Prologue): Document that feature-test macros
5623 should be defined before any Bison declarations.
5624 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
5625 that depend on location.hh after, not before, Bison decls, since
5626 we now include location.hh after the first user prologue.
5627
5628 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
5629 Sander Brandenburg in
5630 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
5631 Also, fix minor white space and comment issues.
5632 (Prologue): Mention that it's better to define feature-test macros
5633 before Bison declarations. Problem reported by Michael Deutschmann.
5634
5635 * README-cvs: Fix typo: "&" should be "&&". Problem reported
5636 by Jim Meyering.
5637 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
5638 This adjusts to recent gnulib changes.
5639
5640 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5641
5642 Finish implementation of per-type %destructor/%printer. Discussed
5643 starting at
5644 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
5645 and
5646 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
5647 * NEWS (2.3+): Add a description of this feature to the default
5648 %destructor/%printer description.
5649 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
5650 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5651 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
5652 list node contains a semantic type.
5653 * src/symtab.c, src/symtab.h: Extend with a table that associates
5654 semantic types with their %destructor's and %printer's.
5655 (semantic_type_from_uniqstr, semantic_type_get,
5656 semantic_type_destructor_set, semantic_type_printer_set): New functions
5657 composing the public interface of that table.
5658 (symbol_destructor_get, symbol_destructor_location_get,
5659 symbol_printer_get, symbol_printer_location_get): If there's no
5660 per-symbol %destructor/%printer, look up the per-type before trying
5661 the default.
5662 * tests/actions.at (Per-type %printer and %destructor): New test case.
5663 * tests/input.at (Default %printer and %destructor redeclared):
5664 Extend to check that multiple occurrences of %symbol-default in a
5665 single %destructor/%printer declaration is an error.
5666 (Per-type %printer and %destructor redeclared, Unused values with
5667 per-type %destructor): New test cases.
5668
5669 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5670
5671 Require default %destructor/%printer to be declared using
5672 %symbol-default instead of an empty symbol list, and start working on
5673 new per-type %destructor/%printer. Discussed at
5674 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
5675 * NEWS (2.3+): Add %symbol-default to example.
5676 * bison.texinfo (Freeing Discarded Symbols): Likewise.
5677 (Table of Symbols): Add entry for %symbol-default.
5678 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
5679 (generic_symlist, generic_symlist_item): New nonterminals for creating
5680 a list in which each item is a symbol, semantic type, or
5681 %symbol-default.
5682 (grammar_declaration): Use generic_symlist in %destructor and %printer
5683 declarations instead of symbols.1 or an empty list.
5684 (symbol_declaration, precedence_declaration, symbols.1): Update actions
5685 for changes to symbol_list.
5686 * src/reader.c: Update for changes to symbol_list.
5687 * src/scan-code.l: Likewise.
5688 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
5689 * src/symlist.c, src/symlist.h: Extend such that a list node may
5690 represent a semantic type or a %symbol-default in addition to just an
5691 ordinary symbol. Add switched functions for setting %destructor's and
5692 %printer's.
5693 * tests/actions.at, tests/input.at: Add %symbol-default to all default
5694 %destructor/%printer declarations.
5695
5696 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
5697
5698 Whether the default %destructor/%printer applies to a particular symbol
5699 isn't a question of whether the user *declares* that symbol (in %token,
5700 for example). It's a question of whether the user by any means
5701 *defines* the symbol at all (by simply using a char token, for
5702 example). $end is defined by Bison whereas any other token with token
5703 number 0 is defined by the user. The error token is always defined by
5704 Bison regardless of whether the user declares it with %token, but we
5705 may one day let the user define error as a nonterminal instead.
5706 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
5707 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
5708 the meaning of "user-defined".
5709 * tests/actions.at (Default %printer and %destructor for user-declared
5710 end token): Rename to...
5711 (Default %printer and %destructor for user-defined end token): ...
5712 this.
5713
5714 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
5715 computation of whether to apply the default, don't maintain a list of
5716 every Bison-defined symbol. Instead, just check for a first character
5717 of '$', which a user symbol cannot have, and check for the error token.
5718
5719 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
5720
5721 Don't apply the default %destructor or %printer to the error token,
5722 $undefined, or $accept. This change fits the general rule that the
5723 default %destructor and %printer are only for user-declared symbols,
5724 and it solves several difficulties that are described in the new test
5725 cases listed below.
5726 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
5727 * tests/actions.at (Default %printer and %destructor are not for error
5728 or $undefined, Default %printer and %destructor are not for $accept):
5729 New test cases.
5730
5731 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
5732
5733 Allow %start after the first rule.
5734 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
5735 when parsing the first rule.
5736 (check_and_convert_grammar): Search for it here after all grammar
5737 declarations have been parsed. Skip midrules, which have dummy LHS
5738 nonterminals.
5739 * src/symtab.c (symbol_is_dummy): New function.
5740 * src/symtab.h (symbol_is_dummy): Declare it.
5741 * tests/input.at (%start after first rule): New test.
5742
5743 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5744
5745 Redo some of the previous commit: add back the ability to use
5746 non-aliased/undeclared string literals since it might be useful to
5747 those declaring %token-table.
5748 * src/reader.c (check_and_convert_grammar): Undo changes in previous
5749 commit: don't worry about complaints from symbols_pack.
5750 * src/symtab.c (symbol_new, symbol_class_set,
5751 symbol_check_alias_consistency): Undo changes in previous commit: count
5752 each string literal as a new symbol and token, assign it a symbol
5753 number, and don't complain about non-aliased string literals.
5754 (symbols_pack): Since symbol_make_alias still does not decrement symbol
5755 and token counts but does still set aliased tokens to the same number,
5756 symbol_pack_processor now leaves empty slots in the symbols array.
5757 Remove those slots.
5758 * tests/regression.at (Undeclared string literal): Remove test case
5759 added in previous commit since non-aliased string literals are allowed
5760 again.
5761 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
5762 remove unnecessary string literal declarations.
5763 * tests/sets.at (Firsts): Likewise.
5764
5765 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5766
5767 Don't allow an undeclared string literal, but allow a string literal to
5768 be used before its declaration.
5769 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
5770 symbols_pack complained.
5771 * src/symtab.c (symbol_new): Don't count a string literal as a new
5772 symbol.
5773 (symbol_class_set): Don't count a string literal as a new token, and
5774 don't assign it a symbol number since symbol_make_alias does that.
5775 (symbol_make_alias): It's not necessary to decrement the symbol and
5776 token counts anymore. Don't assume that an alias declaration occurs
5777 before any uses of the identifier or string, and thus don't assert that
5778 one of them has the highest symbol number so far.
5779 (symbol_check_alias_consistency): Complain if there's a string literal
5780 that wasn't declared as an alias.
5781 (symbols_pack): Bail if symbol_check_alias_consistency failed since
5782 symbol_pack asserts that every token has been assigned a symbol number
5783 although undeclared string literals have not.
5784 * tests/regression.at (String alias declared after use, Undeclared
5785 string literal): New test cases.
5786 (Characters Escapes, Web2c Actions): Declare string literals as
5787 aliases.
5788 * tests/sets.at (Firsts): Likewise.
5789
5790 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
5791
5792 In the grammar scanner, STRING_FINISH unclosed constructs and return
5793 them to the parser in order to improve error messages.
5794 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
5795 SC_BRACED_CODE, SC_PROLOGUE): Implement.
5796 * tests/input.at (Unclosed constructs): New test case.
5797 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
5798 seen.
5799
5800 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
5801 unused global.
5802
5803 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
5804
5805 Handle string aliases for character tokens correctly.
5806 * src/symtab.c (symbol_user_token_number_set): If the token has an
5807 alias, check and set its alias's user token number instead of its own,
5808 which is set to indicate the alias. Previously, every occurrence of
5809 the character token in the grammar overwrote that alias indicator with
5810 the character code.
5811 * tests/input.at (String aliases for character tokens): New test.
5812
5813 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
5814
5815 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
5816
5817 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
5818
5819 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
5820 to prevent failures when building on older platforms.
5821 Check for autopoint failure.
5822 Set XGETTEXT_OPTIONS to values that check for C format strings,
5823 so that translators are warned about them (this also helps
5824 prevent core dumps).
5825
5826 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
5827 function, since it simplifies our code a bit.
5828
5829 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
5830 rather than -W, so we don't get bogus warnings about sign comparisons.
5831 Add -Wpointer-arith, since that warning is useful (it reports code
5832 that does not conform to C89 and that some compilers reject).
5833 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
5834 since it's no longer needed.
5835
5836 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
5837
5838 Clean up scanners a bit.
5839 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
5840 definitions so gcc won't warn when obstack_for_string is unused.
5841 * src/scan-code.l: config.h and system.h are already #include'd by
5842 scan-code-c.c, so get rid of them here.
5843 * src/scan-gram.l: Likewise.
5844 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
5845 definitions rather than duplicating the rest of it.
5846 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
5847
5848 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
5849
5850 Suppress signed/unsigned comparison warnings for yycheck.
5851 * data/c.m4 (b4_safest_int_type): New macro.
5852 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
5853 a signed int type, cast it to b4_safest_int_type first.
5854 * data/yacc.c: Likewise.
5855 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
5856 also overwritten.
5857
5858 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
5859
5860 * doc/bison.texinfo: Fix some typos.
5861
5862 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
5863
5864 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
5865 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
5866
5867 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
5868 the latest gnulib does this a different way.
5869 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
5870 translation was patched, so stop omitting it.
5871
5872 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
5873
5874 Enable declaration of default %printer/%destructor. Make the parser
5875 use these for all user-declared grammar symbols for which the user does
5876 not declare a specific %printer/%destructor. Thus, the parser uses it
5877 for token 0 if the user declares it but not if Bison generates it as
5878 $end. Discussed starting at
5879 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
5880 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
5881 and
5882 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
5883 * NEWS (2.3+): Mention.
5884 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
5885 declare a %destructor for a mid-rule's semantic value. It's just
5886 impossible to declare one specific to it.
5887 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
5888 code. Describe default %destructor form.
5889 * src/parse-gram.y (grammar_declaration): Parse default
5890 %printer/%destructor declarations.
5891 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
5892 and symbol_destructor_location_get rather than accessing the destructor
5893 and destructor_location members of struct symbol.
5894 (symbol_printers_output): Likewise but for %printer's.
5895 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
5896 again.
5897 * src/symtab.c (default_destructor, default_destructor_location,
5898 default_printer, default_printer_location): New static global
5899 variables to record the default %destructor and %printer.
5900 (symbol_destructor_get, symbol_destructor_location_get,
5901 symbol_printer_get, symbol_printer_location_get): New functions to
5902 compute the appropriate %destructor and %printer for a symbol.
5903 (default_destructor_set, default_printer_set): New functions to set the
5904 default %destructor and %printer.
5905 * src/symtab.h: Prototype all those new functions.
5906 * tests/actions.at (Default %printer and %destructor): New test to
5907 check that the right %printer and %destructor are called, that they're
5908 not called for $end, and that $$ and @$ work correctly.
5909 (Default %printer and %destructor for user-declared end token): New
5910 test to check that the default %printer and %destructor are called for
5911 a user-declared end token.
5912 * tests/input.at (Default %printer and %destructor redeclared, Unused
5913 values with default %destructor): New tests to check related grammar
5914 warnings and errors.
5915
5916 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
5917
5918 Clean up handling of %destructor for the end token (token 0).
5919 Discussed starting at
5920 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
5921 and
5922 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
5923
5924 Make the skeletons consistent in how they pop the end token and invoke
5925 its %destructor.
5926 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
5927 state, which has token number 0, since this would invoke the
5928 %destructor for the end token.
5929 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
5930 until after shifting the end token, or else it won't be popped.
5931 * data/yacc.c (yyparse): Likewise.
5932
5933 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
5934 it's the end token. Upon termination, destroy an unshifted lookahead
5935 even when it's the end token.
5936 * data/lalr1.cc (yy::parser::parse): Likewise.
5937 * data/yacc.c (yyparse): Likewise.
5938
5939 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
5940 value warnings for the end token when the user gives the end token a
5941 %destructor.
5942
5943 * tests/actions.at (Printers and Destructors): Test all the above.
5944
5945 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
5946
5947 Update to latest gnulib and gettext versions.
5948 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
5949 Add fopen-safer.
5950 (gnulib_files): Add m4/warning.m4. Don't worry about files
5951 overwritten by autopoint.
5952 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
5953 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
5954 rejects them.
5955 Don't use autoreconf; instead, invoke autopoint etc. by hand,
5956 so that we can remove the intl files at a better time.
5957 (intl_files_to_remove): Remove aclocal.m4, since it gets
5958 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
5959 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
5960 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5961 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
5962 Remove datarootdir hack; no longer needed.
5963 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
5964 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
5965 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
5966 strdup.h.
5967 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
5968 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
5969
5970 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
5971
5972 * bootstrap: Adjust to today's change to gnulib-tool by invoking
5973 it with --assume-autoconf='latest-stable'.
5974
5975 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
5976
5977 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
5978 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
5979 YYSTYPE' and `{'.
5980 * src/muscle_tab.h (muscle_grow): Replace the header comments with
5981 those from muscle_tab.c since the old ones are misleading.
5982
5983 2006-07-13 Akim Demaille <akim@epita.fr>
5984
5985 Support %define "KEY" {VALUE}.
5986 * src/scan-code.h, src/scan-code.l (translate_action)
5987 (translate_rule_action, translate_symbol_action, translate_code):
5988 Return char *, not const char *.
5989 * src/parse-gram.y (declaration): Rename as...
5990 (prologue_declaration): this.
5991 (string_content): Remove this nonterminal, use STRING.
5992 (braceless, content, content.opt): New nonterminal.
5993 Use them.
5994 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
5995 as value.
5996 * src/scan-gram.l (getargs.h): Don't include it.
5997
5998 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
5999
6000 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6001 rather than a for-loop that declares a local bool variable. This
6002 should work around a compatibility problem with a Cray x1e C++
6003 compiler reported by Hung Nguyen in
6004 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6005 The for-loop was introduced in the 2004-11-17 change but I don't
6006 know why it was needed.
6007
6008 2006-07-12 Akim Demaille <akim@epita.fr>
6009
6010 * data/c.m4: Comment changes.
6011
6012 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
6013
6014 * src/complain.c (error_message, ERROR_MESSAGE): New.
6015 To factor...
6016 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6017 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6018
6019 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6020
6021 * NEWS: Instead of %union, you can define and use your own union type
6022 YYSTYPE if your grammar contains at least one <type> tag.
6023 Your YYSTYPE need not be a macro; it can be a typedef.
6024 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6025 (Union Decl, Decl Summary): Document this.
6026 * data/glr.c (YYSTYPE): Implement this.
6027 * data/glr.cc (YYSTYPE): Likewise.
6028 * data/lalr1.cc (YYSTYPE): Likewise.
6029 * data/yacc.c (YYSTYPE): Likewise.
6030 * src/output.c (prepare): Output tag_seen_flag.
6031 * src/parse-gram.y (declaration, grammar_declaration):
6032 Use 'union_seen' rather than 'typed' to determine whether
6033 %union has been seen, since grammars can now be typed without
6034 %union.
6035 (symbol_declaration, type.opt, symbol_def):
6036 Keep track of whether a tag has been seen.
6037 * src/reader.c (union_seen, tag_seen): New vars.
6038 (typed): remove.
6039 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6040 * src/scan-code.l (untyped_var_seen): New variable.
6041 (handle_action_dollar): Adjust to above changes.
6042 (handle_action_dollar, handle_action_at):
6043 Improve overflow checking for outlandish numbers.
6044 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6045 avoid new diagnostics generated by above changes.
6046 * tests/regression.at (YYSTYPE typedef): Add test to check
6047 for type tags without %union.
6048
6049 * src/symlist.c (symbol_list_length): Return int, not unsigned
6050 int, since callers expect int. This may need to get revisited
6051 once we have proper integer overflow checking.
6052
6053 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6054 object is now static.
6055
6056 * src/getargs.c (flags_argmatch): Return void, not int,
6057 to pacify ./configure --enable-gcc-warnings.
6058
6059 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6060 since last_string is already defined to FLEX_PREFIX (last_string).
6061
6062 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6063
6064 Implement --warnings/-W.
6065 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6066 replaced by...
6067 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6068 Adjust callers.
6069 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6070 (warnings_args, warnings_types): New.
6071 (getargs, short_options, long_options): Accept -W/--warnings.
6072 Sort the options by alphabetical order, upper case letter right
6073 before its lower case.
6074
6075 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6076
6077 Change %merge result type clash warnings to errors. Discussed at
6078 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6079 * src/reader.c (record_merge_function_type): Use complain_at.
6080 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6081 declared later): Update test case results.
6082
6083 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6084
6085 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6086 to be in alphabetical order.
6087 (trace_args): Spelling fixes.
6088
6089 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6090
6091 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6092 so they don't collide with user-defined macros.
6093 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6094 this was never guaranteed, and now that we're using gnulib stdint,
6095 which defines int_fast16_t to long int, the problem is exposed.
6096
6097 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6098
6099 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6100 need the full POSIX semantics (and weren't implementing them
6101 anyway).
6102
6103 Adjust to Autoconf 2.60 and today's gnulib.
6104 * bootstrap (gnulib_modules): Add stdint.
6105 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6106 no longer copies it.
6107 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6108 since stdint needs the former and wcwidth (which is now required
6109 by mbswidth) needs the latter.
6110 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6111 work around a compatibility glitch between gettext 0.14.6 and
6112 Autoconf 2.60.
6113 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6114 Do not check for uintptr_t, since new stdint module does the right
6115 thing.
6116 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6117 Add stdint.h, stdint_.h, wcwidth.h.
6118 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6119 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6120 stdint.m4, wchar_t.m4, wcwidth.m4.
6121 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6122 usual order for ../lib/*.h files.
6123 (file_name_split): Use last_component, not base_name, to adjust
6124 to gnulib changes.
6125 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6126 for ../lib/*.h files.
6127 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6128 Define unconditionally, since we now assume the stdint module.
6129 * src/scan-skel.l: Include <dirname.h>.
6130 (BASE_QPUTS): Use last_component, not base_name.
6131 * src/system.h: Include <unlocked-io.h> in the usual order
6132 for ../lib/*.h files. Include <stdint.h> unconditionally,
6133 since we now use the stdint module.
6134 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6135 HAVE_UINTPTR_T, since we now use the stdint module.
6136 (base_name): Remove decl, since files now include <dirname.h>
6137 to get the decl.
6138
6139 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6140
6141 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6142 New, default to 1.
6143 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6144 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6145 default.
6146 * tests/calc.at: Adjust.
6147
6148 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6149
6150 * data/c.m4 (b4_basename): New.
6151 (b4_syncline): Also output the location of its invocation (from
6152 the skeleton).
6153 (b4_user_action, b4_define_user_action, b4_user_actions)
6154 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6155 (b4_user_stype): New.
6156 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6157
6158 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6159
6160 In the grammar file, the first column is 1 not 0 on the first line as
6161 on every other line.
6162 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6163 * tests/input.at (Torturing the Scanner): Update output.
6164
6165 * src/scan-gram.l (scanner_cursor): Declare it static.
6166
6167 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6168
6169 In warnings, say "previous declaration" rather than "first
6170 declaration".
6171 * src/symtab.c (redeclaration): Do that here.
6172 * src/reader.c (record_merge_function_type): In the case of a result
6173 type clash, report the previous declaration rather than the very first
6174 one in the grammar file.
6175 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6176 declared later): Add a third declaration to check this behavior.
6177 * tests/input.at (Incompatible Aliases): Update output.
6178
6179 2006-06-27 Akim Demaille <akim@epita.fr>
6180
6181 * doc/Doxyfile.in: New.
6182 * doc/Makefile.am: Use it.
6183 * src/lalr.h, src/symtab.h: Initial doxygenation.
6184
6185 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6186
6187 Don't miss %merge result type warnings just because the LHS types are
6188 declared after the %merge. This continues the effort of the previous
6189 patch.
6190 * src/reader.c (get_merge_function): Don't set the merger type yet.
6191 (record_merge_function_type): New function for setting the merger type
6192 and checking for clashes.
6193 (grammar_current_rule_merge_set): Set the location of the %merge for
6194 the current rule.
6195 (packgram): Invoke record_merge_function_type for each rule now that
6196 all symbol type declarations have been parsed.
6197 * src/reader.h (merger_list.type_declaration_location): New member
6198 storing the location of the first %merge from which the type for this
6199 merging function was derived.
6200 * src/symlist.h (symbol_list.merger_declaration_location): New member
6201 storing the location of a rule's %merge, if any.
6202 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6203 declared later): New test to catch the error fixed by the above patch.
6204
6205 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6206
6207 Get action warnings (grammar_rule_check) right even when symbol
6208 declarations appear after the rules. Discussed at
6209 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6210 and
6211 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6212 Don't mistake the type of $$ in a midrule to be that of its parent
6213 rule's $$.
6214 * src/reader.c (grammar_current_rule_end): Don't invoke
6215 grammar_rule_check yet since not all symbol declarations may have been
6216 parsed yet.
6217 (grammar_midrule_action): Likewise.
6218 Don't record whether the midrule's $$ has been used yet since actions
6219 haven't been translated yet.
6220 Record the midrule's parent rule and its RHS index within the parent
6221 rule.
6222 (grammar_current_rule_action_append): Don't translate the action yet
6223 since not all symbol declarations may have been parsed yet and, thus,
6224 warnings about types for $$, $n, @$, and @n can't be reported yet.
6225 (packgram): Translate the action and invoke grammar_rule_check now that
6226 all symbol declarations have been parsed.
6227 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6228 after parsing the entire grammar file, the symbol list here in the case
6229 of a midrule is actually the midrule's empty RHS, so reference its
6230 parent rule's RHS where necessary.
6231 On the other hand, now that you can already know it's a midrule, you
6232 aren't forced to think $$ has the same type as its parent rule's $$.
6233 (handle_action_at): In the case of a midrule, reference the parent rule
6234 where necessary.
6235 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6236 members.
6237 (symbol_list_length): Now that this is invoked after all rules have
6238 been parsed, a NULL symbol (rather than a NULL symbol list node)
6239 terminates a rule. symbol_list_print already does this correctly.
6240 * src/symlist.h (symbol_list.midrule_parent_rule,
6241 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6242 remember their relationships with their parents.
6243 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6244 fixed by the above patch.
6245 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6246 implementing...
6247 (Unused values): ... this old test case and...
6248 (Unused values before symbol declarations): ... this new test case.
6249 This one is the same as `Unused values' except that all symbol
6250 declarations appear after the rules in order to catch the rest of the
6251 errors fixed by the above patch.
6252
6253 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6254
6255 More cleanup.
6256 * src/reader.c (current_rule): Declare it static since it's no longer
6257 used outside this file.
6258 (grammar_current_rule_action_append): Remove redundant arguments from
6259 translate_rule_action invocation.
6260 * src/reader.h (current_rule): Remove this unused extern.
6261 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6262 * src/scan-code.l (translate_rule_action): Likewise.
6263
6264 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6265
6266 Clean up yesterday's patch.
6267 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6268 to...
6269 * src/reader.c (grammar_current_rule_action_append): ... here for
6270 consistency with grammar_current_rule_symbol_append.
6271 * tests/regression.at (Braced code in declaration in rules section):
6272 Make yyerror and yylex static as usual.
6273
6274 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6275
6276 Fix bug that mistakes braced code in a declaration in the rules section
6277 to be a rule action. Mentioned at
6278 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6279 * src/scan-gram.l: Move midrule action detection from the start of the
6280 scanning of any braced code to...
6281 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6282 action. For readability, use $2 and @2 rather than the equivalent
6283 global variables.
6284 * tests/regression.at (Braced code in declaration in rules section):
6285 New test to catch the error fixed by the above patch.
6286
6287 Work on code readability some.
6288 * src/scan-code.l (current_rule): Get rid of this misleading and
6289 redundant declaration: it's actually extern'ed in reader.h.
6290 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6291 translate_action): Add a rule argument and use it instead of the global
6292 current_rule.
6293 (translate_rule_action): This already receives current_rule through an
6294 argument, so pass it on to translate_action instead of assigning
6295 current_rule to current_rule.
6296 (translate_symbol_action, translate_code): Pass rule = NULL to
6297 translate_action.
6298
6299 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6300
6301 Rename %before-definitions to %start-header and %after-definitions to
6302 %end-header. Don't use these declarations to separate pre-prologue
6303 blocks from post-prologue blocks. Add new order-independent
6304 declarations %before-header and %after-header as alternatives to the
6305 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6306 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6307 * NEWS (2.3+): Update for these changes.
6308 * data/glr.c (b4_before_definitions): Update to...
6309 (b4_start_header): ... this.
6310 (b4_after_definitions): Update to...
6311 (b4_end_header): ... this.
6312 * data/glr.cc: Likewise.
6313 * data/lalr1.cc: Likewise.
6314 * data/yacc.c: Likewise.
6315 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6316 prologue blocks with %*-header declarations.
6317 (Calc++ Parser): Likewise.
6318 (Decl Summary): Update names.
6319 (Table of Symbols): Update description.
6320 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6321 (PERCENT_END_HEADER): ... this.
6322 (PERCENT_BEFORE_DEFINITIONS): Update to...
6323 (PERCENT_START_HEADER): ... this.
6324 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6325 (declaration): Update token names and m4 macro names.
6326 When parsing %end-header and %start-header, invoke translate_code
6327 before muscle_code_grow, and no longer set global booleans to remember
6328 whether these declarations have been seen.
6329 Parse new %after-header and %before-header.
6330 * src/reader.c (before_definitions, after_definitions): Remove.
6331 (prologue_augment): Accept a new bool argument to specify whether to
6332 augment the pre-prologue or post-prologue.
6333 * src/reader.h (before_definitions, after_definitions): Remove these
6334 extern's.
6335 (prologue_augment): Add new bool argument.
6336 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6337 (PERCENT_END_HEADER): ... this.
6338 (PERCENT_BEFORE_DEFINITIONS): Update to...
6339 (PERCENT_START_HEADER): ... this.
6340 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6341 * tests/actions.at (Printers and Destructors): Update names.
6342
6343 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6344
6345 Add comparison operators for C++ location classes. Discussed at
6346 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6347 * data/c++.m4 (b4_define_location_comparison): New boolean %define
6348 declaration indicating whether filename_type has an operator==. If
6349 filename_type is `std::string', it defaults to `1', `0' otherwise.
6350 * data/location.cc: Iff b4_define_location_comparison is `1', add
6351 operator== and operator!= for class position and for class location.
6352
6353 Some minor fixes.
6354 * src/scan-action.l: Remove unused file.
6355 * src/symtab.c (symbol_printer_set): Use printer_location not
6356 destructor_location.
6357 * src/symtab.h (struct symbol): Replace incorrect source comment for
6358 printer members.
6359 * tests/input.at (Incompatible Aliases): Update output with correct
6360 printer location.
6361
6362 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
6363
6364 Don't put the pre-prologue in the header file. For the yacc.c code
6365 file and the glr.c header and code files, move the pre-prologue before
6366 the token definitions. Add new %before-definitions and
6367 %after-definitions to declare code that will go in both the header file
6368 and code file. Discussed at
6369 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
6370 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
6371 and
6372 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
6373 * NEWS (2.3+): Describe these changes.
6374 * data/glr.c (b4_pre_prologue): Move from within to before...
6375 (b4_shared_declarations): ... this.
6376 Add new b4_before_definitions before b4_token_enums.
6377 Add new b4_after_definitions at the end.
6378 * data/glr.cc (b4_pre_prologue): Replace with...
6379 (b4_before_definitions): ... this in the header file.
6380 (b4_after_definitions): New near the end of the header file.
6381 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
6382 code file right before including the header file.
6383 (b4_before_definitions): New in the previous position of
6384 b4_pre_prologue in the header file.
6385 (b4_after_definitions): New near the end of the header file.
6386 * data/yacc.c: Clean up some m4 quoting especially in the header file.
6387 (b4_token_enums_defines): In the code file, move to right before
6388 YYSTYPE for consistency with the header file.
6389 (b4_before_definitions): New right before b4_token_enums_defines in
6390 both the header and code file.
6391 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
6392 header and code file.
6393 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
6394 of prologues for %union dependencies.
6395 (Decl Summary): In %defines description, mention the effect of
6396 %before-definitions and %after-definitions on the header file.
6397 (Calc++ Parser): Forward declare driver in a %before-definitions rather
6398 than in the pre-prologue so that make check succeeds.
6399 (Table of Symbols): Add entries for %before-definitions and
6400 %after-definitions.
6401 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
6402 %before-definitions.
6403 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
6404 (declaration): Parse those declarations and append to
6405 b4_before_definitions and b4_after_definitions, respectively.
6406 * src/reader.c (before_definitions, after_definitions): New bools to
6407 track whether those declarations have been seen.
6408 (prologue_augment): Add to the post-prologue if %union,
6409 %before-definitions, or %after-definitions has been seen.
6410 * src/reader.h (before_definitions, after_definitions): New extern's.
6411 * src/scan-gram.l: Scan the new declarations.
6412 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
6413 prologue block in a %before-definitions or a %after-definitions based
6414 on whether the %union is declared.
6415 * tests/regression.at (Early token definitions with --yacc, Early token
6416 definitions without --yacc): Move tests for token definitions into the
6417 post-prologue since token names are no longer defined in the
6418 pre-prologue.
6419
6420 2006-06-20 Akim Demaille <akim@epita.fr>
6421
6422 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
6423 (symbol_get): Use it.
6424 * src/parse-gram.y: Use it.
6425
6426 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
6427
6428 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
6429 build succeeds when configured with --enable-gcc-warnings.
6430
6431 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
6432
6433 * src/parse-gram.y (char_name): New function.
6434 (CHAR, STRING, string_content): For %printer, properly escape.
6435 (ID): Prefer fputs to fprintf.
6436 (id): Reindent to be consistent with other rules.
6437 Properly quote char.
6438
6439 The Translation Project changed its way of publishing translations
6440 to maintainers. I haven't received any responses to my request
6441 for supporting the old way, or for documenting the new way. I
6442 have modified 'bootstrap' to use screen scraping
6443 (in this case, HTML scraping). This is unreliable and inelegant,
6444 but I don't see any better way. Yuck.
6445 * bootstrap (TP_URL, WGET_COMMAND): New vars.
6446 (get_translations): New function, which uses HTML scraping to
6447 deduce locations of latest translations.
6448 Use this function to grab both bison and bison-runtime .po files.
6449 Don't bother priming the pump for the runtime-po domain any more,
6450 as it's now translated better than bison is.
6451
6452 2006-06-19 Akim Demaille <akim@epita.fr>
6453
6454 * src/scan-gram.l: No longer "parse" things after `%union' until
6455 `{'. Rather, return a single "%union" token.
6456 No longer make symbols: return strings, and leave the conversion
6457 to symbols to the parser.
6458 (SC_PRE_CODE, token_type): Remove.
6459 * src/parse-gram.y (%union): New field `character'.
6460 Sort tokens.
6461 (CHAR): New token.
6462 (ID, ID_COLON): Now that the scanner no longer makes them
6463 identifiers, adjust all uses to invoke symbol_get.
6464 (id_colon): New, wraps the conversion from string to symbol.
6465 (%union): Accept a possible union_name.
6466 (symbol): Now can be a char.
6467 * data/c.m4 (b4_union_name): Leave a default value.
6468 * data/glr.c, data/yacc.c: Use it.
6469
6470 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
6471
6472 For associating token numbers with token names for "yacc.c", don't use
6473 #define statements unless `--yacc' is specified; always use enum
6474 yytokentype. Most important discussions start at:
6475 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
6476 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
6477 and
6478 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
6479 * NEWS (2.3+): Mention.
6480 * data/c.m4 (b4_yacc_if): New.
6481 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
6482 token #define's.
6483 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
6484 on token name definitions.
6485 * src/getargs.c (usage): Capitalize `Yacc' in English.
6486 * src/output.c (prepare): Define b4_yacc_flag.
6487 * tests/regression.at (Early token definitions): Test that tokens names
6488 are defined before the pre-prologue not just before the post-prologue.
6489 Remove this test case and copy to...
6490 (Early token definitions with --yacc): ... this to test #define's.
6491 (Early token definitions without --yacc): ... and this to test enums.
6492
6493 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
6494
6495 * NEWS: Reword the post-2.3 change to not be so optimistic about
6496 removing the old "look-ahead" spelling.
6497 Update previous look-ahead/lookahead change reports.
6498 * REFERENCES: look-ahead -> lookahead (since that's
6499 what he actually wrote).
6500 * doc/refcard.tex: look ahead -> lookahead,
6501 look-ahead -> lookahead
6502
6503 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
6504
6505 For consistency, use `lookahead' instead of `look-ahead' or
6506 `look_ahead'. Discussed starting at
6507 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
6508 and then at
6509 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
6510 * NEWS: For the next release, note the change to `--report'.
6511 * TODO, doc/bison.1: Update English.
6512 * doc/bison.texinfo: Update English.
6513 (Understanding Your Parser, Bison Options): Document as
6514 `--report=lookahead' rather than `--report=look-ahead'.
6515 * src/conflicts.c: Update English in comments.
6516 (lookahead_set): Rename from look_ahead_set.
6517 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
6518 (resolve_sr_conflict): Rename local look_ahead_tokens to
6519 lookahead_tokens, and update other uses.
6520 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
6521 count_rr_conflicts, conflicts_free): Update uses.
6522 * src/getargs.c (report_args): Move "lookahead" before alternate
6523 spellings.
6524 (report_types): Update uses.
6525 (usage): For `--report' usage description, state `lookahead' spelling
6526 rather than `look-ahead'.
6527 * src/getargs.h (report.report_lookahead_tokens): Rename from
6528 report_look_ahead_tokens.
6529 * src/lalr.c: Update English in comments.
6530 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
6531 (state_lookahead_tokens_count): Rename from
6532 state_look_ahead_tokens_count.
6533 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6534 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
6535 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6536 Update other uses.
6537 Update English in output.
6538 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
6539 * src/print.c: Update English in comments.
6540 (lookahead_set): Rename from look_ahead_set.
6541 (print_reduction): Rename argument lookahead_token from
6542 look_ahead_token.
6543 (print_core, state_default_rule, print_reductions, print_results):
6544 Update uses.
6545 * src/print_graph.c: Update English in comments.
6546 (print_core): Update uses.
6547 * src/state.c: Update English in comments.
6548 (reductions_new): Update uses.
6549 (state_rule_lookahead_tokens_print): Rename from
6550 state_rule_look_ahead_tokens_print, and update other uses.
6551 * src/state.h: Update English in comments.
6552 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
6553 (state_rule_lookahead_tokens_print): Rename from
6554 state_rule_look_ahead_tokens_print.
6555 * src/tables.c: Update English in comments.
6556 (conflict_row, action_row): Update uses.
6557 * tests/glr-regression.at
6558 (Incorrect lookahead during deterministic GLR,
6559 Incorrect lookahead during nondeterministic GLR): Rename
6560 print_look_ahead to print_lookahead.
6561 * tests/torture.at: Update English in comments.
6562 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
6563 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
6564 (Many lookahead tokens): Update uses.
6565 * data/glr.c: Update English in comments.
6566 * lalr1.cc: Likewise.
6567 * yacc.c: Likewise.
6568 * src/conflicts.h: Likewise.
6569 * src/lalr.h: Likewise.
6570 * src/main.c: Likewise.
6571 * src/output.c: Likewise.
6572 * src/parse-gram.c: Likewise.
6573 * src/tables.h: Likewise.
6574 * tests/calc.at: Likewise.
6575
6576 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
6577
6578 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
6579
6580 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
6581
6582 * TODO: Add request from Nelson H. F. Beebe to be able to install
6583 Bison without installing the yacc script.
6584
6585 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6586
6587 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
6588 and yytext if they're already #define'd.
6589 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
6590 * src/scan-code-c.c: ... here.
6591 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
6592 <config.h>.
6593
6594 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6595
6596 Get Bison to build again when configured with --enable-gcc-warnings.
6597 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
6598 missing #include's.
6599 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
6600 loc argument as it shadows a global.
6601 * src/scan-gram.l: Remove stray comma that prevents boundary_set
6602 invocation.
6603
6604 * src/.cvsignore: Add scan-code.c.
6605
6606 2006-06-07 Akim Demaille <akim@epita.fr>
6607
6608 * src/scan-gram.l: Move the "add a trailing ; to actions" code
6609 to...
6610 * src/scan-code.l: here.
6611 * tests/input.at (Torturing the Scanner): Fix another location
6612 error.
6613
6614 2006-06-07 Akim Demaille <akim@epita.fr>
6615
6616 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
6617
6618 2006-06-06 Akim Demaille <akim@epita.fr>
6619
6620 Extract the parsing of user actions from the grammar scanner.
6621 As a consequence, the relation between the grammar scanner and
6622 parser is much simpler. We can also split "composite tokens" back
6623 into simple tokens.
6624 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
6625 * src/scan-gram.l (add_column_width, adjust_location): Move to and
6626 rename as...
6627 * src/location.h, src/location.c (add_column_width)
6628 (location_compute): these.
6629 Fix the column count: the initial column is 0.
6630 (location_print): Be robust to ending column being 0.
6631 * src/location.h (boundary_set): New.
6632 * src/main.c: Adjust to scanner_free being renamed as
6633 gram_scanner_free.
6634 * src/output.c: Include scan-code.h.
6635 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
6636 Use boundary_set.
6637 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
6638 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
6639 which is now, again, a separate token.
6640 Adjust all dependencies.
6641 Whereever actions with $ and @ are used, use translate_code.
6642 (action): Remove this nonterminal which is now useless.
6643 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
6644 (grammar_current_rule_action_append): Use translate_code.
6645 (packgram): Bound check ruleno, itemno, and rule_length.
6646 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
6647 (last_string, last_braced_code_loc, max_left_semantic_context)
6648 (scanner_initialize, scanner_free, scanner_last_string_free)
6649 (gram_out, gram_lineno, YY_DECL_): Move to...
6650 * src/scan-gram.h: this new file.
6651 (YY_DECL): Rename as...
6652 (GRAM_DECL): this.
6653 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
6654 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6655 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6656 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6657 Move these declarations, and...
6658 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
6659 these to...
6660 * src/flex-scanner.h: this new file.
6661 * src/scan-gram.l (rule_length, rule_length_overflow)
6662 (increment_rule_length): Remove.
6663 (last_braced_code_loc): Rename as...
6664 (gram_last_braced_code_loc): this.
6665 Adjust to the changes of the parser.
6666 Move all the handling of $ and @ into...
6667 * src/scan-code.l: here.
6668 * src/scan-gram.l (handle_dollar, handle_at): Remove.
6669 (handle_action_dollar, handle_action_at): Move to...
6670 * src/scan-code.l: here.
6671 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
6672 scan-code.h, scan-code-c.c, scan-gram.h.
6673 (EXTRA_bison_SOURCES): Add scan-code.l.
6674 (BUILT_SOURCES): Add scan-code.c.
6675 (yacc): Be robust to white spaces.
6676
6677 * tests/conflicts.at, tests/input.at, tests/reduce.at,
6678 * tests/regression.at: Adjust the column numbers.
6679 * tests/regression.at: Adjust the error message.
6680
6681 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6682
6683 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6684 Use Akim's wording from
6685 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
6686
6687 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6688
6689 Between Bison releases, manually append `+' to the previous Bison
6690 release number, and use that as a signal to automatically print the
6691 ChangeLog's CVS Id keyword from --version. Discussed starting at
6692 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
6693 * ChangeLog: Add Id header.
6694 * configure.ac (AC_INIT): Append `+' to `2.3'.
6695 * src/.cvsignore: Add revision.c.
6696 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
6697 (BUILT_SOURCES): Add revision.c.
6698 (revision.c): New target rule. This file defines a new global variable
6699 named revision. It initializes it with either the Id from ChangeLog
6700 or, if VERSION doesn't contain `+', with the empty string.
6701 * src/getargs.c (version): Print the value of revision.
6702 * src/revision.h: Extern revision.
6703
6704 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
6705
6706 * NEWS: Version 2.3.
6707 * configure.ac (AC_INIT): Likewise.
6708
6709 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
6710
6711 * data/glr.c (YYRECOVERING): Define to be a function-like macro
6712 with no arguments, not as an object-like macro. This is for
6713 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
6714 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
6715 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
6716 Document this.
6717
6718 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
6719
6720 * src/getargs.c (usage): Back out yesterday's modification of the
6721 --help output so that we don't have to wait for translation before
6722 releasing 2.3.
6723
6724 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
6725
6726 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
6727 Problem reported by Akim Demaille.
6728
6729 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6730
6731 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6732
6733 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
6734
6735 * data/yacc.c (yy_reduce_print): Omit trailing white space in
6736 generated source code. Problem reported by Frans Englich in
6737 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
6738
6739 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
6740
6741 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
6742 shell, not within 'make', so that 'make' by an ordinary builder
6743 (using GNU make) does not worry about configuring gzip. This also
6744 works around a bug reported independently by Keith Thompson and by
6745 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
6746 stderr rather than stdout, messing up the build logs.
6747
6748 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6749
6750 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
6751 to make sure that YYID will never be unused. This fixes a 'make
6752 maintainer-check' failure caused by the recent changes to the 'Trivial
6753 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
6754 not used.
6755 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
6756
6757 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6758
6759 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
6760 state before an empty RHS is always resolved here. Only the location
6761 of that state is guaranteed to be resolved, and that's enough. This
6762 fixes the remaining bug reported by Derek M. Jones in
6763 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6764 * tests/glr-regression.at (Uninitialized location when reporting
6765 ambiguity): Test the above case.
6766 Also, the embedded comments in this test case claim it checks the case
6767 of an empty RHS that has inherited the initial location. However, the
6768 corresponding LHS was already resolved, so yyresolveLocations didn't
6769 actually have reason to modify it. Fix this by forcing
6770 nondeterministic operation at the beginning of the parse.
6771
6772 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
6773
6774 * data/c.m4 (b4_yy_symbol_print_generate):
6775 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
6776 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
6777 of the bugs reported today by Derek M Jones in
6778 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6779 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
6780 defined to be a type name without parens or brackets.
6781 (Location Type): Similarly for YYLTYPE.
6782 * tests/regression.at (Trivial grammars): Put in a test for this
6783 bug that will be caught by 'make maintainer-check' (though not,
6784 alas, by 'make check' unless your compiler is picky).
6785
6786 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
6787
6788 * NEWS: Version 2.2.
6789 * configure.ac (AC_INIT): Likewise.
6790
6791 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
6792
6793 * data/glr.c (yyreportTree): Make room in yystates for the state
6794 preceding the RHS. This fixes the segmentation fault reported by Derek
6795 M. Jones in
6796 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
6797 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
6798 to the user. Reported for yyreportTree by Derek M. Jones later in the
6799 same thread.
6800 * THANKS: Add Derek M. Jones.
6801 Update my email address.
6802 Fix typo in Steve Murphy's name.
6803
6804 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
6805
6806 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
6807 checking against YYLAST that caused the parser to miss a potential
6808 alternative in its diagnostic.
6809 Problem reported by Maria Jose Moron Fernandez in
6810 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
6811 * data/lalr1.cc (yysyntax_error_): Likewise.
6812 * data/yacc.c (yysyntax_error): Likewise.
6813 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
6814 tokens, in case we run into an older C compiler.
6815 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
6816 Use them to check for the off-by-one error fixed above.
6817
6818 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
6819 YYSIZE_T, not size_t.
6820 * tests/regression.at (Trivial grammars): New test, to catch
6821 the error fixed by the above patch.
6822
6823 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6824
6825 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
6826 scheme.
6827 Reported by Steve Murphy.
6828
6829 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6830
6831 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
6832 * data/glr.cc: b4_location_flag is now b4_locations_flag.
6833
6834 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6835
6836 Implement --trace=m4.
6837 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
6838 * src/output.c (output_skeleton): When set, pass -dV to m4.
6839
6840 Factor the handling of flags in m4.
6841 * src/output.c (prepare): Rename the muscle names debug, defines,
6842 error_verbose to debug_flag, defines_flag, error_verbose_flag.
6843 * data/c.m4: Adjust.
6844 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
6845 Use b4_define_flag_if to define other b4_FLAG_if macros.
6846 (b4_location_if): As a consequence, rename as...
6847 (b4_locations_if): this, for consistency.
6848 Adjust all the skeletons.
6849
6850 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6851
6852 * etc/bench.pm: Shorten bench names.
6853
6854 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6855
6856 * src/output.h, src/output.c (error_verbose): Move to...
6857 * src/getargs.h, src/getargs.c: here.
6858 Sort the flags.
6859 Adjust dependencies.
6860
6861 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
6862
6863 * data/c.m4 (b4_copyright): Put the special exception for Bison
6864 skeletons here, so we don't have to put it in each skeleton. All
6865 uses changed. Suggested by Akim Demaille. Also, wrap the
6866 copyright notice, in case it is longer than 80 columns. Replace
6867 comma by newline after title.
6868
6869 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
6870
6871 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
6872 incompatibility, not a bug. Mention that it wasn't fixed as of
6873 flex 2.5.33.
6874
6875 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
6876
6877 * examples/extexi: Enforce the precedence of concatenation over
6878 >>.
6879 Reported by Tommy Nordgren.
6880
6881 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
6882
6883 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
6884 with the member "token".
6885 Reported by Martin Nylin.
6886
6887 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
6888
6889 * data/glr.c: Switch to Bison 2.2 special-exception language in
6890 the copyright notice. Use more-regular format for titles and
6891 copyright notices.
6892 * data/glr.cc: Likewise.
6893 * data/location.cc: Likewise.
6894 * data/yacc.cc: Likewise.
6895 * doc/bison.texinfo (Conditions): Document this.
6896 * NEWS: likewise. Upgrade version to 2.2.
6897
6898 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
6899
6900 * data/glr.cc: Remove dead code.
6901
6902 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
6903
6904 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
6905 that variable and the line breaks the bootstrap. Problem reported
6906 by Juan M. Guerrero.
6907
6908 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
6909
6910 * doc/bison.texinfo (Multiple start-symbols): New.
6911
6912 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
6913
6914 * etc/README, etc/bench.pl: New.
6915
6916 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
6917
6918 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
6919 rule.
6920 Reported by Mickael Labau.
6921 * tests/input.at (Torturing the Scanner): Test it.
6922
6923 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
6924
6925 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
6926 Problem reported by Bob Rossi.
6927
6928 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
6929
6930 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
6931 and didn't really work.
6932 For the index, use @ifnotinfo, not @iftex.
6933 Minor cleanups of spacing and terminology.
6934
6935 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
6936
6937 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
6938 of AT_NAME_PREFIX when %name-prefix is not used.
6939
6940 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
6941
6942 Apply --prefix to C++ skeletons too: they change the namespace.
6943 The test suite already exercize these cases.
6944 * data/c++.m4 (b4_namespace): New.
6945 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
6946 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
6947 * data/yacc.c, data/glr.c: Remove a useless `[]'.
6948 * doc/bison.texinfo: Document it.
6949 (Option Cross Key): Use @multitable in all formats. It looks
6950 nicer, even in TeX outputs.
6951 (Rules): Use the same code whatever the output type is.
6952 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
6953 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
6954 * tests/calc.at: Use it, instead of hard coding `yy'.
6955
6956 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
6957
6958 * TODO: Remove dead items.
6959
6960 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
6961
6962 * doc/FAQ: Remove, merged into...
6963 * doc/bison.texinfo (FAQ): this.
6964 * doc/Makefile.am (EXTRA_DIST): Adjust.
6965
6966 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
6967
6968 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
6969 even if empty.
6970 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
6971 * doc/bison.texinfo (Calc++ Scanner): Use it.
6972
6973 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
6974
6975 Fix two nits reported by twlevo, plus one more that I discovered.
6976
6977 * src/assoc.h (assoc_to_string): Give a name to the arg, as
6978 this is the usual Bison style.
6979 * src/location.h (location_print): Likewise.
6980
6981 * src/reader.h (token_name): Likewise.
6982
6983 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
6984
6985 Fix some nits reported by twlevo.
6986 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
6987 and "POSIX". Use more-modern syntax for URLs. Mention C++
6988 and ask for Java. Don't hardwire OS version numbers. Add
6989 copyright notice.
6990 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
6991 * src/conflicts.c (solved_conflicts_obstack): Now static.
6992
6993 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
6994
6995 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
6996 page. Say "you can use it" not "you may use it" as on the web page;
6997 we're describing capabilities not granting permission.
6998
6999 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7000
7001 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7002 shadowing warnings. Use usual patter for iterating through RHS.
7003 * tests/glr-regression.at
7004 (Uninitialized location when reporting ambiguity):
7005 Modify yylex so that it uses its argument, rather than trying
7006 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7007 const char -> char const.
7008
7009 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7010 Don't use tabs inside commands; it messes up 'ps'.
7011 Problem reported by twlevo.
7012
7013 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7014
7015 * tests/glr-regression.at (Uninitialized location when reporting
7016 ambiguity): New test case.
7017 * data/glr.c (yyresolveLocations): New function, which uses
7018 YYLLOC_DEFAULT.
7019 (yyresolveValue): Invoke yyresolveLocations before reporting an
7020 ambiguity.
7021 * doc/bison.texinfo (Default Action for Locations): Note
7022 YYLLOC_DEFAULT's usage for ambiguity locations.
7023 (GLR Semantic Actions): Cross-reference those notes.
7024
7025 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7026
7027 * tests/glr-regression.at (Leaked semantic values when reporting
7028 ambiguity): Remove unnecessary union and type declarations.
7029 (Leaked lookahead after nondeterministic parse syntax error): New test
7030 case.
7031 * data/glr.c (yyparse): Check for zero stacks remaining before
7032 attempting to shift the lookahead so that you don't lose it.
7033
7034 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7035
7036 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7037 * tests/glr-regression.at (Leaked semantic values when reporting
7038 ambiguity): New test case.
7039 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7040 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7041 now unnecessary yystackp parameter.
7042 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7043 destructors can be called.
7044
7045 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7046 in existing testcases.
7047
7048 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7049
7050 Don't leak semantic values for parent RHS when a user action cuts the
7051 parser, and clean up related code a bit.
7052 * tests/glr-regression.at (Leaked merged semantic value if user action
7053 cuts parse): Rename to...
7054 (Leaked semantic values if user action cuts parse): ... this. Add check
7055 for leaked parent RHS values.
7056 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7057 between an unresolved state (non-empty chain of semantic options) and
7058 an incomplete one (signaled by an empty chain).
7059 (yyresolveStates): Document the interface. Move all manipulation of a
7060 successfully or unsuccessfully resolved yyGLRState to...
7061 (yyresolveValue): ... here so that yyresolveValue always leaves a
7062 yyGLRState with consistent data and thus is easier to understand.
7063 Remove the yyvalp and yylocp parameters since they are always just
7064 taken from the yys parameter. When reporting a discarded merged value
7065 in debugging output, note that it is incompletely merged. Document the
7066 interface.
7067 (yyresolveAction): If resolving any of the RHS states fails, destroy
7068 them all rather than leaking them. Thus, as long as user actions are
7069 written to clean up the RHS correctly, yyresolveAction always cleans up
7070 the RHS of a semantic option. Document the interface.
7071
7072 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7073
7074 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7075 led to a segmentation fault in GNU Pascal. Problem reported
7076 by Waldek Hebisch.
7077
7078 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7079
7080 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7081 mid-rule action inside a nonterminal symbol in order to declare a
7082 destructor for its semantic value.
7083
7084 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7085
7086 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7087 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7088 __cplusplus && ! defined _STDLIB_H && !
7089 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7090 defined free))]: Include <stdlib.h> rather than rolling our own
7091 declarations of malloc and free, to avoid problems with
7092 incompatible declarations (using 'throw') C++'s stdlib.h. This
7093 should fix Debian bug 340012
7094 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7095 reported by Guillaume Melquiond.
7096
7097 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7098
7099 * NEWS: Clarify symbols versus types in unused-value warnings.
7100
7101 * configure.ac (AC_INIT): Bump version number.
7102
7103 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7104
7105 * NEWS: Version 2.1a.
7106 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7107 since C99 requires this.
7108
7109 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7110
7111 * m4/c-working.m4: New file.
7112 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7113
7114 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7115
7116 * Makefile.maint: Merge from coreutils.
7117
7118 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7119
7120 More portability fixes for problems summarized by Nelson H. F. Beebe.
7121
7122 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7123 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7124 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7125 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7126 messes up because C++ code is compiled in 32-bit mode but linked
7127 in 64-bit mode.
7128
7129 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7130
7131 More portability fixes for problems summarized by Nelson H. F. Beebe.
7132
7133 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7134 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7135
7136 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7137 nodist_PROGRAMS, since we don't need to actually compile the
7138 example if we're just doing a plain 'make'. This avoids bothering
7139 the installer unnecessarily about problems due to weird C++
7140 compilers.
7141
7142 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7143
7144 More portability fixes for problems summarized by Nelson H. F. Beebe.
7145
7146 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7147 than #include "...", and compile with -I'.'. The old method was
7148 not portable, according to Posix and the C standard, and it does
7149 not work with Sun C 5.7, where previous #line directives affect
7150 the working directory used in later #include "..." directives.
7151
7152 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7153
7154 Various DJGGP specific issues in /djgpp
7155
7156 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7157
7158 More portability fixes for problems summarized by Nelson H. F. Beebe.
7159
7160 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7161 '#include <map>' works and that you can apply ++ to iterators.
7162
7163 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7164
7165 Work around portability problems summarized by Nelson H. F. Beebe in
7166 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7167
7168 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7169 that '#include <string>' works.
7170
7171 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7172 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7173 "warning: sorry: semantics of inline function static data `const
7174 unsigned char translate_table[262]' are wrong (you'll wind up with
7175 multiple copies)".
7176
7177 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7178 or, xor to not_, and_, or_, and xor_, respectively. This works
7179 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7180 random system header somewhere that includes the equivalent of
7181 <iso646.h>.
7182
7183 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7184 -E" works; it apparently doesn't work with PathScale EKO Compiler
7185 Suite Version 2.0.
7186
7187 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7188
7189 During deterministic GLR operation, user actions should be able to
7190 influence the parse by changing yychar. To make this easier to fix and
7191 to make glr.c easier to evolve in general, don't maintain yytoken in
7192 parallel with yychar; just compute yytoken when needed.
7193 * tests/glr-regression.at (Incorrect lookahead during deterministic
7194 GLR): Check that setting yychar in a user action has the intended
7195 effect.
7196 * data/glr.c (yyGLRStack): Remove yytokenp member.
7197 (yyclearin): Don't set *yytokenp.
7198 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7199 yychar rather than *yytokenp to determine the current lookahead.
7200 Compute yytoken locally when needed.
7201 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7202 point to.
7203
7204 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7205 after `--report' documentation.
7206
7207 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7208
7209 * src/parse-gram.y (grammar_declaration): Location of printer
7210 symbol is @1, not list->location. Bug reported by twlevo.
7211 * tests/input.at (Incompatible Aliases): Adjust to above change.
7212
7213 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7214
7215 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7216 all the test at once. This makes the output easier to read in the
7217 normal case.
7218
7219 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7220 got from <http://bro-ids.org/download.html>. The bug is that
7221 when two actions appeared in succession, the second one was
7222 scanned before the first one was added to the grammar rule
7223 as a midrule action. Bison then output the incorrect warning
7224 "parse.y:905.17-906.36: warning: unused value: $3".
7225 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7226 associated with a value.
7227 (rhs): Don't invoke grammar_current_rule_action_append.
7228 (action): Invoke it here instead.
7229 * src/reader.c (grammar_midrule_action): Now extern.
7230 (grammar_current_rule_action_append): Don't invoke
7231 grammar_midrule_action; that is now the scanner's job.
7232 * src/reader.h (last_string, last_braced_code_loc):
7233 (grammar_midrule_action): New decls.
7234 * src/scan-gram.l (last_string): Now extern, sigh.
7235 (last_braced_code_loc): New extern variable.
7236 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7237 rule already has an action.
7238 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7239 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7240 Add some tests to check that the above changes fixed the bug.
7241
7242 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7243
7244 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7245 All used changed. Check whether the symbol has a destructor,
7246 not whether it is typed.
7247 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7248 that the values are still reported as unused. All line numbers
7249 adjusted.
7250
7251 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7252
7253 Work around a bug in bro 0.8, which underparenthesizes its
7254 definition of YYLLOC_DEFAULT.
7255 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7256 their arguments.
7257 * data/lalr1.cc: Likewise.
7258 * data/yacc.cc: Likewise.
7259
7260 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7261
7262 Work around a bug in Pike 7.0, and give the Pike folks a
7263 better way to override the usual int widths.
7264 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7265 user can override the types.
7266 (short): #undef, to work around a bug in Pike 7.0.
7267 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7268 (union yyalloc.yyss): Use yytype_int16 rather than short.
7269 All uses changed.
7270 (yysigned_char): Remove.
7271 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7272 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7273 * tests/regression.at (Web2c Actions): Adjust to above changes.
7274
7275 * src/reader.c (check_and_convert_grammar): New function.
7276 (reader): Close the input file even if something went wrong during
7277 parsing. Minor file descriptor leak reported by twlevo.
7278
7279 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7280 to pacify gcc -Wswitch-default.
7281 * src/scan-gram.l (adjust_location): Use a default: break; case
7282 to pacify gcc -Wswitch-default.
7283 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7284 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7285 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7286 Move these decls to scan-skel.l, since they don't need to be
7287 visible elsewhere.
7288 * src/scan-skel.l: Accept the above decls.
7289 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7290 is used.
7291
7292 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7293
7294 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7295 since we don't want to insist on a version number at the start
7296 of the changelog every time.
7297 * Makefile.maint: Sync from coreutils a bit better.
7298 (sc_trailing_blank): Renamed from sc_trailing_space.
7299 All uses changed.
7300 (sc_no_if_have_config_h, sc_require_config_h):
7301 (sc_prohibit_assert_without_use): New rules.
7302 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7303 (sc_dd_max_sym_length): Fix leading spaces in rule.
7304 (sc_system_h_headers): Prefix with @.
7305 (sc_useless_cpp_parens, m4-check): Output line numbers.
7306 (changelog-check): Allow version only in head.
7307 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7308 satisfy new Makefile.maint rule.
7309 * data/glr.c: Likewise.
7310 * data/glr.cc: Likewise.
7311 * data/lalr1.cc: Likewise.
7312 * data/yacc.c: Likewise.
7313 * lib/ebitsetv.c: Likewise.
7314 * lib/lbitset.c: Likewise.
7315 * lib/subpipe.c: Likewise.
7316 * lib/timevar.c: Likewise.
7317 * src/system.h: Likewise.
7318 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7319 * djgpp/Makefile.maint: Add copyright notice.
7320 * djgpp/README.in: Likewise.
7321 * djgpp/config.bat: Likewise.
7322 * djgpp/config.site: Likewise.
7323 * djgpp/config_h.sed: Likewise.
7324 * djgpp/djunpack.bat: Likewise.
7325 * djgpp/config.sed: Fix copyright notice to match standard format.
7326 * djgpp/subpipe.h: Likewise.
7327 * lib/bitsetv-print.c: Likewise.
7328 * lib/bitsetv.c: Likewise.
7329 * lib/subpipe.h: Likewise.
7330 * lib/timevar.c: Likewise.
7331 * lib/timevar.h: Likewise.
7332 * djgpp/subpipe.c: Use standard recipe for config.h.
7333 * lib/abitset.c: Likewise.
7334 * lib/bitset.c: Likewise.
7335 * lib/bitset_stats.c: Likewise.
7336 * lib/bitsetv-print.c: Likewise.
7337 * lib/bitsetv.c: Likewise.
7338 * lib/ebitsetv.c: Likewise.
7339 * lib/get-errno.c: Likewise.
7340 * lib/lbitset.c: Likewise.
7341 * lib/subpipe.c: Likewise.
7342 * lib/timevar.c: Likewise.
7343 * lib/vbitset.c: Likewise.
7344 * tests/local.at: Likewise.
7345 * src/scan-gram.l: Don't include verify.h, since system.h does
7346 that for us.
7347 * .x-sc_require_config_h: New file.
7348 * .x-sc_unmarked_diagnostics: New file.
7349
7350 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
7351
7352 Be a bit more systematic about using 'abort'.
7353 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7354 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7355 Put 'default: abort ();' before some other case, to satisfy older
7356 pedantic compilers.
7357 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7358 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
7359 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
7360 * src/conflicts.c (resolve_sr_conflict): Likewise.
7361 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
7362 (get_decision_str, get_orientation_str, get_node_alignment_str):
7363 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
7364 (get_linestyle_str, get_arrowstyle_str): Likewise.
7365 * src/conflicts.c (resolve_sr_conflict):
7366 Use a default case rather than one for the one remaining enum
7367 value, to catch invalid enum values as well.
7368 * src/lalr.c (set_goto_map, map_goto):
7369 Prefer "assert (FOO);" to "if (!FOO) abort ();".
7370 * src/nullable.c (nullable_compute, token_definitions_output):
7371 Likewise.
7372 * src/reader.c (packgram, reader): Likewise.
7373 * src/state.c (transitions_to, state_new, state_reduction_find):
7374 Likewise.
7375 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
7376 (symbol_pack): Likewise.
7377 * src/tables.c (conflict_row, pack_vector): Likewise.
7378 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
7379 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
7380 * src/system.h: Don't include <assert.h>.
7381 (assert): New macro.
7382
7383 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
7384 (Destructor Decl, Parser Function, Pure Calling):
7385 Describe rules for braces inside C code more carefully.
7386
7387 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
7388
7389 Fix some porting glitches found by Nelson H. F. Beebe.
7390 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
7391 compilers that don't understand that abort () does not return.
7392 * src/state.c (transitions_to): Likewise.
7393 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7394 that '#include <cstdlib>' works.
7395 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
7396 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
7397 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
7398 for the benefit of some pre-C99 compilers.
7399
7400 * bootstrap: Undo changes to gnulib files that autoreconf made.
7401
7402 Minor fixups to get 'make maintainer-check' to work.
7403 * configure.ac: Don't use -Wnested-externs, as it's incompatible
7404 with the new verify.h implementation.
7405 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
7406 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
7407 * data/yacc.c (YYUSE): Likewise.
7408 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
7409 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
7410 * src/parse-gram.y (declaration): Don't pass a string constant
7411 to a function that expects char *, since GCC might complain
7412 about the constant value.
7413 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
7414 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
7415 before #defining them.
7416 * tests/glr-regression.at
7417 (Incorrectly initialized location for empty right-hand side in GLR):
7418 In yyerror, use the msg arg.
7419 (Corrupted semantic options if user action cuts parse):
7420 (Incorrect lookahead during deterministic GLR):
7421 (Incorrect lookahead during nondeterministic GLR):
7422 Don't name a local var 'index'; it shadows string.h's 'index'.
7423
7424 2006-01-19 Akim Demaille <akim@epita.fr>
7425
7426 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
7427 location, not just parts of it.
7428
7429 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
7430
7431 * NEWS: Document the fact that multiple %unions are now allowed.
7432 * doc/bison.texinfo (Union Decl): Likewise.
7433 * TODO: This feature is now implemented, so remove it from
7434 the wishlist.
7435
7436 * Makefile.maint: Merge with coreutils Makefile.maint.
7437 (CVS_LIST): Use build-aux version if available.
7438 (VERSION_REGEXP): New macro.
7439 (syntax-check-rules): Add sc_no_if_have_config_h,
7440 sc_prohibit_assert_without_use, sc_require_config_h,
7441 sc_useless_cpp_parens.
7442 (sc_obsolete_symbols): Check for O_NDELAY.
7443 (sc_dd_max_sym_length): Track coreutils.
7444 (sc_unmarked_diagnostics): Look in all files, not just *.c.
7445 (sc_useless_cpp_parens): New rule.
7446 (news-date-check): Look for version or today's date.
7447 (changelog-check): Don't require version number near head.
7448 (copyright-check): Use current year instead of hardwiring 2005.
7449 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
7450 (announcement): Add --gpg-key-ID.
7451
7452 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
7453 with "file system".
7454
7455 Avoid undefined behavior that addressed just before the start of an
7456 array. Problem reported by twlevo.
7457 * src/reader.c (packgram): Prepend a new sentinel before ritem.
7458 * src/lalr.c (build_relations): Rely on new sentinel.
7459 * src/gram.c (gram_free): Adjust to new sentinel.
7460
7461 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
7462
7463 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
7464 yylookaheadNeeds. All uses updated.
7465 (yysplitStack): Rename local yynewLookaheadStatuses to
7466 yynewLookaheadNeeds.
7467 * data/glr-regression.at (Incorrect lookahead during nondeterministic
7468 GLR): In comments, change `lookahead status' to `lookahead need'.
7469
7470 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7471
7472 * data/glr.c (yysplitStack): A little stylistic rewrite.
7473
7474 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7475
7476 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
7477
7478 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
7479
7480 * doc/bison.texinfo: Fix some typos.
7481 (GLR Semantic Actions): New subsection discussing special
7482 considerations because GLR semantic actions might be deferred.
7483 (Actions): Mention look-ahead usage of yylval.
7484 (Actions and Locations): Mention look-ahead usage of yylloc.
7485 (Special Features for Use in Actions): Add YYEOF entry and mention it
7486 in the yychar entry.
7487 In the yychar entry, remove mention of the local yychar case (pure
7488 parser) since this is irrelevant information when writing semantic
7489 actions and since it's already discussed in `Table of Symbols' where
7490 yychar is otherwise described as an external variable.
7491 In the yychar entry, don't call it the `current' look-ahead since it
7492 isn't when semantic actions are deferred.
7493 In the yychar and yyclearin entries, add note about deferred semantic
7494 actions.
7495 Add yylloc and yylval entries discussing look-ahead usage.
7496 (Look-Ahead Tokens): When discussing yychar, don't call it the
7497 `current' look-ahead, and do mention yylval and yylloc.
7498 (Error Recovery): Cross-reference `Action Features' when mentioning
7499 yyclearin.
7500 (Table of Symbols): In the yychar entry, don't call it the `current'
7501 look-ahead.
7502 In the yylloc and yylval entries, mention look-ahead usage.
7503
7504 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7505
7506 * tests/glr-regression.at: Update copyright year to 2006.
7507
7508 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7509
7510 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
7511 use during nondeterministic operation to track which stacks have
7512 actually needed the current lookahead.
7513 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
7514 Allocate, deallocate, resize, and otherwise shuffle space for
7515 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
7516 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
7517 appropriately during nondeterministic operation.
7518 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
7519 members to store the current lookahead to be used by the deferred
7520 user action.
7521 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
7522 from which the RHS is taken. Set the lookahead members of the new
7523 yySemanticOption according to the lookahead status for stack yyk.
7524 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
7525 yyaddDeferredAction.
7526 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
7527 members of yySemanticOption before invoking yyuserAction, and then set
7528 them back to their current values afterward.
7529 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
7530 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
7531 * tests/glr-regression.at: Remove `.' from the ends of recent test case
7532 titles for consistency.
7533 (Leaked merged semantic value if user action cuts parse): In order to
7534 suppress lint warnings, use arguments in merge function, and assign
7535 char value < 128 in main.
7536 (Incorrect lookahead during deterministic GLR): New test case.
7537 (Incorrect lookahead during nondeterministic GLR): New test case.
7538
7539 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7540
7541 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
7542 !yyvaluep as signal that no semantic value is available to print.
7543 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
7544 to print a semantic value.
7545
7546 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7547
7548 * tests/glr-regression.at: For consistency with my newer test cases,
7549 don't thank myself.
7550
7551 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7552
7553 * data/glr.c (yyresolveValue): When merging semantic options, if at
7554 least one user action succeeds but a later one cuts the parse, then
7555 destroy the semantic value before returning rather than leaking it.
7556 (yyresolveStates): If a user action cuts the parse and thus
7557 yyresolveValue fails, ignore the (unset) semantic value rather than
7558 corrupting the yyGLRState, and empty the semantic options list since
7559 the user actions should have called all necessary destructors.
7560 Simplify code with YYCHK.
7561 * tests/glr-regression.at (Corrupted semantic options if user action
7562 cuts parse): New test case.
7563 (Undesirable destructors if user action cuts parse): New test case.
7564 Before applying any of this patch, this test case never actually failed
7565 for me... but only because the corrupted semantic options usually
7566 masked this bug.
7567 (Leaked merged semantic value if user action cuts parse): New test
7568 case.
7569
7570 2006-01-05 Akim Demaille <akim@epita.fr>
7571
7572 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
7573
7574 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
7575
7576 * data/c.m4 (b4_c_modern): New macro, with a new provision for
7577 _MSC_VER. Problem reported by Cenzato Marco.
7578 (b4_c_function_def): Use it.
7579 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
7580 b4_c_modern.
7581 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
7582 than rolling our own.
7583
7584 2006-01-04 Akim Demaille <akim@epita.fr>
7585
7586 Also warn about non-used mid-rule values.
7587 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
7588 member.
7589 (symbol_list_new): Adjust.
7590 * src/reader.c (symbol_typed_p): New.
7591 (grammar_rule_check): Use it.
7592 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
7593 Check its rule.
7594 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
7595 Use it.
7596 * tests/actions.at (Exotic Dollars): Adjust.
7597
7598 2006-01-04 Akim Demaille <akim@epita.fr>
7599
7600 * src/reader.c (grammar_midrule_action): If $$ is set in a
7601 mid-rule, move the `used' bit to its lhs.
7602 * tests/input.at (Unused values): New.
7603 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
7604
7605 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
7606
7607 * doc/bison.texinfo (Bison Options): Say more accurately what
7608 --yacc does.
7609 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
7610 about declarations in the grammar when in Yacc mode, as POSIX does
7611 not require a diagnostic when the grammar uses extensions.
7612
7613 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
7614
7615 Warn about dubious constructions like "%token T T".
7616 Reported by twlevo.
7617 * src/symtab.h (struct symbol.declared): New member.
7618 * src/symtab.c (symbol_new): Initialize it to false.
7619 (symbol_class_set): New arg DECLARING, specifying whether
7620 this is a declaration that we want to warn about, if there
7621 is more than one of them. All uses changed.
7622
7623 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
7624 Allow multiple %union directives, whose contents concatenate.
7625 * src/parse-gram.y (grammar_declaration): Likewise.
7626 Use muscle_code_grow, so that we don't need stype_line any more.
7627 All uses changed.
7628
7629 * src/muscle_tab.c (muscle_grow): Fix comment.
7630
7631 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
7632 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
7633 Update copyright year to 2006.
7634
7635 2006-01-03 Akim Demaille <akim@epita.fr>
7636
7637 Have glr.cc pass (some of) the calc.at tests.
7638 * data/glr.cc (b4_parse_param_orig): New.
7639 (b4_parse_param): Improve its definition, and bound it more
7640 clearly in the skeleton.
7641 (b4_epilogue): Append, instead of prepending, in order to keep
7642 #line consistency.
7643 Simplify the generation of auxiliary functions: locations and
7644 purity are mandated.
7645 (b4_global_tokens_and_yystype): Honor it.
7646 * data/location.cc (c++.m4): Don't include it.
7647 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
7648 and AT_SKEL_CC_IF.
7649 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
7650 AT_LALR1_CC_IF.
7651 Be sure to initialize the first position's filename.
7652 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
7653 mandated anyway.
7654 (AT_CHECK_CALC_GLR_CC): New.
7655 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
7656
7657 2006-01-02 Akim Demaille <akim@epita.fr>
7658
7659 * src/output.c (output_skeleton): Don't hard wire the inclusion of
7660 c.m4.
7661 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
7662 * data/glr.cc: Do not include stack.hh.
7663
7664 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7665
7666 * data/glr.c: Reformat whitespace with tabs.
7667 (b4_lpure_formals): Remove this unused m4 macro.
7668 * tests/cxx-type.at: Reformat whitespace with tabs.
7669 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
7670 since it's a member. Rename type to isNterm for clarity.
7671
7672 2005-12-29 Akim <akim@sulaco.local>
7673
7674 Let glr.cc catch up with symbol_value_print.
7675 * data/glr.cc (b4_yysymprint_generate): Replace by...
7676 (b4_yy_symbol_print_generate): this.
7677 (yy_symbol_print, yy_symbol_value_print): Declare them.
7678
7679 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
7680
7681 * src/location.h (boundary): Note that a line or column equal
7682 to INT_MAX indicates an overflow.
7683 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
7684 (rule_length_overflow, increment_rule_length, add_column_width):
7685 New functions.
7686 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
7687 (<SC_BRACED_CODE>"}"):
7688 Use increment_rule_length rather than incrementing it by hand.
7689 (adjust_location, handle_syncline): Diagnose overflow.
7690 (handle_action_dollar, handle_action_at):
7691 Fix bug with monstrosities like $-2147483648.
7692 Remove now-unnecessary checks.
7693 (scan_integer): Verify assumptions and remove now-unnecessary checks.
7694 (convert_ucn_to_byte): Verify assumptions.
7695 (handle_syncline): New arg LOC. All callers changed.
7696 Don't store through a value derived from char const * pointer.
7697
7698 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
7699 GCC warnings.
7700
7701 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
7702
7703 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
7704 Remove unnecessary forward static decls.
7705
7706 2005-12-27 Akim Demaille <akim@epita.fr>
7707
7708 * src/reader.c (grammar_current_rule_check): Also check that $$
7709 is used.
7710 Take the rule to check as argument, hence rename as...
7711 (grammar_rule_check): this.
7712 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
7713 Rename as...
7714 (grammar_rule_begin, grammar_rule_end): these, for consistency.
7715 (grammar_midrule_action, grammar_symbol_append): Now static.
7716 * tests/torture.at (input): Don't rely on the default action
7717 being always performed.
7718 * tests/calc.at: "Set" $$ even when the action is "cut" with
7719 YYERROR or other.
7720 * tests/actions.at (Exotic Dollars): Instead of using unused
7721 values, check that the warning is issued.
7722
7723 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
7724
7725 * NEWS: Improve wording for unused-value warnings.
7726
7727 2005-12-22 Akim Demaille <akim@epita.fr>
7728
7729 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
7730 (b4_yysymprint_generate): Rename as...
7731 (b4_yy_symbol_print_generate): this.
7732 Generate yy_symbol_print instead of yysymprint.
7733 Generate also yy_symbol_value_print, and use it.
7734
7735 2005-12-22 Akim Demaille <akim@epita.fr>
7736
7737 * NEWS: Warn about unused values.
7738 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
7739 a `used' member.
7740 (symbol_list_n_get, symbol_list_n_used_set): New.
7741 (symbol_list_n_type_name_get): Use symbol_list_n_get.
7742 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
7743 * src/reader.c (grammar_current_rule_check): Check that values are
7744 used.
7745 * src/symtab.c (symbol_print): Accept 0.
7746 * tests/existing.at: Remove the type information.
7747 Empty the actions.
7748 Remove useless actions (beware of mid-rule actions: perl -000
7749 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
7750 * tests/actions.at (Exotic Dollars): Use unused values.
7751 * tests/calc.at: Likewise.
7752 * tests/glr-regression.at (No users destructors if stack 0 deleted):
7753 Likewise.
7754
7755 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
7756 rule_useful_p.
7757
7758 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
7759
7760 Undo 2005-12-01 tentative license wording change. The wording is
7761 still being reviewed by the lawyers, and we don't want to wait for
7762 them before publishing a test release. For now, revert to the
7763 previous wording.
7764 * NEWS: Undo 2005-12-01 change.
7765 * data/glr.c: Revert to previous license wording.
7766 * data/glr.cc: Likewise.
7767 * data/lalr1.cc: Likewise.
7768 * data/location.cc: Likewise.
7769 * data/yacc.c: Likewise.
7770
7771 * NEWS: Reword %destructor vs YYABORT etc.
7772 * data/glr.c: Use American spacing, for consistency.
7773 * data/glr.cc: Likewise.
7774 * data/lalr1.cc: Likewise.
7775 * data/yacc.c: Likewise.
7776 * data/yacc.c: Reformat comments slightly.
7777 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
7778 for consistency. Fix some spelling errors and reword recently-included
7779 text slightly.
7780 * tests/cxx-type.at: Cast results of malloc, for C++.
7781
7782 2005-12-21 Joel E. Denny <address@hidden>
7783
7784 * tests/cxx-type.at: Construct a tree, count the parents of shared
7785 nodes, and free each node once and only once. Previously, the memory
7786 for semantic values was leaked instead.
7787
7788 2005-12-21 Joel E. Denny <address@hidden>
7789
7790 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
7791 (yylval, yylloc): If pure, #define to yystackp->yyval and
7792 yystackp->yyloc similar to yychar and yynerrs.
7793 (yyparse): If pure, remove local yylval and yylloc. Add local
7794 yystackp to accommodate pure definitions of yylval and yylloc.
7795 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
7796 yylvalp and yyllocp to &yylval and &yylloc.
7797 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
7798 namespace. Previously, nerrs and char were missing, but lval and lloc
7799 weren't necessary.
7800 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
7801 yylvalp and yyllocp parameters since, if pure, these are now always
7802 accessible through yystackp. If not pure, they are still accessible
7803 globally.
7804 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
7805 `if (YYID (N))' to pacify lint.
7806
7807 2005-12-21 Akim Demaille <akim@epita.fr>
7808
7809 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
7810 destroy the RHS symbols of a rule.
7811 * data/yacc.c (yylen): Initialize to 0.
7812 Keep its value to the number of items to possibly shift.
7813 In particular, a regular successful parse that ends on YYFINAL by
7814 a (internal) YYACCEPT must not have yylen != 0.
7815 (yyerrorlab, yyreturn): Pop the RHS.
7816 Reorder a bit to emphasize the `shifting' bits of code.
7817 (YYPOPSTACK): Now accept a number of items to pop.
7818 * data/lalr1.cc: Likewise.
7819 * data/glr.c: Formatting changes.
7820 Use goto instead of fall through.
7821 * doc/bison.texinfo (Destructor Decl): Complete.
7822
7823 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7824
7825 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
7826 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
7827 * djgpp/config.bat: Replace every occurence of the file name
7828 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
7829 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
7830 * djgpp/config.sed: Replace every occurence of the file name
7831 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
7832 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
7833 * djgpp/djunpack.bat: DJGPP specific file.
7834 * djgpp/fnchange.lst: DJGPP specific file.
7835 * djgpp/README.in: Add new information about how to unpack the bison
7836 source on MSDOS and other systems which have 8.3 file name restrictions
7837 using djunpack.bat and fnchange.lst.
7838
7839 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
7840
7841 * bootstrap (build_cvs_prefix): Remove; unused.
7842 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
7843 when getting gnulib.
7844
7845 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
7846
7847 * data/glr.c: Reorder typedef declarations for structs to match order
7848 of struct declarations.
7849 Rename yystack everywhere to yystackp except in yyparse where it's not
7850 a pointer.
7851 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
7852 consistency.
7853 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
7854 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
7855 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
7856 lint.
7857
7858 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
7859
7860 * tests/sets.at (Accept): Fix typos in regular expression used to
7861 sed out the final state number.
7862
7863 Work around portability problem on Solaris 10: flex-generated
7864 files include <stdio.h> before <config.h>, which messes up
7865 because the latter defines __EXTENSIONS__. Address the problem
7866 by creating two new little files that include <config.h> first,
7867 then include the flex-generated files. Rewrite everyone else
7868 to include <config.h> first, as well.
7869 * lib/timevar.c: Always include "config.h".
7870 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
7871 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
7872 (EXTRA_bison_SOURCES): New macro.
7873 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
7874 * src/system.h: Don't include config.h.
7875 * src/LR0.c: Include <config.h> first.
7876 * src/assoc.c: Likewise.
7877 * src/closure.c: Likewise.
7878 * src/complain.c: Likewise.
7879 * src/conflicts.c: Likewise.
7880 * src/derives.c: Likewise.
7881 * src/files.c: Likewise.
7882 * src/getargs.c: Likewise.
7883 * src/gram.c: Likewise.
7884 * src/lalr.c: Likewise.
7885 * src/location.c: Likewise.
7886 * src/main.c: Likewise.
7887 * src/muscle_tab.c: Likewise.
7888 * src/nullable.c: Likewise.
7889 * src/output.c: Likewise.
7890 * src/parse-gram.y: Likewise.
7891 * src/print.c: Likewise.
7892 * src/print_graph.c: Likewise.
7893 * src/reader.c: Likewise.
7894 * src/reduce.c: Likewise.
7895 * src/relation.c: Likewise.
7896 * src/state.c: Likewise.
7897 * src/symlist.c: Likewise.
7898 * src/symtab.c: Likewise.
7899 * src/tables.c: Likewise.
7900 * src/uniqstr.c: Likewise.
7901 * src/vcg.c: Likewise.
7902
7903 * src/parse-gram.y: Fix minor problems uncovered by lint.
7904 (current_lhs, current_lhs_location): Now static.
7905 (current_assoc): Remove unused variable.
7906
7907 Cleanups so that Bison-generated parsers have less lint.
7908 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
7909 Prepend /*ARGSUSED*/, for lint's sake.
7910 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
7911 definition if 'lint' is defined.
7912 (YYID): New macro (or function, if lint).
7913 All uses of /*CONSTCOND*/0 replaced by YYID(0).
7914 * data/yacc.c: Likewise.
7915 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
7916 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
7917 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
7918 is C++ only.
7919 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
7920 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
7921 Use YYID(0) rather than 0, for lint.
7922 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
7923 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
7924
7925 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
7926
7927 * tests/glr-regression.at
7928 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
7929 Close memory leak reported by twlevo.
7930
7931 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
7932
7933 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
7934 all stacks.
7935 (yyparse): Iterate another stack in order to call user destructors.
7936 * tests/glr-regression.at (No users destructors if stack 0 deleted):
7937 New test case.
7938 (Duplicated user destructor for lookahead): This test now is expected
7939 to succeed.
7940
7941 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
7942
7943 * NEWS: Document the following change.
7944 * data/yacc.c: Say "parser skeleton" rather than "file", since
7945 it's no longer just a file.
7946 * data/glr.c: Grant a special exception for C GLR parsers, that
7947 reads like the already-existing exception for C LALR(1) parsers.
7948 * data/glr.cc: Likewise.
7949 * data/lalr1.cc: Likewise.
7950 * data/location.cc: Likewise.
7951 * data/yacc.c: Reword the "written by" statement to clarify that
7952 it was the parser skeleton, not the entire output file.
7953 * data/glr.c: Written by Paul Hilfinger.
7954 * data/glr.cc: Written by Akim Demaille.
7955 * data/lalr1.cc: Likewise.
7956
7957 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
7958
7959 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
7960 Fix typos in previous change that broke 'make check'.
7961 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
7962 supported in C.
7963 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
7964 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
7965 We can revert this once things settle down.
7966
7967 * src/conflicts.c (conflicts_print): Don't print file name twice
7968 when %expect fails because there were no conflicts.
7969 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
7970 change.
7971 * tests/conflicts.at (%expect not enough, %expect too much):
7972 (%expect with reduce conflicts): Adjust to new behavior.
7973
7974 2005-11-18 Akim Demaille <akim@epita.fr>
7975
7976 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
7977 errors.
7978 * NEWS: Document this.
7979 * doc/bison.texinfo (Expect Decl): Likewise.
7980
7981 2005-11-16 Akim Demaille <akim@epita.fr>
7982
7983 Generalize the display of semantic values and locations in traces.
7984 * data/glr.c (yy_reduce_print): Fix indices (again).
7985 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
7986 literal integers.
7987 * data/lalr1.cc (yyreduce_print): Rename as...
7988 (yy_reduce_print): this.
7989 Display values and locations.
7990 * data/yacc.c (yy_reduce_print): Likewise.
7991 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
7992 (yysymprint): Move higher to be visible from yy_reduce_print).
7993 (yyparse): Adjust.
7994 * tests/calc.at: Adjust the expected length of the traces.
7995
7996 2005-11-14 Akim Demaille <akim@epita.fr>
7997
7998 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
7999 from 1 to N, while values and location start at 0.
8000 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8001
8002 2005-11-14 Akim Demaille <akim@epita.fr>
8003
8004 * data/glr.c (yy_reduce_print): Fix the $ number.
8005
8006 2005-11-14 Akim Demaille <akim@epita.fr>
8007
8008 "Use" parse parameters.
8009 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8010 * data/glr.c, data/glr.cc: Use them.
8011 * data/glr.c (YYUSE): Have a C++ definition that supports
8012 non-pointer types.
8013
8014 2005-11-14 Akim Demaille <akim@epita.fr>
8015
8016 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8017
8018 2005-11-14 Akim Demaille <akim@epita.fr>
8019
8020 * data/glr.cc: New.
8021 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
8022
8023 2005-11-12 Akim Demaille <akim@epita.fr>
8024
8025 Let position and location be PODs.
8026 * data/location.cc (position::initialize, location::initialize): New.
8027 (position::position, location::location): Define only if
8028 b4_location_constructors is defined.
8029 * data/lalr1.cc (b4_location_constructors): Define it for backward
8030 compatibility.
8031 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8032
8033 2005-11-12 Akim Demaille <akim@epita.fr>
8034
8035 * data/lalr1.cc: Move the body of the ctor and dtor into the
8036 parser file (instead of the header).
8037 Wrap the implementations in a "namespace yy".
8038
8039 2005-11-12 Akim Demaille <akim@epita.fr>
8040
8041 Have glr.c include its header file when created.
8042 * data/glr.c (b4_shared_declarations): New.
8043 Output them verbatim in the parser if !%defines, otherwise
8044 output then in the header file, and include it instead.
8045
8046 2005-11-11 Akim Demaille <akim@epita.fr>
8047
8048 * data/glr.c: Comment changes.
8049
8050 2005-11-11 Akim Demaille <akim@epita.fr>
8051
8052 When yydebug, report semantic and location values for reductions.
8053 * data/glr.c (yy_reduce_print): Report the semantic values and the
8054 locations.
8055 (YY_REDUCE_PRINT): Adjust.
8056 (yyglrReduce): Use them.
8057 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8058 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8059 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8060 traces.
8061
8062 2005-11-10 Akim Demaille <akim@epita.fr>
8063
8064 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8065 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8066 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8067
8068 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8069
8070 * m4/cxx.m4, examples/Makefile.am: Don't build
8071 examples/calc++ if no C++ compiler is available. (trivial change)
8072
8073 2005-11-09 Akim Demaille <akim@epita.fr>
8074
8075 * src/scan-skel.l: Use a couple of asserts.
8076
8077 2005-11-03 Akim Demaille <akim@epita.fr>
8078
8079 In some (weird) cases, the final state number is incorrect.
8080 Reported by Alexandre Duret-Lutz.
8081 * src/LR0.c (state_list_append): Remove the computation of
8082 final_state.
8083 (save_reductions): Do it here.
8084 (get_state): Alpha conversion.
8085 (generate_states): Use a for loop.
8086 * src/gram.h (item_number_is_rule_number)
8087 (item_number_is_symbol_number): New.
8088 * src/state.c: Use assert.
8089 * src/system.h: Include assert.h.
8090 * tests/sets.at (Accept): New.
8091
8092 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8093
8094 * data/glr.c (yyfill): Adjust comment.
8095 (yyresolveAction): Initialize default location properly
8096 for empty right-hand sides.
8097 (yydoAction): Ditto.
8098 Add comment explaining apparently dead code.
8099 * tests/glr-regression.at
8100 (Incorrectly initialized location for empty right-hand side in GLR):
8101 New test.
8102
8103 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8104
8105 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8106 gnulib when interrupted. This fixes some race conditions and
8107 works around some portability problems (one noted by Paul
8108 Hilfinger).
8109
8110 2005-10-22 Akim <akim@epita.fr>
8111
8112 * Makefile.cfg: Adjust to config -> build-aux.
8113 Reported by twledo.
8114
8115 2005-10-21 Akim Demaille <akim@epita.fr>
8116
8117 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8118 the %parse-params.
8119 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8120 * data/yacc.c (b4_Pure_if): Rename as...
8121 (b4_yacc_pure_if): this.
8122 (YY_SYMBOL_PRINT, yyparse): Adjust.
8123 * doc/bison.texinfo: Formatting changes.
8124
8125 2005-10-21 Akim Demaille <akim@epita.fr>
8126
8127 Finish the transition config -> build-aux.
8128 * configure.ac, Makefile.am: Use build-aux.
8129 * config/prev-version, config/announce-gen, config/Makefile.am:
8130 Move to...
8131 * build-aux/prev-version, build-aux/announce-gen,
8132 * build-aux/Makefile.am: here.
8133
8134 2005-10-14 Akim Demaille <akim@epita.fr>
8135
8136 * examples/calc++/test: Use set -x only when VERBOSE.
8137
8138 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8139
8140 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8141 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8142
8143 2005-10-13 Akim Demaille <akim@epita.fr>
8144
8145 * src/scan-skel.l: Output the base name parts of the parser and
8146 header file names.
8147 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
8148 additional checks.
8149 Use this to exercise C++ outputs in subdirs.
8150 Reported by Oleg Smolsky.
8151
8152 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8153
8154 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8155 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8156 Problem reported by John P. Hartmann.
8157 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8158 already defined it.
8159
8160 2005-10-12 Akim Demaille <akim@epita.fr>
8161
8162 * src/parse-gram.y (version_check): Exit 63 to please missing
8163 (stands for "version mismatch).
8164 * tests/input.at, doc/bison.texinfo: Adjust.
8165
8166 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8167
8168 Work around portability problems with Visual Age C compiler
8169 (xlc and xlC_r) reported by John P. Hartmann.
8170 * data/location.cc (initial_column, initial_line): Remove.
8171 All uses replaced by 0 and 1.
8172 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8173 that xlc complains about.
8174 * src/scan-skel.l (skel_wrap): Likewise.
8175 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
8176 as __STDC__.
8177 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8178 __STDC_VERSION__. Use it everywhere instead of looking at
8179 __STDC__ and __cplusplus.
8180
8181 2005-10-10 Akim Demaille <akim@epita.fr>
8182
8183 * examples/calc++/test: Be quiet unless VERBOSE.
8184
8185 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8186
8187 * data/c.m4 (yydestruct, yysymprint):
8188 Use YYUSE instead of casting to void.
8189 * data/glr.c (YYUSE): New macro.
8190 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8191 Use it instead of rolling our own.
8192 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8193 (YYCHK1):
8194 Use /*CONSTCOND*/ to suppress lint warnings.
8195 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8196 (YY_STACK_PRINT): Use 'false' not '0'.
8197 (YYUSE): New macro.
8198 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8199 * data/yacc.c (YYUSE): New macro.
8200 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8201 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8202 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8203
8204
8205 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8206 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8207
8208 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8209
8210 Undo the parts of the unlocked-I/O change that substituted
8211 putc or puts for printf. This might hurt performance a bit,
8212 but some people prefer the printf style.
8213 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8214 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8215 All uses replaced by YYFPRINTF and YYDPRINTF.
8216 * data/yacc.c: Likewise.
8217 * lib/bitset.c (bitset_print): Likewise.
8218 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8219 putc and puts.
8220 * lib/lbitset.c (debug_lbitset): Likewise.
8221 * src/closure.c (print_firsts, print_fderives): Likewise.
8222 * src/gram.c (grammar_dump): Likewise.
8223 * src/lalr.c (look_ahead_tokens_print): Likewise.
8224 * src/output.c (escaped_output): Likewise.
8225 (user_actions_output): Break apart two printfs.
8226 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8227 * src/reduce.c (reduce_print): Likewise.
8228 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8229 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8230
8231 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8232 Use assignments rather than casts-to-void to suppress
8233 unused-variable warnings. This pacifies 'lint'.
8234 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8235 unused-variable warnings.
8236
8237 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8238
8239 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8240
8241 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8242
8243 Use unlocked I/O for a minor performance improvement on hosts like
8244 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8245 is to use the gnlib unlocked-io module, and to prefer putc and
8246 puts to printf when either will work (since the latter doesn't
8247 come in an unlocked flavor).
8248 * bootstrap (gnulib_modules): Add unlocked-io.
8249 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8250 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8251 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8252 and similarly for puts and putc and printf.
8253 * data/yacc.c: Likewise.
8254 * lib/bitset.c (bitset_print): Likewise.
8255 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8256 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8257 to printf.
8258 * lib/lbitset.c (debug_lbitset): Likewise.
8259 * src/closure.c (print_firsts, print_fderives): Likewise.
8260 * src/gram.c (grammar_dump): Likewise.
8261 * src/lalr.c (look_ahead_tokens_print): Likewise.
8262 * src/output.c (escaped_output): Likewise.
8263 (user_actions_output): Coalesce two printfs.
8264 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
8265 * src/reduce.c (reduce_print): Likewise.
8266 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8267 * src/system.h: Include unlocked-io.h rather than stdio.h.
8268
8269 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8270 this confuses xgettext.
8271
8272 2005-10-02 Akim Demaille <akim@epita.fr>
8273
8274 * bootstrap (gnulib_modules): Add strverscmp.
8275 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8276 * m4/.cvsignore: Add strverscmp.m4.
8277 * src/parse-gram.y (%require): New token, new rule.
8278 (version_check): New.
8279 * src/scan-gram.l (%require): Adjust.
8280 * tests/input.at (AT_REQUIRE): New.
8281 Use it.
8282 * doc/bison.texinfo (Require Decl): New.
8283 (Calc++ Parser): Use %require.
8284
8285 2005-10-02 Akim Demaille <akim@epita.fr>
8286
8287 * data/location.cc: New.
8288
8289 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8290 Akim Demaille <akim@epita.fr>
8291
8292 Make sure -odir/foo.cc creates dir/location.hh etc.
8293 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8294 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8295 (spec_defines_file): Now const.
8296 (dir_prefix): New.
8297 (short_base_name): Remove.
8298 * src/files.c: Adjust.
8299 (dirname.h): Include.
8300 (base_name): Don't prototype it.
8301 (finput): Remove, duplicates gram_in.
8302 (full_base_name, short_base_name): Replace by...
8303 (all_but_ext, all_but_tab_ext): these.
8304 (compute_base_names): Rename as...
8305 (compute_file_name_parts): this.
8306 Update to compute the new variables, including dir_prefix.
8307 Adjust dependencies.
8308 * src/output.c (prepare): Output them.
8309 * src/reader.c: Adjust to use gram_in, not finput.
8310 * src/scan-skel.l (@dir_prefix@): New.
8311
8312 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8313
8314 * lib/subpipe.c: New function end_of_output_subpipe() added
8315 to allow support for non-posix systems. This is a no-op function
8316 for posix systems.
8317
8318 * lib/subpipe.h: New function end_of_output_subpipe() added
8319 to allow support for non-posix systems. This is a no-op function
8320 for posix systems.
8321
8322 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8323 handle the lack of pipe/fork functionality on non-posix systems.
8324
8325 * djgpp/Makefile.maint: DJGPP specific file.
8326
8327 * djgpp/README.in: DJGPP specific file.
8328
8329 * djgpp/config.bat: DJGPP specific configuration file.
8330
8331 * djgpp/config.sed: DJGPP specific configuration file.
8332
8333 * djgpp/config.site: DJGPP specific configuration file.
8334
8335 * djgpp/config_h.sed: DJGPP specific configuration file.
8336
8337 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8338
8339 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8340
8341 2005-10-02 Akim Demaille <akim@epita.fr>
8342
8343 * data/location.cc: New, extract from...
8344 * data/lalr1.cc: here.
8345 (location.hh): Include it after the user prologue, in case the
8346 filename type is defined by the user.
8347 Forward declation location and position before the pre-prologue.
8348 (yyresult_): Rename as...
8349 (yyresult): this, it's a local variable, not an attribute.
8350 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8351
8352 2005-10-01 Akim Demaille <akim@epita.fr>
8353
8354 * examples/extexi: Restore the #line generation.
8355
8356 2005-09-30 Akim Demaille <akim@epita.fr>,
8357 Alexandre Duret-Lutz <adl@gnu.org>
8358
8359 Move the token type and YYSTYPE in the parser class.
8360 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
8361 (parser::token): New, from the moved free definition of tokens.
8362 (parser::semantic_value): Now a full definition instead of an
8363 indirection to YYSTYPE.
8364 (b4_post_prologue): No longer included in the header file, but
8365 in the implementation file.
8366 * doc/bison.texi (C+ Language Interface): Update.
8367 * src/parse-gram.y: Support unary %define.
8368 * tests/actions.at: Define global_tokens_and_yystype for backward
8369 compatibility until we update the tests.
8370 * tests/calc.at: Idem.
8371 (first_line, first_column, last_line, last_column): Define for lalr1.cc
8372 to simplify the code.
8373
8374 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
8375
8376 Port to SunOS 4.1.4, which lacks strtoul and strerror.
8377 Ah, the good old days! Problem reported by Peter Klein.
8378 * bootstrap (gnulib_modules): Add strerror, strtoul.
8379 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
8380 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
8381
8382 2005-09-29 Akim Demaille <akim@epita.fr>
8383
8384 * data/c.m4 (b4_error_verbose_if): New.
8385 * data/lalr1.cc: Use it.
8386 (YYERROR_VERBOSE_IF): Remove.
8387 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
8388 parser members, replaced by...
8389 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
8390 local variables.
8391 (yysyntax_error_): Takes the state number as argument.
8392 (yyreduce_print_): Use the argument yyrule, not the former
8393 attribute yyn_.
8394
8395 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
8396
8397 * bootstrap (gnulib_modules): Add verify.
8398 * lib/.cvsignore: Add verify.h.
8399 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
8400 * src/system.h (verify): Remove.
8401 Include verify.h instead.
8402 * src/tables.c (tables_generate): Use new API for 'verify'.
8403
8404 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
8405
8406 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
8407 local variables whose names begin with 'yy'.
8408 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8409 Trivial changes from Joel E. Denny.
8410
8411 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
8412 it itself.
8413 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
8414 don't use alloca any more.
8415
8416 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
8417 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
8418 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
8419 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
8420 to match yacc.c, to test more hosts.
8421
8422 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
8423
8424 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
8425 doesn't affect behavior.
8426 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
8427 Solaris, AIX, MSC.
8428 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
8429 This works a bit better with glibc, if user code has already included
8430 stdlib.h.
8431 * doc/bison.texinfo (Bison Parser): Document that users can't
8432 arbitrarily use malloc and free for other purposes. Document
8433 that <alloca.h> and <malloc.h> might be included.
8434 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
8435 user must declare alloca.
8436
8437 * HACKING (release): Forwarn the Translation Project about
8438 stable releses.
8439
8440 2005-09-20 Akim Demaille <akim@epita.fr>
8441
8442 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
8443
8444 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
8445
8446 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
8447 (YYSTACK_ALLOC_MAXIMUM): Use it.
8448 (yysyntax_error): New function.
8449 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
8450 multiple syntax errors are reported, and alloca is being used.
8451 Instead, reallocate buffers twice as big each time, so that
8452 we waste at most half the allocated memory. Start with a small
8453 (128-byte) buffer that will suffice in most cases anyway.
8454 Use yysyntax_error to do most of the work.
8455
8456 * doc/bison.texinfo (Error Reporting, Table of Symbols):
8457 yynerrs is the number of errors reported, not the number of
8458 errors encountered.
8459
8460 * tests/glr-regression.at (Duplicated user destructor for lookahead):
8461 Mark it as expected to fail.
8462 Cast result of malloc; problem reported by twlevo@xs4all.nl.
8463 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
8464 Don't start user-code symbols with "yy", to avoid name space problems.
8465
8466 2005-09-19 Akim Demaille <akim@epita.fr>
8467
8468 Remove the traits, failed experiment.
8469 It never proved useful, and anyway because of the current
8470 definition, it was not possible to have several specialization of
8471 this traits, making it useless.
8472 * data/lalr1.cc (yy:traits): Remove.
8473 Inline its definitions in the parser class.
8474
8475 2005-09-19 Akim Demaille <akim@epita.fr>
8476
8477 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
8478 least Mac OSX with a /usr/local install of gettext.
8479
8480 2005-09-19 Akim Demaille <akim@epita.fr>
8481
8482 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
8483 and yytoken for similarity with the other skeletons.
8484
8485 2005-09-19 Akim Demaille <akim@epita.fr>
8486
8487 * NEWS, configure.ac: update version number to 2.1a.
8488
8489 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
8490
8491 * NEWS: Version 2.1.
8492
8493 * NEWS: Remove notice of yytname change, since it was never in an
8494 official release.
8495 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
8496 diagnostic.
8497 * src/output.c (prepare): Likewise.
8498 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
8499 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
8500 is not defined. This is an awful hack, but it's enough for now.
8501 All callers changed.
8502 * tests/glr-regression-at (make_value): Args are const pointers now,
8503 to avoid GCC warning.
8504 (Duplicated user destructor for lookahead): New test. Currently
8505 skipped. It fails on my host but I'm not sure it'll always fail.
8506
8507 2005-09-16 Akim Demaille <akim@epita.fr>
8508
8509 * src/symtab.h (struct symbol): Declare the printer and destructor
8510 as const, to avoid accidental calls to free.
8511 (symbol_destructor_set, symbol_printer_set): Adjust.
8512 * src/symtab.c: Adjust.
8513
8514 2005-09-16 Akim Demaille <akim@epita.fr>
8515
8516 * data/c.m4 (b4_token_enums): New.
8517 (b4_token_defines): Rename as...
8518 (b4_token_enums_defines): this.
8519 (b4_token_defines): New, output only the #defines.
8520 * data/yacc.c, data/glr.c: Adjust.
8521 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
8522 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
8523 as default values.
8524
8525 2005-09-16 Akim Demaille <akim@epita.fr>
8526
8527 * data/lalr1.cc (yylex_): Remove, inline its code.
8528 (yyreport_syntax_error_): Remove, replaced by...
8529 (yysyntax_error_): this which returns a string and leaves to the
8530 caller the call to the users' error function.
8531 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
8532 Move from members of the parser object...
8533 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
8534 to local variables of the parse function.
8535
8536 2005-09-16 Akim Demaille <akim@epita.fr>
8537
8538 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
8539 since it's in Bison's name space.
8540
8541 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
8542
8543 * data/glr.c (yyresolveValue): Add default case to pacify
8544 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
8545
8546 * NEWS: Document when yyparse started to return 2.
8547 * doc/bison.texinfo (Parser Function): Document when yyparse
8548 returns 2.
8549
8550 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
8551 (b4_filename_type): Renamed back from b4_file_name_type. All uses
8552 changed.
8553 (class position): file_name -> filename (reverting). All uses changed.
8554
8555 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
8556
8557 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
8558 do anything if $@ exists. This reverts part of the 2005-07-07
8559 patch.
8560
8561 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
8562
8563 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
8564 contains obsolete information and isn't worth distributing as a
8565 separate file anyway.
8566 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
8567 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
8568 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
8569 (yyparse): Abort if user code uses longjmp to throw an unexpected
8570 value.
8571
8572 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
8573
8574 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
8575 Suggested by twlevo@xs4all.nl.
8576
8577 * data/glr.c (YYCHK1): Do not assume YYE is in range.
8578 This avoids a diagnostic from gcc -Wswitch-enum.
8579 Problem reported by twlevo@xs4all.nl.
8580
8581 * doc/bison.texinfo: Don't use "filename", as per GNU coding
8582 standards. Use "file name" or "file" or "name", depending on
8583 the context.
8584 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
8585 not to hack/foo.tab.c.
8586 (Calc++ Top Level): 2nd arg of main is not const.
8587 * data/glr.c: b4_filename -> b4_file_name.
8588 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
8589 All uses changed.
8590 (class position): filename -> file_name. All uses changed.
8591 * data/yacc.c: b4_filename -> b4_file_name.
8592 * lib/bitset.h: filename -> file_name in local vars.
8593 * lib/bitset_stats.c: Likewise.
8594 * src/files.c: Likewise.
8595 * src/scan-skel.l ("@output ".*\n): Likewise.
8596 * src/files.c (file_name_split): Renamed from filename_split.
8597 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
8598
8599 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
8600
8601 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
8602 to accommodate latest gnulib.
8603
8604 * tests/glr-regression.at (Duplicate representation of merged trees):
8605 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
8606
8607 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
8608 needed.
8609
8610 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
8611
8612 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
8613 All uses changed. Invoke user destructor after an error during a
8614 split parse (trivial change from Joel E. Denny).
8615
8616 * tests/glr-regression.at
8617 (User destructor after an error during a split parse): New test case.
8618 Problem reported by Joel E. Denny in:
8619 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
8620
8621 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
8622
8623 * README-cvs: Give URLs for recommended tools.
8624 Mention Gzip version problem, and bootstrapping issues.
8625 Remove troubleshooting section, as it's somewhat obsolete.
8626
8627 * bootstrap (no_cache): New var, to accommodate different wget
8628 variants. Use it instead of '-C off'. Problem reported by
8629 twlevo@xs4all.nl.
8630
8631 * data/glr.c (yydestroyStackItem): New function.
8632 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
8633 debugging information. Problem reported by Joel E. Denny.
8634
8635 2005-08-25 Akim Demaille <akim@epita.fr>
8636
8637 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
8638
8639 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
8640
8641 * data/glr.c (yyrecoverSyntaxError, yyreturn):
8642 Don't invoke destructor on unresolved entries.
8643 * tests/glr-regression.at
8644 (User destructor for unresolved GLR semantic value): New test case.
8645 Problem reported by Joel E. Denny in:
8646 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
8647
8648 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
8649
8650 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
8651 Add strnlen.c.
8652 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
8653 lib-prefix.m4, po.m4.
8654
8655 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
8656 in yydestruct diagnostic, since it might not be an error.
8657 Problem reported by Joel Denny near end of
8658 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8659 * data/lalr1.cc (yyerturn): Likewise.
8660 * data/yacc.c (yyreturn): Likewise.
8661 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
8662
8663 * src/files.c: Remove obsolete FIXME comment.
8664
8665 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
8666 with the other templates, and to fix bogus run-on messages such
8667 as the one reported at the end of
8668 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8669 All callers changed to avoid the newline.
8670 (yyprocessOneStack): Output two lines rather than one, to accommodate
8671 the above change. This changes the debug output format slightly.
8672
8673 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
8674 reported by Joel E. Denny in
8675 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
8676 (trivial change).
8677 * tests/glr-regression.at (Duplicate representation of merged trees):
8678 New test, from Joel E. Denny in:
8679 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
8680 * THANKS: Add Joel E. Denny.
8681
8682 * configure.ac (AC_INIT): Bump to 2.0c.
8683
8684 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
8685
8686 * NEWS: Version 2.0b.
8687
8688 * Makefile.am (SUBDIRS): Put examples before tests, so that
8689 "make check" doesn't finish with "All 1 tests passed".
8690
8691 * tests/regression.at (Token definitions): Don't rely on
8692 AT_PARSER_CHECK for data that contains backslashes. It currently
8693 uses 'echo', and 'echo' isn't portable if its argument contains
8694 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
8695 that the byte '\0xff' is not printable in the C locale; it is,
8696 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
8697 not printable, so use '\0x81' to test.
8698
8699 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
8700 version of GCC, since the macro is used with non-GCC compilers.
8701
8702 Fix core dump reported by Pablo De Napoli in
8703 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
8704 * tests/regression.at (Invalid inputs with {}): New test.
8705 * src/parse-gram.y (token_name): Translate type before using
8706 it as an index.
8707
8708 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
8709 the user's name space. All uses changed to __attribute__
8710 ((__unused__)).
8711 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
8712 Add __attribute__ ((__noreturn__)).
8713
8714 * etc/clcommit: Remove. We weren't using it, and it failed
8715 "make maintainer-distcheck".
8716 * Makefile.maint: Merge from coreutils.
8717 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
8718 (syntax-check-rules): Change list of rules as described below.
8719 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
8720 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
8721 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
8722 (sc_trailing_space): New rules.
8723 (sc_xalloc_h_in_src): Remove.
8724 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
8725 (sc_space_tab, sc_error_exit_success, sc_changelog):
8726 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
8727 (makefile-check, po-check, author_mark_check):
8728 (makefile_path_separator_check, copyright-check):
8729 Use grep -n, to make it easier to find violations.
8730 Use CVS_LIST and CVS_LIST_EXCEPT.
8731 (header_regexp, h_re): Remove.
8732 (dd_c): New macro.
8733 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
8734 (my-distcheck): Use more-modern GCC flags.
8735 (signatures, %.asc): Remove.
8736 (rel-files, announcement): Remove signatures.
8737 Restore old updating code, even though we don't use it, so
8738 that we're the same as coreutils.
8739 (alpha, beta, major): Depend on news-date-check.
8740 Make the upload commands.
8741
8742 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
8743 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
8744 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
8745 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
8746 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
8747 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
8748 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
8749 * tests/sets.at: Likewise.
8750
8751 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
8752 we comment out the Autoconf version number.
8753 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
8754 it's error-prone and "make maintainer-distcheck" rejects it.
8755
8756 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
8757 Indent calls to "error" to pacify "make maintainer-distcheck",
8758 when the calls are not intended to be translated.
8759 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
8760
8761 * src/Makefile.am (DEFS): Use +=, to pacify
8762 "make maintainer-distcheck".
8763 (bison_SOURCES): Add scan-skel.h.
8764 (sc_tight_scope): New rule, from coreutils.
8765
8766 * src/files.c (src_extension, header_extension):
8767 Now static, not extern.
8768 * src/getargs.c (short_options): Likewise.
8769 * src/muscle_tab.c (muscle_table): Likewise.
8770 * src/parse-gram.y (current_class, current_type, current_prec):
8771 Likewise.
8772 * src/reader.c (grammar_end, previous_rule_end): Likewise.
8773 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
8774 * src/main.c (main): Cast bindtextdomain and textdomain calls to
8775 void, to avoid warning when NLS is disabled.
8776 * src/output.c: Include scan-skel.h.
8777 (scan_skel): Remove decl, since scan-skel.h does this.
8778 (output_skeleton):
8779 Indent calls to "error" to pacify "make maintainer-distcheck".
8780 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
8781 * src/reader.h (gram_end, gram_lineno): New decls to pacify
8782 "make maintainer-distcheck".
8783 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
8784 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
8785 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
8786 (skel_lex_destroy, scan_skel): Move these decls to...
8787 * src/scan-skel.h: New file.
8788 * src/uniqstr.c (uniqstr_assert):
8789 Indent calls to "error" to pacify "make maintainer-distcheck".
8790
8791 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
8792 not @VAR@.
8793
8794 * tests/torture.at: Revamp to avoid misuse of atoi that
8795 "make maintainer-distcheck" complained about.
8796
8797 * examples/extexi (message): Don't print a message more than once,
8798 and omit line-number decoration that makes Emacs compile think
8799 that informative messages are worth worrying about.
8800
8801 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
8802
8803 * configure.ac: Update version number.
8804
8805 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
8806 accidentally.
8807 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
8808 autogenerated by the maintainer.
8809 * examples/calc++/.cvsignore: Add *.yy.
8810
8811 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
8812 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8813 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8814
8815 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
8816
8817 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
8818 from maintainer-distcheck about casting the argument of 'free'.
8819
8820 * NEWS: Mention recent yytname changes.
8821 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
8822
8823 * bootstrap: For translations that have not yet been upgraded to
8824 the new runtime-po domain, prime the pump by extracting the
8825 relevant strings from the obsolete translations. This code can be
8826 removed once the bison-runtime domain has been translated by each
8827 team.
8828
8829 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
8830 now that token names are already quoted.
8831
8832 Fix problem reported by Anthony Heading.
8833 * data/glr.c (YYTOKEN_TABLE): New macro.
8834 (yytname): Define if YYTOKEN_TABLE.
8835 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
8836 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
8837 (YYERROR_VERBOSE): Define the same way the other skeletons do.
8838 * src/output.c (prepare_symbols): Output token_table_flag.
8839
8840 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
8841
8842 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
8843 again if the first call fails.
8844
8845 * data/glr.c (yytnamerr): New function.
8846 (yyreportSyntaxError): Use it to dequote most string literals.
8847 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
8848 with other skeletons. All uses changed.
8849 (yytnameerr_): New function.
8850 (yyreport_syntax_error): Use it to dequote most string literals.
8851 * data/yacc.c (yytnamerr): New function.
8852 (yyerrlab): Use it to decode most string literals.
8853 * doc/bison.texinfo (Decl Summary, Calling Convention):
8854 Clarify quoting convention of yytname.
8855 * src/output.c (prepare_symbols): Quote all names. This undoes
8856 the 2005-04-17 change, which is now accomplished (mostly) via
8857 changes in the parsers as described above.
8858 * tests/regression.at (Token definitions, Web2c Actions):
8859 Undo most 2005-04-17 change here, too.
8860
8861 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
8862
8863 Fix more problems reported by twlevo@xs4all.nl.
8864 * tests/cxx-type.at: Don't pipe output of ./types through sed to
8865 remove trailing spaces. This loses the exit status of ./types,
8866 and isn't needed since ./types shouldn't be emitting trailing
8867 spaces.
8868 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
8869 as the stack isn't valid in that case.
8870
8871 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8872 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8873 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8874 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
8875 is used.
8876 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
8877 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8878 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8879 Likewise.
8880
8881 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
8882 overly-picky compilers that reject 'char *foo = "bar";'.
8883
8884 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
8885 to FILE * parameter, not to stderr. This fixes a typo introduced
8886 in the 2005-07-12 change.
8887
8888 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
8889 warnings from GCC 4.
8890
8891 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
8892 (yyglrShiftDefer, yysplitStack):
8893 Remove unused parameters b4_pure_formals. All uses changed.
8894 (yyglrShift): Remove unused parameters b4_user_formals.
8895 All uses changed.
8896 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
8897
8898 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
8899
8900 Destructor cleanups and regularization among the three skeletons.
8901 * NEWS: Document the behavior changes.
8902 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
8903 stack before failing, as the cleanup code will do it for us now.
8904 * data/lalr1.cc (yyerrlab): Likewise.
8905 * data/glr.c (yyparse): Pop everything off the stack before
8906 freeing it, so that destructors get called properly.
8907 * data/lalr1.cc (yyreturn): Likewise.
8908 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
8909 This is more consistent.
8910 * doc/bison.texinfo (Destructor Decl): Mention more reasons
8911 why destructors might be called. 1.875 -> 2.1.
8912 (Destructor Decl, Decl Summary, Table of Symbols):
8913 Some English-language cleanups for %destructor.
8914 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8915 Add output line for destructor of start symbol.
8916 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
8917 because of that same extra output line.
8918
8919 * NEWS: Document minor wording changes in diagnostics of
8920 Bison-generated parsers.
8921 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
8922 Remove unused formals. All uses changed.
8923 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
8924 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
8925 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
8926 Rename yyoverflowab to yyexhaustedlab.
8927 When memory exhaustion occurs during syntax-error reporting,
8928 report it separately rather than in a single diagnostic; this
8929 eases translation.
8930 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
8931 (Memory Exhausted): Renamed from Parser Stack Overflow.
8932 Revamp wording slightly to prefer "memory exhaustion".
8933 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
8934
8935 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
8936
8937 Add i18n support to the GLR skeleton. Partially fix the C++
8938 skeleton; a C++ expert needs to finish this. Remove debugging
8939 msgids; there's little point to having them translated, since they
8940 can be understood only by someone who can read the
8941 (English-language) source code.
8942
8943 Generate runtime-po/bison-runtime.pot automatically, so that we
8944 don't have to worry about garbage getting in that file. We'll
8945 make sure after the next official release that old msgids don't
8946 get lost. See
8947 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
8948
8949 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
8950 Now auto-generated.
8951 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
8952 Fix typos in explanations of the runtime file.
8953 * bootstrap: Change gettext keyword from YYI18N to YY_.
8954 Use standard Makefile.in.in in runtime-po, since we'll arrange
8955 for backward-compatible bison-runtime.po files in a different way.
8956 * data/glr.c (YY_): New macro, from yacc.c.
8957 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
8958 Translate messages intended for users.
8959 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
8960 the wording in the other skeletons. We don't know that the memory
8961 is virtual.
8962 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
8963 Use same method that yacc.c uses.
8964 Don't translate debugging messages.
8965 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
8966 it doesn't work (yet), and requires C++ expertise to fix.
8967 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
8968 Move defn to a more logical place, to be consistent with other
8969 skeletons.
8970 Don't translate debugging messages.
8971 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
8972 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
8973 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
8974 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
8975
8976 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
8977 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
8978 void, not int.
8979 * tests/glr-regression.at (Badly Collapsed GLR States):
8980 Likewise.
8981 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8982 yylex should return 0 at EOF rather than aborting.
8983
8984 Improve tests for stack overflow in GLR parser.
8985 Problem reported by twlevo@xs4all.nl.
8986 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
8987 All uses removed.
8988 (yyStackOverflow): Just longjmp, but with value 2 so that caller
8989 can handle the problem.
8990 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
8991 (yyparse): New local variable yyresult to record the result.
8992 Use result of setjmp to set it, rather than storing itinto
8993 struct.
8994 (yyDone): Remove label.
8995 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
8996 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
8997 if YYABORT is used).
8998 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
8999 yyparse status; put status > 1 into diagnostic.
9000 Check that status==2 works.
9001 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9002 Use exit status 3 for failure to open (which shouldn't happen).
9003
9004 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9005
9006 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9007 1 on syntax error; just let yyparse do its thing.
9008 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9009 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9010 (Exploding the Stack Size with Alloca):
9011 (Exploding the Stack Size with Malloc):
9012 Expect exit status 2, not 1, since the parser is supposed to blow
9013 its stack. Problem reported by twlevo@xs4all.nl.
9014
9015 * data/glr.c (yyparse): Don't assume that the initial calls
9016 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9017 Print a stack-overflow message and fail instead.
9018 Initialize the line-number information before creating the stack,
9019 so that the stack-overflow message can report line zero safely.
9020
9021 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9022
9023 Fix problems reported by twlevo@xs4all.nl.
9024 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9025 (yyuserMerge): Provide a default case if b4_mergers is empty.
9026 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9027 * tests/glr-regression.at
9028 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9029 Add casts to pacify C++ compilers.
9030 * tests/glr-regression.at (Improper merging of GLR delayed action
9031 sets): Declare yylex before using it.
9032 * tests/Makefile.am (maintainer-check-g++): Fix a stray
9033 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9034 test for valgrind; valgrind is independent of g++.
9035 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9036 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9037 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9038 Use a destructor, so that we can expand the stack. Change
9039 YYSTYPE to char * so that we can free it. Cast result of malloc.
9040
9041 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9042
9043 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9044 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9045
9046 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9047
9048 * PACKAGING: New file, suggested by Bruno Haible and taken from
9049 similar wording in gettext's PACKAGING file.
9050 * NEWS: Mention PACKAGING.
9051 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9052
9053 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9054
9055 * NEWS: Document recent i18n improvements.
9056 * bootstrap: Get runtime translations into runtime-po.
9057 Create runtime-po files automatically, if possible.
9058 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9059 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9060 does not infringe on the user's name space.
9061 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9062 * doc/bison.texinfo (Internationalization): Revamp the English
9063 and Texinfo syntax a bit, to try to make it clearer.
9064 (Bison Options, Option Cross Key): Mention --print-localedir.
9065 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9066 YYENABLE_NLS. Quote a bit more.
9067 * runtime-po/.cvsignore: New file.
9068 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9069 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9070 * runtime-po/quot.sed: Likewise.
9071 * runtime-po/boldquot.sed: Likewise.
9072 * runtime-po/en@quot.header: Likewise.
9073 * runtime-po/en@boldquot.header: Likewise.
9074 * runtime-po/insert-header.sin: Likewise.
9075 * runtime-po/remove-potcdate.sin: Likewise.
9076 * runtime-po/Makevars: Likewise.
9077 * runtime-po/LINGUAS: Likewise.
9078 * runtime-po/de.po: Likewise; we will rely on the translation project
9079 to maintain this, so "bootstrap" should get it.
9080 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
9081 its value.
9082 * src/main.c (main): Bind the bison-runtime domain, too.
9083
9084 2005-07-12 Bruno Haible <bruno@clisp.org>
9085
9086 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9087 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9088 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9089 * runtime-po: New directory.
9090 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9091 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9092 * runtime-po/Rules-quot: New file, copied from po/.
9093 * runtime-po/quot.sed: Likewise.
9094 * runtime-po/boldquot.sed: Likewise.
9095 * runtime-po/en@quot.header: Likewise.
9096 * runtime-po/en@boldquot.header: Likewise.
9097 * runtime-po/insert-header.sin: Likewise.
9098 * runtime-po/remove-potcdate.sin: Likewise.
9099 * runtime-po/Makevars: New file.
9100 * runtime-po/POTFILES.in: New file.
9101 * runtime-po/LINGUAS: New file.
9102 * runtime-po/bison-runtime.pot: New file.
9103 * runtime-po/de.po: New file.
9104 * m4/bison.m4: New file.
9105 * Makefile.am (SUBDIRS): Add runtime-po.
9106 (aclocaldir, aclocal_DATA): New variables.
9107 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9108 Define aclocaldir.
9109 * src/getargs.c (usage): Document --print-localedir option.
9110 (PRINT_LOCALEDIR_OPTION): New enum item.
9111 (long_options): Add --print-localedir option.
9112 (getargs): Handle --print-localedir option.
9113 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9114 (Internationalization): New section.
9115
9116 2005-07-12 Akim Demaille <akim@epita.fr>
9117
9118 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9119 for consistency with the rest of the code.
9120 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9121 Add separators.
9122
9123 2005-07-12 Akim Demaille <akim@epita.fr>
9124
9125 * src/parse-gram.y: Use %printer instead of YYPRINT.
9126
9127 2005-07-12 Akim Demaille <akim@epita.fr>
9128
9129 * src/symtab.h, src/symtab.c (symbol_print): New.
9130 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9131 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9132
9133 2005-07-12 Akim Demaille <akim@epita.fr>
9134
9135 * data/glr.c (b4_syncline): Fix (swap) the definitions of
9136 b4_at_dollar and b4_dollar_dollar.
9137
9138 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9139
9140 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9141 and Pennello's paper.
9142
9143 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9144
9145 * data/yacc.c (yyparse): Undo previous patch. Instead,
9146 set yylsp[0] and yyvsp[0] only if the initial action
9147 sets yylloc and yylval, respectively.
9148
9149 * data/yacc.c (yyparse): In the initial action, set
9150 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9151 This avoids the use of undefined variables if the initial
9152 action does not set yylloc and/or yylval.
9153
9154 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9155
9156 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9157 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9158 Remove from CVS. These files are automatically generated.
9159 * examples/extexi: Clarify that this file is now part of Bison,
9160 not GNU M4, and that it works with any POSIX-compatible Awk.
9161 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9162 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9163 so that we also get calc++-parser.yy. Geneate it.
9164 Use $(AWK), not gawk, since any conforming Awk will do.
9165 Put comment before action, since older 'make' can't handle comment
9166 in action.
9167 $(BUILT_SOURCES): List all built sources, not just some of them.
9168 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9169 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9170 $($(calc_sources_generated)): Remove unnecessary test for existence
9171 of target. (This had a shell syntax error anyway; a stray "x".)
9172 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9173 calc++-parser.yy.
9174 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9175
9176 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9177 implied by the other modules.
9178
9179 2005-07-06 Akim Demaille <akim@epita.fr>
9180
9181 Bind examples/calc++ to the package.
9182 * examples/calc++/Makefile: Remove, replaced by...
9183 * examples/calc++/Makefile.am: ... this new file.
9184 * examples/calc++/test: Remove input.
9185 * examples/calc++/compile: Remove.
9186 * examples/Makefile.am: New.
9187 * configure.ac, Makefile.am: Adjust.
9188 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9189
9190 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9191
9192 * data/glr.c (yyFail): Drastically simplify; since the format argument
9193 never had any % directives, we can simply pass it to yyerror.
9194 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9195 be modified later, as that is the usual style in glr.c.
9196 Problems reported by Paul Hilfinger.
9197
9198 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9199 and size overflow errors.
9200 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9201 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9202 (YYSIZEMAX): New macro.
9203 (yystpcpy): New function, taken from yacc.c.
9204 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9205 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9206 so that we don't have to maintain their signatures.
9207 (yyFail): Check for buffer overflow, by using vsnprintf rather
9208 than vsprintf. Allocate a bigger buffer if possible.
9209 Report an error if buffer allocation fails.
9210 (yyStackOverflow): New function.
9211 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9212 the initialization was successful. It might fail if storage was
9213 exhausted.
9214 (yyexpandGLRStack): Add more checks for storage allocation failure.
9215 Use yyStackOverflow to report failures.
9216 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9217 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9218 Don't assume stack number fits in int.
9219 (yysplitStack): Check for storage allocation failure.
9220 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9221 can print diagnostics on storage allocation failure. All callers
9222 changed.
9223 (yyresolveValue): Use yybool for boolean.
9224 (yyreportSyntaxError): Check for size-calculation overflow.
9225 This code is taken from yacc.c.
9226 (yyparse): Check for storage allocation errors when allocating
9227 the initial stack.
9228
9229 2005-07-05 Akim Demaille <akim@epita.fr>
9230
9231 Extract calc++ from the documentation.
9232 * doc/bison.texinfo (Calc++): Add the extraction marks.
9233 * examples/extexi: New, from the aborted GNU Programming 2E.
9234 Separate the different paragraph of a file with empty lines.
9235 * examples/Makefile: Use it to extract the whole calc++ example.
9236
9237 2005-06-24 Akim Demaille <akim@epita.fr>
9238
9239 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9240 class typedefs.
9241
9242 2005-06-22 Akim Demaille <akim@epita.fr>
9243
9244 * doc/bison.texinfo (C++ Language Interface): First stab.
9245 (C++ Parsers): Remove.
9246
9247 2005-06-22 Akim Demaille <akim@epita.fr>
9248
9249 * data/lalr1.cc (yylex_): Honor %lex-param.
9250
9251 2005-06-22 Akim Demaille <akim@epita.fr>
9252
9253 Start a set of simple examples.
9254 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9255 * examples/calc++/calc++-driver.hh,
9256 * examples/calc++/calc++-parser.yy,
9257 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9258 * examples/calc++/compile, examples/calc++/test: New.
9259
9260 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9261
9262 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9263 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9264 which stems from the 2005-05-27 patch.
9265
9266 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9267
9268 * data/glr.c: Modify treatment of unused parameters to permit use
9269 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9270
9271 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9272
9273 Fix infringement on user name space reported by Janos Zoltan Szabo.
9274 * data/yacc.c (yyparse): strlen -> yystrlen.
9275
9276 2005-05-30 Akim Demaille <akim@epita.fr>
9277
9278 * data/lalr1.cc (_): New.
9279 Translate the various messages.
9280
9281 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9282
9283 Fix infringement on user name space reported by Bruno Haible.
9284 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9285 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9286 the user's name space.
9287 (alloca): Include <stdlib.h> to get it, if it's not built in.
9288 (YYMALLOC, YYFREE): Define only if needed.
9289 (malloc, free): Declare, but only if needed, as this infringes on
9290 the user name space.
9291
9292 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9293
9294 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9295 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9296 with %d format.
9297 * lib/ebitset.c (min, max): Undef before defining.
9298 * lib/vbitset.c (min, max): Likewise.
9299 * lib/subpipe.c (create_subpipe): Save local variables in case
9300 vfork clobbers them.
9301
9302 2005-05-24 Bruno Haible <bruno@clisp.org>
9303
9304 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9305 error message syntax used by gcc-4.0.
9306
9307 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9308
9309 * README: Mention m4 1.4.3. Remove obsolete advice about
9310 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9311
9312 * bootstrap: Remove workaround for problem I encountered with
9313 gettext 0.14.1; it seems to be fixed now.
9314
9315 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9316
9317 * NEWS: Version 2.0a.
9318
9319 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9320 the previous change.
9321
9322 Various maintainer cleanups.
9323 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9324 conftest*, for benefit of CVS commands run at the same time as
9325 "configure". Add build-aux, since "bootstrap" now creates it and
9326 its subfiles.
9327 * Makefile.cfg (move_if_change): Remove.
9328 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9329 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9330 (po_repo, do-po-update, po-update, wget_files, get-targets):
9331 (config.guess-url_prefix, config.sub-url_prefix):
9332 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9333 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9334 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9335 Remove.
9336 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9337 this is now the recommended name.
9338 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9339 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9340 ylwrap. These files now go into build-aux.
9341 * config/move-if-change: Remove.
9342 * config/prev-version.txt: Bump from 1.75 to 2.0.
9343
9344 * bootstrap: Add stdio-safer, unistd-safer modules.
9345 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9346 we don't need it).
9347 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9348 fopen-safer.c, stdio-safer.h, unistd-safer.h.
9349 * lib/subpipe.c: Include "unistd-safer.h".
9350 (create_subpipe): Make sure all the newly-created
9351 file descriptors are > 2, so that diagnostics don't
9352 get sent down them (which might cause Bison to hang, in theory).
9353 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9354 * src/files.c (xfopen): Use fopen_safer, not fopen.
9355
9356 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
9357 yesterday's yacc.c fix.
9358
9359 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
9360
9361 * data/glr.c, data/lalr1.cc: Update copyright date.
9362
9363 Fix a destructor bug reported by Wolfgang Spraul in
9364 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
9365 * data/yacc.c (yyabortlab): Don't call destructor, and
9366 don't set yychar to EMPTY.
9367 (yyoverflowlab): Don't call destructor.
9368 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
9369 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
9370 since we no longer output the message "discarding lookahead token
9371 end of input ()".
9372
9373 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9374
9375 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
9376 fix a small glitch in debugging output.
9377 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
9378 after YY_SYMBOL_PRINT where needed.
9379
9380 (struct yyGLRState): Add some comments.
9381 (struct yySemanticOption): Add some comments.
9382 (union yyGLRStackItem): Add comment.
9383
9384 (yymergeOptionSets): Correct this to properly perform the union,
9385 avoiding infinite reported by Michael Rosien.
9386 Update comment.
9387
9388 * tests/glr-regression.at: Add test for GLR merging error reported
9389 by M. Rosien.
9390
9391 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
9392
9393 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
9394 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
9395 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
9396 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
9397 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
9398 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
9399 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
9400 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
9401 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
9402 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
9403 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
9404 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
9405 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
9406 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
9407 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
9408 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
9409 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
9410 src/derives.h, src/files.c, src/files.h, src/getargs.c,
9411 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
9412 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
9413 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
9414 src/output.h, src/parse-gram.c, src/parse-gram.h,
9415 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
9416 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
9417 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
9418 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
9419 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
9420 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
9421 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
9422 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
9423 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
9424 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
9425 tests/reduce.at, tests/regression.at, tests/sets.at,
9426 tests/synclines.at, tests/testsuite.at, tests/torture.at:
9427 Update FSF postal mail address.
9428
9429 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
9430
9431 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
9432 Problem reported by Ralf Menzel.
9433
9434 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
9435
9436 * tests/actions.at: Test that stack overflow invokes destructors.
9437 From Marcus Holland-Moritz.
9438 * data/yacc.c (yyerrlab): Move the code that destroys the stack
9439 from here....
9440 (yyreturn): to here. That way, destructors are called properly
9441 even if the stack overflows, or the user calls YYACCEPT or
9442 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
9443 (yyoverflowlab): Destroy the lookahead.
9444
9445 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
9446
9447 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
9448
9449 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
9450
9451 * NEWS: Bison-generated C parsers no longer quote literal strings
9452 associated with tokens.
9453 * src/output.c (prepare_symbols): Don't escape strings,
9454 since users don't want to see C escapes.
9455 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
9456 in diagnostics.
9457 * tests/input.at (Torturing the Scanner): Likewise.
9458 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
9459
9460 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
9461
9462 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
9463 the data size is known to be too small and we can't increase it.
9464 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
9465
9466 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
9467
9468 * src/parse-gram.y: Include quotearg.h.
9469 (string_as_id): Quote $1 before using it as a key, since the
9470 lexer no longer quotes it for us.
9471 (string_content): Don't strip quotes, since lexer no longer
9472 quotes it for us.
9473 * src/scan-gram.l: Include quotearg.h.
9474 ("\""): Omit quote.
9475 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
9476 a key, since the rest of the lexer doesn't quote it.
9477 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
9478 * tests/regression.at (Token definitions): Check for backslashes
9479 in token strings.
9480
9481 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
9482 (YYSIZE_T): Define to unsigned long int when using an older compiler.
9483 (yyparse): Revamp code to generate long syntax error message, to
9484 make it easier to translate, and to avoid problems with arithmetic
9485 overflow. Change "virtual memory" to "memory" in diagnostic, since
9486 we don't know whether the memory is virtual.
9487
9488 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
9489
9490 * NEWS: Bison-generated C parsers now use the _ macro to
9491 translate strings.
9492 * data/yacc.c (_) [!defined _]: New macro.
9493 All English strings wrapped inside this macro.
9494 * doc/bison.texinfo (Bison Parser): Document _.
9495 * po/POTFILES.in: Include src/parse-gram.c, since it now
9496 includes translateable strings that parse-gram.y doesn't.
9497
9498 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
9499
9500 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
9501 reverting the 2004-10-11 change to this function.
9502 (symbol_check_alias_consistency): Don't call symbol_type_set
9503 if the type name is already correct.
9504 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
9505
9506 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
9507
9508 * tests/regression.at (Token definitions): Don't use a token named
9509 c, as that generates a "#define c ..." that runs afoul of buggy
9510 stdlib.h that uses the identifier c as a member of struct
9511 drand48_data. Problem reported by Horst Wente.
9512
9513 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
9514
9515 * bootstrap: Change translation URL from
9516 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
9517 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
9518 redirection glitches. Problem reported by twlevo@xs4all.nl.
9519
9520 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
9521
9522 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
9523 after operands; POSIX says this isn't portable for the c99 command.
9524
9525 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
9526
9527 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
9528 immediately if a data overrun has occurred; this may help us track
9529 down what may be a spurious failure on MacOS.
9530
9531 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
9532
9533 Respond to problems reported by twlevo@xs4all.nl.
9534
9535 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
9536
9537 * src/vcg.h: Comment fix.
9538 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
9539 (G_CMAX): Change to -1 instead of INT_MAX.
9540
9541 * data/yacc.c (yyparse): Omit spaces before #line.
9542
9543 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
9544
9545 * src/tables.c (state_number_to_vector_number): Put it inside an
9546 "#if 0", since it's not currently used. Problem reported by
9547 Roland McGrath.
9548
9549 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
9550
9551 * src/output.c (escaped_output): Renamed from
9552 escaped_file_name_output, since we now use it for symbol tags as
9553 well. All uses changed.
9554 (symbol_destructors_output, symbol_printers_output):
9555 Escape symbol tags too.
9556 Problem reported by Matyas Forstner in
9557 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
9558
9559 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
9560 not needed.
9561 * src/output.c (user_actions_output, token_definitions_output,
9562 symbol_destructors_output, symbol_printers_output): Likewise.
9563 * src/reader.c (prologue_augment): Likewise.
9564 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
9565
9566 * src/vcg.c (output_edge): Don't quote linestyle arg.
9567 Problem reported by twlevo@xs4all.nl.
9568
9569 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
9570
9571 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
9572 example, reported by Derek M Jones. Also, make the example even
9573 more outrageous, to better illustrate how bad the problem is.
9574
9575 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
9576
9577 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
9578 putsym. Typo reported by Sebastian Piping.
9579
9580 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
9581
9582 * doc/bison.texinfo (Language and Grammar): some -> same
9583 (Epilogue): int he -> in the
9584 Typos reported by Sebastian Piping via Justin Pence.
9585
9586 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
9587
9588 * tests/glr-regression.at (Improper handling of embedded actions
9589 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
9590 embedded actions and $-N in GLR parsers", work around an Autoconf bug
9591 with dollar signs in test names.
9592 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
9593 for a similar reason.
9594
9595 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
9596
9597 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
9598 wants to redefine G_VIEW.
9599
9600 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
9601
9602 * src/vcg.c (get_view_str): Remove case for normal_view.
9603 Problem reported by twlevo@xs4all.nl.
9604
9605 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
9606
9607 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
9608 Problem reported by twlevo@xs4all.nl.
9609
9610 * doc/bison.texinfo: Change @dircategory from "GNU programming
9611 tools" to "Software development". Requested by Richard Stallman
9612 via Karl Berry.
9613
9614 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
9615
9616 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
9617 Problem reported by twlevo@xs4all.nl.
9618
9619 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
9620
9621 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
9622 keyword; it's not needed with modern compilers, and it doesn't
9623 affect correctness with older compilers. Suggested by
9624 twlevo@xs4all.nl.
9625
9626 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
9627
9628 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
9629 gcc -Wswitch-default.
9630 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9631 * data/yacc.c (yyparse): Likewise.
9632
9633 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
9634
9635 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
9636 already. Let config.h define any nonstandard values.
9637
9638 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
9639
9640 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
9641 for the benefit of slower hosts. Problem reported by
9642 Nelson H. F. Beebe.
9643
9644 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
9645
9646 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
9647 being defined and not used.
9648 * data/lalr1.cc (yyparse): Likewise.
9649 Use "if (false)" rather than "if (0)".
9650
9651 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
9652
9653 * TODO: Mention that we should allow NUL bytes in tokens.
9654
9655 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
9656
9657 * src/scan-skel.l (<<EOF>>): Don't close standard output.
9658 Problem reported by Hans Aberg.
9659
9660 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
9661
9662 * src/getargs.c (version): Happy new year; update overall
9663 program copyright date from 2004 to 2005.
9664
9665 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
9666 Problem reported by Hans Aberg.
9667 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
9668 (Output file names.): Add a test for the case when standard output
9669 is closed.
9670
9671 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
9672
9673 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
9674 to fix an oversight in the Bison 2.0 manual.
9675
9676 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
9677
9678 * NEWS: Version 2.0. Reformat the existing news items since
9679 1.875, so that related items are grouped together.
9680 * configure.ac (AC_INIT): Bump version to 2.0.
9681 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
9682
9683 * tests/torture.at (Exploding the Stack Size with Alloca): Set
9684 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
9685 otherwise, we're not testing alloca. Unfortunately there's no
9686 simple way to consult HAVE_ALLOCA here.
9687
9688 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
9689 for yymsg, too.
9690
9691 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
9692 hand. This avoids a warning about comparing int to size_t when
9693 GCC warnings are enabled.
9694
9695 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
9696
9697 * NEWS: Bison-generated parsers no longer default to using the
9698 alloca function (when available) to extend the parser stack, due
9699 to widespread problems in unchecked stack-overflow detection.
9700 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
9701 responsibility to set it to a positive value. This lets the user
9702 specify a value that is not a preprocessor constant.
9703 * data/yacc.c (YYMAXDEPTH): Likewise.
9704 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
9705 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
9706 to be a compile-time constant. However, explain the constraints on it.
9707 Also, explain the constraints on YYINITDEPTH.
9708 (Table of Symbols): Explain that alloca is no longer the default.
9709 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
9710 to 1.
9711
9712 * doc/bison.texinfo (Location Default Action): Mention that n must
9713 be zero when k is zero. Suggested by Frank Heckenbach.
9714
9715 2004-12-22 Akim Demaille <akim@epita.fr>
9716
9717 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
9718 (parser::state_type, parser::semantic_type, parser::location_type):
9719 Private, not public.
9720 (parser::parse): Return ints, not bool.
9721 Returning a bool introduces a problem: 0 corresponds to false, and
9722 it seems weird to return false on success. Returning true changes
9723 the conventions for yyparse.
9724 Alternatively we could return void and send an exception.
9725 There is no clear consensus (yet?).
9726 (state_stack, semantic_stack, location_stack): Rename as...
9727 (state_stack_type, semantic_stack_type, location_stack_type): these.
9728 Private, not public.
9729 * tests/c++.at: New.
9730 * tests/testsuite.at, tests/Makefile.am: Adjust.
9731
9732 2004-12-21 Akim Demaille <akim@epita.fr>
9733
9734 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
9735
9736 2004-12-21 Akim Demaille <akim@epita.fr>
9737
9738 Don't impose std::string for filenames.
9739
9740 * data/lalr1.cc (b4_filename_type): New.
9741 (position::filename): Use it.
9742 (parser.hh): Move the inclusion of stack.hh and location.hh below
9743 the user code, so that needed headers for the filename type can be
9744 included first.
9745 Forward declare them before the user code.
9746 * tests/Makefile.am (check-local, installcheck-local): Pass
9747 TESTSUITEFLAGS to the TESTSUITE.
9748
9749 2004-12-20 Akim Demaille <akim@epita.fr>
9750
9751 Use more STL like names: my_class instead of MyClass.
9752
9753 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
9754 (SemanticStack, SemanticType, StateStack, StateType)
9755 (TokenNumberType, Stack, Slice, Traits, Parser::location)
9756 (Parser::value): Rename as...
9757 (location_stack, location_type, rhs_number_type, semantic_stack)
9758 (semantic_type, state_stack, state_type, token_number_type, stack)
9759 (slice, traits, parser::yylloc, parser::yylval): these.
9760
9761 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
9762
9763 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
9764
9765 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
9766 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9767
9768 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
9769
9770 Remove uses of 'short int' and 'unsigned short int'. This raises
9771 some arbitrary limits. It uses more memory but nowadays that's
9772 not much of an issue.
9773
9774 This change does not affect the generated parsers; that's a different
9775 task, as some users will want to conserve memory there.
9776
9777 Ideally we should use size_t to represent all object counts, and
9778 something like ptrdiff_t to represent signed differences of object
9779 counts; but that will require more code-cleanup than I have the
9780 time to do right now.
9781
9782 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
9783 Use size_t, not int or short int, to count objects.
9784 * src/closure.c (nritemset, closure): Likewise.
9785 * src/closure.h (nritemset, closure): Likewise.
9786 * src/nullable.c (nullable_compute): Likewise.
9787 * src/print.c (print_core): Likewise.
9788 * src/print_graph.c (print_core): Likewise.
9789 * src/state.c (state_compare, state_hash): Likewise.
9790 * src/state.h (struct state): Likewise.
9791 * src/tables.c (default_goto, goto_actions): Likewise.
9792
9793 * src/gram.h (rule_number, rule): Use int, not short int.
9794 * src/output.c (prepare_rules): Likewise.
9795 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
9796 errs, reductions): Likewise.
9797 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
9798 Likewise.
9799 * src/tables.c (vector_number, tally, action_number,
9800 ACTION_NUMBER_MINIMUM): Likewise.
9801 * src/output.c (muscle_insert_short_int_table): Remove.
9802
9803 2004-12-17 Akim Demaille <akim@epita.fr>
9804
9805 * data/lalr1.cc: Extensive Doxygenation.
9806 (error_): Rename as...
9807 (error): this, since it is visible to the user.
9808 Adjust callers.
9809 (Parser::message): Now an automatic variable from...
9810 (Parser::yyreport_syntax_error_): here.
9811 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
9812 Parser::error.
9813 * tests/input.at: Escape $.
9814
9815 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
9816
9817 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
9818 Parenthesize rhs to avoid obscure problems with mistakes like
9819 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
9820 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
9821 b4_rhs_location): Likewise.
9822 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
9823 b4_rhs_location): Likewise.
9824
9825 2004-12-16 Akim Demaille <akim@epita.fr>
9826
9827 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
9828 yacc.c: be sure to stay within yycheck_.
9829 * tests/actions.at: Re-enable C++ tests.
9830
9831 2004-12-16 Akim Demaille <akim@epita.fr>
9832
9833 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
9834 real.
9835
9836 2004-12-16 Akim Demaille <akim@epita.fr>
9837
9838 Use #define to handle the %name-prefix.
9839
9840 * data/glr.c, data/yacc.c: Comment changes.
9841 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
9842 so that one can refer to yylex in the parser file, and have it
9843 renamed, as is the case with other skeletons.
9844
9845 2004-12-16 Akim Demaille <akim@epita.fr>
9846
9847 Move lalr1.cc internals into yy*.
9848
9849 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
9850 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
9851 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
9852 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
9853 (empty_, final_, terror_, errcode_, ntokens_)
9854 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
9855 (looka_, ilooka_, error_range_, nerrs_):
9856 Rename as...
9857 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
9858 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
9859 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
9860 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
9861 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
9862 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
9863 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
9864 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
9865 these.
9866
9867 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
9868
9869 Fix some problems reported by twlevo at xs4all.
9870 * src/symtab.c (symbol_new): Report an error if the input grammar
9871 contains too many symbols. This is better than calling abort() later.
9872 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
9873 (struct node, struct graph):
9874 Rename member expand to stretch. All uses changed.
9875 (struct graph): Remove member layoutalgorithm. All uses removed.
9876 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
9877 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
9878 All uses changed.
9879 (N_STRETCH): Rename from N_EXPAND. All uses changed.
9880
9881 2004-12-15 Akim Demaille <akim@epita.fr>
9882
9883 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
9884 Add more Doxygen comments.
9885 (symprint_, stack_print_, reduce_print_, destruct_, pop)
9886 (report_syntax_error_, translate_): Rename as...
9887 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
9888 (yypop_, yyreport_syntax_error_, yytranslate_): this.
9889
9890 2004-12-15 Akim Demaille <akim@epita.fr>
9891
9892 * data/lalr1.cc (lex_): Rename as...
9893 (yylex_): this.
9894 Move the trace here.
9895 Take the %name-prefix into account.
9896 Reported by Alexandre Duret-Lutz.
9897
9898 2004-12-15 Akim Demaille <akim@epita.fr>
9899
9900 Simplify the C++ parser constructor.
9901
9902 * data/lalr1.cc (debug_): Rename as...
9903 (yydebug_): so that the parser's internals are always in the yy*
9904 pseudo namespace.
9905 Adjust uses.
9906 (b4_parse_param_decl): Remove the leading comma as it is now only
9907 called as unique argument list.
9908 (Parser::Parser): Remove the constructor accepting a location and
9909 an initial debugging level.
9910 Remove from the other ctor the argument for the debugging level.
9911 (debug_level_type, debug_level, set_debug_level): New.
9912
9913 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
9914 constructor calls.
9915
9916 2004-12-15 Akim Demaille <akim@epita.fr>
9917
9918 Remove b4_root related material: failure experiment
9919 (which goal was to allow to derive from a class).
9920
9921 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
9922 definitions and uses.
9923
9924 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
9925
9926 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
9927 not 2, since it's not portable to subtract 1 from the start of an
9928 array. The new item 0 is never set or used. All uses changed.
9929
9930 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
9931 the default definition of YYLLOC_DEFAULT. Problem reported
9932 by Frank Heckenbach.
9933
9934 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
9935
9936 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
9937 the normal case and one for the error case. Just use the
9938 first one uniformly. Problem reported by Frank Heckenbach.
9939 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
9940 use exactly the same macro in both places.
9941 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
9942 so that the normal-case YYRHSLOC works for the error case too.
9943 All uses changed.
9944 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
9945 (YYLLOC_DEFAULT): Use the same macro as glr.c.
9946 * doc/bison.texinfo (Location Default Action): Don't claim that
9947 we have an array of locations. Use the same macro for both glr
9948 and lalr parsers. Mention YYRHSLOC. Mention what happens when
9949 the index is 0.
9950
9951 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
9952
9953 * HACKING: Update email addresses to send announcements to.
9954
9955 * configure.ac (AC_INIT): Bump version to 1.875f.
9956
9957 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
9958
9959 * NEWS: Version 1.875e.
9960 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
9961
9962 * src/scan-skel.l: Include "complain.h", for "fatal".
9963
9964 * src/relation.h (relation_print, relation_digraph):
9965 Relation sizes are of type relation_node, not size_t (this is
9966 merely a doc fix, since the two types are equivalent).
9967 (relation_transpose): Relation sizes are of type relation_node,
9968 not int.
9969 * src/relation.c: Likewise.
9970 (top, infinity): Now of type relation_node, not int.
9971 (traverse, relation_transpose): Use relation_node, not int.
9972
9973 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
9974 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
9975 (yyparse): Remove unused local introduced in 2004-10-25 patch.
9976
9977 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
9978 specifying whether the test should be skipped. Use it tp
9979 specify that the [%defines %skeleton "lalr1.cc"] tests currently
9980 fail on some hosts, and should be skipped.
9981
9982 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
9983
9984 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
9985 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
9986 unless otherwise specified below.
9987
9988 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
9989 to allocate kernel_base, kernel_items, kernel_size, since
9990 they needn't be initialized to 0.
9991 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
9992 * src/closure.c (new_closure): Likewise, for itemset.
9993 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
9994 * src/lalr.c (set_goto_map): Likewise, for temp_map.
9995 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
9996 (build_relations): Likewise for edge, states1, includes.
9997 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
9998 * src/reader.c (packgram): Likewise, for ritem, rules.
9999 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10000 * src/relation.c (relation_digraph): Likewise for VERTICES.
10001 (relation_transpose): Likewise for new_R, end_R.
10002 * src/symtab.c (symbols_token_translations_init): Likewise for
10003 token_translations.
10004 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10005 (token_actions): Likewise for yydefact, actrow, conflrow,
10006 conflict_list.
10007 (save_column): Likewise for froms[symno], tos[symno].
10008 (goto_actions): Likewise for state_count.
10009 (pack_table): Likewise for base, pos, check.
10010 (tables_generate): Likewise for width.
10011
10012 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10013 for initial core. Just have a separate core, so we needn't worry
10014 about whether kernel_size and kernel_base are initialized.
10015
10016 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10017 kernel_size, kernel_items): Remove unnecessary initialization.
10018 * src/conflicts.c (conflicts): Likewise.
10019 * src/derives.c (derives): Likewise.
10020 * src/muscle_tablc (muscle_insert): Likewise.
10021 * src/relation.c (relation_digraph): Likewise.
10022 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10023 conflrow, conflict_table, conflict_list, table, check):
10024 Likewise.
10025
10026 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10027 This is because all callers pass unsigned int.
10028 * src/closure.h (new_closure): Likewise.
10029
10030 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10031 (build_relations): Initialize includes[i] in all cases.
10032 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10033 and rules[ruleno].precsym. Initialize members in order.
10034 * src/relation.c (relation_transpose): Always initialize new_R[i]
10035 and end_R[i].
10036 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10037
10038 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10039 conflict_list[0] was always 0, but now it isn't initialized.
10040
10041 * src/table.c (table_grow): When conflict_table grew, the grown
10042 area wasn't cleared. Fix this.
10043
10044 * lib/.cvsignore: Add strdup.c, strdup.h.
10045 * m4/.cvsignore: Add strdup.m4.
10046
10047 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10048
10049 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10050 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10051 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10052 ngotos + 1 without checking for overflow.
10053 (build_relations): Use END_NODE, not -1, to denote end of edges.
10054 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10055 build_relations): Use goto_number, not int, for goto numbers.
10056 * src/tables.c (save_column, default_goto): Likewise.
10057
10058 2004-11-23 Akim Demaille <akim@epita.fr>
10059
10060 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10061 of #defining from yystype.
10062 Don't typedef yystype, C++ does not need it.
10063 This lets it possible to forward declare it as union.
10064
10065 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10066
10067 * bootstrap (gnulib_modules): Add extensions.
10068 Problem reported by Jim Meyering.
10069
10070 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10071
10072 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10073 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10074 src/system.h, src/tables.c: XFREE -> free, to accommodate
10075 recent change to gnulib xalloc.h.
10076 Problem reported by Jim Meyering.
10077
10078 2004-11-17 Akim Demaille <akim@epita.fr>
10079
10080 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10081
10082 2004-11-17 Akim Demaille <akim@epita.fr>,
10083 Alexandre Duret-Lutz <adl@gnu.org>
10084
10085 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10086 changes.
10087 (YYCDEBUG): Adjust.
10088 Use it instead of cdebug_.
10089 (Parser::debug_stream, Parser::set_debug_stream): New.
10090 (Parser::symprint_): Define cdebug_ for temporary backward
10091 compatibility.
10092 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10093 debug_stream ().
10094
10095 2004-11-17 Akim Demaille <akim@epita.fr>
10096
10097 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10098 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10099 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10100 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10101
10102 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10103
10104 * data/glr.c (yyloc_default): Remove; not used.
10105 Problem reported by Frank Heckenbach.
10106
10107 2004-10-25 Akim Demaille <akim@epita.fr>
10108
10109 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10110 Introduce another definition to address simple location arrays.
10111 (yyGLRStack): New member: yyerror_range.
10112 (yyrecoverSyntaxError, yyparse): Update it.
10113 (yyrecoverSyntaxError): Use it when shifting the error token to
10114 have an accurate range, equivalent to the one computed by both
10115 yacc.c and lalr1.cc.
10116 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10117 that column numbers start at column 0, as per GNU Coding
10118 Standards, the others tests, and the doc.
10119 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10120 Adjust to the above change (first column is 0).
10121 And adjust the location of the "<error>", now covering the whole
10122 line.
10123
10124 2004-10-22 Akim Demaille <akim@epita.fr>
10125 and Paul Eggert <eggert@cs.ucla.edu>
10126
10127 Remove some arbitrary limits on goto numbers and relations.
10128 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10129 initial values, since they're never used.
10130 (set_goto_map): ngotos is now unsigned, so test for overflow
10131 by seeing whether it wraps around to zero.
10132 * src/lalr.h (goto_number): Now size_t, not short int.
10133 (GOTO_NUMBER_MAXIMUM): Remove.
10134 * src/relation.c (relation_print, traverse, relation_transpose):
10135 Check for END_NODE rather than looking at sign.
10136 * src/relation.h (END_NODE): New macro.
10137 (relation_node): Now size_t, not short int.
10138
10139 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10140
10141 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10142 keyword, not an identifier. Problem reported by Baron Schwartz in
10143 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10144
10145 2004-10-11 Akim Demaille <akim@epita.fr>
10146
10147 * src/symtab.c (symbol_check_alias_consistency): Also check
10148 type names, destructors, and printers.
10149 Reported by Alexandre Duret-Lutz.
10150 Recode the handling of associativity and precedence in terms
10151 of symbol_precedence_set.
10152 Accept no redeclaration at all, not even equal to the previous
10153 value.
10154 (redeclaration): New.
10155 Use it to factor redeclaration complaints.
10156 (symbol_make_alias): Don't set the type of the alias, let
10157 symbol_check_alias_consistency do it as for other features.
10158 * src/symtab.h (symbol): Add new member prec_location, and
10159 type_location.
10160 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10161 * tests/input.at (Incompatible Aliases): New.
10162
10163 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10164
10165 .cvsignore fixes to accommodate gnulib changes,
10166 and the practice of naming build directories "_build".
10167 * .cvsignore: Add "_*". Sort.
10168 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10169 * m4/.cvsignore: Add "*_gl.m4".
10170
10171 2004-10-06 Akim Demaille <akim@epita.fr>
10172
10173 * src/parse-gram.y (add_param): Fix the truncation of trailing
10174 spaces.
10175
10176 2004-10-05 Akim Demaille <akim@epita.fr>
10177
10178 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10179 whether the reducion was empty or not. This leaves room to
10180 improve the use of YYLLOC_DEFAULT in such a case.
10181 lalr1.cc is still experimental, so changing this is acceptable.
10182 And finally, there are probably not many users who changed the
10183 handling of locations in GLR, so changing is admissible too.
10184
10185 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10186 empty reduction, set @$ to an empty location ending the previously
10187 stacked symbol.
10188 Adjust uses to make sure the code is triggered on empty
10189 reductions.
10190 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10191 expected output: empty reductions have empty locations.
10192
10193 2004-09-29 Akim Demaille <akim@epita.fr>
10194
10195 * data/lalr1.cc: Move towards a more standard C++ coding style
10196 for templates: Class < T > -> Class<T>.
10197
10198 2004-09-29 Akim Demaille <akim@epita.fr>
10199
10200 * data/lalr1.cc: Reinstall the former ctor, for sake of
10201 compatibility, but warn it will be removed.
10202 Move towards a more standard C++ coding style (i.e., type *var ->
10203 type* var).
10204
10205 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10206
10207 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10208 since it's less likely to work if NULs are involved in the future.
10209
10210 2004-09-27 Akim Demaille <akim@epita.fr>
10211
10212 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10213
10214 2004-09-27 Akim Demaille <akim@epita.fr>
10215
10216 * data/lalr1.cc (b4_parse_param_decl_1): New.
10217 (b4_parse_param_decl): Use it to have different names between attribute
10218 and argument names.
10219 (b4_cc_constructor_call): Likewise.
10220
10221 2004-09-24 Akim Demaille <akim@epita.fr>
10222
10223 * src/parse-gram.y (add_param): Strip the leading and trailing
10224 blanks from a formal argument declaration.
10225 (YY_LOCATION_PRINT): New.
10226
10227 2004-09-24 Akim Demaille <akim@epita.fr>
10228
10229 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10230 after the location.
10231
10232 2004-09-24 Akim Demaille <akim@epita.fr>
10233
10234 * doc/bison.texinfo (Table of Symbols): Sort.
10235
10236 2004-09-21 Akim Demaille <akim@epita.fr>
10237
10238 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10239 the useless parentheses.
10240 Suggested by Paul Eggert.
10241
10242 2004-09-20 Akim Demaille <akim@epita.fr>
10243
10244 Let the initial-action act on the look-ahead, and use it for the
10245 "initial push" (corresponding to an hypothetical beginning-of-file).
10246 And let lalr1.cc honor %initial-action.
10247
10248 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10249 example.
10250 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10251 (Parser::Parser): Remove the ctor that used to initialize it.
10252 (Parser::parse): Like in the other skeletons, issue the "starting
10253 parse" message before any action.
10254 Honor %initial-action.
10255 Initialize the stacks with the lookahead.
10256 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10257 look-ahead.
10258 Push them in the stacks.
10259 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10260
10261 2004-09-20 Akim Demaille <akim@epita.fr>
10262
10263 * doc/bison.texinfo (Initial Action Decl): New.
10264
10265 2004-09-20 Akim Demaille <akim@epita.fr>
10266
10267 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10268 clearer criterion to define it.
10269 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10270 When reducing on an empty RHS, use the latest stacked location as
10271 location.
10272 yylloc is not always available.
10273 * data/glr.c: Likewise.
10274 Also, honor initial-actions.
10275
10276 2004-09-20 Akim Demaille <akim@epita.fr>
10277
10278 * data/yacc.c (YY_LOCATION_PRINT): New.
10279 Define when we know YYLTYPE's structure, i.e., when the default
10280 YYLLOC_DEFAULT is used.
10281 * data/c.m4 (b4_yysymprint_generate): Use it.
10282 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10283 value of the result.
10284 (error_start_): Replace with...
10285 (error_range_): this location array.
10286 This allows to replace code relying on the implementation of
10287 locations by portable code.
10288 * data/yacc.c (yylerrsp): Replace with...
10289 (yyerror_range): this.
10290 Every time a token is popped, update yyerror_range[0], to have an
10291 accurate location for the error token.
10292 * data/glr.c (YY_LOCATION_PRINT): New.
10293 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10294 deference a pointer.
10295 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10296 report the location in %printers.
10297
10298 * src/scan-skel.l: Instead of abort, report error messages to ease
10299 understanding skeleton scanning failures.
10300
10301 2004-09-16 Akim Demaille <akim@epita.fr>
10302
10303 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10304 (iterator, const_iterator): these, to be more in the C++ spirit.
10305 Also, return reverse iterators so that when displaying the stack
10306 we display its bottom first.
10307 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10308 from yacc.c.
10309 We should probably use vector here though.
10310
10311 2004-09-16 Akim Demaille <akim@epita.fr>
10312
10313 Have more complete shift traces.
10314
10315 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10316 to report Shifts instead of ad hoc YYDPRINTF invocations,
10317 including for the error token.
10318 * data/lalr1.cc (symprint_): Output the location.
10319 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10320 output the location within the %printer.
10321 Activate GLR tests, at least to make sure they compile properly.
10322 They still don't pass though.
10323 * tests/calc.at: Adjust expect verbose output, since now "Entering
10324 state..." is on a different line than the "Shifting" message.
10325
10326 2004-09-08 Akim Demaille <akim@epita.fr>
10327
10328 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10329 Bison directive from the Bison file to the invocation of this
10330 macro, so that these directives are passed to
10331 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10332 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10333 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10334 the extra Bison directives instead of the whole series.
10335 Change the grammar so that there are recoverable errors, and
10336 unrecoverable errors. Now we can have the parser give up before
10337 consuming the whole input. As a result we now can observe that
10338 the lookahead is freed when needed.
10339 Change the parser source to parse argv[1] instead of a hard coded
10340 string.
10341 Simplify yylex, and give a value and location to EOF.
10342 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10343 passed directives already coded in the file.
10344 Add some tests to check the location of "error".
10345 For some tests, the C++ parser is correct, and not yacc.c.
10346 For other tests, they provide different, but unsatisfying, values,
10347 so keep the C++ value so that at least one parser is "correct"
10348 according to the test suite.
10349 (Actions after errors): Remove, this is subsumed by the
10350 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10351
10352 2004-09-06 Akim Demaille <akim@epita.fr>
10353
10354 * data/lalr1.cc: Adjust the indentation of the labels.
10355 (Parser::pop): New.
10356 Use it.
10357
10358 2004-09-06 Akim Demaille <akim@epita.fr>
10359
10360 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
10361 argument, an informative message.
10362 Call YY_SYMBOL_PRINT.
10363 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
10364 * data/lalr1.cc (destruct_): Likewise.
10365 In addition, no longer depend on b4_yysymprint_generate and
10366 b4_yydestruct_generate to generate these functions, do it "by
10367 hand".
10368
10369 2004-09-03 Akim Demaille <akim@epita.fr>
10370
10371 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
10372 invoked, yydestruct the lookahead.
10373 * tests/calc.at (Calculator $1): Update the expected lengths of
10374 traces: there is an added line for the discarded lookahead.
10375 * doc/bison.texinfo (Destructor Decl): Some rewording.
10376 Define "discarded" symbols.
10377
10378 2004-09-02 Akim Demaille <akim@epita.fr>
10379
10380 * data/lalr1.cc (translate_, destruct_): No reason to be static.
10381
10382 2004-09-02 Akim Demaille <akim@epita.fr>
10383
10384 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
10385 (YYDSYMPRINTF): Rename as...
10386 (YY_SYMBOL_PRINT): this.
10387 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
10388 two.
10389 Use it instead of direct symprint_ calls.
10390 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
10391 one.
10392
10393 2004-09-02 Akim Demaille <akim@epita.fr>
10394
10395 * data/lalr1.cc (b4_yysymprint_generate): New.
10396 (symprint_): New member function, defined when YYDEBUG.
10397 Use it consistently instead of token/nterm debugging output by
10398 hand.
10399 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
10400 %printer calls to use cdebug_ when using lalr1.cc.
10401
10402 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
10403
10404 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
10405 with #ifdef YYDEBUG.
10406
10407 2004-08-26 Akim Demaille <akim@epita.fr>
10408
10409 * doc/bison.texinfo (Implementing Loops): Rename as...
10410 (Implementing Gotos/Loops): this.
10411
10412 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
10413
10414 Adjust to latest gnulib.
10415 * bootstrap (gnulib_modules): Add xalloc-die.
10416 Set LC_ALL=C so that file names sort consistently.
10417 Prefer the gnulib copies of gettext.m4, glibc21.m4,
10418 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
10419 uintmax_t.m4, ulonglong.m4.
10420 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
10421 po.m4 since we are now using _gl.m4 instead.
10422
10423 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
10424
10425 * src/scan-action.l: Remove. Scanning of semantic actions is
10426 handled in scan-gram.l.
10427
10428 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
10429
10430 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
10431
10432 * src/location.h (struct): The file member is a uniqstr.
10433 (equal_boundaries): Use UNIQSTR_EQ for comparison.
10434
10435 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
10436
10437 Fix bug with non-%union parsers that have printers or destructors,
10438 which led to a Bison core dump. Reported by Peter Fales in
10439 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
10440
10441 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
10442 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
10443 not to our own type.
10444 * src/output.c (symbol_destructors_output, symbol_printers_output):
10445 Don't assume %union.
10446 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
10447 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
10448 UNION-FLAG. All callers changed.
10449 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
10450 Use type char, not unsigned int, when declaring an array of char;
10451 this lets us remove a cast.
10452 (Printers and Destructors): Add non-%union test cases.
10453
10454 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10455
10456 * doc/bison.texinfo: Minor editorial changes, mostly to the new
10457 GLR writeups. E.g., avoid frenchspacing and the future tense,
10458 change "lookahead" to "look-ahead", and change "wrt" to "with
10459 respect to".
10460
10461 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10462
10463 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
10464 New sections, split off from the GLR Parsers section. Put the new
10465 Simple GLR Parser near the start of the GLR section, for clarity.
10466 Rewrite connective text.
10467
10468 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
10469
10470 * doc/bison.texinfo (Simple GLR Parsers): New section.
10471
10472 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10473
10474 * NEWS, TODO, doc/bison.texinfo:
10475 Use "look-ahead" instead of "lookahead", to be consistent.
10476 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
10477 while we're fixing "look-ahead".
10478 * src/conflicts.c (shift_set): Renamed from shiftset.
10479 (look_ahead_set): Renamed from lookaheadset.
10480 * src/print.c: Likewise.
10481 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
10482 name for "lookahead".
10483 (report_types, usage): Likewise.
10484 * src/getargs.h (report_look_ahead_tokens): Renamed from
10485 report_lookaheads.
10486 * src/lalr.c (compute_look_ahead_tokens): Renamed from
10487 compute_lookaheads.
10488 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
10489 (look_ahead_tokens_print): Renamed from lookaheads_print.
10490 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
10491 state_rule_lookaheads_print.
10492 * src/state.h: Likewise.
10493 (reductions.look_ahead_tokens): Renamed from lookaheads.
10494 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
10495 AT_DATA_LOOKAHEADS_GRAMMAR.
10496
10497 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
10498
10499 * README: Update location of patched M4 distribution.
10500
10501 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
10502
10503 Don't assume the C++ compiler takes the same arguments as the C compiler
10504 (trivial change).
10505 * configure.ac (O0CXXFLAGS): New var.
10506 * tests/atlocal.in (CXXFLAGS): Use it.
10507
10508 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
10509
10510 Fix some "make check" problems with C++ reported by
10511 Albert Chin-A-Young for Tru64 C++ in this thread:
10512 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
10513
10514 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
10515 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10516 Output to a .cc file for C++, not to a .c file.
10517 * tests/calc.at (AT_CHECK_CALC): Likewise.
10518 * tests/regression.at (AT_CHECK_DANCER): Likewise.
10519 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
10520
10521 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
10522
10523 * tests/calc.at, tests/actions.at: Workaround for SGI
10524 C++ compiler. (trivial change)
10525
10526 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
10527
10528 Spent a few hours checking out which prerequisite versions the
10529 current sources actually require. I went all the way back to
10530 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
10531 a seemingly endless set of combinations of versions more recent
10532 than that. The bottom line is that the current sources require
10533 fairly recent versions of the build tools, and it'll be some work
10534 to change this.
10535 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
10536 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
10537 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
10538 Add comments explaining why those particular versions are
10539 currently needed.
10540
10541 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
10542 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
10543 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
10544
10545 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
10546 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
10547
10548 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
10549
10550 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
10551 0.11.5. Suggested by Bruno Haible.
10552 * bootstrap: Remove gettext version checking.
10553
10554 * doc/bison.texinfo (Decl Summary): Also mention that %union
10555 can depend on prerequisite types. Problem reported by Tim
10556 Van Holder.
10557
10558 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
10559
10560 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
10561 * README-alpha: Don't tell people not to package this.
10562
10563 * bootstrap: Don't assume $(...) works; use `...` instead.
10564 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
10565 gettext better.
10566
10567 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
10568 put into the -d output file, and mention what to do if YYSTYPE is
10569 defined as a macro.
10570
10571 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
10572
10573 Undo change made earlier today: it caused autopoint to not bring
10574 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
10575 autopoint's.
10576
10577 * bootstrap: Check that gettext version matches what's in
10578 configure.ac. Warn users to ignore robots.txt ERROR 404.
10579 * bootstrap: Undo today's earlier change (logged below).
10580 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
10581
10582 The gettext version checking is causing more trouble than it's
10583 curing; remove it. Problem reported by Paul Hilfinger.
10584
10585 * bootstrap: Issue a warning that one can expect a message
10586 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
10587 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
10588
10589 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
10590
10591 Ensure that the C++ compiler used for testing actually works on a
10592 simple test program; if not, skip the C++-related tests. Problem
10593 reported by Vin Shelton in:
10594 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
10595
10596 * m4/cxx.m4: New file.
10597 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
10598 * tests/atlocal.in (BISON_CXX_WORKS): Add.
10599 * tests/local.at (AT_COMPILE_CXX): Use it.
10600
10601 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10602
10603 * data/glr.c (yylloc): Output this macro even if locations are not
10604 being generated, as the GLR parser needs it even in that case.
10605 Problem reported by Troy A. Johnson
10606 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
10607
10608 * configure.ac (AC_INIT): Update to 1.875e.
10609
10610 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10611
10612 * NEWS: Version 1.875d.
10613 * configure.ac (AC_INIT): Likewise.
10614 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
10615
10616 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
10617 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
10618 lalr1.cc runs afoul of the first, and the last two are no longer
10619 supported by GCC 3.4.0.
10620 * README: Mention GNU m4 1.4 or later; mention m4 patches.
10621 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
10622
10623 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
10624
10625 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
10626 unsigned int, for compatibility with latest gnulib hash module.
10627 * src/state.c (state_hash, state_hasher): Likewise.
10628 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
10629 * src/uniqstr.c (hash_uniqstr): Likewise.
10630
10631 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
10632
10633 * NEWS: Unescaped newlines are no longer allowed in char & strings.
10634
10635 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
10636 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
10637 character and string literals.
10638 (unexpected_end): New function.
10639 (unexpected_eof): Use it.
10640 (unexpected_newline): New function.
10641 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
10642 actions.
10643
10644 * NEWS: Document %expect-rr.
10645
10646 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
10647 Fix typo by replacing $1 with $option.
10648 Remove more 'intl'-related files.
10649 Don't DEFUN AM_INTL_SUBDIR twice.
10650
10651 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
10652 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
10653 strtoul.c.
10654 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
10655 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
10656 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
10657 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
10658 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
10659 * src/.cvsignore: Add *.output.
10660
10661 * src/parse-gram.y: Put copyright notice inside %{ %} so it
10662 gets copied to the output file.
10663
10664 2004-04-28 Paul Eggert <eggert@twinsun.com>
10665
10666 Get files from the gnulib and po repositories, instead of relying
10667 on them being in our CVS. Upgrade to latest versions of gnulib
10668 and Automake.
10669
10670 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
10671 * bootstrap: Bootstrap from gnulib and po repositories.
10672 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
10673 * README-cvs: Document these changes. Remove version numbers from
10674 mentions of build tools, since they change so often. Mention Flex.
10675
10676 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
10677 (gl_USE_SYSTEM_EXTENSIONS): Add.
10678 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
10679 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
10680 does this for us.
10681 (AC_ISC_POSIX): Remove; we no longer support this
10682 ancient OS, as it gets in the way of latest Autoconf & gnulib.
10683 (AC_HEADER_STDC): Remove: we now assume C89 or better.
10684 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
10685 Do not check for C89 headers, except for locale.h which is used
10686 by the Yacc library and must port to K&R hosts.
10687 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
10688 Do not check for C89 functions, except for setlocale which is
10689 used by the Yacc library.
10690 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
10691 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
10692 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
10693 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
10694 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
10695 AM_GNU_GETTEXT): Remove; now done by:
10696 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
10697 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
10698 for us.
10699
10700 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
10701 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
10702 Define to empty, as gnulib.mk will do the rest for us.
10703 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
10704 for us.
10705 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
10706 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
10707
10708 * src/files.c: Include gnulib's xstrndup.h.
10709
10710 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
10711 (REALLOC): Use xnrealloc, for likewise.
10712 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
10713 (strnlen, memrchr): Remove decls; functions no longer used.
10714 Include <stpcpy.h>.
10715
10716 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
10717 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
10718 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
10719 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
10720 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
10721 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
10722 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
10723 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
10724 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
10725 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
10726 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
10727 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
10728 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
10729 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
10730 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
10731 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
10732 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
10733 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
10734 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
10735 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
10736 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
10737 Remove, as these files are now generated automatically
10738 by bootstrap or automake.
10739
10740 * po/ChangeLog: Remove: all but one entry was a duplicate
10741 of this file, and I moved that 2000-11-02 entry here.
10742
10743 * config/.cvsignore: Add Makefile, depcomp, install-sh.
10744 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
10745 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
10746 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
10747 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
10748 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
10749 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
10750 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
10751 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
10752 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
10753 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
10754 xstrndup.h.
10755 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
10756 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
10757 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
10758 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
10759 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
10760 * src/.cvsignore: Remove *_.c.
10761
10762
10763 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
10764 support it. (The latest stable gzip doesn't.)
10765
10766 2004-04-27 Paul Eggert <eggert@twinsun.com>
10767
10768 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
10769 case, as stos_ is now used by destructors due to the 2004-02-09
10770 change.
10771
10772 Remove more K&R C support.
10773 * lib/libiberty.y (PARAMS): Remove. All uses removed.
10774 * lib/subpipe.c (errno): Remove decl.
10775 Include <stdlib.h> unconditionally.
10776 (EXIT_FAILURE): Remove macro.
10777 * src/complain.c (vfprintf, strerror): Remove.
10778 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
10779 unconditionally.
10780 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
10781 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
10782 (strchr, strspn, memchr): Remove decls.
10783 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
10784 unconditionally. Do not declare perror.
10785 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
10786 unconditionally.
10787
10788 * src/complain.c (_): Remove useless defn, as system.h defines this.
10789
10790 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
10791 with latest obstack.h.
10792 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
10793 to procedure types, as obstack.h now does that for us.
10794 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
10795
10796 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
10797 so that this include file can stand alone.
10798 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
10799 does this now. Include subpipe.h first after config.h, to
10800 test whether it can stand alone.
10801
10802 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
10803 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
10804 unused declaration.
10805
10806 * tests/synclines.at (%union synch line): Put a dummy member in
10807 the union, because empty unions aren't allowed in C. Caught
10808 by GCC 3.4.0.
10809
10810 2004-04-13 Jim Meyering <jim@meyering.net>
10811
10812 * src/conflicts.c (conflicts_print): Correct format string typo:
10813 use `%%' to produce literal `%'. (trivial change)
10814
10815 2004-03-30 Paul Eggert <eggert@twinsun.com>
10816
10817 * src/getargs.c (version): Update copyright year to 2004.
10818
10819 * data/c.m4 (b4_int_type): Use 'short int' rather than
10820 'short', and similarly for 'long', 'unsigned', etc.
10821 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
10822 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
10823 yy_yypstack, yydumpstack): Likewise.
10824 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
10825 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
10826 Likewise.
10827 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
10828 yy_stack_print, yyparse): Likewise.
10829 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
10830 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
10831 * lib/bitset.c (bitset_print): Likewise.
10832 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
10833 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
10834 * lib/bitsetv.c (bitsetv_dump): Likewise.
10835 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
10836 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
10837 Likewise.
10838 * src/LR0.c (allocate_itemsets): Likewise.
10839 * src/gram.h (rule_number, rule): Likewise.
10840 * src/lalr.h (goto_number): Likewise.
10841 * src/nullable.c (nullable_compute): Likewise.
10842 * src/output.c (prepare_rules): Likewise.
10843 * src/relation.c (relation_print, relation_digraph): Likewise.
10844 * src/relation.h (relation_node): Likewise.
10845 * src/state.h (state_number, transitions, errs, reductions,
10846 struct state): Likewise.
10847 * src/symtab.h (symbol_number, struct symbol): Likewise.
10848 * src/tables.c (vector_number, tally, action_number,
10849 default_goto, goto_actions): Likewise.
10850 * tests/existing.at (GNU Cim Grammar): Likewise.
10851 * tests/regression.at (Web2c Actions): Likewise.
10852
10853 * src/output.c (muscle_insert_short_int_table): Renamed from
10854 muscle_insert_short_table. All uses changed.
10855
10856 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10857
10858 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
10859 (declaration): Replace expected_conflicts with expected_sr_conflicts.
10860 Add %expect-rr rule.
10861
10862 * src/scan-gram.l: Recognize %expect-rr.
10863
10864 * src/conflicts.h (expected_sr_conflicts): Rename from
10865 expected_conflicts.
10866 (expected_rr_conflicts): Declare.
10867
10868 * src/conflicts.c (expected_sr_conflicts): Rename from
10869 expected_conflicts.
10870 (expected_rr_conflicts): Define.
10871 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
10872 for GLR parsers.
10873 Use expected_sr_conflicts in place of expected_conflicts.
10874 Warn if expected_rr_conflicts used in non-GLR parser.
10875
10876 * doc/bison.texinfo: Add documentation for %expect-rr.
10877
10878 2004-03-08 Paul Eggert <eggert@gnu.org>
10879
10880 Add support for hex token numbers. Suggested by Odd Arild Olsen in
10881 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
10882
10883 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
10884 in lalr1.cc.
10885 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
10886 * src/scan-gram.l (scan_integer): New function.
10887 ({int}): Use it.
10888 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
10889 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
10890 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
10891 Say "long int", not "long", for uniformity with GNU style.
10892
10893 2004-02-25 Paul Eggert <eggert@twinsun.com>
10894
10895 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
10896 compilers. This fixes a problem with Intel's C++ compiler being
10897 chatty, reported by Guido Trentalancia in
10898 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
10899
10900 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
10901
10902 Support %destructor and merge error locations in lalr1.cc.
10903
10904 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
10905 (Parser::stos_): Define unconditionally.
10906 (Parser::destruct_): New method. Generate its body with
10907 b4_yydestruct_generate.
10908 (Parser::error_start_): New attribute.
10909 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
10910 token which are discarded.
10911 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
10912 error_start_ when erroneous token are discarded.
10913 (Parser::parse) <yyerrlab1>: Compute the location of the error
10914 token so that it covers all the discarded tokens.
10915 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
10916 it can be called with `%skeleton "lalr1.cc"', and do that.
10917
10918 2004-02-02 Paul Eggert <eggert@twinsun.com>
10919
10920 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
10921 $(top_srcdir)/lib and ../lib. This fixes a bug reported
10922 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
10923 There's no need to mention top_builddir since Automake does that
10924 for us.
10925 (INCLUDES): Remove, as Automake says it's obsolescent.
10926 Contents migrated into AM_CPPFLAGS as described above.
10927 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
10928
10929 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10930
10931 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
10932 (yyreportSyntaxError): Handle case where lookahead token is
10933 YYEMPTY.
10934
10935 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10936
10937 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
10938 resulting parsers are compilable with C++.
10939
10940 2003-12-23 Paul Eggert <eggert@twinsun.com>
10941
10942 * config/depcomp, config/install-sh: Sync with Automake 1.8.
10943 * src/output.c (output_skeleton): Rename local var.
10944 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
10945 Bison tokens, as this runs afoul of the 2003-10-07 change that
10946 disallowed NUL bytes in character constants or string literals.
10947
10948 * tests/local.at: Require Autoconf 2.59's Autotest.
10949 * tests/testsuite.at: Don't include local.at, since we now assume
10950 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
10951 including it.
10952 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
10953 multiple inclusion warnings.
10954
10955 2003-12-02 Akim Demaille <akim@epita.fr>
10956
10957 * doc/bison.texinfo (How Can I Reset the Parser): More about start
10958 conditions.
10959 From Bruno Haible.
10960
10961 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
10962
10963 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
10964
10965 2003-10-07 Paul Eggert <eggert@twinsun.com>
10966
10967 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
10968 if testsuite doesn't exist.
10969
10970 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
10971 literals, unfortunately.
10972 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
10973 Complain about NUL bytes in character constants or string literals.
10974
10975 2003-10-05 Paul Eggert <eggert@twinsun.com>
10976
10977 * NEWS: Don't document %no-default-prec, as it's still
10978 too experimental.
10979 * doc/bison.texinfo: Document %no-default-prec only if
10980 the defaultprec flag is set. Normally it's not.
10981
10982 2003-10-04 Paul Eggert <eggert@twinsun.com>
10983
10984 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
10985 non-modifiable lvalue, instead of a modifiable one.
10986 * doc/bison.texinfo (Actions): Document that $$ can
10987 be assigned to. Do not claim that $$ and $N are
10988 array element references: user code should not rely on this.
10989
10990 2003-10-01 Paul Eggert <eggert@twinsun.com>
10991
10992 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
10993 (grammar_declaration): Use it.
10994 * src/scan-gram.l: New token %no-default-prec.
10995 * tests/conflicts.at: Revamp tests to use %no-default-prec.
10996 * NEWS, doc/bison.texinfo: Document the above.
10997
10998 2003-10-01 Akim Demaille <akim@epita.fr>
10999
11000 VCG no longer supports long_straight_phase.
11001
11002 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11003 * src/print_graph.c (print_graph): Adjust.
11004
11005 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
11006 and Paul Eggert <eggert@twinsun.com>
11007
11008 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11009 Table of Symbols): Document %default-prec.
11010 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11011 (grammar_declaration): Set default_prec on %default-prec.
11012 * src/scan-gram.l (%default-prec): New token.
11013 * src/reader.h (default_prec): New flag.
11014 * src/reader.c: Likewise.
11015 (packgram): Handle it.
11016 * tests/conflicts.at (%default-prec without %prec,
11017 %default-prec with %prec, %default-prec 1): New tests.
11018
11019 2003-09-30 Paul Eggert <eggert@twinsun.com>
11020
11021 * tests/testsuite.at: Include local.at, not input.at, fixing
11022 a typo in the 2003-08-25 patch.
11023
11024 2003-08-27 Akim Demaille <akim@epita.fr>
11025
11026 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11027 GCC warnings.
11028
11029 2003-08-26 Akim Demaille <akim@epita.fr>
11030
11031 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11032 "<\#" to avoid magic from Gnus when posting parts of this script.
11033
11034 2003-08-26 Akim Demaille <akim@epita.fr>
11035
11036 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11037 (Parser::parse): here.
11038 Adjust: nerrs and errstatus is now replaced by...
11039 (Parser::nerrs_, Parser::errstatus_): New.
11040
11041 2003-08-25 Akim Demaille <akim@epita.fr>
11042
11043 * config/announce-gen, Makefile.cfg: New.
11044 * Makefile.am: Adjust.
11045 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11046 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11047
11048 2003-08-25 Akim Demaille <akim@epita.fr>
11049
11050 When reducing initial empty rules, Bison parser read an initial
11051 location that is not defined. This results in garbage, and that
11052 affects Bison's own parser. Therefore we need (i) to extend Bison
11053 to support a means to initialize this location, and (ii) to use
11054 this CVS Bison to fix CVS Bison's parser.
11055
11056 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11057 with...
11058 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11059 * src/parse-gram.y: Adjust.
11060 (%initial-action): New.
11061 (%error-verbose): Since we require CVS Bison, there is no reason
11062 not to use it.
11063 * src/scan-gram.l: Adjust.
11064 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11065 * data/yacc.c (yyparse): Use b4_initial_action.
11066
11067 2003-08-25 Akim Demaille <akim@epita.fr>
11068
11069 * doc/bison.texinfo: Don't promote stdout for error messages.
11070
11071 2003-08-25 Akim Demaille <akim@epita.fr>
11072
11073 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11074 From Alexandre Duret-Lutz.
11075
11076 2003-08-25 Akim Demaille <akim@epita.fr>
11077
11078 Version 1.875c.
11079
11080 2003-08-25 Akim Demaille <akim@epita.fr>
11081
11082 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11083 Use them.
11084
11085 2003-08-25 Akim Demaille <akim@epita.fr>
11086
11087 * data/lalr1.cc (Parser::reduce_print_): New.
11088 Use it.
11089
11090 2003-08-25 Akim Demaille <akim@epita.fr>
11091
11092 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11093 error recovery loops. This patch is based on
11094 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
11095 Also, augment the similarity between lalr1.cc and yacc.c.
11096 Note: the locations of error recovery rules are not correct yet.
11097
11098 * data/lalr1.cc: Comment changes to augment the similarity between
11099 lalr1.cc and yacc.c.
11100 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11101 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11102 yyerrlab), when hitting EOF, pop the whole stack here instead of
11103 merely falling thru the default error handling mechanism.
11104 (yyerrorlab): New label, with the old contents of YYERROR,
11105 plus the following change: pop the stack of rhs corresponding
11106 to the production that invoked YYERROR. That is how Yacc
11107 behaves (required by POSIX).
11108 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11109 fail.
11110
11111 2003-08-25 Akim Demaille <akim@epita.fr>
11112
11113 Tune local.at so that people can "autom4te -l autotest calc.at -o
11114 calc" for instance, to extract a sub test suite.
11115
11116 * tests/testsuite.at: Move the initialization, Autotest version
11117 requirement, and AT_TESTED invocation into...
11118 * tests/local.at: here.
11119 * tests/testsuite.at: Include it for compatibility with Autoconf
11120 2.57.
11121 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11122 be ignore.
11123
11124 2003-08-04 Paul Eggert <eggert@twinsun.com>
11125
11126 Rework code slightly to avoid gcc -Wtraditional warnings.
11127 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11128 The returned value is now stored in *YY0. All callers changed.
11129 * src/output.c (merge_output): Adjust to the above change.
11130
11131 2003-07-26 Paul Eggert <eggert@twinsun.com>
11132
11133 * data/glr.c (YYASSERT): New macro.
11134 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11135 yyresolveStates, yyprocessOneStack):
11136 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11137 Derived from a suggestion by Frank Heckenbach.
11138
11139 2003-07-25 Paul Eggert <eggert@twinsun.com>
11140
11141 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11142 for portability to K&R C (after ansi2knr, presumably). See
11143 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
11144 by Frank Heckenbach, though I have omitted the structure-initialization
11145 part of his glr-knr.diff patch since I recall that the Portable
11146 C Compiler didn't require that change.
11147
11148 Let the user specify how to allocate and free memory.
11149 Derived from a suggestion by Frank Heckenbach in
11150 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
11151 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11152 All uses of free, malloc, realloc changed to use these macros,
11153 and unnecessary casts removed.
11154 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11155
11156 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11157
11158 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11159 use s.empty() rather than s == "" to test for empty string; see
11160 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
11161 (trivial change)
11162
11163 2003-06-25 Akim Demaille <akim@epita.fr>
11164
11165 * config/depcomp, config/install-sh: Update from masters.
11166
11167 2003-06-20 Paul Eggert <eggert@twinsun.com>
11168
11169 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11170 and return properly parenthesized result.
11171 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11172 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11173 Remove unnecessary parentheses from uses.
11174 * doc/bison.texinfo (Location Default Action): Describe the
11175 conventions for parentheses.
11176
11177 2003-06-19 Paul Eggert <eggert@twinsun.com>
11178
11179 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11180 yyreportTree): Do not assume that size_t is the same width as int,
11181 when printing sizes. Print sizes using an unsigned format.
11182 Problem reported by Frank Heckenbach in
11183 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
11184
11185 Port to Forte Developer 7 C compiler.
11186 * data/glr.c (struct YYLTYPE): If locations are not being used,
11187 declare a single dummy member, as empty structs do not conform
11188 to the C standard.
11189 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11190 the Forte Developer 7 C compiler complains that end-of-loop
11191 code is not reached.
11192
11193 2003-06-17 Paul Eggert <eggert@twinsun.com>
11194
11195 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11196 avoid warnings from picky compilers about redefinition of PARAMS.
11197
11198 2003-06-17 Paul Eggert <eggert@twinsun.com>
11199
11200 Version 1.875b.
11201
11202 * NEWS: Document 1.875b.
11203
11204 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11205 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11206 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11207 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11208 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11209 per recent gettext manual's suggestion.
11210 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11211 Use prototypes, not old-style definitions.
11212 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11213 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11214 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11215 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11216 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11217 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11218 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11219 vbitset_or_and_cmp, vbitset_copy): Likewise.
11220
11221 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11222 Do not include <stdlib.h>.
11223 (PARAMS): Define unconditionally for C89.
11224 (ATTRIBUTE_NORETURN): Remove.
11225 (ATTRIBUTE_UNUSED): Define unconditionally.
11226
11227 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
11228 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
11229 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11230 * lib/vbitset.c, lib/vbitset.h: New files.
11231 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11232 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11233 from libbitset.
11234
11235 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11236 `How Can I Reset @code{yyparse}', since texinfo does not allow
11237 arbitrary @ in node names.
11238
11239 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11240 shouldn't be needed according to the gettext 0.12.1 documentation
11241 but which seem to be needed anyway: codeset.m4 glibc21.m4
11242 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
11243 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
11244 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
11245
11246 * lib/.cvsignore: Add stdbool.h.
11247 * m4/.cvsignore: Add nls.m4, po.m4.
11248
11249 Upgrade to CVS gnulib.
11250 * stdbool_.h: File renamed from stdbool.h.in.
11251 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11252 AC_HEADER_STDBOOL.
11253 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11254 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11255 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11256 (MOSTLYCLEANFILES): New var.
11257 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11258 (stdbool.h): New rule.
11259 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11260 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11261 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11262 m4/quote.m4: Upgrade to today's gnulib.
11263
11264 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11265 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11266 the tests right now.
11267 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11268 yyerror are declared before use; C99 requires this.
11269
11270 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11271
11272 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11273 first.
11274 (yyrecoverSyntaxError): Correct the logic for setting and testing
11275 yyerrState.
11276 Correct comment on handling EOF.
11277 Allow states with only a default reduction, rather than failing
11278 (I can't quite reconstruct why these were not allowed before).
11279
11280 Fixes to avoid problem that $-N rules in GLR parsers can cause
11281 buffer overruns, corrupting state.
11282
11283 * src/output.c (prepare_rules): Output max_left_semantic_context
11284 definition.
11285 * src/reader.h (max_left_semantic_context): New variable declaration.
11286 * src/scan-gram.l (max_left_semantic_context): Define.
11287 (handle_action_dollar): Update max_left_semantic_context.
11288 * data/glr.c (YYMAXLEFT): New definition.
11289 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11290 (yyresolveAction): Ditto.
11291
11292 Fixes to problems with location handling in GLR parsers reported by
11293 Frank Heckenbach (2003/06/05).
11294
11295 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11296 (YYRHSLOC): Add parentheses, and define only if locations used.
11297 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11298 locations not used.
11299 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11300 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
11301
11302 * tests/cxx-type.at: Exercise location information; update tests
11303 to differentiate output with and without locations.
11304 Remove forward declarations of yylex and yyerror---caused errors
11305 because default YYLTYPE not yet defined.
11306 Change semantic actions to compute strings, rather than printing
11307 them directly (to test proper passing of semantics values). Change
11308 output to prefix notation and update test data and expected results.
11309 (yylex): Track locations.
11310 (stmtMerge): Return value rather than printing, and include arguments
11311 in value.
11312
11313 2003-06-03 Paul Eggert <eggert@twinsun.com>
11314
11315 Avoid warnings generated by GCC 2.95.4 when Bison is
11316 configured with --enable-gcc-warnings.
11317 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11318 yy::]b4_parser_class_name[::translate_,
11319 yy::Stack::operator[] (unsigned),
11320 yy::Stack::operator[] (unsigned) const,
11321 yy::Slice::operator[] (unsigned),
11322 yy::Slice::operator[] (unsigned) const):
11323 Rename local vars to avoid warnings.
11324 * tests/glr-regression.at (Improper handling of embedded actions
11325 and $-N in GLR parsers): Remove unused local variable from yylex.
11326 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11327 (void) as arg when not pure, since we now assume C89 when building
11328 Bison. Pacify GCC by using parameter.
11329
11330 2003-06-02 Paul Eggert <eggert@twinsun.com>
11331
11332 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11333 yy::Location::lines, yy::Location::columns): Rename arguments
11334 to avoid shadowing; this removes a warning generated by GCC 3.3.
11335
11336 2003-06-01 Paul Eggert <eggert@twinsun.com>
11337
11338 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11339 to g++, as GCC 3.3 complains if you do it.
11340 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11341 everything that WARNING_CFLAGS has, except omit warnings
11342 not suitable for C++.
11343 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11344 * tests/atlocal.in (CXXFLAGS): New var.
11345 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11346
11347 Fix a GLR parser bug I reported in February; see
11348 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
11349 The problem was that GLR parsers did not conform to the C standard,
11350 because actions like { $1 = $2 + $3; } expanded to expressions
11351 that invoked YYFILL in separate subexpressions, and YYFILL assigned
11352 to a local variable. The C standard says that expressions
11353 like (var = f ()) + (var = f ()) have undefined behavior.
11354 Another problem was that GCC sometimes issues warnings that
11355 yyfill and its parameters are unused.
11356
11357 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
11358 as possibly unused.
11359 (yyfill): New function.
11360 (YYFILL): Use it.
11361 (yyuserAction): Change type of yynormal to bool, so that it matches
11362 the new yyfill signature. Mark it as possibly unused.
11363
11364
11365 Follow up on a bug I reported in February, where a Bison-generated
11366 parser can loop. Provide a test case and a fix for yacc.c. I
11367 don't have a fix for lalr1.cc or for glr.c, unfortunately.
11368 The original bug report is in:
11369 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
11370
11371 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
11372 macro's size was becoming unwieldy.
11373 (yyerrlab): Do not discard an empty lookahead symbol, as this
11374 might destroy garbage.
11375 (yyerrorlab): New label, with the old contents of YYERROR,
11376 plus the following change: pop the stack of rhs corresponding
11377 to the production that invoked YYERROR. That is how Yacc
11378 behaves, and POSIX requires this behavior.
11379 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
11380 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
11381 Define 'alarm' to do nothing if unistd.h is not available.
11382 Add a new rule "exp: '-' error;" to test the above change to
11383 data/yacc.c. Use 'alarm' to abort any test taking longer than
11384 10 seconds, as it's probably looping.
11385 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
11386 Also, the new yacc.c generates two fewer diagnostics for an
11387 existing test.
11388
11389 2003-05-24 Paul Eggert <eggert@twinsun.com>
11390
11391 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
11392 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
11393 This fixes a problem reported by John Bowman when the Compaq/HP
11394 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
11395 -ansi -Wall -gall).
11396 * data/yacc.c (union yyalloc): Likewise.
11397 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
11398
11399 Switch from 'int' to 'bool' where that makes sense.
11400
11401 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
11402 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
11403 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
11404 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
11405 Return or accept bool, not int. All callers changed.
11406 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
11407 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
11408 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
11409 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
11410 bitset_or_and_cmp_): Likewise.
11411 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
11412 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
11413 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
11414 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
11415 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
11416 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
11417 bitset_stats_or_and_cmp): Likewise.
11418 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
11419 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
11420 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
11421 ebitset_xor_cmp): Likewise.
11422 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
11423 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
11424 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
11425 lbitset_xor_cmp): Likewise.
11426 * lib/bbitset.h: Include <stdbool.h>.
11427 (struct bitset_vtable): The following members now return bool, not
11428 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
11429 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
11430 or_and_cmp).
11431 * src/conflicts.c (count_rr_conflicts): Likewise.
11432 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
11433 All uses changed.
11434 * lib/ebitset.c (ebitset_obstack_init): Likewise.
11435 * lib/lbitset.c (lbitset_obstack_init): Likewise.
11436 * src/getargs.c (debug_flag, defines_flag, locations_flag,
11437 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11438 graph_flag): Likewise.
11439 * src/getargs.h (debug_flag, defines_flag, locations_flag,
11440 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11441 graph_flag): Likewise.
11442 * src/output.c (error_verbose): Likewise.
11443 * src/output.h (error_verbose): Likewise.
11444 * src/reader.c (start_flag, typed): Likewise.
11445 * src/reader.h (typed): Likewise.
11446 * src/getargs.c (LOCATIONS_OPTION): New constant.
11447 (long_options, getargs): Use it.
11448 * src/lalr.c (build_relations): Use bool, not int.
11449 * src/nullable.c (nullable_compute): Likewise.
11450 * src/print.c (print_reductions): Likewise.
11451 * src/tables.c (action_row, pack_vector): Likewise.
11452 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
11453 * src/output.c (prepare): Use it.
11454 * src/output.c (token_definitions_output,
11455 symbol_destructors_output, symbol_destructors_output): Use string,
11456 not boolean integer, to keep track of whether to output separator.
11457 * src/print_graph.c (print_core): Likewise.
11458 * src/state.c (state_rule_lookaheads_print): Likewise.
11459
11460 * config/install-sh: Sync from automake 1.7.5.
11461
11462 2003-05-14 Paul Eggert <eggert@twinsun.com>
11463
11464 * src/parse-gram.y (rules_or_grammar_declaration): Require a
11465 semicolon after a grammar declaration, in the interest of possible
11466 future changes to the Bison input language.
11467 Do not allow a stray semicolon at the start of the grammar.
11468 (rhses.1): Allow one or more semicolons after any rule, including
11469 just before "|" as required by POSIX.
11470 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
11471 grammar.
11472
11473 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
11474
11475 %parse-param support for lalr1.cc.
11476
11477 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
11478 b4_cc_constructor_calls, b4_cc_constructor_call,
11479 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
11480 definitions.
11481 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
11482 parse-param arguments.
11483 (yy::b4_parser_class_name): Declare instance variables to
11484 hold parse-param arguments.
11485 * tests/calc.at: s/value/semantic_value/ because value clashes
11486 with a member of yy::b4_parser_class_name. Adjust C++ code
11487 to handle %parse-param. Enable %parse-param test in C++.
11488
11489 2003-05-12 Paul Eggert <eggert@twinsun.com>
11490
11491 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
11492 English a bit. Fix fclose typo. Change "const char" to "char
11493 const", and use ANSI C rather than K&R for "main". Suggest
11494 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
11495 and suggest yy_switch_to_buffer.
11496
11497 2003-05-05 Paul Eggert <eggert@twinsun.com>
11498
11499 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
11500 C89. This avoids a diagnostic on compilers that define __STDC__
11501 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
11502 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
11503
11504 2003-05-03 Paul Eggert <eggert@twinsun.com>
11505
11506 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
11507 Do not overrun array bounds.
11508 This should fix a bug reported today by Olatunji Oluwabukunmi in
11509 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
11510
11511 2003-04-29 Akim Demaille <akim@epita.fr>
11512
11513 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
11514 * src/getargs.c, src/getargs.h: here, as bool, not int.
11515 (nondeterministic_parser): New.
11516 * src/parse-gram.y, src/scan-gram.l: Support
11517 %nondeterministic-parser.
11518 * src/output.c (prepare): Use nondeterministic_parser instead
11519 of glr_parser where appropriate.
11520 * src/tables.c (conflict_row, action_row, save_row)
11521 (token_actions, token_actions, pack_vector): Ditto.
11522
11523 2003-04-29 Akim Demaille <akim@epita.fr>
11524
11525 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
11526
11527 2003-04-29 Akim Demaille <akim@epita.fr>
11528
11529 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
11530 with %pure-parser and %locations to exercise the patch from Yakov
11531 Markovitch below.
11532
11533 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
11534
11535 * data/yacc.c: (b4_lex_param): Corrected for the case where
11536 %lex-param is provided and %pure-parser isn't.
11537
11538 2003-04-27 Paul Eggert <eggert@twinsun.com>
11539
11540 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
11541 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
11542 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
11543 if it is not defined.
11544 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
11545
11546 2003-04-26 Paul Eggert <eggert@twinsun.com>
11547
11548 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
11549 Declare to be of type suitable for the ninf value itself, not of
11550 type suitable for the corresponding table, since the latter might
11551 be unsigned but the ninf value might be negative. This fixes a
11552 bug reported by Alexandre Duret-Lutz in
11553 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
11554
11555 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
11556 invokes it. We shouldn't invoke it twice because it will attempt
11557 to put error.o in the archive twice. This fixes a glitch reported
11558 by Martin Mokrejs in
11559 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
11560
11561 2003-04-21 Paul Eggert <eggert@twinsun.com>
11562
11563 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
11564 to gnulib.
11565
11566 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
11567
11568 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
11569 Fix obvious typo that results in uncompilable GLR parsers
11570 when both %pure-parser and %locations are used. (trivial change)
11571
11572 2003-04-17 Paul Eggert <eggert@twinsun.com>
11573
11574 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
11575 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
11576 Do not insert the expected token via unput, as this runs afoul
11577 of a POSIX-compatibility bug in flex 2.5.31.
11578 All uses changed to BEGIN the parent state,
11579 since we no longer insert the expected token via unput.
11580 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
11581 that is no longer emitted after the above change.
11582
11583 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
11584 the first one. This change is from Paul Hilfinger, and it fixes
11585 regression reported by Werner Lemberg in
11586 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
11587
11588 (resolve_sr_conflict): Don't invoke state_errs_set
11589 unless one or more tokens have been explicitly made errors.
11590 Otherwise, the above change causes Bison to abort.
11591
11592 * tests/existing.at (GNU pic Grammar): New test case, taken from
11593 Lemberg's email.
11594
11595 2003-03-31 Akim Demaille <akim@epita.fr>
11596
11597 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
11598
11599 2003-03-31 Akim Demaille <akim@epita.fr>
11600
11601 * src/output.c (prepare_symbols): Avoid trailing spaces in the
11602 output.
11603
11604 2003-03-31 Akim Demaille <akim@epita.fr>
11605
11606 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
11607 From Paul Hilfinger.
11608
11609 2003-03-29 Akim Demaille <akim@epita.fr>
11610
11611 * m4/error.m4: Do not put under dynamic conditions some code which
11612 expansion is under static control.
11613
11614 2003-03-29 Akim Demaille <akim@epita.fr>
11615
11616 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
11617
11618 2003-03-29 Akim Demaille <akim@epita.fr>
11619
11620 * doc/bison.texinfo (Strings are Destroyed): New.
11621
11622 2003-03-13 Paul Eggert <eggert@twinsun.com>
11623
11624 * .cvsignore: Add configure.lineno.
11625 * src/.cvsignore: Add yacc.
11626 * tests/.cvsignore: Add testsuite.log.
11627 * doc/fdl.texi: Sync with latest FSF version.
11628
11629 2003-03-12 Paul Eggert <eggert@twinsun.com>
11630
11631 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
11632 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
11633 cursor, instead of leaving it undefined. This fixes a bug
11634 reported by Tim Van Holder in
11635 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
11636 * tests/input.at (Torturing the Scanner): Test the scanner on
11637 an empty input file, which was Tim Van Holder's test case.
11638
11639 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
11640 <sys/resource.h> can be included, include sys/time.h and
11641 sys/times.h first, if available. This works around the SunOS
11642 4.1.4 porting bug reported by Bruce Becker in
11643 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
11644
11645 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
11646 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
11647 AC_HEADER_SYS_WAIT.
11648
11649 Merge changes from gnulib. This was prompted because the CVS
11650 snapshot didn't build on Solaris 7 due to strnlen problems.
11651
11652 These changes need to be merged back into gnulib:
11653 * lib/hash.c: Include <stdbool.h> unconditionally.
11654 * m4/onceonly.m4 (m4_quote): New macro.
11655 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
11656 Quote AC_FOREACH variable-expansions properly.
11657 The 2003-01-03 obstack.h change also needs merging.
11658 {end of changes requiring merging}
11659
11660 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11661 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
11662 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
11663 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
11664 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
11665 New files, imported from gnulib.
11666 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
11667 above.
11668
11669 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
11670 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
11671 gnulib sources.
11672
11673 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
11674 Add.
11675 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
11676 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
11677 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
11678 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
11679 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
11680 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
11681 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
11682 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
11683 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
11684 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
11685 (jm_PREREQ_ARGMATCH): Remove.
11686 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
11687 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
11688
11689 * src/system.h: Include <stdbool.h> unconditionally.
11690
11691 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
11692 assuming at least C89 in the bitset code for some time now.
11693
11694 2003-03-03 Akim Demaille <akim@epita.fr>
11695
11696 * ro.po: New.
11697
11698 2003-03-02 Akim Demaille <akim@epita.fr>
11699
11700 * doc/bison.texinfo (Table of Symbols): Reactivate the
11701 documentation for %lex-param, and %parse-param.
11702
11703 2003-03-02 Akim Demaille <akim@epita.fr>
11704
11705 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
11706 generate verbose error messages.
11707 Use the number of tokens as an upper bound in yytname, as it
11708 cannot be a non terminal.
11709
11710 2003-03-02 Akim Demaille <akim@epita.fr>
11711
11712 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
11713 message.
11714
11715 2003-03-02 Akim Demaille <akim@epita.fr>
11716
11717 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
11718 Use them to exercise yycheck overrun.
11719 Based on Andrew Suffield's grammar.
11720
11721 2003-03-02 Akim Demaille <akim@epita.fr>
11722
11723 Create tests/local.at for Bison generic testing macros.
11724
11725 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
11726 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
11727 This new file.
11728 * tests/calc.at (AT_CHECK_CALC): Adjust.
11729 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
11730 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
11731 * tests/local.at: here.
11732 (AT_COMPILE_CXX): Tags the tests using it as c++.
11733 Ignore the test if CXX is not functional.
11734
11735 2003-03-01 Paul Eggert <eggert@twinsun.com>
11736
11737 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
11738 not loc->end, since loc->end might contain garbage and this leads
11739 to undefined behavior on some platforms.
11740 (id_loc, token_start): Use (IF_LINTed) initial values that do not
11741 depend on *loc, so that the reader doesn't give the the false
11742 impression that *loc is initialized.
11743 (<INITIAL>"%%"): Do not bother setting code_start, since its value
11744 does not survive the return.
11745
11746 2003-03-01 Akim Demaille <akim@epita.fr>
11747
11748 * src/scan-gram.l (code_start): Always initialize it when entering
11749 into yylex, as SC_EPILOGUE is activated *before* the corresponding
11750 yylex invocation. An alternative would be making it static, but
11751 then it starts with the second %%'s beginning, instead of its end.
11752
11753 2003-02-28 Paul Eggert <eggert@twinsun.com>
11754
11755 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
11756 around a UnixWare 7.1.1 porting bug reported by John Hughes in
11757 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
11758
11759 2003-02-26 Paul Eggert <eggert@twinsun.com>
11760
11761 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
11762 Remove Sequent/Pyramid discussion (nobody uses them any more).
11763 Merge VMS and MS-DOS discussion; these ports may well be dead
11764 but let's keep mentioning them for now. Put <> around email
11765 addresses. Add copyright notice.
11766
11767 2003-02-24 Paul Eggert <eggert@twinsun.com>
11768
11769 * data/glr.c (yy_reduce_print): yylineno -> yylno,
11770 to avoid collision with flex use of yylineno.
11771 Problem reported by Bruce Lilly in
11772 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
11773 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11774 * data/yacc.c (yy_reduce_print): Likewise.
11775
11776 * config/depcomp: Sync with Automake 1.7.3.
11777
11778 2003-02-21 Akim Demaille <akim@epita.fr>
11779
11780 * data/lalr1.cc: Use temporary variables instead of casts to
11781 change integer types.
11782 Suggested by Paul Eggert.
11783
11784 2003-02-21 Akim Demaille <akim@epita.fr>
11785
11786 * doc/bison.texinfo: Use "location" consistently to refer to @n,
11787 to avoid confusions with lalr1.cc's notion of Position.
11788 Suggested by Paul Eggert.
11789
11790 2003-02-20 Akim Demaille <akim@epita.fr>
11791
11792 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
11793 before initial_columns.
11794 (location.hh): Use consistent variable names when defining the
11795 operator<<.
11796 Use "last" so that we subtract from Positions, not from unsigned.
11797
11798 2003-02-20 Akim Demaille <akim@epita.fr>
11799
11800 * data/lalr1.cc (position.hh): New subfile, including the extended
11801 and Doxygen'ed documentation of class Position.
11802 (location.hh): Use it.
11803 Document a` la Doxygen.
11804 With the help of Benoit Perrot.
11805
11806 2003-02-20 Akim Demaille <akim@epita.fr>
11807
11808 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
11809 AT_YACC_IF.
11810 Redefine AT_YYERROR_SEES_LOC_IF using it.
11811 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
11812 not defined.
11813 Don't use the location in yy::Parser::error_ and
11814 yy::Parser::print_ when not %locations.
11815 Activate more lalr1.cc tests.
11816
11817 2003-02-19 Akim Demaille <akim@epita.fr>
11818
11819 * data/lalr1.cc: When displaying a line number, be sure to make it
11820 an int.
11821
11822 2003-02-19 Akim Demaille <akim@epita.fr>
11823
11824 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
11825 Remove, useless.
11826 (YYABORT, YYACCEPT, YYERROR): New.
11827 * tests/calc.at: Renable the lalr1.cc test.
11828
11829 2003-02-19 Akim Demaille <akim@epita.fr>
11830
11831 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
11832 error recovery, mixing with/without pops and discarding of the
11833 lookahead.
11834 Exercise YYERROR.
11835 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
11836
11837 2003-02-17 Paul Eggert <eggert@twinsun.com>
11838
11839 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
11840 * tests/testsuite.at (AT_COMPILE): Use them.
11841 This fixes the testsuite problem reported by Robert Lentz in
11842 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
11843
11844 2003-02-12 Paul Eggert <eggert@twinsun.com>
11845
11846 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
11847 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
11848 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
11849 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
11850 Check for malloc failure, for consistency with yacc.c.
11851 (yytname_size): Remove, for consistency with yacc.c.
11852
11853 The bug still remains in data/lalr1.cc, as I didn't have time
11854 to fix it there.
11855
11856 2003-02-06 Akim Demaille <akim@epita.fr>
11857
11858 * configure.ac (GXX): Rename as...
11859 (CXX): this, to keep the original Autoconf semantics.
11860 Require 2.57.
11861 * data/lalr1.cc: Fix b4_copyright invocations.
11862 If YYDEBUG is not defined, don't depend upon name_ being defined.
11863 (location.hh): Include string and iostream.
11864 (Position::filename): New member.
11865 (Position::Position ()): New.
11866 (operator<< (Position)): New.
11867 (operator- (Position, int)): New.
11868 (Location::first, Location::last): Rename as...
11869 (Location::begin, Location::end): these, to mock the conventional
11870 iterator names.
11871 (operator<< (Location)): New.
11872 * tests/atlocal.in (CXX): New.
11873 * tests/testsuite.at (AT_COMPILE_CXX): New.
11874 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
11875 locations in a more synthetic way.
11876 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
11877 lalr1.cc is used.
11878 Adjust the C locations to match those from Emacs: first column is
11879 column 0.
11880 Change all the expected results.
11881 Conform to the GCS: simplify the locations when applicable.
11882 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
11883 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
11884 these CPP macros with the m4 macros new defined by...
11885 (AT_CHECK_PUSHDEFS): this, i.e.:
11886 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
11887 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
11888 New macros.
11889 (AT_CHECK_POPDEFS): Undefine them.
11890 (AT_CHECK_CALC_LALR1_CC): New.
11891 Use it for the first lalr1.cc test.
11892
11893 2003-02-04 Akim Demaille <akim@epita.fr>
11894
11895 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
11896 Location as is defined.
11897
11898 2003-02-04 Akim Demaille <akim@epita.fr>
11899
11900 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
11901 name_ being defined.
11902
11903 2003-02-03 Paul Eggert <eggert@twinsun.com>
11904
11905 * src/gram.h (start_symbol): Remove unused decl.
11906
11907 Use more-consistent naming conventions for local vars.
11908
11909 * src/derives.c (derives_compute): Change type of local var from
11910 int to rule_number.
11911 * src/gram.c (grammar_rules_partial_print): Likewise.
11912 * src/print.c (print_core): Likewise.
11913 * src/reduce.c (reduce_grammar_tables): Likewise.
11914
11915 * src/gram.c (grammar_dump): Change name of item_number *
11916 local var from r to rp.
11917 * src/nullable.c (nullable_compute): Likewise.
11918
11919 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
11920
11921 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
11922 for symbol or symbol_number var.
11923 * src/reader.c (grammar_start_symbol_set): Likewise.
11924 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
11925 Likewise.
11926 * src/state.c (transitions_to): Likewise.
11927 * src/state.h: Likewise.
11928 * src/tables.c (symbol_number_to_vector_number): Likewise.
11929
11930 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
11931 char * var.
11932
11933 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
11934 var.
11935
11936 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
11937 var.
11938
11939 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
11940 Use str, not s, for char * var. Use ch, not c, for character var.
11941 Use size for size var.
11942
11943 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
11944 char * var.
11945 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
11946 uniqstr var.
11947 * src/uniqstr.h: Likewise.
11948
11949 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
11950 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
11951 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
11952 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
11953 param to have same name as that of enum, so that we don't use
11954 "s" to stand for a non-state.
11955
11956 2003-02-02 Akim Demaille <akim@epita.fr>
11957
11958 * src/scan-skel.l: Scan more than one inert character per yylex
11959 invocation.
11960
11961 2003-02-01 Paul Eggert <eggert@twinsun.com>
11962
11963 Version 1.875a.
11964
11965 * po/LINGUAS: Add ms.
11966
11967 2003-01-30 Akim Demaille <akim@epita.fr>
11968
11969 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
11970
11971 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11972
11973 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
11974 of $1.
11975
11976 Changes in response to error report by S. Eken: GLR mode does not
11977 handle negative $ indices or $ indices in embedded rules correctly.
11978 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
11979
11980 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
11981 (b4_rhs_location): Ditto.
11982 (yyfill): New function to copy from stack tree into array
11983 incrementally.
11984 (yyuserAction): Modify to allow incremental move of semantic values
11985 to rhs array when in GLR mode.
11986 Define YYFILL to use in user-defined actions to fill semantic array
11987 as needed.
11988 Remove dummy use of yystack, as there is now a guaranteed use.
11989 (yydoAction): Modify to allow incremental move of semantic values
11990 to rhs array when in GLR mode.
11991 (yyresolveAction): Ditto.
11992 (yyglrShiftDefer): Update comment.
11993 (yyresolveStates): Use X == NULL for pointers, not !X.
11994 (yyglrReduce): Ditto.
11995 (yydoAction): Ditto
11996
11997 * tests/glr-regr1.at: Rename to ...
11998 * tests/glr-regression.at: Add new regression test for the problems
11999 described above (adapted from S. Eken).
12000 Update copyright notice.
12001 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12002 * tests/Makefile.am: Ditto.
12003
12004 2003-01-28 Paul Eggert <eggert@twinsun.com>
12005
12006 * data/lalr1.cc: Do not use @output_header_name@ unless
12007 b4_defines_flag is set. This fixes two bugs reported by
12008 Tim Van Holder in
12009 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12010 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
12011
12012 2003-01-21 Paul Eggert <eggert@twinsun.com>
12013
12014 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12015 we don't need to worry about yyerrlab1 being reported as an
12016 "unused label" by non-GCC C compilers. The downside is that if
12017 locations are used then a couple of statements are duplicated each
12018 time YYERROR is invoked, but the upside is that the warnings
12019 should vanish.
12020 (yyerrlab1): Move code to YERROR.
12021 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12022 This reverts some of the 2002-12-27 change.
12023
12024 2003-01-17 Paul Eggert <eggert@twinsun.com>
12025
12026 * src/output.c (symbol_printers_output): Fix typo that led
12027 to core dump. Problem reported by Antonio Rus in
12028 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
12029
12030 2003-01-13 Akim Demaille <akim@epita.fr>,
12031 Quoc Peyrot <chojin@lrde.epita.fr>,
12032 Robert Anisko <anisko_r@lrde.epita.fr>
12033
12034 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12035 when the stacks contain one element, as the loop would otherwise
12036 free the last state, and then use the top state (the one we just
12037 popped). This means that the initial elements will not be freed
12038 explicitly, as is the case in yacc.c; it is not a problem, as
12039 these elements have fake values.
12040
12041 2003-01-11 Paul Eggert <eggert@twinsun.com>
12042
12043 * NEWS: %expect-violations are now just warnings, reverting
12044 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12045 bootstrapping problem reported by Matthias Klose; see
12046 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
12047 * src/conflicts.c (conflicts_print): Likewise.
12048 * tests/conflicts.at (%expect not enough, %expect too much,
12049 %expect with reduce conflicts): Likewise.
12050 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12051 that the warning is enabled if the number of conflicts changes
12052 (not necessarily increases).
12053
12054 * src/getargs.c (version): Update copyright year.
12055
12056 2003-01-09 Akim Demaille <akim@epita.fr>
12057
12058 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12059
12060 2003-01-08 Paul Eggert <eggert@twinsun.com>
12061
12062 * Makefile.maint (WGETFLAGS):
12063 New macro, containing "-C off" to disable proxy caches.
12064 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12065 (rel-check): Use $(WGET) instead of wget.
12066
12067 2003-01-06 Paul Eggert <eggert@twinsun.com>
12068
12069 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12070 the GLR paper of Scott, Johnstone and Hussain.
12071
12072 2003-01-04 Paul Eggert <eggert@twinsun.com>
12073
12074 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12075 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12076 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12077 (EXTRA_LIBRARIES): New var, for liby.a.
12078 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12079 (EXTRA_SCRIPTS): New var, for yacc.
12080
12081 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12082 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12083 Problem reported by Nelson H. F. Beebe.
12084
12085 2003-01-03 Paul Eggert <eggert@twinsun.com>
12086
12087 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12088 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12089 when compiling Bison 1.875's `bitset bset = obstack_alloc
12090 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12091
12092 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12093 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12094 grow to a huge size with typical invocation.
12095
12096 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12097 Use the pattern recommended by Autoconf 2.57, except also protect
12098 against double-definition.
12099 * src/system.h: Likewise.
12100 Portability issues reported by Nelson H. F. Beebe.
12101
12102 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12103 All uses changed. Provide a definition in both C and C++.
12104 (yytrue, yyfalse): Define even if defined (__cplusplus).
12105
12106 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12107 Reported by Nelson H. F. Beebe.
12108
12109 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12110
12111 2003-01-02 Paul Eggert <eggert@twinsun.com>
12112
12113 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12114 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12115 Bug reported by Nelson H. F. Beebe.
12116
12117 2003-01-01 Paul Eggert <eggert@twinsun.com>
12118
12119 * Version 1.875.
12120
12121 2002-12-30 Paul Eggert <eggert@twinsun.com>
12122
12123 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12124 Moved here from...
12125 (<INITIAL>","): Here. This causes stray "," to be treated
12126 more uniformly.
12127
12128 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
12129 last brace in braced code when not in Yacc mode, for compatibility
12130 with Bison 1.35. This resurrects the 2001-12-15 patch to
12131 src/reader.c.
12132
12133 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12134 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12135
12136 2002-12-28 Paul Eggert <eggert@twinsun.com>
12137
12138 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12139 that of SYM's type. This fixes Debian bug 168069, reported by
12140 Thomas Olsson.
12141
12142 2002-12-28 Paul Eggert <eggert@twinsun.com>
12143
12144 Version 1.75f.
12145
12146 Switch back to the Yacc style of conflict reports, undoing some
12147 of the 2002-07-30 change.
12148 * doc/bison.texinfo (Understanding): Use Yacc style for
12149 conflict reports. Also, use new way of locating rules.
12150 * src/conflicts.c (conflict_report):
12151 Renamed from conflict_report_yacc, removing the old
12152 'conflict_report'. Translate the entire conflict report at once,
12153 so that we don't assume that "," has the same interpretation in
12154 all languages.
12155 (conflicts_output): Use Yacc-style conflict report for each state,
12156 instead of our more-complicated style.
12157 (conflicts_print): Use Yacc-style conflict report, except print
12158 the input file name when not emulating Yacc.
12159 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12160 Conflicted Reduction, %expect not enough, %expect too much,
12161 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12162 * tests/existing.at (GNU Cim Grammar): Likewise.
12163 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12164
12165 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12166 fatal): Don't invoke fflush; it's not needed and it might even be
12167 harmful for stdout, as stdout might not be open.
12168 * src/reduce.c (reduce_print): Likewise.
12169
12170 2002-12-27 Paul Eggert <eggert@twinsun.com>
12171
12172 Fix a bug where error locations were not being recorded correctly.
12173 This problem was originally reported by Paul Hilfinger in
12174 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
12175
12176 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12177 top of the location stack's error locations.
12178 (yyerrlab): Set it. When discarding a token, push its location
12179 onto yylerrsp so that we don't lose track of the error's end.
12180 (yyerrlab1): Now is only the target of YYERROR, so that we can
12181 properly record the location of the action that failed. For GCC
12182 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12183 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12184 (yyerrlab2): New label, which yyerrlab now falls through to.
12185 Compute the error's location by applying YYLLOC_DEFAULT to
12186 the locations of all the symbols that went into the error.
12187 * doc/bison.texinfo (Location Default Action): Mention that
12188 YYLLOC_DEFAULT is also invoked for syntax errors.
12189 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12190 Error locations include the locations of all the tokens that were
12191 discarded, not just the last token.
12192
12193 2002-12-26 Paul Eggert <eggert@twinsun.com>
12194
12195 * src/files.c: Include quote.h.
12196 (compute_output_file_names): Warn if we detect conflicting
12197 outputs to the same file. This should catch the misunderstanding
12198 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12199
12200 * src/conflicts.c (conflicts_print): If the user specifies
12201 "%expect N", report an error if there are any reduce/reduce
12202 conflicts. This is what the manual says should happen.
12203 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12204 * tests/conflicts.at (%expect with reduce conflicts): New test.
12205
12206 Don't use m4_include on relative file names, as it doesn't work as
12207 desired if there happens to be a file with that name under ".".
12208
12209 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12210 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12211 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12212 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12213 * src/output.c (output_skeleton): Use full path names when
12214 specifying a file to include; don't rely on include path, as
12215 it's unreliable when the working file contains a file with
12216 that name.
12217
12218 2002-12-25 Paul Eggert <eggert@twinsun.com>
12219
12220 Remove obsolete references to bison.simple and bison.hairy.
12221 Problem mentioned by Aubin Mahe in
12222 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
12223 * data/glr.c: Comment fix.
12224 * doc/bison.1: Remove references. Also, mention "yacc".
12225
12226 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12227 with -g option.
12228
12229 * src/parse-gram.y (declaration): Use enum "report_states" rather
12230 than its numeric value 1.
12231
12232 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12233 opening a new one. This fixes Debian bug 165349, reported by
12234 Bruce Stephens.
12235
12236 2002-12-24 Paul Eggert <eggert@twinsun.com>
12237
12238 Version 1.75e.
12239
12240 * Makefile.maint (cvs-update): Don't assume that the shell
12241 supports $(...), as Solaris sh doesn't.
12242
12243 * src/parse-gram.y (lloc_default): Remove test for empty
12244 nonterminals at the end, since it didn't change the result.
12245
12246 2002-12-24 Paul Eggert <eggert@twinsun.com>
12247
12248 If the user does not define YYSTYPE as a macro, Bison now declares it
12249 using typedef instead of defining it as a macro. POSIX requires this.
12250 For consistency, YYLTYPE is also declared instead of defined.
12251
12252 %union directives can now have a tag before the `{', e.g., the
12253 directive `%union foo {...}' now generates the C code
12254 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12255 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12256 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12257 instead of `yyltype'.
12258
12259 `yystype' and `yyltype' are now obsolescent macros instead of being
12260 typedefs or tags; they are no longer documented and will be
12261 withdrawn in a future release.
12262
12263 * data/glr.c (b4_location_type): Remove.
12264 (YYSTYPE): Renamed from yystype.
12265 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12266 (struct YYLTYPE): Renamed from struct yyltype.
12267 (YYLTYPE): Renamed from yyltype.
12268 (yyltype, yystype): New (and obsolescent) macros,
12269 for backward compatibility.
12270 * data/yacc.c: Likewise.
12271
12272 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12273 does not specify a union tag. This is for compatibility with
12274 Solaris 9 yacc.
12275
12276 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12277 const *, since it is now modified by stripping surrounding { }.
12278 (current_braced_code): Remove.
12279 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12280 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12281 trailing " {...}". Now of type <chars>.
12282 (grammar_declaration): Adjust to bundled tokens.
12283 (code_content): Remove; stripping is now done by add_param.
12284 (print_token_value): Print contents of bundled tokens.
12285 (token_name): New function.
12286
12287 * src/reader.h (braced_code, current_braced_code): Remove.
12288 (token_name): New decl.
12289
12290 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12291 token_type, not braced_code code_kind. All uses changed.
12292 (SC_PRE_CODE): New state, for scanning after a keyword that
12293 has (or usually has) an immediately-following braced code.
12294 (token_type): New local var, to keep track of which token type
12295 to return when scanning braced code.
12296 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
12297 <INITIAL>"%parse-param", <INITIAL>"%printer",
12298 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12299 instead of returning a token type immediately.
12300 (<INITIAL>"{"): Set token type.
12301 (<SC_BRACED_CODE>"}"): Use it.
12302 (handle_action_dollar, handle_action_at): Now returns bool
12303 indicating success. Fail if ! current_rule; this prevents a core dump.
12304 (handle_symbol_code_dollar, handle_symbol_code_at):
12305 Remove; merge body into caller.
12306 (handle_dollar, handle_at): Complain in invalid contexts.
12307
12308 * NEWS, doc/bison.texinfo: Document the above.
12309 * NEWS: Fix years and program names in copyright notice.
12310
12311 2002-12-17 Paul Eggert <eggert@twinsun.com>
12312
12313 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12314 Reporting, Table of Symbols): Omit mentions of %lex-param and
12315 %parse-param from the documentation for now.
12316
12317 2002-12-15 Paul Eggert <eggert@twinsun.com>
12318
12319 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12320 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12321 lookahead symbol, and which sets yychar in parser actions) and it
12322 disagreed with the Bison documentation. Bug
12323 reported by Andrew Walrond.
12324
12325 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12326 as the caller now does that.
12327 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12328 (YYEMPTY): Parenthesize right hand side, since others use it.
12329 (yyparse): Don't assume that our generated code is the only code
12330 that sets yychar.
12331
12332 2002-12-13 Paul Eggert <eggert@twinsun.com>
12333
12334 Version 1.75d.
12335
12336 POSIX requires a "yacc" command.
12337 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12338 (MOSTLYCLEANFILES): Add yacc.
12339 (yacc): New rule.
12340 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
12341 as an alias for bison y.
12342
12343 * po/LINGUAS: Add da.
12344
12345 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12346 problem with latest <getopt.h>.
12347 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12348
12349 * doc/fdl.texi: Upgrade to 1.2.
12350 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12351 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12352 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12353 gnulib.
12354 * config/install-sh: Sync with autotools.
12355
12356 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
12357 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
12358 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
12359 locations are requested.
12360 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
12361 locations are requested.
12362
12363 2002-12-12 Paul Eggert <eggert@twinsun.com>
12364
12365 Remove unportable casts and storage allocation tricks.
12366 While we're at it, remove almost all casts, since they
12367 usually aren't needed and are a sign of trouble.
12368
12369 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
12370
12371 * src/derives.c (derives_compute): Do not subtract NTOKENS from
12372 the pointer DSET returned by malloc; this isn't portable.
12373 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
12374 Similarly for DERIVES.
12375 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
12376 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
12377 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
12378
12379 * src/derives.c (derives_compute): Do not bother invoking
12380 int_of_rule_number, since rule numbers are integers.
12381
12382 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
12383 rather than XMALLOC (char, N).
12384
12385 * src/files.c (filename_split): Rewrite to avoid cast.
12386
12387 * src/gram.h (symbol_number_as_item_number,
12388 item_number_as_symbol_number, rule_number_as_item_number,
12389 item_number_as_rule_number):
12390 Now inline functions rather than macros, to avoid casts.
12391 * src/state.h (state_number_as_int): Likewise.
12392 * src/tables.c (state_number_to_vector_number,
12393 symbol_number_to_vector_number): Likewise.
12394
12395 * src/gram.h (int_of_rule_number): Remove; no longer used.
12396
12397 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
12398 since the resulting storage is always stored into.
12399
12400 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
12401 where it's needed.
12402
12403 * src/muscle_tab.c (muscle_m4_output):
12404 Now inline. Return bool, not int.
12405 * src/state.c (state_compare): Likewise.
12406 * src/symtab.c (symbol_check_defined,
12407 symbol_check_alias_consistency, symbol_pack, symbol_translation,
12408 hash_compare_symbol, hash_symbol):
12409 Likewise.
12410 * src/uniqstr.c (uniqstr_print): Likewise.
12411 * src/muscle_tab.c (muscle_m4_output_processor):
12412 New function, to avoid casts.
12413 * src/state.c (state_comparator, stage_hasher): Likewise.
12414 * src/symtab.c (symbol_check_defined_processor,
12415 symbol_check_alias_consistency_processor, symbol_pack_processor,
12416 symbol_translation_processor, hash_symbol_comparator,
12417 hash_symbol_hasher): Likewise.
12418 * src/uniqstr.c (uniqstr_print_processor): Likewise.
12419 * src/muscle_tab.c (muscles_m4_output):
12420 Use new functions instead of casting old functions unportably.
12421 * src/state.c (state_hash_new): Likewise.
12422 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
12423 symbols_token_translations_init):
12424 Likewise.
12425 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
12426
12427 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
12428 var instead of casting to long, to avoid casts.
12429 (prepare_states): Use MALLOC rather than alloca, so that we don't
12430 have to worry about alloca.
12431 * src/state.c (state_hash_lookup): Likewise.
12432
12433 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
12434 local var instead of casting to unsigned char, to avoid casts.
12435
12436 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
12437 STATE_ALLOC): Remove.
12438 (transitions_new, errs_new, reductions_new, state_new): Use malloc
12439 rather than calloc, and use offsetof to avoid allocating slightly
12440 too much storage.
12441 (state_new): Initialize all members.
12442
12443 * src/state.c (state_hash): Use unsigned accumulator, not signed.
12444
12445 * src/symtab.c (symbol_free): Remove; unused.
12446 (symbol_get): Remove cast in lhs of assignment.
12447 (symbols_do): Now static. Accept generic arguments, not
12448 hashing-related ones.
12449
12450 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
12451 (symbol_processor): Remove.
12452 (symbols_do): Remove decl; now static.
12453
12454 * src/system.h (alloca): Remove; decl no longer needed.
12455 (<stddef.h>): Include, for offsetof.
12456 (<inttypes.>, <stdint.h>): Include if available.
12457 (uintptr_t): New type, if system lacks it.
12458 (CALLOC, MALLOC, REALLOC): New macros.
12459 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
12460 new macros.
12461
12462 * src/tables.c (table_size): Now int, to pacify GCC.
12463 (table_grow, table_ninf_remap): Use signed table size.
12464 (save_row): Don't bother initializing locals when not needed.
12465 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
12466 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
12467
12468 * src/vcg.h: Correct misspellings.
12469
12470 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
12471
12472
12473 * src/getargs.c (getargs): Don't assume EOF == -1.
12474
12475 2002-12-09 Paul Eggert <eggert@twinsun.com>
12476
12477 Change identifier spellings to avoid collisions with names
12478 that are reserved by POSIX.
12479
12480 Don't use names ending in _t, since POSIX reserves them.
12481 For consistency, remove _e and _s endings -- they're weren't
12482 needed to remove ambiguity. All uses changed.
12483 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
12484 turn was just renamed from struniq_t.
12485 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
12486 which in turn was just renamed from struniq_processor_t.
12487 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
12488 in turn was renamed from hash_compare_struniq_t.
12489 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
12490 (state_list): Renamed from state_list_t.
12491 * src/assoc.h (assoc): Renamed from assoc_t.
12492 * src/conflicts.c (enum conflict_resolution): Renamed from
12493 enum conflict_resolution_e.
12494 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
12495 (rule_list): Renamed from rule_list_t.
12496 * src/getargs.h (enum trace): Renamed from enum trace_e.
12497 (enum report): Renamed from enum report_e.
12498 * src/gram.h (item_number): Renamed from item_number_t.
12499 (rule_number): Renamed from rule_number_t.
12500 (struct rule_s): Remove the "rule_s" part; not used.
12501 (rule): Renamed from rule_t.
12502 (rule_filter): Renamed from rule_filter_t.
12503 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
12504 (goto_list): Renamed from goto_list_t.
12505 * src/lalr.h (goto_number): Renamed from goto_number_t.
12506 * src/location.h (location): Renamed from location_t.
12507 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
12508 and moved here from:
12509 * src/muscle_tab.h (muscle_entry_t): here.
12510 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
12511 (rule_list): Renamed from rule_list_t.
12512 * src/print_graph.c (static_graph): Renamed from graph.
12513 * src/reader.h (braced_code): Renamed from braced_code_t.
12514 Remove brace_code_e tag.
12515 * src/relation.h (relation_node): Renamed from relation_node_t.
12516 (relation_nodes): Renamed from relation_nodes_t.
12517 (relation): Renamed from relation_t.
12518 * src/state.h (state_number): Renamed from state_number_t.
12519 (struct state): Renamed from struct state_s.
12520 (state): Renamed from state_t.
12521 (transitions): Renamed from transitions_t. Unused (and
12522 misspelled) transtion_s tag removed.
12523 (errs): Renamed from errs_t. Unused errs_s tag removed.
12524 (reductions): Renamed from reductions_t. Unused tag
12525 reductions_s removed.
12526 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
12527 (struct symbol_list): Renamed from struct symbol_list_s.
12528 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
12529 (struct symbol): Renamed from struct symbol_s.
12530 (symbol): Renamed from symbol_t.
12531 * src/tables.c (vector_number): Renamed from vector_number_t.
12532 (action_number): Renamed from action_t.
12533 * src/tables.h (base_number): Renamed from base_t.
12534 * src/vcg.h (enum color): Renamed from enum color_e.
12535 (enum textmode): Renamed from enum textmode_e.
12536 (enum shape): Renamed from enum shape_e.
12537 (struct colorentry): Renamed from struct colorentry_s.
12538 (struct classname): Renamed from struct classname_s.
12539 (struct infoname): Renamed from struct infoname_s.
12540 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
12541 (enum decision): Renamed from enum decision_e.
12542 (enum orientation): Renamed from enum orientation_e.
12543 (enum alignment): Renamed from enum alignment_e.
12544 (enum arrow_mode): Renamed from enum arrow_mode_e.
12545 (enum crossing_type): Renamed from enum crossing_type_e.
12546 (enum view): Renamed from enum view_e.
12547 (struct node): Renamed from struct node_s.
12548 (node): Renamed from node_t.
12549 (enum linestyle): Renamed from enum linestyle_e.
12550 (enum arrowstyle): Renamed from enum arrowstyle_e.
12551 (struct edge): Renamed from struct edge.
12552 (edge): Renamed from edge_t.
12553 (struct graph): Renamed from struct graph_s.
12554 (graph): Renamed from graph_t.
12555 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
12556 Rename value_t -> value.
12557 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
12558 value_t_as_yystype -> value_as_yystype.
12559
12560 Don't include <errno.h> in the mainstream code, since it
12561 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
12562 * lib/get-errno.c, lib/get-errno.h: New files.
12563 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
12564 get-errno.c.
12565 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
12566 * src/output.c (output_skeleton): Likewise.
12567 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
12568 instead of errno.
12569 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
12570 Likewise.
12571 (handle_action_dollar, handle_action_at): Likewise.
12572 * src/system.h: Do not include <errno.h>.
12573 (TAB_EXT): Renamed from EXT_TAB.
12574 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
12575
12576 Avoid str[a-z]*, since <string.h> reserves that name space.
12577 Change all instances of "struniq" in names to "uniqstr", and
12578 likewise for "STRUNIQ" and "UNIQSTR".
12579 * src/uniqstr.c: Renamed from src/struniq.c.
12580 * src/uniqstr.h: Renamed from src/struniq.h.
12581 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
12582 * src/files.c (strsuffix): Remove; unused.
12583 (concat2): Renamed from stringappend. Now static.
12584 * src/files.h (strsuffix, stringappend): Remove; unused.
12585 * src/parse-gram.y (<chars>): Renamed from <string>.
12586 (<uniqstr>): Renamed from <struniq>.
12587 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
12588 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
12589 (struct graph_s.expand): Renamed from struct graph_s.stretch.
12590 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
12591 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
12592 (N_EXPAND): Renamed from N_STRETCH.
12593
12594 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
12595 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
12596 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
12597 Remove; unused.
12598 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
12599 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
12600 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
12601 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
12602 (BASE_MAXIMUM): Renamed from BASE_MAX.
12603 (BASE_MINIMUM): Renamed from BASE_MIN.
12604 (ACTION_MAX): Remove; unused.
12605 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
12606 Unnecessary casts removed from above defines.
12607
12608
12609 Fix misspelling in names.
12610 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
12611 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
12612 G_NODE_ALIGNEMENT.
12613
12614
12615 * lib/timevar.c (timevar_report): Renamed from time_report,
12616 for consistency with other names.
12617 * lib/timevar.h (timevar_report): New decl.
12618 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
12619
12620
12621 Sort include-file uses.
12622
12623 Reorder all include files under src to be in the order "system.h".
12624 then the ../lib include files in angle brackets (alphabetized),
12625 then the . include files in double-quotes (alphabetized). Fix
12626 dependency breakages encountered in this process, as follows:
12627 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
12628 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
12629 * src/state.h: Include "symtab.h".
12630
12631 2002-12-08 Paul Eggert <eggert@twinsun.com>
12632
12633 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
12634 since this causes problems when __file__ contains character
12635 sequences like "@" that are treated specially by src/scan-skel.l.
12636 Instead, just use the file's basename. This fixes the bug
12637 reported by Martin Mokrejs in
12638 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
12639
12640 2002-12-06 Paul Eggert <eggert@twinsun.com>
12641
12642 Add support for rules that do not have trailing semicolons, as
12643 POSIX requires. Improve the quality of locations in Bison
12644 diagnostics.
12645
12646 * src/location.c: Include <quotearg.h>.
12647 (empty_location): Now const.
12648 (location_print): New function. Follow the recommendation of the
12649 GNU Coding Standards for locations that span file boundaries.
12650 * src/location.h: Do not include <quotearg.h>; no longer needed.
12651 (boundary): New type.
12652 (location_t): Use it. This allows locations to span file boundaries.
12653 All member uses changed: file -> start.file or end.file (as needed),
12654 first_line -> start.line, first_column -> start.column,
12655 last_line -> end.line, last_column -> end.column.
12656 (equal_boundaries): New function.
12657 (LOCATION_RESET, LOCATION_STEP): Remove.
12658 (LOCATION_PRINT): Remove. All callers changed to use location_print.
12659 (empty_location): Now const.
12660 (location_print): New decl.
12661 * src/parse-gram.y (lloc_default): New function, which handles
12662 empty locations more accurately.
12663 (YYLLOC_DEFAULT): Use it.
12664 (%token COLON): Remove.
12665 (%token ID_COLON): New token.
12666 (rules): Use it.
12667 (declarations, rules): Remove trailing semicolon.
12668 (declaration, rules_or_grammar_declaration):
12669 Allow empty (";") declaration.
12670 (symbol_def): Remove empty actions; no longer needed.
12671 (rules_or_grammar_declaration): Remove trailing semicolon.
12672 (semi_colon.opt): Remove.
12673 * src/reader.h: Include location.h.
12674 (scanner_cursor): New decl.
12675 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
12676 rolling our own.
12677 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
12678 of *loc.
12679 (STEP): Remove. No longer needed, now that adjust_location does
12680 the work. All uses removed.
12681 (scanner_cursor): New var.
12682 (adjust_location): Renamed from extend_location. It now sets
12683 *loc and adjusts the scanner cursor. All uses changed.
12684 Don't bother testing for CR.
12685 (handle_syncline): Remove location arg; now updates scanner cursor.
12686 All callers changed.
12687 (unexpected_end_of_file): Now accepts start boundary of token or
12688 comment, not location. All callers changed. Update scanner cursor,
12689 not the location.
12690 (SC_AFTER_IDENTIFIER): New state.
12691 (context_state): Renamed from c_context. All uses changed.
12692 (id_loc, code_start, token_start): New local vars.
12693 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
12694 processing of Yacc white space and equivalents here.
12695 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
12696 instead of returning ID immediately, since we need to search for
12697 a subsequent colon.
12698 (<INITIAL>"'", "\""): Save token_start.
12699 (<INITIAL>"%{", "{", "%%"): Save code_start.
12700 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
12701 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
12702 BEGIN context_state at end, not INITIAL.
12703 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
12704 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
12705 Return correct token start.
12706 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
12707 the start of a character, string or multiline comment is found.
12708 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
12709 Reduction): Adjust reported locations to match the more-precise
12710 results now expected.
12711 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
12712 * tests/reduce.at (Useless Rules, Reduced Automaton,
12713 Underivable Rules): Likewise.
12714 * tests/regression.at (Invalid inputs): No longer `expecting ";"
12715 or "|"' now that so many other tokens are allowed by the new grammar.
12716
12717 * src/complain.h (current_file): Remove duplicate decl;
12718 current_file is now owned by files.h.
12719 * src/complain.c, src/scan-gram.l: Include files.h.
12720
12721 2002-12-06 Paul Eggert <eggert@twinsun.com>
12722
12723 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
12724 promotes to int; it might be unsigned int.
12725 * data/yacc.c (yy_reduce_print): Likewise.
12726
12727 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
12728 be #defined in the prologue, not in the Bison declarations.
12729 This fixes Debian Bug 102878, reported by Shaul Karl.
12730
12731 2002-12-02 Paul Eggert <eggert@twinsun.com>
12732
12733 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
12734 * lib/strtoul.c: New file, from gnulib.
12735 This fixes a porting bug reported by Peter Klein in
12736 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
12737
12738 2002-11-30 Paul Eggert <eggert@twinsun.com>
12739
12740 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
12741 and put only a forward declaration in the prologue. This is for
12742 consistency with the other scanner helper functions.
12743
12744 Type clashes now generate warnings, not errors, since it
12745 appears that POSIX may allow some grammars with type clashes.
12746 * src/reader.c (grammar_current_rule_check): Warn about
12747 type clashes instead of complaining.
12748 * tests/input.at (Type Clashes): Expect warnings, not complaints.
12749
12750 Add Yacc library, since POSIX requires it.
12751 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
12752 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
12753 * lib/main.c, lib/yyerror.c: New files.
12754
12755 gram_error can be static; it need not be extern.
12756 * src/reader.h (gram_error): Remove decl.
12757 * src/parse-gram.y (gram_error): Now static. Add static decl.
12758 (print_token_value): Omit parameter names from forward decl,
12759 for consistency.
12760
12761 2002-11-29 Paul Eggert <eggert@twinsun.com>
12762
12763 * doc/bison.texinfo: Emphasize that yylex and yyerror must
12764 be declared before being used. E.g., one should typically
12765 declare them in the prologue. Use GNU coding style in examples.
12766 Put "const" consistently after the type it modifies. Mention
12767 that C99 supports "inline". Mention that yyerror traditionally
12768 returns "int".
12769
12770 %parse-param and %lex-param now take just one argument, the
12771 declaration; the argument name is deduced from the declaration.
12772
12773 * doc/bison.texinfo (Parser Function, Pure Calling, Error
12774 Reporting, Table of Symbols): Document this.
12775 * src/parse-gram.y (add_param): New function.
12776 (COMMA): Remove.
12777 (declaration): Implement new rule for %parse-param and %lex-param.
12778 * src/scan-gram.l: "," now elicits a warning, rather than being
12779 a token; this is more compatible with byacc.
12780 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
12781
12782 2002-11-27 Paul Eggert <eggert@twinsun.com>
12783
12784 Rename identifiers to avoid real and potential collisions.
12785
12786 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
12787 to avoid collision with lex macro described by Bruce Lilly in
12788 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
12789 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
12790 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
12791 * src/parse-gram.y (print_token_value): Renamed from yyprint.
12792 All uses changed.
12793 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
12794 The name "yycontrol" violates the name space rules, and this stuff
12795 wasn't being used anyway.
12796 (input): Remove action; this stuff wasn't being used.
12797 (gram_error): Rename local variable yylloc -> loc.
12798 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
12799 (YY_DECL): Don't use "yy" at start of local variables.
12800 All uses changed, e.g., yylloc -> loc.
12801 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
12802 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
12803 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
12804 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
12805
12806 * src/parse-gram.y (gram_error): loc is now const *.
12807 * src/reader.h (gram_error): Likewise.
12808
12809 2002-11-24 Paul Eggert <eggert@twinsun.com>
12810
12811 Version 1.75c.
12812
12813 * tests/actions.at (Actions after errors): Use an output format
12814 more similar to that of the Printers and Destructors test.
12815 Test the position of the ';' token too.
12816 (Printers and Destructors): Likewise.
12817 (Printers and Destructors: %glr-parser): Remove for now, to avoid
12818 unnecessarily alarming people when the test fails.
12819
12820 * data/yacc.c (yyerrlab1): Move this label down, so that the
12821 parser does not discard the lookahead token if the user code
12822 invokes YYERROR. This change is required for POSIX conformance.
12823
12824 * lib/error.c: Sync with gnulib.
12825
12826 2002-11-22 Paul Eggert <eggert@twinsun.com>
12827
12828 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
12829 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
12830 * lib/xmalloc.c: Likewise.
12831
12832 2002-11-20 Paul Eggert <eggert@twinsun.com>
12833
12834 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
12835
12836 2002-11-20 Paul Eggert <eggert@twinsun.com>
12837
12838 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
12839 should use `if (! x) abort ();' rather than `assert (x);', and
12840 anyway it's one less thing to worry about configuring.
12841
12842 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
12843 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
12844 and replace all instances of assert with abort.
12845 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
12846 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
12847
12848 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
12849 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
12850 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
12851 hash_find_entry, hash_rehash, hash_insert): Likewise.
12852 * src/conflicts.c (resolve_sr_conflict): Likewise.
12853 * src/lalr.c (set_goto_map, map_goto): Likewise.
12854 * src/nullable.c (nullable_compute): Likewise.
12855 * src/output.c (prepare_rules, token_definitions_output): Likewise.
12856 * src/reader.c (packgram, reader): Likewise.
12857 * src/state.c (state_new, state_free, state_transitions_set,
12858 state_reduction_find): Likewise.
12859 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
12860 symbol_pack): Likewise.
12861 * src/tables.c (conflict_row, pack_vector): Likewise.
12862 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12863 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12864 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
12865 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
12866
12867 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
12868 (ARGMATCH_CONSTRAINT): New macro.
12869 (ARGMATCH_ASSERT): Use it.
12870
12871 * src/system.h (verify): New macro.
12872 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
12873 rather than assert.
12874 * src/tables.c (tables_generate): Likewise.
12875
12876 * src/struniq.c (struniq_assert): Now returns void, and aborts
12877 if the assertion is false.
12878 (struniq_assert_p): Remove.
12879 * src/struniq.h: Likewise.
12880
12881 2002-11-18 Paul Eggert <eggert@twinsun.com>
12882
12883 * data/glr.c (yygetLRActions): Replace `yyindex' with
12884 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
12885 This fixes the regression with Sun ONE Studio 7 cc that I reported in
12886 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
12887
12888 2002-11-18 Akim Demaille <akim@epita.fr>
12889
12890 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
12891 space.
12892 From Tim Van Holder.
12893
12894 2002-11-17 Paul Eggert <eggert@twinsun.com>
12895
12896 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
12897 to "SyntaxError" for consistency with my 2002-11-15 change.
12898
12899 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
12900 not define to {}, since this breaks the common use of `YYDPRINTF
12901 ((...));' if a single statement is desired (e.g. before `else').
12902 Work around GCC warnings by surrounding corresponding calls with
12903 {} if needed.
12904 (yyhasResolvedValue): Remove unused function.
12905 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
12906 loop body.
12907 (yyreportSyntaxError): Renamed from yyreportParseError.
12908 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
12909 All uses changed.
12910 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
12911 extern when possible. Remove unused initializations.
12912
12913 2002-11-16 Akim Demaille <akim@epita.fr>
12914
12915 Augment the similarity between GLR and LALR traces.
12916
12917 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
12918 (YY_REDUCE_PRINT): New.
12919 (yyparse): Use them.
12920 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
12921 YYDPRINT here.
12922 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
12923 state reached after the reduction/recovery, since...
12924 (yyparse, yyprocessOneStack): Report the state we are entering in.
12925
12926 2002-11-16 Akim Demaille <akim@epita.fr>
12927
12928 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
12929 Add support for --trace=skeleton.
12930 * src/scan-skel.l: %option debug.
12931 Scan strings of non-@ or \n instead of character by character.
12932 (scan_skel): Handle trace_skeleton.
12933 (QPUTS): New.
12934 (@output_parser_name@, @output_header_name@): ``Restore'' their
12935 support (used to be M4 macros).
12936 * data/yacc.c: Quote larger chunks, a la glr.c.
12937 * data/lalr1.cc: Likewise.
12938 The header guards are no longer available, so use some other
12939 string than `YYLSP_NEEDED'.
12940
12941 2002-11-16 Akim Demaille <akim@epita.fr>
12942
12943 Make the ``Printers and Destructors'' test more verbose, taking
12944 `yacc.c''s behavior as (possibly wrong) reference.
12945
12946 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
12947 instead of fprint on stdout.
12948 Set and report the last_line of the symbols.
12949 Consistently display values and locations.
12950
12951 2002-11-16 Paul Eggert <eggert@twinsun.com>
12952
12953 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
12954
12955 2002-11-15 Paul Eggert <eggert@twinsun.com>
12956
12957 * tests/actions.at (Actions after errors): New test case.
12958
12959 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
12960 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
12961 tests/action.at, tests/calc.at, tests/conflicts.at,
12962 tests/cxx-type.at, tests/regression.at:
12963 "parse error" -> "syntax error" for POSIX compatibility.
12964 "parsing stack overflow..." -> "parser stack overflow" so
12965 that code matches Bison documentation.
12966
12967 2002-11-15 Akim Demaille <akim@epita.fr>
12968
12969 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
12970 take two BRACED_CODE, not two string_content.
12971 Free the scanner's obstack when we are done.
12972 (code_content): New.
12973 * tests/calc.at: Adjust.
12974 * doc/bison.texinfo: Adjust.
12975 Also, make sure to include the `,' for these declarations.
12976
12977 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
12978
12979 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
12980 definition; avoids potential autoreconf problems.
12981
12982 2002-11-15 Akim Demaille <akim@epita.fr>
12983
12984 Always check the value returned by yyparse.
12985
12986 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
12987 returned by yyparse.
12988 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
12989 Adjust calls.
12990 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
12991 returned by yyparse.
12992
12993 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12994
12995 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
12996 on input.at test.
12997
12998 2002-11-14 Paul Eggert <eggert@twinsun.com>
12999
13000 * src/output.c (output_skeleton): Call xfopen instead of
13001 duplicating xfopen's body.
13002
13003 Fix bugs reported by Nelson H. F. Beebe in
13004 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
13005
13006 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13007 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13008 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13009 file twice in the grammar, as an extra check.
13010
13011 * tests/input.at (Torturing the Scanner): Surround the
13012 backslash-newline tests with "#if 0", to make it less likely that
13013 we'll run into compiler bugs. Bring back solitary \ inside
13014 comment, but add a closing comment to work around HP C bug. Don't
13015 test backslash-newline in C character constant.
13016
13017 2002-11-14 Akim Demaille <akim@epita.fr>
13018
13019 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13020 status of the compiler.
13021 Calling `exit 1' is no longer needed.
13022 Reported by Nelson H. F. Beebe.
13023
13024 2002-11-14 Akim Demaille <akim@epita.fr>
13025
13026 * tests/atlocal.in (CPPFLAGS): We have config.h.
13027 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13028 New.
13029 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13030 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13031 * tests/regression.at, tests/torture.at: Use them for all the
13032 grammars that are to be compiled.
13033 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13034 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13035 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13036
13037 2002-11-14 Akim Demaille <akim@epita.fr>
13038
13039 * doc/bison.texinfo: Various formatting changes (alignments in
13040 samples, additional @group/@end group, GCS in samples.
13041 Use @deffn instead of simple @table to define the directives,
13042 macros, variables etc.
13043
13044 2002-11-13 Paul Eggert <eggert@twinsun.com>
13045
13046 Fix some bugs reported by Albert Chin-A-Young in
13047 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
13048
13049 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
13050 -o c"; the HP C compiler chatters during compilation.
13051 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13052 * tests/headers.at (export YYLTYPE): Likewise.
13053
13054 * tests/input.at (Torturing the Scanner): Remove lines containing
13055 solitary backslashes, as they tickle a bug in the HP C compiler.
13056
13057 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13058 comments, since they're not portable. Use GNU coding style.
13059
13060 2002-11-13 Akim Demaille <akim@epita.fr>
13061
13062 * data/yacc.c: Leave bigger chunks of quoted text.
13063 (YYDSYMPRINTF): New.
13064 Use it to report symbol activities.
13065 * data/glr.c (YYDSYMPRINTF): New.
13066 Use it.
13067
13068 2002-11-12 Paul Eggert <eggert@twinsun.com>
13069
13070 Version 1.75b.
13071
13072 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13073 (yyglrReduce): Return yyok, not 0.
13074 This should avoid the enumerated-type warnings reported
13075 by Nelson H. F. Beebe in
13076 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
13077
13078 * lib/bbitset.h (BITSET_INLINE): Remove.
13079 * lib/bitset.h [! BITSET_INLINE]: Remove.
13080 (bitset_set, bitset_reset, bitset_test): Rename local vars
13081 to avoid shadowing warnings by GCC.
13082
13083 * data/glr.c (inline): Remove #define. It's the user's
13084 responsibility to #define it away, just like 'const'.
13085 This fixes one of the bugs reported by Nelson H. F. Beebe in
13086 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
13087
13088 * Makefile.maint (po-check): Scan .l and .y files instead of the
13089 .c and the .h files that they generate. This fixes the bug
13090 reported by Tim Van Holder in:
13091 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
13092 Look for N_ as well as for _. Try to avoid matching #define for
13093 N_ and _.
13094 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13095 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13096 * src/scan-gram.l: Revamp regular expressions so that " and '
13097 do not confuse xgettext.
13098
13099 * src/struniq.h (struniq_new): Do not declare the return type
13100 to be 'const'; this violates the C standard.
13101 * src/struniq.c (struniq_new): Likewise.
13102
13103 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13104
13105 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13106 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13107 linker.
13108
13109 2002-11-12 Akim Demaille <akim@epita.fr>
13110
13111 * Makefile.maint: Sync with Autoconf:
13112 (local_updates): New.
13113
13114 2002-11-12 Akim Demaille <akim@epita.fr>
13115
13116 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13117
13118 2002-11-12 Akim Demaille <akim@epita.fr>
13119
13120 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13121 locations.
13122
13123 2002-11-12 Akim Demaille <akim@epita.fr>
13124
13125 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13126 not yyvalue.
13127
13128 2002-11-12 Akim Demaille <akim@epita.fr>
13129
13130 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13131 Use it to test the GLR parser.
13132
13133 2002-11-12 Akim Demaille <akim@epita.fr>
13134
13135 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13136 defines it.
13137 * data/glr.c (yystos): New.
13138 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13139 (YYDSYMPRINT): New.
13140 (yyval): Don't define it, it is handled via M4.
13141 (yyrecoverParseError): Free verbosely the discarded symbols.
13142 * data/yacc.c (yysymprint): Remove, rather...
13143 (b4_yysymprint_generate): invoke.
13144 * data/c.m4 (b4_yysymprint_generate): New.
13145 Accept pointers as arguments, as opposed to the version from
13146 yacc.c.
13147 (b4_yydestruct_generate): Likewise.
13148 * tests/cations.at (Printers and Destructors): Use Bison directives
13149 instead of CPP macros.
13150 Don't rely on internal details.
13151
13152 2002-11-12 Akim Demaille <akim@epita.fr>
13153
13154 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13155 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13156 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13157 it against YYEMPTY and so forth), work on yytoken (i.e., set
13158 it to YYEMPTY etc.).
13159 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13160 (b4_symbol_actions): Remove.
13161 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13162 for 0, end-of-input.
13163
13164 2002-11-12 Akim Demaille <akim@epita.fr>
13165
13166 * doc/bison.texinfo (Destructor Decl): New.
13167
13168 2002-11-12 Akim Demaille <akim@epita.fr>
13169
13170 * src/tables.c (tables_generate): Use free for pointers that
13171 cannot be NULL, not XFREE.
13172 (pack_vector): Use assert, not fatal, for bound violations.
13173 * src/state.c (state_new): Likewise.
13174 * src/reader.c (reader): Likewise.
13175 * src/lalr.c (set_goto_map): Likewise.
13176 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
13177 the file name.
13178
13179 2002-11-12 Akim Demaille <akim@epita.fr>
13180
13181 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13182 Restore.
13183 * src/scan-gram.l (last_string): Is global to the file, not to
13184 yylex.
13185 * src/parse-gram.y (input): Don't append the epilogue here,
13186 (epilogue.opt): do it here, and free the scanner's obstack.
13187 * src/reader.c (epilogue_set): Rename as...
13188 (epilogue_augment): this.
13189 * data/c.m4 (b4_epilogue): Defaults to empty.
13190
13191 2002-11-12 Akim Demaille <akim@epita.fr>
13192
13193 * src/getargs.c (long_options): Remove duplicates.
13194 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13195 Remove.
13196 * doc/bison.rnh: Remove.
13197 * doc/bison.texinfo (VMS Invocation): Remove.
13198
13199 2002-11-12 Akim Demaille <akim@epita.fr>
13200
13201 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13202 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13203
13204 Use struniq for symbols.
13205
13206 * src/symtab.h (symbol_t): The tag member is a struniq.
13207 (symbol_type_set): Adjust.
13208 * src/symtab.c (symbol_new): Takes a struniq.
13209 (symbol_free): Don't free the tag member.
13210 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13211 (hash_compare_symbol, hash_symbol): these.
13212 Use the fact that tags as struniqs.
13213 (symbol_get): Use struniq_new.
13214 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13215 Returns a strniq.
13216 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13217 and type members are struniqs.
13218 * src/reader.c (get_merge_function)
13219 (grammar_current_rule_merge_set): Adjust.
13220 (TYPE, current_type): Are struniq.
13221
13222 Use struniq for file names.
13223
13224 * src/files.h, src/files.c (infile): Split into...
13225 (grammar_file, current_file): these.
13226 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13227 * src/reduce.c (reduce_print): Likewise.
13228 * src/getargs.c (getargs): Likewise.
13229 * src/complain.h, src/complain.c: Likewise.
13230 * src/main.c (main): Call struniqs_new early enough to use it for
13231 file names.
13232 Don't free the input file name.
13233
13234 2002-11-12 Akim Demaille <akim@epita.fr>
13235
13236 * src/symtab.c (symbol_free): Remove dead deactivated code:
13237 type_name are properly removed.
13238 Don't use XFREE to free items that cannot be NULL.
13239 * src/struniq.h, src/struniq.c: New.
13240 * src/main.c (main): Initialize/free struniqs.
13241 * src/parse-gram.y (%union): Add astruniq member.
13242 (yyprint): Adjust.
13243 * src/scan-gram.l (<{tag}>): Return a struniq.
13244 Free the obstack bit that used to store it.
13245 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13246
13247 2002-11-11 Paul Eggert <eggert@twinsun.com>
13248
13249 Revamp to fix many (but not all) of the C- and M4-related quoting
13250 problems. Among other things, this fixes the Bison bug reported
13251 by Jan Hubicka when processing the Bash grammar; see:
13252 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
13253
13254 Use new @ escapes consistently. Represent brackets with @{ and @}
13255 rather than @<:@ and @:>@, since this works a bit better with dumb
13256 editors like vi. Represent @ with @@, since @ is now consistently
13257 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13258 __ofile__, to avoid unexpected expansions. Similarly, use @output
13259 rather than #output.
13260
13261 * data/c.m4 (b4_copyright): Omit file name from comment, since
13262 the file name could contain "*/".
13263 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13264 be quoted. All uses changed.
13265
13266 * data/glr.c: Use new @ escapes consistently.
13267 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13268 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13269 Remove, since they couldn't handle arbitrary characters in file
13270 names.
13271 * data/lalr1.cc: Likewise.
13272 * data/yacc.c: Likewise.
13273
13274 * src/files.c (output_infix): Remove; all uses removed.
13275 * src/files.h: Likewise.
13276
13277 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13278 mishandled funny characters in file names, and anyway it isn't
13279 needed any more.
13280 * data/yacc.c: Likewise.
13281 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13282
13283 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13284 * data/yacc.c: Likewise.
13285
13286 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13287 strings now.
13288 (muscle_init): Quote filename as a C string.
13289 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13290 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13291 * src/output.c (escaped_file_name_output): New function.
13292 (prepare_symbols): Quote tokens for M4.
13293 (prepare): Don't insert output_infix, output_prefix,
13294 output_parser_name, output_header_name; this is now down by scan-skel.
13295 Insert skeleton as a C string.
13296
13297 * src/output.c (user_actions_output, symbol_destructors_output,
13298 symbol_printers_output): Quote filenames for C and M4.
13299 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13300
13301 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13302 escapes other than \\ and \'; this simplifies the code.
13303 (<SC_STRING>): Likewise, for \\ and \".
13304 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13305 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13306 Use new escapes @{ and @} for [ and ].
13307
13308 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13309 them with auto vars.
13310 Switch to new escape scheme, where @ is the escape character uniformly.
13311 Abort if a stray escape character is found. Avoid unbounded input
13312 buffer when parsing non-escaped text.
13313
13314 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13315 __oline__, #output, $@, and @{ do not have unintended meanings.
13316
13317 2002-11-09 Paul Eggert <eggert@twinsun.com>
13318
13319 Fix the test failure due to GCC warnings described in
13320 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
13321 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13322 evaluate to 0 if it's impossible for NINF to be in the respective
13323 table.
13324 (yygetLRActions, yyrecoverParseError): Use them.
13325
13326 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13327 counted in the token inserted at end of file. Now takes
13328 location_t *, not location_t, so that the location can be
13329 adjusted. All uses changed.
13330
13331 * tests/regression.at (Invalid inputs): Adjust wording in
13332 diagnostic to match the new behavior.
13333
13334 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13335 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13336 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13337 abort ();'. This reduces the runtime of the "Many lookaheads"
13338 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13339 GCC 3.2.
13340
13341 2002-11-07 Paul Eggert <eggert@twinsun.com>
13342
13343 * src/parse-gram.y (CHARACTER): Remove unused token.
13344 All uses removed.
13345
13346 * src/scan-gram.l: Remove stack option. We no longer use the
13347 stack, since the stack was never deeper than 1; instead, use the
13348 new auto var c_context to record the stacked value.
13349
13350 Remove nounput option. At an unexpected end of file, we now unput
13351 the minimal input necessary to end cleanly; this simplifies the
13352 code.
13353
13354 Avoid unbounded token sizes where this is easy.
13355
13356 (unexpected_end_of_file): New function.
13357 Use it to systematize the error message on unexpected EOF.
13358 (last-string): Now auto, not static.
13359 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
13360 (scanner_last_string_free): Remove; not used.
13361 (percent_percent_count): Move decl to just before use.
13362 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
13363 not the (never otherwised-used) CHARACTER.
13364
13365 2002-11-07 Akim Demaille <akim@epita.fr>
13366
13367 Let yyerror always receive the msg as last argument, so that
13368 yyerror can be variadic.
13369
13370 * data/yacc.c (b4_yyerror_args): New.
13371 Use it when calling yyerror.
13372 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
13373 Use it when calling yyerror.
13374 * doc/bison.texinfo (Error Reporting): Adjust.
13375 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
13376 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
13377
13378 2002-11-06 Akim Demaille <akim@epita.fr>
13379
13380 #line should have quoted strings.
13381 Ideally, this should be done by m4_quotearg.
13382
13383 * src/scan-skel.l: Include quotearg.h.
13384 Quote __ofile__.
13385 * src/output.c (symbol_printers_output)
13386 (symbol_destructors_output): Quote the file name.
13387
13388 2002-11-06 Akim Demaille <akim@epita.fr>
13389
13390 * tests/regression.at (Invalid inputs): Adjust to the recent
13391 messages.
13392
13393 2002-11-06 Akim Demaille <akim@epita.fr>
13394
13395 Restore --no-lines.
13396 Reported by Jim Kent.
13397
13398 * data/c.m4 (b4_syncline): New.
13399 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
13400 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
13401 * src/output.c (user_actions_output): Likewise.
13402 (prepare): Define 'b4_synclines_flag'.
13403 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
13404
13405 2002-11-06 Akim Demaille <akim@epita.fr>
13406
13407 * src/main.c (main): Free `infile'.
13408 * src/scan-gram.l (handle_syncline): New.
13409 Recognize `#line'.
13410 * src/output.c (user_actions_output, symbol_destructors_output)
13411 (symbol_printers_output): Use the location's file name, not
13412 infile.
13413 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13414
13415 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13416
13417 * src/tables.c (matching_state): Don't allow states to match if
13418 either has GLR conflict entries.
13419
13420 2002-11-05 Paul Eggert <eggert@twinsun.com>
13421
13422 * src/scan-gram.l: Use more accurate diagnostics, e.g.
13423 "integer out of range" rather than "invalid value".
13424 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
13425 accordingly.
13426
13427 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
13428 Also, remove one static variable in the scanner.
13429
13430 * src/scan-gram.l (braces_level): Now auto, not static.
13431 Initialize to zero if the compiler is being picky.
13432 (INITIAL): Clear braces_level instead of incrementing it.
13433 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
13434 as POSIX 1003.1-2001 requires.
13435 * src/system.h (IF_LINT): New macro, taken from coreutils.
13436 * configure.ac: Define "lint" if --enable-gcc-warnings.
13437
13438 2002-11-05 Akim Demaille <akim@epita.fr>
13439
13440 * src/scan-gram.l: When it starts with `%', complain about the
13441 whole directive, not just that `invalid character: %'.
13442
13443 2002-11-04 Akim Demaille <akim@epita.fr>
13444
13445 * Makefile.maint: Update from Autoconf.
13446 (update, cvs-update, po-update, do-po-update): New.
13447
13448 2002-11-04 Akim Demaille <akim@epita.fr>
13449
13450 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
13451 and yyerror.
13452 Have yyerror `use' its arguments.
13453 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
13454 returns true when location & yacc & pure & parse-param.
13455 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
13456
13457 2002-11-04 Akim Demaille <akim@epita.fr>
13458
13459 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
13460 clashes.
13461 * src/scan-gram.l: Use [\'] instead of ['] to pacify
13462 font-lock-mode.
13463 Use complain_at.
13464 Use quote, not quote_n since LOCATION_PRINT no longer uses the
13465 slot 0.
13466
13467 2002-11-03 Paul Eggert <eggert@twinsun.com>
13468
13469 * src/reader.c (get_merge_function, grammar_current_rule_check):
13470 Use consistent diagnostics for reporting type name clashes.
13471 Quote the types with <>, for consistency with Yacc.
13472 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
13473
13474 2002-11-03 Akim Demaille <akim@epita.fr>
13475
13476 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
13477 New.
13478 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
13479 (b4_parse_param): Remove.
13480 Use b4_identification.
13481 Propagate b4_pure_args where needed to pass them to yyerror.
13482 * data/glr.m4 (b4_parse_param): Remove.
13483 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
13484 (b4_lpure_formals): New.
13485 Use b4_identification.
13486 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
13487 b4_user_formals and b4_user_args.
13488 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
13489 (yyreportAmbiguity): When using a pure parser, also need
13490 the location, and the parse-params.
13491 Adjust callers.
13492 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
13493 When using a pure parser, also need the parse-params.
13494 Adjust callers.
13495 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
13496 (%pure-parser + %parse-param) LALR and GLR parsers.
13497 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
13498 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
13499 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
13500 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
13501 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
13502 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
13503 * doc/bison.texinfo: Untabify the whole file.
13504 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
13505 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
13506 (Error Reporting): Adjust to these new directives.
13507 Document %error-verbose, deprecate YYERROR_VERBOSE.
13508
13509 2002-11-03 Akim Demaille <akim@epita.fr>
13510
13511 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
13512 AT_CHECK_CALC_GLR invocations to use % directives, instead of
13513 command line options.
13514 * tests/cxx-type.at: Formatting changes.
13515
13516 2002-11-03 Paul Eggert <eggert@twinsun.com>
13517
13518 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
13519 to count columns correctly, and to check for invalid inputs.
13520
13521 Use mbsnwidth to count columns correctly. Account for tabs, too.
13522 Include mbswidth.h.
13523 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
13524 (extend_location): New function.
13525 (YY_LINES): Remove.
13526
13527 Handle CRLF in C code rather than in Lex code.
13528 (YY_INPUT): New macro.
13529 (no_cr_read): New function.
13530
13531 Scan UCNs, even though we don't fully handle them yet.
13532 (convert_ucn_to_byte): New function.
13533
13534 Handle backslash-newline correctly in C code.
13535 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
13536 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
13537 all uses changed.
13538 (tag, splice): New EREs. Do not allow NUL or newline in tags.
13539 Use {splice} wherever C allows backslash-newline.
13540 YY_STEP after space, newline, vertical-tab.
13541 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
13542
13543 (letter, id): Don't assume ASCII; e.g., spell out a-z.
13544
13545 ({int}, handle_action_dollar, handle_action_at): Check for integer
13546 overflow.
13547
13548 (YY_STEP): Omit trailing semicolon, so that it's more like C.
13549
13550 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
13551 as well as \000. Check for UCHAR_MAX, not 255.
13552 Allow \x with an arbitrary positive number of digits, as in C.
13553 Check for overflow here.
13554 Allow \? and UCNs, for compatibility with C.
13555
13556 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
13557 with quote slot used by complain_at.
13558
13559 * tests/input.at: Add tests for backslash-newline, m4 quotes
13560 in symbols, long literals, and funny escapes in strings.
13561
13562 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
13563 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
13564 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
13565 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
13566 * m4/mbswidth.m4: New file, from GNU coreutils.
13567
13568 * doc/bison.texinfo (Grammar Outline): Document // comments.
13569 (Symbols): Document that trigraphs have no special meaning in Bison,
13570 nor is backslash-newline allowed.
13571 (Actions): Document that trigraphs have no special meaning.
13572
13573 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
13574 no longer used.
13575
13576 2002-11-02 Paul Eggert <eggert@twinsun.com>
13577
13578 * src/reader.c: Don't include quote.h; not needed.
13579 (get_merge_function): Reword warning to be consistent with
13580 type clash diagnostic in grammar_current_rule_check.
13581
13582 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
13583 bug in trigraph handling.
13584
13585 * src/output.c (prepare_symbols): When printing token names,
13586 escape "[" as "@<:@" and likewise for "]".
13587
13588 * src/system.h (errno): Remove declaration, as we are now
13589 assuming C89 or better, and C89 guarantees errno.
13590
13591 2002-10-30 Paul Eggert <eggert@twinsun.com>
13592
13593 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
13594 Check for close failures.
13595 * src/files.h (xfclose): Return void, not int, since it always
13596 returned zero.
13597 * src/files.c (xfclose): Likewise. Report I/O error if ferror
13598 indicates one.
13599 * src/output.c (output_skeleton): Use xfclose rather than fclose
13600 and ferror. xfclose now checks ferror.
13601
13602 * data/glr.c (YYLEFTMOST_STATE): Remove.
13603 (yyreportTree): Use a stack-based leftmost state. This avoids
13604 our continuing battles with bogus warnings about initializers.
13605
13606 2002-10-30 Akim Demaille <akim@epita.fr>
13607
13608 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
13609 #if.
13610
13611 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13612
13613 * tests/glr-regr1.at: New test for reported regressions.
13614 * tests/testsuite.at: Add glr-regr1.at test.
13615 * tests/Makefile.am: Add glr-regr1.at test.
13616
13617 2002-10-24 Paul Eggert <eggert@twinsun.com>
13618
13619 Version 1.75a.
13620
13621 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
13622 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
13623 we use malloc. Don't assume 'A' through 'Z' are contiguous.
13624 Don't assume strdup exists; POSIX says its an XSI extension.
13625 Check for buffer overflow on input.
13626
13627 2002-10-24 Akim Demaille <akim@epita.fr>
13628
13629 * src/output.c (output_skeleton): Don't disable M4sugar comments
13630 too soon: it results in comments being expanded.
13631 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
13632 first output.
13633
13634 2002-10-24 Akim Demaille <akim@epita.fr>
13635
13636 * data/yacc.c (m4_int_type): New.
13637 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
13638 char' as only yacc.c wants K&R portability.
13639 * data/glr.c (yysigned_char): Remove.
13640 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
13641 Reported by Quoc Peyrot.
13642
13643 2002-10-23 Paul Eggert <eggert@twinsun.com>
13644
13645 * src/main.c (main): With --trace=time, report times even if a
13646 non-fatal error occurs. Formerly, the times were reported in some
13647 such cases but not in others.
13648 * src/reader.c (reader): Just return if a complaint has been issued,
13649 instead of exiting, so that 'main' can report times.
13650
13651 2002-10-22 Akim Demaille <akim@epita.fr>
13652
13653 * src/system.h: Include sys/types.
13654 Reported by Bert Deknuydt.
13655
13656 2002-10-23 Paul Eggert <eggert@twinsun.com>
13657
13658 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
13659 Suggested by Art Haas.
13660
13661 2002-10-22 Paul Eggert <eggert@twinsun.com>
13662
13663 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
13664 decl; not needed any more.
13665 * src/main.c (main): Use return to exit, undoing yesterday's change.
13666 The last OS that we could find where this wouldn't work is
13667 SunOS 3.5, and that's too old to worry about now.
13668
13669 * data/glr.c (struct yyltype): Define members even when not
13670 doing locations. This is more consistent with yacc.c, and it
13671 works around the following bug reports:
13672 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
13673 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
13674
13675 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
13676 @acronym consistently. Standardize on "Yacc" instead of "YACC",
13677 "Algol" instead of "ALGOL". Give a bit more history about BNF.
13678
13679 2002-10-22 Akim Demaille <akim@epita.fr>
13680
13681 * data/README: New.
13682
13683 2002-10-21 Paul Eggert <eggert@twinsun.com>
13684
13685 Be consistent about 'bool'; the old code used an enum in one
13686 module and an int in another, and this violates the C standard.
13687 * m4/stdbool.m4: New file, from coreutils 4.5.3.
13688 * configure.ac (AC_HEADER_STDBOOL): Add.
13689 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
13690 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
13691 * src/symtab.c (hash_compare_symbol_t): Likewise.
13692 * src/system.h (bool, false, true): Use a definition consistent
13693 with ../lib/hash.c. All uses changed.
13694
13695 * src/complain.c (warning_issued): Renamed from warn_message_count,
13696 so that we needn't worry about integer overflow (!).
13697 Now of type bool. All uses changed.
13698 (complaint_issued): Renamed from complain_message_count; likewise.
13699
13700 * src/main.c (main): Use exit to exit with failure.
13701
13702 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
13703 rather than 1 and 0.
13704 * src/main.c (main): Likewise.
13705 * src/getargs.c (getargs): Likewise.
13706 * src/reader.c (reader): Likewise.
13707
13708 * src/getarg.c (getargs): Remove duplicate code for
13709 "Try `bison --help'".
13710
13711 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
13712 What was that "2" for?
13713
13714 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
13715 * src/getargs.c (usage): Likewise.
13716
13717 * src/getargs.c (getargs): When there are too few operands, report
13718 the last one. When there are too many, report the first extra
13719 one. This is how diffutils does it.
13720
13721 2002-10-20 Paul Eggert <eggert@twinsun.com>
13722
13723 Remove K&R vestiges.
13724 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
13725 * src/complain.c (VA_START): Remove. Assume prototypes.
13726 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
13727 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
13728 fatal): Assume prototypes.
13729 * src/complain.h: Assume prototypes.
13730 * src/system.h (PARAMS): Remove.
13731 Include <limits.h> unconditionally, since it's guaranteeed even
13732 for a freestanding C89 compiler.
13733 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
13734 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
13735
13736 2002-10-20 Akim Demaille <akim@epita.fr>
13737
13738 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
13739 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
13740 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
13741 (yyresolveStates, yyresolveAction, yyresolveStack)
13742 (yyprocessOneStack): Use them.
13743 (yy_reduce_print): New.
13744 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
13745
13746 2002-10-20 Akim Demaille <akim@epita.fr>
13747
13748 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
13749 arguments and output `void'.
13750 (b4_c_function): Rename as...
13751 (b4_c_function_def): this.
13752 (b4_c_function_decl, b4_c_ansi_function_def)
13753 (b4_c_ansi_function_decl): New.
13754 Change the interpretation of the arguments: before `int, foo', now
13755 `int foo, foo'.
13756 * data/yacc.c (yyparse): Prototype and define thanks to these.
13757 Adjust b4_c_function_def uses.
13758 * data/glr.c (yyparse): Likewise, but ANSI only.
13759
13760 2002-10-20 Akim Demaille <akim@epita.fr>
13761
13762 * src/output.c (prepare): Move the definition of `tokens_number',
13763 `nterms_number', `undef_token_number', `user_token_number_max'
13764 to...
13765 (prepare_tokens): Here.
13766 (prepare_tokens): Rename as...
13767 (prepare_symbols): this.
13768 (prepare): Move the definition of `rules_number' to...
13769 (prepare_rules): here.
13770 (prepare): Move the definition of `last', `final_state_number',
13771 `states_number' to...
13772 (prepare_states): here.
13773 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
13774
13775 2002-10-20 Akim Demaille <akim@epita.fr>
13776
13777 * src/tables.h, src/tables.c, src/output.c: Comment changes.
13778
13779 2002-10-20 Akim Demaille <akim@epita.fr>
13780
13781 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
13782 * data/c.m4: here.
13783
13784 2002-10-20 Akim Demaille <akim@epita.fr>
13785
13786 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
13787 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
13788 `pair'.
13789 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
13790 `name' to...
13791 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
13792 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
13793 These.
13794
13795 2002-10-19 Paul Eggert <eggert@twinsun.com>
13796
13797 Do not create a temporary file, as that involves security and
13798 cleanup headaches. Instead, use a pair of pipes.
13799 Derived from a suggestion by Florian Krohm.
13800 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
13801 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
13802 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
13803 (BISON_PREREQ_SUBPIPE): Add.
13804 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
13805 Add subpipe.h, subpipe.c.
13806 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
13807 * po/POTFILES.in: Add lib/subpipe.c.
13808 * src/output.c: Include "subpipe.h".
13809 (m4_invoke): Remove decl.
13810 (scan_skel): New decl.
13811 (output_skeleton): Use pipe rather than temporary file for m4 input.
13812 Check that m4sugar.m4 is readable, to avoid deadlock.
13813 Check for pipe I/O error.
13814 * src/scan-skel.l (readpipe): Remove decl.
13815 (scan_skel): New function, to be used in place of m4_invoke.
13816 Read from stream rather than file.
13817
13818 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
13819 float, as this generates a warning on Solaris 8 + GCC 3.2 with
13820 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
13821 this generates a more-accurate value anyway.
13822
13823 * lib/timevar.c (timervar_accumulate): Rename locals to
13824 avoid confusion with similarly-named more-global.
13825 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
13826
13827 * src/output.c (prepare): Use xstrdup to convert char const *
13828 to char *, to avoid GCC warning.
13829
13830 2002-10-19 Akim Demaille <akim@epita.fr>
13831
13832 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
13833 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
13834 Use them to have `calc.y' ready for %pure-parser.
13835 * data/yacc.c (YYLEX): Pass a yylex return type to
13836 b4_c_function_call.
13837
13838 2002-10-19 Akim Demaille <akim@epita.fr>
13839
13840 Prototype support of %lex-param and %parse-param.
13841
13842 * src/parse-gram.y: Add the definition of the %lex-param and
13843 %parse-param tokens, plus their rules.
13844 Drop the `_' version of %glr-parser.
13845 Add the "," token.
13846 * src/scan-gram.l (INITIAL): Scan them.
13847 * src/muscle_tab.c: Comment changes.
13848 (muscle_insert, muscle_find): Rename `pair' as `probe'.
13849 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
13850 (muscle_entry_s): The `value' member is no longer const.
13851 Adjust all dependencies.
13852 * src/muscle_tab.c (muscle_init): Adjust: use
13853 MUSCLE_INSERT_STRING.
13854 Initialize the obstack earlier.
13855 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
13856 (muscle_pair_list_grow): New.
13857 * data/c.m4 (b4_c_function_call, b4_c_args): New.
13858 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
13859 * tests/calc.at: Use %locations, not --locations.
13860 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
13861
13862 2002-10-19 Akim Demaille <akim@epita.fr>
13863
13864 * src/getargs.c (usage): Take status as argument and exit
13865 accordingly.
13866 Report the traditional `Try ... --help' message when status != 0.
13867 (usage, version): Don't take a FILE * as arg, it is pointless.
13868 (getargs): When there is an incorrect number of arguments, make it
13869 an error, and report it GNUlically thanks to `usage ()'.
13870
13871 2002-10-18 Paul Eggert <eggert@twinsun.com>
13872
13873 * data/glr.c (yyreportParseError): Don't assume that sprintf
13874 yields the length of the printed string, as this is not true
13875 on SunOS 4.1.4. Reported by Peter Klein.
13876
13877 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
13878 * tests/conflicts.at (%nonassoc and eof): Likewise.
13879 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
13880
13881 2002-10-17 Akim Demaille <akim@epita.fr>
13882
13883 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
13884 * src/getargs.c (trace_types, trace_args): Adjust.
13885 * src/reader.c (grammar_current_rule_prec_set)
13886 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
13887 Standardize error messages.
13888 And s/@prec/%prec/!
13889 (reader): Use trace_flag to enable scanner/parser debugging,
13890 instead of an adhoc scheme.
13891 * src/scan-gram.l: Remove trailing debugging code.
13892
13893 2002-10-16 Paul Eggert <eggert@twinsun.com>
13894
13895 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
13896 MUSCLE_TAB_H.
13897
13898 * NEWS: Officially drop support for building Bison with K&R C,
13899 since it didn't work anyway and it's not worth worrying about.
13900 * Makefile.maint (wget_files): Remove ansi2knr.c.
13901 (ansi2knr.c-url_prefix): Remove.
13902 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
13903 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13904 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13905
13906 2002-10-15 Paul Eggert <eggert@twinsun.com>
13907
13908 Stop using the "enum_" trick for K&R-style function definitions;
13909 it confused me, and I was the author! Instead, assume that people
13910 who want to use K&R C compilers (when using these modules in GCC,
13911 perhaps?) will run ansi2knr.
13912
13913 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
13914 All uses of "enum_" changed to "enum ".
13915 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
13916 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
13917
13918 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
13919 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
13920 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
13921 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
13922 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
13923 abitset_not, abitset_ones, abitset_or, abitset_or_and,
13924 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
13925 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
13926 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
13927 Use function prototypes; this removes the need for declaring
13928 static functions simply to provide their prototypes.
13929 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
13930 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
13931 bitset_count_, bitset_create, bitset_dump, bitset_first,
13932 bitset_free, bitset_init, bitset_last, bitset_next,
13933 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
13934 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
13935 bitset_print, bitset_release_memory, bitset_toggle_,
13936 bitset_type_choose, bitset_type_get, bitset_type_name_get,
13937 debug_bitset): Likewise.
13938 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
13939 * lib/bitset_stats.c (bitset_log_histogram_print,
13940 bitset_percent_histogram_print, bitset_stats_and,
13941 bitset_stats_and_cmp, bitset_stats_and_or,
13942 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
13943 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
13944 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
13945 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
13946 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
13947 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
13948 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
13949 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
13950 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
13951 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
13952 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
13953 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
13954 bitset_stats_zero): Likewise.
13955 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
13956 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
13957 bitsetv_dump, debug_bitsetv): Likewise.
13958 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
13959 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
13960 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
13961 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
13962 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
13963 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
13964 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
13965 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
13966 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
13967 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
13968 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
13969 Likewise.
13970 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
13971 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
13972 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
13973 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
13974 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
13975 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
13976 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
13977 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
13978 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
13979 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
13980 lbitset_xor_cmp, lbitset_zero): Likewise.
13981
13982 2002-10-14 Akim Demaille <akim@epita.fr>
13983
13984 Version 1.75.
13985
13986 2002-10-14 Akim Demaille <akim@epita.fr>
13987
13988 * tests/Makefile.am (maintainer-check-posix): New.
13989
13990 2002-10-14 Akim Demaille <akim@epita.fr>
13991
13992 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
13993 member.
13994
13995 2002-10-14 Akim Demaille <akim@epita.fr>
13996
13997 * src/tables.c (table_ninf_remap): base -> tab.
13998 Reported by Matt Rosing.
13999
14000 2002-10-14 Paul Eggert <eggert@twinsun.com>
14001
14002 * tests/action.at, tests/calc.at, tests/conflicts.at,
14003 tests/cxx-type.at, tests/headers.at, tests/input.at,
14004 tests/regression.at, tests/synclines.at, tests/torture.at:
14005 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14006 so that the tests still work even if POSIXLY_CORRECT is set.
14007 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
14008
14009 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14010 for portability to K&R hosts. Fix typo: signed char is guaranteed
14011 only to 127, not to 128.
14012 * data/glr.c (yysigned_char): New type.
14013 * data/yacc.c (yysigned_char): Likewise.
14014 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14015
14016 2002-10-13 Paul Eggert <eggert@twinsun.com>
14017
14018 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14019 true due to limited range of data type" warning from GCC.
14020
14021 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14022 by wrapping enum yytokentype's definition inside #ifndef
14023 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14024
14025 2002-10-13 Akim Demaille <akim@epita.fr>
14026
14027 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14028 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14029
14030 2002-10-13 Akim Demaille <akim@epita.fr>
14031
14032 * Makefile.maint: Update from Autoconf 2.54.
14033 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14034
14035 2002-10-13 Akim Demaille <akim@epita.fr>
14036
14037 * src/print.c (print_state): Separate the list of solved conflicts
14038 from the other items.
14039 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14040
14041 2002-10-13 Akim Demaille <akim@epita.fr>
14042
14043 Let nondeterministic skeletons be usable with deterministic
14044 tables.
14045
14046 With the patch, GAWK compiled by GCC without -O2 passes its test
14047 suite using a GLR parser driven by LALR tables. It fails with -O2
14048 because `struct stat' gives two different answers on my machine:
14049 88 (definition of an auto var) and later 96 (memset on this var).
14050 Hence the stack is badly corrumpted. The headers inclusion is to
14051 blame: if I move the awk.h inclusion before GLR's system header
14052 inclusion, the two struct stat have the same size.
14053
14054 * src/tables.c (pack_table): Always create conflict_table.
14055 (token_actions): Always create conflict_list.
14056 * data/glr.c (YYFLAG): Remove, unused.
14057
14058 2002-10-13 Akim Demaille <akim@epita.fr>
14059
14060 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14061 (O0FLAGS): New.
14062 (VALGRIND, GXX): New.
14063 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14064 * tests/bison.in: Run $PREBISON a pre-command.
14065 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14066 (maintainer-check-g++): New.
14067 * Makefile.am (maintainer-check): New.
14068
14069 2002-10-13 Akim Demaille <akim@epita.fr>
14070
14071 * data/glr.c: Formatting changes.
14072 Tweak some trace messages to match yacc.c's.
14073
14074 2002-10-13 Akim Demaille <akim@epita.fr>
14075
14076 GLR parsers sometimes raise parse errors instead of performing the
14077 default reduction.
14078 Reported by Charles-Henry de Boysson.
14079
14080 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
14081 check the length of the traces when %glr.
14082 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14083 GLR's traces.
14084 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14085 Test GLR parsers.
14086 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14087 (yyltype): Remove the yy prefix from the member names.
14088 (yytable): Complete its comment.
14089 (yygetLRActions): Map error action number from YYTABLE from
14090 YYTABLE_NINF to 0.
14091 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14092 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14093 not satisfying as we could compare an YYACTION computed from
14094 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14095 only value for error actions.
14096 (yyreportParseError): In verbose parse error messages, don't issue
14097 `error' in the list of expected tokens.
14098 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14099 next action to perform to match glr.c's decoding.
14100 (yytable): Complete its comment.
14101
14102 2002-10-13 Paul Eggert <eggert@twinsun.com>
14103
14104 Fix problem reported by Henrik Grubbstroem in
14105 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
14106 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14107 because the Bison parser reads the second action before reducing
14108 the first one.
14109 * src/scan-gram.l (rule_length): New static var.
14110 Use it to keep track of the rule length in the scanner, since
14111 we can't expect the parser to be in lock-step sync with the scanner.
14112 (handle_action_dollar, handle_action_at): Use this var.
14113 * tests/actions.at (Exotic Dollars): Test for the problem.
14114
14115 2002-10-12 Paul Eggert <eggert@twinsun.com>
14116
14117 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14118 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14119 Include <sys/time.h> when checking for clock_t and struct tms.
14120 Use same include order as source.
14121 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
14122 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
14123
14124 * lib/timevar.c: Update copyright date and clarify comments.
14125 (get_time) [IN_GCC]: Keep the GCC version for reference.
14126
14127 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14128 GCC version as of today, then merge Bison's changes.
14129 Change "GCC" to "Bison" in copyright notice. timevar.def's
14130 author is Akim, so change that too.
14131
14132 * src/reader.c (grammar_current_rule_check):
14133 Don't worry about the default action if $$ is untyped.
14134 Prevents bogus warnings reported by Jim Gifford in
14135 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
14136
14137 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14138 * data/glr.c, data/lalr1.cc, data/yacc.c:
14139 Output token definitions before the first part of user declarations.
14140 Fixes compatibility problem reported by Jim Gifford for kbd in
14141 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14142
14143 2002-10-11 Paul Eggert <eggert@twinsun.com>
14144
14145 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14146 (yyparse): here. This undoes some of the 2002-07-25 change.
14147 Compatibility problem reported by Ralf S. Engelschall with
14148 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14149
14150 2002-10-11 Akim Demaille <akim@epita.fr>
14151
14152 * tests/regression.at Characters Escapes): New.
14153 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14154 characters.
14155 Reported by Jan Nieuwenhuizen.
14156
14157 2002-10-11 Akim Demaille <akim@epita.fr>
14158
14159 * po/id.po: New.
14160
14161 2002-10-10 Paul Eggert <eggert@twinsun.com>
14162
14163 Portability fixes for bitsets; this also avoids several GCC
14164 warnings.
14165
14166 * lib/abitset.c: Include <stddef.h>, for offsetof.
14167 * lib/lbitset.c: Likewise.
14168
14169 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14170 properly for vectors of objects. Do not assume that adding a
14171 header size to a multiple of a word size yields a value that is
14172 properly aligned for the whole union.
14173 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14174
14175 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14176 unique names for structures.
14177 * lib/ebitset.c (ebitset_bytes): Likewise.
14178 * lib/lbitset.c (lbitset_bytes): Likewise.
14179
14180 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14181 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14182 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14183 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14184 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14185 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14186 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14187 to improve the type-checking that GCC can do.
14188 * lib/bitset.c (bitset_op4_cmp): Likewise.
14189 * lib/bitset_stats.c (bitset_stats_count,
14190 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14191 bitset_stats_copy, bitset_stats_disjoint_p,
14192 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14193 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14194 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14195 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14196 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14197 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14198 bitset_stats_or_and_cmp): Likewise.
14199 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14200 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14201 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14202 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14203
14204 * lib/abitset.h: Include bitset.h, not bbitset.h.
14205 * lib/ebitset.h: Likewise.
14206 * lib/lbitset.h: Likewise.
14207
14208 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14209 All instances of parameters of type enum bitset_opts are now of
14210 type enum_bitset_opts, to conform to the C Standard, and similarly
14211 for enum_bitset_type.
14212 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14213 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14214
14215 Do not use "struct bitset_struct" to mean different things in
14216 different modules. Not only is this confusing, it violates
14217 the C Standard, which requires that structure types in different
14218 modules must be compatible if one is to be passed to the other.
14219 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14220 All instances of "struct bitset_struct *" replaced with "bitset".
14221 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14222 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14223 struct lbitset_struct, struct bitset_stats_struct): New types.
14224 All uses of struct bitset_struct changed to union bitset_union,
14225 etc.
14226 * lib/abitset.c (struct abitset_struct, abitset,
14227 struct bitset_struct): Remove.
14228 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14229 struct bitset_struct): Remove.
14230 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14231 bitset_struct): Remove.
14232 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14233 Likewise.
14234
14235 Do not call a function of type T using a call that assumes the
14236 function is of a different type U. Standard C requires that a
14237 function must be called with a type that is compatible with its
14238 definition.
14239 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14240 New decls.
14241 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14242 New functions.
14243 * lib/ebitset.c (PFV): Remove.
14244 * lib/lbitset.c (PFV): Likewise.
14245 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14246 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14247 decls.
14248 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14249 (ebitset_vtable): Use them.
14250 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14251 lbitset_xor): New functions.
14252 (lbitset_vtable): Use them.
14253
14254 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14255 Declare.
14256
14257 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14258 GCC warning.
14259 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14260 Use offsetof, for simplicity.
14261
14262 2002-10-06 Paul Eggert <eggert@twinsun.com>
14263
14264 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14265 the same width as int. This reapplies a hunk of the 2002-08-12 patch
14266 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
14267 which was inadvertently undone by the 2002-09-30 patch.
14268 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14269 the same width as int.
14270
14271 2002-10-04 Paul Eggert <eggert@twinsun.com>
14272
14273 Version 1.50.
14274
14275 * configure.ac (AC_INIT), NEWS: Increment version number.
14276
14277 * doc/bison.texinfo: Minor spelling, grammar, and white space
14278 fixes.
14279 (Symbols): Mention that any negative value returned from yylex
14280 signifies end-of-input. Warn about negative chars. Mention
14281 the portable Standard C character set.
14282
14283 The GNU coding standard says CFLAGS and YFLAGS are reserved
14284 for the installer to set.
14285 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14286 * src/Makefile.am (AM_CFLAGS): Likewise.
14287 (AM_YFLAGS): Renamed from YFLAGS.
14288
14289 Fix some MAX and MIN problems.
14290 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14291 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14292 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14293 * src/reader.c (reader): Use it.
14294
14295 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14296 POSIX 1003.1-2001 has removed fgrep.
14297
14298 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14299
14300 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14301 interpreted as signed.
14302 * lib/ebitset.c (ebitset_list): Fix bug.
14303
14304 2002-10-01 Paul Eggert <eggert@twinsun.com>
14305
14306 More fixes for 64-bit hosts and large bitsets.
14307
14308 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14309 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14310 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14311 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14312 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14313 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14314 bitset_count_): Likewise.
14315 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14316 bitset_first, bitset_last): Likewise.
14317 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14318 bitset_stats_list_reverse, bitset_stats_size,
14319 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14320 Likewise.
14321 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14322 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14323 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14324 bitsetv_reflexive_transitive_closure): Likewise.
14325 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14326 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14327 Likewise.
14328 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14329 Likewise.
14330
14331 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14332 Use size_t, not unsigned int, to count bytes.
14333 * lib/abitset.h (abitset_bytes): Likewise.
14334 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14335 Likewise.
14336 * lib/bitset.h (bitset_bytes): Likewise.
14337 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14338 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14339 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14340 * lib/ebitset.c (ebitset_bytes): Likewise.
14341 * lib/ebitset.h (ebitset_bytes): Likewise.
14342 * lib/lbitset.c (lbitset_bytes): Likewise.
14343 * lib/lbitset.h (lbitset_bytes): Likewise.
14344
14345 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14346 abitset_subset_p, abitset_disjoint_p, abitset_and,
14347 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14348 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14349 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14350 abitset_or_and, abitset_or_and_cmp):
14351 Use bitset_windex instead of unsigned int.
14352 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14353 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14354 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14355 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
14356 Likewise.
14357 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
14358
14359 * lib/bitset.c (bitset_print):
14360 Use proper printf formats for widths of integer types.
14361 * lib/bitset_stats.c (bitset_percent_histogram_print,
14362 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
14363 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14364 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14365 * lib/lbitset.c (lbitset_bytes): Likewise.
14366
14367 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
14368 BITSET_SIZE_MAX): New macros.
14369 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
14370 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
14371 to BITSET_WINDEX_MAX.
14372
14373 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
14374 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
14375 since we now return the bitset_bindex type (not int).
14376
14377 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
14378 when computing sizes.
14379 * lib/ebitset.c (ebitset_elts_grow): Likewise.
14380
14381 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
14382 and avoid cast to unsigned.
14383
14384 2002-09-30 Akim Demaille <akim@epita.fr>
14385
14386 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14387 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
14388 Updates from Michael Hayes.
14389
14390 2002-09-30 Art Haas <ahaas@neosoft.com>
14391
14392 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
14393 invocations.
14394 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
14395 defined.
14396
14397 2002-09-27 Akim Demaille <akim@epita.fr>
14398
14399 Version 1.49c.
14400
14401 2002-09-27 Akim Demaille <akim@epita.fr>
14402
14403 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
14404 (Because of AC_LIBSOURCE).
14405
14406 2002-09-27 Akim Demaille <akim@epita.fr>
14407
14408 Playing with Autoscan.
14409
14410 * configure.ac: Remove the old LIBOBJ tweaks.
14411 (AC_REPLACE_FUNCS): Add strrchr and strtol.
14412 * lib/strrchr.c: New.
14413 * lib/strtol.c: New, from the Coreutils 4.5.1.
14414
14415 2002-09-27 Akim Demaille <akim@epita.fr>
14416
14417 Playing with Autoscan.
14418
14419 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
14420 * lib/Makefile.am (libbison_a_SOURCES): No longer include
14421 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
14422 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
14423 Coreutils 4.5.1.
14424
14425 2002-09-24 Akim Demaille <akim@epita.fr>
14426
14427 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
14428 (Frequently Asked Questions, Parser Stack Overflow): New.
14429
14430 2002-09-13 Akim Demaille <akim@epita.fr>
14431
14432 Playing with autoscan.
14433
14434 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
14435 * src/files.c (skeleton_find): Remove, unused.
14436 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
14437 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
14438
14439 2002-09-13 Akim Demaille <akim@epita.fr>
14440
14441 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
14442 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
14443
14444 2002-09-13 Akim Demaille <akim@epita.fr>
14445
14446 * configure.ac: Require 2.54.
14447 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
14448 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
14449 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
14450 Remove, provided by Autoconf macros.
14451
14452 2002-09-12 Akim Demaille <akim@epita.fr>
14453
14454 * m4/prereq.m4: Update, from Coreutils 4.5.1.
14455
14456 2002-09-12 Akim Demaille <akim@epita.fr>
14457
14458 * m4/prereq.m4: Update, from Fileutils 4.1.5.
14459 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
14460 Reported by Martin Mokrejs.
14461
14462 2002-09-10 Akim Demaille <akim@epita.fr>
14463
14464 * src/parse-gram.y: Associate a human readable string to each
14465 token type.
14466 * tests/regression.at (Invalid inputs): Adjust.
14467
14468 2002-09-10 Gary V. Vaughan <gary@gnu.org>
14469
14470 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
14471 with an Autoconf-2.5x style configure.ac.
14472
14473 2002-09-06 Paul Eggert <eggert@twinsun.com>
14474
14475 * doc/bison.texinfo (Conditions): Make explicit that the GPL
14476 exception applies only to yacc.c. This is a modification of a
14477 patch originally suggested by Akim Demaille.
14478
14479 2002-09-06 Akim Demaille <akim@epita.fr>
14480
14481 * data/c.m4 (b4_copyright): Move the GPL exception comment from
14482 here to...
14483 * data/yacc.c: here.
14484
14485 * data/lalr1.cc (struct yyltype): Don't define it, since we use
14486 LocationType.
14487 (b4_ltype): Default to yy::Location from location.hh.
14488
14489 2002-09-04 Jim Meyering <jim@meyering.net>
14490
14491 * data/yacc.c: Guard the declaration of yytoknum also with
14492 `#ifdef YYPRINT', so it is declared only when used.
14493
14494 2002-09-04 Akim Demaille <akim@epita.fr>
14495
14496 * configure.in: Rename as...
14497 * configure.ac: this.
14498 Bump to 1.49c.
14499
14500 2002-09-04 Akim Demaille <akim@epita.fr>
14501
14502 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
14503 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
14504 translate maintainer only messages.
14505
14506 2002-08-12 Paul Eggert <eggert@twinsun.com>
14507
14508 Version 1.49b.
14509
14510 * Makefile.am (SUBDIRS): Remove intl.
14511 (DISTCLEANFILES): Remove.
14512 * NEWS: Mention that GNU M4 is now required. Clarify what is
14513 meant by "larger grammars". Mention the pt_BR translation.
14514 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
14515 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
14516 Bump version from 0.11.2 to 0.11.5.
14517 (BISON_PREREQ_STAGE): Remove.
14518 (AM_GNU_GETTEXT): Use external gettext.
14519 (AC_OUTPUT): Remove intl/Makefile.
14520
14521 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
14522
14523 * data/glr.c: Include string.h, for strlen.
14524 (yyreportParseError): Use size_t for yysize.
14525 (yy_yypstack): No longer nested inside yypstates, as nested
14526 functions are not portable. Do not assume size_t is the
14527 same width as int.
14528 (yypstates): Do not assume that ptrdiff_t is the same width
14529 as int, and similarly for yyposn and YYINDEX.
14530
14531 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
14532
14533 * lib/Makefile.am (INCLUDES): Do not include from the intl
14534 directory, which has been removed.
14535 * src/Makefile.am (INCLUDES): Likewise.
14536
14537 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
14538 (bitsets_sources, additional_bitsets_sources, timevars_sources):
14539 New vars.
14540
14541 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
14542 * tests/Makefile.am (EXTRA_DIST): Likewise.
14543
14544 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
14545 Do not assume that bitset_windex is the same width as unsigned.
14546
14547 * lib/abitset.c (abitset_unused_clear): Do not assume that
14548 bitset_word is the same width as int.
14549 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
14550 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
14551 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
14552 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
14553 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
14554
14555 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
14556 portability to one's complement hosts!).
14557 * lib/ebitset.c (ebitset_op1): Likewise.
14558 * lib/lbitset.c (lbitset_op1): Likewise.
14559
14560 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
14561 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14562 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
14563 Sync with fileutils.
14564 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
14565 lib/gettext.h: Sync with diffutils.
14566
14567 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
14568 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
14569
14570 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
14571 PROTOTYPES to check for prototypes, and "defined __STDC__" to
14572 check for void *.
14573
14574 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
14575 size_t; the old version tried to do this but casted improperly.
14576 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
14577 (bitset_test): Now returns int, not unsigned long.
14578
14579 * lib/bitset_stats.c: Include "gettext.h".
14580 (_): New macro.
14581 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
14582 name locals "index", as it generates unnecessary warnings on some
14583 hosts that have an "index" function.
14584
14585 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
14586 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
14587 they need translation.
14588 * src/LR0.c (state_list_append, new_itemsets, get_state,
14589 append_states, generate_states): Likewise.
14590 * src/assoc.c (assoc_to_string): Likewise.
14591 * src/closure.c (print_closure, set_firsts, closure): Likewise.
14592 * src/gram.c (grammar_dump): Likewise.
14593 * src/injections.c (injections_compute): Likewise.
14594 * src/lalr.c (lookaheads_print): Likewise.
14595 * src/relation.c (relation_transpose): Likewise.
14596 * src/scan-gram.l: Likewise.
14597 * src/tables.c (table_grow, pack_vector): Likewise.
14598
14599 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
14600 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
14601 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
14602 * m4/mbstate_t.m4: Sync with fileutils.
14603 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
14604
14605 * po/LINGUAS: Add pt_BR.
14606 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
14607 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
14608 lib/timevar.c.
14609 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
14610 manual recommends.
14611 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
14612
14613 * src/complain.c (strerror_r): Remove decl; not needed.
14614 (strerror): Use same pattern as ../lib/error.c.
14615
14616 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
14617
14618 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
14619
14620 * src/main.c (main): Cast result of bindtextdomain and textdomain
14621 to void, to avoid a GCC warning when --disable-nls is in effect.
14622
14623 * src/scan-gram.l: Use strings rather than escapes when possible,
14624 to minimize the number of warnings from xgettext.
14625 (handle_action_dollar, handle_action_at): Don't use isdigit,
14626 as it mishandles negative chars and it may not work as expected
14627 outside the C locale.
14628
14629 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
14630 this is a GCC extension and is not portable to other compilers.
14631
14632 * src/system.h (alloca): Use same pattern as ../lib/error.c.
14633 Do not include <ctype.h>; no longer needed.
14634 Do not include <malloc.h>; no longer needed (and generates
14635 warnings on OpenBSD 3.0).
14636
14637 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
14638 it's not portable.
14639
14640 * tests/regression.at: Do not use 'cc -c input.c -o input';
14641 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
14642
14643 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
14644 exit status as failure, not just exit status 1. Sun C exits
14645 with status 2 sometimes.
14646
14647 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
14648 Use it for the two large tests.
14649
14650 2002-08-02 Akim Demaille <akim@epita.fr>
14651
14652 * src/conflicts.c (conflicts_output): Don't output rules never
14653 reduced here, since anyway that computation doesn't work.
14654 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
14655 (rule_useless_p, rule_never_reduced_p): New.
14656 (grammar_rules_partial_print): Use a filter instead of a range.
14657 Display the title only if needed.
14658 (grammar_rules_print): Adjust.
14659 (grammar_rules_never_reduced_report): New.
14660 * src/tables.c (action_row): Move the computation of rules never
14661 reduced to...
14662 (token_actions): here.
14663 * src/main.c (main): Make the parser before making the report, so
14664 that rules never reduced are computed.
14665 Call grammar_rules_never_reduced_report.
14666 * src/print.c (print_results): Report rules never reduced.
14667 * tests/conflicts.at, tests/reduce.at: Adjust.
14668
14669 2002-08-01 Akim Demaille <akim@epita.fr>
14670
14671 Instead of attaching lookaheads and duplicating the rules being
14672 reduced by a state, attach the lookaheads to the reductions.
14673
14674 * src/state.h (state_t): Remove the `lookaheads',
14675 `lookaheads_rule' member.
14676 (reductions_t): Add a `lookaheads' member.
14677 Use a regular array for the `rules'.
14678 * src/state.c (reductions_new): Initialize the lookaheads member
14679 to 0.
14680 (state_rule_lookaheads_print): Adjust.
14681 * src/state.h, src/state.c (state_reductions_find): New.
14682 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
14683 (count_rr_conflicts): Adjust.
14684 * src/lalr.c (LArule): Remove.
14685 (add_lookback_edge): Adjust.
14686 (state_lookaheads_count): New.
14687 (states_lookaheads_initialize): Merge into...
14688 (initialize_LA): this.
14689 (lalr_free): Adjust.
14690 * src/main.c (main): Don't free nullable and derives too early: it
14691 is used by --verbose.
14692 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
14693
14694 2002-08-01 Akim Demaille <akim@epita.fr>
14695
14696 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
14697 `rule_number_t**'.
14698 (set_derives, free_derives): Rename as...
14699 (derives_compute, derives_free): this.
14700 Adjust all dependencies.
14701 * src/nullable.c (set_nullable, free_nullable): Rename as...
14702 (nullable_compute, nullable_free): these.
14703 (rule_list_t): Store rule_t *, not rule_number_t.
14704 * src/state.c (state_rule_lookaheads_print): Directly compare rule
14705 pointers, instead of their numbers.
14706 * src/main.c (main): Call nullable_free, and derives_free earlier,
14707 as they were lo longer used.
14708
14709 2002-08-01 Akim Demaille <akim@epita.fr>
14710
14711 * lib/timevar.c (get_time): Include children time.
14712 * src/lalr.h (LA, LArule): Don't export them: used with the
14713 state_t.
14714 * src/lalr.c (LA, LArule): Static.
14715 * src/lalr.h, src/lalr.c (lalr_free): New.
14716 * src/main.c (main): Call it.
14717 * src/tables.c (pack_vector): Check whether loc is >= to the
14718 table_size, not >.
14719 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
14720 (tables_generate): do it, since that's also it which allocates
14721 them.
14722 Don't free LA and LArule, main does.
14723
14724 2002-07-31 Akim Demaille <akim@epita.fr>
14725
14726 Separate parser tables computation and output.
14727
14728 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
14729 (conflict_list, conflict_list_cnt, table, check, table_ninf)
14730 (yydefgoto, yydefact, high): Move to...
14731 * src/tables.h, src/tables.c: here.
14732 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
14733 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
14734 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
14735 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
14736 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
14737 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
14738 (action_row, save_row, token_actions, save_column, default_goto)
14739 (goto_actions, sort_actions, matching_state, pack_vector)
14740 (table_ninf_remap, pack_table, prepare_actions): Move to...
14741 * src/tables.c: here.
14742 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
14743 * src/output.c (token_actions, output_base, output_conflicts)
14744 (output_check): Merge into...
14745 (prepare_actions): this.
14746 (actions_output): Rename as...
14747 (user_actions_output): this.
14748 * src/main.c (main): Call tables_generate and tables_free.
14749
14750 2002-07-31 Akim Demaille <akim@epita.fr>
14751
14752 Steal GCC's --time-report support.
14753
14754 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
14755 stolen/adjusted from GCC.
14756 * m4/stage.m4: Remove time related checks.
14757 * m4/timevar.m4: New.
14758 * configure.in: Adjust.
14759 * src/system.h: Adjust to using timevar.h.
14760 * src/getargs.h, src/getargs.c: Support trace_time for
14761 --trace=time.
14762 * src/main.c (stage): Remove.
14763 (main): Replace `stage' invocations with timevar calls.
14764 * src/output.c: Insert pertinent timevar calls.
14765
14766 2002-07-31 Akim Demaille <akim@epita.fr>
14767
14768 Let --trace have arguments.
14769
14770 * src/getargs.h (enum trace_e): New.
14771 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
14772 (long_options, short_options): --trace/-T takes an optional
14773 argument.
14774 Change all the uses of trace_flag to reflect the new flags.
14775 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
14776
14777 Strengthen `stage' portability.
14778
14779 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
14780 * configure.in: Use it.
14781 Don't check for malloc.h and sys/times.h.
14782 * src/system.h: Include them when appropriate.
14783 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
14784 times and struct tms are available.
14785
14786 2002-07-30 Akim Demaille <akim@epita.fr>
14787
14788 In verbose parse error message, don't report `error' as an
14789 expected token.
14790 * tests/actions.at (Printers and Destructors): Adjust.
14791 * tests/calc.at (Calculator $1): Adjust.
14792 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
14793 error message, do not report the parser accepts the error token in
14794 that state.
14795
14796 2002-07-30 Akim Demaille <akim@epita.fr>
14797
14798 Normalize conflict related messages.
14799
14800 * src/complain.h, src/complain.c (warn, complain): New.
14801 * src/conflicts.c (conflicts_print): Use them.
14802 (conflict_report_yacc): New, extracted from...
14803 (conflicts_print): here.
14804 * tests/conflicts.at, tests/existing.at: Adjust.
14805
14806 2002-07-30 Akim Demaille <akim@epita.fr>
14807
14808 Report rules which are never reduced by the parser: those hidden
14809 by conflicts.
14810
14811 * src/LR0.c (save_reductions): Don't make the final state too
14812 different: save its reduction (accept) instead of having a state
14813 without any action (no shift or goto, no reduce).
14814 Note: the final state is now a ``regular'' state, i.e., the
14815 parsers now contain `reduce 0' as default reduction.
14816 Nevertheless, since they decide to `accept' when yystate =
14817 final_state, they still will not reduce rule 0.
14818 * src/print.c (print_actions, print_reduction): Adjust.
14819 * src/output.c (action_row): Track reduced rules.
14820 (token_actions): Report rules never reduced.
14821 * tests/conflicts.at, tests/regression.at: Adjust.
14822
14823 2002-07-30 Akim Demaille <akim@epita.fr>
14824
14825 `stage' was accidently included in a previous patch.
14826 Initiate its autoconfiscation.
14827
14828 * configure.in: Look for malloc.h and sys/times.h.
14829 * src/main.c (stage): Adjust.
14830 Report only when trace_flag.
14831
14832 2002-07-29 Akim Demaille <akim@epita.fr>
14833
14834 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
14835 state_number_t.
14836 (errs_t): symbol_t*, not symbol_number_t.
14837 (reductions_t): rule_t*, not rule_number_t.
14838 (FOR_EACH_SHIFT): New.
14839 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
14840 * src/print.c, src/print_graph.c: Adjust.
14841
14842 2002-07-29 Akim Demaille <akim@epita.fr>
14843
14844 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
14845
14846 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
14847 (endtoken, accept): these.
14848 * src/reader.c (reader): Set endtoken's default tag to "$end".
14849 Set undeftoken's tag to "$undefined" instead of "$undefined.".
14850 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
14851 Adjust.
14852
14853 2002-07-29 Akim Demaille <akim@epita.fr>
14854
14855 * src/reduce.c (reduce_grammar): When the language is empty,
14856 complain about the start symbol, not the axiom.
14857 Use its location.
14858 * tests/reduce.at (Empty Language): New.
14859
14860 2002-07-26 Akim Demaille <akim@epita.fr>
14861
14862 * src/reader.h, src/reader.c (gram_error): ... can't get
14863 yycontrol without making too strong assumptions on the parser
14864 itself.
14865 * src/output.c (prepare_tokens): Use the real 0th value of
14866 token_translations instead of `0'.
14867 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
14868 visible here.
14869 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
14870 for the time being: %locations ought to provide it to yyerror.
14871
14872 2002-07-25 Akim Demaille <akim@epita.fr>
14873
14874 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
14875 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
14876 * tests/regression.at (Web2c Actions): Adjust.
14877
14878 2002-07-25 Akim Demaille <akim@epita.fr>
14879
14880 Stop storing rules from 1 to nrules + 1.
14881
14882 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
14883 * src/nullable.c, src/output.c, src/print.c, src/reader.c
14884 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
14885 Iterate from 0 to nrules.
14886 Use rule_number_as_item_number and item_number_as_rule_number.
14887 Adjust to `derive' now containing possibly 0.
14888 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
14889 Handle the `- 1' part in rule numbers from/to item numbers.
14890 * src/conflicts.c (log_resolution): Fix the message which reversed
14891 shift and reduce.
14892 * src/output.c (action_row): Initialize default_rule to -1.
14893 (token_actions): Adjust.
14894 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
14895 expected output.
14896 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
14897
14898 2002-07-25 Akim Demaille <akim@epita.fr>
14899
14900 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
14901 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
14902 (b4_c_knr_arg_decl): New.
14903 * data/yacc.c: Use it to define yysymprint, yydestruct, and
14904 yyreport_parse_error.
14905
14906 2002-07-25 Akim Demaille <akim@epita.fr>
14907
14908 * data/yacc.c (yyreport_parse_error): New, extracted from...
14909 (yyparse): here.
14910 (yydestruct, yysymprint): Move above yyparse.
14911 Be K&R compliant.
14912
14913 2002-07-25 Akim Demaille <akim@epita.fr>
14914
14915 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
14916 replace...
14917 (b4_sint_type, b4_uint_type): these.
14918 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
14919 * tests/regression.at (Web2c Actions): Adjust.
14920
14921 2002-07-25 Akim Demaille <akim@epita.fr>
14922
14923 * src/gram.h (TIEM_NUMBER_MAX): New.
14924 (item_number_of_rule_number, rule_number_of_item_number): Rename
14925 as...
14926 (rule_number_as_item_number, item_number_as_rule_number): these.
14927 Adjust dependencies.
14928 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
14929 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
14930 (symbol_number_to_vector_number): New.
14931 (order): Of vector_number_t* type.
14932 (base_t, BASE_MAX, BASE_MIN): New.
14933 (froms, tos, width, pos, check): Of base_t type.
14934 (action_number_t, ACTION_MIN, ACTION_MAX): New.
14935 (actrow): Of action_number_t type.
14936 (conflrow): Of unsigned int type.
14937 (table_ninf, base_ninf): New.
14938 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
14939 (muscle_insert_int_table, muscle_insert_base_table)
14940 (muscle_insert_rule_number_table): New.
14941 (prepare_tokens): Output `toknum' as int_table.
14942 (action_row): Returns a rule_number_t.
14943 Use ACTION_MIN, not SHRT_MIN.
14944 (token_actions): yydefact is rule_number_t*.
14945 (table_ninf_remap): New.
14946 (pack_table): Use it for `base' and `table'.
14947 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
14948 replaced with...
14949 (YYPACT_NINF, YYTABLE_NINF): these.
14950 (yypact, yytable): Compute their types instead of hard-coded
14951 `short'.
14952 * tests/regression.at (Web2c Actions): Adjust.
14953
14954 2002-07-19 Akim Demaille <akim@epita.fr>
14955
14956 * src/scan-gram.l (id): Can start with an underscore.
14957
14958 2002-07-16 Akim Demaille <akim@epita.fr>
14959
14960 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
14961 Adjust all former `associativity' dependencies.
14962 * src/symtab.c (symbol_new): Default associativity is `undef', not
14963 `right'.
14964 (symbol_check_alias_consistence): Adjust.
14965
14966 2002-07-09 Akim Demaille <akim@epita.fr>
14967
14968 * doc/bison.texinfo: Properly set the ``header'' part.
14969 Use @dircategory ``GNU programming tools'' as per Texinfo's
14970 documentation.
14971 Use @copying.
14972
14973 2002-07-09 Akim Demaille <akim@epita.fr>
14974
14975 * lib/quotearg.h: Protect against multiple inclusions.
14976 * src/location.h (location_t): Add a `file' member.
14977 (LOCATION_RESET, LOCATION_PRINT): Adjust.
14978 * src/complain.c (warn_at, complain_at, fatal_at): Drop
14979 `error_one_per_line' support.
14980
14981 2002-07-09 Akim Demaille <akim@epita.fr>
14982
14983 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
14984 * src/reader.c (lineno): Remove.
14985 Adjust all dependencies.
14986 (get_merge_function): Take a location and use complain_at.
14987 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
14988 * tests/regression.at (Invalid inputs, Mixing %token styles):
14989 Adjust.
14990
14991 2002-07-09 Akim Demaille <akim@epita.fr>
14992
14993 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
14994 recovery rule, and forbid extensions when --yacc.
14995 (gram_error): Use complain_at.
14996 * src/reader.c (reader): Exit if there were parse errors.
14997
14998 2002-07-09 Akim Demaille <akim@epita.fr>
14999
15000 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15001 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15002 Reported by R Blake <blakers@mac.com>.
15003
15004 2002-07-09 Akim Demaille <akim@epita.fr>
15005
15006 * data/yacc.c: Output the copyright notive in the header.
15007
15008 2002-07-03 Akim Demaille <akim@epita.fr>
15009
15010 * src/output.c (froms, tos): Are state_number_t.
15011 (save_column): sp, sp1, and sp2 are state_number_t.
15012 (prepare): Rename `final' as `final_state_number', `nnts' as
15013 `nterms_number', `nrules' as `rules_number', `nstates' as
15014 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15015 unused.
15016 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15017 * data/lalr1.cc (nsym_): Remove, unused.
15018
15019 2002-07-03 Akim Demaille <akim@epita.fr>
15020
15021 * src/lalr.h, src/lalr.c (goto_number_t): New.
15022 * src/lalr.c (goto_list_t): New.
15023 Propagate them.
15024 * src/nullable.c (rule_list_t): New.
15025 Propagate.
15026 * src/types.h: Remove.
15027
15028 2002-07-03 Akim Demaille <akim@epita.fr>
15029
15030 * src/closure.c (print_fderives): Use rule_rhs_print.
15031 * src/derives.c (print_derives): Use rule_rhs_print.
15032 (rule_list_t): New, replaces `shorts'.
15033 (set_derives): Add comments.
15034 * tests/sets.at (Nullable, Firsts): Adjust.
15035
15036 2002-07-03 Akim Demaille <akim@epita.fr>
15037
15038 * src/output.c (prepare_actions): Free `tally' and `width'.
15039 (prepare_actions): Allocate and free `order'.
15040 * src/symtab.c (symbols_free): Free `symbols'.
15041 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15042 * src/output.c (m4_invoke): Move to...
15043 * src/scan-skel.l: here.
15044 (<<EOF>>): Close yyout, and free its name.
15045
15046 2002-07-03 Akim Demaille <akim@epita.fr>
15047
15048 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15049
15050 * src/LR0.c (new_state): Merge into...
15051 (state_list_append): this.
15052 (new_states): Merge into...
15053 (generate_states): here.
15054 (set_states): Don't ensure a proper `errs' state member here, do it...
15055 * src/conflicts.c (conflicts_solve): here.
15056 * src/state.h, src/state.c: Comment changes.
15057 (state_t): Rename member `shifts' as `transitions'.
15058 Adjust all dependencies.
15059 (errs_new): For consistency, also take the values as argument.
15060 (errs_dup): Remove.
15061 (state_errs_set): New.
15062 (state_reductions_set, state_transitions_set): Assert that no
15063 previous value was assigned.
15064 (state_free): New.
15065 (states_free): Use it.
15066 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15067 temporary storage: use `errs' and `nerrs' as elsewhere.
15068 (set_conflicts): Allocate and free this `errs'.
15069
15070 2002-07-02 Akim Demaille <akim@epita.fr>
15071
15072 * lib/libiberty.h: New.
15073 * lib: Update the bitset implementation from upstream.
15074 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15075 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15076 * src/main.c: Adjust bitset stats calls.
15077
15078 2002-07-01 Paul Eggert <eggert@twinsun.com>
15079
15080 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15081 char, so that negative chars don't collide with $.
15082
15083 2002-06-30 Akim Demaille <akim@epita.fr>
15084
15085 Have the GLR tests be `warning' checked, and fix the warnings.
15086
15087 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15088 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15089 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15090 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15091 (yyaddDeferredAction): static.
15092 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15093 (yyreportParseError): yyprefix is const.
15094 yytokenp is used only when verbose.
15095 (yy__GNUC__): Replace with __GNUC__.
15096 (yypdumpstack): yyi is size_t.
15097 (yypreference): Un-yy local variables and arguments, to avoid
15098 clashes with `yyr1'. Anyway, we are not in the user name space.
15099 (yytname_size): be an int, as is compared with ints.
15100 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15101 Use them.
15102 * tests/cxx-gram.at: Use quotation to protect $1.
15103 Use AT_COMPILE to enable warnings hunts.
15104 Prototype yylex and yyerror.
15105 `Use' argc.
15106 Include `string.h', not `strings.h'.
15107 Produce and prototype stmtMerge only when used.
15108 yylex takes a location.
15109
15110 2002-06-30 Akim Demaille <akim@epita.fr>
15111
15112 We spend a lot of time in quotearg, in particular when --verbose.
15113
15114 * src/symtab.c (symbol_get): Store a quoted version of the key.
15115 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15116 Adjust all callers.
15117
15118 2002-06-30 Akim Demaille <akim@epita.fr>
15119
15120 * src/state.h (reductions_t): Rename member `nreds' as num.
15121 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15122 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15123
15124 2002-06-30 Akim Demaille <akim@epita.fr>
15125
15126 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15127 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15128 (shifts_to): Rename as...
15129 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15130 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15131 (TRANSITION_IS_DISABLED, transitions_to): these.
15132
15133 2002-06-30 Akim Demaille <akim@epita.fr>
15134
15135 * src/print.c (print_shifts, print_gotos): Merge into...
15136 (print_transitions): this.
15137 (print_transitions, print_errs, print_reductions): Align the
15138 lookaheads columns.
15139 (print_core, print_transitions, print_errs, print_state,
15140 print_grammar): Output empty lines separator before, not after.
15141 (state_default_rule_compute): Rename as...
15142 (state_default_rule): this.
15143 * tests/conflicts.at (Defaulted Conflicted Reduction),
15144 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15145 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15146
15147 2002-06-30 Akim Demaille <akim@epita.fr>
15148
15149 Display items as we display rules.
15150
15151 * src/gram.h, src/gram.c (rule_lhs_print): New.
15152 * src/gram.c (grammar_rules_partial_print): Use it.
15153 * src/print.c (print_core): Likewise.
15154 * tests/conflicts.at (Defaulted Conflicted Reduction),
15155 (Unresolved SR Conflicts): Adjust.
15156 (Unresolved SR Conflicts): Adjust and rename as...
15157 (Resolved SR Conflicts): this, as was meant.
15158 * tests/regression.at (Web2c Report): Adjust.
15159
15160 2002-06-30 Akim Demaille <akim@epita.fr>
15161
15162 * src/print.c (state_default_rule_compute): New, extracted from...
15163 (print_reductions): here.
15164 Pessimize, but clarify the code.
15165 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15166
15167 2002-06-30 Akim Demaille <akim@epita.fr>
15168
15169 * src/output.c (action_row): Let default_rule be always a rule
15170 number.
15171
15172 2002-06-30 Akim Demaille <akim@epita.fr>
15173
15174 * src/closure.c (print_firsts, print_fderives, closure):
15175 Use BITSET_EXECUTE.
15176 * src/lalr.c (lookaheads_print): Likewise.
15177 * src/state.c (state_rule_lookaheads_print): Likewise.
15178 * src/print_graph.c (print_core): Likewise.
15179 * src/print.c (print_reductions): Likewise.
15180 * src/output.c (action_row): Likewise.
15181 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15182
15183 2002-06-30 Akim Demaille <akim@epita.fr>
15184
15185 * src/print_graph.c: Use report_flag.
15186
15187 2002-06-30 Akim Demaille <akim@epita.fr>
15188
15189 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15190 to...
15191 * src/relation.h, src/relation.c (traverse, relation_digraph)
15192 (relation_print, relation_transpose): New.
15193
15194 2002-06-30 Akim Demaille <akim@epita.fr>
15195
15196 * src/state.h, src/state.c (shifts_to): New.
15197 * src/lalr.c (build_relations): Use it.
15198
15199 2002-06-30 Akim Demaille <akim@epita.fr>
15200
15201 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15202 (item_number_of_rule_number, rule_number_of_item_number): New.
15203 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15204 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15205 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15206 Propagate their use.
15207 Much remains to be done, in particular wrt `shorts' from types.h.
15208
15209 2002-06-30 Akim Demaille <akim@epita.fr>
15210
15211 * src/symtab.c (symbol_new): Initialize the `printer' member.
15212
15213 2002-06-30 Akim Demaille <akim@epita.fr>
15214
15215 * src/LR0.c (save_reductions): Remove, replaced by...
15216 * src/state.h, src/state.c (state_reductions_set): New.
15217 (reductions, errs): Rename as...
15218 (reductions_t, errs_t): these.
15219 Adjust all dependencies.
15220
15221 2002-06-30 Akim Demaille <akim@epita.fr>
15222
15223 * src/LR0.c (state_list_t, state_list_append): New.
15224 (first_state, last_state): Now symbol_list_t.
15225 (this_state): Remove.
15226 (new_itemsets, append_states, save_reductions): Take a state_t as
15227 argument.
15228 (set_states, generate_states): Adjust.
15229 (save_shifts): Remove, replaced by...
15230 * src/state.h, src/state.c (state_shifts_set): New.
15231 (shifts): Rename as...
15232 (shifts_t): this.
15233 Adjust all dependencies.
15234 * src/state.h (state_t): Remove the `next' member.
15235
15236 2002-06-30 Akim Demaille <akim@epita.fr>
15237
15238 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15239 escaped in slot 0.
15240
15241 2002-06-30 Akim Demaille <akim@epita.fr>
15242
15243 Use hash.h for the state hash table.
15244
15245 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15246 (allocate_storage): Use state_hash_new.
15247 (free_storage): Use state_hash_free.
15248 (new_state, get_state): Adjust.
15249 * src/lalr.h, src/lalr.c (states): Move to...
15250 * src/states.h (state_t): Remove the `link' member, no longer
15251 used.
15252 * src/states.h, src/states.c: here.
15253 (state_hash_new, state_hash_free, state_hash_lookup)
15254 (state_hash_insert, states_free): New.
15255 * src/states.c (state_table, state_compare, state_hash): New.
15256 * src/output.c (output_actions): Do not free states now, since we
15257 still need to know the final_state number in `prepare', called
15258 afterwards. Do it...
15259 * src/main.c (main): here: call states_free after `output'.
15260
15261 2002-06-30 Akim Demaille <akim@epita.fr>
15262
15263 * src/state.h, src/state.c (state_new): New, extracted from...
15264 * src/LR0.c (new_state): here.
15265 * src/state.h (STATE_ALLOC): Move to...
15266 * src/state.c: here.
15267 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15268 * src/state.h, src/state.c: here.
15269
15270 2002-06-30 Akim Demaille <akim@epita.fr>
15271
15272 * src/reader.c (gensym): Rename as...
15273 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15274 (getsym): Rename as...
15275 (symbol_get): this.
15276
15277 2002-06-30 Akim Demaille <akim@epita.fr>
15278
15279 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15280 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15281 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15282 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15283
15284 2002-06-30 Akim Demaille <akim@epita.fr>
15285
15286 Make the test suite pass with warnings checked.
15287
15288 * tests/actions.at (Printers and Destructors): Improve.
15289 Avoid unsigned vs. signed issues.
15290 * tests/calc.at: Don't exercise the scanner here, do it...
15291 * tests/input.at (Torturing the Scanner): here.
15292
15293 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15294
15295 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
15296 reorganize first lines parallel to yacc.c.
15297
15298 2002-06-28 Akim Demaille <akim@epita.fr>
15299
15300 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15301 (b4_token_enum, b4_token_defines): New, factored from...
15302 * data/lalr1.cc, data/yacc.c, glr.c: here.
15303
15304 2002-06-28 Akim Demaille <akim@epita.fr>
15305
15306 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15307 unused variables.
15308 * src/output.c (merger_output): static.
15309
15310 2002-06-28 Akim Demaille <akim@epita.fr>
15311
15312 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
15313 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15314 pacify GCC.
15315 * src/output.c (save_row): Initialize all the variables to pacify GCC.
15316
15317 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15318
15319 Accumulated changelog for new GLR parsing features.
15320
15321 * src/conflicts.c (count_total_conflicts): Change name to
15322 conflicts_total_count.
15323 * src/conflicts.h: Ditto.
15324 * src/output.c (token_actions): Use the new name.
15325 (output_conflicts): Change conflp => conflict_list_heads, and
15326 confl => conflict_list for better readability.
15327 * data/glr.c: Use the new names.
15328 * NEWS: Add self to GLR announcement.
15329
15330 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15331
15332 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15333 Akim Demaille.
15334
15335 * data/bison.glr: Change name to glr.c
15336 * data/glr.c: Renamed from bison.glr.
15337 * data/Makefile.am: Add glr.c
15338
15339 * src/getargs.c:
15340
15341 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
15342 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
15343
15344 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15345
15346 * data/bison.glr: Be sure to restore the
15347 current #line when returning to the skeleton contents after having
15348 exposed the input file's #line.
15349
15350 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15351
15352 * data/bison.glr: Bring up to date with changes to bison.simple.
15353
15354 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15355
15356 * data/bison.glr: Correct definitions that use b4_prefix.
15357 Various reformatting.
15358 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
15359 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
15360 yytokenp argument; now part of stack.
15361 (yychar): Define to behave as documented.
15362 (yyclearin): Ditto.
15363
15364 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15365
15366 * src/reader.h: Add declaration for free_merger_functions.
15367
15368 * src/reader.c (merge_functions): New variable.
15369 (get_merge_function): New function.
15370 (free_merger_functions): New function.
15371 (readgram): Check for %prec that is not followed by a symbol.
15372 Handle %dprec and %merge declarations.
15373 (packgram): Initialize dprec and merger fields in rules array.
15374
15375 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
15376 conflict_list_cnt, conflict_list_free): New variables.
15377 (table_grow): Also grow conflict_table.
15378 (prepare_rules): Output dprec and merger tables.
15379 (conflict_row): New function.
15380 (action_row): Output conflict lists for GLR parser. Don't use
15381 default reduction in conflicted states for GLR parser so that there
15382 are spaces for the conflict lists.
15383 (save_row): Also save conflict information.
15384 (token_actions): Allocate conflict list.
15385 (merger_output): New function.
15386 (pack_vector): Pack conflict table, too.
15387 (output_conflicts): New function to output yyconflp and yyconfl.
15388 (output_check): Allocate conflict_tos.
15389 (output_actions): Output conflict tables, also.
15390 (output_skeleton): Output b4_mergers definition.
15391 (prepare): Output b4_max_rhs_length definition.
15392 Use 'bison.glr' as default skeleton for GLR parsers.
15393
15394 * src/gram.c (glr_parser): New flag.
15395 (grammar_free): Call free_merger_functions.
15396
15397 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
15398 all pairs of conflicting reductions, rather than just all tokens
15399 causing conflicts. Needed to size conflict tables.
15400 (conflicts_output): Modify call to count_rr_conflicts for new
15401 interface.
15402 (conflicts_print): Ditto.
15403 (count_total_conflicts): New function.
15404
15405 * src/reader.h (merger_list): New type.
15406 (merge_functions): New variable.
15407
15408 * src/lex.h (tok_dprec, tok_merge): New token types.
15409
15410 * src/gram.h (rule_s): Add dprec and merger fields.
15411 (glr_parser): New flag.
15412
15413 * src/conflicts.h (count_total_conflicts): New function.
15414
15415 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
15416
15417 * doc/bison.texinfo (Generalized LR Parsing): New section.
15418 (GLR Parsers): New section.
15419 (Language and Grammar): Mention GLR parsing.
15420 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
15421 Correct typo ("tge" -> "the").
15422
15423 * data/bison.glr: New skeleton for GLR parsing.
15424
15425 * tests/cxx-gram.at: New tests for GLR parsing.
15426
15427 * tests/testsuite.at: Include cxx-gram.at.
15428
15429 * tests/Makefile.am: Add cxx-gram.at.
15430
15431 * src/parse-gram.y:
15432
15433 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
15434
15435 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
15436
15437 2002-06-27 Akim Demaille <akim@epita.fr>
15438
15439 * src/options.h, src/options.c: Remove.
15440 * src/getargs.c (short_options, long_options): New.
15441
15442 2002-06-27 Akim Demaille <akim@epita.fr>
15443
15444 * data/bison.simple, data/bison.c++: Rename as...
15445 * data/yacc.c, data/lalr1.cc: these.
15446 * doc/bison.texinfo (Environment Variables): Remove.
15447
15448 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
15449
15450 * src/getargs.c (report_argmatch): Initialize strtok().
15451
15452 2002-06-20 Akim Demaille <akim@epita.fr>
15453
15454 * data/bison.simple (b4_symbol_actions): New, replaces...
15455 (b4_symbol_destructor, b4_symbol_printer): these.
15456 (yysymprint): Be sure to call YYPRINT only for tokens, and using
15457 user token numbers.
15458
15459 2002-06-20 Akim Demaille <akim@epita.fr>
15460
15461 * data/bison.simple (yydestructor): Rename as...
15462 (yydestruct): this.
15463
15464 2002-06-20 Akim Demaille <akim@epita.fr>
15465
15466 * src/symtab.h, src/symtab.c (symbol_type_set)
15467 (symbol_destructor_set, symbol_precedence_set): The location is
15468 the last argument.
15469 Adjust all callers.
15470
15471 2002-06-20 Akim Demaille <akim@epita.fr>
15472
15473 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
15474 internals.
15475 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
15476 Takes a location.
15477 * src/symtab.h, src/symtab.c (symbol_class_set)
15478 (symbol_user_token_number_set): Likewise.
15479 Adjust all callers.
15480 Promote complain_at.
15481 * tests/input.at (Type Clashes): Adjust.
15482
15483 2002-06-20 Akim Demaille <akim@epita.fr>
15484
15485 * data/bison.simple (YYLEX): Fix the declaration when
15486 %pure-parser.
15487
15488 2002-06-20 Akim Demaille <akim@epita.fr>
15489
15490 * data/bison.simple (yysymprint): Don't print the token number,
15491 just its name.
15492 * tests/actions.at (Destructors): Rename as...
15493 (Printers and Destructors): this.
15494 Also exercise %printer.
15495
15496 2002-06-20 Akim Demaille <akim@epita.fr>
15497
15498 * data/bison.simple (YYDSYMPRINT): New.
15499 Use it to remove many of the #if YYDEBUG/if (yydebug).
15500
15501 2002-06-20 Akim Demaille <akim@epita.fr>
15502
15503 * src/symtab.h, src/symtab.c (symbol_t): printer and
15504 printer_location are new members.
15505 (symbol_printer_set): New.
15506 * src/parse-gram.y (PERCENT_PRINTER): New token.
15507 Handle its associated rule.
15508 * src/scan-gram.l: Adjust.
15509 (handle_destructor_at, handle_destructor_dollar): Rename as...
15510 (handle_symbol_code_at, handle_symbol_code_dollar): these.
15511 * src/output.c (symbol_printers_output): New.
15512 (output_skeleton): Call it.
15513 * data/bison.simple (yysymprint): New. Cannot be named yyprint
15514 since there are already many grammar files with a user `yyprint'.
15515 Replace the calls to YYPRINT to calls to yysymprint.
15516 * tests/calc.at: Adjust.
15517 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
15518 taking advantage of parser very internal details (stack size!).
15519
15520 2002-06-20 Akim Demaille <akim@epita.fr>
15521
15522 * src/scan-gram.l: Complete the scanner with the missing patterns
15523 to pacify Flex.
15524 Use `quote' and `symbol_tag_get' where appropriate.
15525
15526 2002-06-19 Akim Demaille <akim@epita.fr>
15527
15528 * tests/actions.at (Destructors): Augment to test locations.
15529 * data/bison.simple (yydestructor): Pass it the current location
15530 if locations are enabled.
15531 Prototype only when __STDC__ or C++.
15532 Change the argument names to move into the yy name space: there is
15533 user code here.
15534
15535 2002-06-19 Akim Demaille <akim@epita.fr>
15536
15537 * data/bison.simple (b4_pure_if): New.
15538 Use it instead of #ifdef YYPURE.
15539
15540 2002-06-19 Akim Demaille <akim@epita.fr>
15541
15542 * data/bison.simple (b4_location_if): New.
15543 Use it instead of #ifdef YYLSP_NEEDED.
15544
15545 2002-06-19 Akim Demaille <akim@epita.fr>
15546
15547 Prepare @$ in %destructor, but currently don't bind it in the
15548 skeleton, as %location use is not cleaned up yet.
15549
15550 * src/scan-gram.l (handle_dollar, handle_destructor_at)
15551 (handle_action_at): New.
15552 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
15553 a braced_code_t and a location as additional arguments.
15554 (handle_destructor_dollar): Instead of requiring `b4_eval', just
15555 unquote one when outputting `b4_dollar_dollar'.
15556 Adjust callers.
15557 * data/bison.simple (b4_eval): Remove.
15558 (b4_symbol_destructor): Adjust.
15559 * tests/input.at (Invalid @n): Adjust.
15560
15561 2002-06-19 Zack Weinberg <zack@codesourcery.com>
15562
15563 * doc/bison.texinfo: Document ability to have multiple
15564 prologue sections.
15565
15566 2002-06-18 Akim Demaille <akim@epita.fr>
15567
15568 * src/files.c (compute_base_names): When computing the output file
15569 names from the input file name, strip the directory part.
15570
15571 2002-06-18 Akim Demaille <akim@epita.fr>
15572
15573 * data/bison.simple.new: Comment changes.
15574 Reported by Andreas Schwab.
15575
15576 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
15577
15578 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
15579 there are no `label `yyoverflowlab' defined but not used' warnings
15580 when yyoverflow is defined.
15581
15582 2002-06-18 Akim Demaille <akim@epita.fr>
15583
15584 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
15585 new member.
15586 (symbol_destructor_set): Adjust.
15587 * src/output.c (symbol_destructors_output): Output the destructor
15588 locations.
15589 Output the symbol name.
15590 * data/bison.simple (b4_symbol_destructor): Adjust.
15591
15592 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
15593 and Akim Demaille <akim@epita.fr>
15594
15595 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
15596 what's left on the stack when the error recovery hits EOF.
15597 * tests/actions.at (Destructors): Complete to exercise this case.
15598
15599 2002-06-17 Akim Demaille <akim@epita.fr>
15600
15601 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
15602 arguments is really empty, not only equal to `[]'.
15603 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
15604 member.
15605 (symbol_destructor_set): New.
15606 * src/output.c (symbol_destructors_output): New.
15607 * src/reader.h (brace_code_t, current_braced_code): New.
15608 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
15609 (handle_dollar): Rename as...
15610 (handle_action_dollar): this.
15611 (handle_destructor_dollar): New.
15612 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
15613 (grammar_declaration): Use it.
15614 * data/bison.simple (yystos): Is always defined.
15615 (yydestructor): New.
15616 * tests/actions.at (Destructors): New.
15617 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
15618
15619 2002-06-17 Akim Demaille <akim@epita.fr>
15620
15621 * src/symlist.h, src/symlist.c (symbol_list_length): New.
15622 * src/scan-gram.l (handle_dollar, handle_at): Compute the
15623 rule_length only when needed.
15624 * src/output.c (actions_output, token_definitions_output): Output
15625 the full M4 block.
15626 * src/symtab.c: Don't access directly to the symbol tag, use
15627 symbol_tag_get.
15628 * src/parse-gram.y: Use symbol_list_free.
15629
15630 2002-06-17 Akim Demaille <akim@epita.fr>
15631
15632 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
15633 (symbol_list_prepend, get_type_name): Move to...
15634 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
15635 (symbol_list_prepend, symbol_list_n_type_name_get): here.
15636 Adjust all callers.
15637 (symbol_list_free): New.
15638 * src/scan-gram.l (handle_dollar): Takes a location.
15639 * tests/input.at (Invalid $n): Adjust.
15640
15641 2002-06-17 Akim Demaille <akim@epita.fr>
15642
15643 * src/reader.h, src/reader.c (symbol_list_new): Export it.
15644 (symbol_list_prepend): New.
15645 * src/parse-gram.y (%union): `list' is a new member.
15646 (symbols.1): New, replaces...
15647 (terms_to_prec.1, nterms_to_type.1): these.
15648 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
15649 Take a location as additional argument.
15650 Adjust all callers.
15651
15652 2002-06-15 Akim Demaille <akim@epita.fr>
15653
15654 * src/parse-gram.y: Move %token in the declaration section so that
15655 we don't depend upon CVS Bison.
15656
15657 2002-06-15 Akim Demaille <akim@epita.fr>
15658
15659 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
15660 * src/print.c (print_core): Use it.
15661
15662 2002-06-15 Akim Demaille <akim@epita.fr>
15663
15664 * src/conflicts.c (log_resolution): Accept the rule involved in
15665 the sr conflicts instead of the lookahead number that points to
15666 that rule.
15667 (flush_reduce): Accept the current lookahead vector as argument,
15668 instead of the index in LA.
15669 (resolve_sr_conflict): Accept the current number of lookahead
15670 bitset to consider for the STATE, instead of the index in LA.
15671 (set_conflicts): Adjust.
15672 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
15673
15674 2002-06-15 Akim Demaille <akim@epita.fr>
15675
15676 * src/state.h (state_t): Replace the `lookaheadsp' member, a
15677 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
15678 Adjust all dependencies.
15679 * src/lalr.c (initialize_lookaheads): Split into...
15680 (states_lookaheads_count, states_lookaheads_initialize): these.
15681 (lalr): Adjust.
15682
15683 2002-06-15 Akim Demaille <akim@epita.fr>
15684
15685 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
15686 out of...
15687 (grammar_rules_print): here.
15688 * src/reduce.c (reduce_output): Use it.
15689 * tests/reduce.at (Useless Rules, Reduced Automaton)
15690 (Underivable Rules): Adjust.
15691
15692 2002-06-15 Akim Demaille <akim@epita.fr>
15693
15694 Copy BYacc's nice way to report the grammar.
15695
15696 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
15697 New.
15698 Don't print the rules' location, it is confusing and useless.
15699 (rule_print): Use grammar_rhs_print.
15700 * src/print.c (print_grammar): Use grammar_rules_print.
15701
15702 2002-06-15 Akim Demaille <akim@epita.fr>
15703
15704 Complete and rationalize `useless thing' warnings.
15705
15706 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
15707 (symbol_tag_print): New.
15708 Use them everywhere in place of accessing directly the tag member.
15709 * src/gram.h, src/gram.c (rule_print): New.
15710 Use it where a rule used to be printed `by hand'.
15711 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
15712 (reduce_grammar_tables): Report the useless rules.
15713 (reduce_print): Useless things are a warning, not an error.
15714 Report it as such.
15715 * tests/reduce.at (Useless Nonterminals, Useless Rules):
15716 (Reduced Automaton, Underivable Rules): Adjust.
15717 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
15718 * tests/conflicts.at (Unresolved SR Conflicts)
15719 (Solved SR Conflicts): Adjust.
15720
15721 2002-06-15 Akim Demaille <akim@epita.fr>
15722
15723 Let symbols have a location.
15724
15725 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
15726 (getsym): Adjust.
15727 Adjust all callers.
15728 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
15729 Use location_t, not int.
15730 * src/symtab.c (symbol_check_defined): Take advantage of the
15731 location.
15732 * tests/regression.at (Invalid inputs): Adjust.
15733
15734 2002-06-15 Akim Demaille <akim@epita.fr>
15735
15736 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
15737 (input): Don't try to initialize yylloc here, do it in the
15738 scanner.
15739 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
15740 * src/gram.h (rule_t): Change line and action_line into location
15741 and action_location, of location_t type.
15742 Adjust all dependencies.
15743 * src/location.h, src/location.c (empty_location): New.
15744 * src/reader.h, src/reader.c (grammar_start_symbol_set)
15745 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
15746 (grammar_current_rule_symbol_append)
15747 (grammar_current_rule_action_append): Expect a location as argument.
15748 * src/reader.c (grammar_midrule_action): Adjust to attach an
15749 action's location as dummy symbol location.
15750 * src/symtab.h, src/symtab.c (startsymbol_location): New.
15751 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
15752 the line numbers.
15753
15754 2002-06-14 Akim Demaille <akim@epita.fr>
15755
15756 Grammar declarations may be found in the grammar section.
15757
15758 * src/parse-gram.y (rules_or_grammar_declaration): New.
15759 (declarations): Each declaration may end with a semicolon, not
15760 just...
15761 (grammar_declaration): `"%union"'.
15762 (grammar): Branch to rules_or_grammar_declaration.
15763
15764 2002-06-14 Akim Demaille <akim@epita.fr>
15765
15766 * src/main.c (main): Invoke scanner_free.
15767
15768 2002-06-14 Akim Demaille <akim@epita.fr>
15769
15770 * src/output.c (m4_invoke): Extracted from...
15771 (output_skeleton): here.
15772 Free tempfile.
15773
15774 2002-06-14 Akim Demaille <akim@epita.fr>
15775
15776 * src/parse-gram.y (directives, directive, gram)
15777 (grammar_directives, precedence_directives, precedence_directive):
15778 Rename as...
15779 (declarations, declaration, grammar, grammar_declaration)
15780 (precedence_declaration, precedence_declarator): these.
15781 (symbol_declaration): New.
15782
15783 2002-06-14 Akim Demaille <akim@epita.fr>
15784
15785 * src/files.c (action_obstack): Remove, unused.
15786 (output_obstack): Remove it, and all its dependencies, as it is no
15787 longer needed.
15788 * src/reader.c (epilogue_set): Build the epilogue in the
15789 muscle_obstack.
15790 * src/output.h, src/output.c (muscle_obstack): Move to...
15791 * src/muscle_tab.h, src/muscle_tab.h: here.
15792 (muscle_init): Initialize muscle_obstack.
15793 (muscle_free): New.
15794 * src/main.c (main): Call it.
15795
15796 2002-06-14 Akim Demaille <akim@epita.fr>
15797
15798 * src/location.h: New, extracted from...
15799 * src/reader.h: here.
15800 * src/Makefile.am (noinst_HEADERS): Merge into
15801 (bison_SOURCES): this.
15802 Add location.h.
15803 * src/parse-gram.y: Use location_t instead of Bison's.
15804 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
15805 Use location_t instead of ints.
15806
15807 2002-06-14 Akim Demaille <akim@epita.fr>
15808
15809 * data/bison.simple, data/bison.c++: Be sure to restore the
15810 current #line when returning to the skeleton contents after having
15811 exposed the input file's #line.
15812
15813 2002-06-12 Akim Demaille <akim@epita.fr>
15814
15815 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
15816 eager.
15817 * tests/actions.at (Exotic Dollars): New.
15818
15819 2002-06-12 Akim Demaille <akim@epita.fr>
15820
15821 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
15822 ['"/] too eagerly.
15823 * tests/input.at (Torturing the Scanner): New.
15824
15825 2002-06-11 Akim Demaille <akim@epita.fr>
15826
15827 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
15828 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
15829 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
15830 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
15831 * src/reader.c (reader): Use it.
15832
15833 2002-06-11 Akim Demaille <akim@epita.fr>
15834
15835 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
15836 Adjust all callers.
15837 (scanner_last_string_free): New.
15838
15839 2002-06-11 Akim Demaille <akim@epita.fr>
15840
15841 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
15842 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
15843 (last_string, YY_OBS_FREE): New.
15844 Use them when returning an ID.
15845
15846 2002-06-11 Akim Demaille <akim@epita.fr>
15847
15848 Have Bison grammars parsed by a Bison grammar.
15849
15850 * src/reader.c, src/reader.h (prologue_augment): New.
15851 * src/reader.c (copy_definition): Remove.
15852
15853 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
15854 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
15855 (grammar_current_rule_prec_set, grammar_current_rule_check)
15856 (grammar_current_rule_symbol_append)
15857 (grammar_current_rule_action_append): Export.
15858 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
15859 (symbol_list_action_append): Remove.
15860 Hook the routines from reader.
15861 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
15862 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
15863
15864 * src/reader.c (read_declarations): Remove, unused.
15865
15866 * src/parse-gram.y: Handle the epilogue.
15867 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
15868 (grammar_start_symbol_set): this.
15869 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
15870 * src/reader.c (readgram): Remove, unused.
15871 (reader): Adjust to insert eoftoken and axiom where appropriate.
15872
15873 * src/reader.c (copy_dollar): Replace with...
15874 * src/scan-gram.h (handle_dollar): this.
15875 * src/parse-gram.y: Remove `%thong'.
15876
15877 * src/reader.c (copy_at): Replace with...
15878 * src/scan-gram.h (handle_at): this.
15879
15880 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
15881 New.
15882
15883 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
15884 time being.
15885
15886 * src/reader.h, src/reader.c (grammar_rule_end): New.
15887
15888 * src/parse.y (current_type, current_class): New.
15889 Implement `%nterm', `%token' support.
15890 Merge `%term' into `%token'.
15891 (string_as_id): New.
15892 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
15893 type name.
15894
15895 * src/parse-gram.y: Be sure to handle properly the beginning of
15896 rules.
15897
15898 * src/parse-gram.y: Handle %type.
15899 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
15900
15901 * src/parse-gram.y: More directives support.
15902 * src/options.c: No longer handle source directives.
15903
15904 * src/parse-gram.y: Fix %output.
15905
15906 * src/parse-gram.y: Handle %union.
15907 Use the prologue locations.
15908 * src/reader.c (parse_union_decl): Remove.
15909
15910 * src/reader.h, src/reader.c (epilogue_set): New.
15911 * src/parse-gram.y: Use it.
15912
15913 * data/bison.simple, data/bison.c++: b4_stype is now either not
15914 defined, then default to int, or to the contents of %union,
15915 without `union' itself.
15916 Adjust.
15917 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
15918
15919 * src/output.c (actions_output): Don't output braces, as they are
15920 already handled by the scanner.
15921
15922 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
15923 characters to themselves.
15924
15925 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
15926 that the epilogue has a proper #line.
15927
15928 * src/parse-gram.y: Handle precedence/associativity.
15929
15930 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
15931 a terminal.
15932 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
15933 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
15934 at all to define terminals that cannot be emitted.
15935
15936 * src/scan-gram.l: Escape M4 characters.
15937
15938 * src/scan-gram.l: Working properly with escapes in user
15939 strings/characters.
15940
15941 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
15942 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
15943 grammar.
15944 Use more modest sizes, as for the time being the parser does not
15945 release memory, and therefore the process swallows a huge amount
15946 of memory.
15947
15948 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
15949 stricter %token grammar.
15950
15951 * src/symtab.h (associativity): Add `undef_assoc'.
15952 (symbol_precedence_set): Do nothing when passed an undef_assoc.
15953 * src/symtab.c (symbol_check_alias_consistence): Adjust.
15954
15955 * tests/regression.at (Invalid %directive): Remove, as it is now
15956 meaningless.
15957 (Invalid inputs): Adjust to the new error messages.
15958 (Token definitions): The new grammar doesn't allow too many
15959 eccentricities.
15960
15961 * src/lex.h, src/lex.c: Remove.
15962 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
15963 (copy_character, copy_string2, copy_string, copy_identifier)
15964 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
15965 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
15966 (parse_action): Remove.
15967 * po/POTFILES.in: Adjust.
15968
15969 2002-06-11 Akim Demaille <akim@epita.fr>
15970
15971 * src/reader.c (parse_action): Don't store directly into the
15972 rule's action member: return the action as a string.
15973 Don't require `rule_length' as an argument: compute it.
15974 (grammar_current_rule_symbol_append)
15975 (grammar_current_rule_action_append): New, eved out from
15976 (readgram): here.
15977 Remove `action_flag', `rulelength', unused now.
15978
15979 2002-06-11 Akim Demaille <akim@epita.fr>
15980
15981 * src/reader.c (grammar_current_rule_prec_set).
15982 (grammar_current_rule_check): New, eved out from...
15983 (readgram): here.
15984 Remove `xaction', `first_rhs': useless.
15985 * tests/input.at (Type clashes): New.
15986 * tests/existing.at (GNU Cim Grammar): Adjust.
15987
15988 2002-06-11 Akim Demaille <akim@epita.fr>
15989
15990 * src/reader.c (grammar_midrule_action): New, Eved out from
15991 (readgram): here.
15992
15993 2002-06-11 Akim Demaille <akim@epita.fr>
15994
15995 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
15996 New.
15997 (readgram): Use them as replacement of inlined code, crule and
15998 crule1.
15999
16000 2002-06-11 Akim Demaille <akim@epita.fr>
16001
16002 * src/reader.c (grammar_end, grammar_symbol_append): New.
16003 (readgram): Use them.
16004 Make the use of `p' as local as possible.
16005
16006 2002-06-10 Akim Demaille <akim@epita.fr>
16007
16008 GCJ's parser requires the tokens to be defined before the prologue.
16009
16010 * data/bison.simple: Output the token definition before the user's
16011 prologue.
16012 * tests/regression.at (Braces parsing, Duplicate string)
16013 (Mixing %token styles): Check the output from bison.
16014 (Early token definitions): New.
16015
16016 2002-06-10 Akim Demaille <akim@epita.fr>
16017
16018 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16019 assigning twice the same user number to a token, so that we can
16020 use it in...
16021 * src/lex.c (lex): here.
16022 Also use `symbol_class_set' instead of hand written code.
16023 * src/reader.c (parse_assoc_decl): Likewise.
16024
16025 2002-06-10 Akim Demaille <akim@epita.fr>
16026
16027 * src/symtab.c, src/symtab.c (symbol_class_set)
16028 (symbol_user_token_number_set): New.
16029 * src/reader.c (parse_token_decl): Use them.
16030 Use a switch instead of ifs.
16031 Use a single argument.
16032
16033 2002-06-10 Akim Demaille <akim@epita.fr>
16034
16035 Remove `%thong' support as it is undocumented, unused, duplicates
16036 `%token's job, and creates useless e-mail traffic with people who
16037 want to know what it is, why it is undocumented, unused, and
16038 duplicates `%token's job.
16039
16040 * src/reader.c (parse_thong_decl): Remove.
16041 * src/options.c (option_table): Remove "thong".
16042 * src/lex.h (tok_thong): Remove.
16043
16044 2002-06-10 Akim Demaille <akim@epita.fr>
16045
16046 * src/symtab.c, src/symtab.c (symbol_type_set)
16047 (symbol_precedence_set): New.
16048 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16049 (value_components_used): Remove, unused.
16050
16051 2002-06-09 Akim Demaille <akim@epita.fr>
16052
16053 Move symbols handling code out of the reader.
16054
16055 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16056 (axiom): Move to...
16057 * src/symtab.h, src/symtab.c: here.
16058
16059 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16060 * src/reader.c (startval): Rename as...
16061 * src/symtab.h, src/symtab.c (startsymbol): this.
16062 * src/reader.c: Adjust.
16063
16064 * src/reader.c (symbol_check_defined, symbol_make_alias)
16065 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16066 (token_translations_init)
16067 Move to...
16068 * src/symtab.c: here.
16069 * src/reader.c (packsymbols): Move to...
16070 * src/symtab.h, src/symtab.c (symbols_pack): here.
16071 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16072 argument.
16073
16074 2002-06-03 Akim Demaille <akim@epita.fr>
16075
16076 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16077 then statements.
16078
16079 2002-06-03 Akim Demaille <akim@epita.fr>
16080
16081 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16082 structs with non literals.
16083 * src/scan-skel.l: never-interactive.
16084 * src/conflicts.c (enum conflict_resolution_e): No trailing
16085 comma.
16086 * src/getargs.c (usage): Split long literal strings.
16087 Reported by Hans Aberg.
16088
16089 2002-05-28 Akim Demaille <akim@epita.fr>
16090
16091 * data/bison.c++: Use C++ ostreams.
16092 (cdebug_): New member.
16093
16094 2002-05-28 Akim Demaille <akim@epita.fr>
16095
16096 * src/output.c (output_skeleton): Be sure to allocate enough room
16097 for `/' _and_ for `\0' in full_skeleton.
16098
16099 2002-05-28 Akim Demaille <akim@epita.fr>
16100
16101 * data/bison.c++: Catch up with bison.simple:
16102 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16103 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16104 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16105 and popping traces.
16106
16107 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16108
16109 * src/output.c (output_skeleton): Put an explicit path in front of
16110 the skeleton file name, rather than relying on the -I directory,
16111 to partially alleviate effects of having a skeleton file lying around
16112 in the current directory.
16113
16114 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16115
16116 * src/conflicts.c (log_resolution): Correct typo:
16117 obstack_printf should be obstack_fgrow1.
16118
16119 2002-05-26 Akim Demaille <akim@epita.fr>
16120
16121 * src/state.h (state_t): `solved_conflicts' is a new member.
16122 * src/LR0.c (new_state): Set it to 0.
16123 * src/conflicts.h, src/conflicts.c (print_conflicts)
16124 (free_conflicts, solve_conflicts): Rename as...
16125 (conflicts_print, conflicts_free, conflicts_solve): these.
16126 Adjust callers.
16127 * src/conflicts.c (enum conflict_resolution_e)
16128 (solved_conflicts_obstack): New, used by...
16129 (log_resolution): this.
16130 Adjust to attach the conflict resolution to each state.
16131 Complete the description with the precedence/associativity
16132 information.
16133 (resolve_sr_conflict): Adjust.
16134 * src/print.c (print_state): Output its solved_conflicts.
16135 * tests/conflicts.at (Unresolved SR Conflicts)
16136 (Solved SR Conflicts): Exercise --report=all.
16137
16138 2002-05-26 Akim Demaille <akim@epita.fr>
16139
16140 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16141 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16142 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16143 (token_number_t, item_number_as_token_number)
16144 (token_number_as_item_number, muscle_insert_token_number_table):
16145 Rename as...
16146 (symbol_number_t, item_number_as_symbol_number)
16147 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16148 these, since it is more appropriate.
16149
16150 2002-05-26 Akim Demaille <akim@epita.fr>
16151
16152 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16153 `Error:' lines.
16154 * data/bison.simple (yystos) [YYDEBUG]: New.
16155 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16156 error recovery.
16157 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16158
16159 2002-05-25 Akim Demaille <akim@epita.fr>
16160
16161 * doc/bison.texinfo (Debugging): Split into...
16162 (Tracing): this new section, its former contents, and...
16163 (Understanding): this new section.
16164 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16165 by...
16166 (report_flag): this.
16167 Adjust all dependencies.
16168 (report_args, report_types, report_argmatch): New.
16169 (usage, getargs): Report/support -r, --report.
16170 * src/options.h
16171 (struct option_table_struct): Rename as..,
16172 (struct option_table_s): this.
16173 Rename the `set_flag' member to `flag' to match with getopt_long's
16174 struct.
16175 * src/options.c (option_table): Split verbose into an entry for
16176 %verbose, and another for --verbose.
16177 Support --report/-r, so remove -r from the obsolete --raw.
16178 * src/print.c: Attach full item sets and lookaheads reports to
16179 report_flag instead of trace_flag.
16180 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16181
16182 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16183 and Paul Eggert <eggert@twinsun.com>
16184
16185 * data/bison.simple (yyparse): Correct error handling to conform to
16186 POSIX and yacc. Specifically, after syntax error is discovered,
16187 do not reduce further before shifting the error token.
16188 Clean up the code a bit by removing the labels yyerrdefault,
16189 yyerrhandle, yyerrpop.
16190 * NEWS: Document the above.
16191
16192 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16193
16194 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16195 type; it isn't always big enough, since it doesn't necessarily
16196 include non-terminals.
16197 (yytranslate): Expand definition of yy_token_number_type, so that
16198 the latter can be removed.
16199 (yy_token_number_type): Remove, only one use.
16200 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16201 don't use TokenNumberType as element type.
16202
16203 * tests/regression.at: Modify expected output to agree with change
16204 to yyr1 and yytranslate.
16205
16206 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16207
16208 * src/reader.c (parse_action): Use copy_character instead of
16209 obstack_1grow.
16210
16211 2002-05-13 Akim Demaille <akim@epita.fr>
16212
16213 * tests/regression.at (Token definitions): Prototype yylex and
16214 yyerror.
16215
16216 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16217
16218 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
16219 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16220 32-bit arithmetic.
16221 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16222
16223 2002-05-07 Akim Demaille <akim@epita.fr>
16224
16225 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16226 avoid GCC warnings.
16227
16228 2002-05-07 Akim Demaille <akim@epita.fr>
16229
16230 Kill GCC warnings.
16231
16232 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16233 over the RHS of each rule.
16234 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16235 * src/state.h (state_t): Member `nitems' is unsigned short.
16236 * src/LR0.c (get_state): Adjust.
16237 * src/reader.c (packgram): Likewise.
16238 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16239 `Type'.
16240 (muscle_insert_int_table): Remove, unused.
16241 (prepare_rules): Remove `max'.
16242
16243 2002-05-06 Akim Demaille <akim@epita.fr>
16244
16245 * src/closure.c (print_firsts): Display of the symbol tags.
16246 (bitmatrix_print): Move to...
16247 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16248 here.
16249 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16250
16251 2002-05-06 Akim Demaille <akim@epita.fr>
16252
16253 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16254 hash_do_for_each.
16255
16256 2002-05-06 Akim Demaille <akim@epita.fr>
16257
16258 * src/LR0.c (new_state, get_state): Instead of using the global
16259 `kernel_size' and `kernel_base', have two new arguments:
16260 `core_size' and `core'.
16261 Adjust callers.
16262
16263 2002-05-06 Akim Demaille <akim@epita.fr>
16264
16265 * src/reader.c (packgram): No longer end `ritem' with a 0
16266 sentinel: it is not used.
16267
16268 2002-05-05 Akim Demaille <akim@epita.fr>
16269
16270 New experimental feature: display the lookaheads in the report and
16271 graph.
16272
16273 * src/print (print_core): When --trace-flag, display the rules
16274 lookaheads.
16275 * src/print_graph.c (print_core): Likewise.
16276 Swap the arguments.
16277 Adjust caller.
16278
16279 2002-05-05 Akim Demaille <akim@epita.fr>
16280
16281 * tests/torture.at (Many lookaheads): New test.
16282
16283 2002-05-05 Akim Demaille <akim@epita.fr>
16284
16285 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16286 (GENERATE_MUSCLE_INSERT_TABLE): this.
16287 (output_int_table, output_unsigned_int_table, output_short_table)
16288 (output_token_number_table, output_item_number_table): Replace with...
16289 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16290 (muscle_insert_short_table, muscle_insert_token_number_table)
16291 (muscle_insert_item_number_table): these.
16292 Adjust all callers.
16293 (prepare_tokens): Don't free `translations', since...
16294 * src/reader.h, src/reader.c (grammar_free): do it.
16295 Move to...
16296 * src/gram.h, src/gram.c (grammar_free): here.
16297 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16298 b4_translate_max.
16299
16300 2002-05-05 Akim Demaille <akim@epita.fr>
16301
16302 * src/output.c (output_unsigned_int_table): New.
16303 (prepare_rules): `i' is unsigned.
16304 `prhs', `rline', `r2' are unsigned int.
16305 Rename muscle `rhs_number_max' as `rhs_max'.
16306 Output muscles `prhs_max', `rline_max', and `r2_max'.
16307 Free rline and r1.
16308 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16309 to compute types instead of constant types.
16310 * tests/regression.at (Web2c Actions): Adjust.
16311
16312 2002-05-04 Akim Demaille <akim@epita.fr>
16313
16314 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16315 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16316 Adjust dependencies.
16317 * src/output.c (token_definitions_output): Be sure not to output a
16318 `#define 'a'' when fed with `%token 'a' "a"'.
16319 * tests/regression.at (Token definitions): New.
16320
16321 2002-05-03 Paul Eggert <eggert@twinsun.com>
16322
16323 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16324 for K&R C.
16325
16326 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16327
16328 * Makefile.am (SUBDIRS): Remove intl.
16329 (EXTRA_DIST): Add config/config.rpath.
16330
16331 2002-05-03 Akim Demaille <akim@epita.fr>
16332
16333 * data/bison.simple (m4_if): Don't output empty enums.
16334 And actually, output valid enum definitions :(.
16335
16336 2002-05-03 Akim Demaille <akim@epita.fr>
16337
16338 * configure.bat: Remove, completely obsolete.
16339 * Makefile.am (EXTRA_DIST): Adjust.
16340 Don't distribute config.rpath...
16341 * config/Makefile.am (EXTRA_DIST): Do it.
16342
16343 2002-05-03 Akim Demaille <akim@epita.fr>
16344
16345 * configure.in (GETTEXT_VERSION): New.
16346 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16347
16348 2002-05-03 Akim Demaille <akim@epita.fr>
16349
16350 * data/bison.simple (b4_token_enum): New.
16351 (b4_token_defines): Use it to output tokens both as #define and
16352 enums.
16353 Suggested by Paul Eggert.
16354 * src/output.c (token_definitions_output): Don't output spurious
16355 white spaces.
16356
16357 2002-05-03 Akim Demaille <akim@epita.fr>
16358
16359 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16360
16361 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
16362
16363 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
16364 Update the stack class, give a try to deque as the default container.
16365
16366 2002-05-02 Akim Demaille <akim@epita.fr>
16367
16368 * data/bison.simple (yyparse): Do not implement @$ = @1.
16369 (YYLLOC_DEFAULT): Adjust to do it.
16370 * doc/bison.texinfo (Location Default Action): Fix.
16371
16372 2002-05-02 Akim Demaille <akim@epita.fr>
16373
16374 * src/reader.c (parse_braces): Merge into...
16375 (parse_action): this.
16376
16377 2002-05-02 Akim Demaille <akim@epita.fr>
16378
16379 * configure.in (ALL_LINGUAS): Remove.
16380 * po/LINGUAS, hr.po: New.
16381
16382 2002-05-02 Akim Demaille <akim@epita.fr>
16383
16384 Remove the so called hairy (semantic) parsers.
16385
16386 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
16387 * src/gram.h, src/gram.c (semantic_parser): Remove.
16388 (rule_t): Remove the guard and guard_line members.
16389 * src/lex.h (token_t): remove tok_guard.
16390 * src/options.c (option_table): Remove %guard and %semantic_parser
16391 support.
16392 * src/output.c, src/output.h (guards_output): Remove.
16393 (prepare): Adjust.
16394 (token_definitions_output): Don't output the `T'
16395 tokens (???).
16396 (output_skeleton): Don't output the guards.
16397 * src/files.c, src/files.c (attrsfile): Remove.
16398 * src/reader.c (symbol_list): Remove the guard and guard_line
16399 members.
16400 Adjust dependencies.
16401 (parse_guard): Remove.
16402 * data/bison.hairy: Remove.
16403 * doc/bison.texinfo (Environment Variables): Remove occurrences of
16404 BISON_HAIRY.
16405
16406 2002-05-02 Akim Demaille <akim@epita.fr>
16407
16408 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
16409 (parse_guard): Rename the formal argument `stack_offset' as
16410 `rule_length', which is more readable.
16411 Adjust callers.
16412 (copy_at, copy_dollar): Instead of outputting the hard coded
16413 values of $$, $n and so forth, output invocation to b4_lhs_value,
16414 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
16415 Note: this patch partially drops `semantic-parser' support: it
16416 always does `rule_length - n', where semantic parsers ought to
16417 always use `-n'.
16418 * data/bison.simple, data/bison.c++ (b4_lhs_value)
16419 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
16420
16421 2002-05-02 Akim Demaille <akim@epita.fr>
16422
16423 * configure.in (AC_INIT): Bump to 1.49b.
16424 (AM_INIT_AUTOMAKE): Short invocation.
16425
16426 2002-05-02 Akim Demaille <akim@epita.fr>
16427
16428 Version 1.49a.
16429
16430 2002-05-01 Akim Demaille <akim@epita.fr>
16431
16432 * src/skeleton.h: Remove.
16433
16434 2002-05-01 Akim Demaille <akim@epita.fr>
16435
16436 * src/skeleton.h: Fix the #endif.
16437 Reported by Magnus Fromreide.
16438
16439 2002-04-26 Paul Eggert <eggert@twinsun.com>
16440
16441 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
16442 Define if we define YYSTYPE and YYLTYPE, respectively.
16443 (YYCOPY): Fix [] quoting problem in the non-GCC case.
16444
16445 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
16446
16447 * src/scan-skel.l: Postprocess quadrigraphs.
16448
16449 * src/reader.c (copy_character): New function, used to output
16450 single characters while replacing `[' and `]' with quadrigraphs, to
16451 avoid troubles with M4 quotes.
16452 (copy_comment): Output characters with copy_character.
16453 (read_additionnal_code): Likewise.
16454 (copy_string2): Likewise.
16455 (copy_definition): Likewise.
16456
16457 * tests/calc.at: Exercise M4 quoting.
16458
16459 2002-04-25 Akim Demaille <akim@epita.fr>
16460
16461 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
16462 between `!' and the command.
16463 Reported by Paul Eggert.
16464
16465 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
16466
16467 * tests/calc.at: Exercise prologue splitting.
16468
16469 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
16470 `b4_post_prologue' instead of `b4_prologue'.
16471
16472 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
16473 muscles.
16474 (output): Free pre_prologue_obstack and post_prologue_obstack.
16475 * src/files.h, src/files.c (attrs_obstack): Remove.
16476 (pre_prologue_obstack, post_prologue_obstack): New.
16477 * src/reader.c (copy_definition): Add a parameter to specify the
16478 obstack to fill, instead of using attrs_obstack unconditionally.
16479 (read_declarations): Pass pre_prologue_obstack to copy_definition if
16480 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
16481
16482 2002-04-23 Paul Eggert <eggert@twinsun.com>
16483
16484 * data/bison.simple: Remove unnecessary commentary and white
16485 space differences from 1_29-branch.
16486 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
16487
16488 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
16489 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
16490 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
16491 constructors or destructors.
16492
16493 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
16494
16495 2002-04-23 Akim Demaille <akim@epita.fr>
16496
16497 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
16498 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
16499 location with columns.
16500 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
16501 All reported by Paul Eggert.
16502
16503 2002-04-22 Akim Demaille <akim@epita.fr>
16504
16505 * src/reduce.c (dump_grammar): Move to...
16506 * src/gram.h, src/gram.c (grammar_dump): here.
16507 Be sure to separate long item numbers.
16508 Don't read the members of a rule's prec if its nil.
16509
16510 2002-04-22 Akim Demaille <akim@epita.fr>
16511
16512 * src/output.c (table_size, table_grow): New.
16513 (MAXTABLE): Remove, replace uses with table_size.
16514 (pack_vector): Instead of dying when the table is too big, grow it.
16515
16516 2002-04-22 Akim Demaille <akim@epita.fr>
16517
16518 * data/bison.simple (yyr1): Its type is that of a token number.
16519 * data/bison.c++ (r1_): Likewise.
16520 * tests/regression.at (Web2c Actions): Adjust.
16521
16522 2002-04-22 Akim Demaille <akim@epita.fr>
16523
16524 * src/reader.c (token_translations_init): 256 is now the default
16525 value for the error token, i.e., it will be assigned another
16526 number if the user assigned 256 to one of her tokens.
16527 (reader): Don't force 256 to error.
16528 * doc/bison.texinfo (Symbols): Adjust.
16529 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
16530 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
16531 etc. instead of 10, 20, 30 (which was used to `jump' over error
16532 (256) and undefined (2)).
16533
16534 2002-04-22 Akim Demaille <akim@epita.fr>
16535
16536 Propagate more token_number_t.
16537
16538 * src/gram.h (token_number_as_item_number)
16539 (item_number_as_token_number): New.
16540 * src/output.c (GENERATE_OUTPUT_TABLE): New.
16541 Use it to create output_item_number_table and
16542 output_token_number_table.
16543 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16544 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
16545 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
16546 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
16547
16548 2002-04-22 Akim Demaille <akim@epita.fr>
16549
16550 * src/output.h, src/output.c (get_lines_number): Remove.
16551
16552 2002-04-19 Akim Demaille <akim@epita.fr>
16553
16554 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
16555 as Lex/Flex'.
16556 (Debugging): More details about enabling the debugging features.
16557 (Table of Symbols): Describe $$, $n, @$, and @n.
16558 Suggested by Tim Josling.
16559
16560 2002-04-19 Akim Demaille <akim@epita.fr>
16561
16562 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
16563
16564 2002-04-10 Akim Demaille <akim@epita.fr>
16565
16566 * src/system.h: Rely on HAVE_LIMITS_H.
16567 Suggested by Paul Eggert.
16568
16569 2002-04-09 Akim Demaille <akim@epita.fr>
16570
16571 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
16572 full stderr, and strip it according to the bison options, instead
16573 of composing the error message from different bits.
16574 This makes it easier to check for several error messages.
16575 Adjust all the invocations.
16576 Add an invocation exercising the error token.
16577 Add an invocation demonstrating a stupid error message.
16578 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
16579 Adjust the tests.
16580 Error message are for stderr, not stdout.
16581
16582 2002-04-09 Akim Demaille <akim@epita.fr>
16583
16584 * src/gram.h, src/gram.c (error_token_number): Remove, use
16585 errtoken->number.
16586 * src/reader.c (reader): Don't specify the user token number (2)
16587 for $undefined, as it uselessly prevents using it.
16588 * src/gram.h (token_number_t): Move to...
16589 * src/symtab.h: here.
16590 (state_t.number): Is a token_number_t.
16591 * src/print.c, src/reader.c: Use undeftoken->number instead of
16592 hard coded 2.
16593 (Even though this 2 is not the same as above: the number of the
16594 undeftoken remains being 2, it is its user token number which
16595 might not be 2).
16596 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
16597 `user_token_number_max'.
16598 Output `undef_token_number'.
16599 * data/bison.simple, data/bison.c++: Use them.
16600 Be sure to map invalid yylex return values to
16601 `undef_token_number'. This saves us from gratuitous SEGV.
16602
16603 * tests/conflicts.at (Solved SR Conflicts)
16604 (Unresolved SR Conflicts): Adjust.
16605 * tests/regression.at (Web2c Actions): Adjust.
16606
16607 2002-04-08 Akim Demaille <akim@epita.fr>
16608
16609 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
16610 Adding #line.
16611 Remove the duplicate `typedefs'.
16612 (RhsNumberType): Fix the declaration and various other typos.
16613 Use __ofile__.
16614 * data/bison.simple: Use __ofile__.
16615 * src/scan-skel.l: Handle __ofile__.
16616
16617 2002-04-08 Akim Demaille <akim@epita.fr>
16618
16619 * src/gram.h (item_number_t): New, the type of item numbers in
16620 RITEM. Note that it must be able to code symbol numbers as
16621 positive number, and the negation of rule numbers as negative
16622 numbers.
16623 Adjust all dependencies (pretty many).
16624 * src/reduce.c (rule): Remove this `short *' pointer: use
16625 item_number_t.
16626 * src/system.h (MINSHORT, MAXSHORT): Remove.
16627 Include `limits.h'.
16628 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
16629 (shortcpy): Remove.
16630 (MAXTABLE): Move to...
16631 * src/output.c (MAXTABLE): here.
16632 (prepare_rules): Use output_int_table to output rhs.
16633 * data/bison.simple, data/bison.c++: Adjust.
16634 * tests/torture.at (Big triangle): Move the limit from 254 to
16635 500.
16636 * tests/regression.at (Web2c Actions): Ajust.
16637
16638 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
16639 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
16640 passes, but produces negative #line number, once fixed, GCC is
16641 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
16642 C), it passes.
16643 * src/state.h (state_h): Code input lines on ints, not shorts.
16644
16645 2002-04-08 Akim Demaille <akim@epita.fr>
16646
16647 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
16648 and then the grammar.
16649
16650 2002-04-08 Akim Demaille <akim@epita.fr>
16651
16652 * src/system.h: No longer using strndup.
16653
16654 2002-04-07 Akim Demaille <akim@epita.fr>
16655
16656 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
16657 * src/output.c (output_table_data): Return the longest number.
16658 (prepare_tokens): Output `token_number_max').
16659 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
16660 New.
16661 Use them to define yy_token_number_type/TokenNumberType.
16662 Use this type for yytranslate.
16663 * tests/torture.at (Big triangle): Push the limit from 124 to
16664 253.
16665 * tests/regression.at (Web2c Actions): Adjust.
16666
16667 2002-04-07 Akim Demaille <akim@epita.fr>
16668
16669 * tests/torture.at (Big triangle): New.
16670 (GNU AWK Grammar, GNU Cim Grammar): Move to...
16671 * tests/existing.at: here.
16672
16673 2002-04-07 Akim Demaille <akim@epita.fr>
16674
16675 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
16676 nritems.
16677 Adjust dependencies.
16678
16679 2002-04-07 Akim Demaille <akim@epita.fr>
16680
16681 * src/reader.c: Normalize increments to prefix form.
16682
16683 2002-04-07 Akim Demaille <akim@epita.fr>
16684
16685 * src/reader.c, symtab.c: Remove debugging code.
16686
16687 2002-04-07 Akim Demaille <akim@epita.fr>
16688
16689 Rename all the `bucket's as `symbol_t'.
16690
16691 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
16692 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
16693 * src/symtab.c, src/symtab.h (bucket): Rename as...
16694 (symbol_t): this.
16695 (symbol_list_new, bucket_check_defined, bucket_make_alias)
16696 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
16697 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16698 (buckets_new, buckets_free, buckets_do): Rename as...
16699 (symbol_list_new, symbol_check_defined, symbol_make_alias)
16700 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16701 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
16702 (symbols_new, symbols_free, symbols_do): these.
16703
16704 2002-04-07 Akim Demaille <akim@epita.fr>
16705
16706 Use lib/hash for the symbol table.
16707
16708 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
16709 EOF.
16710 * src/lex.c (lex): Set the `number' member of new terminals.
16711 * src/reader.c (bucket_check_defined, bucket_make_alias)
16712 (bucket_check_alias_consistence, bucket_translation): New.
16713 (reader, grammar_free, readgram, token_translations_init)
16714 (packsymbols): Adjust.
16715 (reader): Number the predefined tokens.
16716 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
16717 for predefined tokens.
16718 * src/symtab.h (bucket): Remove all the hash table related
16719 members.
16720 * src/symtab.c (symtab): Replace by...
16721 (bucket_table): this.
16722 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16723 (buckets_new, buckets_do): New.
16724
16725 2002-04-07 Akim Demaille <akim@epita.fr>
16726
16727 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
16728 (start_symbol, max_user_token_number, semantic_parser)
16729 (error_token_number): Initialize.
16730 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
16731 Initialize.
16732 (reader): Don't.
16733 (errtoken, eoftoken, undeftoken, axiom): Extern.
16734
16735 2002-04-07 Akim Demaille <akim@epita.fr>
16736
16737 * src/gram.h (rule_s): prec and precsym are now pointers
16738 to the bucket giving the priority/associativity.
16739 Member `associativity' removed: useless.
16740 * src/reduce.c, src/conflicts.c: Adjust.
16741
16742 2002-04-07 Akim Demaille <akim@epita.fr>
16743
16744 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
16745 Properly escape the symbols' TAG when outputting them.
16746
16747 2002-04-07 Akim Demaille <akim@epita.fr>
16748
16749 * src/lalr.h (LA): Is a bitsetv, not bitset*.
16750
16751 2002-04-07 Akim Demaille <akim@epita.fr>
16752
16753 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
16754 (LArule): this, which is an array to rule_t*.
16755 * src/print.c, src/conflicts.c: Adjust.
16756
16757 2002-04-07 Akim Demaille <akim@epita.fr>
16758
16759 * src/gram.h (rule_t): Rename `number' as `user_number'.
16760 `number' is a new member.
16761 Adjust dependencies.
16762 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
16763
16764 2002-04-07 Akim Demaille <akim@epita.fr>
16765
16766 As a result of the previous patch, it is no longer needed
16767 to reorder ritem itself.
16768
16769 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
16770
16771 2002-04-07 Akim Demaille <akim@epita.fr>
16772
16773 Be sure never to walk through RITEMS, but use only data related to
16774 the rules themselves. RITEMS should be banished.
16775
16776 * src/output.c (output_token_translations): Rename as...
16777 (prepare_tokens): this.
16778 In addition to `translate', prepare the muscles `tname' and
16779 `toknum', which were handled by...
16780 (output_rule_data): this.
16781 Remove, and move the remainder of its outputs into...
16782 (prepare_rules): this new routines, which also merges content from
16783 (output_gram): this.
16784 (prepare_rules): Be sure never to walk through RITEMS.
16785 (output_stos): Rename as...
16786 (prepare_stos): this.
16787 (output): Always invoke prepare_states, after all, just don't use it
16788 in the output if you don't need it.
16789
16790 2002-04-07 Akim Demaille <akim@epita.fr>
16791
16792 * src/LR0.c (new_state): Display `nstates' as the name of the
16793 newly created state.
16794 Adjust to initialize first_state and last_state if needed.
16795 Be sure to distinguish the initial from the final state.
16796 (new_states): Create the itemset of the initial state, and use
16797 new_state.
16798 * src/closure.c (closure): Now that the initial state has its
16799 items properly set, there is no need for a special case when
16800 creating `ruleset'.
16801
16802 As a result, now the rule 0, reducing to $axiom, is visible in the
16803 outputs. Adjust the test suite.
16804
16805 * tests/conflicts.at (Solved SR Conflicts)
16806 (Unresolved SR Conflicts): Adjust.
16807 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
16808 * tests/conflicts.at (S/R in initial): New.
16809
16810 2002-04-07 Akim Demaille <akim@epita.fr>
16811
16812 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
16813 the RHS of the rules.
16814 * src/output.c (output_gram): Likewise.
16815
16816 2002-04-07 Akim Demaille <akim@epita.fr>
16817
16818 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
16819 bucket.
16820 Adjust all dependencies.
16821 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
16822 `number' of the buckets too.
16823 * src/gram.h: Include `symtab.h'.
16824 (associativity): Move to...
16825 * src/symtab.h: here.
16826 No longer include `gram.h'.
16827
16828 2002-04-07 Akim Demaille <akim@epita.fr>
16829
16830 * src/gram.h, src/gram.c (rules_rhs_length): New.
16831 (ritem_longest_rhs): Use it.
16832 * src/gram.h (rule_t): `number' is a new member.
16833 * src/reader.c (packgram): Set it.
16834 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
16835 the end of `rules', and count them out of `nrules'.
16836 (reduce_output, dump_grammar): Adjust.
16837 * src/print.c (print_grammar): It is no longer needed to check for
16838 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
16839 * tests/reduce.at (Reduced Automaton): New test.
16840
16841 2002-04-07 Akim Demaille <akim@epita.fr>
16842
16843 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
16844 lacking `+ 1' to nrules, Bison reported as useless a token if it
16845 was used solely to set the precedence of the last rule...
16846
16847 2002-04-07 Akim Demaille <akim@epita.fr>
16848
16849 * data/bison.c++, data/bison.simple: Don't output the current file
16850 name in #line, to avoid useless diffs between two identical
16851 outputs under different names.
16852
16853 2002-04-07 Akim Demaille <akim@epita.fr>
16854
16855 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
16856 Normalize loops to using `< nrules + 1', not `<= nrules'.
16857
16858 2002-04-07 Akim Demaille <akim@epita.fr>
16859
16860 * TODO: Update.
16861
16862 2002-04-07 Akim Demaille <akim@epita.fr>
16863
16864 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
16865 bucket.value as bucket.number.
16866
16867 2002-04-07 Akim Demaille <akim@epita.fr>
16868
16869 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
16870 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16871 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
16872 RHS, instead of being an index in RITEMS.
16873
16874 2002-04-04 Paul Eggert <eggert@twinsun.com>
16875
16876 * doc/bison.texinfo: Update copyright date.
16877 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
16878 (Symbols): Warn about running Bison in one character set,
16879 but compiling and/or running in an incompatible one.
16880 Warn about character code 256, too.
16881
16882 2002-04-03 Paul Eggert <eggert@twinsun.com>
16883
16884 * src/bison.data (YYSTACK_ALLOC): Depend on whether
16885 YYERROR_VERBOSE is nonzero, not whether it is defined.
16886
16887 Merge changes from bison-1_29-branch.
16888
16889 2002-03-20 Paul Eggert <eggert@twinsun.com>
16890
16891 Merge fixes from Debian bison_1.34-1.diff.
16892
16893 * configure.in (AC_PREREQ): 2.53.
16894
16895 2002-03-20 Akim Demaille <akim@epita.fr>
16896
16897 * src/conflicts.c (log_resolution): Argument `resolution' is const.
16898
16899 2002-03-19 Paul Eggert <eggert@twinsun.com>
16900
16901 * src/bison.simple (YYCOPY): New macro.
16902 (YYSTACK_RELOCATE): Use it.
16903 Remove Type arg; no longer needed. All callers changed.
16904 (yymemcpy): Remove; no longer needed.
16905
16906 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
16907 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16908
16909 2002-03-19 Akim Demaille <akim@epita.fr>
16910
16911 Test and fix the #line outputs.
16912
16913 * tests/atlocal.at (GCC): New.
16914 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
16915 (Prologue synch line, %union synch line, Postprologue synch line)
16916 (Action synch line, Epilogue synch line): New tests.
16917 * src/reader.c (parse_union_decl): Define the muscle stype_line.
16918 * data/bison.simple, data/bison.c++: Use it.
16919
16920 2002-03-19 Akim Demaille <akim@epita.fr>
16921
16922 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
16923 (Solved SR Conflicts, %expect not enough, %expect right)
16924 (%expect too much): Move to...
16925 * tests/conflicts.at: this new file.
16926
16927 2002-03-19 Akim Demaille <akim@epita.fr>
16928
16929 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16930 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
16931 that we can move to enums for instance.
16932 * src/output.c (token_definitions_output): Output a list of
16933 `token-name, token-number' instead of the #define.
16934 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
16935
16936 2002-03-14 Akim Demaille <akim@epita.fr>
16937
16938 Use Gettext 0.11.1.
16939
16940 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
16941
16942 * data/bison.c++: Make the user able to add members to the generated
16943 parser by subclassing.
16944
16945 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
16946
16947 * src/reader.c (read_additionnal_code): `c' should be an integer, not
16948 a character.
16949 Reported by Nicolas Tisserand and Nicolas Burrus.
16950
16951 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
16952
16953 * src/reader.c: Warn about lacking semi-colons, do not complain.
16954
16955 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
16956
16957 * data/bison.c++: Remove a debug line.
16958
16959 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
16960
16961 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
16962 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
16963 provide a default implementation.
16964
16965 2002-03-04 Akim Demaille <akim@epita.fr>
16966
16967 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
16968 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
16969 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
16970 * tests/semantic.at (Parsing Guards): Similarly.
16971 * src/reader.at (readgram): Complain if the last rule is not ended
16972 with a semi-colon.
16973
16974 2002-03-04 Akim Demaille <akim@epita.fr>
16975
16976 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
16977 * src/closure.c: here.
16978 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
16979 RTC.
16980 * src/warshall.h, src/warshall.c: Remove.
16981 * tests/sets.at (Broken Closure): Adjust.
16982
16983 2002-03-04 Akim Demaille <akim@epita.fr>
16984
16985 * src/output.c (output_skeleton): tempdir is const.
16986 bytes_read is unused.
16987
16988 2002-03-04 Akim Demaille <akim@epita.fr>
16989
16990 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
16991 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
16992 Update.
16993 From Michael Hayes.
16994
16995 2002-03-04 Akim Demaille <akim@epita.fr>
16996
16997 * src/closure.c (closure): `r' is unused.
16998
16999 2002-03-04 Akim Demaille <akim@epita.fr>
17000
17001 * tests/sets.at (Broken Closure): Add the ending `;'.
17002 * src/reader.at (readgram): Complain if a rule is not ended with a
17003 semi-colon.
17004
17005 2002-03-04 Akim Demaille <akim@epita.fr>
17006
17007 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17008 (count_sr_conflicts): Use bitset_count.
17009 * src/reduce.c (inaccessable_symbols): Ditto.
17010 (bits_size): Remove.
17011 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17012
17013 2002-03-04 Akim Demaille <akim@epita.fr>
17014
17015 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17016 * src/reduce.c: Remove the `bitset_zero's following the
17017 `bitset_create's, as now it is performed by the latter.
17018
17019 2002-03-04 Akim Demaille <akim@epita.fr>
17020
17021 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17022 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17023 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17024 latest sources from Michael.
17025
17026 2002-03-04 Akim Demaille <akim@epita.fr>
17027
17028 * src/output.c (output): Don't free the grammar.
17029 * src/reader.c (grammar_free): New.
17030 * src/main.c (main): Call it and don't free symtab here.
17031
17032 2002-03-04 Akim Demaille <akim@epita.fr>
17033
17034 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17035 before returning.
17036 Reported by Benoit Perrot.
17037
17038 2002-03-04 Akim Demaille <akim@epita.fr>
17039
17040 Use bitset operations when possible, not loops over bits.
17041
17042 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17043 bitset_or.
17044 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17045 * src/reduce.c (useless_nonterminals): Formatting changes.
17046 * src/warshall.c (TC): Use bitset_or.
17047
17048 2002-03-04 Akim Demaille <akim@epita.fr>
17049
17050 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17051 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17052 Ditto.
17053
17054 2002-03-04 Akim Demaille <akim@epita.fr>
17055
17056 * src/lalr.c (F): Now a bitset*.
17057 Adjust all dependencies.
17058
17059 2002-03-04 Akim Demaille <akim@epita.fr>
17060
17061 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17062 Adjust all dependencies.
17063
17064 2002-03-04 Akim Demaille <akim@epita.fr>
17065
17066 * src/L0.c, src/LR0.h (nstates): Be size_t.
17067 Adjust comparisons (signed vs unsigned).
17068 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17069 bitset*.
17070 Adjust all dependencies.
17071
17072 2002-03-04 Akim Demaille <akim@epita.fr>
17073
17074 * src/closure.c (firsts): Now, also a bitset.
17075 Adjust all dependencies.
17076 (varsetsize): Remove, now unused.
17077 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17078
17079 2002-03-04 Akim Demaille <akim@epita.fr>
17080
17081 * src/print.c: Convert to use bitset.h, not hand coded iterations
17082 over ints.
17083
17084 2002-03-04 Akim Demaille <akim@epita.fr>
17085
17086 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17087
17088 2002-03-04 Akim Demaille <akim@epita.fr>
17089
17090 * src/closure.c (ruleset): Be a bitset.
17091 (rulesetsize): Remove.
17092
17093 2002-03-04 Akim Demaille <akim@epita.fr>
17094
17095 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17096 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17097 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17098 * src/closure.c (fderives): Be an array of bitsets.
17099
17100 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
17101
17102 * data/bison.c++: Merge the two generated headers. Insert a copyright
17103 notice in each output file.
17104
17105 2002-02-28 Akim Demaille <akim@epita.fr>
17106
17107 * data/bison.c++: Copy the prologue of bison.simple to fetch
17108 useful M4 definitions, such as b4_header_guard.
17109
17110 2002-02-25 Akim Demaille <akim@epita.fr>
17111
17112 * src/getargs.c (version): Give the name of the authors, and use a
17113 translator friendly scheme for the bgr
17114 copyright notice.
17115
17116 2002-02-25 Akim Demaille <akim@epita.fr>
17117
17118 * src/output.c (header_output): Remove, now handled completely via
17119 M4.
17120
17121 2002-02-25 Akim Demaille <akim@epita.fr>
17122
17123 * m4/m4.m4: New, from CVS Autoconf.
17124 * configure.in: Invoke it.
17125 * src/output.c (output_skeleton): Use its result instead of the
17126 hard coded name.
17127
17128 2002-02-25 Akim Demaille <akim@epita.fr>
17129
17130 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17131 Fileutils 4.1.5.
17132 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17133 * src/output.c (output_skeleton): Use mkstemp to create a real
17134 temporary file.
17135 Move the filling of `skeleton' and its muscle to...
17136 (prepare): here.
17137 (output): Move the definition of the prologue muscle to...
17138 (prepare): here.
17139 * src/system.h (DEFAULT_TMPDIR): New.
17140
17141 2002-02-14 Paul Eggert <eggert@twinsun.com>
17142
17143 Remove the support for C++ namespace cleanliness; it was
17144 causing more problems than it was curing, since it didn't work
17145 properly on some nonstandard C++ compilers. This can wait
17146 for a proper C++ parser.
17147
17148 * NEWS: Document this.
17149 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17150 of C++, as it's treated like C now.
17151 * src/bison.simple (YYSTD): Remove.
17152 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17153 Treat C++ just like Standard C instead of trying to support
17154 namespace cleanliness.
17155
17156 2002-02-14 Akim Demaille <akim@epita.fr>
17157
17158 * tests/regression.at (else): Adjust to Andreas' change.
17159
17160 2002-02-14 Akim Demaille <akim@epita.fr>
17161
17162 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17163
17164 2002-02-13 Andreas Schwab <schwab@suse.de>
17165
17166 * src/output.c (output_rule_data): Don't output NULL, it might
17167 not be defined yet.
17168
17169 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
17170
17171 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17172 (Copyright notice): Update.
17173
17174 2002-02-11 Akim Demaille <akim@epita.fr>
17175
17176 * tests/regression.at (%nonassoc and eof): Don't include
17177 nonportable headers.
17178
17179 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
17180
17181 * data/bison.c++: Correct error recovery. Make the user able to
17182 initialize the starting location.
17183
17184 2002-02-07 Akim Demaille <akim@epita.fr>
17185
17186 * tests/input.at: New.
17187
17188 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17189
17190 * data/bison.c++: Replace some direct m4 expansions by constants. Be
17191 more consistent when naming methods and variables. Put preprocessor
17192 directives around tables only needed for debugging.
17193
17194 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17195
17196 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17197 C++ parsers.
17198 (yy::b4_name::parse): Use print_.
17199
17200 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17201
17202 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17203
17204 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17205
17206 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17207 C++ parsers.
17208 (yy::b4_name::parse): Build verbose error messages, and use error_.
17209
17210 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17211
17212 * data/bison.c++: Fix m4 quoting in comments.
17213
17214 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17215
17216 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17217 not expanded by m4.
17218
17219 2002-02-05 Akim Demaille <akim@epita.fr>
17220
17221 * data/bison.c++: Adjust to the M4 back end.
17222 More is certainly needed.
17223
17224 2002-02-05 Akim Demaille <akim@epita.fr>
17225
17226 Give a try to M4 as a back end.
17227
17228 * lib/readpipe.c: New, from wdiff.
17229 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17230 BISON_HAIRY.
17231 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17232 specific values. Now it is m4 that performs the lookup.
17233 * src/parse-skel.y: Remove.
17234 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17235 * src/output.c (actions_output, guards_output)
17236 (token_definitions_output): No longer keeps track of the output
17237 line number, hence remove the second argument.
17238 (guards_output): Check against the guard member of a rule, not the
17239 action member.
17240 Adjust callers.
17241 (output_skeleton): Don't look for the skeleton location, let m4 do
17242 that.
17243 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17244 file will be used.
17245 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17246 (prepare): Given that for the time being changesyntax is not
17247 usable in M4, rename the muscles using `-' to `_'.
17248 Define `defines_flag', `output_parser_name' and `output_header_name'.
17249 * src/output.h (actions_output, guards_output)
17250 (token_definitions_output): Adjust prototypes.
17251 * src/scan-skel.l: Instead of scanning the skeletons, it now
17252 processes the output of m4: `__oline__' and `#output'.
17253 * data/bison.simple: Adjust to be used by M4(sugar).
17254 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17255 to date.
17256 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17257 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17258 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17259 shamelessly stolen from CVS Autoconf.
17260
17261 2002-02-05 Akim Demaille <akim@epita.fr>
17262
17263 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17264 * configure.in: Check for the declarations of free and malloc.
17265 * src/muscle_tab.c: Adjust.
17266
17267 2002-02-05 Akim Demaille <akim@epita.fr>
17268
17269 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17270 which have no values.
17271
17272 2002-02-05 Akim Demaille <akim@epita.fr>
17273
17274 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17275 * data/: here.
17276
17277 2002-01-29 Paul Eggert <eggert@twinsun.com>
17278
17279 * src/bison.simple (YYSIZE_T): Do not define merely because
17280 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17281 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17282
17283 2002-01-27 Akim Demaille <akim@epita.fr>
17284
17285 Fix `%nonassoc and eof'.
17286
17287 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17288 which were not properly copied! Replace
17289 memcpy (res->errs, src->errs, src->nerrs);
17290 with
17291 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17292 !!!
17293 * tests/regression.at (%nonassoc and eof): Adjust to newest
17294 Autotest: `.' is not in the PATH.
17295
17296 2002-01-27 Akim Demaille <akim@epita.fr>
17297
17298 * tests/sets.at (AT_EXTRACT_SETS): New.
17299 (Nullable): Use it.
17300 (Firsts): New.
17301
17302 2002-01-26 Akim Demaille <akim@epita.fr>
17303
17304 * tests/actions.at, tests/calc.at, tests/headers.at,
17305 * tests/torture.at: Adjust to the newest Autotest which no longer
17306 forces `.' in the PATH.
17307
17308 2002-01-25 Akim Demaille <akim@epita.fr>
17309
17310 * tests/regression.at (%nonassoc and eof): New.
17311 Suggested by Robert Anisko.
17312
17313 2002-01-24 Akim Demaille <akim@epita.fr>
17314
17315 Bison dumps core when trying to complain about broken input files.
17316 Reported by Cris van Pelt.
17317
17318 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17319 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17320 into...
17321 (Invalid inputs): Strengthen: exercise parse_percent_token.
17322
17323 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
17324
17325 * src/Makefile.am: Add bison.c++.
17326 * src/bison.c++: New skeleton.
17327
17328 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
17329
17330 * po/it.po: New.
17331
17332 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17333
17334 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17335
17336 2002-01-20 Marc Autret <marc@gnu.org>
17337
17338 * src/files.c (compute_output_file_names): Fix
17339
17340 2002-01-20 Marc Autret <marc@gnu.org>
17341
17342 * tests/output.at: New test.
17343 * src/files.c (compute_base_names): Don't map extensions when
17344 the YACC flag is set, use defaults.
17345 Reported by Evgeny Stambulchik.
17346
17347 2002-01-20 Marc Autret <marc@gnu.org>
17348
17349 * src/system.h: Need to define __attribute__ away for non-GCC
17350 compilers as well (i.e., the vendor C compiler).
17351 Suggested by Albert Chin-A-Young.
17352
17353 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
17354
17355 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17356 canonical definition.
17357 * src/system.h: Use the canonical definition for PARAMS (avoids
17358 a conflict with the macro from lib/hash.h).
17359
17360 2002-01-11 Akim Demaille <akim@epita.fr>
17361
17362 * configure.in: Use AC_FUNC_STRNLEN.
17363 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
17364
17365 2002-01-09 Akim Demaille <akim@epita.fr>
17366
17367 * src/files.c, src/files.h (output_infix): New.
17368 (tab_extension): Remove.
17369 (compute_base_names): Compute the former, drop the latter.
17370 * src/output.c (prepare): Insert the muscles `output-infix', and
17371 `output-suffix'.
17372 * src/parse-skel.y (string, string.1): New.
17373 (section.header): Use it.
17374 (section.yacc): Remove.
17375 (prefix): Remove too.
17376 * src/scan-skel.l: Adjust.
17377 * src/bison.simple, src/bison.hairy: Adjust.
17378
17379 2002-01-09 Akim Demaille <akim@epita.fr>
17380
17381 * configure.in (WERROR_CFLAGS): Compute it.
17382 * src/Makefile.am (CFLAGS): Pass it.
17383 * tests/atlocal.in (CFLAGS): Idem.
17384 * src/files.c: Fix a few warnings.
17385 (get_extension_index): Remove, unused.
17386
17387 2002-01-08 Akim Demaille <akim@epita.fr>
17388
17389 * src/getargs.c (AS_FILE_NAME): New.
17390 (getargs): Use it to convert DOSish file names.
17391 * src/files.c (base_name): Rename as full_base_name to avoid
17392 clashes with `base_name ()'.
17393 (filename_split): New.
17394 (compute_base_names): N-th rewrite, using filename_split.
17395
17396 2002-01-08 Akim Demaille <akim@epita.fr>
17397
17398 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
17399 New, stolen from the Fileutils 4.1.
17400 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17401 * configure.in: Check for the presence of memrchr, and of its
17402 prototype.
17403
17404 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
17405
17406 * lib/hash.h (__P): Added definition for this macro.
17407 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
17408 BUILT_SOURCES, to ensure they are generated first.
17409 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
17410 %error-verbose to allow bootstrapping with bison 1.30x.
17411
17412 2002-01-06 Akim Demaille <akim@epita.fr>
17413
17414 * src/reader.c (parse_braces): Don't fetch the next char, the
17415 convention is to fetch on entry.
17416 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
17417 'switch' without a following semicolon.
17418 * tests/regression.at (braces parsing): New.
17419
17420 2002-01-06 Akim Demaille <akim@epita.fr>
17421
17422 Bison is dead wrong in its RR conflict reports.
17423
17424 * tests/torture.at (GNU Cim Grammar): New.
17425 * src/conflicts.c (count_rr_conflicts): Fix.
17426
17427 2002-01-06 Akim Demaille <akim@epita.fr>
17428
17429 Creating package.m4 from configure.ac causes too many problems.
17430
17431 * tests/Makefile.am (package.m4): Create it by hand,
17432 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
17433
17434 2002-01-06 Akim Demaille <akim@epita.fr>
17435
17436 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
17437 skeleton.h.
17438
17439 2002-01-04 Paul Eggert <eggert@twinsun.com>
17440
17441 * doc/bison.texinfo (Debugging):
17442 Remove YYSTDERR; it's no longer defined or used.
17443 Also, s/cstdio.h/cstdio/.
17444
17445 2002-01-03 Akim Demaille <akim@epita.fr>
17446
17447 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
17448
17449 2002-01-03 Akim Demaille <akim@epita.fr>
17450
17451 * src/parse-skel.y (process_skeleton): Don't bind the parser's
17452 tracing code to --trace, wait for a better --trace option, with
17453 args.
17454
17455 2002-01-03 Akim Demaille <akim@epita.fr>
17456
17457 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
17458 The ISO C++ standard is extremely clear about it: stderr is
17459 considered a macro, not a regular symbol (see table 94 `Header
17460 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
17461 Therefore std:: does not apply to it. It still does with fprintf.
17462 Also, s/cstdio.h/cstdio/.
17463
17464 2002-01-03 Akim Demaille <akim@epita.fr>
17465
17466 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
17467 for non system headers.
17468
17469 2002-01-02 Akim Demaille <akim@epita.fr>
17470
17471 Equip the skeleton chain with location tracking, runtime trace,
17472 pure parser and scanner.
17473
17474 * src/parse-skel.y: Request a pure parser, locations, and prefix
17475 renaming.
17476 (%union): Having several members with the same type does not help
17477 type mismatches, simplify.
17478 (YYPRINT, yyprint): New.
17479 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
17480 (skel_error): this.
17481 Handle locations.
17482 * src/scan-skel.l: Adjust to these changes.
17483 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
17484 (LOCATION_PRINT, skel_control_t): New.
17485
17486 2001-12-30 Akim Demaille <akim@epita.fr>
17487
17488 * src/parse-skel.y: Get rid of the shift/reduce conflict:
17489 replace `gb' with BLANKS.
17490 * src/scan-skel.l: Adjust.
17491
17492 2001-12-30 Akim Demaille <akim@epita.fr>
17493
17494 * src/system.h: We don't need nor want bcopy.
17495 Throw away MS-DOS crap: we don't need getpid.
17496 * configure.in: We don't need strndup. It was even causing
17497 problems: because Flex includes the headers *before* us,
17498 _GNU_SOURCE is not defined by config.h, and therefore strndup was
17499 not visible.
17500 * lib/xstrndup.c: New.
17501 * src/scan-skel.l: Use it.
17502 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
17503 * src/parse-skel.y: Use %directives instead of #defines.
17504
17505 2001-12-30 Akim Demaille <akim@epita.fr>
17506
17507 * src/skeleton.h: New.
17508 * src/output.c (output_parser, output_master_parser): Remove, dead
17509 code.
17510 * src/output.h (get_lines_number, actions_output, guards_output)
17511 (token_definitions_output): Prototype them.
17512 * src/parse-skel.y: Add the license notice.
17513 Include output.h and skeleton.h.
17514 (process_skeleton): Returns void, and takes a single parameter.
17515 * src/scan-skel.l: Add the license notice.
17516 Include skeleton.h.
17517 Don't use %option yylineno: it seems that then Flex imagines
17518 REJECT has been used, and therefore it won't reallocate its
17519 buffers (which makes no other sense to me than a bug). It results
17520 in warnings for `unused: yy_flex_realloc'.
17521
17522 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
17523
17524 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17525 (MUSCLE_INSERT_PREFIX): ...to there.
17526 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17527 (MUSCLE_INSERT_PREFIX): Move from here...
17528
17529 * src/bison.hairy: Add a section directive. Put braces around muscle
17530 names. This parser skeleton is still broken, but Bison should not
17531 choke on a bad muscle 'syntax'.
17532 * src/bison.simple: Add a section directive. Put braces around muscle
17533 names.
17534
17535 * src/files.h (strsuffix, stringappend): Add declarations.
17536 (tab_extension): Add declaration.
17537 (short_base_name): Add declaration.
17538
17539 * src/files.c (strsuffix, stringappend): No longer static. These
17540 functions are used in the skeleton parser.
17541 (tab_extension): New.
17542 (compute_base_names): Use the computations done in this function
17543 to guess if the generated parsers should have '.tab' in their
17544 names.
17545 (short_base_name): No longer static.
17546
17547 * src/output.c (output_skeleton): New.
17548 (output): Disable call to output_master_parser, and give a try to
17549 a new skeleton handling system.
17550 (guards_output, actions_output): No longer static.
17551 (token_definitions_output, get_lines_number): No longer static.
17552
17553 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
17554
17555 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
17556 parse-skel.y.
17557
17558 * src/parse-skel.y: New file.
17559 * src/scan-skel.l: New file.
17560
17561 2001-12-29 Akim Demaille <akim@epita.fr>
17562
17563 %name-prefix is broken.
17564
17565 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
17566 Adjust all dependencies.
17567 * tests/headers.at (export YYLTYPE): Strengthen this test: use
17568 %name-prefix.
17569
17570 Renaming yylval but not yylloc is not consistent. Now we do.
17571
17572 * src/bison.simple: Prefix yylloc if used.
17573 * doc/bison.texinfo (Decl Summary): Document that.
17574
17575 2001-12-29 Akim Demaille <akim@epita.fr>
17576
17577 * doc/bison.texinfo: Promote `%long-directive' over
17578 `%long_directive'.
17579 Remove all references to fixed-output-files, yacc is enough.
17580
17581 2001-12-29 Akim Demaille <akim@epita.fr>
17582
17583 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
17584 user prologue. These are defaults.
17585 * tests/actions.at (Mid-rule actions): Make sure the user can
17586 define YYDEBUG and YYERROR_VERBOSE.
17587
17588 2001-12-29 Akim Demaille <akim@epita.fr>
17589
17590 * src/output.c (header_output): Don't forget to export YYLTYPE and
17591 yylloc.
17592 * tests/headers.at (export YYLTYPE): New, make sure it does.
17593 * tests/regression.at (%union and --defines, Invalid CPP headers):
17594 Move to...
17595 * tests/headers.at: here.
17596
17597 2001-12-29 Akim Demaille <akim@epita.fr>
17598
17599 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
17600
17601 2001-12-29 Akim Demaille <akim@epita.fr>
17602
17603 * tests/actions.at (Mid-rule actions): Output on a single line
17604 instead of several.
17605
17606 2001-12-29 Akim Demaille <akim@epita.fr>
17607
17608 * doc/bison.texinfo: Formatting changes.
17609
17610 2001-12-29 Akim Demaille <akim@epita.fr>
17611
17612 Don't store the token defs in a muscle, just be ready to output it
17613 on command. Now possible via `symbols'. Fixes a memory leak.
17614
17615 * src/output.c (token_definitions_output): New.
17616 (output_parser, header_output): Use it.
17617 * src/reader.c (symbols_save): Remove.
17618
17619 2001-12-29 Akim Demaille <akim@epita.fr>
17620
17621 * src/bison.simple: Do not provide a default for YYSTYPE and
17622 YYLTYPE before the user's prologue. Otherwise it's hardly... a
17623 default.
17624
17625 2001-12-29 Akim Demaille <akim@epita.fr>
17626
17627 Mid-rule actions are simply... ignored!
17628
17629 * src/reader.c (readgram): Be sure to attach mid-rule actions to
17630 the empty-rule associated to the dummy symbol, not to the host
17631 rule.
17632 * tests/actions.at (Mid-rule actions): New.
17633
17634 2001-12-29 Akim Demaille <akim@epita.fr>
17635
17636 Memory leak.
17637
17638 * src/reader.c (reader): Free grammar.
17639
17640 2001-12-29 Akim Demaille <akim@epita.fr>
17641
17642 Memory leak.
17643
17644 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
17645 since it allocates it for each state, although only one is needed.
17646 (allocate_storage): Do it here.
17647
17648 2001-12-29 Akim Demaille <akim@epita.fr>
17649
17650 * src/options.h, src/options.c (create_long_option_table): Rename
17651 as...
17652 (long_option_table_new): this, with a clearer prototype.
17653 (percent_table): Remove, unused,
17654 * src/getargs.c (getargs): Adjust.
17655
17656 2001-12-29 Akim Demaille <akim@epita.fr>
17657
17658 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
17659 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
17660 as states.
17661
17662 2001-12-29 Akim Demaille <akim@epita.fr>
17663
17664 * src/lalr.c (build_relations): Rename `states' as `states1'.
17665 Sorry, I don't understand exactly what it is, no better name...
17666
17667 2001-12-29 Akim Demaille <akim@epita.fr>
17668
17669 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
17670 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
17671 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
17672 as rules.
17673
17674 2001-12-29 Akim Demaille <akim@epita.fr>
17675
17676 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
17677 ago.
17678
17679 2001-12-29 Akim Demaille <akim@epita.fr>
17680
17681 * src/reader.c, src/reader.h (user_toknums): Remove.
17682 Adjust all users to use symbols[i]->user_token_number.
17683
17684 2001-12-29 Akim Demaille <akim@epita.fr>
17685
17686 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
17687 Adjust all users to use symbols[i]->prec or ->assoc.
17688
17689 2001-12-29 Akim Demaille <akim@epita.fr>
17690
17691 * src/reader.c, src/reader.h (tags): Remove.
17692 Adjust all users to use symbols[i]->tag.
17693
17694 2001-12-29 Akim Demaille <akim@epita.fr>
17695
17696 * src/gram.h, src/gram.c (symbols): New, similar to state_table
17697 and rule_table.
17698 * src/reader.c (packsymbols): Fill this table.
17699 Drop sprec.
17700 * src/conflicts.c (resolve_sr_conflict): Adjust.
17701 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
17702 single table.
17703 Use symbols[i]->tag instead of tags[i].
17704
17705 2001-12-29 Akim Demaille <akim@epita.fr>
17706
17707 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
17708 In addition, put a comment in there, to replace...
17709 * tests/regression.at (%union and C comments): Remove.
17710
17711 2001-12-29 Akim Demaille <akim@epita.fr>
17712
17713 * tests/regression.at (Web2c Actions): Blindly move the actual
17714 output as expected output. The contents *seem* right to me, but I
17715 can't pretend reading perfectly parser tables... Nonetheless, all
17716 the other tests pass correctly, the table look OK, even though the
17717 presence of `$axiom' is to be noted: AFAICS it is useless (but
17718 harmless).
17719
17720 2001-12-29 Akim Demaille <akim@epita.fr>
17721
17722 * src/reader.c (readgram): Don't add the rule 0 if there were no
17723 rules read. In other words, add it _after_ having performed
17724 grammar sanity checks.
17725 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
17726
17727 2001-12-29 Akim Demaille <akim@epita.fr>
17728
17729 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
17730 visible, and some states have now a different number.
17731
17732 2001-12-29 Akim Demaille <akim@epita.fr>
17733
17734 * src/reader.c (readgram): Bind the initial rule's lineno to that
17735 of the first rule.
17736 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
17737 (Solved SR Conflicts): Adjust rule 0's line number.
17738
17739 2001-12-29 Akim Demaille <akim@epita.fr>
17740
17741 Fix the `GAWK Grammar' failure.
17742
17743 * src/LR0.c (final_state): Initialize to -1 so that we do compute
17744 the reductions of the first state which was mistakenly confused
17745 with the final state because precisely final_state was initialized
17746 to 0.
17747 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
17748 now noticed by Bison.
17749 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
17750 have a reduction on $default.
17751
17752 2001-12-29 Akim Demaille <akim@epita.fr>
17753
17754 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
17755 rule line numbers.
17756 * src/closure.c (print_closure): Likewise.
17757 * src/derives.c (print_derives): Likewise.
17758 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
17759 now.
17760
17761 2001-12-29 Akim Demaille <akim@epita.fr>
17762
17763 * src/lalr.c (lookaheads_print): New.
17764 (lalr): Call it when --trace-flag.
17765 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
17766 are dumped.
17767
17768 2001-12-29 Akim Demaille <akim@epita.fr>
17769
17770 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
17771 when walking through ritem, even via rule->rhs.
17772 * src/reduce.c (dump_grammar, useful_production, reduce_output)
17773 (useful_production, useless_nonterminals): Likewise.
17774 (reduce_grammar_tables): Likewise, plus update nritems.
17775 * src/nullable.c (set_nullable): Likewise.
17776 * src/lalr.c (build_relations): Likewise.
17777 * tests/sets.at (Nullable): Adjust.
17778 Fortunately, now, the $axiom is no longer nullable.
17779
17780 2001-12-29 Akim Demaille <akim@epita.fr>
17781
17782 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
17783 the 0-sentinel.
17784 * src/gram.c (ritem_longest_rhs): Likewise.
17785 * src/reduce.c (nonterminals_reduce): Likewise.
17786 * src/print_graph.c (print_graph): Likewise.
17787 * src/output.c (output_rule_data): Likewise.
17788 * src/nullable.c (set_nullable): Likewise.
17789
17790 2001-12-29 Akim Demaille <akim@epita.fr>
17791
17792 * src/output.c: Comment changes.
17793
17794 2001-12-27 Paul Eggert <eggert@twinsun.com>
17795
17796 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
17797 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
17798 Sparc, as they were causing more porting problems than the
17799 (minor) performance improvement was worth.
17800
17801 Also, catch up with 1.31's YYSTD.
17802
17803 2001-12-27 Akim Demaille <akim@epita.fr>
17804
17805 * src/output.c (output_gram): Rely on nritems, not the
17806 0-sentinel. See below.
17807 Use -1 as separator, not 0.
17808 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
17809 Rely on -1 as separator in yyrhs, instead of 0.
17810 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
17811 twice `Now at end of input', therefore there are two lines less to
17812 expect.
17813
17814 2001-12-27 Akim Demaille <akim@epita.fr>
17815
17816 * tests/regression.at (Unresolved SR Conflicts):
17817 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
17818 below.
17819
17820 2001-12-27 Akim Demaille <akim@epita.fr>
17821
17822 * src/LR0.c (new_state): Recognize the final state by the fact it
17823 is reached by eoftoken.
17824 (insert_start_shifting_state, insert_eof_shifting_state)
17825 (insert_accepting_state, augment_automaton): Remove, since now
17826 these states are automatically computed from the initial state.
17827 (generate_states): Adjust.
17828 * src/print.c: When reporting a rule number to the user, substract
17829 1, so that the axiom rule is rule 0, and the first user rule is 1.
17830 * src/reduce.c: Likewise.
17831 * src/print_graph.c (print_core): For the time being, just as for
17832 the report, depend upon --trace-flags to dump the full set of
17833 items.
17834 * src/reader.c (readgram): Once the grammar read, insert the rule
17835 0: `$axiom: START-SYMBOL $'.
17836 * tests/set.at: Adjust: rule 0 is now displayed, and since the
17837 number of the states has changed (the final state is no longer
17838 necessarily the last), catch up.
17839
17840 2001-12-27 Akim Demaille <akim@epita.fr>
17841
17842 Try to make the use of the eoftoken valid. Given that its value
17843 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
17844 is used instead of > 0 where appropriate, (ii), depend upon nritems
17845 instead of the 0-sentinel.
17846
17847 * src/gram.h, src/gram.c (nritems): New.
17848 Expected to be duplication of nitems, but for the time being...
17849 * src/reader.c (packgram): Assert nritems and nitems are equal.
17850 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
17851 * src/closure.c (print_closure, print_fderives): Likewise.
17852 * src/gram.c (ritem_print): Likewise.
17853 * src/print.c (print_core, print_grammar): Likewise.
17854 * src/print_graph.c: Likewise.
17855
17856 2001-12-27 Akim Demaille <akim@epita.fr>
17857
17858 * src/main.c (main): If there are complains after grammar
17859 reductions, then output the report anyway if requested, then die.
17860 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
17861 * src/reader.c (eoftoken): New.
17862 (parse_token_decl): If the token being defined has value `0', it
17863 is the eoftoken.
17864 (packsymbols): No longer hack `tags' to insert `$' by hand.
17865 Be sure to preserve the value of the eoftoken.
17866 (reader): Make sure eoftoken is defined.
17867 Initialize nsyms to 0: now eoftoken is created just like the others.
17868 * src/print.c (print_grammar): Don't special case the eof token.
17869 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
17870 lie anyway, albeit pleasant.
17871 * tests/calc.at: Exercise error messages with eoftoken.
17872 Change the grammar so that empty input is invalid.
17873 Adjust expectations.
17874 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
17875
17876 2001-12-27 Akim Demaille <akim@epita.fr>
17877
17878 * configure.in: Check the protos of strchr ans strspn.
17879 Replace strchr if needed.
17880 * src/system.h: Provide the protos of strchr, strspn and memchr if
17881 missing.
17882 * lib/strchr.c: New.
17883 * src/reader.c (symbols_save): Use strchr.
17884
17885 2001-12-27 Akim Demaille <akim@epita.fr>
17886
17887 * src/print.c, src/print_graph.c (escape): New.
17888 Use it to quote the TAGS outputs.
17889 * src/print_graph.c (print_state): Now errors are in red, and
17890 reductions in green.
17891 Prefer high to wide: output the state number on a line of its own.
17892
17893 2001-12-27 Akim Demaille <akim@epita.fr>
17894
17895 * src/state.h, src/state.c (reductions_new): New.
17896 * src/LR0.c (set_state_table): Let all the states have a
17897 `reductions', even if reduced to 0.
17898 (save_reductions): Adjust.
17899 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
17900 * src/print.c (print_reductions, print_actions): Adjust.
17901 * src/output.c (action_row): Adjust.
17902
17903 2001-12-27 Akim Demaille <akim@epita.fr>
17904
17905 * src/state.h, src/state.c (errs_new, errs_dup): New.
17906 * src/LR0.c (set_state_table): Let all the states have an errs,
17907 even if reduced to 0.
17908 * src/print.c (print_errs, print_reductions): Adjust.
17909 * src/output.c (output_actions, action_row): Adjust.
17910 * src/conflicts.c (resolve_sr_conflict): Adjust.
17911
17912 2001-12-27 Akim Demaille <akim@epita.fr>
17913
17914 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
17915
17916 2001-12-27 Akim Demaille <akim@epita.fr>
17917
17918 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
17919 * src/print.c: here.
17920 (lookaheadset, shiftset): New, used as additional storage by
17921 print_reductions.
17922 (print_results): Adjust.
17923 (print_shifts, print_gotos, print_errs): New, extracted from...
17924 (print_actions): here.
17925 * src/print_graph.c (print_actions): Remove dead code.
17926
17927 2001-12-27 Akim Demaille <akim@epita.fr>
17928
17929 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
17930 `$n' and `@n'.
17931
17932 2001-12-27 Akim Demaille <akim@epita.fr>
17933
17934 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
17935 (build_relations): Adjust.
17936
17937 2001-12-27 Akim Demaille <akim@epita.fr>
17938
17939 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
17940 duplication.
17941
17942 2001-12-27 Akim Demaille <akim@epita.fr>
17943
17944 * src/reader.c (packgram): Catch nitems overflows.
17945
17946 2001-12-27 Akim Demaille <akim@epita.fr>
17947
17948 * src/files.c, src/files.h (guard_obstack): Remove.
17949 * src/output.c (output): Adjust.
17950 * src/reader.c (parse_braces): New, factoring...
17951 (copy_action, copy_guard): these two which are renamed as...
17952 (parse_action, parse_guard): these.
17953 As a voluntary consequence, using braces around guards is now
17954 mandatory.
17955
17956 2001-12-27 Akim Demaille <akim@epita.fr>
17957
17958 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
17959 * src/reader.c (symbol_list): `guard' and `guard_line' are new
17960 members.
17961 (symbol_list_new): Adjust.
17962 (copy_action): action_line is the first line, not the last.
17963 (copy_guard): Just as for actions, store the `action' only, not
17964 the switch/case/break flesh.
17965 Don't parse the user action that might follow the guard, let...
17966 (readgram): do it, i.e., now, there can be an action after a
17967 guard.
17968 In other words the guard is just explicitly optional.
17969 (packgram): Adjust.
17970 * src/output.c (guards_output): New.
17971 (output_parser): Call it when needed.
17972 (output): Also free the guard and attrs obstacks.
17973 * src/files.c, src/files.h (obstack_save): Remove.
17974 (output_files): Remove.
17975 As a result, if one needs the former `.act' file, using an
17976 appropriate skeleton which requires actions and guards is now
17977 required.
17978 * src/main.c (main): Adjust.
17979 * tests/semantic.at: New.
17980 * tests/regression.at: Use `input.y' as input file name.
17981 Avoid 8+3 problems by requiring input.c when the test needs the
17982 parser.
17983
17984 2001-12-27 Akim Demaille <akim@epita.fr>
17985
17986 * src/reader.c (symbol_list_new): Be sure to initialize all the
17987 fields.
17988
17989 2001-12-27 Akim Demaille <akim@epita.fr>
17990
17991 All the hacks using a final pseudo state are now useless.
17992
17993 * src/LR0.c (set_state_table): state_table holds exactly nstates.
17994 * src/lalr.c (nLA): New.
17995 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
17996 instead of lookaheadsp from the pseudo state (nstate + 1).
17997
17998 2001-12-27 Akim Demaille <akim@epita.fr>
17999
18000 * src/output.c (action_row, token_actions): Use a state_t instead
18001 of a integer, and nlookaheads instead of the following state's
18002 lookaheadsp.
18003
18004 2001-12-27 Akim Demaille <akim@epita.fr>
18005
18006 * src/conflicts.c (log_resolution, flush_shift)
18007 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18008 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18009 (conflicts_print, print_reductions): Use a state_t instead of an
18010 integer when referring to a state.
18011 As much as possible, depend upon nlookaheads, instead of the
18012 `lookaheadsp' member of the following state (since lookaheads of
18013 successive states are successive, the difference between state n + 1
18014 and n served as the number of lookaheads for state n).
18015 * src/lalr.c (add_lookback_edge): Likewise.
18016 * src/print.c (print_core, print_actions, print_state)
18017 (print_results): Likewise.
18018 * src/print_graph.c (print_core, print_actions, print_state)
18019 (print_graph): Likewise.
18020 * src/conflicts.h: Adjust.
18021
18022 2001-12-27 Akim Demaille <akim@epita.fr>
18023
18024 * src/bison.hairy: Formatting/comment changes.
18025 ANSIfy.
18026 Remove `register' indications.
18027 Add plenty of `static'.
18028
18029 2001-12-27 Akim Demaille <akim@epita.fr>
18030
18031 * src/output.c (prepare): Drop the muscle `ntbase' which
18032 duplicates ntokens.
18033 * src/bison.simple: Formatting/comment changes.
18034 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18035 is an undocumented synonym.
18036
18037 2001-12-22 Akim Demaille <akim@epita.fr>
18038
18039 * src/output.c (output_table_data): Change the prototype to use
18040 `int' for array ranges: some invocations do pass an int, not a
18041 short.
18042 Reported by Wayne Green.
18043
18044 2001-12-22 Akim Demaille <akim@epita.fr>
18045
18046 Some actions of web2c.y are improperly triggered.
18047 Reported by Mike Castle.
18048
18049 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18050 * tests/regression.at (Web2c): Rename as...
18051 (Web2c Report): this.
18052 (Web2c Actions): New.
18053
18054 2001-12-22 Akim Demaille <akim@epita.fr>
18055
18056 Reductions in web2c.y are improperly reported.
18057 Reported by Mike Castle.
18058
18059 * src/conflicts.c (print_reductions): Fix.
18060 * tests/regression.at (Web2c): New.
18061
18062 2001-12-18 Akim Demaille <akim@epita.fr>
18063
18064 Some host fail on `assert (!"foo")', which expands to
18065 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18066 Reported by Nelson Beebee.
18067
18068 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18069 `#define it_succeeded 0' and `assert (it_succeeded)'.
18070
18071 2001-12-17 Marc Autret <autret_m@epita.fr>
18072
18073 * src/bison.simple: Don't hard code the skeleton line and filename.
18074 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18075 New line counter 'skeleton_line' (skeleton-line muscle).
18076
18077 2001-12-17 Paul Eggert <eggert@twinsun.com>
18078
18079 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18080 YYDEBUG must be defined to a nonzero value.
18081
18082 * src/bison.simple (yytname): Do not assume that the user defines
18083 YYDEBUG to a properly parenthesized expression.
18084
18085 2001-12-17 Akim Demaille <akim@epita.fr>
18086
18087 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18088 nlookaheads is a new member.
18089 Adjust all users.
18090 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18091 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18092 state.
18093
18094 2001-12-17 Akim Demaille <akim@epita.fr>
18095
18096 * src/files.h, src/files.c (open_files, close_files): Remove.
18097 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18098 let...
18099 * src/reader.c (reader): Do it.
18100
18101 2001-12-17 Akim Demaille <akim@epita.fr>
18102
18103 * src/conflicts.c (print_reductions): Formatting changes.
18104
18105 2001-12-17 Akim Demaille <akim@epita.fr>
18106
18107 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18108 (flush_reduce): New.
18109 (resolve_sr_conflict): Adjust.
18110
18111 2001-12-17 Akim Demaille <akim@epita.fr>
18112
18113 * src/output.c (output_obstack): Be static and rename as...
18114 (format_obstack): this, to avoid any confusion with files.c's
18115 output_obstack.
18116 * src/reader.h (muscle_obstack): Move to...
18117 * src/output.h: here, since it's defined in output.c.
18118
18119 2001-12-17 Akim Demaille <akim@epita.fr>
18120
18121 * src/output.c (action_row, save_column, default_goto)
18122 (sort_actions, matching_state, pack_vector): Better variable
18123 locality.
18124
18125 2001-12-17 Akim Demaille <akim@epita.fr>
18126
18127 * src/output.c: Various formatting changes.
18128
18129 2001-12-17 Akim Demaille <akim@epita.fr>
18130
18131 * src/files.c (output_files): Free the output_obstack.
18132 * src/main.c (main): Call print and print_graph conditionally.
18133 * src/print.c (print): Work unconditionally.
18134 * src/print_graph.c (print_graph): Work unconditionally.
18135 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18136
18137 2001-12-16 Marc Autret <autret_m@epita.fr>
18138
18139 * src/output.c (actions_output): Fix. When we use %no-lines,
18140 there is one less line per action.
18141
18142 2001-12-16 Marc Autret <autret_m@epita.fr>
18143
18144 * src/bison.simple: Remove a useless #line directive.
18145 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18146 * src/output.c (get_lines_number): New.
18147 (output_parser): Adjust, now takes care about the lines of a
18148 output muscles.
18149 Fix line numbering.
18150 (actions_output): Computes the number of lines taken by actions.
18151 (output_master_parser): Insert new skeleton which is the name of
18152 the output parser file name.
18153
18154 2001-12-15 Marc Autret <autret_m@epita.fr>
18155
18156 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18157
18158 2001-12-15 Marc Autret <autret_m@epita.fr>
18159
18160 * src/output.c (output_gram): Keep track of the hairy one.
18161
18162 2001-12-15 Akim Demaille <akim@epita.fr>
18163
18164 Make `make distcheck' work.
18165
18166 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18167 system.h which uses libgettext.h.
18168
18169 2001-12-15 Akim Demaille <akim@epita.fr>
18170
18171 * src/nullable.c (set_nullable): Useless rules must be skipped,
18172 otherwise, since we range over their symbols, we might look at a
18173 nonterminal which no longer ``exists'', i.e., it is not counted in
18174 `nvars', hence we overflow our arrays.
18175
18176 2001-12-15 Akim Demaille <akim@epita.fr>
18177
18178 The header can also be produced directly, without any obstack!
18179 Yahoo!
18180
18181 * src/files.c, src/files.h (defines_obstack): Remove.
18182 (compute_header_macro): Global.
18183 (defines_obstack_save): Remove.
18184 * src/reader.c (parse_union_decl): No longer output to
18185 defines_obstack: its content can be found in the `stype' muscle
18186 anyway.
18187 (output_token_translations): Merge into...
18188 (symbols_output): this.
18189 Rename as...
18190 (symbols_save): this.
18191 (reader): Adjust.
18192 * src/output.c (header_output): New.
18193 (output): Call it.
18194
18195 2001-12-15 Akim Demaille <akim@epita.fr>
18196
18197 * src/reader.c (parse_union_decl): Instead of handling two obstack
18198 simultaneously, use one to define the `stype' muscle, and use the
18199 value of the latter to fill defines_obstack.
18200 (copy_comment): Remove.
18201 (copy_comment2): Work for a single obstack.
18202 Rename as...
18203 (copy_comment): this.
18204
18205 2001-12-15 Akim Demaille <akim@epita.fr>
18206
18207 * src/lex.c, src/lex.h (xgetc): No longer static.
18208 * src/reader.c (parse_union_decl): Revamp.
18209
18210 2001-12-15 Akim Demaille <akim@epita.fr>
18211
18212 Still making progress in separating Bison into (i) input, (ii)
18213 process, (iii) output: now we can directly output the parser file
18214 without using table_obstack at all.
18215
18216 * src/files.c, src/files.h (table_obstack): Bye bye.
18217 (parser_file_name): New.
18218 * src/files.c (compute_output_file_names): Compute it.
18219 * src/output.c (actions_output, output_parser)
18220 (output_master_parser): To a file instead of an obstack.
18221
18222 2001-12-15 Akim Demaille <akim@epita.fr>
18223
18224 Attach actions to rules, instead of pre-outputting them to
18225 actions_obstack.
18226
18227 * src/gram.h (rule_t): action and action_line are new members.
18228 * src/reader.c (symbol_list): Likewise.
18229 (copy_action): Save the actions within the rule.
18230 (packgram): Save them in rule_table.
18231 * src/output.c (actions_output): New.
18232 (output_parser): Use it on `%%actions'.
18233 (output_rule_data): Don't free rule_table.
18234 (output): Do it.
18235 (prepare): Don't save the `action' muscle.
18236 * src/bison.simple: s/%%action/%%actions/.
18237
18238 2001-12-15 Akim Demaille <akim@epita.fr>
18239
18240 * src/reader.c (copy_action): When --yacc, don't append a `;'
18241 to the user action: let it fail if lacking.
18242 Suggested by Arnold Robbins and Tom Tromey.
18243
18244 2001-12-14 Akim Demaille <akim@epita.fr>
18245
18246 * src/lex.c (literalchar): Simply return the char you decoded, non
18247 longer mess around with obstacks and int pointers.
18248 Adjust all callers.
18249
18250 2001-12-14 Akim Demaille <akim@epita.fr>
18251
18252 * src/lex.c (literalchar): Don't escape the special characters,
18253 just decode them, and keep them as char (before, eol was output as
18254 the 2 char string `\n' etc.).
18255 * src/output.c (output_rule_data): Use quotearg to output the
18256 token strings.
18257
18258 2001-12-13 Paul Eggert <eggert@twinsun.com>
18259
18260 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18261 Do not infringe on the global user namespace when using C++.
18262 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18263 All uses of `fprintf' and `stderr' changed.
18264
18265 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18266
18267 2001-12-13 Akim Demaille <akim@epita.fr>
18268
18269 The computation of nullable is broken: it doesn't handle empty
18270 RHS's properly.
18271
18272 * tests/torture.at (GNU AWK Grammar): New.
18273 * tests/sets.at (Nullable): New.
18274 * src/nullable.c (set_nullable): Instead of blindly looping over
18275 `ritems', loop over the rules, and then over their rhs's.
18276
18277 Work around Autotest bugs.
18278
18279 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18280 frame, because Autotest understand lines starting with a `+' as
18281 traces from the shell. Then, they are not processed properly.
18282 Admittedly an Autotest bug, but we don't have time to wait for
18283 Autotest to catch up.
18284 * tests/regression.at (Broken Closure): Adjust to the new table
18285 frames.
18286 Move to...
18287 * tests/sets.at: here.
18288
18289 2001-12-13 Akim Demaille <akim@epita.fr>
18290
18291 * src/closure.c (closure): Use nrules instead of playing tricks
18292 with BITS_PER_WORD.
18293
18294 2001-12-13 Akim Demaille <akim@epita.fr>
18295
18296 * src/print.c (print_actions): Output the handling of `$' as the
18297 traces do: shifting the token EOF. Before EOF was treated as a
18298 nonterminal.
18299 * tests/regression.at: Adjust some tests.
18300 * src/print_graph.c (print_core): Complete the set of items via
18301 closure. The next-to-final and final states are still unsatisfying,
18302 but that's to be addressed elsewhere.
18303 No longer output the rule numbers, but do output the state number.
18304 A single loop for the shifts + gotos is enough, but picked a
18305 distinct color for each.
18306 (print_graph): Initialize and finalize closure.
18307
18308 2001-12-13 Akim Demaille <akim@epita.fr>
18309
18310 * src/reader.c (readgram): Remove dead code, an strip useless
18311 braces.
18312 (get_type): Remove, unused.
18313
18314 2001-12-12 Akim Demaille <akim@epita.fr>
18315
18316 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18317 on that of lib/error.c.
18318
18319 2001-12-12 Akim Demaille <akim@epita.fr>
18320
18321 Some hosts don't like `/' in includes.
18322
18323 * src/system.h: Include libgettext.h without qualifying the path.
18324 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18325 $(top_srcdir).
18326
18327 2001-12-11 Marc Autret <autret_m@epita.fr>
18328
18329 * src/output.c (output_parser): Remove useless muscle.
18330
18331 2001-12-11 Marc Autret <autret_m@epita.fr>
18332
18333 * src/bison.simple: Remove #line just before %%epilogue. It
18334 is now handled in ...
18335 * src/reader.c (read_additionnal_code): Add the output of a
18336 #line for the epilogue.
18337
18338 2001-12-10 Marc Autret <autret_m@epita.fr>
18339
18340 * src/reader.c (copy_definition): Re-use CPP-outed code which
18341 replace precedent remove.
18342 * src/bison.simple: Remove #line before %%prologue because
18343 %%input-line is wrong at this time.
18344
18345 2001-12-10 Marc Autret <autret_m@epita.fr>
18346
18347 * src/reader.c (symbols_output): Clean up.
18348 * src/output.c (output_gram, output): Clean up.
18349
18350 2001-12-10 Akim Demaille <akim@epita.fr>
18351
18352 * src/lalr.c (initialize_lookaheads): New. Extracted from...
18353 * src/LR0.c (set_state_table): here.
18354 * src/lalr.c (lalr): Call it.
18355
18356 2001-12-10 Akim Demaille <akim@epita.fr>
18357
18358 * src/state.h (shifts): Remove the `number' member: shifts are
18359 attached to state, hence no longer need to be labelled with a
18360 state number.
18361
18362 2001-12-10 Akim Demaille <akim@epita.fr>
18363
18364 Now that states have a complete set of members, the linked list of
18365 shifts is useless: just fill directly the state's shifts member.
18366
18367 * src/state.h (shifts): Remove the `next' member.
18368 * src/LR0.c (first_state, last_state): Remove.
18369 Adjust the callers.
18370 (augment_automaton): Don't look for the shifts that must be added
18371 a shift on EOF: it is those of the state we looked for! But now,
18372 since shifts are attached, it is no longer needed to looking
18373 merely by its id: its number.
18374
18375 2001-12-10 Akim Demaille <akim@epita.fr>
18376
18377 * src/LR0.c (augment_automaton): Better variable locality.
18378 Remove an impossible branch: if there is a state corresponding to
18379 the start symbol being shifted, then there is shift for the start
18380 symbol from the initial state.
18381
18382 2001-12-10 Akim Demaille <akim@epita.fr>
18383
18384 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
18385 only when appropriate: when insert_start_shifting_state' is not
18386 invoked.
18387 * tests/regression.at (Rule Line Numbers): Adjust.
18388
18389 2001-12-10 Akim Demaille <akim@epita.fr>
18390
18391 * src/LR0.c (augment_automaton): Now that all states have shifts,
18392 merge the two cases addition shifts to the initial state.
18393
18394 2001-12-10 Akim Demaille <akim@epita.fr>
18395
18396 * src/lalr.c (set_state_table): Move to...
18397 * src/LR0.c: here.
18398 * src/lalr.c (lalr): Don't call it...
18399 * src/LR0.c (generate_states): do it.
18400 * src/LR0.h (first_state): Remove, only the table is used.
18401
18402 2001-12-10 Akim Demaille <akim@epita.fr>
18403
18404 * src/LR0.h (first_shift, first_reduction): Remove.
18405 * src/lalr.c: Don't use first_shift: find shifts through the
18406 states.
18407
18408 2001-12-10 Akim Demaille <akim@epita.fr>
18409
18410 * src/LR0.c: Attach shifts to states as soon as they are
18411 computed.
18412 * src/lalr.c (set_state_table): Instead of assigning shifts to
18413 state, just assert that the mapping was properly done.
18414
18415 2001-12-10 Akim Demaille <akim@epita.fr>
18416
18417 * src/LR0.c (insert_start_shift): Rename as...
18418 (insert_start_shifting_state): this.
18419 (insert_eof_shifting_state, insert_accepting_state): New.
18420 (augment_automaton): Adjust.
18421 Better locality of the variables.
18422 When looking if the start_symbol is shifted from the initial
18423 state, using `while (... symbol != start_symbol ...)' sounds
18424 better than `while (... symbol < start_symbol ...)': If fail
18425 to see how the order between symbols could be relevant!
18426
18427 2001-12-10 Akim Demaille <akim@epita.fr>
18428
18429 * src/getargs.h: Don't declare `spec_name_prefix' and
18430 `spec_file_prefix', declared by src/files.h.
18431 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
18432 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
18433 * src/output.c (prepare): Adjust.
18434 * src/reader.c (symbols_output): Likewise.
18435 * src/vmsgetargs.c: Vaguely adjust, but who cares?
18436
18437 2001-12-10 Akim Demaille <akim@epita.fr>
18438
18439 * src/muscle_tab.c (muscle_init): NULL is a better default than
18440 `"0"'.
18441
18442 2001-12-10 Akim Demaille <akim@epita.fr>
18443
18444 * src/reader.c (reader): Calling symbols_output once is enough.
18445
18446 2001-12-10 Akim Demaille <akim@epita.fr>
18447
18448 Now that states have a complete set of members, the linked list of
18449 reductions is useless: just fill directly the state's reductions
18450 member.
18451
18452 * src/state.h (struct reductions): Remove member `number' and
18453 `next'.
18454 * src/LR0.c (first_reduction, last_reduction): Remove.
18455 (save_reductions): Don't link the new reductions, store them in
18456 this_state.
18457 * src/lalr.c (set_state_table): No need to attach reductions to
18458 states, it's already done.
18459 * src/output.c (output_actions): No longer free the shifts, then
18460 the reductions, then the states: free all the states and their
18461 members.
18462
18463 2001-12-10 Akim Demaille <akim@epita.fr>
18464
18465 * src/options.c (OPTN, DRTV, BOTH): New.
18466 (option_table): Use them.
18467
18468 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
18469 the job of system.h.
18470 * src/options.c: Don't include stdio.h and xalloc.h for the same
18471 reasons.
18472
18473 2001-12-10 Akim Demaille <akim@epita.fr>
18474
18475 * src/output.c (output, prepare): Make sure the values of the
18476 muscles `action' and `prologue' are 0-terminated.
18477
18478 2001-12-10 Akim Demaille <akim@epita.fr>
18479
18480 Clean up GCC warnings.
18481
18482 * src/reader.c (copy_action): `buf' is not used.
18483 (parse_skel_decl): Be static.
18484 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
18485 * src/options.h (create_long_option_table): Have a real prototype.
18486 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
18487 (hash_delete_at): Return const void *.
18488 Adjust casts to preserve the const.
18489
18490 2001-12-10 Akim Demaille <akim@epita.fr>
18491
18492 * configure.in: Require 2.52g.
18493 M4 is not needed, but AUTOM4TE is.
18494 * m4/m4.m4: Remove.
18495 * tests/Makefile.am: Adjust.
18496
18497 2001-12-10 Akim Demaille <akim@epita.fr>
18498
18499 One structure for states is enough, even though theoretically
18500 there are LR(0) states and LALR(1) states.
18501
18502 * src/lalr.h (state_t): Remove.
18503 (state_table): Be state_t **, not state_t *.
18504 * src/state.h (core, CORE_ALLOC): Rename as...
18505 (state_t, STATE_ALLOC): this.
18506 Add the LALR(1) members: shifts, reductions, errs.
18507 * src/LR0.c (state_table): Rename as...
18508 (state_hash): this, to avoid name clashes with the global
18509 `state_table'.
18510 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
18511 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
18512
18513 2001-12-10 Akim Demaille <akim@epita.fr>
18514
18515 Bison dumps core on bash.y.
18516 Reported by Pascal Bart.
18517
18518 * src/warshall.c (bitmatrix_print): New.
18519 (TC): Use it.
18520 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
18521 j must be the outer loop.
18522 * tests/regression.at (Broken Closure): New.
18523
18524 2001-12-05 Akim Demaille <akim@epita.fr>
18525
18526 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
18527 its argument.
18528 Reported by Peter Hamorsky.
18529
18530 2001-12-05 Akim Demaille <akim@epita.fr>
18531
18532 * src/conflicts.c (err_table): Remove.
18533 (resolve_sr_conflict): Adjust.
18534 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
18535 Rename as...
18536 (state_t.reductions, state_t.shifts): this.
18537
18538 2001-12-05 Akim Demaille <akim@epita.fr>
18539
18540 * src/reduce.c (reduce_grammar_tables): No longer disable the
18541 removal of useless rules via CPP but via `if (0)', so that the
18542 compiler still check the code is valid.
18543 For instance, it should have noticed `rline' no longer exists: use
18544 the `line' member of rule_t.
18545 * src/gram.c (dummy, rline): Remove, unused.
18546
18547 2001-12-05 Akim Demaille <akim@epita.fr>
18548
18549 * src/output.c (pack_vector): Use assert, not berror.
18550 * src/main.c (berror): Remove, unused.
18551
18552 2001-12-05 Akim Demaille <akim@epita.fr>
18553
18554 New experimental feature: if --verbose --trace output all the
18555 items of a state, not only its kernel.
18556
18557 * src/print.c (print_core): If `trace_flag', then invoke closure
18558 before outputting the items of the state (print_core is no longer
18559 a correct name them).
18560 (print_results): Invoke new_closure/free_closure if needed.
18561
18562 2001-12-05 Akim Demaille <akim@epita.fr>
18563
18564 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
18565 * src/closure.c, src/closure.h (itemsetsize): Rename as...
18566 (nitemset): for consistency with the rest of the project.
18567
18568 2001-12-05 Akim Demaille <akim@epita.fr>
18569
18570 * src/closure.c (print_closure): Improve.
18571 (closure): Use it for printing input and output.
18572
18573 2001-12-05 Akim Demaille <akim@epita.fr>
18574
18575 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
18576 indexed by nonterminals.
18577
18578 2001-12-05 Akim Demaille <akim@epita.fr>
18579
18580 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
18581 what it was!).
18582 * src/warshall.h: Remove accidental duplication of the content.
18583
18584 2001-12-05 Akim Demaille <akim@epita.fr>
18585
18586 * src/closure.c (set_fderives): De-obfuscate.
18587
18588 2001-12-05 Akim Demaille <akim@epita.fr>
18589
18590 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
18591
18592 2001-12-05 Akim Demaille <akim@epita.fr>
18593
18594 * src/closure.c (set_firsts): De-obfuscate.
18595
18596 2001-12-05 Akim Demaille <akim@epita.fr>
18597
18598 * src/output.c (action_row): De-obfuscate
18599 using the good o' techniques: arrays not pointers, variable
18600 locality, BITISSET, RESETBIT etc.
18601
18602 2001-12-05 Akim Demaille <akim@epita.fr>
18603
18604 Pessimize the code to simplify it: from now on, all the states
18605 have a valid SHIFTS, which NSHIFTS is possibly 0.
18606
18607 * src/LR0.c (shifts_new): Be global and move to..
18608 * src/state.c, src/state.h: here.
18609 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
18610 * src/print_graph: Adjust.
18611
18612 2001-12-05 Akim Demaille <akim@epita.fr>
18613
18614 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
18615 * src/conflicts.c: Use it.
18616 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
18617 incorrectly ``simplified''.
18618
18619 2001-12-05 Akim Demaille <akim@epita.fr>
18620
18621 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
18622 using the good o' techniques: arrays not pointers, variable
18623 locality, BITISSET, RESETBIT etc.
18624
18625 2001-12-05 Akim Demaille <akim@epita.fr>
18626
18627 * src/state.h (SHIFT_SYMBOL): New.
18628 * src/conflicts.c: Use it to deobfuscate.
18629
18630 2001-12-05 Akim Demaille <akim@epita.fr>
18631
18632 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
18633 (print_reductions): De-obfuscate using the good o' techniques:
18634 arrays not pointers, variable locality, BITISSET.
18635
18636 2001-12-05 Akim Demaille <akim@epita.fr>
18637
18638 * src/conflicts.c (print_reductions): Arrays, not pointers.
18639 Use BITISSET.
18640
18641 2001-12-05 Akim Demaille <akim@epita.fr>
18642
18643 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18644
18645 2001-12-05 Akim Demaille <akim@epita.fr>
18646
18647 * src/conflicts.c (print_reductions): Improve variable locality.
18648
18649 2001-12-05 Akim Demaille <akim@epita.fr>
18650
18651 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18652
18653 2001-12-05 Akim Demaille <akim@epita.fr>
18654
18655 * src/conflicts.c (print_reductions): Improve variable locality.
18656
18657 2001-12-05 Akim Demaille <akim@epita.fr>
18658
18659 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
18660 * src/lalr.c: Use them.
18661
18662 2001-12-05 Akim Demaille <akim@epita.fr>
18663
18664 * src/LR0.c (augment_automaton): Formatting changes.
18665 Better variable locality.
18666
18667 2001-12-05 Akim Demaille <akim@epita.fr>
18668
18669 * src/lalr.c (matrix_print): New.
18670 (transpose): Use it.
18671 Use arrays instead of pointers.
18672
18673 2001-12-05 Akim Demaille <akim@epita.fr>
18674
18675 * src/lalr.c (maxrhs): Move to...
18676 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
18677 * src/lalr.c (build_relations): Adjust.
18678
18679 2001-12-05 Akim Demaille <akim@epita.fr>
18680
18681 * src/lalr.c (transpose): Free the memory allocated to the
18682 argument, as it is replaced by the results by the unique caller.
18683 (build_relations): Merely invoke transpose: it handles the memory
18684 deallocation.
18685 Improve variable locality.
18686 Avoid variables used as mere abbreviations.
18687 (compute_lookaheads): Use arrays instead of pointers.
18688
18689 2001-12-05 Akim Demaille <akim@epita.fr>
18690
18691 * src/lalr.c (initialize_F): Improve variable locality.
18692 Avoid variables used as mere abbreviations.
18693
18694 2001-12-05 Akim Demaille <akim@epita.fr>
18695
18696 * src/derives.c (print_derives): Display the ruleno.
18697 * src/lalr.c (initialize_F, transpose): Better variable locality
18698 to improve readability.
18699 Avoid variables used as mere abbreviations.
18700
18701 2001-12-05 Akim Demaille <akim@epita.fr>
18702
18703 * src/lalr.c (traverse): Use arrays instead of pointers.
18704
18705 2001-12-05 Akim Demaille <akim@epita.fr>
18706
18707 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
18708 the handling of squeue.
18709 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18710
18711 2001-12-05 Akim Demaille <akim@epita.fr>
18712
18713 Because useless nonterminals are now kept alive (instead of being
18714 `destroyed'), we now sometimes examine them, and store information
18715 related to them. Hence we need to know their number, and adjust
18716 memory allocations.
18717
18718 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
18719 static.
18720 * src/LR0.c (allocate_itemsets): The memory allocated to
18721 `symbol_count' was used for two different purpose: once to count
18722 the number of occurrences of each symbol, and later reassigned to
18723 `shift_symbol', containing the symbol that can be shifted from a
18724 given state.
18725 Deobfuscate, i.e., allocate, use and free `symbol_count' here
18726 only, and...
18727 (new_itemsets): Allocate `shift_symbol' here.
18728 (allocate_itemsets): symbol_count includes useless nonterminals.
18729 Make room for them.
18730 (free_storage): Use `free', not `XFREE', for pointers that cannot
18731 be null.
18732
18733 2001-12-05 Akim Demaille <akim@epita.fr>
18734
18735 * src/nullable.c (set_nullable): Deobfuscate the handling of
18736 ritem.
18737 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18738
18739 2001-12-05 Akim Demaille <akim@epita.fr>
18740
18741 * src/gram.c, src/gram.h (ritem_print): New.
18742 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
18743 (This useless function was defined only to work around VMS linkers
18744 that can't handle compilation units with variables only).
18745 * src/reduce.c (dump_grammar): Use it to trace the construction of
18746 ritem.
18747
18748 2001-12-04 Paul Eggert <eggert@twinsun.com>
18749
18750 * src/bison.simple (union yyalloc): Change member names
18751 to be the same as the stack names.
18752 (yyparse): yyptr is now union yyalloc *, not char *.
18753 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
18754 and may generate better code on some machines.
18755 (yystpcpy): Use prototype if __STDC__ is defined, not just
18756 if __cplusplus is defined.
18757
18758 2001-11-30 Akim Demaille <akim@epita.fr>
18759
18760 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
18761 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
18762 Gettext doesn't compile cleanly, and dies with -Werror.
18763 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
18764 Include WARNING_CFLAGS here.
18765 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
18766 before being defined.
18767
18768 2001-11-27 Paul Eggert <eggert@twinsun.com>
18769
18770 * lib/quotearg.h (quotearg_n, quotearg_n_style):
18771 First arg is int, not unsigned.
18772 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
18773 (SIZE_MAX, UINT_MAX): New macros.
18774 (quotearg_n_options): Abort if N is negative.
18775 Avoid overflow check on hosts where size_t is 64 bits and int
18776 is 32 bits, as overflow is impossible there.
18777 Fix off-by-one typo that caused unnecessary reallocation.
18778
18779 2001-11-29 Paul Eggert <eggert@twinsun.com>
18780
18781 Name space cleanup in generated parser.
18782
18783 * doc/bison.texinfo (Bison Parser): Discuss system headers
18784 and their effect on the user name space.
18785
18786 * src/bison.simple:
18787 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
18788 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
18789 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
18790
18791 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
18792 on user names when possible.
18793
18794 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
18795 Simplify test for whather <alloca.h> exists.
18796
18797 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
18798
18799 (<stdio.h>): Include if YYDEBUG.
18800
18801 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
18802 ! defined (yyoverflow) && ! defined (yymemcpy).
18803
18804 (yymemcpy, yyparse): Rename local variables as needed so that
18805 they all begin with 'yy'.
18806
18807 (yystrlen, yystpcpy): New functions.
18808
18809 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
18810 All uses changed.
18811
18812 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
18813 instead of relying on string.h functions. Use YYSTACK_ALLOC
18814 and YYSTACK_FREE instead of malloc and free.
18815
18816 2001-11-30 Akim Demaille <akim@epita.fr>
18817
18818 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
18819 before their first uses.
18820 (YYBISON, YYPURE): Move to the top of the output.
18821
18822 2001-11-30 Akim Demaille <akim@epita.fr>
18823
18824 * tests/reduce.at (Useless Nonterminals): Fix.
18825
18826 2001-11-30 Akim Demaille <akim@epita.fr>
18827
18828 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
18829 if body instead of `;' to pacify GCC's warnings.
18830
18831 2001-11-30 Akim Demaille <akim@epita.fr>
18832
18833 Instead of mapping the LHS of unused rules to -1, keep the LHS
18834 valid, but flag the rules as invalid.
18835
18836 * src/gram.h (rule_t): `useful' is a new member.
18837 * src/print.c (print_grammar): Adjust.
18838 * src/derives.c (set_derives): Likewise.
18839 * src/reader.c (packgram, reduce_output): Likewise.
18840 * src/reduce.c (reduce_grammar_tables): Likewise.
18841 * tests/reduce.at (Underivable Rules, Useless Rules): New.
18842
18843 2001-11-30 Akim Demaille <akim@epita.fr>
18844
18845 * src/reduce.c (reduce_output): Formatting changes.
18846 * src/print.c (print_results, print_grammar): Likewise.
18847 * tests/regression.at (Rule Line Numbers)
18848 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
18849
18850 2001-11-30 Akim Demaille <akim@epita.fr>
18851
18852 * src/reduce.c (nonterminals_reduce): Instead of throwing away
18853 useless nonterminals, move them at the end of the symbol arrays.
18854 (reduce_output): Adjust.
18855 * tests/reduce.at (Useless Nonterminals): Adjust.
18856
18857 2001-11-30 Akim Demaille <akim@epita.fr>
18858
18859 * src/reduce.c: Various comment/formatting changes.
18860 (nonterminals_reduce): New, extracted from...
18861 (reduce_grammar_tables): here.
18862 (reduce_grammar): Call nonterminals_reduce.
18863
18864 2001-11-29 Paul Eggert <eggert@twinsun.com>
18865
18866 * src/bison.simple (YYSTACK_REALLOC): Remove.
18867 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
18868 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
18869 New macros.
18870 (union yyalloc): New type.
18871 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
18872 an arbitrary restriction on hosts where size_t is wider than int.
18873
18874 (yyparse): Don't dump core if alloca or malloc fails; instead, report
18875 a parser stack overflow. Allocate just one block of memory for all
18876 three stacks, instead of allocating three blocks; this typically is
18877 faster and reduces fragmentation.
18878
18879 Do not limit the number of items in the stack to a value that fits
18880 in 'int', as this is an arbitrary limit on hosts with 64-bit
18881 size_t and 32-bit int.
18882
18883 2001-11-29 Marc Autret <autret_m@epita.fr>
18884
18885 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
18886 of defining YYERROR_VERBOSE.
18887 [AT_DATA]: $4 is now out of C declarations in the prologue.
18888
18889 2001-11-28 Marc Autret <autret_m@epita.fr>
18890
18891 * src/reader.c (parse_dquoted_param): New.
18892 (parse_skel_decl): Use it.
18893 * src/lex.h: Add its prototype.
18894 * src/lex.c (literalchar): Become not static.
18895
18896 2001-11-28 Marc Autret <autret_m@epita.fr>
18897
18898 * src/output.h: And put its extern declaration here.
18899 * src/output.c (error_verbose): Define here.
18900 (prepare): Echo name modification.
18901 * src/getargs.h: Clean its extern declaration.
18902 * src/getargs.c (error_verbose_flag): Remove.
18903 (getargs): Remove case 'e'.
18904 * src/options.c (option_table): 'error-verbose' is now seen as simple
18905 percent option.
18906 Include output.h.
18907
18908 * src/reader.c (read_declarations): Remove case tok_include.
18909 (parse_include_decl): Remove.
18910 * src/lex.h (token_t): Remove tok_include.
18911 * src/options.c (option_table): 'include' is now a simple command line
18912 option.
18913
18914 2001-11-28 Marc Autret <autret_m@epita.fr>
18915
18916 * src/bison.simple: Adjust muscle names.
18917 * src/muscle_tab.c (muscle_init): Also rename the muscles.
18918 * src/output.c (prepare): s/_/-/ for the muscles names.
18919 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
18920
18921 2001-11-28 Marc Autret <autret_m@epita.fr>
18922
18923 * src/bison.simple: Fix debug.
18924 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
18925
18926 2001-11-28 Akim Demaille <akim@epita.fr>
18927
18928 * src/LR0.c (shifts_new): New.
18929 (save_shifts, insert_start_shift, augment_automaton): Use it.
18930
18931 2001-11-28 Akim Demaille <akim@epita.fr>
18932
18933 * src/closure.c (closure): `b' and `ruleno' denote the same value:
18934 keep ruleno only.
18935
18936 2001-11-28 Akim Demaille <akim@epita.fr>
18937
18938 * src/closure.c (closure): Instead of looping over word in array
18939 then bits in words, loop over bits in array.
18940
18941 2001-11-28 Akim Demaille <akim@epita.fr>
18942
18943 * src/closure.c (closure): No longer optimize the special case
18944 where all the bits of `ruleset[r]' are set to 0, to make the code
18945 clearer.
18946
18947 2001-11-28 Akim Demaille <akim@epita.fr>
18948
18949 * src/closure.c (closure): `r' and `c' are new variables, used to
18950 de-obfuscate accesses to RULESET and CORE.
18951
18952 2001-11-28 Akim Demaille <akim@epita.fr>
18953
18954 * src/reduce.c (reduce_print): Use ngettext.
18955 (dump_grammar): Improve the trace accuracy.
18956
18957 2001-11-28 Akim Demaille <akim@epita.fr>
18958
18959 * src/reduce.c (dump_grammar): Don't translate trace messages.
18960
18961 2001-11-28 Akim Demaille <akim@epita.fr>
18962
18963 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
18964 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
18965 as all tags are free'ed afterwards.
18966 From Enrico Scholz.
18967
18968 2001-11-27 Paul Eggert <eggert@twinsun.com>
18969
18970 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
18971 use alloca when we didn't want to, and vice versa.
18972
18973 2001-11-27 Marc Autret <autret_m@epita.fr>
18974
18975 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
18976 initialization.
18977 * src/output.c (prepare): Remove its update.
18978
18979 2001-11-27 Marc Autret <autret_m@epita.fr>
18980
18981 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
18982 Use %error-verbose.
18983
18984 2001-11-27 Marc Autret <autret_m@epita.fr>
18985
18986 * src/bison.simple: Remove YYERROR_VERBOSE using.
18987 Use %%error_verbose.
18988 (yyparse): Likewise.
18989 * src/output.c (prepare): Give its final value.
18990 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
18991 * src/getargs.h: Add its extern declaration.
18992 * src/getargs.c (error_verbose_flag): New int.
18993 (getargs): Update to catch new case.
18994 * src/options.c (option_table): 'error-verbose' is a new option.
18995 (shortopts): Update.
18996
18997 2001-11-27 Akim Demaille <akim@epita.fr>
18998
18999 * src/system.h: Use intl/libgettext.h.
19000 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19001
19002 2001-11-27 Akim Demaille <akim@epita.fr>
19003
19004 * tests/torture.at (Exploding the Stack Size with Malloc):
19005 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19006
19007 2001-11-27 Akim Demaille <akim@epita.fr>
19008
19009 * src/files.c: Include error.h.
19010 Reported by Hans Aberg.
19011
19012 2001-11-26 Marc Autret <autret_m@epita.fr>
19013
19014 * src/reader.c (parse_include_decl): New, not yet implemented.
19015 (read_declarations): Add case tok_include.
19016 * src/getargs.h (include): Add its extern definition.
19017 * src/getargs.c (include): New const char *.
19018 (getargs): Add case '-I'.
19019 * src/options.c (option_table): Add include as command line and
19020 percent option.
19021 * src/lex.h (token_t): Add tok_include.
19022
19023 2001-11-26 Akim Demaille <akim@epita.fr>
19024
19025 * src/reader.c (readgram): Make sure rules for mid-rule actions
19026 have a lineno equal to that of their host rule.
19027 Reported by Hans Aberg.
19028 * tests/regression.at (Rule Line Numbers): New.
19029
19030 2001-11-26 Akim Demaille <akim@epita.fr>
19031
19032 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19033 size_ts.
19034
19035 2001-11-26 Akim Demaille <akim@epita.fr>
19036
19037 * src/complain.c, src/complain.h (error): Remove, provided by
19038 lib/error.[ch].
19039
19040 2001-11-26 Akim Demaille <akim@epita.fr>
19041
19042 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19043 issue an error message.
19044 * tests/regression.at (Invalid %directive): New.
19045 Reported by Hans Aberg.
19046
19047 2001-11-26 Akim Demaille <akim@epita.fr>
19048
19049 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19050 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19051
19052 2001-11-26 Akim Demaille <akim@epita.fr>
19053
19054 * src/conflicts.c (conflicts_print): Don't complain at all when
19055 there are no reduce/reduce conflicts, and as many shift/reduce
19056 conflicts as expected.
19057 * tests/regression.at (%expect right): Adjust.
19058
19059 2001-11-23 Akim Demaille <akim@epita.fr>
19060
19061 * lib/alloca.c: Update, from fileutils.
19062
19063 2001-11-23 Akim Demaille <akim@epita.fr>
19064
19065 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19066
19067 2001-11-23 Akim Demaille <akim@epita.fr>
19068
19069 * src/system.h: Include alloca.h.
19070 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19071
19072 2001-11-23 Akim Demaille <akim@epita.fr>
19073
19074 * src/print_graph.c (print_actions): Remove `rule', unused.
19075 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19076 pacify GCC's signed < unsigned warnings.
19077 * src/closure.c (itemsetsize): Likewise.
19078 * src/reader.c (symbol_list_new): Static.
19079
19080 2001-11-23 Akim Demaille <akim@epita.fr>
19081
19082 Attaching lineno to buckets is stupid, since only one copy of each
19083 symbol is kept, only the line of the first occurrence is kept too.
19084
19085 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19086 * src/reader.c (rline_allocated): Remove, unused.
19087 (symbol_list): Have a `line' member.
19088 (symbol_list_new): New.
19089 (readgram): Use it.
19090 * src/print.c (print_grammar): Output the rule line numbers.
19091 * tests/regression.at (Solved SR Conflicts)
19092 (Unresolved SR Conflicts): Adjust.
19093 Reported by Hans Aberg.
19094
19095 2001-11-22 Marc Autret <autret_m@epita.fr>
19096
19097 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19098
19099 2001-11-22 Marc Autret <autret_m@epita.fr>
19100
19101 * src/muscle_tab.c (muscle_init): Remove initialization of
19102 skeleton muscle.
19103 * src/output.c (output_master_parser): Do it here.
19104
19105 2001-11-20 Akim Demaille <akim@epita.fr>
19106
19107 * po/sv.po: New.
19108 * configure.in (ALL_LINGUAS): Adjust.
19109 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19110 longer contains strings to translate.
19111
19112 2001-11-19 Akim Demaille <akim@epita.fr>
19113
19114 * src/conflicts.c (conflicts_print): Add a missing \n.
19115
19116 2001-11-19 Akim Demaille <akim@epita.fr>
19117
19118 * src/nullable.c (nullable_print): New.
19119 (set_nullable): Call it when tracing.
19120 Better locality of variables.
19121
19122 2001-11-19 Akim Demaille <akim@epita.fr>
19123
19124 * src/print.c (print_actions): Better locality of variables.
19125
19126 2001-11-19 Akim Demaille <akim@epita.fr>
19127
19128 * src/derives.c (print_derives): Fix and enrich.
19129 * src/closure.c (print_fderives): Likewise.
19130
19131 2001-11-19 Akim Demaille <akim@epita.fr>
19132
19133 * src/closure.c (itemsetend): Remove, replaced with...
19134 (itemsetsize): new.
19135
19136 2001-11-19 Akim Demaille <akim@epita.fr>
19137
19138 * src/LR0.c (kernel_end): Remove, replaced with...
19139 (kernel_size): new.
19140
19141 2001-11-19 Akim Demaille <akim@epita.fr>
19142
19143 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19144 to clarify.
19145
19146 2001-11-19 Akim Demaille <akim@epita.fr>
19147
19148 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19149
19150 2001-11-19 Akim Demaille <akim@epita.fr>
19151
19152 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19153 trace messages.
19154 * src/LR0.c: Likewise.
19155 (allocate_itemsets): Use arrays instead of pointers to clarify.
19156
19157 2001-11-19 Akim Demaille <akim@epita.fr>
19158
19159 * src/getargs.c (statistics_flag): Replace with...
19160 (trace_flag): New.
19161 (longopts): Accept --trace instead of --statistics.
19162 * src/getargs.h, src/options.c: Adjust.
19163 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19164 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19165
19166 2001-11-19 Akim Demaille <akim@epita.fr>
19167
19168 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
19169 pointers to clarify the code.
19170 (save_reductions, save_shifts): Factor common parts of alternatives.
19171
19172 2001-11-19 Akim Demaille <akim@epita.fr>
19173
19174 * src/LR0.c (new_state, get_state): Complete TRACE code.
19175 * src/closure.c: Include `reader.h' to get `tags', needed by the
19176 trace code.
19177 Rename the conditional DEBUG as TRACE.
19178 Output consistently TRACEs to stderr, not stdout.
19179 * src/derives.c: Likewise.
19180 * src/reduce.c: (inaccessable_symbols): Using if is better style
19181 than goto.
19182 Use `#if TRACE' instead of `#if 0' for tracing code.
19183
19184 2001-11-19 Akim Demaille <akim@epita.fr>
19185
19186 * src/system.h (LIST_FREE, shortcpy): New.
19187 * src/LR0.c: Use them.
19188 * src/output.c (free_itemsets, free_reductions, free_shifts):
19189 Remove, replaced by LIST_FREE.
19190
19191 2001-11-19 Akim Demaille <akim@epita.fr>
19192
19193 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19194 (REDUCTIONS_ALLOC): New.
19195 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19196 allocation.
19197
19198 2001-11-19 Akim Demaille <akim@epita.fr>
19199
19200 * src/LR0.c (new_state): Complete trace code.
19201 * src/nullable.c (set_nullable): Don't translate traces.
19202
19203 2001-11-19 Akim Demaille <akim@epita.fr>
19204
19205 * src/print_graph.c (print_core): Better locality of variables.
19206 * src/print.c (print_core): Likewise.
19207
19208 2001-11-19 Akim Demaille <akim@epita.fr>
19209
19210 * src/vcg.c: You do the output, so you are responsible of the
19211 handling of VCG syntax, in particular: use quotearg.
19212 * src/print_graph.c: Don't.
19213 (print_actions): Don't output the actions as part of the nodes,
19214 since that's the job of the edges.
19215 (print_state): Don't output by hand: fill the node description,
19216 and ask for its output.
19217
19218 2001-11-19 Akim Demaille <akim@epita.fr>
19219
19220 * src/bison.simple (yyparse): When verbosely reporting an error,
19221 no longer put additional quotes around token names.
19222 * tests/calc.at: Adjust.
19223
19224 2001-11-19 Akim Demaille <akim@epita.fr>
19225
19226 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19227 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19228 * src/output.c: Adjust.
19229
19230 2001-11-19 Akim Demaille <akim@epita.fr>
19231
19232 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19233 (rule_t): this.
19234 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19235
19236 2001-11-19 Akim Demaille <akim@epita.fr>
19237
19238 * src/gram.h (rule_t): New.
19239 (rule_table): New.
19240 (rrhs, rlhs): Remove, part of state_t.
19241 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19242 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19243 * src/reader.c, src/reduce.c: Adjust.
19244
19245 2001-11-19 Akim Demaille <akim@epita.fr>
19246
19247 * src/reader.c (symbols_output): New, extracted from...
19248 (packsymbols): Here.
19249 (reader): Call it.
19250
19251 2001-11-19 Akim Demaille <akim@epita.fr>
19252
19253 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19254 (maxrhs): this new function.
19255
19256 2001-11-19 Akim Demaille <akim@epita.fr>
19257
19258 * src/lalr.c (F): New macro to access the variable F.
19259 Adjust.
19260
19261 2001-11-19 Akim Demaille <akim@epita.fr>
19262
19263 * src/lalr.h (LA): New macro to access the variable LA.
19264 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19265 * src/lalr.c: Adjust.
19266
19267 2001-11-19 Akim Demaille <akim@epita.fr>
19268
19269 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19270 (set_state_table): handle the `lookaheads' members.
19271
19272 2001-11-19 Akim Demaille <akim@epita.fr>
19273
19274 * src/lalr.h (lookaheads): Removed array, whose contents is now
19275 a member of...
19276 (state_t): this structure.
19277 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19278 Adjust.
19279
19280 2001-11-19 Akim Demaille <akim@epita.fr>
19281
19282 * src/lalr.h (consistent): Removed array, whose contents is now
19283 a member of...
19284 (state_t): this structure.
19285 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19286 Adjust.
19287
19288 2001-11-19 Akim Demaille <akim@epita.fr>
19289
19290 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19291 contents are now members of...
19292 (state_t): this structure.
19293 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19294 Adjust.
19295
19296 2001-11-19 Akim Demaille <akim@epita.fr>
19297
19298 * src/lalr.h (state_t): New.
19299 (state_table): Be a state_t * instead of a core **.
19300 (accessing_symbol): Remove, part of state_t.
19301 * src/lalr.c: Adjust.
19302 (set_accessing_symbol): Merge into...
19303 (set_state_table): this.
19304 * src/print_graph.c, src/conflicts.c: Adjust.
19305
19306 2001-11-14 Akim Demaille <akim@epita.fr>
19307
19308 * tests/calc.at, tests/output.at, tests/regression.at,
19309 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19310 now the tests are run in private dirs, therefore AC_CLEANUP and
19311 family can be simplified to 0-ary.
19312 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19313 use abs. path to find config.h.
19314 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19315 stderr, there can be way too much random noise.
19316 Instead pass -Werror to GCC and rely on the exit status.
19317 Reported by Wolfram Wagner.
19318
19319 2001-11-14 Akim Demaille <akim@epita.fr>
19320
19321 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19322 defined only if yyoverflow is defined, to avoid `warning: unused
19323 variable `yyvs1''.
19324 Reported by The Test Suite.
19325
19326 2001-11-14 Akim Demaille <akim@epita.fr>
19327
19328 * src/print.c: Include reduce.h.
19329 Reported by Hans Aberg.
19330
19331 2001-11-14 Akim Demaille <akim@epita.fr>
19332
19333 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19334 Revert a previous patch: these are really const.
19335 * src/conflicts.c (conflict_report): Additional useless pair of
19336 braces to pacify GCC's warnings for `if () if () {} else {}'.
19337 * src/lex.c (parse_percent_token): Replace equal_offset with
19338 arg_offset.
19339 arg is const.
19340 Be sure to strdup `arg' when used, since there is no reason for
19341 token_buffer not to change.
19342
19343 2001-11-14 Akim Demaille <akim@epita.fr>
19344
19345 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19346 definition.
19347 * src/main.c (main): Use them.
19348 Suggested by Hans Aberg.
19349
19350 2001-11-12 Akim Demaille <akim@epita.fr>
19351
19352 * src/system.h (ngettext): Now that we use ngettext, be sure to
19353 provide a default definition when NLS are not used.
19354
19355 2001-11-12 Akim Demaille <akim@epita.fr>
19356
19357 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
19358 Use @kbd to denote user input.
19359 (Language and Grammar): ANSIfy the example.
19360 Adjust its layout for info/notinfo.
19361 (Location Tracking Calc): Output error messages to stderr.
19362 Output locations in a more GNUtically correct way.
19363 Fix a couple of Englishos.
19364 Adjust @group/@end group pairs.
19365
19366 2001-11-12 Akim Demaille <akim@epita.fr>
19367
19368 %expect was not functioning at all.
19369
19370 * src/conflicts.c (expected_conflicts): Set to -1.
19371 (conflict_report): Use ngettext.
19372 (conflicts_print): Check %expect and make its violation an error.
19373 * doc/bison.texinfo (Expect Decl): Adjust.
19374 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
19375 * tests/regression.at (%expect not enough, %expect right)
19376 (%expect too much): New.
19377
19378 2001-11-12 Akim Demaille <akim@epita.fr>
19379
19380 * tests/regression.at (Conflicts): Rename as...
19381 (Unresolved SR Conflicts): this.
19382 (Solved SR Conflicts): New.
19383
19384 2001-11-12 Akim Demaille <akim@epita.fr>
19385
19386 * src/reduce.c (print_results): Rename as...
19387 (reduce_output): This.
19388 Output to OUT, passed as argument, instead of output_obstack.
19389 (dump_grammar): Likewise.
19390 (reduce_free): New.
19391 Also free V1.
19392 (reduce_grammar): No longer call reduce_output, since...
19393 * src/print.c (print_results): do it.
19394 * src/main.c (main): Call reduce_free;
19395
19396 2001-11-12 Akim Demaille <akim@epita.fr>
19397
19398 * src/conflicts.c (print_reductions): Accept OUT as argument.
19399 Output to it, not to output_obstack.
19400 * src/print.c (print_actions): Adjust.
19401
19402 2001-11-12 Akim Demaille <akim@epita.fr>
19403
19404 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
19405 the result instead of using...
19406 (src_total, rrc_total, src_count, rrc_count): Remove.
19407 (any_conflicts): Remove.
19408 (print_conflicts): Split into...
19409 (conflicts_print, conflicts_output): New.
19410 * src/conflicts.h: Adjust.
19411 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
19412 * src/print.c (print_grammar): Issue `\n' between two rules.
19413 * tests/regression.at (Conflicts): New.
19414 Reported by Tom Lane.
19415
19416 2001-11-12 Akim Demaille <akim@epita.fr>
19417
19418 * tests/regression.at (Invalid input): Remove, duplicate with
19419 ``Invalid input: 1''.
19420
19421 2001-11-12 Akim Demaille <akim@epita.fr>
19422
19423 * tests/torture.at (AT_DATA_STACK_TORTURE)
19424 (Exploding the Stack Size with Alloca)
19425 (Exploding the Stack Size with Malloc): New.
19426
19427 2001-11-12 Akim Demaille <akim@epita.fr>
19428
19429 * src/bison.simple (YYSTACK_REALLOC): New.
19430 (yyparse) [!yyoverflow]: Use it and free the old stack.
19431 Reported by Per Allansson.
19432
19433 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
19434
19435 * src/bison.simple: Define type yystype instead of YYSTYPE, and
19436 define CPP macro, which substitute YYSTYPE by yystype.
19437 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
19438 with yyltype/YYLTYPE. This allows inclusion of the generated
19439 header within the parser if the compiler, such as GGC, accepts
19440 multiple equivalent #defines.
19441 From Akim.
19442
19443 2001-11-05 Akim Demaille <akim@epita.fr>
19444
19445 * src/reader.c (symbols_output): New, extracted from...
19446 (packsymbols): here.
19447 (reader): Adjust.
19448
19449 2001-11-05 Akim Demaille <akim@epita.fr>
19450
19451 * src/lex.c (parse_percent_token): s/quotearg/quote/.
19452
19453 2001-11-05 Akim Demaille <akim@epita.fr>
19454
19455 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
19456 pattern.
19457
19458 2001-11-05 Akim Demaille <akim@epita.fr>
19459
19460 * src/options.h (struct option_table_struct): set_flags is void*.
19461 * src/options.c (longopts): Support `--output' and `%output'.
19462 (usage): Adjust.
19463 * src/lex.h (tok_setopt): Remove, replaced with...
19464 (tok_intopt, tok_stropt): these new guys.
19465 * src/lex.c (getopt.h): Not needed.
19466 (token_buffer, unlexed_token_buffer): Not const.
19467 (percent_table): Promote `-' over `_' in directive names.
19468 Active `%name-prefix', `file-prefix', and `output'.
19469 (parse_percent_token): Accept possible arguments to directives.
19470 Promote `-' over `_' in directive names.
19471
19472 2001-11-04 Akim Demaille <akim@epita.fr>
19473
19474 * doc/bison.texinfo (Decl Summary): Split the list into
19475 `directives for grammars' and `directives for bison'.
19476 Sort'em.
19477 Add description of `%name-prefix', `file-prefix', and `output'.
19478 Promote `-' over `_' in directive names.
19479 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
19480 Simplify the description of `--name-prefix'.
19481 Promote `-' over `_' in directive names.
19482 Promote `--output' over `--output-file'.
19483 Fix the description of `--defines'.
19484 * tests/output.at: Exercise %file-prefix and %output.
19485
19486 2001-11-02 Akim Demaille <akim@epita.fr>
19487
19488 * doc/refcard.tex: Update.
19489
19490 2001-11-02 Akim Demaille <akim@epita.fr>
19491
19492 * src/symtab.h (SUNDEF): New.
19493 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
19494 stand for `uninitialized', instead of 0.
19495 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
19496 * src/lex.c (lex): Adjust.
19497
19498 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
19499 Number it 0.
19500 Let yylex return it instead of a plain 0.
19501 Reported by Dick Streefland.
19502
19503 2001-11-02 Akim Demaille <akim@epita.fr>
19504
19505 * tests/regression.at (Mixing %token styles): New test.
19506
19507 2001-11-02 Akim Demaille <akim@epita.fr>
19508
19509 * src/reader.c (parse_thong_decl): Formatting changes.
19510 (token_translations_init): New, extracted from...
19511 (packsymbols): Here.
19512 Adjust.
19513
19514 2001-11-01 Akim Demaille <akim@epita.fr>
19515
19516 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
19517 Check that `9foo.y' produces correct cpp guards.
19518 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
19519 guards.
19520 Reported by Wwp.
19521
19522 2001-11-01 Akim Demaille <akim@epita.fr>
19523
19524 * tests/regression.at (Invalid input: 2): New.
19525 * src/lex.c (unlexed_token_buffer): New.
19526 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
19527 too.
19528 Reported by Wwp.
19529
19530 2001-11-01 Akim Demaille <akim@epita.fr>
19531
19532 * tests/calc.at: Catch up with 1.30.
19533 * configure.in: Bump to 1.49a.
19534 Adjust to newer Autotest.
19535
19536 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
19537
19538 * src/conflicts.c: Move global variables rrc_total and src_total ...
19539 (print_conflicts): here.
19540 * src/output.c (output): Free global variable user_toknums.
19541 * src/lex.c (token_obstack): Become static.
19542
19543 2001-10-18 Akim Demaille <akim@epita.fr>
19544
19545 * tests/atlocal.in (GCC): Add.
19546 * tests/calc.at: s/m4_match/m4_bmatch/.
19547 s/m4_patsubst/m4_bpatsubst/.
19548 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
19549 * configure.in: AC_SUBST(GCC).
19550
19551 2001-10-14 Marc Autret <autret_m@epita.fr>
19552
19553 * src/options.c (create_long_option_table): Fix.
19554
19555 2001-10-10 Akim Demaille <akim@epita.fr>
19556
19557 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
19558
19559 2001-10-04 Akim Demaille <akim@epita.fr>
19560
19561 * src/reader.c (parse_union_decl): Push the caracters in
19562 union_obstack, not attrs_obstack.
19563
19564 2001-10-04 Akim Demaille <akim@epita.fr>
19565
19566 Merge in the branch 1.29.
19567
19568 * src/reader.c (packsymbols): Use a temporary obstack for
19569 `%%tokendef', since output_stack is already used elsewhere.
19570
19571 2001-10-02 Akim Demaille <akim@epita.fr>
19572
19573 Bump 1.29d.
19574
19575 2001-10-02 Akim Demaille <akim@epita.fr>
19576
19577 Version 1.29c.
19578
19579 2001-10-02 Akim Demaille <akim@epita.fr>
19580
19581 * tests/regression.at (Invalid CPP headers): New.
19582 From Alexander Belopolsky.
19583 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
19584
19585 2001-10-02 Akim Demaille <akim@epita.fr>
19586
19587 * tests/regression.at (Invalid input): New.
19588 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
19589 Reported by Shura.
19590
19591 2001-10-02 Akim Demaille <akim@epita.fr>
19592
19593 * tests/calc.at: Now that --debug works, the tests must be adjusted.
19594
19595 2001-10-02 Akim Demaille <akim@epita.fr>
19596
19597 * src/output.c (output_parser): Assert `skeleton'.
19598 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
19599 systems.
19600 From Shura.
19601
19602 2001-10-01 Marc Autret <autret_m@epita.fr>
19603
19604 * src/lex.h: Echo modifications.
19605 * src/lex.c (unlex): Parameter is now token_t.
19606 From Hans Aberg.
19607
19608 2001-10-01 Marc Autret <autret_m@epita.fr>
19609
19610 * src/main.c: Include lex.h.
19611 From Hans Aberg.
19612
19613 2001-09-29 Akim Demaille <akim@epita.fr>
19614
19615 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
19616
19617 2001-09-28 Akim Demaille <akim@epita.fr>
19618
19619 * tests/testsuite.at: Update to newer Autotest.
19620 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
19621
19622 2001-09-27 Akim Demaille <akim@epita.fr>
19623
19624 Position independent wrapper.
19625
19626 * tests/bison: Remove.
19627 * tests/bison.in: New.
19628 * configure.in: Adjust.
19629
19630 2001-09-27 Paul Eggert <eggert@twinsun.com>
19631
19632 Port quotearg fixes from tar 1.13.24.
19633
19634 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
19635 tm to be declared.
19636 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19637 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19638
19639 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
19640 * m4/mbrtowc.m4: New file.
19641 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
19642 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
19643
19644 2001-09-27 Akim Demaille <akim@epita.fr>
19645
19646 Bump to 1.29c.
19647
19648 2001-09-27 Akim Demaille <akim@epita.fr>
19649
19650 Version 1.29b.
19651
19652 2001-09-25 Akim Demaille <akim@epita.fr>
19653
19654 * src/system.h: Include `xalloc.h'.
19655 Remove it from the C files.
19656 * src/files.c (output_files): Free the obstacks.
19657 * src/lex.c (init_lex): Rename as...
19658 (lex_init): this.
19659 (lex_free): New.
19660 * src/main.c (main): Use it.
19661
19662 2001-09-24 Marc Autret <autret_m@epita.fr>
19663
19664 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
19665 to output informations in fout (FILE*).
19666 (open_graph, close_graph): Likewise.
19667 (output_graph, output_edge, output_node): Likewise.
19668 * src/vcg.h: Update function prototypes.
19669 * src/print_graph.c (print_graph): Open output graph file.
19670 (print_actions): Adjust.
19671 * src/files.h: Remove extern declaration.
19672 * src/files.c: Remove graph_obstack declaration.
19673 (open_files): Remove graph_obstack initialization.
19674 (output_files): Remove graph_obstack saving.
19675
19676 2001-09-24 Marc Autret <autret_m@epita.fr>
19677
19678 * src/files.c (compute_output_file_names): Fix.
19679
19680 2001-09-24 Marc Autret <autret_m@epita.fr>,
19681 Akim Demaille <akim@epita.fr>
19682
19683 * src/reader.c (reader): Remove call to free_symtab ().
19684 * src/main.c (main): Call it here.
19685 Include symtab.h.
19686 * src/conflicts.c (initialize_conflicts): Rename as...
19687 (solve_conflicts): this.
19688 * src/print.c (print_core, print_actions, print_state)
19689 (print_grammar): Dump to a file instead a `output_obstack'.
19690 (print_results): Dump `output_obstack', and then proceed with the
19691 FILE *.
19692 * src/files.c (compute_output_file_names, close_files): New.
19693 (output_files): Adjust.
19694 * src/main.c (main): Adjust.
19695
19696 2001-09-23 Marc Autret <autret_m@epita.fr>
19697
19698 * src/files.c (compute_header_macro): Computes header macro name
19699 from spec_defines_file when given.
19700
19701 2001-09-23 Marc Autret <autret_m@epita.fr>
19702
19703 * src/files.c (output_files): Add default extensions.
19704
19705 2001-09-22 Akim Demaille <akim@epita.fr>
19706
19707 * src/conflicts.c (finalize_conflicts): Rename as...
19708 (free_conflicts): this.
19709
19710 2001-09-22 Akim Demaille <akim@epita.fr>
19711
19712 * src/gram.c (gram_free): Rename back as...
19713 (dummy): this.
19714 (output_token_translations): Free `token_translations'.
19715 * src/symtab.c (free_symtab): Free the tag field.
19716
19717 2001-09-22 Akim Demaille <akim@epita.fr>
19718
19719 Remove `translations' as it is always set to true.
19720
19721 * src/gram.h: Adjust.
19722 * src/reader.c (packsymbols, parse_token_decl): Adjust
19723 * src/print.c (print_grammar): Adjust.
19724 * src/output.c (output_token_translations): Adjust.
19725 * src/lex.c (lex): Adjust.
19726 * src/gram.c: Be sure the set pointers to NULL.
19727 (dummy): Rename as...
19728 (gram_free): this.
19729
19730 2001-09-22 Akim Demaille <akim@epita.fr>
19731
19732 * configure.in: Invoke AM_LIB_DMALLOC.
19733 * src/system.h: Use dmalloc.
19734 * src/LR0.c: Be sure to have pointers initialized to NULL.
19735 (allocate_itemsets): Allocate kernel_items only if needed.
19736
19737 2001-09-22 Akim Demaille <akim@epita.fr>
19738
19739 * configure.in: Bump to 1.29b.
19740 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
19741 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
19742 need xmalloc.c in calc.y.
19743 From Pascal Bart.
19744
19745 2001-09-21 Akim Demaille <akim@epita.fr>
19746
19747 Version 1.29a.
19748 * Makefile.maint, config/config.guess, config/config.sub,
19749 * config/missing: Update from masters.
19750 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
19751 upon package.m4.
19752 * configure.in (ALL_LINGUAS): Add `tr'.
19753
19754 2001-09-21 Akim Demaille <akim@epita.fr>
19755
19756 * tests/Makefile.am (package.m4): Move to...
19757 ($(srcdir)/$(TESTSUITE)): here.
19758
19759 2001-09-20 Akim Demaille <akim@epita.fr>
19760
19761 * src/complain.c: No longer try to be standalone: use system.h.
19762 Don't assume __STDC__ is defined to 1. Just test if it is defined.
19763 * src/complain.h: Likewise.
19764 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
19765 Remove the unused variable `n'.
19766 From Albert Chin-A-Young.
19767
19768 2001-09-18 Marc Autret <autret_m@epita.fr>
19769
19770 * doc/bison.1: Update.
19771 * doc/bison.texinfo (Bison Options): Update --defines and --graph
19772 descriptions.
19773 (Option Cross Key): Update.
19774 Add --graph.
19775
19776 2001-09-18 Marc Autret <autret_m@epita.fr>
19777
19778 * tests/regression.at: New test (comment in %union).
19779
19780 2001-09-18 Marc Autret <autret_m@epita.fr>
19781
19782 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
19783 do that.
19784 Reported by Keith Browne.
19785
19786 2001-09-18 Marc Autret <autret_m@epita.fr>
19787
19788 * tests/output.at: Add tests for --defines and --graph.
19789
19790 2001-09-18 Marc Autret <autret_m@epita.fr>
19791
19792 * tests/output.at: Removes tests of %{header,src}_extension features.
19793
19794 2001-09-18 Akim Demaille <akim@epita.fr>
19795
19796 * tests/Makefile.am (package.m4): New.
19797 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
19798 (_AT_CHECK_CALC_ERROR): Likewise.
19799 Factor the `, ' part of verbose error messages.
19800
19801 2001-09-18 Marc Autret <autret_m@epita.fr>
19802
19803 * src/getargs.c (longopts): Declare --defines and --graph as options
19804 with optional arguments.
19805 * src/files.h: Add extern declarations.
19806 * src/files.c (spec_graph_file, spec_defines_file): New.
19807 (output_files): Update.
19808 Remove CPP-outed code.
19809
19810 2001-09-18 Marc Autret <autret_m@epita.fr>
19811
19812 Turn off %{source,header}_extension feature.
19813
19814 * src/files.c (compute_exts_from_gf): Update.
19815 (compute_exts_from_src): Update.
19816 (output_files): CPP-out useless code.
19817 * src/files.h: Remove {header,source}_extension extern declarations.
19818 * src/reader.c (parse_dquoted_param): CPP-out.
19819 (parse_header_extension_decl): Remove.
19820 (parse_source_extension_decl): Remove.
19821 (read_declarations): Remove cases tok_{hdrext,srcext}.
19822 * src/lex.c (percent_table): Remove {header,source}_extension entries.
19823 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
19824
19825 2001-09-10 Akim Demaille <akim@epita.fr>
19826
19827 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
19828 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
19829 (AT_CHECK_OUTPUT): this.
19830 Merely check ls' exit status, its output is useless.
19831
19832 2001-09-10 Akim Demaille <akim@epita.fr>
19833
19834 * tests/calc.at: Use m4_match.
19835 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
19836
19837 2001-09-10 Marc Autret <autret_m@epita.fr>,
19838 Akim Demaille <akim@epita.fr>
19839
19840 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
19841 enum color_e.
19842 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
19843 to `normal'.
19844 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
19845 * src/lex.h: Adjust prototype.
19846 (token_t): Add `tok_undef'.
19847 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
19848 (parse_percent_token): Now returns token_t.
19849 Add default statement in switch.
19850 (lex): Separate `c' as an input variable, from the token_t result
19851 part.
19852 (unlexed): Is a token_t.
19853
19854 2001-09-10 Akim Demaille <akim@epita.fr>
19855
19856 * configure.in: Bump to 1.29a.
19857
19858 2001-09-07 Akim Demaille <akim@epita.fr>
19859
19860 Version 1.29.
19861
19862 2001-08-30 Akim Demaille <akim@epita.fr>
19863
19864 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
19865 * m4/atconfig.m4: Remove.
19866 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
19867 * tests/bison: New.
19868 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
19869 m4_if, m4_patsubst, and m4_regexp.
19870 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
19871 `input' file instead of echo.
19872
19873 2001-08-29 Akim Demaille <akim@epita.fr>
19874
19875 Bump to 1.28e.
19876
19877 2001-08-29 Akim Demaille <akim@epita.fr>
19878
19879 Version 1.28d.
19880
19881 2001-08-29 Paul Eggert <eggert@twinsun.com>
19882
19883 * src/bison.simple (yyparse): Don't take the address of an
19884 item before the start of an array, as that doesn't conform to
19885 the C Standard.
19886
19887 2001-08-29 Robert Anisko <anisko_r@epita.fr>
19888
19889 * doc/bison.texinfo (Location Tracking Calc): New node.
19890
19891 2001-08-29 Paul Eggert <eggert@twinsun.com>
19892
19893 * src/output.c (output): Do not define const, as this now
19894 causes more problems than it cures.
19895
19896 2001-08-29 Akim Demaille <akim@epita.fr>
19897
19898 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
19899 the nodes.
19900 Be sure to tag the `detailmenu'.
19901
19902 2001-08-29 Akim Demaille <akim@epita.fr>
19903
19904 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
19905 download in a tmp dir.
19906
19907 2001-08-28 Marc Autret <autret_m@epita.fr>
19908
19909 * config/depcomp: New file.
19910
19911 2001-08-28 Marc Autret <autret_m@epita.fr>
19912
19913 * doc/bison.1 (mandoc): Adjust.
19914 From Juan Manuel Guerrero.
19915
19916 2001-08-28 Marc Autret <autret_m@epita.fr>
19917
19918 * src/print_graph.c (print_state): Fix.
19919
19920 2001-08-27 Marc Autret <autret_m@epita.fr>
19921
19922 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
19923 char * members.
19924 Echo modifications to the functions prototypes.
19925 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
19926
19927 2001-08-27 Marc Autret <autret_m@epita.fr>
19928
19929 * src/vcg.c: Include `xalloc.h'.
19930 (add_colorentry): New.
19931 (add_classname): New.
19932 (add_infoname): New.
19933 * src/vcg.h: Add new prototypes.
19934
19935 2001-08-27 Akim Demaille <akim@epita.fr>
19936
19937 * Makefile.maint: Sync. again with CVS Autoconf.
19938
19939 2001-08-27 Akim Demaille <akim@epita.fr>
19940
19941 * Makefile.maint: Formatting changes.
19942 (po-update, cvs-update, update): New targets.
19943 (AMTAR): Remove.
19944
19945 2001-08-27 Akim Demaille <akim@epita.fr>
19946
19947 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
19948 * Makefile.maint: Sync. with CVS Autoconf.
19949
19950 2001-08-27 Marc Autret <autret_m@epita.fr>
19951
19952 * src/vcg.h (struct infoname_s): New.
19953 (struct colorentry_s): New.
19954 (graph_s): New fields {vertical,horizontal}_order in structure.
19955 Add `infoname' field.
19956 Add `colorentry' field;
19957 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
19958 (G_HORIZONTAL_ORDER): New.
19959 (G_INFONAME): New.
19960 (G_COLORENTRY): New.
19961 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
19962 Add output of `infoname'.
19963 Add output of `colorentry'.
19964
19965 2001-08-27 Marc Autret <autret_m@epita.fr>
19966
19967 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
19968 This one shadowed a global parameter.
19969
19970 2001-08-24 Marc Autret <autret_m@epita.fr>
19971
19972 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
19973 instead of `unsigned'.
19974 (print_state): Do not call obstack_object_size () in obstack_grow ()
19975 to avoid macro variables shadowing.
19976
19977 2001-08-23 Marc Autret <autret_m@epita.fr>
19978
19979 * src/lex.c (percent_table): Typo: s/naem/name/.
19980 Add graph option.
19981 Normalize new options declarations.
19982
19983 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
19984
19985 * tests/suite.at: Exercise %header_extension and %source_extension.
19986
19987 2001-08-16 Marc Autret <autret_m@epita.fr>
19988
19989 * src/reader.c (parse_dquoted_param): New.
19990 (parse_header_extension_decl): Use it.
19991 (parse_source_extension_decl): Likewise.
19992
19993 2001-08-16 Marc Autret <autret_m@epita.fr>
19994
19995 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
19996 (get_xxxx_str): Use assert () instead of complain ().
19997 Remove return invokations in default cases.
19998 (get_decision_str): Modify default behaviour. Remove second argument.
19999 Echo modifications on calls.
20000 (output_graph): Fix.
20001
20002 2001-08-16 Marc Autret <autret_m@epita.fr>
20003
20004 * src/getargs.c (usage): Update with ``-g, --graph''.
20005
20006 2001-08-16 Marc Autret <autret_m@epita.fr>
20007
20008 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20009 (Option Cross Key): Likewise.
20010 * doc/bison.1: Update.
20011
20012 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
20013
20014 * src/output.c (output_master_parser): Don't finish action_obstack.
20015 (output_parser): Don't care about the muscle action, here.
20016 (prepare): Copy the action_obstack in the action muscle.
20017 (output): Free action_obstack.
20018
20019 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20020
20021 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20022 will contain `%union' declaration.
20023 (parse_union_decl): Delete #line directive output.
20024 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20025 informations about %union.
20026 (parse_union_decl): Copy the union_obstack in the muscle stype.
20027 * src/bison.simple: Add new #line directive.
20028 Add typdef %%stype YYSTYPE.
20029
20030 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20031
20032 * src/bison.simple: Add new `#line' directive.
20033
20034 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
20035
20036 * src/bison.simple: New `#line' directive.
20037 * src/output.c (output_parser): Support new dynamic muscle input_line.
20038
20039 2001-09-22 Marc Autret <autret_m@epita.fr>
20040
20041 * src/output.c (output_master_parser): New.
20042 (output_parser): Be more re-entrant.
20043
20044 2001-09-21 Marc Autret <autret_m@epita.fr>
20045
20046 * src/reader.c (copy_definition, parse_union_decl): Update and use
20047 `linef' muscle.
20048 (copy_action): Likewise.
20049 Use obstack_1grow ().
20050 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20051
20052 2001-09-21 Marc Autret <autret_m@epita.fr>
20053
20054 * src/options.c (option_table): Adjust.
20055 * src/lex.c (parse_percent_token): Fix.
20056
20057 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20058
20059 * src/options.c (symtab.h): Include it, need by lex.h.
20060
20061 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20062
20063 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20064 is now an option_table_struct*.
20065 (option_strcmp): New function option_strcmp.
20066 (parse_percent_token): Call option_strcmp.
20067 * src/getargs.c (xalloc.h, options.h): Include it.
20068 (getargs): Call create_long_option_table.
20069 (getargs): Free longopts at the end of the function.
20070 (shortopts): Move in options.c.
20071 * src/options.c (create_long_option_table): New function. Convert
20072 information from option_table to option structure.
20073 * src/reader.c (options.h): Include it.
20074
20075 * src/Makefile.am: Adjust.
20076 * src/options.c (option_table): Create from longopts and percent_table.
20077 * src/getargs.c (longopts): Delete.
20078 * src/lex.c (struct percent_table_struct): Delete.
20079 (percent_table): Delete.
20080 (options.h): Include it.
20081 * src/options.c: Create.
20082 * src/options.h: Create.
20083 Declare enum opt_access_e.
20084 Define struct option_table_struct.
20085
20086 2001-09-20 Marc Autret <autret_m@epita.fr>
20087
20088 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20089 sections of Bison.
20090
20091 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
20092
20093 * src/bison.simple: s/%%filename/%%skeleton.
20094 * src/muscle_tab.c (getargs.h): Include it.
20095 (muscle_init): Insert new muscle skeleton.
20096
20097 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
20098
20099 * src/output.c (output_parser): Delete unused variable actions_dumped.
20100
20101 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
20102
20103 * src/output.c (output): Delete call to reader_output_yylsp.
20104 * src/reader.c (reader): Likewise.
20105 * src/reader.h: Delete declaration of reader_output_yylsp.
20106
20107 2001-09-02 Marc Autret <autret_m@epita.fr>
20108
20109 * src/reader.c: Include muscle_tab.h.
20110 (parse_union_decl): Update.
20111 (parse_macro_decl): Rename parse_muscle_decl.
20112 Update to use renamed functions and variable.
20113 (read_declarations, copy_action, read_additionnal_code, : Updated
20114 with correct variables and functions names.
20115 (packsymbols, reader): Likewise.
20116
20117 * src/reader.h (muscle_obstack): Extern declaration update.
20118
20119 * src/output.c: Include muscle_tab.h
20120 In all functions using macro_insert, change by using muscle_insert ().
20121 (macro_obstack): Rename muscle_obstack.
20122 Echo modifications in the whole file.
20123 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20124 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20125 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20126
20127 * src/muscle_tab.h: Update double inclusion macros.
20128 (macro_entry_s): Rename muscle_entry_s.
20129 Update prototypes.
20130
20131 * src/muscle_tab.c: Include muscle_tab.h.
20132 Rename macro_tabble to muscle_table.
20133 (mhash1, mhash2, mcmp): Use muscle_entry.
20134 (macro_init): Rename muscle_init. Update.
20135 (macro_insert): Rename muscle_insert. Update.
20136 (macro_find): Rename muscle_find. Update.
20137
20138 * src/main.c: Include muscle_tab.h.
20139 (main): Call muscle_init ().
20140 * src/Makefile.am (bison_SOURCES): Echo modifications.
20141
20142 2001-09-02 Marc Autret <autret_m@epita.fr>
20143
20144 Now the files macro_tab.[ch] are named muscle_tab.[ch].
20145
20146 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20147
20148 2001-09-02 Marc Autret <autret_m@epita.fr>
20149
20150 * src/macrotab.c, src/macrotab.h: Remove.
20151
20152 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
20153
20154 * src/reader.c (copy_guard): Use muscle to specify the `#line'
20155 filename.
20156
20157 2001-09-01 Marc Autret <autret_m@epita.fr>
20158
20159 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20160 to an explicit value to activate the feature. We do it here.
20161
20162 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20163
20164 * src/output.c (prepare): Delete the `filename' muscule insertion.
20165 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20166 (parse_union_decl): Likewise.
20167 * src/macrotab.c (macro_init): Initialize filename by infile.
20168
20169 2001-08-31 Marc Autret <autret_m@epita.fr>
20170
20171 * src/bison.simple (YYLSP_NEEDED): New definition.
20172 * src/output.c (prepare): Add macro insertion of `locations_flag'
20173
20174 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20175
20176 * src/output.c (prepare): Delete insertion of previous muscles,
20177 and insert the `prefix' muscles.
20178 * src/macrotab.c (macro_init): Likewise.
20179 (macro_init): Initialization prefix directive by `yy'.
20180 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
20181 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20182 yylval, yydebug, yyerror, yynerrs and yyparse.
20183 New directive `#define' to substitute yydebug, ... with option
20184 name_prefix.
20185
20186 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20187
20188 * src/main.c (main): Standardize.
20189 * src/output.c (output_table_data, output_parser): Likewise.
20190 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20191
20192 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20193
20194 * src/reader.c (read_additionnal_code): Rename %%user_code to
20195 %%epilogue.
20196 * src/output.c (output): Rename %%declarations to %%prologue.
20197 * src/bison.simple: Echo modifications.
20198
20199 2001-08-31 Marc Autret <autret_m@epita.fr>
20200
20201 * src/reader.c (readgram): CleanUp.
20202 (output_token_defines): Likewise.
20203 (packsymbols): Likewise.
20204 (reader): Likewise.
20205 * src/output.c (output): CPP-out useless code.
20206
20207 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20208
20209 * src/reader.c (reader): Delete obsolete call to function
20210 output_trailers and output_headers.
20211 * src/output.h: Remove obsolete functions prototypes of output_headers
20212 and output_trailers.
20213
20214 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
20215
20216 * src/main.c: Include macrotab.h.
20217 * src/macrotab.h (macro_entry_s): Constify fields.
20218 Adjust functions prototypes.
20219 * src/macrotab.c (macro_insert): Constify key and value.
20220 (macro_find): Constify key.
20221 (macro_insert): Include 'xalloc.h'
20222 (macro_insert): Use XMALLOC.
20223 (macro_find): Constify return value.
20224 * src/output.c (output_table_data): Rename table to table_data.
20225 (output_parser): Constify macro_key, macro_value.
20226
20227 2001-08-30 Marc Autret <autret_m@epita.fr>
20228
20229 * src/reader.c (parse_skel_decl): New.
20230 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
20231 * src/lex.h (token_t): New token `tok_skel'.
20232 * src/lex.c (percent_table): Add skeleton option entry.
20233 Standardize.
20234
20235 2001-08-29 Marc Autret <autret_m@epita.fr>
20236
20237 * src/bison.simple: Add %%user_code directive at the end.
20238 * src/reader.c (read_additionnal_code): New.
20239 (reader): Use it.
20240 * src/output.c (output_program): Remove.
20241 (output): Update.
20242
20243 2001-08-28 Marc Autret <autret_m@epita.fr>
20244
20245 * src/output.c (output_actions): Clean up.
20246 (output_gram): CPP-out useless code.
20247 * src/reader.c (reader): Clean up, CPP-out useless code.
20248
20249 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
20250
20251 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
20252 directive.
20253 * src/bison.simple: Add `%%definitions'.
20254
20255 2001-08-28 Marc Autret <autret_m@epita.fr>
20256
20257 * config/depcomp: New file.
20258
20259 2001-08-27 Paul Eggert <eggert@twinsun.com>
20260
20261 * src/bison.simple (yyparse): Don't take the address of an
20262 item before the start of an array, as that doesn't conform to
20263 the C Standard.
20264
20265 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20266
20267 * src/output.c (output): Remove the initialization of the macro
20268 obstack. It was done too late here.
20269
20270 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20271 completely wrong.
20272 (reader): Initialize the macro obstack here, since we need it to grow
20273 '%define' directives.
20274
20275 * src/reader.h: Declare the macro obstack as extern.
20276
20277 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20278
20279 * src/output.c (output_parser): Fix. Store single '%' characters in
20280 the output obstack instead of throwing them away.
20281
20282 2001-08-27 Akim Demaille <akim@epita.fr>
20283
20284 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20285
20286 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20287
20288 * lib/Makefile.am: Adjust.
20289
20290 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20291
20292 * src/bison.simple: Update and add '%%' directives.
20293
20294 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20295
20296 * src/reader.c (reader): Remove calls to 'output_headers' and
20297 'output_trailers'. Remove some C output.
20298 (readgram): Disable a piece of code that was writing a default
20299 definition for 'YYSTYPE'.
20300 (reader_output_yylsp): Remove.
20301 (packsymbols): Output token defintions to a macro.
20302 (copy_definition): Disable C output.
20303
20304 * src/reader.c (parse_macro_decl): New function used to parse macro
20305 declarations.
20306 (copy_string2): Put the body of copy_string into this new function.
20307 Add a parameter to let the caller choose whether he wants to copy the
20308 string delimiters or not.
20309 (copy_string): Be a simple call to copy_string2 with the last argument
20310 bound to true.
20311 (read_declarations): Add case for macro definition.
20312 (copy_identifier): New.
20313 (parse_macro_decl): Read macro identifiers using copy_identifier
20314 rather than lex.
20315
20316 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20317
20318 * src/output.c (prepare): Add prefixed names.
20319 (output_parser): Output semantic actions.
20320 (output_parser): Fix bug on '%%line' directives.
20321
20322 * src/output.c (output_headers): Remove. The C code printed by this
20323 function should now be in the skeletons.
20324 (output_trailers): Remove.
20325 (output): Disable call to 'reader_output_yylsp'.
20326 (output_rule_data): Do not output tables to the table obstack.
20327
20328 * src/output.c: Remove some C dedicated output.
20329 Improve the use of macro and output obstacks.
20330 (output_defines): Remove.
20331
20332 * src/output.c (output_token_translations): Associate 'translate'
20333 table with a macro. No output to the table obstack.
20334 (output_gram): Same for 'rhs' and 'prhs'.
20335 (output_stos): Same for 'stos'.
20336 (output_rule_data): Same for 'r1' and 'r2'.
20337 (token_actions): Same for 'defact'.
20338 (goto_actions): Same for 'defgoto'.
20339 (output_base): Same for 'pact' and 'pgoto'.
20340 (output_table): Same for 'table'.
20341 (output_check): Same for 'check'.
20342
20343 * src/output.c (output_table_data): New function.
20344 (output_short_table): Remove.
20345 (output_short_or_char_table): Remove.
20346
20347 * src/output.c (output_parser): Replace most of the skeleton copy code
20348 with something new. Skeletons are now processed character by character
20349 rather than line by line, and Bison looks for '%%' macros. This is the
20350 first step in making Bison's output process (a lot) more flexible.
20351 (output_parser): Use the macro table.
20352
20353 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20354
20355 * src/main.c (main): Initialize the macro table.
20356
20357 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20358
20359 * src/lex.c (percent_table): Add tok_define.
20360 * src/lex.h: Add tok_define.
20361
20362 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20363
20364 * src/macrotab.c: New file.
20365 * src/macrotab.h: New file.
20366 * src/Makefile.am: Update.
20367
20368 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20369
20370 * lib/hash.c: New file.
20371 * lib/hash.h: New file.
20372 * lib/Makefile.am: Update.
20373
20374 2001-08-15 Akim Demaille <akim@epita.fr>
20375
20376 Version 1.28c.
20377
20378 2001-08-15 Marc Autret <autret_m@epita.fr>
20379
20380 * src/reader.c (readgram): Indent output macro YYSTYPE.
20381 (packsymbols): Likewise.
20382 (output_token_defines): Likewise.
20383 * src/files.c: Standardize.
20384 (compute_header_macro): New.
20385 (defines_obstack_save): New. Use compute_header_macro.
20386 (output_files): Update. Use defines_obstack_save.
20387
20388 2001-08-15 Akim Demaille <akim@epita.fr>
20389
20390 * doc/bison.texinfo (Table of Symbols): Document
20391 YYSTACK_USE_ALLOCA.
20392
20393 2001-08-15 Akim Demaille <akim@epita.fr>
20394
20395 * missing: Update from CVS Automake.
20396 * config/config.guess, config/config.sub, config/texinfo.tex:
20397 Update from gnu.org.
20398
20399 2001-08-15 Akim Demaille <akim@epita.fr>
20400
20401 * Makefile.maint: Sync with CVS Autoconf.
20402
20403 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
20404
20405 * doc/bison.texinfo: Include GNU Free Documentation License from
20406 `fdl.texi'.
20407 * doc/fdl.texi: Add to package.
20408
20409 2001-08-14 Marc Autret <autret_m@epita.fr>
20410
20411 Turn on %{source,header}_extension features.
20412
20413 * src/lex.c (percent_table): Un-CPP out header_extension and
20414 source_extension.
20415 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
20416 (compute_exts_from_src): Remove conditions. It restores priorities
20417 between options.
20418
20419 2001-08-14 Marc Autret <autret_m@epita.fr>
20420
20421 * src/files.c (compute_base_names): Add extensions computing when
20422 `--file-prefix' used.
20423 Standardize function calls.
20424
20425 2001-08-13 Marc Autret <autret_m@epita.fr>
20426
20427 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
20428 defining it (defined but null disables alloca).
20429
20430 2001-08-13 Marc Autret <autret_m@epita.fr>
20431
20432 * src/bison.simple (_yy_memcpy): CPP reformat.
20433
20434 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
20435
20436 * tests/atconfig.in (CPPFLAGS): Fix.
20437
20438 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
20439
20440 * doc/bison.texinfo: Include GNU General Public License from
20441 `gpl.texi'.
20442 * doc/gpl.texi: Add to package.
20443
20444 2001-08-10 Marc Autret <autret_m@epita.fr>
20445
20446 * src/print_graph.h: Fix.
20447 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
20448
20449 2001-08-10 Akim Demaille <akim@epita.fr>
20450
20451 * src/system.h: Provide default declarations for stpcpy, strndup,
20452 and strnlen.
20453
20454 2001-08-10 Robert Anisko <anisko_r@epita.fr>
20455
20456 * doc/bison.texinfo (Locations): Update @$ stuff.
20457
20458 2001-08-09 Robert Anisko <anisko_r@epita.fr>
20459
20460 * src/bison.simple (YYLLOC_DEFAULT): Update.
20461 (yyparse): Adjust.
20462
20463 2001-08-08 Marc Autret <autret_m@epita.fr>
20464
20465 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
20466 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
20467 Reported by Fabrice Bauzac.
20468
20469 2001-08-08 Marc Autret <autret_m@epita.fr>
20470
20471 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
20472 * src/vcg.c (output_node): Fix.
20473 * src/vcg.h: Cleanup.
20474 * src/print_graph.c: Add comments.
20475 (node_output_size): New global variable. Simplify the formatting of
20476 the VCG graph output.
20477 (print_actions): Unused code is now used. It notifies the final state
20478 and no action states in the VCG graph. It also give the reduce actions.
20479 The `shift and goto' edges are red and the `go to state' edges are
20480 blue.
20481 Get the current node name and node_obstack by argument.
20482 (node_obstack): New variable.
20483 (print_state): Manage node_obstack.
20484 (print_core): Use node_obstack given by argument.
20485 A node is not only computed here but in print_actions also.
20486 (print_graph): CPP out useless code instead of commenting it.
20487
20488 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
20489
20490 * tests/atconfig.in (CPPFLAGS): Fix.
20491
20492 2001-08-07 Akim Demaille <akim@epita.fr>
20493
20494 * src/print_graph.c (quote): New.
20495 (print_core): Use it.
20496
20497 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
20498
20499 * src/vcg.c (complain.h): Include it.
20500 Unepitaize `return' invocations.
20501 [NDEBUG] (main): Remove.
20502 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
20503 * src/files.c (open_files): Initialize graph_obstack.
20504 * src/print_graph.c (print_actions): CPP out useless code.
20505 (print_core): Don't output the last `\n' in labels.
20506 Use `quote'.
20507 * src/files.c (output_files): Output the VCG file.
20508 * src/main.c (main): Invoke print_graph ();
20509
20510 2001-08-06 Marc Autret <autret_m@epita.fr>
20511
20512 Automaton VCG graph output.
20513 Using option ``-g'' or long option ``--graph'', you can generate
20514 a gram_filename.vcg file containing a VCG description of the LALR (1)
20515 automaton of your grammar.
20516
20517 * src/main.c: Call to print_graph() function.
20518 * src/getargs.h: Update.
20519 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
20520 (graph_flag): New flag.
20521 (longopts): Update.
20522 (getargs): Add case `g'.
20523 * src/files.c (graph_obstack): New obstack struct.
20524 (open_files): Initialize new obstack.
20525 (output_files): Saves graph_obstack if required.
20526 * src/files.h (graph_obstack): New extern declaration.
20527 * src/Makefile.am: Add new source files.
20528
20529 2001-08-06 Marc Autret <autret_m@epita.fr>
20530
20531 * src/print_graph.c, src/print_graph.h (graph): New.
20532 * src/vcg.h: New file.
20533 * src/vcg.c: New file, VCG graph handling.
20534
20535 2001-08-06 Marc Autret <autret_m@epita.fr>
20536
20537 Add of %source_extension and %header_extension which specify
20538 the source or/and the header output file extension.
20539
20540 * src/files.c (compute_base_names): Remove initialisation of
20541 src_extension and header_extension.
20542 (compute_exts_from_gf): Update.
20543 (compute_exts_from_src): Update.
20544 (output_files): Update.
20545 * src/reader.c (parse_header_extension_decl): New.
20546 (parse_source_extension_decl): New.
20547 (read_declarations): New case statements for the new tokens.
20548 * src/lex.c (percent_table): Add entries for %source_extension
20549 and %header_extension.
20550 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
20551
20552 2001-08-06 Marc Autret <autret_m@epita.fr>
20553
20554 * configure.in: Bump to 1.28c.
20555 * doc/bison.texinfo: Texinfo thingies.
20556
20557 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
20558
20559 * tests/atconfig.in (CPPFLAGS): Add.
20560 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
20561
20562 2001-08-03 Akim Demaille <akim@epita.fr>
20563
20564 Version 1.28b.
20565
20566 2001-08-03 Akim Demaille <akim@epita.fr>
20567
20568 * tests/Makefile.am (check-local): Ship testsuite.
20569 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
20570 Include `string.h'.
20571
20572 2001-08-03 Akim Demaille <akim@epita.fr>
20573
20574 * configure.in: Try using -Wformat when compiling.
20575
20576 2001-08-03 Akim Demaille <akim@epita.fr>
20577
20578 * configure.in: Bump to 1.28b.
20579
20580 2001-08-03 Akim Demaille <akim@epita.fr>
20581
20582 * src/complain.c: Adjust strerror_r portability issues.
20583
20584 2001-08-03 Akim Demaille <akim@epita.fr>
20585
20586 Version 1.28a.
20587
20588 2001-08-03 Akim Demaille <akim@epita.fr>
20589
20590 * src/getargs.c, src/getarg.h (skeleton)): Constify.
20591 * src/lex.c (literalchar): Avoid name clashes on `buf'.
20592 * src/getargs.c: Include complain.h.
20593 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
20594 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
20595
20596 2001-08-03 Akim Demaille <akim@epita.fr>
20597
20598 * src/reader.c (readgram): Display hidden chars in error messages.
20599
20600 2001-08-03 Akim Demaille <akim@epita.fr>
20601
20602 Update to gettext 0.10.39.
20603
20604 2001-08-03 Akim Demaille <akim@epita.fr>
20605
20606 * lib/strspn.c: New.
20607
20608 2001-08-01 Marc Autret <autret_m@epita.fr>
20609
20610 * doc/bison.texinfo: Update.
20611 * doc/bison.1 (mandoc): Update.
20612 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
20613 * src/files.c: Support output files extensions computing.
20614 (src_extension): New static variable.
20615 (header_extension): New static variable.
20616 (tr): New function.
20617 (get_extension_index): New function, gets the index of an extension
20618 filename in a string.
20619 (compute_exts_from_gf): New function, computes extensions from the
20620 grammar file extension.
20621 (compute_exts_from_src): New functions, computes extensions from the
20622 C source file extension, file given by ``-o'' option.
20623 (compute_base_names): Update.
20624 (output_files): Update.
20625
20626 2001-08-01 Robert Anisko <anisko_r@epita.fr>
20627
20628 * doc/bison.texi: Document @$.
20629 (Locations): New section.
20630
20631 2001-07-18 Akim Demaille <akim@epita.fr>
20632
20633 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
20634 * config/prev-version.txt, config/move-if-change: New.
20635 * Makefile.am: Adjust.
20636
20637 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
20638
20639 * src/bison.simple (yyparse): Suppress warning `comparaison
20640 between signed and unsigned'.
20641
20642 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
20643
20644 * src/getargs.h (raw_flag): Remove.
20645 * src/getargs.c: Die on `-r'/`--raw'.
20646 * src/lex.c (parse_percent_token): Die on `%raw'.
20647 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
20648 * tests/calc.at: Suppress test with option `--raw'.
20649
20650 2001-07-14 Akim Demaille <akim@epita.fr>
20651
20652 * config/: New.
20653 * configure.in: Require Autoconf 2.50.
20654 Update to gettext 0.10.38.
20655
20656 2001-03-16 Akim Demaille <akim@epita.fr>
20657
20658 * doc/bison.texinfo: ANSIfy the examples.
20659
20660 2001-03-16 Akim Demaille <akim@epita.fr>
20661
20662 * getargs.c (skeleton): New variable.
20663 (longopts): --skeleton is a new option.
20664 (shortopts, getargs): -S is a new option.
20665 * getargs.h: Declare skeleton.
20666 * output.c (output_parser): Use it.
20667
20668 2001-03-16 Akim Demaille <akim@epita.fr>
20669
20670 * m4/strerror_r.m4: New.
20671 * m4/error.m4: Run AC_FUNC_STRERROR_R.
20672 * lib/error.h, lib/error.c: Update.
20673
20674 2001-03-16 Akim Demaille <akim@epita.fr>
20675
20676 * src/getargs.c (longopts): Clean up.
20677
20678 2001-02-21 Akim Demaille <akim@epita.fr>
20679
20680 * src/reader.c (gensym): `gensym_count' is your own.
20681 Use a static buf to create the symbol name, as token_buffer is no
20682 longer a buffer.
20683
20684 2001-02-08 Akim Demaille <akim@epita.fr>
20685
20686 * src/conflicts.c (conflict_report): Be sure not to append to res
20687 between two calls, which could happen if both first sprintf were
20688 skipped, but not the first cp += strlen.
20689
20690 2001-02-08 Akim Demaille <akim@epita.fr>
20691
20692 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
20693 New, from fileutils 4.0.37.
20694 * configure.in: Require Autoconf 2.49c. I took some time before
20695 making this decision. This is the only way out for portability
20696 issues in Bison, it would mean way too much duplicate effort to
20697 import in Bison features implemented in 2.49c since 2.13.
20698 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
20699
20700 2001-02-02 Akim Demaille <akim@epita.fr>
20701
20702 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
20703 * lib/xalloc.h, lib/xmalloc.c: Update.
20704
20705 2001-01-19 Akim Demaille <akim@epita.fr>
20706
20707 Get rid of the ad hoc handling of token_buffer in the scanner: use
20708 the obstacks.
20709
20710 * src/lex.c (token_obstack): New.
20711 (init_lex): Initialize it. No longer call...
20712 (grow_token_buffer): this. Remove it.
20713 Adjust all the places which used it to use the obstack.
20714
20715 2001-01-19 Akim Demaille <akim@epita.fr>
20716
20717 * src/lex.h: Rename all the tokens:
20718 s/\bENDFILE\b/tok_eof/g;
20719 s/\bIDENTIFIER\b/tok_identifier/g;
20720 etc.
20721 Let them be enums, not #define, to ease debugging.
20722 Adjust all the code.
20723
20724 2001-01-18 Akim Demaille <akim@epita.fr>
20725
20726 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
20727 * src/lex.c (maxtoken, grow_token_buffer): Static.
20728
20729 2001-01-18 Akim Demaille <akim@epita.fr>
20730
20731 Since we now use obstacks, more % directives can be enabled.
20732
20733 * src/lex.c (percent_table): Also accept `%yacc',
20734 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
20735 `%debug'.
20736 Handle the actions for `%semantic_parser' and `%pure_parser' here,
20737 instead of returning a token.
20738 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
20739 * src/reader.c (read_declarations): Adjust.
20740 * src/files.c (open_files): Don't call `compute_base_names', don't
20741 compute `attrsfile' since they depend upon data which might be
20742 *in* the input file now.
20743 (output_files): Do it here.
20744 * src/output.c (output_headers): Document the fact that this patch
20745 introduces a guaranteed SEGV for semantic parsers.
20746 * doc/bison.texinfo: Document them.
20747 * tests/suite.at: Exercise these %options.
20748
20749 2000-12-20 Akim Demaille <akim@epita.fr>
20750
20751 Also handle the output file (--verbose) with obstacks.
20752
20753 * files.c (foutput): Remove.
20754 (output_obstack): New.
20755 Adjust all dependencies.
20756 * src/conflicts.c: Return a string.
20757 * src/system.h (obstack_grow_string): Rename as...
20758 (obstack_sgrow): this. Be ready to work with non literals.
20759 (obstack_fgrow4): New.
20760
20761 2000-12-20 Akim Demaille <akim@epita.fr>
20762
20763 * src/files.c (open_files): Fix the computation of short_base_name
20764 in the case of `-o foo.tab.c'.
20765
20766 2000-12-20 Akim Demaille <akim@epita.fr>
20767
20768 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
20769 (copy_dollar): Now that everything uses obstacks, get rid of the
20770 FILE * parameters.
20771
20772 2000-12-20 Akim Demaille <akim@epita.fr>
20773
20774 * src/files.c (open_files): Actually the `.output' file is based
20775 on the short_base_name, not base_name.
20776 * tests/suite.at (Checking output file names): Adjust.
20777
20778 2000-12-20 Akim Demaille <akim@epita.fr>
20779
20780 * src/bison.s1: Remove, we now use directly...
20781 * src/bison.simple: this.
20782 * src/Makefile.am: Use pkgdata instead of data.
20783
20784 2000-12-20 Akim Demaille <akim@epita.fr>
20785
20786 * src/files.c (guard_obstack): New.
20787 (open_files): Initialize it.
20788 (output_files): Dump it...
20789 * src/files.h: Export it.
20790 * src/reader.c (copy_guard): Use it.
20791
20792 2000-12-19 Akim Demaille <akim@epita.fr>
20793
20794 * src/files.c (outfile, defsfile, actfile): Removed as global
20795 vars.
20796 (open_files): Don't compute them.
20797 (output_files): Adjust.
20798 (base_name, short_base_name): Be global.
20799 Adjust dependencies.
20800
20801 2000-12-19 Akim Demaille <akim@epita.fr>
20802
20803 * src/files.c (strsuffix): New.
20804 (stringappend): Be just like strcat but allocate.
20805 (base_names): Eve out from open_files.
20806 Try to simplify the rather hairy computation of base_name and
20807 short_base_name.
20808 (open_files): Use it.
20809 * tests/suite.at (Checking output file names): New test.
20810
20811 2000-12-19 Akim Demaille <akim@epita.fr>
20812
20813 * src/system.h (obstack_grow_literal_string): Rename as...
20814 (obstack_grow_string): this.
20815 * src/output.c (output_parser): Recognize `%% actions' instead of
20816 `$'.
20817 * src/bison.s1: s/$/%% actions/.
20818 * src/bison.hairy: Likewise.
20819
20820 2000-12-19 Akim Demaille <akim@epita.fr>
20821
20822 * src/output.c (output_parser): Compute the `#line' lines when
20823 there are.
20824 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
20825 Suggested by Hans Aberg.
20826
20827 2000-12-19 Akim Demaille <akim@epita.fr>
20828
20829 Let the handling of the skeleton files be local to the procedures
20830 that use it.
20831
20832 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
20833 longer static.
20834 (fparser, open_extra_files): Remove.
20835 (open_files, output_files): Don't take care of fparser.
20836 * src/files.h: Adjust.
20837 * src/output.c (output_parser): Open and close the file to the
20838 skeleton.
20839 * src/reader.c (read_declarations): When %semantic_parser, open
20840 fguard.
20841
20842 2000-12-19 Akim Demaille <akim@epita.fr>
20843
20844 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
20845 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
20846
20847 2000-12-19 Akim Demaille <akim@epita.fr>
20848
20849 * src/files.c (open_files): Yipee! We no longer need all the code
20850 looking for `/tmp' since we have no tmp file.
20851
20852 2000-12-19 Akim Demaille <akim@epita.fr>
20853
20854 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
20855 New macros.
20856 * src/files.c (open_files): Less dependency on MSDOS etc.
20857
20858 2000-12-14 Akim Demaille <akim@epita.fr>
20859
20860 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
20861 Provide a default definition.
20862 Use it when executing the default @ action.
20863 * src/reader.c (reader_output_yylsp): No longer include
20864 `timestamp' and `text' in the default YYLTYPE.
20865
20866 2000-12-12 Akim Demaille <akim@epita.fr>
20867
20868 * src/reader.c (copy_definition, parse_union_decl, copy_action)
20869 (copy_guard): Quote the file names.
20870 Reported by Laurent Mascherpa.
20871
20872 2000-12-12 Akim Demaille <akim@epita.fr>
20873
20874 * src/output.c (output_headers, output_program, output): Be sure
20875 to escape special characters when outputting filenames.
20876 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
20877 (output_headers): Don't depend on them, Use ACTSTR.
20878
20879 2000-11-17 Akim Demaille <akim@epita.fr>
20880
20881 * lib/obstack.h: Formatting changes.
20882 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
20883 prevents type checking.
20884 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
20885 cast the value to (void *): assigning a `foo *' to a `void *'
20886 variable is valid.
20887 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
20888 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
20889 append characters.
20890
20891 2000-11-17 Akim Demaille <akim@epita.fr>
20892
20893 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
20894 as...
20895 (suite.m4, regression.m4, calc.m4): these.
20896 * tests/atgeneral.m4: Update from CVS Autoconf.
20897
20898 2000-11-17 Akim Demaille <akim@epita.fr>
20899
20900 * tests/regression.m4 (%union and --defines): New test,
20901 demonstrating a current bug in the obstack implementation.
20902
20903 2000-11-17 Akim Demaille <akim@epita.fr>
20904
20905 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
20906 macros.
20907 Use them to declare the variables which are global or local to
20908 `yyparse'.
20909
20910 2000-11-17 Akim Demaille <akim@epita.fr>
20911
20912 * acconfig.h: Remove, no longer used.
20913
20914 2000-11-07 Akim Demaille <akim@epita.fr>
20915
20916 * src: s/Copyright (C)/Copyright/g.
20917
20918 2000-11-07 Akim Demaille <akim@epita.fr>
20919
20920 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
20921 defining.
20922 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
20923
20924 2000-11-07 Akim Demaille <akim@epita.fr>
20925
20926 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
20927 Merge in a single CPP if/else.
20928
20929 2000-11-07 Akim Demaille <akim@epita.fr>
20930
20931 * src/output.c (output): Remove useless variables.
20932 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
20933 argument `data' for consistency with the prototypes.
20934 Qualify it `const'.
20935 (obstack_copy, obstack_copy0): Rename the second argument as
20936 `address' for consistency. Qualify it `const'.
20937 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
20938 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
20939 `const' their input argument (`data' or `address').
20940 Adjust the corresponding macros to include `const' in casts.
20941
20942 2000-11-03 Akim Demaille <akim@epita.fr>
20943
20944 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
20945 s/PFILE1/BISON_HAIRY/.
20946 Adjust dependencies.
20947
20948 2000-11-03 Akim Demaille <akim@epita.fr>
20949
20950 For some reason, this was not applied.
20951
20952 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
20953 `unlink': it's no longer used.
20954
20955 2000-11-03 Akim Demaille <akim@epita.fr>
20956
20957 * src/files.c (skeleton_find): New function, eved out of...
20958 (open_files, open_extra_files): here.
20959
20960 2000-11-03 Akim Demaille <akim@epita.fr>
20961
20962 Don't use `atexit'.
20963
20964 * src/files.c (obstack_save): New function.
20965 (done): Rename as...
20966 (output_files): this.
20967 Use `obstack_save'.
20968 * src/main.c (main): Don't use `atexit' to register `done', since
20969 it no longer has to remove tmp files, just call `output_files'
20970 when there are no errors.
20971
20972 2000-11-02 Akim Demaille <akim@epita.fr>
20973
20974 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
20975 `unlink': it's no longer used.
20976 * src/files.h: Formatting changes.
20977
20978 2000-11-02 Akim Demaille <akim@epita.fr>
20979
20980 Remove the last uses of mktemp and unlink/delete.
20981
20982 * src/files.c (fdefines, ftable): Removed.
20983 (defines_ostack, table_obstack): New.
20984 Adjust dependencies of the former into uses of the latter.
20985 * src/output.c (output_short_or_char_table, output_short_table):
20986 Convert to using obstacks.
20987 * src/reader.c (copy_comment2): Accept one FILE * and two
20988 obstacks.
20989 (output_token_defines, reader_output_yylsp): Use obstacks.
20990 * src/system.h (obstack_fgrow3): New.
20991 * po/POTFILES.in: Adjust.
20992
20993 2000-11-01 Akim Demaille <akim@epita.fr>
20994
20995 Change each use of `fattrs' into a use of `attrs_obstack'.
20996
20997 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
20998 * src/files.c (fattrs): Remove.
20999 (attrs_obstack): New.
21000 Adjust all dependencies.
21001 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21002
21003 2000-11-01 Akim Demaille <akim@epita.fr>
21004
21005 Introduce obstacks.
21006 Change each use of `faction' into a use of `action_obstack'.
21007
21008 * lib/obstack.h, lib/obstack.c: New files.
21009 * src/files.c (faction): Remove.
21010 (action_obstack): New.
21011 Adjust all dependencies.
21012
21013 2000-10-20 Akim Demaille <akim@epita.fr>
21014
21015 * lib/quote.h (PARAMS): New macro. Use it.
21016
21017 2000-10-16 Akim Demaille <akim@epita.fr>
21018
21019 * src/output.c (output_short_or_char_table): New function.
21020 (output_short_table, output_token_translations): Use it.
21021 (goto_actions): Use output_short_table.
21022
21023 2000-10-16 Akim Demaille <akim@epita.fr>
21024
21025 * src/symtab.c (bucket_new): New function.
21026 (getsym): Use it.
21027
21028 * src/output.c (output_short_table): New argument to display the
21029 comment associated with the table.
21030 Adjust dependencies.
21031 (output_gram): Use it.
21032 (output_rule_data): Nicer output layout for YYTNAME.
21033
21034 2000-10-16 Akim Demaille <akim@epita.fr>
21035
21036 * src/lex.c (read_typename): New function.
21037 (lex): Use it.
21038 * src/reader.c (copy_dollar): Likewise.
21039
21040 2000-10-16 Akim Demaille <akim@epita.fr>
21041
21042 * src/reader.c (copy_comment2): Expect the input stream to be on
21043 the `/' which is suspected to open a comment, instead of being
21044 called after `//' or `/*' was read.
21045 (copy_comment, copy_definition, parse_union_decl, copy_action)
21046 (copy_guard): Adjust.
21047
21048 2000-10-16 Akim Demaille <akim@epita.fr>
21049
21050 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21051 `read_signed_integer'.
21052
21053 2000-10-16 Akim Demaille <akim@epita.fr>
21054
21055 * src/reader.c (copy_dollar): New function.
21056 (copy_guard, copy_action): Use it.
21057
21058 2000-10-16 Akim Demaille <akim@epita.fr>
21059
21060 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21061 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21062 New files, from Fileutils 4.0.27.
21063 * src/main.c (printable_version): Remove.
21064 * src/lex.c, src/reader.c: Use `quote'.
21065
21066 2000-10-04 Akim Demaille <akim@epita.fr>
21067
21068 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21069
21070 2000-10-04 Akim Demaille <akim@epita.fr>
21071
21072 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21073
21074 2000-10-04 Akim Demaille <akim@epita.fr>
21075
21076 When a literal string is used to define two different tokens,
21077 `bison -v' segfaults.
21078 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21079
21080 * tests/regression.m4: New file.
21081 Include the core of the sample provided by Piotr Gackiewicz.
21082 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21083 properly.
21084
21085 2000-10-04 Akim Demaille <akim@epita.fr>
21086
21087 * src/reader.c (parse_expect_decl): Keep `count' within the size
21088 of `buffer'.
21089 From Neil Booth.
21090
21091 2000-10-02 Paul Eggert <eggert@twinsun.com>
21092
21093 * bison.s1 (yyparse): Assign the default value
21094 unconditionally, to avoid a GCC warning and make the parser a
21095 tad smaller.
21096
21097 2000-10-02 Akim Demaille <akim@epita.fr>
21098
21099 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21100 options.
21101
21102 2000-10-02 Akim Demaille <akim@epita.fr>
21103
21104 * src/derives.c, src/print.c, src/reduce.c: To ease the
21105 translation, move some `\n' out of the translated strings.
21106
21107 2000-10-02 Akim Demaille <akim@epita.fr>
21108
21109 The location tracking mechanism is precious for parse error
21110 messages. Nevertheless, it is enabled only when `@n' is used in
21111 the grammar, which is a different issue (you can use it in error
21112 message, but not in the grammar per se). Therefore, there should
21113 be another means to enable it.
21114
21115 * src/getargs.c (getargs): Support `--locations'.
21116 (usage): Report it.
21117 * src/getargs.h (locationsflag): Export it.
21118 * src/lex.c (percent_table): Support `%locations'.
21119 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21120 with `locationsflag'.
21121 * doc/bison.texinfo: Document `--locations' and `%locations'.
21122 Sort the options.
21123 * tests/calc.m4: Test it.
21124
21125 For regularity of the names, replace each
21126 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21127 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21128 In addition replace each `flag' with `_flag'.
21129
21130 2000-10-02 Akim Demaille <akim@epita.fr>
21131
21132 Also test parse error messages, including with YYERROR_VERBOSE.
21133
21134 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21135 associative).
21136 Use it to check the computations.
21137 Use it to check `nonassoc' is honored.
21138 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21139 `--yyerror-verbose'.
21140 (_AT_CHECK_CALC): Adjust to this option.
21141 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21142
21143 2000-10-02 Akim Demaille <akim@epita.fr>
21144
21145 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21146 the latter demonstrates a flaw in the handling of non debugging
21147 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21148 was used in order to simplify:
21149
21150 #if YYDEBUG
21151 if (yydebug)
21152 {
21153 ...
21154 }
21155 #endif
21156
21157 into
21158
21159 if (yydebug)
21160 {
21161 ...
21162 }
21163
21164 unfortunately this leads to a CPP conflict when
21165 `--name-prefix=foo' is used since it produces `#define yydebug
21166 foodebug'.
21167
21168 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21169 (YYDPRINTF): New macro.
21170 Spread its use.
21171 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21172 the bison options.
21173 Also test `--verbose', `--defines' and `--name-prefix'.
21174
21175 2000-10-02 Akim Demaille <akim@epita.fr>
21176
21177 Improve the readability of the produced parsers.
21178
21179 * src/bison.s1: Formatting changes.
21180 Improve the comment related to the `$' mark.
21181 (yydefault): Don't fall through to `yyresume': `goto' there.
21182 * src/output.c (output_parser): When the `$' is met, skip the end
21183 of its line.
21184 New variable, `number_of_dollar_signs', to check there's exactly
21185 one `$' in the parser skeleton.
21186
21187 2000-10-02 Akim Demaille <akim@epita.fr>
21188
21189 * lib/xstrdup.c: New file, from the fileutils.
21190 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21191 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21192 instead of strlen + xmalloc + strcpy.
21193 * src/symtab.c (copys): Remove, use xstrdup instead.
21194
21195 2000-10-02 Akim Demaille <akim@epita.fr>
21196
21197 * src/gram.h (associativity): New enum type which replaces the
21198 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21199 `right_assoc', `left_assoc' and `non_assoc'.
21200 Adjust all dependencies.
21201 * src/reader.c: Formatting changes.
21202 (LTYPESTR): Don't define it, use it as a literal in
21203 `reader_output_yylsp'.
21204 * src/symtab.h (symbol_class): New enum type which replaces the
21205 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21206 `sunknown', `stoken and `snterm'.
21207
21208 2000-10-02 Akim Demaille <akim@epita.fr>
21209
21210 * src/getargs.c (fixed_outfiles): Rename as...
21211 (yaccflag): for consistency and accuracy.
21212 Adjust dependencies.
21213
21214 2000-10-02 Akim Demaille <akim@epita.fr>
21215
21216 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21217 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21218 difficult and introduced a lot of core dump. It turns out that
21219 Bison used an implementation of `xmalloc' based on `calloc', and
21220 at various places it does depend upon the initialization to 0. I
21221 have not tried to isolate the pertinent places, and all the former
21222 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21223 someone should address this issue.
21224
21225 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21226 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21227 files.
21228 Adjust dependencies.
21229 * src/warshall.h: New file.
21230 Propagate.
21231
21232 2000-10-02 Akim Demaille <akim@epita.fr>
21233
21234 Various anti-`extern in *.c' changes.
21235
21236 * src/system.h: Include `assert.h'.
21237
21238 2000-10-02 Akim Demaille <akim@epita.fr>
21239
21240 * src/state.h (nstates, final_state, first_state, first_shift)
21241 (first_reduction): Move their exportation from here...
21242 * src/LR0.h: to here.
21243 Adjust dependencies.
21244 * src/getargs.c (statisticsflag): New variable.
21245 Add support for `--statistics'.
21246 Adjust dependencies.
21247
21248 Remove a lot of now useless `extern' statements in most files.
21249
21250 2000-10-02 Akim Demaille <akim@epita.fr>
21251
21252 * src/LR0.h: New file.
21253 Propagate its use.
21254
21255 2000-10-02 Akim Demaille <akim@epita.fr>
21256
21257 * src/print.h: New file.
21258 Propagate its use.
21259 * src/print.c: Formatting and ordering changes.
21260 (verbose, terse): Replace with...
21261 (print_results): this new function.
21262 Adjust dependencies.
21263
21264 2000-10-02 Akim Demaille <akim@epita.fr>
21265
21266 * src/conflicts.c (conflict_report): New function.
21267 (conflict_log, verbose_conflict_log): Replace with...
21268 (print_conflicts): this function.
21269 Adjust dependencies.
21270 * src/conflicts.h: New file.
21271 Propagate its inclusion.
21272
21273 2000-10-02 Akim Demaille <akim@epita.fr>
21274
21275 * src/nullable.h: New file.
21276 Propagate its inclusion.
21277 * src/nullable.c: Formatting changes.
21278
21279 2000-10-02 Akim Demaille <akim@epita.fr>
21280
21281 * src/reduce.h: New file.
21282 Propagate its inclusion.
21283 * src/reduce.c: Topological sort and other formatting changes.
21284 (bool, TRUE, FALSE): Move their definition to...
21285 * src/system.h: here.
21286
21287 2000-10-02 Akim Demaille <akim@epita.fr>
21288
21289 * src/files.c: Formatting changes.
21290 (tryopen, tryclose, openfiles): Rename as...
21291 (xfopen, xfclose, open_files): this.
21292 (stringappend): static.
21293 * src/files.h: Complete the list of exported symbols.
21294 Propagate its use.
21295
21296 2000-10-02 Akim Demaille <akim@epita.fr>
21297
21298 * src/reader.h: New file.
21299 Propagate its use instead of tedious list of `extern' and
21300 prototypes.
21301 * src/reader.c: Formatting changes, topological sort,
21302 s/register//.
21303
21304 2000-10-02 Akim Demaille <akim@epita.fr>
21305
21306 * src/lex.h: Prototype `lex.c' exported functions.
21307 * src/reader.c: Adjust.
21308 * src/lex.c: Formatting changes.
21309 (safegetc): Rename as...
21310 (xgetc): this.
21311
21312 2000-10-02 Akim Demaille <akim@epita.fr>
21313
21314 * src/lalr.h: New file.
21315 Propagate its inclusion instead of prototypes and `extern'.
21316 * src/lalr.c: Formatting changes, topological sorting etc.
21317
21318 2000-10-02 Akim Demaille <akim@epita.fr>
21319
21320 * src/output.c (token_actions): Introduce a temporary array,
21321 YYDEFACT, that makes it possible for this function to use
21322 output_short_table.
21323
21324 2000-10-02 Akim Demaille <akim@epita.fr>
21325
21326 `user_toknums' is output as a `short[]' in `output.c', while it is
21327 defined as a `int[]' in `reader.c'. For consistency with the
21328 other output tables, `user_toknums' is now defined as a table of
21329 shorts.
21330
21331 * src/reader.c (user_toknums): Be a short table instead of an int
21332 table.
21333 Adjust dependencies.
21334
21335 Factor the short table outputs.
21336
21337 * src/output.c (output_short_table): New function.
21338 * src/output.c (output_gram, output_stos, output_rule_data)
21339 (output_base, output_table, output_check): Use it.
21340
21341 2000-10-02 Akim Demaille <akim@epita.fr>
21342
21343 * src/output.c (output): Topological sort of the functions, in
21344 order to get rid of the `static' prototypes.
21345 No longer use `register'.
21346 * src/output.h: New file.
21347 Propagate its inclusion in files explicitly prototyping functions
21348 from output.c.
21349
21350 2000-09-21 Akim Demaille <akim@epita.fr>
21351
21352 * src/atgeneral.m4: Update from Autoconf.
21353
21354 2000-09-21 Akim Demaille <akim@epita.fr>
21355
21356 * src/closure.h: New file.
21357 * src/closure.c: Formatting changes, topological sort over the
21358 functions, use of closure.h.
21359 (initialize_closure, finalize_closure): Rename as...
21360 (new_closure, free_closure): these. Adjust dependencies.
21361 * src/LR0.c: Formatting changes, topological sort, use of
21362 cloture.h.
21363 (initialize_states): Rename as...
21364 (new_states): this.
21365 * src/Makefile.am (noinst_HEADERS): Adjust.
21366
21367 2000-09-20 Akim Demaille <akim@epita.fr>
21368
21369 * src/acconfig.h: Don't protect config.h against multiple
21370 inclusion.
21371 Don't define PARAMS.
21372 * src/system.h: Define PARAMS.
21373 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
21374 purpose of config.h. system.h must not try to fix wrong
21375 definitions in config.h.
21376
21377 2000-09-20 Akim Demaille <akim@epita.fr>
21378
21379 * src/derives.h: New file.
21380 * src/main.c, src/derives.h: Use it.
21381 Formatting changes.
21382 * src/Makefile.am (noinst_HEADERS): Adjust.
21383
21384 2000-09-20 Akim Demaille <akim@epita.fr>
21385
21386 * tests/atgeneral.m4: Update from Autoconf.
21387 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
21388 (AT_CHECK_CALC): New macros.
21389 Use these macros to test bison with options `', `--raw',
21390 `--debug', `--yacc', `--yacc --debug'.
21391
21392 2000-09-19 Akim Demaille <akim@epita.fr>
21393
21394 * src/output.c: Formatting changes.
21395 * src/machine.h: Remove, leaving its contents in...
21396 * src/system.h: here.
21397 Include stdio.h.
21398 Adjust all dependencies on stdio.h and machine.h.
21399 * src/getargs.h: New file.
21400 Let all `extern' declarations about getargs.c be replaced with
21401 inclusion of `getargs.h'.
21402 * src/Makefile.am (noinst_HEADERS): Adjust.
21403
21404 * tests/calc.m4 (yyin): Be initialized in main, not on the global
21405 scope.
21406 (yyerror): Returns void, not int.
21407 * doc/bison.texinfo: Formatting changes.
21408
21409 2000-09-19 Akim Demaille <akim@epita.fr>
21410
21411 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
21412 portable.
21413
21414 2000-09-18 Akim Demaille <akim@epita.fr>
21415
21416 * configure.in: Append WARNING_CFLAGS to CFLAGS.
21417 * src/Makefile.am (INCLUDES): Don't.
21418 Be ready to fetch headers in lib/.
21419
21420 2000-09-18 Akim Demaille <akim@epita.fr>
21421
21422 * doc/bison.texinfo: Update the copyright.
21423 ANSIfy and GNUify the examples.
21424 Remove the old menu.
21425
21426 2000-09-18 Akim Demaille <akim@epita.fr>
21427
21428 First set of tests: use the `calc' example from the documentation.
21429
21430 * src/bison.s1 (yyparse): Condition the code using `yytname' which
21431 is defined only when YYDEBUG is.
21432 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
21433 * src/files.c (tryopen, tryclose): Formatting changes.
21434 Move to the top and be static.
21435 * src/reader.c (read_signed_integer): Likewise.
21436 * tests/calc.m4: New file.
21437 * Makefile.am, suite.m4: Adjust.
21438 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
21439
21440 2000-09-18 Akim Demaille <akim@epita.fr>
21441
21442 Add support for an Autotest test suite for Bison.
21443
21444 * m4/m4.m4, m4/atconfig.m4: New files.
21445 * m4/Makefile.am (EXTRA_DIST): Adjust.
21446 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
21447 files.
21448 * src/getargs.c: Display a more standard --version message.
21449 * src/reader.c (reader): Formatting changes.
21450 No longer depend upon VERSION_STRING.
21451 * configure.in: No longer use `dnl'.
21452 Set up the test suite and the new directory `tests/.
21453 (VERSION_STRING): Remove.
21454
21455 2000-04-14 Akim Demaille <akim@epita.fr>
21456
21457 * src/reader.c (copy_comment2): New function, same as former
21458 `copy_comment', but outputs into two FILE *.
21459 (copy_comment): Use it.
21460 (parse_union_decl): Use it.
21461 (get_type, parse_start_decl): Use the same `invalid' message.
21462 (parse_start_decl, parse_union_decl): Use the same `multiple'
21463 message.
21464 (parse_union_decl, copy_guard, copy_action): Use the same
21465 `unmatched' message.
21466 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
21467
21468 2000-03-31 Akim Demaille <akim@epita.fr>
21469
21470 * src/files.c (tryopen, tryclose): Move to the top.
21471 Be static.
21472
21473 2000-03-31 Akim Demaille <akim@epita.fr>
21474
21475 * src/main.c (main): Don't call `done', exit does it.
21476
21477 2000-03-31 Akim Demaille <akim@epita.fr>
21478
21479 * allocate.c: s/return (foo)/return foo/.
21480 * lalr.c: Likewise.
21481 * LR0.c: Likewise.
21482 * output.c: Likewise.
21483 * reader.c: Likewise.
21484 * symtab.c: Likewise.
21485 * vmsgetargs.c: Likewise.
21486
21487 2000-03-31 Akim Demaille <akim@epita.fr>
21488
21489 Clean up the error reporting functions.
21490
21491 * src/report.c: New file.
21492 * src/report.h: Likewise.
21493 * src/Makefile.am: Adjust.
21494 * m4/error.m4: New file.
21495 * m4/Makefile.am: Adjust.
21496 * configure.in (jm_PREREQ_ERROR): Call it.
21497 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
21498 Remove.
21499 (fatal, fatals): Remove. All callers use complain.c::fatal.
21500 (warn, warni, warns, warnss, warnss): Remove. All callers use
21501 complain.c::complain.
21502 (toomany): Remove, use fatal instead.
21503 * src/files.c (done): No argument, use complain_message_count.
21504 * src/main.c (main): Register `done' to `atexit'.
21505
21506 * src/getargs.c (usage): More `fputs', less `fprintf'.
21507
21508 2000-03-28 Akim Demaille <akim@epita.fr>
21509
21510 * lib/: New directory.
21511 * Makefile.am (SUBDIRS): Adjust.
21512 * configure.in: Adjust.
21513 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
21514 useless.
21515 * src/alloca.c: Moved to lib/.
21516 * src/getopt.c: Likewise.
21517 * src/getopt1.c: Likewise.
21518 * src/getopt.h: Likewise.
21519 * src/ansi2knr.c: Likewise.
21520 * src/ansi2knr.1: Likewise.
21521 * src/Makefile.am: Adjust.
21522 * lib/Makefile.am: New file.
21523
21524 2000-03-28 Akim Demaille <akim@epita.fr>
21525
21526 * src/getargs.c (usage): Refresh the help message.
21527
21528 2000-03-17 Akim Demaille <akim@epita.fr>
21529
21530 * src/getopt1.c: Updated from textutils 2.0e
21531 * src/getopt.c: Likewise.
21532 * src/getopt.h: Likewise.
21533
21534 2000-03-17 Akim Demaille <akim@epita.fr>
21535
21536 * src/Makefile.am (bison.simple): Fix the awk program: quote only
21537 the file name, not the whole `#line LINE FILE'.
21538
21539 2000-03-17 Akim Demaille <akim@epita.fr>
21540
21541 On syntax errors, report the token on which we choked.
21542
21543 * src/bison.s1 (yyparse): In the label yyerrlab, when
21544 YYERROR_VERBOSE, add yychar in msg.
21545
21546 2000-03-17 Akim Demaille <akim@epita.fr>
21547
21548 * src/reader.c (copy_at): New function.
21549 (copy_guard): Use it.
21550 (copy_action): Use it.
21551
21552 2000-03-17 Akim Demaille <akim@epita.fr>
21553
21554 Be kind to translators, save some useless translations.
21555
21556 * src/main.c (banner): New function.
21557 (fatal_banner): Use it.
21558 (warn_banner): Use it.
21559
21560 2000-03-17 Akim Demaille <akim@epita.fr>
21561
21562 * src/reader.c (copy_definition): Use copy_string and
21563 copy_comment. Removed now unused `match', `ended',
21564 `cplus_comment'.
21565 (copy_comment, copy_string): Moved, to be visible from
21566 copy_definition.
21567
21568 2000-03-17 Akim Demaille <akim@epita.fr>
21569
21570 * src/reader.c (copy_string): Declare `static inline'. No
21571 problems with inline, since it is checked by configure.
21572 (copy_comment): Likewise.
21573
21574 2000-03-17 Akim Demaille <akim@epita.fr>
21575
21576 * src/reader.c (packsymbols): Formatting changes.
21577
21578 2000-03-17 Akim Demaille <akim@epita.fr>
21579
21580 * src/reader.c (copy_comment): New function, factored out from:
21581 (copy_action): Use it. Removed now unused `match', `ended',
21582 `cplus_comment'.
21583 (copy_guard): Likewise.
21584
21585 2000-03-17 Akim Demaille <akim@epita.fr>
21586
21587 * src/reader.c (copy_string): New function, factored out from:
21588 (copy_action): Use it.
21589 (copy_guard): Likewise.
21590
21591 2000-03-17 Akim Demaille <akim@epita.fr>
21592
21593 Change the handling of @s so that they behave exactly like $s.
21594 There is now a pseudo variable @$ (readble and writable), location
21595 of the lhs of the rule (by default ranging from the location of
21596 the first symbol of the rhs, to the location of the last symbol,
21597 or, if the rhs is empty, YYLLOC).
21598
21599 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
21600 yyval.
21601 (yyparse): When providing a default semantic action, provide a
21602 default location action.
21603 (after the $): No longer change `*YYLSP', just stack YYLOC the
21604 same way you stack YYVAL.
21605 * src/reader.c (read_declarations): Use warns.
21606 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
21607 (copy_action, case '@'): Likewise.
21608 Use a standard error message, to save useless work from
21609 translators.
21610
21611 2000-03-17 Akim Demaille <akim@epita.fr>
21612
21613 * src/bison.s1: Formatting and cosmetics changes.
21614 * src/reader.c: Likewise.
21615 Update the Copyright notice.
21616
21617 2000-03-17 Akim Demaille <akim@epita.fr>
21618
21619 * src/bison.s1 (#line): All set to `#line' only, since the
21620 Makefile now handles them.
21621
21622 2000-03-16 Akim Demaille <akim@epita.fr>
21623
21624 * src/output.c (output_rule_data): Output the documentation of
21625 some of the tables.
21626 (Copyright notice): Update.
21627 Formatting changes.
21628
21629 2000-03-16 Akim Demaille <akim@epita.fr>
21630
21631 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
21632 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
21633 One `#if YYDEBUG' remains, since it uses variables which are
21634 defined only if `YYDEBUG != 0'.
21635
21636 2000-03-16 Akim Demaille <akim@epita.fr>
21637
21638 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
21639 and related variables so that the similarities are highlighted.
21640
21641 2000-03-16 Akim Demaille <akim@epita.fr>
21642
21643 * src/bison.s1: Properly indent CPP directives.
21644
21645 2000-03-16 Akim Demaille <akim@epita.fr>
21646
21647 * src/bison.s1: Properly indent the `alloca' CPP section.
21648
21649 2000-03-16 Akim Demaille <akim@epita.fr>
21650
21651 Do not hard code values of directories in `configure.in'.
21652 Update the `configure' tool chain.
21653
21654 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
21655 src/makefile.am.
21656 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
21657 (AC_OUTPUT): Add m4/Makefile.
21658 Bump to bison 1.28a, 1.29 has never been released.
21659 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
21660 handled via src/Makefile.am.
21661 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
21662 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
21663 autoheader.
21664 * Makefile.am (SUBDIRS): Add m4.
21665 (ACLOCAL_AM_FLAGS): New variable.
21666 (AUTOMAKE_OPTIONS): Add check-news.
21667 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
21668 the proper line number and file name.
21669 (DEFS): Propagate the location of bison library files and of the
21670 locale files.
21671 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
21672 builddir.
21673 * acinclude.m4: Remove, replaced by the directory m4.
21674 * m4/Makefile.am (EXTRA_DIST): New variable.
21675 * m4/gettext.m4: New file, from the fileutils.
21676 * m4/lcmessage.m4: Likewise
21677 * m4/progtest.m4: Likewise.
21678 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
21679
21680 2000-03-10 Akim Demaille <akim@epita.fr>
21681
21682 * src/closure.c:
21683 Formatting changes of various comments.
21684 Respect the GNU coding standards at various places.
21685 Don't use `_()' when no translation is needed.
21686
21687 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21688
21689 * src/files.c:
21690 OS/2 honors TMPDIR environment variable.
21691
21692 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21693
21694 * doc/bison.texinfo: Tweaked spelling and grammar.
21695 Updated ISBN.
21696 Removed reference to price of printed copy.
21697 Mention BISON_SIMPLE and BISON_HAIRY.
21698
21699 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21700
21701 * configure.in, NEWS:
21702 Bison 1.29 released.
21703
21704 1999-10-27 Jesse Thilo <jthilo@gnu.org>
21705
21706 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
21707 Added reference card.
21708
21709 1999-07-26 Jesse Thilo <jthilo@gnu.org>
21710
21711 * po/ru.po: Added Russian translation.
21712
21713 1999-07-26 Jesse Thilo <jthilo@gnu.org>
21714
21715 * configure.in: Added Russian translation.
21716
21717 1999-07-06 Jesse Thilo <jthilo@gnu.org>
21718
21719 * configure.in, NEWS, README:
21720 Released version 1.28.
21721
21722 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21723
21724 * src/system.h:
21725 Squashed redefinition warning on some systems.
21726
21727 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
21728 Have configure build version string instead of relying on ANSI string
21729 concatentation.
21730
21731 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21732
21733 * po/POTFILES.in: Got rid of version.c.
21734
21735 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21736
21737 * acconfig.h, configure.in:
21738 Have configure build version string instead of relying on ANSI string
21739 concatentation.
21740
21741 1999-06-08 Jesse Thilo <jthilo@gnu.org>
21742
21743 * doc/bison.1:
21744 Dropped mention of `+' for long-named options.
21745
21746 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21747
21748 * src/files.c: Added <unistd.h> for unlink().
21749
21750 * src/Makefile.am, src/system.h:
21751 I18n fixes.
21752
21753 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21754
21755 * README: Added a FAQ list.
21756
21757 * configure.in, acconfig.h:
21758 I18n fixes.
21759
21760 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21761
21762 * doc/FAQ, doc/Makefile.am:
21763 Added a FAQ list.
21764
21765 1999-05-19 Jesse Thilo <jthilo@gnu.org>
21766
21767 * src/alloc.h, src/symtab.h, src/version.c:
21768 Protected inclusion of "config.h" with HAVE_CONFIG_H.
21769
21770 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21771
21772 * src/.cvsignore, src/Makefile.am:
21773 Reorganized: sources in `src', documentation in `doc'.
21774
21775 * src/lex.c (literalchar):
21776 fixed the code for escaping double quotes (thanks
21777 Jonathan Czisny.)
21778
21779 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21780
21781 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
21782 Adjusted paths to reflect directory reorganization.
21783
21784 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21785
21786 * doc/.cvsignore, doc/Makefile.am:
21787 Reorganized: sources in `src', documentation in `doc'.
21788
21789 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21790
21791 * configure.in:
21792 Updated AC_INIT file to reflect directory reorganization.
21793
21794 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
21795 Reorganized: sources in `src', documentation in `doc'.
21796
21797 1999-04-13 Jesse Thilo <jthilo@gnu.org>
21798
21799 * src/allocate.c:
21800 Don't declare calloc() and realloc() if not necessary.
21801
21802 1999-04-13 Jesse Thilo <jthilo@gnu.org>
21803
21804 * configure.in, acconfig.h, acinclude.m4:
21805 Don't declare calloc() and realloc() if not necessary.
21806
21807 1999-03-23 Jesse Thilo <jthilo@gnu.org>
21808
21809 * po/.cvsignore: Added i18n support.
21810
21811 1999-03-23 Jesse Thilo <jthilo@gnu.org>
21812
21813 * acconfig.h, configure.in, Makefile.am:
21814 Added i18n support.
21815
21816 1999-03-22 Jesse Thilo <jthilo@gnu.org>
21817
21818 * src/bison.s1: Fixed #line numbers.
21819
21820 1999-03-15 Jesse Thilo <jthilo@gnu.org>
21821
21822 * po/es.po, po/fr.po, po/nl.po, po/de.po:
21823 Added PO files from Translation Project.
21824
21825 1999-03-03 Jesse Thilo <jthilo@gnu.org>
21826
21827 * Makefile.am:
21828 Added support for non-ANSI compilers (ansi2knr).
21829
21830 1999-02-16 Jesse Thilo <jthilo@gnu.org>
21831
21832 * configure.in: Bumped version number to 1.27.
21833
21834 * Makefile.am:
21835 Added `bison.simple' to list of files removed by `make distclean'.
21836
21837 1999-02-12 Jesse Thilo <jthilo@gnu.org>
21838
21839 * src/files.c, src/files.h:
21840 Defined locations of parser files in config.h instead of Makefile.
21841
21842 1999-02-12 Jesse Thilo <jthilo@gnu.org>
21843
21844 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
21845 Defined locations of parser files in config.h instead of Makefile.
21846
21847 1999-02-09 Jesse Thilo <jthilo@gnu.org>
21848
21849 * Makefile.am:
21850 Removed inappropriate use of $< macro.
21851
21852 1999-02-05 Jesse Thilo <jthilo@gnu.org>
21853
21854 * po/Makefile.in.in, po/POTFILES.in:
21855 Add `po' directory skeleton.
21856
21857 1999-01-27 Jesse Thilo <jthilo@gnu.org>
21858
21859 * README: Document help-bison list.
21860
21861 * configure.in: Add check for mkstemp().
21862
21863 1999-01-20 Jesse Thilo <jthilo@gnu.org>
21864
21865 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
21866 Hush a few compiler warnings.
21867
21868 * src/files.c:
21869 Add tryclose(), which verifies that fclose was successful.
21870 Hush a couple of compiler warnings.
21871
21872 1999-01-20 Jesse Thilo <jthilo@gnu.org>
21873
21874 * Makefile.am, OChangeLog:
21875 ChangeLog is now automatically generated. Include the old version as
21876 OChangeLog.
21877
21878 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21879
21880 * 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:
21881 Update FSF address.
21882
21883 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21884
21885 * doc/bison.texinfo: Fix formatting glitch.
21886
21887 * doc/bison.texinfo: Update FSF address.
21888
21889 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21890
21891 * acconfig.h: Update FSF address.
21892
21893 1999-01-08 Jesse Thilo <jthilo@gnu.org>
21894
21895 * src/system.h:
21896 Don't define PACKAGE here, since config.h defines it.
21897
21898 1998-12-30 Jesse Thilo <jthilo@gnu.org>
21899
21900 * src/reader.c: Update copyright date.
21901
21902 * src/main.c:
21903 Ditch sprintf to statically-sized buffers in fatal/warn functions in
21904 favor of output directly to stderr (avoids buffer overruns).
21905
21906 * src/reader.c: Some checks for premature EOF.
21907
21908 * 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:
21909 Use prototypes if the compiler understands them.
21910
21911 * src/files.c: Honor TMPDIR on Unix hosts.
21912 Use prototypes if the compiler understands them.
21913
21914 * src/reader.c:
21915 Fix a couple of buffer overrun bugs.
21916 Use prototypes if the compiler understands them.
21917
21918 * src/system.h: Include unistd.h and ctype.h.
21919 Use #ifdef instead of #if for NLS symbols.
21920
21921 1998-12-30 Jesse Thilo <jthilo@gnu.org>
21922
21923 * doc/bison.texinfo:
21924 Delete comment "consider using @set for edition number, etc..." since
21925 we now are doing so.
21926
21927 1998-12-30 Jesse Thilo <jthilo@gnu.org>
21928
21929 * configure.in:
21930 Use prototypes if the compiler understands them.
21931
21932 * NEWS: Document 1.26 highlights.
21933
21934 * Makefile.am: Require Automake 1.3 or later.
21935
21936 * acconfig.h:
21937 Use prototypes if the compiler understands them.
21938
21939 1998-12-29 Jesse Thilo <jthilo@gnu.org>
21940
21941 * src/version.c:
21942 Use VERSION symbol from automake for version number.
21943
21944 1998-12-29 Jesse Thilo <jthilo@gnu.org>
21945
21946 * acconfig.h, configure.in, version.cin:
21947 Use VERSION symbol from automake for version number.
21948
21949 1998-11-28 Jesse Thilo <jthilo@gnu.org>
21950
21951 * Makefile.am:
21952 Distribute original version of simple parser (bison.s1), not built
21953 version (bison.simple).
21954
21955 1998-11-28 Jesse Thilo <jthilo@gnu.org>
21956
21957 * doc/bison.texinfo: Add info dir entry.
21958
21959 * doc/bison.texinfo:
21960 Let automake put version number into documentation.
21961
21962 1998-11-26 Jesse Thilo <jthilo@gnu.org>
21963
21964 * src/bison.cld, src/build.com, src/vmshlp.mar:
21965 Add non-RCS files from /gd/gnu/bison.
21966
21967 1998-11-26 Jesse Thilo <jthilo@gnu.org>
21968
21969 * doc/bison.1:
21970 Document the BISON_HAIRY and BISON_SIMPLE variables.
21971
21972 1998-11-25 Jesse Thilo <jthilo@gnu.org>
21973
21974 * src/version.c: Build version.c automatically.
21975
21976 * src/reader.c:
21977 Fix token numbering (used to start at 258, not 257).
21978
21979 * src/system.h: Include config.h.
21980
21981 * src/getargs.c: Update bug report address.
21982
21983 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
21984 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
21985
21986 1998-11-25 Jesse Thilo <jthilo@gnu.org>
21987
21988 * Makefile.am:
21989 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
21990
21991 * configure.in, version.cin:
21992 Build version.c automatically.
21993
21994 * AUTHORS: Add AUTHORS file.
21995
21996 * README: Update bug report address.
21997
21998 * bison.simple:
21999 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22000
22001 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22002 Add automake stuff.
22003
22004 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22005
22006 * doc/bison.texinfo: Clean up some formatting.
22007
22008 1998-05-05 Richard Stallman <rms@gnu.org>
22009
22010 * doc/bison.texinfo:
22011 Explain better why to make a pure parser.
22012
22013 1998-01-05 Richard Stallman <rms@gnu.org>
22014
22015 * src/files.c (openfiles):
22016 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22017 find a temporary directory, if possible. Do not unlink files while
22018 they are open.
22019
22020 1997-08-25 Richard Stallman <rms@gnu.org>
22021
22022 * src/reader.c (stack_offset;):
22023 Change some warni to warns.
22024
22025 * src/lex.c (literalchar): Use warns, not warni.
22026
22027 1997-06-28 Richard Stallman <rms@gnu.org>
22028
22029 * src/bison.s1: Add a Bison version comment.
22030
22031 * src/main.c (fatal, warn, berror):
22032 Use program_name.
22033
22034 1997-06-28 Richard Stallman <rms@gnu.org>
22035
22036 * Makefile.in (bison_version): New variable.
22037 (dist): Use that variable.
22038 (bison.s1): Substitute the Bison version into bison.simple.
22039
22040 * bison.simple: Add a Bison version comment.
22041
22042 1997-06-18 Richard Stallman <rms@gnu.org>
22043
22044 * src/main.c (fatal, warn, berror):
22045 Make error messages standard.
22046 (toomany): Improve error message text.
22047
22048 * 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:
22049 new.h renamed to alloc.h.
22050
22051 1997-06-18 Richard Stallman <rms@gnu.org>
22052
22053 * Makefile.in: new.h renamed to alloc.h.
22054
22055 1997-05-24 Richard Stallman <rms@gnu.org>
22056
22057 * src/lex.c (literalchar):
22058 Fix the code for escaping \, " and '.
22059
22060 (lex): Avoid trouble when there are many chars
22061 to discard in a char literal with just several chars in it.
22062
22063 1997-05-17 Richard Stallman <rms@gnu.org>
22064
22065 * src/bison.s1:
22066 Use malloc, if using alloca is troublesome.
22067 (YYSTACK_USE_ALLOCA): New flag macro.
22068 Define it for some systems and compilers.
22069 (YYSTACK_ALLOC): New macro.
22070 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22071 If it was malloc'd, free it.
22072
22073 1997-05-17 Richard Stallman <rms@gnu.org>
22074
22075 * bison.simple:
22076 Use malloc, if using alloca is troublesome.
22077 (YYSTACK_USE_ALLOCA): New flag macro.
22078 Define it for some systems and compilers.
22079 (YYSTACK_ALLOC): New macro.
22080 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22081 If it was malloc'd, free it.
22082
22083 1997-04-23 Richard Stallman <rms@gnu.org>
22084
22085 * src/bison.s1:
22086 (alloca) [__hpux]: Always define as __builtin_alloca.
22087
22088 1997-04-23 Richard Stallman <rms@gnu.org>
22089
22090 * bison.simple:
22091 (alloca) [__hpux]: Always define as __builtin_alloca.
22092
22093 1997-04-22 Richard Stallman <rms@gnu.org>
22094
22095 * src/bison.s1:
22096 [__hpux]: Include alloca.h (right for HPUX 10)
22097 instead of declaring alloca (right for HPUX 9).
22098
22099 * src/bison.s1 (__yy_memcpy):
22100 Declare arg `count' as unsigned int.
22101 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22102
22103 1997-04-22 Richard Stallman <rms@gnu.org>
22104
22105 * bison.simple:
22106 [__hpux]: Include alloca.h (right for HPUX 10)
22107 instead of declaring alloca (right for HPUX 9).
22108
22109 * bison.simple (__yy_memcpy):
22110 Declare arg `count' as unsigned int.
22111 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22112
22113 1997-01-03 Richard Stallman <rms@gnu.org>
22114
22115 * src/allocate.c: [__STDC__ or _MSC_VER]:
22116 Declare calloc and realloc to return void *.
22117
22118 1997-01-02 Richard Stallman <rms@gnu.org>
22119
22120 * src/system.h:
22121 [_MSC_VER]: Include stdlib.h and process.h.
22122 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22123
22124 * src/main.c (main): Return FAILURE as a value.
22125 (printable_version): Declare arg as int, not char.
22126
22127 1997-01-02 Richard Stallman <rms@gnu.org>
22128
22129 * Makefile.in (dist):
22130 Explicitly check for symlinks, and copy them.
22131
22132 1996-12-19 Richard Stallman <rms@gnu.org>
22133
22134 * src/files.c:
22135 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22136
22137 1996-12-18 Paul Eggert <eggert@gnu.org>
22138
22139 * src/bison.s1 (yyparse):
22140 If __GNUC__ and YYPARSE_PARAM are both defined,
22141 declare yyparse to have a void * argument.
22142
22143 1996-12-18 Paul Eggert <eggert@gnu.org>
22144
22145 * bison.simple (yyparse):
22146 If __GNUC__ and YYPARSE_PARAM are both defined,
22147 declare yyparse to have a void * argument.
22148
22149 1996-12-17 Richard Stallman <rms@gnu.org>
22150
22151 * src/reduce.c (nbits): Add some casts.
22152
22153 1996-08-12 Richard Stallman <rms@gnu.org>
22154
22155 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22156
22157 1996-08-12 Richard Stallman <rms@gnu.org>
22158
22159 * bison.simple: Test _MSDOS as well as _MSDOS_.
22160
22161 1996-07-31 Richard Stallman <rms@gnu.org>
22162
22163 * src/bison.s1:
22164 [__sun && __i386]: Include alloca.h.
22165
22166 1996-07-31 Richard Stallman <rms@gnu.org>
22167
22168 * bison.simple:
22169 [__sun && __i386]: Include alloca.h.
22170
22171 1996-07-30 Richard Stallman <rms@gnu.org>
22172
22173 * src/bison.s1: Comment change.
22174
22175 * src/bison.s1: Test _MSDOS_, not MSDOS.
22176
22177 1996-07-30 Richard Stallman <rms@gnu.org>
22178
22179 * bison.simple: Comment change.
22180
22181 * bison.simple: Test _MSDOS_, not MSDOS.
22182
22183 1996-06-01 Richard Stallman <rms@gnu.org>
22184
22185 * 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:
22186 Insert `_' macro around many string constants.
22187
22188 * src/main.c:
22189 Insert `_' macro around many string constants.
22190
22191 (main): Call setlocale, bindtextdomain and textdomain.
22192
22193 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22194 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22195 [ENABLE_NLS]: Include libintl.h.
22196 [ENABLE_NLS] (gettext): Define.
22197 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22198 (N_, PACKAGE, LOCALEDIR): New macros.
22199
22200 1996-06-01 Richard Stallman <rms@gnu.org>
22201
22202 * POTFILES.in: New file.
22203
22204 * Makefile.in (allocate.o):
22205 Define target explicitly.
22206
22207 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22208 (LDFLAGS): Set to @LDFLAGS@.
22209 (configure): Run autoconf only if preceding `cd' succeeds.
22210 (bison.s1): Redirect output to temporary file then move the
22211 temporary to the target, rather than redirecting directly to bison.s1.
22212 (clean): Remove config.status and config.log.
22213 (distclean): Don't remove config.status here.
22214
22215 1996-05-12 Richard Stallman <rms@gnu.org>
22216
22217 * src/bison.s1:
22218 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22219
22220 1996-05-12 Richard Stallman <rms@gnu.org>
22221
22222 * bison.simple:
22223 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22224
22225 1996-05-11 Richard Stallman <rms@gnu.org>
22226
22227 * src/bison.s1 (__yy_memcpy):
22228 Really reorder the args, as was supposedly done on Feb 14 1995.
22229 (yyparse): Calls changed accordingly.
22230
22231 1996-05-11 Richard Stallman <rms@gnu.org>
22232
22233 * Makefile.in (dist): Don't use $(srcdir).
22234
22235 * bison.simple (__yy_memcpy):
22236 Really reorder the args, as was supposedly done on Feb 14 1995.
22237 (yyparse): Calls changed accordingly.
22238
22239 1996-01-27 Richard Stallman <rms@gnu.org>
22240
22241 * src/output.c (output_rule_data):
22242 Test YYERROR_VERBOSE in the conditional
22243 around the definition of ttyname.
22244
22245 1995-12-29 Richard Stallman <rms@gnu.org>
22246
22247 * src/bison.s1:
22248 Fix line numbers in #line commands.
22249
22250 1995-12-29 Richard Stallman <rms@gnu.org>
22251
22252 * bison.simple:
22253 Fix line numbers in #line commands.
22254
22255 1995-12-27 Richard Stallman <rms@gnu.org>
22256
22257 * src/bison.s1 (YYPARSE_PARAM_DECL):
22258 In C++, make it always null.
22259 (YYPARSE_PARAM_ARG): New macro.
22260 (yyparse): Use YYPARSE_PARAM_ARG.
22261
22262 1995-12-27 Richard Stallman <rms@gnu.org>
22263
22264 * bison.simple (YYPARSE_PARAM_DECL):
22265 In C++, make it always null.
22266 (YYPARSE_PARAM_ARG): New macro.
22267 (yyparse): Use YYPARSE_PARAM_ARG.
22268
22269 1995-11-29 Richard Stallman <rms@gnu.org>
22270
22271 * doc/bison.texinfo:
22272 Describe literal string tokens, %raw, %no_lines, %token_table.
22273
22274 1995-11-29 Daniel Hagerty <hag@gnu.org>
22275
22276 * doc/bison.texinfo: Fixed update date
22277
22278 1995-10-16 Richard Stallman <rms@gnu.org>
22279
22280 * src/version.c: Version 1.25.
22281
22282 1995-10-16 Richard Stallman <rms@gnu.org>
22283
22284 * NEWS: *** empty log message ***
22285
22286 1995-10-16 Richard Stallman <rms@gnu.org>
22287
22288 * doc/bison.1, doc/bison.rnh:
22289 Add new options.
22290
22291 1995-10-15 Richard Stallman <rms@gnu.org>
22292
22293 * src/vmsgetargs.c, src/getargs.c:
22294 Added -n, -k, and -raw switches.
22295 (noparserflag, toknumflag, rawtoknumflag): New variables.
22296
22297 * src/symtab.h (SALIAS):
22298 New #define for adding aliases to %token.
22299 (struct bucket): Added `alias' field.
22300
22301 * src/reduce.c (reduce_grammar):
22302 Revise error message.
22303 (print_notices): Remove final `.' from error message.
22304
22305 * src/reader.c (reader_output_yylsp):
22306 New function.
22307 (readgram): Use `#if 0' around code that accepted %command
22308 inside grammar rules: The documentation doesn't allow it,
22309 and it will fail since the %command processors scan for the next %.
22310 (parse_token_decl): Extended the %token
22311 declaration to allow a multi-character symbol as an alias.
22312 (parse_thong_decl): New function.
22313 (read_declarations): Added %thong declarations.
22314 (read_declarations): Handle NOOP to deal with allowing
22315 % declarations as another means to specify the flags.
22316 (readgram): Allow %prec prior to semantics embedded in a rule.
22317 (skip_to_char, read_declarations, copy_definition)
22318 (parse_token_decl, parse_start_decl, parse_type_decl)
22319 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22320 (get_type_name, copy_guard, copy_action, readgram)
22321 (get_type, packsymbols): Revised most error messages.
22322 Changed `fatal' to `warnxxx' to avoid aborting for error.
22323 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22324 (read_declarations): Improve the error message for
22325 an invalid character. Do not abort.
22326 (read_declarations, copy_guard, copy_action): Use
22327 printable_version to avoid unprintable characters in printed output.
22328 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22329 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22330 Allow the type of a non-terminal can be given
22331 more than once, as long as all specifications give the same type.
22332
22333 * src/output.c:
22334 (output_headers, output_trailers, output, output_gram)
22335 (output_rule_data): Implement noparserflag variable.
22336 Implement toknumflag variable.
22337 (output): Call reader_output_yylsp to output LTYPESTR.
22338
22339 * src/main.c (main):
22340 If reader sees an error, don't process the grammar.
22341 (fatals): Updated to not use VARARGS1.
22342 (printable_version, int_to_string, warn, warni, warns, warnss)
22343 (warnsss): New error reporting functions. Avoid abort for error.
22344
22345 * src/lex.h:
22346 Added THONG and NOOP for alias processing.
22347 Added SETOPT for the new code that allows setting options with %flags.
22348
22349 * src/lex.c:
22350 Include getopt.h. Add some extern decls.
22351 (safegetc): New function to deal with EOF gracefully.
22352 (literalchar); new function to deal with reading \ escapes.
22353 (lex): Use literalchar.
22354 (lex): Implemented "..." tokens.
22355 (literalchar, lex, parse_percent_token): Made tokenbuffer
22356 always contain the token. This includes growing the token
22357 buffer while reading an integer.
22358 (parse_percent_token): Replaced if-else statement with percent_table.
22359 (parse_percent_token): Added % declarations as another
22360 way to specify the flags -n, -l, and -r. Also added hooks for
22361 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
22362 major changes to files.c.
22363 (lex) Retain in the incoming stream a character following
22364 an incorrect '/'.
22365 (skip_white_space, lex): Revised most error messages
22366 and changed fatal to warn to avoid aborting.
22367 (percent_table): Added %thong declarations.
22368
22369 * src/gram.h: Comment changes.
22370
22371 * src/files.c (openfiles, open_extra_files, done):
22372 Add faction flag
22373 and actfile file. Handle noparserflag. Both for -n switch.
22374
22375 * src/conflicts.c (resolve_sr_conflict):
22376 Remove use of alloca.
22377
22378 1995-06-01 Jim Meyering <meyering@gnu.org>
22379
22380 * doc/bison.texinfo: *** empty log message ***
22381
22382 1995-05-06 Richard Stallman <rms@gnu.org>
22383
22384 * src/bison.s1: Comment change.
22385
22386 1995-05-06 Richard Stallman <rms@gnu.org>
22387
22388 * bison.simple: Comment change.
22389
22390 1995-05-03 Richard Stallman <rms@gnu.org>
22391
22392 * src/version.c: Version now 1.24.
22393
22394 * src/bison.s1: Change distribution terms.
22395
22396 * src/version.c: Version now 1.23.
22397
22398 1995-05-03 Richard Stallman <rms@gnu.org>
22399
22400 * doc/bison.texinfo:
22401 Rewrite "Conditions for Using Bison".
22402 Update version to 1.24.
22403
22404 1995-05-03 Richard Stallman <rms@gnu.org>
22405
22406 * bison.simple: Change distribution terms.
22407
22408 1995-02-23 Richard Stallman <rms@gnu.org>
22409
22410 * src/files.c: Test __VMS_POSIX as well as VMS.
22411
22412 1995-02-14 Jim Meyering <meyering@gnu.org>
22413
22414 * src/bison.s1 (__yy_memcpy):
22415 Renamed from __yy_bcopy to avoid
22416 confusion. Reverse FROM and TO arguments to be consistent with
22417 those of memcpy.
22418
22419 1995-02-14 Jim Meyering <meyering@gnu.org>
22420
22421 * bison.simple (__yy_memcpy):
22422 Renamed from __yy_bcopy to avoid
22423 confusion. Reverse FROM and TO arguments to be consistent with
22424 those of memcpy.
22425
22426 1994-11-10 David J. MacKenzie <djm@gnu.org>
22427
22428 * NEWS: reformat
22429
22430 * NEWS: New file.
22431
22432 * Makefile.in (DISTFILES): Include NEWS.
22433
22434 * Makefile.in (DISTFILES):
22435 Include install-sh, not install.sh.
22436
22437 * configure.in: Update to Autoconf v2 macro names.
22438
22439 1994-10-05 David J. MacKenzie <djm@gnu.org>
22440
22441 * Makefile.in: fix typo
22442
22443 * Makefile.in (prefix, exec_prefix):
22444 Let configure set them.
22445
22446 1994-09-28 David J. MacKenzie <djm@gnu.org>
22447
22448 * Makefile.in: Set datadir to $(prefix)/share.
22449
22450 1994-09-15 Richard Stallman <rms@gnu.org>
22451
22452 * src/bison.s1:
22453 Update copyright notice and GPL version.
22454
22455 1994-09-15 Richard Stallman <rms@gnu.org>
22456
22457 * bison.simple:
22458 Update copyright notice and GPL version.
22459
22460 1994-07-12 Richard Stallman <rms@gnu.org>
22461
22462 * src/reduce.c, src/reader.c:
22463 entered into RCS
22464
22465 1994-05-05 David J. MacKenzie <djm@gnu.org>
22466
22467 * Makefile.in: entered into RCS
22468
22469 1994-03-26 Richard Stallman <rms@gnu.org>
22470
22471 * src/bison.s1: entered into RCS
22472
22473 1994-03-26 Richard Stallman <rms@gnu.org>
22474
22475 * bison.simple: entered into RCS
22476
22477 1994-03-25 Richard Stallman <rms@gnu.org>
22478
22479 * src/main.c: entered into RCS
22480
22481 1994-03-24 Richard Stallman <rms@gnu.org>
22482
22483 * src/conflicts.c: entered into RCS
22484
22485 1994-01-02 Richard Stallman <rms@gnu.org>
22486
22487 * Makefile.in: *** empty log message ***
22488
22489 1993-11-21 Richard Stallman <rms@gnu.org>
22490
22491 * src/bison.s1: *** empty log message ***
22492
22493 1993-11-21 Richard Stallman <rms@gnu.org>
22494
22495 * doc/bison.texinfo: entered into RCS
22496
22497 * doc/bison.texinfo: *** empty log message ***
22498
22499 1993-11-21 Richard Stallman <rms@gnu.org>
22500
22501 * bison.simple: *** empty log message ***
22502
22503 1993-10-25 David J. MacKenzie <djm@gnu.org>
22504
22505 * doc/bison.texinfo: *** empty log message ***
22506
22507 1993-10-19 Richard Stallman <rms@gnu.org>
22508
22509 * src/bison.s1: *** empty log message ***
22510
22511 1993-10-19 Richard Stallman <rms@gnu.org>
22512
22513 * bison.simple: *** empty log message ***
22514
22515 1993-10-14 Richard Stallman <rms@gnu.org>
22516
22517 * src/bison.s1: *** empty log message ***
22518
22519 1993-10-14 Richard Stallman <rms@gnu.org>
22520
22521 * bison.simple: *** empty log message ***
22522
22523 1993-09-14 David J. MacKenzie <djm@gnu.org>
22524
22525 * doc/bison.texinfo: *** empty log message ***
22526
22527 1993-09-13 Noah Friedman <friedman@gnu.org>
22528
22529 * Makefile.in: *** empty log message ***
22530
22531 1993-09-10 Richard Stallman <rms@gnu.org>
22532
22533 * src/conflicts.c: *** empty log message ***
22534
22535 * src/system.h: entered into RCS
22536
22537 1993-09-10 Richard Stallman <rms@gnu.org>
22538
22539 * doc/bison.1: entered into RCS
22540
22541 1993-09-06 Noah Friedman <friedman@gnu.org>
22542
22543 * src/version.c: entered into RCS
22544
22545 1993-09-06 Noah Friedman <friedman@gnu.org>
22546
22547 * Makefile.in: *** empty log message ***
22548
22549 1993-07-30 David J. MacKenzie <djm@gnu.org>
22550
22551 * Makefile.in: *** empty log message ***
22552
22553 1993-07-24 Richard Stallman <rms@gnu.org>
22554
22555 * src/bison.s1: *** empty log message ***
22556
22557 1993-07-24 Richard Stallman <rms@gnu.org>
22558
22559 * bison.simple: *** empty log message ***
22560
22561 1993-07-08 David J. MacKenzie <djm@gnu.org>
22562
22563 * Makefile.in: *** empty log message ***
22564
22565 1993-07-04 Richard Stallman <rms@gnu.org>
22566
22567 * src/bison.s1: *** empty log message ***
22568
22569 1993-07-04 Richard Stallman <rms@gnu.org>
22570
22571 * bison.simple: *** empty log message ***
22572
22573 1993-06-26 David J. MacKenzie <djm@gnu.org>
22574
22575 * src/getargs.c: entered into RCS
22576
22577 1993-06-26 David J. MacKenzie <djm@gnu.org>
22578
22579 * doc/bison.texinfo: *** empty log message ***
22580
22581 * doc/bison.1: New file.
22582
22583 1993-06-25 Richard Stallman <rms@gnu.org>
22584
22585 * src/getargs.c: New file.
22586
22587 1993-06-16 Richard Stallman <rms@gnu.org>
22588
22589 * src/bison.s1: *** empty log message ***
22590
22591 1993-06-16 Richard Stallman <rms@gnu.org>
22592
22593 * bison.simple: *** empty log message ***
22594
22595 1993-06-03 Richard Stallman <rms@gnu.org>
22596
22597 * src/bison.s1: New file.
22598
22599 1993-06-03 Richard Stallman <rms@gnu.org>
22600
22601 * doc/bison.texinfo: *** empty log message ***
22602
22603 1993-06-03 Richard Stallman <rms@gnu.org>
22604
22605 * bison.simple: New file.
22606
22607 1993-05-19 Richard Stallman <rms@gnu.org>
22608
22609 * doc/bison.texinfo: New file.
22610
22611 1993-05-07 Noah Friedman <friedman@gnu.org>
22612
22613 * Makefile.in: *** empty log message ***
22614
22615 1993-04-28 Noah Friedman <friedman@gnu.org>
22616
22617 * src/reader.c: *** empty log message ***
22618
22619 1993-04-23 Noah Friedman <friedman@gnu.org>
22620
22621 * src/alloc.h: entered into RCS
22622
22623 1993-04-20 David J. MacKenzie <djm@gnu.org>
22624
22625 * src/version.c: *** empty log message ***
22626
22627 * src/files.c, src/allocate.c:
22628 entered into RCS
22629
22630 * src/reader.c: *** empty log message ***
22631
22632 * src/lex.c: entered into RCS
22633
22634 * src/conflicts.c: New file.
22635
22636 * src/symtab.c: entered into RCS
22637
22638 * src/alloc.h: New file.
22639
22640 * src/LR0.c: entered into RCS
22641
22642 1993-04-18 Noah Friedman <friedman@gnu.org>
22643
22644 * src/reader.c: New file.
22645
22646 * src/version.c: *** empty log message ***
22647
22648 1993-04-18 Noah Friedman <friedman@gnu.org>
22649
22650 * Makefile.in: *** empty log message ***
22651
22652 1993-04-17 Noah Friedman <friedman@gnu.org>
22653
22654 * Makefile.in: *** empty log message ***
22655
22656 1993-04-15 Richard Stallman <rms@gnu.org>
22657
22658 * src/main.c, src/files.c:
22659 New file.
22660
22661 1993-04-15 Noah Friedman <friedman@gnu.org>
22662
22663 * configure.in: entered into RCS
22664
22665 * configure.in: *** empty log message ***
22666
22667 * configure.in: New file.
22668
22669 1993-04-14 Richard Stallman <rms@gnu.org>
22670
22671 * Makefile.in: New file.
22672
22673 1993-04-13 Richard Stallman <rms@gnu.org>
22674
22675 * src/version.c: New file.
22676
22677 1993-03-25 Richard Stallman <rms@gnu.org>
22678
22679 * src/output.c: entered into RCS
22680
22681 1992-09-25 Richard Stallman <rms@gnu.org>
22682
22683 * configure.bat: entered into RCS
22684
22685 1992-06-22 Richard Stallman <rms@gnu.org>
22686
22687 * src/vmsgetargs.c: entered into RCS
22688
22689 1992-06-22 Richard Stallman <rms@gnu.org>
22690
22691 * doc/bison.rnh: entered into RCS
22692
22693 1992-04-20 David J. MacKenzie <djm@gnu.org>
22694
22695 * README: entered into RCS
22696
22697 1992-01-22 Richard Stallman <rms@gnu.org>
22698
22699 * src/machine.h: entered into RCS
22700
22701 1991-12-21 Richard Stallman <rms@gnu.org>
22702
22703 * src/lalr.c, src/closure.c:
22704 entered into RCS
22705
22706 1991-12-20 Richard Stallman <rms@gnu.org>
22707
22708 * src/state.h: entered into RCS
22709
22710 1991-12-18 Richard Stallman <rms@gnu.org>
22711
22712 * src/print.c, src/nullable.c, src/derives.c:
22713 entered into RCS
22714
22715 1991-11-03 David J. MacKenzie <djm@gnu.org>
22716
22717 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
22718 entered into RCS
22719
22720 1988-09-09 Richard Stallman <rms@gnu.org>
22721
22722 * src/bison.hairy: entered into RCS
22723
22724 1987-12-16 Richard Stallman <rms@gnu.org>
22725
22726 * REFERENCES: entered into RCS
22727
22728
22729 -----
22730
22731 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
22732 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
22733 Free Software Foundation, Inc.
22734
22735 Copying and distribution of this file, with or without
22736 modification, are permitted provided the copyright notice and this
22737 notice are preserved.