]> git.saurik.com Git - bison.git/blob - ChangeLog
Use testsuite -C.
[bison.git] / ChangeLog
1 2008-12-11 Akim Demaille <demaille@gostai.com>
2
3 Use testsuite -C.
4 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
5 Solves problems when top_srcdir is an absolute path.
6 Suggested by Eric Blake.
7 * configure.ac: Require Autoconf 2.62.
8
9 2008-12-11 Akim Demaille <demaille@gostai.com>
10
11 Simplify the i18n of the error messages.
12 * data/lalr1.cc: Comment changes.
13 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
14 lalr1.cc instead of building dynamically the format string.
15
16 2008-12-08 Akim Demaille <demaille@gostai.com>
17
18 Fix portability issue in the test suite.
19 * tests/local.at (AT_MATCHES_CHECK): New.
20 Based on Perl instead of Sed. Sed has too many portability
21 pitfalls, not ever Sed is GNU Sed.
22 * tests/actions.at (Fix user actions without a trailing semicolon):
23 Use it.
24
25 2008-12-08 Akim Demaille <demaille@gostai.com>
26
27 Update data/README.
28 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
29
30 2008-12-08 Akim Demaille <demaille@gostai.com>
31
32 Install autoconf as a submodule to get m4sugar.
33 * .gitmodules: Add submodules/autoconf.
34 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
35 submodules/autoconf.
36
37 2008-12-08 Akim Demaille <demaille@gostai.com>
38
39 Test token.prefix in all the skeletons.
40 * data/java.m4 (b4_token_enum): Use the token.prefix.
41 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
42 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
43 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
44 * tests/java.at: Comment changes.
45 (AT_CHECK_JAVA_MINIMAL): Define the END token.
46 (Java parser class and package names): Add token.prefix check.
47
48 2008-12-08 Akim Demaille <demaille@gostai.com>
49
50 Fix regeneration of atconfig.
51 * tests/local.mk (tests/atconfig): The rule was incorrect, but
52 remove it: now that there is no tests/Makefile.am, the top-level
53 Makefile properly updates atconfig when needed.
54
55 2008-12-07 Di-an Jan <dianj@freeshell.org>
56
57 Implement the FIXME that ends an user action with a semicolon
58 if it seems necessary.
59 * src/scan-code.l (flex rules section): Flag cpp directive from
60 any `#' to the first unescaped end-of-line. Semicolon is not
61 needed after `;', `{', '}', or cpp directives and is needed after
62 any other token (whitespaces and comments have no effect).
63 * tests/actions.at (Fix user actions without a trailing semicolon):
64 New test.
65 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
66 to make user actions complete statements.
67 Adjust column numbers in error messages.
68 * tests/regression.at (Fix user actions without a trailing semicolon):
69 Remove. Covered by new test.
70
71 2008-12-07 Akim Demaille <demaille@gostai.com>
72
73 Update gnulib.
74 * gnulib: Update from master.
75
76 2008-12-05 Eric Blake <ebb9@byu.net>
77
78 Avoid compiler warning.
79 * src/output.c (muscle_insert_item_number_table): Delete unused
80 function.
81
82 2008-12-02 Eric Blake <ebb9@byu.net>
83
84 Build testsuite with newer autoconf.
85 * tests/output.at (m4_expand): Don't override in newer autoconf,
86 where the underlying implementation changed.
87 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
88 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
89 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
90 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
91 since some of them contain unbalanced ')'.
92
93 2008-12-01 Akim Demaille <demaille@gostai.com>
94
95 Use b4_symbol for printers and destructors everywhere.
96 * data/bison.m4 (b4_symbol_action_location): New.
97 * data/c.m4 (b4_symbol_actions): Remove.
98 Adjust all callers to use by b4_symbol_foreach and the corresponding
99 b4_symbol_printer/destructor macro.
100 * data/glr.cc: Adjust.
101 * data/lalr1.java: Adjust the %destructor sanity check.
102 * src/output.c (symbol_code_props_output): Remove, we no longer
103 need the b4_symbol_printers/destructors tables.
104
105 2008-12-01 Akim Demaille <demaille@gostai.com>
106
107 Use b4_symbol_case_.
108 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
109 b4_symbol_case_.
110
111 2008-12-01 Akim Demaille <demaille@gostai.com>
112
113 Move b4_symbol based macro to bison.m4.
114 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
115 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
116 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
117 (b4_type_foreach): Move to...
118 * data/bison.m4: Here.
119 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
120 b4_symbol_value_template instead of b4_symbol_value.
121
122 2008-12-01 Akim Demaille <demaille@gostai.com>
123
124 b4_symbol/type_foreach.
125 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
126 Use them.
127
128 2008-12-01 Akim Demaille <demaille@gostai.com>
129
130 Use the symbol properties to output the printer/destructor for lalr1.cc.
131 Instead of defining complex list of tuples to define various
132 properties of the symbols, we now prefer to define symbols as
133 "structs" in m4: using the symbol key (its number), and the
134 property name, b4_symbol gives it value. Use this to handle
135 destructors and printers.
136
137 * src/output.c (CODE_PROP): New.
138 (prepare_symbol_definitions): Use it to define the printer and
139 destructor related attributes of the symbols.
140 * data/lalr1.cc (b4_symbol_actions): Rename as...
141 (b4_symbol_action): this.
142 Use b4_symbol instead of 6 arguments.
143 (b4_symbol_printer, b4_symbol_destructor): New.
144 Use them instead of b4_symbol_actions.
145
146 2008-12-01 Akim Demaille <demaille@gostai.com>
147
148 Avoid capturing variables too easily.
149 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
150 v__ and p__ instead of v and p.
151
152 2008-12-01 Akim Demaille <demaille@gostai.com>
153
154 Remove spurious empty line before syncline.
155 * data/bison.m4 (b4_syncline): Don't output an empty line before
156 the output.
157
158 2008-11-26 Akim Demaille <demaille@gostai.com>
159
160 Convert lib/Makefile.am into lib/local.mk.
161 The real problem is rather gnulib.mk, which itself is extracted
162 from a Makefile.am that gnulib expects to the "recursive". The
163 tool prefix-gnulib-mk converts such a gnulib.mk to be
164 non-recursive. Also, some AC_SUBST variables need to be adjusted.
165
166 * etc/prefix-gnulib-mk: New.
167 * bootstrap (slurp): Use it to convert further gnulib.mk.
168 No longer try to avoid re-creation of lib/gnulib.mk as the changes
169 are deeper.
170 * lib/Makefile.am: Rename as...
171 * lib/local.mk: this.
172 Adjust to be prefixed.
173 * Makefile.am, configure.ac: Adjust.
174 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
175
176 2008-11-26 Akim Demaille <demaille@gostai.com>
177
178 s/_FLAGS/FLAGS/.
179 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
180 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
181 Reported by Eric Blake.
182
183 2008-11-26 Akim Demaille <demaille@gostai.com>
184
185 Use b4_parser_tables_define in glr.cc.
186 * data/glr.c: Use b4_parser_tables_define instead of defining the
187 (deterministic integral) tables by hand.
188
189 2008-11-26 Akim Demaille <demaille@gostai.com>
190
191 Use b4_parser_tables_define in Java.
192 * data/java.m4 (b4_typed_parser_table): Rename as...
193 (b4_typed_parser_table_define): this, for consistency.
194 Accept a comment as $4.
195 Move $2 into yy*_.
196 (b4_integral_parser_table): Rename as...
197 (b4_integral_parser_table_define): this.
198 * data/lalr1.java: Adjust all uses.
199 Use b4_parser_tables_define instead of generation by hand.
200
201 2008-11-26 Akim Demaille <demaille@gostai.com>
202
203 Prepare the convergence bw C style and Java table generation.
204 * data/bison.m4 (b4_tables_map, b4_tables_declare)
205 (b4_tables_define): Rename as...
206 (b4_integral_parser_tables_map, b4_parser_tables_declare)
207 (b4_parser_tables_define): these.
208 * data/c.m4 (b4_table_define): Rename as...
209 (b4_integral_parser_table_define): this.
210 * data/lalr1.cc: Adjust.
211 (b4_table_define, b4_table_declare): Rename as...
212 (b4_integral_parser_table_define)
213 (b4_integral_parser_table_declare): these.
214 (yyrline_): Move the comment where it is actually used.
215 * data/yacc.c: Adjust.
216 (yyrline): Use b4_integral_parser_table_define.
217
218 2008-11-26 Akim Demaille <demaille@gostai.com>
219
220 Regen.
221 * src/parse-gram.h, src/parse-gram.c: Regen.
222
223 2008-11-26 Akim Demaille <demaille@gostai.com>
224
225 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
226 * data/lalr1.cc (b4_tables_map): Move to...
227 * data/bison.m4: here.
228 Update the comment for yytable during the flight.
229 (b4_tables_declare, b4_tables_define): New.
230 * data/lalr1.cc: Use them.
231 * data/c.m4 (b4_table_define): New.
232 * data/yacc.c: Use b4_tables_define instead of output the tables
233 by hand.
234 * tests/regression.at (Web2c Actions): Adjust the expected output,
235 the order of the tables changed.
236
237 2008-11-26 Akim Demaille <demaille@gostai.com>
238
239 Get rid of (yy)rhs and (yy)prhs.
240 These tables are no longer needed in the parsers, and they don't seem to
241 be useful. They are not documented either.
242
243 * src/output.c (prepare_rules): Get rid of rhs and prhs.
244 Adjust the computation of (yy)r2.
245
246 2008-11-26 Akim Demaille <demaille@gostai.com>
247
248 Rule length is unsigned.
249 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
250
251 2008-11-26 Akim Demaille <demaille@gostai.com>
252
253 Get rid of lalr1-split.cc.
254 It was no longer maintainer.
255
256 * data/lalr1-split.cc: Remove.
257 * etc/bench.pl.in (bench_fusion_parser): Remove.
258 Adjust.
259
260 2008-11-26 Akim Demaille <demaille@gostai.com>
261
262 Use yy* consistently.
263 * data/glr.c: Now that yyrhs no longer exists as a global
264 variable, rename local "rhs" variables into "yyrhs" for
265 consistency.
266
267 2008-11-25 Akim Demaille <demaille@gostai.com>
268
269 Get rid of yyrhs and yyprhs in glr.c.
270 * data/glr.c (yyrhs, yyprhs): Remove.
271 Instead, use the state stack and yystos.
272
273 2008-11-25 Akim Demaille <demaille@gostai.com>
274
275 Flag glr tests.
276 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
277 as an Autotest keyword.
278
279 2008-11-25 Akim Demaille <demaille@gostai.com>
280
281 Prefer TESTSUITE_FLAGS.
282 TESTSUITEFLAGS is barely readable.
283
284 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
285 for backward compatibility.
286 Use the former instead of the latter.
287
288 2008-11-25 Akim Demaille <demaille@gostai.com>
289
290 Get rid of yyrhs and yyprhs in larl1.java.
291 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
292 (yy_reduce_print): Rather, use yystos_ and the state stack.
293
294 2008-11-25 Akim Demaille <demaille@gostai.com>
295
296 Formatting changes.
297
298 2008-11-25 Akim Demaille <demaille@gostai.com>
299
300 Get rid of yyrhs and yyprhs in yacc.c.
301 They were used to get the symbol types, given a rule number, when
302 displaying the top of the stack before a reduction. But the
303 symbol type is available from the state stack. This has two be
304 benefits: two tables less in the parser (making it smaller), and a
305 more consistent use of the three stacks which will help to fuse
306 them.
307
308 * data/yacc.c (yyprhs, yyrhs): Remove.
309 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
310 (yy_reduce_print): Take yyssp as argument.
311 Use it, together with yystos, to get the symbol type.
312 * tests/regression.at (Web2c Report): Remove these tables from the
313 expected output.
314
315 2008-11-25 Akim Demaille <demaille@gostai.com>
316
317 b4_tables_map.
318 The point is to factor the generation of the tables across skeletons.
319 This is language dependant.
320
321 * data/c.m4 (b4_comment_): New.
322 Should be usable to define how to generate tables independently of
323 the language.
324 (b4_c_comment): New.
325 (b4_comment): Bounce to b4_c_comment.
326 Now support $2 = [PREFIX] for indentation.
327 * data/lalr1.cc (b4_table_declare): Don't output a comment if
328 there is no comment.
329 Indent it properly when there is one.
330 Output the ending semicolon.
331 (b4_table_define): Space changes.
332 Output the ending semicolon.
333 (b4_tables_map): New.
334 Use it twice instead of declaring and defining the (integral)
335 tables by hand.
336
337 2008-11-25 Akim Demaille <demaille@gostai.com>
338
339 b4_table_declare.
340 * data/lalr1.cc (b4_table_declare): New.
341 Use it to declare the tables defined with b4_table_define.
342 (b4_table_define): Declare a third arg to match b4_table_declare
343 signature.
344 Move all the comments around invocations of b4_table_define into
345 the invocations itselves.
346 Move things around to have the order for declarations and
347 definitions.
348
349 2008-11-25 Akim Demaille <demaille@gostai.com>
350
351 Formatting changes.
352 * data/lalr1.java: here.
353
354 2008-11-25 Akim Demaille <demaille@gostai.com>
355
356 b4_args is more general than only C++.
357 * data/lalr1.cc (b4_args, _b4_args): Move to...
358 * data/bison.m4: here.
359
360 2008-11-21 Di-an Jan <dianj@freeshell.org>
361
362 Implement no-XXX arguments for --warnings, --report, --trace.
363 * src/getargs.c (flags_argmatch): Handles no-XXX.
364 Fix typo in doxygen comment.
365
366 2008-11-21 Akim Demaille <demaille@gostai.com>
367
368 Display the changes in cross-options.texi.
369 * build-aux/cross-options.pl ($sep): New, to separate items.
370 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
371 changes.
372
373 2008-11-20 Di-an Jan <dianj@freeshell.org>
374
375 Improves options in the manual.
376 * doc/bison.texinfo (-g, -x): Add space before argument.
377 (Option Cross Key): Implement FIXME: listing directives also.
378 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
379 (Short Option): Special case -d. Put arguments inside @option.
380 (Bison Directive): Add column, automatically extracted from
381 src/scan-gram.l (actual name passed as the first argument)
382 with special case for %define.
383 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
384 to build-aux/cross-options.pl.
385 * src/getargs.c (usage): Document limitations of cross-options.pl.
386 * src/scan-gram.l: Likewise.
387
388 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
389
390 Fix unexpanded macros in GLR defines file.
391 Reported by Csaba Raduly at
392 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
393 * THANKS (Csaba Raduly): Add.
394 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
395 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
396 lexer in a separate module that includes the defines file.
397 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
398 source.
399 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
400 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
401 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
402 (AT_DATA_SOURCE_PROLOGUE): New.
403 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
404 (AT_DATA_SOURCE): New.
405 (AT_FULL_COMPILE): Extend to support an additional source file.
406
407 2008-11-18 Akim Demaille <demaille@gostai.com>
408
409 More TODO.
410 * TODO: More short term issues.
411
412 2008-11-18 Akim Demaille <demaille@gostai.com>
413
414 Regen.
415 * src/parse-gram.h, src/parse-gram.c: Regen.
416
417 2008-11-18 Akim Demaille <demaille@gostai.com>
418
419 Use b4_subtract where possible.
420 * data/lalr1.cc (b4_subtract): Move to...
421 * data/bison.m4: here.
422 * data/glr.c (b4_rhs_data): Use it.
423 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
424
425 2008-11-18 Akim Demaille <demaille@gostai.com>
426
427 Remove incorrect mode specification.
428 * data/glr.cc: Don't pretend it's C code.
429
430 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
431
432 Simplify last patch slightly.
433 * src/getargs.c (getargs): Here.
434
435 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
436
437 Fix last warning from --enable-gcc-warnings.
438 * src/getargs.c (getargs): Don't assign const address to non-const
439 pointer.
440
441 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
442
443 Don't let maintainer-*-check targets force a version update.
444 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
445 handled.
446
447 2008-11-17 Di-an Jan <dianj@freeshell.org>
448
449 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
450 Align menus. Adjust word wrapping. Use node names for menu names.
451 (Examples): Don't abbreviate node names.
452 (LocalWords): Remove abbreviations.
453 (Copying): Make description a sentence.
454 (Java Action Features): Remove period to match the rest of menu.
455
456 2008-11-17 Di-an Jan <dianj@freeshell.org>
457
458 Handles several --enable-gcc-warnings.
459 * src/getargs.c (command_line_location): Set parameters to void.
460 * src/output.c (symbol_type_name_cmp): Make static.
461 (symbols_by_type_name): Set parameters to void.
462 (symbol_definitions_output): Remove unused parameter. Rename as...
463 (prepare_symbol_definitions): this.
464 (muscles_output): Move symbol_definitions_output to...
465 (output): here as prepare_symbol_definitions.
466 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
467 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
468
469 2008-11-17 Di-an Jan <dianj@freeshell.org>
470
471 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
472 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
473
474 2008-11-16 Akim Demaille <demaille@gostai.com>
475
476 Add missing $(EXEEXT).
477 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
478 "src/bison$(EXEEXT)".
479 Reported by Di-an Jan.
480
481 2008-11-15 Akim Demaille <demaille@gostai.com>
482
483 * TODO: Update.
484
485 2008-11-15 Akim Demaille <demaille@gostai.com>
486
487 Formatting changes.
488 * tests/input.at: here.
489
490 2008-11-15 Akim Demaille <demaille@gostai.com>
491
492 Remove duplicate header inclusion.
493 * src/LR0.c: here.
494
495 2008-11-15 Akim Demaille <demaille@gostai.com>
496
497 * src/parse-gram.h, src/parse-gram.c: Regen.
498
499 2008-11-15 Akim Demaille <demaille@gostai.com>
500
501 Support parametric types.
502
503 There are two issues to handle: first scanning nested angle
504 bracket pairs to support types such as std::pair< std::string,
505 std::list<std::string> > >.
506
507 Another issue is to address idiosyncracies of C++: do not glue two
508 closing angle brackets together (otherwise it's operator>>), and
509 avoid sticking blindly a TYPE to the opening <, as it can result
510 in '<:' which is a digraph for '['.
511
512 * src/scan-gram.l (brace_level): Rename as...
513 (nesting): this.
514 (SC_TAG): New.
515 Implement support for complex tags.
516 (tag): Accept
517 , but not <.
518 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
519 (b4_symbol_variant): Leave space around types as parameters.
520 * examples/variant.yy: Use nested template types and leading ::.
521 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
522 Rename as...
523 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
524 * tests/c++.at: Test parametric types.
525
526 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
527
528 Test token.prefix.
529 This is not sufficient, but we test at least that the make_SYMBOL
530 interface is not affected by token.prefix. A more general test
531 will be implemented when the support of token.prefix is generalized
532 to more skeletons.
533
534 * tests/c++.at: One more variant test, using token.prefix.
535
536 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
537
538 Test the make_TOKEN interface.
539 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
540 Factor the common code in yylex.
541 Use it to test "%define lex_symbol".
542
543 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
544
545 Formatting change.
546
547 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
548
549 Simplify code for variants bench marks.
550 * etc/bench.pl.in (&generate_grammar_list): Define and use
551 location_type.
552 Factor the common code in yylex.
553
554 2008-11-15 Akim Demaille <demaille@gostai.com>
555
556 Better error message.
557 * bootstrap (find_tool): Fix the error message.
558
559 2008-11-15 Akim Demaille <demaille@gostai.com>
560
561 Update variant.yy to newest interface.
562 * examples/variant.yy: Define lex_symbol.
563 Adjust.
564
565 2008-11-15 Akim Demaille <demaille@gostai.com>
566
567 Don't use locations in variant.yy.
568 * examples/variant.yy: Adjust to not using locations.
569
570 2008-11-15 Akim Demaille <demaille@gostai.com>
571
572 Comment changes.
573 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
574 comments for the license.
575
576 2008-11-15 Akim Demaille <demaille@gostai.com>
577
578 Remove tests/Makefile.am.
579 * tests/Makefile.am: Rename as...
580 * tests/local.mk: this.
581 * Makefile.am, configure.ac: Adjust.
582 * Makefile.am (DISTCLEANFILES): Define.
583 (maintainer-check, maintainer-xml-check, maintainer-push-check):
584 Remove, we no longer need to bounce to the real targets.
585
586 2008-11-15 Akim Demaille <demaille@gostai.com>
587
588 Comment changes.
589
590 2008-11-15 Akim Demaille <demaille@gostai.com>
591
592 djgpp/local.mk.
593 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
594 * djgpp/local.mk: this new file.
595
596 2008-11-15 Akim Demaille <demaille@gostai.com>
597
598 Remove doc/Makefile.am.
599 * doc/Makefile.am: Rename as...
600 * doc/local.mk: this.
601 Adjust paths
602 * Makefile.am, configure.ac: Adjust.
603 * Makefile.am (MOSTLYCLEANFILES): New.
604 * src/local.mk: Adjust.
605
606 2008-11-15 Akim Demaille <demaille@gostai.com>
607
608 Move sc_tight_scope into maint.mk.
609 It does not work, and I don't know how it was supposed to work: it
610 seems to be looking for sources in the build tree. I just moved
611 it at a better place, fixing it is still required.
612
613 * src/local.mk (echo): Remove.
614 (sc_tight_scope): Move to...
615 * maint.mk: here.
616
617 2008-11-15 Akim Demaille <demaille@gostai.com>
618
619 Regen.
620 * src/parse-gram.h, src/parse-gram.h: Regen.
621
622 2008-11-15 Akim Demaille <demaille@gostai.com>
623
624 Remove src/Makefile.am.
625 * src/Makefile.am: Rename as...
626 * src/local.mk: this.
627 Prefix all the paths with src/.
628 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
629 (AM_CPPFLAGS): Find find in builddir/src.
630 (YACC): Move the flags into...
631 (AM_YFLAGS): here.
632 * maint.mk (sc_tight_scope): Disable.
633 It used to bounce to the version in src/Makefile.am which is now
634 part of this very Makefile.
635 * Makefile.am, configure.ac: Adjust.
636 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
637 include "..." to find files "here": we are no longer in src/, so
638 qualify the includes with src/.
639 * doc/Makefile.am (PREPATH): No longer include the top_builddir
640 prefix.
641 (.x.1): Adjust to be able to create src/foo from the top level
642 Makefile, instead of going bounce to src/Makefile the creation of
643 foo.
644
645 2008-11-15 Akim Demaille <demaille@gostai.com>
646
647 Remove useless variable.
648 * doc/Makefile.am (srcsrcdir): Remove.
649
650 2008-11-15 Akim Demaille <demaille@gostai.com>
651
652 Remove data/Makefile.am.
653 * data/Makefile.am: Rename as...
654 * data/local.mk: this.
655 Adjust paths.
656 * Makefile.am, configure.ac: Adjust.
657
658 2008-11-15 Akim Demaille <demaille@gostai.com>
659
660 Remove etc/Makefile.am.
661 * etc/Makefile.am: Rename as...
662 * etc/local.mk: this.
663 Adjust.
664 * Makefile.am, configure.ac: Adjust.
665
666 2008-11-15 Akim Demaille <demaille@gostai.com>
667
668 Remove examples/local.mk.
669 examples/calc++/Makefile.am might be interesting to keep as is, since
670 it is an example in itself.
671
672 * examples/Makefile.am: Rename as...
673 * examples/local.mk: this.
674 Adjust.
675 * Makefile.am, configure.ac: Adjust.
676
677 2008-11-15 Akim Demaille <demaille@gostai.com>
678
679 Remove build-aux/Makefile.am.
680 Recursive Makefiles are really way too slow, let's get rid of some of
681 them.
682
683 * build-aux/Makefile.am: Rename as...
684 * build-aux/local.mk: this.
685 Adjust paths.
686 * Makefile.am, configure.ac: Adjust.
687
688 2008-11-15 Akim Demaille <demaille@gostai.com>
689
690 Provide convenience constructors for locations and positions.
691 * data/location.cc (position::position): Accept file, line and
692 column as arguments with default values.
693 Always qualify initial line and column literals as unsigned.
694 (location::location): Provide convenience constructors.
695
696 2008-11-15 Akim Demaille <demaille@gostai.com>
697
698 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
699 token type.
700 Using template buys us nothing, and makes it uselessly complex to
701 construct a symbol. Besides, it could not be generalized to other
702 languages, while make_FOO would work in C/Java etc.
703
704 * data/lalr1.cc (b4_symbol_): New.
705 (b4_symbol): Use it.
706 (b4_symbol_constructor_declaration_)
707 (b4_symbol_constructor_definition_): Instead of generating
708 specializations of an overloaded template function, just generate
709 several functions whose names are forged from the token names
710 without the token.prefix.
711 (b4_symbol_constructor_declarations): Generate them for all the
712 symbols, not just by class of symbol type, now that instead of
713 specializing a function template by the token, we generate a
714 function named after the token.
715 (b4_symbol_constructor_specialization_)
716 (b4_symbol_constructor_specializations): Remove.
717 * etc/bench.pl.in: Adjust to this new API.
718
719 2008-11-13 Akim Demaille <demaille@gostai.com>
720
721 %define token.prefix.
722 Provide a means to add a prefix to the name of the tokens as
723 output in the generated files. Because of name clashes, it is
724 good to have such a prefix such as TOK_ that protects from names
725 such as EOF, FILE etc. But it clutters the grammar itself.
726
727 * data/bison.m4 (token.prefix): Empty by default.
728 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
729 * data/lalr1.cc (b4_symbol): Ditto.
730
731 2008-11-13 Akim Demaille <demaille@gostai.com>
732
733 Compute at M4 time some of the subtractions.
734 * data/lalr1.cc (b4_subtract): New.
735 (b4_rhs_data): Use it.
736
737 2008-11-13 Akim Demaille <demaille@gostai.com>
738
739 symbol::token.
740 This allows the user to get the type of a token returned by yylex.
741
742 * data/lalr1.cc (symbol::token): New.
743 (yytoknum_): Define when %define lex_symbol, independently of
744 %debug.
745 (yytoken_number_): Move into...
746 (symbol::token): here, since that's the only use.
747 The other one is YYPRINT which was not officially supported
748 by lalr1.cc, and anyway it did not work since YYPRINT uses this
749 array under a different name (yytoknum).
750
751 2008-11-13 Akim Demaille <demaille@gostai.com>
752
753 YYERRCODE.
754 * TODO (YYERRCODE): Mention the case of $undef.
755
756 2008-11-13 Akim Demaille <demaille@gostai.com>
757
758 TODO: YYPRINT.
759 * TODO (YYPRINT): New.
760
761 2008-11-13 Akim Demaille <demaille@gostai.com>
762
763 Comment changes.
764 * data/lalr1.cc, data/yacc.c: Fix the description of the
765 yytranslate and yytoknum tables.
766
767 2008-11-13 Akim Demaille <demaille@gostai.com>
768
769 Define make_symbol in the header.
770 To reach good performances these functions should be inlined (yet
771 this is to measure precisely). To this end they must be available
772 to the caller.
773
774 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
775 location_type with the class name.
776 Since will now be output in the header, declare "inline".
777 No longer use b4_symbol_constructor_specializations, but
778 b4_symbol_constructor_definitions in the header.
779 Don't call it in the *.cc file.
780
781 2008-11-13 Akim Demaille <demaille@gostai.com>
782
783 Define yytranslate in the header for lex_symbol.
784 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
785 into the header file when using %define lex_symbol.
786 (yytranslate_): Declare inline.
787
788 2008-11-13 Akim Demaille <demaille@gostai.com>
789
790 Define the constructors of symbol_type in
791 b4_symbol_constructor_definitions.
792 The constructors are called by the make_symbol functions, which a
793 forthcoming patch will move elsewhere. Hence the interest of
794 putting them together.
795
796 The stack_symbol_type does not need to be moved, it is used only
797 by the parser.
798
799 * data/lalr1.cc: Move symbol_type and symbol_base_type
800 constructors into...
801 (b4_symbol_constructor_definitions): here.
802 Adjust.
803
804 2008-11-13 Akim Demaille <demaille@gostai.com>
805
806 Make it easier to move the definition of yytranslate_.
807 Forthcoming changes will make it possible to use yytranslate_
808 from outside the parser implementation file.
809
810 * data/lalr1.cc (b4_yytranslate_definition): New.
811 Use it.
812
813 2008-11-13 Akim Demaille <demaille@gostai.com>
814
815 Remove useless class specification.
816 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
817 to refer to the class name to use a type defined by the class for
818 arguments of member functions.
819
820 2008-11-13 Akim Demaille <demaille@gostai.com>
821
822 Finer input type for yytranslate.
823 This patch is debatable: the tradition expects yylex to return an int
824 which happens to correspond to token_number (which is an enum). This
825 allows for instance to return characters (such as '*' etc.). But this
826 goes against the stronger typing I am trying to have with the new
827 lex interface which return a symbol_type. So in this case, feed
828 yytranslate_ with a token_type.
829
830 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
831 expect a token_type.
832
833 2008-11-13 Akim Demaille <demaille@gostai.com>
834
835 Honor lex-params in %define lex_symbol mode.
836 * data/lalr1.cc: Use b4_lex_param.
837
838 2008-11-13 Akim Demaille <demaille@gostai.com>
839
840 Simplify names.
841 * src/output.c (symbol_definitions_output): Rename symbol
842 attributes type_name and has_type_name as type and has_type.
843 * data/lalr1.cc: Adjust uses.
844
845 2008-11-13 Akim Demaille <demaille@gostai.com>
846
847 Use b4_type_names for the union type.
848 The union used to compute the size of the variant used to iterate
849 over the type of all the symbols, with a lot of redundancy. Now
850 iterate over the lists of symbols having the same type-name.
851
852 * data/lalr1.cc (b4_char_sizeof_): New.
853 (b4_char_sizeof): Use it.
854 Adjust to be called with a list of numbers instead of a single
855 number.
856 Adjust its caller for new-line issues.
857
858 2008-11-13 Akim Demaille <demaille@gostai.com>
859
860 Define the "identifier" of a symbol.
861 Symbols may have several string representations, for instance if
862 they have an alias. What I call its "id" is a string that can be
863 used as an identifier. May not exist.
864
865 Currently the symbols which have the "tag_is_id" flag set are
866 those that don't have an alias. Look harder for the id.
867
868 * src/output.c (is_identifier): Move to...
869 * src/symtab.c (is_identifier): here.
870 * src/symtab.h, src/symtab.c (symbol_id_get): New.
871 * src/output.c (symbol_definitions_output): Use it to define "id"
872 and "has_id".
873 Remove the definition of "tag_is_id".
874 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
875 "tag_is_id" were used to produce code.
876 We still use "tag" for documentation.
877
878 2008-11-11 Akim Demaille <demaille@gostai.com>
879
880 Locations are no longer required by lalr1.cc.
881 * data/lalr1.cc (_b4_args, b4_args): New.
882 Adjust all uses of locations to make them optional.
883 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
884 (AT_CHECK_NAMESPACE): Check the use of locations.
885 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
886 without locations with lalr1.cc.
887 Test these cases.
888 * tests/output.at: Check lalr1.cc with and without location
889 support.
890 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
891 Don't use locations.
892
893 2008-11-11 Akim Demaille <demaille@gostai.com>
894
895 AT_FULL_COMPILE.
896 * tests/local.at (AT_FULL_COMPILE): New.
897 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
898
899 2008-11-11 Akim Demaille <demaille@gostai.com>
900
901 Support parens in calc++.
902 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
903 * examples/calc++/test (run): Check the expected output.
904 Adjust callers.
905 Check parens too.
906
907 2008-11-11 Akim Demaille <demaille@gostai.com>
908
909 Simplify lalr1.cc since %defines is mandatory.
910 * data/lalr1.cc: Remove useless calls to b4_defines_if.
911
912 2008-11-11 Akim Demaille <demaille@gostai.com>
913
914 TODO: yyfmt.
915 * TODO (yysyntax_error): New item.
916
917 2008-11-11 Akim Demaille <demaille@gostai.com>
918
919 Prefer M4 to CPP.
920 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
921 YYERROR_VERBOSE.
922
923 2008-11-11 Akim Demaille <demaille@gostai.com>
924
925 Support i18n of the parse error messages.
926 * TODO (lalr1.cc/I18n): Remove.
927 * data/lalr1.cc (yysyntax_error_): Support the translation of the
928 error messages, as done in yacc.c.
929 Stay within the yy* pseudo namespace.
930
931 2008-11-11 Akim Demaille <demaille@gostai.com>
932
933 More TODO.
934 * TODO (single stack, yysyntax_error): New.
935
936 2008-11-11 Akim Demaille <demaille@gostai.com>
937
938 Make it possible to return a symbol_type from yylex.
939 * data/lalr1.cc (b4_lex_symbol_if): New.
940 (parse): When lex_symbol is defined, expected yylex to return the
941 complete lookahead.
942 * etc/bench.pl.in (generate_grammar_list): Extend to support this
943 yylex interface.
944 (bench_variant_parser): Exercise it.
945
946 2008-11-11 Akim Demaille <demaille@gostai.com>
947
948 Remove useless bench case.
949 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
950 no longer used.
951
952 2008-11-11 Akim Demaille <demaille@gostai.com>
953
954 Improve display of directives.
955 * etc/bench.pl.in (parse_term): Don't add useless eol.
956
957 2008-11-11 Akim Demaille <demaille@gostai.com>
958
959 Use string_cast in the bench.
960 * etc/bench.pl.in (generate_grammar_list): Define and use
961 string_cast.
962
963 2008-11-11 Akim Demaille <demaille@gostai.com>
964
965 Replace yychar with a Boolean.
966 * data/lalr1.cc (parse::yychar): Replace by...
967 (parse::yyempty): this.
968
969 2008-11-11 Akim Demaille <demaille@gostai.com>
970
971 Factor the tables.
972 * TODO: New item.
973
974 2008-11-11 Akim Demaille <demaille@gostai.com>
975
976 Let yytranslate handle the eof case.
977 * data/lalr1.cc (yytranslate_): Handle the EOF case.
978 Adjust callers.
979 No longer expect yychar to be equal to yyeof_, rather, test the
980 lookahead's (translated) kind.
981
982 2008-11-11 Akim Demaille <demaille@gostai.com>
983
984 yychar cannot be empty in yyerrlab.
985 * TODO (yychar == yyempty_): New.
986 * data/lalr1.cc: Remove the handling of this case.
987 This eases forthcoming changes related to yychar and yytranslate.
988
989 2008-11-11 Akim Demaille <demaille@gostai.com>
990
991 Bench: syntactic sugar for %define/#define.
992 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
993 (&bench_push_parser, bench_variant_parser): Use this feature.
994 (&eat): New.
995 Use it.
996
997 2008-11-11 Akim Demaille <demaille@gostai.com>
998
999 Less memory pressure on the "list" bench.
1000 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
1001 the values, to limit memory pressure.
1002
1003 2008-11-11 Akim Demaille <demaille@gostai.com>
1004
1005 Introduce make_symbol.
1006 make_symbol provides a means to construct a full symbol (kind,
1007 value, location) in a single shot. It is meant to be a Symbol
1008 constructor, parameterized by the symbol kind so that overloading
1009 would prevent incorrect kind/value pairs. Unfortunately
1010 parameterized constructors do not work well in C++ (unless the
1011 parameter also appears as an argument, which is not acceptable),
1012 hence the use of a function instead of a constructor.
1013
1014 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1015 (b4_symbol_constructor_declarations)
1016 (b4_symbol_constructor_specialization_)
1017 (b4_symbol_constructor_specializations)
1018 (b4_symbol_constructor_definition_)
1019 (b4_symbol_constructor_definitions): New.
1020 Use them where appropriate to generate declaration, declaration of
1021 the specializations, and implementations of the templated
1022 overloaded function "make_symbol".
1023 (variant::variant): Always define a default ctor.
1024 Also provide a copy ctor.
1025 (symbol_base_type, symbol_type): New ctor overloads for value-less
1026 symbols.
1027 (symbol_type): Now public, so that functions such as yylex can use
1028 it.
1029
1030 2008-11-11 Akim Demaille <demaille@gostai.com>
1031
1032 Inform m4 whether a tag is a valid id.
1033 * src/output.c (is_identifier): New.
1034 (symbol_definitions_output): Use it to define tag_is_id.
1035 But maybe this should be done at m4 level?
1036
1037 2008-11-11 Akim Demaille <demaille@gostai.com>
1038
1039 Test 214 was failing: it greps with a pattern containing [ ]*
1040 which obviously meant to catch spaces and tabs, but contained only
1041 spaces. Tabulations in sources are a nuisance, so to simplify the
1042 matter, get rid of all the tabulations in the Java sources. The
1043 other skeletons will be treated equally later.
1044
1045 * data/java.m4, data/lalr1.java: Untabify.
1046 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
1047 tabulations are no longer generated.
1048
1049 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
1050
1051 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1052 * configure.ac: Adjust usage.
1053 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1054 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1055 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1056
1057 2008-11-10 Di-an Jan <dianj@freeshell.org>
1058
1059 Workaround Java's ``code too large'' problem for parser tables
1060 in most cases, by using one function per initialization.
1061 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
1062 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
1063 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
1064 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
1065 (yytname_): Use b4_typed_parser_table.
1066 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
1067 ``code too large'' error.
1068
1069 2008-11-10 Di-an Jan <dianj@freeshell.org>
1070
1071 * NEWS: Document them.
1072
1073 General Java skeleton improvements.
1074 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
1075 using gcj < 4.3 in the testsuite, according to comments in
1076 gnulib/m4/javacomp.m4.
1077 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
1078 location_type, position_type): Remove extraneous brackets from
1079 b4_percent_define_default.
1080 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
1081 m4_define and m4_define_default.
1082 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
1083 which marks the end of user code with appropriate syncline, like all
1084 the other skeletons.
1085 (b4_user_post_prologue): Add. Don't silently drop.
1086 (yylex): Remove.
1087 (parse): Inline yylex.
1088 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
1089 (%{...%}): Fix typo of %code imports.
1090 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
1091
1092 Support annotations on parser class with %define annotations.
1093 * data/lalr1.java (annotations): Add to parser class modifier.
1094 * doc/bison.texinfo (Java Parser Interface): Document
1095 %define annotations.
1096 (Java Declarations Summary): Document %define annotations.
1097 * tests/java.at (Java parser class modifiers): Test annotations.
1098
1099 Do not generate code for %error-verbose unless requested.
1100 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
1101 Make private. Make conditional on %error-verbose.
1102 (getErrorVerbose, setErrorVerbose): New.
1103 (yytnamerr_): Make conditional on %error-verbose.
1104 (yysyntax_error): Make some code conditional on %error-verbose.
1105 * doc/bison.texinfo (Java Bison Interface): Remove the parts
1106 about %error-verbose having no effect.
1107 (getErrorVerbose, setErrorVerbose): Document.
1108
1109 Move constants for token names to Lexer interface.
1110 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
1111 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
1112 (parse): Qualify EOF to Lexer.EOF.
1113 * doc/bison.texinfo (Java Parser Interface): Move documentation of
1114 EOF and token names to Java Lexer Interface.
1115 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
1116
1117 Make yyerror public.
1118 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
1119 (yyerror): Change to public. Add Javadoc comments. Use longer
1120 parameter names. Make the body rather than the declarator
1121 conditional on %locations.
1122 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
1123
1124 Allow user to add code to the constructor with %code init.
1125 * data/java.m4 (b4_init_throws): New, for %define init_throws.
1126 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
1127 Add %code init to the front of the constructor body.
1128 * doc/bison.texinfo (YYParser.YYParser): Document %code init
1129 and %define init_throws.
1130 (Java Declarations Summary): Document %code init and
1131 %define init_throws.
1132 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
1133 (Java constructor init and init_throws): Add tests.
1134
1135 2008-11-10 Akim Demaille <demaille@gostai.com>
1136
1137 Update TODO.
1138 * TODO (-D): is implemented.
1139 (associativity): Same precedence must have the same associativity.
1140 For instance, how can a * b / c be parsed if * is %left and / is
1141 %right?
1142 (YYERRORCODE, YYFAIL, YYBACKUP): New.
1143
1144 2008-11-10 Akim Demaille <demaille@gostai.com>
1145
1146 Formatting changes.
1147
1148 2008-11-10 Akim Demaille <demaille@gostai.com>
1149
1150 More information about the symbols.
1151 * src/output.c (type_names_output): Document all the symbols,
1152 including those that don't have a type-name.
1153 (symbol_definitions_output): Define "is_token" and
1154 "has_type_name".
1155 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
1156 type-name, now that they are defined too in b4_type_names.
1157
1158 2008-11-10 Akim Demaille <demaille@gostai.com>
1159
1160 Regen.
1161
1162 2008-11-10 Akim Demaille <demaille@gostai.com>
1163
1164 Make parser::yytranslate static.
1165 Small speedup (1%) on the list grammar. And makes yytranslate_
1166 available in non member functions.
1167
1168 * data/lalr1.cc (yytranslate_): Does not need to be a instance
1169 function.
1170
1171 2008-11-10 Akim Demaille <demaille@gostai.com>
1172
1173 Avoid trailing spaces.
1174 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
1175 * data/lalr1.cc: Don't indent before rule and symbol actions, as
1176 they can be empty, and anyway this incorrectly indents the first
1177 action.
1178
1179 2008-11-10 Akim Demaille <demaille@gostai.com>
1180
1181 Comment changes.
1182
1183 2008-11-10 Akim Demaille <demaille@gostai.com>
1184
1185 Use "enum" for integral constants.
1186 This is just nicer to read, I observed no speedup.
1187
1188 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
1189 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
1190 (yyuser_token_number_max_, yyundef_token_): Move into...
1191 (yytranslate_): here.
1192
1193 2008-11-10 Akim Demaille <demaille@gostai.com>
1194
1195 Shortcuts in bench directives.
1196 * etc/bench.pl.in (parse_dirs): New.
1197 Use it.
1198 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
1199 Create the benches in "benches/".
1200
1201 2008-11-10 Akim Demaille <demaille@gostai.com>
1202
1203 Formatting changes.
1204 * data/lalr1.cc: here.
1205
1206 2008-11-10 Akim Demaille <demaille@gostai.com>
1207
1208 Adjust verbose message to using emacs.
1209 * etc/bench.pl.in: Inform compilation-mode when we change the
1210 directory.
1211 (generate_grammar_list): Recognize %define "variant" in addition
1212 to %define variant.
1213
1214 2008-11-10 Akim Demaille <demaille@gostai.com>
1215
1216 Classify symbols by type-name.
1217 * src/uniqstr.h (UNIQSTR_CMP): New.
1218 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
1219 (type_names_output): New.
1220 (muscles_output): Use it.
1221 * data/lalr1.cc (b4_symbol_action_): Remove.
1222 (b4_symbol_case_, b4_type_action_): New.
1223 Adjust uses of b4_symbol_action_ to use b4_type_action_.
1224
1225 2008-11-10 Akim Demaille <demaille@gostai.com>
1226
1227 Change the handling of the symbols in the skeletons.
1228 Before we were using tables which lines were the symbols and which
1229 columns were things like number, tag, type-name etc. It is was
1230 difficult to extend: each time a column was added, all the numbers had
1231 to be updated (you asked for colon $2, not for "tag"). Also, it was
1232 hard to filter these tables when only a subset of the symbols (say the
1233 tokens, or the nterms, or the tokens that have and external number
1234 *and* a type-name) was of interest.
1235
1236 Now instead of monolithic tables, we define one macro per cell. For
1237 instance "b4_symbol(0, tag)" is a macro name which contents is
1238 self-decriptive. The macro "b4_symbol" provides easier access to
1239 these cells.
1240
1241 * src/output.c (type_names_output): Remove.
1242 (symbol_numbers_output, symbol_definitions_output): New.
1243 (muscles_output): Call them.
1244 (prepare_symbols): Define b4_symbols_number.
1245
1246 2008-11-10 Akim Demaille <demaille@gostai.com>
1247
1248 --trace=muscles
1249 * src/getargs.h, src/getargs.c (trace_muscle): New.
1250 (trace_types, trace_args): Support it.
1251 * src/output.c (output_skeleton): Use it.
1252
1253 2008-11-10 Akim Demaille <demaille@gostai.com>
1254
1255 muscles_output.
1256 * src/output.c (muscles_output): New, extracted from...
1257 (output_skeleton): here.
1258 Adjust.
1259
1260 2008-11-10 Akim Demaille <demaille@gostai.com>
1261
1262 Formatting changes.
1263
1264 2008-11-10 Akim Demaille <demaille@gostai.com>
1265
1266 Update the variant example.
1267 * examples/variant.yy: Formatting changes.
1268 One stage build.
1269
1270 2008-11-10 Akim Demaille <demaille@gostai.com>
1271
1272 Support constructor with an argument.
1273 This improves the "list" bench by 2%.
1274
1275 * data/lalr1.cc (variant::build): Add an overloaded version with
1276 an argument.
1277 * tests/c++.at (AT_CHECK_VARIANT): Check it.
1278
1279 2008-11-10 Akim Demaille <demaille@gostai.com>
1280
1281 Test variants.
1282 * tests/c++.at (AT_CHECK_VARIANTS): New.
1283 Use it with and without %define assert.
1284
1285 2008-11-10 Akim Demaille <demaille@gostai.com>
1286
1287 Add %precedence support.
1288 Unfortunately it is not possible to reuse the %prec directive. This
1289 is because to please POSIX, we do not require to end the rules with a
1290 semicolon. As a result,
1291
1292 foo: bar %prec baz
1293
1294 is ambiguous: either a rule which precedence is that of baz, or a rule,
1295 and then a declaration of the precedence of the token baz.
1296
1297 * doc/bison.texinfo: Document %precedence.
1298 (Precedence Only): New.
1299 * src/assoc.h, src/assoc.c (precedence_assoc): New.
1300 * src/conflicts.c (resolve_sr_conflict): Support it.
1301 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
1302 Parse it.
1303 * tests/calc.at: Use %precedence for NEG.
1304 * tests/conflicts.at (%precedence does not suffice)
1305 (%precedence suffices): New tests.
1306
1307 2008-11-09 Akim Demaille <demaille@gostai.com>
1308
1309 Make benches in a sub dirs.
1310 * etc/bench.pl.in ($dir): New.
1311 Use it.
1312 Check the use of constructors with an argument.
1313 (bench_variant_parser): Fix.
1314
1315 2008-11-09 Akim Demaille <demaille@gostai.com>
1316
1317 fix eof condition
1318
1319 2008-11-09 Akim Demaille <demaille@gostai.com>
1320
1321 Fix --help.
1322
1323 2008-11-09 Akim Demaille <demaille@gostai.com>
1324
1325 Require the generation of parse-gram.output.
1326 * src/Makefile.am (YACC): Pass --report=all.
1327
1328 2008-11-09 Akim Demaille <demaille@gostai.com>
1329
1330 Formatting changes.
1331
1332 2008-11-09 Akim Demaille <demaille@gostai.com>
1333
1334 Update TODO.
1335 * TODO: Remove obsolete items.
1336 Update others.
1337
1338 2008-11-09 Akim Demaille <demaille@gostai.com>
1339
1340 Enhance bench.pl.
1341 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
1342 (@token, $grammar, $bench): New.
1343 (generate_grammar_variant): Rename as...
1344 (generate_grammar_list): this.
1345 (generate_grammar): Adjust.
1346 (bench_grammar): Rename as...
1347 (bench): this.
1348 Use it in the various bench-marking routines.
1349 (-b, -g): New options.
1350
1351 2008-11-09 Akim Demaille <demaille@gostai.com>
1352
1353 Use a static hierarchy for symbols in the C++ parser.
1354 * data/lalr1.cc (symbol_base_type, symbol_type)
1355 (stack_symbol_type): Make it a static hierarchy.
1356 Adjust dependencies.
1357
1358 2008-11-09 Akim Demaille <demaille@gostai.com>
1359
1360 bench.pl -d, --directive.
1361 * etc/bench.pl.in (@directive): New.
1362 (&bench_grammar): Use it.
1363 (&bench_list_grammar): New, to provide access to the "variant"
1364 grammar.
1365 Use it.
1366 (getopts): Support -d, --directive.
1367
1368 2008-11-09 Akim Demaille <demaille@gostai.com>
1369
1370 Use inline for small operations.
1371 * data/lalr1.cc (symbol_base_type, symbol_type)
1372 (stack_symbol_type): Declare constructor and other operations as
1373 inline.
1374 (yy_destroy_): Inline.
1375
1376 2008-11-09 Akim Demaille <demaille@gostai.com>
1377
1378 Introduce a hierarchy for symbols.
1379 * data/lalr1.cc (symbol_base_type, symbol_type): New.
1380 (data_type): Rename as...
1381 (stack_symbol_type): this.
1382 Derive from symbol_base_type.
1383 (yy_symbol_value_print_): Merge into...
1384 (yy_symbol_print_): this.
1385 Rename as...
1386 (yy_print_): this.
1387 (yydestruct_): Rename as...
1388 (yy_destroy_): this.
1389 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
1390 (parser::parse): yyla is now of symbol_type.
1391 Use its type member instead of yytoken.
1392
1393 2008-11-09 Akim Demaille <demaille@gostai.com>
1394
1395 Rename data_type and stack_symbol_type.
1396 * data/lalr1.cc (data_type): Rename as...
1397 (stack_symbol_type): this.
1398
1399 2008-11-09 Akim Demaille <demaille@gostai.com>
1400
1401 Handle semantic value and location together.
1402 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
1403 yydata.value and yydata.location.
1404 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
1405 (YY_SYMBOL_PRINT): Now take semantic value and location as a
1406 single arg.
1407 Adjust all callers.
1408 (yydestruct_): New overload for a stack symbol.
1409
1410 2008-11-09 Akim Demaille <demaille@gostai.com>
1411
1412 Push a complete symbol, not connected parts.
1413 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
1414 state, value and location.
1415 Adjust callers.
1416
1417 2008-11-09 Akim Demaille <demaille@gostai.com>
1418
1419 Agregate yylval and yylloc.
1420 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
1421 (parser::yyla): this.
1422
1423 2008-11-09 Akim Demaille <demaille@gostai.com>
1424
1425 Rely on the state stack to display reduction traces.
1426 To display rhs symbols before a reduction, we used information
1427 about the rule reduced, which required the tables yyrhs and
1428 yyprhs. Now use rely only on the state stack to get the same
1429 information.
1430
1431 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
1432 Use them.
1433 (parser::yyrhs_, parser::yyprhs_): Remove.
1434 (parser::yy_reduce_print_): Use the state stack.
1435
1436 2008-11-09 Akim Demaille <demaille@gostai.com>
1437
1438 Fuse yyval and yyloc into yylhs.
1439 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
1440 yylhs.
1441 (parse): Replace yyval and yyloc with yylhs.value and
1442 yylhs.location.
1443 After a user action, compute yylhs.state earlier.
1444 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
1445 fresh error_token.
1446
1447 2008-11-09 Di-an Jan <dianj@freeshell.org>
1448
1449 Remove unused variable.
1450 * src/output.c (type_names_output): Remove unused variable sep.
1451
1452 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
1453
1454 Change tests/output.at quoting.
1455 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
1456 expanding arguments.
1457
1458 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1459
1460 Don't add a semicolon to actions for %skeleton or %language.
1461 It breaks Java test cases as reported by Akim Demaille.
1462 * src/scan-code.l: Implement.
1463
1464 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1465
1466 Clean up %skeleton and %language priority implementation.
1467 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1468 remove static qualifier because others will soon need to see it.
1469 (language_prio): Likewise.
1470 (getargs): Use command_line_prio rather than 0.
1471 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1472 enum fields.
1473 (skeleton_prio): Extern it.
1474 (language_prio): Extern it.
1475 * src/parse-gram.y: Use grammar_prio rather than 1.
1476
1477 2008-11-07 Akim Demaille <demaille@gostai.com>
1478
1479 Moving push traces into yypush_.
1480 * data/lalr1.cc (yypush_): Now takes a optional trace message.
1481 Adjust all uses.
1482
1483 2008-11-07 Akim Demaille <demaille@gostai.com>
1484
1485 The single-stack C++ parser is now the standard one.
1486 * data/lalr1.cc: Rename as...
1487 * data/lalr1-split.cc: this.
1488 * data/lalr1-fusion.cc: Rename as...
1489 * data/lalr1.cc: this.
1490 * etc/bench.pl.in: Adjust.
1491
1492 2008-11-07 Akim Demaille <demaille@gostai.com>
1493
1494 Avoid empty-if warnings.
1495 Reported by Quentin Hocquet.
1496
1497 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
1498 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
1499
1500 2008-11-07 Akim Demaille <demaille@gostai.com>
1501
1502 Pass command line location to skeleton_arg and language_argmatch.
1503 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
1504 The location argument is now mandatory.
1505 Adjust all dependencies.
1506 (getargs): Use command_line_location.
1507
1508 2008-11-07 Akim Demaille <demaille@gostai.com>
1509
1510 -D, --define.
1511 * src/getargs.c (usage): Document -D.
1512 Fix help string for --locations.
1513 (command_line_location): New.
1514 (short_options, long_options, getargs): Support -D, --define.
1515 (getargs): Move -d support at the right place.
1516 * doc/bison.texinfo (Bison Options): Update.
1517 * tests/input.at (%define, --define): New.
1518
1519 2008-11-07 Akim Demaille <demaille@gostai.com>
1520
1521 Initialize the muscle table before parsing the command line.
1522 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
1523 (getargs): Define file_name.
1524 * src/main.c (main): Initialize muscle_tab before calling
1525 getargs.
1526 * src/muscle_tab.c (muscle_init): No longer define file_name, as
1527 its value is not available yet.
1528
1529 2008-11-07 Akim Demaille <demaille@gostai.com>
1530
1531 Locations without columns for command line arguments.
1532 * src/location.c (location_print): Don't display negative columns.
1533 * src/location.h: Document this.
1534
1535 2008-11-07 Akim Demaille <demaille@gostai.com>
1536
1537 Fix --help.
1538 * src/getargs.c (usage): Fix help string for -W.
1539
1540 2008-11-07 Akim Demaille <demaille@gostai.com>
1541
1542 Handle more general types of option arguments.
1543 * build-aux/cross-options.pl: The argument ends at the first
1544 space, not the first non-symbol character.
1545 Use @var for each word appearing the argument description.
1546
1547 2008-11-07 Akim Demaille <demaille@gostai.com>
1548
1549 Destroy the variants that remain on the stack in case of error.
1550 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
1551 destructor.
1552 Display the value only if yymsg is nonnull.
1553 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
1554
1555 2008-11-07 Akim Demaille <demaille@gostai.com>
1556
1557 Add "%define assert" to variants.
1558 This is used to help the user catch cases where some value gets
1559 ovewritten by a new one. This should not happen, as this will
1560 probably leak.
1561
1562 Unfortunately this uncovered a bug in the C++ parser itself: the
1563 lookahead value was not destroyed between two calls to yylex. For
1564 instance if the previous lookahead was a std::string, and then an int,
1565 then the value of the std::string was correctly taken (i.e., the
1566 lookahead was now an empty string), but std::string structure itself
1567 was not reclaimed.
1568
1569 This is now done in variant::build(other&) (which is used to take the
1570 value of the lookahead): other is not only stolen from its value, it
1571 is also destroyed. This incurs a new performance penalty of a few
1572 percent, and union becomes faster again.
1573
1574 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
1575 (b4_variant_if): New.
1576 (variant::built): New.
1577 Use it whereever the status of the variant changes.
1578 * etc/bench.pl.in: Check the penalty of %define assert.
1579
1580 2008-11-07 Akim Demaille <demaille@gostai.com>
1581
1582 Use "%define variant" in bench.pl.
1583 * etc/bench.pl.in: No longer use the pseudo directive %variants,
1584 just use %define variants.
1585
1586 2008-11-07 Akim Demaille <demaille@gostai.com>
1587
1588 Regen.
1589 * src/parse-gram.h, src/parse-gram.c: Regen.
1590
1591 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
1592
1593 Fix user actions without a trailing semicolon.
1594 Reported by Sergei Steshenko at
1595 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1596 * THANKS (Sergei Steshenko): Add.
1597 * src/scan-code.l (SC_RULE_ACTION): Fix it.
1598 * tests/regression.at (Fix user actions without a trailing semicolon):
1599 New test case.
1600
1601 2008-11-04 Akim Demaille <demaille@gostai.com>
1602
1603 Use b4_copyright_years.
1604 * data/yacc.c (b4_copyright_years): New.
1605 Fix its value according to the comments in the file.
1606 Use it and undefine it.
1607
1608 2008-11-04 Akim Demaille <demaille@gostai.com>
1609
1610 Formatting changes.
1611 * data/lalr1-fusion.cc, src/parse-gram.y: here.
1612
1613 2008-11-04 Akim Demaille <demaille@gostai.com>
1614
1615 Formatting changes.
1616 * data/lalr1-fusion.cc: here.
1617
1618 2008-11-04 Akim Demaille <demaille@gostai.com>
1619
1620 Use strict on bench.pl.
1621 * etc/bench.pl.in (&run, &generate_grammar): New.
1622 Rename the grammar generating functions for consistency.
1623 Change the interface so that the list of benches to run is passed
1624 as (optionless) arguments.
1625 (&compile): Use &run.
1626
1627 2008-11-04 Akim Demaille <demaille@gostai.com>
1628
1629 Remove spurious initial empty lines.
1630 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1631 * data/yacc.c: End the @output lines with an @.
1632
1633 2008-11-04 Akim Demaille <demaille@gostai.com>
1634
1635 Improve the display of sizes.
1636 * etc/bench.p.in: Higher precision.
1637 Sort by decreasing size.
1638
1639 2008-11-04 Akim Demaille <demaille@gostai.com>
1640
1641 Don't memcpy C++ structures.
1642 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
1643 arguments.
1644 (variant::build): New overload for
1645 copy-construction-that-destroys.
1646 (variant::swap): New.
1647 (parser::yypush_): Use it in variant mode.
1648
1649 2008-11-04 Akim Demaille <demaille@gostai.com>
1650
1651 Better defaults for bench.pl.
1652 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
1653 default values.
1654 Adjust &verbose uses.
1655 (-q, --quiet): New.
1656
1657 2008-11-04 Akim Demaille <demaille@gostai.com>
1658
1659 Make variant.yy more complex.
1660 std::list cannot be copied via memcpy, they are more demanding than
1661 std::string. Use one std::list to strengthen the test.
1662
1663 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
1664 Adjust.
1665 Create a list of strings, instead of a single large string.
1666
1667 2008-11-04 Akim Demaille <demaille@gostai.com>
1668
1669 bench.pl --bench.
1670 * etc/bench.pl.in (--bench, $bench): New.
1671
1672 2008-11-04 Akim Demaille <demaille@gostai.com>
1673
1674 Sort methods.
1675 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
1676 Define it after as().
1677
1678 2008-11-04 Akim Demaille <demaille@gostai.com>
1679
1680 Useless parens.
1681 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
1682
1683 2008-11-04 Akim Demaille <demaille@gostai.com>
1684
1685 Issue missing synclines after user actions.
1686 * data/c.m4 (b4_case): Issue synclines on the output file.
1687
1688 2008-11-04 Akim Demaille <demaille@gostai.com>
1689
1690 Remove trailing empty line.
1691 * data/lalr1-fusion.cc: Don't add an empty line after the user's
1692 epilogue.
1693
1694 2008-11-04 Akim Demaille <demaille@gostai.com>
1695
1696 Fix output of copyright years.
1697 * data/bison.m4 (b4_copyright): Fix the indentation of the
1698 copyright year paragraph.
1699 Use b4_copyright_years when no years are given.
1700 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
1701 (b4_copyright_years): New.
1702 Use it.
1703
1704 2008-11-04 Akim Demaille <demaille@gostai.com>
1705
1706 Avoid the spurious initial empty line.
1707 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
1708 the end of @output request to suppress the empty line that
1709 results.
1710
1711 2008-11-04 Akim Demaille <demaille@gostai.com>
1712
1713 Remove parser::rhs_number_type.
1714 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
1715 (yyrhs_): Use b4_table_define.
1716
1717 2008-11-04 Akim Demaille <demaille@gostai.com>
1718
1719 Fix iteration type.
1720 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
1721
1722 2008-11-04 Akim Demaille <demaille@gostai.com>
1723
1724 Factor the declaration of the integer tables.
1725 * data/lalr1-fusion.cc (b4_table_define): New.
1726 Use it.
1727
1728 2008-11-03 Akim Demaille <demaille@gostai.com>
1729
1730 Fix indentation of tables in lalr1.cc
1731 * data/lalr1-fusion.cc: Fix the indentation.
1732
1733 2008-11-03 Akim Demaille <demaille@gostai.com>
1734
1735 Destroy the lhs symbols after reduction.
1736 * data/lalr1-fusion.cc (parse): After the user action, when in
1737 variant mode, destroy the lhs symbols.
1738
1739 2008-11-03 Akim Demaille <demaille@gostai.com>
1740
1741 Simplify yysyntax_error_ use.
1742 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
1743 type, but make it unnamed in the declaration when it is not used.
1744
1745 2008-11-03 Akim Demaille <demaille@gostai.com>
1746
1747 Let yy::variant::build return an lvalue.
1748 * data/lalr1-fusion.cc (variant::build): Return a reference to the
1749 object.
1750
1751 2008-11-03 Akim Demaille <demaille@gostai.com>
1752
1753 Define yy::variant only when needed.
1754 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
1755 used.
1756
1757 2008-11-03 Akim Demaille <demaille@gostai.com>
1758
1759 Bench the three-stack lalr1.cc.
1760 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
1761 one-stack one.
1762
1763 2008-11-03 Akim Demaille <demaille@gostai.com>
1764
1765 Fail on parse error in calc++.
1766 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
1767 status.
1768 * examples/calc++/test ($me, $number, $exit, run): New.
1769 Use them to propagate errors to the exit status.
1770
1771 2008-11-03 Akim Demaille <demaille@gostai.com>
1772
1773 Don't specify the skeleton twice in the example.
1774 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
1775 file does what is needed.
1776
1777 2008-11-03 Akim Demaille <demaille@gostai.com>
1778
1779 bench: Improve output.
1780 * etc/bench.pl.in (bench_grammar): Tune the printf format.
1781
1782 2008-11-03 Akim Demaille <demaille@gostai.com>
1783
1784 bench: check impact of %debug on variants.
1785 * etc/bench.pl.in (variant_grammar): Fix the computation of
1786 $variant.
1787 Generate a grammar file that can work with or without %debug.
1788 Do use the @directive.
1789 (bench_variant_parser): Check impact of %debug.
1790 (@directives): Rename all the occurrences to...
1791 (@directive): this, for consistency.
1792
1793 2008-11-03 Akim Demaille <demaille@gostai.com>
1794
1795 bench: report the size too.
1796 * etc/bench.pl.in ($iterations): Defaults to -3.
1797 (&bench_grammar): Require hireswallclock.
1798 Compute and display the size of the result.
1799 More comments.
1800
1801 2008-11-03 Akim Demaille <demaille@gostai.com>
1802
1803 bench: More use of the verbosity level.
1804 * etc/bench.pl.in ($verbose, &verbose): New.
1805 Use them.
1806 More POD documentation.
1807
1808 2008-11-03 Akim Demaille <demaille@gostai.com>
1809
1810 bench.pl: a command line interface
1811 * etc/bench.pl.in: More doc.
1812 Some fixes in the documentation.
1813 ($cflags, $iterations, &help, &getopt): New.
1814 Use them.
1815 (&variant_grammar): Let the number of stages be 10 times what is
1816 specified.
1817
1818 2008-11-03 Akim Demaille <demaille@gostai.com>
1819
1820 Bench the use of Boost.Variants.
1821 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
1822 New.
1823 (&compile): Be ready to compile C++ parsers.
1824 (&bench_push_parser): Move debug information to the outermost
1825 level.
1826 * THANKS: Add Michiel De Wilde.
1827
1828 2008-11-03 Akim Demaille <demaille@gostai.com>
1829
1830 bench.pl: Pass directives as a list instead of as a string.
1831 * etc/bench.pl.in (&directives): New.
1832 (&triangular_grammar, &calc_grammar): Use it to format the Bison
1833 directives.
1834 (&triangular_grammar): Do use the directives (were ignored).
1835 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
1836 directives.
1837
1838 2008-11-03 Akim Demaille <demaille@gostai.com>
1839
1840 Improve genericity of bench.pl.
1841 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
1842 argument.
1843 (&bench_push_parser): New.
1844 Call it.
1845
1846 2008-11-03 Akim Demaille <demaille@gostai.com>
1847
1848 Add documentation to bench.pl.
1849 * etc/bench.pl.in: Comment changes.
1850
1851 2008-11-03 Akim Demaille <demaille@gostai.com>
1852
1853 Fuse the three stacks into a single one.
1854
1855 In order to make it easy to perform benchmarks to ensure that
1856 there are no performance loss, lalr1.cc is forked into
1857 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
1858 lalr1.cc.
1859
1860 Meanwhile, to make sure that lalr1-fusion.cc is correctly
1861 exercized by the test suite, the user must install a symbolic link
1862 from lalr1.cc to it.
1863
1864 Instead of having three stacks (state, value, location), use a
1865 stack of triples. This considerably simplifies the code (and it
1866 will be easier not to require locations as currently does the C++
1867 parser), and also gives a 10% speedup according to
1868 etc/bench (probably mainly since memory allocation is done once
1869 instead of three times).
1870
1871 Another motivation is to make it easier to destruct properly
1872 semantic values: now that they are bound to their state (hence
1873 symbol type) it will be easier to call the appropriate destructor.
1874
1875 These changes should probably benefit the C parser too.
1876
1877 * data/lalr1.cc: Copy as...
1878 * data/lalr1-fusion.cc: this new file.
1879 (b4_rhs_value, b4_rhs_location): New definitions overriding those
1880 from c++.m4.
1881 (state_stack_type, semantic_stack_type, location_stack_type)
1882 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
1883 (data_type, stack_type, yystack_): New.
1884 (YYLLOC_DEFAULT, yypush_): Adjust.
1885 (yyerror_range): Now based on data_type, not location_type.
1886
1887 2008-11-03 Akim Demaille <demaille@gostai.com>
1888
1889 Push the state, value, and location at the same time.
1890 This is needed to prepare a forthcoming patch that fuses the three
1891 stacks into one.
1892
1893 * data/lalr1.cc (parser::yypush_): New.
1894 (parser::yynewstate): Change the semantics: instead of arriving to
1895 this label when value and location have been pushed, but yystate
1896 is to be pushed on the state stack, now the three of them must
1897 have been pushed before. yystate still must be the new state.
1898 This allows to use yypush_ everywhere instead of individual
1899 handling of the stacks.
1900
1901 2008-11-03 Akim Demaille <demaille@gostai.com>
1902
1903 Prefer references to pointers.
1904 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
1905 definition to use references instead of pointers.
1906 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
1907 Take the value and location as references.
1908 Adjust callers.
1909
1910 2008-11-03 Akim Demaille <demaille@gostai.com>
1911
1912 stack::size instead of stack::height.
1913 * data/lalr1.cc (stack::height): Rename as...
1914 (stack::size): this.
1915 Fix the output type.
1916 Comment changes.
1917
1918 2008-11-03 Akim Demaille <demaille@gostai.com>
1919
1920 Use variants to support objects as semantic values.
1921 This patch was inspired by work by Michiel De Wilde. But he used
1922 Boost variants which (i) requires Boost on the user side, (ii) is
1923 slow, and (iii) has useless overhead (the parser knows the type of
1924 the semantic value there is no reason to duplicate this
1925 information as Boost.Variants do).
1926
1927 This implementation reserves a buffer large enough to store the
1928 largest objects. yy::variant implements this buffer. It was
1929 implemented with Quentin Hocquet.
1930
1931 * src/output.c (type_names_output): New.
1932 (output_skeleton): Invoke it.
1933 * data/c++.m4 (b4_variant_if): New.
1934 (b4_symbol_value): If needed, provide a definition for variants.
1935 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
1936 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
1937 (b4_char_sizeof, yy::variant): New.
1938 (parser::parse): If variants are requested, define
1939 parser::union_type, parser::variant, change the definition of
1940 semantic_type, construct $$ before running the user action instead
1941 of performing a default $$ = $1.
1942 * examples/variant.yy: New.
1943 Based on an example by Michiel De Wilde.
1944
1945 2008-11-03 Akim Demaille <demaille@gostai.com>
1946
1947 Parameterize the extraction of semantic values.
1948 To make future changes easier, no longer rely on ".TYPE" being the
1949 way to get a semantic value.
1950
1951 * data/c.m4 (b4_symbol_value): New.
1952 Use it.
1953 * data/c++.m4, data/yacc.c: Use it.
1954 * data/glr.c: Use b4_symbol_value.
1955 (b4_rhs_data): New.
1956 Use it.
1957
1958 2008-11-03 Akim Demaille <demaille@gostai.com>
1959
1960 Prepare easier M4 changes.
1961 * data/lalr1.cc: Use escaped [] instead of literals to prepare
1962 future changes.
1963
1964 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1965
1966 Initiate further development.
1967 * NEWS: Create an empty section for new entries.
1968 * gnulib: Update submodule to HEAD.
1969
1970 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1971
1972 * NEWS: Version 2.4.
1973
1974 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1975
1976 Prepare for next release.
1977 * NEWS: Briefly mention changes since 2.3b.
1978 * README: Say GNU m4 1.4.6, which we've been requiring in release
1979 announcements already, not 1.4.3, which breaks the build.
1980
1981 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1982
1983 Say %language is experimental.
1984 We're thinking of extending it's effect on output file naming. See the
1985 thread at
1986 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
1987 * NEWS: Say it's experimental.
1988 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
1989 recommend it over %skeleton for now.
1990 (Bison Options): Likewise.
1991 (C++ Bison Interface): Use %skeleton not %language.
1992 (Calc++ Parser): Use %skeleton not %language.
1993 * src/getargs.c (usage): Say it's experimental.
1994
1995 2008-11-01 Di-an Jan <dianj@freeshell.org>
1996 Paolo Bonzini <bonzini@gnu.org>
1997
1998 Support all Java parser class modifiers.
1999 * data/java.m4 (b4_percent_define_get3): New.
2000 (b4_final_if, b4_strictfp_if): New.
2001 * data/lalr1.java (final, strictfp, extends, implements): Support.
2002 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2003 documentation.
2004 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2005 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2006 (AT_CHECK_JAVA_GREP): New.
2007 (Java parser class modifiers): New test.
2008 (Java parser class extends and implements): New test.
2009
2010 Model exception propagation better with throws and lex_throws.
2011 * data/java.m4 (b4_list2): New.
2012 (throws): Change default.
2013 * data/lalr1.java (yyaction): Add throws.
2014 (parse): Add lex_throws in addition to throws.
2015 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2016 * tests/java.at (Java throws specifications): New test.
2017
2018 Improve documentation for Java parsers.
2019 * doc/bison.texinfo (Java Parsers): Add subsections.
2020 Don't quote first argument of %define.
2021 (Java Bison Interface): Document output files. Move documentation
2022 of parser class and merge into Java Parser Interface. Document
2023 features that error out. Document directives with no effect.
2024 Move note about Javadoc higher.
2025 (Java Semantic Values): Explicitly mention stype.
2026 Document that generic types cannot be used.
2027 (Java Location Values): Use @deftypeivar. Document constructors.
2028 Correct return value for toString.
2029 (Java Parser Interface): List undocumented constants/fields.
2030 Move documentation of fields added by %parse-param closer to list
2031 of members. Document that token names are added as fields.
2032 Document constructors accurately. Remove error method.
2033 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2034 Interface. Describe %code lexer and yylex accutately.
2035 Remove documentation that does not match the code.
2036 (Java Action Features): New.
2037 (Java Differences): Add reference. Add item on semantic values.
2038 Add note about @{ ... @}. Clarify %% epilogue placement.
2039 (Java Declarations Summary): New.
2040
2041 Fix Java skeleton.
2042 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2043 (b4_remove_comma): Quote test argument.
2044 (b4_identification): Remove "bison" field.
2045 * tests/java.at (Java parser class and package names): New test.
2046 (Java %parse-param and %lex-param): New test.
2047 (Java stype, position_class and location_class): New test.
2048
2049 2008-10-31 Di-an Jan <dianj@freeshell.org>
2050
2051 * data/lalr1.jave: Update copyright years.
2052 (YYParser): Correct name of "generated from" file in Javadoc:
2053 use b4_file_name instead of @ofile@.
2054 (Location constructor): Correct Javadoc parameter name.
2055 (yylloc): Add missing opening m4 quote after b4_location_if.
2056 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2057 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2058 (YYParser constructor): Correct Javadoc parameter name.
2059
2060 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2061
2062 Always put auxiliary code files in the same dir as other output files.
2063 * src/files.c (compute_file_name_parts): When the user specifies
2064 --output but not --file-prefix, extract the directory prefix from the
2065 file prefix not from the grammar file name. This affects the location
2066 of files like location.hh generated by the C++ skeleton. The includes
2067 in the other output files require this fix.
2068 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2069 for expected output files.
2070 (Output files): Add a test for the above.
2071
2072 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2073
2074 * gnulib: Update submodule to HEAD.
2075
2076 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2077
2078 Update copyright year.
2079 * src/files.c: Here.
2080
2081 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2082
2083 Don't overwrite the input file.
2084 * src/files.c (output_file_name_check): Fatal error if using input file
2085 for output.
2086 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2087 argument.
2088 (Conflicting output files): Add test.
2089
2090 2008-10-28 Akim Demaille <demaille@gostai.com>
2091
2092 Space changes.
2093 * data/lalr1.cc: Formatting changes.
2094
2095 2008-10-28 Akim Demaille <demaille@gostai.com>
2096
2097 Don't define debugging functions when !YYDEBUG.
2098 * data/lalr1.cc (debug_stream, set_debug_stream)
2099 (debug_level_type, debug_level, set_debug_level): Don't
2100 declare them when YYDEBUG is not defined.
2101 The implementation are already YYDEBUG-aware.
2102
2103 2008-10-28 Akim Demaille <demaille@gostai.com>
2104
2105 Prefer "continue" for empty loop bodies.
2106 * etc/bench.pl.in: Use "continue" instead of {}.
2107
2108 2008-10-28 Akim Demaille <demaille@gostai.com>
2109
2110 Space and comments changes.
2111 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2112 * data/c.m4, data/lalr1.cc: Space changes.
2113
2114 2008-10-28 Akim Demaille <demaille@gostai.com>
2115
2116 Make gnulib a submodule.
2117 * gnulib: New.
2118 * .gitmodules (gnulib): New.
2119
2120 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2121
2122 Fix yyerror_range for user-defined location type in C++. Reported by
2123 Georg Sauthoff at
2124 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2125 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2126 * THANKS (Georg Sauthoff): Add.
2127
2128 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2129
2130 Update several administrative files mainly to facilitate releasing.
2131 * HACKING (Administrivia): Make the git-merge-changelog notes more
2132 helpful.
2133 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2134 (Release Procedure): Update for git and add numerous details that were
2135 previously missing.
2136 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2137 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2138 that announcements don't claim we bootstrapped with whatever bison
2139 happened to be in PATH. Add flex as a bootstrap tool.
2140 * Makefile.maint: Remove, previously replaced by maint.mk.
2141 * Makefile.cfg: Remove, and migrate settings to...
2142 * cfg.mk: ... here for the sake of `make announcement'.
2143 * bootstrap.conf (gnulib_modules): Add announce-gen.
2144 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2145 Berry.
2146
2147 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2148
2149 Small but important bugfixes for the Java skeleton.
2150 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2151 (yy_symbol_print): Call toString on yyvaluep.
2152
2153 2008-08-29 Akim Demaille <demaille@gostai.com>
2154
2155 Clarify UPDATED use.
2156 * doc/bison.texinfo: It refers to the last edition of this file,
2157 not to the release date of Bison.
2158 Reported by Joel E. Denny.
2159
2160 2008-08-29 Akim Demaille <demaille@gostai.com>
2161
2162 * README: Update FAQ pointer.
2163 Reported by Joel E. Denny.
2164
2165 2008-08-27 Eric Blake <ebb9@byu.net>
2166
2167 Resync m4sugar from autoconf.
2168 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2169 (m4_init): Adjust to latest m4.git changes.
2170 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2171 effects.
2172 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2173 (_m4_list_cmp): Reduce side effects.
2174
2175 2008-08-27 Akim Demaille <demaille@gostai.com>
2176
2177 Check yyerrok in calc.at.
2178 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2179 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2180 expected.
2181
2182 2008-08-27 Akim Demaille <demaille@gostai.com>
2183
2184 Support yyerrok in lalr1.cc.
2185 YYBACKUP is still to import back into lalr1.cc.
2186 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
2187
2188 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2189
2190 For maintainer-check*, don't recompile for a $(VERSION) update.
2191 * cfg.mk: New file.
2192 (_is-dist-target): Override the one in GNUmakefile.
2193 * Makefile.am (EXTRA_DIST): Add cfg.mk.
2194
2195 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2196
2197 Update for recent change to gnulib.
2198 * src/parse-gram.y: Don't include strverscmp.h. It comes from
2199 string.h now.
2200
2201 2008-08-15 Eric Blake <ebb9@byu.net>
2202
2203 Remaining m4sugar merge from autoconf.
2204 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2205 * data/m4sugar/foreach.m4: New file, copied from autoconf.
2206 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2207 * src/output.c (output_skeleton): Tell m4 how to find it.
2208
2209 Partial m4sugar merge from autoconf: m4_map.
2210 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2211 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2212 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2213 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2214 for empty list.
2215 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2216 Likewise.
2217 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2218 declares it.
2219
2220 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2221
2222 Keep .version and PACKAGE_VERSION in sync.
2223 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2224 dependency, and add comments justifying this in more detail. Discussed
2225 starting at
2226 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2227
2228 2008-08-06 Eric Blake <ebb9@byu.net>
2229
2230 Partial m4sugar merge from autoconf: m4_shiftn.
2231 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2232 (m4_shift2, m4_shift3): New macros.
2233 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2234 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2235 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2236 * data/java.m4 (b4_remove_comma): Likewise.
2237
2238 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2239 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2240 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2241 (m4_init): Consolidate wrapped text into single m4_wrap.
2242 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2243 in wrapped text.
2244
2245 2008-08-05 Eric Blake <ebb9@byu.net>
2246
2247 Partial m4sugar merge from autoconf: builtins, version.m4.
2248 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2249 (m4_prepend): Remove, as it is unused and inherently quadratic,
2250 whereas m4_append is linear in newer m4.
2251 (m4_mkstemp): New builtin.
2252 (m4_symbols): Make rename conditional.
2253 (m4_version_prereq): Ensure fatal error if used in bison, which
2254 intentionally lacks version.m4.
2255
2256 Fix comments in m4sugar.
2257 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2258
2259 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2260
2261 Update for recent .gitignore fix in Gnulib.
2262 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2263 anchored .gitignore entries.
2264
2265 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2266
2267 Set gnu or gnits strictness.
2268 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2269 development and gnits strictness for releases. Based on Eric Blake's
2270 suggestion at
2271 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2272
2273 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2274
2275 * NEWS: Clarify documentation of %language.
2276
2277 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2278
2279 Support usage of git-merge-changelog.
2280 * .gitattributes: New.
2281 * HACKING: Document usage of git-merge-changelog.
2282 * bootstrap: Install git-merge-changelog entries in .git/config
2283 if appropriate.
2284
2285 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2286
2287 Remove remaining dependence on CVS Id keyword.
2288 * ChangeLog: For the sake of people still using CVS, don't use dollars
2289 when mentioning Id.
2290 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2291 unusual anyway.
2292 * data/xslt/xml2dot.xsl: Likewise.
2293 * data/xslt/xml2text.xsl: Likewise.
2294 * data/xslt/xml2xhtml.xsl: Likewise.
2295 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2296 * doc/Makefile.am (neutralize): Remove, no longer needed.
2297 (.x.1): Don't use neutralize.
2298 (edit): Don't substitute for ID.
2299 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2300
2301 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2302
2303 Fix dependence on computed configure variables.
2304 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2305 $(top_srcdir)/configure.ac so that changes to computed variables, such
2306 as PACKAGE_VERSION, are seen.
2307 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2308
2309 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2310
2311 Update copyright dates for recent changes.
2312 * Makefile.am: Here.
2313 * src/Makefile.am: Here.
2314 * src/reduce.c: Here.
2315 * tests/reduce.at: Here.
2316
2317 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2318
2319 Use git-version-gen for version names between releases.
2320 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2321 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2322 * .prev-version: New.
2323 * .version.in: Remove.
2324 * ChangeLog: Remove the Id previously used for capturing the CVS
2325 revision.
2326 * GNUmakefile: Remove, now copied from Gnulib.
2327 * Makefile.am: Add code suggested by comments in
2328 build-aux/git-version-gen.
2329 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2330 .prev-version, and .version.
2331 * NEWS (2.3b+): Rename to...
2332 (?.?): ... this because we're dropping the "+" version naming scheme,
2333 but, in general, we still can't be sure of our next release name.
2334 * bootstrap: Add a quick hack to remove from .gitignore the
2335 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2336 entry. This should really be fixed in gnulib instead.
2337 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2338 * configure.ac (AC_INIT): Set version name by invoking
2339 build-aux/git-version-gen.
2340 (AC_CONFIG_FILES): Remove .version, now generated by
2341 build-aux/git-version-gen.
2342 * maint.mk: New, copied from coreutils.
2343 * doc/.cvsignore (bison.1): Add.
2344 * doc/.gitignore (/bison.1): Add.
2345 * doc/bison.1: Remove, generated.
2346 * src/.cvsignore (revision.c): Remove.
2347 * src/.gitignore (/revision.c): Remove.
2348 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2349 (BUILT_SOURCES): Remove revision.c.
2350 (revision.c): Remove.
2351 * src/getargs.c (version): Don't print revision after the VERSION.
2352 * src/revision.h: Remove.
2353
2354 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2355
2356 Fix untranslatable composition of sentences. Reported by Goran
2357 Uddeborg at
2358 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2359 * THANKS (Goran Uddeborg): Add.
2360 * src/reduce.c (reduce_print): Report the number of nonterminals and
2361 rules useless in the grammar in separate sentences.
2362 * tests/reduce.at (Useless Rules): Update output.
2363 (Reduced Automaton): Likewise.
2364 (Underivable Rules): Likewise.
2365 (Empty Language): Likewise.
2366
2367 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2368
2369 Fix some .gitignore and .cvsignore problems.
2370 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2371 (insert_vc_ignore): ... this new function, which prepends `/' to all
2372 .gitignore entries before passing them to insert_sorted_if_absent.
2373 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2374 .cvsignore files are maintained even though Bison developers run
2375 bootstrap while using Git.
2376 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2377 unneeded by Bison.
2378 (gnulib): Add.
2379 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2380 unneeded. Reported by Eric Blake.
2381 * lib/.gitignore (/*~): Add.
2382 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2383 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2384 Blake.
2385 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2386
2387 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2388
2389 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2390 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2391 * bootstrap.conf (gnulib_modules): Add unsetenv.
2392 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2393 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2394 (/setenv.m4): Add.
2395 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2396 the first argument because it may become position-dependent, and unset
2397 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2398 Add comments explaining these issues in more detail.
2399
2400 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2401
2402 Add .gitignore everywhere based on .cvsignore.
2403 * .gitignore: New.
2404 * build-aux/.gitignore: New.
2405 * data/.gitignore: New.
2406 * doc/.gitignore: New.
2407 * etc/.gitignore: New.
2408 * examples/.gitignore: New.
2409 * examples/calc++/.gitignore: New.
2410 * lib/.gitignore: New.
2411 * m4/.gitignore: New.
2412 * po/.gitignore: New.
2413 * runtime-po/.gitignore: New.
2414 * src/.gitignore: New.
2415 * tests/.gitignore: New.
2416
2417 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2418
2419 * NEWS (2.3b+): New section, empty for now.
2420 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2421
2422 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2423
2424 * NEWS (2.3b): Update release date since there has been a delay in
2425 getting the announcements and tarballs out.
2426
2427 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2428
2429 * NEWS: Version 2.3b.
2430 * configure.ac (AC_INIT): Likewise.
2431 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2432
2433 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2434
2435 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2436 been doing it for years.
2437 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2438 (Release Procedure): Add FIXME about make alpha being unmaintained.
2439
2440 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2441
2442 * data/yacc.c: Reformat m4 a little for readability.
2443 * src/lalr.c (build_relations): Correct comment.
2444
2445 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2446
2447 DJGPP specific issue.
2448 * djgpp/config.sed: Fixes required to run configure scripts generated
2449 by autoconf 2.62.
2450
2451 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2452
2453 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2454 coordinator@translationproject.org.
2455
2456 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2457
2458 * THANKS: Add Eric Blake.
2459
2460 2008-04-23 Eric Blake <ebb9@byu.net>
2461
2462 Revert prior patch, by working around autoconf regression.
2463 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2464 ("Output file name: ("): Uncomment test.
2465 ("Output file name: )"): Likewise.
2466 Based on an idea from Noah Misch.
2467
2468 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2469
2470 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2471 2.61. Reported by Juan Manuel Guerrero at
2472 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2473 * tests/output.at ("Output file name: ("): Comment out test case for
2474 now.
2475 ("Output file name: )"): Likewise.
2476
2477 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2478
2479 * GNUmakefile: Update git-version-gen invocation so make dist
2480 succeeds.
2481
2482 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2483
2484 Update to the current gnulib CVS repository, and fix trigraph handling
2485 in Bison.
2486 * bootstrap: Update gnulib CVS repository URL.
2487 (symlink_to_dir): Encapsulate the code that guarantees the destination
2488 directory exists into...
2489 (check_dst_dir): ... this new function, and...
2490 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2491 fail when copying files into lib/uniwidth/.
2492 * src/output.c (prepare_symbols): When writing yytname muscles, where
2493 symbol names will be encoded in C-string literals, tell quotearg to
2494 escape trigraphs. This used to be the default in gnulib.
2495 * tests/regression.at (Token definitions): Because of the change in
2496 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2497 escapes trigraphs in symbol names. Thus, yytname no longer has
2498 trigraphs unnecessarily doubly escaped. Update test case output.
2499 Extend test case to be sure Bison's own error messages will no longer
2500 have trigraphs in symbol names unnecessarily escaped once.
2501
2502 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2503
2504 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2505 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2506 * .cvsignore: Add .version.
2507 * .version.in: New.
2508 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2509 * configure.ac (AC_CONFIG_FILES): Add .version.
2510 * build-aux/.cvsignore: Add git-version-gen.
2511
2512 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2513
2514 * NEWS (2.3a+): Mention that -g now takes an argument.
2515 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2516 consistency. Update the -g and -x entries now that they take
2517 arguments. Use brackets to indicate optional arguments.
2518 * src/getargs.c (usage): Explain the relationship between arguments of
2519 long and short options more completely. Document --defines and -d
2520 separately since the former takes an argument but, for POSIX Yacc, the
2521 latter does not.
2522 (short_options): Let -W take an optional argument like --warnings.
2523 (getargs): Sort cases.
2524
2525 2008-02-28 Akim Demaille <demaille@gostai.com>
2526
2527 * doc/bison.texinfo: Fix a few typos.
2528
2529 2008-02-28 Akim Demaille <akim@epita.fr>
2530
2531 * doc/bison.texinfo (Bison Options): Document -W.
2532 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2533
2534 2008-02-28 Akim Demaille <akim@epita.fr>
2535
2536 * src/getargs.c (short_options): Split and sort for readability.
2537 -g and -x take optional arguments, just like their long options.
2538 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2539 understand.
2540 Fix the handling of $opt which resulted in all the argument to be
2541 considered as optional.
2542
2543 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2544
2545 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2546 say its interface is experimental.
2547 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2548 Java.
2549 (Bison Options): In the -L and --language entry, mention Java.
2550 (Java Bison Interface): Say the interface is experimental.
2551 * src/getargs.c (usage): Mention -L and --language.
2552
2553 * NEWS (2.3a+): Say the push parsing interface is experimental.
2554 * doc/bison.texinfo (Push Decl): Likewise.
2555 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2556 (Push Parser Function): Likewise.
2557 (Pull Parser Function): Likewise.
2558 (Parser Create Function): Likewise.
2559 (Parser Delete Function): Likewise.
2560 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2561 yypull_parse, and yypush_parse entries.
2562
2563 * NEWS (2.3a+): Mention XML support, and say the schema is
2564 experimental.
2565 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2566 * src/getargs.c (usage): Say the XML schema is experimental.
2567
2568 * NEWS (2.3a+): Say option instead of flag.
2569
2570 2008-02-21 Wojciech Polak <polak@gnu.org>
2571
2572 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2573 text.
2574
2575 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
2576
2577 Fix impure push parser compile error reported by Bob Rossi at
2578 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
2579 * data/yacc.c: Clean up whitespace in the output a little.
2580 (yypstate_allocated): Define for impure push parsers regardless of
2581 whether the pull interface is also requested.
2582 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
2583 check impure push parsers without the pull interface.
2584
2585 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
2586 yyerror takes arguments specified by %parse-param while yypstate_new
2587 does not.
2588 * doc/bison.texinfo (Parser Create Function): Document that
2589 yypstate_new returns 0 for multiple impure parser instances.
2590 * tests/push.at (Push Parsing: Multiple impure instances): Update
2591 expected stderr output.
2592
2593 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2594
2595 * runtime-po/POTFILES.in (push.c): Remove.
2596
2597 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2598
2599 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
2600 * data/push.c: Rename to...
2601 * data/yacc.c: ... this, overwriting it.
2602 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
2603 `%push-pull-parser' -> `%define api.push_pull "both"'.
2604 Remove old yacc.c tests, and update push.c tests to yacc.c.
2605
2606 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2607
2608 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
2609 `"%code top" blocks' instead of `%code "top" blocks'.
2610 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
2611 Clean up whitespace in the output a little.
2612
2613 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2614
2615 Fix documentation problems reported by Tim Josling at
2616 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
2617 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
2618 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
2619 integers. Explain the effect of literal string aliases on error
2620 messages. Copy token 0 documentation from the C++ skeleton
2621 documentation.
2622
2623 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2624
2625 Accept a token number in a %left, %right, or %nonassoc for POSIX
2626 conformance. Reported by Tim Josling at
2627 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
2628 * NEWS (2.3a+): Mention.
2629 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
2630 and code numbers are treated by precedence declarations.
2631 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
2632 of symbols.1.
2633 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
2634 of symbol.
2635 (symbol.prec): New, just like symbol but allows INT.
2636 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
2637 longer holds.
2638 * tests/regression.at (Token number in precedence declaration): New
2639 test case.
2640
2641 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2642
2643 DJGPP specific issues.
2644 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
2645 be changed. Copyright timestamp adjusted.
2646 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
2647 be changed. Copyright timestamp adjusted.
2648 * djgpp/config.site: Copyright timestamp adjusted.
2649 * djgpp/config_h.sed: Copyright timestamp adjusted.
2650 * djgpp/djunpack.bat: Copyright timestamp adjusted.
2651 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
2652 filename translation list.
2653 * djgpp/subpipe.c (init_subpipe): Check the environment variables
2654 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
2655 files shall be created. Before trying to use the temp dir where the
2656 environment variable points to check that the dir really exists. If
2657 not default to the cwd as temp dir. Copyright timestamp adjusted.
2658 * djgpp/subpipe.h: Copyright timestamp adjusted.
2659 * djgpp/testsuite.sed: Copyright timestamp adjusted.
2660
2661 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
2662
2663 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
2664
2665 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
2666
2667 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
2668 Problem reported by Claudio Saavedra in
2669 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
2670
2671 2008-01-05 Wojciech Polak <polak@gnu.org>
2672
2673 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
2674 document's title with the input grammar file name.
2675
2676 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
2677
2678 Automate regression testing of the XML/XSLT implementation. Discussed
2679 starting at
2680 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
2681 * configure.ac (XSLTPROC): New substitution.
2682 * Makefile.am (maintainer-xml-check): New phony target invoking...
2683 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
2684 invoking make maintainer-check with BISON_TEST_XML=1.
2685 * tests/atlocal.in (XSLTPROC): New.
2686 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
2687 not to report reachable memory when Bison is expected to have a
2688 non-zero exit status and (2) to compare XML/XSLT output with --graph
2689 and --report=all output for every working grammar when
2690 BISON_TEST_XML=1.
2691 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
2692 (AT_BISON_CHECK_XML): New.
2693 (AT_QUELL_VALGRIND): New.
2694 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
2695 (AT_CHECK): ... don't redefine this since this was the old way to
2696 quell Valgrind.
2697 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
2698 AT_BISON_CHECK invocations.
2699 * tests/c++.at: Likewise.
2700 * tests/calc.at: Likewise.
2701 * tests/conflicts.at: Likewise.
2702 * tests/cxx-type.at: Likewise.
2703 * tests/existing.at: Likewise.
2704 * tests/glr-regression.at: Likewise.
2705 * tests/headers.at: Likewise.
2706 * tests/input.at: Likewise.
2707 * tests/java.at: Likewise.
2708 * tests/output.at: Likewise.
2709 * tests/push.at: Likewise.
2710 * tests/reduce.at: Likewise.
2711 * tests/regression.at: Likewise.
2712 * tests/sets.at: Likewise.
2713 * tests/skeletons.at: Likewise.
2714 * tests/synclines.at: Likewise.
2715 * tests/torture.at: Likewise.
2716 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
2717 tends to hang xsltproc.
2718 (Big horizontal): Likewise.
2719
2720 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2721
2722 In XML output, remove redundant class attribute on symbol element.
2723 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
2724 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
2725 look up a symbol to determine whether it's a nonterminal or terminal.
2726 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
2727 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
2728
2729 Add prec/assoc information to XML output.
2730 * src/gram.c (grammar_rules_print_xml): For each rule that has a
2731 %prec, add a percent_prec attribute.
2732 * src/print-xml.c (print_grammar): For each terminal that has a
2733 precedence or associativity, add a prec or assoc attribute.
2734 (xml_indent): New.
2735 (xml_puts): Use xml_indent.
2736 (xml_printf): Use xml_indent.
2737 * src/print-xml.h (xml_indent): Prototype.
2738
2739 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
2740 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2741
2742 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2743
2744 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
2745 (bison:ruleByNumber): ... this for clarity.
2746 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
2747 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
2748 (xsl:template match="reduction"): Update.
2749 (xsl:template match="item"): Update.
2750 (xsl:template match="reduction"): Update.
2751
2752 In the XML output, don't print the list of rules where symbols appear.
2753 Compute it in XSLT instead. Discussed at
2754 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
2755 * data/xslt/bison.xsl (bison:ruleByLhs): New.
2756 (bison:ruleByRhs): New.
2757 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
2758 bison:ruleByRhs.
2759 (xsl:template match="terminal/rule"): Remove.
2760 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2761 bison:ruleByRhs.
2762 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2763 Remove.
2764 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
2765 bison:ruleByRhs and mode="number-link" for rule template.
2766 (xsl:template match="terminal/rule"): Remove.
2767 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2768 bison:ruleByRhs and mode="number-link" for rule template.
2769 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2770 Rewrite as...
2771 (xsl:template match="rule" mode="number-link"): ... this.
2772 * src/print-xml.c (print_grammar): Don't print the list of rules.
2773
2774 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2775
2776 Don't let --report affect XML output; always print all information.
2777 Discussed at
2778 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
2779 * src/conflicts.c (log_resolution): Implement.
2780 * src/print-xml.c (print_core): Implement.
2781 (print_state): Implement.
2782 (print_xml): Implement.
2783
2784 * NEWS (2.3a+): Fix quotes.
2785 * src/parse-gram.y (prologue_declaration): For consistency with -v,
2786 don't let %verbose clear the list specified by --report.
2787
2788 2007-11-26 Akim Demaille <akim@epita.fr>
2789
2790 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
2791
2792 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
2793
2794 In the XML output, list useless and unused symbols and rules with the
2795 useful ones and add a "usefulness" attribute. Discussed starting at
2796 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
2797 * src/gram.c (grammar_rules_partial_print_xml): Remove.
2798 (grammar_rules_print_xml): Print all rules instead of just those
2799 useful in the grammar, and add a "usefulness" attribute.
2800 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
2801 * src/print-xml.c (print_rules_useless_in_parser): Remove.
2802 (print_grammar): Print all nonterminals instead of just useful ones,
2803 and add a "usefulness" attribute to nonterminals and terminals.
2804 (print_xml): Don't print a separate "reductions" or
2805 "rules-useless-in-parser" element.
2806 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
2807 (reduce_xml): Remove.
2808 (reduce_token_unused_in_grammar): New.
2809 (reduce_nonterminal_useless_in_grammar): New.
2810 * src/reduce.h (reduce_xml): Remove prototype.
2811 (reduce_token_unused_in_grammar): Add prototype.
2812 (reduce_nonterminal_useless_in_grammar): Add prototype.
2813 * data/xslt/xml2text.xsl: Update for XML changes.
2814 * data/xslt/xml2xhtml.xsl: Update for XML changes.
2815 * tests/reduce.at (Useless Terminals): Update output.
2816 (Useless Rules): Update output.
2817 (Reduced Automaton): Update output.
2818
2819 Say "Terminals unused in grammar" instead of "Unused terminals".
2820 * NEWS (2.3a+): Update.
2821 * doc/bison.texinfo (Understanding): Update example output.
2822 * src/reduce.c (reduce_output): Implement.
2823 * data/xslt/xml2text.xsl: Implement.
2824 * data/xslt/xml2xhtml.xsl: Implement.
2825
2826 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2827
2828 Accept --report-file=FILE to override the default `.output' filename.
2829 * NEWS (2.3a+): Mention.
2830 * doc/bison.texinfo (Bison Options): Add an entry.
2831 * src/files.c (compute_output_file_names): Don't override
2832 spec_verbose_file if already set.
2833 * src/getargs.c (usage): Document --report-file.
2834 (REPORT_FILE_OPTION): New anonymous enum member.
2835 (long_options): Add entry for it.
2836 (getargs): Add case for it setting spec_verbose_file.
2837
2838 * build-aux/cross-options.pl: Don't record a short option just because
2839 there's an arg.
2840 * doc/.cvsignore: Add yacc.1.
2841
2842 2007-11-14 Akim Demaille <akim@epita.fr>
2843
2844 * doc/yacc.1.in: New.
2845 * configure.ac, doc/Makefile.am: Adjust.
2846 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
2847 config.h symbol.
2848 Use AC_SUBST for assignments too.
2849 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
2850
2851 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2852
2853 * src/gram.c: Remove comments that duplicate comments in gram.h.
2854
2855 When reporting useless rules and nonterminals, say "useless in grammar"
2856 instead of "useless", and say "useless in parser" instead of "never
2857 reduced". Discussed starting at
2858 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
2859 * NEWS (2.3a+): Mention this change.
2860 * data/xslt/xml2text.xsl: Update output text and expected input XML
2861 element names to match changes below.
2862 * data/xslt/xml2xhtml.xsl: Likewise.
2863 (xsl:template match="bison-xml-report"): Add missing entry in Table of
2864 Contents: "Rules useless in parser due to conflicts".
2865 * doc/bison.texinfo (Decl Summary): Reword a little.
2866 (Understanding): Update example output for changes below.
2867 * src/gram.c: (rule_useful_p): Rename to...
2868 (rule_useful_in_grammar_p): ... this.
2869 (rule_useless_p): Rename to...
2870 (rule_useless_in_grammar_p): ... this.
2871 (rule_never_reduced_p): Rename to...
2872 (rule_useless_in_parser_p): ... this.
2873 (grammar_rules_print): Update for renames.
2874 (grammar_rules_print_xml): Update for renames.
2875 (grammar_rules_never_reduced_report): Rename to...
2876 (grammar_rules_useless_report): ... this since it is used for either
2877 kind of useless rule.
2878 * src/gram.h: Reword comments and update function names in prototypes.
2879 * src/main.c (main): Say "rule useless in parser due to conflicts".
2880 * src/print-xml.c (print_rules_never_reduced): Rename to...
2881 (print_rules_useless_in_parser): ... this, and rename output XML
2882 element "rules-never-reduced" to "rules-useless-in-parser".
2883 (print_xml): Update for rename.
2884 * src/print.c (print_results): Say "Rules useless in parser due to
2885 conflicts".
2886 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
2887 (nonterminals_reduce): Say "nonterminal useless in grammar".
2888 (reduce_output): Say "Nonterminals useless in grammar".
2889 Say "Rules useless in grammar".
2890 (reduce_xml): Rename output XML element "useless" to
2891 "useless-in-grammar".
2892 (reduce_print): Don't report the count of grammatically useless rules
2893 as "rules never reduced" just because %yacc is specified.
2894 In the correct report of this count, say nonterminal(s) and rule(s)
2895 "useless in grammar".
2896 * tests/conflicts.at (S/R in initial): Update expected output.
2897 (Defaulted Conflicted Reduction): Likewise.
2898 (Unreachable States After Conflict Resolution): Likewise.
2899 * tests/existing.at (GNU pic Grammar): Likewise.
2900 * tests/reduce.at (Useless Nonterminals): Likewise.
2901 (Useless Rules): Likewise.
2902 (Reduced Automaton): Likewise.
2903 (Underivable Rules): Likewise.
2904 (Empty Language): Likewise.
2905
2906 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2907
2908 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
2909 here document and before the EOF so that BSD's implementation of Bourne
2910 shell doesn't parse the delimiter as part of the here document.
2911 * doc/.cvsignore: Add cross-options.texi.
2912 * src/getargs.c (usage): Add a blank line after the warning categories.
2913
2914 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
2915
2916 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
2917
2918 2007-11-05 Akim Demaille <akim@epita.fr>
2919
2920 Remove Id: from bison.1.
2921 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
2922 (perl -0777 -pi -e 's/\.PP\nId): New.
2923 (.x.1): Use it to ignore the version control revision.
2924
2925 2007-11-05 Akim Demaille <demaille@gostai.com>
2926
2927 * build-aux/Makefile.am: Ship cross-options.pl.
2928 * doc/Makefile.am: Always refer to cross-options.texi with
2929 $(srcdir).
2930 (MAINTAINERCLEANFILES): Add it.
2931
2932 2007-11-04 Akim Demaille <demaille@gostai.com>
2933
2934 Generate the long/short option cross-table.
2935 * build-aux/cross-options.pl: New.
2936 * doc/Makefile.am (cross-options.texi): New.
2937 * doc/bison.texinfo: Use it.
2938
2939 2007-11-04 Akim Demaille <demaille@gostai.com>
2940
2941 Generate bison.1 using help2man.
2942 * doc/common.x, doc/bison.x: New.
2943 * doc/Makefile.am (bison.1, .x.1): New.
2944 The code is taken from autoconf-2.61/man/Makefile.am.
2945 * configure.ac: Look for help2man.
2946
2947 2007-11-04 Akim Demaille <demaille@gostai.com>
2948
2949 Complete --help.
2950 * src/getargs.c (usage): Document -W, make it clear that -d,
2951 -g and -x have optional arguments.
2952
2953 2007-11-04 Akim Demaille <demaille@gostai.com>
2954
2955 Find sha1sum when named gsha1sum.
2956 * bootstrap (find_tool): New.
2957 ($SHA1SUM): New.
2958
2959 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2960
2961 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
2962 at
2963 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
2964 * NEWS (2.3a+): Mention.
2965 * data/bison.m4 (b4_pure_if): Don't define it here.
2966 * data/c.m4 (b4_identification): Depend on individual skeletons to
2967 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
2968 values of the %define variables api.pure or api.push_pull. Define
2969 YYPURE, YYPUSH, and YYPULL accordingly.
2970 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
2971 glr.cc has already defined b4_pure_flag.
2972 * data/push.c: Define b4_pure_if based on `%define api.pure'.
2973 Remove YYPUSH and YYPULL since they're back in b4_identification again.
2974 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
2975 * doc/bison.texinfo (Pure Decl): Update.
2976 (Push Decl): Update.
2977 (Decl Summary): Add api.pure to %define entry.
2978 In %pure-parser entry, say it's deprecated and reference %define.
2979 (Pure Calling): Update.
2980 (Error Reporting): Update.
2981 (C++ Scanner Interface): Update.
2982 (How Can I Reset the Parser): Update.
2983 (Table of Symbols): In %pure-parser entry, say it's deprecated and
2984 reference %define.
2985 * src/getargs.c (pure_parser): Remove global variable.
2986 * src/getargs.h (pure_parser): Remove extern.
2987 * src/output.c (prepare): Don't define pure_flag muscle.
2988 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
2989 wrapper around `%define api.pure'.
2990 * tests/calc.at (Simple LALR Calculator): Update.
2991 (Simple GLR Calculator): Update.
2992 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
2993 Update.
2994 (GLR: Resolve ambiguity, pure, locations): Update.
2995 (GLR: Merge conflicting parses, pure, no locations): Update.
2996 (GLR: Merge conflicting parses, pure, locations): Update.
2997 * tests/glr-regression.at (Uninitialized location when reporting
2998 ambiguity): Update
2999 * tests/input.at (Unused %define api.pure): New test case.
3000 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3001 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3002 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3003
3004 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3005
3006 %define push_pull -> %define api.push_pull. Discussed starting at
3007 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3008 * data/push.c: Expect the new name.
3009 * data/yacc.c: Likewise.
3010 * doc/bison.texinfo (Push Decl): Update.
3011 (Decl Summary): Update %define entry.
3012 (Push Parser Function): Update.
3013 (Pull Parser Function): Update.
3014 (Parser Create Function): Update.
3015 (Parser Delete Function): Update.
3016 * tests/calc.at (Simple LALR Calculator): Update.
3017 * tests/input.at (%define enum variables): Update.
3018 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3019 (Push Parsing: Multiple impure instances): Update.
3020 (Push Parsing: Unsupported Skeletons): Update.
3021 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3022 (Exploding the Stack Size with Malloc): Update.
3023
3024 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3025 other entries some.
3026
3027 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3028
3029 For the XML output's terminal element, rename @number to @token-number,
3030 and add @symbol-number. In the nonterminal element, rename @number to
3031 @symbol-number. Discussed starting at
3032 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3033 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3034 renames.
3035 (xsl:template match="nonterminal"): Likewise.
3036 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3037 (xsl:template match="nonterminal"): Likewise.
3038 * src/print-xml.c (print_grammar): Implement.
3039
3040 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3041
3042 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3043 2007-10-11 change, the child elements here are items not rules.
3044 (xsl:template match="item"): New.
3045 (xsl:template match="rule"): Update for new reduced itemset.
3046 (xsl:template match="point"): Remove.
3047 (xsl:template match="empty"): For consistency with --graph, don't
3048 output "/* empty */".
3049 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3050 line-wrap, don't pass a negative value as first-line-length since this
3051 won't work with the following changes.
3052 (xsl:template name="line-wrap"): Simplify slightly.
3053 (xsl:template name="ws-search"): Eliminate recursion.
3054 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3055 set next to an item whose dot is not at the end of the RHS even if it
3056 happens to be associated with the same rule.
3057
3058 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3059
3060 Add %define lr.keep_unreachable_states.
3061 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3062 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3063 * src/main.c (main): Implement it.
3064 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3065 Extend to test it, and fix a typo.
3066
3067 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3068
3069 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
3070 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3071 the example .output text.
3072 * tests/regression.at (Extra lookahead sets in report): Improve wording
3073 of comments.
3074
3075 2007-10-17 Wojciech Polak <polak@gnu.org>
3076
3077 * src/print-xml.c (print_grammar): Renamed
3078 <terminal> and <nonterminal> attributes:
3079 "type" to "number" and "symbol" to "name".
3080 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3081 Use new attribute names.
3082 (xsl:template match="nonterminal"): Likewise.
3083 * data/xslt/xml2xhtml.xsl: Likewise.
3084
3085 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3086
3087 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3088 (Option Cross Key): Likewise.
3089
3090 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3091 next to an item whose dot is not at the end of the RHS even if it
3092 happens to be associated with the same rule.
3093 * src/print.c (print_core): Likewise.
3094 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3095 (Resolved SR Conflicts): Update output.
3096 * tests/regression.at (Extra lookahead sets in report): New test case.
3097
3098 2007-10-11 Wojciech Polak <polak@gnu.org>
3099
3100 * src/print-xml.c (print_core): Remove item set
3101 redundancy.
3102 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3103 Improve processing time. Suggested by Joel E. Denny.
3104 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3105 Write xsl:param "required" attribute as comment.
3106 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3107 (xsl:template match="rule"): Support new reduced itemset.
3108 (xsl:template match="point"): Remove.
3109 * data/xslt/xml2xhtml.xsl: Likewise.
3110
3111 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3112
3113 * src/getargs.c (version): Update copyright year.
3114
3115 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3116
3117 Make xml2dot.xsl and --graph produce the same output.
3118 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
3119 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3120 escaped later.
3121 (xsl:template name="output-node"): Use the new escape template instead
3122 of the string-replace template directly.
3123 (xsl:template name="output-edge"): Likewise.
3124 (xsl:template name="escape"): New, escapes backslashes and newlines in
3125 addition to quotation marks.
3126 * src/graphviz.c (start_graph, output_node, output_edge): Add
3127 whitespace to output for legibility.
3128
3129 Make xml2text.xsl and --report produce the same output, and remove the
3130 XML "conflicts" element since a conflict summary is easily extracted
3131 from the automaton.
3132 * data/xslt/bison.xsl: New.
3133 (xsl:template match="state" mode="bison:count-conflicts): New.
3134 * data/xslt/xml2text.xsl: Import bison.xsl.
3135 (xsl:template match="bison-xml-report"): Instead of styling the
3136 "conflicts" element, style the "automaton" element with mode
3137 "conflicts". Unlike the former, the latter lists S/R and R/R
3138 conflicts for a state on the same line.
3139 (xsl:template match="conflicts"): Remove.
3140 (xsl:template match="conflict"): Remove.
3141 (xsl:template match="terminal"): Line-wrap the list of rules in which
3142 the terminal is used.
3143 (xsl:template match="nonterminal"): Likewise for nonterminals.
3144 (xsl:template match="automaton" mode="conflicts"): New.
3145 (xsl:template match="state" mode="conflicts"): New.
3146 (xsl:template name="line-wrap"): New.
3147 (xsl:template name="ws-search"): New.
3148 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3149 (xsl:template match="bison-xml-report"): Instead of styling the
3150 "conflicts" element, style the "automaton" element with mode
3151 "conflicts."
3152 (xsl:template match="conflicts"): Remove.
3153 (xsl:template match="conflict"): Remove.
3154 (xsl:template match="automaton" mode="conflicts"): New.
3155 (xsl:template match="state" mode="conflicts): New.
3156 * src/conflicts.c (conflicts_output_xml): Remove.
3157 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3158 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3159 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3160 the corresponding XSLT is easier. Also, never wrap between a word and
3161 the comma that follows it.
3162
3163 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3164
3165 Improve C++ namespace support. Discussed starting at
3166 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3167 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3168 b4_namespace_close): New macros that interpret the %define variable
3169 "namespace" so its value can contain "::" to indicate nested
3170 namespaces.
3171 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3172 the above macros.
3173 * data/lalr1.cc (b4_namespace): Likewise.
3174 * data/location.cc (b4_namespace): Likewise.
3175 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3176 inside a new table in the general %define entry. Document `%define
3177 namespace' there as well. Point the %name-prefix entry to it since it
3178 explains it more completely in the case of C++.
3179 (C++ Bison Interface): Mention `%define namespace' instead of
3180 %name-prefix.
3181 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3182 entry suffices.
3183 * tests/c++.at (Relative namespace references): New test case.
3184 (Absolute namespace references): New test case.
3185 (Syntactically invalid namespace references): New test case.
3186 * tests/input.at (C++ namespace reference errors): New test case.
3187
3188 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3189
3190 Add syncline support and location accessor to internal %define
3191 interfaces.
3192 * data/bison.m4 (b4_percent_define_get_loc): New.
3193 (b4_percent_define_get_syncline): New.
3194 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3195 (b4_percent_define_default): Record defining location as line 1 rather
3196 than 0 for the sake of synchronizing #line's, and define
3197 b4_percent_define_syncline(VARIABLE).
3198 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3199 * src/muscle_tab.c (muscle_syncline_grow): New.
3200 (muscle_code_grow): Use muscle_syncline_grow.
3201 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3202 define b4_percent_define_syncline(VARIABLE).
3203 (muscle_percent_define_get_loc): New.
3204 (muscle_percent_define_get_syncline): New.
3205 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3206 remove some unused variables.
3207 (muscle_percent_define_default): Record defining location as line 1
3208 rather than 0 for the sake of synchronizing #line's, and define
3209 b4_percent_define_syncline(VARIABLE).
3210 (muscle_percent_define_check_values): Use
3211 muscle_percent_define_get_loc.
3212 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3213 (muscle_percent_define_get_syncline): Prototype.
3214 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3215 defaults): Update output for location change.
3216 (Complaining during macro argument expansion): Extend to test
3217 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3218
3219 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3220
3221 Fix some error-reporting macro bugs.
3222 * data/bison.m4 (b4_cat): New.
3223 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3224 to stdout so they don't become arguments to other macros. Update
3225 comments and add examples.
3226 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3227 add examples.
3228 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3229 after printing the error directive so that M4 doesn't report subsequent
3230 problems that are induced by this problem.
3231 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3232 instead of just in them. Recognize @\n in both places. Both expand to
3233 the empty string. Needed by b4_cat.
3234 * tests/skeletons.at (Complaining during macro argument expansion):
3235 New test case.
3236 (Fatal errors make M4 exit immediately): New test case.
3237
3238 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3239
3240 Implement --print-datadir.
3241 * src/getargs.c (usage): Mention.
3242 (PRINT_DATADIR_OPTION): New anonymous enum member.
3243 (long_options): Add entry for it.
3244 (getargs): Add case for it calling compute_pkgdatadir.
3245 * src/output.c (output_skeleton): Encapsulate data directory
3246 computation from here...
3247 (prepare): ... and from here...
3248 (compute_pkgdatadir): ... into this new function.
3249 * src/output.h (compute_pkgdatadir): Prototype.
3250
3251 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3252
3253 * src/print-xml.c (escape_bufs): New static global variable
3254 replacing...
3255 (xml_escape_n): ... the static local variable buf here.
3256 (print_xml): Free memory for escape_bufs.
3257 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3258
3259 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3260
3261 Replace `%push-parser' and `%push-pull-parser' with
3262 `%define push_pull "push"' and `%define push_pull "both"'.
3263 `%define push_pull "pull"' is the default.
3264 * doc/bison.texinfo (Push Decl, Push Parser Function,
3265 Pull Parser Function, Parser Create Function, Parser Delete Function):
3266 Update declarations.
3267 (Decl Summary, Table of Symbols): Replace %push-parser and
3268 %push-pull-parser entries with a %define push_pull entry.
3269 * data/bison.m4 (b4_percent_define_check_values): New macro.
3270 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3271 definitions...
3272 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3273 definitions...
3274 * data/push.c: ... to here and compute them from the value of the
3275 %define variable push_pull.
3276 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3277 parsing requests here...
3278 * data/yacc.c: ... hack this to switch to push.c any time
3279 b4_use_push_pull_flag or the %define variable push_pull is set. This
3280 will go away when we mv push.c yacc.c.
3281 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3282 push parsing is not supported since unused %define variables are
3283 reported anyway.
3284 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3285 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3286 comments for consistency with b4_percent_define_check_values.
3287 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3288 muscles.
3289 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3290 Remove.
3291 (prologue_declaration): Remove %push-parser and %push-pull-parser
3292 rules.
3293 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3294 * tests/calc.at: Update declarations.
3295 * tests/input.at (%define enum variables): New test case.
3296 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3297 declaration.
3298 (Push Parsing: Multiple impure instances): Update declaration.
3299 (Push Parsing: Unsupported Skeletons): New test case.
3300 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3301 declaration.
3302 (Exploding the Stack Size with Malloc): Update declaration.
3303
3304 2007-09-24 Wojciech Polak <polak@gnu.org>
3305
3306 Add XSLT transformations.
3307
3308 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3309 * data/xslt/xml2text.xsl: Transform XML into plain text.
3310 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3311 * data/Makefile.am (xsltdir): New variable.
3312 (dist_xslt_DATA): Add xslt/*.xsl files.
3313
3314 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3315
3316 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3317 Problem reported by Wojciech Polak.
3318 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3319 (xml_printf): Undo change I made on 21 September; that is,
3320 indent 2 spaces, not 1.
3321
3322 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3323
3324 Pacify ./configure --enable-gcc-warnings.
3325 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3326 `char const *' instead of `char *'.
3327 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3328 local variable `sep'.
3329
3330 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3331
3332 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3333 elsewhere.
3334 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3335 (xml_printf): Indent just 1 space for level.
3336 (e_char, xlate_char): Remove.
3337 (xml_escape_string): Rewrite to avoid undefined behavior (used
3338 storage that was freed from the stack).
3339 (xml_escape_n): Don't bother checking for subscript error.
3340
3341 2007-09-21 Wojciech Polak <polak@gnu.org>
3342
3343 Add Bison XML Automaton Report.
3344
3345 Add support for an -x option to generate an XML report.
3346 It is not documented yet.
3347 * src/print-xml.c: New file.
3348 * src/print-xml.h: Likewise.
3349 * lib/timevar.def (TV_XML): New var.
3350 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3351 * src/conflicts.c: Include print-xml.h.
3352 (solved_conflicts_xml_obstack): New var.
3353 (log_resolution, conflicts_solve, conflicts_free):
3354 Add support for XML report.
3355 (conflicts_output_val): New function.
3356 * src/conflicts.h (conflicts_output_val): New decl.
3357 * src/files.c (spec_xml_file): New var.
3358 (compute_output_file_names, output_file_names_free): Add XML support.
3359 * src/files.h (spec_xml_file): New decl.
3360 * src/getargs.c (xml_flag): New var.
3361 (usage, short_options, long_options, getargs): Add XML support.
3362 * src/getargs.h (xml_flag): New decl.
3363 * src/gram.c: Include print-xml.h.
3364 (rule_lhs_print_xml, rule_rhs_print_xml):
3365 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3366 New functions.
3367 * src/gram.h: Declare external ones.
3368 * src/main.c: Include print-xml.h.
3369 (main): Add XML support.
3370 * src/reduce.c: Include print-xml.h.
3371 (reduce_xml): New function.
3372 * src/reduce.h: Declare it.
3373 * src/state.c: Include print-xml.h.
3374 (state_new): Add XML support.
3375 (state_rule_lookahead_tokens_print_xml): New function.
3376 * src/state.h: Declare it.
3377 (struct state): New member solved_conflicts_xml.
3378 * src/symtab.c (symbol_class_get_string): New function.
3379 * src/symtab.h: Declare it.
3380
3381 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3382
3383 * GNUmakefile: Switch to coreutils's version.
3384 * bootstrap: Likewise.
3385 * Makefile.cfg: Adjust to new GNUmakefile.
3386 * README-hacking: Likewise.
3387
3388 Import from gnulib:
3389
3390 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3391 Bruno Haible <bruno@clisp.org>
3392
3393 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3394 and is a script that invokes bison. Tighten the code. Add comments.
3395
3396 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3397
3398 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3399 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3400 * doc/bison.texinfo (Decl Summary): Fix.
3401 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3402 * tests/input.at (Boolean %define variables): Update output.
3403 * tests/skeletons.at (%define boolean variables: invalid skeleton
3404 defaults): Rename to...
3405 (%define Boolean variables: invalid skeleton defaults): ... this and
3406 update output.
3407
3408 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3409
3410 In impure push mode, don't allow more than one yypstate to be allocated
3411 since multiple impure parsers would corrupt yynerrs.
3412 * data/push.c (yypstate_allocated): New static global variable
3413 initialized to 0.
3414 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3415 exhaustion if yypstate_allocated is 1, but still return 2.
3416 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3417 already 1. Otherwise, set it to 1.
3418 (yypstate_delete): Set it to 0.
3419 * tests/push.at (Push Parsing: Multiple impure instances): New test
3420 case.
3421
3422 2007-08-17 Bob Rossi <bob@brasko.net>
3423
3424 * doc/bison.texinfo (Push Decl): Document the push parser.
3425 (Table of Symbols): Ditto.
3426 (Pure Decl): Ditto.
3427 (Decl Summary): Ditto.
3428 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3429 Parser Create Function, Parser Delete Function):
3430 Add new push parser symbols.
3431 (Table of Symbols): Document push-parser, push-pull-parser,
3432 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3433
3434 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3435
3436 Update to GPLv3.
3437 * doc/gpl-3.0.texi: New file.
3438 * doc/gpl.texi: Remove.
3439 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3440 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3441 * README-hacking, TODO, bootstrap, bootstrap.conf:
3442 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3443 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3444 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3445 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3446 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3447 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3448 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3449 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3450 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3451 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3452 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3453 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3454 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3455 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3456 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3457 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3458 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3459 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3460 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3461 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3462 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3463 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3464 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3465 * src/complain.c, src/complain.h, src/conflicts.c:
3466 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3467 * src/files.h, src/flex-scanner.h, src/getargs.c:
3468 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3469 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3470 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3471 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3472 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3473 * src/print.c, src/print.h, src/print_graph.c:
3474 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3475 * src/reduce.h, src/relation.c, src/relation.h:
3476 * src/revision.h, src/scan-code.h, src/scan-code.l:
3477 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3478 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3479 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3480 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3481 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3482 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3483 * tests/existing.at, tests/glr-regression.at:
3484 * tests/headers.at, tests/input.at, tests/java.at:
3485 * tests/local.at, tests/output.at, tests/push.at:
3486 * tests/reduce.at, tests/regression.at, tests/sets.at:
3487 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3488 * tests/torture.at:
3489 Update to GPLv3.
3490
3491 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3492
3493 Get rid of broken %no-parser, -n, and --no-parser implementation and
3494 documentation.
3495 * TODO: Don't mention them.
3496 * doc/bison.1: Likewise.
3497 * doc/bison.texinfo (Decl Summary): Likewise.
3498 (Bison Options): Likewise.
3499 (Option Cross Key): Likewise.
3500 * src/getargs.c (no_parser_flag): Remove global variable.
3501 (usage): Don't print description of -n and --no-parser.
3502 (long_options): Remove --no-parser entry here.
3503 (getargs): Remove -n case in the switch here.
3504 * src/getargs.h (no_parser_flag): Remove extern.
3505 * tests/regression.at (Web2c Actions): Remove comment that mentions
3506 --no-parser.
3507
3508 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3509
3510 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3511 name user variables starting with `yy'. Just pass NULL instead of a
3512 dummy local &yylval to yypush_parse.
3513 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3514 starting with `yy'.
3515
3516 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3517
3518 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3519 true since it's then always used regardless of whether yyoverflow is
3520 defined. Reported by Christian Burger at
3521 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3522 * THANKS: Add Christian Burger.
3523
3524 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3525 node names: say "Decl Summary" not "Bison Declaration Summary".
3526
3527 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3528
3529 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3530 determine whether this function has already complained about an invalid
3531 value for a %define boolean variable, don't check whether Bison has
3532 ever examined the value. As written, the check was a tautology.
3533 Instead, record and check for this complaint using a separate muscle.
3534
3535 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3536
3537 Fix push parsing memory leak reported by Brandon Lucia at
3538 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3539 * THANKS: Add Brandon Lucia.
3540 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3541 but the parse never completed and thus freed it.
3542 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3543 * tests/testsuite.at: Include push.at.
3544 * test/push.at: New.
3545 (Push Parsing: Memory Leak for Early Deletion): New test case.
3546
3547 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3548
3549 Improve handling of multiple S/R conflicts in the same state and of S/R
3550 conflicts involving multiple reductions.
3551 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3552 set for a state here or Bison will abort if it is reassigned on a
3553 later conflicted reduction in the same state.
3554 Similarly, don't finalize and assign the solved conflicts report here
3555 or it will be lost if it is reassigned on a later conflicted reduction
3556 in the same state.
3557 (set_conflicts): Instead, assign them both here after all S/R conflicts
3558 in the state have been fully examined.
3559 * src/print.c (shift_set): Rename to...
3560 (no_reduce_set): ... this.
3561 (print_reductions): Update for rename, and add %nonassoc error action
3562 tokens to no_reduce_set so that, when printing the first remaining
3563 reduction on an error action token, the reduction is enclosed in
3564 brackets.
3565 (print_results): Update for rename.
3566 * tests/conflicts.at (Solved conflicts report for multiple reductions
3567 in a state): New test case.
3568 (%nonassoc error actions for multiple reductions in a state): New test
3569 case.
3570
3571 * src/main.c (main): Don't depend on C99 features.
3572
3573 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3574
3575 * build-aux/.cvsignore: Add compile.
3576 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
3577 uniwidth.
3578
3579 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
3580
3581 * bootstrap (slurp): Create target directories that don't exist.
3582 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
3583
3584 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3585
3586 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
3587 than item number.
3588 * closure.c (closure): Likewise.
3589 * state.h (reductions): Comment sorting of rules.
3590 (state): Comment sorting of items.
3591
3592 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
3593
3594 Fix C++ test cases after recent Gnulib changes. Discussed starting at
3595 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
3596 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
3597 definition in order to avoid Gnulib headers since we don't use config.h
3598 here.
3599 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
3600 rather than AT_DATA so that config.h is included.
3601
3602 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
3603
3604 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
3605 instead of fprintf. Guard these functions with #if YYDEBUG instead of
3606 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
3607 and so that YYFPRINTF is guaranteed to be defined here.
3608
3609 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3610
3611 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
3612 with...
3613 (muscle_percent_define_check_values): ... this more helpful function.
3614 Again, it's not used yet, but it will be.
3615 * src/muscle_tab.h: Likewise.
3616
3617 Improve some comments in parser table construction.
3618 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
3619 (generate_states): Don't mention ruleset, which is internal to closure.
3620 * src/closure.c (closure): Explain sorting of core and itemset, which
3621 is required for this function to behave correctly.
3622 * src/closure.h (closure): Mention sorting.
3623
3624 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
3625
3626 * src/lalr.c (state_lookahead_tokens_count): For code readability,
3627 move the check for disabled transitions to an aver since conflict
3628 resolution hasn't happened yet.
3629
3630 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
3631 labels a state as inconsistent just because it has error transitions.
3632 The original form of this check appeared in revision 1.1 of lalr.c,
3633 which was committed on 1991-12-21. Now (at least), changing the
3634 consistency label on such a state appears to have no useful effect in
3635 any of the places it is examined, which I enumerate below. The key
3636 point to understanding each item in this enumeration is that a state
3637 with an error transition is labelled consistent in the first place only
3638 if it has no rules, so the check cannot matter for states that have
3639 rules. (1) Labelling a state as inconsistent will cause set_conflicts
3640 to try to identify its conflicts, and a state must have *rules* to have
3641 conflicts. (2) Labelling a state as inconsistent will affect how
3642 action_row sets the default *rule* for the state. (3) Labelling a
3643 state as inconsistent will cause build_relations to add lookback edges
3644 to *rules* in that state.
3645 * src/state.h (struct state): Word the comment for member consistent
3646 more carefully.
3647
3648 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3649
3650 Don't depend on C99 features.
3651 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
3652 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
3653 * src/reader.c (check_and_convert_grammar): Fix for-loop.
3654 * src/state.c (state_mark_reachable_states): Fix for-loop.
3655 (state_remove_unreachable_states): Fix for-loop.
3656
3657 Don't widen struct state with member reachable just to temporarily
3658 record reachability. Instead, use a local bitset.
3659 * src/state.h (struct state): Remove member.
3660 * src/state.c (state_new): Don't initialize it.
3661 (state_mark_reachable_states): Rename to...
3662 (state_record_reachable_states): ... this, and use bitset.
3663 (state_remove_unreachable_states): Use bitset.
3664
3665 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
3666
3667 * src/Makefile.am (yacc): Quote target action commands properly so
3668 that the yacc script isn't corrupt. Reported by Hans Aberg at
3669 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
3670
3671 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
3672 the case of pure parsers. Reported by Frans Englich at
3673 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
3674 * THANKS: Add Frans Englich.
3675
3676 * NEWS (2.3a+): In the %code entry, reference section `Bison
3677 Declaration Summary' from the manual now since the %code summary has
3678 moved there.
3679 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
3680 in the rules section must be terminated by semicolons.
3681
3682 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
3683
3684 Extend the front-end API for %define variables to more completely
3685 mirror the back-end. This will be useful in the future.
3686 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
3687 Update comments to mention the new front-end counterparts of these
3688 macros.
3689 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
3690 for muscle_string_decode and muscle_location_decode.
3691 (muscle_string_decode): New static function.
3692 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
3693 (muscle_percent_define_get, muscle_percent_define_ifdef): New
3694 functions.
3695 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
3696 muscle_percent_define_get to mimic the b4_percent_define_flag_if
3697 implementation more closely.
3698 (muscle_percent_define_invalid_value): New function.
3699 * src/muscle_tab.h (muscle_percent_define_get,
3700 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
3701 Prototype.
3702
3703 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3704
3705 * NEWS (2.3a+): Mention yesterday's state-removal change.
3706 (2.3a): Remove the %language entry, which was added after 2.3a.
3707 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
3708 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
3709 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
3710 tests/existing.at: Update copyright date.
3711
3712 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3713
3714 If conflict resolution makes states unreachable, remove those states,
3715 report rules that are then unused, and don't report conflicts in those
3716 states.
3717 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
3718 New global function.
3719 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
3720 function.
3721 * src/main.c (main): After conflict resolution, remove the unreachable
3722 states and update all data structures that reference states by number.
3723 * src/state.c (state_new): Initialize each state's reachable member to
3724 false.
3725 (state_mark_reachable_states): New static function.
3726 (state_remove_unreachable_states): New global function.
3727 * src/state.h (struct state): Add member bool reachable.
3728 (state_remove_unreachable_states): Prototype.
3729 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3730 New test case.
3731 * tests/existing.at (GNU pic Grammar): Update test case output now that
3732 an unused rule is discovered.
3733
3734 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3735
3736 Minor code cleanup in parser table construction.
3737 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
3738 (new_itemsets, save_reductions): Update for rename to nitemset.
3739 * src/closure.c (nritemset): Rename to...
3740 (nitemset): ... this since the "r" appears to meaningless and isn't
3741 used in the comments.
3742 (closure): Update for rename.
3743 * src/closure.h (nritemset): Update extern to...
3744 (nitemset): ... this.
3745 * src/lalr.c (LA): Fix a typo in comments.
3746 * src/print.c (print_core): Update for rename to nitemset.
3747 * src/print_graph.c (print_graph): Likewise.
3748 * src/state.h: Fix some typos in header comments.
3749
3750 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
3751
3752 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
3753 still sticks to ASCII. Sorry!
3754
3755 * README-hacking: New file, taken mostly from coreutils, with changes
3756 for Bison. Contains much of the contents of:
3757 * README-cvs: Remove.
3758 * bootstrap: Sync from gnulib.
3759 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
3760 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
3761
3762 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
3763
3764 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
3765 Setzer.
3766 (Java Differences): Fix some typos.
3767 * THANKS: Add Sebastian Setzer.
3768
3769 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
3770
3771 * data/java.m4 (b4_single_class_if): Remove.
3772 (b4_abstract_if): Look at "%define abstract".
3773 (b4_lexer_if): New.
3774 (b4_union_name): Rename...
3775 (b4_yystype): ... to this. Map to "%define stype".
3776 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
3777 b4_maybe_throws): Fix quoting.
3778 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
3779 * data/lalr1.java (Lexer interface): Always define.
3780 (Lexer interface within parser class): Remove.
3781 (YYLexer class): New, used when "%code lexer" is present.
3782 (constructor): When "%code lexer" is used, pass %lex-param
3783 to the lexer constructor.
3784 (yylex, yyparse): Remove %lex-param from method invocations
3785 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
3786
3787 * doc/bison.texinfo (Java Bison Interface): Mention "%define
3788 abstract". Rename "%define union_name" to "%define stype".
3789 Rename method names according to previous patch.
3790 (Java Scanner Interface): Describe "%code lexer" instead of
3791 "%pure-parser" and "%define single_class".
3792 (Java Differences): Mention "%code lexer".
3793
3794 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
3795 Include scanner here, using macros from tests/local.at.
3796 (AT_DATA_CALC_Y): Remove final argument.
3797 (_AT_CHECK_JAVA_CALC): Likewise.
3798 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
3799 of %locations and %error-verbose.
3800 (main): Test with and without %lex-param.
3801 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
3802 (AT_BISON_OPTION_POPDEFS): Pop it.
3803
3804 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3805
3806 DJGPP spefic issue. Inhibit the use of disallowed characters for
3807 file name genertion on Win98, WinXP, etc. These are |<>":?*\
3808 and concern testsuite case 46.
3809 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
3810 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
3811 * djgpp/config.bat: Inhibit the use of disallowed characters.
3812
3813 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3814
3815 Miscellaneous %define and %code cleanup.
3816 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
3817 values are interpreted.
3818 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
3819 documentation a little more.
3820 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
3821 muscle_percent_define_insert, muscle_percent_code_grow): New
3822 functions/macros.
3823 * src/muscle_tab.h (muscle_percent_define_insert,
3824 muscle_percent_code_grow): Prototype.
3825 * src/parse-gram.y (prologue_declaration): Use
3826 muscle_percent_define_insert and muscle_percent_code_grow when parsing
3827 %define and %code directives.
3828
3829 Make it easy to share %define boolean variables between the front-end
3830 and back-end. Though not used yet, this will be useful in the future.
3831 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
3832 Bison uses of names rather than just skeleton uses of names.
3833 (b4_percent_define_get, b4_percent_define_ifdef): Rename
3834 b4_percent_define_skeleton_variables(VARIABLE) to
3835 b4_percent_define_bison_variables(VARIABLE).
3836 (b4_percent_code_get, b4_percent_code_ifdef): Rename
3837 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
3838 b4_percent_code_bison_qualifiers(QUALIFIER).
3839 (b4_check_user_names_wrap): Update for renames.
3840 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
3841 muscle_percent_define_default): New functions mimicking
3842 b4_percent_define_flag_if and b4_percent_define_default.
3843
3844 For %define variables, report locations for invalid values and
3845 redefinitions.
3846 * data/bison.m4 (b4_percent_define_flag_if): Read
3847 b4_percent_define_loc(VARIABLE) to report the location of an invalid
3848 value for VARIABLE.
3849 (b4_percent_define_default): Save a special location in
3850 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
3851 must later be reported as invalid.
3852 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
3853 functions.
3854 (muscle_percent_define_insert): Record the location of VARIABLE in
3855 muscle percent_define_loc(VARIABLE), and use it to report the previous
3856 location for a redefinition.
3857 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
3858 (muscle_percent_define_default): Update like b4_percent_define_default.
3859 (muscle_grow_user_name_list): Rename to...
3860 (muscle_user_name_list_grow): ... this for consistency and use
3861 muscle_location_grow.
3862 * src/muscle_tab.h (muscle_location_grow): Prototype.
3863 * tests/input.at (%define errors): Update expected output.
3864 * tests/skeletons.at (%define boolean variables: invalid skeleton
3865 defaults): New test case.
3866
3867 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
3868
3869 * src/print.c (lookahead_set, state_default_rule): Remove.
3870 (print_reductions): Replace state_default_rule invocation with
3871 equivalent use of yydefact, which was computed in token_actions in
3872 tables.c.
3873 (print_results): Don't allocate lookahead_set.
3874
3875 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
3876
3877 * data/lalr1.java: Prefix all private members with yy.
3878
3879 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
3880
3881 Use YYFPRINTF instead of fprintf where appropriate. Reported by
3882 Sebastien Fricker at
3883 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
3884 * THANKS: Add Sebastien Fricker.
3885 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
3886 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
3887 accept a variable number of arguments.
3888
3889 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3890
3891 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
3892
3893 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3894
3895 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
3896 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
3897 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
3898
3899 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
3900
3901 Undo my 2007-02-07 change, switching back to the c-strcase module
3902 introduced in the 2007-02-03 change. Bruno Haible reported that
3903 the 2007-02-07 change would be dangerous in Turkish if we add a
3904 language whose name contains "i", since "i" is not lowercase "I"
3905 in Turkish.
3906 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
3907 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
3908 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
3909 * m4/.cvsignore: Remove strcase.m4.
3910 * src/getargs.c: Revert 2007-02-07 change, as follows.
3911 Include c-strcase.h.
3912 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
3913
3914 2007-02-11 Bruno Haible <bruno@clisp.org>
3915
3916 Enable the Java related testsuite tests when the only Java compiler
3917 found is a gcj < 4.3. Discussed at
3918 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
3919 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
3920
3921 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
3922
3923 * data/Makefile.am: Update copyright date.
3924 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
3925 yypstate_new returns NULL.
3926 (yypstate_new): Return NULL if malloc does.
3927 * src/reader.c (packgram): Move translation of rule actions from the
3928 beginning of packgram to...
3929 (check_and_convert_grammar): ... here right before packgram is invoked
3930 so it's easier to write more complete comments, and remove redundant
3931 code.
3932
3933 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
3934
3935 As in semantic actions, make @$ in %initial-action, %destructor, and
3936 %printer imply %locations.
3937 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
3938 scanning @$.
3939 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
3940 (@$ in %initial-action implies %locations,
3941 @$ in %destructor implies %locations,
3942 @$ in %printer implies %locations): ... these new test cases.
3943
3944 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
3945
3946 Undo most of the 2007-02-03 change, switching to the strcase module
3947 now that gnulib strcase has been fixed.
3948 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
3949 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
3950 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
3951 * m4/.cvsignore: Add strcase.m4.
3952 * src/getargs.c: Revert 2007-02-03 change, as follows.
3953 Don't include c-strcase.h.
3954 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
3955 strcasecmp has "unspecified behavior" outside the POSIX locale,
3956 but it works fine in practice if at least one argument is ASCII,
3957 as is the case in Bison.
3958
3959 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
3960
3961 * tests/java.at: Skip tests if only one of javac/java is present.
3962 Reported by Joel E. Denny.
3963 * tests/atlocal.in: Adjust copyright years.
3964
3965 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
3966
3967 * data/lalr1.java (Stack): Work around old verifiers that disallow
3968 access to the private fields of an inner class, from the outer class.
3969 We can make Stack's fields public because user code doesn't have access
3970 to the instance of Stack used by parse(). Reported by Paul Eggert.
3971
3972 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
3973
3974 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
3975 the right spot for these files?
3976 * bootstrap.conf (gnulib_modules): Add c-strcase.
3977 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
3978 c-strncasecmp.c.
3979 * src/getargs.c: Include c-strcase.h.
3980 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
3981 to avoid unspecified behavior.
3982
3983 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
3984
3985 * doc/bison.texinfo (Decl Summary): Correct typo.
3986
3987 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
3988
3989 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
3990 Complain if the value does not match empty, "true" or "false".
3991 * data/c++.m4: Adjust default definitions of %define variables.
3992 * data/java.m4: Adjust default definitions of %define variables.
3993 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
3994 to above behavior.
3995 * tests/input.at (Boolean %define variables): Test new behavior.
3996
3997 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
3998
3999 * NEWS: Mention java.
4000 * TODO: Remove things that are done.
4001 * bootstrap.conf: Add javacomp-script and javaexec-script.
4002 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4003
4004 * data/Makefile.am: Add new files.
4005 * data/java-skel.m4: New.
4006 * data/java.m4: New.
4007 * data/lalr1.java: New.
4008
4009 * doc/bison.texinfo: Put "A Complete C++ Example" under
4010 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4011 under Other Languages.
4012
4013 * src/getargs.c (valid_languages): Add Java.
4014 * src/getargs.h (struct bison_language): Update size of string fields.
4015
4016 * tests/Makefile.am: Add java.at.
4017 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4018 * tests/java.at: New.
4019 * tests/testsuite.at: Include it.
4020
4021 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4022
4023 Clean up.
4024 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4025 at_directive_argv arguments so these no longer have to be global
4026 variables. Also, update the implementation for the following changes.
4027 (fail_for_at_directive_too_many_args,
4028 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4029 (at_directive_name): Remove as at_directive_argv[0] will be used for
4030 this now.
4031 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4032 for the directive name.
4033 (at_directive_argc, at_directive_argv): Make these local within
4034 skel_lex instead of global.
4035 (INITIAL): Update directive start action for above changes.
4036 (SC_AT_DIRECTIVE_ARG): Rename to...
4037 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4038 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4039 (scan_skel): Move yylex_destroy to...
4040 (skel_scanner_free): ... here.
4041 * tests/skeletons.at (installed skeleton file name): Rename to...
4042 (installed skeleton file names): ... this.
4043
4044 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4045
4046 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4047 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4048 Summary" not "Directives".
4049 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4050 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4051 since the former is now the more complete one.
4052 (Prologue Alternatives): Likewise and do the same for %defines.
4053 (Table of Symbols): Add summary of %code, add summary of %define, and
4054 move full %code documentation to...
4055 (Decl Summary): ... here for consistency with other entries in these
4056 sections.
4057 Move %define entry in order to keep this list alphabetized.
4058 Reword %define entry a little to put less emphasis on the skeleton
4059 concept, which most users shouldn't have to think about.
4060
4061 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4062
4063 Adjust to recent gnulib changes.
4064 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4065 Add string.h, string_.h, unistd_.h, wchar_.h.
4066 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4067 * src/system.h: Don't include <stpcpy.h>; this is now done by
4068 <string.h>.
4069
4070 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
4071
4072 Simplify implementation of unqualified %code, implement macros for
4073 uniform treatment of boolean %define flags. Document %define.
4074 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4075 b4_percent_code_ifdef): New.
4076 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4077 * data/c++.m4: Define default value for global_tokens_and_yystype.
4078 * data/glr.cc: Likewise.
4079 * data/location.cc: Use b4_percent_define_flag_if.
4080
4081 * doc/bison.texinfo (Decl Summary): Document %define.
4082
4083 * src/parse-gram.y (Unqualified %code): Change muscle name to
4084 b4_percent_code().
4085 (content.opt): Default to empty.
4086
4087 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4088
4089 Implement support for relative and absolute skeleton file names.
4090 Discussed starting at
4091 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4092 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4093 (Bison Options): Document in --skeleton entry.
4094 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4095 full_skeleton can't necessarily hold all of pkgdatadir.
4096 If the specified skeleton file name contains a `/', don't prepend
4097 pkgdatadir.
4098 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4099 file name contains a `/', prepend the grammar file directory.
4100 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4101 * skeletons.at: New file.
4102 (relative skeleton file names): New test case.
4103 (installed skeleton file names): New test case.
4104 * tests/testsuite.at: Include skeletons.at.
4105
4106 * bootstrap: Update copyright to 2007.
4107
4108 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
4109
4110 * bootstrap: Remove occurrences of .#bootmp from the files.
4111
4112 2007-01-17 Akim Demaille <akim@epita.fr>
4113
4114 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4115 nonterminals.
4116 Use per-type %printer.
4117
4118 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4119
4120 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4121 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4122 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4123 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4124 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4125 tests/glr-regression.at, tests/input.at, tests/local.at,
4126 tests/output.at, tests/torture.at: Update copyright to 2007.
4127
4128 2007-01-16 Akim Demaille <akim@epita.fr>
4129
4130 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4131 error code.
4132 (Calc++ Scanner): Exit with failure if we can't open the input
4133 file.
4134 Accept "-" standing for stdin.
4135 (Calc++ Top Level): Print the result only if the parsing was
4136 successful.
4137
4138 2007-01-16 Akim Demaille <akim@epita.fr>
4139
4140 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4141
4142 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
4143 and Joel E. Denny <jdenny@ces.clemson.edu>
4144
4145 Clean up %define and %code implementation in M4 some. Most
4146 importantly, rename all related macros to be in the b4_percent_define
4147 and b4_percent_code namespaces. Also, complete support for `.' in
4148 %define variable names and %code qualifiers.
4149 * data/bison.m4 (b4_check_user_names): Check for special
4150 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4151 m4_foreach loops.
4152 (b4_get_percent_define, b4_get_percent_code): Rename to...
4153 (b4_percent_define_get, b4_percent_code_get): ... these.
4154 Extend documentation with examples.
4155 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4156 b4_percent_define_skeleton_variables and
4157 b4_percent_code_skeleton_qualifiers.
4158 Expect any value for the %define variable `foo' to be stored in the
4159 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4160 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4161 expect any unqualified %code blocks to be stored in a macro named
4162 `b4_percent_code_unqualified'.
4163 Use m4_indir so that %define variable names and %code qualifiers can
4164 contain `.', which is allowed by the grammar parser.
4165 (b4_percent_define_default): New macro to set a default value for a
4166 %define variable.
4167 (m4_wrap): Update wrapped code, and fix some underquoting.
4168 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4169 Expect grammar uses of %define variables and %code qualifiers to be
4170 defined in b4_percent_define_user_variables and
4171 b4_percent_code_user_qualifiers.
4172 * data/c++.m4: Use b4_percent_define_default rather than
4173 m4_define_default. Fix some underquoting. Skeleton usage of %define
4174 variable define_location_comparison now implies skeleton usage of
4175 %define variable filename_type.
4176 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4177 data/push.c, data/yacc.c: Update macro names.
4178 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4179 muscle names.
4180
4181 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4182
4183 DJGPP specific issues.
4184
4185 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4186 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4187
4188 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4189
4190 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4191 run parsers in all tests so that Valgrind is invoked during
4192 maintainer-check-valgrind.
4193 (Duplicate representation of merged trees): Free all semantic values.
4194 (Duplicated user destructor for lookahead): Likewise.
4195
4196 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4197
4198 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4199 command-line prefix.
4200 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4201 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4202 miss Valgrind messages.
4203 (Exploding the Stack Size with Malloc): Likewise.
4204
4205 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4206
4207 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4208 locals. Reported by Juan Manuel Guerrero at
4209 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4210 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4211 Fix some indentation also.
4212 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4213 explaining this issue.
4214
4215 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
4216 and Joel E. Denny <jdenny@ces.clemson.edu>
4217
4218 Simplify union and prologue handling, and escape union and lex/parse
4219 params with digraphs.
4220 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4221 values to the empty string since these are no longer guaranteed
4222 initialized by the front-end.
4223 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4224 braces around b4_user_stype since this is no longer done by the
4225 front-end.
4226 * src/files.c, src/files.h (pre_prologue_obstack,
4227 post_prologue_obstack): Remove.
4228 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4229 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4230 with digraphs. This fixes lex params and parse params.
4231 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4232 * src/output.c (prepare): Remove muscle insertion of the prologues.
4233 (output): Remove freeing of pre_prologue_obstack and
4234 post_prologue_obstack.
4235 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4236 than prologue_augment for prologue parsing so you don't need prologue
4237 obstacks.
4238 (grammar_declaration): For %union RHS, use `braceless' instead of
4239 "{...}" so that braces are already stripped and code is escaped with
4240 digraphs.
4241 * src/reader.c (prologue_augment): Remove.
4242 (reader): Remove initialization of pre_prologue_obstack and
4243 post_prologue_obstack.
4244 * src/reader.h (prologue_augment): Remove.
4245
4246 * data/c.m4: Remove stray parenthesis.
4247
4248 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4249
4250 Remove quotes from variables names in %define directives and from
4251 qualifiers in %code directives, and restrict the characters that are
4252 allowed in them to M4-friendly ones. For %define, continue to support
4253 the quoted form as a deprecated feature. Discussed starting at
4254 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4255 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4256 %code.
4257 * doc/bison.texinfo (Prologue Alternatives): Update.
4258 (Decl Summary): In %defines entry, update mention of `%code requires'
4259 and `%code provides'.
4260 (C++ Location Values): Update %define uses.
4261 (Calc++ Parser Interface): Likewise.
4262 (Calc++ Parser): Likewise, and update `%code requires' uses.
4263 (Table of Symbols): Update %code documentation.
4264 * src/parse-gram.y (prologue_declaration): For %define variables, use
4265 `variable' instead of `STRING'.
4266 (grammar_declaration): For %code qualifiers, use `ID' instead of
4267 `STRING'.
4268 (variable): New nonterminal that takes an `ID' or a `STRING'.
4269 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4270 and %define uses.
4271 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4272 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4273 (%define errors): Update %define uses.
4274
4275 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4276
4277 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4278 instead of muscle_insert for %define values so that M4-special
4279 characters are replaced with digraphs.
4280 * tests/input.at (%define errors): Extend to check weird values.
4281
4282 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4283
4284 Instead of having skeletons declare all valid %define variables and
4285 %code qualifiers, provide macros that retrieve the associated values
4286 and build these lists automatically. Thus Bison will now warn when a
4287 variable or qualifier is not used by the skeleton in the current
4288 invocation regardless of whether it might sometimes be used by that
4289 skeleton in other invocations. Also, move all %define value macros to
4290 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4291 form, which is replaced by %code.
4292 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4293 (b4_check_user_names): ... this, and change the series of valid name
4294 arguments to a single list argument for names used in the skeleton
4295 similar to the existing list argument for names used in the grammar.
4296 Warn instead of complaining.
4297 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4298 values and %code code, to format %code code properly, and to build
4299 lists of all %define variables and %code qualifiers used in the
4300 skeleton: b4_skeleton_percent_define_variables and
4301 b4_skeleton_percent_code_qualifiers.
4302 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4303 Remove, and...
4304 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4305 the skeleton names lists can finish building first. In place of
4306 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4307 expect the lists b4_user_percent_define_variables and
4308 b4_user_percent_code_qualifiers.
4309 * data/c++.m4: Where setting default values for b4_parser_class_name,
4310 b4_location_type, b4_filename_type, b4_namespace, and
4311 b4_define_location_comparison, update their names to the
4312 b4_percent_define_ namespace.
4313 * data/glr.c: Don't use b4_check_percent_define_variables and
4314 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4315 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4316 (b4_parser_class_name, b4_namespace): Define these using
4317 b4_get_percent_define for parser_class_name and namespace.
4318 * data/location.cc: Use b4_get_percent_define.
4319 * data/push.c: Don't use b4_check_percent_define_variables and
4320 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4321 * data/yacc.c: Likewise, and don't call m4_exit in
4322 b4_use_push_for_pull_if or m4_wrap code will never execute.
4323 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4324 Rename to...
4325 (muscle_grow_user_name_list): ... this for consistency with the
4326 terminology used in bison.m4.
4327 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4328 %define variable names, and rename muscle used_percent_define_variables
4329 to user_percent_define_variables.
4330 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4331 user_percent_code_qualifiers.
4332 (content): Remove.
4333 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4334 {CODE} form is no longer accepted.
4335 * tests/input.at (Reject bad %code qualifiers): Rename to...
4336 (Reject unused %code qualifiers): ... this, and update test output.
4337 (%define error): Update test output.
4338
4339 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4340
4341 Check for unrecognized %define variables similar to checking for
4342 unrecognized %code qualifiers. Check for redefined %define variables.
4343 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4344 generalizes...
4345 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4346 (b4_check_percent_define_variables): New, also wraps it.
4347 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4348 variables using b4_check_percent_define_variables.
4349 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4350 all those exercised in the test suite and all those listed in the
4351 `Default values' section of c++.m4. Are there others?
4352 * data/push.c, data/yacc.c: Declare no valid %define variables.
4353 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4354 similar to muscle_find, but it works even when the muscle stores a
4355 const value.
4356 (muscle_grow_used_name_list): New function for constructing the used
4357 name list muscles that b4_check_for_unrecognized_names requires.
4358 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4359 %define'd more than once. Define the b4_used_percent_define_variables
4360 muscle with muscle_grow_used_name_list.
4361 (grammar_declaration): Abbreviate %code code with
4362 muscle_grow_used_name_list.
4363 * tests/input.at (%define errors): New.
4364
4365 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4366
4367 Provide warn_at, complain_at, and fatal_at function callbacks to the
4368 skeletons, and use this for %code qualifier complaints.
4369 * data/bison.m4 (b4_error_at): New, invoked by...
4370 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4371 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4372 @fatal_at(...@) directives.
4373 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4374 qualifiers in b4_used_percent_code_qualifiers and to use
4375 b4_complain_at.
4376 * src/location.c, src/location.h (boundary_set_from_string): New global
4377 function.
4378 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4379 function.
4380 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4381 to b4_used_percent_code_qualifiers.
4382 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4383 function.
4384 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4385 (lineno): Rename to...
4386 (out_lineno): ... this so I don't misunderstand it again.
4387 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4388 here; these newlines are in the input but not the output file.
4389 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4390 (at_directive_perform): ... this new static function, and add handling
4391 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4392 directives.
4393 * tests/input.at (Reject bad %code qualifiers): Update test output with
4394 locations and extend.
4395
4396 * tests/output.at (Output file name: [, Output file name: ]): Remove
4397 bogus comment about these tests failing.
4398
4399 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4400
4401 Clean up b4_check_percent_code_qualifiers a little.
4402 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4403 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4404 documentation and add examples.
4405 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4406 qualifiers here.
4407
4408 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4409
4410 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4411 unreliable -- especially when they're hidden inside another macro.
4412 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4413 data/c.m4: Remove m4_divert(-1).
4414 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4415 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4416 m4_divert_push(0) and m4_divert_pop(0).
4417 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
4418 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4419 pushed and popped by m4sugar, should be first on the stack.
4420
4421 Provide warn, complain, and fatal function callbacks to the skeletons.
4422 This provides more flexibility than m4_fatal, improves the error
4423 message format, and captures messages for translation. Discussed
4424 starting at
4425 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4426 * data/bison.m4 (b4_error): New, invoked by...
4427 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4428 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4429 directives. Because these M4 macros might be called when the current
4430 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4431 the previous removal of uses of m4_divert, which caused trouble.
4432 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4433 m4_fatal to report unrecognized %code qualifiers.
4434 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4435 push parser requests.
4436 * data/glr.c: Use b4_complain instead of m4_fatal to report
4437 non-deterministic push parser requests.
4438 Update @output usage to @output(...@) form.
4439 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4440 report missing %defines. Update @output usage to @output(...@) form.
4441 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4442 @output(...@) form.
4443 * src/main.c (main): Invoke skel_scanner_free.
4444 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4445 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4446 obstack_for_string from flex-scanner.h.
4447 (YY_DECL): Use to declare skel_lex static.
4448 (decode_at_digraphs): Remove; now handled in the new
4449 SC_AT_DIRECTIVE_ARG start condition.
4450 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4451 functions.
4452 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4453 at_directive_argv): New static globals.
4454 (INITIAL): Use fail_for_invalid_at.
4455 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4456 recognize the start of a generalized `@directive(...@)' form and
4457 start...
4458 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4459 directive args (using the new obstack_for_string), to decode the
4460 contained @ diagraphs, and to perform the directive. It recognizes
4461 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4462 @output(...@).
4463 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4464 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4465 `@,'.
4466 (scan_skel): Initialize obstack_for_string on the first call.
4467 (skel_scanner_free): New function to free obstack_for_string.
4468 * tests/input.at (Reject bad %code qualifiers): Update test output.
4469
4470 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4471
4472 Consolidate the 4 prologue alternative directives (%code, %requires,
4473 %provides, and %code-top) into a single %code directive with an
4474 optional qualifier field. Discussed at
4475 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4476 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4477 alternatives.
4478 * doc/bison.texinfo (Prologue Alternatives): Update.
4479 (Decl Summary): Update to %code "requires" and %code "provides".
4480 (Calc++ Parser): Update to %code "requires".
4481 (Table of Symbols): Remove entries for %requires, %provides, and
4482 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4483 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4484 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4485 which are skeleton-specific.
4486 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4487 declare what %code qualifiers it supports and to complain if any other
4488 qualifiers were used in the grammar.
4489 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4490 and b4_user_code([b4_percent_code_provides]) in place of
4491 b4_user_requires and b4_user_provides.
4492 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4493 Add b4_user_code([b4_percent_code_top]) and
4494 b4_user_code([b4_percent_code]).
4495 Invoke b4_check_percent_code_qualifiers.
4496 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4497 PERCENT_REQUIRES): Remove.
4498 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4499 %requires. Rewrite the %code RHS as the unqualified form defining the
4500 muscle b4_percent_code. Add another RHS for the qualified %code form,
4501 which defines muscles of the form b4_percent_code_QUALIFIER and the
4502 b4_used_percent_code_qualifiers muscle.
4503 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4504 PERCENT_REQUIRES): Remove.
4505 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4506 %code "requires" and %code "provides".
4507 * tests/input.at (Reject bad %code qualifiers): New.
4508
4509 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4510
4511 Use the new code_props interface for destructors and printers.
4512 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4513 printer_location members, and change the type of the destructor and
4514 printer members to code_props.
4515 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4516 symbol_printer_get, semantic_type_destructor_set,
4517 semantic_type_printer_set, default_tagged_destructor_set,
4518 default_tagless_destructor_set, default_tagged_printer_set,
4519 default_tagless_printer_set): Use code_props in arguments and return
4520 types in place of char const * and location.
4521 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4522 since the locations are now contained in the return of
4523 symbol_destructor_get and symbol_printer_get.
4524 * src/output.c (symbol_destructors_output, symbol_printers_output):
4525 Replace with...
4526 (symbol_code_props_output): ... this to eliminate duplicate code.
4527 (output_skeleton): Update to use symbol_code_props_output.
4528 * src/reader.c (symbol_should_be_used): Update use of
4529 symbol_destructor_get.
4530 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4531 Update uses of the various _destructor_set and _printer_set functions.
4532 * src/symtab.c: (default_tagged_destructor_location,
4533 default_tagless_destructor_location, default_tagged_printer_location,
4534 default_tagless_printer_location): Remove since we...
4535 (default_tagged_destructor, default_tagless_destructor,
4536 default_tagged_printer, default_tagless_printer): ... change the type
4537 of these to code_props.
4538 (symbol_new, semantic_type_new, symbol_destructor_set,
4539 semantic_type_destructor_set, symbol_destructor_get,
4540 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4541 symbol_check_alias_consistency, default_tagged_destructor_set,
4542 default_tagless_destructor_set, default_tagged_printer_set,
4543 default_tagless_printer_set): Update.
4544 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4545 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4546 code_props members.
4547 (symbol_print): Use SYMBOL_CODE_PRINT.
4548
4549 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4550
4551 Use the new code_props interface for rule actions.
4552 * src/symlist.h (symbol_list): Replace action, action_location, and
4553 used members with a code_props action_props member.
4554 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4555 grammar_midrule_action, grammar_current_rule_merge_set,
4556 grammar_current_rule_symbol_append, packgram): Update.
4557 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4558 * src/scan-code.l (handle_action_dollar): Update.
4559 (translate_rule_action): Remove, no longer used.
4560 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4561
4562 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4563
4564 Use the new code_props interface in parse-gram.y.
4565 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4566 Update all uses of translate_* functions to use the new code_props
4567 interface and to use gram_scanner_last_string_free and
4568 code_scanner_last_string_free where possible.
4569 (grammar_declaration): symbol_list_destructor_set and
4570 symbol_list_printer_set now perform the translation, so don't do it
4571 here. Use gram_scanner_last_string_free where possible.
4572 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4573 translate_code): Remove, no longer used.
4574 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4575 symbol_list_printer_set): Perform code translation here rather than
4576 depending on the caller to do so.
4577
4578 * src/symlist.h (struct symbol_list): Correct some documentation typos.
4579 * src/scan-gram.h (gram_last_string): Remove declaration.
4580 * src/scan-gram.l (last_string): Declare it static.
4581
4582 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4583
4584 Encapsulate code properties and related functionality for the various
4585 destructors, printers, and actions into a code_props structure and
4586 interface. This patch merely implements code_props in scan-code.h and
4587 scan-code.l. Future patches will rewrite other modules to use it.
4588 Discussed starting at
4589 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
4590 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
4591 consistently initialize const structs that have an empty location
4592 field.
4593 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
4594 to ensure consistency.
4595 * src/scan-code.h (code_props): New structure.
4596 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
4597 function, macro, and const global variable for initializing a
4598 code_props with no code.
4599 (code_props_plain_init, code_props_symbol_action_init,
4600 code_props_rule_action_init, code_props_translate_code): The rest of
4601 the new code_props functional interface. Among other things, the init
4602 functions set the code_props kind field so that
4603 code_props_translate_code will know whether to behave like
4604 translate_symbol_action, translate_rule_action, or translate_code.
4605 These old translate functions must remain until all other modules are
4606 updated to use the new code_props interface.
4607 (code_scanner_last_string_free): New function similar to
4608 gram_scanner_last_string_free.
4609 (code_scanner_free): Add documentation.
4610 * src/scan-code.l: Implement the new interface.
4611 (code_lex): Make it static, add a code_props* argument, and remove the
4612 rule argument.
4613 (last_string): New static global similar to the one in scan-gram.l.
4614 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
4615 instead of rule.
4616 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
4617 code_props since Bison may one day use this information for destructors
4618 and printers.
4619 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
4620 (handle_action_dollar): Use symbol_list_n_get and set used flag
4621 directly since symbol_list_n_used_set is removed.
4622 (translate_action): Add a code_props* argument and remove the rule,
4623 action, and location arguments. Pass the code_props* on to code_lex.
4624 (translate_rule_action, translate_symbol_action, translate_code):
4625 Rewrite as wrappers around the new code_props interface.
4626 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
4627 it would eventually need to break the encapsulation of code_props.
4628
4629 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4630
4631 * etc/.cvsignore: New.
4632
4633 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4634
4635 Add maintainer-push-check to run maintainer-check using push parsing in
4636 place of pull parsing where available.
4637 * Makefile.am (maintainer-push-check): New.
4638 * data/bison.m4 (b4_use_push_for_pull_if): New.
4639 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
4640 appropriately based on their existing values.
4641 (yypush_parse): Don't print push-parser-specific diagnostics if push
4642 parsing is being used in place of pull parsing.
4643 * data/yacc.c: If push parsing should replace pull parsing, redirect to
4644 push.c.
4645 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
4646 variable, and insert b4_use_push_for_pull_flag into muscles.
4647 * tests/Makefile.am (maintainer-push-check): New.
4648
4649 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4650
4651 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
4652 (whether successful or failed) so that yypush_parse can be invoked
4653 again to start a new parse using the same yypstate.
4654 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
4655 check multiple yypull_parse invocations on the same yypstate. For pull
4656 mode, extend to check multiple yyparse invocations.
4657 (Exploding the Stack Size with Alloca): Extend to try with
4658 %push-pull-parser.
4659 (Exploding the Stack Size with Malloc): Likewise.
4660
4661 * tests/calc.at (Simple LALR Calculator): Don't specify
4662 %skeleton "push.c" since %push-pull-parser implies that now.
4663 * tests/headers.at (export YYLTYPE): Don't check for the push
4664 declarations. Otherwise, this test case can't be used to see if push
4665 mode can truly emulate pull mode.
4666 * tests/input.at (Torturing the Scanner): Likewise.
4667 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
4668 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
4669 AT_YACC_IF, which now includes the case of push mode since %skeleton
4670 need not be used for push mode. This will be more intuitive once
4671 push.c is renamed to yacc.c.
4672
4673 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4674
4675 For push mode, convert yyparse from a macro to a function, invoke yylex
4676 instead of passing a yylexp argument to yypull_parse, and don't
4677 generate yypull_parse or yyparse unless %push-pull-parser is declared.
4678 Discussed starting at
4679 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
4680 * data/bison.m4 (b4_pull_if): New.
4681 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
4682 * data/push.c: Improve M4 quoting a little.
4683 (b4_generate_macro_args, b4_parenthesize): Remove.
4684 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
4685 any time a pull parser is requested.
4686 Don't #define this as a wrapper around yypull_parse. Instead, when
4687 both push and pull are requested, make it a function that does that
4688 same thing.
4689 (yypull_parse): If there's a b4_prefix, #define this to
4690 b4_prefix[pull_parse] when both push and pull are requested.
4691 Don't define this as a function unless both push and pull are
4692 requested.
4693 Remove the yylexp argument and hard-code yylex invocation instead.
4694 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
4695 %push-parser.
4696 * src/getargs.c (pull_parser): New global initialized to true.
4697 * getargs.h (pull_parser): extern it.
4698 * src/output.c (prepare): Insert pull_flag muscle.
4699 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
4700 (prologue_declaration): Set both push_parser and pull_parser = true for
4701 %push-pull-parser. Set push_parser = true and pull_parser = false for
4702 %push-parser.
4703 * src/scan-gram.l: Don't accept %push_parser as an alternative to
4704 %push-parser since there's no backward-compatibility concern here.
4705 Scan %push-pull-parser.
4706 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
4707 instead of %push-parser.
4708 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
4709 prototype it in the module that calls yyparse.
4710 * tests/input.at (Torturing the Scanner): Likewise.
4711 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
4712
4713 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
4714
4715 Update etc/bench.pl. Optimize push mode a little (the yyn change
4716 deserves most of the credit).
4717 * Makefile.am (SUBDIRS): Add etc subdirectory.
4718 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
4719 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
4720 yytoken, yyval, and yyloc declarations to...
4721 (yyparse or yypush_parse): ... here to improve performance. For
4722 yypush_parse invocations after the first, be sure to assign yyn its old
4723 value again.
4724 (yypstate_new): Don't bother initializing the yyresult field since the
4725 initial value isn't used.
4726 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
4727 remove the #define that, in push mode, set it to yyps->NAME.
4728 * etc/Makefile.am: New.
4729 * etc/bench.pl: Remove and build it instead from...
4730 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
4731 "tests/bison" from the build directory by default rather than just
4732 invoking "bison" from $PATH.
4733 (calc_grammar): Update push parser code: don't declare yylval globally,
4734 don't define yyparse_wrapper, and don't #define yyparse.
4735 (bench_grammar): Update to check all working combinations of yacc.c,
4736 push.c, impure, pure, pull, and push.
4737
4738 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4739
4740 For push mode, add pull wrappers around yypush_parse.
4741 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
4742 (yypull_parse): New function wrapping yypush_parse.
4743 (yyparse): New #define wrapping yypull_parse.
4744 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
4745 is declared.
4746 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
4747 prototype yylex in the module that calls yyparse, and don't prototype
4748 yyparse there. Otherwise, the yyparse expansion won't compile.
4749 * tests/input.at (Torturing the Scanner): Likewise.
4750
4751 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4752
4753 Enable push parsers to operate in impure mode. Thus, %push-parser no
4754 longer implies %pure-parser. The point of this change is to move
4755 towards being able to test the push parser code by running the entire
4756 test suite as if %push-parser had been declared.
4757 * data/push.c (yypush_parse): For impure mode, remove the
4758 yypushed_char, yypushed_val, and yypushed_loc arguments.
4759 Instead, declare these as local variables initialized to the global
4760 yychar, yylval, and yylloc.
4761 For the first yypush_parse invocation only, restore the initial values
4762 of these global variables when it's time to read a token since they
4763 have been overwritten.
4764 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
4765 %push-parser.
4766 * tests/calc.at (Simple LALR(1) Calculator): Always declare
4767 %pure-parser along with %push-parser since this test case was designed
4768 for pure push parsers.
4769 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
4770 (AT_YACC_OR_PUSH_IF): New.
4771 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
4772 add a note that it's still wrong for some cases (as it has been for a
4773 while).
4774 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
4775 %push-parser no longer implies %pure-parser.
4776
4777 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4778
4779 Remove some unnecessary differences between the pull parser code and
4780 the push parser code. This patch enables yynerrs in push mode.
4781 * data/push.c: Reformat M4 a little.
4782 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
4783 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
4784 because push mode is on. Instead, if pure mode is on, move yynerrs
4785 to...
4786 (b4_declare_parser_state_variables): ... here.
4787 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
4788 to yyps->NAME so it can be used in yypush_parse.
4789 (yypush_parse): Don't omit uses of yynerrs in push mode.
4790
4791 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4792
4793 Fix bug such that the first pushed token's value and location are
4794 sometimes overwritten (sometimes by %initial-action) before being used.
4795 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
4796 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
4797 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
4798 more closely mimic the pull parser logic.
4799 Don't copy the pushed token to yychar, yylval, and yylloc until it's
4800 time to read a token, which is after any initialization of yylval and
4801 yylloc.
4802 (gottoken): Rename label to...
4803 (yyread_pushed_token): ... for clarity and to avoid infringing on the
4804 user namespace.
4805
4806 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4807
4808 Rearrange initialization of the parser state variables so that the
4809 skeleton doesn't have to have a copy for pull mode and another for push
4810 mode. This patch also fixes at least a bug such that yylloc was not
4811 initialized (with b4_location_initial_line and
4812 b4_location_initial_column) upon calling yypush_parse. However, that
4813 initialization now overwrites the first token's location;
4814 %initial-action assigning @$ already did the same thing, and both bugs
4815 will be fixed in a later patch.
4816 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
4817 (b4_declare_parser_state_variables): Remove initialization of yytoken,
4818 yyss, yyvs, yyls, and yystacksize.
4819 (yypstate_new): Remove initialization of some yypstate fields: yystate,
4820 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
4821 yylsp.
4822 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
4823 yyps->NAME so it can be used in yypush_parse.
4824 (yyparse or yypush_parse): For yypush_parse, don't print the
4825 "Starting parse" diagnostic for invocations after the first.
4826 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
4827 yypush_parse, only do it for the first invocation.
4828 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
4829 initialization to occur in yypush_parse but only on the first
4830 invocation.
4831
4832 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4833
4834 * data/push.c: Add CPP guards around push parser declarations in both
4835 the header and the code file.
4836 In the code file, move the push parser declarations to the same place
4837 they appear in the header file.
4838 Clean up the M4 some, especially the inconsistent underquoting in
4839 some b4_c_function_def and b4_c_function_decl uses.
4840
4841 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4842
4843 Encapsulate the push parser state variables into an M4 macro so the
4844 push skeleton doesn't have to list them again for pull mode's yyparse.
4845 For push mode, remove yypush_parse's local equivalents of these
4846 variables to eliminate unnecessary copying between the two sets at
4847 run-time. This patch also fixes at least a bug related to multiple
4848 %initial-action invocations in push mode.
4849 * data/push.c (b4_declare_parser_variables): Rename to...
4850 (b4_declare_scanner_communication_variables): ... this for clarity and
4851 update both uses.
4852 (b4_declare_yyparse_variables): Remove and move its contents to the one
4853 spot where it was invoked.
4854 (b4_declare_parser_state_variables): New macro containing the parser
4855 state variables required by push mode.
4856 (struct yypstate): Replace all fields but yynew with
4857 b4_declare_parser_state_variables.
4858 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
4859 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
4860 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
4861 (yyparse or yypush_parse): For yyparse in pull mode, replace local
4862 parser state variable declarations with
4863 b4_declare_parser_state_variables.
4864 Don't initialize parser state variables when calling yypush_parse since
4865 yypstate_new already does that.
4866 Invoke the user's initial action only upon the first yypush_parse
4867 invocation.
4868 Remove all code that copies between the local parser state variables
4869 and the yypstate.
4870
4871 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4872
4873 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
4874 prevent a name collision in a future patch where these names will
4875 sometimes be #define'd.
4876 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
4877 since it no longer has the same name as the existing argument.
4878 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
4879
4880 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
4881 and Joel E. Denny <jdenny@ces.clemson.edu>
4882
4883 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4884 that the argument is case-insensitive, and there's no `=' here.
4885 For the %skeleton entry, mention that %language is better.
4886 (Bison Options): Likewise for --language and --skeleton. Move the
4887 --skeleton entry so that the `Tuning the parser' section is sorted
4888 alphabetically on long options.
4889 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
4890 %language directive in detail here; cross-reference the %language
4891 documentation instead.
4892 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
4893 `%require "2.3b"' so that the example is always up-to-date.
4894 (Table of Symbols): Add entries for %language and %skeleton.
4895 * examples/extexi (normalize): Instead of replacing every %require
4896 argument with the current Bison version, just substitute for
4897 `@value{VERSION}'. This guarantees that we're testing what actually
4898 appears in the documentation.
4899 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
4900 rather than `@VERSION@'.
4901
4902 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4903
4904 * NEWS: Reword the %language news a bit, and put it earlier.
4905
4906 * src/getargs.c (skeleton_arg): Last arg is now location const *.
4907 Rewrite to simplify the logic.
4908 (language_argmatch): Likewise.
4909 (program_name): We now own this var.
4910 * src/getargs.h (struct bison_language): Use char[] rather than
4911 const char *.
4912
4913 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
4914 Java is supported.
4915 * src/complain.c (program_name): Remove decl; no longer needed.
4916 * src/main.c (program_name): Remove; now belongs to getargs.
4917
4918 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
4919
4920 * NEWS: Document %language.
4921
4922 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
4923
4924 * data/c-skel.m4, data/c++-skel.m4: New files.
4925 * data/glr.c: Complain on push parsers.
4926
4927 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
4928 over %skeleton.
4929 (Decl Summary): Document %language and %skeleton.
4930 (Command line): Document -L.
4931
4932 * examples/extexi: Rewrite %require directive.
4933 * examples/calc++/Makefile.am: Pass VERSION to extexi.
4934
4935 * src/files.c (compute_exts_from_gc): Look in language structure
4936 for .y extension.
4937 (compute_file_name_parts): Check whether .tab should be added.
4938 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
4939 (language, skeleton_arg, language_argmatch): New.
4940 (long_options): Add --language.
4941 (getargs): Use skeleton_arg, add -L/--language.
4942 * src/getargs.h: Include location.h.
4943 (struct bison_language, language, skeleton_arg, language_argmatch): New.
4944 * src/output.c (prepare): Pick default skeleton from struct language.
4945 Don't dispatch C skeletons here.
4946 * src/parse-gram.y (PERCENT_LANGUAGE): New.
4947 (prologue_declaration): Add "%language" rule, use skeleton_arg.
4948 * src/scan-gram.l ("%language"): New rule.
4949
4950 * tests/calc.at: Test %skeleton and %language.
4951 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
4952 (AT_GLR_IF): Look for %skeleton "glr.cc".
4953 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
4954 (AT_YACC_IF): Reject %language.
4955
4956 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4957
4958 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
4959 since it wasn't used; only the typedef name 'semantic_type' is needed.
4960 Also, omit trailing white space.
4961
4962 * bootstrap: Sync from coreutils.
4963 (gnulib_extra_files): Add build-aux/announce.gen.
4964 (slurp): Adjust .gitignore files like .cvsignore files.
4965 * build-aux/announce-gen: Remove from CVS, since bootstrap
4966 now creates this.
4967
4968 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
4969
4970 Make %push-parser imply %pure-parser. This fixes several bugs; see
4971 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
4972 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
4973 pure_parser = true.
4974 * data/push.c: Don't bother testing b4_push_if when deciding whether
4975 to expand b4_declare_parser_variables globally.
4976 (yypush_parse): Likewise in here.
4977
4978 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
4979 (yy_reduce_print): Reformat M4 for readability.
4980
4981 2006-12-15 Bob Rossi <bob@brasko.net>
4982 and Joel Denny <jdenny@ces.clemson.edu>
4983
4984 * data/push.c (yypstate): Add typedef, and update all uses of
4985 struct yypstate to just yypstate.
4986 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
4987
4988 2006-12-14 Bob Rossi <bob@brasko.net>
4989
4990 * data/push.c (yypush_parse): Declare prototype regardless of
4991 %locations option.
4992
4993 2006-12-14 Bob Rossi <bob@brasko.net>
4994
4995 * data/push.c (yyparse): Remove the prototype and the #define when in
4996 push-parser mode.
4997
4998 2006-12-13 Bob Rossi <bob@brasko.net>
4999
5000 * data/push.c (yypstate_init): Rename to...
5001 (yypstate_new): ... this and use b4_c_function_def.
5002 (yypstate_delete): New.
5003 (yypush_parse): Change parameters yynval and yynlloc to be const.
5004 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5005 yypstate_delete functions.
5006
5007 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5008
5009 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5010 strange test case titles. Reported by Bob Rossi.
5011
5012 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5013
5014 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5015 of potential ambiguities in GLR grammers.
5016
5017 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5018
5019 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5020 `bison ', use m4_index instead of m4_substr since chopping up a string
5021 containing M4-special characters causes problems here.
5022
5023 Fix a couple of bugs related to special characters in user-specified
5024 file names, and make it easier for skeletons to compute output file
5025 names with the same file name prefix as Bison-computed output file
5026 names.
5027 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5028 b4_parser_file_name and b4_spec_defines_file instead of
5029 @output_parser_name@ and @output_header_name@, which are now redundant.
5030 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5031 b4_parser_file_name, b4_spec_defines_file, and the new
5032 @basename(FILENAME@) instead of @output_parser_name@ and
5033 @output_header_name@, which inappropriately escaped the file names as
5034 C string literals.
5035 * src/files.c (all_but_ext): Remove static qualifier.
5036 (compute_output_file_names): Move `free (all_but_ext)' to...
5037 (output_file_names_free): ... here since all_but_ext is needed later.
5038 * src/files.h (all_but_ext): Extern.
5039 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5040 exactly what MUSCLE_INSERT_STRING used to do.
5041 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5042 characters are escaped properly.
5043 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5044 all_but_ext.
5045 For pkgdatadir muscle, maintain previous functionality by using
5046 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5047 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5048 digraphs would never be expanded. Hopefully no one has M4-special
5049 characters in his Bison installation path.
5050 * src/scan-skel.l: Don't parse @output_header_name@ and
5051 @output_parser_name@ anymore since they're now redundant.
5052 In @output, use decode_at_digraphs.
5053 Parse a new @basename command that invokes last_component.
5054 (decode_at_digraphs): New.
5055 (BASE_QPUTS): Remove unused.
5056 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5057 (Output file name): New tests.
5058
5059 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5060
5061 Warn about output files that are generated by the skeletons and that
5062 conflict with other output files.
5063 * data/glr.c: Don't generate the header file here when glr.cc does.
5064 * src/files.c (file_names, file_names_count): New static globals.
5065 (compute_output_file_names): Invoke output_file_name_check for files
5066 not generated by the skeletons and remove existing checks.
5067 (output_file_name_check): New function that warns about conflicting
5068 output file names.
5069 (output_file_names_free): Free file_names.
5070 * src/files.h (output_file_name_check): Declare.
5071 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5072 the skeletons.
5073 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5074 (Conflicting output files): New tests.
5075
5076 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5077
5078 * doc/bison.texinfo: Fix a couple of typos.
5079
5080 2006-12-08 Bob Rossi <bob@brasko.net>
5081
5082 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5083 Rename to...
5084 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5085 update all uses.
5086 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5087 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5088 local pv.
5089 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5090 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5091
5092 2006-12-07 Bob Rossi <bob@brasko.net>
5093 and Joel Denny <jdenny@ces.clemson.edu>
5094
5095 * data/push.c (yypvarsinit): Change return type from void* to struct
5096 yypvars*. No longer cast to void* on return.
5097 (struct yypvars): Remove yylen since it need not be remembered between
5098 yypushparse invocations.
5099 (yypushparse): Don't copy between yylen and pv->yylen.
5100
5101 2006-12-05 Bob Rossi <bob@brasko.net>
5102
5103 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5104 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5105 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5106 (struct yypvars): Remove b4_declare_parser_variables.
5107 (yypvarsinit): Remove init code for removed variables.
5108 (global scope): Do not declare b4_declare_parser_variables if
5109 push or pure mode.
5110 (yypushparse): Add b4_declare_parser_variables.
5111 Init new local variables, and remove init code for removed
5112 yypvars variables.
5113 (yyparse): Delete.
5114 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5115 and yyparse for other modes.
5116 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5117 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5118 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5119 (AT_PURE_LEX_IF): True if pure or push parser.
5120
5121 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5122
5123 Document Yacc prologue alternatives and default %destructor's and
5124 %printer's as experimental. Don't mention Java yet. Discussed at
5125 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5126 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5127 (2.3a): Annotate this entry to say the old forms of these features were
5128 also experimental.
5129 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
5130 Table of Symbols): Say they're experimental. Comment out any mention
5131 of Java (we'll want this back eventually).
5132
5133 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5134
5135 Support a file name argument to %defines. Deprecate `=' in
5136 %file-prefix, %name-prefix, and %output. Discussed at
5137 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5138 * NEWS (2.3a+): Mention.
5139 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
5140 form of %defines, and remove `=' from entries for %file-prefix,
5141 %name-prefix, and %output.
5142 * src/parse-gram.y (prologue_declaration): Implement.
5143 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5144 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5145 all but one occurrence of %name-prefix.
5146 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5147 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5148 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5149 occurrence of each of %file-prefix and %output. Add check for %defines
5150 with argument.
5151 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5152 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5153 Remove the `=' from %output.
5154
5155 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5156
5157 Don't escape $ in test case titles since Autoconf 2.61 now does that
5158 correctly.
5159 * tests/actions.at (Default %printer and %destructor are not for error
5160 or $undefined): Here.
5161 (Default %printer and %destructor are not for $accept): Here.
5162 * tests/input.at (Invalid $n and @n): Here.
5163
5164 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5165
5166 Rename <!> to <>. Discussed starting at
5167 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5168 * NEWS (2.3a+): Update.
5169 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
5170 Update.
5171 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5172 * src/scan-gram.l (INITIAL): Implement.
5173 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5174 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5175 comment.
5176 * tests/actions.at (Default tagless %printer and %destructor,
5177 Default tagged and per-type %printer and %destructor,
5178 Default %printer and %destructor are not for error or $undefined,
5179 Default %printer and %destructor are not for $accept,
5180 Default %printer and %destructor for mid-rule values): Update.
5181 * tests/input.at (Default %printer and %destructor redeclared,
5182 Unused values with default %destructor): Update.
5183
5184 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
5185
5186 Don't let %prec take a nonterminal.
5187 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5188 token.
5189 * tests/input.at (%prec takes a token): New test checking that %prec
5190 won't take a nonterminal.
5191
5192 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5193
5194 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5195 it was double-quoted.
5196 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5197 grammar is maintained with Bison's highest standards.
5198 * src/getargs.c: Fix some typos in Doxygen comments.
5199
5200 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5201
5202 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5203 later. Reported by Paul Eggert in
5204 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5205 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5206 * src/scan-code.l (translate_action): Don't bother invoking
5207 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5208 (code_scanner_free): Instead of invoking
5209 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5210 which frees more.
5211 * src/scan-gram.l (gram_scanner_free): Likewise.
5212 * src/scan-skel.l (scan_skel): Likewise.
5213
5214 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5215
5216 * src/files.c (tr): Change return type to void.
5217 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5218 has been called previously for the same key.
5219 (muscle_find): Return storage instead of value so that
5220 --enable-gcc-warnings doesn't produce warnings that the return discards
5221 const. aver that the value and storage are the same since storage
5222 could potentially be NULL when value is not.
5223 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5224 same as 0.
5225
5226 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5227
5228 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5229 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5230 us a slightly cleaner distribution, and also works.
5231 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5232 gnulib changes.
5233
5234 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5235 and Paul Eggert <eggert@cs.ucla.edu>
5236
5237 Don't let Bison leak memory except when it complains.
5238 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5239 (spec_defines_file, dir_prefix): Now char *, not const char *,
5240 since they are freed.
5241 * src/files.c: Likewise.
5242 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5243 Likewise.
5244 (tr): Now operates in-place. All uses changed.
5245 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5246 values.
5247 (compute_file_name_parts, compute_output_file_names): Don't store
5248 read-only data in variables that will be freed.
5249 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5250 src_extension, and header_extension.
5251 (output_file_names_free): New public function to free
5252 spec_verbose_file, spec_graph_file, spec_defines_file,
5253 parser_file_name, and dir_prefix.
5254 * src/getargs.c (getargs): Don't store read-only data in variables that
5255 will be freed.
5256 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5257 (which previously existed but was unused), and quotearg_free.
5258 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5259 * src/muscle_tab.c: Likewise.
5260 (muscle_entry): Make the value char const *,
5261 and add a new storage member that is char * and can be freed.
5262 (muscle_entry_free): New private function.
5263 (muscle_init): Use it instead of free.
5264 (muscle_insert, muscle_grow): Update and use new storage member.
5265 (muscle_code_grow): Free the string passed to muscle_grow
5266 since it's not needed anymore.
5267 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5268 add a new `char *code' member.
5269 ("{...}"): Declare semantic type as code.
5270 * src/scan-code.h (translate_rule_action):
5271 (translate_symbol_action, translate_code, translate_action): Return
5272 `char const *' rather than `char *' since external code should not free
5273 these strings.
5274 * src/scan-code.l: Likewise.
5275 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5276 which is "{...}" in the parser.
5277 * tests/Makefile.am (maintainer-check-valgrind): Set
5278 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5279 Valgrind.
5280 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5281 complain.
5282 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5283 expecting a non-zero exit status sets --leak-check=summary and
5284 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5285 this case, and we don't want to hear about it.
5286
5287 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5288
5289 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5290 instead of from the template, to simplify configuration a bit.
5291 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5292 and m4/wint_t.m4, as they are needed with the latest gnulib.
5293
5294 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5295
5296 Disable unset/unused mid-rule value warnings by default, and recognize
5297 --warnings=midrule-values to enable them. Discussed starting at
5298 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5299 * NEWS (2.3a+): Mention.
5300 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5301 warnings): Add entry for midrule-values subargument.
5302 * src/reader.c (symbol_should_be_used): Don't return true just because
5303 the value is a set/used mid-rule value unless
5304 --warnings=midrule-values was specified.
5305 * tests/input.at (Unused values, Unused values before symbol
5306 declarations): Run tests with and without --warnings=midrule-values.
5307
5308 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5309 than LIST_FREE directly.
5310
5311 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5312
5313 Finish implementing --warnings=error, which should not be implied by
5314 --warnings=all (or by its synonyms -W and --warnings without
5315 subarguments).
5316 * src/complain.c (set_warning_issued): New function to report that
5317 warnings are being treated as errors and to record an error if so.
5318 Invoke...
5319 (warn_at, warn): ... here.
5320 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5321 "error - warnings are errors" does not appear above "all - all of the
5322 above".
5323 (getargs): For -W and --warnings without subarguments, don't let
5324 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5325 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5326
5327 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5328
5329 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5330 empty subargument list. For example: `bison --warnings= parser.y'.
5331
5332 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5333
5334 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5335 the parser header file so that gcc doesn't warn.
5336
5337 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5338
5339 Split the default %destructor/%printer into two kinds: <*> and <!>.
5340 Discussed starting at
5341 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5342 * NEWS (2.3a+): Mention.
5343 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5344 previous change today related to mid-rules.
5345 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
5346 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
5347 (TYPE_TAG_ANY): Add as <*>.
5348 (TYPE_TAG_NONE): Add as <!>.
5349 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5350 for <*> and <!>.
5351 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5352 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5353 * src/symlist.c (symbol_list_default_new): Split into tagged and
5354 tagless versions.
5355 (symbol_list_destructor_set, symbol_list_printer_set): Split
5356 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5357 SYMLIST_DEFAULT_TAGLESS.
5358 * src/symlist.h: Update symbol_list_default*_new prototypes.
5359 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5360 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5361 * src/symtab.c (default_destructor, default_destructor_location,
5362 default_printer, default_printer_location): Split each into tagged and
5363 tagless versions.
5364 (symbol_destructor_get, symbol_destructor_location_get,
5365 symbol_printer_get, symbol_printer_location_get): Implement tagged
5366 default and tagless default cases.
5367 (default_destructor_set, default_printer_set): Split each into tagged
5368 and tagless versions.
5369 * src/symtab.h: Update prototypes.
5370 * tests/actions.at (Default %printer and %destructor): Rename to...
5371 (Default tagless %printer and %destructor): ... this, and extend.
5372 (Per-type %printer and %destructor): Rename to...
5373 (Default tagged and per-type %printer and %destructor): ... this, and
5374 extend.
5375 (Default %printer and %destructor for user-defined end token): Extend.
5376 (Default %printer and %destructor are not for error or $undefined):
5377 Update.
5378 (Default %printer and %destructor are not for $accept): Update.
5379 (Default %printer and %destructor for mid-rule values): Extend.
5380 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5381 (Unused values with default %destructor): Extend.
5382
5383 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5384
5385 Don't apply the default %destructor/%printer to an unreferenced midrule
5386 value. Mentioned at
5387 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5388 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5389 like $@n instead of just @n so that the default %destructor/%printer
5390 logic doesn't see them as user-defined symbols.
5391 (symbol_is_dummy): Check for both forms of the name.
5392 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5393 name for which the midrule value is referenced in any action.
5394 * tests/actions.at (Default %printer and %destructor for mid-rule
5395 values): New test.
5396 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5397 for change to dummy symbol names.
5398
5399 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5400
5401 Warn about unset midrule $$ if the corresponding $n is used.
5402 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5403 $n usage.
5404 (packgram): Before invoking grammar_rule_check on any rule, make sure
5405 all actions have already been scanned in order to set `used' flags.
5406 Otherwise, checking that a midrule's $$ is set will not always work
5407 properly because the midrule check must forward-reference the midrule's
5408 parent rule.
5409 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5410 warning.
5411
5412 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5413
5414 More improvements to the documentation of the prologue alternatives:
5415 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5416 Bison manual.
5417 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5418 some text to clarify the relative importance of the new directives and
5419 to show how these directives may be viewed as code labels.
5420
5421 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5422
5423 Similar to the recently removed %before-header, add %code-top as the
5424 alternative to the pre-prologue. Mentioned at
5425 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5426 Also, let the prologue alternatives appear in the grammar section.
5427 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5428 (prologue_declaration): Move the existing prologue alternatives to...
5429 (grammar_declaration): ... here and add %code-top.
5430 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5431
5432 Clean up and extend documentation for the prologue alternatives.
5433 * NEWS (2.3a+): Describe prologue alternatives.
5434 * doc/bison.texinfo (Prologue): Move discussion of prologue
5435 alternatives to...
5436 (Prologue Alternatives): ... this new section, and extend it to discuss
5437 all 4 directives in detail.
5438 (Table of Symbols): Clean up discussion of prologue alternatives and
5439 add %code-top.
5440
5441 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5442
5443 DJGPP specific issues.
5444
5445 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5446 config.bat accordingly.
5447 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5448 * djgpp/config.site: Likewise.
5449
5450 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
5451
5452 Replace %*-header with %provides, %requires, %code. See discussion at
5453 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5454
5455 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5456 (b4_user_start_header): Remove.
5457 * data/glr.c: Use new macros instead of b4_*start_header
5458 and b4_*end_header.
5459 * data/glr.cc: Likewise.
5460 * data/lalr1.cc: Likewise.
5461 * data/push.c: Likewise.
5462 * data/yacc.c: Likewise.
5463
5464 * doc/bison.texinfo: Remove %before-header, rename
5465 %{start,end,after}-header to %requires, %provides, %code.
5466
5467 * src/parse-gram.y: Likewise (also rename token names accordingly).
5468 * src/scan-gram.l: Likewise.
5469 * tests/actions.at: Likewise.
5470
5471 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5472
5473 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5474 Problem reported by Joel E. Denny.
5475
5476 2006-10-14 Jim Meyering <jim@meyering.net>
5477
5478 (Sync from coreutils.)
5479 Work also when the working directory (with e.g. coreutils sources)
5480 is version controlled with git, rather than CVS.
5481 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5482 rather than CVS.
5483 In messages and comments, say e.g., "checked-out sources",
5484 rather than "CVS sources".
5485 (version_controlled_file): New function. Work for git as well as
5486 for CVS. Don't use grep's -q option.
5487 (slurp): Call it here, in place of CVS-specific code.
5488
5489 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5490
5491 Fix testsuite for ./configure --enable-gcc-warnings:
5492 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5493 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5494 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5495 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5496 * test/regression.at (Diagnostic that expects two alternatives):
5497 Likewise.
5498
5499 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5500
5501 * bootstrap.conf (gnulib_modules): Add config-h.
5502 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5503 worry about HAVE_CONFIG_H.
5504 * lib/abitset.c: Likewise.
5505 * lib/bitset.c: Likewise.
5506 * lib/bitset_stats.c: Likewise.
5507 * lib/bitsetv-print.c: Likewise.
5508 * lib/bitsetv.c: Likewise.
5509 * lib/ebitset.c: Likewise.
5510 * lib/get-errno.c: Likewise.
5511 * lib/lbitset.c: Likewise.
5512 * lib/subpipe.c: Likewise.
5513 * lib/timevar.c: Likewise.
5514 * lib/vbitset.c: Likewise.
5515 * lib/bitset.c: Include "bitset.h" first, to test interface.
5516 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5517 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5518 * lib/bitsetv.c: Include "bitsetv.h" first.
5519 * lib/get-errno.c: Include "get-errno.h" first.
5520 * m4/.cvsignore: Add config-h.m4.
5521 * tests/actions.at (Default %printer and %destructor for ...):
5522 Adjust expected line numbers in output to reflect removal of #if
5523 HAVE_CONFIG_H lines.
5524 * tests/glr-regression.at (Missed %merge type warnings when ...):
5525 Likewise.
5526 * tests/regression.at (Braced code in declaration in rules section):
5527 Likewise.
5528 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5529 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5530 Include <config.h> unconditionally.
5531
5532 * bootstrap: Sync from coreutils, as follows:
5533
5534 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5535
5536 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5537 variable was sometimes used without being initialized. This
5538 messed up the installation of the INSTALL file in some cases.
5539
5540 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5541
5542 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5543 --copy. Inspired by a suggestion from Bruno Haible.
5544
5545 2006-10-03 Jim Meyering <jim@meyering.net>
5546
5547 * bootstrap: Undo last change to this file, since now gnulib-tool
5548 sticks with the automake default in generating dependencies.
5549
5550 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5551
5552 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5553 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5554
5555 * doc/bison.1: Add copyright notice.
5556
5557 * data/glr.c: Don't include <stdarg.h>; not used.
5558
5559 * NEWS: The -g and --graph options now output graphs in Graphviz
5560 DOT format, not VCG format.
5561 * doc/bison.1: Likewise.
5562 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
5563 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5564 of this change in
5565 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
5566 * TODO: Remove Graphviz entry.
5567 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5568 remove vcg.c, vcg.h, vcg_defaults.h.
5569 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5570 * src/graphviz.c, src/graphviz.h: New files.
5571 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5572 * src/files.h: Make comment more generic.
5573 * src/main.c (main): Likewise.
5574 * src/print_graph.h: Likewise.
5575 * src/getargs.c (usage): Make usage description more generic.
5576 * src/print_graph.c: Include graphviz.h rather than vcg.h.
5577 (static_graph, fgraph): Remove. All uses changed to pass
5578 arguments instead of sharing a static var.
5579 (print_core, print_actions, print_state, print_graph):
5580 Output graphviz format rather than VCG format.
5581 * tests/.cvsignore: Remove *.vcg; add *.dot.
5582 * tests/output.at: Expect *.dot files, not *.vcg files.
5583
5584 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
5585 accommodates the 2006-10-08 change.
5586
5587 2006-10-11 Bob Rossi <bob@brasko.net>
5588
5589 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
5590 (b4_yyssa, b4_yyerror_range): New macros.
5591 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
5592 (yypvarsinit): Remove init of removed fields.
5593 (yypushparse): Remove use of removed fields; use new macros instead.
5594
5595 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5596
5597 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
5598 in a push parser. Reindent slightly to match yacc.c better.
5599
5600 2006-10-11 Bob Rossi <bob@brasko.net>
5601
5602 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
5603 yymsg_alloc fields.
5604 (yypvarsinit, yypushparse): Remove init of removed fields.
5605 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
5606
5607 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5608
5609 * THANKS: Add Paolo Bonzini and Bob Rossi.
5610
5611 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
5612
5613 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
5614 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
5615 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
5616 b4_define_user_cde and uses): Remove.
5617 (b4_comment, b4_prefix, b4_sync_start): New.
5618 * data/bison.m4: New file, with most of the content removed from c.m4.
5619 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
5620 * src/output.c (output_skeleton): Pass bison.m4.
5621 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
5622 only if specified.
5623
5624 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
5625
5626 Fix test failure reported by Tom Lane in
5627 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
5628 and try to make such failures easier to catch in the future.
5629 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
5630 that's now the caller's responsibility.
5631 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
5632 Set yychar = YYEOF if it's negative.
5633 * tests/actions.at (yylex): Abort if asked to read past EOF.
5634 * tests/conflicts.at (yylex): Likewise.
5635 * tests/cxx-type.at (yylex): Likewise.
5636 * tests/glr-regression.at (yylex): Likewise.
5637 * tests/input.at (yylex): Likewise.
5638 * tests/regression.at (yylex): Likewise.
5639 * tests/torture.at (yylex): Likewise.
5640
5641 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
5642
5643 Fix problems with translating English-language diagnostics.
5644 * bootstrap: Fix bug introduced in recent bootstrap changes, with
5645 respect to bison-runtime pot generation. The YY_ stuff
5646 wasn't being captured.
5647 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
5648 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
5649 * runtime-po/POTFILES.in: Add data/push.c.
5650
5651 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5652
5653 Merge bootstrap changes from coreutils.
5654
5655 2006-09-28 Jim Meyering <jim@meyering.net>
5656
5657 Automatically generated dependencies are important even
5658 when all of the sources in a directory come from gnulib.
5659 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
5660 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
5661
5662 2006-09-23 Jim Meyering <jim@meyering.net>
5663
5664 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
5665
5666 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5667
5668 * bootstrap: Add support for --force.
5669 (usage): New function. Describe usage less tersely.
5670 (CVS_only_file): New var.
5671
5672 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
5673
5674 * data/push.c (YYPUSH_MORE): Make it an enum instead.
5675 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
5676 Adjust white space and comments to match GNU style better.
5677
5678 2006-09-20 Bob Rossi <bob@brasko.net>
5679
5680 * data/push.c (yyresult_get): Remove function.
5681 (YYPUSH_MORE): Add #define.
5682 (yypushparse): Modify return value.
5683
5684 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5685
5686 * stamp-h.in: Remove; no longer needed.
5687 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
5688 Remove config.h, config.hin, intl (no longer created).
5689 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
5690 stamp-h1.
5691
5692 Sync bootstrap from coreutils, as follows:
5693
5694 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
5695
5696 * bootstrap (symlink_to_gnulib): New function.
5697 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
5698 to copies-of-gnulib.
5699 (cp_mark_as_generated, slurp, gnulib_files):
5700 Avoid making a copy if it's the same as the old version.
5701 (gnulib_files): Add support for this variable (used by Bison).
5702
5703 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5704
5705 * src/getargs.c (usage): Rework to use conventions similar to
5706 coreutils, to make translation a bit easier and the code a bit
5707 smaller. Problem reported by Tim Van Holder.
5708
5709 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
5710
5711 Use some of gnulib's new modules, taken from coreutils.
5712
5713 * bootstrap: Sync from coreutils, except add support for gnulib_files.
5714 * bootstrap.conf: New file.
5715 (gnulib_modules): Add configmake, inttypes, unistd.
5716 (XGETTEXT_OPTIONS): Add complain, complain_at,
5717 fatal, fatal_at, warn, warn_at, unexpected_end.
5718 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
5719 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
5720 (gl_EARLY): Add.
5721 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
5722 (gl_INIT): Add
5723 (GNULIB_AUTOCONF_SNIPPET): Remove.
5724 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
5725 the pickiest.
5726 * lib/.cvsignore: Add inttypes_.h.
5727 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
5728 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
5729 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
5730 no-longer-necessary initializations.
5731 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
5732 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
5733 use the unistd module.
5734 * src/system.h: Likewise.
5735 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
5736 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
5737 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
5738 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
5739 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
5740 * src/system.h: Include inttypes.h unconditionally, now that we
5741 use the inttypes module. Don't bother to include stdint.h, since
5742 inttypes.h now does that for us.
5743 (LOCALEDIR): Remove, now that we use the configmake module.
5744 * src/getargs.c: Include configmake.h.
5745 * src/main.c: Likewise.
5746 * src/output.c: Likewise.
5747 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
5748 not from $abs_top_builddir, since config.h moved.
5749
5750
5751 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
5752 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
5753
5754 * src/parse-gram.y (symbol_declaration): Don't put statements
5755 before declarations; it's not portable to C89.
5756 * src/scan-code.l (handle_action_at): Likewise.
5757
5758 * src/scan-code.l: Always initialize braces_level; the old code
5759 left it uninitialized and therefore had undefined behavior.
5760
5761 Don't attempt to redefine 'assert', since it runs afoul of
5762 systems where standard headers (mistakenly) include <assert.h>.
5763 Instead, define and use our own alternative, called 'aver'.
5764 * src/reader.c: Don't include assert.h, since we no longer
5765 use assert.
5766 * src/scan-code.l: Likewise.
5767 * src/system.h (assert): Remove, replacing with....
5768 (aver): New function, taking a bool arg. All uses changed.
5769 * src/tables.c (pack_vector): Ensure that aver arg is bool,
5770 not merely an integer.
5771
5772 2006-09-15 Bob Rossi <bob@brasko.net>
5773
5774 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
5775 * data/c.m4 (YYPUSH): New.
5776 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
5777 * src/getargs.c (push_parser): New var.
5778 * src/getargs.h (push_parser): New declaration.
5779 * src/output.c (prepare): Add macro insertion of `push_flag'.
5780 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
5781 (prologue_declaration): Parse %push-parser.
5782 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
5783 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
5784 list of removed lines from the traces observed.
5785 (AT_CHECK_CALC_LALR): Added push parser tests.
5786
5787 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
5788
5789 * NEWS: Version 2.3a.
5790 * configure.ac (AC_INIT): Likewise.
5791
5792 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
5793 "#define YYSTYPE int" that caused "make maintainer-check" to fail
5794 due to header ordering dependencies. I don't know why the #define
5795 was there.
5796
5797 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
5798 runtime cost when YYDEBUG is not defined, and so that some tests
5799 that used to fail now work. Problem and initial suggestion by
5800 Paolo Bonzini.
5801 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
5802 * data/glr.cc (b4_parser_class_name):
5803 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
5804 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
5805 (yydebug_) [YYDEBUG]: New member.
5806 (yycdebug_): Now defined only if YYDEBUG.
5807 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
5808 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
5809 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
5810 if YYYDEBUG.
5811 (debug_stream, set_debug_stream, debug_level, set_debug_level):
5812 Define only if YYDEBUG.
5813 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
5814 set_debug_level.
5815 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
5816 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
5817 AT_CHECK_CALC_GLR_CC that are working now.
5818
5819 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
5820
5821 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
5822 We don't need them in glr.cc, and glr.c defines them.
5823 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
5824 assumes that defining it to anything is the same as defining
5825 it to 1. Problem reported by Paolo Bonzini.
5826
5827 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
5828
5829 * data/c.m4 (b4_null, b4_case): Define.
5830 * src/output.c (prepare_symbols): Use b4_null.
5831 (user_actions_output): Use b4_case.
5832
5833 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
5834
5835 * data/glr.c (b4_shared_declarations): Put start-header first,
5836 before any #includes that we generate, so that feature-test
5837 macros work. Problem reported by Michael Deutschmann in
5838 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
5839 * data/lalr1.cc: Likewise.
5840 * doc/bison.texinfo (Prologue): Document that feature-test macros
5841 should be defined before any Bison declarations.
5842 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
5843 that depend on location.hh after, not before, Bison decls, since
5844 we now include location.hh after the first user prologue.
5845
5846 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
5847 Sander Brandenburg in
5848 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
5849 Also, fix minor white space and comment issues.
5850 (Prologue): Mention that it's better to define feature-test macros
5851 before Bison declarations. Problem reported by Michael Deutschmann.
5852
5853 * README-cvs: Fix typo: "&" should be "&&". Problem reported
5854 by Jim Meyering.
5855 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
5856 This adjusts to recent gnulib changes.
5857
5858 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5859
5860 Finish implementation of per-type %destructor/%printer. Discussed
5861 starting at
5862 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
5863 and
5864 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
5865 * NEWS (2.3+): Add a description of this feature to the default
5866 %destructor/%printer description.
5867 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
5868 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5869 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
5870 list node contains a semantic type.
5871 * src/symtab.c, src/symtab.h: Extend with a table that associates
5872 semantic types with their %destructor's and %printer's.
5873 (semantic_type_from_uniqstr, semantic_type_get,
5874 semantic_type_destructor_set, semantic_type_printer_set): New functions
5875 composing the public interface of that table.
5876 (symbol_destructor_get, symbol_destructor_location_get,
5877 symbol_printer_get, symbol_printer_location_get): If there's no
5878 per-symbol %destructor/%printer, look up the per-type before trying
5879 the default.
5880 * tests/actions.at (Per-type %printer and %destructor): New test case.
5881 * tests/input.at (Default %printer and %destructor redeclared):
5882 Extend to check that multiple occurrences of %symbol-default in a
5883 single %destructor/%printer declaration is an error.
5884 (Per-type %printer and %destructor redeclared, Unused values with
5885 per-type %destructor): New test cases.
5886
5887 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5888
5889 Require default %destructor/%printer to be declared using
5890 %symbol-default instead of an empty symbol list, and start working on
5891 new per-type %destructor/%printer. Discussed at
5892 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
5893 * NEWS (2.3+): Add %symbol-default to example.
5894 * bison.texinfo (Freeing Discarded Symbols): Likewise.
5895 (Table of Symbols): Add entry for %symbol-default.
5896 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
5897 (generic_symlist, generic_symlist_item): New nonterminals for creating
5898 a list in which each item is a symbol, semantic type, or
5899 %symbol-default.
5900 (grammar_declaration): Use generic_symlist in %destructor and %printer
5901 declarations instead of symbols.1 or an empty list.
5902 (symbol_declaration, precedence_declaration, symbols.1): Update actions
5903 for changes to symbol_list.
5904 * src/reader.c: Update for changes to symbol_list.
5905 * src/scan-code.l: Likewise.
5906 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
5907 * src/symlist.c, src/symlist.h: Extend such that a list node may
5908 represent a semantic type or a %symbol-default in addition to just an
5909 ordinary symbol. Add switched functions for setting %destructor's and
5910 %printer's.
5911 * tests/actions.at, tests/input.at: Add %symbol-default to all default
5912 %destructor/%printer declarations.
5913
5914 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
5915
5916 Whether the default %destructor/%printer applies to a particular symbol
5917 isn't a question of whether the user *declares* that symbol (in %token,
5918 for example). It's a question of whether the user by any means
5919 *defines* the symbol at all (by simply using a char token, for
5920 example). $end is defined by Bison whereas any other token with token
5921 number 0 is defined by the user. The error token is always defined by
5922 Bison regardless of whether the user declares it with %token, but we
5923 may one day let the user define error as a nonterminal instead.
5924 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
5925 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
5926 the meaning of "user-defined".
5927 * tests/actions.at (Default %printer and %destructor for user-declared
5928 end token): Rename to...
5929 (Default %printer and %destructor for user-defined end token): ...
5930 this.
5931
5932 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
5933 computation of whether to apply the default, don't maintain a list of
5934 every Bison-defined symbol. Instead, just check for a first character
5935 of '$', which a user symbol cannot have, and check for the error token.
5936
5937 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
5938
5939 Don't apply the default %destructor or %printer to the error token,
5940 $undefined, or $accept. This change fits the general rule that the
5941 default %destructor and %printer are only for user-declared symbols,
5942 and it solves several difficulties that are described in the new test
5943 cases listed below.
5944 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
5945 * tests/actions.at (Default %printer and %destructor are not for error
5946 or $undefined, Default %printer and %destructor are not for $accept):
5947 New test cases.
5948
5949 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
5950
5951 Allow %start after the first rule.
5952 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
5953 when parsing the first rule.
5954 (check_and_convert_grammar): Search for it here after all grammar
5955 declarations have been parsed. Skip midrules, which have dummy LHS
5956 nonterminals.
5957 * src/symtab.c (symbol_is_dummy): New function.
5958 * src/symtab.h (symbol_is_dummy): Declare it.
5959 * tests/input.at (%start after first rule): New test.
5960
5961 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5962
5963 Redo some of the previous commit: add back the ability to use
5964 non-aliased/undeclared string literals since it might be useful to
5965 those declaring %token-table.
5966 * src/reader.c (check_and_convert_grammar): Undo changes in previous
5967 commit: don't worry about complaints from symbols_pack.
5968 * src/symtab.c (symbol_new, symbol_class_set,
5969 symbol_check_alias_consistency): Undo changes in previous commit: count
5970 each string literal as a new symbol and token, assign it a symbol
5971 number, and don't complain about non-aliased string literals.
5972 (symbols_pack): Since symbol_make_alias still does not decrement symbol
5973 and token counts but does still set aliased tokens to the same number,
5974 symbol_pack_processor now leaves empty slots in the symbols array.
5975 Remove those slots.
5976 * tests/regression.at (Undeclared string literal): Remove test case
5977 added in previous commit since non-aliased string literals are allowed
5978 again.
5979 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
5980 remove unnecessary string literal declarations.
5981 * tests/sets.at (Firsts): Likewise.
5982
5983 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5984
5985 Don't allow an undeclared string literal, but allow a string literal to
5986 be used before its declaration.
5987 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
5988 symbols_pack complained.
5989 * src/symtab.c (symbol_new): Don't count a string literal as a new
5990 symbol.
5991 (symbol_class_set): Don't count a string literal as a new token, and
5992 don't assign it a symbol number since symbol_make_alias does that.
5993 (symbol_make_alias): It's not necessary to decrement the symbol and
5994 token counts anymore. Don't assume that an alias declaration occurs
5995 before any uses of the identifier or string, and thus don't assert that
5996 one of them has the highest symbol number so far.
5997 (symbol_check_alias_consistency): Complain if there's a string literal
5998 that wasn't declared as an alias.
5999 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6000 symbol_pack asserts that every token has been assigned a symbol number
6001 although undeclared string literals have not.
6002 * tests/regression.at (String alias declared after use, Undeclared
6003 string literal): New test cases.
6004 (Characters Escapes, Web2c Actions): Declare string literals as
6005 aliases.
6006 * tests/sets.at (Firsts): Likewise.
6007
6008 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6009
6010 In the grammar scanner, STRING_FINISH unclosed constructs and return
6011 them to the parser in order to improve error messages.
6012 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6013 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6014 * tests/input.at (Unclosed constructs): New test case.
6015 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6016 seen.
6017
6018 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6019 unused global.
6020
6021 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6022
6023 Handle string aliases for character tokens correctly.
6024 * src/symtab.c (symbol_user_token_number_set): If the token has an
6025 alias, check and set its alias's user token number instead of its own,
6026 which is set to indicate the alias. Previously, every occurrence of
6027 the character token in the grammar overwrote that alias indicator with
6028 the character code.
6029 * tests/input.at (String aliases for character tokens): New test.
6030
6031 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6032
6033 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6034
6035 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6036
6037 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6038 to prevent failures when building on older platforms.
6039 Check for autopoint failure.
6040 Set XGETTEXT_OPTIONS to values that check for C format strings,
6041 so that translators are warned about them (this also helps
6042 prevent core dumps).
6043
6044 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6045 function, since it simplifies our code a bit.
6046
6047 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6048 rather than -W, so we don't get bogus warnings about sign comparisons.
6049 Add -Wpointer-arith, since that warning is useful (it reports code
6050 that does not conform to C89 and that some compilers reject).
6051 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6052 since it's no longer needed.
6053
6054 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6055
6056 Clean up scanners a bit.
6057 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6058 definitions so gcc won't warn when obstack_for_string is unused.
6059 * src/scan-code.l: config.h and system.h are already #include'd by
6060 scan-code-c.c, so get rid of them here.
6061 * src/scan-gram.l: Likewise.
6062 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6063 definitions rather than duplicating the rest of it.
6064 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6065
6066 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6067
6068 Suppress signed/unsigned comparison warnings for yycheck.
6069 * data/c.m4 (b4_safest_int_type): New macro.
6070 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6071 a signed int type, cast it to b4_safest_int_type first.
6072 * data/yacc.c: Likewise.
6073 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6074 also overwritten.
6075
6076 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6077
6078 * doc/bison.texinfo: Fix some typos.
6079
6080 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6081
6082 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6083 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6084
6085 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6086 the latest gnulib does this a different way.
6087 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6088 translation was patched, so stop omitting it.
6089
6090 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6091
6092 Enable declaration of default %printer/%destructor. Make the parser
6093 use these for all user-declared grammar symbols for which the user does
6094 not declare a specific %printer/%destructor. Thus, the parser uses it
6095 for token 0 if the user declares it but not if Bison generates it as
6096 $end. Discussed starting at
6097 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6098 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6099 and
6100 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6101 * NEWS (2.3+): Mention.
6102 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6103 declare a %destructor for a mid-rule's semantic value. It's just
6104 impossible to declare one specific to it.
6105 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6106 code. Describe default %destructor form.
6107 * src/parse-gram.y (grammar_declaration): Parse default
6108 %printer/%destructor declarations.
6109 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6110 and symbol_destructor_location_get rather than accessing the destructor
6111 and destructor_location members of struct symbol.
6112 (symbol_printers_output): Likewise but for %printer's.
6113 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6114 again.
6115 * src/symtab.c (default_destructor, default_destructor_location,
6116 default_printer, default_printer_location): New static global
6117 variables to record the default %destructor and %printer.
6118 (symbol_destructor_get, symbol_destructor_location_get,
6119 symbol_printer_get, symbol_printer_location_get): New functions to
6120 compute the appropriate %destructor and %printer for a symbol.
6121 (default_destructor_set, default_printer_set): New functions to set the
6122 default %destructor and %printer.
6123 * src/symtab.h: Prototype all those new functions.
6124 * tests/actions.at (Default %printer and %destructor): New test to
6125 check that the right %printer and %destructor are called, that they're
6126 not called for $end, and that $$ and @$ work correctly.
6127 (Default %printer and %destructor for user-declared end token): New
6128 test to check that the default %printer and %destructor are called for
6129 a user-declared end token.
6130 * tests/input.at (Default %printer and %destructor redeclared, Unused
6131 values with default %destructor): New tests to check related grammar
6132 warnings and errors.
6133
6134 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6135
6136 Clean up handling of %destructor for the end token (token 0).
6137 Discussed starting at
6138 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6139 and
6140 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6141
6142 Make the skeletons consistent in how they pop the end token and invoke
6143 its %destructor.
6144 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6145 state, which has token number 0, since this would invoke the
6146 %destructor for the end token.
6147 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6148 until after shifting the end token, or else it won't be popped.
6149 * data/yacc.c (yyparse): Likewise.
6150
6151 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6152 it's the end token. Upon termination, destroy an unshifted lookahead
6153 even when it's the end token.
6154 * data/lalr1.cc (yy::parser::parse): Likewise.
6155 * data/yacc.c (yyparse): Likewise.
6156
6157 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6158 value warnings for the end token when the user gives the end token a
6159 %destructor.
6160
6161 * tests/actions.at (Printers and Destructors): Test all the above.
6162
6163 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6164
6165 Update to latest gnulib and gettext versions.
6166 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6167 Add fopen-safer.
6168 (gnulib_files): Add m4/warning.m4. Don't worry about files
6169 overwritten by autopoint.
6170 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6171 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6172 rejects them.
6173 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6174 so that we can remove the intl files at a better time.
6175 (intl_files_to_remove): Remove aclocal.m4, since it gets
6176 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6177 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6178 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6179 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6180 Remove datarootdir hack; no longer needed.
6181 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6182 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6183 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6184 strdup.h.
6185 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6186 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6187
6188 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
6189
6190 * bootstrap: Adjust to today's change to gnulib-tool by invoking
6191 it with --assume-autoconf='latest-stable'.
6192
6193 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
6194
6195 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6196 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6197 YYSTYPE' and `{'.
6198 * src/muscle_tab.h (muscle_grow): Replace the header comments with
6199 those from muscle_tab.c since the old ones are misleading.
6200
6201 2006-07-13 Akim Demaille <akim@epita.fr>
6202
6203 Support %define "KEY" {VALUE}.
6204 * src/scan-code.h, src/scan-code.l (translate_action)
6205 (translate_rule_action, translate_symbol_action, translate_code):
6206 Return char *, not const char *.
6207 * src/parse-gram.y (declaration): Rename as...
6208 (prologue_declaration): this.
6209 (string_content): Remove this nonterminal, use STRING.
6210 (braceless, content, content.opt): New nonterminal.
6211 Use them.
6212 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6213 as value.
6214 * src/scan-gram.l (getargs.h): Don't include it.
6215
6216 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
6217
6218 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6219 rather than a for-loop that declares a local bool variable. This
6220 should work around a compatibility problem with a Cray x1e C++
6221 compiler reported by Hung Nguyen in
6222 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6223 The for-loop was introduced in the 2004-11-17 change but I don't
6224 know why it was needed.
6225
6226 2006-07-12 Akim Demaille <akim@epita.fr>
6227
6228 * data/c.m4: Comment changes.
6229
6230 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
6231
6232 * src/complain.c (error_message, ERROR_MESSAGE): New.
6233 To factor...
6234 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6235 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6236
6237 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6238
6239 * NEWS: Instead of %union, you can define and use your own union type
6240 YYSTYPE if your grammar contains at least one <type> tag.
6241 Your YYSTYPE need not be a macro; it can be a typedef.
6242 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6243 (Union Decl, Decl Summary): Document this.
6244 * data/glr.c (YYSTYPE): Implement this.
6245 * data/glr.cc (YYSTYPE): Likewise.
6246 * data/lalr1.cc (YYSTYPE): Likewise.
6247 * data/yacc.c (YYSTYPE): Likewise.
6248 * src/output.c (prepare): Output tag_seen_flag.
6249 * src/parse-gram.y (declaration, grammar_declaration):
6250 Use 'union_seen' rather than 'typed' to determine whether
6251 %union has been seen, since grammars can now be typed without
6252 %union.
6253 (symbol_declaration, type.opt, symbol_def):
6254 Keep track of whether a tag has been seen.
6255 * src/reader.c (union_seen, tag_seen): New vars.
6256 (typed): remove.
6257 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6258 * src/scan-code.l (untyped_var_seen): New variable.
6259 (handle_action_dollar): Adjust to above changes.
6260 (handle_action_dollar, handle_action_at):
6261 Improve overflow checking for outlandish numbers.
6262 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6263 avoid new diagnostics generated by above changes.
6264 * tests/regression.at (YYSTYPE typedef): Add test to check
6265 for type tags without %union.
6266
6267 * src/symlist.c (symbol_list_length): Return int, not unsigned
6268 int, since callers expect int. This may need to get revisited
6269 once we have proper integer overflow checking.
6270
6271 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6272 object is now static.
6273
6274 * src/getargs.c (flags_argmatch): Return void, not int,
6275 to pacify ./configure --enable-gcc-warnings.
6276
6277 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6278 since last_string is already defined to FLEX_PREFIX (last_string).
6279
6280 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6281
6282 Implement --warnings/-W.
6283 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6284 replaced by...
6285 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6286 Adjust callers.
6287 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6288 (warnings_args, warnings_types): New.
6289 (getargs, short_options, long_options): Accept -W/--warnings.
6290 Sort the options by alphabetical order, upper case letter right
6291 before its lower case.
6292
6293 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6294
6295 Change %merge result type clash warnings to errors. Discussed at
6296 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6297 * src/reader.c (record_merge_function_type): Use complain_at.
6298 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6299 declared later): Update test case results.
6300
6301 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6302
6303 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6304 to be in alphabetical order.
6305 (trace_args): Spelling fixes.
6306
6307 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6308
6309 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6310 so they don't collide with user-defined macros.
6311 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6312 this was never guaranteed, and now that we're using gnulib stdint,
6313 which defines int_fast16_t to long int, the problem is exposed.
6314
6315 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6316
6317 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6318 need the full POSIX semantics (and weren't implementing them
6319 anyway).
6320
6321 Adjust to Autoconf 2.60 and today's gnulib.
6322 * bootstrap (gnulib_modules): Add stdint.
6323 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6324 no longer copies it.
6325 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6326 since stdint needs the former and wcwidth (which is now required
6327 by mbswidth) needs the latter.
6328 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6329 work around a compatibility glitch between gettext 0.14.6 and
6330 Autoconf 2.60.
6331 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6332 Do not check for uintptr_t, since new stdint module does the right
6333 thing.
6334 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6335 Add stdint.h, stdint_.h, wcwidth.h.
6336 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6337 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6338 stdint.m4, wchar_t.m4, wcwidth.m4.
6339 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6340 usual order for ../lib/*.h files.
6341 (file_name_split): Use last_component, not base_name, to adjust
6342 to gnulib changes.
6343 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6344 for ../lib/*.h files.
6345 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6346 Define unconditionally, since we now assume the stdint module.
6347 * src/scan-skel.l: Include <dirname.h>.
6348 (BASE_QPUTS): Use last_component, not base_name.
6349 * src/system.h: Include <unlocked-io.h> in the usual order
6350 for ../lib/*.h files. Include <stdint.h> unconditionally,
6351 since we now use the stdint module.
6352 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6353 HAVE_UINTPTR_T, since we now use the stdint module.
6354 (base_name): Remove decl, since files now include <dirname.h>
6355 to get the decl.
6356
6357 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6358
6359 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6360 New, default to 1.
6361 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6362 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6363 default.
6364 * tests/calc.at: Adjust.
6365
6366 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6367
6368 * data/c.m4 (b4_basename): New.
6369 (b4_syncline): Also output the location of its invocation (from
6370 the skeleton).
6371 (b4_user_action, b4_define_user_action, b4_user_actions)
6372 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6373 (b4_user_stype): New.
6374 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6375
6376 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6377
6378 In the grammar file, the first column is 1 not 0 on the first line as
6379 on every other line.
6380 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6381 * tests/input.at (Torturing the Scanner): Update output.
6382
6383 * src/scan-gram.l (scanner_cursor): Declare it static.
6384
6385 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6386
6387 In warnings, say "previous declaration" rather than "first
6388 declaration".
6389 * src/symtab.c (redeclaration): Do that here.
6390 * src/reader.c (record_merge_function_type): In the case of a result
6391 type clash, report the previous declaration rather than the very first
6392 one in the grammar file.
6393 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6394 declared later): Add a third declaration to check this behavior.
6395 * tests/input.at (Incompatible Aliases): Update output.
6396
6397 2006-06-27 Akim Demaille <akim@epita.fr>
6398
6399 * doc/Doxyfile.in: New.
6400 * doc/Makefile.am: Use it.
6401 * src/lalr.h, src/symtab.h: Initial doxygenation.
6402
6403 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6404
6405 Don't miss %merge result type warnings just because the LHS types are
6406 declared after the %merge. This continues the effort of the previous
6407 patch.
6408 * src/reader.c (get_merge_function): Don't set the merger type yet.
6409 (record_merge_function_type): New function for setting the merger type
6410 and checking for clashes.
6411 (grammar_current_rule_merge_set): Set the location of the %merge for
6412 the current rule.
6413 (packgram): Invoke record_merge_function_type for each rule now that
6414 all symbol type declarations have been parsed.
6415 * src/reader.h (merger_list.type_declaration_location): New member
6416 storing the location of the first %merge from which the type for this
6417 merging function was derived.
6418 * src/symlist.h (symbol_list.merger_declaration_location): New member
6419 storing the location of a rule's %merge, if any.
6420 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6421 declared later): New test to catch the error fixed by the above patch.
6422
6423 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6424
6425 Get action warnings (grammar_rule_check) right even when symbol
6426 declarations appear after the rules. Discussed at
6427 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6428 and
6429 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6430 Don't mistake the type of $$ in a midrule to be that of its parent
6431 rule's $$.
6432 * src/reader.c (grammar_current_rule_end): Don't invoke
6433 grammar_rule_check yet since not all symbol declarations may have been
6434 parsed yet.
6435 (grammar_midrule_action): Likewise.
6436 Don't record whether the midrule's $$ has been used yet since actions
6437 haven't been translated yet.
6438 Record the midrule's parent rule and its RHS index within the parent
6439 rule.
6440 (grammar_current_rule_action_append): Don't translate the action yet
6441 since not all symbol declarations may have been parsed yet and, thus,
6442 warnings about types for $$, $n, @$, and @n can't be reported yet.
6443 (packgram): Translate the action and invoke grammar_rule_check now that
6444 all symbol declarations have been parsed.
6445 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6446 after parsing the entire grammar file, the symbol list here in the case
6447 of a midrule is actually the midrule's empty RHS, so reference its
6448 parent rule's RHS where necessary.
6449 On the other hand, now that you can already know it's a midrule, you
6450 aren't forced to think $$ has the same type as its parent rule's $$.
6451 (handle_action_at): In the case of a midrule, reference the parent rule
6452 where necessary.
6453 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6454 members.
6455 (symbol_list_length): Now that this is invoked after all rules have
6456 been parsed, a NULL symbol (rather than a NULL symbol list node)
6457 terminates a rule. symbol_list_print already does this correctly.
6458 * src/symlist.h (symbol_list.midrule_parent_rule,
6459 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6460 remember their relationships with their parents.
6461 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6462 fixed by the above patch.
6463 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6464 implementing...
6465 (Unused values): ... this old test case and...
6466 (Unused values before symbol declarations): ... this new test case.
6467 This one is the same as `Unused values' except that all symbol
6468 declarations appear after the rules in order to catch the rest of the
6469 errors fixed by the above patch.
6470
6471 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6472
6473 More cleanup.
6474 * src/reader.c (current_rule): Declare it static since it's no longer
6475 used outside this file.
6476 (grammar_current_rule_action_append): Remove redundant arguments from
6477 translate_rule_action invocation.
6478 * src/reader.h (current_rule): Remove this unused extern.
6479 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6480 * src/scan-code.l (translate_rule_action): Likewise.
6481
6482 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6483
6484 Clean up yesterday's patch.
6485 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6486 to...
6487 * src/reader.c (grammar_current_rule_action_append): ... here for
6488 consistency with grammar_current_rule_symbol_append.
6489 * tests/regression.at (Braced code in declaration in rules section):
6490 Make yyerror and yylex static as usual.
6491
6492 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6493
6494 Fix bug that mistakes braced code in a declaration in the rules section
6495 to be a rule action. Mentioned at
6496 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6497 * src/scan-gram.l: Move midrule action detection from the start of the
6498 scanning of any braced code to...
6499 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6500 action. For readability, use $2 and @2 rather than the equivalent
6501 global variables.
6502 * tests/regression.at (Braced code in declaration in rules section):
6503 New test to catch the error fixed by the above patch.
6504
6505 Work on code readability some.
6506 * src/scan-code.l (current_rule): Get rid of this misleading and
6507 redundant declaration: it's actually extern'ed in reader.h.
6508 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6509 translate_action): Add a rule argument and use it instead of the global
6510 current_rule.
6511 (translate_rule_action): This already receives current_rule through an
6512 argument, so pass it on to translate_action instead of assigning
6513 current_rule to current_rule.
6514 (translate_symbol_action, translate_code): Pass rule = NULL to
6515 translate_action.
6516
6517 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6518
6519 Rename %before-definitions to %start-header and %after-definitions to
6520 %end-header. Don't use these declarations to separate pre-prologue
6521 blocks from post-prologue blocks. Add new order-independent
6522 declarations %before-header and %after-header as alternatives to the
6523 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6524 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6525 * NEWS (2.3+): Update for these changes.
6526 * data/glr.c (b4_before_definitions): Update to...
6527 (b4_start_header): ... this.
6528 (b4_after_definitions): Update to...
6529 (b4_end_header): ... this.
6530 * data/glr.cc: Likewise.
6531 * data/lalr1.cc: Likewise.
6532 * data/yacc.c: Likewise.
6533 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6534 prologue blocks with %*-header declarations.
6535 (Calc++ Parser): Likewise.
6536 (Decl Summary): Update names.
6537 (Table of Symbols): Update description.
6538 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6539 (PERCENT_END_HEADER): ... this.
6540 (PERCENT_BEFORE_DEFINITIONS): Update to...
6541 (PERCENT_START_HEADER): ... this.
6542 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6543 (declaration): Update token names and m4 macro names.
6544 When parsing %end-header and %start-header, invoke translate_code
6545 before muscle_code_grow, and no longer set global booleans to remember
6546 whether these declarations have been seen.
6547 Parse new %after-header and %before-header.
6548 * src/reader.c (before_definitions, after_definitions): Remove.
6549 (prologue_augment): Accept a new bool argument to specify whether to
6550 augment the pre-prologue or post-prologue.
6551 * src/reader.h (before_definitions, after_definitions): Remove these
6552 extern's.
6553 (prologue_augment): Add new bool argument.
6554 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6555 (PERCENT_END_HEADER): ... this.
6556 (PERCENT_BEFORE_DEFINITIONS): Update to...
6557 (PERCENT_START_HEADER): ... this.
6558 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6559 * tests/actions.at (Printers and Destructors): Update names.
6560
6561 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6562
6563 Add comparison operators for C++ location classes. Discussed at
6564 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6565 * data/c++.m4 (b4_define_location_comparison): New boolean %define
6566 declaration indicating whether filename_type has an operator==. If
6567 filename_type is `std::string', it defaults to `1', `0' otherwise.
6568 * data/location.cc: Iff b4_define_location_comparison is `1', add
6569 operator== and operator!= for class position and for class location.
6570
6571 Some minor fixes.
6572 * src/scan-action.l: Remove unused file.
6573 * src/symtab.c (symbol_printer_set): Use printer_location not
6574 destructor_location.
6575 * src/symtab.h (struct symbol): Replace incorrect source comment for
6576 printer members.
6577 * tests/input.at (Incompatible Aliases): Update output with correct
6578 printer location.
6579
6580 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
6581
6582 Don't put the pre-prologue in the header file. For the yacc.c code
6583 file and the glr.c header and code files, move the pre-prologue before
6584 the token definitions. Add new %before-definitions and
6585 %after-definitions to declare code that will go in both the header file
6586 and code file. Discussed at
6587 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
6588 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
6589 and
6590 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
6591 * NEWS (2.3+): Describe these changes.
6592 * data/glr.c (b4_pre_prologue): Move from within to before...
6593 (b4_shared_declarations): ... this.
6594 Add new b4_before_definitions before b4_token_enums.
6595 Add new b4_after_definitions at the end.
6596 * data/glr.cc (b4_pre_prologue): Replace with...
6597 (b4_before_definitions): ... this in the header file.
6598 (b4_after_definitions): New near the end of the header file.
6599 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
6600 code file right before including the header file.
6601 (b4_before_definitions): New in the previous position of
6602 b4_pre_prologue in the header file.
6603 (b4_after_definitions): New near the end of the header file.
6604 * data/yacc.c: Clean up some m4 quoting especially in the header file.
6605 (b4_token_enums_defines): In the code file, move to right before
6606 YYSTYPE for consistency with the header file.
6607 (b4_before_definitions): New right before b4_token_enums_defines in
6608 both the header and code file.
6609 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
6610 header and code file.
6611 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
6612 of prologues for %union dependencies.
6613 (Decl Summary): In %defines description, mention the effect of
6614 %before-definitions and %after-definitions on the header file.
6615 (Calc++ Parser): Forward declare driver in a %before-definitions rather
6616 than in the pre-prologue so that make check succeeds.
6617 (Table of Symbols): Add entries for %before-definitions and
6618 %after-definitions.
6619 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
6620 %before-definitions.
6621 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
6622 (declaration): Parse those declarations and append to
6623 b4_before_definitions and b4_after_definitions, respectively.
6624 * src/reader.c (before_definitions, after_definitions): New bools to
6625 track whether those declarations have been seen.
6626 (prologue_augment): Add to the post-prologue if %union,
6627 %before-definitions, or %after-definitions has been seen.
6628 * src/reader.h (before_definitions, after_definitions): New extern's.
6629 * src/scan-gram.l: Scan the new declarations.
6630 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
6631 prologue block in a %before-definitions or a %after-definitions based
6632 on whether the %union is declared.
6633 * tests/regression.at (Early token definitions with --yacc, Early token
6634 definitions without --yacc): Move tests for token definitions into the
6635 post-prologue since token names are no longer defined in the
6636 pre-prologue.
6637
6638 2006-06-20 Akim Demaille <akim@epita.fr>
6639
6640 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
6641 (symbol_get): Use it.
6642 * src/parse-gram.y: Use it.
6643
6644 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
6645
6646 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
6647 build succeeds when configured with --enable-gcc-warnings.
6648
6649 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
6650
6651 * src/parse-gram.y (char_name): New function.
6652 (CHAR, STRING, string_content): For %printer, properly escape.
6653 (ID): Prefer fputs to fprintf.
6654 (id): Reindent to be consistent with other rules.
6655 Properly quote char.
6656
6657 The Translation Project changed its way of publishing translations
6658 to maintainers. I haven't received any responses to my request
6659 for supporting the old way, or for documenting the new way. I
6660 have modified 'bootstrap' to use screen scraping
6661 (in this case, HTML scraping). This is unreliable and inelegant,
6662 but I don't see any better way. Yuck.
6663 * bootstrap (TP_URL, WGET_COMMAND): New vars.
6664 (get_translations): New function, which uses HTML scraping to
6665 deduce locations of latest translations.
6666 Use this function to grab both bison and bison-runtime .po files.
6667 Don't bother priming the pump for the runtime-po domain any more,
6668 as it's now translated better than bison is.
6669
6670 2006-06-19 Akim Demaille <akim@epita.fr>
6671
6672 * src/scan-gram.l: No longer "parse" things after `%union' until
6673 `{'. Rather, return a single "%union" token.
6674 No longer make symbols: return strings, and leave the conversion
6675 to symbols to the parser.
6676 (SC_PRE_CODE, token_type): Remove.
6677 * src/parse-gram.y (%union): New field `character'.
6678 Sort tokens.
6679 (CHAR): New token.
6680 (ID, ID_COLON): Now that the scanner no longer makes them
6681 identifiers, adjust all uses to invoke symbol_get.
6682 (id_colon): New, wraps the conversion from string to symbol.
6683 (%union): Accept a possible union_name.
6684 (symbol): Now can be a char.
6685 * data/c.m4 (b4_union_name): Leave a default value.
6686 * data/glr.c, data/yacc.c: Use it.
6687
6688 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
6689
6690 For associating token numbers with token names for "yacc.c", don't use
6691 #define statements unless `--yacc' is specified; always use enum
6692 yytokentype. Most important discussions start at:
6693 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
6694 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
6695 and
6696 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
6697 * NEWS (2.3+): Mention.
6698 * data/c.m4 (b4_yacc_if): New.
6699 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
6700 token #define's.
6701 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
6702 on token name definitions.
6703 * src/getargs.c (usage): Capitalize `Yacc' in English.
6704 * src/output.c (prepare): Define b4_yacc_flag.
6705 * tests/regression.at (Early token definitions): Test that tokens names
6706 are defined before the pre-prologue not just before the post-prologue.
6707 Remove this test case and copy to...
6708 (Early token definitions with --yacc): ... this to test #define's.
6709 (Early token definitions without --yacc): ... and this to test enums.
6710
6711 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
6712
6713 * NEWS: Reword the post-2.3 change to not be so optimistic about
6714 removing the old "look-ahead" spelling.
6715 Update previous look-ahead/lookahead change reports.
6716 * REFERENCES: look-ahead -> lookahead (since that's
6717 what he actually wrote).
6718 * doc/refcard.tex: look ahead -> lookahead,
6719 look-ahead -> lookahead
6720
6721 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
6722
6723 For consistency, use `lookahead' instead of `look-ahead' or
6724 `look_ahead'. Discussed starting at
6725 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
6726 and then at
6727 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
6728 * NEWS: For the next release, note the change to `--report'.
6729 * TODO, doc/bison.1: Update English.
6730 * doc/bison.texinfo: Update English.
6731 (Understanding Your Parser, Bison Options): Document as
6732 `--report=lookahead' rather than `--report=look-ahead'.
6733 * src/conflicts.c: Update English in comments.
6734 (lookahead_set): Rename from look_ahead_set.
6735 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
6736 (resolve_sr_conflict): Rename local look_ahead_tokens to
6737 lookahead_tokens, and update other uses.
6738 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
6739 count_rr_conflicts, conflicts_free): Update uses.
6740 * src/getargs.c (report_args): Move "lookahead" before alternate
6741 spellings.
6742 (report_types): Update uses.
6743 (usage): For `--report' usage description, state `lookahead' spelling
6744 rather than `look-ahead'.
6745 * src/getargs.h (report.report_lookahead_tokens): Rename from
6746 report_look_ahead_tokens.
6747 * src/lalr.c: Update English in comments.
6748 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
6749 (state_lookahead_tokens_count): Rename from
6750 state_look_ahead_tokens_count.
6751 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6752 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
6753 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6754 Update other uses.
6755 Update English in output.
6756 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
6757 * src/print.c: Update English in comments.
6758 (lookahead_set): Rename from look_ahead_set.
6759 (print_reduction): Rename argument lookahead_token from
6760 look_ahead_token.
6761 (print_core, state_default_rule, print_reductions, print_results):
6762 Update uses.
6763 * src/print_graph.c: Update English in comments.
6764 (print_core): Update uses.
6765 * src/state.c: Update English in comments.
6766 (reductions_new): Update uses.
6767 (state_rule_lookahead_tokens_print): Rename from
6768 state_rule_look_ahead_tokens_print, and update other uses.
6769 * src/state.h: Update English in comments.
6770 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
6771 (state_rule_lookahead_tokens_print): Rename from
6772 state_rule_look_ahead_tokens_print.
6773 * src/tables.c: Update English in comments.
6774 (conflict_row, action_row): Update uses.
6775 * tests/glr-regression.at
6776 (Incorrect lookahead during deterministic GLR,
6777 Incorrect lookahead during nondeterministic GLR): Rename
6778 print_look_ahead to print_lookahead.
6779 * tests/torture.at: Update English in comments.
6780 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
6781 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
6782 (Many lookahead tokens): Update uses.
6783 * data/glr.c: Update English in comments.
6784 * lalr1.cc: Likewise.
6785 * yacc.c: Likewise.
6786 * src/conflicts.h: Likewise.
6787 * src/lalr.h: Likewise.
6788 * src/main.c: Likewise.
6789 * src/output.c: Likewise.
6790 * src/parse-gram.c: Likewise.
6791 * src/tables.h: Likewise.
6792 * tests/calc.at: Likewise.
6793
6794 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
6795
6796 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
6797
6798 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
6799
6800 * TODO: Add request from Nelson H. F. Beebe to be able to install
6801 Bison without installing the yacc script.
6802
6803 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6804
6805 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
6806 and yytext if they're already #define'd.
6807 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
6808 * src/scan-code-c.c: ... here.
6809 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
6810 <config.h>.
6811
6812 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6813
6814 Get Bison to build again when configured with --enable-gcc-warnings.
6815 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
6816 missing #include's.
6817 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
6818 loc argument as it shadows a global.
6819 * src/scan-gram.l: Remove stray comma that prevents boundary_set
6820 invocation.
6821
6822 * src/.cvsignore: Add scan-code.c.
6823
6824 2006-06-07 Akim Demaille <akim@epita.fr>
6825
6826 * src/scan-gram.l: Move the "add a trailing ; to actions" code
6827 to...
6828 * src/scan-code.l: here.
6829 * tests/input.at (Torturing the Scanner): Fix another location
6830 error.
6831
6832 2006-06-07 Akim Demaille <akim@epita.fr>
6833
6834 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
6835
6836 2006-06-06 Akim Demaille <akim@epita.fr>
6837
6838 Extract the parsing of user actions from the grammar scanner.
6839 As a consequence, the relation between the grammar scanner and
6840 parser is much simpler. We can also split "composite tokens" back
6841 into simple tokens.
6842 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
6843 * src/scan-gram.l (add_column_width, adjust_location): Move to and
6844 rename as...
6845 * src/location.h, src/location.c (add_column_width)
6846 (location_compute): these.
6847 Fix the column count: the initial column is 0.
6848 (location_print): Be robust to ending column being 0.
6849 * src/location.h (boundary_set): New.
6850 * src/main.c: Adjust to scanner_free being renamed as
6851 gram_scanner_free.
6852 * src/output.c: Include scan-code.h.
6853 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
6854 Use boundary_set.
6855 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
6856 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
6857 which is now, again, a separate token.
6858 Adjust all dependencies.
6859 Whereever actions with $ and @ are used, use translate_code.
6860 (action): Remove this nonterminal which is now useless.
6861 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
6862 (grammar_current_rule_action_append): Use translate_code.
6863 (packgram): Bound check ruleno, itemno, and rule_length.
6864 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
6865 (last_string, last_braced_code_loc, max_left_semantic_context)
6866 (scanner_initialize, scanner_free, scanner_last_string_free)
6867 (gram_out, gram_lineno, YY_DECL_): Move to...
6868 * src/scan-gram.h: this new file.
6869 (YY_DECL): Rename as...
6870 (GRAM_DECL): this.
6871 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
6872 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6873 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6874 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6875 Move these declarations, and...
6876 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
6877 these to...
6878 * src/flex-scanner.h: this new file.
6879 * src/scan-gram.l (rule_length, rule_length_overflow)
6880 (increment_rule_length): Remove.
6881 (last_braced_code_loc): Rename as...
6882 (gram_last_braced_code_loc): this.
6883 Adjust to the changes of the parser.
6884 Move all the handling of $ and @ into...
6885 * src/scan-code.l: here.
6886 * src/scan-gram.l (handle_dollar, handle_at): Remove.
6887 (handle_action_dollar, handle_action_at): Move to...
6888 * src/scan-code.l: here.
6889 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
6890 scan-code.h, scan-code-c.c, scan-gram.h.
6891 (EXTRA_bison_SOURCES): Add scan-code.l.
6892 (BUILT_SOURCES): Add scan-code.c.
6893 (yacc): Be robust to white spaces.
6894
6895 * tests/conflicts.at, tests/input.at, tests/reduce.at,
6896 * tests/regression.at: Adjust the column numbers.
6897 * tests/regression.at: Adjust the error message.
6898
6899 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6900
6901 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6902 Use Akim's wording from
6903 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
6904
6905 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6906
6907 Between Bison releases, manually append `+' to the previous Bison
6908 release number, and use that as a signal to automatically print the
6909 ChangeLog's CVS Id keyword from --version. Discussed starting at
6910 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
6911 * ChangeLog: Add Id header.
6912 * configure.ac (AC_INIT): Append `+' to `2.3'.
6913 * src/.cvsignore: Add revision.c.
6914 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
6915 (BUILT_SOURCES): Add revision.c.
6916 (revision.c): New target rule. This file defines a new global variable
6917 named revision. It initializes it with either the Id from ChangeLog
6918 or, if VERSION doesn't contain `+', with the empty string.
6919 * src/getargs.c (version): Print the value of revision.
6920 * src/revision.h: Extern revision.
6921
6922 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
6923
6924 * NEWS: Version 2.3.
6925 * configure.ac (AC_INIT): Likewise.
6926
6927 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
6928
6929 * data/glr.c (YYRECOVERING): Define to be a function-like macro
6930 with no arguments, not as an object-like macro. This is for
6931 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
6932 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
6933 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
6934 Document this.
6935
6936 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
6937
6938 * src/getargs.c (usage): Back out yesterday's modification of the
6939 --help output so that we don't have to wait for translation before
6940 releasing 2.3.
6941
6942 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
6943
6944 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
6945 Problem reported by Akim Demaille.
6946
6947 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6948
6949 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6950
6951 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
6952
6953 * data/yacc.c (yy_reduce_print): Omit trailing white space in
6954 generated source code. Problem reported by Frans Englich in
6955 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
6956
6957 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
6958
6959 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
6960 shell, not within 'make', so that 'make' by an ordinary builder
6961 (using GNU make) does not worry about configuring gzip. This also
6962 works around a bug reported independently by Keith Thompson and by
6963 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
6964 stderr rather than stdout, messing up the build logs.
6965
6966 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6967
6968 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
6969 to make sure that YYID will never be unused. This fixes a 'make
6970 maintainer-check' failure caused by the recent changes to the 'Trivial
6971 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
6972 not used.
6973 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
6974
6975 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6976
6977 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
6978 state before an empty RHS is always resolved here. Only the location
6979 of that state is guaranteed to be resolved, and that's enough. This
6980 fixes the remaining bug reported by Derek M. Jones in
6981 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6982 * tests/glr-regression.at (Uninitialized location when reporting
6983 ambiguity): Test the above case.
6984 Also, the embedded comments in this test case claim it checks the case
6985 of an empty RHS that has inherited the initial location. However, the
6986 corresponding LHS was already resolved, so yyresolveLocations didn't
6987 actually have reason to modify it. Fix this by forcing
6988 nondeterministic operation at the beginning of the parse.
6989
6990 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
6991
6992 * data/c.m4 (b4_yy_symbol_print_generate):
6993 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
6994 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
6995 of the bugs reported today by Derek M Jones in
6996 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6997 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
6998 defined to be a type name without parens or brackets.
6999 (Location Type): Similarly for YYLTYPE.
7000 * tests/regression.at (Trivial grammars): Put in a test for this
7001 bug that will be caught by 'make maintainer-check' (though not,
7002 alas, by 'make check' unless your compiler is picky).
7003
7004 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7005
7006 * NEWS: Version 2.2.
7007 * configure.ac (AC_INIT): Likewise.
7008
7009 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7010
7011 * data/glr.c (yyreportTree): Make room in yystates for the state
7012 preceding the RHS. This fixes the segmentation fault reported by Derek
7013 M. Jones in
7014 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7015 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7016 to the user. Reported for yyreportTree by Derek M. Jones later in the
7017 same thread.
7018 * THANKS: Add Derek M. Jones.
7019 Update my email address.
7020 Fix typo in Steve Murphy's name.
7021
7022 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7023
7024 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7025 checking against YYLAST that caused the parser to miss a potential
7026 alternative in its diagnostic.
7027 Problem reported by Maria Jose Moron Fernandez in
7028 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7029 * data/lalr1.cc (yysyntax_error_): Likewise.
7030 * data/yacc.c (yysyntax_error): Likewise.
7031 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7032 tokens, in case we run into an older C compiler.
7033 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7034 Use them to check for the off-by-one error fixed above.
7035
7036 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7037 YYSIZE_T, not size_t.
7038 * tests/regression.at (Trivial grammars): New test, to catch
7039 the error fixed by the above patch.
7040
7041 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7042
7043 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7044 scheme.
7045 Reported by Steve Murphy.
7046
7047 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7048
7049 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7050 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7051
7052 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7053
7054 Implement --trace=m4.
7055 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7056 * src/output.c (output_skeleton): When set, pass -dV to m4.
7057
7058 Factor the handling of flags in m4.
7059 * src/output.c (prepare): Rename the muscle names debug, defines,
7060 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7061 * data/c.m4: Adjust.
7062 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7063 Use b4_define_flag_if to define other b4_FLAG_if macros.
7064 (b4_location_if): As a consequence, rename as...
7065 (b4_locations_if): this, for consistency.
7066 Adjust all the skeletons.
7067
7068 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7069
7070 * etc/bench.pm: Shorten bench names.
7071
7072 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7073
7074 * src/output.h, src/output.c (error_verbose): Move to...
7075 * src/getargs.h, src/getargs.c: here.
7076 Sort the flags.
7077 Adjust dependencies.
7078
7079 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7080
7081 * data/c.m4 (b4_copyright): Put the special exception for Bison
7082 skeletons here, so we don't have to put it in each skeleton. All
7083 uses changed. Suggested by Akim Demaille. Also, wrap the
7084 copyright notice, in case it is longer than 80 columns. Replace
7085 comma by newline after title.
7086
7087 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7088
7089 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7090 incompatibility, not a bug. Mention that it wasn't fixed as of
7091 flex 2.5.33.
7092
7093 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7094
7095 * examples/extexi: Enforce the precedence of concatenation over
7096 >>.
7097 Reported by Tommy Nordgren.
7098
7099 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7100
7101 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7102 with the member "token".
7103 Reported by Martin Nylin.
7104
7105 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7106
7107 * data/glr.c: Switch to Bison 2.2 special-exception language in
7108 the copyright notice. Use more-regular format for titles and
7109 copyright notices.
7110 * data/glr.cc: Likewise.
7111 * data/location.cc: Likewise.
7112 * data/yacc.cc: Likewise.
7113 * doc/bison.texinfo (Conditions): Document this.
7114 * NEWS: likewise. Upgrade version to 2.2.
7115
7116 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
7117
7118 * data/glr.cc: Remove dead code.
7119
7120 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7121
7122 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7123 that variable and the line breaks the bootstrap. Problem reported
7124 by Juan M. Guerrero.
7125
7126 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7127
7128 * doc/bison.texinfo (Multiple start-symbols): New.
7129
7130 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7131
7132 * etc/README, etc/bench.pl: New.
7133
7134 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
7135
7136 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7137 rule.
7138 Reported by Mickael Labau.
7139 * tests/input.at (Torturing the Scanner): Test it.
7140
7141 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7142
7143 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7144 Problem reported by Bob Rossi.
7145
7146 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7147
7148 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7149 and didn't really work.
7150 For the index, use @ifnotinfo, not @iftex.
7151 Minor cleanups of spacing and terminology.
7152
7153 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7154
7155 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7156 of AT_NAME_PREFIX when %name-prefix is not used.
7157
7158 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7159
7160 Apply --prefix to C++ skeletons too: they change the namespace.
7161 The test suite already exercize these cases.
7162 * data/c++.m4 (b4_namespace): New.
7163 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7164 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7165 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7166 * doc/bison.texinfo: Document it.
7167 (Option Cross Key): Use @multitable in all formats. It looks
7168 nicer, even in TeX outputs.
7169 (Rules): Use the same code whatever the output type is.
7170 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7171 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7172 * tests/calc.at: Use it, instead of hard coding `yy'.
7173
7174 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7175
7176 * TODO: Remove dead items.
7177
7178 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7179
7180 * doc/FAQ: Remove, merged into...
7181 * doc/bison.texinfo (FAQ): this.
7182 * doc/Makefile.am (EXTRA_DIST): Adjust.
7183
7184 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7185
7186 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7187 even if empty.
7188 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7189 * doc/bison.texinfo (Calc++ Scanner): Use it.
7190
7191 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
7192
7193 Fix two nits reported by twlevo, plus one more that I discovered.
7194
7195 * src/assoc.h (assoc_to_string): Give a name to the arg, as
7196 this is the usual Bison style.
7197 * src/location.h (location_print): Likewise.
7198
7199 * src/reader.h (token_name): Likewise.
7200
7201 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7202
7203 Fix some nits reported by twlevo.
7204 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7205 and "POSIX". Use more-modern syntax for URLs. Mention C++
7206 and ask for Java. Don't hardwire OS version numbers. Add
7207 copyright notice.
7208 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7209 * src/conflicts.c (solved_conflicts_obstack): Now static.
7210
7211 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
7212
7213 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7214 page. Say "you can use it" not "you may use it" as on the web page;
7215 we're describing capabilities not granting permission.
7216
7217 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7218
7219 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7220 shadowing warnings. Use usual patter for iterating through RHS.
7221 * tests/glr-regression.at
7222 (Uninitialized location when reporting ambiguity):
7223 Modify yylex so that it uses its argument, rather than trying
7224 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7225 const char -> char const.
7226
7227 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7228 Don't use tabs inside commands; it messes up 'ps'.
7229 Problem reported by twlevo.
7230
7231 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7232
7233 * tests/glr-regression.at (Uninitialized location when reporting
7234 ambiguity): New test case.
7235 * data/glr.c (yyresolveLocations): New function, which uses
7236 YYLLOC_DEFAULT.
7237 (yyresolveValue): Invoke yyresolveLocations before reporting an
7238 ambiguity.
7239 * doc/bison.texinfo (Default Action for Locations): Note
7240 YYLLOC_DEFAULT's usage for ambiguity locations.
7241 (GLR Semantic Actions): Cross-reference those notes.
7242
7243 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7244
7245 * tests/glr-regression.at (Leaked semantic values when reporting
7246 ambiguity): Remove unnecessary union and type declarations.
7247 (Leaked lookahead after nondeterministic parse syntax error): New test
7248 case.
7249 * data/glr.c (yyparse): Check for zero stacks remaining before
7250 attempting to shift the lookahead so that you don't lose it.
7251
7252 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7253
7254 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7255 * tests/glr-regression.at (Leaked semantic values when reporting
7256 ambiguity): New test case.
7257 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7258 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7259 now unnecessary yystackp parameter.
7260 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7261 destructors can be called.
7262
7263 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7264 in existing testcases.
7265
7266 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7267
7268 Don't leak semantic values for parent RHS when a user action cuts the
7269 parser, and clean up related code a bit.
7270 * tests/glr-regression.at (Leaked merged semantic value if user action
7271 cuts parse): Rename to...
7272 (Leaked semantic values if user action cuts parse): ... this. Add check
7273 for leaked parent RHS values.
7274 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7275 between an unresolved state (non-empty chain of semantic options) and
7276 an incomplete one (signaled by an empty chain).
7277 (yyresolveStates): Document the interface. Move all manipulation of a
7278 successfully or unsuccessfully resolved yyGLRState to...
7279 (yyresolveValue): ... here so that yyresolveValue always leaves a
7280 yyGLRState with consistent data and thus is easier to understand.
7281 Remove the yyvalp and yylocp parameters since they are always just
7282 taken from the yys parameter. When reporting a discarded merged value
7283 in debugging output, note that it is incompletely merged. Document the
7284 interface.
7285 (yyresolveAction): If resolving any of the RHS states fails, destroy
7286 them all rather than leaking them. Thus, as long as user actions are
7287 written to clean up the RHS correctly, yyresolveAction always cleans up
7288 the RHS of a semantic option. Document the interface.
7289
7290 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7291
7292 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7293 led to a segmentation fault in GNU Pascal. Problem reported
7294 by Waldek Hebisch.
7295
7296 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7297
7298 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7299 mid-rule action inside a nonterminal symbol in order to declare a
7300 destructor for its semantic value.
7301
7302 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7303
7304 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7305 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7306 __cplusplus && ! defined _STDLIB_H && !
7307 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7308 defined free))]: Include <stdlib.h> rather than rolling our own
7309 declarations of malloc and free, to avoid problems with
7310 incompatible declarations (using 'throw') C++'s stdlib.h. This
7311 should fix Debian bug 340012
7312 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7313 reported by Guillaume Melquiond.
7314
7315 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7316
7317 * NEWS: Clarify symbols versus types in unused-value warnings.
7318
7319 * configure.ac (AC_INIT): Bump version number.
7320
7321 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7322
7323 * NEWS: Version 2.1a.
7324 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7325 since C99 requires this.
7326
7327 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7328
7329 * m4/c-working.m4: New file.
7330 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7331
7332 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7333
7334 * Makefile.maint: Merge from coreutils.
7335
7336 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7337
7338 More portability fixes for problems summarized by Nelson H. F. Beebe.
7339
7340 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7341 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7342 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7343 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7344 messes up because C++ code is compiled in 32-bit mode but linked
7345 in 64-bit mode.
7346
7347 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7348
7349 More portability fixes for problems summarized by Nelson H. F. Beebe.
7350
7351 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7352 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7353
7354 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7355 nodist_PROGRAMS, since we don't need to actually compile the
7356 example if we're just doing a plain 'make'. This avoids bothering
7357 the installer unnecessarily about problems due to weird C++
7358 compilers.
7359
7360 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7361
7362 More portability fixes for problems summarized by Nelson H. F. Beebe.
7363
7364 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7365 than #include "...", and compile with -I'.'. The old method was
7366 not portable, according to Posix and the C standard, and it does
7367 not work with Sun C 5.7, where previous #line directives affect
7368 the working directory used in later #include "..." directives.
7369
7370 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7371
7372 Various DJGGP specific issues in /djgpp
7373
7374 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7375
7376 More portability fixes for problems summarized by Nelson H. F. Beebe.
7377
7378 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7379 '#include <map>' works and that you can apply ++ to iterators.
7380
7381 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7382
7383 Work around portability problems summarized by Nelson H. F. Beebe in
7384 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7385
7386 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7387 that '#include <string>' works.
7388
7389 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7390 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7391 "warning: sorry: semantics of inline function static data `const
7392 unsigned char translate_table[262]' are wrong (you'll wind up with
7393 multiple copies)".
7394
7395 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7396 or, xor to not_, and_, or_, and xor_, respectively. This works
7397 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7398 random system header somewhere that includes the equivalent of
7399 <iso646.h>.
7400
7401 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7402 -E" works; it apparently doesn't work with PathScale EKO Compiler
7403 Suite Version 2.0.
7404
7405 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7406
7407 During deterministic GLR operation, user actions should be able to
7408 influence the parse by changing yychar. To make this easier to fix and
7409 to make glr.c easier to evolve in general, don't maintain yytoken in
7410 parallel with yychar; just compute yytoken when needed.
7411 * tests/glr-regression.at (Incorrect lookahead during deterministic
7412 GLR): Check that setting yychar in a user action has the intended
7413 effect.
7414 * data/glr.c (yyGLRStack): Remove yytokenp member.
7415 (yyclearin): Don't set *yytokenp.
7416 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7417 yychar rather than *yytokenp to determine the current lookahead.
7418 Compute yytoken locally when needed.
7419 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7420 point to.
7421
7422 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7423 after `--report' documentation.
7424
7425 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7426
7427 * src/parse-gram.y (grammar_declaration): Location of printer
7428 symbol is @1, not list->location. Bug reported by twlevo.
7429 * tests/input.at (Incompatible Aliases): Adjust to above change.
7430
7431 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7432
7433 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7434 all the test at once. This makes the output easier to read in the
7435 normal case.
7436
7437 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7438 got from <http://bro-ids.org/download.html>. The bug is that
7439 when two actions appeared in succession, the second one was
7440 scanned before the first one was added to the grammar rule
7441 as a midrule action. Bison then output the incorrect warning
7442 "parse.y:905.17-906.36: warning: unused value: $3".
7443 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7444 associated with a value.
7445 (rhs): Don't invoke grammar_current_rule_action_append.
7446 (action): Invoke it here instead.
7447 * src/reader.c (grammar_midrule_action): Now extern.
7448 (grammar_current_rule_action_append): Don't invoke
7449 grammar_midrule_action; that is now the scanner's job.
7450 * src/reader.h (last_string, last_braced_code_loc):
7451 (grammar_midrule_action): New decls.
7452 * src/scan-gram.l (last_string): Now extern, sigh.
7453 (last_braced_code_loc): New extern variable.
7454 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7455 rule already has an action.
7456 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7457 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7458 Add some tests to check that the above changes fixed the bug.
7459
7460 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7461
7462 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7463 All used changed. Check whether the symbol has a destructor,
7464 not whether it is typed.
7465 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7466 that the values are still reported as unused. All line numbers
7467 adjusted.
7468
7469 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7470
7471 Work around a bug in bro 0.8, which underparenthesizes its
7472 definition of YYLLOC_DEFAULT.
7473 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7474 their arguments.
7475 * data/lalr1.cc: Likewise.
7476 * data/yacc.cc: Likewise.
7477
7478 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7479
7480 Work around a bug in Pike 7.0, and give the Pike folks a
7481 better way to override the usual int widths.
7482 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7483 user can override the types.
7484 (short): #undef, to work around a bug in Pike 7.0.
7485 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7486 (union yyalloc.yyss): Use yytype_int16 rather than short.
7487 All uses changed.
7488 (yysigned_char): Remove.
7489 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7490 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7491 * tests/regression.at (Web2c Actions): Adjust to above changes.
7492
7493 * src/reader.c (check_and_convert_grammar): New function.
7494 (reader): Close the input file even if something went wrong during
7495 parsing. Minor file descriptor leak reported by twlevo.
7496
7497 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7498 to pacify gcc -Wswitch-default.
7499 * src/scan-gram.l (adjust_location): Use a default: break; case
7500 to pacify gcc -Wswitch-default.
7501 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7502 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7503 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7504 Move these decls to scan-skel.l, since they don't need to be
7505 visible elsewhere.
7506 * src/scan-skel.l: Accept the above decls.
7507 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7508 is used.
7509
7510 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7511
7512 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7513 since we don't want to insist on a version number at the start
7514 of the changelog every time.
7515 * Makefile.maint: Sync from coreutils a bit better.
7516 (sc_trailing_blank): Renamed from sc_trailing_space.
7517 All uses changed.
7518 (sc_no_if_have_config_h, sc_require_config_h):
7519 (sc_prohibit_assert_without_use): New rules.
7520 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7521 (sc_dd_max_sym_length): Fix leading spaces in rule.
7522 (sc_system_h_headers): Prefix with @.
7523 (sc_useless_cpp_parens, m4-check): Output line numbers.
7524 (changelog-check): Allow version only in head.
7525 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7526 satisfy new Makefile.maint rule.
7527 * data/glr.c: Likewise.
7528 * data/glr.cc: Likewise.
7529 * data/lalr1.cc: Likewise.
7530 * data/yacc.c: Likewise.
7531 * lib/ebitsetv.c: Likewise.
7532 * lib/lbitset.c: Likewise.
7533 * lib/subpipe.c: Likewise.
7534 * lib/timevar.c: Likewise.
7535 * src/system.h: Likewise.
7536 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7537 * djgpp/Makefile.maint: Add copyright notice.
7538 * djgpp/README.in: Likewise.
7539 * djgpp/config.bat: Likewise.
7540 * djgpp/config.site: Likewise.
7541 * djgpp/config_h.sed: Likewise.
7542 * djgpp/djunpack.bat: Likewise.
7543 * djgpp/config.sed: Fix copyright notice to match standard format.
7544 * djgpp/subpipe.h: Likewise.
7545 * lib/bitsetv-print.c: Likewise.
7546 * lib/bitsetv.c: Likewise.
7547 * lib/subpipe.h: Likewise.
7548 * lib/timevar.c: Likewise.
7549 * lib/timevar.h: Likewise.
7550 * djgpp/subpipe.c: Use standard recipe for config.h.
7551 * lib/abitset.c: Likewise.
7552 * lib/bitset.c: Likewise.
7553 * lib/bitset_stats.c: Likewise.
7554 * lib/bitsetv-print.c: Likewise.
7555 * lib/bitsetv.c: Likewise.
7556 * lib/ebitsetv.c: Likewise.
7557 * lib/get-errno.c: Likewise.
7558 * lib/lbitset.c: Likewise.
7559 * lib/subpipe.c: Likewise.
7560 * lib/timevar.c: Likewise.
7561 * lib/vbitset.c: Likewise.
7562 * tests/local.at: Likewise.
7563 * src/scan-gram.l: Don't include verify.h, since system.h does
7564 that for us.
7565 * .x-sc_require_config_h: New file.
7566 * .x-sc_unmarked_diagnostics: New file.
7567
7568 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
7569
7570 Be a bit more systematic about using 'abort'.
7571 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7572 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7573 Put 'default: abort ();' before some other case, to satisfy older
7574 pedantic compilers.
7575 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7576 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
7577 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
7578 * src/conflicts.c (resolve_sr_conflict): Likewise.
7579 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
7580 (get_decision_str, get_orientation_str, get_node_alignment_str):
7581 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
7582 (get_linestyle_str, get_arrowstyle_str): Likewise.
7583 * src/conflicts.c (resolve_sr_conflict):
7584 Use a default case rather than one for the one remaining enum
7585 value, to catch invalid enum values as well.
7586 * src/lalr.c (set_goto_map, map_goto):
7587 Prefer "assert (FOO);" to "if (!FOO) abort ();".
7588 * src/nullable.c (nullable_compute, token_definitions_output):
7589 Likewise.
7590 * src/reader.c (packgram, reader): Likewise.
7591 * src/state.c (transitions_to, state_new, state_reduction_find):
7592 Likewise.
7593 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
7594 (symbol_pack): Likewise.
7595 * src/tables.c (conflict_row, pack_vector): Likewise.
7596 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
7597 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
7598 * src/system.h: Don't include <assert.h>.
7599 (assert): New macro.
7600
7601 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
7602 (Destructor Decl, Parser Function, Pure Calling):
7603 Describe rules for braces inside C code more carefully.
7604
7605 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
7606
7607 Fix some porting glitches found by Nelson H. F. Beebe.
7608 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
7609 compilers that don't understand that abort () does not return.
7610 * src/state.c (transitions_to): Likewise.
7611 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7612 that '#include <cstdlib>' works.
7613 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
7614 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
7615 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
7616 for the benefit of some pre-C99 compilers.
7617
7618 * bootstrap: Undo changes to gnulib files that autoreconf made.
7619
7620 Minor fixups to get 'make maintainer-check' to work.
7621 * configure.ac: Don't use -Wnested-externs, as it's incompatible
7622 with the new verify.h implementation.
7623 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
7624 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
7625 * data/yacc.c (YYUSE): Likewise.
7626 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
7627 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
7628 * src/parse-gram.y (declaration): Don't pass a string constant
7629 to a function that expects char *, since GCC might complain
7630 about the constant value.
7631 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
7632 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
7633 before #defining them.
7634 * tests/glr-regression.at
7635 (Incorrectly initialized location for empty right-hand side in GLR):
7636 In yyerror, use the msg arg.
7637 (Corrupted semantic options if user action cuts parse):
7638 (Incorrect lookahead during deterministic GLR):
7639 (Incorrect lookahead during nondeterministic GLR):
7640 Don't name a local var 'index'; it shadows string.h's 'index'.
7641
7642 2006-01-19 Akim Demaille <akim@epita.fr>
7643
7644 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
7645 location, not just parts of it.
7646
7647 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
7648
7649 * NEWS: Document the fact that multiple %unions are now allowed.
7650 * doc/bison.texinfo (Union Decl): Likewise.
7651 * TODO: This feature is now implemented, so remove it from
7652 the wishlist.
7653
7654 * Makefile.maint: Merge with coreutils Makefile.maint.
7655 (CVS_LIST): Use build-aux version if available.
7656 (VERSION_REGEXP): New macro.
7657 (syntax-check-rules): Add sc_no_if_have_config_h,
7658 sc_prohibit_assert_without_use, sc_require_config_h,
7659 sc_useless_cpp_parens.
7660 (sc_obsolete_symbols): Check for O_NDELAY.
7661 (sc_dd_max_sym_length): Track coreutils.
7662 (sc_unmarked_diagnostics): Look in all files, not just *.c.
7663 (sc_useless_cpp_parens): New rule.
7664 (news-date-check): Look for version or today's date.
7665 (changelog-check): Don't require version number near head.
7666 (copyright-check): Use current year instead of hardwiring 2005.
7667 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
7668 (announcement): Add --gpg-key-ID.
7669
7670 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
7671 with "file system".
7672
7673 Avoid undefined behavior that addressed just before the start of an
7674 array. Problem reported by twlevo.
7675 * src/reader.c (packgram): Prepend a new sentinel before ritem.
7676 * src/lalr.c (build_relations): Rely on new sentinel.
7677 * src/gram.c (gram_free): Adjust to new sentinel.
7678
7679 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
7680
7681 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
7682 yylookaheadNeeds. All uses updated.
7683 (yysplitStack): Rename local yynewLookaheadStatuses to
7684 yynewLookaheadNeeds.
7685 * data/glr-regression.at (Incorrect lookahead during nondeterministic
7686 GLR): In comments, change `lookahead status' to `lookahead need'.
7687
7688 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7689
7690 * data/glr.c (yysplitStack): A little stylistic rewrite.
7691
7692 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7693
7694 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
7695
7696 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
7697
7698 * doc/bison.texinfo: Fix some typos.
7699 (GLR Semantic Actions): New subsection discussing special
7700 considerations because GLR semantic actions might be deferred.
7701 (Actions): Mention look-ahead usage of yylval.
7702 (Actions and Locations): Mention look-ahead usage of yylloc.
7703 (Special Features for Use in Actions): Add YYEOF entry and mention it
7704 in the yychar entry.
7705 In the yychar entry, remove mention of the local yychar case (pure
7706 parser) since this is irrelevant information when writing semantic
7707 actions and since it's already discussed in `Table of Symbols' where
7708 yychar is otherwise described as an external variable.
7709 In the yychar entry, don't call it the `current' look-ahead since it
7710 isn't when semantic actions are deferred.
7711 In the yychar and yyclearin entries, add note about deferred semantic
7712 actions.
7713 Add yylloc and yylval entries discussing look-ahead usage.
7714 (Look-Ahead Tokens): When discussing yychar, don't call it the
7715 `current' look-ahead, and do mention yylval and yylloc.
7716 (Error Recovery): Cross-reference `Action Features' when mentioning
7717 yyclearin.
7718 (Table of Symbols): In the yychar entry, don't call it the `current'
7719 look-ahead.
7720 In the yylloc and yylval entries, mention look-ahead usage.
7721
7722 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7723
7724 * tests/glr-regression.at: Update copyright year to 2006.
7725
7726 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7727
7728 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
7729 use during nondeterministic operation to track which stacks have
7730 actually needed the current lookahead.
7731 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
7732 Allocate, deallocate, resize, and otherwise shuffle space for
7733 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
7734 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
7735 appropriately during nondeterministic operation.
7736 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
7737 members to store the current lookahead to be used by the deferred
7738 user action.
7739 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
7740 from which the RHS is taken. Set the lookahead members of the new
7741 yySemanticOption according to the lookahead status for stack yyk.
7742 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
7743 yyaddDeferredAction.
7744 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
7745 members of yySemanticOption before invoking yyuserAction, and then set
7746 them back to their current values afterward.
7747 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
7748 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
7749 * tests/glr-regression.at: Remove `.' from the ends of recent test case
7750 titles for consistency.
7751 (Leaked merged semantic value if user action cuts parse): In order to
7752 suppress lint warnings, use arguments in merge function, and assign
7753 char value < 128 in main.
7754 (Incorrect lookahead during deterministic GLR): New test case.
7755 (Incorrect lookahead during nondeterministic GLR): New test case.
7756
7757 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7758
7759 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
7760 !yyvaluep as signal that no semantic value is available to print.
7761 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
7762 to print a semantic value.
7763
7764 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7765
7766 * tests/glr-regression.at: For consistency with my newer test cases,
7767 don't thank myself.
7768
7769 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7770
7771 * data/glr.c (yyresolveValue): When merging semantic options, if at
7772 least one user action succeeds but a later one cuts the parse, then
7773 destroy the semantic value before returning rather than leaking it.
7774 (yyresolveStates): If a user action cuts the parse and thus
7775 yyresolveValue fails, ignore the (unset) semantic value rather than
7776 corrupting the yyGLRState, and empty the semantic options list since
7777 the user actions should have called all necessary destructors.
7778 Simplify code with YYCHK.
7779 * tests/glr-regression.at (Corrupted semantic options if user action
7780 cuts parse): New test case.
7781 (Undesirable destructors if user action cuts parse): New test case.
7782 Before applying any of this patch, this test case never actually failed
7783 for me... but only because the corrupted semantic options usually
7784 masked this bug.
7785 (Leaked merged semantic value if user action cuts parse): New test
7786 case.
7787
7788 2006-01-05 Akim Demaille <akim@epita.fr>
7789
7790 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
7791
7792 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
7793
7794 * data/c.m4 (b4_c_modern): New macro, with a new provision for
7795 _MSC_VER. Problem reported by Cenzato Marco.
7796 (b4_c_function_def): Use it.
7797 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
7798 b4_c_modern.
7799 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
7800 than rolling our own.
7801
7802 2006-01-04 Akim Demaille <akim@epita.fr>
7803
7804 Also warn about non-used mid-rule values.
7805 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
7806 member.
7807 (symbol_list_new): Adjust.
7808 * src/reader.c (symbol_typed_p): New.
7809 (grammar_rule_check): Use it.
7810 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
7811 Check its rule.
7812 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
7813 Use it.
7814 * tests/actions.at (Exotic Dollars): Adjust.
7815
7816 2006-01-04 Akim Demaille <akim@epita.fr>
7817
7818 * src/reader.c (grammar_midrule_action): If $$ is set in a
7819 mid-rule, move the `used' bit to its lhs.
7820 * tests/input.at (Unused values): New.
7821 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
7822
7823 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
7824
7825 * doc/bison.texinfo (Bison Options): Say more accurately what
7826 --yacc does.
7827 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
7828 about declarations in the grammar when in Yacc mode, as POSIX does
7829 not require a diagnostic when the grammar uses extensions.
7830
7831 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
7832
7833 Warn about dubious constructions like "%token T T".
7834 Reported by twlevo.
7835 * src/symtab.h (struct symbol.declared): New member.
7836 * src/symtab.c (symbol_new): Initialize it to false.
7837 (symbol_class_set): New arg DECLARING, specifying whether
7838 this is a declaration that we want to warn about, if there
7839 is more than one of them. All uses changed.
7840
7841 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
7842 Allow multiple %union directives, whose contents concatenate.
7843 * src/parse-gram.y (grammar_declaration): Likewise.
7844 Use muscle_code_grow, so that we don't need stype_line any more.
7845 All uses changed.
7846
7847 * src/muscle_tab.c (muscle_grow): Fix comment.
7848
7849 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
7850 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
7851 Update copyright year to 2006.
7852
7853 2006-01-03 Akim Demaille <akim@epita.fr>
7854
7855 Have glr.cc pass (some of) the calc.at tests.
7856 * data/glr.cc (b4_parse_param_orig): New.
7857 (b4_parse_param): Improve its definition, and bound it more
7858 clearly in the skeleton.
7859 (b4_epilogue): Append, instead of prepending, in order to keep
7860 #line consistency.
7861 Simplify the generation of auxiliary functions: locations and
7862 purity are mandated.
7863 (b4_global_tokens_and_yystype): Honor it.
7864 * data/location.cc (c++.m4): Don't include it.
7865 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
7866 and AT_SKEL_CC_IF.
7867 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
7868 AT_LALR1_CC_IF.
7869 Be sure to initialize the first position's filename.
7870 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
7871 mandated anyway.
7872 (AT_CHECK_CALC_GLR_CC): New.
7873 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
7874
7875 2006-01-02 Akim Demaille <akim@epita.fr>
7876
7877 * src/output.c (output_skeleton): Don't hard wire the inclusion of
7878 c.m4.
7879 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
7880 * data/glr.cc: Do not include stack.hh.
7881
7882 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7883
7884 * data/glr.c: Reformat whitespace with tabs.
7885 (b4_lpure_formals): Remove this unused m4 macro.
7886 * tests/cxx-type.at: Reformat whitespace with tabs.
7887 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
7888 since it's a member. Rename type to isNterm for clarity.
7889
7890 2005-12-29 Akim <akim@sulaco.local>
7891
7892 Let glr.cc catch up with symbol_value_print.
7893 * data/glr.cc (b4_yysymprint_generate): Replace by...
7894 (b4_yy_symbol_print_generate): this.
7895 (yy_symbol_print, yy_symbol_value_print): Declare them.
7896
7897 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
7898
7899 * src/location.h (boundary): Note that a line or column equal
7900 to INT_MAX indicates an overflow.
7901 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
7902 (rule_length_overflow, increment_rule_length, add_column_width):
7903 New functions.
7904 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
7905 (<SC_BRACED_CODE>"}"):
7906 Use increment_rule_length rather than incrementing it by hand.
7907 (adjust_location, handle_syncline): Diagnose overflow.
7908 (handle_action_dollar, handle_action_at):
7909 Fix bug with monstrosities like $-2147483648.
7910 Remove now-unnecessary checks.
7911 (scan_integer): Verify assumptions and remove now-unnecessary checks.
7912 (convert_ucn_to_byte): Verify assumptions.
7913 (handle_syncline): New arg LOC. All callers changed.
7914 Don't store through a value derived from char const * pointer.
7915
7916 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
7917 GCC warnings.
7918
7919 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
7920
7921 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
7922 Remove unnecessary forward static decls.
7923
7924 2005-12-27 Akim Demaille <akim@epita.fr>
7925
7926 * src/reader.c (grammar_current_rule_check): Also check that $$
7927 is used.
7928 Take the rule to check as argument, hence rename as...
7929 (grammar_rule_check): this.
7930 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
7931 Rename as...
7932 (grammar_rule_begin, grammar_rule_end): these, for consistency.
7933 (grammar_midrule_action, grammar_symbol_append): Now static.
7934 * tests/torture.at (input): Don't rely on the default action
7935 being always performed.
7936 * tests/calc.at: "Set" $$ even when the action is "cut" with
7937 YYERROR or other.
7938 * tests/actions.at (Exotic Dollars): Instead of using unused
7939 values, check that the warning is issued.
7940
7941 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
7942
7943 * NEWS: Improve wording for unused-value warnings.
7944
7945 2005-12-22 Akim Demaille <akim@epita.fr>
7946
7947 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
7948 (b4_yysymprint_generate): Rename as...
7949 (b4_yy_symbol_print_generate): this.
7950 Generate yy_symbol_print instead of yysymprint.
7951 Generate also yy_symbol_value_print, and use it.
7952
7953 2005-12-22 Akim Demaille <akim@epita.fr>
7954
7955 * NEWS: Warn about unused values.
7956 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
7957 a `used' member.
7958 (symbol_list_n_get, symbol_list_n_used_set): New.
7959 (symbol_list_n_type_name_get): Use symbol_list_n_get.
7960 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
7961 * src/reader.c (grammar_current_rule_check): Check that values are
7962 used.
7963 * src/symtab.c (symbol_print): Accept 0.
7964 * tests/existing.at: Remove the type information.
7965 Empty the actions.
7966 Remove useless actions (beware of mid-rule actions: perl -000
7967 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
7968 * tests/actions.at (Exotic Dollars): Use unused values.
7969 * tests/calc.at: Likewise.
7970 * tests/glr-regression.at (No users destructors if stack 0 deleted):
7971 Likewise.
7972
7973 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
7974 rule_useful_p.
7975
7976 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
7977
7978 Undo 2005-12-01 tentative license wording change. The wording is
7979 still being reviewed by the lawyers, and we don't want to wait for
7980 them before publishing a test release. For now, revert to the
7981 previous wording.
7982 * NEWS: Undo 2005-12-01 change.
7983 * data/glr.c: Revert to previous license wording.
7984 * data/glr.cc: Likewise.
7985 * data/lalr1.cc: Likewise.
7986 * data/location.cc: Likewise.
7987 * data/yacc.c: Likewise.
7988
7989 * NEWS: Reword %destructor vs YYABORT etc.
7990 * data/glr.c: Use American spacing, for consistency.
7991 * data/glr.cc: Likewise.
7992 * data/lalr1.cc: Likewise.
7993 * data/yacc.c: Likewise.
7994 * data/yacc.c: Reformat comments slightly.
7995 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
7996 for consistency. Fix some spelling errors and reword recently-included
7997 text slightly.
7998 * tests/cxx-type.at: Cast results of malloc, for C++.
7999
8000 2005-12-21 Joel E. Denny <address@hidden>
8001
8002 * tests/cxx-type.at: Construct a tree, count the parents of shared
8003 nodes, and free each node once and only once. Previously, the memory
8004 for semantic values was leaked instead.
8005
8006 2005-12-21 Joel E. Denny <address@hidden>
8007
8008 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8009 (yylval, yylloc): If pure, #define to yystackp->yyval and
8010 yystackp->yyloc similar to yychar and yynerrs.
8011 (yyparse): If pure, remove local yylval and yylloc. Add local
8012 yystackp to accommodate pure definitions of yylval and yylloc.
8013 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8014 yylvalp and yyllocp to &yylval and &yylloc.
8015 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8016 namespace. Previously, nerrs and char were missing, but lval and lloc
8017 weren't necessary.
8018 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8019 yylvalp and yyllocp parameters since, if pure, these are now always
8020 accessible through yystackp. If not pure, they are still accessible
8021 globally.
8022 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8023 `if (YYID (N))' to pacify lint.
8024
8025 2005-12-21 Akim Demaille <akim@epita.fr>
8026
8027 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8028 destroy the RHS symbols of a rule.
8029 * data/yacc.c (yylen): Initialize to 0.
8030 Keep its value to the number of items to possibly shift.
8031 In particular, a regular successful parse that ends on YYFINAL by
8032 a (internal) YYACCEPT must not have yylen != 0.
8033 (yyerrorlab, yyreturn): Pop the RHS.
8034 Reorder a bit to emphasize the `shifting' bits of code.
8035 (YYPOPSTACK): Now accept a number of items to pop.
8036 * data/lalr1.cc: Likewise.
8037 * data/glr.c: Formatting changes.
8038 Use goto instead of fall through.
8039 * doc/bison.texinfo (Destructor Decl): Complete.
8040
8041 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8042
8043 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8044 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8045 * djgpp/config.bat: Replace every occurence of the file name
8046 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8047 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8048 * djgpp/config.sed: Replace every occurence of the file name
8049 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8050 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8051 * djgpp/djunpack.bat: DJGPP specific file.
8052 * djgpp/fnchange.lst: DJGPP specific file.
8053 * djgpp/README.in: Add new information about how to unpack the bison
8054 source on MSDOS and other systems which have 8.3 file name restrictions
8055 using djunpack.bat and fnchange.lst.
8056
8057 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8058
8059 * bootstrap (build_cvs_prefix): Remove; unused.
8060 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8061 when getting gnulib.
8062
8063 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8064
8065 * data/glr.c: Reorder typedef declarations for structs to match order
8066 of struct declarations.
8067 Rename yystack everywhere to yystackp except in yyparse where it's not
8068 a pointer.
8069 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8070 consistency.
8071 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8072 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8073 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8074 lint.
8075
8076 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8077
8078 * tests/sets.at (Accept): Fix typos in regular expression used to
8079 sed out the final state number.
8080
8081 Work around portability problem on Solaris 10: flex-generated
8082 files include <stdio.h> before <config.h>, which messes up
8083 because the latter defines __EXTENSIONS__. Address the problem
8084 by creating two new little files that include <config.h> first,
8085 then include the flex-generated files. Rewrite everyone else
8086 to include <config.h> first, as well.
8087 * lib/timevar.c: Always include "config.h".
8088 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8089 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8090 (EXTRA_bison_SOURCES): New macro.
8091 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8092 * src/system.h: Don't include config.h.
8093 * src/LR0.c: Include <config.h> first.
8094 * src/assoc.c: Likewise.
8095 * src/closure.c: Likewise.
8096 * src/complain.c: Likewise.
8097 * src/conflicts.c: Likewise.
8098 * src/derives.c: Likewise.
8099 * src/files.c: Likewise.
8100 * src/getargs.c: Likewise.
8101 * src/gram.c: Likewise.
8102 * src/lalr.c: Likewise.
8103 * src/location.c: Likewise.
8104 * src/main.c: Likewise.
8105 * src/muscle_tab.c: Likewise.
8106 * src/nullable.c: Likewise.
8107 * src/output.c: Likewise.
8108 * src/parse-gram.y: Likewise.
8109 * src/print.c: Likewise.
8110 * src/print_graph.c: Likewise.
8111 * src/reader.c: Likewise.
8112 * src/reduce.c: Likewise.
8113 * src/relation.c: Likewise.
8114 * src/state.c: Likewise.
8115 * src/symlist.c: Likewise.
8116 * src/symtab.c: Likewise.
8117 * src/tables.c: Likewise.
8118 * src/uniqstr.c: Likewise.
8119 * src/vcg.c: Likewise.
8120
8121 * src/parse-gram.y: Fix minor problems uncovered by lint.
8122 (current_lhs, current_lhs_location): Now static.
8123 (current_assoc): Remove unused variable.
8124
8125 Cleanups so that Bison-generated parsers have less lint.
8126 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8127 Prepend /*ARGSUSED*/, for lint's sake.
8128 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8129 definition if 'lint' is defined.
8130 (YYID): New macro (or function, if lint).
8131 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8132 * data/yacc.c: Likewise.
8133 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8134 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8135 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8136 is C++ only.
8137 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8138 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8139 Use YYID(0) rather than 0, for lint.
8140 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8141 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8142
8143 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8144
8145 * tests/glr-regression.at
8146 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8147 Close memory leak reported by twlevo.
8148
8149 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8150
8151 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8152 all stacks.
8153 (yyparse): Iterate another stack in order to call user destructors.
8154 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8155 New test case.
8156 (Duplicated user destructor for lookahead): This test now is expected
8157 to succeed.
8158
8159 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8160
8161 * NEWS: Document the following change.
8162 * data/yacc.c: Say "parser skeleton" rather than "file", since
8163 it's no longer just a file.
8164 * data/glr.c: Grant a special exception for C GLR parsers, that
8165 reads like the already-existing exception for C LALR(1) parsers.
8166 * data/glr.cc: Likewise.
8167 * data/lalr1.cc: Likewise.
8168 * data/location.cc: Likewise.
8169 * data/yacc.c: Reword the "written by" statement to clarify that
8170 it was the parser skeleton, not the entire output file.
8171 * data/glr.c: Written by Paul Hilfinger.
8172 * data/glr.cc: Written by Akim Demaille.
8173 * data/lalr1.cc: Likewise.
8174
8175 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8176
8177 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8178 Fix typos in previous change that broke 'make check'.
8179 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8180 supported in C.
8181 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8182 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8183 We can revert this once things settle down.
8184
8185 * src/conflicts.c (conflicts_print): Don't print file name twice
8186 when %expect fails because there were no conflicts.
8187 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8188 change.
8189 * tests/conflicts.at (%expect not enough, %expect too much):
8190 (%expect with reduce conflicts): Adjust to new behavior.
8191
8192 2005-11-18 Akim Demaille <akim@epita.fr>
8193
8194 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8195 errors.
8196 * NEWS: Document this.
8197 * doc/bison.texinfo (Expect Decl): Likewise.
8198
8199 2005-11-16 Akim Demaille <akim@epita.fr>
8200
8201 Generalize the display of semantic values and locations in traces.
8202 * data/glr.c (yy_reduce_print): Fix indices (again).
8203 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8204 literal integers.
8205 * data/lalr1.cc (yyreduce_print): Rename as...
8206 (yy_reduce_print): this.
8207 Display values and locations.
8208 * data/yacc.c (yy_reduce_print): Likewise.
8209 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8210 (yysymprint): Move higher to be visible from yy_reduce_print).
8211 (yyparse): Adjust.
8212 * tests/calc.at: Adjust the expected length of the traces.
8213
8214 2005-11-14 Akim Demaille <akim@epita.fr>
8215
8216 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8217 from 1 to N, while values and location start at 0.
8218 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8219
8220 2005-11-14 Akim Demaille <akim@epita.fr>
8221
8222 * data/glr.c (yy_reduce_print): Fix the $ number.
8223
8224 2005-11-14 Akim Demaille <akim@epita.fr>
8225
8226 "Use" parse parameters.
8227 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8228 * data/glr.c, data/glr.cc: Use them.
8229 * data/glr.c (YYUSE): Have a C++ definition that supports
8230 non-pointer types.
8231
8232 2005-11-14 Akim Demaille <akim@epita.fr>
8233
8234 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8235
8236 2005-11-14 Akim Demaille <akim@epita.fr>
8237
8238 * data/glr.cc: New.
8239 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
8240
8241 2005-11-12 Akim Demaille <akim@epita.fr>
8242
8243 Let position and location be PODs.
8244 * data/location.cc (position::initialize, location::initialize): New.
8245 (position::position, location::location): Define only if
8246 b4_location_constructors is defined.
8247 * data/lalr1.cc (b4_location_constructors): Define it for backward
8248 compatibility.
8249 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8250
8251 2005-11-12 Akim Demaille <akim@epita.fr>
8252
8253 * data/lalr1.cc: Move the body of the ctor and dtor into the
8254 parser file (instead of the header).
8255 Wrap the implementations in a "namespace yy".
8256
8257 2005-11-12 Akim Demaille <akim@epita.fr>
8258
8259 Have glr.c include its header file when created.
8260 * data/glr.c (b4_shared_declarations): New.
8261 Output them verbatim in the parser if !%defines, otherwise
8262 output then in the header file, and include it instead.
8263
8264 2005-11-11 Akim Demaille <akim@epita.fr>
8265
8266 * data/glr.c: Comment changes.
8267
8268 2005-11-11 Akim Demaille <akim@epita.fr>
8269
8270 When yydebug, report semantic and location values for reductions.
8271 * data/glr.c (yy_reduce_print): Report the semantic values and the
8272 locations.
8273 (YY_REDUCE_PRINT): Adjust.
8274 (yyglrReduce): Use them.
8275 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8276 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8277 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8278 traces.
8279
8280 2005-11-10 Akim Demaille <akim@epita.fr>
8281
8282 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8283 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8284 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8285
8286 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8287
8288 * m4/cxx.m4, examples/Makefile.am: Don't build
8289 examples/calc++ if no C++ compiler is available. (trivial change)
8290
8291 2005-11-09 Akim Demaille <akim@epita.fr>
8292
8293 * src/scan-skel.l: Use a couple of asserts.
8294
8295 2005-11-03 Akim Demaille <akim@epita.fr>
8296
8297 In some (weird) cases, the final state number is incorrect.
8298 Reported by Alexandre Duret-Lutz.
8299 * src/LR0.c (state_list_append): Remove the computation of
8300 final_state.
8301 (save_reductions): Do it here.
8302 (get_state): Alpha conversion.
8303 (generate_states): Use a for loop.
8304 * src/gram.h (item_number_is_rule_number)
8305 (item_number_is_symbol_number): New.
8306 * src/state.c: Use assert.
8307 * src/system.h: Include assert.h.
8308 * tests/sets.at (Accept): New.
8309
8310 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8311
8312 * data/glr.c (yyfill): Adjust comment.
8313 (yyresolveAction): Initialize default location properly
8314 for empty right-hand sides.
8315 (yydoAction): Ditto.
8316 Add comment explaining apparently dead code.
8317 * tests/glr-regression.at
8318 (Incorrectly initialized location for empty right-hand side in GLR):
8319 New test.
8320
8321 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8322
8323 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8324 gnulib when interrupted. This fixes some race conditions and
8325 works around some portability problems (one noted by Paul
8326 Hilfinger).
8327
8328 2005-10-22 Akim <akim@epita.fr>
8329
8330 * Makefile.cfg: Adjust to config -> build-aux.
8331 Reported by twledo.
8332
8333 2005-10-21 Akim Demaille <akim@epita.fr>
8334
8335 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8336 the %parse-params.
8337 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8338 * data/yacc.c (b4_Pure_if): Rename as...
8339 (b4_yacc_pure_if): this.
8340 (YY_SYMBOL_PRINT, yyparse): Adjust.
8341 * doc/bison.texinfo: Formatting changes.
8342
8343 2005-10-21 Akim Demaille <akim@epita.fr>
8344
8345 Finish the transition config -> build-aux.
8346 * configure.ac, Makefile.am: Use build-aux.
8347 * config/prev-version, config/announce-gen, config/Makefile.am:
8348 Move to...
8349 * build-aux/prev-version, build-aux/announce-gen,
8350 * build-aux/Makefile.am: here.
8351
8352 2005-10-14 Akim Demaille <akim@epita.fr>
8353
8354 * examples/calc++/test: Use set -x only when VERBOSE.
8355
8356 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8357
8358 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8359 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8360
8361 2005-10-13 Akim Demaille <akim@epita.fr>
8362
8363 * src/scan-skel.l: Output the base name parts of the parser and
8364 header file names.
8365 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
8366 additional checks.
8367 Use this to exercise C++ outputs in subdirs.
8368 Reported by Oleg Smolsky.
8369
8370 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8371
8372 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8373 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8374 Problem reported by John P. Hartmann.
8375 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8376 already defined it.
8377
8378 2005-10-12 Akim Demaille <akim@epita.fr>
8379
8380 * src/parse-gram.y (version_check): Exit 63 to please missing
8381 (stands for "version mismatch).
8382 * tests/input.at, doc/bison.texinfo: Adjust.
8383
8384 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8385
8386 Work around portability problems with Visual Age C compiler
8387 (xlc and xlC_r) reported by John P. Hartmann.
8388 * data/location.cc (initial_column, initial_line): Remove.
8389 All uses replaced by 0 and 1.
8390 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8391 that xlc complains about.
8392 * src/scan-skel.l (skel_wrap): Likewise.
8393 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
8394 as __STDC__.
8395 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8396 __STDC_VERSION__. Use it everywhere instead of looking at
8397 __STDC__ and __cplusplus.
8398
8399 2005-10-10 Akim Demaille <akim@epita.fr>
8400
8401 * examples/calc++/test: Be quiet unless VERBOSE.
8402
8403 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8404
8405 * data/c.m4 (yydestruct, yysymprint):
8406 Use YYUSE instead of casting to void.
8407 * data/glr.c (YYUSE): New macro.
8408 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8409 Use it instead of rolling our own.
8410 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8411 (YYCHK1):
8412 Use /*CONSTCOND*/ to suppress lint warnings.
8413 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8414 (YY_STACK_PRINT): Use 'false' not '0'.
8415 (YYUSE): New macro.
8416 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8417 * data/yacc.c (YYUSE): New macro.
8418 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8419 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8420 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8421
8422
8423 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8424 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8425
8426 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8427
8428 Undo the parts of the unlocked-I/O change that substituted
8429 putc or puts for printf. This might hurt performance a bit,
8430 but some people prefer the printf style.
8431 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8432 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8433 All uses replaced by YYFPRINTF and YYDPRINTF.
8434 * data/yacc.c: Likewise.
8435 * lib/bitset.c (bitset_print): Likewise.
8436 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8437 putc and puts.
8438 * lib/lbitset.c (debug_lbitset): Likewise.
8439 * src/closure.c (print_firsts, print_fderives): Likewise.
8440 * src/gram.c (grammar_dump): Likewise.
8441 * src/lalr.c (look_ahead_tokens_print): Likewise.
8442 * src/output.c (escaped_output): Likewise.
8443 (user_actions_output): Break apart two printfs.
8444 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8445 * src/reduce.c (reduce_print): Likewise.
8446 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8447 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8448
8449 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8450 Use assignments rather than casts-to-void to suppress
8451 unused-variable warnings. This pacifies 'lint'.
8452 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8453 unused-variable warnings.
8454
8455 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8456
8457 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8458
8459 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8460
8461 Use unlocked I/O for a minor performance improvement on hosts like
8462 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8463 is to use the gnlib unlocked-io module, and to prefer putc and
8464 puts to printf when either will work (since the latter doesn't
8465 come in an unlocked flavor).
8466 * bootstrap (gnulib_modules): Add unlocked-io.
8467 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8468 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8469 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8470 and similarly for puts and putc and printf.
8471 * data/yacc.c: Likewise.
8472 * lib/bitset.c (bitset_print): Likewise.
8473 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8474 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8475 to printf.
8476 * lib/lbitset.c (debug_lbitset): Likewise.
8477 * src/closure.c (print_firsts, print_fderives): Likewise.
8478 * src/gram.c (grammar_dump): Likewise.
8479 * src/lalr.c (look_ahead_tokens_print): Likewise.
8480 * src/output.c (escaped_output): Likewise.
8481 (user_actions_output): Coalesce two printfs.
8482 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
8483 * src/reduce.c (reduce_print): Likewise.
8484 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8485 * src/system.h: Include unlocked-io.h rather than stdio.h.
8486
8487 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8488 this confuses xgettext.
8489
8490 2005-10-02 Akim Demaille <akim@epita.fr>
8491
8492 * bootstrap (gnulib_modules): Add strverscmp.
8493 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8494 * m4/.cvsignore: Add strverscmp.m4.
8495 * src/parse-gram.y (%require): New token, new rule.
8496 (version_check): New.
8497 * src/scan-gram.l (%require): Adjust.
8498 * tests/input.at (AT_REQUIRE): New.
8499 Use it.
8500 * doc/bison.texinfo (Require Decl): New.
8501 (Calc++ Parser): Use %require.
8502
8503 2005-10-02 Akim Demaille <akim@epita.fr>
8504
8505 * data/location.cc: New.
8506
8507 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8508 Akim Demaille <akim@epita.fr>
8509
8510 Make sure -odir/foo.cc creates dir/location.hh etc.
8511 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8512 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8513 (spec_defines_file): Now const.
8514 (dir_prefix): New.
8515 (short_base_name): Remove.
8516 * src/files.c: Adjust.
8517 (dirname.h): Include.
8518 (base_name): Don't prototype it.
8519 (finput): Remove, duplicates gram_in.
8520 (full_base_name, short_base_name): Replace by...
8521 (all_but_ext, all_but_tab_ext): these.
8522 (compute_base_names): Rename as...
8523 (compute_file_name_parts): this.
8524 Update to compute the new variables, including dir_prefix.
8525 Adjust dependencies.
8526 * src/output.c (prepare): Output them.
8527 * src/reader.c: Adjust to use gram_in, not finput.
8528 * src/scan-skel.l (@dir_prefix@): New.
8529
8530 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8531
8532 * lib/subpipe.c: New function end_of_output_subpipe() added
8533 to allow support for non-posix systems. This is a no-op function
8534 for posix systems.
8535
8536 * lib/subpipe.h: New function end_of_output_subpipe() added
8537 to allow support for non-posix systems. This is a no-op function
8538 for posix systems.
8539
8540 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8541 handle the lack of pipe/fork functionality on non-posix systems.
8542
8543 * djgpp/Makefile.maint: DJGPP specific file.
8544
8545 * djgpp/README.in: DJGPP specific file.
8546
8547 * djgpp/config.bat: DJGPP specific configuration file.
8548
8549 * djgpp/config.sed: DJGPP specific configuration file.
8550
8551 * djgpp/config.site: DJGPP specific configuration file.
8552
8553 * djgpp/config_h.sed: DJGPP specific configuration file.
8554
8555 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8556
8557 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8558
8559 2005-10-02 Akim Demaille <akim@epita.fr>
8560
8561 * data/location.cc: New, extract from...
8562 * data/lalr1.cc: here.
8563 (location.hh): Include it after the user prologue, in case the
8564 filename type is defined by the user.
8565 Forward declation location and position before the pre-prologue.
8566 (yyresult_): Rename as...
8567 (yyresult): this, it's a local variable, not an attribute.
8568 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8569
8570 2005-10-01 Akim Demaille <akim@epita.fr>
8571
8572 * examples/extexi: Restore the #line generation.
8573
8574 2005-09-30 Akim Demaille <akim@epita.fr>,
8575 Alexandre Duret-Lutz <adl@gnu.org>
8576
8577 Move the token type and YYSTYPE in the parser class.
8578 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
8579 (parser::token): New, from the moved free definition of tokens.
8580 (parser::semantic_value): Now a full definition instead of an
8581 indirection to YYSTYPE.
8582 (b4_post_prologue): No longer included in the header file, but
8583 in the implementation file.
8584 * doc/bison.texi (C+ Language Interface): Update.
8585 * src/parse-gram.y: Support unary %define.
8586 * tests/actions.at: Define global_tokens_and_yystype for backward
8587 compatibility until we update the tests.
8588 * tests/calc.at: Idem.
8589 (first_line, first_column, last_line, last_column): Define for lalr1.cc
8590 to simplify the code.
8591
8592 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
8593
8594 Port to SunOS 4.1.4, which lacks strtoul and strerror.
8595 Ah, the good old days! Problem reported by Peter Klein.
8596 * bootstrap (gnulib_modules): Add strerror, strtoul.
8597 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
8598 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
8599
8600 2005-09-29 Akim Demaille <akim@epita.fr>
8601
8602 * data/c.m4 (b4_error_verbose_if): New.
8603 * data/lalr1.cc: Use it.
8604 (YYERROR_VERBOSE_IF): Remove.
8605 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
8606 parser members, replaced by...
8607 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
8608 local variables.
8609 (yysyntax_error_): Takes the state number as argument.
8610 (yyreduce_print_): Use the argument yyrule, not the former
8611 attribute yyn_.
8612
8613 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
8614
8615 * bootstrap (gnulib_modules): Add verify.
8616 * lib/.cvsignore: Add verify.h.
8617 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
8618 * src/system.h (verify): Remove.
8619 Include verify.h instead.
8620 * src/tables.c (tables_generate): Use new API for 'verify'.
8621
8622 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
8623
8624 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
8625 local variables whose names begin with 'yy'.
8626 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8627 Trivial changes from Joel E. Denny.
8628
8629 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
8630 it itself.
8631 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
8632 don't use alloca any more.
8633
8634 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
8635 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
8636 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
8637 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
8638 to match yacc.c, to test more hosts.
8639
8640 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
8641
8642 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
8643 doesn't affect behavior.
8644 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
8645 Solaris, AIX, MSC.
8646 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
8647 This works a bit better with glibc, if user code has already included
8648 stdlib.h.
8649 * doc/bison.texinfo (Bison Parser): Document that users can't
8650 arbitrarily use malloc and free for other purposes. Document
8651 that <alloca.h> and <malloc.h> might be included.
8652 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
8653 user must declare alloca.
8654
8655 * HACKING (release): Forwarn the Translation Project about
8656 stable releses.
8657
8658 2005-09-20 Akim Demaille <akim@epita.fr>
8659
8660 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
8661
8662 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
8663
8664 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
8665 (YYSTACK_ALLOC_MAXIMUM): Use it.
8666 (yysyntax_error): New function.
8667 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
8668 multiple syntax errors are reported, and alloca is being used.
8669 Instead, reallocate buffers twice as big each time, so that
8670 we waste at most half the allocated memory. Start with a small
8671 (128-byte) buffer that will suffice in most cases anyway.
8672 Use yysyntax_error to do most of the work.
8673
8674 * doc/bison.texinfo (Error Reporting, Table of Symbols):
8675 yynerrs is the number of errors reported, not the number of
8676 errors encountered.
8677
8678 * tests/glr-regression.at (Duplicated user destructor for lookahead):
8679 Mark it as expected to fail.
8680 Cast result of malloc; problem reported by twlevo@xs4all.nl.
8681 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
8682 Don't start user-code symbols with "yy", to avoid name space problems.
8683
8684 2005-09-19 Akim Demaille <akim@epita.fr>
8685
8686 Remove the traits, failed experiment.
8687 It never proved useful, and anyway because of the current
8688 definition, it was not possible to have several specialization of
8689 this traits, making it useless.
8690 * data/lalr1.cc (yy:traits): Remove.
8691 Inline its definitions in the parser class.
8692
8693 2005-09-19 Akim Demaille <akim@epita.fr>
8694
8695 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
8696 least Mac OSX with a /usr/local install of gettext.
8697
8698 2005-09-19 Akim Demaille <akim@epita.fr>
8699
8700 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
8701 and yytoken for similarity with the other skeletons.
8702
8703 2005-09-19 Akim Demaille <akim@epita.fr>
8704
8705 * NEWS, configure.ac: update version number to 2.1a.
8706
8707 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
8708
8709 * NEWS: Version 2.1.
8710
8711 * NEWS: Remove notice of yytname change, since it was never in an
8712 official release.
8713 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
8714 diagnostic.
8715 * src/output.c (prepare): Likewise.
8716 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
8717 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
8718 is not defined. This is an awful hack, but it's enough for now.
8719 All callers changed.
8720 * tests/glr-regression-at (make_value): Args are const pointers now,
8721 to avoid GCC warning.
8722 (Duplicated user destructor for lookahead): New test. Currently
8723 skipped. It fails on my host but I'm not sure it'll always fail.
8724
8725 2005-09-16 Akim Demaille <akim@epita.fr>
8726
8727 * src/symtab.h (struct symbol): Declare the printer and destructor
8728 as const, to avoid accidental calls to free.
8729 (symbol_destructor_set, symbol_printer_set): Adjust.
8730 * src/symtab.c: Adjust.
8731
8732 2005-09-16 Akim Demaille <akim@epita.fr>
8733
8734 * data/c.m4 (b4_token_enums): New.
8735 (b4_token_defines): Rename as...
8736 (b4_token_enums_defines): this.
8737 (b4_token_defines): New, output only the #defines.
8738 * data/yacc.c, data/glr.c: Adjust.
8739 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
8740 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
8741 as default values.
8742
8743 2005-09-16 Akim Demaille <akim@epita.fr>
8744
8745 * data/lalr1.cc (yylex_): Remove, inline its code.
8746 (yyreport_syntax_error_): Remove, replaced by...
8747 (yysyntax_error_): this which returns a string and leaves to the
8748 caller the call to the users' error function.
8749 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
8750 Move from members of the parser object...
8751 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
8752 to local variables of the parse function.
8753
8754 2005-09-16 Akim Demaille <akim@epita.fr>
8755
8756 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
8757 since it's in Bison's name space.
8758
8759 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
8760
8761 * data/glr.c (yyresolveValue): Add default case to pacify
8762 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
8763
8764 * NEWS: Document when yyparse started to return 2.
8765 * doc/bison.texinfo (Parser Function): Document when yyparse
8766 returns 2.
8767
8768 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
8769 (b4_filename_type): Renamed back from b4_file_name_type. All uses
8770 changed.
8771 (class position): file_name -> filename (reverting). All uses changed.
8772
8773 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
8774
8775 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
8776 do anything if $@ exists. This reverts part of the 2005-07-07
8777 patch.
8778
8779 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
8780
8781 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
8782 contains obsolete information and isn't worth distributing as a
8783 separate file anyway.
8784 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
8785 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
8786 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
8787 (yyparse): Abort if user code uses longjmp to throw an unexpected
8788 value.
8789
8790 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
8791
8792 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
8793 Suggested by twlevo@xs4all.nl.
8794
8795 * data/glr.c (YYCHK1): Do not assume YYE is in range.
8796 This avoids a diagnostic from gcc -Wswitch-enum.
8797 Problem reported by twlevo@xs4all.nl.
8798
8799 * doc/bison.texinfo: Don't use "filename", as per GNU coding
8800 standards. Use "file name" or "file" or "name", depending on
8801 the context.
8802 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
8803 not to hack/foo.tab.c.
8804 (Calc++ Top Level): 2nd arg of main is not const.
8805 * data/glr.c: b4_filename -> b4_file_name.
8806 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
8807 All uses changed.
8808 (class position): filename -> file_name. All uses changed.
8809 * data/yacc.c: b4_filename -> b4_file_name.
8810 * lib/bitset.h: filename -> file_name in local vars.
8811 * lib/bitset_stats.c: Likewise.
8812 * src/files.c: Likewise.
8813 * src/scan-skel.l ("@output ".*\n): Likewise.
8814 * src/files.c (file_name_split): Renamed from filename_split.
8815 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
8816
8817 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
8818
8819 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
8820 to accommodate latest gnulib.
8821
8822 * tests/glr-regression.at (Duplicate representation of merged trees):
8823 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
8824
8825 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
8826 needed.
8827
8828 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
8829
8830 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
8831 All uses changed. Invoke user destructor after an error during a
8832 split parse (trivial change from Joel E. Denny).
8833
8834 * tests/glr-regression.at
8835 (User destructor after an error during a split parse): New test case.
8836 Problem reported by Joel E. Denny in:
8837 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
8838
8839 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
8840
8841 * README-cvs: Give URLs for recommended tools.
8842 Mention Gzip version problem, and bootstrapping issues.
8843 Remove troubleshooting section, as it's somewhat obsolete.
8844
8845 * bootstrap (no_cache): New var, to accommodate different wget
8846 variants. Use it instead of '-C off'. Problem reported by
8847 twlevo@xs4all.nl.
8848
8849 * data/glr.c (yydestroyStackItem): New function.
8850 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
8851 debugging information. Problem reported by Joel E. Denny.
8852
8853 2005-08-25 Akim Demaille <akim@epita.fr>
8854
8855 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
8856
8857 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
8858
8859 * data/glr.c (yyrecoverSyntaxError, yyreturn):
8860 Don't invoke destructor on unresolved entries.
8861 * tests/glr-regression.at
8862 (User destructor for unresolved GLR semantic value): New test case.
8863 Problem reported by Joel E. Denny in:
8864 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
8865
8866 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
8867
8868 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
8869 Add strnlen.c.
8870 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
8871 lib-prefix.m4, po.m4.
8872
8873 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
8874 in yydestruct diagnostic, since it might not be an error.
8875 Problem reported by Joel Denny near end of
8876 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8877 * data/lalr1.cc (yyerturn): Likewise.
8878 * data/yacc.c (yyreturn): Likewise.
8879 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
8880
8881 * src/files.c: Remove obsolete FIXME comment.
8882
8883 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
8884 with the other templates, and to fix bogus run-on messages such
8885 as the one reported at the end of
8886 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8887 All callers changed to avoid the newline.
8888 (yyprocessOneStack): Output two lines rather than one, to accommodate
8889 the above change. This changes the debug output format slightly.
8890
8891 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
8892 reported by Joel E. Denny in
8893 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
8894 (trivial change).
8895 * tests/glr-regression.at (Duplicate representation of merged trees):
8896 New test, from Joel E. Denny in:
8897 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
8898 * THANKS: Add Joel E. Denny.
8899
8900 * configure.ac (AC_INIT): Bump to 2.0c.
8901
8902 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
8903
8904 * NEWS: Version 2.0b.
8905
8906 * Makefile.am (SUBDIRS): Put examples before tests, so that
8907 "make check" doesn't finish with "All 1 tests passed".
8908
8909 * tests/regression.at (Token definitions): Don't rely on
8910 AT_PARSER_CHECK for data that contains backslashes. It currently
8911 uses 'echo', and 'echo' isn't portable if its argument contains
8912 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
8913 that the byte '\0xff' is not printable in the C locale; it is,
8914 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
8915 not printable, so use '\0x81' to test.
8916
8917 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
8918 version of GCC, since the macro is used with non-GCC compilers.
8919
8920 Fix core dump reported by Pablo De Napoli in
8921 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
8922 * tests/regression.at (Invalid inputs with {}): New test.
8923 * src/parse-gram.y (token_name): Translate type before using
8924 it as an index.
8925
8926 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
8927 the user's name space. All uses changed to __attribute__
8928 ((__unused__)).
8929 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
8930 Add __attribute__ ((__noreturn__)).
8931
8932 * etc/clcommit: Remove. We weren't using it, and it failed
8933 "make maintainer-distcheck".
8934 * Makefile.maint: Merge from coreutils.
8935 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
8936 (syntax-check-rules): Change list of rules as described below.
8937 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
8938 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
8939 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
8940 (sc_trailing_space): New rules.
8941 (sc_xalloc_h_in_src): Remove.
8942 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
8943 (sc_space_tab, sc_error_exit_success, sc_changelog):
8944 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
8945 (makefile-check, po-check, author_mark_check):
8946 (makefile_path_separator_check, copyright-check):
8947 Use grep -n, to make it easier to find violations.
8948 Use CVS_LIST and CVS_LIST_EXCEPT.
8949 (header_regexp, h_re): Remove.
8950 (dd_c): New macro.
8951 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
8952 (my-distcheck): Use more-modern GCC flags.
8953 (signatures, %.asc): Remove.
8954 (rel-files, announcement): Remove signatures.
8955 Restore old updating code, even though we don't use it, so
8956 that we're the same as coreutils.
8957 (alpha, beta, major): Depend on news-date-check.
8958 Make the upload commands.
8959
8960 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
8961 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
8962 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
8963 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
8964 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
8965 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
8966 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
8967 * tests/sets.at: Likewise.
8968
8969 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
8970 we comment out the Autoconf version number.
8971 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
8972 it's error-prone and "make maintainer-distcheck" rejects it.
8973
8974 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
8975 Indent calls to "error" to pacify "make maintainer-distcheck",
8976 when the calls are not intended to be translated.
8977 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
8978
8979 * src/Makefile.am (DEFS): Use +=, to pacify
8980 "make maintainer-distcheck".
8981 (bison_SOURCES): Add scan-skel.h.
8982 (sc_tight_scope): New rule, from coreutils.
8983
8984 * src/files.c (src_extension, header_extension):
8985 Now static, not extern.
8986 * src/getargs.c (short_options): Likewise.
8987 * src/muscle_tab.c (muscle_table): Likewise.
8988 * src/parse-gram.y (current_class, current_type, current_prec):
8989 Likewise.
8990 * src/reader.c (grammar_end, previous_rule_end): Likewise.
8991 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
8992 * src/main.c (main): Cast bindtextdomain and textdomain calls to
8993 void, to avoid warning when NLS is disabled.
8994 * src/output.c: Include scan-skel.h.
8995 (scan_skel): Remove decl, since scan-skel.h does this.
8996 (output_skeleton):
8997 Indent calls to "error" to pacify "make maintainer-distcheck".
8998 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
8999 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9000 "make maintainer-distcheck".
9001 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9002 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9003 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9004 (skel_lex_destroy, scan_skel): Move these decls to...
9005 * src/scan-skel.h: New file.
9006 * src/uniqstr.c (uniqstr_assert):
9007 Indent calls to "error" to pacify "make maintainer-distcheck".
9008
9009 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9010 not @VAR@.
9011
9012 * tests/torture.at: Revamp to avoid misuse of atoi that
9013 "make maintainer-distcheck" complained about.
9014
9015 * examples/extexi (message): Don't print a message more than once,
9016 and omit line-number decoration that makes Emacs compile think
9017 that informative messages are worth worrying about.
9018
9019 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9020
9021 * configure.ac: Update version number.
9022
9023 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9024 accidentally.
9025 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9026 autogenerated by the maintainer.
9027 * examples/calc++/.cvsignore: Add *.yy.
9028
9029 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9030 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9031 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9032
9033 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9034
9035 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9036 from maintainer-distcheck about casting the argument of 'free'.
9037
9038 * NEWS: Mention recent yytname changes.
9039 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9040
9041 * bootstrap: For translations that have not yet been upgraded to
9042 the new runtime-po domain, prime the pump by extracting the
9043 relevant strings from the obsolete translations. This code can be
9044 removed once the bison-runtime domain has been translated by each
9045 team.
9046
9047 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9048 now that token names are already quoted.
9049
9050 Fix problem reported by Anthony Heading.
9051 * data/glr.c (YYTOKEN_TABLE): New macro.
9052 (yytname): Define if YYTOKEN_TABLE.
9053 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9054 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9055 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9056 * src/output.c (prepare_symbols): Output token_table_flag.
9057
9058 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9059
9060 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9061 again if the first call fails.
9062
9063 * data/glr.c (yytnamerr): New function.
9064 (yyreportSyntaxError): Use it to dequote most string literals.
9065 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9066 with other skeletons. All uses changed.
9067 (yytnameerr_): New function.
9068 (yyreport_syntax_error): Use it to dequote most string literals.
9069 * data/yacc.c (yytnamerr): New function.
9070 (yyerrlab): Use it to decode most string literals.
9071 * doc/bison.texinfo (Decl Summary, Calling Convention):
9072 Clarify quoting convention of yytname.
9073 * src/output.c (prepare_symbols): Quote all names. This undoes
9074 the 2005-04-17 change, which is now accomplished (mostly) via
9075 changes in the parsers as described above.
9076 * tests/regression.at (Token definitions, Web2c Actions):
9077 Undo most 2005-04-17 change here, too.
9078
9079 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9080
9081 Fix more problems reported by twlevo@xs4all.nl.
9082 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9083 remove trailing spaces. This loses the exit status of ./types,
9084 and isn't needed since ./types shouldn't be emitting trailing
9085 spaces.
9086 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9087 as the stack isn't valid in that case.
9088
9089 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9090 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9091 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9092 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9093 is used.
9094 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9095 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9096 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9097 Likewise.
9098
9099 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9100 overly-picky compilers that reject 'char *foo = "bar";'.
9101
9102 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9103 to FILE * parameter, not to stderr. This fixes a typo introduced
9104 in the 2005-07-12 change.
9105
9106 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9107 warnings from GCC 4.
9108
9109 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9110 (yyglrShiftDefer, yysplitStack):
9111 Remove unused parameters b4_pure_formals. All uses changed.
9112 (yyglrShift): Remove unused parameters b4_user_formals.
9113 All uses changed.
9114 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9115
9116 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9117
9118 Destructor cleanups and regularization among the three skeletons.
9119 * NEWS: Document the behavior changes.
9120 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9121 stack before failing, as the cleanup code will do it for us now.
9122 * data/lalr1.cc (yyerrlab): Likewise.
9123 * data/glr.c (yyparse): Pop everything off the stack before
9124 freeing it, so that destructors get called properly.
9125 * data/lalr1.cc (yyreturn): Likewise.
9126 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9127 This is more consistent.
9128 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9129 why destructors might be called. 1.875 -> 2.1.
9130 (Destructor Decl, Decl Summary, Table of Symbols):
9131 Some English-language cleanups for %destructor.
9132 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9133 Add output line for destructor of start symbol.
9134 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9135 because of that same extra output line.
9136
9137 * NEWS: Document minor wording changes in diagnostics of
9138 Bison-generated parsers.
9139 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9140 Remove unused formals. All uses changed.
9141 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9142 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9143 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9144 Rename yyoverflowab to yyexhaustedlab.
9145 When memory exhaustion occurs during syntax-error reporting,
9146 report it separately rather than in a single diagnostic; this
9147 eases translation.
9148 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9149 (Memory Exhausted): Renamed from Parser Stack Overflow.
9150 Revamp wording slightly to prefer "memory exhaustion".
9151 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9152
9153 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9154
9155 Add i18n support to the GLR skeleton. Partially fix the C++
9156 skeleton; a C++ expert needs to finish this. Remove debugging
9157 msgids; there's little point to having them translated, since they
9158 can be understood only by someone who can read the
9159 (English-language) source code.
9160
9161 Generate runtime-po/bison-runtime.pot automatically, so that we
9162 don't have to worry about garbage getting in that file. We'll
9163 make sure after the next official release that old msgids don't
9164 get lost. See
9165 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9166
9167 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9168 Now auto-generated.
9169 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9170 Fix typos in explanations of the runtime file.
9171 * bootstrap: Change gettext keyword from YYI18N to YY_.
9172 Use standard Makefile.in.in in runtime-po, since we'll arrange
9173 for backward-compatible bison-runtime.po files in a different way.
9174 * data/glr.c (YY_): New macro, from yacc.c.
9175 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9176 Translate messages intended for users.
9177 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9178 the wording in the other skeletons. We don't know that the memory
9179 is virtual.
9180 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
9181 Use same method that yacc.c uses.
9182 Don't translate debugging messages.
9183 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9184 it doesn't work (yet), and requires C++ expertise to fix.
9185 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
9186 Move defn to a more logical place, to be consistent with other
9187 skeletons.
9188 Don't translate debugging messages.
9189 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9190 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
9191 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
9192 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9193
9194 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9195 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9196 void, not int.
9197 * tests/glr-regression.at (Badly Collapsed GLR States):
9198 Likewise.
9199 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9200 yylex should return 0 at EOF rather than aborting.
9201
9202 Improve tests for stack overflow in GLR parser.
9203 Problem reported by twlevo@xs4all.nl.
9204 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9205 All uses removed.
9206 (yyStackOverflow): Just longjmp, but with value 2 so that caller
9207 can handle the problem.
9208 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9209 (yyparse): New local variable yyresult to record the result.
9210 Use result of setjmp to set it, rather than storing itinto
9211 struct.
9212 (yyDone): Remove label.
9213 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9214 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
9215 if YYABORT is used).
9216 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9217 yyparse status; put status > 1 into diagnostic.
9218 Check that status==2 works.
9219 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9220 Use exit status 3 for failure to open (which shouldn't happen).
9221
9222 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9223
9224 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9225 1 on syntax error; just let yyparse do its thing.
9226 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9227 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9228 (Exploding the Stack Size with Alloca):
9229 (Exploding the Stack Size with Malloc):
9230 Expect exit status 2, not 1, since the parser is supposed to blow
9231 its stack. Problem reported by twlevo@xs4all.nl.
9232
9233 * data/glr.c (yyparse): Don't assume that the initial calls
9234 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9235 Print a stack-overflow message and fail instead.
9236 Initialize the line-number information before creating the stack,
9237 so that the stack-overflow message can report line zero safely.
9238
9239 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9240
9241 Fix problems reported by twlevo@xs4all.nl.
9242 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9243 (yyuserMerge): Provide a default case if b4_mergers is empty.
9244 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9245 * tests/glr-regression.at
9246 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9247 Add casts to pacify C++ compilers.
9248 * tests/glr-regression.at (Improper merging of GLR delayed action
9249 sets): Declare yylex before using it.
9250 * tests/Makefile.am (maintainer-check-g++): Fix a stray
9251 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9252 test for valgrind; valgrind is independent of g++.
9253 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9254 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9255 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9256 Use a destructor, so that we can expand the stack. Change
9257 YYSTYPE to char * so that we can free it. Cast result of malloc.
9258
9259 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9260
9261 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9262 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9263
9264 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9265
9266 * PACKAGING: New file, suggested by Bruno Haible and taken from
9267 similar wording in gettext's PACKAGING file.
9268 * NEWS: Mention PACKAGING.
9269 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9270
9271 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9272
9273 * NEWS: Document recent i18n improvements.
9274 * bootstrap: Get runtime translations into runtime-po.
9275 Create runtime-po files automatically, if possible.
9276 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9277 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9278 does not infringe on the user's name space.
9279 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9280 * doc/bison.texinfo (Internationalization): Revamp the English
9281 and Texinfo syntax a bit, to try to make it clearer.
9282 (Bison Options, Option Cross Key): Mention --print-localedir.
9283 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9284 YYENABLE_NLS. Quote a bit more.
9285 * runtime-po/.cvsignore: New file.
9286 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9287 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9288 * runtime-po/quot.sed: Likewise.
9289 * runtime-po/boldquot.sed: Likewise.
9290 * runtime-po/en@quot.header: Likewise.
9291 * runtime-po/en@boldquot.header: Likewise.
9292 * runtime-po/insert-header.sin: Likewise.
9293 * runtime-po/remove-potcdate.sin: Likewise.
9294 * runtime-po/Makevars: Likewise.
9295 * runtime-po/LINGUAS: Likewise.
9296 * runtime-po/de.po: Likewise; we will rely on the translation project
9297 to maintain this, so "bootstrap" should get it.
9298 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
9299 its value.
9300 * src/main.c (main): Bind the bison-runtime domain, too.
9301
9302 2005-07-12 Bruno Haible <bruno@clisp.org>
9303
9304 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9305 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9306 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9307 * runtime-po: New directory.
9308 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9309 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9310 * runtime-po/Rules-quot: New file, copied from po/.
9311 * runtime-po/quot.sed: Likewise.
9312 * runtime-po/boldquot.sed: Likewise.
9313 * runtime-po/en@quot.header: Likewise.
9314 * runtime-po/en@boldquot.header: Likewise.
9315 * runtime-po/insert-header.sin: Likewise.
9316 * runtime-po/remove-potcdate.sin: Likewise.
9317 * runtime-po/Makevars: New file.
9318 * runtime-po/POTFILES.in: New file.
9319 * runtime-po/LINGUAS: New file.
9320 * runtime-po/bison-runtime.pot: New file.
9321 * runtime-po/de.po: New file.
9322 * m4/bison.m4: New file.
9323 * Makefile.am (SUBDIRS): Add runtime-po.
9324 (aclocaldir, aclocal_DATA): New variables.
9325 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9326 Define aclocaldir.
9327 * src/getargs.c (usage): Document --print-localedir option.
9328 (PRINT_LOCALEDIR_OPTION): New enum item.
9329 (long_options): Add --print-localedir option.
9330 (getargs): Handle --print-localedir option.
9331 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9332 (Internationalization): New section.
9333
9334 2005-07-12 Akim Demaille <akim@epita.fr>
9335
9336 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9337 for consistency with the rest of the code.
9338 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9339 Add separators.
9340
9341 2005-07-12 Akim Demaille <akim@epita.fr>
9342
9343 * src/parse-gram.y: Use %printer instead of YYPRINT.
9344
9345 2005-07-12 Akim Demaille <akim@epita.fr>
9346
9347 * src/symtab.h, src/symtab.c (symbol_print): New.
9348 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9349 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9350
9351 2005-07-12 Akim Demaille <akim@epita.fr>
9352
9353 * data/glr.c (b4_syncline): Fix (swap) the definitions of
9354 b4_at_dollar and b4_dollar_dollar.
9355
9356 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9357
9358 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9359 and Pennello's paper.
9360
9361 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9362
9363 * data/yacc.c (yyparse): Undo previous patch. Instead,
9364 set yylsp[0] and yyvsp[0] only if the initial action
9365 sets yylloc and yylval, respectively.
9366
9367 * data/yacc.c (yyparse): In the initial action, set
9368 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9369 This avoids the use of undefined variables if the initial
9370 action does not set yylloc and/or yylval.
9371
9372 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9373
9374 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9375 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9376 Remove from CVS. These files are automatically generated.
9377 * examples/extexi: Clarify that this file is now part of Bison,
9378 not GNU M4, and that it works with any POSIX-compatible Awk.
9379 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9380 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9381 so that we also get calc++-parser.yy. Geneate it.
9382 Use $(AWK), not gawk, since any conforming Awk will do.
9383 Put comment before action, since older 'make' can't handle comment
9384 in action.
9385 $(BUILT_SOURCES): List all built sources, not just some of them.
9386 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9387 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9388 $($(calc_sources_generated)): Remove unnecessary test for existence
9389 of target. (This had a shell syntax error anyway; a stray "x".)
9390 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9391 calc++-parser.yy.
9392 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9393
9394 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9395 implied by the other modules.
9396
9397 2005-07-06 Akim Demaille <akim@epita.fr>
9398
9399 Bind examples/calc++ to the package.
9400 * examples/calc++/Makefile: Remove, replaced by...
9401 * examples/calc++/Makefile.am: ... this new file.
9402 * examples/calc++/test: Remove input.
9403 * examples/calc++/compile: Remove.
9404 * examples/Makefile.am: New.
9405 * configure.ac, Makefile.am: Adjust.
9406 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9407
9408 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9409
9410 * data/glr.c (yyFail): Drastically simplify; since the format argument
9411 never had any % directives, we can simply pass it to yyerror.
9412 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9413 be modified later, as that is the usual style in glr.c.
9414 Problems reported by Paul Hilfinger.
9415
9416 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9417 and size overflow errors.
9418 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9419 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9420 (YYSIZEMAX): New macro.
9421 (yystpcpy): New function, taken from yacc.c.
9422 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9423 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9424 so that we don't have to maintain their signatures.
9425 (yyFail): Check for buffer overflow, by using vsnprintf rather
9426 than vsprintf. Allocate a bigger buffer if possible.
9427 Report an error if buffer allocation fails.
9428 (yyStackOverflow): New function.
9429 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9430 the initialization was successful. It might fail if storage was
9431 exhausted.
9432 (yyexpandGLRStack): Add more checks for storage allocation failure.
9433 Use yyStackOverflow to report failures.
9434 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9435 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9436 Don't assume stack number fits in int.
9437 (yysplitStack): Check for storage allocation failure.
9438 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9439 can print diagnostics on storage allocation failure. All callers
9440 changed.
9441 (yyresolveValue): Use yybool for boolean.
9442 (yyreportSyntaxError): Check for size-calculation overflow.
9443 This code is taken from yacc.c.
9444 (yyparse): Check for storage allocation errors when allocating
9445 the initial stack.
9446
9447 2005-07-05 Akim Demaille <akim@epita.fr>
9448
9449 Extract calc++ from the documentation.
9450 * doc/bison.texinfo (Calc++): Add the extraction marks.
9451 * examples/extexi: New, from the aborted GNU Programming 2E.
9452 Separate the different paragraph of a file with empty lines.
9453 * examples/Makefile: Use it to extract the whole calc++ example.
9454
9455 2005-06-24 Akim Demaille <akim@epita.fr>
9456
9457 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9458 class typedefs.
9459
9460 2005-06-22 Akim Demaille <akim@epita.fr>
9461
9462 * doc/bison.texinfo (C++ Language Interface): First stab.
9463 (C++ Parsers): Remove.
9464
9465 2005-06-22 Akim Demaille <akim@epita.fr>
9466
9467 * data/lalr1.cc (yylex_): Honor %lex-param.
9468
9469 2005-06-22 Akim Demaille <akim@epita.fr>
9470
9471 Start a set of simple examples.
9472 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9473 * examples/calc++/calc++-driver.hh,
9474 * examples/calc++/calc++-parser.yy,
9475 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9476 * examples/calc++/compile, examples/calc++/test: New.
9477
9478 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9479
9480 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9481 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9482 which stems from the 2005-05-27 patch.
9483
9484 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9485
9486 * data/glr.c: Modify treatment of unused parameters to permit use
9487 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9488
9489 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9490
9491 Fix infringement on user name space reported by Janos Zoltan Szabo.
9492 * data/yacc.c (yyparse): strlen -> yystrlen.
9493
9494 2005-05-30 Akim Demaille <akim@epita.fr>
9495
9496 * data/lalr1.cc (_): New.
9497 Translate the various messages.
9498
9499 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9500
9501 Fix infringement on user name space reported by Bruno Haible.
9502 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9503 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9504 the user's name space.
9505 (alloca): Include <stdlib.h> to get it, if it's not built in.
9506 (YYMALLOC, YYFREE): Define only if needed.
9507 (malloc, free): Declare, but only if needed, as this infringes on
9508 the user name space.
9509
9510 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9511
9512 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9513 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9514 with %d format.
9515 * lib/ebitset.c (min, max): Undef before defining.
9516 * lib/vbitset.c (min, max): Likewise.
9517 * lib/subpipe.c (create_subpipe): Save local variables in case
9518 vfork clobbers them.
9519
9520 2005-05-24 Bruno Haible <bruno@clisp.org>
9521
9522 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9523 error message syntax used by gcc-4.0.
9524
9525 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9526
9527 * README: Mention m4 1.4.3. Remove obsolete advice about
9528 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9529
9530 * bootstrap: Remove workaround for problem I encountered with
9531 gettext 0.14.1; it seems to be fixed now.
9532
9533 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9534
9535 * NEWS: Version 2.0a.
9536
9537 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9538 the previous change.
9539
9540 Various maintainer cleanups.
9541 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9542 conftest*, for benefit of CVS commands run at the same time as
9543 "configure". Add build-aux, since "bootstrap" now creates it and
9544 its subfiles.
9545 * Makefile.cfg (move_if_change): Remove.
9546 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9547 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9548 (po_repo, do-po-update, po-update, wget_files, get-targets):
9549 (config.guess-url_prefix, config.sub-url_prefix):
9550 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9551 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9552 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9553 Remove.
9554 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9555 this is now the recommended name.
9556 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9557 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9558 ylwrap. These files now go into build-aux.
9559 * config/move-if-change: Remove.
9560 * config/prev-version.txt: Bump from 1.75 to 2.0.
9561
9562 * bootstrap: Add stdio-safer, unistd-safer modules.
9563 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9564 we don't need it).
9565 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9566 fopen-safer.c, stdio-safer.h, unistd-safer.h.
9567 * lib/subpipe.c: Include "unistd-safer.h".
9568 (create_subpipe): Make sure all the newly-created
9569 file descriptors are > 2, so that diagnostics don't
9570 get sent down them (which might cause Bison to hang, in theory).
9571 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9572 * src/files.c (xfopen): Use fopen_safer, not fopen.
9573
9574 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
9575 yesterday's yacc.c fix.
9576
9577 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
9578
9579 * data/glr.c, data/lalr1.cc: Update copyright date.
9580
9581 Fix a destructor bug reported by Wolfgang Spraul in
9582 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
9583 * data/yacc.c (yyabortlab): Don't call destructor, and
9584 don't set yychar to EMPTY.
9585 (yyoverflowlab): Don't call destructor.
9586 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
9587 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
9588 since we no longer output the message "discarding lookahead token
9589 end of input ()".
9590
9591 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9592
9593 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
9594 fix a small glitch in debugging output.
9595 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
9596 after YY_SYMBOL_PRINT where needed.
9597
9598 (struct yyGLRState): Add some comments.
9599 (struct yySemanticOption): Add some comments.
9600 (union yyGLRStackItem): Add comment.
9601
9602 (yymergeOptionSets): Correct this to properly perform the union,
9603 avoiding infinite reported by Michael Rosien.
9604 Update comment.
9605
9606 * tests/glr-regression.at: Add test for GLR merging error reported
9607 by M. Rosien.
9608
9609 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
9610
9611 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
9612 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
9613 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
9614 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
9615 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
9616 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
9617 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
9618 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
9619 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
9620 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
9621 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
9622 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
9623 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
9624 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
9625 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
9626 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
9627 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
9628 src/derives.h, src/files.c, src/files.h, src/getargs.c,
9629 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
9630 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
9631 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
9632 src/output.h, src/parse-gram.c, src/parse-gram.h,
9633 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
9634 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
9635 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
9636 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
9637 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
9638 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
9639 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
9640 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
9641 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
9642 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
9643 tests/reduce.at, tests/regression.at, tests/sets.at,
9644 tests/synclines.at, tests/testsuite.at, tests/torture.at:
9645 Update FSF postal mail address.
9646
9647 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
9648
9649 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
9650 Problem reported by Ralf Menzel.
9651
9652 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
9653
9654 * tests/actions.at: Test that stack overflow invokes destructors.
9655 From Marcus Holland-Moritz.
9656 * data/yacc.c (yyerrlab): Move the code that destroys the stack
9657 from here....
9658 (yyreturn): to here. That way, destructors are called properly
9659 even if the stack overflows, or the user calls YYACCEPT or
9660 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
9661 (yyoverflowlab): Destroy the lookahead.
9662
9663 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
9664
9665 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
9666
9667 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
9668
9669 * NEWS: Bison-generated C parsers no longer quote literal strings
9670 associated with tokens.
9671 * src/output.c (prepare_symbols): Don't escape strings,
9672 since users don't want to see C escapes.
9673 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
9674 in diagnostics.
9675 * tests/input.at (Torturing the Scanner): Likewise.
9676 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
9677
9678 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
9679
9680 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
9681 the data size is known to be too small and we can't increase it.
9682 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
9683
9684 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
9685
9686 * src/parse-gram.y: Include quotearg.h.
9687 (string_as_id): Quote $1 before using it as a key, since the
9688 lexer no longer quotes it for us.
9689 (string_content): Don't strip quotes, since lexer no longer
9690 quotes it for us.
9691 * src/scan-gram.l: Include quotearg.h.
9692 ("\""): Omit quote.
9693 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
9694 a key, since the rest of the lexer doesn't quote it.
9695 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
9696 * tests/regression.at (Token definitions): Check for backslashes
9697 in token strings.
9698
9699 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
9700 (YYSIZE_T): Define to unsigned long int when using an older compiler.
9701 (yyparse): Revamp code to generate long syntax error message, to
9702 make it easier to translate, and to avoid problems with arithmetic
9703 overflow. Change "virtual memory" to "memory" in diagnostic, since
9704 we don't know whether the memory is virtual.
9705
9706 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
9707
9708 * NEWS: Bison-generated C parsers now use the _ macro to
9709 translate strings.
9710 * data/yacc.c (_) [!defined _]: New macro.
9711 All English strings wrapped inside this macro.
9712 * doc/bison.texinfo (Bison Parser): Document _.
9713 * po/POTFILES.in: Include src/parse-gram.c, since it now
9714 includes translateable strings that parse-gram.y doesn't.
9715
9716 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
9717
9718 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
9719 reverting the 2004-10-11 change to this function.
9720 (symbol_check_alias_consistency): Don't call symbol_type_set
9721 if the type name is already correct.
9722 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
9723
9724 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
9725
9726 * tests/regression.at (Token definitions): Don't use a token named
9727 c, as that generates a "#define c ..." that runs afoul of buggy
9728 stdlib.h that uses the identifier c as a member of struct
9729 drand48_data. Problem reported by Horst Wente.
9730
9731 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
9732
9733 * bootstrap: Change translation URL from
9734 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
9735 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
9736 redirection glitches. Problem reported by twlevo@xs4all.nl.
9737
9738 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
9739
9740 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
9741 after operands; POSIX says this isn't portable for the c99 command.
9742
9743 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
9744
9745 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
9746 immediately if a data overrun has occurred; this may help us track
9747 down what may be a spurious failure on MacOS.
9748
9749 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
9750
9751 Respond to problems reported by twlevo@xs4all.nl.
9752
9753 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
9754
9755 * src/vcg.h: Comment fix.
9756 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
9757 (G_CMAX): Change to -1 instead of INT_MAX.
9758
9759 * data/yacc.c (yyparse): Omit spaces before #line.
9760
9761 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
9762
9763 * src/tables.c (state_number_to_vector_number): Put it inside an
9764 "#if 0", since it's not currently used. Problem reported by
9765 Roland McGrath.
9766
9767 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
9768
9769 * src/output.c (escaped_output): Renamed from
9770 escaped_file_name_output, since we now use it for symbol tags as
9771 well. All uses changed.
9772 (symbol_destructors_output, symbol_printers_output):
9773 Escape symbol tags too.
9774 Problem reported by Matyas Forstner in
9775 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
9776
9777 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
9778 not needed.
9779 * src/output.c (user_actions_output, token_definitions_output,
9780 symbol_destructors_output, symbol_printers_output): Likewise.
9781 * src/reader.c (prologue_augment): Likewise.
9782 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
9783
9784 * src/vcg.c (output_edge): Don't quote linestyle arg.
9785 Problem reported by twlevo@xs4all.nl.
9786
9787 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
9788
9789 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
9790 example, reported by Derek M Jones. Also, make the example even
9791 more outrageous, to better illustrate how bad the problem is.
9792
9793 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
9794
9795 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
9796 putsym. Typo reported by Sebastian Piping.
9797
9798 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
9799
9800 * doc/bison.texinfo (Language and Grammar): some -> same
9801 (Epilogue): int he -> in the
9802 Typos reported by Sebastian Piping via Justin Pence.
9803
9804 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
9805
9806 * tests/glr-regression.at (Improper handling of embedded actions
9807 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
9808 embedded actions and $-N in GLR parsers", work around an Autoconf bug
9809 with dollar signs in test names.
9810 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
9811 for a similar reason.
9812
9813 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
9814
9815 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
9816 wants to redefine G_VIEW.
9817
9818 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
9819
9820 * src/vcg.c (get_view_str): Remove case for normal_view.
9821 Problem reported by twlevo@xs4all.nl.
9822
9823 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
9824
9825 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
9826 Problem reported by twlevo@xs4all.nl.
9827
9828 * doc/bison.texinfo: Change @dircategory from "GNU programming
9829 tools" to "Software development". Requested by Richard Stallman
9830 via Karl Berry.
9831
9832 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
9833
9834 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
9835 Problem reported by twlevo@xs4all.nl.
9836
9837 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
9838
9839 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
9840 keyword; it's not needed with modern compilers, and it doesn't
9841 affect correctness with older compilers. Suggested by
9842 twlevo@xs4all.nl.
9843
9844 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
9845
9846 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
9847 gcc -Wswitch-default.
9848 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9849 * data/yacc.c (yyparse): Likewise.
9850
9851 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
9852
9853 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
9854 already. Let config.h define any nonstandard values.
9855
9856 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
9857
9858 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
9859 for the benefit of slower hosts. Problem reported by
9860 Nelson H. F. Beebe.
9861
9862 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
9863
9864 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
9865 being defined and not used.
9866 * data/lalr1.cc (yyparse): Likewise.
9867 Use "if (false)" rather than "if (0)".
9868
9869 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
9870
9871 * TODO: Mention that we should allow NUL bytes in tokens.
9872
9873 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
9874
9875 * src/scan-skel.l (<<EOF>>): Don't close standard output.
9876 Problem reported by Hans Aberg.
9877
9878 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
9879
9880 * src/getargs.c (version): Happy new year; update overall
9881 program copyright date from 2004 to 2005.
9882
9883 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
9884 Problem reported by Hans Aberg.
9885 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
9886 (Output file names.): Add a test for the case when standard output
9887 is closed.
9888
9889 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
9890
9891 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
9892 to fix an oversight in the Bison 2.0 manual.
9893
9894 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
9895
9896 * NEWS: Version 2.0. Reformat the existing news items since
9897 1.875, so that related items are grouped together.
9898 * configure.ac (AC_INIT): Bump version to 2.0.
9899 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
9900
9901 * tests/torture.at (Exploding the Stack Size with Alloca): Set
9902 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
9903 otherwise, we're not testing alloca. Unfortunately there's no
9904 simple way to consult HAVE_ALLOCA here.
9905
9906 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
9907 for yymsg, too.
9908
9909 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
9910 hand. This avoids a warning about comparing int to size_t when
9911 GCC warnings are enabled.
9912
9913 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
9914
9915 * NEWS: Bison-generated parsers no longer default to using the
9916 alloca function (when available) to extend the parser stack, due
9917 to widespread problems in unchecked stack-overflow detection.
9918 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
9919 responsibility to set it to a positive value. This lets the user
9920 specify a value that is not a preprocessor constant.
9921 * data/yacc.c (YYMAXDEPTH): Likewise.
9922 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
9923 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
9924 to be a compile-time constant. However, explain the constraints on it.
9925 Also, explain the constraints on YYINITDEPTH.
9926 (Table of Symbols): Explain that alloca is no longer the default.
9927 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
9928 to 1.
9929
9930 * doc/bison.texinfo (Location Default Action): Mention that n must
9931 be zero when k is zero. Suggested by Frank Heckenbach.
9932
9933 2004-12-22 Akim Demaille <akim@epita.fr>
9934
9935 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
9936 (parser::state_type, parser::semantic_type, parser::location_type):
9937 Private, not public.
9938 (parser::parse): Return ints, not bool.
9939 Returning a bool introduces a problem: 0 corresponds to false, and
9940 it seems weird to return false on success. Returning true changes
9941 the conventions for yyparse.
9942 Alternatively we could return void and send an exception.
9943 There is no clear consensus (yet?).
9944 (state_stack, semantic_stack, location_stack): Rename as...
9945 (state_stack_type, semantic_stack_type, location_stack_type): these.
9946 Private, not public.
9947 * tests/c++.at: New.
9948 * tests/testsuite.at, tests/Makefile.am: Adjust.
9949
9950 2004-12-21 Akim Demaille <akim@epita.fr>
9951
9952 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
9953
9954 2004-12-21 Akim Demaille <akim@epita.fr>
9955
9956 Don't impose std::string for filenames.
9957
9958 * data/lalr1.cc (b4_filename_type): New.
9959 (position::filename): Use it.
9960 (parser.hh): Move the inclusion of stack.hh and location.hh below
9961 the user code, so that needed headers for the filename type can be
9962 included first.
9963 Forward declare them before the user code.
9964 * tests/Makefile.am (check-local, installcheck-local): Pass
9965 TESTSUITEFLAGS to the TESTSUITE.
9966
9967 2004-12-20 Akim Demaille <akim@epita.fr>
9968
9969 Use more STL like names: my_class instead of MyClass.
9970
9971 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
9972 (SemanticStack, SemanticType, StateStack, StateType)
9973 (TokenNumberType, Stack, Slice, Traits, Parser::location)
9974 (Parser::value): Rename as...
9975 (location_stack, location_type, rhs_number_type, semantic_stack)
9976 (semantic_type, state_stack, state_type, token_number_type, stack)
9977 (slice, traits, parser::yylloc, parser::yylval): these.
9978
9979 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
9980
9981 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
9982
9983 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
9984 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9985
9986 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
9987
9988 Remove uses of 'short int' and 'unsigned short int'. This raises
9989 some arbitrary limits. It uses more memory but nowadays that's
9990 not much of an issue.
9991
9992 This change does not affect the generated parsers; that's a different
9993 task, as some users will want to conserve memory there.
9994
9995 Ideally we should use size_t to represent all object counts, and
9996 something like ptrdiff_t to represent signed differences of object
9997 counts; but that will require more code-cleanup than I have the
9998 time to do right now.
9999
10000 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10001 Use size_t, not int or short int, to count objects.
10002 * src/closure.c (nritemset, closure): Likewise.
10003 * src/closure.h (nritemset, closure): Likewise.
10004 * src/nullable.c (nullable_compute): Likewise.
10005 * src/print.c (print_core): Likewise.
10006 * src/print_graph.c (print_core): Likewise.
10007 * src/state.c (state_compare, state_hash): Likewise.
10008 * src/state.h (struct state): Likewise.
10009 * src/tables.c (default_goto, goto_actions): Likewise.
10010
10011 * src/gram.h (rule_number, rule): Use int, not short int.
10012 * src/output.c (prepare_rules): Likewise.
10013 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10014 errs, reductions): Likewise.
10015 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10016 Likewise.
10017 * src/tables.c (vector_number, tally, action_number,
10018 ACTION_NUMBER_MINIMUM): Likewise.
10019 * src/output.c (muscle_insert_short_int_table): Remove.
10020
10021 2004-12-17 Akim Demaille <akim@epita.fr>
10022
10023 * data/lalr1.cc: Extensive Doxygenation.
10024 (error_): Rename as...
10025 (error): this, since it is visible to the user.
10026 Adjust callers.
10027 (Parser::message): Now an automatic variable from...
10028 (Parser::yyreport_syntax_error_): here.
10029 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10030 Parser::error.
10031 * tests/input.at: Escape $.
10032
10033 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10034
10035 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10036 Parenthesize rhs to avoid obscure problems with mistakes like
10037 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10038 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10039 b4_rhs_location): Likewise.
10040 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10041 b4_rhs_location): Likewise.
10042
10043 2004-12-16 Akim Demaille <akim@epita.fr>
10044
10045 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10046 yacc.c: be sure to stay within yycheck_.
10047 * tests/actions.at: Re-enable C++ tests.
10048
10049 2004-12-16 Akim Demaille <akim@epita.fr>
10050
10051 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10052 real.
10053
10054 2004-12-16 Akim Demaille <akim@epita.fr>
10055
10056 Use #define to handle the %name-prefix.
10057
10058 * data/glr.c, data/yacc.c: Comment changes.
10059 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10060 so that one can refer to yylex in the parser file, and have it
10061 renamed, as is the case with other skeletons.
10062
10063 2004-12-16 Akim Demaille <akim@epita.fr>
10064
10065 Move lalr1.cc internals into yy*.
10066
10067 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10068 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10069 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10070 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10071 (empty_, final_, terror_, errcode_, ntokens_)
10072 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10073 (looka_, ilooka_, error_range_, nerrs_):
10074 Rename as...
10075 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10076 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10077 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10078 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10079 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10080 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10081 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10082 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10083 these.
10084
10085 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10086
10087 Fix some problems reported by twlevo at xs4all.
10088 * src/symtab.c (symbol_new): Report an error if the input grammar
10089 contains too many symbols. This is better than calling abort() later.
10090 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10091 (struct node, struct graph):
10092 Rename member expand to stretch. All uses changed.
10093 (struct graph): Remove member layoutalgorithm. All uses removed.
10094 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10095 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10096 All uses changed.
10097 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10098
10099 2004-12-15 Akim Demaille <akim@epita.fr>
10100
10101 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10102 Add more Doxygen comments.
10103 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10104 (report_syntax_error_, translate_): Rename as...
10105 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10106 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10107
10108 2004-12-15 Akim Demaille <akim@epita.fr>
10109
10110 * data/lalr1.cc (lex_): Rename as...
10111 (yylex_): this.
10112 Move the trace here.
10113 Take the %name-prefix into account.
10114 Reported by Alexandre Duret-Lutz.
10115
10116 2004-12-15 Akim Demaille <akim@epita.fr>
10117
10118 Simplify the C++ parser constructor.
10119
10120 * data/lalr1.cc (debug_): Rename as...
10121 (yydebug_): so that the parser's internals are always in the yy*
10122 pseudo namespace.
10123 Adjust uses.
10124 (b4_parse_param_decl): Remove the leading comma as it is now only
10125 called as unique argument list.
10126 (Parser::Parser): Remove the constructor accepting a location and
10127 an initial debugging level.
10128 Remove from the other ctor the argument for the debugging level.
10129 (debug_level_type, debug_level, set_debug_level): New.
10130
10131 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10132 constructor calls.
10133
10134 2004-12-15 Akim Demaille <akim@epita.fr>
10135
10136 Remove b4_root related material: failure experiment
10137 (which goal was to allow to derive from a class).
10138
10139 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10140 definitions and uses.
10141
10142 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10143
10144 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10145 not 2, since it's not portable to subtract 1 from the start of an
10146 array. The new item 0 is never set or used. All uses changed.
10147
10148 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10149 the default definition of YYLLOC_DEFAULT. Problem reported
10150 by Frank Heckenbach.
10151
10152 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10153
10154 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10155 the normal case and one for the error case. Just use the
10156 first one uniformly. Problem reported by Frank Heckenbach.
10157 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10158 use exactly the same macro in both places.
10159 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10160 so that the normal-case YYRHSLOC works for the error case too.
10161 All uses changed.
10162 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10163 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10164 * doc/bison.texinfo (Location Default Action): Don't claim that
10165 we have an array of locations. Use the same macro for both glr
10166 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10167 the index is 0.
10168
10169 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10170
10171 * HACKING: Update email addresses to send announcements to.
10172
10173 * configure.ac (AC_INIT): Bump version to 1.875f.
10174
10175 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10176
10177 * NEWS: Version 1.875e.
10178 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10179
10180 * src/scan-skel.l: Include "complain.h", for "fatal".
10181
10182 * src/relation.h (relation_print, relation_digraph):
10183 Relation sizes are of type relation_node, not size_t (this is
10184 merely a doc fix, since the two types are equivalent).
10185 (relation_transpose): Relation sizes are of type relation_node,
10186 not int.
10187 * src/relation.c: Likewise.
10188 (top, infinity): Now of type relation_node, not int.
10189 (traverse, relation_transpose): Use relation_node, not int.
10190
10191 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10192 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10193 (yyparse): Remove unused local introduced in 2004-10-25 patch.
10194
10195 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
10196 specifying whether the test should be skipped. Use it tp
10197 specify that the [%defines %skeleton "lalr1.cc"] tests currently
10198 fail on some hosts, and should be skipped.
10199
10200 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
10201
10202 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
10203 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10204 unless otherwise specified below.
10205
10206 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10207 to allocate kernel_base, kernel_items, kernel_size, since
10208 they needn't be initialized to 0.
10209 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10210 * src/closure.c (new_closure): Likewise, for itemset.
10211 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10212 * src/lalr.c (set_goto_map): Likewise, for temp_map.
10213 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10214 (build_relations): Likewise for edge, states1, includes.
10215 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10216 * src/reader.c (packgram): Likewise, for ritem, rules.
10217 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10218 * src/relation.c (relation_digraph): Likewise for VERTICES.
10219 (relation_transpose): Likewise for new_R, end_R.
10220 * src/symtab.c (symbols_token_translations_init): Likewise for
10221 token_translations.
10222 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10223 (token_actions): Likewise for yydefact, actrow, conflrow,
10224 conflict_list.
10225 (save_column): Likewise for froms[symno], tos[symno].
10226 (goto_actions): Likewise for state_count.
10227 (pack_table): Likewise for base, pos, check.
10228 (tables_generate): Likewise for width.
10229
10230 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10231 for initial core. Just have a separate core, so we needn't worry
10232 about whether kernel_size and kernel_base are initialized.
10233
10234 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10235 kernel_size, kernel_items): Remove unnecessary initialization.
10236 * src/conflicts.c (conflicts): Likewise.
10237 * src/derives.c (derives): Likewise.
10238 * src/muscle_tablc (muscle_insert): Likewise.
10239 * src/relation.c (relation_digraph): Likewise.
10240 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10241 conflrow, conflict_table, conflict_list, table, check):
10242 Likewise.
10243
10244 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10245 This is because all callers pass unsigned int.
10246 * src/closure.h (new_closure): Likewise.
10247
10248 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10249 (build_relations): Initialize includes[i] in all cases.
10250 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10251 and rules[ruleno].precsym. Initialize members in order.
10252 * src/relation.c (relation_transpose): Always initialize new_R[i]
10253 and end_R[i].
10254 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10255
10256 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10257 conflict_list[0] was always 0, but now it isn't initialized.
10258
10259 * src/table.c (table_grow): When conflict_table grew, the grown
10260 area wasn't cleared. Fix this.
10261
10262 * lib/.cvsignore: Add strdup.c, strdup.h.
10263 * m4/.cvsignore: Add strdup.m4.
10264
10265 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10266
10267 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10268 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10269 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10270 ngotos + 1 without checking for overflow.
10271 (build_relations): Use END_NODE, not -1, to denote end of edges.
10272 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10273 build_relations): Use goto_number, not int, for goto numbers.
10274 * src/tables.c (save_column, default_goto): Likewise.
10275
10276 2004-11-23 Akim Demaille <akim@epita.fr>
10277
10278 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10279 of #defining from yystype.
10280 Don't typedef yystype, C++ does not need it.
10281 This lets it possible to forward declare it as union.
10282
10283 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10284
10285 * bootstrap (gnulib_modules): Add extensions.
10286 Problem reported by Jim Meyering.
10287
10288 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10289
10290 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10291 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10292 src/system.h, src/tables.c: XFREE -> free, to accommodate
10293 recent change to gnulib xalloc.h.
10294 Problem reported by Jim Meyering.
10295
10296 2004-11-17 Akim Demaille <akim@epita.fr>
10297
10298 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10299
10300 2004-11-17 Akim Demaille <akim@epita.fr>,
10301 Alexandre Duret-Lutz <adl@gnu.org>
10302
10303 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10304 changes.
10305 (YYCDEBUG): Adjust.
10306 Use it instead of cdebug_.
10307 (Parser::debug_stream, Parser::set_debug_stream): New.
10308 (Parser::symprint_): Define cdebug_ for temporary backward
10309 compatibility.
10310 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10311 debug_stream ().
10312
10313 2004-11-17 Akim Demaille <akim@epita.fr>
10314
10315 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10316 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10317 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10318 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10319
10320 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10321
10322 * data/glr.c (yyloc_default): Remove; not used.
10323 Problem reported by Frank Heckenbach.
10324
10325 2004-10-25 Akim Demaille <akim@epita.fr>
10326
10327 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10328 Introduce another definition to address simple location arrays.
10329 (yyGLRStack): New member: yyerror_range.
10330 (yyrecoverSyntaxError, yyparse): Update it.
10331 (yyrecoverSyntaxError): Use it when shifting the error token to
10332 have an accurate range, equivalent to the one computed by both
10333 yacc.c and lalr1.cc.
10334 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10335 that column numbers start at column 0, as per GNU Coding
10336 Standards, the others tests, and the doc.
10337 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10338 Adjust to the above change (first column is 0).
10339 And adjust the location of the "<error>", now covering the whole
10340 line.
10341
10342 2004-10-22 Akim Demaille <akim@epita.fr>
10343 and Paul Eggert <eggert@cs.ucla.edu>
10344
10345 Remove some arbitrary limits on goto numbers and relations.
10346 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10347 initial values, since they're never used.
10348 (set_goto_map): ngotos is now unsigned, so test for overflow
10349 by seeing whether it wraps around to zero.
10350 * src/lalr.h (goto_number): Now size_t, not short int.
10351 (GOTO_NUMBER_MAXIMUM): Remove.
10352 * src/relation.c (relation_print, traverse, relation_transpose):
10353 Check for END_NODE rather than looking at sign.
10354 * src/relation.h (END_NODE): New macro.
10355 (relation_node): Now size_t, not short int.
10356
10357 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10358
10359 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10360 keyword, not an identifier. Problem reported by Baron Schwartz in
10361 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10362
10363 2004-10-11 Akim Demaille <akim@epita.fr>
10364
10365 * src/symtab.c (symbol_check_alias_consistency): Also check
10366 type names, destructors, and printers.
10367 Reported by Alexandre Duret-Lutz.
10368 Recode the handling of associativity and precedence in terms
10369 of symbol_precedence_set.
10370 Accept no redeclaration at all, not even equal to the previous
10371 value.
10372 (redeclaration): New.
10373 Use it to factor redeclaration complaints.
10374 (symbol_make_alias): Don't set the type of the alias, let
10375 symbol_check_alias_consistency do it as for other features.
10376 * src/symtab.h (symbol): Add new member prec_location, and
10377 type_location.
10378 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10379 * tests/input.at (Incompatible Aliases): New.
10380
10381 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10382
10383 .cvsignore fixes to accommodate gnulib changes,
10384 and the practice of naming build directories "_build".
10385 * .cvsignore: Add "_*". Sort.
10386 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10387 * m4/.cvsignore: Add "*_gl.m4".
10388
10389 2004-10-06 Akim Demaille <akim@epita.fr>
10390
10391 * src/parse-gram.y (add_param): Fix the truncation of trailing
10392 spaces.
10393
10394 2004-10-05 Akim Demaille <akim@epita.fr>
10395
10396 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10397 whether the reducion was empty or not. This leaves room to
10398 improve the use of YYLLOC_DEFAULT in such a case.
10399 lalr1.cc is still experimental, so changing this is acceptable.
10400 And finally, there are probably not many users who changed the
10401 handling of locations in GLR, so changing is admissible too.
10402
10403 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10404 empty reduction, set @$ to an empty location ending the previously
10405 stacked symbol.
10406 Adjust uses to make sure the code is triggered on empty
10407 reductions.
10408 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10409 expected output: empty reductions have empty locations.
10410
10411 2004-09-29 Akim Demaille <akim@epita.fr>
10412
10413 * data/lalr1.cc: Move towards a more standard C++ coding style
10414 for templates: Class < T > -> Class<T>.
10415
10416 2004-09-29 Akim Demaille <akim@epita.fr>
10417
10418 * data/lalr1.cc: Reinstall the former ctor, for sake of
10419 compatibility, but warn it will be removed.
10420 Move towards a more standard C++ coding style (i.e., type *var ->
10421 type* var).
10422
10423 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10424
10425 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10426 since it's less likely to work if NULs are involved in the future.
10427
10428 2004-09-27 Akim Demaille <akim@epita.fr>
10429
10430 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10431
10432 2004-09-27 Akim Demaille <akim@epita.fr>
10433
10434 * data/lalr1.cc (b4_parse_param_decl_1): New.
10435 (b4_parse_param_decl): Use it to have different names between attribute
10436 and argument names.
10437 (b4_cc_constructor_call): Likewise.
10438
10439 2004-09-24 Akim Demaille <akim@epita.fr>
10440
10441 * src/parse-gram.y (add_param): Strip the leading and trailing
10442 blanks from a formal argument declaration.
10443 (YY_LOCATION_PRINT): New.
10444
10445 2004-09-24 Akim Demaille <akim@epita.fr>
10446
10447 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10448 after the location.
10449
10450 2004-09-24 Akim Demaille <akim@epita.fr>
10451
10452 * doc/bison.texinfo (Table of Symbols): Sort.
10453
10454 2004-09-21 Akim Demaille <akim@epita.fr>
10455
10456 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10457 the useless parentheses.
10458 Suggested by Paul Eggert.
10459
10460 2004-09-20 Akim Demaille <akim@epita.fr>
10461
10462 Let the initial-action act on the look-ahead, and use it for the
10463 "initial push" (corresponding to an hypothetical beginning-of-file).
10464 And let lalr1.cc honor %initial-action.
10465
10466 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10467 example.
10468 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10469 (Parser::Parser): Remove the ctor that used to initialize it.
10470 (Parser::parse): Like in the other skeletons, issue the "starting
10471 parse" message before any action.
10472 Honor %initial-action.
10473 Initialize the stacks with the lookahead.
10474 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10475 look-ahead.
10476 Push them in the stacks.
10477 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10478
10479 2004-09-20 Akim Demaille <akim@epita.fr>
10480
10481 * doc/bison.texinfo (Initial Action Decl): New.
10482
10483 2004-09-20 Akim Demaille <akim@epita.fr>
10484
10485 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10486 clearer criterion to define it.
10487 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10488 When reducing on an empty RHS, use the latest stacked location as
10489 location.
10490 yylloc is not always available.
10491 * data/glr.c: Likewise.
10492 Also, honor initial-actions.
10493
10494 2004-09-20 Akim Demaille <akim@epita.fr>
10495
10496 * data/yacc.c (YY_LOCATION_PRINT): New.
10497 Define when we know YYLTYPE's structure, i.e., when the default
10498 YYLLOC_DEFAULT is used.
10499 * data/c.m4 (b4_yysymprint_generate): Use it.
10500 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10501 value of the result.
10502 (error_start_): Replace with...
10503 (error_range_): this location array.
10504 This allows to replace code relying on the implementation of
10505 locations by portable code.
10506 * data/yacc.c (yylerrsp): Replace with...
10507 (yyerror_range): this.
10508 Every time a token is popped, update yyerror_range[0], to have an
10509 accurate location for the error token.
10510 * data/glr.c (YY_LOCATION_PRINT): New.
10511 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10512 deference a pointer.
10513 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10514 report the location in %printers.
10515
10516 * src/scan-skel.l: Instead of abort, report error messages to ease
10517 understanding skeleton scanning failures.
10518
10519 2004-09-16 Akim Demaille <akim@epita.fr>
10520
10521 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10522 (iterator, const_iterator): these, to be more in the C++ spirit.
10523 Also, return reverse iterators so that when displaying the stack
10524 we display its bottom first.
10525 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10526 from yacc.c.
10527 We should probably use vector here though.
10528
10529 2004-09-16 Akim Demaille <akim@epita.fr>
10530
10531 Have more complete shift traces.
10532
10533 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10534 to report Shifts instead of ad hoc YYDPRINTF invocations,
10535 including for the error token.
10536 * data/lalr1.cc (symprint_): Output the location.
10537 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10538 output the location within the %printer.
10539 Activate GLR tests, at least to make sure they compile properly.
10540 They still don't pass though.
10541 * tests/calc.at: Adjust expect verbose output, since now "Entering
10542 state..." is on a different line than the "Shifting" message.
10543
10544 2004-09-08 Akim Demaille <akim@epita.fr>
10545
10546 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10547 Bison directive from the Bison file to the invocation of this
10548 macro, so that these directives are passed to
10549 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10550 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10551 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10552 the extra Bison directives instead of the whole series.
10553 Change the grammar so that there are recoverable errors, and
10554 unrecoverable errors. Now we can have the parser give up before
10555 consuming the whole input. As a result we now can observe that
10556 the lookahead is freed when needed.
10557 Change the parser source to parse argv[1] instead of a hard coded
10558 string.
10559 Simplify yylex, and give a value and location to EOF.
10560 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10561 passed directives already coded in the file.
10562 Add some tests to check the location of "error".
10563 For some tests, the C++ parser is correct, and not yacc.c.
10564 For other tests, they provide different, but unsatisfying, values,
10565 so keep the C++ value so that at least one parser is "correct"
10566 according to the test suite.
10567 (Actions after errors): Remove, this is subsumed by the
10568 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10569
10570 2004-09-06 Akim Demaille <akim@epita.fr>
10571
10572 * data/lalr1.cc: Adjust the indentation of the labels.
10573 (Parser::pop): New.
10574 Use it.
10575
10576 2004-09-06 Akim Demaille <akim@epita.fr>
10577
10578 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
10579 argument, an informative message.
10580 Call YY_SYMBOL_PRINT.
10581 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
10582 * data/lalr1.cc (destruct_): Likewise.
10583 In addition, no longer depend on b4_yysymprint_generate and
10584 b4_yydestruct_generate to generate these functions, do it "by
10585 hand".
10586
10587 2004-09-03 Akim Demaille <akim@epita.fr>
10588
10589 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
10590 invoked, yydestruct the lookahead.
10591 * tests/calc.at (Calculator $1): Update the expected lengths of
10592 traces: there is an added line for the discarded lookahead.
10593 * doc/bison.texinfo (Destructor Decl): Some rewording.
10594 Define "discarded" symbols.
10595
10596 2004-09-02 Akim Demaille <akim@epita.fr>
10597
10598 * data/lalr1.cc (translate_, destruct_): No reason to be static.
10599
10600 2004-09-02 Akim Demaille <akim@epita.fr>
10601
10602 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
10603 (YYDSYMPRINTF): Rename as...
10604 (YY_SYMBOL_PRINT): this.
10605 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
10606 two.
10607 Use it instead of direct symprint_ calls.
10608 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
10609 one.
10610
10611 2004-09-02 Akim Demaille <akim@epita.fr>
10612
10613 * data/lalr1.cc (b4_yysymprint_generate): New.
10614 (symprint_): New member function, defined when YYDEBUG.
10615 Use it consistently instead of token/nterm debugging output by
10616 hand.
10617 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
10618 %printer calls to use cdebug_ when using lalr1.cc.
10619
10620 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
10621
10622 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
10623 with #ifdef YYDEBUG.
10624
10625 2004-08-26 Akim Demaille <akim@epita.fr>
10626
10627 * doc/bison.texinfo (Implementing Loops): Rename as...
10628 (Implementing Gotos/Loops): this.
10629
10630 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
10631
10632 Adjust to latest gnulib.
10633 * bootstrap (gnulib_modules): Add xalloc-die.
10634 Set LC_ALL=C so that file names sort consistently.
10635 Prefer the gnulib copies of gettext.m4, glibc21.m4,
10636 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
10637 uintmax_t.m4, ulonglong.m4.
10638 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
10639 po.m4 since we are now using _gl.m4 instead.
10640
10641 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
10642
10643 * src/scan-action.l: Remove. Scanning of semantic actions is
10644 handled in scan-gram.l.
10645
10646 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
10647
10648 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
10649
10650 * src/location.h (struct): The file member is a uniqstr.
10651 (equal_boundaries): Use UNIQSTR_EQ for comparison.
10652
10653 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
10654
10655 Fix bug with non-%union parsers that have printers or destructors,
10656 which led to a Bison core dump. Reported by Peter Fales in
10657 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
10658
10659 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
10660 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
10661 not to our own type.
10662 * src/output.c (symbol_destructors_output, symbol_printers_output):
10663 Don't assume %union.
10664 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
10665 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
10666 UNION-FLAG. All callers changed.
10667 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
10668 Use type char, not unsigned int, when declaring an array of char;
10669 this lets us remove a cast.
10670 (Printers and Destructors): Add non-%union test cases.
10671
10672 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10673
10674 * doc/bison.texinfo: Minor editorial changes, mostly to the new
10675 GLR writeups. E.g., avoid frenchspacing and the future tense,
10676 change "lookahead" to "look-ahead", and change "wrt" to "with
10677 respect to".
10678
10679 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10680
10681 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
10682 New sections, split off from the GLR Parsers section. Put the new
10683 Simple GLR Parser near the start of the GLR section, for clarity.
10684 Rewrite connective text.
10685
10686 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
10687
10688 * doc/bison.texinfo (Simple GLR Parsers): New section.
10689
10690 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10691
10692 * NEWS, TODO, doc/bison.texinfo:
10693 Use "look-ahead" instead of "lookahead", to be consistent.
10694 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
10695 while we're fixing "look-ahead".
10696 * src/conflicts.c (shift_set): Renamed from shiftset.
10697 (look_ahead_set): Renamed from lookaheadset.
10698 * src/print.c: Likewise.
10699 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
10700 name for "lookahead".
10701 (report_types, usage): Likewise.
10702 * src/getargs.h (report_look_ahead_tokens): Renamed from
10703 report_lookaheads.
10704 * src/lalr.c (compute_look_ahead_tokens): Renamed from
10705 compute_lookaheads.
10706 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
10707 (look_ahead_tokens_print): Renamed from lookaheads_print.
10708 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
10709 state_rule_lookaheads_print.
10710 * src/state.h: Likewise.
10711 (reductions.look_ahead_tokens): Renamed from lookaheads.
10712 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
10713 AT_DATA_LOOKAHEADS_GRAMMAR.
10714
10715 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
10716
10717 * README: Update location of patched M4 distribution.
10718
10719 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
10720
10721 Don't assume the C++ compiler takes the same arguments as the C compiler
10722 (trivial change).
10723 * configure.ac (O0CXXFLAGS): New var.
10724 * tests/atlocal.in (CXXFLAGS): Use it.
10725
10726 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
10727
10728 Fix some "make check" problems with C++ reported by
10729 Albert Chin-A-Young for Tru64 C++ in this thread:
10730 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
10731
10732 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
10733 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10734 Output to a .cc file for C++, not to a .c file.
10735 * tests/calc.at (AT_CHECK_CALC): Likewise.
10736 * tests/regression.at (AT_CHECK_DANCER): Likewise.
10737 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
10738
10739 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
10740
10741 * tests/calc.at, tests/actions.at: Workaround for SGI
10742 C++ compiler. (trivial change)
10743
10744 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
10745
10746 Spent a few hours checking out which prerequisite versions the
10747 current sources actually require. I went all the way back to
10748 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
10749 a seemingly endless set of combinations of versions more recent
10750 than that. The bottom line is that the current sources require
10751 fairly recent versions of the build tools, and it'll be some work
10752 to change this.
10753 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
10754 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
10755 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
10756 Add comments explaining why those particular versions are
10757 currently needed.
10758
10759 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
10760 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
10761 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
10762
10763 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
10764 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
10765
10766 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
10767
10768 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
10769 0.11.5. Suggested by Bruno Haible.
10770 * bootstrap: Remove gettext version checking.
10771
10772 * doc/bison.texinfo (Decl Summary): Also mention that %union
10773 can depend on prerequisite types. Problem reported by Tim
10774 Van Holder.
10775
10776 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
10777
10778 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
10779 * README-alpha: Don't tell people not to package this.
10780
10781 * bootstrap: Don't assume $(...) works; use `...` instead.
10782 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
10783 gettext better.
10784
10785 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
10786 put into the -d output file, and mention what to do if YYSTYPE is
10787 defined as a macro.
10788
10789 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
10790
10791 Undo change made earlier today: it caused autopoint to not bring
10792 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
10793 autopoint's.
10794
10795 * bootstrap: Check that gettext version matches what's in
10796 configure.ac. Warn users to ignore robots.txt ERROR 404.
10797 * bootstrap: Undo today's earlier change (logged below).
10798 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
10799
10800 The gettext version checking is causing more trouble than it's
10801 curing; remove it. Problem reported by Paul Hilfinger.
10802
10803 * bootstrap: Issue a warning that one can expect a message
10804 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
10805 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
10806
10807 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
10808
10809 Ensure that the C++ compiler used for testing actually works on a
10810 simple test program; if not, skip the C++-related tests. Problem
10811 reported by Vin Shelton in:
10812 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
10813
10814 * m4/cxx.m4: New file.
10815 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
10816 * tests/atlocal.in (BISON_CXX_WORKS): Add.
10817 * tests/local.at (AT_COMPILE_CXX): Use it.
10818
10819 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10820
10821 * data/glr.c (yylloc): Output this macro even if locations are not
10822 being generated, as the GLR parser needs it even in that case.
10823 Problem reported by Troy A. Johnson
10824 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
10825
10826 * configure.ac (AC_INIT): Update to 1.875e.
10827
10828 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10829
10830 * NEWS: Version 1.875d.
10831 * configure.ac (AC_INIT): Likewise.
10832 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
10833
10834 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
10835 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
10836 lalr1.cc runs afoul of the first, and the last two are no longer
10837 supported by GCC 3.4.0.
10838 * README: Mention GNU m4 1.4 or later; mention m4 patches.
10839 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
10840
10841 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
10842
10843 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
10844 unsigned int, for compatibility with latest gnulib hash module.
10845 * src/state.c (state_hash, state_hasher): Likewise.
10846 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
10847 * src/uniqstr.c (hash_uniqstr): Likewise.
10848
10849 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
10850
10851 * NEWS: Unescaped newlines are no longer allowed in char & strings.
10852
10853 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
10854 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
10855 character and string literals.
10856 (unexpected_end): New function.
10857 (unexpected_eof): Use it.
10858 (unexpected_newline): New function.
10859 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
10860 actions.
10861
10862 * NEWS: Document %expect-rr.
10863
10864 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
10865 Fix typo by replacing $1 with $option.
10866 Remove more 'intl'-related files.
10867 Don't DEFUN AM_INTL_SUBDIR twice.
10868
10869 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
10870 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
10871 strtoul.c.
10872 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
10873 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
10874 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
10875 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
10876 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
10877 * src/.cvsignore: Add *.output.
10878
10879 * src/parse-gram.y: Put copyright notice inside %{ %} so it
10880 gets copied to the output file.
10881
10882 2004-04-28 Paul Eggert <eggert@twinsun.com>
10883
10884 Get files from the gnulib and po repositories, instead of relying
10885 on them being in our CVS. Upgrade to latest versions of gnulib
10886 and Automake.
10887
10888 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
10889 * bootstrap: Bootstrap from gnulib and po repositories.
10890 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
10891 * README-cvs: Document these changes. Remove version numbers from
10892 mentions of build tools, since they change so often. Mention Flex.
10893
10894 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
10895 (gl_USE_SYSTEM_EXTENSIONS): Add.
10896 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
10897 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
10898 does this for us.
10899 (AC_ISC_POSIX): Remove; we no longer support this
10900 ancient OS, as it gets in the way of latest Autoconf & gnulib.
10901 (AC_HEADER_STDC): Remove: we now assume C89 or better.
10902 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
10903 Do not check for C89 headers, except for locale.h which is used
10904 by the Yacc library and must port to K&R hosts.
10905 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
10906 Do not check for C89 functions, except for setlocale which is
10907 used by the Yacc library.
10908 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
10909 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
10910 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
10911 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
10912 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
10913 AM_GNU_GETTEXT): Remove; now done by:
10914 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
10915 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
10916 for us.
10917
10918 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
10919 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
10920 Define to empty, as gnulib.mk will do the rest for us.
10921 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
10922 for us.
10923 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
10924 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
10925
10926 * src/files.c: Include gnulib's xstrndup.h.
10927
10928 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
10929 (REALLOC): Use xnrealloc, for likewise.
10930 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
10931 (strnlen, memrchr): Remove decls; functions no longer used.
10932 Include <stpcpy.h>.
10933
10934 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
10935 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
10936 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
10937 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
10938 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
10939 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
10940 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
10941 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
10942 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
10943 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
10944 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
10945 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
10946 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
10947 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
10948 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
10949 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
10950 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
10951 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
10952 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
10953 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
10954 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
10955 Remove, as these files are now generated automatically
10956 by bootstrap or automake.
10957
10958 * po/ChangeLog: Remove: all but one entry was a duplicate
10959 of this file, and I moved that 2000-11-02 entry here.
10960
10961 * config/.cvsignore: Add Makefile, depcomp, install-sh.
10962 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
10963 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
10964 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
10965 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
10966 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
10967 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
10968 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
10969 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
10970 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
10971 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
10972 xstrndup.h.
10973 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
10974 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
10975 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
10976 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
10977 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
10978 * src/.cvsignore: Remove *_.c.
10979
10980
10981 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
10982 support it. (The latest stable gzip doesn't.)
10983
10984 2004-04-27 Paul Eggert <eggert@twinsun.com>
10985
10986 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
10987 case, as stos_ is now used by destructors due to the 2004-02-09
10988 change.
10989
10990 Remove more K&R C support.
10991 * lib/libiberty.y (PARAMS): Remove. All uses removed.
10992 * lib/subpipe.c (errno): Remove decl.
10993 Include <stdlib.h> unconditionally.
10994 (EXIT_FAILURE): Remove macro.
10995 * src/complain.c (vfprintf, strerror): Remove.
10996 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
10997 unconditionally.
10998 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
10999 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11000 (strchr, strspn, memchr): Remove decls.
11001 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11002 unconditionally. Do not declare perror.
11003 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11004 unconditionally.
11005
11006 * src/complain.c (_): Remove useless defn, as system.h defines this.
11007
11008 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11009 with latest obstack.h.
11010 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11011 to procedure types, as obstack.h now does that for us.
11012 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11013
11014 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11015 so that this include file can stand alone.
11016 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11017 does this now. Include subpipe.h first after config.h, to
11018 test whether it can stand alone.
11019
11020 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11021 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11022 unused declaration.
11023
11024 * tests/synclines.at (%union synch line): Put a dummy member in
11025 the union, because empty unions aren't allowed in C. Caught
11026 by GCC 3.4.0.
11027
11028 2004-04-13 Jim Meyering <jim@meyering.net>
11029
11030 * src/conflicts.c (conflicts_print): Correct format string typo:
11031 use `%%' to produce literal `%'. (trivial change)
11032
11033 2004-03-30 Paul Eggert <eggert@twinsun.com>
11034
11035 * src/getargs.c (version): Update copyright year to 2004.
11036
11037 * data/c.m4 (b4_int_type): Use 'short int' rather than
11038 'short', and similarly for 'long', 'unsigned', etc.
11039 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11040 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11041 yy_yypstack, yydumpstack): Likewise.
11042 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11043 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11044 Likewise.
11045 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11046 yy_stack_print, yyparse): Likewise.
11047 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11048 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11049 * lib/bitset.c (bitset_print): Likewise.
11050 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11051 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11052 * lib/bitsetv.c (bitsetv_dump): Likewise.
11053 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11054 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11055 Likewise.
11056 * src/LR0.c (allocate_itemsets): Likewise.
11057 * src/gram.h (rule_number, rule): Likewise.
11058 * src/lalr.h (goto_number): Likewise.
11059 * src/nullable.c (nullable_compute): Likewise.
11060 * src/output.c (prepare_rules): Likewise.
11061 * src/relation.c (relation_print, relation_digraph): Likewise.
11062 * src/relation.h (relation_node): Likewise.
11063 * src/state.h (state_number, transitions, errs, reductions,
11064 struct state): Likewise.
11065 * src/symtab.h (symbol_number, struct symbol): Likewise.
11066 * src/tables.c (vector_number, tally, action_number,
11067 default_goto, goto_actions): Likewise.
11068 * tests/existing.at (GNU Cim Grammar): Likewise.
11069 * tests/regression.at (Web2c Actions): Likewise.
11070
11071 * src/output.c (muscle_insert_short_int_table): Renamed from
11072 muscle_insert_short_table. All uses changed.
11073
11074 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11075
11076 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11077 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11078 Add %expect-rr rule.
11079
11080 * src/scan-gram.l: Recognize %expect-rr.
11081
11082 * src/conflicts.h (expected_sr_conflicts): Rename from
11083 expected_conflicts.
11084 (expected_rr_conflicts): Declare.
11085
11086 * src/conflicts.c (expected_sr_conflicts): Rename from
11087 expected_conflicts.
11088 (expected_rr_conflicts): Define.
11089 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11090 for GLR parsers.
11091 Use expected_sr_conflicts in place of expected_conflicts.
11092 Warn if expected_rr_conflicts used in non-GLR parser.
11093
11094 * doc/bison.texinfo: Add documentation for %expect-rr.
11095
11096 2004-03-08 Paul Eggert <eggert@gnu.org>
11097
11098 Add support for hex token numbers. Suggested by Odd Arild Olsen in
11099 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
11100
11101 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11102 in lalr1.cc.
11103 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11104 * src/scan-gram.l (scan_integer): New function.
11105 ({int}): Use it.
11106 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11107 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11108 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11109 Say "long int", not "long", for uniformity with GNU style.
11110
11111 2004-02-25 Paul Eggert <eggert@twinsun.com>
11112
11113 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11114 compilers. This fixes a problem with Intel's C++ compiler being
11115 chatty, reported by Guido Trentalancia in
11116 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
11117
11118 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11119
11120 Support %destructor and merge error locations in lalr1.cc.
11121
11122 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11123 (Parser::stos_): Define unconditionally.
11124 (Parser::destruct_): New method. Generate its body with
11125 b4_yydestruct_generate.
11126 (Parser::error_start_): New attribute.
11127 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11128 token which are discarded.
11129 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11130 error_start_ when erroneous token are discarded.
11131 (Parser::parse) <yyerrlab1>: Compute the location of the error
11132 token so that it covers all the discarded tokens.
11133 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11134 it can be called with `%skeleton "lalr1.cc"', and do that.
11135
11136 2004-02-02 Paul Eggert <eggert@twinsun.com>
11137
11138 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11139 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11140 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11141 There's no need to mention top_builddir since Automake does that
11142 for us.
11143 (INCLUDES): Remove, as Automake says it's obsolescent.
11144 Contents migrated into AM_CPPFLAGS as described above.
11145 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11146
11147 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11148
11149 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11150 (yyreportSyntaxError): Handle case where lookahead token is
11151 YYEMPTY.
11152
11153 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11154
11155 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11156 resulting parsers are compilable with C++.
11157
11158 2003-12-23 Paul Eggert <eggert@twinsun.com>
11159
11160 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11161 * src/output.c (output_skeleton): Rename local var.
11162 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11163 Bison tokens, as this runs afoul of the 2003-10-07 change that
11164 disallowed NUL bytes in character constants or string literals.
11165
11166 * tests/local.at: Require Autoconf 2.59's Autotest.
11167 * tests/testsuite.at: Don't include local.at, since we now assume
11168 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11169 including it.
11170 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11171 multiple inclusion warnings.
11172
11173 2003-12-02 Akim Demaille <akim@epita.fr>
11174
11175 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11176 conditions.
11177 From Bruno Haible.
11178
11179 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
11180
11181 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11182
11183 2003-10-07 Paul Eggert <eggert@twinsun.com>
11184
11185 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11186 if testsuite doesn't exist.
11187
11188 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11189 literals, unfortunately.
11190 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11191 Complain about NUL bytes in character constants or string literals.
11192
11193 2003-10-05 Paul Eggert <eggert@twinsun.com>
11194
11195 * NEWS: Don't document %no-default-prec, as it's still
11196 too experimental.
11197 * doc/bison.texinfo: Document %no-default-prec only if
11198 the defaultprec flag is set. Normally it's not.
11199
11200 2003-10-04 Paul Eggert <eggert@twinsun.com>
11201
11202 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11203 non-modifiable lvalue, instead of a modifiable one.
11204 * doc/bison.texinfo (Actions): Document that $$ can
11205 be assigned to. Do not claim that $$ and $N are
11206 array element references: user code should not rely on this.
11207
11208 2003-10-01 Paul Eggert <eggert@twinsun.com>
11209
11210 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11211 (grammar_declaration): Use it.
11212 * src/scan-gram.l: New token %no-default-prec.
11213 * tests/conflicts.at: Revamp tests to use %no-default-prec.
11214 * NEWS, doc/bison.texinfo: Document the above.
11215
11216 2003-10-01 Akim Demaille <akim@epita.fr>
11217
11218 VCG no longer supports long_straight_phase.
11219
11220 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11221 * src/print_graph.c (print_graph): Adjust.
11222
11223 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
11224 and Paul Eggert <eggert@twinsun.com>
11225
11226 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11227 Table of Symbols): Document %default-prec.
11228 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11229 (grammar_declaration): Set default_prec on %default-prec.
11230 * src/scan-gram.l (%default-prec): New token.
11231 * src/reader.h (default_prec): New flag.
11232 * src/reader.c: Likewise.
11233 (packgram): Handle it.
11234 * tests/conflicts.at (%default-prec without %prec,
11235 %default-prec with %prec, %default-prec 1): New tests.
11236
11237 2003-09-30 Paul Eggert <eggert@twinsun.com>
11238
11239 * tests/testsuite.at: Include local.at, not input.at, fixing
11240 a typo in the 2003-08-25 patch.
11241
11242 2003-08-27 Akim Demaille <akim@epita.fr>
11243
11244 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11245 GCC warnings.
11246
11247 2003-08-26 Akim Demaille <akim@epita.fr>
11248
11249 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11250 "<\#" to avoid magic from Gnus when posting parts of this script.
11251
11252 2003-08-26 Akim Demaille <akim@epita.fr>
11253
11254 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11255 (Parser::parse): here.
11256 Adjust: nerrs and errstatus is now replaced by...
11257 (Parser::nerrs_, Parser::errstatus_): New.
11258
11259 2003-08-25 Akim Demaille <akim@epita.fr>
11260
11261 * config/announce-gen, Makefile.cfg: New.
11262 * Makefile.am: Adjust.
11263 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11264 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11265
11266 2003-08-25 Akim Demaille <akim@epita.fr>
11267
11268 When reducing initial empty rules, Bison parser read an initial
11269 location that is not defined. This results in garbage, and that
11270 affects Bison's own parser. Therefore we need (i) to extend Bison
11271 to support a means to initialize this location, and (ii) to use
11272 this CVS Bison to fix CVS Bison's parser.
11273
11274 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11275 with...
11276 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11277 * src/parse-gram.y: Adjust.
11278 (%initial-action): New.
11279 (%error-verbose): Since we require CVS Bison, there is no reason
11280 not to use it.
11281 * src/scan-gram.l: Adjust.
11282 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11283 * data/yacc.c (yyparse): Use b4_initial_action.
11284
11285 2003-08-25 Akim Demaille <akim@epita.fr>
11286
11287 * doc/bison.texinfo: Don't promote stdout for error messages.
11288
11289 2003-08-25 Akim Demaille <akim@epita.fr>
11290
11291 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11292 From Alexandre Duret-Lutz.
11293
11294 2003-08-25 Akim Demaille <akim@epita.fr>
11295
11296 Version 1.875c.
11297
11298 2003-08-25 Akim Demaille <akim@epita.fr>
11299
11300 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11301 Use them.
11302
11303 2003-08-25 Akim Demaille <akim@epita.fr>
11304
11305 * data/lalr1.cc (Parser::reduce_print_): New.
11306 Use it.
11307
11308 2003-08-25 Akim Demaille <akim@epita.fr>
11309
11310 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11311 error recovery loops. This patch is based on
11312 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
11313 Also, augment the similarity between lalr1.cc and yacc.c.
11314 Note: the locations of error recovery rules are not correct yet.
11315
11316 * data/lalr1.cc: Comment changes to augment the similarity between
11317 lalr1.cc and yacc.c.
11318 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11319 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11320 yyerrlab), when hitting EOF, pop the whole stack here instead of
11321 merely falling thru the default error handling mechanism.
11322 (yyerrorlab): New label, with the old contents of YYERROR,
11323 plus the following change: pop the stack of rhs corresponding
11324 to the production that invoked YYERROR. That is how Yacc
11325 behaves (required by POSIX).
11326 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11327 fail.
11328
11329 2003-08-25 Akim Demaille <akim@epita.fr>
11330
11331 Tune local.at so that people can "autom4te -l autotest calc.at -o
11332 calc" for instance, to extract a sub test suite.
11333
11334 * tests/testsuite.at: Move the initialization, Autotest version
11335 requirement, and AT_TESTED invocation into...
11336 * tests/local.at: here.
11337 * tests/testsuite.at: Include it for compatibility with Autoconf
11338 2.57.
11339 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11340 be ignore.
11341
11342 2003-08-04 Paul Eggert <eggert@twinsun.com>
11343
11344 Rework code slightly to avoid gcc -Wtraditional warnings.
11345 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11346 The returned value is now stored in *YY0. All callers changed.
11347 * src/output.c (merge_output): Adjust to the above change.
11348
11349 2003-07-26 Paul Eggert <eggert@twinsun.com>
11350
11351 * data/glr.c (YYASSERT): New macro.
11352 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11353 yyresolveStates, yyprocessOneStack):
11354 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11355 Derived from a suggestion by Frank Heckenbach.
11356
11357 2003-07-25 Paul Eggert <eggert@twinsun.com>
11358
11359 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11360 for portability to K&R C (after ansi2knr, presumably). See
11361 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
11362 by Frank Heckenbach, though I have omitted the structure-initialization
11363 part of his glr-knr.diff patch since I recall that the Portable
11364 C Compiler didn't require that change.
11365
11366 Let the user specify how to allocate and free memory.
11367 Derived from a suggestion by Frank Heckenbach in
11368 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
11369 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11370 All uses of free, malloc, realloc changed to use these macros,
11371 and unnecessary casts removed.
11372 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11373
11374 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11375
11376 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11377 use s.empty() rather than s == "" to test for empty string; see
11378 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
11379 (trivial change)
11380
11381 2003-06-25 Akim Demaille <akim@epita.fr>
11382
11383 * config/depcomp, config/install-sh: Update from masters.
11384
11385 2003-06-20 Paul Eggert <eggert@twinsun.com>
11386
11387 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11388 and return properly parenthesized result.
11389 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11390 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11391 Remove unnecessary parentheses from uses.
11392 * doc/bison.texinfo (Location Default Action): Describe the
11393 conventions for parentheses.
11394
11395 2003-06-19 Paul Eggert <eggert@twinsun.com>
11396
11397 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11398 yyreportTree): Do not assume that size_t is the same width as int,
11399 when printing sizes. Print sizes using an unsigned format.
11400 Problem reported by Frank Heckenbach in
11401 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
11402
11403 Port to Forte Developer 7 C compiler.
11404 * data/glr.c (struct YYLTYPE): If locations are not being used,
11405 declare a single dummy member, as empty structs do not conform
11406 to the C standard.
11407 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11408 the Forte Developer 7 C compiler complains that end-of-loop
11409 code is not reached.
11410
11411 2003-06-17 Paul Eggert <eggert@twinsun.com>
11412
11413 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11414 avoid warnings from picky compilers about redefinition of PARAMS.
11415
11416 2003-06-17 Paul Eggert <eggert@twinsun.com>
11417
11418 Version 1.875b.
11419
11420 * NEWS: Document 1.875b.
11421
11422 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11423 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11424 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11425 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11426 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11427 per recent gettext manual's suggestion.
11428 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11429 Use prototypes, not old-style definitions.
11430 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11431 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11432 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11433 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11434 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11435 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11436 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11437 vbitset_or_and_cmp, vbitset_copy): Likewise.
11438
11439 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11440 Do not include <stdlib.h>.
11441 (PARAMS): Define unconditionally for C89.
11442 (ATTRIBUTE_NORETURN): Remove.
11443 (ATTRIBUTE_UNUSED): Define unconditionally.
11444
11445 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
11446 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
11447 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11448 * lib/vbitset.c, lib/vbitset.h: New files.
11449 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11450 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11451 from libbitset.
11452
11453 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11454 `How Can I Reset @code{yyparse}', since texinfo does not allow
11455 arbitrary @ in node names.
11456
11457 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11458 shouldn't be needed according to the gettext 0.12.1 documentation
11459 but which seem to be needed anyway: codeset.m4 glibc21.m4
11460 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
11461 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
11462 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
11463
11464 * lib/.cvsignore: Add stdbool.h.
11465 * m4/.cvsignore: Add nls.m4, po.m4.
11466
11467 Upgrade to CVS gnulib.
11468 * stdbool_.h: File renamed from stdbool.h.in.
11469 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11470 AC_HEADER_STDBOOL.
11471 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11472 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11473 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11474 (MOSTLYCLEANFILES): New var.
11475 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11476 (stdbool.h): New rule.
11477 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11478 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11479 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11480 m4/quote.m4: Upgrade to today's gnulib.
11481
11482 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11483 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11484 the tests right now.
11485 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11486 yyerror are declared before use; C99 requires this.
11487
11488 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11489
11490 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11491 first.
11492 (yyrecoverSyntaxError): Correct the logic for setting and testing
11493 yyerrState.
11494 Correct comment on handling EOF.
11495 Allow states with only a default reduction, rather than failing
11496 (I can't quite reconstruct why these were not allowed before).
11497
11498 Fixes to avoid problem that $-N rules in GLR parsers can cause
11499 buffer overruns, corrupting state.
11500
11501 * src/output.c (prepare_rules): Output max_left_semantic_context
11502 definition.
11503 * src/reader.h (max_left_semantic_context): New variable declaration.
11504 * src/scan-gram.l (max_left_semantic_context): Define.
11505 (handle_action_dollar): Update max_left_semantic_context.
11506 * data/glr.c (YYMAXLEFT): New definition.
11507 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11508 (yyresolveAction): Ditto.
11509
11510 Fixes to problems with location handling in GLR parsers reported by
11511 Frank Heckenbach (2003/06/05).
11512
11513 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11514 (YYRHSLOC): Add parentheses, and define only if locations used.
11515 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11516 locations not used.
11517 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11518 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
11519
11520 * tests/cxx-type.at: Exercise location information; update tests
11521 to differentiate output with and without locations.
11522 Remove forward declarations of yylex and yyerror---caused errors
11523 because default YYLTYPE not yet defined.
11524 Change semantic actions to compute strings, rather than printing
11525 them directly (to test proper passing of semantics values). Change
11526 output to prefix notation and update test data and expected results.
11527 (yylex): Track locations.
11528 (stmtMerge): Return value rather than printing, and include arguments
11529 in value.
11530
11531 2003-06-03 Paul Eggert <eggert@twinsun.com>
11532
11533 Avoid warnings generated by GCC 2.95.4 when Bison is
11534 configured with --enable-gcc-warnings.
11535 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11536 yy::]b4_parser_class_name[::translate_,
11537 yy::Stack::operator[] (unsigned),
11538 yy::Stack::operator[] (unsigned) const,
11539 yy::Slice::operator[] (unsigned),
11540 yy::Slice::operator[] (unsigned) const):
11541 Rename local vars to avoid warnings.
11542 * tests/glr-regression.at (Improper handling of embedded actions
11543 and $-N in GLR parsers): Remove unused local variable from yylex.
11544 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11545 (void) as arg when not pure, since we now assume C89 when building
11546 Bison. Pacify GCC by using parameter.
11547
11548 2003-06-02 Paul Eggert <eggert@twinsun.com>
11549
11550 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11551 yy::Location::lines, yy::Location::columns): Rename arguments
11552 to avoid shadowing; this removes a warning generated by GCC 3.3.
11553
11554 2003-06-01 Paul Eggert <eggert@twinsun.com>
11555
11556 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11557 to g++, as GCC 3.3 complains if you do it.
11558 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11559 everything that WARNING_CFLAGS has, except omit warnings
11560 not suitable for C++.
11561 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11562 * tests/atlocal.in (CXXFLAGS): New var.
11563 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11564
11565 Fix a GLR parser bug I reported in February; see
11566 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
11567 The problem was that GLR parsers did not conform to the C standard,
11568 because actions like { $1 = $2 + $3; } expanded to expressions
11569 that invoked YYFILL in separate subexpressions, and YYFILL assigned
11570 to a local variable. The C standard says that expressions
11571 like (var = f ()) + (var = f ()) have undefined behavior.
11572 Another problem was that GCC sometimes issues warnings that
11573 yyfill and its parameters are unused.
11574
11575 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
11576 as possibly unused.
11577 (yyfill): New function.
11578 (YYFILL): Use it.
11579 (yyuserAction): Change type of yynormal to bool, so that it matches
11580 the new yyfill signature. Mark it as possibly unused.
11581
11582
11583 Follow up on a bug I reported in February, where a Bison-generated
11584 parser can loop. Provide a test case and a fix for yacc.c. I
11585 don't have a fix for lalr1.cc or for glr.c, unfortunately.
11586 The original bug report is in:
11587 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
11588
11589 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
11590 macro's size was becoming unwieldy.
11591 (yyerrlab): Do not discard an empty lookahead symbol, as this
11592 might destroy garbage.
11593 (yyerrorlab): New label, with the old contents of YYERROR,
11594 plus the following change: pop the stack of rhs corresponding
11595 to the production that invoked YYERROR. That is how Yacc
11596 behaves, and POSIX requires this behavior.
11597 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
11598 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
11599 Define 'alarm' to do nothing if unistd.h is not available.
11600 Add a new rule "exp: '-' error;" to test the above change to
11601 data/yacc.c. Use 'alarm' to abort any test taking longer than
11602 10 seconds, as it's probably looping.
11603 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
11604 Also, the new yacc.c generates two fewer diagnostics for an
11605 existing test.
11606
11607 2003-05-24 Paul Eggert <eggert@twinsun.com>
11608
11609 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
11610 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
11611 This fixes a problem reported by John Bowman when the Compaq/HP
11612 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
11613 -ansi -Wall -gall).
11614 * data/yacc.c (union yyalloc): Likewise.
11615 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
11616
11617 Switch from 'int' to 'bool' where that makes sense.
11618
11619 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
11620 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
11621 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
11622 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
11623 Return or accept bool, not int. All callers changed.
11624 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
11625 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
11626 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
11627 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
11628 bitset_or_and_cmp_): Likewise.
11629 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
11630 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
11631 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
11632 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
11633 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
11634 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
11635 bitset_stats_or_and_cmp): Likewise.
11636 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
11637 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
11638 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
11639 ebitset_xor_cmp): Likewise.
11640 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
11641 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
11642 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
11643 lbitset_xor_cmp): Likewise.
11644 * lib/bbitset.h: Include <stdbool.h>.
11645 (struct bitset_vtable): The following members now return bool, not
11646 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
11647 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
11648 or_and_cmp).
11649 * src/conflicts.c (count_rr_conflicts): Likewise.
11650 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
11651 All uses changed.
11652 * lib/ebitset.c (ebitset_obstack_init): Likewise.
11653 * lib/lbitset.c (lbitset_obstack_init): Likewise.
11654 * src/getargs.c (debug_flag, defines_flag, locations_flag,
11655 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11656 graph_flag): Likewise.
11657 * src/getargs.h (debug_flag, defines_flag, locations_flag,
11658 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11659 graph_flag): Likewise.
11660 * src/output.c (error_verbose): Likewise.
11661 * src/output.h (error_verbose): Likewise.
11662 * src/reader.c (start_flag, typed): Likewise.
11663 * src/reader.h (typed): Likewise.
11664 * src/getargs.c (LOCATIONS_OPTION): New constant.
11665 (long_options, getargs): Use it.
11666 * src/lalr.c (build_relations): Use bool, not int.
11667 * src/nullable.c (nullable_compute): Likewise.
11668 * src/print.c (print_reductions): Likewise.
11669 * src/tables.c (action_row, pack_vector): Likewise.
11670 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
11671 * src/output.c (prepare): Use it.
11672 * src/output.c (token_definitions_output,
11673 symbol_destructors_output, symbol_destructors_output): Use string,
11674 not boolean integer, to keep track of whether to output separator.
11675 * src/print_graph.c (print_core): Likewise.
11676 * src/state.c (state_rule_lookaheads_print): Likewise.
11677
11678 * config/install-sh: Sync from automake 1.7.5.
11679
11680 2003-05-14 Paul Eggert <eggert@twinsun.com>
11681
11682 * src/parse-gram.y (rules_or_grammar_declaration): Require a
11683 semicolon after a grammar declaration, in the interest of possible
11684 future changes to the Bison input language.
11685 Do not allow a stray semicolon at the start of the grammar.
11686 (rhses.1): Allow one or more semicolons after any rule, including
11687 just before "|" as required by POSIX.
11688 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
11689 grammar.
11690
11691 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
11692
11693 %parse-param support for lalr1.cc.
11694
11695 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
11696 b4_cc_constructor_calls, b4_cc_constructor_call,
11697 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
11698 definitions.
11699 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
11700 parse-param arguments.
11701 (yy::b4_parser_class_name): Declare instance variables to
11702 hold parse-param arguments.
11703 * tests/calc.at: s/value/semantic_value/ because value clashes
11704 with a member of yy::b4_parser_class_name. Adjust C++ code
11705 to handle %parse-param. Enable %parse-param test in C++.
11706
11707 2003-05-12 Paul Eggert <eggert@twinsun.com>
11708
11709 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
11710 English a bit. Fix fclose typo. Change "const char" to "char
11711 const", and use ANSI C rather than K&R for "main". Suggest
11712 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
11713 and suggest yy_switch_to_buffer.
11714
11715 2003-05-05 Paul Eggert <eggert@twinsun.com>
11716
11717 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
11718 C89. This avoids a diagnostic on compilers that define __STDC__
11719 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
11720 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
11721
11722 2003-05-03 Paul Eggert <eggert@twinsun.com>
11723
11724 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
11725 Do not overrun array bounds.
11726 This should fix a bug reported today by Olatunji Oluwabukunmi in
11727 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
11728
11729 2003-04-29 Akim Demaille <akim@epita.fr>
11730
11731 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
11732 * src/getargs.c, src/getargs.h: here, as bool, not int.
11733 (nondeterministic_parser): New.
11734 * src/parse-gram.y, src/scan-gram.l: Support
11735 %nondeterministic-parser.
11736 * src/output.c (prepare): Use nondeterministic_parser instead
11737 of glr_parser where appropriate.
11738 * src/tables.c (conflict_row, action_row, save_row)
11739 (token_actions, token_actions, pack_vector): Ditto.
11740
11741 2003-04-29 Akim Demaille <akim@epita.fr>
11742
11743 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
11744
11745 2003-04-29 Akim Demaille <akim@epita.fr>
11746
11747 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
11748 with %pure-parser and %locations to exercise the patch from Yakov
11749 Markovitch below.
11750
11751 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
11752
11753 * data/yacc.c: (b4_lex_param): Corrected for the case where
11754 %lex-param is provided and %pure-parser isn't.
11755
11756 2003-04-27 Paul Eggert <eggert@twinsun.com>
11757
11758 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
11759 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
11760 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
11761 if it is not defined.
11762 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
11763
11764 2003-04-26 Paul Eggert <eggert@twinsun.com>
11765
11766 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
11767 Declare to be of type suitable for the ninf value itself, not of
11768 type suitable for the corresponding table, since the latter might
11769 be unsigned but the ninf value might be negative. This fixes a
11770 bug reported by Alexandre Duret-Lutz in
11771 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
11772
11773 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
11774 invokes it. We shouldn't invoke it twice because it will attempt
11775 to put error.o in the archive twice. This fixes a glitch reported
11776 by Martin Mokrejs in
11777 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
11778
11779 2003-04-21 Paul Eggert <eggert@twinsun.com>
11780
11781 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
11782 to gnulib.
11783
11784 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
11785
11786 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
11787 Fix obvious typo that results in uncompilable GLR parsers
11788 when both %pure-parser and %locations are used. (trivial change)
11789
11790 2003-04-17 Paul Eggert <eggert@twinsun.com>
11791
11792 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
11793 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
11794 Do not insert the expected token via unput, as this runs afoul
11795 of a POSIX-compatibility bug in flex 2.5.31.
11796 All uses changed to BEGIN the parent state,
11797 since we no longer insert the expected token via unput.
11798 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
11799 that is no longer emitted after the above change.
11800
11801 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
11802 the first one. This change is from Paul Hilfinger, and it fixes
11803 regression reported by Werner Lemberg in
11804 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
11805
11806 (resolve_sr_conflict): Don't invoke state_errs_set
11807 unless one or more tokens have been explicitly made errors.
11808 Otherwise, the above change causes Bison to abort.
11809
11810 * tests/existing.at (GNU pic Grammar): New test case, taken from
11811 Lemberg's email.
11812
11813 2003-03-31 Akim Demaille <akim@epita.fr>
11814
11815 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
11816
11817 2003-03-31 Akim Demaille <akim@epita.fr>
11818
11819 * src/output.c (prepare_symbols): Avoid trailing spaces in the
11820 output.
11821
11822 2003-03-31 Akim Demaille <akim@epita.fr>
11823
11824 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
11825 From Paul Hilfinger.
11826
11827 2003-03-29 Akim Demaille <akim@epita.fr>
11828
11829 * m4/error.m4: Do not put under dynamic conditions some code which
11830 expansion is under static control.
11831
11832 2003-03-29 Akim Demaille <akim@epita.fr>
11833
11834 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
11835
11836 2003-03-29 Akim Demaille <akim@epita.fr>
11837
11838 * doc/bison.texinfo (Strings are Destroyed): New.
11839
11840 2003-03-13 Paul Eggert <eggert@twinsun.com>
11841
11842 * .cvsignore: Add configure.lineno.
11843 * src/.cvsignore: Add yacc.
11844 * tests/.cvsignore: Add testsuite.log.
11845 * doc/fdl.texi: Sync with latest FSF version.
11846
11847 2003-03-12 Paul Eggert <eggert@twinsun.com>
11848
11849 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
11850 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
11851 cursor, instead of leaving it undefined. This fixes a bug
11852 reported by Tim Van Holder in
11853 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
11854 * tests/input.at (Torturing the Scanner): Test the scanner on
11855 an empty input file, which was Tim Van Holder's test case.
11856
11857 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
11858 <sys/resource.h> can be included, include sys/time.h and
11859 sys/times.h first, if available. This works around the SunOS
11860 4.1.4 porting bug reported by Bruce Becker in
11861 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
11862
11863 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
11864 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
11865 AC_HEADER_SYS_WAIT.
11866
11867 Merge changes from gnulib. This was prompted because the CVS
11868 snapshot didn't build on Solaris 7 due to strnlen problems.
11869
11870 These changes need to be merged back into gnulib:
11871 * lib/hash.c: Include <stdbool.h> unconditionally.
11872 * m4/onceonly.m4 (m4_quote): New macro.
11873 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
11874 Quote AC_FOREACH variable-expansions properly.
11875 The 2003-01-03 obstack.h change also needs merging.
11876 {end of changes requiring merging}
11877
11878 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11879 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
11880 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
11881 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
11882 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
11883 New files, imported from gnulib.
11884 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
11885 above.
11886
11887 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
11888 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
11889 gnulib sources.
11890
11891 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
11892 Add.
11893 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
11894 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
11895 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
11896 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
11897 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
11898 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
11899 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
11900 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
11901 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
11902 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
11903 (jm_PREREQ_ARGMATCH): Remove.
11904 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
11905 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
11906
11907 * src/system.h: Include <stdbool.h> unconditionally.
11908
11909 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
11910 assuming at least C89 in the bitset code for some time now.
11911
11912 2003-03-03 Akim Demaille <akim@epita.fr>
11913
11914 * ro.po: New.
11915
11916 2003-03-02 Akim Demaille <akim@epita.fr>
11917
11918 * doc/bison.texinfo (Table of Symbols): Reactivate the
11919 documentation for %lex-param, and %parse-param.
11920
11921 2003-03-02 Akim Demaille <akim@epita.fr>
11922
11923 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
11924 generate verbose error messages.
11925 Use the number of tokens as an upper bound in yytname, as it
11926 cannot be a non terminal.
11927
11928 2003-03-02 Akim Demaille <akim@epita.fr>
11929
11930 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
11931 message.
11932
11933 2003-03-02 Akim Demaille <akim@epita.fr>
11934
11935 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
11936 Use them to exercise yycheck overrun.
11937 Based on Andrew Suffield's grammar.
11938
11939 2003-03-02 Akim Demaille <akim@epita.fr>
11940
11941 Create tests/local.at for Bison generic testing macros.
11942
11943 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
11944 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
11945 This new file.
11946 * tests/calc.at (AT_CHECK_CALC): Adjust.
11947 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
11948 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
11949 * tests/local.at: here.
11950 (AT_COMPILE_CXX): Tags the tests using it as c++.
11951 Ignore the test if CXX is not functional.
11952
11953 2003-03-01 Paul Eggert <eggert@twinsun.com>
11954
11955 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
11956 not loc->end, since loc->end might contain garbage and this leads
11957 to undefined behavior on some platforms.
11958 (id_loc, token_start): Use (IF_LINTed) initial values that do not
11959 depend on *loc, so that the reader doesn't give the the false
11960 impression that *loc is initialized.
11961 (<INITIAL>"%%"): Do not bother setting code_start, since its value
11962 does not survive the return.
11963
11964 2003-03-01 Akim Demaille <akim@epita.fr>
11965
11966 * src/scan-gram.l (code_start): Always initialize it when entering
11967 into yylex, as SC_EPILOGUE is activated *before* the corresponding
11968 yylex invocation. An alternative would be making it static, but
11969 then it starts with the second %%'s beginning, instead of its end.
11970
11971 2003-02-28 Paul Eggert <eggert@twinsun.com>
11972
11973 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
11974 around a UnixWare 7.1.1 porting bug reported by John Hughes in
11975 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
11976
11977 2003-02-26 Paul Eggert <eggert@twinsun.com>
11978
11979 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
11980 Remove Sequent/Pyramid discussion (nobody uses them any more).
11981 Merge VMS and MS-DOS discussion; these ports may well be dead
11982 but let's keep mentioning them for now. Put <> around email
11983 addresses. Add copyright notice.
11984
11985 2003-02-24 Paul Eggert <eggert@twinsun.com>
11986
11987 * data/glr.c (yy_reduce_print): yylineno -> yylno,
11988 to avoid collision with flex use of yylineno.
11989 Problem reported by Bruce Lilly in
11990 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
11991 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11992 * data/yacc.c (yy_reduce_print): Likewise.
11993
11994 * config/depcomp: Sync with Automake 1.7.3.
11995
11996 2003-02-21 Akim Demaille <akim@epita.fr>
11997
11998 * data/lalr1.cc: Use temporary variables instead of casts to
11999 change integer types.
12000 Suggested by Paul Eggert.
12001
12002 2003-02-21 Akim Demaille <akim@epita.fr>
12003
12004 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12005 to avoid confusions with lalr1.cc's notion of Position.
12006 Suggested by Paul Eggert.
12007
12008 2003-02-20 Akim Demaille <akim@epita.fr>
12009
12010 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12011 before initial_columns.
12012 (location.hh): Use consistent variable names when defining the
12013 operator<<.
12014 Use "last" so that we subtract from Positions, not from unsigned.
12015
12016 2003-02-20 Akim Demaille <akim@epita.fr>
12017
12018 * data/lalr1.cc (position.hh): New subfile, including the extended
12019 and Doxygen'ed documentation of class Position.
12020 (location.hh): Use it.
12021 Document a` la Doxygen.
12022 With the help of Benoit Perrot.
12023
12024 2003-02-20 Akim Demaille <akim@epita.fr>
12025
12026 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12027 AT_YACC_IF.
12028 Redefine AT_YYERROR_SEES_LOC_IF using it.
12029 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12030 not defined.
12031 Don't use the location in yy::Parser::error_ and
12032 yy::Parser::print_ when not %locations.
12033 Activate more lalr1.cc tests.
12034
12035 2003-02-19 Akim Demaille <akim@epita.fr>
12036
12037 * data/lalr1.cc: When displaying a line number, be sure to make it
12038 an int.
12039
12040 2003-02-19 Akim Demaille <akim@epita.fr>
12041
12042 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12043 Remove, useless.
12044 (YYABORT, YYACCEPT, YYERROR): New.
12045 * tests/calc.at: Renable the lalr1.cc test.
12046
12047 2003-02-19 Akim Demaille <akim@epita.fr>
12048
12049 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12050 error recovery, mixing with/without pops and discarding of the
12051 lookahead.
12052 Exercise YYERROR.
12053 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12054
12055 2003-02-17 Paul Eggert <eggert@twinsun.com>
12056
12057 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12058 * tests/testsuite.at (AT_COMPILE): Use them.
12059 This fixes the testsuite problem reported by Robert Lentz in
12060 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
12061
12062 2003-02-12 Paul Eggert <eggert@twinsun.com>
12063
12064 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12065 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
12066 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
12067 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12068 Check for malloc failure, for consistency with yacc.c.
12069 (yytname_size): Remove, for consistency with yacc.c.
12070
12071 The bug still remains in data/lalr1.cc, as I didn't have time
12072 to fix it there.
12073
12074 2003-02-06 Akim Demaille <akim@epita.fr>
12075
12076 * configure.ac (GXX): Rename as...
12077 (CXX): this, to keep the original Autoconf semantics.
12078 Require 2.57.
12079 * data/lalr1.cc: Fix b4_copyright invocations.
12080 If YYDEBUG is not defined, don't depend upon name_ being defined.
12081 (location.hh): Include string and iostream.
12082 (Position::filename): New member.
12083 (Position::Position ()): New.
12084 (operator<< (Position)): New.
12085 (operator- (Position, int)): New.
12086 (Location::first, Location::last): Rename as...
12087 (Location::begin, Location::end): these, to mock the conventional
12088 iterator names.
12089 (operator<< (Location)): New.
12090 * tests/atlocal.in (CXX): New.
12091 * tests/testsuite.at (AT_COMPILE_CXX): New.
12092 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12093 locations in a more synthetic way.
12094 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12095 lalr1.cc is used.
12096 Adjust the C locations to match those from Emacs: first column is
12097 column 0.
12098 Change all the expected results.
12099 Conform to the GCS: simplify the locations when applicable.
12100 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12101 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12102 these CPP macros with the m4 macros new defined by...
12103 (AT_CHECK_PUSHDEFS): this, i.e.:
12104 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
12105 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
12106 New macros.
12107 (AT_CHECK_POPDEFS): Undefine them.
12108 (AT_CHECK_CALC_LALR1_CC): New.
12109 Use it for the first lalr1.cc test.
12110
12111 2003-02-04 Akim Demaille <akim@epita.fr>
12112
12113 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12114 Location as is defined.
12115
12116 2003-02-04 Akim Demaille <akim@epita.fr>
12117
12118 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12119 name_ being defined.
12120
12121 2003-02-03 Paul Eggert <eggert@twinsun.com>
12122
12123 * src/gram.h (start_symbol): Remove unused decl.
12124
12125 Use more-consistent naming conventions for local vars.
12126
12127 * src/derives.c (derives_compute): Change type of local var from
12128 int to rule_number.
12129 * src/gram.c (grammar_rules_partial_print): Likewise.
12130 * src/print.c (print_core): Likewise.
12131 * src/reduce.c (reduce_grammar_tables): Likewise.
12132
12133 * src/gram.c (grammar_dump): Change name of item_number *
12134 local var from r to rp.
12135 * src/nullable.c (nullable_compute): Likewise.
12136
12137 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12138
12139 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12140 for symbol or symbol_number var.
12141 * src/reader.c (grammar_start_symbol_set): Likewise.
12142 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12143 Likewise.
12144 * src/state.c (transitions_to): Likewise.
12145 * src/state.h: Likewise.
12146 * src/tables.c (symbol_number_to_vector_number): Likewise.
12147
12148 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12149 char * var.
12150
12151 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12152 var.
12153
12154 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12155 var.
12156
12157 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12158 Use str, not s, for char * var. Use ch, not c, for character var.
12159 Use size for size var.
12160
12161 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12162 char * var.
12163 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12164 uniqstr var.
12165 * src/uniqstr.h: Likewise.
12166
12167 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12168 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12169 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12170 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12171 param to have same name as that of enum, so that we don't use
12172 "s" to stand for a non-state.
12173
12174 2003-02-02 Akim Demaille <akim@epita.fr>
12175
12176 * src/scan-skel.l: Scan more than one inert character per yylex
12177 invocation.
12178
12179 2003-02-01 Paul Eggert <eggert@twinsun.com>
12180
12181 Version 1.875a.
12182
12183 * po/LINGUAS: Add ms.
12184
12185 2003-01-30 Akim Demaille <akim@epita.fr>
12186
12187 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12188
12189 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12190
12191 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12192 of $1.
12193
12194 Changes in response to error report by S. Eken: GLR mode does not
12195 handle negative $ indices or $ indices in embedded rules correctly.
12196 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
12197
12198 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12199 (b4_rhs_location): Ditto.
12200 (yyfill): New function to copy from stack tree into array
12201 incrementally.
12202 (yyuserAction): Modify to allow incremental move of semantic values
12203 to rhs array when in GLR mode.
12204 Define YYFILL to use in user-defined actions to fill semantic array
12205 as needed.
12206 Remove dummy use of yystack, as there is now a guaranteed use.
12207 (yydoAction): Modify to allow incremental move of semantic values
12208 to rhs array when in GLR mode.
12209 (yyresolveAction): Ditto.
12210 (yyglrShiftDefer): Update comment.
12211 (yyresolveStates): Use X == NULL for pointers, not !X.
12212 (yyglrReduce): Ditto.
12213 (yydoAction): Ditto
12214
12215 * tests/glr-regr1.at: Rename to ...
12216 * tests/glr-regression.at: Add new regression test for the problems
12217 described above (adapted from S. Eken).
12218 Update copyright notice.
12219 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12220 * tests/Makefile.am: Ditto.
12221
12222 2003-01-28 Paul Eggert <eggert@twinsun.com>
12223
12224 * data/lalr1.cc: Do not use @output_header_name@ unless
12225 b4_defines_flag is set. This fixes two bugs reported by
12226 Tim Van Holder in
12227 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12228 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
12229
12230 2003-01-21 Paul Eggert <eggert@twinsun.com>
12231
12232 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12233 we don't need to worry about yyerrlab1 being reported as an
12234 "unused label" by non-GCC C compilers. The downside is that if
12235 locations are used then a couple of statements are duplicated each
12236 time YYERROR is invoked, but the upside is that the warnings
12237 should vanish.
12238 (yyerrlab1): Move code to YERROR.
12239 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12240 This reverts some of the 2002-12-27 change.
12241
12242 2003-01-17 Paul Eggert <eggert@twinsun.com>
12243
12244 * src/output.c (symbol_printers_output): Fix typo that led
12245 to core dump. Problem reported by Antonio Rus in
12246 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
12247
12248 2003-01-13 Akim Demaille <akim@epita.fr>,
12249 Quoc Peyrot <chojin@lrde.epita.fr>,
12250 Robert Anisko <anisko_r@lrde.epita.fr>
12251
12252 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12253 when the stacks contain one element, as the loop would otherwise
12254 free the last state, and then use the top state (the one we just
12255 popped). This means that the initial elements will not be freed
12256 explicitly, as is the case in yacc.c; it is not a problem, as
12257 these elements have fake values.
12258
12259 2003-01-11 Paul Eggert <eggert@twinsun.com>
12260
12261 * NEWS: %expect-violations are now just warnings, reverting
12262 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12263 bootstrapping problem reported by Matthias Klose; see
12264 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
12265 * src/conflicts.c (conflicts_print): Likewise.
12266 * tests/conflicts.at (%expect not enough, %expect too much,
12267 %expect with reduce conflicts): Likewise.
12268 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12269 that the warning is enabled if the number of conflicts changes
12270 (not necessarily increases).
12271
12272 * src/getargs.c (version): Update copyright year.
12273
12274 2003-01-09 Akim Demaille <akim@epita.fr>
12275
12276 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12277
12278 2003-01-08 Paul Eggert <eggert@twinsun.com>
12279
12280 * Makefile.maint (WGETFLAGS):
12281 New macro, containing "-C off" to disable proxy caches.
12282 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12283 (rel-check): Use $(WGET) instead of wget.
12284
12285 2003-01-06 Paul Eggert <eggert@twinsun.com>
12286
12287 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12288 the GLR paper of Scott, Johnstone and Hussain.
12289
12290 2003-01-04 Paul Eggert <eggert@twinsun.com>
12291
12292 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12293 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12294 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12295 (EXTRA_LIBRARIES): New var, for liby.a.
12296 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12297 (EXTRA_SCRIPTS): New var, for yacc.
12298
12299 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12300 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12301 Problem reported by Nelson H. F. Beebe.
12302
12303 2003-01-03 Paul Eggert <eggert@twinsun.com>
12304
12305 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12306 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12307 when compiling Bison 1.875's `bitset bset = obstack_alloc
12308 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12309
12310 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12311 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12312 grow to a huge size with typical invocation.
12313
12314 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12315 Use the pattern recommended by Autoconf 2.57, except also protect
12316 against double-definition.
12317 * src/system.h: Likewise.
12318 Portability issues reported by Nelson H. F. Beebe.
12319
12320 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12321 All uses changed. Provide a definition in both C and C++.
12322 (yytrue, yyfalse): Define even if defined (__cplusplus).
12323
12324 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12325 Reported by Nelson H. F. Beebe.
12326
12327 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12328
12329 2003-01-02 Paul Eggert <eggert@twinsun.com>
12330
12331 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12332 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12333 Bug reported by Nelson H. F. Beebe.
12334
12335 2003-01-01 Paul Eggert <eggert@twinsun.com>
12336
12337 * Version 1.875.
12338
12339 2002-12-30 Paul Eggert <eggert@twinsun.com>
12340
12341 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12342 Moved here from...
12343 (<INITIAL>","): Here. This causes stray "," to be treated
12344 more uniformly.
12345
12346 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
12347 last brace in braced code when not in Yacc mode, for compatibility
12348 with Bison 1.35. This resurrects the 2001-12-15 patch to
12349 src/reader.c.
12350
12351 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12352 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12353
12354 2002-12-28 Paul Eggert <eggert@twinsun.com>
12355
12356 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12357 that of SYM's type. This fixes Debian bug 168069, reported by
12358 Thomas Olsson.
12359
12360 2002-12-28 Paul Eggert <eggert@twinsun.com>
12361
12362 Version 1.75f.
12363
12364 Switch back to the Yacc style of conflict reports, undoing some
12365 of the 2002-07-30 change.
12366 * doc/bison.texinfo (Understanding): Use Yacc style for
12367 conflict reports. Also, use new way of locating rules.
12368 * src/conflicts.c (conflict_report):
12369 Renamed from conflict_report_yacc, removing the old
12370 'conflict_report'. Translate the entire conflict report at once,
12371 so that we don't assume that "," has the same interpretation in
12372 all languages.
12373 (conflicts_output): Use Yacc-style conflict report for each state,
12374 instead of our more-complicated style.
12375 (conflicts_print): Use Yacc-style conflict report, except print
12376 the input file name when not emulating Yacc.
12377 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12378 Conflicted Reduction, %expect not enough, %expect too much,
12379 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12380 * tests/existing.at (GNU Cim Grammar): Likewise.
12381 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12382
12383 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12384 fatal): Don't invoke fflush; it's not needed and it might even be
12385 harmful for stdout, as stdout might not be open.
12386 * src/reduce.c (reduce_print): Likewise.
12387
12388 2002-12-27 Paul Eggert <eggert@twinsun.com>
12389
12390 Fix a bug where error locations were not being recorded correctly.
12391 This problem was originally reported by Paul Hilfinger in
12392 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
12393
12394 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12395 top of the location stack's error locations.
12396 (yyerrlab): Set it. When discarding a token, push its location
12397 onto yylerrsp so that we don't lose track of the error's end.
12398 (yyerrlab1): Now is only the target of YYERROR, so that we can
12399 properly record the location of the action that failed. For GCC
12400 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12401 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12402 (yyerrlab2): New label, which yyerrlab now falls through to.
12403 Compute the error's location by applying YYLLOC_DEFAULT to
12404 the locations of all the symbols that went into the error.
12405 * doc/bison.texinfo (Location Default Action): Mention that
12406 YYLLOC_DEFAULT is also invoked for syntax errors.
12407 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12408 Error locations include the locations of all the tokens that were
12409 discarded, not just the last token.
12410
12411 2002-12-26 Paul Eggert <eggert@twinsun.com>
12412
12413 * src/files.c: Include quote.h.
12414 (compute_output_file_names): Warn if we detect conflicting
12415 outputs to the same file. This should catch the misunderstanding
12416 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12417
12418 * src/conflicts.c (conflicts_print): If the user specifies
12419 "%expect N", report an error if there are any reduce/reduce
12420 conflicts. This is what the manual says should happen.
12421 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12422 * tests/conflicts.at (%expect with reduce conflicts): New test.
12423
12424 Don't use m4_include on relative file names, as it doesn't work as
12425 desired if there happens to be a file with that name under ".".
12426
12427 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12428 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12429 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12430 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12431 * src/output.c (output_skeleton): Use full path names when
12432 specifying a file to include; don't rely on include path, as
12433 it's unreliable when the working file contains a file with
12434 that name.
12435
12436 2002-12-25 Paul Eggert <eggert@twinsun.com>
12437
12438 Remove obsolete references to bison.simple and bison.hairy.
12439 Problem mentioned by Aubin Mahe in
12440 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
12441 * data/glr.c: Comment fix.
12442 * doc/bison.1: Remove references. Also, mention "yacc".
12443
12444 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12445 with -g option.
12446
12447 * src/parse-gram.y (declaration): Use enum "report_states" rather
12448 than its numeric value 1.
12449
12450 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12451 opening a new one. This fixes Debian bug 165349, reported by
12452 Bruce Stephens.
12453
12454 2002-12-24 Paul Eggert <eggert@twinsun.com>
12455
12456 Version 1.75e.
12457
12458 * Makefile.maint (cvs-update): Don't assume that the shell
12459 supports $(...), as Solaris sh doesn't.
12460
12461 * src/parse-gram.y (lloc_default): Remove test for empty
12462 nonterminals at the end, since it didn't change the result.
12463
12464 2002-12-24 Paul Eggert <eggert@twinsun.com>
12465
12466 If the user does not define YYSTYPE as a macro, Bison now declares it
12467 using typedef instead of defining it as a macro. POSIX requires this.
12468 For consistency, YYLTYPE is also declared instead of defined.
12469
12470 %union directives can now have a tag before the `{', e.g., the
12471 directive `%union foo {...}' now generates the C code
12472 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12473 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12474 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12475 instead of `yyltype'.
12476
12477 `yystype' and `yyltype' are now obsolescent macros instead of being
12478 typedefs or tags; they are no longer documented and will be
12479 withdrawn in a future release.
12480
12481 * data/glr.c (b4_location_type): Remove.
12482 (YYSTYPE): Renamed from yystype.
12483 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12484 (struct YYLTYPE): Renamed from struct yyltype.
12485 (YYLTYPE): Renamed from yyltype.
12486 (yyltype, yystype): New (and obsolescent) macros,
12487 for backward compatibility.
12488 * data/yacc.c: Likewise.
12489
12490 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12491 does not specify a union tag. This is for compatibility with
12492 Solaris 9 yacc.
12493
12494 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12495 const *, since it is now modified by stripping surrounding { }.
12496 (current_braced_code): Remove.
12497 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12498 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12499 trailing " {...}". Now of type <chars>.
12500 (grammar_declaration): Adjust to bundled tokens.
12501 (code_content): Remove; stripping is now done by add_param.
12502 (print_token_value): Print contents of bundled tokens.
12503 (token_name): New function.
12504
12505 * src/reader.h (braced_code, current_braced_code): Remove.
12506 (token_name): New decl.
12507
12508 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12509 token_type, not braced_code code_kind. All uses changed.
12510 (SC_PRE_CODE): New state, for scanning after a keyword that
12511 has (or usually has) an immediately-following braced code.
12512 (token_type): New local var, to keep track of which token type
12513 to return when scanning braced code.
12514 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
12515 <INITIAL>"%parse-param", <INITIAL>"%printer",
12516 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12517 instead of returning a token type immediately.
12518 (<INITIAL>"{"): Set token type.
12519 (<SC_BRACED_CODE>"}"): Use it.
12520 (handle_action_dollar, handle_action_at): Now returns bool
12521 indicating success. Fail if ! current_rule; this prevents a core dump.
12522 (handle_symbol_code_dollar, handle_symbol_code_at):
12523 Remove; merge body into caller.
12524 (handle_dollar, handle_at): Complain in invalid contexts.
12525
12526 * NEWS, doc/bison.texinfo: Document the above.
12527 * NEWS: Fix years and program names in copyright notice.
12528
12529 2002-12-17 Paul Eggert <eggert@twinsun.com>
12530
12531 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12532 Reporting, Table of Symbols): Omit mentions of %lex-param and
12533 %parse-param from the documentation for now.
12534
12535 2002-12-15 Paul Eggert <eggert@twinsun.com>
12536
12537 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12538 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12539 lookahead symbol, and which sets yychar in parser actions) and it
12540 disagreed with the Bison documentation. Bug
12541 reported by Andrew Walrond.
12542
12543 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12544 as the caller now does that.
12545 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12546 (YYEMPTY): Parenthesize right hand side, since others use it.
12547 (yyparse): Don't assume that our generated code is the only code
12548 that sets yychar.
12549
12550 2002-12-13 Paul Eggert <eggert@twinsun.com>
12551
12552 Version 1.75d.
12553
12554 POSIX requires a "yacc" command.
12555 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12556 (MOSTLYCLEANFILES): Add yacc.
12557 (yacc): New rule.
12558 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
12559 as an alias for bison y.
12560
12561 * po/LINGUAS: Add da.
12562
12563 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12564 problem with latest <getopt.h>.
12565 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12566
12567 * doc/fdl.texi: Upgrade to 1.2.
12568 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12569 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12570 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12571 gnulib.
12572 * config/install-sh: Sync with autotools.
12573
12574 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
12575 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
12576 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
12577 locations are requested.
12578 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
12579 locations are requested.
12580
12581 2002-12-12 Paul Eggert <eggert@twinsun.com>
12582
12583 Remove unportable casts and storage allocation tricks.
12584 While we're at it, remove almost all casts, since they
12585 usually aren't needed and are a sign of trouble.
12586
12587 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
12588
12589 * src/derives.c (derives_compute): Do not subtract NTOKENS from
12590 the pointer DSET returned by malloc; this isn't portable.
12591 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
12592 Similarly for DERIVES.
12593 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
12594 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
12595 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
12596
12597 * src/derives.c (derives_compute): Do not bother invoking
12598 int_of_rule_number, since rule numbers are integers.
12599
12600 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
12601 rather than XMALLOC (char, N).
12602
12603 * src/files.c (filename_split): Rewrite to avoid cast.
12604
12605 * src/gram.h (symbol_number_as_item_number,
12606 item_number_as_symbol_number, rule_number_as_item_number,
12607 item_number_as_rule_number):
12608 Now inline functions rather than macros, to avoid casts.
12609 * src/state.h (state_number_as_int): Likewise.
12610 * src/tables.c (state_number_to_vector_number,
12611 symbol_number_to_vector_number): Likewise.
12612
12613 * src/gram.h (int_of_rule_number): Remove; no longer used.
12614
12615 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
12616 since the resulting storage is always stored into.
12617
12618 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
12619 where it's needed.
12620
12621 * src/muscle_tab.c (muscle_m4_output):
12622 Now inline. Return bool, not int.
12623 * src/state.c (state_compare): Likewise.
12624 * src/symtab.c (symbol_check_defined,
12625 symbol_check_alias_consistency, symbol_pack, symbol_translation,
12626 hash_compare_symbol, hash_symbol):
12627 Likewise.
12628 * src/uniqstr.c (uniqstr_print): Likewise.
12629 * src/muscle_tab.c (muscle_m4_output_processor):
12630 New function, to avoid casts.
12631 * src/state.c (state_comparator, stage_hasher): Likewise.
12632 * src/symtab.c (symbol_check_defined_processor,
12633 symbol_check_alias_consistency_processor, symbol_pack_processor,
12634 symbol_translation_processor, hash_symbol_comparator,
12635 hash_symbol_hasher): Likewise.
12636 * src/uniqstr.c (uniqstr_print_processor): Likewise.
12637 * src/muscle_tab.c (muscles_m4_output):
12638 Use new functions instead of casting old functions unportably.
12639 * src/state.c (state_hash_new): Likewise.
12640 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
12641 symbols_token_translations_init):
12642 Likewise.
12643 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
12644
12645 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
12646 var instead of casting to long, to avoid casts.
12647 (prepare_states): Use MALLOC rather than alloca, so that we don't
12648 have to worry about alloca.
12649 * src/state.c (state_hash_lookup): Likewise.
12650
12651 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
12652 local var instead of casting to unsigned char, to avoid casts.
12653
12654 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
12655 STATE_ALLOC): Remove.
12656 (transitions_new, errs_new, reductions_new, state_new): Use malloc
12657 rather than calloc, and use offsetof to avoid allocating slightly
12658 too much storage.
12659 (state_new): Initialize all members.
12660
12661 * src/state.c (state_hash): Use unsigned accumulator, not signed.
12662
12663 * src/symtab.c (symbol_free): Remove; unused.
12664 (symbol_get): Remove cast in lhs of assignment.
12665 (symbols_do): Now static. Accept generic arguments, not
12666 hashing-related ones.
12667
12668 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
12669 (symbol_processor): Remove.
12670 (symbols_do): Remove decl; now static.
12671
12672 * src/system.h (alloca): Remove; decl no longer needed.
12673 (<stddef.h>): Include, for offsetof.
12674 (<inttypes.>, <stdint.h>): Include if available.
12675 (uintptr_t): New type, if system lacks it.
12676 (CALLOC, MALLOC, REALLOC): New macros.
12677 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
12678 new macros.
12679
12680 * src/tables.c (table_size): Now int, to pacify GCC.
12681 (table_grow, table_ninf_remap): Use signed table size.
12682 (save_row): Don't bother initializing locals when not needed.
12683 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
12684 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
12685
12686 * src/vcg.h: Correct misspellings.
12687
12688 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
12689
12690
12691 * src/getargs.c (getargs): Don't assume EOF == -1.
12692
12693 2002-12-09 Paul Eggert <eggert@twinsun.com>
12694
12695 Change identifier spellings to avoid collisions with names
12696 that are reserved by POSIX.
12697
12698 Don't use names ending in _t, since POSIX reserves them.
12699 For consistency, remove _e and _s endings -- they're weren't
12700 needed to remove ambiguity. All uses changed.
12701 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
12702 turn was just renamed from struniq_t.
12703 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
12704 which in turn was just renamed from struniq_processor_t.
12705 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
12706 in turn was renamed from hash_compare_struniq_t.
12707 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
12708 (state_list): Renamed from state_list_t.
12709 * src/assoc.h (assoc): Renamed from assoc_t.
12710 * src/conflicts.c (enum conflict_resolution): Renamed from
12711 enum conflict_resolution_e.
12712 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
12713 (rule_list): Renamed from rule_list_t.
12714 * src/getargs.h (enum trace): Renamed from enum trace_e.
12715 (enum report): Renamed from enum report_e.
12716 * src/gram.h (item_number): Renamed from item_number_t.
12717 (rule_number): Renamed from rule_number_t.
12718 (struct rule_s): Remove the "rule_s" part; not used.
12719 (rule): Renamed from rule_t.
12720 (rule_filter): Renamed from rule_filter_t.
12721 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
12722 (goto_list): Renamed from goto_list_t.
12723 * src/lalr.h (goto_number): Renamed from goto_number_t.
12724 * src/location.h (location): Renamed from location_t.
12725 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
12726 and moved here from:
12727 * src/muscle_tab.h (muscle_entry_t): here.
12728 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
12729 (rule_list): Renamed from rule_list_t.
12730 * src/print_graph.c (static_graph): Renamed from graph.
12731 * src/reader.h (braced_code): Renamed from braced_code_t.
12732 Remove brace_code_e tag.
12733 * src/relation.h (relation_node): Renamed from relation_node_t.
12734 (relation_nodes): Renamed from relation_nodes_t.
12735 (relation): Renamed from relation_t.
12736 * src/state.h (state_number): Renamed from state_number_t.
12737 (struct state): Renamed from struct state_s.
12738 (state): Renamed from state_t.
12739 (transitions): Renamed from transitions_t. Unused (and
12740 misspelled) transtion_s tag removed.
12741 (errs): Renamed from errs_t. Unused errs_s tag removed.
12742 (reductions): Renamed from reductions_t. Unused tag
12743 reductions_s removed.
12744 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
12745 (struct symbol_list): Renamed from struct symbol_list_s.
12746 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
12747 (struct symbol): Renamed from struct symbol_s.
12748 (symbol): Renamed from symbol_t.
12749 * src/tables.c (vector_number): Renamed from vector_number_t.
12750 (action_number): Renamed from action_t.
12751 * src/tables.h (base_number): Renamed from base_t.
12752 * src/vcg.h (enum color): Renamed from enum color_e.
12753 (enum textmode): Renamed from enum textmode_e.
12754 (enum shape): Renamed from enum shape_e.
12755 (struct colorentry): Renamed from struct colorentry_s.
12756 (struct classname): Renamed from struct classname_s.
12757 (struct infoname): Renamed from struct infoname_s.
12758 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
12759 (enum decision): Renamed from enum decision_e.
12760 (enum orientation): Renamed from enum orientation_e.
12761 (enum alignment): Renamed from enum alignment_e.
12762 (enum arrow_mode): Renamed from enum arrow_mode_e.
12763 (enum crossing_type): Renamed from enum crossing_type_e.
12764 (enum view): Renamed from enum view_e.
12765 (struct node): Renamed from struct node_s.
12766 (node): Renamed from node_t.
12767 (enum linestyle): Renamed from enum linestyle_e.
12768 (enum arrowstyle): Renamed from enum arrowstyle_e.
12769 (struct edge): Renamed from struct edge.
12770 (edge): Renamed from edge_t.
12771 (struct graph): Renamed from struct graph_s.
12772 (graph): Renamed from graph_t.
12773 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
12774 Rename value_t -> value.
12775 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
12776 value_t_as_yystype -> value_as_yystype.
12777
12778 Don't include <errno.h> in the mainstream code, since it
12779 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
12780 * lib/get-errno.c, lib/get-errno.h: New files.
12781 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
12782 get-errno.c.
12783 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
12784 * src/output.c (output_skeleton): Likewise.
12785 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
12786 instead of errno.
12787 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
12788 Likewise.
12789 (handle_action_dollar, handle_action_at): Likewise.
12790 * src/system.h: Do not include <errno.h>.
12791 (TAB_EXT): Renamed from EXT_TAB.
12792 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
12793
12794 Avoid str[a-z]*, since <string.h> reserves that name space.
12795 Change all instances of "struniq" in names to "uniqstr", and
12796 likewise for "STRUNIQ" and "UNIQSTR".
12797 * src/uniqstr.c: Renamed from src/struniq.c.
12798 * src/uniqstr.h: Renamed from src/struniq.h.
12799 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
12800 * src/files.c (strsuffix): Remove; unused.
12801 (concat2): Renamed from stringappend. Now static.
12802 * src/files.h (strsuffix, stringappend): Remove; unused.
12803 * src/parse-gram.y (<chars>): Renamed from <string>.
12804 (<uniqstr>): Renamed from <struniq>.
12805 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
12806 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
12807 (struct graph_s.expand): Renamed from struct graph_s.stretch.
12808 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
12809 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
12810 (N_EXPAND): Renamed from N_STRETCH.
12811
12812 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
12813 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
12814 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
12815 Remove; unused.
12816 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
12817 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
12818 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
12819 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
12820 (BASE_MAXIMUM): Renamed from BASE_MAX.
12821 (BASE_MINIMUM): Renamed from BASE_MIN.
12822 (ACTION_MAX): Remove; unused.
12823 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
12824 Unnecessary casts removed from above defines.
12825
12826
12827 Fix misspelling in names.
12828 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
12829 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
12830 G_NODE_ALIGNEMENT.
12831
12832
12833 * lib/timevar.c (timevar_report): Renamed from time_report,
12834 for consistency with other names.
12835 * lib/timevar.h (timevar_report): New decl.
12836 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
12837
12838
12839 Sort include-file uses.
12840
12841 Reorder all include files under src to be in the order "system.h".
12842 then the ../lib include files in angle brackets (alphabetized),
12843 then the . include files in double-quotes (alphabetized). Fix
12844 dependency breakages encountered in this process, as follows:
12845 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
12846 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
12847 * src/state.h: Include "symtab.h".
12848
12849 2002-12-08 Paul Eggert <eggert@twinsun.com>
12850
12851 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
12852 since this causes problems when __file__ contains character
12853 sequences like "@" that are treated specially by src/scan-skel.l.
12854 Instead, just use the file's basename. This fixes the bug
12855 reported by Martin Mokrejs in
12856 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
12857
12858 2002-12-06 Paul Eggert <eggert@twinsun.com>
12859
12860 Add support for rules that do not have trailing semicolons, as
12861 POSIX requires. Improve the quality of locations in Bison
12862 diagnostics.
12863
12864 * src/location.c: Include <quotearg.h>.
12865 (empty_location): Now const.
12866 (location_print): New function. Follow the recommendation of the
12867 GNU Coding Standards for locations that span file boundaries.
12868 * src/location.h: Do not include <quotearg.h>; no longer needed.
12869 (boundary): New type.
12870 (location_t): Use it. This allows locations to span file boundaries.
12871 All member uses changed: file -> start.file or end.file (as needed),
12872 first_line -> start.line, first_column -> start.column,
12873 last_line -> end.line, last_column -> end.column.
12874 (equal_boundaries): New function.
12875 (LOCATION_RESET, LOCATION_STEP): Remove.
12876 (LOCATION_PRINT): Remove. All callers changed to use location_print.
12877 (empty_location): Now const.
12878 (location_print): New decl.
12879 * src/parse-gram.y (lloc_default): New function, which handles
12880 empty locations more accurately.
12881 (YYLLOC_DEFAULT): Use it.
12882 (%token COLON): Remove.
12883 (%token ID_COLON): New token.
12884 (rules): Use it.
12885 (declarations, rules): Remove trailing semicolon.
12886 (declaration, rules_or_grammar_declaration):
12887 Allow empty (";") declaration.
12888 (symbol_def): Remove empty actions; no longer needed.
12889 (rules_or_grammar_declaration): Remove trailing semicolon.
12890 (semi_colon.opt): Remove.
12891 * src/reader.h: Include location.h.
12892 (scanner_cursor): New decl.
12893 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
12894 rolling our own.
12895 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
12896 of *loc.
12897 (STEP): Remove. No longer needed, now that adjust_location does
12898 the work. All uses removed.
12899 (scanner_cursor): New var.
12900 (adjust_location): Renamed from extend_location. It now sets
12901 *loc and adjusts the scanner cursor. All uses changed.
12902 Don't bother testing for CR.
12903 (handle_syncline): Remove location arg; now updates scanner cursor.
12904 All callers changed.
12905 (unexpected_end_of_file): Now accepts start boundary of token or
12906 comment, not location. All callers changed. Update scanner cursor,
12907 not the location.
12908 (SC_AFTER_IDENTIFIER): New state.
12909 (context_state): Renamed from c_context. All uses changed.
12910 (id_loc, code_start, token_start): New local vars.
12911 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
12912 processing of Yacc white space and equivalents here.
12913 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
12914 instead of returning ID immediately, since we need to search for
12915 a subsequent colon.
12916 (<INITIAL>"'", "\""): Save token_start.
12917 (<INITIAL>"%{", "{", "%%"): Save code_start.
12918 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
12919 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
12920 BEGIN context_state at end, not INITIAL.
12921 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
12922 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
12923 Return correct token start.
12924 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
12925 the start of a character, string or multiline comment is found.
12926 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
12927 Reduction): Adjust reported locations to match the more-precise
12928 results now expected.
12929 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
12930 * tests/reduce.at (Useless Rules, Reduced Automaton,
12931 Underivable Rules): Likewise.
12932 * tests/regression.at (Invalid inputs): No longer `expecting ";"
12933 or "|"' now that so many other tokens are allowed by the new grammar.
12934
12935 * src/complain.h (current_file): Remove duplicate decl;
12936 current_file is now owned by files.h.
12937 * src/complain.c, src/scan-gram.l: Include files.h.
12938
12939 2002-12-06 Paul Eggert <eggert@twinsun.com>
12940
12941 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
12942 promotes to int; it might be unsigned int.
12943 * data/yacc.c (yy_reduce_print): Likewise.
12944
12945 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
12946 be #defined in the prologue, not in the Bison declarations.
12947 This fixes Debian Bug 102878, reported by Shaul Karl.
12948
12949 2002-12-02 Paul Eggert <eggert@twinsun.com>
12950
12951 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
12952 * lib/strtoul.c: New file, from gnulib.
12953 This fixes a porting bug reported by Peter Klein in
12954 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
12955
12956 2002-11-30 Paul Eggert <eggert@twinsun.com>
12957
12958 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
12959 and put only a forward declaration in the prologue. This is for
12960 consistency with the other scanner helper functions.
12961
12962 Type clashes now generate warnings, not errors, since it
12963 appears that POSIX may allow some grammars with type clashes.
12964 * src/reader.c (grammar_current_rule_check): Warn about
12965 type clashes instead of complaining.
12966 * tests/input.at (Type Clashes): Expect warnings, not complaints.
12967
12968 Add Yacc library, since POSIX requires it.
12969 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
12970 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
12971 * lib/main.c, lib/yyerror.c: New files.
12972
12973 gram_error can be static; it need not be extern.
12974 * src/reader.h (gram_error): Remove decl.
12975 * src/parse-gram.y (gram_error): Now static. Add static decl.
12976 (print_token_value): Omit parameter names from forward decl,
12977 for consistency.
12978
12979 2002-11-29 Paul Eggert <eggert@twinsun.com>
12980
12981 * doc/bison.texinfo: Emphasize that yylex and yyerror must
12982 be declared before being used. E.g., one should typically
12983 declare them in the prologue. Use GNU coding style in examples.
12984 Put "const" consistently after the type it modifies. Mention
12985 that C99 supports "inline". Mention that yyerror traditionally
12986 returns "int".
12987
12988 %parse-param and %lex-param now take just one argument, the
12989 declaration; the argument name is deduced from the declaration.
12990
12991 * doc/bison.texinfo (Parser Function, Pure Calling, Error
12992 Reporting, Table of Symbols): Document this.
12993 * src/parse-gram.y (add_param): New function.
12994 (COMMA): Remove.
12995 (declaration): Implement new rule for %parse-param and %lex-param.
12996 * src/scan-gram.l: "," now elicits a warning, rather than being
12997 a token; this is more compatible with byacc.
12998 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
12999
13000 2002-11-27 Paul Eggert <eggert@twinsun.com>
13001
13002 Rename identifiers to avoid real and potential collisions.
13003
13004 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13005 to avoid collision with lex macro described by Bruce Lilly in
13006 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13007 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13008 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13009 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13010 All uses changed.
13011 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13012 The name "yycontrol" violates the name space rules, and this stuff
13013 wasn't being used anyway.
13014 (input): Remove action; this stuff wasn't being used.
13015 (gram_error): Rename local variable yylloc -> loc.
13016 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13017 (YY_DECL): Don't use "yy" at start of local variables.
13018 All uses changed, e.g., yylloc -> loc.
13019 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13020 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13021 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13022 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13023
13024 * src/parse-gram.y (gram_error): loc is now const *.
13025 * src/reader.h (gram_error): Likewise.
13026
13027 2002-11-24 Paul Eggert <eggert@twinsun.com>
13028
13029 Version 1.75c.
13030
13031 * tests/actions.at (Actions after errors): Use an output format
13032 more similar to that of the Printers and Destructors test.
13033 Test the position of the ';' token too.
13034 (Printers and Destructors): Likewise.
13035 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13036 unnecessarily alarming people when the test fails.
13037
13038 * data/yacc.c (yyerrlab1): Move this label down, so that the
13039 parser does not discard the lookahead token if the user code
13040 invokes YYERROR. This change is required for POSIX conformance.
13041
13042 * lib/error.c: Sync with gnulib.
13043
13044 2002-11-22 Paul Eggert <eggert@twinsun.com>
13045
13046 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13047 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13048 * lib/xmalloc.c: Likewise.
13049
13050 2002-11-20 Paul Eggert <eggert@twinsun.com>
13051
13052 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13053
13054 2002-11-20 Paul Eggert <eggert@twinsun.com>
13055
13056 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13057 should use `if (! x) abort ();' rather than `assert (x);', and
13058 anyway it's one less thing to worry about configuring.
13059
13060 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13061 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13062 and replace all instances of assert with abort.
13063 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13064 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13065
13066 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13067 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13068 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13069 hash_find_entry, hash_rehash, hash_insert): Likewise.
13070 * src/conflicts.c (resolve_sr_conflict): Likewise.
13071 * src/lalr.c (set_goto_map, map_goto): Likewise.
13072 * src/nullable.c (nullable_compute): Likewise.
13073 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13074 * src/reader.c (packgram, reader): Likewise.
13075 * src/state.c (state_new, state_free, state_transitions_set,
13076 state_reduction_find): Likewise.
13077 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13078 symbol_pack): Likewise.
13079 * src/tables.c (conflict_row, pack_vector): Likewise.
13080 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13081 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13082 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13083 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13084
13085 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13086 (ARGMATCH_CONSTRAINT): New macro.
13087 (ARGMATCH_ASSERT): Use it.
13088
13089 * src/system.h (verify): New macro.
13090 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13091 rather than assert.
13092 * src/tables.c (tables_generate): Likewise.
13093
13094 * src/struniq.c (struniq_assert): Now returns void, and aborts
13095 if the assertion is false.
13096 (struniq_assert_p): Remove.
13097 * src/struniq.h: Likewise.
13098
13099 2002-11-18 Paul Eggert <eggert@twinsun.com>
13100
13101 * data/glr.c (yygetLRActions): Replace `yyindex' with
13102 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13103 This fixes the regression with Sun ONE Studio 7 cc that I reported in
13104 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
13105
13106 2002-11-18 Akim Demaille <akim@epita.fr>
13107
13108 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13109 space.
13110 From Tim Van Holder.
13111
13112 2002-11-17 Paul Eggert <eggert@twinsun.com>
13113
13114 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13115 to "SyntaxError" for consistency with my 2002-11-15 change.
13116
13117 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13118 not define to {}, since this breaks the common use of `YYDPRINTF
13119 ((...));' if a single statement is desired (e.g. before `else').
13120 Work around GCC warnings by surrounding corresponding calls with
13121 {} if needed.
13122 (yyhasResolvedValue): Remove unused function.
13123 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13124 loop body.
13125 (yyreportSyntaxError): Renamed from yyreportParseError.
13126 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13127 All uses changed.
13128 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13129 extern when possible. Remove unused initializations.
13130
13131 2002-11-16 Akim Demaille <akim@epita.fr>
13132
13133 Augment the similarity between GLR and LALR traces.
13134
13135 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13136 (YY_REDUCE_PRINT): New.
13137 (yyparse): Use them.
13138 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13139 YYDPRINT here.
13140 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13141 state reached after the reduction/recovery, since...
13142 (yyparse, yyprocessOneStack): Report the state we are entering in.
13143
13144 2002-11-16 Akim Demaille <akim@epita.fr>
13145
13146 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13147 Add support for --trace=skeleton.
13148 * src/scan-skel.l: %option debug.
13149 Scan strings of non-@ or \n instead of character by character.
13150 (scan_skel): Handle trace_skeleton.
13151 (QPUTS): New.
13152 (@output_parser_name@, @output_header_name@): ``Restore'' their
13153 support (used to be M4 macros).
13154 * data/yacc.c: Quote larger chunks, a la glr.c.
13155 * data/lalr1.cc: Likewise.
13156 The header guards are no longer available, so use some other
13157 string than `YYLSP_NEEDED'.
13158
13159 2002-11-16 Akim Demaille <akim@epita.fr>
13160
13161 Make the ``Printers and Destructors'' test more verbose, taking
13162 `yacc.c''s behavior as (possibly wrong) reference.
13163
13164 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13165 instead of fprint on stdout.
13166 Set and report the last_line of the symbols.
13167 Consistently display values and locations.
13168
13169 2002-11-16 Paul Eggert <eggert@twinsun.com>
13170
13171 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13172
13173 2002-11-15 Paul Eggert <eggert@twinsun.com>
13174
13175 * tests/actions.at (Actions after errors): New test case.
13176
13177 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13178 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13179 tests/action.at, tests/calc.at, tests/conflicts.at,
13180 tests/cxx-type.at, tests/regression.at:
13181 "parse error" -> "syntax error" for POSIX compatibility.
13182 "parsing stack overflow..." -> "parser stack overflow" so
13183 that code matches Bison documentation.
13184
13185 2002-11-15 Akim Demaille <akim@epita.fr>
13186
13187 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13188 take two BRACED_CODE, not two string_content.
13189 Free the scanner's obstack when we are done.
13190 (code_content): New.
13191 * tests/calc.at: Adjust.
13192 * doc/bison.texinfo: Adjust.
13193 Also, make sure to include the `,' for these declarations.
13194
13195 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13196
13197 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13198 definition; avoids potential autoreconf problems.
13199
13200 2002-11-15 Akim Demaille <akim@epita.fr>
13201
13202 Always check the value returned by yyparse.
13203
13204 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13205 returned by yyparse.
13206 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13207 Adjust calls.
13208 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13209 returned by yyparse.
13210
13211 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13212
13213 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
13214 on input.at test.
13215
13216 2002-11-14 Paul Eggert <eggert@twinsun.com>
13217
13218 * src/output.c (output_skeleton): Call xfopen instead of
13219 duplicating xfopen's body.
13220
13221 Fix bugs reported by Nelson H. F. Beebe in
13222 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
13223
13224 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13225 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13226 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13227 file twice in the grammar, as an extra check.
13228
13229 * tests/input.at (Torturing the Scanner): Surround the
13230 backslash-newline tests with "#if 0", to make it less likely that
13231 we'll run into compiler bugs. Bring back solitary \ inside
13232 comment, but add a closing comment to work around HP C bug. Don't
13233 test backslash-newline in C character constant.
13234
13235 2002-11-14 Akim Demaille <akim@epita.fr>
13236
13237 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13238 status of the compiler.
13239 Calling `exit 1' is no longer needed.
13240 Reported by Nelson H. F. Beebe.
13241
13242 2002-11-14 Akim Demaille <akim@epita.fr>
13243
13244 * tests/atlocal.in (CPPFLAGS): We have config.h.
13245 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13246 New.
13247 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13248 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13249 * tests/regression.at, tests/torture.at: Use them for all the
13250 grammars that are to be compiled.
13251 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13252 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13253 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13254
13255 2002-11-14 Akim Demaille <akim@epita.fr>
13256
13257 * doc/bison.texinfo: Various formatting changes (alignments in
13258 samples, additional @group/@end group, GCS in samples.
13259 Use @deffn instead of simple @table to define the directives,
13260 macros, variables etc.
13261
13262 2002-11-13 Paul Eggert <eggert@twinsun.com>
13263
13264 Fix some bugs reported by Albert Chin-A-Young in
13265 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
13266
13267 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
13268 -o c"; the HP C compiler chatters during compilation.
13269 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13270 * tests/headers.at (export YYLTYPE): Likewise.
13271
13272 * tests/input.at (Torturing the Scanner): Remove lines containing
13273 solitary backslashes, as they tickle a bug in the HP C compiler.
13274
13275 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13276 comments, since they're not portable. Use GNU coding style.
13277
13278 2002-11-13 Akim Demaille <akim@epita.fr>
13279
13280 * data/yacc.c: Leave bigger chunks of quoted text.
13281 (YYDSYMPRINTF): New.
13282 Use it to report symbol activities.
13283 * data/glr.c (YYDSYMPRINTF): New.
13284 Use it.
13285
13286 2002-11-12 Paul Eggert <eggert@twinsun.com>
13287
13288 Version 1.75b.
13289
13290 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13291 (yyglrReduce): Return yyok, not 0.
13292 This should avoid the enumerated-type warnings reported
13293 by Nelson H. F. Beebe in
13294 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
13295
13296 * lib/bbitset.h (BITSET_INLINE): Remove.
13297 * lib/bitset.h [! BITSET_INLINE]: Remove.
13298 (bitset_set, bitset_reset, bitset_test): Rename local vars
13299 to avoid shadowing warnings by GCC.
13300
13301 * data/glr.c (inline): Remove #define. It's the user's
13302 responsibility to #define it away, just like 'const'.
13303 This fixes one of the bugs reported by Nelson H. F. Beebe in
13304 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
13305
13306 * Makefile.maint (po-check): Scan .l and .y files instead of the
13307 .c and the .h files that they generate. This fixes the bug
13308 reported by Tim Van Holder in:
13309 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
13310 Look for N_ as well as for _. Try to avoid matching #define for
13311 N_ and _.
13312 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13313 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13314 * src/scan-gram.l: Revamp regular expressions so that " and '
13315 do not confuse xgettext.
13316
13317 * src/struniq.h (struniq_new): Do not declare the return type
13318 to be 'const'; this violates the C standard.
13319 * src/struniq.c (struniq_new): Likewise.
13320
13321 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13322
13323 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13324 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13325 linker.
13326
13327 2002-11-12 Akim Demaille <akim@epita.fr>
13328
13329 * Makefile.maint: Sync with Autoconf:
13330 (local_updates): New.
13331
13332 2002-11-12 Akim Demaille <akim@epita.fr>
13333
13334 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13335
13336 2002-11-12 Akim Demaille <akim@epita.fr>
13337
13338 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13339 locations.
13340
13341 2002-11-12 Akim Demaille <akim@epita.fr>
13342
13343 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13344 not yyvalue.
13345
13346 2002-11-12 Akim Demaille <akim@epita.fr>
13347
13348 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13349 Use it to test the GLR parser.
13350
13351 2002-11-12 Akim Demaille <akim@epita.fr>
13352
13353 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13354 defines it.
13355 * data/glr.c (yystos): New.
13356 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13357 (YYDSYMPRINT): New.
13358 (yyval): Don't define it, it is handled via M4.
13359 (yyrecoverParseError): Free verbosely the discarded symbols.
13360 * data/yacc.c (yysymprint): Remove, rather...
13361 (b4_yysymprint_generate): invoke.
13362 * data/c.m4 (b4_yysymprint_generate): New.
13363 Accept pointers as arguments, as opposed to the version from
13364 yacc.c.
13365 (b4_yydestruct_generate): Likewise.
13366 * tests/cations.at (Printers and Destructors): Use Bison directives
13367 instead of CPP macros.
13368 Don't rely on internal details.
13369
13370 2002-11-12 Akim Demaille <akim@epita.fr>
13371
13372 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13373 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13374 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13375 it against YYEMPTY and so forth), work on yytoken (i.e., set
13376 it to YYEMPTY etc.).
13377 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13378 (b4_symbol_actions): Remove.
13379 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13380 for 0, end-of-input.
13381
13382 2002-11-12 Akim Demaille <akim@epita.fr>
13383
13384 * doc/bison.texinfo (Destructor Decl): New.
13385
13386 2002-11-12 Akim Demaille <akim@epita.fr>
13387
13388 * src/tables.c (tables_generate): Use free for pointers that
13389 cannot be NULL, not XFREE.
13390 (pack_vector): Use assert, not fatal, for bound violations.
13391 * src/state.c (state_new): Likewise.
13392 * src/reader.c (reader): Likewise.
13393 * src/lalr.c (set_goto_map): Likewise.
13394 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
13395 the file name.
13396
13397 2002-11-12 Akim Demaille <akim@epita.fr>
13398
13399 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13400 Restore.
13401 * src/scan-gram.l (last_string): Is global to the file, not to
13402 yylex.
13403 * src/parse-gram.y (input): Don't append the epilogue here,
13404 (epilogue.opt): do it here, and free the scanner's obstack.
13405 * src/reader.c (epilogue_set): Rename as...
13406 (epilogue_augment): this.
13407 * data/c.m4 (b4_epilogue): Defaults to empty.
13408
13409 2002-11-12 Akim Demaille <akim@epita.fr>
13410
13411 * src/getargs.c (long_options): Remove duplicates.
13412 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13413 Remove.
13414 * doc/bison.rnh: Remove.
13415 * doc/bison.texinfo (VMS Invocation): Remove.
13416
13417 2002-11-12 Akim Demaille <akim@epita.fr>
13418
13419 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13420 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13421
13422 Use struniq for symbols.
13423
13424 * src/symtab.h (symbol_t): The tag member is a struniq.
13425 (symbol_type_set): Adjust.
13426 * src/symtab.c (symbol_new): Takes a struniq.
13427 (symbol_free): Don't free the tag member.
13428 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13429 (hash_compare_symbol, hash_symbol): these.
13430 Use the fact that tags as struniqs.
13431 (symbol_get): Use struniq_new.
13432 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13433 Returns a strniq.
13434 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13435 and type members are struniqs.
13436 * src/reader.c (get_merge_function)
13437 (grammar_current_rule_merge_set): Adjust.
13438 (TYPE, current_type): Are struniq.
13439
13440 Use struniq for file names.
13441
13442 * src/files.h, src/files.c (infile): Split into...
13443 (grammar_file, current_file): these.
13444 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13445 * src/reduce.c (reduce_print): Likewise.
13446 * src/getargs.c (getargs): Likewise.
13447 * src/complain.h, src/complain.c: Likewise.
13448 * src/main.c (main): Call struniqs_new early enough to use it for
13449 file names.
13450 Don't free the input file name.
13451
13452 2002-11-12 Akim Demaille <akim@epita.fr>
13453
13454 * src/symtab.c (symbol_free): Remove dead deactivated code:
13455 type_name are properly removed.
13456 Don't use XFREE to free items that cannot be NULL.
13457 * src/struniq.h, src/struniq.c: New.
13458 * src/main.c (main): Initialize/free struniqs.
13459 * src/parse-gram.y (%union): Add astruniq member.
13460 (yyprint): Adjust.
13461 * src/scan-gram.l (<{tag}>): Return a struniq.
13462 Free the obstack bit that used to store it.
13463 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13464
13465 2002-11-11 Paul Eggert <eggert@twinsun.com>
13466
13467 Revamp to fix many (but not all) of the C- and M4-related quoting
13468 problems. Among other things, this fixes the Bison bug reported
13469 by Jan Hubicka when processing the Bash grammar; see:
13470 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
13471
13472 Use new @ escapes consistently. Represent brackets with @{ and @}
13473 rather than @<:@ and @:>@, since this works a bit better with dumb
13474 editors like vi. Represent @ with @@, since @ is now consistently
13475 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13476 __ofile__, to avoid unexpected expansions. Similarly, use @output
13477 rather than #output.
13478
13479 * data/c.m4 (b4_copyright): Omit file name from comment, since
13480 the file name could contain "*/".
13481 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13482 be quoted. All uses changed.
13483
13484 * data/glr.c: Use new @ escapes consistently.
13485 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13486 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13487 Remove, since they couldn't handle arbitrary characters in file
13488 names.
13489 * data/lalr1.cc: Likewise.
13490 * data/yacc.c: Likewise.
13491
13492 * src/files.c (output_infix): Remove; all uses removed.
13493 * src/files.h: Likewise.
13494
13495 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13496 mishandled funny characters in file names, and anyway it isn't
13497 needed any more.
13498 * data/yacc.c: Likewise.
13499 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13500
13501 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13502 * data/yacc.c: Likewise.
13503
13504 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13505 strings now.
13506 (muscle_init): Quote filename as a C string.
13507 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13508 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13509 * src/output.c (escaped_file_name_output): New function.
13510 (prepare_symbols): Quote tokens for M4.
13511 (prepare): Don't insert output_infix, output_prefix,
13512 output_parser_name, output_header_name; this is now down by scan-skel.
13513 Insert skeleton as a C string.
13514
13515 * src/output.c (user_actions_output, symbol_destructors_output,
13516 symbol_printers_output): Quote filenames for C and M4.
13517 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13518
13519 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13520 escapes other than \\ and \'; this simplifies the code.
13521 (<SC_STRING>): Likewise, for \\ and \".
13522 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13523 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13524 Use new escapes @{ and @} for [ and ].
13525
13526 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13527 them with auto vars.
13528 Switch to new escape scheme, where @ is the escape character uniformly.
13529 Abort if a stray escape character is found. Avoid unbounded input
13530 buffer when parsing non-escaped text.
13531
13532 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13533 __oline__, #output, $@, and @{ do not have unintended meanings.
13534
13535 2002-11-09 Paul Eggert <eggert@twinsun.com>
13536
13537 Fix the test failure due to GCC warnings described in
13538 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
13539 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13540 evaluate to 0 if it's impossible for NINF to be in the respective
13541 table.
13542 (yygetLRActions, yyrecoverParseError): Use them.
13543
13544 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13545 counted in the token inserted at end of file. Now takes
13546 location_t *, not location_t, so that the location can be
13547 adjusted. All uses changed.
13548
13549 * tests/regression.at (Invalid inputs): Adjust wording in
13550 diagnostic to match the new behavior.
13551
13552 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13553 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13554 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13555 abort ();'. This reduces the runtime of the "Many lookaheads"
13556 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13557 GCC 3.2.
13558
13559 2002-11-07 Paul Eggert <eggert@twinsun.com>
13560
13561 * src/parse-gram.y (CHARACTER): Remove unused token.
13562 All uses removed.
13563
13564 * src/scan-gram.l: Remove stack option. We no longer use the
13565 stack, since the stack was never deeper than 1; instead, use the
13566 new auto var c_context to record the stacked value.
13567
13568 Remove nounput option. At an unexpected end of file, we now unput
13569 the minimal input necessary to end cleanly; this simplifies the
13570 code.
13571
13572 Avoid unbounded token sizes where this is easy.
13573
13574 (unexpected_end_of_file): New function.
13575 Use it to systematize the error message on unexpected EOF.
13576 (last-string): Now auto, not static.
13577 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
13578 (scanner_last_string_free): Remove; not used.
13579 (percent_percent_count): Move decl to just before use.
13580 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
13581 not the (never otherwised-used) CHARACTER.
13582
13583 2002-11-07 Akim Demaille <akim@epita.fr>
13584
13585 Let yyerror always receive the msg as last argument, so that
13586 yyerror can be variadic.
13587
13588 * data/yacc.c (b4_yyerror_args): New.
13589 Use it when calling yyerror.
13590 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
13591 Use it when calling yyerror.
13592 * doc/bison.texinfo (Error Reporting): Adjust.
13593 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
13594 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
13595
13596 2002-11-06 Akim Demaille <akim@epita.fr>
13597
13598 #line should have quoted strings.
13599 Ideally, this should be done by m4_quotearg.
13600
13601 * src/scan-skel.l: Include quotearg.h.
13602 Quote __ofile__.
13603 * src/output.c (symbol_printers_output)
13604 (symbol_destructors_output): Quote the file name.
13605
13606 2002-11-06 Akim Demaille <akim@epita.fr>
13607
13608 * tests/regression.at (Invalid inputs): Adjust to the recent
13609 messages.
13610
13611 2002-11-06 Akim Demaille <akim@epita.fr>
13612
13613 Restore --no-lines.
13614 Reported by Jim Kent.
13615
13616 * data/c.m4 (b4_syncline): New.
13617 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
13618 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
13619 * src/output.c (user_actions_output): Likewise.
13620 (prepare): Define 'b4_synclines_flag'.
13621 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
13622
13623 2002-11-06 Akim Demaille <akim@epita.fr>
13624
13625 * src/main.c (main): Free `infile'.
13626 * src/scan-gram.l (handle_syncline): New.
13627 Recognize `#line'.
13628 * src/output.c (user_actions_output, symbol_destructors_output)
13629 (symbol_printers_output): Use the location's file name, not
13630 infile.
13631 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13632
13633 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13634
13635 * src/tables.c (matching_state): Don't allow states to match if
13636 either has GLR conflict entries.
13637
13638 2002-11-05 Paul Eggert <eggert@twinsun.com>
13639
13640 * src/scan-gram.l: Use more accurate diagnostics, e.g.
13641 "integer out of range" rather than "invalid value".
13642 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
13643 accordingly.
13644
13645 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
13646 Also, remove one static variable in the scanner.
13647
13648 * src/scan-gram.l (braces_level): Now auto, not static.
13649 Initialize to zero if the compiler is being picky.
13650 (INITIAL): Clear braces_level instead of incrementing it.
13651 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
13652 as POSIX 1003.1-2001 requires.
13653 * src/system.h (IF_LINT): New macro, taken from coreutils.
13654 * configure.ac: Define "lint" if --enable-gcc-warnings.
13655
13656 2002-11-05 Akim Demaille <akim@epita.fr>
13657
13658 * src/scan-gram.l: When it starts with `%', complain about the
13659 whole directive, not just that `invalid character: %'.
13660
13661 2002-11-04 Akim Demaille <akim@epita.fr>
13662
13663 * Makefile.maint: Update from Autoconf.
13664 (update, cvs-update, po-update, do-po-update): New.
13665
13666 2002-11-04 Akim Demaille <akim@epita.fr>
13667
13668 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
13669 and yyerror.
13670 Have yyerror `use' its arguments.
13671 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
13672 returns true when location & yacc & pure & parse-param.
13673 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
13674
13675 2002-11-04 Akim Demaille <akim@epita.fr>
13676
13677 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
13678 clashes.
13679 * src/scan-gram.l: Use [\'] instead of ['] to pacify
13680 font-lock-mode.
13681 Use complain_at.
13682 Use quote, not quote_n since LOCATION_PRINT no longer uses the
13683 slot 0.
13684
13685 2002-11-03 Paul Eggert <eggert@twinsun.com>
13686
13687 * src/reader.c (get_merge_function, grammar_current_rule_check):
13688 Use consistent diagnostics for reporting type name clashes.
13689 Quote the types with <>, for consistency with Yacc.
13690 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
13691
13692 2002-11-03 Akim Demaille <akim@epita.fr>
13693
13694 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
13695 New.
13696 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
13697 (b4_parse_param): Remove.
13698 Use b4_identification.
13699 Propagate b4_pure_args where needed to pass them to yyerror.
13700 * data/glr.m4 (b4_parse_param): Remove.
13701 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
13702 (b4_lpure_formals): New.
13703 Use b4_identification.
13704 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
13705 b4_user_formals and b4_user_args.
13706 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
13707 (yyreportAmbiguity): When using a pure parser, also need
13708 the location, and the parse-params.
13709 Adjust callers.
13710 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
13711 When using a pure parser, also need the parse-params.
13712 Adjust callers.
13713 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
13714 (%pure-parser + %parse-param) LALR and GLR parsers.
13715 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
13716 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
13717 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
13718 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
13719 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
13720 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
13721 * doc/bison.texinfo: Untabify the whole file.
13722 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
13723 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
13724 (Error Reporting): Adjust to these new directives.
13725 Document %error-verbose, deprecate YYERROR_VERBOSE.
13726
13727 2002-11-03 Akim Demaille <akim@epita.fr>
13728
13729 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
13730 AT_CHECK_CALC_GLR invocations to use % directives, instead of
13731 command line options.
13732 * tests/cxx-type.at: Formatting changes.
13733
13734 2002-11-03 Paul Eggert <eggert@twinsun.com>
13735
13736 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
13737 to count columns correctly, and to check for invalid inputs.
13738
13739 Use mbsnwidth to count columns correctly. Account for tabs, too.
13740 Include mbswidth.h.
13741 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
13742 (extend_location): New function.
13743 (YY_LINES): Remove.
13744
13745 Handle CRLF in C code rather than in Lex code.
13746 (YY_INPUT): New macro.
13747 (no_cr_read): New function.
13748
13749 Scan UCNs, even though we don't fully handle them yet.
13750 (convert_ucn_to_byte): New function.
13751
13752 Handle backslash-newline correctly in C code.
13753 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
13754 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
13755 all uses changed.
13756 (tag, splice): New EREs. Do not allow NUL or newline in tags.
13757 Use {splice} wherever C allows backslash-newline.
13758 YY_STEP after space, newline, vertical-tab.
13759 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
13760
13761 (letter, id): Don't assume ASCII; e.g., spell out a-z.
13762
13763 ({int}, handle_action_dollar, handle_action_at): Check for integer
13764 overflow.
13765
13766 (YY_STEP): Omit trailing semicolon, so that it's more like C.
13767
13768 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
13769 as well as \000. Check for UCHAR_MAX, not 255.
13770 Allow \x with an arbitrary positive number of digits, as in C.
13771 Check for overflow here.
13772 Allow \? and UCNs, for compatibility with C.
13773
13774 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
13775 with quote slot used by complain_at.
13776
13777 * tests/input.at: Add tests for backslash-newline, m4 quotes
13778 in symbols, long literals, and funny escapes in strings.
13779
13780 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
13781 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
13782 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
13783 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
13784 * m4/mbswidth.m4: New file, from GNU coreutils.
13785
13786 * doc/bison.texinfo (Grammar Outline): Document // comments.
13787 (Symbols): Document that trigraphs have no special meaning in Bison,
13788 nor is backslash-newline allowed.
13789 (Actions): Document that trigraphs have no special meaning.
13790
13791 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
13792 no longer used.
13793
13794 2002-11-02 Paul Eggert <eggert@twinsun.com>
13795
13796 * src/reader.c: Don't include quote.h; not needed.
13797 (get_merge_function): Reword warning to be consistent with
13798 type clash diagnostic in grammar_current_rule_check.
13799
13800 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
13801 bug in trigraph handling.
13802
13803 * src/output.c (prepare_symbols): When printing token names,
13804 escape "[" as "@<:@" and likewise for "]".
13805
13806 * src/system.h (errno): Remove declaration, as we are now
13807 assuming C89 or better, and C89 guarantees errno.
13808
13809 2002-10-30 Paul Eggert <eggert@twinsun.com>
13810
13811 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
13812 Check for close failures.
13813 * src/files.h (xfclose): Return void, not int, since it always
13814 returned zero.
13815 * src/files.c (xfclose): Likewise. Report I/O error if ferror
13816 indicates one.
13817 * src/output.c (output_skeleton): Use xfclose rather than fclose
13818 and ferror. xfclose now checks ferror.
13819
13820 * data/glr.c (YYLEFTMOST_STATE): Remove.
13821 (yyreportTree): Use a stack-based leftmost state. This avoids
13822 our continuing battles with bogus warnings about initializers.
13823
13824 2002-10-30 Akim Demaille <akim@epita.fr>
13825
13826 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
13827 #if.
13828
13829 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13830
13831 * tests/glr-regr1.at: New test for reported regressions.
13832 * tests/testsuite.at: Add glr-regr1.at test.
13833 * tests/Makefile.am: Add glr-regr1.at test.
13834
13835 2002-10-24 Paul Eggert <eggert@twinsun.com>
13836
13837 Version 1.75a.
13838
13839 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
13840 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
13841 we use malloc. Don't assume 'A' through 'Z' are contiguous.
13842 Don't assume strdup exists; POSIX says its an XSI extension.
13843 Check for buffer overflow on input.
13844
13845 2002-10-24 Akim Demaille <akim@epita.fr>
13846
13847 * src/output.c (output_skeleton): Don't disable M4sugar comments
13848 too soon: it results in comments being expanded.
13849 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
13850 first output.
13851
13852 2002-10-24 Akim Demaille <akim@epita.fr>
13853
13854 * data/yacc.c (m4_int_type): New.
13855 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
13856 char' as only yacc.c wants K&R portability.
13857 * data/glr.c (yysigned_char): Remove.
13858 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
13859 Reported by Quoc Peyrot.
13860
13861 2002-10-23 Paul Eggert <eggert@twinsun.com>
13862
13863 * src/main.c (main): With --trace=time, report times even if a
13864 non-fatal error occurs. Formerly, the times were reported in some
13865 such cases but not in others.
13866 * src/reader.c (reader): Just return if a complaint has been issued,
13867 instead of exiting, so that 'main' can report times.
13868
13869 2002-10-22 Akim Demaille <akim@epita.fr>
13870
13871 * src/system.h: Include sys/types.
13872 Reported by Bert Deknuydt.
13873
13874 2002-10-23 Paul Eggert <eggert@twinsun.com>
13875
13876 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
13877 Suggested by Art Haas.
13878
13879 2002-10-22 Paul Eggert <eggert@twinsun.com>
13880
13881 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
13882 decl; not needed any more.
13883 * src/main.c (main): Use return to exit, undoing yesterday's change.
13884 The last OS that we could find where this wouldn't work is
13885 SunOS 3.5, and that's too old to worry about now.
13886
13887 * data/glr.c (struct yyltype): Define members even when not
13888 doing locations. This is more consistent with yacc.c, and it
13889 works around the following bug reports:
13890 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
13891 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
13892
13893 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
13894 @acronym consistently. Standardize on "Yacc" instead of "YACC",
13895 "Algol" instead of "ALGOL". Give a bit more history about BNF.
13896
13897 2002-10-22 Akim Demaille <akim@epita.fr>
13898
13899 * data/README: New.
13900
13901 2002-10-21 Paul Eggert <eggert@twinsun.com>
13902
13903 Be consistent about 'bool'; the old code used an enum in one
13904 module and an int in another, and this violates the C standard.
13905 * m4/stdbool.m4: New file, from coreutils 4.5.3.
13906 * configure.ac (AC_HEADER_STDBOOL): Add.
13907 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
13908 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
13909 * src/symtab.c (hash_compare_symbol_t): Likewise.
13910 * src/system.h (bool, false, true): Use a definition consistent
13911 with ../lib/hash.c. All uses changed.
13912
13913 * src/complain.c (warning_issued): Renamed from warn_message_count,
13914 so that we needn't worry about integer overflow (!).
13915 Now of type bool. All uses changed.
13916 (complaint_issued): Renamed from complain_message_count; likewise.
13917
13918 * src/main.c (main): Use exit to exit with failure.
13919
13920 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
13921 rather than 1 and 0.
13922 * src/main.c (main): Likewise.
13923 * src/getargs.c (getargs): Likewise.
13924 * src/reader.c (reader): Likewise.
13925
13926 * src/getarg.c (getargs): Remove duplicate code for
13927 "Try `bison --help'".
13928
13929 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
13930 What was that "2" for?
13931
13932 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
13933 * src/getargs.c (usage): Likewise.
13934
13935 * src/getargs.c (getargs): When there are too few operands, report
13936 the last one. When there are too many, report the first extra
13937 one. This is how diffutils does it.
13938
13939 2002-10-20 Paul Eggert <eggert@twinsun.com>
13940
13941 Remove K&R vestiges.
13942 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
13943 * src/complain.c (VA_START): Remove. Assume prototypes.
13944 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
13945 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
13946 fatal): Assume prototypes.
13947 * src/complain.h: Assume prototypes.
13948 * src/system.h (PARAMS): Remove.
13949 Include <limits.h> unconditionally, since it's guaranteeed even
13950 for a freestanding C89 compiler.
13951 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
13952 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
13953
13954 2002-10-20 Akim Demaille <akim@epita.fr>
13955
13956 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
13957 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
13958 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
13959 (yyresolveStates, yyresolveAction, yyresolveStack)
13960 (yyprocessOneStack): Use them.
13961 (yy_reduce_print): New.
13962 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
13963
13964 2002-10-20 Akim Demaille <akim@epita.fr>
13965
13966 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
13967 arguments and output `void'.
13968 (b4_c_function): Rename as...
13969 (b4_c_function_def): this.
13970 (b4_c_function_decl, b4_c_ansi_function_def)
13971 (b4_c_ansi_function_decl): New.
13972 Change the interpretation of the arguments: before `int, foo', now
13973 `int foo, foo'.
13974 * data/yacc.c (yyparse): Prototype and define thanks to these.
13975 Adjust b4_c_function_def uses.
13976 * data/glr.c (yyparse): Likewise, but ANSI only.
13977
13978 2002-10-20 Akim Demaille <akim@epita.fr>
13979
13980 * src/output.c (prepare): Move the definition of `tokens_number',
13981 `nterms_number', `undef_token_number', `user_token_number_max'
13982 to...
13983 (prepare_tokens): Here.
13984 (prepare_tokens): Rename as...
13985 (prepare_symbols): this.
13986 (prepare): Move the definition of `rules_number' to...
13987 (prepare_rules): here.
13988 (prepare): Move the definition of `last', `final_state_number',
13989 `states_number' to...
13990 (prepare_states): here.
13991 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
13992
13993 2002-10-20 Akim Demaille <akim@epita.fr>
13994
13995 * src/tables.h, src/tables.c, src/output.c: Comment changes.
13996
13997 2002-10-20 Akim Demaille <akim@epita.fr>
13998
13999 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14000 * data/c.m4: here.
14001
14002 2002-10-20 Akim Demaille <akim@epita.fr>
14003
14004 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14005 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14006 `pair'.
14007 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14008 `name' to...
14009 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14010 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14011 These.
14012
14013 2002-10-19 Paul Eggert <eggert@twinsun.com>
14014
14015 Do not create a temporary file, as that involves security and
14016 cleanup headaches. Instead, use a pair of pipes.
14017 Derived from a suggestion by Florian Krohm.
14018 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14019 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14020 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14021 (BISON_PREREQ_SUBPIPE): Add.
14022 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14023 Add subpipe.h, subpipe.c.
14024 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14025 * po/POTFILES.in: Add lib/subpipe.c.
14026 * src/output.c: Include "subpipe.h".
14027 (m4_invoke): Remove decl.
14028 (scan_skel): New decl.
14029 (output_skeleton): Use pipe rather than temporary file for m4 input.
14030 Check that m4sugar.m4 is readable, to avoid deadlock.
14031 Check for pipe I/O error.
14032 * src/scan-skel.l (readpipe): Remove decl.
14033 (scan_skel): New function, to be used in place of m4_invoke.
14034 Read from stream rather than file.
14035
14036 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14037 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14038 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14039 this generates a more-accurate value anyway.
14040
14041 * lib/timevar.c (timervar_accumulate): Rename locals to
14042 avoid confusion with similarly-named more-global.
14043 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14044
14045 * src/output.c (prepare): Use xstrdup to convert char const *
14046 to char *, to avoid GCC warning.
14047
14048 2002-10-19 Akim Demaille <akim@epita.fr>
14049
14050 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14051 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14052 Use them to have `calc.y' ready for %pure-parser.
14053 * data/yacc.c (YYLEX): Pass a yylex return type to
14054 b4_c_function_call.
14055
14056 2002-10-19 Akim Demaille <akim@epita.fr>
14057
14058 Prototype support of %lex-param and %parse-param.
14059
14060 * src/parse-gram.y: Add the definition of the %lex-param and
14061 %parse-param tokens, plus their rules.
14062 Drop the `_' version of %glr-parser.
14063 Add the "," token.
14064 * src/scan-gram.l (INITIAL): Scan them.
14065 * src/muscle_tab.c: Comment changes.
14066 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14067 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14068 (muscle_entry_s): The `value' member is no longer const.
14069 Adjust all dependencies.
14070 * src/muscle_tab.c (muscle_init): Adjust: use
14071 MUSCLE_INSERT_STRING.
14072 Initialize the obstack earlier.
14073 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14074 (muscle_pair_list_grow): New.
14075 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14076 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14077 * tests/calc.at: Use %locations, not --locations.
14078 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14079
14080 2002-10-19 Akim Demaille <akim@epita.fr>
14081
14082 * src/getargs.c (usage): Take status as argument and exit
14083 accordingly.
14084 Report the traditional `Try ... --help' message when status != 0.
14085 (usage, version): Don't take a FILE * as arg, it is pointless.
14086 (getargs): When there is an incorrect number of arguments, make it
14087 an error, and report it GNUlically thanks to `usage ()'.
14088
14089 2002-10-18 Paul Eggert <eggert@twinsun.com>
14090
14091 * data/glr.c (yyreportParseError): Don't assume that sprintf
14092 yields the length of the printed string, as this is not true
14093 on SunOS 4.1.4. Reported by Peter Klein.
14094
14095 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14096 * tests/conflicts.at (%nonassoc and eof): Likewise.
14097 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14098
14099 2002-10-17 Akim Demaille <akim@epita.fr>
14100
14101 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14102 * src/getargs.c (trace_types, trace_args): Adjust.
14103 * src/reader.c (grammar_current_rule_prec_set)
14104 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14105 Standardize error messages.
14106 And s/@prec/%prec/!
14107 (reader): Use trace_flag to enable scanner/parser debugging,
14108 instead of an adhoc scheme.
14109 * src/scan-gram.l: Remove trailing debugging code.
14110
14111 2002-10-16 Paul Eggert <eggert@twinsun.com>
14112
14113 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14114 MUSCLE_TAB_H.
14115
14116 * NEWS: Officially drop support for building Bison with K&R C,
14117 since it didn't work anyway and it's not worth worrying about.
14118 * Makefile.maint (wget_files): Remove ansi2knr.c.
14119 (ansi2knr.c-url_prefix): Remove.
14120 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14121 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14122 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14123
14124 2002-10-15 Paul Eggert <eggert@twinsun.com>
14125
14126 Stop using the "enum_" trick for K&R-style function definitions;
14127 it confused me, and I was the author! Instead, assume that people
14128 who want to use K&R C compilers (when using these modules in GCC,
14129 perhaps?) will run ansi2knr.
14130
14131 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14132 All uses of "enum_" changed to "enum ".
14133 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14134 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14135
14136 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14137 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14138 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14139 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14140 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14141 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14142 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14143 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14144 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14145 Use function prototypes; this removes the need for declaring
14146 static functions simply to provide their prototypes.
14147 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14148 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14149 bitset_count_, bitset_create, bitset_dump, bitset_first,
14150 bitset_free, bitset_init, bitset_last, bitset_next,
14151 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14152 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14153 bitset_print, bitset_release_memory, bitset_toggle_,
14154 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14155 debug_bitset): Likewise.
14156 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14157 * lib/bitset_stats.c (bitset_log_histogram_print,
14158 bitset_percent_histogram_print, bitset_stats_and,
14159 bitset_stats_and_cmp, bitset_stats_and_or,
14160 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14161 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14162 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14163 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14164 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14165 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14166 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14167 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14168 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14169 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14170 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14171 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14172 bitset_stats_zero): Likewise.
14173 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14174 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14175 bitsetv_dump, debug_bitsetv): Likewise.
14176 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14177 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14178 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14179 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14180 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14181 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14182 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14183 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14184 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14185 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14186 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14187 Likewise.
14188 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14189 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14190 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14191 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14192 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14193 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14194 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14195 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14196 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14197 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14198 lbitset_xor_cmp, lbitset_zero): Likewise.
14199
14200 2002-10-14 Akim Demaille <akim@epita.fr>
14201
14202 Version 1.75.
14203
14204 2002-10-14 Akim Demaille <akim@epita.fr>
14205
14206 * tests/Makefile.am (maintainer-check-posix): New.
14207
14208 2002-10-14 Akim Demaille <akim@epita.fr>
14209
14210 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14211 member.
14212
14213 2002-10-14 Akim Demaille <akim@epita.fr>
14214
14215 * src/tables.c (table_ninf_remap): base -> tab.
14216 Reported by Matt Rosing.
14217
14218 2002-10-14 Paul Eggert <eggert@twinsun.com>
14219
14220 * tests/action.at, tests/calc.at, tests/conflicts.at,
14221 tests/cxx-type.at, tests/headers.at, tests/input.at,
14222 tests/regression.at, tests/synclines.at, tests/torture.at:
14223 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14224 so that the tests still work even if POSIXLY_CORRECT is set.
14225 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
14226
14227 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14228 for portability to K&R hosts. Fix typo: signed char is guaranteed
14229 only to 127, not to 128.
14230 * data/glr.c (yysigned_char): New type.
14231 * data/yacc.c (yysigned_char): Likewise.
14232 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14233
14234 2002-10-13 Paul Eggert <eggert@twinsun.com>
14235
14236 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14237 true due to limited range of data type" warning from GCC.
14238
14239 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14240 by wrapping enum yytokentype's definition inside #ifndef
14241 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14242
14243 2002-10-13 Akim Demaille <akim@epita.fr>
14244
14245 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14246 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14247
14248 2002-10-13 Akim Demaille <akim@epita.fr>
14249
14250 * Makefile.maint: Update from Autoconf 2.54.
14251 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14252
14253 2002-10-13 Akim Demaille <akim@epita.fr>
14254
14255 * src/print.c (print_state): Separate the list of solved conflicts
14256 from the other items.
14257 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14258
14259 2002-10-13 Akim Demaille <akim@epita.fr>
14260
14261 Let nondeterministic skeletons be usable with deterministic
14262 tables.
14263
14264 With the patch, GAWK compiled by GCC without -O2 passes its test
14265 suite using a GLR parser driven by LALR tables. It fails with -O2
14266 because `struct stat' gives two different answers on my machine:
14267 88 (definition of an auto var) and later 96 (memset on this var).
14268 Hence the stack is badly corrumpted. The headers inclusion is to
14269 blame: if I move the awk.h inclusion before GLR's system header
14270 inclusion, the two struct stat have the same size.
14271
14272 * src/tables.c (pack_table): Always create conflict_table.
14273 (token_actions): Always create conflict_list.
14274 * data/glr.c (YYFLAG): Remove, unused.
14275
14276 2002-10-13 Akim Demaille <akim@epita.fr>
14277
14278 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14279 (O0FLAGS): New.
14280 (VALGRIND, GXX): New.
14281 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14282 * tests/bison.in: Run $PREBISON a pre-command.
14283 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14284 (maintainer-check-g++): New.
14285 * Makefile.am (maintainer-check): New.
14286
14287 2002-10-13 Akim Demaille <akim@epita.fr>
14288
14289 * data/glr.c: Formatting changes.
14290 Tweak some trace messages to match yacc.c's.
14291
14292 2002-10-13 Akim Demaille <akim@epita.fr>
14293
14294 GLR parsers sometimes raise parse errors instead of performing the
14295 default reduction.
14296 Reported by Charles-Henry de Boysson.
14297
14298 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
14299 check the length of the traces when %glr.
14300 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14301 GLR's traces.
14302 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14303 Test GLR parsers.
14304 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14305 (yyltype): Remove the yy prefix from the member names.
14306 (yytable): Complete its comment.
14307 (yygetLRActions): Map error action number from YYTABLE from
14308 YYTABLE_NINF to 0.
14309 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14310 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14311 not satisfying as we could compare an YYACTION computed from
14312 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14313 only value for error actions.
14314 (yyreportParseError): In verbose parse error messages, don't issue
14315 `error' in the list of expected tokens.
14316 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14317 next action to perform to match glr.c's decoding.
14318 (yytable): Complete its comment.
14319
14320 2002-10-13 Paul Eggert <eggert@twinsun.com>
14321
14322 Fix problem reported by Henrik Grubbstroem in
14323 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
14324 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14325 because the Bison parser reads the second action before reducing
14326 the first one.
14327 * src/scan-gram.l (rule_length): New static var.
14328 Use it to keep track of the rule length in the scanner, since
14329 we can't expect the parser to be in lock-step sync with the scanner.
14330 (handle_action_dollar, handle_action_at): Use this var.
14331 * tests/actions.at (Exotic Dollars): Test for the problem.
14332
14333 2002-10-12 Paul Eggert <eggert@twinsun.com>
14334
14335 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14336 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14337 Include <sys/time.h> when checking for clock_t and struct tms.
14338 Use same include order as source.
14339 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
14340 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
14341
14342 * lib/timevar.c: Update copyright date and clarify comments.
14343 (get_time) [IN_GCC]: Keep the GCC version for reference.
14344
14345 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14346 GCC version as of today, then merge Bison's changes.
14347 Change "GCC" to "Bison" in copyright notice. timevar.def's
14348 author is Akim, so change that too.
14349
14350 * src/reader.c (grammar_current_rule_check):
14351 Don't worry about the default action if $$ is untyped.
14352 Prevents bogus warnings reported by Jim Gifford in
14353 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
14354
14355 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14356 * data/glr.c, data/lalr1.cc, data/yacc.c:
14357 Output token definitions before the first part of user declarations.
14358 Fixes compatibility problem reported by Jim Gifford for kbd in
14359 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14360
14361 2002-10-11 Paul Eggert <eggert@twinsun.com>
14362
14363 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14364 (yyparse): here. This undoes some of the 2002-07-25 change.
14365 Compatibility problem reported by Ralf S. Engelschall with
14366 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14367
14368 2002-10-11 Akim Demaille <akim@epita.fr>
14369
14370 * tests/regression.at Characters Escapes): New.
14371 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14372 characters.
14373 Reported by Jan Nieuwenhuizen.
14374
14375 2002-10-11 Akim Demaille <akim@epita.fr>
14376
14377 * po/id.po: New.
14378
14379 2002-10-10 Paul Eggert <eggert@twinsun.com>
14380
14381 Portability fixes for bitsets; this also avoids several GCC
14382 warnings.
14383
14384 * lib/abitset.c: Include <stddef.h>, for offsetof.
14385 * lib/lbitset.c: Likewise.
14386
14387 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14388 properly for vectors of objects. Do not assume that adding a
14389 header size to a multiple of a word size yields a value that is
14390 properly aligned for the whole union.
14391 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14392
14393 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14394 unique names for structures.
14395 * lib/ebitset.c (ebitset_bytes): Likewise.
14396 * lib/lbitset.c (lbitset_bytes): Likewise.
14397
14398 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14399 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14400 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14401 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14402 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14403 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14404 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14405 to improve the type-checking that GCC can do.
14406 * lib/bitset.c (bitset_op4_cmp): Likewise.
14407 * lib/bitset_stats.c (bitset_stats_count,
14408 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14409 bitset_stats_copy, bitset_stats_disjoint_p,
14410 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14411 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14412 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14413 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14414 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14415 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14416 bitset_stats_or_and_cmp): Likewise.
14417 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14418 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14419 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14420 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14421
14422 * lib/abitset.h: Include bitset.h, not bbitset.h.
14423 * lib/ebitset.h: Likewise.
14424 * lib/lbitset.h: Likewise.
14425
14426 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14427 All instances of parameters of type enum bitset_opts are now of
14428 type enum_bitset_opts, to conform to the C Standard, and similarly
14429 for enum_bitset_type.
14430 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14431 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14432
14433 Do not use "struct bitset_struct" to mean different things in
14434 different modules. Not only is this confusing, it violates
14435 the C Standard, which requires that structure types in different
14436 modules must be compatible if one is to be passed to the other.
14437 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14438 All instances of "struct bitset_struct *" replaced with "bitset".
14439 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14440 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14441 struct lbitset_struct, struct bitset_stats_struct): New types.
14442 All uses of struct bitset_struct changed to union bitset_union,
14443 etc.
14444 * lib/abitset.c (struct abitset_struct, abitset,
14445 struct bitset_struct): Remove.
14446 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14447 struct bitset_struct): Remove.
14448 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14449 bitset_struct): Remove.
14450 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14451 Likewise.
14452
14453 Do not call a function of type T using a call that assumes the
14454 function is of a different type U. Standard C requires that a
14455 function must be called with a type that is compatible with its
14456 definition.
14457 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14458 New decls.
14459 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14460 New functions.
14461 * lib/ebitset.c (PFV): Remove.
14462 * lib/lbitset.c (PFV): Likewise.
14463 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14464 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14465 decls.
14466 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14467 (ebitset_vtable): Use them.
14468 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14469 lbitset_xor): New functions.
14470 (lbitset_vtable): Use them.
14471
14472 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14473 Declare.
14474
14475 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14476 GCC warning.
14477 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14478 Use offsetof, for simplicity.
14479
14480 2002-10-06 Paul Eggert <eggert@twinsun.com>
14481
14482 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14483 the same width as int. This reapplies a hunk of the 2002-08-12 patch
14484 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
14485 which was inadvertently undone by the 2002-09-30 patch.
14486 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14487 the same width as int.
14488
14489 2002-10-04 Paul Eggert <eggert@twinsun.com>
14490
14491 Version 1.50.
14492
14493 * configure.ac (AC_INIT), NEWS: Increment version number.
14494
14495 * doc/bison.texinfo: Minor spelling, grammar, and white space
14496 fixes.
14497 (Symbols): Mention that any negative value returned from yylex
14498 signifies end-of-input. Warn about negative chars. Mention
14499 the portable Standard C character set.
14500
14501 The GNU coding standard says CFLAGS and YFLAGS are reserved
14502 for the installer to set.
14503 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14504 * src/Makefile.am (AM_CFLAGS): Likewise.
14505 (AM_YFLAGS): Renamed from YFLAGS.
14506
14507 Fix some MAX and MIN problems.
14508 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14509 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14510 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14511 * src/reader.c (reader): Use it.
14512
14513 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14514 POSIX 1003.1-2001 has removed fgrep.
14515
14516 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14517
14518 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14519 interpreted as signed.
14520 * lib/ebitset.c (ebitset_list): Fix bug.
14521
14522 2002-10-01 Paul Eggert <eggert@twinsun.com>
14523
14524 More fixes for 64-bit hosts and large bitsets.
14525
14526 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14527 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14528 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14529 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14530 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14531 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14532 bitset_count_): Likewise.
14533 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14534 bitset_first, bitset_last): Likewise.
14535 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14536 bitset_stats_list_reverse, bitset_stats_size,
14537 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14538 Likewise.
14539 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14540 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14541 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14542 bitsetv_reflexive_transitive_closure): Likewise.
14543 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14544 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14545 Likewise.
14546 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14547 Likewise.
14548
14549 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14550 Use size_t, not unsigned int, to count bytes.
14551 * lib/abitset.h (abitset_bytes): Likewise.
14552 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14553 Likewise.
14554 * lib/bitset.h (bitset_bytes): Likewise.
14555 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14556 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14557 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14558 * lib/ebitset.c (ebitset_bytes): Likewise.
14559 * lib/ebitset.h (ebitset_bytes): Likewise.
14560 * lib/lbitset.c (lbitset_bytes): Likewise.
14561 * lib/lbitset.h (lbitset_bytes): Likewise.
14562
14563 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14564 abitset_subset_p, abitset_disjoint_p, abitset_and,
14565 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14566 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14567 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14568 abitset_or_and, abitset_or_and_cmp):
14569 Use bitset_windex instead of unsigned int.
14570 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14571 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14572 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14573 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
14574 Likewise.
14575 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
14576
14577 * lib/bitset.c (bitset_print):
14578 Use proper printf formats for widths of integer types.
14579 * lib/bitset_stats.c (bitset_percent_histogram_print,
14580 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
14581 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14582 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14583 * lib/lbitset.c (lbitset_bytes): Likewise.
14584
14585 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
14586 BITSET_SIZE_MAX): New macros.
14587 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
14588 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
14589 to BITSET_WINDEX_MAX.
14590
14591 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
14592 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
14593 since we now return the bitset_bindex type (not int).
14594
14595 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
14596 when computing sizes.
14597 * lib/ebitset.c (ebitset_elts_grow): Likewise.
14598
14599 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
14600 and avoid cast to unsigned.
14601
14602 2002-09-30 Akim Demaille <akim@epita.fr>
14603
14604 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14605 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
14606 Updates from Michael Hayes.
14607
14608 2002-09-30 Art Haas <ahaas@neosoft.com>
14609
14610 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
14611 invocations.
14612 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
14613 defined.
14614
14615 2002-09-27 Akim Demaille <akim@epita.fr>
14616
14617 Version 1.49c.
14618
14619 2002-09-27 Akim Demaille <akim@epita.fr>
14620
14621 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
14622 (Because of AC_LIBSOURCE).
14623
14624 2002-09-27 Akim Demaille <akim@epita.fr>
14625
14626 Playing with Autoscan.
14627
14628 * configure.ac: Remove the old LIBOBJ tweaks.
14629 (AC_REPLACE_FUNCS): Add strrchr and strtol.
14630 * lib/strrchr.c: New.
14631 * lib/strtol.c: New, from the Coreutils 4.5.1.
14632
14633 2002-09-27 Akim Demaille <akim@epita.fr>
14634
14635 Playing with Autoscan.
14636
14637 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
14638 * lib/Makefile.am (libbison_a_SOURCES): No longer include
14639 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
14640 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
14641 Coreutils 4.5.1.
14642
14643 2002-09-24 Akim Demaille <akim@epita.fr>
14644
14645 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
14646 (Frequently Asked Questions, Parser Stack Overflow): New.
14647
14648 2002-09-13 Akim Demaille <akim@epita.fr>
14649
14650 Playing with autoscan.
14651
14652 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
14653 * src/files.c (skeleton_find): Remove, unused.
14654 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
14655 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
14656
14657 2002-09-13 Akim Demaille <akim@epita.fr>
14658
14659 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
14660 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
14661
14662 2002-09-13 Akim Demaille <akim@epita.fr>
14663
14664 * configure.ac: Require 2.54.
14665 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
14666 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
14667 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
14668 Remove, provided by Autoconf macros.
14669
14670 2002-09-12 Akim Demaille <akim@epita.fr>
14671
14672 * m4/prereq.m4: Update, from Coreutils 4.5.1.
14673
14674 2002-09-12 Akim Demaille <akim@epita.fr>
14675
14676 * m4/prereq.m4: Update, from Fileutils 4.1.5.
14677 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
14678 Reported by Martin Mokrejs.
14679
14680 2002-09-10 Akim Demaille <akim@epita.fr>
14681
14682 * src/parse-gram.y: Associate a human readable string to each
14683 token type.
14684 * tests/regression.at (Invalid inputs): Adjust.
14685
14686 2002-09-10 Gary V. Vaughan <gary@gnu.org>
14687
14688 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
14689 with an Autoconf-2.5x style configure.ac.
14690
14691 2002-09-06 Paul Eggert <eggert@twinsun.com>
14692
14693 * doc/bison.texinfo (Conditions): Make explicit that the GPL
14694 exception applies only to yacc.c. This is a modification of a
14695 patch originally suggested by Akim Demaille.
14696
14697 2002-09-06 Akim Demaille <akim@epita.fr>
14698
14699 * data/c.m4 (b4_copyright): Move the GPL exception comment from
14700 here to...
14701 * data/yacc.c: here.
14702
14703 * data/lalr1.cc (struct yyltype): Don't define it, since we use
14704 LocationType.
14705 (b4_ltype): Default to yy::Location from location.hh.
14706
14707 2002-09-04 Jim Meyering <jim@meyering.net>
14708
14709 * data/yacc.c: Guard the declaration of yytoknum also with
14710 `#ifdef YYPRINT', so it is declared only when used.
14711
14712 2002-09-04 Akim Demaille <akim@epita.fr>
14713
14714 * configure.in: Rename as...
14715 * configure.ac: this.
14716 Bump to 1.49c.
14717
14718 2002-09-04 Akim Demaille <akim@epita.fr>
14719
14720 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
14721 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
14722 translate maintainer only messages.
14723
14724 2002-08-12 Paul Eggert <eggert@twinsun.com>
14725
14726 Version 1.49b.
14727
14728 * Makefile.am (SUBDIRS): Remove intl.
14729 (DISTCLEANFILES): Remove.
14730 * NEWS: Mention that GNU M4 is now required. Clarify what is
14731 meant by "larger grammars". Mention the pt_BR translation.
14732 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
14733 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
14734 Bump version from 0.11.2 to 0.11.5.
14735 (BISON_PREREQ_STAGE): Remove.
14736 (AM_GNU_GETTEXT): Use external gettext.
14737 (AC_OUTPUT): Remove intl/Makefile.
14738
14739 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
14740
14741 * data/glr.c: Include string.h, for strlen.
14742 (yyreportParseError): Use size_t for yysize.
14743 (yy_yypstack): No longer nested inside yypstates, as nested
14744 functions are not portable. Do not assume size_t is the
14745 same width as int.
14746 (yypstates): Do not assume that ptrdiff_t is the same width
14747 as int, and similarly for yyposn and YYINDEX.
14748
14749 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
14750
14751 * lib/Makefile.am (INCLUDES): Do not include from the intl
14752 directory, which has been removed.
14753 * src/Makefile.am (INCLUDES): Likewise.
14754
14755 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
14756 (bitsets_sources, additional_bitsets_sources, timevars_sources):
14757 New vars.
14758
14759 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
14760 * tests/Makefile.am (EXTRA_DIST): Likewise.
14761
14762 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
14763 Do not assume that bitset_windex is the same width as unsigned.
14764
14765 * lib/abitset.c (abitset_unused_clear): Do not assume that
14766 bitset_word is the same width as int.
14767 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
14768 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
14769 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
14770 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
14771 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
14772
14773 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
14774 portability to one's complement hosts!).
14775 * lib/ebitset.c (ebitset_op1): Likewise.
14776 * lib/lbitset.c (lbitset_op1): Likewise.
14777
14778 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
14779 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14780 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
14781 Sync with fileutils.
14782 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
14783 lib/gettext.h: Sync with diffutils.
14784
14785 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
14786 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
14787
14788 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
14789 PROTOTYPES to check for prototypes, and "defined __STDC__" to
14790 check for void *.
14791
14792 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
14793 size_t; the old version tried to do this but casted improperly.
14794 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
14795 (bitset_test): Now returns int, not unsigned long.
14796
14797 * lib/bitset_stats.c: Include "gettext.h".
14798 (_): New macro.
14799 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
14800 name locals "index", as it generates unnecessary warnings on some
14801 hosts that have an "index" function.
14802
14803 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
14804 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
14805 they need translation.
14806 * src/LR0.c (state_list_append, new_itemsets, get_state,
14807 append_states, generate_states): Likewise.
14808 * src/assoc.c (assoc_to_string): Likewise.
14809 * src/closure.c (print_closure, set_firsts, closure): Likewise.
14810 * src/gram.c (grammar_dump): Likewise.
14811 * src/injections.c (injections_compute): Likewise.
14812 * src/lalr.c (lookaheads_print): Likewise.
14813 * src/relation.c (relation_transpose): Likewise.
14814 * src/scan-gram.l: Likewise.
14815 * src/tables.c (table_grow, pack_vector): Likewise.
14816
14817 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
14818 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
14819 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
14820 * m4/mbstate_t.m4: Sync with fileutils.
14821 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
14822
14823 * po/LINGUAS: Add pt_BR.
14824 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
14825 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
14826 lib/timevar.c.
14827 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
14828 manual recommends.
14829 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
14830
14831 * src/complain.c (strerror_r): Remove decl; not needed.
14832 (strerror): Use same pattern as ../lib/error.c.
14833
14834 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
14835
14836 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
14837
14838 * src/main.c (main): Cast result of bindtextdomain and textdomain
14839 to void, to avoid a GCC warning when --disable-nls is in effect.
14840
14841 * src/scan-gram.l: Use strings rather than escapes when possible,
14842 to minimize the number of warnings from xgettext.
14843 (handle_action_dollar, handle_action_at): Don't use isdigit,
14844 as it mishandles negative chars and it may not work as expected
14845 outside the C locale.
14846
14847 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
14848 this is a GCC extension and is not portable to other compilers.
14849
14850 * src/system.h (alloca): Use same pattern as ../lib/error.c.
14851 Do not include <ctype.h>; no longer needed.
14852 Do not include <malloc.h>; no longer needed (and generates
14853 warnings on OpenBSD 3.0).
14854
14855 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
14856 it's not portable.
14857
14858 * tests/regression.at: Do not use 'cc -c input.c -o input';
14859 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
14860
14861 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
14862 exit status as failure, not just exit status 1. Sun C exits
14863 with status 2 sometimes.
14864
14865 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
14866 Use it for the two large tests.
14867
14868 2002-08-02 Akim Demaille <akim@epita.fr>
14869
14870 * src/conflicts.c (conflicts_output): Don't output rules never
14871 reduced here, since anyway that computation doesn't work.
14872 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
14873 (rule_useless_p, rule_never_reduced_p): New.
14874 (grammar_rules_partial_print): Use a filter instead of a range.
14875 Display the title only if needed.
14876 (grammar_rules_print): Adjust.
14877 (grammar_rules_never_reduced_report): New.
14878 * src/tables.c (action_row): Move the computation of rules never
14879 reduced to...
14880 (token_actions): here.
14881 * src/main.c (main): Make the parser before making the report, so
14882 that rules never reduced are computed.
14883 Call grammar_rules_never_reduced_report.
14884 * src/print.c (print_results): Report rules never reduced.
14885 * tests/conflicts.at, tests/reduce.at: Adjust.
14886
14887 2002-08-01 Akim Demaille <akim@epita.fr>
14888
14889 Instead of attaching lookaheads and duplicating the rules being
14890 reduced by a state, attach the lookaheads to the reductions.
14891
14892 * src/state.h (state_t): Remove the `lookaheads',
14893 `lookaheads_rule' member.
14894 (reductions_t): Add a `lookaheads' member.
14895 Use a regular array for the `rules'.
14896 * src/state.c (reductions_new): Initialize the lookaheads member
14897 to 0.
14898 (state_rule_lookaheads_print): Adjust.
14899 * src/state.h, src/state.c (state_reductions_find): New.
14900 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
14901 (count_rr_conflicts): Adjust.
14902 * src/lalr.c (LArule): Remove.
14903 (add_lookback_edge): Adjust.
14904 (state_lookaheads_count): New.
14905 (states_lookaheads_initialize): Merge into...
14906 (initialize_LA): this.
14907 (lalr_free): Adjust.
14908 * src/main.c (main): Don't free nullable and derives too early: it
14909 is used by --verbose.
14910 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
14911
14912 2002-08-01 Akim Demaille <akim@epita.fr>
14913
14914 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
14915 `rule_number_t**'.
14916 (set_derives, free_derives): Rename as...
14917 (derives_compute, derives_free): this.
14918 Adjust all dependencies.
14919 * src/nullable.c (set_nullable, free_nullable): Rename as...
14920 (nullable_compute, nullable_free): these.
14921 (rule_list_t): Store rule_t *, not rule_number_t.
14922 * src/state.c (state_rule_lookaheads_print): Directly compare rule
14923 pointers, instead of their numbers.
14924 * src/main.c (main): Call nullable_free, and derives_free earlier,
14925 as they were lo longer used.
14926
14927 2002-08-01 Akim Demaille <akim@epita.fr>
14928
14929 * lib/timevar.c (get_time): Include children time.
14930 * src/lalr.h (LA, LArule): Don't export them: used with the
14931 state_t.
14932 * src/lalr.c (LA, LArule): Static.
14933 * src/lalr.h, src/lalr.c (lalr_free): New.
14934 * src/main.c (main): Call it.
14935 * src/tables.c (pack_vector): Check whether loc is >= to the
14936 table_size, not >.
14937 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
14938 (tables_generate): do it, since that's also it which allocates
14939 them.
14940 Don't free LA and LArule, main does.
14941
14942 2002-07-31 Akim Demaille <akim@epita.fr>
14943
14944 Separate parser tables computation and output.
14945
14946 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
14947 (conflict_list, conflict_list_cnt, table, check, table_ninf)
14948 (yydefgoto, yydefact, high): Move to...
14949 * src/tables.h, src/tables.c: here.
14950 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
14951 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
14952 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
14953 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
14954 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
14955 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
14956 (action_row, save_row, token_actions, save_column, default_goto)
14957 (goto_actions, sort_actions, matching_state, pack_vector)
14958 (table_ninf_remap, pack_table, prepare_actions): Move to...
14959 * src/tables.c: here.
14960 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
14961 * src/output.c (token_actions, output_base, output_conflicts)
14962 (output_check): Merge into...
14963 (prepare_actions): this.
14964 (actions_output): Rename as...
14965 (user_actions_output): this.
14966 * src/main.c (main): Call tables_generate and tables_free.
14967
14968 2002-07-31 Akim Demaille <akim@epita.fr>
14969
14970 Steal GCC's --time-report support.
14971
14972 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
14973 stolen/adjusted from GCC.
14974 * m4/stage.m4: Remove time related checks.
14975 * m4/timevar.m4: New.
14976 * configure.in: Adjust.
14977 * src/system.h: Adjust to using timevar.h.
14978 * src/getargs.h, src/getargs.c: Support trace_time for
14979 --trace=time.
14980 * src/main.c (stage): Remove.
14981 (main): Replace `stage' invocations with timevar calls.
14982 * src/output.c: Insert pertinent timevar calls.
14983
14984 2002-07-31 Akim Demaille <akim@epita.fr>
14985
14986 Let --trace have arguments.
14987
14988 * src/getargs.h (enum trace_e): New.
14989 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
14990 (long_options, short_options): --trace/-T takes an optional
14991 argument.
14992 Change all the uses of trace_flag to reflect the new flags.
14993 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
14994
14995 Strengthen `stage' portability.
14996
14997 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
14998 * configure.in: Use it.
14999 Don't check for malloc.h and sys/times.h.
15000 * src/system.h: Include them when appropriate.
15001 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15002 times and struct tms are available.
15003
15004 2002-07-30 Akim Demaille <akim@epita.fr>
15005
15006 In verbose parse error message, don't report `error' as an
15007 expected token.
15008 * tests/actions.at (Printers and Destructors): Adjust.
15009 * tests/calc.at (Calculator $1): Adjust.
15010 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15011 error message, do not report the parser accepts the error token in
15012 that state.
15013
15014 2002-07-30 Akim Demaille <akim@epita.fr>
15015
15016 Normalize conflict related messages.
15017
15018 * src/complain.h, src/complain.c (warn, complain): New.
15019 * src/conflicts.c (conflicts_print): Use them.
15020 (conflict_report_yacc): New, extracted from...
15021 (conflicts_print): here.
15022 * tests/conflicts.at, tests/existing.at: Adjust.
15023
15024 2002-07-30 Akim Demaille <akim@epita.fr>
15025
15026 Report rules which are never reduced by the parser: those hidden
15027 by conflicts.
15028
15029 * src/LR0.c (save_reductions): Don't make the final state too
15030 different: save its reduction (accept) instead of having a state
15031 without any action (no shift or goto, no reduce).
15032 Note: the final state is now a ``regular'' state, i.e., the
15033 parsers now contain `reduce 0' as default reduction.
15034 Nevertheless, since they decide to `accept' when yystate =
15035 final_state, they still will not reduce rule 0.
15036 * src/print.c (print_actions, print_reduction): Adjust.
15037 * src/output.c (action_row): Track reduced rules.
15038 (token_actions): Report rules never reduced.
15039 * tests/conflicts.at, tests/regression.at: Adjust.
15040
15041 2002-07-30 Akim Demaille <akim@epita.fr>
15042
15043 `stage' was accidently included in a previous patch.
15044 Initiate its autoconfiscation.
15045
15046 * configure.in: Look for malloc.h and sys/times.h.
15047 * src/main.c (stage): Adjust.
15048 Report only when trace_flag.
15049
15050 2002-07-29 Akim Demaille <akim@epita.fr>
15051
15052 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15053 state_number_t.
15054 (errs_t): symbol_t*, not symbol_number_t.
15055 (reductions_t): rule_t*, not rule_number_t.
15056 (FOR_EACH_SHIFT): New.
15057 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15058 * src/print.c, src/print_graph.c: Adjust.
15059
15060 2002-07-29 Akim Demaille <akim@epita.fr>
15061
15062 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15063
15064 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15065 (endtoken, accept): these.
15066 * src/reader.c (reader): Set endtoken's default tag to "$end".
15067 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15068 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15069 Adjust.
15070
15071 2002-07-29 Akim Demaille <akim@epita.fr>
15072
15073 * src/reduce.c (reduce_grammar): When the language is empty,
15074 complain about the start symbol, not the axiom.
15075 Use its location.
15076 * tests/reduce.at (Empty Language): New.
15077
15078 2002-07-26 Akim Demaille <akim@epita.fr>
15079
15080 * src/reader.h, src/reader.c (gram_error): ... can't get
15081 yycontrol without making too strong assumptions on the parser
15082 itself.
15083 * src/output.c (prepare_tokens): Use the real 0th value of
15084 token_translations instead of `0'.
15085 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15086 visible here.
15087 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15088 for the time being: %locations ought to provide it to yyerror.
15089
15090 2002-07-25 Akim Demaille <akim@epita.fr>
15091
15092 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15093 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15094 * tests/regression.at (Web2c Actions): Adjust.
15095
15096 2002-07-25 Akim Demaille <akim@epita.fr>
15097
15098 Stop storing rules from 1 to nrules + 1.
15099
15100 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15101 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15102 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15103 Iterate from 0 to nrules.
15104 Use rule_number_as_item_number and item_number_as_rule_number.
15105 Adjust to `derive' now containing possibly 0.
15106 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15107 Handle the `- 1' part in rule numbers from/to item numbers.
15108 * src/conflicts.c (log_resolution): Fix the message which reversed
15109 shift and reduce.
15110 * src/output.c (action_row): Initialize default_rule to -1.
15111 (token_actions): Adjust.
15112 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15113 expected output.
15114 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15115
15116 2002-07-25 Akim Demaille <akim@epita.fr>
15117
15118 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15119 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15120 (b4_c_knr_arg_decl): New.
15121 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15122 yyreport_parse_error.
15123
15124 2002-07-25 Akim Demaille <akim@epita.fr>
15125
15126 * data/yacc.c (yyreport_parse_error): New, extracted from...
15127 (yyparse): here.
15128 (yydestruct, yysymprint): Move above yyparse.
15129 Be K&R compliant.
15130
15131 2002-07-25 Akim Demaille <akim@epita.fr>
15132
15133 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15134 replace...
15135 (b4_sint_type, b4_uint_type): these.
15136 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15137 * tests/regression.at (Web2c Actions): Adjust.
15138
15139 2002-07-25 Akim Demaille <akim@epita.fr>
15140
15141 * src/gram.h (TIEM_NUMBER_MAX): New.
15142 (item_number_of_rule_number, rule_number_of_item_number): Rename
15143 as...
15144 (rule_number_as_item_number, item_number_as_rule_number): these.
15145 Adjust dependencies.
15146 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15147 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15148 (symbol_number_to_vector_number): New.
15149 (order): Of vector_number_t* type.
15150 (base_t, BASE_MAX, BASE_MIN): New.
15151 (froms, tos, width, pos, check): Of base_t type.
15152 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15153 (actrow): Of action_number_t type.
15154 (conflrow): Of unsigned int type.
15155 (table_ninf, base_ninf): New.
15156 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15157 (muscle_insert_int_table, muscle_insert_base_table)
15158 (muscle_insert_rule_number_table): New.
15159 (prepare_tokens): Output `toknum' as int_table.
15160 (action_row): Returns a rule_number_t.
15161 Use ACTION_MIN, not SHRT_MIN.
15162 (token_actions): yydefact is rule_number_t*.
15163 (table_ninf_remap): New.
15164 (pack_table): Use it for `base' and `table'.
15165 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15166 replaced with...
15167 (YYPACT_NINF, YYTABLE_NINF): these.
15168 (yypact, yytable): Compute their types instead of hard-coded
15169 `short'.
15170 * tests/regression.at (Web2c Actions): Adjust.
15171
15172 2002-07-19 Akim Demaille <akim@epita.fr>
15173
15174 * src/scan-gram.l (id): Can start with an underscore.
15175
15176 2002-07-16 Akim Demaille <akim@epita.fr>
15177
15178 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15179 Adjust all former `associativity' dependencies.
15180 * src/symtab.c (symbol_new): Default associativity is `undef', not
15181 `right'.
15182 (symbol_check_alias_consistence): Adjust.
15183
15184 2002-07-09 Akim Demaille <akim@epita.fr>
15185
15186 * doc/bison.texinfo: Properly set the ``header'' part.
15187 Use @dircategory ``GNU programming tools'' as per Texinfo's
15188 documentation.
15189 Use @copying.
15190
15191 2002-07-09 Akim Demaille <akim@epita.fr>
15192
15193 * lib/quotearg.h: Protect against multiple inclusions.
15194 * src/location.h (location_t): Add a `file' member.
15195 (LOCATION_RESET, LOCATION_PRINT): Adjust.
15196 * src/complain.c (warn_at, complain_at, fatal_at): Drop
15197 `error_one_per_line' support.
15198
15199 2002-07-09 Akim Demaille <akim@epita.fr>
15200
15201 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15202 * src/reader.c (lineno): Remove.
15203 Adjust all dependencies.
15204 (get_merge_function): Take a location and use complain_at.
15205 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15206 * tests/regression.at (Invalid inputs, Mixing %token styles):
15207 Adjust.
15208
15209 2002-07-09 Akim Demaille <akim@epita.fr>
15210
15211 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15212 recovery rule, and forbid extensions when --yacc.
15213 (gram_error): Use complain_at.
15214 * src/reader.c (reader): Exit if there were parse errors.
15215
15216 2002-07-09 Akim Demaille <akim@epita.fr>
15217
15218 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15219 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15220 Reported by R Blake <blakers@mac.com>.
15221
15222 2002-07-09 Akim Demaille <akim@epita.fr>
15223
15224 * data/yacc.c: Output the copyright notive in the header.
15225
15226 2002-07-03 Akim Demaille <akim@epita.fr>
15227
15228 * src/output.c (froms, tos): Are state_number_t.
15229 (save_column): sp, sp1, and sp2 are state_number_t.
15230 (prepare): Rename `final' as `final_state_number', `nnts' as
15231 `nterms_number', `nrules' as `rules_number', `nstates' as
15232 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15233 unused.
15234 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15235 * data/lalr1.cc (nsym_): Remove, unused.
15236
15237 2002-07-03 Akim Demaille <akim@epita.fr>
15238
15239 * src/lalr.h, src/lalr.c (goto_number_t): New.
15240 * src/lalr.c (goto_list_t): New.
15241 Propagate them.
15242 * src/nullable.c (rule_list_t): New.
15243 Propagate.
15244 * src/types.h: Remove.
15245
15246 2002-07-03 Akim Demaille <akim@epita.fr>
15247
15248 * src/closure.c (print_fderives): Use rule_rhs_print.
15249 * src/derives.c (print_derives): Use rule_rhs_print.
15250 (rule_list_t): New, replaces `shorts'.
15251 (set_derives): Add comments.
15252 * tests/sets.at (Nullable, Firsts): Adjust.
15253
15254 2002-07-03 Akim Demaille <akim@epita.fr>
15255
15256 * src/output.c (prepare_actions): Free `tally' and `width'.
15257 (prepare_actions): Allocate and free `order'.
15258 * src/symtab.c (symbols_free): Free `symbols'.
15259 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15260 * src/output.c (m4_invoke): Move to...
15261 * src/scan-skel.l: here.
15262 (<<EOF>>): Close yyout, and free its name.
15263
15264 2002-07-03 Akim Demaille <akim@epita.fr>
15265
15266 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15267
15268 * src/LR0.c (new_state): Merge into...
15269 (state_list_append): this.
15270 (new_states): Merge into...
15271 (generate_states): here.
15272 (set_states): Don't ensure a proper `errs' state member here, do it...
15273 * src/conflicts.c (conflicts_solve): here.
15274 * src/state.h, src/state.c: Comment changes.
15275 (state_t): Rename member `shifts' as `transitions'.
15276 Adjust all dependencies.
15277 (errs_new): For consistency, also take the values as argument.
15278 (errs_dup): Remove.
15279 (state_errs_set): New.
15280 (state_reductions_set, state_transitions_set): Assert that no
15281 previous value was assigned.
15282 (state_free): New.
15283 (states_free): Use it.
15284 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15285 temporary storage: use `errs' and `nerrs' as elsewhere.
15286 (set_conflicts): Allocate and free this `errs'.
15287
15288 2002-07-02 Akim Demaille <akim@epita.fr>
15289
15290 * lib/libiberty.h: New.
15291 * lib: Update the bitset implementation from upstream.
15292 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15293 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15294 * src/main.c: Adjust bitset stats calls.
15295
15296 2002-07-01 Paul Eggert <eggert@twinsun.com>
15297
15298 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15299 char, so that negative chars don't collide with $.
15300
15301 2002-06-30 Akim Demaille <akim@epita.fr>
15302
15303 Have the GLR tests be `warning' checked, and fix the warnings.
15304
15305 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15306 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15307 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15308 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15309 (yyaddDeferredAction): static.
15310 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15311 (yyreportParseError): yyprefix is const.
15312 yytokenp is used only when verbose.
15313 (yy__GNUC__): Replace with __GNUC__.
15314 (yypdumpstack): yyi is size_t.
15315 (yypreference): Un-yy local variables and arguments, to avoid
15316 clashes with `yyr1'. Anyway, we are not in the user name space.
15317 (yytname_size): be an int, as is compared with ints.
15318 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15319 Use them.
15320 * tests/cxx-gram.at: Use quotation to protect $1.
15321 Use AT_COMPILE to enable warnings hunts.
15322 Prototype yylex and yyerror.
15323 `Use' argc.
15324 Include `string.h', not `strings.h'.
15325 Produce and prototype stmtMerge only when used.
15326 yylex takes a location.
15327
15328 2002-06-30 Akim Demaille <akim@epita.fr>
15329
15330 We spend a lot of time in quotearg, in particular when --verbose.
15331
15332 * src/symtab.c (symbol_get): Store a quoted version of the key.
15333 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15334 Adjust all callers.
15335
15336 2002-06-30 Akim Demaille <akim@epita.fr>
15337
15338 * src/state.h (reductions_t): Rename member `nreds' as num.
15339 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15340 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15341
15342 2002-06-30 Akim Demaille <akim@epita.fr>
15343
15344 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15345 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15346 (shifts_to): Rename as...
15347 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15348 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15349 (TRANSITION_IS_DISABLED, transitions_to): these.
15350
15351 2002-06-30 Akim Demaille <akim@epita.fr>
15352
15353 * src/print.c (print_shifts, print_gotos): Merge into...
15354 (print_transitions): this.
15355 (print_transitions, print_errs, print_reductions): Align the
15356 lookaheads columns.
15357 (print_core, print_transitions, print_errs, print_state,
15358 print_grammar): Output empty lines separator before, not after.
15359 (state_default_rule_compute): Rename as...
15360 (state_default_rule): this.
15361 * tests/conflicts.at (Defaulted Conflicted Reduction),
15362 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15363 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15364
15365 2002-06-30 Akim Demaille <akim@epita.fr>
15366
15367 Display items as we display rules.
15368
15369 * src/gram.h, src/gram.c (rule_lhs_print): New.
15370 * src/gram.c (grammar_rules_partial_print): Use it.
15371 * src/print.c (print_core): Likewise.
15372 * tests/conflicts.at (Defaulted Conflicted Reduction),
15373 (Unresolved SR Conflicts): Adjust.
15374 (Unresolved SR Conflicts): Adjust and rename as...
15375 (Resolved SR Conflicts): this, as was meant.
15376 * tests/regression.at (Web2c Report): Adjust.
15377
15378 2002-06-30 Akim Demaille <akim@epita.fr>
15379
15380 * src/print.c (state_default_rule_compute): New, extracted from...
15381 (print_reductions): here.
15382 Pessimize, but clarify the code.
15383 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15384
15385 2002-06-30 Akim Demaille <akim@epita.fr>
15386
15387 * src/output.c (action_row): Let default_rule be always a rule
15388 number.
15389
15390 2002-06-30 Akim Demaille <akim@epita.fr>
15391
15392 * src/closure.c (print_firsts, print_fderives, closure):
15393 Use BITSET_EXECUTE.
15394 * src/lalr.c (lookaheads_print): Likewise.
15395 * src/state.c (state_rule_lookaheads_print): Likewise.
15396 * src/print_graph.c (print_core): Likewise.
15397 * src/print.c (print_reductions): Likewise.
15398 * src/output.c (action_row): Likewise.
15399 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15400
15401 2002-06-30 Akim Demaille <akim@epita.fr>
15402
15403 * src/print_graph.c: Use report_flag.
15404
15405 2002-06-30 Akim Demaille <akim@epita.fr>
15406
15407 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15408 to...
15409 * src/relation.h, src/relation.c (traverse, relation_digraph)
15410 (relation_print, relation_transpose): New.
15411
15412 2002-06-30 Akim Demaille <akim@epita.fr>
15413
15414 * src/state.h, src/state.c (shifts_to): New.
15415 * src/lalr.c (build_relations): Use it.
15416
15417 2002-06-30 Akim Demaille <akim@epita.fr>
15418
15419 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15420 (item_number_of_rule_number, rule_number_of_item_number): New.
15421 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15422 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15423 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15424 Propagate their use.
15425 Much remains to be done, in particular wrt `shorts' from types.h.
15426
15427 2002-06-30 Akim Demaille <akim@epita.fr>
15428
15429 * src/symtab.c (symbol_new): Initialize the `printer' member.
15430
15431 2002-06-30 Akim Demaille <akim@epita.fr>
15432
15433 * src/LR0.c (save_reductions): Remove, replaced by...
15434 * src/state.h, src/state.c (state_reductions_set): New.
15435 (reductions, errs): Rename as...
15436 (reductions_t, errs_t): these.
15437 Adjust all dependencies.
15438
15439 2002-06-30 Akim Demaille <akim@epita.fr>
15440
15441 * src/LR0.c (state_list_t, state_list_append): New.
15442 (first_state, last_state): Now symbol_list_t.
15443 (this_state): Remove.
15444 (new_itemsets, append_states, save_reductions): Take a state_t as
15445 argument.
15446 (set_states, generate_states): Adjust.
15447 (save_shifts): Remove, replaced by...
15448 * src/state.h, src/state.c (state_shifts_set): New.
15449 (shifts): Rename as...
15450 (shifts_t): this.
15451 Adjust all dependencies.
15452 * src/state.h (state_t): Remove the `next' member.
15453
15454 2002-06-30 Akim Demaille <akim@epita.fr>
15455
15456 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15457 escaped in slot 0.
15458
15459 2002-06-30 Akim Demaille <akim@epita.fr>
15460
15461 Use hash.h for the state hash table.
15462
15463 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15464 (allocate_storage): Use state_hash_new.
15465 (free_storage): Use state_hash_free.
15466 (new_state, get_state): Adjust.
15467 * src/lalr.h, src/lalr.c (states): Move to...
15468 * src/states.h (state_t): Remove the `link' member, no longer
15469 used.
15470 * src/states.h, src/states.c: here.
15471 (state_hash_new, state_hash_free, state_hash_lookup)
15472 (state_hash_insert, states_free): New.
15473 * src/states.c (state_table, state_compare, state_hash): New.
15474 * src/output.c (output_actions): Do not free states now, since we
15475 still need to know the final_state number in `prepare', called
15476 afterwards. Do it...
15477 * src/main.c (main): here: call states_free after `output'.
15478
15479 2002-06-30 Akim Demaille <akim@epita.fr>
15480
15481 * src/state.h, src/state.c (state_new): New, extracted from...
15482 * src/LR0.c (new_state): here.
15483 * src/state.h (STATE_ALLOC): Move to...
15484 * src/state.c: here.
15485 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15486 * src/state.h, src/state.c: here.
15487
15488 2002-06-30 Akim Demaille <akim@epita.fr>
15489
15490 * src/reader.c (gensym): Rename as...
15491 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15492 (getsym): Rename as...
15493 (symbol_get): this.
15494
15495 2002-06-30 Akim Demaille <akim@epita.fr>
15496
15497 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15498 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15499 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15500 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15501
15502 2002-06-30 Akim Demaille <akim@epita.fr>
15503
15504 Make the test suite pass with warnings checked.
15505
15506 * tests/actions.at (Printers and Destructors): Improve.
15507 Avoid unsigned vs. signed issues.
15508 * tests/calc.at: Don't exercise the scanner here, do it...
15509 * tests/input.at (Torturing the Scanner): here.
15510
15511 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15512
15513 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
15514 reorganize first lines parallel to yacc.c.
15515
15516 2002-06-28 Akim Demaille <akim@epita.fr>
15517
15518 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15519 (b4_token_enum, b4_token_defines): New, factored from...
15520 * data/lalr1.cc, data/yacc.c, glr.c: here.
15521
15522 2002-06-28 Akim Demaille <akim@epita.fr>
15523
15524 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15525 unused variables.
15526 * src/output.c (merger_output): static.
15527
15528 2002-06-28 Akim Demaille <akim@epita.fr>
15529
15530 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
15531 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15532 pacify GCC.
15533 * src/output.c (save_row): Initialize all the variables to pacify GCC.
15534
15535 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15536
15537 Accumulated changelog for new GLR parsing features.
15538
15539 * src/conflicts.c (count_total_conflicts): Change name to
15540 conflicts_total_count.
15541 * src/conflicts.h: Ditto.
15542 * src/output.c (token_actions): Use the new name.
15543 (output_conflicts): Change conflp => conflict_list_heads, and
15544 confl => conflict_list for better readability.
15545 * data/glr.c: Use the new names.
15546 * NEWS: Add self to GLR announcement.
15547
15548 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15549
15550 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15551 Akim Demaille.
15552
15553 * data/bison.glr: Change name to glr.c
15554 * data/glr.c: Renamed from bison.glr.
15555 * data/Makefile.am: Add glr.c
15556
15557 * src/getargs.c:
15558
15559 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
15560 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
15561
15562 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15563
15564 * data/bison.glr: Be sure to restore the
15565 current #line when returning to the skeleton contents after having
15566 exposed the input file's #line.
15567
15568 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15569
15570 * data/bison.glr: Bring up to date with changes to bison.simple.
15571
15572 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15573
15574 * data/bison.glr: Correct definitions that use b4_prefix.
15575 Various reformatting.
15576 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
15577 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
15578 yytokenp argument; now part of stack.
15579 (yychar): Define to behave as documented.
15580 (yyclearin): Ditto.
15581
15582 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15583
15584 * src/reader.h: Add declaration for free_merger_functions.
15585
15586 * src/reader.c (merge_functions): New variable.
15587 (get_merge_function): New function.
15588 (free_merger_functions): New function.
15589 (readgram): Check for %prec that is not followed by a symbol.
15590 Handle %dprec and %merge declarations.
15591 (packgram): Initialize dprec and merger fields in rules array.
15592
15593 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
15594 conflict_list_cnt, conflict_list_free): New variables.
15595 (table_grow): Also grow conflict_table.
15596 (prepare_rules): Output dprec and merger tables.
15597 (conflict_row): New function.
15598 (action_row): Output conflict lists for GLR parser. Don't use
15599 default reduction in conflicted states for GLR parser so that there
15600 are spaces for the conflict lists.
15601 (save_row): Also save conflict information.
15602 (token_actions): Allocate conflict list.
15603 (merger_output): New function.
15604 (pack_vector): Pack conflict table, too.
15605 (output_conflicts): New function to output yyconflp and yyconfl.
15606 (output_check): Allocate conflict_tos.
15607 (output_actions): Output conflict tables, also.
15608 (output_skeleton): Output b4_mergers definition.
15609 (prepare): Output b4_max_rhs_length definition.
15610 Use 'bison.glr' as default skeleton for GLR parsers.
15611
15612 * src/gram.c (glr_parser): New flag.
15613 (grammar_free): Call free_merger_functions.
15614
15615 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
15616 all pairs of conflicting reductions, rather than just all tokens
15617 causing conflicts. Needed to size conflict tables.
15618 (conflicts_output): Modify call to count_rr_conflicts for new
15619 interface.
15620 (conflicts_print): Ditto.
15621 (count_total_conflicts): New function.
15622
15623 * src/reader.h (merger_list): New type.
15624 (merge_functions): New variable.
15625
15626 * src/lex.h (tok_dprec, tok_merge): New token types.
15627
15628 * src/gram.h (rule_s): Add dprec and merger fields.
15629 (glr_parser): New flag.
15630
15631 * src/conflicts.h (count_total_conflicts): New function.
15632
15633 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
15634
15635 * doc/bison.texinfo (Generalized LR Parsing): New section.
15636 (GLR Parsers): New section.
15637 (Language and Grammar): Mention GLR parsing.
15638 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
15639 Correct typo ("tge" -> "the").
15640
15641 * data/bison.glr: New skeleton for GLR parsing.
15642
15643 * tests/cxx-gram.at: New tests for GLR parsing.
15644
15645 * tests/testsuite.at: Include cxx-gram.at.
15646
15647 * tests/Makefile.am: Add cxx-gram.at.
15648
15649 * src/parse-gram.y:
15650
15651 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
15652
15653 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
15654
15655 2002-06-27 Akim Demaille <akim@epita.fr>
15656
15657 * src/options.h, src/options.c: Remove.
15658 * src/getargs.c (short_options, long_options): New.
15659
15660 2002-06-27 Akim Demaille <akim@epita.fr>
15661
15662 * data/bison.simple, data/bison.c++: Rename as...
15663 * data/yacc.c, data/lalr1.cc: these.
15664 * doc/bison.texinfo (Environment Variables): Remove.
15665
15666 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
15667
15668 * src/getargs.c (report_argmatch): Initialize strtok().
15669
15670 2002-06-20 Akim Demaille <akim@epita.fr>
15671
15672 * data/bison.simple (b4_symbol_actions): New, replaces...
15673 (b4_symbol_destructor, b4_symbol_printer): these.
15674 (yysymprint): Be sure to call YYPRINT only for tokens, and using
15675 user token numbers.
15676
15677 2002-06-20 Akim Demaille <akim@epita.fr>
15678
15679 * data/bison.simple (yydestructor): Rename as...
15680 (yydestruct): this.
15681
15682 2002-06-20 Akim Demaille <akim@epita.fr>
15683
15684 * src/symtab.h, src/symtab.c (symbol_type_set)
15685 (symbol_destructor_set, symbol_precedence_set): The location is
15686 the last argument.
15687 Adjust all callers.
15688
15689 2002-06-20 Akim Demaille <akim@epita.fr>
15690
15691 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
15692 internals.
15693 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
15694 Takes a location.
15695 * src/symtab.h, src/symtab.c (symbol_class_set)
15696 (symbol_user_token_number_set): Likewise.
15697 Adjust all callers.
15698 Promote complain_at.
15699 * tests/input.at (Type Clashes): Adjust.
15700
15701 2002-06-20 Akim Demaille <akim@epita.fr>
15702
15703 * data/bison.simple (YYLEX): Fix the declaration when
15704 %pure-parser.
15705
15706 2002-06-20 Akim Demaille <akim@epita.fr>
15707
15708 * data/bison.simple (yysymprint): Don't print the token number,
15709 just its name.
15710 * tests/actions.at (Destructors): Rename as...
15711 (Printers and Destructors): this.
15712 Also exercise %printer.
15713
15714 2002-06-20 Akim Demaille <akim@epita.fr>
15715
15716 * data/bison.simple (YYDSYMPRINT): New.
15717 Use it to remove many of the #if YYDEBUG/if (yydebug).
15718
15719 2002-06-20 Akim Demaille <akim@epita.fr>
15720
15721 * src/symtab.h, src/symtab.c (symbol_t): printer and
15722 printer_location are new members.
15723 (symbol_printer_set): New.
15724 * src/parse-gram.y (PERCENT_PRINTER): New token.
15725 Handle its associated rule.
15726 * src/scan-gram.l: Adjust.
15727 (handle_destructor_at, handle_destructor_dollar): Rename as...
15728 (handle_symbol_code_at, handle_symbol_code_dollar): these.
15729 * src/output.c (symbol_printers_output): New.
15730 (output_skeleton): Call it.
15731 * data/bison.simple (yysymprint): New. Cannot be named yyprint
15732 since there are already many grammar files with a user `yyprint'.
15733 Replace the calls to YYPRINT to calls to yysymprint.
15734 * tests/calc.at: Adjust.
15735 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
15736 taking advantage of parser very internal details (stack size!).
15737
15738 2002-06-20 Akim Demaille <akim@epita.fr>
15739
15740 * src/scan-gram.l: Complete the scanner with the missing patterns
15741 to pacify Flex.
15742 Use `quote' and `symbol_tag_get' where appropriate.
15743
15744 2002-06-19 Akim Demaille <akim@epita.fr>
15745
15746 * tests/actions.at (Destructors): Augment to test locations.
15747 * data/bison.simple (yydestructor): Pass it the current location
15748 if locations are enabled.
15749 Prototype only when __STDC__ or C++.
15750 Change the argument names to move into the yy name space: there is
15751 user code here.
15752
15753 2002-06-19 Akim Demaille <akim@epita.fr>
15754
15755 * data/bison.simple (b4_pure_if): New.
15756 Use it instead of #ifdef YYPURE.
15757
15758 2002-06-19 Akim Demaille <akim@epita.fr>
15759
15760 * data/bison.simple (b4_location_if): New.
15761 Use it instead of #ifdef YYLSP_NEEDED.
15762
15763 2002-06-19 Akim Demaille <akim@epita.fr>
15764
15765 Prepare @$ in %destructor, but currently don't bind it in the
15766 skeleton, as %location use is not cleaned up yet.
15767
15768 * src/scan-gram.l (handle_dollar, handle_destructor_at)
15769 (handle_action_at): New.
15770 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
15771 a braced_code_t and a location as additional arguments.
15772 (handle_destructor_dollar): Instead of requiring `b4_eval', just
15773 unquote one when outputting `b4_dollar_dollar'.
15774 Adjust callers.
15775 * data/bison.simple (b4_eval): Remove.
15776 (b4_symbol_destructor): Adjust.
15777 * tests/input.at (Invalid @n): Adjust.
15778
15779 2002-06-19 Zack Weinberg <zack@codesourcery.com>
15780
15781 * doc/bison.texinfo: Document ability to have multiple
15782 prologue sections.
15783
15784 2002-06-18 Akim Demaille <akim@epita.fr>
15785
15786 * src/files.c (compute_base_names): When computing the output file
15787 names from the input file name, strip the directory part.
15788
15789 2002-06-18 Akim Demaille <akim@epita.fr>
15790
15791 * data/bison.simple.new: Comment changes.
15792 Reported by Andreas Schwab.
15793
15794 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
15795
15796 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
15797 there are no `label `yyoverflowlab' defined but not used' warnings
15798 when yyoverflow is defined.
15799
15800 2002-06-18 Akim Demaille <akim@epita.fr>
15801
15802 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
15803 new member.
15804 (symbol_destructor_set): Adjust.
15805 * src/output.c (symbol_destructors_output): Output the destructor
15806 locations.
15807 Output the symbol name.
15808 * data/bison.simple (b4_symbol_destructor): Adjust.
15809
15810 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
15811 and Akim Demaille <akim@epita.fr>
15812
15813 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
15814 what's left on the stack when the error recovery hits EOF.
15815 * tests/actions.at (Destructors): Complete to exercise this case.
15816
15817 2002-06-17 Akim Demaille <akim@epita.fr>
15818
15819 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
15820 arguments is really empty, not only equal to `[]'.
15821 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
15822 member.
15823 (symbol_destructor_set): New.
15824 * src/output.c (symbol_destructors_output): New.
15825 * src/reader.h (brace_code_t, current_braced_code): New.
15826 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
15827 (handle_dollar): Rename as...
15828 (handle_action_dollar): this.
15829 (handle_destructor_dollar): New.
15830 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
15831 (grammar_declaration): Use it.
15832 * data/bison.simple (yystos): Is always defined.
15833 (yydestructor): New.
15834 * tests/actions.at (Destructors): New.
15835 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
15836
15837 2002-06-17 Akim Demaille <akim@epita.fr>
15838
15839 * src/symlist.h, src/symlist.c (symbol_list_length): New.
15840 * src/scan-gram.l (handle_dollar, handle_at): Compute the
15841 rule_length only when needed.
15842 * src/output.c (actions_output, token_definitions_output): Output
15843 the full M4 block.
15844 * src/symtab.c: Don't access directly to the symbol tag, use
15845 symbol_tag_get.
15846 * src/parse-gram.y: Use symbol_list_free.
15847
15848 2002-06-17 Akim Demaille <akim@epita.fr>
15849
15850 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
15851 (symbol_list_prepend, get_type_name): Move to...
15852 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
15853 (symbol_list_prepend, symbol_list_n_type_name_get): here.
15854 Adjust all callers.
15855 (symbol_list_free): New.
15856 * src/scan-gram.l (handle_dollar): Takes a location.
15857 * tests/input.at (Invalid $n): Adjust.
15858
15859 2002-06-17 Akim Demaille <akim@epita.fr>
15860
15861 * src/reader.h, src/reader.c (symbol_list_new): Export it.
15862 (symbol_list_prepend): New.
15863 * src/parse-gram.y (%union): `list' is a new member.
15864 (symbols.1): New, replaces...
15865 (terms_to_prec.1, nterms_to_type.1): these.
15866 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
15867 Take a location as additional argument.
15868 Adjust all callers.
15869
15870 2002-06-15 Akim Demaille <akim@epita.fr>
15871
15872 * src/parse-gram.y: Move %token in the declaration section so that
15873 we don't depend upon CVS Bison.
15874
15875 2002-06-15 Akim Demaille <akim@epita.fr>
15876
15877 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
15878 * src/print.c (print_core): Use it.
15879
15880 2002-06-15 Akim Demaille <akim@epita.fr>
15881
15882 * src/conflicts.c (log_resolution): Accept the rule involved in
15883 the sr conflicts instead of the lookahead number that points to
15884 that rule.
15885 (flush_reduce): Accept the current lookahead vector as argument,
15886 instead of the index in LA.
15887 (resolve_sr_conflict): Accept the current number of lookahead
15888 bitset to consider for the STATE, instead of the index in LA.
15889 (set_conflicts): Adjust.
15890 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
15891
15892 2002-06-15 Akim Demaille <akim@epita.fr>
15893
15894 * src/state.h (state_t): Replace the `lookaheadsp' member, a
15895 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
15896 Adjust all dependencies.
15897 * src/lalr.c (initialize_lookaheads): Split into...
15898 (states_lookaheads_count, states_lookaheads_initialize): these.
15899 (lalr): Adjust.
15900
15901 2002-06-15 Akim Demaille <akim@epita.fr>
15902
15903 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
15904 out of...
15905 (grammar_rules_print): here.
15906 * src/reduce.c (reduce_output): Use it.
15907 * tests/reduce.at (Useless Rules, Reduced Automaton)
15908 (Underivable Rules): Adjust.
15909
15910 2002-06-15 Akim Demaille <akim@epita.fr>
15911
15912 Copy BYacc's nice way to report the grammar.
15913
15914 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
15915 New.
15916 Don't print the rules' location, it is confusing and useless.
15917 (rule_print): Use grammar_rhs_print.
15918 * src/print.c (print_grammar): Use grammar_rules_print.
15919
15920 2002-06-15 Akim Demaille <akim@epita.fr>
15921
15922 Complete and rationalize `useless thing' warnings.
15923
15924 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
15925 (symbol_tag_print): New.
15926 Use them everywhere in place of accessing directly the tag member.
15927 * src/gram.h, src/gram.c (rule_print): New.
15928 Use it where a rule used to be printed `by hand'.
15929 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
15930 (reduce_grammar_tables): Report the useless rules.
15931 (reduce_print): Useless things are a warning, not an error.
15932 Report it as such.
15933 * tests/reduce.at (Useless Nonterminals, Useless Rules):
15934 (Reduced Automaton, Underivable Rules): Adjust.
15935 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
15936 * tests/conflicts.at (Unresolved SR Conflicts)
15937 (Solved SR Conflicts): Adjust.
15938
15939 2002-06-15 Akim Demaille <akim@epita.fr>
15940
15941 Let symbols have a location.
15942
15943 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
15944 (getsym): Adjust.
15945 Adjust all callers.
15946 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
15947 Use location_t, not int.
15948 * src/symtab.c (symbol_check_defined): Take advantage of the
15949 location.
15950 * tests/regression.at (Invalid inputs): Adjust.
15951
15952 2002-06-15 Akim Demaille <akim@epita.fr>
15953
15954 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
15955 (input): Don't try to initialize yylloc here, do it in the
15956 scanner.
15957 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
15958 * src/gram.h (rule_t): Change line and action_line into location
15959 and action_location, of location_t type.
15960 Adjust all dependencies.
15961 * src/location.h, src/location.c (empty_location): New.
15962 * src/reader.h, src/reader.c (grammar_start_symbol_set)
15963 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
15964 (grammar_current_rule_symbol_append)
15965 (grammar_current_rule_action_append): Expect a location as argument.
15966 * src/reader.c (grammar_midrule_action): Adjust to attach an
15967 action's location as dummy symbol location.
15968 * src/symtab.h, src/symtab.c (startsymbol_location): New.
15969 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
15970 the line numbers.
15971
15972 2002-06-14 Akim Demaille <akim@epita.fr>
15973
15974 Grammar declarations may be found in the grammar section.
15975
15976 * src/parse-gram.y (rules_or_grammar_declaration): New.
15977 (declarations): Each declaration may end with a semicolon, not
15978 just...
15979 (grammar_declaration): `"%union"'.
15980 (grammar): Branch to rules_or_grammar_declaration.
15981
15982 2002-06-14 Akim Demaille <akim@epita.fr>
15983
15984 * src/main.c (main): Invoke scanner_free.
15985
15986 2002-06-14 Akim Demaille <akim@epita.fr>
15987
15988 * src/output.c (m4_invoke): Extracted from...
15989 (output_skeleton): here.
15990 Free tempfile.
15991
15992 2002-06-14 Akim Demaille <akim@epita.fr>
15993
15994 * src/parse-gram.y (directives, directive, gram)
15995 (grammar_directives, precedence_directives, precedence_directive):
15996 Rename as...
15997 (declarations, declaration, grammar, grammar_declaration)
15998 (precedence_declaration, precedence_declarator): these.
15999 (symbol_declaration): New.
16000
16001 2002-06-14 Akim Demaille <akim@epita.fr>
16002
16003 * src/files.c (action_obstack): Remove, unused.
16004 (output_obstack): Remove it, and all its dependencies, as it is no
16005 longer needed.
16006 * src/reader.c (epilogue_set): Build the epilogue in the
16007 muscle_obstack.
16008 * src/output.h, src/output.c (muscle_obstack): Move to...
16009 * src/muscle_tab.h, src/muscle_tab.h: here.
16010 (muscle_init): Initialize muscle_obstack.
16011 (muscle_free): New.
16012 * src/main.c (main): Call it.
16013
16014 2002-06-14 Akim Demaille <akim@epita.fr>
16015
16016 * src/location.h: New, extracted from...
16017 * src/reader.h: here.
16018 * src/Makefile.am (noinst_HEADERS): Merge into
16019 (bison_SOURCES): this.
16020 Add location.h.
16021 * src/parse-gram.y: Use location_t instead of Bison's.
16022 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16023 Use location_t instead of ints.
16024
16025 2002-06-14 Akim Demaille <akim@epita.fr>
16026
16027 * data/bison.simple, data/bison.c++: Be sure to restore the
16028 current #line when returning to the skeleton contents after having
16029 exposed the input file's #line.
16030
16031 2002-06-12 Akim Demaille <akim@epita.fr>
16032
16033 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16034 eager.
16035 * tests/actions.at (Exotic Dollars): New.
16036
16037 2002-06-12 Akim Demaille <akim@epita.fr>
16038
16039 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16040 ['"/] too eagerly.
16041 * tests/input.at (Torturing the Scanner): New.
16042
16043 2002-06-11 Akim Demaille <akim@epita.fr>
16044
16045 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16046 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16047 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16048 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16049 * src/reader.c (reader): Use it.
16050
16051 2002-06-11 Akim Demaille <akim@epita.fr>
16052
16053 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16054 Adjust all callers.
16055 (scanner_last_string_free): New.
16056
16057 2002-06-11 Akim Demaille <akim@epita.fr>
16058
16059 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16060 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16061 (last_string, YY_OBS_FREE): New.
16062 Use them when returning an ID.
16063
16064 2002-06-11 Akim Demaille <akim@epita.fr>
16065
16066 Have Bison grammars parsed by a Bison grammar.
16067
16068 * src/reader.c, src/reader.h (prologue_augment): New.
16069 * src/reader.c (copy_definition): Remove.
16070
16071 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16072 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16073 (grammar_current_rule_prec_set, grammar_current_rule_check)
16074 (grammar_current_rule_symbol_append)
16075 (grammar_current_rule_action_append): Export.
16076 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16077 (symbol_list_action_append): Remove.
16078 Hook the routines from reader.
16079 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16080 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16081
16082 * src/reader.c (read_declarations): Remove, unused.
16083
16084 * src/parse-gram.y: Handle the epilogue.
16085 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16086 (grammar_start_symbol_set): this.
16087 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16088 * src/reader.c (readgram): Remove, unused.
16089 (reader): Adjust to insert eoftoken and axiom where appropriate.
16090
16091 * src/reader.c (copy_dollar): Replace with...
16092 * src/scan-gram.h (handle_dollar): this.
16093 * src/parse-gram.y: Remove `%thong'.
16094
16095 * src/reader.c (copy_at): Replace with...
16096 * src/scan-gram.h (handle_at): this.
16097
16098 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16099 New.
16100
16101 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16102 time being.
16103
16104 * src/reader.h, src/reader.c (grammar_rule_end): New.
16105
16106 * src/parse.y (current_type, current_class): New.
16107 Implement `%nterm', `%token' support.
16108 Merge `%term' into `%token'.
16109 (string_as_id): New.
16110 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16111 type name.
16112
16113 * src/parse-gram.y: Be sure to handle properly the beginning of
16114 rules.
16115
16116 * src/parse-gram.y: Handle %type.
16117 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16118
16119 * src/parse-gram.y: More directives support.
16120 * src/options.c: No longer handle source directives.
16121
16122 * src/parse-gram.y: Fix %output.
16123
16124 * src/parse-gram.y: Handle %union.
16125 Use the prologue locations.
16126 * src/reader.c (parse_union_decl): Remove.
16127
16128 * src/reader.h, src/reader.c (epilogue_set): New.
16129 * src/parse-gram.y: Use it.
16130
16131 * data/bison.simple, data/bison.c++: b4_stype is now either not
16132 defined, then default to int, or to the contents of %union,
16133 without `union' itself.
16134 Adjust.
16135 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16136
16137 * src/output.c (actions_output): Don't output braces, as they are
16138 already handled by the scanner.
16139
16140 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16141 characters to themselves.
16142
16143 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16144 that the epilogue has a proper #line.
16145
16146 * src/parse-gram.y: Handle precedence/associativity.
16147
16148 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16149 a terminal.
16150 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16151 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16152 at all to define terminals that cannot be emitted.
16153
16154 * src/scan-gram.l: Escape M4 characters.
16155
16156 * src/scan-gram.l: Working properly with escapes in user
16157 strings/characters.
16158
16159 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16160 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16161 grammar.
16162 Use more modest sizes, as for the time being the parser does not
16163 release memory, and therefore the process swallows a huge amount
16164 of memory.
16165
16166 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16167 stricter %token grammar.
16168
16169 * src/symtab.h (associativity): Add `undef_assoc'.
16170 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16171 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16172
16173 * tests/regression.at (Invalid %directive): Remove, as it is now
16174 meaningless.
16175 (Invalid inputs): Adjust to the new error messages.
16176 (Token definitions): The new grammar doesn't allow too many
16177 eccentricities.
16178
16179 * src/lex.h, src/lex.c: Remove.
16180 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16181 (copy_character, copy_string2, copy_string, copy_identifier)
16182 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16183 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16184 (parse_action): Remove.
16185 * po/POTFILES.in: Adjust.
16186
16187 2002-06-11 Akim Demaille <akim@epita.fr>
16188
16189 * src/reader.c (parse_action): Don't store directly into the
16190 rule's action member: return the action as a string.
16191 Don't require `rule_length' as an argument: compute it.
16192 (grammar_current_rule_symbol_append)
16193 (grammar_current_rule_action_append): New, eved out from
16194 (readgram): here.
16195 Remove `action_flag', `rulelength', unused now.
16196
16197 2002-06-11 Akim Demaille <akim@epita.fr>
16198
16199 * src/reader.c (grammar_current_rule_prec_set).
16200 (grammar_current_rule_check): New, eved out from...
16201 (readgram): here.
16202 Remove `xaction', `first_rhs': useless.
16203 * tests/input.at (Type clashes): New.
16204 * tests/existing.at (GNU Cim Grammar): Adjust.
16205
16206 2002-06-11 Akim Demaille <akim@epita.fr>
16207
16208 * src/reader.c (grammar_midrule_action): New, Eved out from
16209 (readgram): here.
16210
16211 2002-06-11 Akim Demaille <akim@epita.fr>
16212
16213 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16214 New.
16215 (readgram): Use them as replacement of inlined code, crule and
16216 crule1.
16217
16218 2002-06-11 Akim Demaille <akim@epita.fr>
16219
16220 * src/reader.c (grammar_end, grammar_symbol_append): New.
16221 (readgram): Use them.
16222 Make the use of `p' as local as possible.
16223
16224 2002-06-10 Akim Demaille <akim@epita.fr>
16225
16226 GCJ's parser requires the tokens to be defined before the prologue.
16227
16228 * data/bison.simple: Output the token definition before the user's
16229 prologue.
16230 * tests/regression.at (Braces parsing, Duplicate string)
16231 (Mixing %token styles): Check the output from bison.
16232 (Early token definitions): New.
16233
16234 2002-06-10 Akim Demaille <akim@epita.fr>
16235
16236 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16237 assigning twice the same user number to a token, so that we can
16238 use it in...
16239 * src/lex.c (lex): here.
16240 Also use `symbol_class_set' instead of hand written code.
16241 * src/reader.c (parse_assoc_decl): Likewise.
16242
16243 2002-06-10 Akim Demaille <akim@epita.fr>
16244
16245 * src/symtab.c, src/symtab.c (symbol_class_set)
16246 (symbol_user_token_number_set): New.
16247 * src/reader.c (parse_token_decl): Use them.
16248 Use a switch instead of ifs.
16249 Use a single argument.
16250
16251 2002-06-10 Akim Demaille <akim@epita.fr>
16252
16253 Remove `%thong' support as it is undocumented, unused, duplicates
16254 `%token's job, and creates useless e-mail traffic with people who
16255 want to know what it is, why it is undocumented, unused, and
16256 duplicates `%token's job.
16257
16258 * src/reader.c (parse_thong_decl): Remove.
16259 * src/options.c (option_table): Remove "thong".
16260 * src/lex.h (tok_thong): Remove.
16261
16262 2002-06-10 Akim Demaille <akim@epita.fr>
16263
16264 * src/symtab.c, src/symtab.c (symbol_type_set)
16265 (symbol_precedence_set): New.
16266 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16267 (value_components_used): Remove, unused.
16268
16269 2002-06-09 Akim Demaille <akim@epita.fr>
16270
16271 Move symbols handling code out of the reader.
16272
16273 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16274 (axiom): Move to...
16275 * src/symtab.h, src/symtab.c: here.
16276
16277 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16278 * src/reader.c (startval): Rename as...
16279 * src/symtab.h, src/symtab.c (startsymbol): this.
16280 * src/reader.c: Adjust.
16281
16282 * src/reader.c (symbol_check_defined, symbol_make_alias)
16283 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16284 (token_translations_init)
16285 Move to...
16286 * src/symtab.c: here.
16287 * src/reader.c (packsymbols): Move to...
16288 * src/symtab.h, src/symtab.c (symbols_pack): here.
16289 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16290 argument.
16291
16292 2002-06-03 Akim Demaille <akim@epita.fr>
16293
16294 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16295 then statements.
16296
16297 2002-06-03 Akim Demaille <akim@epita.fr>
16298
16299 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16300 structs with non literals.
16301 * src/scan-skel.l: never-interactive.
16302 * src/conflicts.c (enum conflict_resolution_e): No trailing
16303 comma.
16304 * src/getargs.c (usage): Split long literal strings.
16305 Reported by Hans Aberg.
16306
16307 2002-05-28 Akim Demaille <akim@epita.fr>
16308
16309 * data/bison.c++: Use C++ ostreams.
16310 (cdebug_): New member.
16311
16312 2002-05-28 Akim Demaille <akim@epita.fr>
16313
16314 * src/output.c (output_skeleton): Be sure to allocate enough room
16315 for `/' _and_ for `\0' in full_skeleton.
16316
16317 2002-05-28 Akim Demaille <akim@epita.fr>
16318
16319 * data/bison.c++: Catch up with bison.simple:
16320 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16321 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16322 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16323 and popping traces.
16324
16325 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16326
16327 * src/output.c (output_skeleton): Put an explicit path in front of
16328 the skeleton file name, rather than relying on the -I directory,
16329 to partially alleviate effects of having a skeleton file lying around
16330 in the current directory.
16331
16332 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16333
16334 * src/conflicts.c (log_resolution): Correct typo:
16335 obstack_printf should be obstack_fgrow1.
16336
16337 2002-05-26 Akim Demaille <akim@epita.fr>
16338
16339 * src/state.h (state_t): `solved_conflicts' is a new member.
16340 * src/LR0.c (new_state): Set it to 0.
16341 * src/conflicts.h, src/conflicts.c (print_conflicts)
16342 (free_conflicts, solve_conflicts): Rename as...
16343 (conflicts_print, conflicts_free, conflicts_solve): these.
16344 Adjust callers.
16345 * src/conflicts.c (enum conflict_resolution_e)
16346 (solved_conflicts_obstack): New, used by...
16347 (log_resolution): this.
16348 Adjust to attach the conflict resolution to each state.
16349 Complete the description with the precedence/associativity
16350 information.
16351 (resolve_sr_conflict): Adjust.
16352 * src/print.c (print_state): Output its solved_conflicts.
16353 * tests/conflicts.at (Unresolved SR Conflicts)
16354 (Solved SR Conflicts): Exercise --report=all.
16355
16356 2002-05-26 Akim Demaille <akim@epita.fr>
16357
16358 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16359 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16360 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16361 (token_number_t, item_number_as_token_number)
16362 (token_number_as_item_number, muscle_insert_token_number_table):
16363 Rename as...
16364 (symbol_number_t, item_number_as_symbol_number)
16365 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16366 these, since it is more appropriate.
16367
16368 2002-05-26 Akim Demaille <akim@epita.fr>
16369
16370 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16371 `Error:' lines.
16372 * data/bison.simple (yystos) [YYDEBUG]: New.
16373 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16374 error recovery.
16375 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16376
16377 2002-05-25 Akim Demaille <akim@epita.fr>
16378
16379 * doc/bison.texinfo (Debugging): Split into...
16380 (Tracing): this new section, its former contents, and...
16381 (Understanding): this new section.
16382 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16383 by...
16384 (report_flag): this.
16385 Adjust all dependencies.
16386 (report_args, report_types, report_argmatch): New.
16387 (usage, getargs): Report/support -r, --report.
16388 * src/options.h
16389 (struct option_table_struct): Rename as..,
16390 (struct option_table_s): this.
16391 Rename the `set_flag' member to `flag' to match with getopt_long's
16392 struct.
16393 * src/options.c (option_table): Split verbose into an entry for
16394 %verbose, and another for --verbose.
16395 Support --report/-r, so remove -r from the obsolete --raw.
16396 * src/print.c: Attach full item sets and lookaheads reports to
16397 report_flag instead of trace_flag.
16398 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16399
16400 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16401 and Paul Eggert <eggert@twinsun.com>
16402
16403 * data/bison.simple (yyparse): Correct error handling to conform to
16404 POSIX and yacc. Specifically, after syntax error is discovered,
16405 do not reduce further before shifting the error token.
16406 Clean up the code a bit by removing the labels yyerrdefault,
16407 yyerrhandle, yyerrpop.
16408 * NEWS: Document the above.
16409
16410 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16411
16412 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16413 type; it isn't always big enough, since it doesn't necessarily
16414 include non-terminals.
16415 (yytranslate): Expand definition of yy_token_number_type, so that
16416 the latter can be removed.
16417 (yy_token_number_type): Remove, only one use.
16418 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16419 don't use TokenNumberType as element type.
16420
16421 * tests/regression.at: Modify expected output to agree with change
16422 to yyr1 and yytranslate.
16423
16424 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16425
16426 * src/reader.c (parse_action): Use copy_character instead of
16427 obstack_1grow.
16428
16429 2002-05-13 Akim Demaille <akim@epita.fr>
16430
16431 * tests/regression.at (Token definitions): Prototype yylex and
16432 yyerror.
16433
16434 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16435
16436 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
16437 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16438 32-bit arithmetic.
16439 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16440
16441 2002-05-07 Akim Demaille <akim@epita.fr>
16442
16443 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16444 avoid GCC warnings.
16445
16446 2002-05-07 Akim Demaille <akim@epita.fr>
16447
16448 Kill GCC warnings.
16449
16450 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16451 over the RHS of each rule.
16452 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16453 * src/state.h (state_t): Member `nitems' is unsigned short.
16454 * src/LR0.c (get_state): Adjust.
16455 * src/reader.c (packgram): Likewise.
16456 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16457 `Type'.
16458 (muscle_insert_int_table): Remove, unused.
16459 (prepare_rules): Remove `max'.
16460
16461 2002-05-06 Akim Demaille <akim@epita.fr>
16462
16463 * src/closure.c (print_firsts): Display of the symbol tags.
16464 (bitmatrix_print): Move to...
16465 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16466 here.
16467 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16468
16469 2002-05-06 Akim Demaille <akim@epita.fr>
16470
16471 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16472 hash_do_for_each.
16473
16474 2002-05-06 Akim Demaille <akim@epita.fr>
16475
16476 * src/LR0.c (new_state, get_state): Instead of using the global
16477 `kernel_size' and `kernel_base', have two new arguments:
16478 `core_size' and `core'.
16479 Adjust callers.
16480
16481 2002-05-06 Akim Demaille <akim@epita.fr>
16482
16483 * src/reader.c (packgram): No longer end `ritem' with a 0
16484 sentinel: it is not used.
16485
16486 2002-05-05 Akim Demaille <akim@epita.fr>
16487
16488 New experimental feature: display the lookaheads in the report and
16489 graph.
16490
16491 * src/print (print_core): When --trace-flag, display the rules
16492 lookaheads.
16493 * src/print_graph.c (print_core): Likewise.
16494 Swap the arguments.
16495 Adjust caller.
16496
16497 2002-05-05 Akim Demaille <akim@epita.fr>
16498
16499 * tests/torture.at (Many lookaheads): New test.
16500
16501 2002-05-05 Akim Demaille <akim@epita.fr>
16502
16503 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16504 (GENERATE_MUSCLE_INSERT_TABLE): this.
16505 (output_int_table, output_unsigned_int_table, output_short_table)
16506 (output_token_number_table, output_item_number_table): Replace with...
16507 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16508 (muscle_insert_short_table, muscle_insert_token_number_table)
16509 (muscle_insert_item_number_table): these.
16510 Adjust all callers.
16511 (prepare_tokens): Don't free `translations', since...
16512 * src/reader.h, src/reader.c (grammar_free): do it.
16513 Move to...
16514 * src/gram.h, src/gram.c (grammar_free): here.
16515 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16516 b4_translate_max.
16517
16518 2002-05-05 Akim Demaille <akim@epita.fr>
16519
16520 * src/output.c (output_unsigned_int_table): New.
16521 (prepare_rules): `i' is unsigned.
16522 `prhs', `rline', `r2' are unsigned int.
16523 Rename muscle `rhs_number_max' as `rhs_max'.
16524 Output muscles `prhs_max', `rline_max', and `r2_max'.
16525 Free rline and r1.
16526 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16527 to compute types instead of constant types.
16528 * tests/regression.at (Web2c Actions): Adjust.
16529
16530 2002-05-04 Akim Demaille <akim@epita.fr>
16531
16532 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16533 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16534 Adjust dependencies.
16535 * src/output.c (token_definitions_output): Be sure not to output a
16536 `#define 'a'' when fed with `%token 'a' "a"'.
16537 * tests/regression.at (Token definitions): New.
16538
16539 2002-05-03 Paul Eggert <eggert@twinsun.com>
16540
16541 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16542 for K&R C.
16543
16544 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16545
16546 * Makefile.am (SUBDIRS): Remove intl.
16547 (EXTRA_DIST): Add config/config.rpath.
16548
16549 2002-05-03 Akim Demaille <akim@epita.fr>
16550
16551 * data/bison.simple (m4_if): Don't output empty enums.
16552 And actually, output valid enum definitions :(.
16553
16554 2002-05-03 Akim Demaille <akim@epita.fr>
16555
16556 * configure.bat: Remove, completely obsolete.
16557 * Makefile.am (EXTRA_DIST): Adjust.
16558 Don't distribute config.rpath...
16559 * config/Makefile.am (EXTRA_DIST): Do it.
16560
16561 2002-05-03 Akim Demaille <akim@epita.fr>
16562
16563 * configure.in (GETTEXT_VERSION): New.
16564 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16565
16566 2002-05-03 Akim Demaille <akim@epita.fr>
16567
16568 * data/bison.simple (b4_token_enum): New.
16569 (b4_token_defines): Use it to output tokens both as #define and
16570 enums.
16571 Suggested by Paul Eggert.
16572 * src/output.c (token_definitions_output): Don't output spurious
16573 white spaces.
16574
16575 2002-05-03 Akim Demaille <akim@epita.fr>
16576
16577 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16578
16579 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
16580
16581 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
16582 Update the stack class, give a try to deque as the default container.
16583
16584 2002-05-02 Akim Demaille <akim@epita.fr>
16585
16586 * data/bison.simple (yyparse): Do not implement @$ = @1.
16587 (YYLLOC_DEFAULT): Adjust to do it.
16588 * doc/bison.texinfo (Location Default Action): Fix.
16589
16590 2002-05-02 Akim Demaille <akim@epita.fr>
16591
16592 * src/reader.c (parse_braces): Merge into...
16593 (parse_action): this.
16594
16595 2002-05-02 Akim Demaille <akim@epita.fr>
16596
16597 * configure.in (ALL_LINGUAS): Remove.
16598 * po/LINGUAS, hr.po: New.
16599
16600 2002-05-02 Akim Demaille <akim@epita.fr>
16601
16602 Remove the so called hairy (semantic) parsers.
16603
16604 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
16605 * src/gram.h, src/gram.c (semantic_parser): Remove.
16606 (rule_t): Remove the guard and guard_line members.
16607 * src/lex.h (token_t): remove tok_guard.
16608 * src/options.c (option_table): Remove %guard and %semantic_parser
16609 support.
16610 * src/output.c, src/output.h (guards_output): Remove.
16611 (prepare): Adjust.
16612 (token_definitions_output): Don't output the `T'
16613 tokens (???).
16614 (output_skeleton): Don't output the guards.
16615 * src/files.c, src/files.c (attrsfile): Remove.
16616 * src/reader.c (symbol_list): Remove the guard and guard_line
16617 members.
16618 Adjust dependencies.
16619 (parse_guard): Remove.
16620 * data/bison.hairy: Remove.
16621 * doc/bison.texinfo (Environment Variables): Remove occurrences of
16622 BISON_HAIRY.
16623
16624 2002-05-02 Akim Demaille <akim@epita.fr>
16625
16626 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
16627 (parse_guard): Rename the formal argument `stack_offset' as
16628 `rule_length', which is more readable.
16629 Adjust callers.
16630 (copy_at, copy_dollar): Instead of outputting the hard coded
16631 values of $$, $n and so forth, output invocation to b4_lhs_value,
16632 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
16633 Note: this patch partially drops `semantic-parser' support: it
16634 always does `rule_length - n', where semantic parsers ought to
16635 always use `-n'.
16636 * data/bison.simple, data/bison.c++ (b4_lhs_value)
16637 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
16638
16639 2002-05-02 Akim Demaille <akim@epita.fr>
16640
16641 * configure.in (AC_INIT): Bump to 1.49b.
16642 (AM_INIT_AUTOMAKE): Short invocation.
16643
16644 2002-05-02 Akim Demaille <akim@epita.fr>
16645
16646 Version 1.49a.
16647
16648 2002-05-01 Akim Demaille <akim@epita.fr>
16649
16650 * src/skeleton.h: Remove.
16651
16652 2002-05-01 Akim Demaille <akim@epita.fr>
16653
16654 * src/skeleton.h: Fix the #endif.
16655 Reported by Magnus Fromreide.
16656
16657 2002-04-26 Paul Eggert <eggert@twinsun.com>
16658
16659 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
16660 Define if we define YYSTYPE and YYLTYPE, respectively.
16661 (YYCOPY): Fix [] quoting problem in the non-GCC case.
16662
16663 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
16664
16665 * src/scan-skel.l: Postprocess quadrigraphs.
16666
16667 * src/reader.c (copy_character): New function, used to output
16668 single characters while replacing `[' and `]' with quadrigraphs, to
16669 avoid troubles with M4 quotes.
16670 (copy_comment): Output characters with copy_character.
16671 (read_additionnal_code): Likewise.
16672 (copy_string2): Likewise.
16673 (copy_definition): Likewise.
16674
16675 * tests/calc.at: Exercise M4 quoting.
16676
16677 2002-04-25 Akim Demaille <akim@epita.fr>
16678
16679 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
16680 between `!' and the command.
16681 Reported by Paul Eggert.
16682
16683 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
16684
16685 * tests/calc.at: Exercise prologue splitting.
16686
16687 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
16688 `b4_post_prologue' instead of `b4_prologue'.
16689
16690 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
16691 muscles.
16692 (output): Free pre_prologue_obstack and post_prologue_obstack.
16693 * src/files.h, src/files.c (attrs_obstack): Remove.
16694 (pre_prologue_obstack, post_prologue_obstack): New.
16695 * src/reader.c (copy_definition): Add a parameter to specify the
16696 obstack to fill, instead of using attrs_obstack unconditionally.
16697 (read_declarations): Pass pre_prologue_obstack to copy_definition if
16698 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
16699
16700 2002-04-23 Paul Eggert <eggert@twinsun.com>
16701
16702 * data/bison.simple: Remove unnecessary commentary and white
16703 space differences from 1_29-branch.
16704 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
16705
16706 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
16707 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
16708 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
16709 constructors or destructors.
16710
16711 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
16712
16713 2002-04-23 Akim Demaille <akim@epita.fr>
16714
16715 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
16716 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
16717 location with columns.
16718 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
16719 All reported by Paul Eggert.
16720
16721 2002-04-22 Akim Demaille <akim@epita.fr>
16722
16723 * src/reduce.c (dump_grammar): Move to...
16724 * src/gram.h, src/gram.c (grammar_dump): here.
16725 Be sure to separate long item numbers.
16726 Don't read the members of a rule's prec if its nil.
16727
16728 2002-04-22 Akim Demaille <akim@epita.fr>
16729
16730 * src/output.c (table_size, table_grow): New.
16731 (MAXTABLE): Remove, replace uses with table_size.
16732 (pack_vector): Instead of dying when the table is too big, grow it.
16733
16734 2002-04-22 Akim Demaille <akim@epita.fr>
16735
16736 * data/bison.simple (yyr1): Its type is that of a token number.
16737 * data/bison.c++ (r1_): Likewise.
16738 * tests/regression.at (Web2c Actions): Adjust.
16739
16740 2002-04-22 Akim Demaille <akim@epita.fr>
16741
16742 * src/reader.c (token_translations_init): 256 is now the default
16743 value for the error token, i.e., it will be assigned another
16744 number if the user assigned 256 to one of her tokens.
16745 (reader): Don't force 256 to error.
16746 * doc/bison.texinfo (Symbols): Adjust.
16747 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
16748 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
16749 etc. instead of 10, 20, 30 (which was used to `jump' over error
16750 (256) and undefined (2)).
16751
16752 2002-04-22 Akim Demaille <akim@epita.fr>
16753
16754 Propagate more token_number_t.
16755
16756 * src/gram.h (token_number_as_item_number)
16757 (item_number_as_token_number): New.
16758 * src/output.c (GENERATE_OUTPUT_TABLE): New.
16759 Use it to create output_item_number_table and
16760 output_token_number_table.
16761 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16762 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
16763 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
16764 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
16765
16766 2002-04-22 Akim Demaille <akim@epita.fr>
16767
16768 * src/output.h, src/output.c (get_lines_number): Remove.
16769
16770 2002-04-19 Akim Demaille <akim@epita.fr>
16771
16772 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
16773 as Lex/Flex'.
16774 (Debugging): More details about enabling the debugging features.
16775 (Table of Symbols): Describe $$, $n, @$, and @n.
16776 Suggested by Tim Josling.
16777
16778 2002-04-19 Akim Demaille <akim@epita.fr>
16779
16780 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
16781
16782 2002-04-10 Akim Demaille <akim@epita.fr>
16783
16784 * src/system.h: Rely on HAVE_LIMITS_H.
16785 Suggested by Paul Eggert.
16786
16787 2002-04-09 Akim Demaille <akim@epita.fr>
16788
16789 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
16790 full stderr, and strip it according to the bison options, instead
16791 of composing the error message from different bits.
16792 This makes it easier to check for several error messages.
16793 Adjust all the invocations.
16794 Add an invocation exercising the error token.
16795 Add an invocation demonstrating a stupid error message.
16796 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
16797 Adjust the tests.
16798 Error message are for stderr, not stdout.
16799
16800 2002-04-09 Akim Demaille <akim@epita.fr>
16801
16802 * src/gram.h, src/gram.c (error_token_number): Remove, use
16803 errtoken->number.
16804 * src/reader.c (reader): Don't specify the user token number (2)
16805 for $undefined, as it uselessly prevents using it.
16806 * src/gram.h (token_number_t): Move to...
16807 * src/symtab.h: here.
16808 (state_t.number): Is a token_number_t.
16809 * src/print.c, src/reader.c: Use undeftoken->number instead of
16810 hard coded 2.
16811 (Even though this 2 is not the same as above: the number of the
16812 undeftoken remains being 2, it is its user token number which
16813 might not be 2).
16814 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
16815 `user_token_number_max'.
16816 Output `undef_token_number'.
16817 * data/bison.simple, data/bison.c++: Use them.
16818 Be sure to map invalid yylex return values to
16819 `undef_token_number'. This saves us from gratuitous SEGV.
16820
16821 * tests/conflicts.at (Solved SR Conflicts)
16822 (Unresolved SR Conflicts): Adjust.
16823 * tests/regression.at (Web2c Actions): Adjust.
16824
16825 2002-04-08 Akim Demaille <akim@epita.fr>
16826
16827 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
16828 Adding #line.
16829 Remove the duplicate `typedefs'.
16830 (RhsNumberType): Fix the declaration and various other typos.
16831 Use __ofile__.
16832 * data/bison.simple: Use __ofile__.
16833 * src/scan-skel.l: Handle __ofile__.
16834
16835 2002-04-08 Akim Demaille <akim@epita.fr>
16836
16837 * src/gram.h (item_number_t): New, the type of item numbers in
16838 RITEM. Note that it must be able to code symbol numbers as
16839 positive number, and the negation of rule numbers as negative
16840 numbers.
16841 Adjust all dependencies (pretty many).
16842 * src/reduce.c (rule): Remove this `short *' pointer: use
16843 item_number_t.
16844 * src/system.h (MINSHORT, MAXSHORT): Remove.
16845 Include `limits.h'.
16846 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
16847 (shortcpy): Remove.
16848 (MAXTABLE): Move to...
16849 * src/output.c (MAXTABLE): here.
16850 (prepare_rules): Use output_int_table to output rhs.
16851 * data/bison.simple, data/bison.c++: Adjust.
16852 * tests/torture.at (Big triangle): Move the limit from 254 to
16853 500.
16854 * tests/regression.at (Web2c Actions): Ajust.
16855
16856 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
16857 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
16858 passes, but produces negative #line number, once fixed, GCC is
16859 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
16860 C), it passes.
16861 * src/state.h (state_h): Code input lines on ints, not shorts.
16862
16863 2002-04-08 Akim Demaille <akim@epita.fr>
16864
16865 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
16866 and then the grammar.
16867
16868 2002-04-08 Akim Demaille <akim@epita.fr>
16869
16870 * src/system.h: No longer using strndup.
16871
16872 2002-04-07 Akim Demaille <akim@epita.fr>
16873
16874 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
16875 * src/output.c (output_table_data): Return the longest number.
16876 (prepare_tokens): Output `token_number_max').
16877 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
16878 New.
16879 Use them to define yy_token_number_type/TokenNumberType.
16880 Use this type for yytranslate.
16881 * tests/torture.at (Big triangle): Push the limit from 124 to
16882 253.
16883 * tests/regression.at (Web2c Actions): Adjust.
16884
16885 2002-04-07 Akim Demaille <akim@epita.fr>
16886
16887 * tests/torture.at (Big triangle): New.
16888 (GNU AWK Grammar, GNU Cim Grammar): Move to...
16889 * tests/existing.at: here.
16890
16891 2002-04-07 Akim Demaille <akim@epita.fr>
16892
16893 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
16894 nritems.
16895 Adjust dependencies.
16896
16897 2002-04-07 Akim Demaille <akim@epita.fr>
16898
16899 * src/reader.c: Normalize increments to prefix form.
16900
16901 2002-04-07 Akim Demaille <akim@epita.fr>
16902
16903 * src/reader.c, symtab.c: Remove debugging code.
16904
16905 2002-04-07 Akim Demaille <akim@epita.fr>
16906
16907 Rename all the `bucket's as `symbol_t'.
16908
16909 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
16910 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
16911 * src/symtab.c, src/symtab.h (bucket): Rename as...
16912 (symbol_t): this.
16913 (symbol_list_new, bucket_check_defined, bucket_make_alias)
16914 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
16915 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16916 (buckets_new, buckets_free, buckets_do): Rename as...
16917 (symbol_list_new, symbol_check_defined, symbol_make_alias)
16918 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16919 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
16920 (symbols_new, symbols_free, symbols_do): these.
16921
16922 2002-04-07 Akim Demaille <akim@epita.fr>
16923
16924 Use lib/hash for the symbol table.
16925
16926 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
16927 EOF.
16928 * src/lex.c (lex): Set the `number' member of new terminals.
16929 * src/reader.c (bucket_check_defined, bucket_make_alias)
16930 (bucket_check_alias_consistence, bucket_translation): New.
16931 (reader, grammar_free, readgram, token_translations_init)
16932 (packsymbols): Adjust.
16933 (reader): Number the predefined tokens.
16934 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
16935 for predefined tokens.
16936 * src/symtab.h (bucket): Remove all the hash table related
16937 members.
16938 * src/symtab.c (symtab): Replace by...
16939 (bucket_table): this.
16940 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16941 (buckets_new, buckets_do): New.
16942
16943 2002-04-07 Akim Demaille <akim@epita.fr>
16944
16945 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
16946 (start_symbol, max_user_token_number, semantic_parser)
16947 (error_token_number): Initialize.
16948 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
16949 Initialize.
16950 (reader): Don't.
16951 (errtoken, eoftoken, undeftoken, axiom): Extern.
16952
16953 2002-04-07 Akim Demaille <akim@epita.fr>
16954
16955 * src/gram.h (rule_s): prec and precsym are now pointers
16956 to the bucket giving the priority/associativity.
16957 Member `associativity' removed: useless.
16958 * src/reduce.c, src/conflicts.c: Adjust.
16959
16960 2002-04-07 Akim Demaille <akim@epita.fr>
16961
16962 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
16963 Properly escape the symbols' TAG when outputting them.
16964
16965 2002-04-07 Akim Demaille <akim@epita.fr>
16966
16967 * src/lalr.h (LA): Is a bitsetv, not bitset*.
16968
16969 2002-04-07 Akim Demaille <akim@epita.fr>
16970
16971 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
16972 (LArule): this, which is an array to rule_t*.
16973 * src/print.c, src/conflicts.c: Adjust.
16974
16975 2002-04-07 Akim Demaille <akim@epita.fr>
16976
16977 * src/gram.h (rule_t): Rename `number' as `user_number'.
16978 `number' is a new member.
16979 Adjust dependencies.
16980 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
16981
16982 2002-04-07 Akim Demaille <akim@epita.fr>
16983
16984 As a result of the previous patch, it is no longer needed
16985 to reorder ritem itself.
16986
16987 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
16988
16989 2002-04-07 Akim Demaille <akim@epita.fr>
16990
16991 Be sure never to walk through RITEMS, but use only data related to
16992 the rules themselves. RITEMS should be banished.
16993
16994 * src/output.c (output_token_translations): Rename as...
16995 (prepare_tokens): this.
16996 In addition to `translate', prepare the muscles `tname' and
16997 `toknum', which were handled by...
16998 (output_rule_data): this.
16999 Remove, and move the remainder of its outputs into...
17000 (prepare_rules): this new routines, which also merges content from
17001 (output_gram): this.
17002 (prepare_rules): Be sure never to walk through RITEMS.
17003 (output_stos): Rename as...
17004 (prepare_stos): this.
17005 (output): Always invoke prepare_states, after all, just don't use it
17006 in the output if you don't need it.
17007
17008 2002-04-07 Akim Demaille <akim@epita.fr>
17009
17010 * src/LR0.c (new_state): Display `nstates' as the name of the
17011 newly created state.
17012 Adjust to initialize first_state and last_state if needed.
17013 Be sure to distinguish the initial from the final state.
17014 (new_states): Create the itemset of the initial state, and use
17015 new_state.
17016 * src/closure.c (closure): Now that the initial state has its
17017 items properly set, there is no need for a special case when
17018 creating `ruleset'.
17019
17020 As a result, now the rule 0, reducing to $axiom, is visible in the
17021 outputs. Adjust the test suite.
17022
17023 * tests/conflicts.at (Solved SR Conflicts)
17024 (Unresolved SR Conflicts): Adjust.
17025 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17026 * tests/conflicts.at (S/R in initial): New.
17027
17028 2002-04-07 Akim Demaille <akim@epita.fr>
17029
17030 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17031 the RHS of the rules.
17032 * src/output.c (output_gram): Likewise.
17033
17034 2002-04-07 Akim Demaille <akim@epita.fr>
17035
17036 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17037 bucket.
17038 Adjust all dependencies.
17039 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17040 `number' of the buckets too.
17041 * src/gram.h: Include `symtab.h'.
17042 (associativity): Move to...
17043 * src/symtab.h: here.
17044 No longer include `gram.h'.
17045
17046 2002-04-07 Akim Demaille <akim@epita.fr>
17047
17048 * src/gram.h, src/gram.c (rules_rhs_length): New.
17049 (ritem_longest_rhs): Use it.
17050 * src/gram.h (rule_t): `number' is a new member.
17051 * src/reader.c (packgram): Set it.
17052 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17053 the end of `rules', and count them out of `nrules'.
17054 (reduce_output, dump_grammar): Adjust.
17055 * src/print.c (print_grammar): It is no longer needed to check for
17056 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17057 * tests/reduce.at (Reduced Automaton): New test.
17058
17059 2002-04-07 Akim Demaille <akim@epita.fr>
17060
17061 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17062 lacking `+ 1' to nrules, Bison reported as useless a token if it
17063 was used solely to set the precedence of the last rule...
17064
17065 2002-04-07 Akim Demaille <akim@epita.fr>
17066
17067 * data/bison.c++, data/bison.simple: Don't output the current file
17068 name in #line, to avoid useless diffs between two identical
17069 outputs under different names.
17070
17071 2002-04-07 Akim Demaille <akim@epita.fr>
17072
17073 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17074 Normalize loops to using `< nrules + 1', not `<= nrules'.
17075
17076 2002-04-07 Akim Demaille <akim@epita.fr>
17077
17078 * TODO: Update.
17079
17080 2002-04-07 Akim Demaille <akim@epita.fr>
17081
17082 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17083 bucket.value as bucket.number.
17084
17085 2002-04-07 Akim Demaille <akim@epita.fr>
17086
17087 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17088 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17089 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17090 RHS, instead of being an index in RITEMS.
17091
17092 2002-04-04 Paul Eggert <eggert@twinsun.com>
17093
17094 * doc/bison.texinfo: Update copyright date.
17095 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17096 (Symbols): Warn about running Bison in one character set,
17097 but compiling and/or running in an incompatible one.
17098 Warn about character code 256, too.
17099
17100 2002-04-03 Paul Eggert <eggert@twinsun.com>
17101
17102 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17103 YYERROR_VERBOSE is nonzero, not whether it is defined.
17104
17105 Merge changes from bison-1_29-branch.
17106
17107 2002-03-20 Paul Eggert <eggert@twinsun.com>
17108
17109 Merge fixes from Debian bison_1.34-1.diff.
17110
17111 * configure.in (AC_PREREQ): 2.53.
17112
17113 2002-03-20 Akim Demaille <akim@epita.fr>
17114
17115 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17116
17117 2002-03-19 Paul Eggert <eggert@twinsun.com>
17118
17119 * src/bison.simple (YYCOPY): New macro.
17120 (YYSTACK_RELOCATE): Use it.
17121 Remove Type arg; no longer needed. All callers changed.
17122 (yymemcpy): Remove; no longer needed.
17123
17124 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17125 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17126
17127 2002-03-19 Akim Demaille <akim@epita.fr>
17128
17129 Test and fix the #line outputs.
17130
17131 * tests/atlocal.at (GCC): New.
17132 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
17133 (Prologue synch line, %union synch line, Postprologue synch line)
17134 (Action synch line, Epilogue synch line): New tests.
17135 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17136 * data/bison.simple, data/bison.c++: Use it.
17137
17138 2002-03-19 Akim Demaille <akim@epita.fr>
17139
17140 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17141 (Solved SR Conflicts, %expect not enough, %expect right)
17142 (%expect too much): Move to...
17143 * tests/conflicts.at: this new file.
17144
17145 2002-03-19 Akim Demaille <akim@epita.fr>
17146
17147 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17148 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17149 that we can move to enums for instance.
17150 * src/output.c (token_definitions_output): Output a list of
17151 `token-name, token-number' instead of the #define.
17152 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17153
17154 2002-03-14 Akim Demaille <akim@epita.fr>
17155
17156 Use Gettext 0.11.1.
17157
17158 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
17159
17160 * data/bison.c++: Make the user able to add members to the generated
17161 parser by subclassing.
17162
17163 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
17164
17165 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17166 a character.
17167 Reported by Nicolas Tisserand and Nicolas Burrus.
17168
17169 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17170
17171 * src/reader.c: Warn about lacking semi-colons, do not complain.
17172
17173 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17174
17175 * data/bison.c++: Remove a debug line.
17176
17177 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17178
17179 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
17180 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
17181 provide a default implementation.
17182
17183 2002-03-04 Akim Demaille <akim@epita.fr>
17184
17185 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17186 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17187 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17188 * tests/semantic.at (Parsing Guards): Similarly.
17189 * src/reader.at (readgram): Complain if the last rule is not ended
17190 with a semi-colon.
17191
17192 2002-03-04 Akim Demaille <akim@epita.fr>
17193
17194 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17195 * src/closure.c: here.
17196 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17197 RTC.
17198 * src/warshall.h, src/warshall.c: Remove.
17199 * tests/sets.at (Broken Closure): Adjust.
17200
17201 2002-03-04 Akim Demaille <akim@epita.fr>
17202
17203 * src/output.c (output_skeleton): tempdir is const.
17204 bytes_read is unused.
17205
17206 2002-03-04 Akim Demaille <akim@epita.fr>
17207
17208 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17209 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17210 Update.
17211 From Michael Hayes.
17212
17213 2002-03-04 Akim Demaille <akim@epita.fr>
17214
17215 * src/closure.c (closure): `r' is unused.
17216
17217 2002-03-04 Akim Demaille <akim@epita.fr>
17218
17219 * tests/sets.at (Broken Closure): Add the ending `;'.
17220 * src/reader.at (readgram): Complain if a rule is not ended with a
17221 semi-colon.
17222
17223 2002-03-04 Akim Demaille <akim@epita.fr>
17224
17225 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17226 (count_sr_conflicts): Use bitset_count.
17227 * src/reduce.c (inaccessable_symbols): Ditto.
17228 (bits_size): Remove.
17229 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17230
17231 2002-03-04 Akim Demaille <akim@epita.fr>
17232
17233 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17234 * src/reduce.c: Remove the `bitset_zero's following the
17235 `bitset_create's, as now it is performed by the latter.
17236
17237 2002-03-04 Akim Demaille <akim@epita.fr>
17238
17239 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17240 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17241 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17242 latest sources from Michael.
17243
17244 2002-03-04 Akim Demaille <akim@epita.fr>
17245
17246 * src/output.c (output): Don't free the grammar.
17247 * src/reader.c (grammar_free): New.
17248 * src/main.c (main): Call it and don't free symtab here.
17249
17250 2002-03-04 Akim Demaille <akim@epita.fr>
17251
17252 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17253 before returning.
17254 Reported by Benoit Perrot.
17255
17256 2002-03-04 Akim Demaille <akim@epita.fr>
17257
17258 Use bitset operations when possible, not loops over bits.
17259
17260 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17261 bitset_or.
17262 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17263 * src/reduce.c (useless_nonterminals): Formatting changes.
17264 * src/warshall.c (TC): Use bitset_or.
17265
17266 2002-03-04 Akim Demaille <akim@epita.fr>
17267
17268 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17269 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17270 Ditto.
17271
17272 2002-03-04 Akim Demaille <akim@epita.fr>
17273
17274 * src/lalr.c (F): Now a bitset*.
17275 Adjust all dependencies.
17276
17277 2002-03-04 Akim Demaille <akim@epita.fr>
17278
17279 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17280 Adjust all dependencies.
17281
17282 2002-03-04 Akim Demaille <akim@epita.fr>
17283
17284 * src/L0.c, src/LR0.h (nstates): Be size_t.
17285 Adjust comparisons (signed vs unsigned).
17286 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17287 bitset*.
17288 Adjust all dependencies.
17289
17290 2002-03-04 Akim Demaille <akim@epita.fr>
17291
17292 * src/closure.c (firsts): Now, also a bitset.
17293 Adjust all dependencies.
17294 (varsetsize): Remove, now unused.
17295 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17296
17297 2002-03-04 Akim Demaille <akim@epita.fr>
17298
17299 * src/print.c: Convert to use bitset.h, not hand coded iterations
17300 over ints.
17301
17302 2002-03-04 Akim Demaille <akim@epita.fr>
17303
17304 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17305
17306 2002-03-04 Akim Demaille <akim@epita.fr>
17307
17308 * src/closure.c (ruleset): Be a bitset.
17309 (rulesetsize): Remove.
17310
17311 2002-03-04 Akim Demaille <akim@epita.fr>
17312
17313 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17314 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17315 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17316 * src/closure.c (fderives): Be an array of bitsets.
17317
17318 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
17319
17320 * data/bison.c++: Merge the two generated headers. Insert a copyright
17321 notice in each output file.
17322
17323 2002-02-28 Akim Demaille <akim@epita.fr>
17324
17325 * data/bison.c++: Copy the prologue of bison.simple to fetch
17326 useful M4 definitions, such as b4_header_guard.
17327
17328 2002-02-25 Akim Demaille <akim@epita.fr>
17329
17330 * src/getargs.c (version): Give the name of the authors, and use a
17331 translator friendly scheme for the bgr
17332 copyright notice.
17333
17334 2002-02-25 Akim Demaille <akim@epita.fr>
17335
17336 * src/output.c (header_output): Remove, now handled completely via
17337 M4.
17338
17339 2002-02-25 Akim Demaille <akim@epita.fr>
17340
17341 * m4/m4.m4: New, from CVS Autoconf.
17342 * configure.in: Invoke it.
17343 * src/output.c (output_skeleton): Use its result instead of the
17344 hard coded name.
17345
17346 2002-02-25 Akim Demaille <akim@epita.fr>
17347
17348 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17349 Fileutils 4.1.5.
17350 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17351 * src/output.c (output_skeleton): Use mkstemp to create a real
17352 temporary file.
17353 Move the filling of `skeleton' and its muscle to...
17354 (prepare): here.
17355 (output): Move the definition of the prologue muscle to...
17356 (prepare): here.
17357 * src/system.h (DEFAULT_TMPDIR): New.
17358
17359 2002-02-14 Paul Eggert <eggert@twinsun.com>
17360
17361 Remove the support for C++ namespace cleanliness; it was
17362 causing more problems than it was curing, since it didn't work
17363 properly on some nonstandard C++ compilers. This can wait
17364 for a proper C++ parser.
17365
17366 * NEWS: Document this.
17367 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17368 of C++, as it's treated like C now.
17369 * src/bison.simple (YYSTD): Remove.
17370 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17371 Treat C++ just like Standard C instead of trying to support
17372 namespace cleanliness.
17373
17374 2002-02-14 Akim Demaille <akim@epita.fr>
17375
17376 * tests/regression.at (else): Adjust to Andreas' change.
17377
17378 2002-02-14 Akim Demaille <akim@epita.fr>
17379
17380 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17381
17382 2002-02-13 Andreas Schwab <schwab@suse.de>
17383
17384 * src/output.c (output_rule_data): Don't output NULL, it might
17385 not be defined yet.
17386
17387 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
17388
17389 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17390 (Copyright notice): Update.
17391
17392 2002-02-11 Akim Demaille <akim@epita.fr>
17393
17394 * tests/regression.at (%nonassoc and eof): Don't include
17395 nonportable headers.
17396
17397 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
17398
17399 * data/bison.c++: Correct error recovery. Make the user able to
17400 initialize the starting location.
17401
17402 2002-02-07 Akim Demaille <akim@epita.fr>
17403
17404 * tests/input.at: New.
17405
17406 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17407
17408 * data/bison.c++: Replace some direct m4 expansions by constants. Be
17409 more consistent when naming methods and variables. Put preprocessor
17410 directives around tables only needed for debugging.
17411
17412 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17413
17414 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17415 C++ parsers.
17416 (yy::b4_name::parse): Use print_.
17417
17418 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17419
17420 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17421
17422 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17423
17424 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17425 C++ parsers.
17426 (yy::b4_name::parse): Build verbose error messages, and use error_.
17427
17428 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17429
17430 * data/bison.c++: Fix m4 quoting in comments.
17431
17432 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17433
17434 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17435 not expanded by m4.
17436
17437 2002-02-05 Akim Demaille <akim@epita.fr>
17438
17439 * data/bison.c++: Adjust to the M4 back end.
17440 More is certainly needed.
17441
17442 2002-02-05 Akim Demaille <akim@epita.fr>
17443
17444 Give a try to M4 as a back end.
17445
17446 * lib/readpipe.c: New, from wdiff.
17447 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17448 BISON_HAIRY.
17449 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17450 specific values. Now it is m4 that performs the lookup.
17451 * src/parse-skel.y: Remove.
17452 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17453 * src/output.c (actions_output, guards_output)
17454 (token_definitions_output): No longer keeps track of the output
17455 line number, hence remove the second argument.
17456 (guards_output): Check against the guard member of a rule, not the
17457 action member.
17458 Adjust callers.
17459 (output_skeleton): Don't look for the skeleton location, let m4 do
17460 that.
17461 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17462 file will be used.
17463 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17464 (prepare): Given that for the time being changesyntax is not
17465 usable in M4, rename the muscles using `-' to `_'.
17466 Define `defines_flag', `output_parser_name' and `output_header_name'.
17467 * src/output.h (actions_output, guards_output)
17468 (token_definitions_output): Adjust prototypes.
17469 * src/scan-skel.l: Instead of scanning the skeletons, it now
17470 processes the output of m4: `__oline__' and `#output'.
17471 * data/bison.simple: Adjust to be used by M4(sugar).
17472 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17473 to date.
17474 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17475 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17476 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17477 shamelessly stolen from CVS Autoconf.
17478
17479 2002-02-05 Akim Demaille <akim@epita.fr>
17480
17481 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17482 * configure.in: Check for the declarations of free and malloc.
17483 * src/muscle_tab.c: Adjust.
17484
17485 2002-02-05 Akim Demaille <akim@epita.fr>
17486
17487 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17488 which have no values.
17489
17490 2002-02-05 Akim Demaille <akim@epita.fr>
17491
17492 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17493 * data/: here.
17494
17495 2002-01-29 Paul Eggert <eggert@twinsun.com>
17496
17497 * src/bison.simple (YYSIZE_T): Do not define merely because
17498 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17499 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17500
17501 2002-01-27 Akim Demaille <akim@epita.fr>
17502
17503 Fix `%nonassoc and eof'.
17504
17505 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17506 which were not properly copied! Replace
17507 memcpy (res->errs, src->errs, src->nerrs);
17508 with
17509 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17510 !!!
17511 * tests/regression.at (%nonassoc and eof): Adjust to newest
17512 Autotest: `.' is not in the PATH.
17513
17514 2002-01-27 Akim Demaille <akim@epita.fr>
17515
17516 * tests/sets.at (AT_EXTRACT_SETS): New.
17517 (Nullable): Use it.
17518 (Firsts): New.
17519
17520 2002-01-26 Akim Demaille <akim@epita.fr>
17521
17522 * tests/actions.at, tests/calc.at, tests/headers.at,
17523 * tests/torture.at: Adjust to the newest Autotest which no longer
17524 forces `.' in the PATH.
17525
17526 2002-01-25 Akim Demaille <akim@epita.fr>
17527
17528 * tests/regression.at (%nonassoc and eof): New.
17529 Suggested by Robert Anisko.
17530
17531 2002-01-24 Akim Demaille <akim@epita.fr>
17532
17533 Bison dumps core when trying to complain about broken input files.
17534 Reported by Cris van Pelt.
17535
17536 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17537 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17538 into...
17539 (Invalid inputs): Strengthen: exercise parse_percent_token.
17540
17541 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
17542
17543 * src/Makefile.am: Add bison.c++.
17544 * src/bison.c++: New skeleton.
17545
17546 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
17547
17548 * po/it.po: New.
17549
17550 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17551
17552 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17553
17554 2002-01-20 Marc Autret <marc@gnu.org>
17555
17556 * src/files.c (compute_output_file_names): Fix
17557
17558 2002-01-20 Marc Autret <marc@gnu.org>
17559
17560 * tests/output.at: New test.
17561 * src/files.c (compute_base_names): Don't map extensions when
17562 the YACC flag is set, use defaults.
17563 Reported by Evgeny Stambulchik.
17564
17565 2002-01-20 Marc Autret <marc@gnu.org>
17566
17567 * src/system.h: Need to define __attribute__ away for non-GCC
17568 compilers as well (i.e., the vendor C compiler).
17569 Suggested by Albert Chin-A-Young.
17570
17571 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
17572
17573 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17574 canonical definition.
17575 * src/system.h: Use the canonical definition for PARAMS (avoids
17576 a conflict with the macro from lib/hash.h).
17577
17578 2002-01-11 Akim Demaille <akim@epita.fr>
17579
17580 * configure.in: Use AC_FUNC_STRNLEN.
17581 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
17582
17583 2002-01-09 Akim Demaille <akim@epita.fr>
17584
17585 * src/files.c, src/files.h (output_infix): New.
17586 (tab_extension): Remove.
17587 (compute_base_names): Compute the former, drop the latter.
17588 * src/output.c (prepare): Insert the muscles `output-infix', and
17589 `output-suffix'.
17590 * src/parse-skel.y (string, string.1): New.
17591 (section.header): Use it.
17592 (section.yacc): Remove.
17593 (prefix): Remove too.
17594 * src/scan-skel.l: Adjust.
17595 * src/bison.simple, src/bison.hairy: Adjust.
17596
17597 2002-01-09 Akim Demaille <akim@epita.fr>
17598
17599 * configure.in (WERROR_CFLAGS): Compute it.
17600 * src/Makefile.am (CFLAGS): Pass it.
17601 * tests/atlocal.in (CFLAGS): Idem.
17602 * src/files.c: Fix a few warnings.
17603 (get_extension_index): Remove, unused.
17604
17605 2002-01-08 Akim Demaille <akim@epita.fr>
17606
17607 * src/getargs.c (AS_FILE_NAME): New.
17608 (getargs): Use it to convert DOSish file names.
17609 * src/files.c (base_name): Rename as full_base_name to avoid
17610 clashes with `base_name ()'.
17611 (filename_split): New.
17612 (compute_base_names): N-th rewrite, using filename_split.
17613
17614 2002-01-08 Akim Demaille <akim@epita.fr>
17615
17616 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
17617 New, stolen from the Fileutils 4.1.
17618 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17619 * configure.in: Check for the presence of memrchr, and of its
17620 prototype.
17621
17622 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
17623
17624 * lib/hash.h (__P): Added definition for this macro.
17625 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
17626 BUILT_SOURCES, to ensure they are generated first.
17627 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
17628 %error-verbose to allow bootstrapping with bison 1.30x.
17629
17630 2002-01-06 Akim Demaille <akim@epita.fr>
17631
17632 * src/reader.c (parse_braces): Don't fetch the next char, the
17633 convention is to fetch on entry.
17634 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
17635 'switch' without a following semicolon.
17636 * tests/regression.at (braces parsing): New.
17637
17638 2002-01-06 Akim Demaille <akim@epita.fr>
17639
17640 Bison is dead wrong in its RR conflict reports.
17641
17642 * tests/torture.at (GNU Cim Grammar): New.
17643 * src/conflicts.c (count_rr_conflicts): Fix.
17644
17645 2002-01-06 Akim Demaille <akim@epita.fr>
17646
17647 Creating package.m4 from configure.ac causes too many problems.
17648
17649 * tests/Makefile.am (package.m4): Create it by hand,
17650 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
17651
17652 2002-01-06 Akim Demaille <akim@epita.fr>
17653
17654 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
17655 skeleton.h.
17656
17657 2002-01-04 Paul Eggert <eggert@twinsun.com>
17658
17659 * doc/bison.texinfo (Debugging):
17660 Remove YYSTDERR; it's no longer defined or used.
17661 Also, s/cstdio.h/cstdio/.
17662
17663 2002-01-03 Akim Demaille <akim@epita.fr>
17664
17665 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
17666
17667 2002-01-03 Akim Demaille <akim@epita.fr>
17668
17669 * src/parse-skel.y (process_skeleton): Don't bind the parser's
17670 tracing code to --trace, wait for a better --trace option, with
17671 args.
17672
17673 2002-01-03 Akim Demaille <akim@epita.fr>
17674
17675 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
17676 The ISO C++ standard is extremely clear about it: stderr is
17677 considered a macro, not a regular symbol (see table 94 `Header
17678 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
17679 Therefore std:: does not apply to it. It still does with fprintf.
17680 Also, s/cstdio.h/cstdio/.
17681
17682 2002-01-03 Akim Demaille <akim@epita.fr>
17683
17684 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
17685 for non system headers.
17686
17687 2002-01-02 Akim Demaille <akim@epita.fr>
17688
17689 Equip the skeleton chain with location tracking, runtime trace,
17690 pure parser and scanner.
17691
17692 * src/parse-skel.y: Request a pure parser, locations, and prefix
17693 renaming.
17694 (%union): Having several members with the same type does not help
17695 type mismatches, simplify.
17696 (YYPRINT, yyprint): New.
17697 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
17698 (skel_error): this.
17699 Handle locations.
17700 * src/scan-skel.l: Adjust to these changes.
17701 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
17702 (LOCATION_PRINT, skel_control_t): New.
17703
17704 2001-12-30 Akim Demaille <akim@epita.fr>
17705
17706 * src/parse-skel.y: Get rid of the shift/reduce conflict:
17707 replace `gb' with BLANKS.
17708 * src/scan-skel.l: Adjust.
17709
17710 2001-12-30 Akim Demaille <akim@epita.fr>
17711
17712 * src/system.h: We don't need nor want bcopy.
17713 Throw away MS-DOS crap: we don't need getpid.
17714 * configure.in: We don't need strndup. It was even causing
17715 problems: because Flex includes the headers *before* us,
17716 _GNU_SOURCE is not defined by config.h, and therefore strndup was
17717 not visible.
17718 * lib/xstrndup.c: New.
17719 * src/scan-skel.l: Use it.
17720 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
17721 * src/parse-skel.y: Use %directives instead of #defines.
17722
17723 2001-12-30 Akim Demaille <akim@epita.fr>
17724
17725 * src/skeleton.h: New.
17726 * src/output.c (output_parser, output_master_parser): Remove, dead
17727 code.
17728 * src/output.h (get_lines_number, actions_output, guards_output)
17729 (token_definitions_output): Prototype them.
17730 * src/parse-skel.y: Add the license notice.
17731 Include output.h and skeleton.h.
17732 (process_skeleton): Returns void, and takes a single parameter.
17733 * src/scan-skel.l: Add the license notice.
17734 Include skeleton.h.
17735 Don't use %option yylineno: it seems that then Flex imagines
17736 REJECT has been used, and therefore it won't reallocate its
17737 buffers (which makes no other sense to me than a bug). It results
17738 in warnings for `unused: yy_flex_realloc'.
17739
17740 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
17741
17742 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17743 (MUSCLE_INSERT_PREFIX): ...to there.
17744 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17745 (MUSCLE_INSERT_PREFIX): Move from here...
17746
17747 * src/bison.hairy: Add a section directive. Put braces around muscle
17748 names. This parser skeleton is still broken, but Bison should not
17749 choke on a bad muscle 'syntax'.
17750 * src/bison.simple: Add a section directive. Put braces around muscle
17751 names.
17752
17753 * src/files.h (strsuffix, stringappend): Add declarations.
17754 (tab_extension): Add declaration.
17755 (short_base_name): Add declaration.
17756
17757 * src/files.c (strsuffix, stringappend): No longer static. These
17758 functions are used in the skeleton parser.
17759 (tab_extension): New.
17760 (compute_base_names): Use the computations done in this function
17761 to guess if the generated parsers should have '.tab' in their
17762 names.
17763 (short_base_name): No longer static.
17764
17765 * src/output.c (output_skeleton): New.
17766 (output): Disable call to output_master_parser, and give a try to
17767 a new skeleton handling system.
17768 (guards_output, actions_output): No longer static.
17769 (token_definitions_output, get_lines_number): No longer static.
17770
17771 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
17772
17773 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
17774 parse-skel.y.
17775
17776 * src/parse-skel.y: New file.
17777 * src/scan-skel.l: New file.
17778
17779 2001-12-29 Akim Demaille <akim@epita.fr>
17780
17781 %name-prefix is broken.
17782
17783 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
17784 Adjust all dependencies.
17785 * tests/headers.at (export YYLTYPE): Strengthen this test: use
17786 %name-prefix.
17787
17788 Renaming yylval but not yylloc is not consistent. Now we do.
17789
17790 * src/bison.simple: Prefix yylloc if used.
17791 * doc/bison.texinfo (Decl Summary): Document that.
17792
17793 2001-12-29 Akim Demaille <akim@epita.fr>
17794
17795 * doc/bison.texinfo: Promote `%long-directive' over
17796 `%long_directive'.
17797 Remove all references to fixed-output-files, yacc is enough.
17798
17799 2001-12-29 Akim Demaille <akim@epita.fr>
17800
17801 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
17802 user prologue. These are defaults.
17803 * tests/actions.at (Mid-rule actions): Make sure the user can
17804 define YYDEBUG and YYERROR_VERBOSE.
17805
17806 2001-12-29 Akim Demaille <akim@epita.fr>
17807
17808 * src/output.c (header_output): Don't forget to export YYLTYPE and
17809 yylloc.
17810 * tests/headers.at (export YYLTYPE): New, make sure it does.
17811 * tests/regression.at (%union and --defines, Invalid CPP headers):
17812 Move to...
17813 * tests/headers.at: here.
17814
17815 2001-12-29 Akim Demaille <akim@epita.fr>
17816
17817 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
17818
17819 2001-12-29 Akim Demaille <akim@epita.fr>
17820
17821 * tests/actions.at (Mid-rule actions): Output on a single line
17822 instead of several.
17823
17824 2001-12-29 Akim Demaille <akim@epita.fr>
17825
17826 * doc/bison.texinfo: Formatting changes.
17827
17828 2001-12-29 Akim Demaille <akim@epita.fr>
17829
17830 Don't store the token defs in a muscle, just be ready to output it
17831 on command. Now possible via `symbols'. Fixes a memory leak.
17832
17833 * src/output.c (token_definitions_output): New.
17834 (output_parser, header_output): Use it.
17835 * src/reader.c (symbols_save): Remove.
17836
17837 2001-12-29 Akim Demaille <akim@epita.fr>
17838
17839 * src/bison.simple: Do not provide a default for YYSTYPE and
17840 YYLTYPE before the user's prologue. Otherwise it's hardly... a
17841 default.
17842
17843 2001-12-29 Akim Demaille <akim@epita.fr>
17844
17845 Mid-rule actions are simply... ignored!
17846
17847 * src/reader.c (readgram): Be sure to attach mid-rule actions to
17848 the empty-rule associated to the dummy symbol, not to the host
17849 rule.
17850 * tests/actions.at (Mid-rule actions): New.
17851
17852 2001-12-29 Akim Demaille <akim@epita.fr>
17853
17854 Memory leak.
17855
17856 * src/reader.c (reader): Free grammar.
17857
17858 2001-12-29 Akim Demaille <akim@epita.fr>
17859
17860 Memory leak.
17861
17862 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
17863 since it allocates it for each state, although only one is needed.
17864 (allocate_storage): Do it here.
17865
17866 2001-12-29 Akim Demaille <akim@epita.fr>
17867
17868 * src/options.h, src/options.c (create_long_option_table): Rename
17869 as...
17870 (long_option_table_new): this, with a clearer prototype.
17871 (percent_table): Remove, unused,
17872 * src/getargs.c (getargs): Adjust.
17873
17874 2001-12-29 Akim Demaille <akim@epita.fr>
17875
17876 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
17877 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
17878 as states.
17879
17880 2001-12-29 Akim Demaille <akim@epita.fr>
17881
17882 * src/lalr.c (build_relations): Rename `states' as `states1'.
17883 Sorry, I don't understand exactly what it is, no better name...
17884
17885 2001-12-29 Akim Demaille <akim@epita.fr>
17886
17887 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
17888 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
17889 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
17890 as rules.
17891
17892 2001-12-29 Akim Demaille <akim@epita.fr>
17893
17894 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
17895 ago.
17896
17897 2001-12-29 Akim Demaille <akim@epita.fr>
17898
17899 * src/reader.c, src/reader.h (user_toknums): Remove.
17900 Adjust all users to use symbols[i]->user_token_number.
17901
17902 2001-12-29 Akim Demaille <akim@epita.fr>
17903
17904 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
17905 Adjust all users to use symbols[i]->prec or ->assoc.
17906
17907 2001-12-29 Akim Demaille <akim@epita.fr>
17908
17909 * src/reader.c, src/reader.h (tags): Remove.
17910 Adjust all users to use symbols[i]->tag.
17911
17912 2001-12-29 Akim Demaille <akim@epita.fr>
17913
17914 * src/gram.h, src/gram.c (symbols): New, similar to state_table
17915 and rule_table.
17916 * src/reader.c (packsymbols): Fill this table.
17917 Drop sprec.
17918 * src/conflicts.c (resolve_sr_conflict): Adjust.
17919 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
17920 single table.
17921 Use symbols[i]->tag instead of tags[i].
17922
17923 2001-12-29 Akim Demaille <akim@epita.fr>
17924
17925 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
17926 In addition, put a comment in there, to replace...
17927 * tests/regression.at (%union and C comments): Remove.
17928
17929 2001-12-29 Akim Demaille <akim@epita.fr>
17930
17931 * tests/regression.at (Web2c Actions): Blindly move the actual
17932 output as expected output. The contents *seem* right to me, but I
17933 can't pretend reading perfectly parser tables... Nonetheless, all
17934 the other tests pass correctly, the table look OK, even though the
17935 presence of `$axiom' is to be noted: AFAICS it is useless (but
17936 harmless).
17937
17938 2001-12-29 Akim Demaille <akim@epita.fr>
17939
17940 * src/reader.c (readgram): Don't add the rule 0 if there were no
17941 rules read. In other words, add it _after_ having performed
17942 grammar sanity checks.
17943 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
17944
17945 2001-12-29 Akim Demaille <akim@epita.fr>
17946
17947 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
17948 visible, and some states have now a different number.
17949
17950 2001-12-29 Akim Demaille <akim@epita.fr>
17951
17952 * src/reader.c (readgram): Bind the initial rule's lineno to that
17953 of the first rule.
17954 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
17955 (Solved SR Conflicts): Adjust rule 0's line number.
17956
17957 2001-12-29 Akim Demaille <akim@epita.fr>
17958
17959 Fix the `GAWK Grammar' failure.
17960
17961 * src/LR0.c (final_state): Initialize to -1 so that we do compute
17962 the reductions of the first state which was mistakenly confused
17963 with the final state because precisely final_state was initialized
17964 to 0.
17965 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
17966 now noticed by Bison.
17967 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
17968 have a reduction on $default.
17969
17970 2001-12-29 Akim Demaille <akim@epita.fr>
17971
17972 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
17973 rule line numbers.
17974 * src/closure.c (print_closure): Likewise.
17975 * src/derives.c (print_derives): Likewise.
17976 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
17977 now.
17978
17979 2001-12-29 Akim Demaille <akim@epita.fr>
17980
17981 * src/lalr.c (lookaheads_print): New.
17982 (lalr): Call it when --trace-flag.
17983 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
17984 are dumped.
17985
17986 2001-12-29 Akim Demaille <akim@epita.fr>
17987
17988 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
17989 when walking through ritem, even via rule->rhs.
17990 * src/reduce.c (dump_grammar, useful_production, reduce_output)
17991 (useful_production, useless_nonterminals): Likewise.
17992 (reduce_grammar_tables): Likewise, plus update nritems.
17993 * src/nullable.c (set_nullable): Likewise.
17994 * src/lalr.c (build_relations): Likewise.
17995 * tests/sets.at (Nullable): Adjust.
17996 Fortunately, now, the $axiom is no longer nullable.
17997
17998 2001-12-29 Akim Demaille <akim@epita.fr>
17999
18000 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18001 the 0-sentinel.
18002 * src/gram.c (ritem_longest_rhs): Likewise.
18003 * src/reduce.c (nonterminals_reduce): Likewise.
18004 * src/print_graph.c (print_graph): Likewise.
18005 * src/output.c (output_rule_data): Likewise.
18006 * src/nullable.c (set_nullable): Likewise.
18007
18008 2001-12-29 Akim Demaille <akim@epita.fr>
18009
18010 * src/output.c: Comment changes.
18011
18012 2001-12-27 Paul Eggert <eggert@twinsun.com>
18013
18014 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18015 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18016 Sparc, as they were causing more porting problems than the
18017 (minor) performance improvement was worth.
18018
18019 Also, catch up with 1.31's YYSTD.
18020
18021 2001-12-27 Akim Demaille <akim@epita.fr>
18022
18023 * src/output.c (output_gram): Rely on nritems, not the
18024 0-sentinel. See below.
18025 Use -1 as separator, not 0.
18026 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18027 Rely on -1 as separator in yyrhs, instead of 0.
18028 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18029 twice `Now at end of input', therefore there are two lines less to
18030 expect.
18031
18032 2001-12-27 Akim Demaille <akim@epita.fr>
18033
18034 * tests/regression.at (Unresolved SR Conflicts):
18035 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18036 below.
18037
18038 2001-12-27 Akim Demaille <akim@epita.fr>
18039
18040 * src/LR0.c (new_state): Recognize the final state by the fact it
18041 is reached by eoftoken.
18042 (insert_start_shifting_state, insert_eof_shifting_state)
18043 (insert_accepting_state, augment_automaton): Remove, since now
18044 these states are automatically computed from the initial state.
18045 (generate_states): Adjust.
18046 * src/print.c: When reporting a rule number to the user, substract
18047 1, so that the axiom rule is rule 0, and the first user rule is 1.
18048 * src/reduce.c: Likewise.
18049 * src/print_graph.c (print_core): For the time being, just as for
18050 the report, depend upon --trace-flags to dump the full set of
18051 items.
18052 * src/reader.c (readgram): Once the grammar read, insert the rule
18053 0: `$axiom: START-SYMBOL $'.
18054 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18055 number of the states has changed (the final state is no longer
18056 necessarily the last), catch up.
18057
18058 2001-12-27 Akim Demaille <akim@epita.fr>
18059
18060 Try to make the use of the eoftoken valid. Given that its value
18061 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18062 is used instead of > 0 where appropriate, (ii), depend upon nritems
18063 instead of the 0-sentinel.
18064
18065 * src/gram.h, src/gram.c (nritems): New.
18066 Expected to be duplication of nitems, but for the time being...
18067 * src/reader.c (packgram): Assert nritems and nitems are equal.
18068 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18069 * src/closure.c (print_closure, print_fderives): Likewise.
18070 * src/gram.c (ritem_print): Likewise.
18071 * src/print.c (print_core, print_grammar): Likewise.
18072 * src/print_graph.c: Likewise.
18073
18074 2001-12-27 Akim Demaille <akim@epita.fr>
18075
18076 * src/main.c (main): If there are complains after grammar
18077 reductions, then output the report anyway if requested, then die.
18078 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18079 * src/reader.c (eoftoken): New.
18080 (parse_token_decl): If the token being defined has value `0', it
18081 is the eoftoken.
18082 (packsymbols): No longer hack `tags' to insert `$' by hand.
18083 Be sure to preserve the value of the eoftoken.
18084 (reader): Make sure eoftoken is defined.
18085 Initialize nsyms to 0: now eoftoken is created just like the others.
18086 * src/print.c (print_grammar): Don't special case the eof token.
18087 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18088 lie anyway, albeit pleasant.
18089 * tests/calc.at: Exercise error messages with eoftoken.
18090 Change the grammar so that empty input is invalid.
18091 Adjust expectations.
18092 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18093
18094 2001-12-27 Akim Demaille <akim@epita.fr>
18095
18096 * configure.in: Check the protos of strchr ans strspn.
18097 Replace strchr if needed.
18098 * src/system.h: Provide the protos of strchr, strspn and memchr if
18099 missing.
18100 * lib/strchr.c: New.
18101 * src/reader.c (symbols_save): Use strchr.
18102
18103 2001-12-27 Akim Demaille <akim@epita.fr>
18104
18105 * src/print.c, src/print_graph.c (escape): New.
18106 Use it to quote the TAGS outputs.
18107 * src/print_graph.c (print_state): Now errors are in red, and
18108 reductions in green.
18109 Prefer high to wide: output the state number on a line of its own.
18110
18111 2001-12-27 Akim Demaille <akim@epita.fr>
18112
18113 * src/state.h, src/state.c (reductions_new): New.
18114 * src/LR0.c (set_state_table): Let all the states have a
18115 `reductions', even if reduced to 0.
18116 (save_reductions): Adjust.
18117 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18118 * src/print.c (print_reductions, print_actions): Adjust.
18119 * src/output.c (action_row): Adjust.
18120
18121 2001-12-27 Akim Demaille <akim@epita.fr>
18122
18123 * src/state.h, src/state.c (errs_new, errs_dup): New.
18124 * src/LR0.c (set_state_table): Let all the states have an errs,
18125 even if reduced to 0.
18126 * src/print.c (print_errs, print_reductions): Adjust.
18127 * src/output.c (output_actions, action_row): Adjust.
18128 * src/conflicts.c (resolve_sr_conflict): Adjust.
18129
18130 2001-12-27 Akim Demaille <akim@epita.fr>
18131
18132 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18133
18134 2001-12-27 Akim Demaille <akim@epita.fr>
18135
18136 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18137 * src/print.c: here.
18138 (lookaheadset, shiftset): New, used as additional storage by
18139 print_reductions.
18140 (print_results): Adjust.
18141 (print_shifts, print_gotos, print_errs): New, extracted from...
18142 (print_actions): here.
18143 * src/print_graph.c (print_actions): Remove dead code.
18144
18145 2001-12-27 Akim Demaille <akim@epita.fr>
18146
18147 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18148 `$n' and `@n'.
18149
18150 2001-12-27 Akim Demaille <akim@epita.fr>
18151
18152 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18153 (build_relations): Adjust.
18154
18155 2001-12-27 Akim Demaille <akim@epita.fr>
18156
18157 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18158 duplication.
18159
18160 2001-12-27 Akim Demaille <akim@epita.fr>
18161
18162 * src/reader.c (packgram): Catch nitems overflows.
18163
18164 2001-12-27 Akim Demaille <akim@epita.fr>
18165
18166 * src/files.c, src/files.h (guard_obstack): Remove.
18167 * src/output.c (output): Adjust.
18168 * src/reader.c (parse_braces): New, factoring...
18169 (copy_action, copy_guard): these two which are renamed as...
18170 (parse_action, parse_guard): these.
18171 As a voluntary consequence, using braces around guards is now
18172 mandatory.
18173
18174 2001-12-27 Akim Demaille <akim@epita.fr>
18175
18176 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18177 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18178 members.
18179 (symbol_list_new): Adjust.
18180 (copy_action): action_line is the first line, not the last.
18181 (copy_guard): Just as for actions, store the `action' only, not
18182 the switch/case/break flesh.
18183 Don't parse the user action that might follow the guard, let...
18184 (readgram): do it, i.e., now, there can be an action after a
18185 guard.
18186 In other words the guard is just explicitly optional.
18187 (packgram): Adjust.
18188 * src/output.c (guards_output): New.
18189 (output_parser): Call it when needed.
18190 (output): Also free the guard and attrs obstacks.
18191 * src/files.c, src/files.h (obstack_save): Remove.
18192 (output_files): Remove.
18193 As a result, if one needs the former `.act' file, using an
18194 appropriate skeleton which requires actions and guards is now
18195 required.
18196 * src/main.c (main): Adjust.
18197 * tests/semantic.at: New.
18198 * tests/regression.at: Use `input.y' as input file name.
18199 Avoid 8+3 problems by requiring input.c when the test needs the
18200 parser.
18201
18202 2001-12-27 Akim Demaille <akim@epita.fr>
18203
18204 * src/reader.c (symbol_list_new): Be sure to initialize all the
18205 fields.
18206
18207 2001-12-27 Akim Demaille <akim@epita.fr>
18208
18209 All the hacks using a final pseudo state are now useless.
18210
18211 * src/LR0.c (set_state_table): state_table holds exactly nstates.
18212 * src/lalr.c (nLA): New.
18213 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18214 instead of lookaheadsp from the pseudo state (nstate + 1).
18215
18216 2001-12-27 Akim Demaille <akim@epita.fr>
18217
18218 * src/output.c (action_row, token_actions): Use a state_t instead
18219 of a integer, and nlookaheads instead of the following state's
18220 lookaheadsp.
18221
18222 2001-12-27 Akim Demaille <akim@epita.fr>
18223
18224 * src/conflicts.c (log_resolution, flush_shift)
18225 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18226 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18227 (conflicts_print, print_reductions): Use a state_t instead of an
18228 integer when referring to a state.
18229 As much as possible, depend upon nlookaheads, instead of the
18230 `lookaheadsp' member of the following state (since lookaheads of
18231 successive states are successive, the difference between state n + 1
18232 and n served as the number of lookaheads for state n).
18233 * src/lalr.c (add_lookback_edge): Likewise.
18234 * src/print.c (print_core, print_actions, print_state)
18235 (print_results): Likewise.
18236 * src/print_graph.c (print_core, print_actions, print_state)
18237 (print_graph): Likewise.
18238 * src/conflicts.h: Adjust.
18239
18240 2001-12-27 Akim Demaille <akim@epita.fr>
18241
18242 * src/bison.hairy: Formatting/comment changes.
18243 ANSIfy.
18244 Remove `register' indications.
18245 Add plenty of `static'.
18246
18247 2001-12-27 Akim Demaille <akim@epita.fr>
18248
18249 * src/output.c (prepare): Drop the muscle `ntbase' which
18250 duplicates ntokens.
18251 * src/bison.simple: Formatting/comment changes.
18252 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18253 is an undocumented synonym.
18254
18255 2001-12-22 Akim Demaille <akim@epita.fr>
18256
18257 * src/output.c (output_table_data): Change the prototype to use
18258 `int' for array ranges: some invocations do pass an int, not a
18259 short.
18260 Reported by Wayne Green.
18261
18262 2001-12-22 Akim Demaille <akim@epita.fr>
18263
18264 Some actions of web2c.y are improperly triggered.
18265 Reported by Mike Castle.
18266
18267 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18268 * tests/regression.at (Web2c): Rename as...
18269 (Web2c Report): this.
18270 (Web2c Actions): New.
18271
18272 2001-12-22 Akim Demaille <akim@epita.fr>
18273
18274 Reductions in web2c.y are improperly reported.
18275 Reported by Mike Castle.
18276
18277 * src/conflicts.c (print_reductions): Fix.
18278 * tests/regression.at (Web2c): New.
18279
18280 2001-12-18 Akim Demaille <akim@epita.fr>
18281
18282 Some host fail on `assert (!"foo")', which expands to
18283 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18284 Reported by Nelson Beebee.
18285
18286 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18287 `#define it_succeeded 0' and `assert (it_succeeded)'.
18288
18289 2001-12-17 Marc Autret <autret_m@epita.fr>
18290
18291 * src/bison.simple: Don't hard code the skeleton line and filename.
18292 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18293 New line counter 'skeleton_line' (skeleton-line muscle).
18294
18295 2001-12-17 Paul Eggert <eggert@twinsun.com>
18296
18297 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18298 YYDEBUG must be defined to a nonzero value.
18299
18300 * src/bison.simple (yytname): Do not assume that the user defines
18301 YYDEBUG to a properly parenthesized expression.
18302
18303 2001-12-17 Akim Demaille <akim@epita.fr>
18304
18305 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18306 nlookaheads is a new member.
18307 Adjust all users.
18308 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18309 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18310 state.
18311
18312 2001-12-17 Akim Demaille <akim@epita.fr>
18313
18314 * src/files.h, src/files.c (open_files, close_files): Remove.
18315 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18316 let...
18317 * src/reader.c (reader): Do it.
18318
18319 2001-12-17 Akim Demaille <akim@epita.fr>
18320
18321 * src/conflicts.c (print_reductions): Formatting changes.
18322
18323 2001-12-17 Akim Demaille <akim@epita.fr>
18324
18325 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18326 (flush_reduce): New.
18327 (resolve_sr_conflict): Adjust.
18328
18329 2001-12-17 Akim Demaille <akim@epita.fr>
18330
18331 * src/output.c (output_obstack): Be static and rename as...
18332 (format_obstack): this, to avoid any confusion with files.c's
18333 output_obstack.
18334 * src/reader.h (muscle_obstack): Move to...
18335 * src/output.h: here, since it's defined in output.c.
18336
18337 2001-12-17 Akim Demaille <akim@epita.fr>
18338
18339 * src/output.c (action_row, save_column, default_goto)
18340 (sort_actions, matching_state, pack_vector): Better variable
18341 locality.
18342
18343 2001-12-17 Akim Demaille <akim@epita.fr>
18344
18345 * src/output.c: Various formatting changes.
18346
18347 2001-12-17 Akim Demaille <akim@epita.fr>
18348
18349 * src/files.c (output_files): Free the output_obstack.
18350 * src/main.c (main): Call print and print_graph conditionally.
18351 * src/print.c (print): Work unconditionally.
18352 * src/print_graph.c (print_graph): Work unconditionally.
18353 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18354
18355 2001-12-16 Marc Autret <autret_m@epita.fr>
18356
18357 * src/output.c (actions_output): Fix. When we use %no-lines,
18358 there is one less line per action.
18359
18360 2001-12-16 Marc Autret <autret_m@epita.fr>
18361
18362 * src/bison.simple: Remove a useless #line directive.
18363 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18364 * src/output.c (get_lines_number): New.
18365 (output_parser): Adjust, now takes care about the lines of a
18366 output muscles.
18367 Fix line numbering.
18368 (actions_output): Computes the number of lines taken by actions.
18369 (output_master_parser): Insert new skeleton which is the name of
18370 the output parser file name.
18371
18372 2001-12-15 Marc Autret <autret_m@epita.fr>
18373
18374 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18375
18376 2001-12-15 Marc Autret <autret_m@epita.fr>
18377
18378 * src/output.c (output_gram): Keep track of the hairy one.
18379
18380 2001-12-15 Akim Demaille <akim@epita.fr>
18381
18382 Make `make distcheck' work.
18383
18384 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18385 system.h which uses libgettext.h.
18386
18387 2001-12-15 Akim Demaille <akim@epita.fr>
18388
18389 * src/nullable.c (set_nullable): Useless rules must be skipped,
18390 otherwise, since we range over their symbols, we might look at a
18391 nonterminal which no longer ``exists'', i.e., it is not counted in
18392 `nvars', hence we overflow our arrays.
18393
18394 2001-12-15 Akim Demaille <akim@epita.fr>
18395
18396 The header can also be produced directly, without any obstack!
18397 Yahoo!
18398
18399 * src/files.c, src/files.h (defines_obstack): Remove.
18400 (compute_header_macro): Global.
18401 (defines_obstack_save): Remove.
18402 * src/reader.c (parse_union_decl): No longer output to
18403 defines_obstack: its content can be found in the `stype' muscle
18404 anyway.
18405 (output_token_translations): Merge into...
18406 (symbols_output): this.
18407 Rename as...
18408 (symbols_save): this.
18409 (reader): Adjust.
18410 * src/output.c (header_output): New.
18411 (output): Call it.
18412
18413 2001-12-15 Akim Demaille <akim@epita.fr>
18414
18415 * src/reader.c (parse_union_decl): Instead of handling two obstack
18416 simultaneously, use one to define the `stype' muscle, and use the
18417 value of the latter to fill defines_obstack.
18418 (copy_comment): Remove.
18419 (copy_comment2): Work for a single obstack.
18420 Rename as...
18421 (copy_comment): this.
18422
18423 2001-12-15 Akim Demaille <akim@epita.fr>
18424
18425 * src/lex.c, src/lex.h (xgetc): No longer static.
18426 * src/reader.c (parse_union_decl): Revamp.
18427
18428 2001-12-15 Akim Demaille <akim@epita.fr>
18429
18430 Still making progress in separating Bison into (i) input, (ii)
18431 process, (iii) output: now we can directly output the parser file
18432 without using table_obstack at all.
18433
18434 * src/files.c, src/files.h (table_obstack): Bye bye.
18435 (parser_file_name): New.
18436 * src/files.c (compute_output_file_names): Compute it.
18437 * src/output.c (actions_output, output_parser)
18438 (output_master_parser): To a file instead of an obstack.
18439
18440 2001-12-15 Akim Demaille <akim@epita.fr>
18441
18442 Attach actions to rules, instead of pre-outputting them to
18443 actions_obstack.
18444
18445 * src/gram.h (rule_t): action and action_line are new members.
18446 * src/reader.c (symbol_list): Likewise.
18447 (copy_action): Save the actions within the rule.
18448 (packgram): Save them in rule_table.
18449 * src/output.c (actions_output): New.
18450 (output_parser): Use it on `%%actions'.
18451 (output_rule_data): Don't free rule_table.
18452 (output): Do it.
18453 (prepare): Don't save the `action' muscle.
18454 * src/bison.simple: s/%%action/%%actions/.
18455
18456 2001-12-15 Akim Demaille <akim@epita.fr>
18457
18458 * src/reader.c (copy_action): When --yacc, don't append a `;'
18459 to the user action: let it fail if lacking.
18460 Suggested by Arnold Robbins and Tom Tromey.
18461
18462 2001-12-14 Akim Demaille <akim@epita.fr>
18463
18464 * src/lex.c (literalchar): Simply return the char you decoded, non
18465 longer mess around with obstacks and int pointers.
18466 Adjust all callers.
18467
18468 2001-12-14 Akim Demaille <akim@epita.fr>
18469
18470 * src/lex.c (literalchar): Don't escape the special characters,
18471 just decode them, and keep them as char (before, eol was output as
18472 the 2 char string `\n' etc.).
18473 * src/output.c (output_rule_data): Use quotearg to output the
18474 token strings.
18475
18476 2001-12-13 Paul Eggert <eggert@twinsun.com>
18477
18478 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18479 Do not infringe on the global user namespace when using C++.
18480 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18481 All uses of `fprintf' and `stderr' changed.
18482
18483 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18484
18485 2001-12-13 Akim Demaille <akim@epita.fr>
18486
18487 The computation of nullable is broken: it doesn't handle empty
18488 RHS's properly.
18489
18490 * tests/torture.at (GNU AWK Grammar): New.
18491 * tests/sets.at (Nullable): New.
18492 * src/nullable.c (set_nullable): Instead of blindly looping over
18493 `ritems', loop over the rules, and then over their rhs's.
18494
18495 Work around Autotest bugs.
18496
18497 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18498 frame, because Autotest understand lines starting with a `+' as
18499 traces from the shell. Then, they are not processed properly.
18500 Admittedly an Autotest bug, but we don't have time to wait for
18501 Autotest to catch up.
18502 * tests/regression.at (Broken Closure): Adjust to the new table
18503 frames.
18504 Move to...
18505 * tests/sets.at: here.
18506
18507 2001-12-13 Akim Demaille <akim@epita.fr>
18508
18509 * src/closure.c (closure): Use nrules instead of playing tricks
18510 with BITS_PER_WORD.
18511
18512 2001-12-13 Akim Demaille <akim@epita.fr>
18513
18514 * src/print.c (print_actions): Output the handling of `$' as the
18515 traces do: shifting the token EOF. Before EOF was treated as a
18516 nonterminal.
18517 * tests/regression.at: Adjust some tests.
18518 * src/print_graph.c (print_core): Complete the set of items via
18519 closure. The next-to-final and final states are still unsatisfying,
18520 but that's to be addressed elsewhere.
18521 No longer output the rule numbers, but do output the state number.
18522 A single loop for the shifts + gotos is enough, but picked a
18523 distinct color for each.
18524 (print_graph): Initialize and finalize closure.
18525
18526 2001-12-13 Akim Demaille <akim@epita.fr>
18527
18528 * src/reader.c (readgram): Remove dead code, an strip useless
18529 braces.
18530 (get_type): Remove, unused.
18531
18532 2001-12-12 Akim Demaille <akim@epita.fr>
18533
18534 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18535 on that of lib/error.c.
18536
18537 2001-12-12 Akim Demaille <akim@epita.fr>
18538
18539 Some hosts don't like `/' in includes.
18540
18541 * src/system.h: Include libgettext.h without qualifying the path.
18542 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18543 $(top_srcdir).
18544
18545 2001-12-11 Marc Autret <autret_m@epita.fr>
18546
18547 * src/output.c (output_parser): Remove useless muscle.
18548
18549 2001-12-11 Marc Autret <autret_m@epita.fr>
18550
18551 * src/bison.simple: Remove #line just before %%epilogue. It
18552 is now handled in ...
18553 * src/reader.c (read_additionnal_code): Add the output of a
18554 #line for the epilogue.
18555
18556 2001-12-10 Marc Autret <autret_m@epita.fr>
18557
18558 * src/reader.c (copy_definition): Re-use CPP-outed code which
18559 replace precedent remove.
18560 * src/bison.simple: Remove #line before %%prologue because
18561 %%input-line is wrong at this time.
18562
18563 2001-12-10 Marc Autret <autret_m@epita.fr>
18564
18565 * src/reader.c (symbols_output): Clean up.
18566 * src/output.c (output_gram, output): Clean up.
18567
18568 2001-12-10 Akim Demaille <akim@epita.fr>
18569
18570 * src/lalr.c (initialize_lookaheads): New. Extracted from...
18571 * src/LR0.c (set_state_table): here.
18572 * src/lalr.c (lalr): Call it.
18573
18574 2001-12-10 Akim Demaille <akim@epita.fr>
18575
18576 * src/state.h (shifts): Remove the `number' member: shifts are
18577 attached to state, hence no longer need to be labelled with a
18578 state number.
18579
18580 2001-12-10 Akim Demaille <akim@epita.fr>
18581
18582 Now that states have a complete set of members, the linked list of
18583 shifts is useless: just fill directly the state's shifts member.
18584
18585 * src/state.h (shifts): Remove the `next' member.
18586 * src/LR0.c (first_state, last_state): Remove.
18587 Adjust the callers.
18588 (augment_automaton): Don't look for the shifts that must be added
18589 a shift on EOF: it is those of the state we looked for! But now,
18590 since shifts are attached, it is no longer needed to looking
18591 merely by its id: its number.
18592
18593 2001-12-10 Akim Demaille <akim@epita.fr>
18594
18595 * src/LR0.c (augment_automaton): Better variable locality.
18596 Remove an impossible branch: if there is a state corresponding to
18597 the start symbol being shifted, then there is shift for the start
18598 symbol from the initial state.
18599
18600 2001-12-10 Akim Demaille <akim@epita.fr>
18601
18602 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
18603 only when appropriate: when insert_start_shifting_state' is not
18604 invoked.
18605 * tests/regression.at (Rule Line Numbers): Adjust.
18606
18607 2001-12-10 Akim Demaille <akim@epita.fr>
18608
18609 * src/LR0.c (augment_automaton): Now that all states have shifts,
18610 merge the two cases addition shifts to the initial state.
18611
18612 2001-12-10 Akim Demaille <akim@epita.fr>
18613
18614 * src/lalr.c (set_state_table): Move to...
18615 * src/LR0.c: here.
18616 * src/lalr.c (lalr): Don't call it...
18617 * src/LR0.c (generate_states): do it.
18618 * src/LR0.h (first_state): Remove, only the table is used.
18619
18620 2001-12-10 Akim Demaille <akim@epita.fr>
18621
18622 * src/LR0.h (first_shift, first_reduction): Remove.
18623 * src/lalr.c: Don't use first_shift: find shifts through the
18624 states.
18625
18626 2001-12-10 Akim Demaille <akim@epita.fr>
18627
18628 * src/LR0.c: Attach shifts to states as soon as they are
18629 computed.
18630 * src/lalr.c (set_state_table): Instead of assigning shifts to
18631 state, just assert that the mapping was properly done.
18632
18633 2001-12-10 Akim Demaille <akim@epita.fr>
18634
18635 * src/LR0.c (insert_start_shift): Rename as...
18636 (insert_start_shifting_state): this.
18637 (insert_eof_shifting_state, insert_accepting_state): New.
18638 (augment_automaton): Adjust.
18639 Better locality of the variables.
18640 When looking if the start_symbol is shifted from the initial
18641 state, using `while (... symbol != start_symbol ...)' sounds
18642 better than `while (... symbol < start_symbol ...)': If fail
18643 to see how the order between symbols could be relevant!
18644
18645 2001-12-10 Akim Demaille <akim@epita.fr>
18646
18647 * src/getargs.h: Don't declare `spec_name_prefix' and
18648 `spec_file_prefix', declared by src/files.h.
18649 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
18650 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
18651 * src/output.c (prepare): Adjust.
18652 * src/reader.c (symbols_output): Likewise.
18653 * src/vmsgetargs.c: Vaguely adjust, but who cares?
18654
18655 2001-12-10 Akim Demaille <akim@epita.fr>
18656
18657 * src/muscle_tab.c (muscle_init): NULL is a better default than
18658 `"0"'.
18659
18660 2001-12-10 Akim Demaille <akim@epita.fr>
18661
18662 * src/reader.c (reader): Calling symbols_output once is enough.
18663
18664 2001-12-10 Akim Demaille <akim@epita.fr>
18665
18666 Now that states have a complete set of members, the linked list of
18667 reductions is useless: just fill directly the state's reductions
18668 member.
18669
18670 * src/state.h (struct reductions): Remove member `number' and
18671 `next'.
18672 * src/LR0.c (first_reduction, last_reduction): Remove.
18673 (save_reductions): Don't link the new reductions, store them in
18674 this_state.
18675 * src/lalr.c (set_state_table): No need to attach reductions to
18676 states, it's already done.
18677 * src/output.c (output_actions): No longer free the shifts, then
18678 the reductions, then the states: free all the states and their
18679 members.
18680
18681 2001-12-10 Akim Demaille <akim@epita.fr>
18682
18683 * src/options.c (OPTN, DRTV, BOTH): New.
18684 (option_table): Use them.
18685
18686 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
18687 the job of system.h.
18688 * src/options.c: Don't include stdio.h and xalloc.h for the same
18689 reasons.
18690
18691 2001-12-10 Akim Demaille <akim@epita.fr>
18692
18693 * src/output.c (output, prepare): Make sure the values of the
18694 muscles `action' and `prologue' are 0-terminated.
18695
18696 2001-12-10 Akim Demaille <akim@epita.fr>
18697
18698 Clean up GCC warnings.
18699
18700 * src/reader.c (copy_action): `buf' is not used.
18701 (parse_skel_decl): Be static.
18702 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
18703 * src/options.h (create_long_option_table): Have a real prototype.
18704 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
18705 (hash_delete_at): Return const void *.
18706 Adjust casts to preserve the const.
18707
18708 2001-12-10 Akim Demaille <akim@epita.fr>
18709
18710 * configure.in: Require 2.52g.
18711 M4 is not needed, but AUTOM4TE is.
18712 * m4/m4.m4: Remove.
18713 * tests/Makefile.am: Adjust.
18714
18715 2001-12-10 Akim Demaille <akim@epita.fr>
18716
18717 One structure for states is enough, even though theoretically
18718 there are LR(0) states and LALR(1) states.
18719
18720 * src/lalr.h (state_t): Remove.
18721 (state_table): Be state_t **, not state_t *.
18722 * src/state.h (core, CORE_ALLOC): Rename as...
18723 (state_t, STATE_ALLOC): this.
18724 Add the LALR(1) members: shifts, reductions, errs.
18725 * src/LR0.c (state_table): Rename as...
18726 (state_hash): this, to avoid name clashes with the global
18727 `state_table'.
18728 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
18729 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
18730
18731 2001-12-10 Akim Demaille <akim@epita.fr>
18732
18733 Bison dumps core on bash.y.
18734 Reported by Pascal Bart.
18735
18736 * src/warshall.c (bitmatrix_print): New.
18737 (TC): Use it.
18738 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
18739 j must be the outer loop.
18740 * tests/regression.at (Broken Closure): New.
18741
18742 2001-12-05 Akim Demaille <akim@epita.fr>
18743
18744 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
18745 its argument.
18746 Reported by Peter Hamorsky.
18747
18748 2001-12-05 Akim Demaille <akim@epita.fr>
18749
18750 * src/conflicts.c (err_table): Remove.
18751 (resolve_sr_conflict): Adjust.
18752 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
18753 Rename as...
18754 (state_t.reductions, state_t.shifts): this.
18755
18756 2001-12-05 Akim Demaille <akim@epita.fr>
18757
18758 * src/reduce.c (reduce_grammar_tables): No longer disable the
18759 removal of useless rules via CPP but via `if (0)', so that the
18760 compiler still check the code is valid.
18761 For instance, it should have noticed `rline' no longer exists: use
18762 the `line' member of rule_t.
18763 * src/gram.c (dummy, rline): Remove, unused.
18764
18765 2001-12-05 Akim Demaille <akim@epita.fr>
18766
18767 * src/output.c (pack_vector): Use assert, not berror.
18768 * src/main.c (berror): Remove, unused.
18769
18770 2001-12-05 Akim Demaille <akim@epita.fr>
18771
18772 New experimental feature: if --verbose --trace output all the
18773 items of a state, not only its kernel.
18774
18775 * src/print.c (print_core): If `trace_flag', then invoke closure
18776 before outputting the items of the state (print_core is no longer
18777 a correct name them).
18778 (print_results): Invoke new_closure/free_closure if needed.
18779
18780 2001-12-05 Akim Demaille <akim@epita.fr>
18781
18782 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
18783 * src/closure.c, src/closure.h (itemsetsize): Rename as...
18784 (nitemset): for consistency with the rest of the project.
18785
18786 2001-12-05 Akim Demaille <akim@epita.fr>
18787
18788 * src/closure.c (print_closure): Improve.
18789 (closure): Use it for printing input and output.
18790
18791 2001-12-05 Akim Demaille <akim@epita.fr>
18792
18793 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
18794 indexed by nonterminals.
18795
18796 2001-12-05 Akim Demaille <akim@epita.fr>
18797
18798 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
18799 what it was!).
18800 * src/warshall.h: Remove accidental duplication of the content.
18801
18802 2001-12-05 Akim Demaille <akim@epita.fr>
18803
18804 * src/closure.c (set_fderives): De-obfuscate.
18805
18806 2001-12-05 Akim Demaille <akim@epita.fr>
18807
18808 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
18809
18810 2001-12-05 Akim Demaille <akim@epita.fr>
18811
18812 * src/closure.c (set_firsts): De-obfuscate.
18813
18814 2001-12-05 Akim Demaille <akim@epita.fr>
18815
18816 * src/output.c (action_row): De-obfuscate
18817 using the good o' techniques: arrays not pointers, variable
18818 locality, BITISSET, RESETBIT etc.
18819
18820 2001-12-05 Akim Demaille <akim@epita.fr>
18821
18822 Pessimize the code to simplify it: from now on, all the states
18823 have a valid SHIFTS, which NSHIFTS is possibly 0.
18824
18825 * src/LR0.c (shifts_new): Be global and move to..
18826 * src/state.c, src/state.h: here.
18827 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
18828 * src/print_graph: Adjust.
18829
18830 2001-12-05 Akim Demaille <akim@epita.fr>
18831
18832 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
18833 * src/conflicts.c: Use it.
18834 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
18835 incorrectly ``simplified''.
18836
18837 2001-12-05 Akim Demaille <akim@epita.fr>
18838
18839 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
18840 using the good o' techniques: arrays not pointers, variable
18841 locality, BITISSET, RESETBIT etc.
18842
18843 2001-12-05 Akim Demaille <akim@epita.fr>
18844
18845 * src/state.h (SHIFT_SYMBOL): New.
18846 * src/conflicts.c: Use it to deobfuscate.
18847
18848 2001-12-05 Akim Demaille <akim@epita.fr>
18849
18850 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
18851 (print_reductions): De-obfuscate using the good o' techniques:
18852 arrays not pointers, variable locality, BITISSET.
18853
18854 2001-12-05 Akim Demaille <akim@epita.fr>
18855
18856 * src/conflicts.c (print_reductions): Arrays, not pointers.
18857 Use BITISSET.
18858
18859 2001-12-05 Akim Demaille <akim@epita.fr>
18860
18861 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18862
18863 2001-12-05 Akim Demaille <akim@epita.fr>
18864
18865 * src/conflicts.c (print_reductions): Improve variable locality.
18866
18867 2001-12-05 Akim Demaille <akim@epita.fr>
18868
18869 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18870
18871 2001-12-05 Akim Demaille <akim@epita.fr>
18872
18873 * src/conflicts.c (print_reductions): Improve variable locality.
18874
18875 2001-12-05 Akim Demaille <akim@epita.fr>
18876
18877 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
18878 * src/lalr.c: Use them.
18879
18880 2001-12-05 Akim Demaille <akim@epita.fr>
18881
18882 * src/LR0.c (augment_automaton): Formatting changes.
18883 Better variable locality.
18884
18885 2001-12-05 Akim Demaille <akim@epita.fr>
18886
18887 * src/lalr.c (matrix_print): New.
18888 (transpose): Use it.
18889 Use arrays instead of pointers.
18890
18891 2001-12-05 Akim Demaille <akim@epita.fr>
18892
18893 * src/lalr.c (maxrhs): Move to...
18894 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
18895 * src/lalr.c (build_relations): Adjust.
18896
18897 2001-12-05 Akim Demaille <akim@epita.fr>
18898
18899 * src/lalr.c (transpose): Free the memory allocated to the
18900 argument, as it is replaced by the results by the unique caller.
18901 (build_relations): Merely invoke transpose: it handles the memory
18902 deallocation.
18903 Improve variable locality.
18904 Avoid variables used as mere abbreviations.
18905 (compute_lookaheads): Use arrays instead of pointers.
18906
18907 2001-12-05 Akim Demaille <akim@epita.fr>
18908
18909 * src/lalr.c (initialize_F): Improve variable locality.
18910 Avoid variables used as mere abbreviations.
18911
18912 2001-12-05 Akim Demaille <akim@epita.fr>
18913
18914 * src/derives.c (print_derives): Display the ruleno.
18915 * src/lalr.c (initialize_F, transpose): Better variable locality
18916 to improve readability.
18917 Avoid variables used as mere abbreviations.
18918
18919 2001-12-05 Akim Demaille <akim@epita.fr>
18920
18921 * src/lalr.c (traverse): Use arrays instead of pointers.
18922
18923 2001-12-05 Akim Demaille <akim@epita.fr>
18924
18925 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
18926 the handling of squeue.
18927 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18928
18929 2001-12-05 Akim Demaille <akim@epita.fr>
18930
18931 Because useless nonterminals are now kept alive (instead of being
18932 `destroyed'), we now sometimes examine them, and store information
18933 related to them. Hence we need to know their number, and adjust
18934 memory allocations.
18935
18936 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
18937 static.
18938 * src/LR0.c (allocate_itemsets): The memory allocated to
18939 `symbol_count' was used for two different purpose: once to count
18940 the number of occurrences of each symbol, and later reassigned to
18941 `shift_symbol', containing the symbol that can be shifted from a
18942 given state.
18943 Deobfuscate, i.e., allocate, use and free `symbol_count' here
18944 only, and...
18945 (new_itemsets): Allocate `shift_symbol' here.
18946 (allocate_itemsets): symbol_count includes useless nonterminals.
18947 Make room for them.
18948 (free_storage): Use `free', not `XFREE', for pointers that cannot
18949 be null.
18950
18951 2001-12-05 Akim Demaille <akim@epita.fr>
18952
18953 * src/nullable.c (set_nullable): Deobfuscate the handling of
18954 ritem.
18955 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18956
18957 2001-12-05 Akim Demaille <akim@epita.fr>
18958
18959 * src/gram.c, src/gram.h (ritem_print): New.
18960 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
18961 (This useless function was defined only to work around VMS linkers
18962 that can't handle compilation units with variables only).
18963 * src/reduce.c (dump_grammar): Use it to trace the construction of
18964 ritem.
18965
18966 2001-12-04 Paul Eggert <eggert@twinsun.com>
18967
18968 * src/bison.simple (union yyalloc): Change member names
18969 to be the same as the stack names.
18970 (yyparse): yyptr is now union yyalloc *, not char *.
18971 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
18972 and may generate better code on some machines.
18973 (yystpcpy): Use prototype if __STDC__ is defined, not just
18974 if __cplusplus is defined.
18975
18976 2001-11-30 Akim Demaille <akim@epita.fr>
18977
18978 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
18979 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
18980 Gettext doesn't compile cleanly, and dies with -Werror.
18981 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
18982 Include WARNING_CFLAGS here.
18983 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
18984 before being defined.
18985
18986 2001-11-27 Paul Eggert <eggert@twinsun.com>
18987
18988 * lib/quotearg.h (quotearg_n, quotearg_n_style):
18989 First arg is int, not unsigned.
18990 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
18991 (SIZE_MAX, UINT_MAX): New macros.
18992 (quotearg_n_options): Abort if N is negative.
18993 Avoid overflow check on hosts where size_t is 64 bits and int
18994 is 32 bits, as overflow is impossible there.
18995 Fix off-by-one typo that caused unnecessary reallocation.
18996
18997 2001-11-29 Paul Eggert <eggert@twinsun.com>
18998
18999 Name space cleanup in generated parser.
19000
19001 * doc/bison.texinfo (Bison Parser): Discuss system headers
19002 and their effect on the user name space.
19003
19004 * src/bison.simple:
19005 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19006 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19007 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19008
19009 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19010 on user names when possible.
19011
19012 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19013 Simplify test for whather <alloca.h> exists.
19014
19015 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19016
19017 (<stdio.h>): Include if YYDEBUG.
19018
19019 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19020 ! defined (yyoverflow) && ! defined (yymemcpy).
19021
19022 (yymemcpy, yyparse): Rename local variables as needed so that
19023 they all begin with 'yy'.
19024
19025 (yystrlen, yystpcpy): New functions.
19026
19027 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19028 All uses changed.
19029
19030 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19031 instead of relying on string.h functions. Use YYSTACK_ALLOC
19032 and YYSTACK_FREE instead of malloc and free.
19033
19034 2001-11-30 Akim Demaille <akim@epita.fr>
19035
19036 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19037 before their first uses.
19038 (YYBISON, YYPURE): Move to the top of the output.
19039
19040 2001-11-30 Akim Demaille <akim@epita.fr>
19041
19042 * tests/reduce.at (Useless Nonterminals): Fix.
19043
19044 2001-11-30 Akim Demaille <akim@epita.fr>
19045
19046 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19047 if body instead of `;' to pacify GCC's warnings.
19048
19049 2001-11-30 Akim Demaille <akim@epita.fr>
19050
19051 Instead of mapping the LHS of unused rules to -1, keep the LHS
19052 valid, but flag the rules as invalid.
19053
19054 * src/gram.h (rule_t): `useful' is a new member.
19055 * src/print.c (print_grammar): Adjust.
19056 * src/derives.c (set_derives): Likewise.
19057 * src/reader.c (packgram, reduce_output): Likewise.
19058 * src/reduce.c (reduce_grammar_tables): Likewise.
19059 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19060
19061 2001-11-30 Akim Demaille <akim@epita.fr>
19062
19063 * src/reduce.c (reduce_output): Formatting changes.
19064 * src/print.c (print_results, print_grammar): Likewise.
19065 * tests/regression.at (Rule Line Numbers)
19066 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19067
19068 2001-11-30 Akim Demaille <akim@epita.fr>
19069
19070 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19071 useless nonterminals, move them at the end of the symbol arrays.
19072 (reduce_output): Adjust.
19073 * tests/reduce.at (Useless Nonterminals): Adjust.
19074
19075 2001-11-30 Akim Demaille <akim@epita.fr>
19076
19077 * src/reduce.c: Various comment/formatting changes.
19078 (nonterminals_reduce): New, extracted from...
19079 (reduce_grammar_tables): here.
19080 (reduce_grammar): Call nonterminals_reduce.
19081
19082 2001-11-29 Paul Eggert <eggert@twinsun.com>
19083
19084 * src/bison.simple (YYSTACK_REALLOC): Remove.
19085 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19086 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19087 New macros.
19088 (union yyalloc): New type.
19089 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19090 an arbitrary restriction on hosts where size_t is wider than int.
19091
19092 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19093 a parser stack overflow. Allocate just one block of memory for all
19094 three stacks, instead of allocating three blocks; this typically is
19095 faster and reduces fragmentation.
19096
19097 Do not limit the number of items in the stack to a value that fits
19098 in 'int', as this is an arbitrary limit on hosts with 64-bit
19099 size_t and 32-bit int.
19100
19101 2001-11-29 Marc Autret <autret_m@epita.fr>
19102
19103 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19104 of defining YYERROR_VERBOSE.
19105 [AT_DATA]: $4 is now out of C declarations in the prologue.
19106
19107 2001-11-28 Marc Autret <autret_m@epita.fr>
19108
19109 * src/reader.c (parse_dquoted_param): New.
19110 (parse_skel_decl): Use it.
19111 * src/lex.h: Add its prototype.
19112 * src/lex.c (literalchar): Become not static.
19113
19114 2001-11-28 Marc Autret <autret_m@epita.fr>
19115
19116 * src/output.h: And put its extern declaration here.
19117 * src/output.c (error_verbose): Define here.
19118 (prepare): Echo name modification.
19119 * src/getargs.h: Clean its extern declaration.
19120 * src/getargs.c (error_verbose_flag): Remove.
19121 (getargs): Remove case 'e'.
19122 * src/options.c (option_table): 'error-verbose' is now seen as simple
19123 percent option.
19124 Include output.h.
19125
19126 * src/reader.c (read_declarations): Remove case tok_include.
19127 (parse_include_decl): Remove.
19128 * src/lex.h (token_t): Remove tok_include.
19129 * src/options.c (option_table): 'include' is now a simple command line
19130 option.
19131
19132 2001-11-28 Marc Autret <autret_m@epita.fr>
19133
19134 * src/bison.simple: Adjust muscle names.
19135 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19136 * src/output.c (prepare): s/_/-/ for the muscles names.
19137 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19138
19139 2001-11-28 Marc Autret <autret_m@epita.fr>
19140
19141 * src/bison.simple: Fix debug.
19142 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19143
19144 2001-11-28 Akim Demaille <akim@epita.fr>
19145
19146 * src/LR0.c (shifts_new): New.
19147 (save_shifts, insert_start_shift, augment_automaton): Use it.
19148
19149 2001-11-28 Akim Demaille <akim@epita.fr>
19150
19151 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19152 keep ruleno only.
19153
19154 2001-11-28 Akim Demaille <akim@epita.fr>
19155
19156 * src/closure.c (closure): Instead of looping over word in array
19157 then bits in words, loop over bits in array.
19158
19159 2001-11-28 Akim Demaille <akim@epita.fr>
19160
19161 * src/closure.c (closure): No longer optimize the special case
19162 where all the bits of `ruleset[r]' are set to 0, to make the code
19163 clearer.
19164
19165 2001-11-28 Akim Demaille <akim@epita.fr>
19166
19167 * src/closure.c (closure): `r' and `c' are new variables, used to
19168 de-obfuscate accesses to RULESET and CORE.
19169
19170 2001-11-28 Akim Demaille <akim@epita.fr>
19171
19172 * src/reduce.c (reduce_print): Use ngettext.
19173 (dump_grammar): Improve the trace accuracy.
19174
19175 2001-11-28 Akim Demaille <akim@epita.fr>
19176
19177 * src/reduce.c (dump_grammar): Don't translate trace messages.
19178
19179 2001-11-28 Akim Demaille <akim@epita.fr>
19180
19181 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19182 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19183 as all tags are free'ed afterwards.
19184 From Enrico Scholz.
19185
19186 2001-11-27 Paul Eggert <eggert@twinsun.com>
19187
19188 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19189 use alloca when we didn't want to, and vice versa.
19190
19191 2001-11-27 Marc Autret <autret_m@epita.fr>
19192
19193 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19194 initialization.
19195 * src/output.c (prepare): Remove its update.
19196
19197 2001-11-27 Marc Autret <autret_m@epita.fr>
19198
19199 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19200 Use %error-verbose.
19201
19202 2001-11-27 Marc Autret <autret_m@epita.fr>
19203
19204 * src/bison.simple: Remove YYERROR_VERBOSE using.
19205 Use %%error_verbose.
19206 (yyparse): Likewise.
19207 * src/output.c (prepare): Give its final value.
19208 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19209 * src/getargs.h: Add its extern declaration.
19210 * src/getargs.c (error_verbose_flag): New int.
19211 (getargs): Update to catch new case.
19212 * src/options.c (option_table): 'error-verbose' is a new option.
19213 (shortopts): Update.
19214
19215 2001-11-27 Akim Demaille <akim@epita.fr>
19216
19217 * src/system.h: Use intl/libgettext.h.
19218 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19219
19220 2001-11-27 Akim Demaille <akim@epita.fr>
19221
19222 * tests/torture.at (Exploding the Stack Size with Malloc):
19223 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19224
19225 2001-11-27 Akim Demaille <akim@epita.fr>
19226
19227 * src/files.c: Include error.h.
19228 Reported by Hans Aberg.
19229
19230 2001-11-26 Marc Autret <autret_m@epita.fr>
19231
19232 * src/reader.c (parse_include_decl): New, not yet implemented.
19233 (read_declarations): Add case tok_include.
19234 * src/getargs.h (include): Add its extern definition.
19235 * src/getargs.c (include): New const char *.
19236 (getargs): Add case '-I'.
19237 * src/options.c (option_table): Add include as command line and
19238 percent option.
19239 * src/lex.h (token_t): Add tok_include.
19240
19241 2001-11-26 Akim Demaille <akim@epita.fr>
19242
19243 * src/reader.c (readgram): Make sure rules for mid-rule actions
19244 have a lineno equal to that of their host rule.
19245 Reported by Hans Aberg.
19246 * tests/regression.at (Rule Line Numbers): New.
19247
19248 2001-11-26 Akim Demaille <akim@epita.fr>
19249
19250 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19251 size_ts.
19252
19253 2001-11-26 Akim Demaille <akim@epita.fr>
19254
19255 * src/complain.c, src/complain.h (error): Remove, provided by
19256 lib/error.[ch].
19257
19258 2001-11-26 Akim Demaille <akim@epita.fr>
19259
19260 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19261 issue an error message.
19262 * tests/regression.at (Invalid %directive): New.
19263 Reported by Hans Aberg.
19264
19265 2001-11-26 Akim Demaille <akim@epita.fr>
19266
19267 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19268 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19269
19270 2001-11-26 Akim Demaille <akim@epita.fr>
19271
19272 * src/conflicts.c (conflicts_print): Don't complain at all when
19273 there are no reduce/reduce conflicts, and as many shift/reduce
19274 conflicts as expected.
19275 * tests/regression.at (%expect right): Adjust.
19276
19277 2001-11-23 Akim Demaille <akim@epita.fr>
19278
19279 * lib/alloca.c: Update, from fileutils.
19280
19281 2001-11-23 Akim Demaille <akim@epita.fr>
19282
19283 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19284
19285 2001-11-23 Akim Demaille <akim@epita.fr>
19286
19287 * src/system.h: Include alloca.h.
19288 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19289
19290 2001-11-23 Akim Demaille <akim@epita.fr>
19291
19292 * src/print_graph.c (print_actions): Remove `rule', unused.
19293 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19294 pacify GCC's signed < unsigned warnings.
19295 * src/closure.c (itemsetsize): Likewise.
19296 * src/reader.c (symbol_list_new): Static.
19297
19298 2001-11-23 Akim Demaille <akim@epita.fr>
19299
19300 Attaching lineno to buckets is stupid, since only one copy of each
19301 symbol is kept, only the line of the first occurrence is kept too.
19302
19303 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19304 * src/reader.c (rline_allocated): Remove, unused.
19305 (symbol_list): Have a `line' member.
19306 (symbol_list_new): New.
19307 (readgram): Use it.
19308 * src/print.c (print_grammar): Output the rule line numbers.
19309 * tests/regression.at (Solved SR Conflicts)
19310 (Unresolved SR Conflicts): Adjust.
19311 Reported by Hans Aberg.
19312
19313 2001-11-22 Marc Autret <autret_m@epita.fr>
19314
19315 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19316
19317 2001-11-22 Marc Autret <autret_m@epita.fr>
19318
19319 * src/muscle_tab.c (muscle_init): Remove initialization of
19320 skeleton muscle.
19321 * src/output.c (output_master_parser): Do it here.
19322
19323 2001-11-20 Akim Demaille <akim@epita.fr>
19324
19325 * po/sv.po: New.
19326 * configure.in (ALL_LINGUAS): Adjust.
19327 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19328 longer contains strings to translate.
19329
19330 2001-11-19 Akim Demaille <akim@epita.fr>
19331
19332 * src/conflicts.c (conflicts_print): Add a missing \n.
19333
19334 2001-11-19 Akim Demaille <akim@epita.fr>
19335
19336 * src/nullable.c (nullable_print): New.
19337 (set_nullable): Call it when tracing.
19338 Better locality of variables.
19339
19340 2001-11-19 Akim Demaille <akim@epita.fr>
19341
19342 * src/print.c (print_actions): Better locality of variables.
19343
19344 2001-11-19 Akim Demaille <akim@epita.fr>
19345
19346 * src/derives.c (print_derives): Fix and enrich.
19347 * src/closure.c (print_fderives): Likewise.
19348
19349 2001-11-19 Akim Demaille <akim@epita.fr>
19350
19351 * src/closure.c (itemsetend): Remove, replaced with...
19352 (itemsetsize): new.
19353
19354 2001-11-19 Akim Demaille <akim@epita.fr>
19355
19356 * src/LR0.c (kernel_end): Remove, replaced with...
19357 (kernel_size): new.
19358
19359 2001-11-19 Akim Demaille <akim@epita.fr>
19360
19361 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19362 to clarify.
19363
19364 2001-11-19 Akim Demaille <akim@epita.fr>
19365
19366 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19367
19368 2001-11-19 Akim Demaille <akim@epita.fr>
19369
19370 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19371 trace messages.
19372 * src/LR0.c: Likewise.
19373 (allocate_itemsets): Use arrays instead of pointers to clarify.
19374
19375 2001-11-19 Akim Demaille <akim@epita.fr>
19376
19377 * src/getargs.c (statistics_flag): Replace with...
19378 (trace_flag): New.
19379 (longopts): Accept --trace instead of --statistics.
19380 * src/getargs.h, src/options.c: Adjust.
19381 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19382 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19383
19384 2001-11-19 Akim Demaille <akim@epita.fr>
19385
19386 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
19387 pointers to clarify the code.
19388 (save_reductions, save_shifts): Factor common parts of alternatives.
19389
19390 2001-11-19 Akim Demaille <akim@epita.fr>
19391
19392 * src/LR0.c (new_state, get_state): Complete TRACE code.
19393 * src/closure.c: Include `reader.h' to get `tags', needed by the
19394 trace code.
19395 Rename the conditional DEBUG as TRACE.
19396 Output consistently TRACEs to stderr, not stdout.
19397 * src/derives.c: Likewise.
19398 * src/reduce.c: (inaccessable_symbols): Using if is better style
19399 than goto.
19400 Use `#if TRACE' instead of `#if 0' for tracing code.
19401
19402 2001-11-19 Akim Demaille <akim@epita.fr>
19403
19404 * src/system.h (LIST_FREE, shortcpy): New.
19405 * src/LR0.c: Use them.
19406 * src/output.c (free_itemsets, free_reductions, free_shifts):
19407 Remove, replaced by LIST_FREE.
19408
19409 2001-11-19 Akim Demaille <akim@epita.fr>
19410
19411 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19412 (REDUCTIONS_ALLOC): New.
19413 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19414 allocation.
19415
19416 2001-11-19 Akim Demaille <akim@epita.fr>
19417
19418 * src/LR0.c (new_state): Complete trace code.
19419 * src/nullable.c (set_nullable): Don't translate traces.
19420
19421 2001-11-19 Akim Demaille <akim@epita.fr>
19422
19423 * src/print_graph.c (print_core): Better locality of variables.
19424 * src/print.c (print_core): Likewise.
19425
19426 2001-11-19 Akim Demaille <akim@epita.fr>
19427
19428 * src/vcg.c: You do the output, so you are responsible of the
19429 handling of VCG syntax, in particular: use quotearg.
19430 * src/print_graph.c: Don't.
19431 (print_actions): Don't output the actions as part of the nodes,
19432 since that's the job of the edges.
19433 (print_state): Don't output by hand: fill the node description,
19434 and ask for its output.
19435
19436 2001-11-19 Akim Demaille <akim@epita.fr>
19437
19438 * src/bison.simple (yyparse): When verbosely reporting an error,
19439 no longer put additional quotes around token names.
19440 * tests/calc.at: Adjust.
19441
19442 2001-11-19 Akim Demaille <akim@epita.fr>
19443
19444 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19445 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19446 * src/output.c: Adjust.
19447
19448 2001-11-19 Akim Demaille <akim@epita.fr>
19449
19450 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19451 (rule_t): this.
19452 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19453
19454 2001-11-19 Akim Demaille <akim@epita.fr>
19455
19456 * src/gram.h (rule_t): New.
19457 (rule_table): New.
19458 (rrhs, rlhs): Remove, part of state_t.
19459 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19460 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19461 * src/reader.c, src/reduce.c: Adjust.
19462
19463 2001-11-19 Akim Demaille <akim@epita.fr>
19464
19465 * src/reader.c (symbols_output): New, extracted from...
19466 (packsymbols): Here.
19467 (reader): Call it.
19468
19469 2001-11-19 Akim Demaille <akim@epita.fr>
19470
19471 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19472 (maxrhs): this new function.
19473
19474 2001-11-19 Akim Demaille <akim@epita.fr>
19475
19476 * src/lalr.c (F): New macro to access the variable F.
19477 Adjust.
19478
19479 2001-11-19 Akim Demaille <akim@epita.fr>
19480
19481 * src/lalr.h (LA): New macro to access the variable LA.
19482 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19483 * src/lalr.c: Adjust.
19484
19485 2001-11-19 Akim Demaille <akim@epita.fr>
19486
19487 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19488 (set_state_table): handle the `lookaheads' members.
19489
19490 2001-11-19 Akim Demaille <akim@epita.fr>
19491
19492 * src/lalr.h (lookaheads): Removed array, whose contents is now
19493 a member of...
19494 (state_t): this structure.
19495 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19496 Adjust.
19497
19498 2001-11-19 Akim Demaille <akim@epita.fr>
19499
19500 * src/lalr.h (consistent): Removed array, whose contents is now
19501 a member of...
19502 (state_t): this structure.
19503 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19504 Adjust.
19505
19506 2001-11-19 Akim Demaille <akim@epita.fr>
19507
19508 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19509 contents are now members of...
19510 (state_t): this structure.
19511 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19512 Adjust.
19513
19514 2001-11-19 Akim Demaille <akim@epita.fr>
19515
19516 * src/lalr.h (state_t): New.
19517 (state_table): Be a state_t * instead of a core **.
19518 (accessing_symbol): Remove, part of state_t.
19519 * src/lalr.c: Adjust.
19520 (set_accessing_symbol): Merge into...
19521 (set_state_table): this.
19522 * src/print_graph.c, src/conflicts.c: Adjust.
19523
19524 2001-11-14 Akim Demaille <akim@epita.fr>
19525
19526 * tests/calc.at, tests/output.at, tests/regression.at,
19527 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19528 now the tests are run in private dirs, therefore AC_CLEANUP and
19529 family can be simplified to 0-ary.
19530 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19531 use abs. path to find config.h.
19532 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19533 stderr, there can be way too much random noise.
19534 Instead pass -Werror to GCC and rely on the exit status.
19535 Reported by Wolfram Wagner.
19536
19537 2001-11-14 Akim Demaille <akim@epita.fr>
19538
19539 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19540 defined only if yyoverflow is defined, to avoid `warning: unused
19541 variable `yyvs1''.
19542 Reported by The Test Suite.
19543
19544 2001-11-14 Akim Demaille <akim@epita.fr>
19545
19546 * src/print.c: Include reduce.h.
19547 Reported by Hans Aberg.
19548
19549 2001-11-14 Akim Demaille <akim@epita.fr>
19550
19551 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19552 Revert a previous patch: these are really const.
19553 * src/conflicts.c (conflict_report): Additional useless pair of
19554 braces to pacify GCC's warnings for `if () if () {} else {}'.
19555 * src/lex.c (parse_percent_token): Replace equal_offset with
19556 arg_offset.
19557 arg is const.
19558 Be sure to strdup `arg' when used, since there is no reason for
19559 token_buffer not to change.
19560
19561 2001-11-14 Akim Demaille <akim@epita.fr>
19562
19563 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19564 definition.
19565 * src/main.c (main): Use them.
19566 Suggested by Hans Aberg.
19567
19568 2001-11-12 Akim Demaille <akim@epita.fr>
19569
19570 * src/system.h (ngettext): Now that we use ngettext, be sure to
19571 provide a default definition when NLS are not used.
19572
19573 2001-11-12 Akim Demaille <akim@epita.fr>
19574
19575 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
19576 Use @kbd to denote user input.
19577 (Language and Grammar): ANSIfy the example.
19578 Adjust its layout for info/notinfo.
19579 (Location Tracking Calc): Output error messages to stderr.
19580 Output locations in a more GNUtically correct way.
19581 Fix a couple of Englishos.
19582 Adjust @group/@end group pairs.
19583
19584 2001-11-12 Akim Demaille <akim@epita.fr>
19585
19586 %expect was not functioning at all.
19587
19588 * src/conflicts.c (expected_conflicts): Set to -1.
19589 (conflict_report): Use ngettext.
19590 (conflicts_print): Check %expect and make its violation an error.
19591 * doc/bison.texinfo (Expect Decl): Adjust.
19592 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
19593 * tests/regression.at (%expect not enough, %expect right)
19594 (%expect too much): New.
19595
19596 2001-11-12 Akim Demaille <akim@epita.fr>
19597
19598 * tests/regression.at (Conflicts): Rename as...
19599 (Unresolved SR Conflicts): this.
19600 (Solved SR Conflicts): New.
19601
19602 2001-11-12 Akim Demaille <akim@epita.fr>
19603
19604 * src/reduce.c (print_results): Rename as...
19605 (reduce_output): This.
19606 Output to OUT, passed as argument, instead of output_obstack.
19607 (dump_grammar): Likewise.
19608 (reduce_free): New.
19609 Also free V1.
19610 (reduce_grammar): No longer call reduce_output, since...
19611 * src/print.c (print_results): do it.
19612 * src/main.c (main): Call reduce_free;
19613
19614 2001-11-12 Akim Demaille <akim@epita.fr>
19615
19616 * src/conflicts.c (print_reductions): Accept OUT as argument.
19617 Output to it, not to output_obstack.
19618 * src/print.c (print_actions): Adjust.
19619
19620 2001-11-12 Akim Demaille <akim@epita.fr>
19621
19622 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
19623 the result instead of using...
19624 (src_total, rrc_total, src_count, rrc_count): Remove.
19625 (any_conflicts): Remove.
19626 (print_conflicts): Split into...
19627 (conflicts_print, conflicts_output): New.
19628 * src/conflicts.h: Adjust.
19629 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
19630 * src/print.c (print_grammar): Issue `\n' between two rules.
19631 * tests/regression.at (Conflicts): New.
19632 Reported by Tom Lane.
19633
19634 2001-11-12 Akim Demaille <akim@epita.fr>
19635
19636 * tests/regression.at (Invalid input): Remove, duplicate with
19637 ``Invalid input: 1''.
19638
19639 2001-11-12 Akim Demaille <akim@epita.fr>
19640
19641 * tests/torture.at (AT_DATA_STACK_TORTURE)
19642 (Exploding the Stack Size with Alloca)
19643 (Exploding the Stack Size with Malloc): New.
19644
19645 2001-11-12 Akim Demaille <akim@epita.fr>
19646
19647 * src/bison.simple (YYSTACK_REALLOC): New.
19648 (yyparse) [!yyoverflow]: Use it and free the old stack.
19649 Reported by Per Allansson.
19650
19651 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
19652
19653 * src/bison.simple: Define type yystype instead of YYSTYPE, and
19654 define CPP macro, which substitute YYSTYPE by yystype.
19655 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
19656 with yyltype/YYLTYPE. This allows inclusion of the generated
19657 header within the parser if the compiler, such as GGC, accepts
19658 multiple equivalent #defines.
19659 From Akim.
19660
19661 2001-11-05 Akim Demaille <akim@epita.fr>
19662
19663 * src/reader.c (symbols_output): New, extracted from...
19664 (packsymbols): here.
19665 (reader): Adjust.
19666
19667 2001-11-05 Akim Demaille <akim@epita.fr>
19668
19669 * src/lex.c (parse_percent_token): s/quotearg/quote/.
19670
19671 2001-11-05 Akim Demaille <akim@epita.fr>
19672
19673 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
19674 pattern.
19675
19676 2001-11-05 Akim Demaille <akim@epita.fr>
19677
19678 * src/options.h (struct option_table_struct): set_flags is void*.
19679 * src/options.c (longopts): Support `--output' and `%output'.
19680 (usage): Adjust.
19681 * src/lex.h (tok_setopt): Remove, replaced with...
19682 (tok_intopt, tok_stropt): these new guys.
19683 * src/lex.c (getopt.h): Not needed.
19684 (token_buffer, unlexed_token_buffer): Not const.
19685 (percent_table): Promote `-' over `_' in directive names.
19686 Active `%name-prefix', `file-prefix', and `output'.
19687 (parse_percent_token): Accept possible arguments to directives.
19688 Promote `-' over `_' in directive names.
19689
19690 2001-11-04 Akim Demaille <akim@epita.fr>
19691
19692 * doc/bison.texinfo (Decl Summary): Split the list into
19693 `directives for grammars' and `directives for bison'.
19694 Sort'em.
19695 Add description of `%name-prefix', `file-prefix', and `output'.
19696 Promote `-' over `_' in directive names.
19697 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
19698 Simplify the description of `--name-prefix'.
19699 Promote `-' over `_' in directive names.
19700 Promote `--output' over `--output-file'.
19701 Fix the description of `--defines'.
19702 * tests/output.at: Exercise %file-prefix and %output.
19703
19704 2001-11-02 Akim Demaille <akim@epita.fr>
19705
19706 * doc/refcard.tex: Update.
19707
19708 2001-11-02 Akim Demaille <akim@epita.fr>
19709
19710 * src/symtab.h (SUNDEF): New.
19711 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
19712 stand for `uninitialized', instead of 0.
19713 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
19714 * src/lex.c (lex): Adjust.
19715
19716 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
19717 Number it 0.
19718 Let yylex return it instead of a plain 0.
19719 Reported by Dick Streefland.
19720
19721 2001-11-02 Akim Demaille <akim@epita.fr>
19722
19723 * tests/regression.at (Mixing %token styles): New test.
19724
19725 2001-11-02 Akim Demaille <akim@epita.fr>
19726
19727 * src/reader.c (parse_thong_decl): Formatting changes.
19728 (token_translations_init): New, extracted from...
19729 (packsymbols): Here.
19730 Adjust.
19731
19732 2001-11-01 Akim Demaille <akim@epita.fr>
19733
19734 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
19735 Check that `9foo.y' produces correct cpp guards.
19736 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
19737 guards.
19738 Reported by Wwp.
19739
19740 2001-11-01 Akim Demaille <akim@epita.fr>
19741
19742 * tests/regression.at (Invalid input: 2): New.
19743 * src/lex.c (unlexed_token_buffer): New.
19744 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
19745 too.
19746 Reported by Wwp.
19747
19748 2001-11-01 Akim Demaille <akim@epita.fr>
19749
19750 * tests/calc.at: Catch up with 1.30.
19751 * configure.in: Bump to 1.49a.
19752 Adjust to newer Autotest.
19753
19754 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
19755
19756 * src/conflicts.c: Move global variables rrc_total and src_total ...
19757 (print_conflicts): here.
19758 * src/output.c (output): Free global variable user_toknums.
19759 * src/lex.c (token_obstack): Become static.
19760
19761 2001-10-18 Akim Demaille <akim@epita.fr>
19762
19763 * tests/atlocal.in (GCC): Add.
19764 * tests/calc.at: s/m4_match/m4_bmatch/.
19765 s/m4_patsubst/m4_bpatsubst/.
19766 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
19767 * configure.in: AC_SUBST(GCC).
19768
19769 2001-10-14 Marc Autret <autret_m@epita.fr>
19770
19771 * src/options.c (create_long_option_table): Fix.
19772
19773 2001-10-10 Akim Demaille <akim@epita.fr>
19774
19775 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
19776
19777 2001-10-04 Akim Demaille <akim@epita.fr>
19778
19779 * src/reader.c (parse_union_decl): Push the caracters in
19780 union_obstack, not attrs_obstack.
19781
19782 2001-10-04 Akim Demaille <akim@epita.fr>
19783
19784 Merge in the branch 1.29.
19785
19786 * src/reader.c (packsymbols): Use a temporary obstack for
19787 `%%tokendef', since output_stack is already used elsewhere.
19788
19789 2001-10-02 Akim Demaille <akim@epita.fr>
19790
19791 Bump 1.29d.
19792
19793 2001-10-02 Akim Demaille <akim@epita.fr>
19794
19795 Version 1.29c.
19796
19797 2001-10-02 Akim Demaille <akim@epita.fr>
19798
19799 * tests/regression.at (Invalid CPP headers): New.
19800 From Alexander Belopolsky.
19801 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
19802
19803 2001-10-02 Akim Demaille <akim@epita.fr>
19804
19805 * tests/regression.at (Invalid input): New.
19806 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
19807 Reported by Shura.
19808
19809 2001-10-02 Akim Demaille <akim@epita.fr>
19810
19811 * tests/calc.at: Now that --debug works, the tests must be adjusted.
19812
19813 2001-10-02 Akim Demaille <akim@epita.fr>
19814
19815 * src/output.c (output_parser): Assert `skeleton'.
19816 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
19817 systems.
19818 From Shura.
19819
19820 2001-10-01 Marc Autret <autret_m@epita.fr>
19821
19822 * src/lex.h: Echo modifications.
19823 * src/lex.c (unlex): Parameter is now token_t.
19824 From Hans Aberg.
19825
19826 2001-10-01 Marc Autret <autret_m@epita.fr>
19827
19828 * src/main.c: Include lex.h.
19829 From Hans Aberg.
19830
19831 2001-09-29 Akim Demaille <akim@epita.fr>
19832
19833 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
19834
19835 2001-09-28 Akim Demaille <akim@epita.fr>
19836
19837 * tests/testsuite.at: Update to newer Autotest.
19838 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
19839
19840 2001-09-27 Akim Demaille <akim@epita.fr>
19841
19842 Position independent wrapper.
19843
19844 * tests/bison: Remove.
19845 * tests/bison.in: New.
19846 * configure.in: Adjust.
19847
19848 2001-09-27 Paul Eggert <eggert@twinsun.com>
19849
19850 Port quotearg fixes from tar 1.13.24.
19851
19852 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
19853 tm to be declared.
19854 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19855 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19856
19857 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
19858 * m4/mbrtowc.m4: New file.
19859 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
19860 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
19861
19862 2001-09-27 Akim Demaille <akim@epita.fr>
19863
19864 Bump to 1.29c.
19865
19866 2001-09-27 Akim Demaille <akim@epita.fr>
19867
19868 Version 1.29b.
19869
19870 2001-09-25 Akim Demaille <akim@epita.fr>
19871
19872 * src/system.h: Include `xalloc.h'.
19873 Remove it from the C files.
19874 * src/files.c (output_files): Free the obstacks.
19875 * src/lex.c (init_lex): Rename as...
19876 (lex_init): this.
19877 (lex_free): New.
19878 * src/main.c (main): Use it.
19879
19880 2001-09-24 Marc Autret <autret_m@epita.fr>
19881
19882 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
19883 to output informations in fout (FILE*).
19884 (open_graph, close_graph): Likewise.
19885 (output_graph, output_edge, output_node): Likewise.
19886 * src/vcg.h: Update function prototypes.
19887 * src/print_graph.c (print_graph): Open output graph file.
19888 (print_actions): Adjust.
19889 * src/files.h: Remove extern declaration.
19890 * src/files.c: Remove graph_obstack declaration.
19891 (open_files): Remove graph_obstack initialization.
19892 (output_files): Remove graph_obstack saving.
19893
19894 2001-09-24 Marc Autret <autret_m@epita.fr>
19895
19896 * src/files.c (compute_output_file_names): Fix.
19897
19898 2001-09-24 Marc Autret <autret_m@epita.fr>,
19899 Akim Demaille <akim@epita.fr>
19900
19901 * src/reader.c (reader): Remove call to free_symtab ().
19902 * src/main.c (main): Call it here.
19903 Include symtab.h.
19904 * src/conflicts.c (initialize_conflicts): Rename as...
19905 (solve_conflicts): this.
19906 * src/print.c (print_core, print_actions, print_state)
19907 (print_grammar): Dump to a file instead a `output_obstack'.
19908 (print_results): Dump `output_obstack', and then proceed with the
19909 FILE *.
19910 * src/files.c (compute_output_file_names, close_files): New.
19911 (output_files): Adjust.
19912 * src/main.c (main): Adjust.
19913
19914 2001-09-23 Marc Autret <autret_m@epita.fr>
19915
19916 * src/files.c (compute_header_macro): Computes header macro name
19917 from spec_defines_file when given.
19918
19919 2001-09-23 Marc Autret <autret_m@epita.fr>
19920
19921 * src/files.c (output_files): Add default extensions.
19922
19923 2001-09-22 Akim Demaille <akim@epita.fr>
19924
19925 * src/conflicts.c (finalize_conflicts): Rename as...
19926 (free_conflicts): this.
19927
19928 2001-09-22 Akim Demaille <akim@epita.fr>
19929
19930 * src/gram.c (gram_free): Rename back as...
19931 (dummy): this.
19932 (output_token_translations): Free `token_translations'.
19933 * src/symtab.c (free_symtab): Free the tag field.
19934
19935 2001-09-22 Akim Demaille <akim@epita.fr>
19936
19937 Remove `translations' as it is always set to true.
19938
19939 * src/gram.h: Adjust.
19940 * src/reader.c (packsymbols, parse_token_decl): Adjust
19941 * src/print.c (print_grammar): Adjust.
19942 * src/output.c (output_token_translations): Adjust.
19943 * src/lex.c (lex): Adjust.
19944 * src/gram.c: Be sure the set pointers to NULL.
19945 (dummy): Rename as...
19946 (gram_free): this.
19947
19948 2001-09-22 Akim Demaille <akim@epita.fr>
19949
19950 * configure.in: Invoke AM_LIB_DMALLOC.
19951 * src/system.h: Use dmalloc.
19952 * src/LR0.c: Be sure to have pointers initialized to NULL.
19953 (allocate_itemsets): Allocate kernel_items only if needed.
19954
19955 2001-09-22 Akim Demaille <akim@epita.fr>
19956
19957 * configure.in: Bump to 1.29b.
19958 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
19959 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
19960 need xmalloc.c in calc.y.
19961 From Pascal Bart.
19962
19963 2001-09-21 Akim Demaille <akim@epita.fr>
19964
19965 Version 1.29a.
19966 * Makefile.maint, config/config.guess, config/config.sub,
19967 * config/missing: Update from masters.
19968 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
19969 upon package.m4.
19970 * configure.in (ALL_LINGUAS): Add `tr'.
19971
19972 2001-09-21 Akim Demaille <akim@epita.fr>
19973
19974 * tests/Makefile.am (package.m4): Move to...
19975 ($(srcdir)/$(TESTSUITE)): here.
19976
19977 2001-09-20 Akim Demaille <akim@epita.fr>
19978
19979 * src/complain.c: No longer try to be standalone: use system.h.
19980 Don't assume __STDC__ is defined to 1. Just test if it is defined.
19981 * src/complain.h: Likewise.
19982 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
19983 Remove the unused variable `n'.
19984 From Albert Chin-A-Young.
19985
19986 2001-09-18 Marc Autret <autret_m@epita.fr>
19987
19988 * doc/bison.1: Update.
19989 * doc/bison.texinfo (Bison Options): Update --defines and --graph
19990 descriptions.
19991 (Option Cross Key): Update.
19992 Add --graph.
19993
19994 2001-09-18 Marc Autret <autret_m@epita.fr>
19995
19996 * tests/regression.at: New test (comment in %union).
19997
19998 2001-09-18 Marc Autret <autret_m@epita.fr>
19999
20000 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20001 do that.
20002 Reported by Keith Browne.
20003
20004 2001-09-18 Marc Autret <autret_m@epita.fr>
20005
20006 * tests/output.at: Add tests for --defines and --graph.
20007
20008 2001-09-18 Marc Autret <autret_m@epita.fr>
20009
20010 * tests/output.at: Removes tests of %{header,src}_extension features.
20011
20012 2001-09-18 Akim Demaille <akim@epita.fr>
20013
20014 * tests/Makefile.am (package.m4): New.
20015 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20016 (_AT_CHECK_CALC_ERROR): Likewise.
20017 Factor the `, ' part of verbose error messages.
20018
20019 2001-09-18 Marc Autret <autret_m@epita.fr>
20020
20021 * src/getargs.c (longopts): Declare --defines and --graph as options
20022 with optional arguments.
20023 * src/files.h: Add extern declarations.
20024 * src/files.c (spec_graph_file, spec_defines_file): New.
20025 (output_files): Update.
20026 Remove CPP-outed code.
20027
20028 2001-09-18 Marc Autret <autret_m@epita.fr>
20029
20030 Turn off %{source,header}_extension feature.
20031
20032 * src/files.c (compute_exts_from_gf): Update.
20033 (compute_exts_from_src): Update.
20034 (output_files): CPP-out useless code.
20035 * src/files.h: Remove {header,source}_extension extern declarations.
20036 * src/reader.c (parse_dquoted_param): CPP-out.
20037 (parse_header_extension_decl): Remove.
20038 (parse_source_extension_decl): Remove.
20039 (read_declarations): Remove cases tok_{hdrext,srcext}.
20040 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20041 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20042
20043 2001-09-10 Akim Demaille <akim@epita.fr>
20044
20045 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20046 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20047 (AT_CHECK_OUTPUT): this.
20048 Merely check ls' exit status, its output is useless.
20049
20050 2001-09-10 Akim Demaille <akim@epita.fr>
20051
20052 * tests/calc.at: Use m4_match.
20053 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20054
20055 2001-09-10 Marc Autret <autret_m@epita.fr>,
20056 Akim Demaille <akim@epita.fr>
20057
20058 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20059 enum color_e.
20060 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20061 to `normal'.
20062 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20063 * src/lex.h: Adjust prototype.
20064 (token_t): Add `tok_undef'.
20065 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20066 (parse_percent_token): Now returns token_t.
20067 Add default statement in switch.
20068 (lex): Separate `c' as an input variable, from the token_t result
20069 part.
20070 (unlexed): Is a token_t.
20071
20072 2001-09-10 Akim Demaille <akim@epita.fr>
20073
20074 * configure.in: Bump to 1.29a.
20075
20076 2001-09-07 Akim Demaille <akim@epita.fr>
20077
20078 Version 1.29.
20079
20080 2001-08-30 Akim Demaille <akim@epita.fr>
20081
20082 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20083 * m4/atconfig.m4: Remove.
20084 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20085 * tests/bison: New.
20086 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20087 m4_if, m4_patsubst, and m4_regexp.
20088 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20089 `input' file instead of echo.
20090
20091 2001-08-29 Akim Demaille <akim@epita.fr>
20092
20093 Bump to 1.28e.
20094
20095 2001-08-29 Akim Demaille <akim@epita.fr>
20096
20097 Version 1.28d.
20098
20099 2001-08-29 Paul Eggert <eggert@twinsun.com>
20100
20101 * src/bison.simple (yyparse): Don't take the address of an
20102 item before the start of an array, as that doesn't conform to
20103 the C Standard.
20104
20105 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20106
20107 * doc/bison.texinfo (Location Tracking Calc): New node.
20108
20109 2001-08-29 Paul Eggert <eggert@twinsun.com>
20110
20111 * src/output.c (output): Do not define const, as this now
20112 causes more problems than it cures.
20113
20114 2001-08-29 Akim Demaille <akim@epita.fr>
20115
20116 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20117 the nodes.
20118 Be sure to tag the `detailmenu'.
20119
20120 2001-08-29 Akim Demaille <akim@epita.fr>
20121
20122 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20123 download in a tmp dir.
20124
20125 2001-08-28 Marc Autret <autret_m@epita.fr>
20126
20127 * config/depcomp: New file.
20128
20129 2001-08-28 Marc Autret <autret_m@epita.fr>
20130
20131 * doc/bison.1 (mandoc): Adjust.
20132 From Juan Manuel Guerrero.
20133
20134 2001-08-28 Marc Autret <autret_m@epita.fr>
20135
20136 * src/print_graph.c (print_state): Fix.
20137
20138 2001-08-27 Marc Autret <autret_m@epita.fr>
20139
20140 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20141 char * members.
20142 Echo modifications to the functions prototypes.
20143 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20144
20145 2001-08-27 Marc Autret <autret_m@epita.fr>
20146
20147 * src/vcg.c: Include `xalloc.h'.
20148 (add_colorentry): New.
20149 (add_classname): New.
20150 (add_infoname): New.
20151 * src/vcg.h: Add new prototypes.
20152
20153 2001-08-27 Akim Demaille <akim@epita.fr>
20154
20155 * Makefile.maint: Sync. again with CVS Autoconf.
20156
20157 2001-08-27 Akim Demaille <akim@epita.fr>
20158
20159 * Makefile.maint: Formatting changes.
20160 (po-update, cvs-update, update): New targets.
20161 (AMTAR): Remove.
20162
20163 2001-08-27 Akim Demaille <akim@epita.fr>
20164
20165 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20166 * Makefile.maint: Sync. with CVS Autoconf.
20167
20168 2001-08-27 Marc Autret <autret_m@epita.fr>
20169
20170 * src/vcg.h (struct infoname_s): New.
20171 (struct colorentry_s): New.
20172 (graph_s): New fields {vertical,horizontal}_order in structure.
20173 Add `infoname' field.
20174 Add `colorentry' field;
20175 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20176 (G_HORIZONTAL_ORDER): New.
20177 (G_INFONAME): New.
20178 (G_COLORENTRY): New.
20179 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20180 Add output of `infoname'.
20181 Add output of `colorentry'.
20182
20183 2001-08-27 Marc Autret <autret_m@epita.fr>
20184
20185 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20186 This one shadowed a global parameter.
20187
20188 2001-08-24 Marc Autret <autret_m@epita.fr>
20189
20190 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20191 instead of `unsigned'.
20192 (print_state): Do not call obstack_object_size () in obstack_grow ()
20193 to avoid macro variables shadowing.
20194
20195 2001-08-23 Marc Autret <autret_m@epita.fr>
20196
20197 * src/lex.c (percent_table): Typo: s/naem/name/.
20198 Add graph option.
20199 Normalize new options declarations.
20200
20201 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
20202
20203 * tests/suite.at: Exercise %header_extension and %source_extension.
20204
20205 2001-08-16 Marc Autret <autret_m@epita.fr>
20206
20207 * src/reader.c (parse_dquoted_param): New.
20208 (parse_header_extension_decl): Use it.
20209 (parse_source_extension_decl): Likewise.
20210
20211 2001-08-16 Marc Autret <autret_m@epita.fr>
20212
20213 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20214 (get_xxxx_str): Use assert () instead of complain ().
20215 Remove return invokations in default cases.
20216 (get_decision_str): Modify default behaviour. Remove second argument.
20217 Echo modifications on calls.
20218 (output_graph): Fix.
20219
20220 2001-08-16 Marc Autret <autret_m@epita.fr>
20221
20222 * src/getargs.c (usage): Update with ``-g, --graph''.
20223
20224 2001-08-16 Marc Autret <autret_m@epita.fr>
20225
20226 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20227 (Option Cross Key): Likewise.
20228 * doc/bison.1: Update.
20229
20230 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
20231
20232 * src/output.c (output_master_parser): Don't finish action_obstack.
20233 (output_parser): Don't care about the muscle action, here.
20234 (prepare): Copy the action_obstack in the action muscle.
20235 (output): Free action_obstack.
20236
20237 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20238
20239 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20240 will contain `%union' declaration.
20241 (parse_union_decl): Delete #line directive output.
20242 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20243 informations about %union.
20244 (parse_union_decl): Copy the union_obstack in the muscle stype.
20245 * src/bison.simple: Add new #line directive.
20246 Add typdef %%stype YYSTYPE.
20247
20248 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20249
20250 * src/bison.simple: Add new `#line' directive.
20251
20252 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
20253
20254 * src/bison.simple: New `#line' directive.
20255 * src/output.c (output_parser): Support new dynamic muscle input_line.
20256
20257 2001-09-22 Marc Autret <autret_m@epita.fr>
20258
20259 * src/output.c (output_master_parser): New.
20260 (output_parser): Be more re-entrant.
20261
20262 2001-09-21 Marc Autret <autret_m@epita.fr>
20263
20264 * src/reader.c (copy_definition, parse_union_decl): Update and use
20265 `linef' muscle.
20266 (copy_action): Likewise.
20267 Use obstack_1grow ().
20268 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20269
20270 2001-09-21 Marc Autret <autret_m@epita.fr>
20271
20272 * src/options.c (option_table): Adjust.
20273 * src/lex.c (parse_percent_token): Fix.
20274
20275 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20276
20277 * src/options.c (symtab.h): Include it, need by lex.h.
20278
20279 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20280
20281 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20282 is now an option_table_struct*.
20283 (option_strcmp): New function option_strcmp.
20284 (parse_percent_token): Call option_strcmp.
20285 * src/getargs.c (xalloc.h, options.h): Include it.
20286 (getargs): Call create_long_option_table.
20287 (getargs): Free longopts at the end of the function.
20288 (shortopts): Move in options.c.
20289 * src/options.c (create_long_option_table): New function. Convert
20290 information from option_table to option structure.
20291 * src/reader.c (options.h): Include it.
20292
20293 * src/Makefile.am: Adjust.
20294 * src/options.c (option_table): Create from longopts and percent_table.
20295 * src/getargs.c (longopts): Delete.
20296 * src/lex.c (struct percent_table_struct): Delete.
20297 (percent_table): Delete.
20298 (options.h): Include it.
20299 * src/options.c: Create.
20300 * src/options.h: Create.
20301 Declare enum opt_access_e.
20302 Define struct option_table_struct.
20303
20304 2001-09-20 Marc Autret <autret_m@epita.fr>
20305
20306 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20307 sections of Bison.
20308
20309 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
20310
20311 * src/bison.simple: s/%%filename/%%skeleton.
20312 * src/muscle_tab.c (getargs.h): Include it.
20313 (muscle_init): Insert new muscle skeleton.
20314
20315 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
20316
20317 * src/output.c (output_parser): Delete unused variable actions_dumped.
20318
20319 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
20320
20321 * src/output.c (output): Delete call to reader_output_yylsp.
20322 * src/reader.c (reader): Likewise.
20323 * src/reader.h: Delete declaration of reader_output_yylsp.
20324
20325 2001-09-02 Marc Autret <autret_m@epita.fr>
20326
20327 * src/reader.c: Include muscle_tab.h.
20328 (parse_union_decl): Update.
20329 (parse_macro_decl): Rename parse_muscle_decl.
20330 Update to use renamed functions and variable.
20331 (read_declarations, copy_action, read_additionnal_code, : Updated
20332 with correct variables and functions names.
20333 (packsymbols, reader): Likewise.
20334
20335 * src/reader.h (muscle_obstack): Extern declaration update.
20336
20337 * src/output.c: Include muscle_tab.h
20338 In all functions using macro_insert, change by using muscle_insert ().
20339 (macro_obstack): Rename muscle_obstack.
20340 Echo modifications in the whole file.
20341 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20342 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20343 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20344
20345 * src/muscle_tab.h: Update double inclusion macros.
20346 (macro_entry_s): Rename muscle_entry_s.
20347 Update prototypes.
20348
20349 * src/muscle_tab.c: Include muscle_tab.h.
20350 Rename macro_tabble to muscle_table.
20351 (mhash1, mhash2, mcmp): Use muscle_entry.
20352 (macro_init): Rename muscle_init. Update.
20353 (macro_insert): Rename muscle_insert. Update.
20354 (macro_find): Rename muscle_find. Update.
20355
20356 * src/main.c: Include muscle_tab.h.
20357 (main): Call muscle_init ().
20358 * src/Makefile.am (bison_SOURCES): Echo modifications.
20359
20360 2001-09-02 Marc Autret <autret_m@epita.fr>
20361
20362 Now the files macro_tab.[ch] are named muscle_tab.[ch].
20363
20364 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20365
20366 2001-09-02 Marc Autret <autret_m@epita.fr>
20367
20368 * src/macrotab.c, src/macrotab.h: Remove.
20369
20370 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
20371
20372 * src/reader.c (copy_guard): Use muscle to specify the `#line'
20373 filename.
20374
20375 2001-09-01 Marc Autret <autret_m@epita.fr>
20376
20377 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20378 to an explicit value to activate the feature. We do it here.
20379
20380 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20381
20382 * src/output.c (prepare): Delete the `filename' muscule insertion.
20383 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20384 (parse_union_decl): Likewise.
20385 * src/macrotab.c (macro_init): Initialize filename by infile.
20386
20387 2001-08-31 Marc Autret <autret_m@epita.fr>
20388
20389 * src/bison.simple (YYLSP_NEEDED): New definition.
20390 * src/output.c (prepare): Add macro insertion of `locations_flag'
20391
20392 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20393
20394 * src/output.c (prepare): Delete insertion of previous muscles,
20395 and insert the `prefix' muscles.
20396 * src/macrotab.c (macro_init): Likewise.
20397 (macro_init): Initialization prefix directive by `yy'.
20398 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
20399 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20400 yylval, yydebug, yyerror, yynerrs and yyparse.
20401 New directive `#define' to substitute yydebug, ... with option
20402 name_prefix.
20403
20404 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20405
20406 * src/main.c (main): Standardize.
20407 * src/output.c (output_table_data, output_parser): Likewise.
20408 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20409
20410 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20411
20412 * src/reader.c (read_additionnal_code): Rename %%user_code to
20413 %%epilogue.
20414 * src/output.c (output): Rename %%declarations to %%prologue.
20415 * src/bison.simple: Echo modifications.
20416
20417 2001-08-31 Marc Autret <autret_m@epita.fr>
20418
20419 * src/reader.c (readgram): CleanUp.
20420 (output_token_defines): Likewise.
20421 (packsymbols): Likewise.
20422 (reader): Likewise.
20423 * src/output.c (output): CPP-out useless code.
20424
20425 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20426
20427 * src/reader.c (reader): Delete obsolete call to function
20428 output_trailers and output_headers.
20429 * src/output.h: Remove obsolete functions prototypes of output_headers
20430 and output_trailers.
20431
20432 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
20433
20434 * src/main.c: Include macrotab.h.
20435 * src/macrotab.h (macro_entry_s): Constify fields.
20436 Adjust functions prototypes.
20437 * src/macrotab.c (macro_insert): Constify key and value.
20438 (macro_find): Constify key.
20439 (macro_insert): Include 'xalloc.h'
20440 (macro_insert): Use XMALLOC.
20441 (macro_find): Constify return value.
20442 * src/output.c (output_table_data): Rename table to table_data.
20443 (output_parser): Constify macro_key, macro_value.
20444
20445 2001-08-30 Marc Autret <autret_m@epita.fr>
20446
20447 * src/reader.c (parse_skel_decl): New.
20448 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
20449 * src/lex.h (token_t): New token `tok_skel'.
20450 * src/lex.c (percent_table): Add skeleton option entry.
20451 Standardize.
20452
20453 2001-08-29 Marc Autret <autret_m@epita.fr>
20454
20455 * src/bison.simple: Add %%user_code directive at the end.
20456 * src/reader.c (read_additionnal_code): New.
20457 (reader): Use it.
20458 * src/output.c (output_program): Remove.
20459 (output): Update.
20460
20461 2001-08-28 Marc Autret <autret_m@epita.fr>
20462
20463 * src/output.c (output_actions): Clean up.
20464 (output_gram): CPP-out useless code.
20465 * src/reader.c (reader): Clean up, CPP-out useless code.
20466
20467 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
20468
20469 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
20470 directive.
20471 * src/bison.simple: Add `%%definitions'.
20472
20473 2001-08-28 Marc Autret <autret_m@epita.fr>
20474
20475 * config/depcomp: New file.
20476
20477 2001-08-27 Paul Eggert <eggert@twinsun.com>
20478
20479 * src/bison.simple (yyparse): Don't take the address of an
20480 item before the start of an array, as that doesn't conform to
20481 the C Standard.
20482
20483 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20484
20485 * src/output.c (output): Remove the initialization of the macro
20486 obstack. It was done too late here.
20487
20488 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20489 completely wrong.
20490 (reader): Initialize the macro obstack here, since we need it to grow
20491 '%define' directives.
20492
20493 * src/reader.h: Declare the macro obstack as extern.
20494
20495 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20496
20497 * src/output.c (output_parser): Fix. Store single '%' characters in
20498 the output obstack instead of throwing them away.
20499
20500 2001-08-27 Akim Demaille <akim@epita.fr>
20501
20502 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20503
20504 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20505
20506 * lib/Makefile.am: Adjust.
20507
20508 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20509
20510 * src/bison.simple: Update and add '%%' directives.
20511
20512 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20513
20514 * src/reader.c (reader): Remove calls to 'output_headers' and
20515 'output_trailers'. Remove some C output.
20516 (readgram): Disable a piece of code that was writing a default
20517 definition for 'YYSTYPE'.
20518 (reader_output_yylsp): Remove.
20519 (packsymbols): Output token defintions to a macro.
20520 (copy_definition): Disable C output.
20521
20522 * src/reader.c (parse_macro_decl): New function used to parse macro
20523 declarations.
20524 (copy_string2): Put the body of copy_string into this new function.
20525 Add a parameter to let the caller choose whether he wants to copy the
20526 string delimiters or not.
20527 (copy_string): Be a simple call to copy_string2 with the last argument
20528 bound to true.
20529 (read_declarations): Add case for macro definition.
20530 (copy_identifier): New.
20531 (parse_macro_decl): Read macro identifiers using copy_identifier
20532 rather than lex.
20533
20534 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20535
20536 * src/output.c (prepare): Add prefixed names.
20537 (output_parser): Output semantic actions.
20538 (output_parser): Fix bug on '%%line' directives.
20539
20540 * src/output.c (output_headers): Remove. The C code printed by this
20541 function should now be in the skeletons.
20542 (output_trailers): Remove.
20543 (output): Disable call to 'reader_output_yylsp'.
20544 (output_rule_data): Do not output tables to the table obstack.
20545
20546 * src/output.c: Remove some C dedicated output.
20547 Improve the use of macro and output obstacks.
20548 (output_defines): Remove.
20549
20550 * src/output.c (output_token_translations): Associate 'translate'
20551 table with a macro. No output to the table obstack.
20552 (output_gram): Same for 'rhs' and 'prhs'.
20553 (output_stos): Same for 'stos'.
20554 (output_rule_data): Same for 'r1' and 'r2'.
20555 (token_actions): Same for 'defact'.
20556 (goto_actions): Same for 'defgoto'.
20557 (output_base): Same for 'pact' and 'pgoto'.
20558 (output_table): Same for 'table'.
20559 (output_check): Same for 'check'.
20560
20561 * src/output.c (output_table_data): New function.
20562 (output_short_table): Remove.
20563 (output_short_or_char_table): Remove.
20564
20565 * src/output.c (output_parser): Replace most of the skeleton copy code
20566 with something new. Skeletons are now processed character by character
20567 rather than line by line, and Bison looks for '%%' macros. This is the
20568 first step in making Bison's output process (a lot) more flexible.
20569 (output_parser): Use the macro table.
20570
20571 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20572
20573 * src/main.c (main): Initialize the macro table.
20574
20575 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20576
20577 * src/lex.c (percent_table): Add tok_define.
20578 * src/lex.h: Add tok_define.
20579
20580 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20581
20582 * src/macrotab.c: New file.
20583 * src/macrotab.h: New file.
20584 * src/Makefile.am: Update.
20585
20586 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20587
20588 * lib/hash.c: New file.
20589 * lib/hash.h: New file.
20590 * lib/Makefile.am: Update.
20591
20592 2001-08-15 Akim Demaille <akim@epita.fr>
20593
20594 Version 1.28c.
20595
20596 2001-08-15 Marc Autret <autret_m@epita.fr>
20597
20598 * src/reader.c (readgram): Indent output macro YYSTYPE.
20599 (packsymbols): Likewise.
20600 (output_token_defines): Likewise.
20601 * src/files.c: Standardize.
20602 (compute_header_macro): New.
20603 (defines_obstack_save): New. Use compute_header_macro.
20604 (output_files): Update. Use defines_obstack_save.
20605
20606 2001-08-15 Akim Demaille <akim@epita.fr>
20607
20608 * doc/bison.texinfo (Table of Symbols): Document
20609 YYSTACK_USE_ALLOCA.
20610
20611 2001-08-15 Akim Demaille <akim@epita.fr>
20612
20613 * missing: Update from CVS Automake.
20614 * config/config.guess, config/config.sub, config/texinfo.tex:
20615 Update from gnu.org.
20616
20617 2001-08-15 Akim Demaille <akim@epita.fr>
20618
20619 * Makefile.maint: Sync with CVS Autoconf.
20620
20621 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
20622
20623 * doc/bison.texinfo: Include GNU Free Documentation License from
20624 `fdl.texi'.
20625 * doc/fdl.texi: Add to package.
20626
20627 2001-08-14 Marc Autret <autret_m@epita.fr>
20628
20629 Turn on %{source,header}_extension features.
20630
20631 * src/lex.c (percent_table): Un-CPP out header_extension and
20632 source_extension.
20633 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
20634 (compute_exts_from_src): Remove conditions. It restores priorities
20635 between options.
20636
20637 2001-08-14 Marc Autret <autret_m@epita.fr>
20638
20639 * src/files.c (compute_base_names): Add extensions computing when
20640 `--file-prefix' used.
20641 Standardize function calls.
20642
20643 2001-08-13 Marc Autret <autret_m@epita.fr>
20644
20645 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
20646 defining it (defined but null disables alloca).
20647
20648 2001-08-13 Marc Autret <autret_m@epita.fr>
20649
20650 * src/bison.simple (_yy_memcpy): CPP reformat.
20651
20652 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
20653
20654 * tests/atconfig.in (CPPFLAGS): Fix.
20655
20656 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
20657
20658 * doc/bison.texinfo: Include GNU General Public License from
20659 `gpl.texi'.
20660 * doc/gpl.texi: Add to package.
20661
20662 2001-08-10 Marc Autret <autret_m@epita.fr>
20663
20664 * src/print_graph.h: Fix.
20665 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
20666
20667 2001-08-10 Akim Demaille <akim@epita.fr>
20668
20669 * src/system.h: Provide default declarations for stpcpy, strndup,
20670 and strnlen.
20671
20672 2001-08-10 Robert Anisko <anisko_r@epita.fr>
20673
20674 * doc/bison.texinfo (Locations): Update @$ stuff.
20675
20676 2001-08-09 Robert Anisko <anisko_r@epita.fr>
20677
20678 * src/bison.simple (YYLLOC_DEFAULT): Update.
20679 (yyparse): Adjust.
20680
20681 2001-08-08 Marc Autret <autret_m@epita.fr>
20682
20683 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
20684 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
20685 Reported by Fabrice Bauzac.
20686
20687 2001-08-08 Marc Autret <autret_m@epita.fr>
20688
20689 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
20690 * src/vcg.c (output_node): Fix.
20691 * src/vcg.h: Cleanup.
20692 * src/print_graph.c: Add comments.
20693 (node_output_size): New global variable. Simplify the formatting of
20694 the VCG graph output.
20695 (print_actions): Unused code is now used. It notifies the final state
20696 and no action states in the VCG graph. It also give the reduce actions.
20697 The `shift and goto' edges are red and the `go to state' edges are
20698 blue.
20699 Get the current node name and node_obstack by argument.
20700 (node_obstack): New variable.
20701 (print_state): Manage node_obstack.
20702 (print_core): Use node_obstack given by argument.
20703 A node is not only computed here but in print_actions also.
20704 (print_graph): CPP out useless code instead of commenting it.
20705
20706 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
20707
20708 * tests/atconfig.in (CPPFLAGS): Fix.
20709
20710 2001-08-07 Akim Demaille <akim@epita.fr>
20711
20712 * src/print_graph.c (quote): New.
20713 (print_core): Use it.
20714
20715 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
20716
20717 * src/vcg.c (complain.h): Include it.
20718 Unepitaize `return' invocations.
20719 [NDEBUG] (main): Remove.
20720 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
20721 * src/files.c (open_files): Initialize graph_obstack.
20722 * src/print_graph.c (print_actions): CPP out useless code.
20723 (print_core): Don't output the last `\n' in labels.
20724 Use `quote'.
20725 * src/files.c (output_files): Output the VCG file.
20726 * src/main.c (main): Invoke print_graph ();
20727
20728 2001-08-06 Marc Autret <autret_m@epita.fr>
20729
20730 Automaton VCG graph output.
20731 Using option ``-g'' or long option ``--graph'', you can generate
20732 a gram_filename.vcg file containing a VCG description of the LALR (1)
20733 automaton of your grammar.
20734
20735 * src/main.c: Call to print_graph() function.
20736 * src/getargs.h: Update.
20737 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
20738 (graph_flag): New flag.
20739 (longopts): Update.
20740 (getargs): Add case `g'.
20741 * src/files.c (graph_obstack): New obstack struct.
20742 (open_files): Initialize new obstack.
20743 (output_files): Saves graph_obstack if required.
20744 * src/files.h (graph_obstack): New extern declaration.
20745 * src/Makefile.am: Add new source files.
20746
20747 2001-08-06 Marc Autret <autret_m@epita.fr>
20748
20749 * src/print_graph.c, src/print_graph.h (graph): New.
20750 * src/vcg.h: New file.
20751 * src/vcg.c: New file, VCG graph handling.
20752
20753 2001-08-06 Marc Autret <autret_m@epita.fr>
20754
20755 Add of %source_extension and %header_extension which specify
20756 the source or/and the header output file extension.
20757
20758 * src/files.c (compute_base_names): Remove initialisation of
20759 src_extension and header_extension.
20760 (compute_exts_from_gf): Update.
20761 (compute_exts_from_src): Update.
20762 (output_files): Update.
20763 * src/reader.c (parse_header_extension_decl): New.
20764 (parse_source_extension_decl): New.
20765 (read_declarations): New case statements for the new tokens.
20766 * src/lex.c (percent_table): Add entries for %source_extension
20767 and %header_extension.
20768 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
20769
20770 2001-08-06 Marc Autret <autret_m@epita.fr>
20771
20772 * configure.in: Bump to 1.28c.
20773 * doc/bison.texinfo: Texinfo thingies.
20774
20775 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
20776
20777 * tests/atconfig.in (CPPFLAGS): Add.
20778 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
20779
20780 2001-08-03 Akim Demaille <akim@epita.fr>
20781
20782 Version 1.28b.
20783
20784 2001-08-03 Akim Demaille <akim@epita.fr>
20785
20786 * tests/Makefile.am (check-local): Ship testsuite.
20787 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
20788 Include `string.h'.
20789
20790 2001-08-03 Akim Demaille <akim@epita.fr>
20791
20792 * configure.in: Try using -Wformat when compiling.
20793
20794 2001-08-03 Akim Demaille <akim@epita.fr>
20795
20796 * configure.in: Bump to 1.28b.
20797
20798 2001-08-03 Akim Demaille <akim@epita.fr>
20799
20800 * src/complain.c: Adjust strerror_r portability issues.
20801
20802 2001-08-03 Akim Demaille <akim@epita.fr>
20803
20804 Version 1.28a.
20805
20806 2001-08-03 Akim Demaille <akim@epita.fr>
20807
20808 * src/getargs.c, src/getarg.h (skeleton)): Constify.
20809 * src/lex.c (literalchar): Avoid name clashes on `buf'.
20810 * src/getargs.c: Include complain.h.
20811 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
20812 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
20813
20814 2001-08-03 Akim Demaille <akim@epita.fr>
20815
20816 * src/reader.c (readgram): Display hidden chars in error messages.
20817
20818 2001-08-03 Akim Demaille <akim@epita.fr>
20819
20820 Update to gettext 0.10.39.
20821
20822 2001-08-03 Akim Demaille <akim@epita.fr>
20823
20824 * lib/strspn.c: New.
20825
20826 2001-08-01 Marc Autret <autret_m@epita.fr>
20827
20828 * doc/bison.texinfo: Update.
20829 * doc/bison.1 (mandoc): Update.
20830 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
20831 * src/files.c: Support output files extensions computing.
20832 (src_extension): New static variable.
20833 (header_extension): New static variable.
20834 (tr): New function.
20835 (get_extension_index): New function, gets the index of an extension
20836 filename in a string.
20837 (compute_exts_from_gf): New function, computes extensions from the
20838 grammar file extension.
20839 (compute_exts_from_src): New functions, computes extensions from the
20840 C source file extension, file given by ``-o'' option.
20841 (compute_base_names): Update.
20842 (output_files): Update.
20843
20844 2001-08-01 Robert Anisko <anisko_r@epita.fr>
20845
20846 * doc/bison.texi: Document @$.
20847 (Locations): New section.
20848
20849 2001-07-18 Akim Demaille <akim@epita.fr>
20850
20851 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
20852 * config/prev-version.txt, config/move-if-change: New.
20853 * Makefile.am: Adjust.
20854
20855 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
20856
20857 * src/bison.simple (yyparse): Suppress warning `comparaison
20858 between signed and unsigned'.
20859
20860 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
20861
20862 * src/getargs.h (raw_flag): Remove.
20863 * src/getargs.c: Die on `-r'/`--raw'.
20864 * src/lex.c (parse_percent_token): Die on `%raw'.
20865 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
20866 * tests/calc.at: Suppress test with option `--raw'.
20867
20868 2001-07-14 Akim Demaille <akim@epita.fr>
20869
20870 * config/: New.
20871 * configure.in: Require Autoconf 2.50.
20872 Update to gettext 0.10.38.
20873
20874 2001-03-16 Akim Demaille <akim@epita.fr>
20875
20876 * doc/bison.texinfo: ANSIfy the examples.
20877
20878 2001-03-16 Akim Demaille <akim@epita.fr>
20879
20880 * getargs.c (skeleton): New variable.
20881 (longopts): --skeleton is a new option.
20882 (shortopts, getargs): -S is a new option.
20883 * getargs.h: Declare skeleton.
20884 * output.c (output_parser): Use it.
20885
20886 2001-03-16 Akim Demaille <akim@epita.fr>
20887
20888 * m4/strerror_r.m4: New.
20889 * m4/error.m4: Run AC_FUNC_STRERROR_R.
20890 * lib/error.h, lib/error.c: Update.
20891
20892 2001-03-16 Akim Demaille <akim@epita.fr>
20893
20894 * src/getargs.c (longopts): Clean up.
20895
20896 2001-02-21 Akim Demaille <akim@epita.fr>
20897
20898 * src/reader.c (gensym): `gensym_count' is your own.
20899 Use a static buf to create the symbol name, as token_buffer is no
20900 longer a buffer.
20901
20902 2001-02-08 Akim Demaille <akim@epita.fr>
20903
20904 * src/conflicts.c (conflict_report): Be sure not to append to res
20905 between two calls, which could happen if both first sprintf were
20906 skipped, but not the first cp += strlen.
20907
20908 2001-02-08 Akim Demaille <akim@epita.fr>
20909
20910 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
20911 New, from fileutils 4.0.37.
20912 * configure.in: Require Autoconf 2.49c. I took some time before
20913 making this decision. This is the only way out for portability
20914 issues in Bison, it would mean way too much duplicate effort to
20915 import in Bison features implemented in 2.49c since 2.13.
20916 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
20917
20918 2001-02-02 Akim Demaille <akim@epita.fr>
20919
20920 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
20921 * lib/xalloc.h, lib/xmalloc.c: Update.
20922
20923 2001-01-19 Akim Demaille <akim@epita.fr>
20924
20925 Get rid of the ad hoc handling of token_buffer in the scanner: use
20926 the obstacks.
20927
20928 * src/lex.c (token_obstack): New.
20929 (init_lex): Initialize it. No longer call...
20930 (grow_token_buffer): this. Remove it.
20931 Adjust all the places which used it to use the obstack.
20932
20933 2001-01-19 Akim Demaille <akim@epita.fr>
20934
20935 * src/lex.h: Rename all the tokens:
20936 s/\bENDFILE\b/tok_eof/g;
20937 s/\bIDENTIFIER\b/tok_identifier/g;
20938 etc.
20939 Let them be enums, not #define, to ease debugging.
20940 Adjust all the code.
20941
20942 2001-01-18 Akim Demaille <akim@epita.fr>
20943
20944 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
20945 * src/lex.c (maxtoken, grow_token_buffer): Static.
20946
20947 2001-01-18 Akim Demaille <akim@epita.fr>
20948
20949 Since we now use obstacks, more % directives can be enabled.
20950
20951 * src/lex.c (percent_table): Also accept `%yacc',
20952 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
20953 `%debug'.
20954 Handle the actions for `%semantic_parser' and `%pure_parser' here,
20955 instead of returning a token.
20956 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
20957 * src/reader.c (read_declarations): Adjust.
20958 * src/files.c (open_files): Don't call `compute_base_names', don't
20959 compute `attrsfile' since they depend upon data which might be
20960 *in* the input file now.
20961 (output_files): Do it here.
20962 * src/output.c (output_headers): Document the fact that this patch
20963 introduces a guaranteed SEGV for semantic parsers.
20964 * doc/bison.texinfo: Document them.
20965 * tests/suite.at: Exercise these %options.
20966
20967 2000-12-20 Akim Demaille <akim@epita.fr>
20968
20969 Also handle the output file (--verbose) with obstacks.
20970
20971 * files.c (foutput): Remove.
20972 (output_obstack): New.
20973 Adjust all dependencies.
20974 * src/conflicts.c: Return a string.
20975 * src/system.h (obstack_grow_string): Rename as...
20976 (obstack_sgrow): this. Be ready to work with non literals.
20977 (obstack_fgrow4): New.
20978
20979 2000-12-20 Akim Demaille <akim@epita.fr>
20980
20981 * src/files.c (open_files): Fix the computation of short_base_name
20982 in the case of `-o foo.tab.c'.
20983
20984 2000-12-20 Akim Demaille <akim@epita.fr>
20985
20986 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
20987 (copy_dollar): Now that everything uses obstacks, get rid of the
20988 FILE * parameters.
20989
20990 2000-12-20 Akim Demaille <akim@epita.fr>
20991
20992 * src/files.c (open_files): Actually the `.output' file is based
20993 on the short_base_name, not base_name.
20994 * tests/suite.at (Checking output file names): Adjust.
20995
20996 2000-12-20 Akim Demaille <akim@epita.fr>
20997
20998 * src/bison.s1: Remove, we now use directly...
20999 * src/bison.simple: this.
21000 * src/Makefile.am: Use pkgdata instead of data.
21001
21002 2000-12-20 Akim Demaille <akim@epita.fr>
21003
21004 * src/files.c (guard_obstack): New.
21005 (open_files): Initialize it.
21006 (output_files): Dump it...
21007 * src/files.h: Export it.
21008 * src/reader.c (copy_guard): Use it.
21009
21010 2000-12-19 Akim Demaille <akim@epita.fr>
21011
21012 * src/files.c (outfile, defsfile, actfile): Removed as global
21013 vars.
21014 (open_files): Don't compute them.
21015 (output_files): Adjust.
21016 (base_name, short_base_name): Be global.
21017 Adjust dependencies.
21018
21019 2000-12-19 Akim Demaille <akim@epita.fr>
21020
21021 * src/files.c (strsuffix): New.
21022 (stringappend): Be just like strcat but allocate.
21023 (base_names): Eve out from open_files.
21024 Try to simplify the rather hairy computation of base_name and
21025 short_base_name.
21026 (open_files): Use it.
21027 * tests/suite.at (Checking output file names): New test.
21028
21029 2000-12-19 Akim Demaille <akim@epita.fr>
21030
21031 * src/system.h (obstack_grow_literal_string): Rename as...
21032 (obstack_grow_string): this.
21033 * src/output.c (output_parser): Recognize `%% actions' instead of
21034 `$'.
21035 * src/bison.s1: s/$/%% actions/.
21036 * src/bison.hairy: Likewise.
21037
21038 2000-12-19 Akim Demaille <akim@epita.fr>
21039
21040 * src/output.c (output_parser): Compute the `#line' lines when
21041 there are.
21042 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21043 Suggested by Hans Aberg.
21044
21045 2000-12-19 Akim Demaille <akim@epita.fr>
21046
21047 Let the handling of the skeleton files be local to the procedures
21048 that use it.
21049
21050 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21051 longer static.
21052 (fparser, open_extra_files): Remove.
21053 (open_files, output_files): Don't take care of fparser.
21054 * src/files.h: Adjust.
21055 * src/output.c (output_parser): Open and close the file to the
21056 skeleton.
21057 * src/reader.c (read_declarations): When %semantic_parser, open
21058 fguard.
21059
21060 2000-12-19 Akim Demaille <akim@epita.fr>
21061
21062 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21063 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21064
21065 2000-12-19 Akim Demaille <akim@epita.fr>
21066
21067 * src/files.c (open_files): Yipee! We no longer need all the code
21068 looking for `/tmp' since we have no tmp file.
21069
21070 2000-12-19 Akim Demaille <akim@epita.fr>
21071
21072 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21073 New macros.
21074 * src/files.c (open_files): Less dependency on MSDOS etc.
21075
21076 2000-12-14 Akim Demaille <akim@epita.fr>
21077
21078 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21079 Provide a default definition.
21080 Use it when executing the default @ action.
21081 * src/reader.c (reader_output_yylsp): No longer include
21082 `timestamp' and `text' in the default YYLTYPE.
21083
21084 2000-12-12 Akim Demaille <akim@epita.fr>
21085
21086 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21087 (copy_guard): Quote the file names.
21088 Reported by Laurent Mascherpa.
21089
21090 2000-12-12 Akim Demaille <akim@epita.fr>
21091
21092 * src/output.c (output_headers, output_program, output): Be sure
21093 to escape special characters when outputting filenames.
21094 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21095 (output_headers): Don't depend on them, Use ACTSTR.
21096
21097 2000-11-17 Akim Demaille <akim@epita.fr>
21098
21099 * lib/obstack.h: Formatting changes.
21100 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21101 prevents type checking.
21102 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21103 cast the value to (void *): assigning a `foo *' to a `void *'
21104 variable is valid.
21105 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21106 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21107 append characters.
21108
21109 2000-11-17 Akim Demaille <akim@epita.fr>
21110
21111 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21112 as...
21113 (suite.m4, regression.m4, calc.m4): these.
21114 * tests/atgeneral.m4: Update from CVS Autoconf.
21115
21116 2000-11-17 Akim Demaille <akim@epita.fr>
21117
21118 * tests/regression.m4 (%union and --defines): New test,
21119 demonstrating a current bug in the obstack implementation.
21120
21121 2000-11-17 Akim Demaille <akim@epita.fr>
21122
21123 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21124 macros.
21125 Use them to declare the variables which are global or local to
21126 `yyparse'.
21127
21128 2000-11-17 Akim Demaille <akim@epita.fr>
21129
21130 * acconfig.h: Remove, no longer used.
21131
21132 2000-11-07 Akim Demaille <akim@epita.fr>
21133
21134 * src: s/Copyright (C)/Copyright/g.
21135
21136 2000-11-07 Akim Demaille <akim@epita.fr>
21137
21138 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21139 defining.
21140 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21141
21142 2000-11-07 Akim Demaille <akim@epita.fr>
21143
21144 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21145 Merge in a single CPP if/else.
21146
21147 2000-11-07 Akim Demaille <akim@epita.fr>
21148
21149 * src/output.c (output): Remove useless variables.
21150 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21151 argument `data' for consistency with the prototypes.
21152 Qualify it `const'.
21153 (obstack_copy, obstack_copy0): Rename the second argument as
21154 `address' for consistency. Qualify it `const'.
21155 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21156 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21157 `const' their input argument (`data' or `address').
21158 Adjust the corresponding macros to include `const' in casts.
21159
21160 2000-11-03 Akim Demaille <akim@epita.fr>
21161
21162 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21163 s/PFILE1/BISON_HAIRY/.
21164 Adjust dependencies.
21165
21166 2000-11-03 Akim Demaille <akim@epita.fr>
21167
21168 For some reason, this was not applied.
21169
21170 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21171 `unlink': it's no longer used.
21172
21173 2000-11-03 Akim Demaille <akim@epita.fr>
21174
21175 * src/files.c (skeleton_find): New function, eved out of...
21176 (open_files, open_extra_files): here.
21177
21178 2000-11-03 Akim Demaille <akim@epita.fr>
21179
21180 Don't use `atexit'.
21181
21182 * src/files.c (obstack_save): New function.
21183 (done): Rename as...
21184 (output_files): this.
21185 Use `obstack_save'.
21186 * src/main.c (main): Don't use `atexit' to register `done', since
21187 it no longer has to remove tmp files, just call `output_files'
21188 when there are no errors.
21189
21190 2000-11-02 Akim Demaille <akim@epita.fr>
21191
21192 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21193 `unlink': it's no longer used.
21194 * src/files.h: Formatting changes.
21195
21196 2000-11-02 Akim Demaille <akim@epita.fr>
21197
21198 Remove the last uses of mktemp and unlink/delete.
21199
21200 * src/files.c (fdefines, ftable): Removed.
21201 (defines_ostack, table_obstack): New.
21202 Adjust dependencies of the former into uses of the latter.
21203 * src/output.c (output_short_or_char_table, output_short_table):
21204 Convert to using obstacks.
21205 * src/reader.c (copy_comment2): Accept one FILE * and two
21206 obstacks.
21207 (output_token_defines, reader_output_yylsp): Use obstacks.
21208 * src/system.h (obstack_fgrow3): New.
21209 * po/POTFILES.in: Adjust.
21210
21211 2000-11-01 Akim Demaille <akim@epita.fr>
21212
21213 Change each use of `fattrs' into a use of `attrs_obstack'.
21214
21215 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21216 * src/files.c (fattrs): Remove.
21217 (attrs_obstack): New.
21218 Adjust all dependencies.
21219 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21220
21221 2000-11-01 Akim Demaille <akim@epita.fr>
21222
21223 Introduce obstacks.
21224 Change each use of `faction' into a use of `action_obstack'.
21225
21226 * lib/obstack.h, lib/obstack.c: New files.
21227 * src/files.c (faction): Remove.
21228 (action_obstack): New.
21229 Adjust all dependencies.
21230
21231 2000-10-20 Akim Demaille <akim@epita.fr>
21232
21233 * lib/quote.h (PARAMS): New macro. Use it.
21234
21235 2000-10-16 Akim Demaille <akim@epita.fr>
21236
21237 * src/output.c (output_short_or_char_table): New function.
21238 (output_short_table, output_token_translations): Use it.
21239 (goto_actions): Use output_short_table.
21240
21241 2000-10-16 Akim Demaille <akim@epita.fr>
21242
21243 * src/symtab.c (bucket_new): New function.
21244 (getsym): Use it.
21245
21246 * src/output.c (output_short_table): New argument to display the
21247 comment associated with the table.
21248 Adjust dependencies.
21249 (output_gram): Use it.
21250 (output_rule_data): Nicer output layout for YYTNAME.
21251
21252 2000-10-16 Akim Demaille <akim@epita.fr>
21253
21254 * src/lex.c (read_typename): New function.
21255 (lex): Use it.
21256 * src/reader.c (copy_dollar): Likewise.
21257
21258 2000-10-16 Akim Demaille <akim@epita.fr>
21259
21260 * src/reader.c (copy_comment2): Expect the input stream to be on
21261 the `/' which is suspected to open a comment, instead of being
21262 called after `//' or `/*' was read.
21263 (copy_comment, copy_definition, parse_union_decl, copy_action)
21264 (copy_guard): Adjust.
21265
21266 2000-10-16 Akim Demaille <akim@epita.fr>
21267
21268 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21269 `read_signed_integer'.
21270
21271 2000-10-16 Akim Demaille <akim@epita.fr>
21272
21273 * src/reader.c (copy_dollar): New function.
21274 (copy_guard, copy_action): Use it.
21275
21276 2000-10-16 Akim Demaille <akim@epita.fr>
21277
21278 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21279 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21280 New files, from Fileutils 4.0.27.
21281 * src/main.c (printable_version): Remove.
21282 * src/lex.c, src/reader.c: Use `quote'.
21283
21284 2000-10-04 Akim Demaille <akim@epita.fr>
21285
21286 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21287
21288 2000-10-04 Akim Demaille <akim@epita.fr>
21289
21290 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21291
21292 2000-10-04 Akim Demaille <akim@epita.fr>
21293
21294 When a literal string is used to define two different tokens,
21295 `bison -v' segfaults.
21296 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21297
21298 * tests/regression.m4: New file.
21299 Include the core of the sample provided by Piotr Gackiewicz.
21300 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21301 properly.
21302
21303 2000-10-04 Akim Demaille <akim@epita.fr>
21304
21305 * src/reader.c (parse_expect_decl): Keep `count' within the size
21306 of `buffer'.
21307 From Neil Booth.
21308
21309 2000-10-02 Paul Eggert <eggert@twinsun.com>
21310
21311 * bison.s1 (yyparse): Assign the default value
21312 unconditionally, to avoid a GCC warning and make the parser a
21313 tad smaller.
21314
21315 2000-10-02 Akim Demaille <akim@epita.fr>
21316
21317 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21318 options.
21319
21320 2000-10-02 Akim Demaille <akim@epita.fr>
21321
21322 * src/derives.c, src/print.c, src/reduce.c: To ease the
21323 translation, move some `\n' out of the translated strings.
21324
21325 2000-10-02 Akim Demaille <akim@epita.fr>
21326
21327 The location tracking mechanism is precious for parse error
21328 messages. Nevertheless, it is enabled only when `@n' is used in
21329 the grammar, which is a different issue (you can use it in error
21330 message, but not in the grammar per se). Therefore, there should
21331 be another means to enable it.
21332
21333 * src/getargs.c (getargs): Support `--locations'.
21334 (usage): Report it.
21335 * src/getargs.h (locationsflag): Export it.
21336 * src/lex.c (percent_table): Support `%locations'.
21337 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21338 with `locationsflag'.
21339 * doc/bison.texinfo: Document `--locations' and `%locations'.
21340 Sort the options.
21341 * tests/calc.m4: Test it.
21342
21343 For regularity of the names, replace each
21344 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21345 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21346 In addition replace each `flag' with `_flag'.
21347
21348 2000-10-02 Akim Demaille <akim@epita.fr>
21349
21350 Also test parse error messages, including with YYERROR_VERBOSE.
21351
21352 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21353 associative).
21354 Use it to check the computations.
21355 Use it to check `nonassoc' is honored.
21356 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21357 `--yyerror-verbose'.
21358 (_AT_CHECK_CALC): Adjust to this option.
21359 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21360
21361 2000-10-02 Akim Demaille <akim@epita.fr>
21362
21363 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21364 the latter demonstrates a flaw in the handling of non debugging
21365 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21366 was used in order to simplify:
21367
21368 #if YYDEBUG
21369 if (yydebug)
21370 {
21371 ...
21372 }
21373 #endif
21374
21375 into
21376
21377 if (yydebug)
21378 {
21379 ...
21380 }
21381
21382 unfortunately this leads to a CPP conflict when
21383 `--name-prefix=foo' is used since it produces `#define yydebug
21384 foodebug'.
21385
21386 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21387 (YYDPRINTF): New macro.
21388 Spread its use.
21389 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21390 the bison options.
21391 Also test `--verbose', `--defines' and `--name-prefix'.
21392
21393 2000-10-02 Akim Demaille <akim@epita.fr>
21394
21395 Improve the readability of the produced parsers.
21396
21397 * src/bison.s1: Formatting changes.
21398 Improve the comment related to the `$' mark.
21399 (yydefault): Don't fall through to `yyresume': `goto' there.
21400 * src/output.c (output_parser): When the `$' is met, skip the end
21401 of its line.
21402 New variable, `number_of_dollar_signs', to check there's exactly
21403 one `$' in the parser skeleton.
21404
21405 2000-10-02 Akim Demaille <akim@epita.fr>
21406
21407 * lib/xstrdup.c: New file, from the fileutils.
21408 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21409 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21410 instead of strlen + xmalloc + strcpy.
21411 * src/symtab.c (copys): Remove, use xstrdup instead.
21412
21413 2000-10-02 Akim Demaille <akim@epita.fr>
21414
21415 * src/gram.h (associativity): New enum type which replaces the
21416 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21417 `right_assoc', `left_assoc' and `non_assoc'.
21418 Adjust all dependencies.
21419 * src/reader.c: Formatting changes.
21420 (LTYPESTR): Don't define it, use it as a literal in
21421 `reader_output_yylsp'.
21422 * src/symtab.h (symbol_class): New enum type which replaces the
21423 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21424 `sunknown', `stoken and `snterm'.
21425
21426 2000-10-02 Akim Demaille <akim@epita.fr>
21427
21428 * src/getargs.c (fixed_outfiles): Rename as...
21429 (yaccflag): for consistency and accuracy.
21430 Adjust dependencies.
21431
21432 2000-10-02 Akim Demaille <akim@epita.fr>
21433
21434 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21435 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21436 difficult and introduced a lot of core dump. It turns out that
21437 Bison used an implementation of `xmalloc' based on `calloc', and
21438 at various places it does depend upon the initialization to 0. I
21439 have not tried to isolate the pertinent places, and all the former
21440 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21441 someone should address this issue.
21442
21443 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21444 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21445 files.
21446 Adjust dependencies.
21447 * src/warshall.h: New file.
21448 Propagate.
21449
21450 2000-10-02 Akim Demaille <akim@epita.fr>
21451
21452 Various anti-`extern in *.c' changes.
21453
21454 * src/system.h: Include `assert.h'.
21455
21456 2000-10-02 Akim Demaille <akim@epita.fr>
21457
21458 * src/state.h (nstates, final_state, first_state, first_shift)
21459 (first_reduction): Move their exportation from here...
21460 * src/LR0.h: to here.
21461 Adjust dependencies.
21462 * src/getargs.c (statisticsflag): New variable.
21463 Add support for `--statistics'.
21464 Adjust dependencies.
21465
21466 Remove a lot of now useless `extern' statements in most files.
21467
21468 2000-10-02 Akim Demaille <akim@epita.fr>
21469
21470 * src/LR0.h: New file.
21471 Propagate its use.
21472
21473 2000-10-02 Akim Demaille <akim@epita.fr>
21474
21475 * src/print.h: New file.
21476 Propagate its use.
21477 * src/print.c: Formatting and ordering changes.
21478 (verbose, terse): Replace with...
21479 (print_results): this new function.
21480 Adjust dependencies.
21481
21482 2000-10-02 Akim Demaille <akim@epita.fr>
21483
21484 * src/conflicts.c (conflict_report): New function.
21485 (conflict_log, verbose_conflict_log): Replace with...
21486 (print_conflicts): this function.
21487 Adjust dependencies.
21488 * src/conflicts.h: New file.
21489 Propagate its inclusion.
21490
21491 2000-10-02 Akim Demaille <akim@epita.fr>
21492
21493 * src/nullable.h: New file.
21494 Propagate its inclusion.
21495 * src/nullable.c: Formatting changes.
21496
21497 2000-10-02 Akim Demaille <akim@epita.fr>
21498
21499 * src/reduce.h: New file.
21500 Propagate its inclusion.
21501 * src/reduce.c: Topological sort and other formatting changes.
21502 (bool, TRUE, FALSE): Move their definition to...
21503 * src/system.h: here.
21504
21505 2000-10-02 Akim Demaille <akim@epita.fr>
21506
21507 * src/files.c: Formatting changes.
21508 (tryopen, tryclose, openfiles): Rename as...
21509 (xfopen, xfclose, open_files): this.
21510 (stringappend): static.
21511 * src/files.h: Complete the list of exported symbols.
21512 Propagate its use.
21513
21514 2000-10-02 Akim Demaille <akim@epita.fr>
21515
21516 * src/reader.h: New file.
21517 Propagate its use instead of tedious list of `extern' and
21518 prototypes.
21519 * src/reader.c: Formatting changes, topological sort,
21520 s/register//.
21521
21522 2000-10-02 Akim Demaille <akim@epita.fr>
21523
21524 * src/lex.h: Prototype `lex.c' exported functions.
21525 * src/reader.c: Adjust.
21526 * src/lex.c: Formatting changes.
21527 (safegetc): Rename as...
21528 (xgetc): this.
21529
21530 2000-10-02 Akim Demaille <akim@epita.fr>
21531
21532 * src/lalr.h: New file.
21533 Propagate its inclusion instead of prototypes and `extern'.
21534 * src/lalr.c: Formatting changes, topological sorting etc.
21535
21536 2000-10-02 Akim Demaille <akim@epita.fr>
21537
21538 * src/output.c (token_actions): Introduce a temporary array,
21539 YYDEFACT, that makes it possible for this function to use
21540 output_short_table.
21541
21542 2000-10-02 Akim Demaille <akim@epita.fr>
21543
21544 `user_toknums' is output as a `short[]' in `output.c', while it is
21545 defined as a `int[]' in `reader.c'. For consistency with the
21546 other output tables, `user_toknums' is now defined as a table of
21547 shorts.
21548
21549 * src/reader.c (user_toknums): Be a short table instead of an int
21550 table.
21551 Adjust dependencies.
21552
21553 Factor the short table outputs.
21554
21555 * src/output.c (output_short_table): New function.
21556 * src/output.c (output_gram, output_stos, output_rule_data)
21557 (output_base, output_table, output_check): Use it.
21558
21559 2000-10-02 Akim Demaille <akim@epita.fr>
21560
21561 * src/output.c (output): Topological sort of the functions, in
21562 order to get rid of the `static' prototypes.
21563 No longer use `register'.
21564 * src/output.h: New file.
21565 Propagate its inclusion in files explicitly prototyping functions
21566 from output.c.
21567
21568 2000-09-21 Akim Demaille <akim@epita.fr>
21569
21570 * src/atgeneral.m4: Update from Autoconf.
21571
21572 2000-09-21 Akim Demaille <akim@epita.fr>
21573
21574 * src/closure.h: New file.
21575 * src/closure.c: Formatting changes, topological sort over the
21576 functions, use of closure.h.
21577 (initialize_closure, finalize_closure): Rename as...
21578 (new_closure, free_closure): these. Adjust dependencies.
21579 * src/LR0.c: Formatting changes, topological sort, use of
21580 cloture.h.
21581 (initialize_states): Rename as...
21582 (new_states): this.
21583 * src/Makefile.am (noinst_HEADERS): Adjust.
21584
21585 2000-09-20 Akim Demaille <akim@epita.fr>
21586
21587 * src/acconfig.h: Don't protect config.h against multiple
21588 inclusion.
21589 Don't define PARAMS.
21590 * src/system.h: Define PARAMS.
21591 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
21592 purpose of config.h. system.h must not try to fix wrong
21593 definitions in config.h.
21594
21595 2000-09-20 Akim Demaille <akim@epita.fr>
21596
21597 * src/derives.h: New file.
21598 * src/main.c, src/derives.h: Use it.
21599 Formatting changes.
21600 * src/Makefile.am (noinst_HEADERS): Adjust.
21601
21602 2000-09-20 Akim Demaille <akim@epita.fr>
21603
21604 * tests/atgeneral.m4: Update from Autoconf.
21605 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
21606 (AT_CHECK_CALC): New macros.
21607 Use these macros to test bison with options `', `--raw',
21608 `--debug', `--yacc', `--yacc --debug'.
21609
21610 2000-09-19 Akim Demaille <akim@epita.fr>
21611
21612 * src/output.c: Formatting changes.
21613 * src/machine.h: Remove, leaving its contents in...
21614 * src/system.h: here.
21615 Include stdio.h.
21616 Adjust all dependencies on stdio.h and machine.h.
21617 * src/getargs.h: New file.
21618 Let all `extern' declarations about getargs.c be replaced with
21619 inclusion of `getargs.h'.
21620 * src/Makefile.am (noinst_HEADERS): Adjust.
21621
21622 * tests/calc.m4 (yyin): Be initialized in main, not on the global
21623 scope.
21624 (yyerror): Returns void, not int.
21625 * doc/bison.texinfo: Formatting changes.
21626
21627 2000-09-19 Akim Demaille <akim@epita.fr>
21628
21629 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
21630 portable.
21631
21632 2000-09-18 Akim Demaille <akim@epita.fr>
21633
21634 * configure.in: Append WARNING_CFLAGS to CFLAGS.
21635 * src/Makefile.am (INCLUDES): Don't.
21636 Be ready to fetch headers in lib/.
21637
21638 2000-09-18 Akim Demaille <akim@epita.fr>
21639
21640 * doc/bison.texinfo: Update the copyright.
21641 ANSIfy and GNUify the examples.
21642 Remove the old menu.
21643
21644 2000-09-18 Akim Demaille <akim@epita.fr>
21645
21646 First set of tests: use the `calc' example from the documentation.
21647
21648 * src/bison.s1 (yyparse): Condition the code using `yytname' which
21649 is defined only when YYDEBUG is.
21650 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
21651 * src/files.c (tryopen, tryclose): Formatting changes.
21652 Move to the top and be static.
21653 * src/reader.c (read_signed_integer): Likewise.
21654 * tests/calc.m4: New file.
21655 * Makefile.am, suite.m4: Adjust.
21656 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
21657
21658 2000-09-18 Akim Demaille <akim@epita.fr>
21659
21660 Add support for an Autotest test suite for Bison.
21661
21662 * m4/m4.m4, m4/atconfig.m4: New files.
21663 * m4/Makefile.am (EXTRA_DIST): Adjust.
21664 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
21665 files.
21666 * src/getargs.c: Display a more standard --version message.
21667 * src/reader.c (reader): Formatting changes.
21668 No longer depend upon VERSION_STRING.
21669 * configure.in: No longer use `dnl'.
21670 Set up the test suite and the new directory `tests/.
21671 (VERSION_STRING): Remove.
21672
21673 2000-04-14 Akim Demaille <akim@epita.fr>
21674
21675 * src/reader.c (copy_comment2): New function, same as former
21676 `copy_comment', but outputs into two FILE *.
21677 (copy_comment): Use it.
21678 (parse_union_decl): Use it.
21679 (get_type, parse_start_decl): Use the same `invalid' message.
21680 (parse_start_decl, parse_union_decl): Use the same `multiple'
21681 message.
21682 (parse_union_decl, copy_guard, copy_action): Use the same
21683 `unmatched' message.
21684 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
21685
21686 2000-03-31 Akim Demaille <akim@epita.fr>
21687
21688 * src/files.c (tryopen, tryclose): Move to the top.
21689 Be static.
21690
21691 2000-03-31 Akim Demaille <akim@epita.fr>
21692
21693 * src/main.c (main): Don't call `done', exit does it.
21694
21695 2000-03-31 Akim Demaille <akim@epita.fr>
21696
21697 * allocate.c: s/return (foo)/return foo/.
21698 * lalr.c: Likewise.
21699 * LR0.c: Likewise.
21700 * output.c: Likewise.
21701 * reader.c: Likewise.
21702 * symtab.c: Likewise.
21703 * vmsgetargs.c: Likewise.
21704
21705 2000-03-31 Akim Demaille <akim@epita.fr>
21706
21707 Clean up the error reporting functions.
21708
21709 * src/report.c: New file.
21710 * src/report.h: Likewise.
21711 * src/Makefile.am: Adjust.
21712 * m4/error.m4: New file.
21713 * m4/Makefile.am: Adjust.
21714 * configure.in (jm_PREREQ_ERROR): Call it.
21715 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
21716 Remove.
21717 (fatal, fatals): Remove. All callers use complain.c::fatal.
21718 (warn, warni, warns, warnss, warnss): Remove. All callers use
21719 complain.c::complain.
21720 (toomany): Remove, use fatal instead.
21721 * src/files.c (done): No argument, use complain_message_count.
21722 * src/main.c (main): Register `done' to `atexit'.
21723
21724 * src/getargs.c (usage): More `fputs', less `fprintf'.
21725
21726 2000-03-28 Akim Demaille <akim@epita.fr>
21727
21728 * lib/: New directory.
21729 * Makefile.am (SUBDIRS): Adjust.
21730 * configure.in: Adjust.
21731 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
21732 useless.
21733 * src/alloca.c: Moved to lib/.
21734 * src/getopt.c: Likewise.
21735 * src/getopt1.c: Likewise.
21736 * src/getopt.h: Likewise.
21737 * src/ansi2knr.c: Likewise.
21738 * src/ansi2knr.1: Likewise.
21739 * src/Makefile.am: Adjust.
21740 * lib/Makefile.am: New file.
21741
21742 2000-03-28 Akim Demaille <akim@epita.fr>
21743
21744 * src/getargs.c (usage): Refresh the help message.
21745
21746 2000-03-17 Akim Demaille <akim@epita.fr>
21747
21748 * src/getopt1.c: Updated from textutils 2.0e
21749 * src/getopt.c: Likewise.
21750 * src/getopt.h: Likewise.
21751
21752 2000-03-17 Akim Demaille <akim@epita.fr>
21753
21754 * src/Makefile.am (bison.simple): Fix the awk program: quote only
21755 the file name, not the whole `#line LINE FILE'.
21756
21757 2000-03-17 Akim Demaille <akim@epita.fr>
21758
21759 On syntax errors, report the token on which we choked.
21760
21761 * src/bison.s1 (yyparse): In the label yyerrlab, when
21762 YYERROR_VERBOSE, add yychar in msg.
21763
21764 2000-03-17 Akim Demaille <akim@epita.fr>
21765
21766 * src/reader.c (copy_at): New function.
21767 (copy_guard): Use it.
21768 (copy_action): Use it.
21769
21770 2000-03-17 Akim Demaille <akim@epita.fr>
21771
21772 Be kind to translators, save some useless translations.
21773
21774 * src/main.c (banner): New function.
21775 (fatal_banner): Use it.
21776 (warn_banner): Use it.
21777
21778 2000-03-17 Akim Demaille <akim@epita.fr>
21779
21780 * src/reader.c (copy_definition): Use copy_string and
21781 copy_comment. Removed now unused `match', `ended',
21782 `cplus_comment'.
21783 (copy_comment, copy_string): Moved, to be visible from
21784 copy_definition.
21785
21786 2000-03-17 Akim Demaille <akim@epita.fr>
21787
21788 * src/reader.c (copy_string): Declare `static inline'. No
21789 problems with inline, since it is checked by configure.
21790 (copy_comment): Likewise.
21791
21792 2000-03-17 Akim Demaille <akim@epita.fr>
21793
21794 * src/reader.c (packsymbols): Formatting changes.
21795
21796 2000-03-17 Akim Demaille <akim@epita.fr>
21797
21798 * src/reader.c (copy_comment): New function, factored out from:
21799 (copy_action): Use it. Removed now unused `match', `ended',
21800 `cplus_comment'.
21801 (copy_guard): Likewise.
21802
21803 2000-03-17 Akim Demaille <akim@epita.fr>
21804
21805 * src/reader.c (copy_string): New function, factored out from:
21806 (copy_action): Use it.
21807 (copy_guard): Likewise.
21808
21809 2000-03-17 Akim Demaille <akim@epita.fr>
21810
21811 Change the handling of @s so that they behave exactly like $s.
21812 There is now a pseudo variable @$ (readble and writable), location
21813 of the lhs of the rule (by default ranging from the location of
21814 the first symbol of the rhs, to the location of the last symbol,
21815 or, if the rhs is empty, YYLLOC).
21816
21817 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
21818 yyval.
21819 (yyparse): When providing a default semantic action, provide a
21820 default location action.
21821 (after the $): No longer change `*YYLSP', just stack YYLOC the
21822 same way you stack YYVAL.
21823 * src/reader.c (read_declarations): Use warns.
21824 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
21825 (copy_action, case '@'): Likewise.
21826 Use a standard error message, to save useless work from
21827 translators.
21828
21829 2000-03-17 Akim Demaille <akim@epita.fr>
21830
21831 * src/bison.s1: Formatting and cosmetics changes.
21832 * src/reader.c: Likewise.
21833 Update the Copyright notice.
21834
21835 2000-03-17 Akim Demaille <akim@epita.fr>
21836
21837 * src/bison.s1 (#line): All set to `#line' only, since the
21838 Makefile now handles them.
21839
21840 2000-03-16 Akim Demaille <akim@epita.fr>
21841
21842 * src/output.c (output_rule_data): Output the documentation of
21843 some of the tables.
21844 (Copyright notice): Update.
21845 Formatting changes.
21846
21847 2000-03-16 Akim Demaille <akim@epita.fr>
21848
21849 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
21850 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
21851 One `#if YYDEBUG' remains, since it uses variables which are
21852 defined only if `YYDEBUG != 0'.
21853
21854 2000-03-16 Akim Demaille <akim@epita.fr>
21855
21856 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
21857 and related variables so that the similarities are highlighted.
21858
21859 2000-03-16 Akim Demaille <akim@epita.fr>
21860
21861 * src/bison.s1: Properly indent CPP directives.
21862
21863 2000-03-16 Akim Demaille <akim@epita.fr>
21864
21865 * src/bison.s1: Properly indent the `alloca' CPP section.
21866
21867 2000-03-16 Akim Demaille <akim@epita.fr>
21868
21869 Do not hard code values of directories in `configure.in'.
21870 Update the `configure' tool chain.
21871
21872 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
21873 src/makefile.am.
21874 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
21875 (AC_OUTPUT): Add m4/Makefile.
21876 Bump to bison 1.28a, 1.29 has never been released.
21877 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
21878 handled via src/Makefile.am.
21879 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
21880 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
21881 autoheader.
21882 * Makefile.am (SUBDIRS): Add m4.
21883 (ACLOCAL_AM_FLAGS): New variable.
21884 (AUTOMAKE_OPTIONS): Add check-news.
21885 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
21886 the proper line number and file name.
21887 (DEFS): Propagate the location of bison library files and of the
21888 locale files.
21889 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
21890 builddir.
21891 * acinclude.m4: Remove, replaced by the directory m4.
21892 * m4/Makefile.am (EXTRA_DIST): New variable.
21893 * m4/gettext.m4: New file, from the fileutils.
21894 * m4/lcmessage.m4: Likewise
21895 * m4/progtest.m4: Likewise.
21896 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
21897
21898 2000-03-10 Akim Demaille <akim@epita.fr>
21899
21900 * src/closure.c:
21901 Formatting changes of various comments.
21902 Respect the GNU coding standards at various places.
21903 Don't use `_()' when no translation is needed.
21904
21905 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21906
21907 * src/files.c:
21908 OS/2 honors TMPDIR environment variable.
21909
21910 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21911
21912 * doc/bison.texinfo: Tweaked spelling and grammar.
21913 Updated ISBN.
21914 Removed reference to price of printed copy.
21915 Mention BISON_SIMPLE and BISON_HAIRY.
21916
21917 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21918
21919 * configure.in, NEWS:
21920 Bison 1.29 released.
21921
21922 1999-10-27 Jesse Thilo <jthilo@gnu.org>
21923
21924 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
21925 Added reference card.
21926
21927 1999-07-26 Jesse Thilo <jthilo@gnu.org>
21928
21929 * po/ru.po: Added Russian translation.
21930
21931 1999-07-26 Jesse Thilo <jthilo@gnu.org>
21932
21933 * configure.in: Added Russian translation.
21934
21935 1999-07-06 Jesse Thilo <jthilo@gnu.org>
21936
21937 * configure.in, NEWS, README:
21938 Released version 1.28.
21939
21940 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21941
21942 * src/system.h:
21943 Squashed redefinition warning on some systems.
21944
21945 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
21946 Have configure build version string instead of relying on ANSI string
21947 concatentation.
21948
21949 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21950
21951 * po/POTFILES.in: Got rid of version.c.
21952
21953 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21954
21955 * acconfig.h, configure.in:
21956 Have configure build version string instead of relying on ANSI string
21957 concatentation.
21958
21959 1999-06-08 Jesse Thilo <jthilo@gnu.org>
21960
21961 * doc/bison.1:
21962 Dropped mention of `+' for long-named options.
21963
21964 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21965
21966 * src/files.c: Added <unistd.h> for unlink().
21967
21968 * src/Makefile.am, src/system.h:
21969 I18n fixes.
21970
21971 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21972
21973 * README: Added a FAQ list.
21974
21975 * configure.in, acconfig.h:
21976 I18n fixes.
21977
21978 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21979
21980 * doc/FAQ, doc/Makefile.am:
21981 Added a FAQ list.
21982
21983 1999-05-19 Jesse Thilo <jthilo@gnu.org>
21984
21985 * src/alloc.h, src/symtab.h, src/version.c:
21986 Protected inclusion of "config.h" with HAVE_CONFIG_H.
21987
21988 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21989
21990 * src/.cvsignore, src/Makefile.am:
21991 Reorganized: sources in `src', documentation in `doc'.
21992
21993 * src/lex.c (literalchar):
21994 fixed the code for escaping double quotes (thanks
21995 Jonathan Czisny.)
21996
21997 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21998
21999 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22000 Adjusted paths to reflect directory reorganization.
22001
22002 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22003
22004 * doc/.cvsignore, doc/Makefile.am:
22005 Reorganized: sources in `src', documentation in `doc'.
22006
22007 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22008
22009 * configure.in:
22010 Updated AC_INIT file to reflect directory reorganization.
22011
22012 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22013 Reorganized: sources in `src', documentation in `doc'.
22014
22015 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22016
22017 * src/allocate.c:
22018 Don't declare calloc() and realloc() if not necessary.
22019
22020 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22021
22022 * configure.in, acconfig.h, acinclude.m4:
22023 Don't declare calloc() and realloc() if not necessary.
22024
22025 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22026
22027 * po/.cvsignore: Added i18n support.
22028
22029 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22030
22031 * acconfig.h, configure.in, Makefile.am:
22032 Added i18n support.
22033
22034 1999-03-22 Jesse Thilo <jthilo@gnu.org>
22035
22036 * src/bison.s1: Fixed #line numbers.
22037
22038 1999-03-15 Jesse Thilo <jthilo@gnu.org>
22039
22040 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22041 Added PO files from Translation Project.
22042
22043 1999-03-03 Jesse Thilo <jthilo@gnu.org>
22044
22045 * Makefile.am:
22046 Added support for non-ANSI compilers (ansi2knr).
22047
22048 1999-02-16 Jesse Thilo <jthilo@gnu.org>
22049
22050 * configure.in: Bumped version number to 1.27.
22051
22052 * Makefile.am:
22053 Added `bison.simple' to list of files removed by `make distclean'.
22054
22055 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22056
22057 * src/files.c, src/files.h:
22058 Defined locations of parser files in config.h instead of Makefile.
22059
22060 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22061
22062 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22063 Defined locations of parser files in config.h instead of Makefile.
22064
22065 1999-02-09 Jesse Thilo <jthilo@gnu.org>
22066
22067 * Makefile.am:
22068 Removed inappropriate use of $< macro.
22069
22070 1999-02-05 Jesse Thilo <jthilo@gnu.org>
22071
22072 * po/Makefile.in.in, po/POTFILES.in:
22073 Add `po' directory skeleton.
22074
22075 1999-01-27 Jesse Thilo <jthilo@gnu.org>
22076
22077 * README: Document help-bison list.
22078
22079 * configure.in: Add check for mkstemp().
22080
22081 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22082
22083 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22084 Hush a few compiler warnings.
22085
22086 * src/files.c:
22087 Add tryclose(), which verifies that fclose was successful.
22088 Hush a couple of compiler warnings.
22089
22090 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22091
22092 * Makefile.am, OChangeLog:
22093 ChangeLog is now automatically generated. Include the old version as
22094 OChangeLog.
22095
22096 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22097
22098 * 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:
22099 Update FSF address.
22100
22101 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22102
22103 * doc/bison.texinfo: Fix formatting glitch.
22104
22105 * doc/bison.texinfo: Update FSF address.
22106
22107 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22108
22109 * acconfig.h: Update FSF address.
22110
22111 1999-01-08 Jesse Thilo <jthilo@gnu.org>
22112
22113 * src/system.h:
22114 Don't define PACKAGE here, since config.h defines it.
22115
22116 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22117
22118 * src/reader.c: Update copyright date.
22119
22120 * src/main.c:
22121 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22122 favor of output directly to stderr (avoids buffer overruns).
22123
22124 * src/reader.c: Some checks for premature EOF.
22125
22126 * 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:
22127 Use prototypes if the compiler understands them.
22128
22129 * src/files.c: Honor TMPDIR on Unix hosts.
22130 Use prototypes if the compiler understands them.
22131
22132 * src/reader.c:
22133 Fix a couple of buffer overrun bugs.
22134 Use prototypes if the compiler understands them.
22135
22136 * src/system.h: Include unistd.h and ctype.h.
22137 Use #ifdef instead of #if for NLS symbols.
22138
22139 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22140
22141 * doc/bison.texinfo:
22142 Delete comment "consider using @set for edition number, etc..." since
22143 we now are doing so.
22144
22145 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22146
22147 * configure.in:
22148 Use prototypes if the compiler understands them.
22149
22150 * NEWS: Document 1.26 highlights.
22151
22152 * Makefile.am: Require Automake 1.3 or later.
22153
22154 * acconfig.h:
22155 Use prototypes if the compiler understands them.
22156
22157 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22158
22159 * src/version.c:
22160 Use VERSION symbol from automake for version number.
22161
22162 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22163
22164 * acconfig.h, configure.in, version.cin:
22165 Use VERSION symbol from automake for version number.
22166
22167 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22168
22169 * Makefile.am:
22170 Distribute original version of simple parser (bison.s1), not built
22171 version (bison.simple).
22172
22173 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22174
22175 * doc/bison.texinfo: Add info dir entry.
22176
22177 * doc/bison.texinfo:
22178 Let automake put version number into documentation.
22179
22180 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22181
22182 * src/bison.cld, src/build.com, src/vmshlp.mar:
22183 Add non-RCS files from /gd/gnu/bison.
22184
22185 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22186
22187 * doc/bison.1:
22188 Document the BISON_HAIRY and BISON_SIMPLE variables.
22189
22190 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22191
22192 * src/version.c: Build version.c automatically.
22193
22194 * src/reader.c:
22195 Fix token numbering (used to start at 258, not 257).
22196
22197 * src/system.h: Include config.h.
22198
22199 * src/getargs.c: Update bug report address.
22200
22201 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22202 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22203
22204 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22205
22206 * Makefile.am:
22207 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22208
22209 * configure.in, version.cin:
22210 Build version.c automatically.
22211
22212 * AUTHORS: Add AUTHORS file.
22213
22214 * README: Update bug report address.
22215
22216 * bison.simple:
22217 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22218
22219 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22220 Add automake stuff.
22221
22222 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22223
22224 * doc/bison.texinfo: Clean up some formatting.
22225
22226 1998-05-05 Richard Stallman <rms@gnu.org>
22227
22228 * doc/bison.texinfo:
22229 Explain better why to make a pure parser.
22230
22231 1998-01-05 Richard Stallman <rms@gnu.org>
22232
22233 * src/files.c (openfiles):
22234 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22235 find a temporary directory, if possible. Do not unlink files while
22236 they are open.
22237
22238 1997-08-25 Richard Stallman <rms@gnu.org>
22239
22240 * src/reader.c (stack_offset;):
22241 Change some warni to warns.
22242
22243 * src/lex.c (literalchar): Use warns, not warni.
22244
22245 1997-06-28 Richard Stallman <rms@gnu.org>
22246
22247 * src/bison.s1: Add a Bison version comment.
22248
22249 * src/main.c (fatal, warn, berror):
22250 Use program_name.
22251
22252 1997-06-28 Richard Stallman <rms@gnu.org>
22253
22254 * Makefile.in (bison_version): New variable.
22255 (dist): Use that variable.
22256 (bison.s1): Substitute the Bison version into bison.simple.
22257
22258 * bison.simple: Add a Bison version comment.
22259
22260 1997-06-18 Richard Stallman <rms@gnu.org>
22261
22262 * src/main.c (fatal, warn, berror):
22263 Make error messages standard.
22264 (toomany): Improve error message text.
22265
22266 * 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:
22267 new.h renamed to alloc.h.
22268
22269 1997-06-18 Richard Stallman <rms@gnu.org>
22270
22271 * Makefile.in: new.h renamed to alloc.h.
22272
22273 1997-05-24 Richard Stallman <rms@gnu.org>
22274
22275 * src/lex.c (literalchar):
22276 Fix the code for escaping \, " and '.
22277
22278 (lex): Avoid trouble when there are many chars
22279 to discard in a char literal with just several chars in it.
22280
22281 1997-05-17 Richard Stallman <rms@gnu.org>
22282
22283 * src/bison.s1:
22284 Use malloc, if using alloca is troublesome.
22285 (YYSTACK_USE_ALLOCA): New flag macro.
22286 Define it for some systems and compilers.
22287 (YYSTACK_ALLOC): New macro.
22288 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22289 If it was malloc'd, free it.
22290
22291 1997-05-17 Richard Stallman <rms@gnu.org>
22292
22293 * bison.simple:
22294 Use malloc, if using alloca is troublesome.
22295 (YYSTACK_USE_ALLOCA): New flag macro.
22296 Define it for some systems and compilers.
22297 (YYSTACK_ALLOC): New macro.
22298 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22299 If it was malloc'd, free it.
22300
22301 1997-04-23 Richard Stallman <rms@gnu.org>
22302
22303 * src/bison.s1:
22304 (alloca) [__hpux]: Always define as __builtin_alloca.
22305
22306 1997-04-23 Richard Stallman <rms@gnu.org>
22307
22308 * bison.simple:
22309 (alloca) [__hpux]: Always define as __builtin_alloca.
22310
22311 1997-04-22 Richard Stallman <rms@gnu.org>
22312
22313 * src/bison.s1:
22314 [__hpux]: Include alloca.h (right for HPUX 10)
22315 instead of declaring alloca (right for HPUX 9).
22316
22317 * src/bison.s1 (__yy_memcpy):
22318 Declare arg `count' as unsigned int.
22319 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22320
22321 1997-04-22 Richard Stallman <rms@gnu.org>
22322
22323 * bison.simple:
22324 [__hpux]: Include alloca.h (right for HPUX 10)
22325 instead of declaring alloca (right for HPUX 9).
22326
22327 * bison.simple (__yy_memcpy):
22328 Declare arg `count' as unsigned int.
22329 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22330
22331 1997-01-03 Richard Stallman <rms@gnu.org>
22332
22333 * src/allocate.c: [__STDC__ or _MSC_VER]:
22334 Declare calloc and realloc to return void *.
22335
22336 1997-01-02 Richard Stallman <rms@gnu.org>
22337
22338 * src/system.h:
22339 [_MSC_VER]: Include stdlib.h and process.h.
22340 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22341
22342 * src/main.c (main): Return FAILURE as a value.
22343 (printable_version): Declare arg as int, not char.
22344
22345 1997-01-02 Richard Stallman <rms@gnu.org>
22346
22347 * Makefile.in (dist):
22348 Explicitly check for symlinks, and copy them.
22349
22350 1996-12-19 Richard Stallman <rms@gnu.org>
22351
22352 * src/files.c:
22353 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22354
22355 1996-12-18 Paul Eggert <eggert@gnu.org>
22356
22357 * src/bison.s1 (yyparse):
22358 If __GNUC__ and YYPARSE_PARAM are both defined,
22359 declare yyparse to have a void * argument.
22360
22361 1996-12-18 Paul Eggert <eggert@gnu.org>
22362
22363 * bison.simple (yyparse):
22364 If __GNUC__ and YYPARSE_PARAM are both defined,
22365 declare yyparse to have a void * argument.
22366
22367 1996-12-17 Richard Stallman <rms@gnu.org>
22368
22369 * src/reduce.c (nbits): Add some casts.
22370
22371 1996-08-12 Richard Stallman <rms@gnu.org>
22372
22373 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22374
22375 1996-08-12 Richard Stallman <rms@gnu.org>
22376
22377 * bison.simple: Test _MSDOS as well as _MSDOS_.
22378
22379 1996-07-31 Richard Stallman <rms@gnu.org>
22380
22381 * src/bison.s1:
22382 [__sun && __i386]: Include alloca.h.
22383
22384 1996-07-31 Richard Stallman <rms@gnu.org>
22385
22386 * bison.simple:
22387 [__sun && __i386]: Include alloca.h.
22388
22389 1996-07-30 Richard Stallman <rms@gnu.org>
22390
22391 * src/bison.s1: Comment change.
22392
22393 * src/bison.s1: Test _MSDOS_, not MSDOS.
22394
22395 1996-07-30 Richard Stallman <rms@gnu.org>
22396
22397 * bison.simple: Comment change.
22398
22399 * bison.simple: Test _MSDOS_, not MSDOS.
22400
22401 1996-06-01 Richard Stallman <rms@gnu.org>
22402
22403 * 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:
22404 Insert `_' macro around many string constants.
22405
22406 * src/main.c:
22407 Insert `_' macro around many string constants.
22408
22409 (main): Call setlocale, bindtextdomain and textdomain.
22410
22411 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22412 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22413 [ENABLE_NLS]: Include libintl.h.
22414 [ENABLE_NLS] (gettext): Define.
22415 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22416 (N_, PACKAGE, LOCALEDIR): New macros.
22417
22418 1996-06-01 Richard Stallman <rms@gnu.org>
22419
22420 * POTFILES.in: New file.
22421
22422 * Makefile.in (allocate.o):
22423 Define target explicitly.
22424
22425 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22426 (LDFLAGS): Set to @LDFLAGS@.
22427 (configure): Run autoconf only if preceding `cd' succeeds.
22428 (bison.s1): Redirect output to temporary file then move the
22429 temporary to the target, rather than redirecting directly to bison.s1.
22430 (clean): Remove config.status and config.log.
22431 (distclean): Don't remove config.status here.
22432
22433 1996-05-12 Richard Stallman <rms@gnu.org>
22434
22435 * src/bison.s1:
22436 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22437
22438 1996-05-12 Richard Stallman <rms@gnu.org>
22439
22440 * bison.simple:
22441 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22442
22443 1996-05-11 Richard Stallman <rms@gnu.org>
22444
22445 * src/bison.s1 (__yy_memcpy):
22446 Really reorder the args, as was supposedly done on Feb 14 1995.
22447 (yyparse): Calls changed accordingly.
22448
22449 1996-05-11 Richard Stallman <rms@gnu.org>
22450
22451 * Makefile.in (dist): Don't use $(srcdir).
22452
22453 * bison.simple (__yy_memcpy):
22454 Really reorder the args, as was supposedly done on Feb 14 1995.
22455 (yyparse): Calls changed accordingly.
22456
22457 1996-01-27 Richard Stallman <rms@gnu.org>
22458
22459 * src/output.c (output_rule_data):
22460 Test YYERROR_VERBOSE in the conditional
22461 around the definition of ttyname.
22462
22463 1995-12-29 Richard Stallman <rms@gnu.org>
22464
22465 * src/bison.s1:
22466 Fix line numbers in #line commands.
22467
22468 1995-12-29 Richard Stallman <rms@gnu.org>
22469
22470 * bison.simple:
22471 Fix line numbers in #line commands.
22472
22473 1995-12-27 Richard Stallman <rms@gnu.org>
22474
22475 * src/bison.s1 (YYPARSE_PARAM_DECL):
22476 In C++, make it always null.
22477 (YYPARSE_PARAM_ARG): New macro.
22478 (yyparse): Use YYPARSE_PARAM_ARG.
22479
22480 1995-12-27 Richard Stallman <rms@gnu.org>
22481
22482 * bison.simple (YYPARSE_PARAM_DECL):
22483 In C++, make it always null.
22484 (YYPARSE_PARAM_ARG): New macro.
22485 (yyparse): Use YYPARSE_PARAM_ARG.
22486
22487 1995-11-29 Richard Stallman <rms@gnu.org>
22488
22489 * doc/bison.texinfo:
22490 Describe literal string tokens, %raw, %no_lines, %token_table.
22491
22492 1995-11-29 Daniel Hagerty <hag@gnu.org>
22493
22494 * doc/bison.texinfo: Fixed update date
22495
22496 1995-10-16 Richard Stallman <rms@gnu.org>
22497
22498 * src/version.c: Version 1.25.
22499
22500 1995-10-16 Richard Stallman <rms@gnu.org>
22501
22502 * NEWS: *** empty log message ***
22503
22504 1995-10-16 Richard Stallman <rms@gnu.org>
22505
22506 * doc/bison.1, doc/bison.rnh:
22507 Add new options.
22508
22509 1995-10-15 Richard Stallman <rms@gnu.org>
22510
22511 * src/vmsgetargs.c, src/getargs.c:
22512 Added -n, -k, and -raw switches.
22513 (noparserflag, toknumflag, rawtoknumflag): New variables.
22514
22515 * src/symtab.h (SALIAS):
22516 New #define for adding aliases to %token.
22517 (struct bucket): Added `alias' field.
22518
22519 * src/reduce.c (reduce_grammar):
22520 Revise error message.
22521 (print_notices): Remove final `.' from error message.
22522
22523 * src/reader.c (reader_output_yylsp):
22524 New function.
22525 (readgram): Use `#if 0' around code that accepted %command
22526 inside grammar rules: The documentation doesn't allow it,
22527 and it will fail since the %command processors scan for the next %.
22528 (parse_token_decl): Extended the %token
22529 declaration to allow a multi-character symbol as an alias.
22530 (parse_thong_decl): New function.
22531 (read_declarations): Added %thong declarations.
22532 (read_declarations): Handle NOOP to deal with allowing
22533 % declarations as another means to specify the flags.
22534 (readgram): Allow %prec prior to semantics embedded in a rule.
22535 (skip_to_char, read_declarations, copy_definition)
22536 (parse_token_decl, parse_start_decl, parse_type_decl)
22537 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22538 (get_type_name, copy_guard, copy_action, readgram)
22539 (get_type, packsymbols): Revised most error messages.
22540 Changed `fatal' to `warnxxx' to avoid aborting for error.
22541 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22542 (read_declarations): Improve the error message for
22543 an invalid character. Do not abort.
22544 (read_declarations, copy_guard, copy_action): Use
22545 printable_version to avoid unprintable characters in printed output.
22546 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22547 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22548 Allow the type of a non-terminal can be given
22549 more than once, as long as all specifications give the same type.
22550
22551 * src/output.c:
22552 (output_headers, output_trailers, output, output_gram)
22553 (output_rule_data): Implement noparserflag variable.
22554 Implement toknumflag variable.
22555 (output): Call reader_output_yylsp to output LTYPESTR.
22556
22557 * src/main.c (main):
22558 If reader sees an error, don't process the grammar.
22559 (fatals): Updated to not use VARARGS1.
22560 (printable_version, int_to_string, warn, warni, warns, warnss)
22561 (warnsss): New error reporting functions. Avoid abort for error.
22562
22563 * src/lex.h:
22564 Added THONG and NOOP for alias processing.
22565 Added SETOPT for the new code that allows setting options with %flags.
22566
22567 * src/lex.c:
22568 Include getopt.h. Add some extern decls.
22569 (safegetc): New function to deal with EOF gracefully.
22570 (literalchar); new function to deal with reading \ escapes.
22571 (lex): Use literalchar.
22572 (lex): Implemented "..." tokens.
22573 (literalchar, lex, parse_percent_token): Made tokenbuffer
22574 always contain the token. This includes growing the token
22575 buffer while reading an integer.
22576 (parse_percent_token): Replaced if-else statement with percent_table.
22577 (parse_percent_token): Added % declarations as another
22578 way to specify the flags -n, -l, and -r. Also added hooks for
22579 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
22580 major changes to files.c.
22581 (lex) Retain in the incoming stream a character following
22582 an incorrect '/'.
22583 (skip_white_space, lex): Revised most error messages
22584 and changed fatal to warn to avoid aborting.
22585 (percent_table): Added %thong declarations.
22586
22587 * src/gram.h: Comment changes.
22588
22589 * src/files.c (openfiles, open_extra_files, done):
22590 Add faction flag
22591 and actfile file. Handle noparserflag. Both for -n switch.
22592
22593 * src/conflicts.c (resolve_sr_conflict):
22594 Remove use of alloca.
22595
22596 1995-06-01 Jim Meyering <meyering@gnu.org>
22597
22598 * doc/bison.texinfo: *** empty log message ***
22599
22600 1995-05-06 Richard Stallman <rms@gnu.org>
22601
22602 * src/bison.s1: Comment change.
22603
22604 1995-05-06 Richard Stallman <rms@gnu.org>
22605
22606 * bison.simple: Comment change.
22607
22608 1995-05-03 Richard Stallman <rms@gnu.org>
22609
22610 * src/version.c: Version now 1.24.
22611
22612 * src/bison.s1: Change distribution terms.
22613
22614 * src/version.c: Version now 1.23.
22615
22616 1995-05-03 Richard Stallman <rms@gnu.org>
22617
22618 * doc/bison.texinfo:
22619 Rewrite "Conditions for Using Bison".
22620 Update version to 1.24.
22621
22622 1995-05-03 Richard Stallman <rms@gnu.org>
22623
22624 * bison.simple: Change distribution terms.
22625
22626 1995-02-23 Richard Stallman <rms@gnu.org>
22627
22628 * src/files.c: Test __VMS_POSIX as well as VMS.
22629
22630 1995-02-14 Jim Meyering <meyering@gnu.org>
22631
22632 * src/bison.s1 (__yy_memcpy):
22633 Renamed from __yy_bcopy to avoid
22634 confusion. Reverse FROM and TO arguments to be consistent with
22635 those of memcpy.
22636
22637 1995-02-14 Jim Meyering <meyering@gnu.org>
22638
22639 * bison.simple (__yy_memcpy):
22640 Renamed from __yy_bcopy to avoid
22641 confusion. Reverse FROM and TO arguments to be consistent with
22642 those of memcpy.
22643
22644 1994-11-10 David J. MacKenzie <djm@gnu.org>
22645
22646 * NEWS: reformat
22647
22648 * NEWS: New file.
22649
22650 * Makefile.in (DISTFILES): Include NEWS.
22651
22652 * Makefile.in (DISTFILES):
22653 Include install-sh, not install.sh.
22654
22655 * configure.in: Update to Autoconf v2 macro names.
22656
22657 1994-10-05 David J. MacKenzie <djm@gnu.org>
22658
22659 * Makefile.in: fix typo
22660
22661 * Makefile.in (prefix, exec_prefix):
22662 Let configure set them.
22663
22664 1994-09-28 David J. MacKenzie <djm@gnu.org>
22665
22666 * Makefile.in: Set datadir to $(prefix)/share.
22667
22668 1994-09-15 Richard Stallman <rms@gnu.org>
22669
22670 * src/bison.s1:
22671 Update copyright notice and GPL version.
22672
22673 1994-09-15 Richard Stallman <rms@gnu.org>
22674
22675 * bison.simple:
22676 Update copyright notice and GPL version.
22677
22678 1994-07-12 Richard Stallman <rms@gnu.org>
22679
22680 * src/reduce.c, src/reader.c:
22681 entered into RCS
22682
22683 1994-05-05 David J. MacKenzie <djm@gnu.org>
22684
22685 * Makefile.in: entered into RCS
22686
22687 1994-03-26 Richard Stallman <rms@gnu.org>
22688
22689 * src/bison.s1: entered into RCS
22690
22691 1994-03-26 Richard Stallman <rms@gnu.org>
22692
22693 * bison.simple: entered into RCS
22694
22695 1994-03-25 Richard Stallman <rms@gnu.org>
22696
22697 * src/main.c: entered into RCS
22698
22699 1994-03-24 Richard Stallman <rms@gnu.org>
22700
22701 * src/conflicts.c: entered into RCS
22702
22703 1994-01-02 Richard Stallman <rms@gnu.org>
22704
22705 * Makefile.in: *** empty log message ***
22706
22707 1993-11-21 Richard Stallman <rms@gnu.org>
22708
22709 * src/bison.s1: *** empty log message ***
22710
22711 1993-11-21 Richard Stallman <rms@gnu.org>
22712
22713 * doc/bison.texinfo: entered into RCS
22714
22715 * doc/bison.texinfo: *** empty log message ***
22716
22717 1993-11-21 Richard Stallman <rms@gnu.org>
22718
22719 * bison.simple: *** empty log message ***
22720
22721 1993-10-25 David J. MacKenzie <djm@gnu.org>
22722
22723 * doc/bison.texinfo: *** empty log message ***
22724
22725 1993-10-19 Richard Stallman <rms@gnu.org>
22726
22727 * src/bison.s1: *** empty log message ***
22728
22729 1993-10-19 Richard Stallman <rms@gnu.org>
22730
22731 * bison.simple: *** empty log message ***
22732
22733 1993-10-14 Richard Stallman <rms@gnu.org>
22734
22735 * src/bison.s1: *** empty log message ***
22736
22737 1993-10-14 Richard Stallman <rms@gnu.org>
22738
22739 * bison.simple: *** empty log message ***
22740
22741 1993-09-14 David J. MacKenzie <djm@gnu.org>
22742
22743 * doc/bison.texinfo: *** empty log message ***
22744
22745 1993-09-13 Noah Friedman <friedman@gnu.org>
22746
22747 * Makefile.in: *** empty log message ***
22748
22749 1993-09-10 Richard Stallman <rms@gnu.org>
22750
22751 * src/conflicts.c: *** empty log message ***
22752
22753 * src/system.h: entered into RCS
22754
22755 1993-09-10 Richard Stallman <rms@gnu.org>
22756
22757 * doc/bison.1: entered into RCS
22758
22759 1993-09-06 Noah Friedman <friedman@gnu.org>
22760
22761 * src/version.c: entered into RCS
22762
22763 1993-09-06 Noah Friedman <friedman@gnu.org>
22764
22765 * Makefile.in: *** empty log message ***
22766
22767 1993-07-30 David J. MacKenzie <djm@gnu.org>
22768
22769 * Makefile.in: *** empty log message ***
22770
22771 1993-07-24 Richard Stallman <rms@gnu.org>
22772
22773 * src/bison.s1: *** empty log message ***
22774
22775 1993-07-24 Richard Stallman <rms@gnu.org>
22776
22777 * bison.simple: *** empty log message ***
22778
22779 1993-07-08 David J. MacKenzie <djm@gnu.org>
22780
22781 * Makefile.in: *** empty log message ***
22782
22783 1993-07-04 Richard Stallman <rms@gnu.org>
22784
22785 * src/bison.s1: *** empty log message ***
22786
22787 1993-07-04 Richard Stallman <rms@gnu.org>
22788
22789 * bison.simple: *** empty log message ***
22790
22791 1993-06-26 David J. MacKenzie <djm@gnu.org>
22792
22793 * src/getargs.c: entered into RCS
22794
22795 1993-06-26 David J. MacKenzie <djm@gnu.org>
22796
22797 * doc/bison.texinfo: *** empty log message ***
22798
22799 * doc/bison.1: New file.
22800
22801 1993-06-25 Richard Stallman <rms@gnu.org>
22802
22803 * src/getargs.c: New file.
22804
22805 1993-06-16 Richard Stallman <rms@gnu.org>
22806
22807 * src/bison.s1: *** empty log message ***
22808
22809 1993-06-16 Richard Stallman <rms@gnu.org>
22810
22811 * bison.simple: *** empty log message ***
22812
22813 1993-06-03 Richard Stallman <rms@gnu.org>
22814
22815 * src/bison.s1: New file.
22816
22817 1993-06-03 Richard Stallman <rms@gnu.org>
22818
22819 * doc/bison.texinfo: *** empty log message ***
22820
22821 1993-06-03 Richard Stallman <rms@gnu.org>
22822
22823 * bison.simple: New file.
22824
22825 1993-05-19 Richard Stallman <rms@gnu.org>
22826
22827 * doc/bison.texinfo: New file.
22828
22829 1993-05-07 Noah Friedman <friedman@gnu.org>
22830
22831 * Makefile.in: *** empty log message ***
22832
22833 1993-04-28 Noah Friedman <friedman@gnu.org>
22834
22835 * src/reader.c: *** empty log message ***
22836
22837 1993-04-23 Noah Friedman <friedman@gnu.org>
22838
22839 * src/alloc.h: entered into RCS
22840
22841 1993-04-20 David J. MacKenzie <djm@gnu.org>
22842
22843 * src/version.c: *** empty log message ***
22844
22845 * src/files.c, src/allocate.c:
22846 entered into RCS
22847
22848 * src/reader.c: *** empty log message ***
22849
22850 * src/lex.c: entered into RCS
22851
22852 * src/conflicts.c: New file.
22853
22854 * src/symtab.c: entered into RCS
22855
22856 * src/alloc.h: New file.
22857
22858 * src/LR0.c: entered into RCS
22859
22860 1993-04-18 Noah Friedman <friedman@gnu.org>
22861
22862 * src/reader.c: New file.
22863
22864 * src/version.c: *** empty log message ***
22865
22866 1993-04-18 Noah Friedman <friedman@gnu.org>
22867
22868 * Makefile.in: *** empty log message ***
22869
22870 1993-04-17 Noah Friedman <friedman@gnu.org>
22871
22872 * Makefile.in: *** empty log message ***
22873
22874 1993-04-15 Richard Stallman <rms@gnu.org>
22875
22876 * src/main.c, src/files.c:
22877 New file.
22878
22879 1993-04-15 Noah Friedman <friedman@gnu.org>
22880
22881 * configure.in: entered into RCS
22882
22883 * configure.in: *** empty log message ***
22884
22885 * configure.in: New file.
22886
22887 1993-04-14 Richard Stallman <rms@gnu.org>
22888
22889 * Makefile.in: New file.
22890
22891 1993-04-13 Richard Stallman <rms@gnu.org>
22892
22893 * src/version.c: New file.
22894
22895 1993-03-25 Richard Stallman <rms@gnu.org>
22896
22897 * src/output.c: entered into RCS
22898
22899 1992-09-25 Richard Stallman <rms@gnu.org>
22900
22901 * configure.bat: entered into RCS
22902
22903 1992-06-22 Richard Stallman <rms@gnu.org>
22904
22905 * src/vmsgetargs.c: entered into RCS
22906
22907 1992-06-22 Richard Stallman <rms@gnu.org>
22908
22909 * doc/bison.rnh: entered into RCS
22910
22911 1992-04-20 David J. MacKenzie <djm@gnu.org>
22912
22913 * README: entered into RCS
22914
22915 1992-01-22 Richard Stallman <rms@gnu.org>
22916
22917 * src/machine.h: entered into RCS
22918
22919 1991-12-21 Richard Stallman <rms@gnu.org>
22920
22921 * src/lalr.c, src/closure.c:
22922 entered into RCS
22923
22924 1991-12-20 Richard Stallman <rms@gnu.org>
22925
22926 * src/state.h: entered into RCS
22927
22928 1991-12-18 Richard Stallman <rms@gnu.org>
22929
22930 * src/print.c, src/nullable.c, src/derives.c:
22931 entered into RCS
22932
22933 1991-11-03 David J. MacKenzie <djm@gnu.org>
22934
22935 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
22936 entered into RCS
22937
22938 1988-09-09 Richard Stallman <rms@gnu.org>
22939
22940 * src/bison.hairy: entered into RCS
22941
22942 1987-12-16 Richard Stallman <rms@gnu.org>
22943
22944 * REFERENCES: entered into RCS
22945
22946
22947 -----
22948
22949 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
22950 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
22951 Free Software Foundation, Inc.
22952
22953 Copying and distribution of this file, with or without
22954 modification, are permitted provided the copyright notice and this
22955 notice are preserved.