]> git.saurik.com Git - bison.git/blob - ChangeLog
Upgrade gnulib.
[bison.git] / ChangeLog
1 2009-02-26 Akim Demaille <demaille@gostai.com>
2
3 Upgrade gnulib.
4 * gnulib: Upgrade from master.
5 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
6 Regen.
7
8 2009-02-25 Akim Demaille <demaille@gostai.com>
9
10 Remove useless arguments.
11 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
12 relevant.
13
14 2009-02-25 Akim Demaille <demaille@gostai.com>
15
16 Comment changes.
17 * data/lalr1.cc: here.
18
19 2009-02-25 Akim Demaille <demaille@gostai.com>
20
21 Fix glr.cc's debug level handling.
22 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
23 glr.c which is used.
24 (debug_level, set_debug_level): Adjust.
25
26 2009-02-25 Akim Demaille <demaille@gostai.com>
27
28 Copyright years.
29 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
30
31 2009-02-25 Akim Demaille <demaille@gostai.com>
32
33 Style changes.
34 * etc/bench.pl.in (generate_grammar_list): Consitently use
35 location_type, not yy::location.
36
37 2009-02-25 Akim Demaille <demaille@gostai.com>
38
39 Comment change.
40 * data/lalr1.cc: here.
41
42 2009-02-19 Akim Demaille <demaille@gostai.com>
43
44 Make yyparser::error public.
45 * data/lalr1.cc: here.
46 There is no good reason to keep it private (and it is convenient
47 to use it from the scanner for instance). It is already public in
48 glr.cc.
49
50 2009-02-19 Akim Demaille <demaille@gostai.com>
51
52 Comment changes.
53 * data/glr.cc: here.
54
55 2009-02-19 Akim Demaille <demaille@gostai.com>
56
57 Remove trailing blanks.
58 The epilogue has its own ending \n, no need to add another.
59
60 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
61 epilogue.
62 * data/glr.cc: dnl when extending the epilogue.
63 Remove stray "private:".
64
65 2009-02-19 Akim Demaille <demaille@gostai.com>
66
67 Use b4_c_modern.
68 * data/c.m4 (b4_c_function_decl): Here.
69
70 2009-02-19 Akim Demaille <demaille@gostai.com>
71
72 Comment changes.
73 * data/lalr1.cc: here.
74
75 2009-02-19 Akim Demaille <demaille@gostai.com>
76
77 Extract variant.hh
78 * data/variant.hh: New, extracted from...
79 * data/lalr1.cc: here.
80 Adjust.
81 * data/local.mk: Adjust.
82
83 2009-02-19 Akim Demaille <demaille@gostai.com>
84
85 Extract stack.hh from lalr1.cc.
86 * data/stack.hh: New.
87 * data/lalr1.cc: Extract from here.
88 * data/local.mk: Adjust.
89
90 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
91
92 Add reminder about uploading public key to keys.gnupg.net.
93 * HACKING (Release Procedure): Here.
94
95 2009-01-28 Akim Demaille <demaille@gostai.com>
96
97 * NEWS: Update information about 2.4.1 and 2.4.2.
98
99 2008-11-04 Akim Demaille <demaille@gostai.com>
100
101 Reformat NEWS.
102 * NEWS: Use more outline-mode markup.
103 Suggested by Jim Meyering.
104
105 2009-01-08 Akim Demaille <demaille@gostai.com>
106
107 Fix grep portability issues.
108 Grep on Solaris does not support -q.
109 Reported by Summum Bonum.
110
111 * NEWS: Add a stub for 2.4.2.
112 * THANKS: Add Summum Bonum.
113 * tests/atlocal.in (EGREP): New.
114 (CC, CXX, XSLTPROC): Make it possible to override them via
115 envvars.
116 * tests/java.at: Use $EGREP instead of egrep.
117 Use AT_CHECK's ignore instead of grep's -q.
118
119 2008-12-11 Akim Demaille <demaille@gostai.com>
120
121 Pass the token type to yysyntax_error.
122 * data/yacc.c (yysyntax_error): Take the transated token instead
123 of the raw number.
124 Adjust callers.
125 * TODO: Update.
126
127 2008-12-11 Akim Demaille <demaille@gostai.com>
128
129 Formatting changes.
130 * data/glr.c: Formatting changes.
131
132 2008-12-11 Akim Demaille <demaille@gostai.com>
133
134 Propagate i18n changes into glr.c.
135 * TODO: Update.
136 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
137 building the error message format dynamically.
138 * data/lalr1.java: Formatting changes.
139
140 2008-12-11 Akim Demaille <demaille@gostai.com>
141
142 Use testsuite -C.
143 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
144 Solves problems when top_srcdir is an absolute path.
145 Suggested by Eric Blake.
146 * configure.ac: Require Autoconf 2.62.
147
148 2008-12-11 Akim Demaille <demaille@gostai.com>
149
150 Simplify the i18n of the error messages.
151 * data/lalr1.cc: Comment changes.
152 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
153 lalr1.cc instead of building dynamically the format string.
154
155 2008-12-08 Akim Demaille <demaille@gostai.com>
156
157 Fix portability issue in the test suite.
158 * tests/local.at (AT_MATCHES_CHECK): New.
159 Based on Perl instead of Sed. Sed has too many portability
160 pitfalls, not ever Sed is GNU Sed.
161 * tests/actions.at (Fix user actions without a trailing semicolon):
162 Use it.
163
164 2008-12-08 Akim Demaille <demaille@gostai.com>
165
166 Update data/README.
167 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
168
169 2008-12-08 Akim Demaille <demaille@gostai.com>
170
171 Install autoconf as a submodule to get m4sugar.
172 * .gitmodules: Add submodules/autoconf.
173 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
174 submodules/autoconf.
175
176 2008-12-08 Akim Demaille <demaille@gostai.com>
177
178 Test token.prefix in all the skeletons.
179 * data/java.m4 (b4_token_enum): Use the token.prefix.
180 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
181 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
182 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
183 * tests/java.at: Comment changes.
184 (AT_CHECK_JAVA_MINIMAL): Define the END token.
185 (Java parser class and package names): Add token.prefix check.
186
187 2008-12-08 Akim Demaille <demaille@gostai.com>
188
189 Fix regeneration of atconfig.
190 * tests/local.mk (tests/atconfig): The rule was incorrect, but
191 remove it: now that there is no tests/Makefile.am, the top-level
192 Makefile properly updates atconfig when needed.
193
194 2008-12-07 Di-an Jan <dianj@freeshell.org>
195
196 Implement the FIXME that ends an user action with a semicolon
197 if it seems necessary.
198 * src/scan-code.l (flex rules section): Flag cpp directive from
199 any `#' to the first unescaped end-of-line. Semicolon is not
200 needed after `;', `{', '}', or cpp directives and is needed after
201 any other token (whitespaces and comments have no effect).
202 * tests/actions.at (Fix user actions without a trailing semicolon):
203 New test.
204 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
205 to make user actions complete statements.
206 Adjust column numbers in error messages.
207 * tests/regression.at (Fix user actions without a trailing semicolon):
208 Remove. Covered by new test.
209
210 2008-12-07 Akim Demaille <demaille@gostai.com>
211
212 Update gnulib.
213 * gnulib: Update from master.
214
215 2008-12-05 Eric Blake <ebb9@byu.net>
216
217 Avoid compiler warning.
218 * src/output.c (muscle_insert_item_number_table): Delete unused
219 function.
220
221 2008-12-02 Eric Blake <ebb9@byu.net>
222
223 Build testsuite with newer autoconf.
224 * tests/output.at (m4_expand): Don't override in newer autoconf,
225 where the underlying implementation changed.
226 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
227 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
228 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
229 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
230 since some of them contain unbalanced ')'.
231
232 2008-12-01 Akim Demaille <demaille@gostai.com>
233
234 Use b4_symbol for printers and destructors everywhere.
235 * data/bison.m4 (b4_symbol_action_location): New.
236 * data/c.m4 (b4_symbol_actions): Remove.
237 Adjust all callers to use by b4_symbol_foreach and the corresponding
238 b4_symbol_printer/destructor macro.
239 * data/glr.cc: Adjust.
240 * data/lalr1.java: Adjust the %destructor sanity check.
241 * src/output.c (symbol_code_props_output): Remove, we no longer
242 need the b4_symbol_printers/destructors tables.
243
244 2008-12-01 Akim Demaille <demaille@gostai.com>
245
246 Use b4_symbol_case_.
247 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
248 b4_symbol_case_.
249
250 2008-12-01 Akim Demaille <demaille@gostai.com>
251
252 Move b4_symbol based macro to bison.m4.
253 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
254 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
255 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
256 (b4_type_foreach): Move to...
257 * data/bison.m4: Here.
258 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
259 b4_symbol_value_template instead of b4_symbol_value.
260
261 2008-12-01 Akim Demaille <demaille@gostai.com>
262
263 b4_symbol/type_foreach.
264 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
265 Use them.
266
267 2008-12-01 Akim Demaille <demaille@gostai.com>
268
269 Use the symbol properties to output the printer/destructor for lalr1.cc.
270 Instead of defining complex list of tuples to define various
271 properties of the symbols, we now prefer to define symbols as
272 "structs" in m4: using the symbol key (its number), and the
273 property name, b4_symbol gives it value. Use this to handle
274 destructors and printers.
275
276 * src/output.c (CODE_PROP): New.
277 (prepare_symbol_definitions): Use it to define the printer and
278 destructor related attributes of the symbols.
279 * data/lalr1.cc (b4_symbol_actions): Rename as...
280 (b4_symbol_action): this.
281 Use b4_symbol instead of 6 arguments.
282 (b4_symbol_printer, b4_symbol_destructor): New.
283 Use them instead of b4_symbol_actions.
284
285 2008-12-01 Akim Demaille <demaille@gostai.com>
286
287 Avoid capturing variables too easily.
288 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
289 v__ and p__ instead of v and p.
290
291 2008-12-01 Akim Demaille <demaille@gostai.com>
292
293 Remove spurious empty line before syncline.
294 * data/bison.m4 (b4_syncline): Don't output an empty line before
295 the output.
296
297 2008-11-26 Akim Demaille <demaille@gostai.com>
298
299 Convert lib/Makefile.am into lib/local.mk.
300 The real problem is rather gnulib.mk, which itself is extracted
301 from a Makefile.am that gnulib expects to the "recursive". The
302 tool prefix-gnulib-mk converts such a gnulib.mk to be
303 non-recursive. Also, some AC_SUBST variables need to be adjusted.
304
305 * etc/prefix-gnulib-mk: New.
306 * bootstrap (slurp): Use it to convert further gnulib.mk.
307 No longer try to avoid re-creation of lib/gnulib.mk as the changes
308 are deeper.
309 * lib/Makefile.am: Rename as...
310 * lib/local.mk: this.
311 Adjust to be prefixed.
312 * Makefile.am, configure.ac: Adjust.
313 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
314
315 2008-11-26 Akim Demaille <demaille@gostai.com>
316
317 s/_FLAGS/FLAGS/.
318 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
319 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
320 Reported by Eric Blake.
321
322 2008-11-26 Akim Demaille <demaille@gostai.com>
323
324 Use b4_parser_tables_define in glr.cc.
325 * data/glr.c: Use b4_parser_tables_define instead of defining the
326 (deterministic integral) tables by hand.
327
328 2008-11-26 Akim Demaille <demaille@gostai.com>
329
330 Use b4_parser_tables_define in Java.
331 * data/java.m4 (b4_typed_parser_table): Rename as...
332 (b4_typed_parser_table_define): this, for consistency.
333 Accept a comment as $4.
334 Move $2 into yy*_.
335 (b4_integral_parser_table): Rename as...
336 (b4_integral_parser_table_define): this.
337 * data/lalr1.java: Adjust all uses.
338 Use b4_parser_tables_define instead of generation by hand.
339
340 2008-11-26 Akim Demaille <demaille@gostai.com>
341
342 Prepare the convergence bw C style and Java table generation.
343 * data/bison.m4 (b4_tables_map, b4_tables_declare)
344 (b4_tables_define): Rename as...
345 (b4_integral_parser_tables_map, b4_parser_tables_declare)
346 (b4_parser_tables_define): these.
347 * data/c.m4 (b4_table_define): Rename as...
348 (b4_integral_parser_table_define): this.
349 * data/lalr1.cc: Adjust.
350 (b4_table_define, b4_table_declare): Rename as...
351 (b4_integral_parser_table_define)
352 (b4_integral_parser_table_declare): these.
353 (yyrline_): Move the comment where it is actually used.
354 * data/yacc.c: Adjust.
355 (yyrline): Use b4_integral_parser_table_define.
356
357 2008-11-26 Akim Demaille <demaille@gostai.com>
358
359 Regen.
360 * src/parse-gram.h, src/parse-gram.c: Regen.
361
362 2008-11-26 Akim Demaille <demaille@gostai.com>
363
364 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
365 * data/lalr1.cc (b4_tables_map): Move to...
366 * data/bison.m4: here.
367 Update the comment for yytable during the flight.
368 (b4_tables_declare, b4_tables_define): New.
369 * data/lalr1.cc: Use them.
370 * data/c.m4 (b4_table_define): New.
371 * data/yacc.c: Use b4_tables_define instead of output the tables
372 by hand.
373 * tests/regression.at (Web2c Actions): Adjust the expected output,
374 the order of the tables changed.
375
376 2008-11-26 Akim Demaille <demaille@gostai.com>
377
378 Get rid of (yy)rhs and (yy)prhs.
379 These tables are no longer needed in the parsers, and they don't seem to
380 be useful. They are not documented either.
381
382 * src/output.c (prepare_rules): Get rid of rhs and prhs.
383 Adjust the computation of (yy)r2.
384
385 2008-11-26 Akim Demaille <demaille@gostai.com>
386
387 Rule length is unsigned.
388 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
389
390 2008-11-26 Akim Demaille <demaille@gostai.com>
391
392 Get rid of lalr1-split.cc.
393 It was no longer maintainer.
394
395 * data/lalr1-split.cc: Remove.
396 * etc/bench.pl.in (bench_fusion_parser): Remove.
397 Adjust.
398
399 2008-11-26 Akim Demaille <demaille@gostai.com>
400
401 Use yy* consistently.
402 * data/glr.c: Now that yyrhs no longer exists as a global
403 variable, rename local "rhs" variables into "yyrhs" for
404 consistency.
405
406 2008-11-25 Akim Demaille <demaille@gostai.com>
407
408 Get rid of yyrhs and yyprhs in glr.c.
409 * data/glr.c (yyrhs, yyprhs): Remove.
410 Instead, use the state stack and yystos.
411
412 2008-11-25 Akim Demaille <demaille@gostai.com>
413
414 Flag glr tests.
415 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
416 as an Autotest keyword.
417
418 2008-11-25 Akim Demaille <demaille@gostai.com>
419
420 Prefer TESTSUITE_FLAGS.
421 TESTSUITEFLAGS is barely readable.
422
423 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
424 for backward compatibility.
425 Use the former instead of the latter.
426
427 2008-11-25 Akim Demaille <demaille@gostai.com>
428
429 Get rid of yyrhs and yyprhs in larl1.java.
430 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
431 (yy_reduce_print): Rather, use yystos_ and the state stack.
432
433 2008-11-25 Akim Demaille <demaille@gostai.com>
434
435 Formatting changes.
436
437 2008-11-25 Akim Demaille <demaille@gostai.com>
438
439 Get rid of yyrhs and yyprhs in yacc.c.
440 They were used to get the symbol types, given a rule number, when
441 displaying the top of the stack before a reduction. But the
442 symbol type is available from the state stack. This has two be
443 benefits: two tables less in the parser (making it smaller), and a
444 more consistent use of the three stacks which will help to fuse
445 them.
446
447 * data/yacc.c (yyprhs, yyrhs): Remove.
448 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
449 (yy_reduce_print): Take yyssp as argument.
450 Use it, together with yystos, to get the symbol type.
451 * tests/regression.at (Web2c Report): Remove these tables from the
452 expected output.
453
454 2008-11-25 Akim Demaille <demaille@gostai.com>
455
456 b4_tables_map.
457 The point is to factor the generation of the tables across skeletons.
458 This is language dependant.
459
460 * data/c.m4 (b4_comment_): New.
461 Should be usable to define how to generate tables independently of
462 the language.
463 (b4_c_comment): New.
464 (b4_comment): Bounce to b4_c_comment.
465 Now support $2 = [PREFIX] for indentation.
466 * data/lalr1.cc (b4_table_declare): Don't output a comment if
467 there is no comment.
468 Indent it properly when there is one.
469 Output the ending semicolon.
470 (b4_table_define): Space changes.
471 Output the ending semicolon.
472 (b4_tables_map): New.
473 Use it twice instead of declaring and defining the (integral)
474 tables by hand.
475
476 2008-11-25 Akim Demaille <demaille@gostai.com>
477
478 b4_table_declare.
479 * data/lalr1.cc (b4_table_declare): New.
480 Use it to declare the tables defined with b4_table_define.
481 (b4_table_define): Declare a third arg to match b4_table_declare
482 signature.
483 Move all the comments around invocations of b4_table_define into
484 the invocations itselves.
485 Move things around to have the order for declarations and
486 definitions.
487
488 2008-11-25 Akim Demaille <demaille@gostai.com>
489
490 Formatting changes.
491 * data/lalr1.java: here.
492
493 2008-11-25 Akim Demaille <demaille@gostai.com>
494
495 b4_args is more general than only C++.
496 * data/lalr1.cc (b4_args, _b4_args): Move to...
497 * data/bison.m4: here.
498
499 2008-11-21 Di-an Jan <dianj@freeshell.org>
500
501 Implement no-XXX arguments for --warnings, --report, --trace.
502 * src/getargs.c (flags_argmatch): Handles no-XXX.
503 Fix typo in doxygen comment.
504
505 2008-11-21 Akim Demaille <demaille@gostai.com>
506
507 Display the changes in cross-options.texi.
508 * build-aux/cross-options.pl ($sep): New, to separate items.
509 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
510 changes.
511
512 2008-11-20 Di-an Jan <dianj@freeshell.org>
513
514 Improves options in the manual.
515 * doc/bison.texinfo (-g, -x): Add space before argument.
516 (Option Cross Key): Implement FIXME: listing directives also.
517 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
518 (Short Option): Special case -d. Put arguments inside @option.
519 (Bison Directive): Add column, automatically extracted from
520 src/scan-gram.l (actual name passed as the first argument)
521 with special case for %define.
522 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
523 to build-aux/cross-options.pl.
524 * src/getargs.c (usage): Document limitations of cross-options.pl.
525 * src/scan-gram.l: Likewise.
526
527 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
528
529 Fix unexpanded macros in GLR defines file.
530 Reported by Csaba Raduly at
531 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
532 * THANKS (Csaba Raduly): Add.
533 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
534 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
535 lexer in a separate module that includes the defines file.
536 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
537 source.
538 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
539 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
540 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
541 (AT_DATA_SOURCE_PROLOGUE): New.
542 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
543 (AT_DATA_SOURCE): New.
544 (AT_FULL_COMPILE): Extend to support an additional source file.
545
546 2008-11-18 Akim Demaille <demaille@gostai.com>
547
548 More TODO.
549 * TODO: More short term issues.
550
551 2008-11-18 Akim Demaille <demaille@gostai.com>
552
553 Regen.
554 * src/parse-gram.h, src/parse-gram.c: Regen.
555
556 2008-11-18 Akim Demaille <demaille@gostai.com>
557
558 Use b4_subtract where possible.
559 * data/lalr1.cc (b4_subtract): Move to...
560 * data/bison.m4: here.
561 * data/glr.c (b4_rhs_data): Use it.
562 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
563
564 2008-11-18 Akim Demaille <demaille@gostai.com>
565
566 Remove incorrect mode specification.
567 * data/glr.cc: Don't pretend it's C code.
568
569 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
570
571 Simplify last patch slightly.
572 * src/getargs.c (getargs): Here.
573
574 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
575
576 Fix last warning from --enable-gcc-warnings.
577 * src/getargs.c (getargs): Don't assign const address to non-const
578 pointer.
579
580 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
581
582 Don't let maintainer-*-check targets force a version update.
583 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
584 handled.
585
586 2008-11-17 Di-an Jan <dianj@freeshell.org>
587
588 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
589 Align menus. Adjust word wrapping. Use node names for menu names.
590 (Examples): Don't abbreviate node names.
591 (LocalWords): Remove abbreviations.
592 (Copying): Make description a sentence.
593 (Java Action Features): Remove period to match the rest of menu.
594
595 2008-11-17 Di-an Jan <dianj@freeshell.org>
596
597 Handles several --enable-gcc-warnings.
598 * src/getargs.c (command_line_location): Set parameters to void.
599 * src/output.c (symbol_type_name_cmp): Make static.
600 (symbols_by_type_name): Set parameters to void.
601 (symbol_definitions_output): Remove unused parameter. Rename as...
602 (prepare_symbol_definitions): this.
603 (muscles_output): Move symbol_definitions_output to...
604 (output): here as prepare_symbol_definitions.
605 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
606 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
607
608 2008-11-17 Di-an Jan <dianj@freeshell.org>
609
610 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
611 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
612
613 2008-11-16 Akim Demaille <demaille@gostai.com>
614
615 Add missing $(EXEEXT).
616 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
617 "src/bison$(EXEEXT)".
618 Reported by Di-an Jan.
619
620 2008-11-15 Akim Demaille <demaille@gostai.com>
621
622 * TODO: Update.
623
624 2008-11-15 Akim Demaille <demaille@gostai.com>
625
626 Formatting changes.
627 * tests/input.at: here.
628
629 2008-11-15 Akim Demaille <demaille@gostai.com>
630
631 Remove duplicate header inclusion.
632 * src/LR0.c: here.
633
634 2008-11-15 Akim Demaille <demaille@gostai.com>
635
636 * src/parse-gram.h, src/parse-gram.c: Regen.
637
638 2008-11-15 Akim Demaille <demaille@gostai.com>
639
640 Support parametric types.
641
642 There are two issues to handle: first scanning nested angle
643 bracket pairs to support types such as std::pair< std::string,
644 std::list<std::string> > >.
645
646 Another issue is to address idiosyncracies of C++: do not glue two
647 closing angle brackets together (otherwise it's operator>>), and
648 avoid sticking blindly a TYPE to the opening <, as it can result
649 in '<:' which is a digraph for '['.
650
651 * src/scan-gram.l (brace_level): Rename as...
652 (nesting): this.
653 (SC_TAG): New.
654 Implement support for complex tags.
655 (tag): Accept
656 , but not <.
657 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
658 (b4_symbol_variant): Leave space around types as parameters.
659 * examples/variant.yy: Use nested template types and leading ::.
660 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
661 Rename as...
662 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
663 * tests/c++.at: Test parametric types.
664
665 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
666
667 Test token.prefix.
668 This is not sufficient, but we test at least that the make_SYMBOL
669 interface is not affected by token.prefix. A more general test
670 will be implemented when the support of token.prefix is generalized
671 to more skeletons.
672
673 * tests/c++.at: One more variant test, using token.prefix.
674
675 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
676
677 Test the make_TOKEN interface.
678 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
679 Factor the common code in yylex.
680 Use it to test "%define lex_symbol".
681
682 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
683
684 Formatting change.
685
686 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
687
688 Simplify code for variants bench marks.
689 * etc/bench.pl.in (&generate_grammar_list): Define and use
690 location_type.
691 Factor the common code in yylex.
692
693 2008-11-15 Akim Demaille <demaille@gostai.com>
694
695 Better error message.
696 * bootstrap (find_tool): Fix the error message.
697
698 2008-11-15 Akim Demaille <demaille@gostai.com>
699
700 Update variant.yy to newest interface.
701 * examples/variant.yy: Define lex_symbol.
702 Adjust.
703
704 2008-11-15 Akim Demaille <demaille@gostai.com>
705
706 Don't use locations in variant.yy.
707 * examples/variant.yy: Adjust to not using locations.
708
709 2008-11-15 Akim Demaille <demaille@gostai.com>
710
711 Comment changes.
712 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
713 comments for the license.
714
715 2008-11-15 Akim Demaille <demaille@gostai.com>
716
717 Remove tests/Makefile.am.
718 * tests/Makefile.am: Rename as...
719 * tests/local.mk: this.
720 * Makefile.am, configure.ac: Adjust.
721 * Makefile.am (DISTCLEANFILES): Define.
722 (maintainer-check, maintainer-xml-check, maintainer-push-check):
723 Remove, we no longer need to bounce to the real targets.
724
725 2008-11-15 Akim Demaille <demaille@gostai.com>
726
727 Comment changes.
728
729 2008-11-15 Akim Demaille <demaille@gostai.com>
730
731 djgpp/local.mk.
732 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
733 * djgpp/local.mk: this new file.
734
735 2008-11-15 Akim Demaille <demaille@gostai.com>
736
737 Remove doc/Makefile.am.
738 * doc/Makefile.am: Rename as...
739 * doc/local.mk: this.
740 Adjust paths
741 * Makefile.am, configure.ac: Adjust.
742 * Makefile.am (MOSTLYCLEANFILES): New.
743 * src/local.mk: Adjust.
744
745 2008-11-15 Akim Demaille <demaille@gostai.com>
746
747 Move sc_tight_scope into maint.mk.
748 It does not work, and I don't know how it was supposed to work: it
749 seems to be looking for sources in the build tree. I just moved
750 it at a better place, fixing it is still required.
751
752 * src/local.mk (echo): Remove.
753 (sc_tight_scope): Move to...
754 * maint.mk: here.
755
756 2008-11-15 Akim Demaille <demaille@gostai.com>
757
758 Regen.
759 * src/parse-gram.h, src/parse-gram.h: Regen.
760
761 2008-11-15 Akim Demaille <demaille@gostai.com>
762
763 Remove src/Makefile.am.
764 * src/Makefile.am: Rename as...
765 * src/local.mk: this.
766 Prefix all the paths with src/.
767 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
768 (AM_CPPFLAGS): Find find in builddir/src.
769 (YACC): Move the flags into...
770 (AM_YFLAGS): here.
771 * maint.mk (sc_tight_scope): Disable.
772 It used to bounce to the version in src/Makefile.am which is now
773 part of this very Makefile.
774 * Makefile.am, configure.ac: Adjust.
775 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
776 include "..." to find files "here": we are no longer in src/, so
777 qualify the includes with src/.
778 * doc/Makefile.am (PREPATH): No longer include the top_builddir
779 prefix.
780 (.x.1): Adjust to be able to create src/foo from the top level
781 Makefile, instead of going bounce to src/Makefile the creation of
782 foo.
783
784 2008-11-15 Akim Demaille <demaille@gostai.com>
785
786 Remove useless variable.
787 * doc/Makefile.am (srcsrcdir): Remove.
788
789 2008-11-15 Akim Demaille <demaille@gostai.com>
790
791 Remove data/Makefile.am.
792 * data/Makefile.am: Rename as...
793 * data/local.mk: this.
794 Adjust paths.
795 * Makefile.am, configure.ac: Adjust.
796
797 2008-11-15 Akim Demaille <demaille@gostai.com>
798
799 Remove etc/Makefile.am.
800 * etc/Makefile.am: Rename as...
801 * etc/local.mk: this.
802 Adjust.
803 * Makefile.am, configure.ac: Adjust.
804
805 2008-11-15 Akim Demaille <demaille@gostai.com>
806
807 Remove examples/local.mk.
808 examples/calc++/Makefile.am might be interesting to keep as is, since
809 it is an example in itself.
810
811 * examples/Makefile.am: Rename as...
812 * examples/local.mk: this.
813 Adjust.
814 * Makefile.am, configure.ac: Adjust.
815
816 2008-11-15 Akim Demaille <demaille@gostai.com>
817
818 Remove build-aux/Makefile.am.
819 Recursive Makefiles are really way too slow, let's get rid of some of
820 them.
821
822 * build-aux/Makefile.am: Rename as...
823 * build-aux/local.mk: this.
824 Adjust paths.
825 * Makefile.am, configure.ac: Adjust.
826
827 2008-11-15 Akim Demaille <demaille@gostai.com>
828
829 Provide convenience constructors for locations and positions.
830 * data/location.cc (position::position): Accept file, line and
831 column as arguments with default values.
832 Always qualify initial line and column literals as unsigned.
833 (location::location): Provide convenience constructors.
834
835 2008-11-15 Akim Demaille <demaille@gostai.com>
836
837 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
838 token type.
839 Using template buys us nothing, and makes it uselessly complex to
840 construct a symbol. Besides, it could not be generalized to other
841 languages, while make_FOO would work in C/Java etc.
842
843 * data/lalr1.cc (b4_symbol_): New.
844 (b4_symbol): Use it.
845 (b4_symbol_constructor_declaration_)
846 (b4_symbol_constructor_definition_): Instead of generating
847 specializations of an overloaded template function, just generate
848 several functions whose names are forged from the token names
849 without the token.prefix.
850 (b4_symbol_constructor_declarations): Generate them for all the
851 symbols, not just by class of symbol type, now that instead of
852 specializing a function template by the token, we generate a
853 function named after the token.
854 (b4_symbol_constructor_specialization_)
855 (b4_symbol_constructor_specializations): Remove.
856 * etc/bench.pl.in: Adjust to this new API.
857
858 2008-11-13 Akim Demaille <demaille@gostai.com>
859
860 %define token.prefix.
861 Provide a means to add a prefix to the name of the tokens as
862 output in the generated files. Because of name clashes, it is
863 good to have such a prefix such as TOK_ that protects from names
864 such as EOF, FILE etc. But it clutters the grammar itself.
865
866 * data/bison.m4 (token.prefix): Empty by default.
867 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
868 * data/lalr1.cc (b4_symbol): Ditto.
869
870 2008-11-13 Akim Demaille <demaille@gostai.com>
871
872 Compute at M4 time some of the subtractions.
873 * data/lalr1.cc (b4_subtract): New.
874 (b4_rhs_data): Use it.
875
876 2008-11-13 Akim Demaille <demaille@gostai.com>
877
878 symbol::token.
879 This allows the user to get the type of a token returned by yylex.
880
881 * data/lalr1.cc (symbol::token): New.
882 (yytoknum_): Define when %define lex_symbol, independently of
883 %debug.
884 (yytoken_number_): Move into...
885 (symbol::token): here, since that's the only use.
886 The other one is YYPRINT which was not officially supported
887 by lalr1.cc, and anyway it did not work since YYPRINT uses this
888 array under a different name (yytoknum).
889
890 2008-11-13 Akim Demaille <demaille@gostai.com>
891
892 YYERRCODE.
893 * TODO (YYERRCODE): Mention the case of $undef.
894
895 2008-11-13 Akim Demaille <demaille@gostai.com>
896
897 TODO: YYPRINT.
898 * TODO (YYPRINT): New.
899
900 2008-11-13 Akim Demaille <demaille@gostai.com>
901
902 Comment changes.
903 * data/lalr1.cc, data/yacc.c: Fix the description of the
904 yytranslate and yytoknum tables.
905
906 2008-11-13 Akim Demaille <demaille@gostai.com>
907
908 Define make_symbol in the header.
909 To reach good performances these functions should be inlined (yet
910 this is to measure precisely). To this end they must be available
911 to the caller.
912
913 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
914 location_type with the class name.
915 Since will now be output in the header, declare "inline".
916 No longer use b4_symbol_constructor_specializations, but
917 b4_symbol_constructor_definitions in the header.
918 Don't call it in the *.cc file.
919
920 2008-11-13 Akim Demaille <demaille@gostai.com>
921
922 Define yytranslate in the header for lex_symbol.
923 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
924 into the header file when using %define lex_symbol.
925 (yytranslate_): Declare inline.
926
927 2008-11-13 Akim Demaille <demaille@gostai.com>
928
929 Define the constructors of symbol_type in
930 b4_symbol_constructor_definitions.
931 The constructors are called by the make_symbol functions, which a
932 forthcoming patch will move elsewhere. Hence the interest of
933 putting them together.
934
935 The stack_symbol_type does not need to be moved, it is used only
936 by the parser.
937
938 * data/lalr1.cc: Move symbol_type and symbol_base_type
939 constructors into...
940 (b4_symbol_constructor_definitions): here.
941 Adjust.
942
943 2008-11-13 Akim Demaille <demaille@gostai.com>
944
945 Make it easier to move the definition of yytranslate_.
946 Forthcoming changes will make it possible to use yytranslate_
947 from outside the parser implementation file.
948
949 * data/lalr1.cc (b4_yytranslate_definition): New.
950 Use it.
951
952 2008-11-13 Akim Demaille <demaille@gostai.com>
953
954 Remove useless class specification.
955 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
956 to refer to the class name to use a type defined by the class for
957 arguments of member functions.
958
959 2008-11-13 Akim Demaille <demaille@gostai.com>
960
961 Finer input type for yytranslate.
962 This patch is debatable: the tradition expects yylex to return an int
963 which happens to correspond to token_number (which is an enum). This
964 allows for instance to return characters (such as '*' etc.). But this
965 goes against the stronger typing I am trying to have with the new
966 lex interface which return a symbol_type. So in this case, feed
967 yytranslate_ with a token_type.
968
969 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
970 expect a token_type.
971
972 2008-11-13 Akim Demaille <demaille@gostai.com>
973
974 Honor lex-params in %define lex_symbol mode.
975 * data/lalr1.cc: Use b4_lex_param.
976
977 2008-11-13 Akim Demaille <demaille@gostai.com>
978
979 Simplify names.
980 * src/output.c (symbol_definitions_output): Rename symbol
981 attributes type_name and has_type_name as type and has_type.
982 * data/lalr1.cc: Adjust uses.
983
984 2008-11-13 Akim Demaille <demaille@gostai.com>
985
986 Use b4_type_names for the union type.
987 The union used to compute the size of the variant used to iterate
988 over the type of all the symbols, with a lot of redundancy. Now
989 iterate over the lists of symbols having the same type-name.
990
991 * data/lalr1.cc (b4_char_sizeof_): New.
992 (b4_char_sizeof): Use it.
993 Adjust to be called with a list of numbers instead of a single
994 number.
995 Adjust its caller for new-line issues.
996
997 2008-11-13 Akim Demaille <demaille@gostai.com>
998
999 Define the "identifier" of a symbol.
1000 Symbols may have several string representations, for instance if
1001 they have an alias. What I call its "id" is a string that can be
1002 used as an identifier. May not exist.
1003
1004 Currently the symbols which have the "tag_is_id" flag set are
1005 those that don't have an alias. Look harder for the id.
1006
1007 * src/output.c (is_identifier): Move to...
1008 * src/symtab.c (is_identifier): here.
1009 * src/symtab.h, src/symtab.c (symbol_id_get): New.
1010 * src/output.c (symbol_definitions_output): Use it to define "id"
1011 and "has_id".
1012 Remove the definition of "tag_is_id".
1013 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
1014 "tag_is_id" were used to produce code.
1015 We still use "tag" for documentation.
1016
1017 2008-11-11 Akim Demaille <demaille@gostai.com>
1018
1019 Locations are no longer required by lalr1.cc.
1020 * data/lalr1.cc (_b4_args, b4_args): New.
1021 Adjust all uses of locations to make them optional.
1022 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
1023 (AT_CHECK_NAMESPACE): Check the use of locations.
1024 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
1025 without locations with lalr1.cc.
1026 Test these cases.
1027 * tests/output.at: Check lalr1.cc with and without location
1028 support.
1029 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
1030 Don't use locations.
1031
1032 2008-11-11 Akim Demaille <demaille@gostai.com>
1033
1034 AT_FULL_COMPILE.
1035 * tests/local.at (AT_FULL_COMPILE): New.
1036 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
1037
1038 2008-11-11 Akim Demaille <demaille@gostai.com>
1039
1040 Support parens in calc++.
1041 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
1042 * examples/calc++/test (run): Check the expected output.
1043 Adjust callers.
1044 Check parens too.
1045
1046 2008-11-11 Akim Demaille <demaille@gostai.com>
1047
1048 Simplify lalr1.cc since %defines is mandatory.
1049 * data/lalr1.cc: Remove useless calls to b4_defines_if.
1050
1051 2008-11-11 Akim Demaille <demaille@gostai.com>
1052
1053 TODO: yyfmt.
1054 * TODO (yysyntax_error): New item.
1055
1056 2008-11-11 Akim Demaille <demaille@gostai.com>
1057
1058 Prefer M4 to CPP.
1059 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1060 YYERROR_VERBOSE.
1061
1062 2008-11-11 Akim Demaille <demaille@gostai.com>
1063
1064 Support i18n of the parse error messages.
1065 * TODO (lalr1.cc/I18n): Remove.
1066 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1067 error messages, as done in yacc.c.
1068 Stay within the yy* pseudo namespace.
1069
1070 2008-11-11 Akim Demaille <demaille@gostai.com>
1071
1072 More TODO.
1073 * TODO (single stack, yysyntax_error): New.
1074
1075 2008-11-11 Akim Demaille <demaille@gostai.com>
1076
1077 Make it possible to return a symbol_type from yylex.
1078 * data/lalr1.cc (b4_lex_symbol_if): New.
1079 (parse): When lex_symbol is defined, expected yylex to return the
1080 complete lookahead.
1081 * etc/bench.pl.in (generate_grammar_list): Extend to support this
1082 yylex interface.
1083 (bench_variant_parser): Exercise it.
1084
1085 2008-11-11 Akim Demaille <demaille@gostai.com>
1086
1087 Remove useless bench case.
1088 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
1089 no longer used.
1090
1091 2008-11-11 Akim Demaille <demaille@gostai.com>
1092
1093 Improve display of directives.
1094 * etc/bench.pl.in (parse_term): Don't add useless eol.
1095
1096 2008-11-11 Akim Demaille <demaille@gostai.com>
1097
1098 Use string_cast in the bench.
1099 * etc/bench.pl.in (generate_grammar_list): Define and use
1100 string_cast.
1101
1102 2008-11-11 Akim Demaille <demaille@gostai.com>
1103
1104 Replace yychar with a Boolean.
1105 * data/lalr1.cc (parse::yychar): Replace by...
1106 (parse::yyempty): this.
1107
1108 2008-11-11 Akim Demaille <demaille@gostai.com>
1109
1110 Factor the tables.
1111 * TODO: New item.
1112
1113 2008-11-11 Akim Demaille <demaille@gostai.com>
1114
1115 Let yytranslate handle the eof case.
1116 * data/lalr1.cc (yytranslate_): Handle the EOF case.
1117 Adjust callers.
1118 No longer expect yychar to be equal to yyeof_, rather, test the
1119 lookahead's (translated) kind.
1120
1121 2008-11-11 Akim Demaille <demaille@gostai.com>
1122
1123 yychar cannot be empty in yyerrlab.
1124 * TODO (yychar == yyempty_): New.
1125 * data/lalr1.cc: Remove the handling of this case.
1126 This eases forthcoming changes related to yychar and yytranslate.
1127
1128 2008-11-11 Akim Demaille <demaille@gostai.com>
1129
1130 Bench: syntactic sugar for %define/#define.
1131 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
1132 (&bench_push_parser, bench_variant_parser): Use this feature.
1133 (&eat): New.
1134 Use it.
1135
1136 2008-11-11 Akim Demaille <demaille@gostai.com>
1137
1138 Less memory pressure on the "list" bench.
1139 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
1140 the values, to limit memory pressure.
1141
1142 2008-11-11 Akim Demaille <demaille@gostai.com>
1143
1144 Introduce make_symbol.
1145 make_symbol provides a means to construct a full symbol (kind,
1146 value, location) in a single shot. It is meant to be a Symbol
1147 constructor, parameterized by the symbol kind so that overloading
1148 would prevent incorrect kind/value pairs. Unfortunately
1149 parameterized constructors do not work well in C++ (unless the
1150 parameter also appears as an argument, which is not acceptable),
1151 hence the use of a function instead of a constructor.
1152
1153 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1154 (b4_symbol_constructor_declarations)
1155 (b4_symbol_constructor_specialization_)
1156 (b4_symbol_constructor_specializations)
1157 (b4_symbol_constructor_definition_)
1158 (b4_symbol_constructor_definitions): New.
1159 Use them where appropriate to generate declaration, declaration of
1160 the specializations, and implementations of the templated
1161 overloaded function "make_symbol".
1162 (variant::variant): Always define a default ctor.
1163 Also provide a copy ctor.
1164 (symbol_base_type, symbol_type): New ctor overloads for value-less
1165 symbols.
1166 (symbol_type): Now public, so that functions such as yylex can use
1167 it.
1168
1169 2008-11-11 Akim Demaille <demaille@gostai.com>
1170
1171 Inform m4 whether a tag is a valid id.
1172 * src/output.c (is_identifier): New.
1173 (symbol_definitions_output): Use it to define tag_is_id.
1174 But maybe this should be done at m4 level?
1175
1176 2008-11-11 Akim Demaille <demaille@gostai.com>
1177
1178 Test 214 was failing: it greps with a pattern containing [ ]*
1179 which obviously meant to catch spaces and tabs, but contained only
1180 spaces. Tabulations in sources are a nuisance, so to simplify the
1181 matter, get rid of all the tabulations in the Java sources. The
1182 other skeletons will be treated equally later.
1183
1184 * data/java.m4, data/lalr1.java: Untabify.
1185 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
1186 tabulations are no longer generated.
1187
1188 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
1189
1190 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1191 * configure.ac: Adjust usage.
1192 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1193 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1194 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1195
1196 2008-11-10 Di-an Jan <dianj@freeshell.org>
1197
1198 Workaround Java's ``code too large'' problem for parser tables
1199 in most cases, by using one function per initialization.
1200 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
1201 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
1202 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
1203 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
1204 (yytname_): Use b4_typed_parser_table.
1205 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
1206 ``code too large'' error.
1207
1208 2008-11-10 Di-an Jan <dianj@freeshell.org>
1209
1210 * NEWS: Document them.
1211
1212 General Java skeleton improvements.
1213 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
1214 using gcj < 4.3 in the testsuite, according to comments in
1215 gnulib/m4/javacomp.m4.
1216 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
1217 location_type, position_type): Remove extraneous brackets from
1218 b4_percent_define_default.
1219 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
1220 m4_define and m4_define_default.
1221 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
1222 which marks the end of user code with appropriate syncline, like all
1223 the other skeletons.
1224 (b4_user_post_prologue): Add. Don't silently drop.
1225 (yylex): Remove.
1226 (parse): Inline yylex.
1227 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
1228 (%{...%}): Fix typo of %code imports.
1229 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
1230
1231 Support annotations on parser class with %define annotations.
1232 * data/lalr1.java (annotations): Add to parser class modifier.
1233 * doc/bison.texinfo (Java Parser Interface): Document
1234 %define annotations.
1235 (Java Declarations Summary): Document %define annotations.
1236 * tests/java.at (Java parser class modifiers): Test annotations.
1237
1238 Do not generate code for %error-verbose unless requested.
1239 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
1240 Make private. Make conditional on %error-verbose.
1241 (getErrorVerbose, setErrorVerbose): New.
1242 (yytnamerr_): Make conditional on %error-verbose.
1243 (yysyntax_error): Make some code conditional on %error-verbose.
1244 * doc/bison.texinfo (Java Bison Interface): Remove the parts
1245 about %error-verbose having no effect.
1246 (getErrorVerbose, setErrorVerbose): Document.
1247
1248 Move constants for token names to Lexer interface.
1249 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
1250 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
1251 (parse): Qualify EOF to Lexer.EOF.
1252 * doc/bison.texinfo (Java Parser Interface): Move documentation of
1253 EOF and token names to Java Lexer Interface.
1254 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
1255
1256 Make yyerror public.
1257 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
1258 (yyerror): Change to public. Add Javadoc comments. Use longer
1259 parameter names. Make the body rather than the declarator
1260 conditional on %locations.
1261 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
1262
1263 Allow user to add code to the constructor with %code init.
1264 * data/java.m4 (b4_init_throws): New, for %define init_throws.
1265 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
1266 Add %code init to the front of the constructor body.
1267 * doc/bison.texinfo (YYParser.YYParser): Document %code init
1268 and %define init_throws.
1269 (Java Declarations Summary): Document %code init and
1270 %define init_throws.
1271 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
1272 (Java constructor init and init_throws): Add tests.
1273
1274 2008-11-10 Akim Demaille <demaille@gostai.com>
1275
1276 Update TODO.
1277 * TODO (-D): is implemented.
1278 (associativity): Same precedence must have the same associativity.
1279 For instance, how can a * b / c be parsed if * is %left and / is
1280 %right?
1281 (YYERRORCODE, YYFAIL, YYBACKUP): New.
1282
1283 2008-11-10 Akim Demaille <demaille@gostai.com>
1284
1285 Formatting changes.
1286
1287 2008-11-10 Akim Demaille <demaille@gostai.com>
1288
1289 More information about the symbols.
1290 * src/output.c (type_names_output): Document all the symbols,
1291 including those that don't have a type-name.
1292 (symbol_definitions_output): Define "is_token" and
1293 "has_type_name".
1294 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
1295 type-name, now that they are defined too in b4_type_names.
1296
1297 2008-11-10 Akim Demaille <demaille@gostai.com>
1298
1299 Regen.
1300
1301 2008-11-10 Akim Demaille <demaille@gostai.com>
1302
1303 Make parser::yytranslate static.
1304 Small speedup (1%) on the list grammar. And makes yytranslate_
1305 available in non member functions.
1306
1307 * data/lalr1.cc (yytranslate_): Does not need to be a instance
1308 function.
1309
1310 2008-11-10 Akim Demaille <demaille@gostai.com>
1311
1312 Avoid trailing spaces.
1313 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
1314 * data/lalr1.cc: Don't indent before rule and symbol actions, as
1315 they can be empty, and anyway this incorrectly indents the first
1316 action.
1317
1318 2008-11-10 Akim Demaille <demaille@gostai.com>
1319
1320 Comment changes.
1321
1322 2008-11-10 Akim Demaille <demaille@gostai.com>
1323
1324 Use "enum" for integral constants.
1325 This is just nicer to read, I observed no speedup.
1326
1327 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
1328 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
1329 (yyuser_token_number_max_, yyundef_token_): Move into...
1330 (yytranslate_): here.
1331
1332 2008-11-10 Akim Demaille <demaille@gostai.com>
1333
1334 Shortcuts in bench directives.
1335 * etc/bench.pl.in (parse_dirs): New.
1336 Use it.
1337 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
1338 Create the benches in "benches/".
1339
1340 2008-11-10 Akim Demaille <demaille@gostai.com>
1341
1342 Formatting changes.
1343 * data/lalr1.cc: here.
1344
1345 2008-11-10 Akim Demaille <demaille@gostai.com>
1346
1347 Adjust verbose message to using emacs.
1348 * etc/bench.pl.in: Inform compilation-mode when we change the
1349 directory.
1350 (generate_grammar_list): Recognize %define "variant" in addition
1351 to %define variant.
1352
1353 2008-11-10 Akim Demaille <demaille@gostai.com>
1354
1355 Classify symbols by type-name.
1356 * src/uniqstr.h (UNIQSTR_CMP): New.
1357 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
1358 (type_names_output): New.
1359 (muscles_output): Use it.
1360 * data/lalr1.cc (b4_symbol_action_): Remove.
1361 (b4_symbol_case_, b4_type_action_): New.
1362 Adjust uses of b4_symbol_action_ to use b4_type_action_.
1363
1364 2008-11-10 Akim Demaille <demaille@gostai.com>
1365
1366 Change the handling of the symbols in the skeletons.
1367 Before we were using tables which lines were the symbols and which
1368 columns were things like number, tag, type-name etc. It is was
1369 difficult to extend: each time a column was added, all the numbers had
1370 to be updated (you asked for colon $2, not for "tag"). Also, it was
1371 hard to filter these tables when only a subset of the symbols (say the
1372 tokens, or the nterms, or the tokens that have and external number
1373 *and* a type-name) was of interest.
1374
1375 Now instead of monolithic tables, we define one macro per cell. For
1376 instance "b4_symbol(0, tag)" is a macro name which contents is
1377 self-decriptive. The macro "b4_symbol" provides easier access to
1378 these cells.
1379
1380 * src/output.c (type_names_output): Remove.
1381 (symbol_numbers_output, symbol_definitions_output): New.
1382 (muscles_output): Call them.
1383 (prepare_symbols): Define b4_symbols_number.
1384
1385 2008-11-10 Akim Demaille <demaille@gostai.com>
1386
1387 --trace=muscles
1388 * src/getargs.h, src/getargs.c (trace_muscle): New.
1389 (trace_types, trace_args): Support it.
1390 * src/output.c (output_skeleton): Use it.
1391
1392 2008-11-10 Akim Demaille <demaille@gostai.com>
1393
1394 muscles_output.
1395 * src/output.c (muscles_output): New, extracted from...
1396 (output_skeleton): here.
1397 Adjust.
1398
1399 2008-11-10 Akim Demaille <demaille@gostai.com>
1400
1401 Formatting changes.
1402
1403 2008-11-10 Akim Demaille <demaille@gostai.com>
1404
1405 Update the variant example.
1406 * examples/variant.yy: Formatting changes.
1407 One stage build.
1408
1409 2008-11-10 Akim Demaille <demaille@gostai.com>
1410
1411 Support constructor with an argument.
1412 This improves the "list" bench by 2%.
1413
1414 * data/lalr1.cc (variant::build): Add an overloaded version with
1415 an argument.
1416 * tests/c++.at (AT_CHECK_VARIANT): Check it.
1417
1418 2008-11-10 Akim Demaille <demaille@gostai.com>
1419
1420 Test variants.
1421 * tests/c++.at (AT_CHECK_VARIANTS): New.
1422 Use it with and without %define assert.
1423
1424 2008-11-10 Akim Demaille <demaille@gostai.com>
1425
1426 Add %precedence support.
1427 Unfortunately it is not possible to reuse the %prec directive. This
1428 is because to please POSIX, we do not require to end the rules with a
1429 semicolon. As a result,
1430
1431 foo: bar %prec baz
1432
1433 is ambiguous: either a rule which precedence is that of baz, or a rule,
1434 and then a declaration of the precedence of the token baz.
1435
1436 * doc/bison.texinfo: Document %precedence.
1437 (Precedence Only): New.
1438 * src/assoc.h, src/assoc.c (precedence_assoc): New.
1439 * src/conflicts.c (resolve_sr_conflict): Support it.
1440 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
1441 Parse it.
1442 * tests/calc.at: Use %precedence for NEG.
1443 * tests/conflicts.at (%precedence does not suffice)
1444 (%precedence suffices): New tests.
1445
1446 2008-11-09 Akim Demaille <demaille@gostai.com>
1447
1448 Make benches in a sub dirs.
1449 * etc/bench.pl.in ($dir): New.
1450 Use it.
1451 Check the use of constructors with an argument.
1452 (bench_variant_parser): Fix.
1453
1454 2008-11-09 Akim Demaille <demaille@gostai.com>
1455
1456 fix eof condition
1457
1458 2008-11-09 Akim Demaille <demaille@gostai.com>
1459
1460 Fix --help.
1461
1462 2008-11-09 Akim Demaille <demaille@gostai.com>
1463
1464 Require the generation of parse-gram.output.
1465 * src/Makefile.am (YACC): Pass --report=all.
1466
1467 2008-11-09 Akim Demaille <demaille@gostai.com>
1468
1469 Formatting changes.
1470
1471 2008-11-09 Akim Demaille <demaille@gostai.com>
1472
1473 Update TODO.
1474 * TODO: Remove obsolete items.
1475 Update others.
1476
1477 2008-11-09 Akim Demaille <demaille@gostai.com>
1478
1479 Enhance bench.pl.
1480 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
1481 (@token, $grammar, $bench): New.
1482 (generate_grammar_variant): Rename as...
1483 (generate_grammar_list): this.
1484 (generate_grammar): Adjust.
1485 (bench_grammar): Rename as...
1486 (bench): this.
1487 Use it in the various bench-marking routines.
1488 (-b, -g): New options.
1489
1490 2008-11-09 Akim Demaille <demaille@gostai.com>
1491
1492 Use a static hierarchy for symbols in the C++ parser.
1493 * data/lalr1.cc (symbol_base_type, symbol_type)
1494 (stack_symbol_type): Make it a static hierarchy.
1495 Adjust dependencies.
1496
1497 2008-11-09 Akim Demaille <demaille@gostai.com>
1498
1499 bench.pl -d, --directive.
1500 * etc/bench.pl.in (@directive): New.
1501 (&bench_grammar): Use it.
1502 (&bench_list_grammar): New, to provide access to the "variant"
1503 grammar.
1504 Use it.
1505 (getopts): Support -d, --directive.
1506
1507 2008-11-09 Akim Demaille <demaille@gostai.com>
1508
1509 Use inline for small operations.
1510 * data/lalr1.cc (symbol_base_type, symbol_type)
1511 (stack_symbol_type): Declare constructor and other operations as
1512 inline.
1513 (yy_destroy_): Inline.
1514
1515 2008-11-09 Akim Demaille <demaille@gostai.com>
1516
1517 Introduce a hierarchy for symbols.
1518 * data/lalr1.cc (symbol_base_type, symbol_type): New.
1519 (data_type): Rename as...
1520 (stack_symbol_type): this.
1521 Derive from symbol_base_type.
1522 (yy_symbol_value_print_): Merge into...
1523 (yy_symbol_print_): this.
1524 Rename as...
1525 (yy_print_): this.
1526 (yydestruct_): Rename as...
1527 (yy_destroy_): this.
1528 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
1529 (parser::parse): yyla is now of symbol_type.
1530 Use its type member instead of yytoken.
1531
1532 2008-11-09 Akim Demaille <demaille@gostai.com>
1533
1534 Rename data_type and stack_symbol_type.
1535 * data/lalr1.cc (data_type): Rename as...
1536 (stack_symbol_type): this.
1537
1538 2008-11-09 Akim Demaille <demaille@gostai.com>
1539
1540 Handle semantic value and location together.
1541 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
1542 yydata.value and yydata.location.
1543 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
1544 (YY_SYMBOL_PRINT): Now take semantic value and location as a
1545 single arg.
1546 Adjust all callers.
1547 (yydestruct_): New overload for a stack symbol.
1548
1549 2008-11-09 Akim Demaille <demaille@gostai.com>
1550
1551 Push a complete symbol, not connected parts.
1552 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
1553 state, value and location.
1554 Adjust callers.
1555
1556 2008-11-09 Akim Demaille <demaille@gostai.com>
1557
1558 Agregate yylval and yylloc.
1559 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
1560 (parser::yyla): this.
1561
1562 2008-11-09 Akim Demaille <demaille@gostai.com>
1563
1564 Rely on the state stack to display reduction traces.
1565 To display rhs symbols before a reduction, we used information
1566 about the rule reduced, which required the tables yyrhs and
1567 yyprhs. Now use rely only on the state stack to get the same
1568 information.
1569
1570 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
1571 Use them.
1572 (parser::yyrhs_, parser::yyprhs_): Remove.
1573 (parser::yy_reduce_print_): Use the state stack.
1574
1575 2008-11-09 Akim Demaille <demaille@gostai.com>
1576
1577 Fuse yyval and yyloc into yylhs.
1578 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
1579 yylhs.
1580 (parse): Replace yyval and yyloc with yylhs.value and
1581 yylhs.location.
1582 After a user action, compute yylhs.state earlier.
1583 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
1584 fresh error_token.
1585
1586 2008-11-09 Di-an Jan <dianj@freeshell.org>
1587
1588 Remove unused variable.
1589 * src/output.c (type_names_output): Remove unused variable sep.
1590
1591 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
1592
1593 Change tests/output.at quoting.
1594 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
1595 expanding arguments.
1596
1597 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1598
1599 Don't add a semicolon to actions for %skeleton or %language.
1600 It breaks Java test cases as reported by Akim Demaille.
1601 * src/scan-code.l: Implement.
1602
1603 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1604
1605 Clean up %skeleton and %language priority implementation.
1606 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1607 remove static qualifier because others will soon need to see it.
1608 (language_prio): Likewise.
1609 (getargs): Use command_line_prio rather than 0.
1610 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1611 enum fields.
1612 (skeleton_prio): Extern it.
1613 (language_prio): Extern it.
1614 * src/parse-gram.y: Use grammar_prio rather than 1.
1615
1616 2008-11-07 Akim Demaille <demaille@gostai.com>
1617
1618 Moving push traces into yypush_.
1619 * data/lalr1.cc (yypush_): Now takes a optional trace message.
1620 Adjust all uses.
1621
1622 2008-11-07 Akim Demaille <demaille@gostai.com>
1623
1624 The single-stack C++ parser is now the standard one.
1625 * data/lalr1.cc: Rename as...
1626 * data/lalr1-split.cc: this.
1627 * data/lalr1-fusion.cc: Rename as...
1628 * data/lalr1.cc: this.
1629 * etc/bench.pl.in: Adjust.
1630
1631 2008-11-07 Akim Demaille <demaille@gostai.com>
1632
1633 Avoid empty-if warnings.
1634 Reported by Quentin Hocquet.
1635
1636 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
1637 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
1638
1639 2008-11-07 Akim Demaille <demaille@gostai.com>
1640
1641 Pass command line location to skeleton_arg and language_argmatch.
1642 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
1643 The location argument is now mandatory.
1644 Adjust all dependencies.
1645 (getargs): Use command_line_location.
1646
1647 2008-11-07 Akim Demaille <demaille@gostai.com>
1648
1649 -D, --define.
1650 * src/getargs.c (usage): Document -D.
1651 Fix help string for --locations.
1652 (command_line_location): New.
1653 (short_options, long_options, getargs): Support -D, --define.
1654 (getargs): Move -d support at the right place.
1655 * doc/bison.texinfo (Bison Options): Update.
1656 * tests/input.at (%define, --define): New.
1657
1658 2008-11-07 Akim Demaille <demaille@gostai.com>
1659
1660 Initialize the muscle table before parsing the command line.
1661 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
1662 (getargs): Define file_name.
1663 * src/main.c (main): Initialize muscle_tab before calling
1664 getargs.
1665 * src/muscle_tab.c (muscle_init): No longer define file_name, as
1666 its value is not available yet.
1667
1668 2008-11-07 Akim Demaille <demaille@gostai.com>
1669
1670 Locations without columns for command line arguments.
1671 * src/location.c (location_print): Don't display negative columns.
1672 * src/location.h: Document this.
1673
1674 2008-11-07 Akim Demaille <demaille@gostai.com>
1675
1676 Fix --help.
1677 * src/getargs.c (usage): Fix help string for -W.
1678
1679 2008-11-07 Akim Demaille <demaille@gostai.com>
1680
1681 Handle more general types of option arguments.
1682 * build-aux/cross-options.pl: The argument ends at the first
1683 space, not the first non-symbol character.
1684 Use @var for each word appearing the argument description.
1685
1686 2008-11-07 Akim Demaille <demaille@gostai.com>
1687
1688 Destroy the variants that remain on the stack in case of error.
1689 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
1690 destructor.
1691 Display the value only if yymsg is nonnull.
1692 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
1693
1694 2008-11-07 Akim Demaille <demaille@gostai.com>
1695
1696 Add "%define assert" to variants.
1697 This is used to help the user catch cases where some value gets
1698 ovewritten by a new one. This should not happen, as this will
1699 probably leak.
1700
1701 Unfortunately this uncovered a bug in the C++ parser itself: the
1702 lookahead value was not destroyed between two calls to yylex. For
1703 instance if the previous lookahead was a std::string, and then an int,
1704 then the value of the std::string was correctly taken (i.e., the
1705 lookahead was now an empty string), but std::string structure itself
1706 was not reclaimed.
1707
1708 This is now done in variant::build(other&) (which is used to take the
1709 value of the lookahead): other is not only stolen from its value, it
1710 is also destroyed. This incurs a new performance penalty of a few
1711 percent, and union becomes faster again.
1712
1713 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
1714 (b4_variant_if): New.
1715 (variant::built): New.
1716 Use it whereever the status of the variant changes.
1717 * etc/bench.pl.in: Check the penalty of %define assert.
1718
1719 2008-11-07 Akim Demaille <demaille@gostai.com>
1720
1721 Use "%define variant" in bench.pl.
1722 * etc/bench.pl.in: No longer use the pseudo directive %variants,
1723 just use %define variants.
1724
1725 2008-11-07 Akim Demaille <demaille@gostai.com>
1726
1727 Regen.
1728 * src/parse-gram.h, src/parse-gram.c: Regen.
1729
1730 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
1731
1732 Fix user actions without a trailing semicolon.
1733 Reported by Sergei Steshenko at
1734 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1735 * THANKS (Sergei Steshenko): Add.
1736 * src/scan-code.l (SC_RULE_ACTION): Fix it.
1737 * tests/regression.at (Fix user actions without a trailing semicolon):
1738 New test case.
1739
1740 2008-11-04 Akim Demaille <demaille@gostai.com>
1741
1742 Use b4_copyright_years.
1743 * data/yacc.c (b4_copyright_years): New.
1744 Fix its value according to the comments in the file.
1745 Use it and undefine it.
1746
1747 2008-11-04 Akim Demaille <demaille@gostai.com>
1748
1749 Formatting changes.
1750 * data/lalr1-fusion.cc, src/parse-gram.y: here.
1751
1752 2008-11-04 Akim Demaille <demaille@gostai.com>
1753
1754 Formatting changes.
1755 * data/lalr1-fusion.cc: here.
1756
1757 2008-11-04 Akim Demaille <demaille@gostai.com>
1758
1759 Use strict on bench.pl.
1760 * etc/bench.pl.in (&run, &generate_grammar): New.
1761 Rename the grammar generating functions for consistency.
1762 Change the interface so that the list of benches to run is passed
1763 as (optionless) arguments.
1764 (&compile): Use &run.
1765
1766 2008-11-04 Akim Demaille <demaille@gostai.com>
1767
1768 Remove spurious initial empty lines.
1769 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1770 * data/yacc.c: End the @output lines with an @.
1771
1772 2008-11-04 Akim Demaille <demaille@gostai.com>
1773
1774 Improve the display of sizes.
1775 * etc/bench.p.in: Higher precision.
1776 Sort by decreasing size.
1777
1778 2008-11-04 Akim Demaille <demaille@gostai.com>
1779
1780 Don't memcpy C++ structures.
1781 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
1782 arguments.
1783 (variant::build): New overload for
1784 copy-construction-that-destroys.
1785 (variant::swap): New.
1786 (parser::yypush_): Use it in variant mode.
1787
1788 2008-11-04 Akim Demaille <demaille@gostai.com>
1789
1790 Better defaults for bench.pl.
1791 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
1792 default values.
1793 Adjust &verbose uses.
1794 (-q, --quiet): New.
1795
1796 2008-11-04 Akim Demaille <demaille@gostai.com>
1797
1798 Make variant.yy more complex.
1799 std::list cannot be copied via memcpy, they are more demanding than
1800 std::string. Use one std::list to strengthen the test.
1801
1802 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
1803 Adjust.
1804 Create a list of strings, instead of a single large string.
1805
1806 2008-11-04 Akim Demaille <demaille@gostai.com>
1807
1808 bench.pl --bench.
1809 * etc/bench.pl.in (--bench, $bench): New.
1810
1811 2008-11-04 Akim Demaille <demaille@gostai.com>
1812
1813 Sort methods.
1814 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
1815 Define it after as().
1816
1817 2008-11-04 Akim Demaille <demaille@gostai.com>
1818
1819 Useless parens.
1820 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
1821
1822 2008-11-04 Akim Demaille <demaille@gostai.com>
1823
1824 Issue missing synclines after user actions.
1825 * data/c.m4 (b4_case): Issue synclines on the output file.
1826
1827 2008-11-04 Akim Demaille <demaille@gostai.com>
1828
1829 Remove trailing empty line.
1830 * data/lalr1-fusion.cc: Don't add an empty line after the user's
1831 epilogue.
1832
1833 2008-11-04 Akim Demaille <demaille@gostai.com>
1834
1835 Fix output of copyright years.
1836 * data/bison.m4 (b4_copyright): Fix the indentation of the
1837 copyright year paragraph.
1838 Use b4_copyright_years when no years are given.
1839 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
1840 (b4_copyright_years): New.
1841 Use it.
1842
1843 2008-11-04 Akim Demaille <demaille@gostai.com>
1844
1845 Avoid the spurious initial empty line.
1846 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
1847 the end of @output request to suppress the empty line that
1848 results.
1849
1850 2008-11-04 Akim Demaille <demaille@gostai.com>
1851
1852 Remove parser::rhs_number_type.
1853 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
1854 (yyrhs_): Use b4_table_define.
1855
1856 2008-11-04 Akim Demaille <demaille@gostai.com>
1857
1858 Fix iteration type.
1859 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
1860
1861 2008-11-04 Akim Demaille <demaille@gostai.com>
1862
1863 Factor the declaration of the integer tables.
1864 * data/lalr1-fusion.cc (b4_table_define): New.
1865 Use it.
1866
1867 2008-11-03 Akim Demaille <demaille@gostai.com>
1868
1869 Fix indentation of tables in lalr1.cc
1870 * data/lalr1-fusion.cc: Fix the indentation.
1871
1872 2008-11-03 Akim Demaille <demaille@gostai.com>
1873
1874 Destroy the lhs symbols after reduction.
1875 * data/lalr1-fusion.cc (parse): After the user action, when in
1876 variant mode, destroy the lhs symbols.
1877
1878 2008-11-03 Akim Demaille <demaille@gostai.com>
1879
1880 Simplify yysyntax_error_ use.
1881 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
1882 type, but make it unnamed in the declaration when it is not used.
1883
1884 2008-11-03 Akim Demaille <demaille@gostai.com>
1885
1886 Let yy::variant::build return an lvalue.
1887 * data/lalr1-fusion.cc (variant::build): Return a reference to the
1888 object.
1889
1890 2008-11-03 Akim Demaille <demaille@gostai.com>
1891
1892 Define yy::variant only when needed.
1893 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
1894 used.
1895
1896 2008-11-03 Akim Demaille <demaille@gostai.com>
1897
1898 Bench the three-stack lalr1.cc.
1899 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
1900 one-stack one.
1901
1902 2008-11-03 Akim Demaille <demaille@gostai.com>
1903
1904 Fail on parse error in calc++.
1905 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
1906 status.
1907 * examples/calc++/test ($me, $number, $exit, run): New.
1908 Use them to propagate errors to the exit status.
1909
1910 2008-11-03 Akim Demaille <demaille@gostai.com>
1911
1912 Don't specify the skeleton twice in the example.
1913 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
1914 file does what is needed.
1915
1916 2008-11-03 Akim Demaille <demaille@gostai.com>
1917
1918 bench: Improve output.
1919 * etc/bench.pl.in (bench_grammar): Tune the printf format.
1920
1921 2008-11-03 Akim Demaille <demaille@gostai.com>
1922
1923 bench: check impact of %debug on variants.
1924 * etc/bench.pl.in (variant_grammar): Fix the computation of
1925 $variant.
1926 Generate a grammar file that can work with or without %debug.
1927 Do use the @directive.
1928 (bench_variant_parser): Check impact of %debug.
1929 (@directives): Rename all the occurrences to...
1930 (@directive): this, for consistency.
1931
1932 2008-11-03 Akim Demaille <demaille@gostai.com>
1933
1934 bench: report the size too.
1935 * etc/bench.pl.in ($iterations): Defaults to -3.
1936 (&bench_grammar): Require hireswallclock.
1937 Compute and display the size of the result.
1938 More comments.
1939
1940 2008-11-03 Akim Demaille <demaille@gostai.com>
1941
1942 bench: More use of the verbosity level.
1943 * etc/bench.pl.in ($verbose, &verbose): New.
1944 Use them.
1945 More POD documentation.
1946
1947 2008-11-03 Akim Demaille <demaille@gostai.com>
1948
1949 bench.pl: a command line interface
1950 * etc/bench.pl.in: More doc.
1951 Some fixes in the documentation.
1952 ($cflags, $iterations, &help, &getopt): New.
1953 Use them.
1954 (&variant_grammar): Let the number of stages be 10 times what is
1955 specified.
1956
1957 2008-11-03 Akim Demaille <demaille@gostai.com>
1958
1959 Bench the use of Boost.Variants.
1960 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
1961 New.
1962 (&compile): Be ready to compile C++ parsers.
1963 (&bench_push_parser): Move debug information to the outermost
1964 level.
1965 * THANKS: Add Michiel De Wilde.
1966
1967 2008-11-03 Akim Demaille <demaille@gostai.com>
1968
1969 bench.pl: Pass directives as a list instead of as a string.
1970 * etc/bench.pl.in (&directives): New.
1971 (&triangular_grammar, &calc_grammar): Use it to format the Bison
1972 directives.
1973 (&triangular_grammar): Do use the directives (were ignored).
1974 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
1975 directives.
1976
1977 2008-11-03 Akim Demaille <demaille@gostai.com>
1978
1979 Improve genericity of bench.pl.
1980 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
1981 argument.
1982 (&bench_push_parser): New.
1983 Call it.
1984
1985 2008-11-03 Akim Demaille <demaille@gostai.com>
1986
1987 Add documentation to bench.pl.
1988 * etc/bench.pl.in: Comment changes.
1989
1990 2008-11-03 Akim Demaille <demaille@gostai.com>
1991
1992 Fuse the three stacks into a single one.
1993
1994 In order to make it easy to perform benchmarks to ensure that
1995 there are no performance loss, lalr1.cc is forked into
1996 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
1997 lalr1.cc.
1998
1999 Meanwhile, to make sure that lalr1-fusion.cc is correctly
2000 exercized by the test suite, the user must install a symbolic link
2001 from lalr1.cc to it.
2002
2003 Instead of having three stacks (state, value, location), use a
2004 stack of triples. This considerably simplifies the code (and it
2005 will be easier not to require locations as currently does the C++
2006 parser), and also gives a 10% speedup according to
2007 etc/bench (probably mainly since memory allocation is done once
2008 instead of three times).
2009
2010 Another motivation is to make it easier to destruct properly
2011 semantic values: now that they are bound to their state (hence
2012 symbol type) it will be easier to call the appropriate destructor.
2013
2014 These changes should probably benefit the C parser too.
2015
2016 * data/lalr1.cc: Copy as...
2017 * data/lalr1-fusion.cc: this new file.
2018 (b4_rhs_value, b4_rhs_location): New definitions overriding those
2019 from c++.m4.
2020 (state_stack_type, semantic_stack_type, location_stack_type)
2021 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
2022 (data_type, stack_type, yystack_): New.
2023 (YYLLOC_DEFAULT, yypush_): Adjust.
2024 (yyerror_range): Now based on data_type, not location_type.
2025
2026 2008-11-03 Akim Demaille <demaille@gostai.com>
2027
2028 Push the state, value, and location at the same time.
2029 This is needed to prepare a forthcoming patch that fuses the three
2030 stacks into one.
2031
2032 * data/lalr1.cc (parser::yypush_): New.
2033 (parser::yynewstate): Change the semantics: instead of arriving to
2034 this label when value and location have been pushed, but yystate
2035 is to be pushed on the state stack, now the three of them must
2036 have been pushed before. yystate still must be the new state.
2037 This allows to use yypush_ everywhere instead of individual
2038 handling of the stacks.
2039
2040 2008-11-03 Akim Demaille <demaille@gostai.com>
2041
2042 Prefer references to pointers.
2043 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
2044 definition to use references instead of pointers.
2045 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
2046 Take the value and location as references.
2047 Adjust callers.
2048
2049 2008-11-03 Akim Demaille <demaille@gostai.com>
2050
2051 stack::size instead of stack::height.
2052 * data/lalr1.cc (stack::height): Rename as...
2053 (stack::size): this.
2054 Fix the output type.
2055 Comment changes.
2056
2057 2008-11-03 Akim Demaille <demaille@gostai.com>
2058
2059 Use variants to support objects as semantic values.
2060 This patch was inspired by work by Michiel De Wilde. But he used
2061 Boost variants which (i) requires Boost on the user side, (ii) is
2062 slow, and (iii) has useless overhead (the parser knows the type of
2063 the semantic value there is no reason to duplicate this
2064 information as Boost.Variants do).
2065
2066 This implementation reserves a buffer large enough to store the
2067 largest objects. yy::variant implements this buffer. It was
2068 implemented with Quentin Hocquet.
2069
2070 * src/output.c (type_names_output): New.
2071 (output_skeleton): Invoke it.
2072 * data/c++.m4 (b4_variant_if): New.
2073 (b4_symbol_value): If needed, provide a definition for variants.
2074 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
2075 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
2076 (b4_char_sizeof, yy::variant): New.
2077 (parser::parse): If variants are requested, define
2078 parser::union_type, parser::variant, change the definition of
2079 semantic_type, construct $$ before running the user action instead
2080 of performing a default $$ = $1.
2081 * examples/variant.yy: New.
2082 Based on an example by Michiel De Wilde.
2083
2084 2008-11-03 Akim Demaille <demaille@gostai.com>
2085
2086 Parameterize the extraction of semantic values.
2087 To make future changes easier, no longer rely on ".TYPE" being the
2088 way to get a semantic value.
2089
2090 * data/c.m4 (b4_symbol_value): New.
2091 Use it.
2092 * data/c++.m4, data/yacc.c: Use it.
2093 * data/glr.c: Use b4_symbol_value.
2094 (b4_rhs_data): New.
2095 Use it.
2096
2097 2008-11-03 Akim Demaille <demaille@gostai.com>
2098
2099 Prepare easier M4 changes.
2100 * data/lalr1.cc: Use escaped [] instead of literals to prepare
2101 future changes.
2102
2103 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2104
2105 Initiate further development.
2106 * NEWS: Create an empty section for new entries.
2107 * gnulib: Update submodule to HEAD.
2108
2109 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2110
2111 * NEWS: Version 2.4.
2112
2113 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2114
2115 Prepare for next release.
2116 * NEWS: Briefly mention changes since 2.3b.
2117 * README: Say GNU m4 1.4.6, which we've been requiring in release
2118 announcements already, not 1.4.3, which breaks the build.
2119
2120 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2121
2122 Say %language is experimental.
2123 We're thinking of extending it's effect on output file naming. See the
2124 thread at
2125 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2126 * NEWS: Say it's experimental.
2127 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2128 recommend it over %skeleton for now.
2129 (Bison Options): Likewise.
2130 (C++ Bison Interface): Use %skeleton not %language.
2131 (Calc++ Parser): Use %skeleton not %language.
2132 * src/getargs.c (usage): Say it's experimental.
2133
2134 2008-11-01 Di-an Jan <dianj@freeshell.org>
2135 Paolo Bonzini <bonzini@gnu.org>
2136
2137 Support all Java parser class modifiers.
2138 * data/java.m4 (b4_percent_define_get3): New.
2139 (b4_final_if, b4_strictfp_if): New.
2140 * data/lalr1.java (final, strictfp, extends, implements): Support.
2141 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2142 documentation.
2143 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2144 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2145 (AT_CHECK_JAVA_GREP): New.
2146 (Java parser class modifiers): New test.
2147 (Java parser class extends and implements): New test.
2148
2149 Model exception propagation better with throws and lex_throws.
2150 * data/java.m4 (b4_list2): New.
2151 (throws): Change default.
2152 * data/lalr1.java (yyaction): Add throws.
2153 (parse): Add lex_throws in addition to throws.
2154 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2155 * tests/java.at (Java throws specifications): New test.
2156
2157 Improve documentation for Java parsers.
2158 * doc/bison.texinfo (Java Parsers): Add subsections.
2159 Don't quote first argument of %define.
2160 (Java Bison Interface): Document output files. Move documentation
2161 of parser class and merge into Java Parser Interface. Document
2162 features that error out. Document directives with no effect.
2163 Move note about Javadoc higher.
2164 (Java Semantic Values): Explicitly mention stype.
2165 Document that generic types cannot be used.
2166 (Java Location Values): Use @deftypeivar. Document constructors.
2167 Correct return value for toString.
2168 (Java Parser Interface): List undocumented constants/fields.
2169 Move documentation of fields added by %parse-param closer to list
2170 of members. Document that token names are added as fields.
2171 Document constructors accurately. Remove error method.
2172 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2173 Interface. Describe %code lexer and yylex accutately.
2174 Remove documentation that does not match the code.
2175 (Java Action Features): New.
2176 (Java Differences): Add reference. Add item on semantic values.
2177 Add note about @{ ... @}. Clarify %% epilogue placement.
2178 (Java Declarations Summary): New.
2179
2180 Fix Java skeleton.
2181 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2182 (b4_remove_comma): Quote test argument.
2183 (b4_identification): Remove "bison" field.
2184 * tests/java.at (Java parser class and package names): New test.
2185 (Java %parse-param and %lex-param): New test.
2186 (Java stype, position_class and location_class): New test.
2187
2188 2008-10-31 Di-an Jan <dianj@freeshell.org>
2189
2190 * data/lalr1.jave: Update copyright years.
2191 (YYParser): Correct name of "generated from" file in Javadoc:
2192 use b4_file_name instead of @ofile@.
2193 (Location constructor): Correct Javadoc parameter name.
2194 (yylloc): Add missing opening m4 quote after b4_location_if.
2195 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2196 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2197 (YYParser constructor): Correct Javadoc parameter name.
2198
2199 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2200
2201 Always put auxiliary code files in the same dir as other output files.
2202 * src/files.c (compute_file_name_parts): When the user specifies
2203 --output but not --file-prefix, extract the directory prefix from the
2204 file prefix not from the grammar file name. This affects the location
2205 of files like location.hh generated by the C++ skeleton. The includes
2206 in the other output files require this fix.
2207 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2208 for expected output files.
2209 (Output files): Add a test for the above.
2210
2211 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2212
2213 * gnulib: Update submodule to HEAD.
2214
2215 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2216
2217 Update copyright year.
2218 * src/files.c: Here.
2219
2220 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2221
2222 Don't overwrite the input file.
2223 * src/files.c (output_file_name_check): Fatal error if using input file
2224 for output.
2225 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2226 argument.
2227 (Conflicting output files): Add test.
2228
2229 2008-10-28 Akim Demaille <demaille@gostai.com>
2230
2231 Space changes.
2232 * data/lalr1.cc: Formatting changes.
2233
2234 2008-10-28 Akim Demaille <demaille@gostai.com>
2235
2236 Don't define debugging functions when !YYDEBUG.
2237 * data/lalr1.cc (debug_stream, set_debug_stream)
2238 (debug_level_type, debug_level, set_debug_level): Don't
2239 declare them when YYDEBUG is not defined.
2240 The implementation are already YYDEBUG-aware.
2241
2242 2008-10-28 Akim Demaille <demaille@gostai.com>
2243
2244 Prefer "continue" for empty loop bodies.
2245 * etc/bench.pl.in: Use "continue" instead of {}.
2246
2247 2008-10-28 Akim Demaille <demaille@gostai.com>
2248
2249 Space and comments changes.
2250 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2251 * data/c.m4, data/lalr1.cc: Space changes.
2252
2253 2008-10-28 Akim Demaille <demaille@gostai.com>
2254
2255 Make gnulib a submodule.
2256 * gnulib: New.
2257 * .gitmodules (gnulib): New.
2258
2259 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2260
2261 Fix yyerror_range for user-defined location type in C++. Reported by
2262 Georg Sauthoff at
2263 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2264 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2265 * THANKS (Georg Sauthoff): Add.
2266
2267 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2268
2269 Update several administrative files mainly to facilitate releasing.
2270 * HACKING (Administrivia): Make the git-merge-changelog notes more
2271 helpful.
2272 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2273 (Release Procedure): Update for git and add numerous details that were
2274 previously missing.
2275 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2276 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2277 that announcements don't claim we bootstrapped with whatever bison
2278 happened to be in PATH. Add flex as a bootstrap tool.
2279 * Makefile.maint: Remove, previously replaced by maint.mk.
2280 * Makefile.cfg: Remove, and migrate settings to...
2281 * cfg.mk: ... here for the sake of `make announcement'.
2282 * bootstrap.conf (gnulib_modules): Add announce-gen.
2283 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2284 Berry.
2285
2286 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2287
2288 Small but important bugfixes for the Java skeleton.
2289 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2290 (yy_symbol_print): Call toString on yyvaluep.
2291
2292 2008-08-29 Akim Demaille <demaille@gostai.com>
2293
2294 Clarify UPDATED use.
2295 * doc/bison.texinfo: It refers to the last edition of this file,
2296 not to the release date of Bison.
2297 Reported by Joel E. Denny.
2298
2299 2008-08-29 Akim Demaille <demaille@gostai.com>
2300
2301 * README: Update FAQ pointer.
2302 Reported by Joel E. Denny.
2303
2304 2008-08-27 Eric Blake <ebb9@byu.net>
2305
2306 Resync m4sugar from autoconf.
2307 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2308 (m4_init): Adjust to latest m4.git changes.
2309 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2310 effects.
2311 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2312 (_m4_list_cmp): Reduce side effects.
2313
2314 2008-08-27 Akim Demaille <demaille@gostai.com>
2315
2316 Check yyerrok in calc.at.
2317 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2318 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2319 expected.
2320
2321 2008-08-27 Akim Demaille <demaille@gostai.com>
2322
2323 Support yyerrok in lalr1.cc.
2324 YYBACKUP is still to import back into lalr1.cc.
2325 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
2326
2327 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2328
2329 For maintainer-check*, don't recompile for a $(VERSION) update.
2330 * cfg.mk: New file.
2331 (_is-dist-target): Override the one in GNUmakefile.
2332 * Makefile.am (EXTRA_DIST): Add cfg.mk.
2333
2334 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2335
2336 Update for recent change to gnulib.
2337 * src/parse-gram.y: Don't include strverscmp.h. It comes from
2338 string.h now.
2339
2340 2008-08-15 Eric Blake <ebb9@byu.net>
2341
2342 Remaining m4sugar merge from autoconf.
2343 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2344 * data/m4sugar/foreach.m4: New file, copied from autoconf.
2345 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2346 * src/output.c (output_skeleton): Tell m4 how to find it.
2347
2348 Partial m4sugar merge from autoconf: m4_map.
2349 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2350 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2351 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2352 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2353 for empty list.
2354 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2355 Likewise.
2356 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2357 declares it.
2358
2359 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2360
2361 Keep .version and PACKAGE_VERSION in sync.
2362 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2363 dependency, and add comments justifying this in more detail. Discussed
2364 starting at
2365 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2366
2367 2008-08-06 Eric Blake <ebb9@byu.net>
2368
2369 Partial m4sugar merge from autoconf: m4_shiftn.
2370 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2371 (m4_shift2, m4_shift3): New macros.
2372 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2373 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2374 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2375 * data/java.m4 (b4_remove_comma): Likewise.
2376
2377 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2378 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2379 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2380 (m4_init): Consolidate wrapped text into single m4_wrap.
2381 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2382 in wrapped text.
2383
2384 2008-08-05 Eric Blake <ebb9@byu.net>
2385
2386 Partial m4sugar merge from autoconf: builtins, version.m4.
2387 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2388 (m4_prepend): Remove, as it is unused and inherently quadratic,
2389 whereas m4_append is linear in newer m4.
2390 (m4_mkstemp): New builtin.
2391 (m4_symbols): Make rename conditional.
2392 (m4_version_prereq): Ensure fatal error if used in bison, which
2393 intentionally lacks version.m4.
2394
2395 Fix comments in m4sugar.
2396 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2397
2398 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2399
2400 Update for recent .gitignore fix in Gnulib.
2401 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2402 anchored .gitignore entries.
2403
2404 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2405
2406 Set gnu or gnits strictness.
2407 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2408 development and gnits strictness for releases. Based on Eric Blake's
2409 suggestion at
2410 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2411
2412 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2413
2414 * NEWS: Clarify documentation of %language.
2415
2416 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2417
2418 Support usage of git-merge-changelog.
2419 * .gitattributes: New.
2420 * HACKING: Document usage of git-merge-changelog.
2421 * bootstrap: Install git-merge-changelog entries in .git/config
2422 if appropriate.
2423
2424 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2425
2426 Remove remaining dependence on CVS Id keyword.
2427 * ChangeLog: For the sake of people still using CVS, don't use dollars
2428 when mentioning Id.
2429 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2430 unusual anyway.
2431 * data/xslt/xml2dot.xsl: Likewise.
2432 * data/xslt/xml2text.xsl: Likewise.
2433 * data/xslt/xml2xhtml.xsl: Likewise.
2434 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2435 * doc/Makefile.am (neutralize): Remove, no longer needed.
2436 (.x.1): Don't use neutralize.
2437 (edit): Don't substitute for ID.
2438 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2439
2440 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2441
2442 Fix dependence on computed configure variables.
2443 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2444 $(top_srcdir)/configure.ac so that changes to computed variables, such
2445 as PACKAGE_VERSION, are seen.
2446 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2447
2448 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2449
2450 Update copyright dates for recent changes.
2451 * Makefile.am: Here.
2452 * src/Makefile.am: Here.
2453 * src/reduce.c: Here.
2454 * tests/reduce.at: Here.
2455
2456 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2457
2458 Use git-version-gen for version names between releases.
2459 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2460 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2461 * .prev-version: New.
2462 * .version.in: Remove.
2463 * ChangeLog: Remove the Id previously used for capturing the CVS
2464 revision.
2465 * GNUmakefile: Remove, now copied from Gnulib.
2466 * Makefile.am: Add code suggested by comments in
2467 build-aux/git-version-gen.
2468 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2469 .prev-version, and .version.
2470 * NEWS (2.3b+): Rename to...
2471 (?.?): ... this because we're dropping the "+" version naming scheme,
2472 but, in general, we still can't be sure of our next release name.
2473 * bootstrap: Add a quick hack to remove from .gitignore the
2474 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2475 entry. This should really be fixed in gnulib instead.
2476 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2477 * configure.ac (AC_INIT): Set version name by invoking
2478 build-aux/git-version-gen.
2479 (AC_CONFIG_FILES): Remove .version, now generated by
2480 build-aux/git-version-gen.
2481 * maint.mk: New, copied from coreutils.
2482 * doc/.cvsignore (bison.1): Add.
2483 * doc/.gitignore (/bison.1): Add.
2484 * doc/bison.1: Remove, generated.
2485 * src/.cvsignore (revision.c): Remove.
2486 * src/.gitignore (/revision.c): Remove.
2487 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2488 (BUILT_SOURCES): Remove revision.c.
2489 (revision.c): Remove.
2490 * src/getargs.c (version): Don't print revision after the VERSION.
2491 * src/revision.h: Remove.
2492
2493 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2494
2495 Fix untranslatable composition of sentences. Reported by Goran
2496 Uddeborg at
2497 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2498 * THANKS (Goran Uddeborg): Add.
2499 * src/reduce.c (reduce_print): Report the number of nonterminals and
2500 rules useless in the grammar in separate sentences.
2501 * tests/reduce.at (Useless Rules): Update output.
2502 (Reduced Automaton): Likewise.
2503 (Underivable Rules): Likewise.
2504 (Empty Language): Likewise.
2505
2506 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2507
2508 Fix some .gitignore and .cvsignore problems.
2509 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2510 (insert_vc_ignore): ... this new function, which prepends `/' to all
2511 .gitignore entries before passing them to insert_sorted_if_absent.
2512 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2513 .cvsignore files are maintained even though Bison developers run
2514 bootstrap while using Git.
2515 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2516 unneeded by Bison.
2517 (gnulib): Add.
2518 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2519 unneeded. Reported by Eric Blake.
2520 * lib/.gitignore (/*~): Add.
2521 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2522 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2523 Blake.
2524 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2525
2526 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2527
2528 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2529 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2530 * bootstrap.conf (gnulib_modules): Add unsetenv.
2531 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2532 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2533 (/setenv.m4): Add.
2534 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2535 the first argument because it may become position-dependent, and unset
2536 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2537 Add comments explaining these issues in more detail.
2538
2539 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2540
2541 Add .gitignore everywhere based on .cvsignore.
2542 * .gitignore: New.
2543 * build-aux/.gitignore: New.
2544 * data/.gitignore: New.
2545 * doc/.gitignore: New.
2546 * etc/.gitignore: New.
2547 * examples/.gitignore: New.
2548 * examples/calc++/.gitignore: New.
2549 * lib/.gitignore: New.
2550 * m4/.gitignore: New.
2551 * po/.gitignore: New.
2552 * runtime-po/.gitignore: New.
2553 * src/.gitignore: New.
2554 * tests/.gitignore: New.
2555
2556 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2557
2558 * NEWS (2.3b+): New section, empty for now.
2559 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2560
2561 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2562
2563 * NEWS (2.3b): Update release date since there has been a delay in
2564 getting the announcements and tarballs out.
2565
2566 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2567
2568 * NEWS: Version 2.3b.
2569 * configure.ac (AC_INIT): Likewise.
2570 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2571
2572 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2573
2574 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2575 been doing it for years.
2576 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2577 (Release Procedure): Add FIXME about make alpha being unmaintained.
2578
2579 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2580
2581 * data/yacc.c: Reformat m4 a little for readability.
2582 * src/lalr.c (build_relations): Correct comment.
2583
2584 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2585
2586 DJGPP specific issue.
2587 * djgpp/config.sed: Fixes required to run configure scripts generated
2588 by autoconf 2.62.
2589
2590 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2591
2592 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2593 coordinator@translationproject.org.
2594
2595 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2596
2597 * THANKS: Add Eric Blake.
2598
2599 2008-04-23 Eric Blake <ebb9@byu.net>
2600
2601 Revert prior patch, by working around autoconf regression.
2602 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2603 ("Output file name: ("): Uncomment test.
2604 ("Output file name: )"): Likewise.
2605 Based on an idea from Noah Misch.
2606
2607 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2608
2609 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2610 2.61. Reported by Juan Manuel Guerrero at
2611 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2612 * tests/output.at ("Output file name: ("): Comment out test case for
2613 now.
2614 ("Output file name: )"): Likewise.
2615
2616 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2617
2618 * GNUmakefile: Update git-version-gen invocation so make dist
2619 succeeds.
2620
2621 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2622
2623 Update to the current gnulib CVS repository, and fix trigraph handling
2624 in Bison.
2625 * bootstrap: Update gnulib CVS repository URL.
2626 (symlink_to_dir): Encapsulate the code that guarantees the destination
2627 directory exists into...
2628 (check_dst_dir): ... this new function, and...
2629 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2630 fail when copying files into lib/uniwidth/.
2631 * src/output.c (prepare_symbols): When writing yytname muscles, where
2632 symbol names will be encoded in C-string literals, tell quotearg to
2633 escape trigraphs. This used to be the default in gnulib.
2634 * tests/regression.at (Token definitions): Because of the change in
2635 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2636 escapes trigraphs in symbol names. Thus, yytname no longer has
2637 trigraphs unnecessarily doubly escaped. Update test case output.
2638 Extend test case to be sure Bison's own error messages will no longer
2639 have trigraphs in symbol names unnecessarily escaped once.
2640
2641 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2642
2643 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2644 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2645 * .cvsignore: Add .version.
2646 * .version.in: New.
2647 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2648 * configure.ac (AC_CONFIG_FILES): Add .version.
2649 * build-aux/.cvsignore: Add git-version-gen.
2650
2651 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2652
2653 * NEWS (2.3a+): Mention that -g now takes an argument.
2654 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2655 consistency. Update the -g and -x entries now that they take
2656 arguments. Use brackets to indicate optional arguments.
2657 * src/getargs.c (usage): Explain the relationship between arguments of
2658 long and short options more completely. Document --defines and -d
2659 separately since the former takes an argument but, for POSIX Yacc, the
2660 latter does not.
2661 (short_options): Let -W take an optional argument like --warnings.
2662 (getargs): Sort cases.
2663
2664 2008-02-28 Akim Demaille <demaille@gostai.com>
2665
2666 * doc/bison.texinfo: Fix a few typos.
2667
2668 2008-02-28 Akim Demaille <akim@epita.fr>
2669
2670 * doc/bison.texinfo (Bison Options): Document -W.
2671 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2672
2673 2008-02-28 Akim Demaille <akim@epita.fr>
2674
2675 * src/getargs.c (short_options): Split and sort for readability.
2676 -g and -x take optional arguments, just like their long options.
2677 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2678 understand.
2679 Fix the handling of $opt which resulted in all the argument to be
2680 considered as optional.
2681
2682 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2683
2684 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2685 say its interface is experimental.
2686 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2687 Java.
2688 (Bison Options): In the -L and --language entry, mention Java.
2689 (Java Bison Interface): Say the interface is experimental.
2690 * src/getargs.c (usage): Mention -L and --language.
2691
2692 * NEWS (2.3a+): Say the push parsing interface is experimental.
2693 * doc/bison.texinfo (Push Decl): Likewise.
2694 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2695 (Push Parser Function): Likewise.
2696 (Pull Parser Function): Likewise.
2697 (Parser Create Function): Likewise.
2698 (Parser Delete Function): Likewise.
2699 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2700 yypull_parse, and yypush_parse entries.
2701
2702 * NEWS (2.3a+): Mention XML support, and say the schema is
2703 experimental.
2704 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2705 * src/getargs.c (usage): Say the XML schema is experimental.
2706
2707 * NEWS (2.3a+): Say option instead of flag.
2708
2709 2008-02-21 Wojciech Polak <polak@gnu.org>
2710
2711 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2712 text.
2713
2714 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
2715
2716 Fix impure push parser compile error reported by Bob Rossi at
2717 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
2718 * data/yacc.c: Clean up whitespace in the output a little.
2719 (yypstate_allocated): Define for impure push parsers regardless of
2720 whether the pull interface is also requested.
2721 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
2722 check impure push parsers without the pull interface.
2723
2724 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
2725 yyerror takes arguments specified by %parse-param while yypstate_new
2726 does not.
2727 * doc/bison.texinfo (Parser Create Function): Document that
2728 yypstate_new returns 0 for multiple impure parser instances.
2729 * tests/push.at (Push Parsing: Multiple impure instances): Update
2730 expected stderr output.
2731
2732 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2733
2734 * runtime-po/POTFILES.in (push.c): Remove.
2735
2736 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2737
2738 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
2739 * data/push.c: Rename to...
2740 * data/yacc.c: ... this, overwriting it.
2741 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
2742 `%push-pull-parser' -> `%define api.push_pull "both"'.
2743 Remove old yacc.c tests, and update push.c tests to yacc.c.
2744
2745 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2746
2747 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
2748 `"%code top" blocks' instead of `%code "top" blocks'.
2749 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
2750 Clean up whitespace in the output a little.
2751
2752 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2753
2754 Fix documentation problems reported by Tim Josling at
2755 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
2756 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
2757 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
2758 integers. Explain the effect of literal string aliases on error
2759 messages. Copy token 0 documentation from the C++ skeleton
2760 documentation.
2761
2762 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2763
2764 Accept a token number in a %left, %right, or %nonassoc for POSIX
2765 conformance. Reported by Tim Josling at
2766 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
2767 * NEWS (2.3a+): Mention.
2768 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
2769 and code numbers are treated by precedence declarations.
2770 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
2771 of symbols.1.
2772 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
2773 of symbol.
2774 (symbol.prec): New, just like symbol but allows INT.
2775 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
2776 longer holds.
2777 * tests/regression.at (Token number in precedence declaration): New
2778 test case.
2779
2780 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2781
2782 DJGPP specific issues.
2783 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
2784 be changed. Copyright timestamp adjusted.
2785 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
2786 be changed. Copyright timestamp adjusted.
2787 * djgpp/config.site: Copyright timestamp adjusted.
2788 * djgpp/config_h.sed: Copyright timestamp adjusted.
2789 * djgpp/djunpack.bat: Copyright timestamp adjusted.
2790 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
2791 filename translation list.
2792 * djgpp/subpipe.c (init_subpipe): Check the environment variables
2793 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
2794 files shall be created. Before trying to use the temp dir where the
2795 environment variable points to check that the dir really exists. If
2796 not default to the cwd as temp dir. Copyright timestamp adjusted.
2797 * djgpp/subpipe.h: Copyright timestamp adjusted.
2798 * djgpp/testsuite.sed: Copyright timestamp adjusted.
2799
2800 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
2801
2802 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
2803
2804 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
2805
2806 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
2807 Problem reported by Claudio Saavedra in
2808 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
2809
2810 2008-01-05 Wojciech Polak <polak@gnu.org>
2811
2812 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
2813 document's title with the input grammar file name.
2814
2815 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
2816
2817 Automate regression testing of the XML/XSLT implementation. Discussed
2818 starting at
2819 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
2820 * configure.ac (XSLTPROC): New substitution.
2821 * Makefile.am (maintainer-xml-check): New phony target invoking...
2822 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
2823 invoking make maintainer-check with BISON_TEST_XML=1.
2824 * tests/atlocal.in (XSLTPROC): New.
2825 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
2826 not to report reachable memory when Bison is expected to have a
2827 non-zero exit status and (2) to compare XML/XSLT output with --graph
2828 and --report=all output for every working grammar when
2829 BISON_TEST_XML=1.
2830 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
2831 (AT_BISON_CHECK_XML): New.
2832 (AT_QUELL_VALGRIND): New.
2833 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
2834 (AT_CHECK): ... don't redefine this since this was the old way to
2835 quell Valgrind.
2836 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
2837 AT_BISON_CHECK invocations.
2838 * tests/c++.at: Likewise.
2839 * tests/calc.at: Likewise.
2840 * tests/conflicts.at: Likewise.
2841 * tests/cxx-type.at: Likewise.
2842 * tests/existing.at: Likewise.
2843 * tests/glr-regression.at: Likewise.
2844 * tests/headers.at: Likewise.
2845 * tests/input.at: Likewise.
2846 * tests/java.at: Likewise.
2847 * tests/output.at: Likewise.
2848 * tests/push.at: Likewise.
2849 * tests/reduce.at: Likewise.
2850 * tests/regression.at: Likewise.
2851 * tests/sets.at: Likewise.
2852 * tests/skeletons.at: Likewise.
2853 * tests/synclines.at: Likewise.
2854 * tests/torture.at: Likewise.
2855 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
2856 tends to hang xsltproc.
2857 (Big horizontal): Likewise.
2858
2859 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2860
2861 In XML output, remove redundant class attribute on symbol element.
2862 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
2863 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
2864 look up a symbol to determine whether it's a nonterminal or terminal.
2865 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
2866 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
2867
2868 Add prec/assoc information to XML output.
2869 * src/gram.c (grammar_rules_print_xml): For each rule that has a
2870 %prec, add a percent_prec attribute.
2871 * src/print-xml.c (print_grammar): For each terminal that has a
2872 precedence or associativity, add a prec or assoc attribute.
2873 (xml_indent): New.
2874 (xml_puts): Use xml_indent.
2875 (xml_printf): Use xml_indent.
2876 * src/print-xml.h (xml_indent): Prototype.
2877
2878 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
2879 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2880
2881 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2882
2883 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
2884 (bison:ruleByNumber): ... this for clarity.
2885 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
2886 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
2887 (xsl:template match="reduction"): Update.
2888 (xsl:template match="item"): Update.
2889 (xsl:template match="reduction"): Update.
2890
2891 In the XML output, don't print the list of rules where symbols appear.
2892 Compute it in XSLT instead. Discussed at
2893 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
2894 * data/xslt/bison.xsl (bison:ruleByLhs): New.
2895 (bison:ruleByRhs): New.
2896 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
2897 bison:ruleByRhs.
2898 (xsl:template match="terminal/rule"): Remove.
2899 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2900 bison:ruleByRhs.
2901 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2902 Remove.
2903 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
2904 bison:ruleByRhs and mode="number-link" for rule template.
2905 (xsl:template match="terminal/rule"): Remove.
2906 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2907 bison:ruleByRhs and mode="number-link" for rule template.
2908 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2909 Rewrite as...
2910 (xsl:template match="rule" mode="number-link"): ... this.
2911 * src/print-xml.c (print_grammar): Don't print the list of rules.
2912
2913 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2914
2915 Don't let --report affect XML output; always print all information.
2916 Discussed at
2917 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
2918 * src/conflicts.c (log_resolution): Implement.
2919 * src/print-xml.c (print_core): Implement.
2920 (print_state): Implement.
2921 (print_xml): Implement.
2922
2923 * NEWS (2.3a+): Fix quotes.
2924 * src/parse-gram.y (prologue_declaration): For consistency with -v,
2925 don't let %verbose clear the list specified by --report.
2926
2927 2007-11-26 Akim Demaille <akim@epita.fr>
2928
2929 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
2930
2931 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
2932
2933 In the XML output, list useless and unused symbols and rules with the
2934 useful ones and add a "usefulness" attribute. Discussed starting at
2935 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
2936 * src/gram.c (grammar_rules_partial_print_xml): Remove.
2937 (grammar_rules_print_xml): Print all rules instead of just those
2938 useful in the grammar, and add a "usefulness" attribute.
2939 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
2940 * src/print-xml.c (print_rules_useless_in_parser): Remove.
2941 (print_grammar): Print all nonterminals instead of just useful ones,
2942 and add a "usefulness" attribute to nonterminals and terminals.
2943 (print_xml): Don't print a separate "reductions" or
2944 "rules-useless-in-parser" element.
2945 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
2946 (reduce_xml): Remove.
2947 (reduce_token_unused_in_grammar): New.
2948 (reduce_nonterminal_useless_in_grammar): New.
2949 * src/reduce.h (reduce_xml): Remove prototype.
2950 (reduce_token_unused_in_grammar): Add prototype.
2951 (reduce_nonterminal_useless_in_grammar): Add prototype.
2952 * data/xslt/xml2text.xsl: Update for XML changes.
2953 * data/xslt/xml2xhtml.xsl: Update for XML changes.
2954 * tests/reduce.at (Useless Terminals): Update output.
2955 (Useless Rules): Update output.
2956 (Reduced Automaton): Update output.
2957
2958 Say "Terminals unused in grammar" instead of "Unused terminals".
2959 * NEWS (2.3a+): Update.
2960 * doc/bison.texinfo (Understanding): Update example output.
2961 * src/reduce.c (reduce_output): Implement.
2962 * data/xslt/xml2text.xsl: Implement.
2963 * data/xslt/xml2xhtml.xsl: Implement.
2964
2965 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2966
2967 Accept --report-file=FILE to override the default `.output' filename.
2968 * NEWS (2.3a+): Mention.
2969 * doc/bison.texinfo (Bison Options): Add an entry.
2970 * src/files.c (compute_output_file_names): Don't override
2971 spec_verbose_file if already set.
2972 * src/getargs.c (usage): Document --report-file.
2973 (REPORT_FILE_OPTION): New anonymous enum member.
2974 (long_options): Add entry for it.
2975 (getargs): Add case for it setting spec_verbose_file.
2976
2977 * build-aux/cross-options.pl: Don't record a short option just because
2978 there's an arg.
2979 * doc/.cvsignore: Add yacc.1.
2980
2981 2007-11-14 Akim Demaille <akim@epita.fr>
2982
2983 * doc/yacc.1.in: New.
2984 * configure.ac, doc/Makefile.am: Adjust.
2985 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
2986 config.h symbol.
2987 Use AC_SUBST for assignments too.
2988 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
2989
2990 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2991
2992 * src/gram.c: Remove comments that duplicate comments in gram.h.
2993
2994 When reporting useless rules and nonterminals, say "useless in grammar"
2995 instead of "useless", and say "useless in parser" instead of "never
2996 reduced". Discussed starting at
2997 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
2998 * NEWS (2.3a+): Mention this change.
2999 * data/xslt/xml2text.xsl: Update output text and expected input XML
3000 element names to match changes below.
3001 * data/xslt/xml2xhtml.xsl: Likewise.
3002 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3003 Contents: "Rules useless in parser due to conflicts".
3004 * doc/bison.texinfo (Decl Summary): Reword a little.
3005 (Understanding): Update example output for changes below.
3006 * src/gram.c: (rule_useful_p): Rename to...
3007 (rule_useful_in_grammar_p): ... this.
3008 (rule_useless_p): Rename to...
3009 (rule_useless_in_grammar_p): ... this.
3010 (rule_never_reduced_p): Rename to...
3011 (rule_useless_in_parser_p): ... this.
3012 (grammar_rules_print): Update for renames.
3013 (grammar_rules_print_xml): Update for renames.
3014 (grammar_rules_never_reduced_report): Rename to...
3015 (grammar_rules_useless_report): ... this since it is used for either
3016 kind of useless rule.
3017 * src/gram.h: Reword comments and update function names in prototypes.
3018 * src/main.c (main): Say "rule useless in parser due to conflicts".
3019 * src/print-xml.c (print_rules_never_reduced): Rename to...
3020 (print_rules_useless_in_parser): ... this, and rename output XML
3021 element "rules-never-reduced" to "rules-useless-in-parser".
3022 (print_xml): Update for rename.
3023 * src/print.c (print_results): Say "Rules useless in parser due to
3024 conflicts".
3025 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3026 (nonterminals_reduce): Say "nonterminal useless in grammar".
3027 (reduce_output): Say "Nonterminals useless in grammar".
3028 Say "Rules useless in grammar".
3029 (reduce_xml): Rename output XML element "useless" to
3030 "useless-in-grammar".
3031 (reduce_print): Don't report the count of grammatically useless rules
3032 as "rules never reduced" just because %yacc is specified.
3033 In the correct report of this count, say nonterminal(s) and rule(s)
3034 "useless in grammar".
3035 * tests/conflicts.at (S/R in initial): Update expected output.
3036 (Defaulted Conflicted Reduction): Likewise.
3037 (Unreachable States After Conflict Resolution): Likewise.
3038 * tests/existing.at (GNU pic Grammar): Likewise.
3039 * tests/reduce.at (Useless Nonterminals): Likewise.
3040 (Useless Rules): Likewise.
3041 (Reduced Automaton): Likewise.
3042 (Underivable Rules): Likewise.
3043 (Empty Language): Likewise.
3044
3045 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3046
3047 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3048 here document and before the EOF so that BSD's implementation of Bourne
3049 shell doesn't parse the delimiter as part of the here document.
3050 * doc/.cvsignore: Add cross-options.texi.
3051 * src/getargs.c (usage): Add a blank line after the warning categories.
3052
3053 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
3054
3055 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3056
3057 2007-11-05 Akim Demaille <akim@epita.fr>
3058
3059 Remove Id: from bison.1.
3060 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3061 (perl -0777 -pi -e 's/\.PP\nId): New.
3062 (.x.1): Use it to ignore the version control revision.
3063
3064 2007-11-05 Akim Demaille <demaille@gostai.com>
3065
3066 * build-aux/Makefile.am: Ship cross-options.pl.
3067 * doc/Makefile.am: Always refer to cross-options.texi with
3068 $(srcdir).
3069 (MAINTAINERCLEANFILES): Add it.
3070
3071 2007-11-04 Akim Demaille <demaille@gostai.com>
3072
3073 Generate the long/short option cross-table.
3074 * build-aux/cross-options.pl: New.
3075 * doc/Makefile.am (cross-options.texi): New.
3076 * doc/bison.texinfo: Use it.
3077
3078 2007-11-04 Akim Demaille <demaille@gostai.com>
3079
3080 Generate bison.1 using help2man.
3081 * doc/common.x, doc/bison.x: New.
3082 * doc/Makefile.am (bison.1, .x.1): New.
3083 The code is taken from autoconf-2.61/man/Makefile.am.
3084 * configure.ac: Look for help2man.
3085
3086 2007-11-04 Akim Demaille <demaille@gostai.com>
3087
3088 Complete --help.
3089 * src/getargs.c (usage): Document -W, make it clear that -d,
3090 -g and -x have optional arguments.
3091
3092 2007-11-04 Akim Demaille <demaille@gostai.com>
3093
3094 Find sha1sum when named gsha1sum.
3095 * bootstrap (find_tool): New.
3096 ($SHA1SUM): New.
3097
3098 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3099
3100 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3101 at
3102 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3103 * NEWS (2.3a+): Mention.
3104 * data/bison.m4 (b4_pure_if): Don't define it here.
3105 * data/c.m4 (b4_identification): Depend on individual skeletons to
3106 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3107 values of the %define variables api.pure or api.push_pull. Define
3108 YYPURE, YYPUSH, and YYPULL accordingly.
3109 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3110 glr.cc has already defined b4_pure_flag.
3111 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3112 Remove YYPUSH and YYPULL since they're back in b4_identification again.
3113 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
3114 * doc/bison.texinfo (Pure Decl): Update.
3115 (Push Decl): Update.
3116 (Decl Summary): Add api.pure to %define entry.
3117 In %pure-parser entry, say it's deprecated and reference %define.
3118 (Pure Calling): Update.
3119 (Error Reporting): Update.
3120 (C++ Scanner Interface): Update.
3121 (How Can I Reset the Parser): Update.
3122 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3123 reference %define.
3124 * src/getargs.c (pure_parser): Remove global variable.
3125 * src/getargs.h (pure_parser): Remove extern.
3126 * src/output.c (prepare): Don't define pure_flag muscle.
3127 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3128 wrapper around `%define api.pure'.
3129 * tests/calc.at (Simple LALR Calculator): Update.
3130 (Simple GLR Calculator): Update.
3131 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3132 Update.
3133 (GLR: Resolve ambiguity, pure, locations): Update.
3134 (GLR: Merge conflicting parses, pure, no locations): Update.
3135 (GLR: Merge conflicting parses, pure, locations): Update.
3136 * tests/glr-regression.at (Uninitialized location when reporting
3137 ambiguity): Update
3138 * tests/input.at (Unused %define api.pure): New test case.
3139 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3140 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3141 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3142
3143 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3144
3145 %define push_pull -> %define api.push_pull. Discussed starting at
3146 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3147 * data/push.c: Expect the new name.
3148 * data/yacc.c: Likewise.
3149 * doc/bison.texinfo (Push Decl): Update.
3150 (Decl Summary): Update %define entry.
3151 (Push Parser Function): Update.
3152 (Pull Parser Function): Update.
3153 (Parser Create Function): Update.
3154 (Parser Delete Function): Update.
3155 * tests/calc.at (Simple LALR Calculator): Update.
3156 * tests/input.at (%define enum variables): Update.
3157 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3158 (Push Parsing: Multiple impure instances): Update.
3159 (Push Parsing: Unsupported Skeletons): Update.
3160 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3161 (Exploding the Stack Size with Malloc): Update.
3162
3163 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3164 other entries some.
3165
3166 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3167
3168 For the XML output's terminal element, rename @number to @token-number,
3169 and add @symbol-number. In the nonterminal element, rename @number to
3170 @symbol-number. Discussed starting at
3171 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3172 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3173 renames.
3174 (xsl:template match="nonterminal"): Likewise.
3175 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3176 (xsl:template match="nonterminal"): Likewise.
3177 * src/print-xml.c (print_grammar): Implement.
3178
3179 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3180
3181 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3182 2007-10-11 change, the child elements here are items not rules.
3183 (xsl:template match="item"): New.
3184 (xsl:template match="rule"): Update for new reduced itemset.
3185 (xsl:template match="point"): Remove.
3186 (xsl:template match="empty"): For consistency with --graph, don't
3187 output "/* empty */".
3188 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3189 line-wrap, don't pass a negative value as first-line-length since this
3190 won't work with the following changes.
3191 (xsl:template name="line-wrap"): Simplify slightly.
3192 (xsl:template name="ws-search"): Eliminate recursion.
3193 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3194 set next to an item whose dot is not at the end of the RHS even if it
3195 happens to be associated with the same rule.
3196
3197 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3198
3199 Add %define lr.keep_unreachable_states.
3200 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3201 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3202 * src/main.c (main): Implement it.
3203 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3204 Extend to test it, and fix a typo.
3205
3206 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3207
3208 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
3209 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3210 the example .output text.
3211 * tests/regression.at (Extra lookahead sets in report): Improve wording
3212 of comments.
3213
3214 2007-10-17 Wojciech Polak <polak@gnu.org>
3215
3216 * src/print-xml.c (print_grammar): Renamed
3217 <terminal> and <nonterminal> attributes:
3218 "type" to "number" and "symbol" to "name".
3219 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3220 Use new attribute names.
3221 (xsl:template match="nonterminal"): Likewise.
3222 * data/xslt/xml2xhtml.xsl: Likewise.
3223
3224 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3225
3226 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3227 (Option Cross Key): Likewise.
3228
3229 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3230 next to an item whose dot is not at the end of the RHS even if it
3231 happens to be associated with the same rule.
3232 * src/print.c (print_core): Likewise.
3233 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3234 (Resolved SR Conflicts): Update output.
3235 * tests/regression.at (Extra lookahead sets in report): New test case.
3236
3237 2007-10-11 Wojciech Polak <polak@gnu.org>
3238
3239 * src/print-xml.c (print_core): Remove item set
3240 redundancy.
3241 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3242 Improve processing time. Suggested by Joel E. Denny.
3243 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3244 Write xsl:param "required" attribute as comment.
3245 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3246 (xsl:template match="rule"): Support new reduced itemset.
3247 (xsl:template match="point"): Remove.
3248 * data/xslt/xml2xhtml.xsl: Likewise.
3249
3250 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3251
3252 * src/getargs.c (version): Update copyright year.
3253
3254 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3255
3256 Make xml2dot.xsl and --graph produce the same output.
3257 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
3258 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3259 escaped later.
3260 (xsl:template name="output-node"): Use the new escape template instead
3261 of the string-replace template directly.
3262 (xsl:template name="output-edge"): Likewise.
3263 (xsl:template name="escape"): New, escapes backslashes and newlines in
3264 addition to quotation marks.
3265 * src/graphviz.c (start_graph, output_node, output_edge): Add
3266 whitespace to output for legibility.
3267
3268 Make xml2text.xsl and --report produce the same output, and remove the
3269 XML "conflicts" element since a conflict summary is easily extracted
3270 from the automaton.
3271 * data/xslt/bison.xsl: New.
3272 (xsl:template match="state" mode="bison:count-conflicts): New.
3273 * data/xslt/xml2text.xsl: Import bison.xsl.
3274 (xsl:template match="bison-xml-report"): Instead of styling the
3275 "conflicts" element, style the "automaton" element with mode
3276 "conflicts". Unlike the former, the latter lists S/R and R/R
3277 conflicts for a state on the same line.
3278 (xsl:template match="conflicts"): Remove.
3279 (xsl:template match="conflict"): Remove.
3280 (xsl:template match="terminal"): Line-wrap the list of rules in which
3281 the terminal is used.
3282 (xsl:template match="nonterminal"): Likewise for nonterminals.
3283 (xsl:template match="automaton" mode="conflicts"): New.
3284 (xsl:template match="state" mode="conflicts"): New.
3285 (xsl:template name="line-wrap"): New.
3286 (xsl:template name="ws-search"): New.
3287 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3288 (xsl:template match="bison-xml-report"): Instead of styling the
3289 "conflicts" element, style the "automaton" element with mode
3290 "conflicts."
3291 (xsl:template match="conflicts"): Remove.
3292 (xsl:template match="conflict"): Remove.
3293 (xsl:template match="automaton" mode="conflicts"): New.
3294 (xsl:template match="state" mode="conflicts): New.
3295 * src/conflicts.c (conflicts_output_xml): Remove.
3296 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3297 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3298 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3299 the corresponding XSLT is easier. Also, never wrap between a word and
3300 the comma that follows it.
3301
3302 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3303
3304 Improve C++ namespace support. Discussed starting at
3305 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3306 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3307 b4_namespace_close): New macros that interpret the %define variable
3308 "namespace" so its value can contain "::" to indicate nested
3309 namespaces.
3310 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3311 the above macros.
3312 * data/lalr1.cc (b4_namespace): Likewise.
3313 * data/location.cc (b4_namespace): Likewise.
3314 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3315 inside a new table in the general %define entry. Document `%define
3316 namespace' there as well. Point the %name-prefix entry to it since it
3317 explains it more completely in the case of C++.
3318 (C++ Bison Interface): Mention `%define namespace' instead of
3319 %name-prefix.
3320 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3321 entry suffices.
3322 * tests/c++.at (Relative namespace references): New test case.
3323 (Absolute namespace references): New test case.
3324 (Syntactically invalid namespace references): New test case.
3325 * tests/input.at (C++ namespace reference errors): New test case.
3326
3327 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3328
3329 Add syncline support and location accessor to internal %define
3330 interfaces.
3331 * data/bison.m4 (b4_percent_define_get_loc): New.
3332 (b4_percent_define_get_syncline): New.
3333 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3334 (b4_percent_define_default): Record defining location as line 1 rather
3335 than 0 for the sake of synchronizing #line's, and define
3336 b4_percent_define_syncline(VARIABLE).
3337 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3338 * src/muscle_tab.c (muscle_syncline_grow): New.
3339 (muscle_code_grow): Use muscle_syncline_grow.
3340 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3341 define b4_percent_define_syncline(VARIABLE).
3342 (muscle_percent_define_get_loc): New.
3343 (muscle_percent_define_get_syncline): New.
3344 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3345 remove some unused variables.
3346 (muscle_percent_define_default): Record defining location as line 1
3347 rather than 0 for the sake of synchronizing #line's, and define
3348 b4_percent_define_syncline(VARIABLE).
3349 (muscle_percent_define_check_values): Use
3350 muscle_percent_define_get_loc.
3351 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3352 (muscle_percent_define_get_syncline): Prototype.
3353 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3354 defaults): Update output for location change.
3355 (Complaining during macro argument expansion): Extend to test
3356 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3357
3358 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3359
3360 Fix some error-reporting macro bugs.
3361 * data/bison.m4 (b4_cat): New.
3362 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3363 to stdout so they don't become arguments to other macros. Update
3364 comments and add examples.
3365 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3366 add examples.
3367 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3368 after printing the error directive so that M4 doesn't report subsequent
3369 problems that are induced by this problem.
3370 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3371 instead of just in them. Recognize @\n in both places. Both expand to
3372 the empty string. Needed by b4_cat.
3373 * tests/skeletons.at (Complaining during macro argument expansion):
3374 New test case.
3375 (Fatal errors make M4 exit immediately): New test case.
3376
3377 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3378
3379 Implement --print-datadir.
3380 * src/getargs.c (usage): Mention.
3381 (PRINT_DATADIR_OPTION): New anonymous enum member.
3382 (long_options): Add entry for it.
3383 (getargs): Add case for it calling compute_pkgdatadir.
3384 * src/output.c (output_skeleton): Encapsulate data directory
3385 computation from here...
3386 (prepare): ... and from here...
3387 (compute_pkgdatadir): ... into this new function.
3388 * src/output.h (compute_pkgdatadir): Prototype.
3389
3390 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3391
3392 * src/print-xml.c (escape_bufs): New static global variable
3393 replacing...
3394 (xml_escape_n): ... the static local variable buf here.
3395 (print_xml): Free memory for escape_bufs.
3396 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3397
3398 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3399
3400 Replace `%push-parser' and `%push-pull-parser' with
3401 `%define push_pull "push"' and `%define push_pull "both"'.
3402 `%define push_pull "pull"' is the default.
3403 * doc/bison.texinfo (Push Decl, Push Parser Function,
3404 Pull Parser Function, Parser Create Function, Parser Delete Function):
3405 Update declarations.
3406 (Decl Summary, Table of Symbols): Replace %push-parser and
3407 %push-pull-parser entries with a %define push_pull entry.
3408 * data/bison.m4 (b4_percent_define_check_values): New macro.
3409 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3410 definitions...
3411 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3412 definitions...
3413 * data/push.c: ... to here and compute them from the value of the
3414 %define variable push_pull.
3415 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3416 parsing requests here...
3417 * data/yacc.c: ... hack this to switch to push.c any time
3418 b4_use_push_pull_flag or the %define variable push_pull is set. This
3419 will go away when we mv push.c yacc.c.
3420 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3421 push parsing is not supported since unused %define variables are
3422 reported anyway.
3423 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3424 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3425 comments for consistency with b4_percent_define_check_values.
3426 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3427 muscles.
3428 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3429 Remove.
3430 (prologue_declaration): Remove %push-parser and %push-pull-parser
3431 rules.
3432 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3433 * tests/calc.at: Update declarations.
3434 * tests/input.at (%define enum variables): New test case.
3435 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3436 declaration.
3437 (Push Parsing: Multiple impure instances): Update declaration.
3438 (Push Parsing: Unsupported Skeletons): New test case.
3439 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3440 declaration.
3441 (Exploding the Stack Size with Malloc): Update declaration.
3442
3443 2007-09-24 Wojciech Polak <polak@gnu.org>
3444
3445 Add XSLT transformations.
3446
3447 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3448 * data/xslt/xml2text.xsl: Transform XML into plain text.
3449 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3450 * data/Makefile.am (xsltdir): New variable.
3451 (dist_xslt_DATA): Add xslt/*.xsl files.
3452
3453 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3454
3455 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3456 Problem reported by Wojciech Polak.
3457 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3458 (xml_printf): Undo change I made on 21 September; that is,
3459 indent 2 spaces, not 1.
3460
3461 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3462
3463 Pacify ./configure --enable-gcc-warnings.
3464 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3465 `char const *' instead of `char *'.
3466 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3467 local variable `sep'.
3468
3469 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3470
3471 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3472 elsewhere.
3473 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3474 (xml_printf): Indent just 1 space for level.
3475 (e_char, xlate_char): Remove.
3476 (xml_escape_string): Rewrite to avoid undefined behavior (used
3477 storage that was freed from the stack).
3478 (xml_escape_n): Don't bother checking for subscript error.
3479
3480 2007-09-21 Wojciech Polak <polak@gnu.org>
3481
3482 Add Bison XML Automaton Report.
3483
3484 Add support for an -x option to generate an XML report.
3485 It is not documented yet.
3486 * src/print-xml.c: New file.
3487 * src/print-xml.h: Likewise.
3488 * lib/timevar.def (TV_XML): New var.
3489 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3490 * src/conflicts.c: Include print-xml.h.
3491 (solved_conflicts_xml_obstack): New var.
3492 (log_resolution, conflicts_solve, conflicts_free):
3493 Add support for XML report.
3494 (conflicts_output_val): New function.
3495 * src/conflicts.h (conflicts_output_val): New decl.
3496 * src/files.c (spec_xml_file): New var.
3497 (compute_output_file_names, output_file_names_free): Add XML support.
3498 * src/files.h (spec_xml_file): New decl.
3499 * src/getargs.c (xml_flag): New var.
3500 (usage, short_options, long_options, getargs): Add XML support.
3501 * src/getargs.h (xml_flag): New decl.
3502 * src/gram.c: Include print-xml.h.
3503 (rule_lhs_print_xml, rule_rhs_print_xml):
3504 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3505 New functions.
3506 * src/gram.h: Declare external ones.
3507 * src/main.c: Include print-xml.h.
3508 (main): Add XML support.
3509 * src/reduce.c: Include print-xml.h.
3510 (reduce_xml): New function.
3511 * src/reduce.h: Declare it.
3512 * src/state.c: Include print-xml.h.
3513 (state_new): Add XML support.
3514 (state_rule_lookahead_tokens_print_xml): New function.
3515 * src/state.h: Declare it.
3516 (struct state): New member solved_conflicts_xml.
3517 * src/symtab.c (symbol_class_get_string): New function.
3518 * src/symtab.h: Declare it.
3519
3520 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3521
3522 * GNUmakefile: Switch to coreutils's version.
3523 * bootstrap: Likewise.
3524 * Makefile.cfg: Adjust to new GNUmakefile.
3525 * README-hacking: Likewise.
3526
3527 Import from gnulib:
3528
3529 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3530 Bruno Haible <bruno@clisp.org>
3531
3532 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3533 and is a script that invokes bison. Tighten the code. Add comments.
3534
3535 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3536
3537 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3538 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3539 * doc/bison.texinfo (Decl Summary): Fix.
3540 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3541 * tests/input.at (Boolean %define variables): Update output.
3542 * tests/skeletons.at (%define boolean variables: invalid skeleton
3543 defaults): Rename to...
3544 (%define Boolean variables: invalid skeleton defaults): ... this and
3545 update output.
3546
3547 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3548
3549 In impure push mode, don't allow more than one yypstate to be allocated
3550 since multiple impure parsers would corrupt yynerrs.
3551 * data/push.c (yypstate_allocated): New static global variable
3552 initialized to 0.
3553 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3554 exhaustion if yypstate_allocated is 1, but still return 2.
3555 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3556 already 1. Otherwise, set it to 1.
3557 (yypstate_delete): Set it to 0.
3558 * tests/push.at (Push Parsing: Multiple impure instances): New test
3559 case.
3560
3561 2007-08-17 Bob Rossi <bob@brasko.net>
3562
3563 * doc/bison.texinfo (Push Decl): Document the push parser.
3564 (Table of Symbols): Ditto.
3565 (Pure Decl): Ditto.
3566 (Decl Summary): Ditto.
3567 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3568 Parser Create Function, Parser Delete Function):
3569 Add new push parser symbols.
3570 (Table of Symbols): Document push-parser, push-pull-parser,
3571 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3572
3573 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3574
3575 Update to GPLv3.
3576 * doc/gpl-3.0.texi: New file.
3577 * doc/gpl.texi: Remove.
3578 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3579 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3580 * README-hacking, TODO, bootstrap, bootstrap.conf:
3581 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3582 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3583 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3584 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3585 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3586 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3587 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3588 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3589 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3590 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3591 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3592 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3593 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3594 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3595 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3596 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3597 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3598 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3599 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3600 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3601 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3602 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3603 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3604 * src/complain.c, src/complain.h, src/conflicts.c:
3605 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3606 * src/files.h, src/flex-scanner.h, src/getargs.c:
3607 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3608 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3609 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3610 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3611 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3612 * src/print.c, src/print.h, src/print_graph.c:
3613 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3614 * src/reduce.h, src/relation.c, src/relation.h:
3615 * src/revision.h, src/scan-code.h, src/scan-code.l:
3616 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3617 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3618 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3619 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3620 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3621 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3622 * tests/existing.at, tests/glr-regression.at:
3623 * tests/headers.at, tests/input.at, tests/java.at:
3624 * tests/local.at, tests/output.at, tests/push.at:
3625 * tests/reduce.at, tests/regression.at, tests/sets.at:
3626 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3627 * tests/torture.at:
3628 Update to GPLv3.
3629
3630 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3631
3632 Get rid of broken %no-parser, -n, and --no-parser implementation and
3633 documentation.
3634 * TODO: Don't mention them.
3635 * doc/bison.1: Likewise.
3636 * doc/bison.texinfo (Decl Summary): Likewise.
3637 (Bison Options): Likewise.
3638 (Option Cross Key): Likewise.
3639 * src/getargs.c (no_parser_flag): Remove global variable.
3640 (usage): Don't print description of -n and --no-parser.
3641 (long_options): Remove --no-parser entry here.
3642 (getargs): Remove -n case in the switch here.
3643 * src/getargs.h (no_parser_flag): Remove extern.
3644 * tests/regression.at (Web2c Actions): Remove comment that mentions
3645 --no-parser.
3646
3647 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3648
3649 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3650 name user variables starting with `yy'. Just pass NULL instead of a
3651 dummy local &yylval to yypush_parse.
3652 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3653 starting with `yy'.
3654
3655 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3656
3657 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3658 true since it's then always used regardless of whether yyoverflow is
3659 defined. Reported by Christian Burger at
3660 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3661 * THANKS: Add Christian Burger.
3662
3663 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3664 node names: say "Decl Summary" not "Bison Declaration Summary".
3665
3666 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3667
3668 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3669 determine whether this function has already complained about an invalid
3670 value for a %define boolean variable, don't check whether Bison has
3671 ever examined the value. As written, the check was a tautology.
3672 Instead, record and check for this complaint using a separate muscle.
3673
3674 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3675
3676 Fix push parsing memory leak reported by Brandon Lucia at
3677 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3678 * THANKS: Add Brandon Lucia.
3679 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3680 but the parse never completed and thus freed it.
3681 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3682 * tests/testsuite.at: Include push.at.
3683 * test/push.at: New.
3684 (Push Parsing: Memory Leak for Early Deletion): New test case.
3685
3686 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3687
3688 Improve handling of multiple S/R conflicts in the same state and of S/R
3689 conflicts involving multiple reductions.
3690 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3691 set for a state here or Bison will abort if it is reassigned on a
3692 later conflicted reduction in the same state.
3693 Similarly, don't finalize and assign the solved conflicts report here
3694 or it will be lost if it is reassigned on a later conflicted reduction
3695 in the same state.
3696 (set_conflicts): Instead, assign them both here after all S/R conflicts
3697 in the state have been fully examined.
3698 * src/print.c (shift_set): Rename to...
3699 (no_reduce_set): ... this.
3700 (print_reductions): Update for rename, and add %nonassoc error action
3701 tokens to no_reduce_set so that, when printing the first remaining
3702 reduction on an error action token, the reduction is enclosed in
3703 brackets.
3704 (print_results): Update for rename.
3705 * tests/conflicts.at (Solved conflicts report for multiple reductions
3706 in a state): New test case.
3707 (%nonassoc error actions for multiple reductions in a state): New test
3708 case.
3709
3710 * src/main.c (main): Don't depend on C99 features.
3711
3712 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3713
3714 * build-aux/.cvsignore: Add compile.
3715 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
3716 uniwidth.
3717
3718 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
3719
3720 * bootstrap (slurp): Create target directories that don't exist.
3721 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
3722
3723 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3724
3725 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
3726 than item number.
3727 * closure.c (closure): Likewise.
3728 * state.h (reductions): Comment sorting of rules.
3729 (state): Comment sorting of items.
3730
3731 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
3732
3733 Fix C++ test cases after recent Gnulib changes. Discussed starting at
3734 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
3735 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
3736 definition in order to avoid Gnulib headers since we don't use config.h
3737 here.
3738 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
3739 rather than AT_DATA so that config.h is included.
3740
3741 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
3742
3743 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
3744 instead of fprintf. Guard these functions with #if YYDEBUG instead of
3745 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
3746 and so that YYFPRINTF is guaranteed to be defined here.
3747
3748 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3749
3750 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
3751 with...
3752 (muscle_percent_define_check_values): ... this more helpful function.
3753 Again, it's not used yet, but it will be.
3754 * src/muscle_tab.h: Likewise.
3755
3756 Improve some comments in parser table construction.
3757 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
3758 (generate_states): Don't mention ruleset, which is internal to closure.
3759 * src/closure.c (closure): Explain sorting of core and itemset, which
3760 is required for this function to behave correctly.
3761 * src/closure.h (closure): Mention sorting.
3762
3763 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
3764
3765 * src/lalr.c (state_lookahead_tokens_count): For code readability,
3766 move the check for disabled transitions to an aver since conflict
3767 resolution hasn't happened yet.
3768
3769 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
3770 labels a state as inconsistent just because it has error transitions.
3771 The original form of this check appeared in revision 1.1 of lalr.c,
3772 which was committed on 1991-12-21. Now (at least), changing the
3773 consistency label on such a state appears to have no useful effect in
3774 any of the places it is examined, which I enumerate below. The key
3775 point to understanding each item in this enumeration is that a state
3776 with an error transition is labelled consistent in the first place only
3777 if it has no rules, so the check cannot matter for states that have
3778 rules. (1) Labelling a state as inconsistent will cause set_conflicts
3779 to try to identify its conflicts, and a state must have *rules* to have
3780 conflicts. (2) Labelling a state as inconsistent will affect how
3781 action_row sets the default *rule* for the state. (3) Labelling a
3782 state as inconsistent will cause build_relations to add lookback edges
3783 to *rules* in that state.
3784 * src/state.h (struct state): Word the comment for member consistent
3785 more carefully.
3786
3787 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3788
3789 Don't depend on C99 features.
3790 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
3791 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
3792 * src/reader.c (check_and_convert_grammar): Fix for-loop.
3793 * src/state.c (state_mark_reachable_states): Fix for-loop.
3794 (state_remove_unreachable_states): Fix for-loop.
3795
3796 Don't widen struct state with member reachable just to temporarily
3797 record reachability. Instead, use a local bitset.
3798 * src/state.h (struct state): Remove member.
3799 * src/state.c (state_new): Don't initialize it.
3800 (state_mark_reachable_states): Rename to...
3801 (state_record_reachable_states): ... this, and use bitset.
3802 (state_remove_unreachable_states): Use bitset.
3803
3804 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
3805
3806 * src/Makefile.am (yacc): Quote target action commands properly so
3807 that the yacc script isn't corrupt. Reported by Hans Aberg at
3808 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
3809
3810 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
3811 the case of pure parsers. Reported by Frans Englich at
3812 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
3813 * THANKS: Add Frans Englich.
3814
3815 * NEWS (2.3a+): In the %code entry, reference section `Bison
3816 Declaration Summary' from the manual now since the %code summary has
3817 moved there.
3818 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
3819 in the rules section must be terminated by semicolons.
3820
3821 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
3822
3823 Extend the front-end API for %define variables to more completely
3824 mirror the back-end. This will be useful in the future.
3825 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
3826 Update comments to mention the new front-end counterparts of these
3827 macros.
3828 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
3829 for muscle_string_decode and muscle_location_decode.
3830 (muscle_string_decode): New static function.
3831 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
3832 (muscle_percent_define_get, muscle_percent_define_ifdef): New
3833 functions.
3834 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
3835 muscle_percent_define_get to mimic the b4_percent_define_flag_if
3836 implementation more closely.
3837 (muscle_percent_define_invalid_value): New function.
3838 * src/muscle_tab.h (muscle_percent_define_get,
3839 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
3840 Prototype.
3841
3842 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3843
3844 * NEWS (2.3a+): Mention yesterday's state-removal change.
3845 (2.3a): Remove the %language entry, which was added after 2.3a.
3846 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
3847 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
3848 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
3849 tests/existing.at: Update copyright date.
3850
3851 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3852
3853 If conflict resolution makes states unreachable, remove those states,
3854 report rules that are then unused, and don't report conflicts in those
3855 states.
3856 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
3857 New global function.
3858 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
3859 function.
3860 * src/main.c (main): After conflict resolution, remove the unreachable
3861 states and update all data structures that reference states by number.
3862 * src/state.c (state_new): Initialize each state's reachable member to
3863 false.
3864 (state_mark_reachable_states): New static function.
3865 (state_remove_unreachable_states): New global function.
3866 * src/state.h (struct state): Add member bool reachable.
3867 (state_remove_unreachable_states): Prototype.
3868 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3869 New test case.
3870 * tests/existing.at (GNU pic Grammar): Update test case output now that
3871 an unused rule is discovered.
3872
3873 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3874
3875 Minor code cleanup in parser table construction.
3876 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
3877 (new_itemsets, save_reductions): Update for rename to nitemset.
3878 * src/closure.c (nritemset): Rename to...
3879 (nitemset): ... this since the "r" appears to meaningless and isn't
3880 used in the comments.
3881 (closure): Update for rename.
3882 * src/closure.h (nritemset): Update extern to...
3883 (nitemset): ... this.
3884 * src/lalr.c (LA): Fix a typo in comments.
3885 * src/print.c (print_core): Update for rename to nitemset.
3886 * src/print_graph.c (print_graph): Likewise.
3887 * src/state.h: Fix some typos in header comments.
3888
3889 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
3890
3891 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
3892 still sticks to ASCII. Sorry!
3893
3894 * README-hacking: New file, taken mostly from coreutils, with changes
3895 for Bison. Contains much of the contents of:
3896 * README-cvs: Remove.
3897 * bootstrap: Sync from gnulib.
3898 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
3899 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
3900
3901 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
3902
3903 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
3904 Setzer.
3905 (Java Differences): Fix some typos.
3906 * THANKS: Add Sebastian Setzer.
3907
3908 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
3909
3910 * data/java.m4 (b4_single_class_if): Remove.
3911 (b4_abstract_if): Look at "%define abstract".
3912 (b4_lexer_if): New.
3913 (b4_union_name): Rename...
3914 (b4_yystype): ... to this. Map to "%define stype".
3915 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
3916 b4_maybe_throws): Fix quoting.
3917 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
3918 * data/lalr1.java (Lexer interface): Always define.
3919 (Lexer interface within parser class): Remove.
3920 (YYLexer class): New, used when "%code lexer" is present.
3921 (constructor): When "%code lexer" is used, pass %lex-param
3922 to the lexer constructor.
3923 (yylex, yyparse): Remove %lex-param from method invocations
3924 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
3925
3926 * doc/bison.texinfo (Java Bison Interface): Mention "%define
3927 abstract". Rename "%define union_name" to "%define stype".
3928 Rename method names according to previous patch.
3929 (Java Scanner Interface): Describe "%code lexer" instead of
3930 "%pure-parser" and "%define single_class".
3931 (Java Differences): Mention "%code lexer".
3932
3933 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
3934 Include scanner here, using macros from tests/local.at.
3935 (AT_DATA_CALC_Y): Remove final argument.
3936 (_AT_CHECK_JAVA_CALC): Likewise.
3937 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
3938 of %locations and %error-verbose.
3939 (main): Test with and without %lex-param.
3940 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
3941 (AT_BISON_OPTION_POPDEFS): Pop it.
3942
3943 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3944
3945 DJGPP spefic issue. Inhibit the use of disallowed characters for
3946 file name genertion on Win98, WinXP, etc. These are |<>":?*\
3947 and concern testsuite case 46.
3948 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
3949 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
3950 * djgpp/config.bat: Inhibit the use of disallowed characters.
3951
3952 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3953
3954 Miscellaneous %define and %code cleanup.
3955 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
3956 values are interpreted.
3957 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
3958 documentation a little more.
3959 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
3960 muscle_percent_define_insert, muscle_percent_code_grow): New
3961 functions/macros.
3962 * src/muscle_tab.h (muscle_percent_define_insert,
3963 muscle_percent_code_grow): Prototype.
3964 * src/parse-gram.y (prologue_declaration): Use
3965 muscle_percent_define_insert and muscle_percent_code_grow when parsing
3966 %define and %code directives.
3967
3968 Make it easy to share %define boolean variables between the front-end
3969 and back-end. Though not used yet, this will be useful in the future.
3970 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
3971 Bison uses of names rather than just skeleton uses of names.
3972 (b4_percent_define_get, b4_percent_define_ifdef): Rename
3973 b4_percent_define_skeleton_variables(VARIABLE) to
3974 b4_percent_define_bison_variables(VARIABLE).
3975 (b4_percent_code_get, b4_percent_code_ifdef): Rename
3976 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
3977 b4_percent_code_bison_qualifiers(QUALIFIER).
3978 (b4_check_user_names_wrap): Update for renames.
3979 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
3980 muscle_percent_define_default): New functions mimicking
3981 b4_percent_define_flag_if and b4_percent_define_default.
3982
3983 For %define variables, report locations for invalid values and
3984 redefinitions.
3985 * data/bison.m4 (b4_percent_define_flag_if): Read
3986 b4_percent_define_loc(VARIABLE) to report the location of an invalid
3987 value for VARIABLE.
3988 (b4_percent_define_default): Save a special location in
3989 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
3990 must later be reported as invalid.
3991 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
3992 functions.
3993 (muscle_percent_define_insert): Record the location of VARIABLE in
3994 muscle percent_define_loc(VARIABLE), and use it to report the previous
3995 location for a redefinition.
3996 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
3997 (muscle_percent_define_default): Update like b4_percent_define_default.
3998 (muscle_grow_user_name_list): Rename to...
3999 (muscle_user_name_list_grow): ... this for consistency and use
4000 muscle_location_grow.
4001 * src/muscle_tab.h (muscle_location_grow): Prototype.
4002 * tests/input.at (%define errors): Update expected output.
4003 * tests/skeletons.at (%define boolean variables: invalid skeleton
4004 defaults): New test case.
4005
4006 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4007
4008 * src/print.c (lookahead_set, state_default_rule): Remove.
4009 (print_reductions): Replace state_default_rule invocation with
4010 equivalent use of yydefact, which was computed in token_actions in
4011 tables.c.
4012 (print_results): Don't allocate lookahead_set.
4013
4014 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
4015
4016 * data/lalr1.java: Prefix all private members with yy.
4017
4018 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4019
4020 Use YYFPRINTF instead of fprintf where appropriate. Reported by
4021 Sebastien Fricker at
4022 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
4023 * THANKS: Add Sebastien Fricker.
4024 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4025 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4026 accept a variable number of arguments.
4027
4028 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4029
4030 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4031
4032 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4033
4034 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4035 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4036 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4037
4038 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4039
4040 Undo my 2007-02-07 change, switching back to the c-strcase module
4041 introduced in the 2007-02-03 change. Bruno Haible reported that
4042 the 2007-02-07 change would be dangerous in Turkish if we add a
4043 language whose name contains "i", since "i" is not lowercase "I"
4044 in Turkish.
4045 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4046 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4047 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4048 * m4/.cvsignore: Remove strcase.m4.
4049 * src/getargs.c: Revert 2007-02-07 change, as follows.
4050 Include c-strcase.h.
4051 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4052
4053 2007-02-11 Bruno Haible <bruno@clisp.org>
4054
4055 Enable the Java related testsuite tests when the only Java compiler
4056 found is a gcj < 4.3. Discussed at
4057 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4058 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4059
4060 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4061
4062 * data/Makefile.am: Update copyright date.
4063 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4064 yypstate_new returns NULL.
4065 (yypstate_new): Return NULL if malloc does.
4066 * src/reader.c (packgram): Move translation of rule actions from the
4067 beginning of packgram to...
4068 (check_and_convert_grammar): ... here right before packgram is invoked
4069 so it's easier to write more complete comments, and remove redundant
4070 code.
4071
4072 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4073
4074 As in semantic actions, make @$ in %initial-action, %destructor, and
4075 %printer imply %locations.
4076 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4077 scanning @$.
4078 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4079 (@$ in %initial-action implies %locations,
4080 @$ in %destructor implies %locations,
4081 @$ in %printer implies %locations): ... these new test cases.
4082
4083 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4084
4085 Undo most of the 2007-02-03 change, switching to the strcase module
4086 now that gnulib strcase has been fixed.
4087 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4088 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4089 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4090 * m4/.cvsignore: Add strcase.m4.
4091 * src/getargs.c: Revert 2007-02-03 change, as follows.
4092 Don't include c-strcase.h.
4093 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4094 strcasecmp has "unspecified behavior" outside the POSIX locale,
4095 but it works fine in practice if at least one argument is ASCII,
4096 as is the case in Bison.
4097
4098 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
4099
4100 * tests/java.at: Skip tests if only one of javac/java is present.
4101 Reported by Joel E. Denny.
4102 * tests/atlocal.in: Adjust copyright years.
4103
4104 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
4105
4106 * data/lalr1.java (Stack): Work around old verifiers that disallow
4107 access to the private fields of an inner class, from the outer class.
4108 We can make Stack's fields public because user code doesn't have access
4109 to the instance of Stack used by parse(). Reported by Paul Eggert.
4110
4111 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4112
4113 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4114 the right spot for these files?
4115 * bootstrap.conf (gnulib_modules): Add c-strcase.
4116 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4117 c-strncasecmp.c.
4118 * src/getargs.c: Include c-strcase.h.
4119 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4120 to avoid unspecified behavior.
4121
4122 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4123
4124 * doc/bison.texinfo (Decl Summary): Correct typo.
4125
4126 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
4127
4128 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4129 Complain if the value does not match empty, "true" or "false".
4130 * data/c++.m4: Adjust default definitions of %define variables.
4131 * data/java.m4: Adjust default definitions of %define variables.
4132 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4133 to above behavior.
4134 * tests/input.at (Boolean %define variables): Test new behavior.
4135
4136 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
4137
4138 * NEWS: Mention java.
4139 * TODO: Remove things that are done.
4140 * bootstrap.conf: Add javacomp-script and javaexec-script.
4141 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4142
4143 * data/Makefile.am: Add new files.
4144 * data/java-skel.m4: New.
4145 * data/java.m4: New.
4146 * data/lalr1.java: New.
4147
4148 * doc/bison.texinfo: Put "A Complete C++ Example" under
4149 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4150 under Other Languages.
4151
4152 * src/getargs.c (valid_languages): Add Java.
4153 * src/getargs.h (struct bison_language): Update size of string fields.
4154
4155 * tests/Makefile.am: Add java.at.
4156 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4157 * tests/java.at: New.
4158 * tests/testsuite.at: Include it.
4159
4160 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4161
4162 Clean up.
4163 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4164 at_directive_argv arguments so these no longer have to be global
4165 variables. Also, update the implementation for the following changes.
4166 (fail_for_at_directive_too_many_args,
4167 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4168 (at_directive_name): Remove as at_directive_argv[0] will be used for
4169 this now.
4170 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4171 for the directive name.
4172 (at_directive_argc, at_directive_argv): Make these local within
4173 skel_lex instead of global.
4174 (INITIAL): Update directive start action for above changes.
4175 (SC_AT_DIRECTIVE_ARG): Rename to...
4176 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4177 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4178 (scan_skel): Move yylex_destroy to...
4179 (skel_scanner_free): ... here.
4180 * tests/skeletons.at (installed skeleton file name): Rename to...
4181 (installed skeleton file names): ... this.
4182
4183 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4184
4185 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4186 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4187 Summary" not "Directives".
4188 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4189 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4190 since the former is now the more complete one.
4191 (Prologue Alternatives): Likewise and do the same for %defines.
4192 (Table of Symbols): Add summary of %code, add summary of %define, and
4193 move full %code documentation to...
4194 (Decl Summary): ... here for consistency with other entries in these
4195 sections.
4196 Move %define entry in order to keep this list alphabetized.
4197 Reword %define entry a little to put less emphasis on the skeleton
4198 concept, which most users shouldn't have to think about.
4199
4200 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4201
4202 Adjust to recent gnulib changes.
4203 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4204 Add string.h, string_.h, unistd_.h, wchar_.h.
4205 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4206 * src/system.h: Don't include <stpcpy.h>; this is now done by
4207 <string.h>.
4208
4209 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
4210
4211 Simplify implementation of unqualified %code, implement macros for
4212 uniform treatment of boolean %define flags. Document %define.
4213 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4214 b4_percent_code_ifdef): New.
4215 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4216 * data/c++.m4: Define default value for global_tokens_and_yystype.
4217 * data/glr.cc: Likewise.
4218 * data/location.cc: Use b4_percent_define_flag_if.
4219
4220 * doc/bison.texinfo (Decl Summary): Document %define.
4221
4222 * src/parse-gram.y (Unqualified %code): Change muscle name to
4223 b4_percent_code().
4224 (content.opt): Default to empty.
4225
4226 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4227
4228 Implement support for relative and absolute skeleton file names.
4229 Discussed starting at
4230 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4231 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4232 (Bison Options): Document in --skeleton entry.
4233 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4234 full_skeleton can't necessarily hold all of pkgdatadir.
4235 If the specified skeleton file name contains a `/', don't prepend
4236 pkgdatadir.
4237 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4238 file name contains a `/', prepend the grammar file directory.
4239 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4240 * skeletons.at: New file.
4241 (relative skeleton file names): New test case.
4242 (installed skeleton file names): New test case.
4243 * tests/testsuite.at: Include skeletons.at.
4244
4245 * bootstrap: Update copyright to 2007.
4246
4247 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
4248
4249 * bootstrap: Remove occurrences of .#bootmp from the files.
4250
4251 2007-01-17 Akim Demaille <akim@epita.fr>
4252
4253 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4254 nonterminals.
4255 Use per-type %printer.
4256
4257 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4258
4259 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4260 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4261 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4262 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4263 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4264 tests/glr-regression.at, tests/input.at, tests/local.at,
4265 tests/output.at, tests/torture.at: Update copyright to 2007.
4266
4267 2007-01-16 Akim Demaille <akim@epita.fr>
4268
4269 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4270 error code.
4271 (Calc++ Scanner): Exit with failure if we can't open the input
4272 file.
4273 Accept "-" standing for stdin.
4274 (Calc++ Top Level): Print the result only if the parsing was
4275 successful.
4276
4277 2007-01-16 Akim Demaille <akim@epita.fr>
4278
4279 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4280
4281 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
4282 and Joel E. Denny <jdenny@ces.clemson.edu>
4283
4284 Clean up %define and %code implementation in M4 some. Most
4285 importantly, rename all related macros to be in the b4_percent_define
4286 and b4_percent_code namespaces. Also, complete support for `.' in
4287 %define variable names and %code qualifiers.
4288 * data/bison.m4 (b4_check_user_names): Check for special
4289 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4290 m4_foreach loops.
4291 (b4_get_percent_define, b4_get_percent_code): Rename to...
4292 (b4_percent_define_get, b4_percent_code_get): ... these.
4293 Extend documentation with examples.
4294 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4295 b4_percent_define_skeleton_variables and
4296 b4_percent_code_skeleton_qualifiers.
4297 Expect any value for the %define variable `foo' to be stored in the
4298 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4299 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4300 expect any unqualified %code blocks to be stored in a macro named
4301 `b4_percent_code_unqualified'.
4302 Use m4_indir so that %define variable names and %code qualifiers can
4303 contain `.', which is allowed by the grammar parser.
4304 (b4_percent_define_default): New macro to set a default value for a
4305 %define variable.
4306 (m4_wrap): Update wrapped code, and fix some underquoting.
4307 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4308 Expect grammar uses of %define variables and %code qualifiers to be
4309 defined in b4_percent_define_user_variables and
4310 b4_percent_code_user_qualifiers.
4311 * data/c++.m4: Use b4_percent_define_default rather than
4312 m4_define_default. Fix some underquoting. Skeleton usage of %define
4313 variable define_location_comparison now implies skeleton usage of
4314 %define variable filename_type.
4315 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4316 data/push.c, data/yacc.c: Update macro names.
4317 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4318 muscle names.
4319
4320 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4321
4322 DJGPP specific issues.
4323
4324 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4325 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4326
4327 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4328
4329 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4330 run parsers in all tests so that Valgrind is invoked during
4331 maintainer-check-valgrind.
4332 (Duplicate representation of merged trees): Free all semantic values.
4333 (Duplicated user destructor for lookahead): Likewise.
4334
4335 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4336
4337 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4338 command-line prefix.
4339 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4340 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4341 miss Valgrind messages.
4342 (Exploding the Stack Size with Malloc): Likewise.
4343
4344 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4345
4346 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4347 locals. Reported by Juan Manuel Guerrero at
4348 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4349 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4350 Fix some indentation also.
4351 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4352 explaining this issue.
4353
4354 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
4355 and Joel E. Denny <jdenny@ces.clemson.edu>
4356
4357 Simplify union and prologue handling, and escape union and lex/parse
4358 params with digraphs.
4359 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4360 values to the empty string since these are no longer guaranteed
4361 initialized by the front-end.
4362 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4363 braces around b4_user_stype since this is no longer done by the
4364 front-end.
4365 * src/files.c, src/files.h (pre_prologue_obstack,
4366 post_prologue_obstack): Remove.
4367 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4368 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4369 with digraphs. This fixes lex params and parse params.
4370 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4371 * src/output.c (prepare): Remove muscle insertion of the prologues.
4372 (output): Remove freeing of pre_prologue_obstack and
4373 post_prologue_obstack.
4374 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4375 than prologue_augment for prologue parsing so you don't need prologue
4376 obstacks.
4377 (grammar_declaration): For %union RHS, use `braceless' instead of
4378 "{...}" so that braces are already stripped and code is escaped with
4379 digraphs.
4380 * src/reader.c (prologue_augment): Remove.
4381 (reader): Remove initialization of pre_prologue_obstack and
4382 post_prologue_obstack.
4383 * src/reader.h (prologue_augment): Remove.
4384
4385 * data/c.m4: Remove stray parenthesis.
4386
4387 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4388
4389 Remove quotes from variables names in %define directives and from
4390 qualifiers in %code directives, and restrict the characters that are
4391 allowed in them to M4-friendly ones. For %define, continue to support
4392 the quoted form as a deprecated feature. Discussed starting at
4393 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4394 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4395 %code.
4396 * doc/bison.texinfo (Prologue Alternatives): Update.
4397 (Decl Summary): In %defines entry, update mention of `%code requires'
4398 and `%code provides'.
4399 (C++ Location Values): Update %define uses.
4400 (Calc++ Parser Interface): Likewise.
4401 (Calc++ Parser): Likewise, and update `%code requires' uses.
4402 (Table of Symbols): Update %code documentation.
4403 * src/parse-gram.y (prologue_declaration): For %define variables, use
4404 `variable' instead of `STRING'.
4405 (grammar_declaration): For %code qualifiers, use `ID' instead of
4406 `STRING'.
4407 (variable): New nonterminal that takes an `ID' or a `STRING'.
4408 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4409 and %define uses.
4410 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4411 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4412 (%define errors): Update %define uses.
4413
4414 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4415
4416 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4417 instead of muscle_insert for %define values so that M4-special
4418 characters are replaced with digraphs.
4419 * tests/input.at (%define errors): Extend to check weird values.
4420
4421 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4422
4423 Instead of having skeletons declare all valid %define variables and
4424 %code qualifiers, provide macros that retrieve the associated values
4425 and build these lists automatically. Thus Bison will now warn when a
4426 variable or qualifier is not used by the skeleton in the current
4427 invocation regardless of whether it might sometimes be used by that
4428 skeleton in other invocations. Also, move all %define value macros to
4429 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4430 form, which is replaced by %code.
4431 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4432 (b4_check_user_names): ... this, and change the series of valid name
4433 arguments to a single list argument for names used in the skeleton
4434 similar to the existing list argument for names used in the grammar.
4435 Warn instead of complaining.
4436 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4437 values and %code code, to format %code code properly, and to build
4438 lists of all %define variables and %code qualifiers used in the
4439 skeleton: b4_skeleton_percent_define_variables and
4440 b4_skeleton_percent_code_qualifiers.
4441 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4442 Remove, and...
4443 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4444 the skeleton names lists can finish building first. In place of
4445 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4446 expect the lists b4_user_percent_define_variables and
4447 b4_user_percent_code_qualifiers.
4448 * data/c++.m4: Where setting default values for b4_parser_class_name,
4449 b4_location_type, b4_filename_type, b4_namespace, and
4450 b4_define_location_comparison, update their names to the
4451 b4_percent_define_ namespace.
4452 * data/glr.c: Don't use b4_check_percent_define_variables and
4453 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4454 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4455 (b4_parser_class_name, b4_namespace): Define these using
4456 b4_get_percent_define for parser_class_name and namespace.
4457 * data/location.cc: Use b4_get_percent_define.
4458 * data/push.c: Don't use b4_check_percent_define_variables and
4459 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4460 * data/yacc.c: Likewise, and don't call m4_exit in
4461 b4_use_push_for_pull_if or m4_wrap code will never execute.
4462 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4463 Rename to...
4464 (muscle_grow_user_name_list): ... this for consistency with the
4465 terminology used in bison.m4.
4466 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4467 %define variable names, and rename muscle used_percent_define_variables
4468 to user_percent_define_variables.
4469 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4470 user_percent_code_qualifiers.
4471 (content): Remove.
4472 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4473 {CODE} form is no longer accepted.
4474 * tests/input.at (Reject bad %code qualifiers): Rename to...
4475 (Reject unused %code qualifiers): ... this, and update test output.
4476 (%define error): Update test output.
4477
4478 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4479
4480 Check for unrecognized %define variables similar to checking for
4481 unrecognized %code qualifiers. Check for redefined %define variables.
4482 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4483 generalizes...
4484 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4485 (b4_check_percent_define_variables): New, also wraps it.
4486 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4487 variables using b4_check_percent_define_variables.
4488 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4489 all those exercised in the test suite and all those listed in the
4490 `Default values' section of c++.m4. Are there others?
4491 * data/push.c, data/yacc.c: Declare no valid %define variables.
4492 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4493 similar to muscle_find, but it works even when the muscle stores a
4494 const value.
4495 (muscle_grow_used_name_list): New function for constructing the used
4496 name list muscles that b4_check_for_unrecognized_names requires.
4497 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4498 %define'd more than once. Define the b4_used_percent_define_variables
4499 muscle with muscle_grow_used_name_list.
4500 (grammar_declaration): Abbreviate %code code with
4501 muscle_grow_used_name_list.
4502 * tests/input.at (%define errors): New.
4503
4504 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4505
4506 Provide warn_at, complain_at, and fatal_at function callbacks to the
4507 skeletons, and use this for %code qualifier complaints.
4508 * data/bison.m4 (b4_error_at): New, invoked by...
4509 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4510 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4511 @fatal_at(...@) directives.
4512 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4513 qualifiers in b4_used_percent_code_qualifiers and to use
4514 b4_complain_at.
4515 * src/location.c, src/location.h (boundary_set_from_string): New global
4516 function.
4517 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4518 function.
4519 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4520 to b4_used_percent_code_qualifiers.
4521 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4522 function.
4523 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4524 (lineno): Rename to...
4525 (out_lineno): ... this so I don't misunderstand it again.
4526 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4527 here; these newlines are in the input but not the output file.
4528 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4529 (at_directive_perform): ... this new static function, and add handling
4530 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4531 directives.
4532 * tests/input.at (Reject bad %code qualifiers): Update test output with
4533 locations and extend.
4534
4535 * tests/output.at (Output file name: [, Output file name: ]): Remove
4536 bogus comment about these tests failing.
4537
4538 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4539
4540 Clean up b4_check_percent_code_qualifiers a little.
4541 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4542 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4543 documentation and add examples.
4544 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4545 qualifiers here.
4546
4547 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4548
4549 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4550 unreliable -- especially when they're hidden inside another macro.
4551 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4552 data/c.m4: Remove m4_divert(-1).
4553 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4554 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4555 m4_divert_push(0) and m4_divert_pop(0).
4556 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
4557 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4558 pushed and popped by m4sugar, should be first on the stack.
4559
4560 Provide warn, complain, and fatal function callbacks to the skeletons.
4561 This provides more flexibility than m4_fatal, improves the error
4562 message format, and captures messages for translation. Discussed
4563 starting at
4564 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4565 * data/bison.m4 (b4_error): New, invoked by...
4566 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4567 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4568 directives. Because these M4 macros might be called when the current
4569 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4570 the previous removal of uses of m4_divert, which caused trouble.
4571 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4572 m4_fatal to report unrecognized %code qualifiers.
4573 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4574 push parser requests.
4575 * data/glr.c: Use b4_complain instead of m4_fatal to report
4576 non-deterministic push parser requests.
4577 Update @output usage to @output(...@) form.
4578 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4579 report missing %defines. Update @output usage to @output(...@) form.
4580 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4581 @output(...@) form.
4582 * src/main.c (main): Invoke skel_scanner_free.
4583 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4584 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4585 obstack_for_string from flex-scanner.h.
4586 (YY_DECL): Use to declare skel_lex static.
4587 (decode_at_digraphs): Remove; now handled in the new
4588 SC_AT_DIRECTIVE_ARG start condition.
4589 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4590 functions.
4591 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4592 at_directive_argv): New static globals.
4593 (INITIAL): Use fail_for_invalid_at.
4594 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4595 recognize the start of a generalized `@directive(...@)' form and
4596 start...
4597 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4598 directive args (using the new obstack_for_string), to decode the
4599 contained @ diagraphs, and to perform the directive. It recognizes
4600 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4601 @output(...@).
4602 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4603 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4604 `@,'.
4605 (scan_skel): Initialize obstack_for_string on the first call.
4606 (skel_scanner_free): New function to free obstack_for_string.
4607 * tests/input.at (Reject bad %code qualifiers): Update test output.
4608
4609 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4610
4611 Consolidate the 4 prologue alternative directives (%code, %requires,
4612 %provides, and %code-top) into a single %code directive with an
4613 optional qualifier field. Discussed at
4614 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4615 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4616 alternatives.
4617 * doc/bison.texinfo (Prologue Alternatives): Update.
4618 (Decl Summary): Update to %code "requires" and %code "provides".
4619 (Calc++ Parser): Update to %code "requires".
4620 (Table of Symbols): Remove entries for %requires, %provides, and
4621 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4622 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4623 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4624 which are skeleton-specific.
4625 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4626 declare what %code qualifiers it supports and to complain if any other
4627 qualifiers were used in the grammar.
4628 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4629 and b4_user_code([b4_percent_code_provides]) in place of
4630 b4_user_requires and b4_user_provides.
4631 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4632 Add b4_user_code([b4_percent_code_top]) and
4633 b4_user_code([b4_percent_code]).
4634 Invoke b4_check_percent_code_qualifiers.
4635 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4636 PERCENT_REQUIRES): Remove.
4637 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4638 %requires. Rewrite the %code RHS as the unqualified form defining the
4639 muscle b4_percent_code. Add another RHS for the qualified %code form,
4640 which defines muscles of the form b4_percent_code_QUALIFIER and the
4641 b4_used_percent_code_qualifiers muscle.
4642 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4643 PERCENT_REQUIRES): Remove.
4644 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4645 %code "requires" and %code "provides".
4646 * tests/input.at (Reject bad %code qualifiers): New.
4647
4648 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4649
4650 Use the new code_props interface for destructors and printers.
4651 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4652 printer_location members, and change the type of the destructor and
4653 printer members to code_props.
4654 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4655 symbol_printer_get, semantic_type_destructor_set,
4656 semantic_type_printer_set, default_tagged_destructor_set,
4657 default_tagless_destructor_set, default_tagged_printer_set,
4658 default_tagless_printer_set): Use code_props in arguments and return
4659 types in place of char const * and location.
4660 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4661 since the locations are now contained in the return of
4662 symbol_destructor_get and symbol_printer_get.
4663 * src/output.c (symbol_destructors_output, symbol_printers_output):
4664 Replace with...
4665 (symbol_code_props_output): ... this to eliminate duplicate code.
4666 (output_skeleton): Update to use symbol_code_props_output.
4667 * src/reader.c (symbol_should_be_used): Update use of
4668 symbol_destructor_get.
4669 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4670 Update uses of the various _destructor_set and _printer_set functions.
4671 * src/symtab.c: (default_tagged_destructor_location,
4672 default_tagless_destructor_location, default_tagged_printer_location,
4673 default_tagless_printer_location): Remove since we...
4674 (default_tagged_destructor, default_tagless_destructor,
4675 default_tagged_printer, default_tagless_printer): ... change the type
4676 of these to code_props.
4677 (symbol_new, semantic_type_new, symbol_destructor_set,
4678 semantic_type_destructor_set, symbol_destructor_get,
4679 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4680 symbol_check_alias_consistency, default_tagged_destructor_set,
4681 default_tagless_destructor_set, default_tagged_printer_set,
4682 default_tagless_printer_set): Update.
4683 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4684 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4685 code_props members.
4686 (symbol_print): Use SYMBOL_CODE_PRINT.
4687
4688 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4689
4690 Use the new code_props interface for rule actions.
4691 * src/symlist.h (symbol_list): Replace action, action_location, and
4692 used members with a code_props action_props member.
4693 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4694 grammar_midrule_action, grammar_current_rule_merge_set,
4695 grammar_current_rule_symbol_append, packgram): Update.
4696 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4697 * src/scan-code.l (handle_action_dollar): Update.
4698 (translate_rule_action): Remove, no longer used.
4699 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4700
4701 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4702
4703 Use the new code_props interface in parse-gram.y.
4704 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4705 Update all uses of translate_* functions to use the new code_props
4706 interface and to use gram_scanner_last_string_free and
4707 code_scanner_last_string_free where possible.
4708 (grammar_declaration): symbol_list_destructor_set and
4709 symbol_list_printer_set now perform the translation, so don't do it
4710 here. Use gram_scanner_last_string_free where possible.
4711 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4712 translate_code): Remove, no longer used.
4713 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4714 symbol_list_printer_set): Perform code translation here rather than
4715 depending on the caller to do so.
4716
4717 * src/symlist.h (struct symbol_list): Correct some documentation typos.
4718 * src/scan-gram.h (gram_last_string): Remove declaration.
4719 * src/scan-gram.l (last_string): Declare it static.
4720
4721 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4722
4723 Encapsulate code properties and related functionality for the various
4724 destructors, printers, and actions into a code_props structure and
4725 interface. This patch merely implements code_props in scan-code.h and
4726 scan-code.l. Future patches will rewrite other modules to use it.
4727 Discussed starting at
4728 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
4729 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
4730 consistently initialize const structs that have an empty location
4731 field.
4732 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
4733 to ensure consistency.
4734 * src/scan-code.h (code_props): New structure.
4735 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
4736 function, macro, and const global variable for initializing a
4737 code_props with no code.
4738 (code_props_plain_init, code_props_symbol_action_init,
4739 code_props_rule_action_init, code_props_translate_code): The rest of
4740 the new code_props functional interface. Among other things, the init
4741 functions set the code_props kind field so that
4742 code_props_translate_code will know whether to behave like
4743 translate_symbol_action, translate_rule_action, or translate_code.
4744 These old translate functions must remain until all other modules are
4745 updated to use the new code_props interface.
4746 (code_scanner_last_string_free): New function similar to
4747 gram_scanner_last_string_free.
4748 (code_scanner_free): Add documentation.
4749 * src/scan-code.l: Implement the new interface.
4750 (code_lex): Make it static, add a code_props* argument, and remove the
4751 rule argument.
4752 (last_string): New static global similar to the one in scan-gram.l.
4753 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
4754 instead of rule.
4755 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
4756 code_props since Bison may one day use this information for destructors
4757 and printers.
4758 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
4759 (handle_action_dollar): Use symbol_list_n_get and set used flag
4760 directly since symbol_list_n_used_set is removed.
4761 (translate_action): Add a code_props* argument and remove the rule,
4762 action, and location arguments. Pass the code_props* on to code_lex.
4763 (translate_rule_action, translate_symbol_action, translate_code):
4764 Rewrite as wrappers around the new code_props interface.
4765 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
4766 it would eventually need to break the encapsulation of code_props.
4767
4768 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4769
4770 * etc/.cvsignore: New.
4771
4772 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4773
4774 Add maintainer-push-check to run maintainer-check using push parsing in
4775 place of pull parsing where available.
4776 * Makefile.am (maintainer-push-check): New.
4777 * data/bison.m4 (b4_use_push_for_pull_if): New.
4778 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
4779 appropriately based on their existing values.
4780 (yypush_parse): Don't print push-parser-specific diagnostics if push
4781 parsing is being used in place of pull parsing.
4782 * data/yacc.c: If push parsing should replace pull parsing, redirect to
4783 push.c.
4784 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
4785 variable, and insert b4_use_push_for_pull_flag into muscles.
4786 * tests/Makefile.am (maintainer-push-check): New.
4787
4788 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4789
4790 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
4791 (whether successful or failed) so that yypush_parse can be invoked
4792 again to start a new parse using the same yypstate.
4793 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
4794 check multiple yypull_parse invocations on the same yypstate. For pull
4795 mode, extend to check multiple yyparse invocations.
4796 (Exploding the Stack Size with Alloca): Extend to try with
4797 %push-pull-parser.
4798 (Exploding the Stack Size with Malloc): Likewise.
4799
4800 * tests/calc.at (Simple LALR Calculator): Don't specify
4801 %skeleton "push.c" since %push-pull-parser implies that now.
4802 * tests/headers.at (export YYLTYPE): Don't check for the push
4803 declarations. Otherwise, this test case can't be used to see if push
4804 mode can truly emulate pull mode.
4805 * tests/input.at (Torturing the Scanner): Likewise.
4806 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
4807 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
4808 AT_YACC_IF, which now includes the case of push mode since %skeleton
4809 need not be used for push mode. This will be more intuitive once
4810 push.c is renamed to yacc.c.
4811
4812 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4813
4814 For push mode, convert yyparse from a macro to a function, invoke yylex
4815 instead of passing a yylexp argument to yypull_parse, and don't
4816 generate yypull_parse or yyparse unless %push-pull-parser is declared.
4817 Discussed starting at
4818 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
4819 * data/bison.m4 (b4_pull_if): New.
4820 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
4821 * data/push.c: Improve M4 quoting a little.
4822 (b4_generate_macro_args, b4_parenthesize): Remove.
4823 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
4824 any time a pull parser is requested.
4825 Don't #define this as a wrapper around yypull_parse. Instead, when
4826 both push and pull are requested, make it a function that does that
4827 same thing.
4828 (yypull_parse): If there's a b4_prefix, #define this to
4829 b4_prefix[pull_parse] when both push and pull are requested.
4830 Don't define this as a function unless both push and pull are
4831 requested.
4832 Remove the yylexp argument and hard-code yylex invocation instead.
4833 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
4834 %push-parser.
4835 * src/getargs.c (pull_parser): New global initialized to true.
4836 * getargs.h (pull_parser): extern it.
4837 * src/output.c (prepare): Insert pull_flag muscle.
4838 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
4839 (prologue_declaration): Set both push_parser and pull_parser = true for
4840 %push-pull-parser. Set push_parser = true and pull_parser = false for
4841 %push-parser.
4842 * src/scan-gram.l: Don't accept %push_parser as an alternative to
4843 %push-parser since there's no backward-compatibility concern here.
4844 Scan %push-pull-parser.
4845 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
4846 instead of %push-parser.
4847 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
4848 prototype it in the module that calls yyparse.
4849 * tests/input.at (Torturing the Scanner): Likewise.
4850 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
4851
4852 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
4853
4854 Update etc/bench.pl. Optimize push mode a little (the yyn change
4855 deserves most of the credit).
4856 * Makefile.am (SUBDIRS): Add etc subdirectory.
4857 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
4858 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
4859 yytoken, yyval, and yyloc declarations to...
4860 (yyparse or yypush_parse): ... here to improve performance. For
4861 yypush_parse invocations after the first, be sure to assign yyn its old
4862 value again.
4863 (yypstate_new): Don't bother initializing the yyresult field since the
4864 initial value isn't used.
4865 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
4866 remove the #define that, in push mode, set it to yyps->NAME.
4867 * etc/Makefile.am: New.
4868 * etc/bench.pl: Remove and build it instead from...
4869 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
4870 "tests/bison" from the build directory by default rather than just
4871 invoking "bison" from $PATH.
4872 (calc_grammar): Update push parser code: don't declare yylval globally,
4873 don't define yyparse_wrapper, and don't #define yyparse.
4874 (bench_grammar): Update to check all working combinations of yacc.c,
4875 push.c, impure, pure, pull, and push.
4876
4877 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4878
4879 For push mode, add pull wrappers around yypush_parse.
4880 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
4881 (yypull_parse): New function wrapping yypush_parse.
4882 (yyparse): New #define wrapping yypull_parse.
4883 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
4884 is declared.
4885 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
4886 prototype yylex in the module that calls yyparse, and don't prototype
4887 yyparse there. Otherwise, the yyparse expansion won't compile.
4888 * tests/input.at (Torturing the Scanner): Likewise.
4889
4890 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4891
4892 Enable push parsers to operate in impure mode. Thus, %push-parser no
4893 longer implies %pure-parser. The point of this change is to move
4894 towards being able to test the push parser code by running the entire
4895 test suite as if %push-parser had been declared.
4896 * data/push.c (yypush_parse): For impure mode, remove the
4897 yypushed_char, yypushed_val, and yypushed_loc arguments.
4898 Instead, declare these as local variables initialized to the global
4899 yychar, yylval, and yylloc.
4900 For the first yypush_parse invocation only, restore the initial values
4901 of these global variables when it's time to read a token since they
4902 have been overwritten.
4903 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
4904 %push-parser.
4905 * tests/calc.at (Simple LALR(1) Calculator): Always declare
4906 %pure-parser along with %push-parser since this test case was designed
4907 for pure push parsers.
4908 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
4909 (AT_YACC_OR_PUSH_IF): New.
4910 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
4911 add a note that it's still wrong for some cases (as it has been for a
4912 while).
4913 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
4914 %push-parser no longer implies %pure-parser.
4915
4916 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4917
4918 Remove some unnecessary differences between the pull parser code and
4919 the push parser code. This patch enables yynerrs in push mode.
4920 * data/push.c: Reformat M4 a little.
4921 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
4922 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
4923 because push mode is on. Instead, if pure mode is on, move yynerrs
4924 to...
4925 (b4_declare_parser_state_variables): ... here.
4926 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
4927 to yyps->NAME so it can be used in yypush_parse.
4928 (yypush_parse): Don't omit uses of yynerrs in push mode.
4929
4930 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4931
4932 Fix bug such that the first pushed token's value and location are
4933 sometimes overwritten (sometimes by %initial-action) before being used.
4934 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
4935 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
4936 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
4937 more closely mimic the pull parser logic.
4938 Don't copy the pushed token to yychar, yylval, and yylloc until it's
4939 time to read a token, which is after any initialization of yylval and
4940 yylloc.
4941 (gottoken): Rename label to...
4942 (yyread_pushed_token): ... for clarity and to avoid infringing on the
4943 user namespace.
4944
4945 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4946
4947 Rearrange initialization of the parser state variables so that the
4948 skeleton doesn't have to have a copy for pull mode and another for push
4949 mode. This patch also fixes at least a bug such that yylloc was not
4950 initialized (with b4_location_initial_line and
4951 b4_location_initial_column) upon calling yypush_parse. However, that
4952 initialization now overwrites the first token's location;
4953 %initial-action assigning @$ already did the same thing, and both bugs
4954 will be fixed in a later patch.
4955 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
4956 (b4_declare_parser_state_variables): Remove initialization of yytoken,
4957 yyss, yyvs, yyls, and yystacksize.
4958 (yypstate_new): Remove initialization of some yypstate fields: yystate,
4959 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
4960 yylsp.
4961 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
4962 yyps->NAME so it can be used in yypush_parse.
4963 (yyparse or yypush_parse): For yypush_parse, don't print the
4964 "Starting parse" diagnostic for invocations after the first.
4965 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
4966 yypush_parse, only do it for the first invocation.
4967 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
4968 initialization to occur in yypush_parse but only on the first
4969 invocation.
4970
4971 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4972
4973 * data/push.c: Add CPP guards around push parser declarations in both
4974 the header and the code file.
4975 In the code file, move the push parser declarations to the same place
4976 they appear in the header file.
4977 Clean up the M4 some, especially the inconsistent underquoting in
4978 some b4_c_function_def and b4_c_function_decl uses.
4979
4980 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4981
4982 Encapsulate the push parser state variables into an M4 macro so the
4983 push skeleton doesn't have to list them again for pull mode's yyparse.
4984 For push mode, remove yypush_parse's local equivalents of these
4985 variables to eliminate unnecessary copying between the two sets at
4986 run-time. This patch also fixes at least a bug related to multiple
4987 %initial-action invocations in push mode.
4988 * data/push.c (b4_declare_parser_variables): Rename to...
4989 (b4_declare_scanner_communication_variables): ... this for clarity and
4990 update both uses.
4991 (b4_declare_yyparse_variables): Remove and move its contents to the one
4992 spot where it was invoked.
4993 (b4_declare_parser_state_variables): New macro containing the parser
4994 state variables required by push mode.
4995 (struct yypstate): Replace all fields but yynew with
4996 b4_declare_parser_state_variables.
4997 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
4998 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
4999 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5000 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5001 parser state variable declarations with
5002 b4_declare_parser_state_variables.
5003 Don't initialize parser state variables when calling yypush_parse since
5004 yypstate_new already does that.
5005 Invoke the user's initial action only upon the first yypush_parse
5006 invocation.
5007 Remove all code that copies between the local parser state variables
5008 and the yypstate.
5009
5010 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5011
5012 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5013 prevent a name collision in a future patch where these names will
5014 sometimes be #define'd.
5015 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5016 since it no longer has the same name as the existing argument.
5017 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5018
5019 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
5020 and Joel E. Denny <jdenny@ces.clemson.edu>
5021
5022 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5023 that the argument is case-insensitive, and there's no `=' here.
5024 For the %skeleton entry, mention that %language is better.
5025 (Bison Options): Likewise for --language and --skeleton. Move the
5026 --skeleton entry so that the `Tuning the parser' section is sorted
5027 alphabetically on long options.
5028 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5029 %language directive in detail here; cross-reference the %language
5030 documentation instead.
5031 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5032 `%require "2.3b"' so that the example is always up-to-date.
5033 (Table of Symbols): Add entries for %language and %skeleton.
5034 * examples/extexi (normalize): Instead of replacing every %require
5035 argument with the current Bison version, just substitute for
5036 `@value{VERSION}'. This guarantees that we're testing what actually
5037 appears in the documentation.
5038 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5039 rather than `@VERSION@'.
5040
5041 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5042
5043 * NEWS: Reword the %language news a bit, and put it earlier.
5044
5045 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5046 Rewrite to simplify the logic.
5047 (language_argmatch): Likewise.
5048 (program_name): We now own this var.
5049 * src/getargs.h (struct bison_language): Use char[] rather than
5050 const char *.
5051
5052 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5053 Java is supported.
5054 * src/complain.c (program_name): Remove decl; no longer needed.
5055 * src/main.c (program_name): Remove; now belongs to getargs.
5056
5057 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
5058
5059 * NEWS: Document %language.
5060
5061 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5062
5063 * data/c-skel.m4, data/c++-skel.m4: New files.
5064 * data/glr.c: Complain on push parsers.
5065
5066 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5067 over %skeleton.
5068 (Decl Summary): Document %language and %skeleton.
5069 (Command line): Document -L.
5070
5071 * examples/extexi: Rewrite %require directive.
5072 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5073
5074 * src/files.c (compute_exts_from_gc): Look in language structure
5075 for .y extension.
5076 (compute_file_name_parts): Check whether .tab should be added.
5077 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5078 (language, skeleton_arg, language_argmatch): New.
5079 (long_options): Add --language.
5080 (getargs): Use skeleton_arg, add -L/--language.
5081 * src/getargs.h: Include location.h.
5082 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5083 * src/output.c (prepare): Pick default skeleton from struct language.
5084 Don't dispatch C skeletons here.
5085 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5086 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5087 * src/scan-gram.l ("%language"): New rule.
5088
5089 * tests/calc.at: Test %skeleton and %language.
5090 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5091 (AT_GLR_IF): Look for %skeleton "glr.cc".
5092 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5093 (AT_YACC_IF): Reject %language.
5094
5095 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5096
5097 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5098 since it wasn't used; only the typedef name 'semantic_type' is needed.
5099 Also, omit trailing white space.
5100
5101 * bootstrap: Sync from coreutils.
5102 (gnulib_extra_files): Add build-aux/announce.gen.
5103 (slurp): Adjust .gitignore files like .cvsignore files.
5104 * build-aux/announce-gen: Remove from CVS, since bootstrap
5105 now creates this.
5106
5107 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5108
5109 Make %push-parser imply %pure-parser. This fixes several bugs; see
5110 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5111 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5112 pure_parser = true.
5113 * data/push.c: Don't bother testing b4_push_if when deciding whether
5114 to expand b4_declare_parser_variables globally.
5115 (yypush_parse): Likewise in here.
5116
5117 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5118 (yy_reduce_print): Reformat M4 for readability.
5119
5120 2006-12-15 Bob Rossi <bob@brasko.net>
5121 and Joel Denny <jdenny@ces.clemson.edu>
5122
5123 * data/push.c (yypstate): Add typedef, and update all uses of
5124 struct yypstate to just yypstate.
5125 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5126
5127 2006-12-14 Bob Rossi <bob@brasko.net>
5128
5129 * data/push.c (yypush_parse): Declare prototype regardless of
5130 %locations option.
5131
5132 2006-12-14 Bob Rossi <bob@brasko.net>
5133
5134 * data/push.c (yyparse): Remove the prototype and the #define when in
5135 push-parser mode.
5136
5137 2006-12-13 Bob Rossi <bob@brasko.net>
5138
5139 * data/push.c (yypstate_init): Rename to...
5140 (yypstate_new): ... this and use b4_c_function_def.
5141 (yypstate_delete): New.
5142 (yypush_parse): Change parameters yynval and yynlloc to be const.
5143 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5144 yypstate_delete functions.
5145
5146 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5147
5148 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5149 strange test case titles. Reported by Bob Rossi.
5150
5151 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5152
5153 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5154 of potential ambiguities in GLR grammers.
5155
5156 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5157
5158 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5159 `bison ', use m4_index instead of m4_substr since chopping up a string
5160 containing M4-special characters causes problems here.
5161
5162 Fix a couple of bugs related to special characters in user-specified
5163 file names, and make it easier for skeletons to compute output file
5164 names with the same file name prefix as Bison-computed output file
5165 names.
5166 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5167 b4_parser_file_name and b4_spec_defines_file instead of
5168 @output_parser_name@ and @output_header_name@, which are now redundant.
5169 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5170 b4_parser_file_name, b4_spec_defines_file, and the new
5171 @basename(FILENAME@) instead of @output_parser_name@ and
5172 @output_header_name@, which inappropriately escaped the file names as
5173 C string literals.
5174 * src/files.c (all_but_ext): Remove static qualifier.
5175 (compute_output_file_names): Move `free (all_but_ext)' to...
5176 (output_file_names_free): ... here since all_but_ext is needed later.
5177 * src/files.h (all_but_ext): Extern.
5178 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5179 exactly what MUSCLE_INSERT_STRING used to do.
5180 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5181 characters are escaped properly.
5182 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5183 all_but_ext.
5184 For pkgdatadir muscle, maintain previous functionality by using
5185 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5186 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5187 digraphs would never be expanded. Hopefully no one has M4-special
5188 characters in his Bison installation path.
5189 * src/scan-skel.l: Don't parse @output_header_name@ and
5190 @output_parser_name@ anymore since they're now redundant.
5191 In @output, use decode_at_digraphs.
5192 Parse a new @basename command that invokes last_component.
5193 (decode_at_digraphs): New.
5194 (BASE_QPUTS): Remove unused.
5195 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5196 (Output file name): New tests.
5197
5198 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5199
5200 Warn about output files that are generated by the skeletons and that
5201 conflict with other output files.
5202 * data/glr.c: Don't generate the header file here when glr.cc does.
5203 * src/files.c (file_names, file_names_count): New static globals.
5204 (compute_output_file_names): Invoke output_file_name_check for files
5205 not generated by the skeletons and remove existing checks.
5206 (output_file_name_check): New function that warns about conflicting
5207 output file names.
5208 (output_file_names_free): Free file_names.
5209 * src/files.h (output_file_name_check): Declare.
5210 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5211 the skeletons.
5212 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5213 (Conflicting output files): New tests.
5214
5215 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5216
5217 * doc/bison.texinfo: Fix a couple of typos.
5218
5219 2006-12-08 Bob Rossi <bob@brasko.net>
5220
5221 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5222 Rename to...
5223 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5224 update all uses.
5225 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5226 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5227 local pv.
5228 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5229 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5230
5231 2006-12-07 Bob Rossi <bob@brasko.net>
5232 and Joel Denny <jdenny@ces.clemson.edu>
5233
5234 * data/push.c (yypvarsinit): Change return type from void* to struct
5235 yypvars*. No longer cast to void* on return.
5236 (struct yypvars): Remove yylen since it need not be remembered between
5237 yypushparse invocations.
5238 (yypushparse): Don't copy between yylen and pv->yylen.
5239
5240 2006-12-05 Bob Rossi <bob@brasko.net>
5241
5242 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5243 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5244 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5245 (struct yypvars): Remove b4_declare_parser_variables.
5246 (yypvarsinit): Remove init code for removed variables.
5247 (global scope): Do not declare b4_declare_parser_variables if
5248 push or pure mode.
5249 (yypushparse): Add b4_declare_parser_variables.
5250 Init new local variables, and remove init code for removed
5251 yypvars variables.
5252 (yyparse): Delete.
5253 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5254 and yyparse for other modes.
5255 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5256 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5257 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5258 (AT_PURE_LEX_IF): True if pure or push parser.
5259
5260 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5261
5262 Document Yacc prologue alternatives and default %destructor's and
5263 %printer's as experimental. Don't mention Java yet. Discussed at
5264 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5265 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5266 (2.3a): Annotate this entry to say the old forms of these features were
5267 also experimental.
5268 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
5269 Table of Symbols): Say they're experimental. Comment out any mention
5270 of Java (we'll want this back eventually).
5271
5272 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5273
5274 Support a file name argument to %defines. Deprecate `=' in
5275 %file-prefix, %name-prefix, and %output. Discussed at
5276 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5277 * NEWS (2.3a+): Mention.
5278 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
5279 form of %defines, and remove `=' from entries for %file-prefix,
5280 %name-prefix, and %output.
5281 * src/parse-gram.y (prologue_declaration): Implement.
5282 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5283 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5284 all but one occurrence of %name-prefix.
5285 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5286 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5287 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5288 occurrence of each of %file-prefix and %output. Add check for %defines
5289 with argument.
5290 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5291 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5292 Remove the `=' from %output.
5293
5294 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5295
5296 Don't escape $ in test case titles since Autoconf 2.61 now does that
5297 correctly.
5298 * tests/actions.at (Default %printer and %destructor are not for error
5299 or $undefined): Here.
5300 (Default %printer and %destructor are not for $accept): Here.
5301 * tests/input.at (Invalid $n and @n): Here.
5302
5303 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5304
5305 Rename <!> to <>. Discussed starting at
5306 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5307 * NEWS (2.3a+): Update.
5308 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
5309 Update.
5310 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5311 * src/scan-gram.l (INITIAL): Implement.
5312 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5313 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5314 comment.
5315 * tests/actions.at (Default tagless %printer and %destructor,
5316 Default tagged and per-type %printer and %destructor,
5317 Default %printer and %destructor are not for error or $undefined,
5318 Default %printer and %destructor are not for $accept,
5319 Default %printer and %destructor for mid-rule values): Update.
5320 * tests/input.at (Default %printer and %destructor redeclared,
5321 Unused values with default %destructor): Update.
5322
5323 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
5324
5325 Don't let %prec take a nonterminal.
5326 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5327 token.
5328 * tests/input.at (%prec takes a token): New test checking that %prec
5329 won't take a nonterminal.
5330
5331 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5332
5333 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5334 it was double-quoted.
5335 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5336 grammar is maintained with Bison's highest standards.
5337 * src/getargs.c: Fix some typos in Doxygen comments.
5338
5339 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5340
5341 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5342 later. Reported by Paul Eggert in
5343 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5344 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5345 * src/scan-code.l (translate_action): Don't bother invoking
5346 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5347 (code_scanner_free): Instead of invoking
5348 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5349 which frees more.
5350 * src/scan-gram.l (gram_scanner_free): Likewise.
5351 * src/scan-skel.l (scan_skel): Likewise.
5352
5353 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5354
5355 * src/files.c (tr): Change return type to void.
5356 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5357 has been called previously for the same key.
5358 (muscle_find): Return storage instead of value so that
5359 --enable-gcc-warnings doesn't produce warnings that the return discards
5360 const. aver that the value and storage are the same since storage
5361 could potentially be NULL when value is not.
5362 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5363 same as 0.
5364
5365 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5366
5367 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5368 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5369 us a slightly cleaner distribution, and also works.
5370 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5371 gnulib changes.
5372
5373 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5374 and Paul Eggert <eggert@cs.ucla.edu>
5375
5376 Don't let Bison leak memory except when it complains.
5377 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5378 (spec_defines_file, dir_prefix): Now char *, not const char *,
5379 since they are freed.
5380 * src/files.c: Likewise.
5381 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5382 Likewise.
5383 (tr): Now operates in-place. All uses changed.
5384 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5385 values.
5386 (compute_file_name_parts, compute_output_file_names): Don't store
5387 read-only data in variables that will be freed.
5388 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5389 src_extension, and header_extension.
5390 (output_file_names_free): New public function to free
5391 spec_verbose_file, spec_graph_file, spec_defines_file,
5392 parser_file_name, and dir_prefix.
5393 * src/getargs.c (getargs): Don't store read-only data in variables that
5394 will be freed.
5395 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5396 (which previously existed but was unused), and quotearg_free.
5397 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5398 * src/muscle_tab.c: Likewise.
5399 (muscle_entry): Make the value char const *,
5400 and add a new storage member that is char * and can be freed.
5401 (muscle_entry_free): New private function.
5402 (muscle_init): Use it instead of free.
5403 (muscle_insert, muscle_grow): Update and use new storage member.
5404 (muscle_code_grow): Free the string passed to muscle_grow
5405 since it's not needed anymore.
5406 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5407 add a new `char *code' member.
5408 ("{...}"): Declare semantic type as code.
5409 * src/scan-code.h (translate_rule_action):
5410 (translate_symbol_action, translate_code, translate_action): Return
5411 `char const *' rather than `char *' since external code should not free
5412 these strings.
5413 * src/scan-code.l: Likewise.
5414 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5415 which is "{...}" in the parser.
5416 * tests/Makefile.am (maintainer-check-valgrind): Set
5417 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5418 Valgrind.
5419 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5420 complain.
5421 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5422 expecting a non-zero exit status sets --leak-check=summary and
5423 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5424 this case, and we don't want to hear about it.
5425
5426 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5427
5428 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5429 instead of from the template, to simplify configuration a bit.
5430 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5431 and m4/wint_t.m4, as they are needed with the latest gnulib.
5432
5433 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5434
5435 Disable unset/unused mid-rule value warnings by default, and recognize
5436 --warnings=midrule-values to enable them. Discussed starting at
5437 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5438 * NEWS (2.3a+): Mention.
5439 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5440 warnings): Add entry for midrule-values subargument.
5441 * src/reader.c (symbol_should_be_used): Don't return true just because
5442 the value is a set/used mid-rule value unless
5443 --warnings=midrule-values was specified.
5444 * tests/input.at (Unused values, Unused values before symbol
5445 declarations): Run tests with and without --warnings=midrule-values.
5446
5447 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5448 than LIST_FREE directly.
5449
5450 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5451
5452 Finish implementing --warnings=error, which should not be implied by
5453 --warnings=all (or by its synonyms -W and --warnings without
5454 subarguments).
5455 * src/complain.c (set_warning_issued): New function to report that
5456 warnings are being treated as errors and to record an error if so.
5457 Invoke...
5458 (warn_at, warn): ... here.
5459 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5460 "error - warnings are errors" does not appear above "all - all of the
5461 above".
5462 (getargs): For -W and --warnings without subarguments, don't let
5463 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5464 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5465
5466 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5467
5468 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5469 empty subargument list. For example: `bison --warnings= parser.y'.
5470
5471 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5472
5473 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5474 the parser header file so that gcc doesn't warn.
5475
5476 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5477
5478 Split the default %destructor/%printer into two kinds: <*> and <!>.
5479 Discussed starting at
5480 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5481 * NEWS (2.3a+): Mention.
5482 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5483 previous change today related to mid-rules.
5484 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
5485 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
5486 (TYPE_TAG_ANY): Add as <*>.
5487 (TYPE_TAG_NONE): Add as <!>.
5488 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5489 for <*> and <!>.
5490 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5491 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5492 * src/symlist.c (symbol_list_default_new): Split into tagged and
5493 tagless versions.
5494 (symbol_list_destructor_set, symbol_list_printer_set): Split
5495 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5496 SYMLIST_DEFAULT_TAGLESS.
5497 * src/symlist.h: Update symbol_list_default*_new prototypes.
5498 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5499 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5500 * src/symtab.c (default_destructor, default_destructor_location,
5501 default_printer, default_printer_location): Split each into tagged and
5502 tagless versions.
5503 (symbol_destructor_get, symbol_destructor_location_get,
5504 symbol_printer_get, symbol_printer_location_get): Implement tagged
5505 default and tagless default cases.
5506 (default_destructor_set, default_printer_set): Split each into tagged
5507 and tagless versions.
5508 * src/symtab.h: Update prototypes.
5509 * tests/actions.at (Default %printer and %destructor): Rename to...
5510 (Default tagless %printer and %destructor): ... this, and extend.
5511 (Per-type %printer and %destructor): Rename to...
5512 (Default tagged and per-type %printer and %destructor): ... this, and
5513 extend.
5514 (Default %printer and %destructor for user-defined end token): Extend.
5515 (Default %printer and %destructor are not for error or $undefined):
5516 Update.
5517 (Default %printer and %destructor are not for $accept): Update.
5518 (Default %printer and %destructor for mid-rule values): Extend.
5519 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5520 (Unused values with default %destructor): Extend.
5521
5522 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5523
5524 Don't apply the default %destructor/%printer to an unreferenced midrule
5525 value. Mentioned at
5526 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5527 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5528 like $@n instead of just @n so that the default %destructor/%printer
5529 logic doesn't see them as user-defined symbols.
5530 (symbol_is_dummy): Check for both forms of the name.
5531 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5532 name for which the midrule value is referenced in any action.
5533 * tests/actions.at (Default %printer and %destructor for mid-rule
5534 values): New test.
5535 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5536 for change to dummy symbol names.
5537
5538 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5539
5540 Warn about unset midrule $$ if the corresponding $n is used.
5541 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5542 $n usage.
5543 (packgram): Before invoking grammar_rule_check on any rule, make sure
5544 all actions have already been scanned in order to set `used' flags.
5545 Otherwise, checking that a midrule's $$ is set will not always work
5546 properly because the midrule check must forward-reference the midrule's
5547 parent rule.
5548 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5549 warning.
5550
5551 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5552
5553 More improvements to the documentation of the prologue alternatives:
5554 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5555 Bison manual.
5556 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5557 some text to clarify the relative importance of the new directives and
5558 to show how these directives may be viewed as code labels.
5559
5560 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5561
5562 Similar to the recently removed %before-header, add %code-top as the
5563 alternative to the pre-prologue. Mentioned at
5564 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5565 Also, let the prologue alternatives appear in the grammar section.
5566 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5567 (prologue_declaration): Move the existing prologue alternatives to...
5568 (grammar_declaration): ... here and add %code-top.
5569 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5570
5571 Clean up and extend documentation for the prologue alternatives.
5572 * NEWS (2.3a+): Describe prologue alternatives.
5573 * doc/bison.texinfo (Prologue): Move discussion of prologue
5574 alternatives to...
5575 (Prologue Alternatives): ... this new section, and extend it to discuss
5576 all 4 directives in detail.
5577 (Table of Symbols): Clean up discussion of prologue alternatives and
5578 add %code-top.
5579
5580 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5581
5582 DJGPP specific issues.
5583
5584 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5585 config.bat accordingly.
5586 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5587 * djgpp/config.site: Likewise.
5588
5589 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
5590
5591 Replace %*-header with %provides, %requires, %code. See discussion at
5592 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5593
5594 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5595 (b4_user_start_header): Remove.
5596 * data/glr.c: Use new macros instead of b4_*start_header
5597 and b4_*end_header.
5598 * data/glr.cc: Likewise.
5599 * data/lalr1.cc: Likewise.
5600 * data/push.c: Likewise.
5601 * data/yacc.c: Likewise.
5602
5603 * doc/bison.texinfo: Remove %before-header, rename
5604 %{start,end,after}-header to %requires, %provides, %code.
5605
5606 * src/parse-gram.y: Likewise (also rename token names accordingly).
5607 * src/scan-gram.l: Likewise.
5608 * tests/actions.at: Likewise.
5609
5610 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5611
5612 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5613 Problem reported by Joel E. Denny.
5614
5615 2006-10-14 Jim Meyering <jim@meyering.net>
5616
5617 (Sync from coreutils.)
5618 Work also when the working directory (with e.g. coreutils sources)
5619 is version controlled with git, rather than CVS.
5620 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5621 rather than CVS.
5622 In messages and comments, say e.g., "checked-out sources",
5623 rather than "CVS sources".
5624 (version_controlled_file): New function. Work for git as well as
5625 for CVS. Don't use grep's -q option.
5626 (slurp): Call it here, in place of CVS-specific code.
5627
5628 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5629
5630 Fix testsuite for ./configure --enable-gcc-warnings:
5631 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5632 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5633 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5634 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5635 * test/regression.at (Diagnostic that expects two alternatives):
5636 Likewise.
5637
5638 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5639
5640 * bootstrap.conf (gnulib_modules): Add config-h.
5641 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5642 worry about HAVE_CONFIG_H.
5643 * lib/abitset.c: Likewise.
5644 * lib/bitset.c: Likewise.
5645 * lib/bitset_stats.c: Likewise.
5646 * lib/bitsetv-print.c: Likewise.
5647 * lib/bitsetv.c: Likewise.
5648 * lib/ebitset.c: Likewise.
5649 * lib/get-errno.c: Likewise.
5650 * lib/lbitset.c: Likewise.
5651 * lib/subpipe.c: Likewise.
5652 * lib/timevar.c: Likewise.
5653 * lib/vbitset.c: Likewise.
5654 * lib/bitset.c: Include "bitset.h" first, to test interface.
5655 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5656 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5657 * lib/bitsetv.c: Include "bitsetv.h" first.
5658 * lib/get-errno.c: Include "get-errno.h" first.
5659 * m4/.cvsignore: Add config-h.m4.
5660 * tests/actions.at (Default %printer and %destructor for ...):
5661 Adjust expected line numbers in output to reflect removal of #if
5662 HAVE_CONFIG_H lines.
5663 * tests/glr-regression.at (Missed %merge type warnings when ...):
5664 Likewise.
5665 * tests/regression.at (Braced code in declaration in rules section):
5666 Likewise.
5667 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5668 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5669 Include <config.h> unconditionally.
5670
5671 * bootstrap: Sync from coreutils, as follows:
5672
5673 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5674
5675 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5676 variable was sometimes used without being initialized. This
5677 messed up the installation of the INSTALL file in some cases.
5678
5679 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5680
5681 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5682 --copy. Inspired by a suggestion from Bruno Haible.
5683
5684 2006-10-03 Jim Meyering <jim@meyering.net>
5685
5686 * bootstrap: Undo last change to this file, since now gnulib-tool
5687 sticks with the automake default in generating dependencies.
5688
5689 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5690
5691 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5692 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5693
5694 * doc/bison.1: Add copyright notice.
5695
5696 * data/glr.c: Don't include <stdarg.h>; not used.
5697
5698 * NEWS: The -g and --graph options now output graphs in Graphviz
5699 DOT format, not VCG format.
5700 * doc/bison.1: Likewise.
5701 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
5702 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5703 of this change in
5704 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
5705 * TODO: Remove Graphviz entry.
5706 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5707 remove vcg.c, vcg.h, vcg_defaults.h.
5708 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5709 * src/graphviz.c, src/graphviz.h: New files.
5710 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5711 * src/files.h: Make comment more generic.
5712 * src/main.c (main): Likewise.
5713 * src/print_graph.h: Likewise.
5714 * src/getargs.c (usage): Make usage description more generic.
5715 * src/print_graph.c: Include graphviz.h rather than vcg.h.
5716 (static_graph, fgraph): Remove. All uses changed to pass
5717 arguments instead of sharing a static var.
5718 (print_core, print_actions, print_state, print_graph):
5719 Output graphviz format rather than VCG format.
5720 * tests/.cvsignore: Remove *.vcg; add *.dot.
5721 * tests/output.at: Expect *.dot files, not *.vcg files.
5722
5723 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
5724 accommodates the 2006-10-08 change.
5725
5726 2006-10-11 Bob Rossi <bob@brasko.net>
5727
5728 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
5729 (b4_yyssa, b4_yyerror_range): New macros.
5730 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
5731 (yypvarsinit): Remove init of removed fields.
5732 (yypushparse): Remove use of removed fields; use new macros instead.
5733
5734 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5735
5736 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
5737 in a push parser. Reindent slightly to match yacc.c better.
5738
5739 2006-10-11 Bob Rossi <bob@brasko.net>
5740
5741 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
5742 yymsg_alloc fields.
5743 (yypvarsinit, yypushparse): Remove init of removed fields.
5744 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
5745
5746 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5747
5748 * THANKS: Add Paolo Bonzini and Bob Rossi.
5749
5750 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
5751
5752 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
5753 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
5754 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
5755 b4_define_user_cde and uses): Remove.
5756 (b4_comment, b4_prefix, b4_sync_start): New.
5757 * data/bison.m4: New file, with most of the content removed from c.m4.
5758 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
5759 * src/output.c (output_skeleton): Pass bison.m4.
5760 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
5761 only if specified.
5762
5763 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
5764
5765 Fix test failure reported by Tom Lane in
5766 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
5767 and try to make such failures easier to catch in the future.
5768 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
5769 that's now the caller's responsibility.
5770 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
5771 Set yychar = YYEOF if it's negative.
5772 * tests/actions.at (yylex): Abort if asked to read past EOF.
5773 * tests/conflicts.at (yylex): Likewise.
5774 * tests/cxx-type.at (yylex): Likewise.
5775 * tests/glr-regression.at (yylex): Likewise.
5776 * tests/input.at (yylex): Likewise.
5777 * tests/regression.at (yylex): Likewise.
5778 * tests/torture.at (yylex): Likewise.
5779
5780 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
5781
5782 Fix problems with translating English-language diagnostics.
5783 * bootstrap: Fix bug introduced in recent bootstrap changes, with
5784 respect to bison-runtime pot generation. The YY_ stuff
5785 wasn't being captured.
5786 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
5787 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
5788 * runtime-po/POTFILES.in: Add data/push.c.
5789
5790 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5791
5792 Merge bootstrap changes from coreutils.
5793
5794 2006-09-28 Jim Meyering <jim@meyering.net>
5795
5796 Automatically generated dependencies are important even
5797 when all of the sources in a directory come from gnulib.
5798 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
5799 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
5800
5801 2006-09-23 Jim Meyering <jim@meyering.net>
5802
5803 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
5804
5805 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5806
5807 * bootstrap: Add support for --force.
5808 (usage): New function. Describe usage less tersely.
5809 (CVS_only_file): New var.
5810
5811 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
5812
5813 * data/push.c (YYPUSH_MORE): Make it an enum instead.
5814 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
5815 Adjust white space and comments to match GNU style better.
5816
5817 2006-09-20 Bob Rossi <bob@brasko.net>
5818
5819 * data/push.c (yyresult_get): Remove function.
5820 (YYPUSH_MORE): Add #define.
5821 (yypushparse): Modify return value.
5822
5823 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5824
5825 * stamp-h.in: Remove; no longer needed.
5826 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
5827 Remove config.h, config.hin, intl (no longer created).
5828 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
5829 stamp-h1.
5830
5831 Sync bootstrap from coreutils, as follows:
5832
5833 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
5834
5835 * bootstrap (symlink_to_gnulib): New function.
5836 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
5837 to copies-of-gnulib.
5838 (cp_mark_as_generated, slurp, gnulib_files):
5839 Avoid making a copy if it's the same as the old version.
5840 (gnulib_files): Add support for this variable (used by Bison).
5841
5842 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5843
5844 * src/getargs.c (usage): Rework to use conventions similar to
5845 coreutils, to make translation a bit easier and the code a bit
5846 smaller. Problem reported by Tim Van Holder.
5847
5848 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
5849
5850 Use some of gnulib's new modules, taken from coreutils.
5851
5852 * bootstrap: Sync from coreutils, except add support for gnulib_files.
5853 * bootstrap.conf: New file.
5854 (gnulib_modules): Add configmake, inttypes, unistd.
5855 (XGETTEXT_OPTIONS): Add complain, complain_at,
5856 fatal, fatal_at, warn, warn_at, unexpected_end.
5857 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
5858 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
5859 (gl_EARLY): Add.
5860 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
5861 (gl_INIT): Add
5862 (GNULIB_AUTOCONF_SNIPPET): Remove.
5863 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
5864 the pickiest.
5865 * lib/.cvsignore: Add inttypes_.h.
5866 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
5867 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
5868 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
5869 no-longer-necessary initializations.
5870 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
5871 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
5872 use the unistd module.
5873 * src/system.h: Likewise.
5874 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
5875 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
5876 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
5877 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
5878 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
5879 * src/system.h: Include inttypes.h unconditionally, now that we
5880 use the inttypes module. Don't bother to include stdint.h, since
5881 inttypes.h now does that for us.
5882 (LOCALEDIR): Remove, now that we use the configmake module.
5883 * src/getargs.c: Include configmake.h.
5884 * src/main.c: Likewise.
5885 * src/output.c: Likewise.
5886 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
5887 not from $abs_top_builddir, since config.h moved.
5888
5889
5890 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
5891 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
5892
5893 * src/parse-gram.y (symbol_declaration): Don't put statements
5894 before declarations; it's not portable to C89.
5895 * src/scan-code.l (handle_action_at): Likewise.
5896
5897 * src/scan-code.l: Always initialize braces_level; the old code
5898 left it uninitialized and therefore had undefined behavior.
5899
5900 Don't attempt to redefine 'assert', since it runs afoul of
5901 systems where standard headers (mistakenly) include <assert.h>.
5902 Instead, define and use our own alternative, called 'aver'.
5903 * src/reader.c: Don't include assert.h, since we no longer
5904 use assert.
5905 * src/scan-code.l: Likewise.
5906 * src/system.h (assert): Remove, replacing with....
5907 (aver): New function, taking a bool arg. All uses changed.
5908 * src/tables.c (pack_vector): Ensure that aver arg is bool,
5909 not merely an integer.
5910
5911 2006-09-15 Bob Rossi <bob@brasko.net>
5912
5913 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
5914 * data/c.m4 (YYPUSH): New.
5915 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
5916 * src/getargs.c (push_parser): New var.
5917 * src/getargs.h (push_parser): New declaration.
5918 * src/output.c (prepare): Add macro insertion of `push_flag'.
5919 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
5920 (prologue_declaration): Parse %push-parser.
5921 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
5922 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
5923 list of removed lines from the traces observed.
5924 (AT_CHECK_CALC_LALR): Added push parser tests.
5925
5926 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
5927
5928 * NEWS: Version 2.3a.
5929 * configure.ac (AC_INIT): Likewise.
5930
5931 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
5932 "#define YYSTYPE int" that caused "make maintainer-check" to fail
5933 due to header ordering dependencies. I don't know why the #define
5934 was there.
5935
5936 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
5937 runtime cost when YYDEBUG is not defined, and so that some tests
5938 that used to fail now work. Problem and initial suggestion by
5939 Paolo Bonzini.
5940 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
5941 * data/glr.cc (b4_parser_class_name):
5942 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
5943 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
5944 (yydebug_) [YYDEBUG]: New member.
5945 (yycdebug_): Now defined only if YYDEBUG.
5946 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
5947 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
5948 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
5949 if YYYDEBUG.
5950 (debug_stream, set_debug_stream, debug_level, set_debug_level):
5951 Define only if YYDEBUG.
5952 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
5953 set_debug_level.
5954 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
5955 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
5956 AT_CHECK_CALC_GLR_CC that are working now.
5957
5958 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
5959
5960 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
5961 We don't need them in glr.cc, and glr.c defines them.
5962 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
5963 assumes that defining it to anything is the same as defining
5964 it to 1. Problem reported by Paolo Bonzini.
5965
5966 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
5967
5968 * data/c.m4 (b4_null, b4_case): Define.
5969 * src/output.c (prepare_symbols): Use b4_null.
5970 (user_actions_output): Use b4_case.
5971
5972 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
5973
5974 * data/glr.c (b4_shared_declarations): Put start-header first,
5975 before any #includes that we generate, so that feature-test
5976 macros work. Problem reported by Michael Deutschmann in
5977 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
5978 * data/lalr1.cc: Likewise.
5979 * doc/bison.texinfo (Prologue): Document that feature-test macros
5980 should be defined before any Bison declarations.
5981 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
5982 that depend on location.hh after, not before, Bison decls, since
5983 we now include location.hh after the first user prologue.
5984
5985 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
5986 Sander Brandenburg in
5987 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
5988 Also, fix minor white space and comment issues.
5989 (Prologue): Mention that it's better to define feature-test macros
5990 before Bison declarations. Problem reported by Michael Deutschmann.
5991
5992 * README-cvs: Fix typo: "&" should be "&&". Problem reported
5993 by Jim Meyering.
5994 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
5995 This adjusts to recent gnulib changes.
5996
5997 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5998
5999 Finish implementation of per-type %destructor/%printer. Discussed
6000 starting at
6001 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6002 and
6003 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6004 * NEWS (2.3+): Add a description of this feature to the default
6005 %destructor/%printer description.
6006 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6007 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6008 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6009 list node contains a semantic type.
6010 * src/symtab.c, src/symtab.h: Extend with a table that associates
6011 semantic types with their %destructor's and %printer's.
6012 (semantic_type_from_uniqstr, semantic_type_get,
6013 semantic_type_destructor_set, semantic_type_printer_set): New functions
6014 composing the public interface of that table.
6015 (symbol_destructor_get, symbol_destructor_location_get,
6016 symbol_printer_get, symbol_printer_location_get): If there's no
6017 per-symbol %destructor/%printer, look up the per-type before trying
6018 the default.
6019 * tests/actions.at (Per-type %printer and %destructor): New test case.
6020 * tests/input.at (Default %printer and %destructor redeclared):
6021 Extend to check that multiple occurrences of %symbol-default in a
6022 single %destructor/%printer declaration is an error.
6023 (Per-type %printer and %destructor redeclared, Unused values with
6024 per-type %destructor): New test cases.
6025
6026 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6027
6028 Require default %destructor/%printer to be declared using
6029 %symbol-default instead of an empty symbol list, and start working on
6030 new per-type %destructor/%printer. Discussed at
6031 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6032 * NEWS (2.3+): Add %symbol-default to example.
6033 * bison.texinfo (Freeing Discarded Symbols): Likewise.
6034 (Table of Symbols): Add entry for %symbol-default.
6035 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6036 (generic_symlist, generic_symlist_item): New nonterminals for creating
6037 a list in which each item is a symbol, semantic type, or
6038 %symbol-default.
6039 (grammar_declaration): Use generic_symlist in %destructor and %printer
6040 declarations instead of symbols.1 or an empty list.
6041 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6042 for changes to symbol_list.
6043 * src/reader.c: Update for changes to symbol_list.
6044 * src/scan-code.l: Likewise.
6045 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6046 * src/symlist.c, src/symlist.h: Extend such that a list node may
6047 represent a semantic type or a %symbol-default in addition to just an
6048 ordinary symbol. Add switched functions for setting %destructor's and
6049 %printer's.
6050 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6051 %destructor/%printer declarations.
6052
6053 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6054
6055 Whether the default %destructor/%printer applies to a particular symbol
6056 isn't a question of whether the user *declares* that symbol (in %token,
6057 for example). It's a question of whether the user by any means
6058 *defines* the symbol at all (by simply using a char token, for
6059 example). $end is defined by Bison whereas any other token with token
6060 number 0 is defined by the user. The error token is always defined by
6061 Bison regardless of whether the user declares it with %token, but we
6062 may one day let the user define error as a nonterminal instead.
6063 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6064 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6065 the meaning of "user-defined".
6066 * tests/actions.at (Default %printer and %destructor for user-declared
6067 end token): Rename to...
6068 (Default %printer and %destructor for user-defined end token): ...
6069 this.
6070
6071 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6072 computation of whether to apply the default, don't maintain a list of
6073 every Bison-defined symbol. Instead, just check for a first character
6074 of '$', which a user symbol cannot have, and check for the error token.
6075
6076 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6077
6078 Don't apply the default %destructor or %printer to the error token,
6079 $undefined, or $accept. This change fits the general rule that the
6080 default %destructor and %printer are only for user-declared symbols,
6081 and it solves several difficulties that are described in the new test
6082 cases listed below.
6083 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6084 * tests/actions.at (Default %printer and %destructor are not for error
6085 or $undefined, Default %printer and %destructor are not for $accept):
6086 New test cases.
6087
6088 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6089
6090 Allow %start after the first rule.
6091 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6092 when parsing the first rule.
6093 (check_and_convert_grammar): Search for it here after all grammar
6094 declarations have been parsed. Skip midrules, which have dummy LHS
6095 nonterminals.
6096 * src/symtab.c (symbol_is_dummy): New function.
6097 * src/symtab.h (symbol_is_dummy): Declare it.
6098 * tests/input.at (%start after first rule): New test.
6099
6100 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6101
6102 Redo some of the previous commit: add back the ability to use
6103 non-aliased/undeclared string literals since it might be useful to
6104 those declaring %token-table.
6105 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6106 commit: don't worry about complaints from symbols_pack.
6107 * src/symtab.c (symbol_new, symbol_class_set,
6108 symbol_check_alias_consistency): Undo changes in previous commit: count
6109 each string literal as a new symbol and token, assign it a symbol
6110 number, and don't complain about non-aliased string literals.
6111 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6112 and token counts but does still set aliased tokens to the same number,
6113 symbol_pack_processor now leaves empty slots in the symbols array.
6114 Remove those slots.
6115 * tests/regression.at (Undeclared string literal): Remove test case
6116 added in previous commit since non-aliased string literals are allowed
6117 again.
6118 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6119 remove unnecessary string literal declarations.
6120 * tests/sets.at (Firsts): Likewise.
6121
6122 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6123
6124 Don't allow an undeclared string literal, but allow a string literal to
6125 be used before its declaration.
6126 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6127 symbols_pack complained.
6128 * src/symtab.c (symbol_new): Don't count a string literal as a new
6129 symbol.
6130 (symbol_class_set): Don't count a string literal as a new token, and
6131 don't assign it a symbol number since symbol_make_alias does that.
6132 (symbol_make_alias): It's not necessary to decrement the symbol and
6133 token counts anymore. Don't assume that an alias declaration occurs
6134 before any uses of the identifier or string, and thus don't assert that
6135 one of them has the highest symbol number so far.
6136 (symbol_check_alias_consistency): Complain if there's a string literal
6137 that wasn't declared as an alias.
6138 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6139 symbol_pack asserts that every token has been assigned a symbol number
6140 although undeclared string literals have not.
6141 * tests/regression.at (String alias declared after use, Undeclared
6142 string literal): New test cases.
6143 (Characters Escapes, Web2c Actions): Declare string literals as
6144 aliases.
6145 * tests/sets.at (Firsts): Likewise.
6146
6147 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6148
6149 In the grammar scanner, STRING_FINISH unclosed constructs and return
6150 them to the parser in order to improve error messages.
6151 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6152 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6153 * tests/input.at (Unclosed constructs): New test case.
6154 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6155 seen.
6156
6157 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6158 unused global.
6159
6160 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6161
6162 Handle string aliases for character tokens correctly.
6163 * src/symtab.c (symbol_user_token_number_set): If the token has an
6164 alias, check and set its alias's user token number instead of its own,
6165 which is set to indicate the alias. Previously, every occurrence of
6166 the character token in the grammar overwrote that alias indicator with
6167 the character code.
6168 * tests/input.at (String aliases for character tokens): New test.
6169
6170 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6171
6172 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6173
6174 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6175
6176 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6177 to prevent failures when building on older platforms.
6178 Check for autopoint failure.
6179 Set XGETTEXT_OPTIONS to values that check for C format strings,
6180 so that translators are warned about them (this also helps
6181 prevent core dumps).
6182
6183 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6184 function, since it simplifies our code a bit.
6185
6186 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6187 rather than -W, so we don't get bogus warnings about sign comparisons.
6188 Add -Wpointer-arith, since that warning is useful (it reports code
6189 that does not conform to C89 and that some compilers reject).
6190 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6191 since it's no longer needed.
6192
6193 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6194
6195 Clean up scanners a bit.
6196 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6197 definitions so gcc won't warn when obstack_for_string is unused.
6198 * src/scan-code.l: config.h and system.h are already #include'd by
6199 scan-code-c.c, so get rid of them here.
6200 * src/scan-gram.l: Likewise.
6201 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6202 definitions rather than duplicating the rest of it.
6203 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6204
6205 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6206
6207 Suppress signed/unsigned comparison warnings for yycheck.
6208 * data/c.m4 (b4_safest_int_type): New macro.
6209 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6210 a signed int type, cast it to b4_safest_int_type first.
6211 * data/yacc.c: Likewise.
6212 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6213 also overwritten.
6214
6215 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6216
6217 * doc/bison.texinfo: Fix some typos.
6218
6219 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6220
6221 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6222 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6223
6224 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6225 the latest gnulib does this a different way.
6226 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6227 translation was patched, so stop omitting it.
6228
6229 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6230
6231 Enable declaration of default %printer/%destructor. Make the parser
6232 use these for all user-declared grammar symbols for which the user does
6233 not declare a specific %printer/%destructor. Thus, the parser uses it
6234 for token 0 if the user declares it but not if Bison generates it as
6235 $end. Discussed starting at
6236 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6237 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6238 and
6239 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6240 * NEWS (2.3+): Mention.
6241 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6242 declare a %destructor for a mid-rule's semantic value. It's just
6243 impossible to declare one specific to it.
6244 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6245 code. Describe default %destructor form.
6246 * src/parse-gram.y (grammar_declaration): Parse default
6247 %printer/%destructor declarations.
6248 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6249 and symbol_destructor_location_get rather than accessing the destructor
6250 and destructor_location members of struct symbol.
6251 (symbol_printers_output): Likewise but for %printer's.
6252 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6253 again.
6254 * src/symtab.c (default_destructor, default_destructor_location,
6255 default_printer, default_printer_location): New static global
6256 variables to record the default %destructor and %printer.
6257 (symbol_destructor_get, symbol_destructor_location_get,
6258 symbol_printer_get, symbol_printer_location_get): New functions to
6259 compute the appropriate %destructor and %printer for a symbol.
6260 (default_destructor_set, default_printer_set): New functions to set the
6261 default %destructor and %printer.
6262 * src/symtab.h: Prototype all those new functions.
6263 * tests/actions.at (Default %printer and %destructor): New test to
6264 check that the right %printer and %destructor are called, that they're
6265 not called for $end, and that $$ and @$ work correctly.
6266 (Default %printer and %destructor for user-declared end token): New
6267 test to check that the default %printer and %destructor are called for
6268 a user-declared end token.
6269 * tests/input.at (Default %printer and %destructor redeclared, Unused
6270 values with default %destructor): New tests to check related grammar
6271 warnings and errors.
6272
6273 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6274
6275 Clean up handling of %destructor for the end token (token 0).
6276 Discussed starting at
6277 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6278 and
6279 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6280
6281 Make the skeletons consistent in how they pop the end token and invoke
6282 its %destructor.
6283 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6284 state, which has token number 0, since this would invoke the
6285 %destructor for the end token.
6286 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6287 until after shifting the end token, or else it won't be popped.
6288 * data/yacc.c (yyparse): Likewise.
6289
6290 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6291 it's the end token. Upon termination, destroy an unshifted lookahead
6292 even when it's the end token.
6293 * data/lalr1.cc (yy::parser::parse): Likewise.
6294 * data/yacc.c (yyparse): Likewise.
6295
6296 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6297 value warnings for the end token when the user gives the end token a
6298 %destructor.
6299
6300 * tests/actions.at (Printers and Destructors): Test all the above.
6301
6302 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6303
6304 Update to latest gnulib and gettext versions.
6305 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6306 Add fopen-safer.
6307 (gnulib_files): Add m4/warning.m4. Don't worry about files
6308 overwritten by autopoint.
6309 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6310 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6311 rejects them.
6312 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6313 so that we can remove the intl files at a better time.
6314 (intl_files_to_remove): Remove aclocal.m4, since it gets
6315 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6316 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6317 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6318 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6319 Remove datarootdir hack; no longer needed.
6320 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6321 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6322 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6323 strdup.h.
6324 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6325 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6326
6327 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
6328
6329 * bootstrap: Adjust to today's change to gnulib-tool by invoking
6330 it with --assume-autoconf='latest-stable'.
6331
6332 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
6333
6334 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6335 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6336 YYSTYPE' and `{'.
6337 * src/muscle_tab.h (muscle_grow): Replace the header comments with
6338 those from muscle_tab.c since the old ones are misleading.
6339
6340 2006-07-13 Akim Demaille <akim@epita.fr>
6341
6342 Support %define "KEY" {VALUE}.
6343 * src/scan-code.h, src/scan-code.l (translate_action)
6344 (translate_rule_action, translate_symbol_action, translate_code):
6345 Return char *, not const char *.
6346 * src/parse-gram.y (declaration): Rename as...
6347 (prologue_declaration): this.
6348 (string_content): Remove this nonterminal, use STRING.
6349 (braceless, content, content.opt): New nonterminal.
6350 Use them.
6351 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6352 as value.
6353 * src/scan-gram.l (getargs.h): Don't include it.
6354
6355 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
6356
6357 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6358 rather than a for-loop that declares a local bool variable. This
6359 should work around a compatibility problem with a Cray x1e C++
6360 compiler reported by Hung Nguyen in
6361 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6362 The for-loop was introduced in the 2004-11-17 change but I don't
6363 know why it was needed.
6364
6365 2006-07-12 Akim Demaille <akim@epita.fr>
6366
6367 * data/c.m4: Comment changes.
6368
6369 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
6370
6371 * src/complain.c (error_message, ERROR_MESSAGE): New.
6372 To factor...
6373 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6374 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6375
6376 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6377
6378 * NEWS: Instead of %union, you can define and use your own union type
6379 YYSTYPE if your grammar contains at least one <type> tag.
6380 Your YYSTYPE need not be a macro; it can be a typedef.
6381 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6382 (Union Decl, Decl Summary): Document this.
6383 * data/glr.c (YYSTYPE): Implement this.
6384 * data/glr.cc (YYSTYPE): Likewise.
6385 * data/lalr1.cc (YYSTYPE): Likewise.
6386 * data/yacc.c (YYSTYPE): Likewise.
6387 * src/output.c (prepare): Output tag_seen_flag.
6388 * src/parse-gram.y (declaration, grammar_declaration):
6389 Use 'union_seen' rather than 'typed' to determine whether
6390 %union has been seen, since grammars can now be typed without
6391 %union.
6392 (symbol_declaration, type.opt, symbol_def):
6393 Keep track of whether a tag has been seen.
6394 * src/reader.c (union_seen, tag_seen): New vars.
6395 (typed): remove.
6396 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6397 * src/scan-code.l (untyped_var_seen): New variable.
6398 (handle_action_dollar): Adjust to above changes.
6399 (handle_action_dollar, handle_action_at):
6400 Improve overflow checking for outlandish numbers.
6401 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6402 avoid new diagnostics generated by above changes.
6403 * tests/regression.at (YYSTYPE typedef): Add test to check
6404 for type tags without %union.
6405
6406 * src/symlist.c (symbol_list_length): Return int, not unsigned
6407 int, since callers expect int. This may need to get revisited
6408 once we have proper integer overflow checking.
6409
6410 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6411 object is now static.
6412
6413 * src/getargs.c (flags_argmatch): Return void, not int,
6414 to pacify ./configure --enable-gcc-warnings.
6415
6416 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6417 since last_string is already defined to FLEX_PREFIX (last_string).
6418
6419 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6420
6421 Implement --warnings/-W.
6422 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6423 replaced by...
6424 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6425 Adjust callers.
6426 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6427 (warnings_args, warnings_types): New.
6428 (getargs, short_options, long_options): Accept -W/--warnings.
6429 Sort the options by alphabetical order, upper case letter right
6430 before its lower case.
6431
6432 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6433
6434 Change %merge result type clash warnings to errors. Discussed at
6435 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6436 * src/reader.c (record_merge_function_type): Use complain_at.
6437 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6438 declared later): Update test case results.
6439
6440 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6441
6442 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6443 to be in alphabetical order.
6444 (trace_args): Spelling fixes.
6445
6446 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6447
6448 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6449 so they don't collide with user-defined macros.
6450 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6451 this was never guaranteed, and now that we're using gnulib stdint,
6452 which defines int_fast16_t to long int, the problem is exposed.
6453
6454 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6455
6456 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6457 need the full POSIX semantics (and weren't implementing them
6458 anyway).
6459
6460 Adjust to Autoconf 2.60 and today's gnulib.
6461 * bootstrap (gnulib_modules): Add stdint.
6462 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6463 no longer copies it.
6464 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6465 since stdint needs the former and wcwidth (which is now required
6466 by mbswidth) needs the latter.
6467 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6468 work around a compatibility glitch between gettext 0.14.6 and
6469 Autoconf 2.60.
6470 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6471 Do not check for uintptr_t, since new stdint module does the right
6472 thing.
6473 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6474 Add stdint.h, stdint_.h, wcwidth.h.
6475 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6476 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6477 stdint.m4, wchar_t.m4, wcwidth.m4.
6478 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6479 usual order for ../lib/*.h files.
6480 (file_name_split): Use last_component, not base_name, to adjust
6481 to gnulib changes.
6482 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6483 for ../lib/*.h files.
6484 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6485 Define unconditionally, since we now assume the stdint module.
6486 * src/scan-skel.l: Include <dirname.h>.
6487 (BASE_QPUTS): Use last_component, not base_name.
6488 * src/system.h: Include <unlocked-io.h> in the usual order
6489 for ../lib/*.h files. Include <stdint.h> unconditionally,
6490 since we now use the stdint module.
6491 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6492 HAVE_UINTPTR_T, since we now use the stdint module.
6493 (base_name): Remove decl, since files now include <dirname.h>
6494 to get the decl.
6495
6496 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6497
6498 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6499 New, default to 1.
6500 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6501 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6502 default.
6503 * tests/calc.at: Adjust.
6504
6505 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6506
6507 * data/c.m4 (b4_basename): New.
6508 (b4_syncline): Also output the location of its invocation (from
6509 the skeleton).
6510 (b4_user_action, b4_define_user_action, b4_user_actions)
6511 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6512 (b4_user_stype): New.
6513 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6514
6515 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6516
6517 In the grammar file, the first column is 1 not 0 on the first line as
6518 on every other line.
6519 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6520 * tests/input.at (Torturing the Scanner): Update output.
6521
6522 * src/scan-gram.l (scanner_cursor): Declare it static.
6523
6524 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6525
6526 In warnings, say "previous declaration" rather than "first
6527 declaration".
6528 * src/symtab.c (redeclaration): Do that here.
6529 * src/reader.c (record_merge_function_type): In the case of a result
6530 type clash, report the previous declaration rather than the very first
6531 one in the grammar file.
6532 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6533 declared later): Add a third declaration to check this behavior.
6534 * tests/input.at (Incompatible Aliases): Update output.
6535
6536 2006-06-27 Akim Demaille <akim@epita.fr>
6537
6538 * doc/Doxyfile.in: New.
6539 * doc/Makefile.am: Use it.
6540 * src/lalr.h, src/symtab.h: Initial doxygenation.
6541
6542 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6543
6544 Don't miss %merge result type warnings just because the LHS types are
6545 declared after the %merge. This continues the effort of the previous
6546 patch.
6547 * src/reader.c (get_merge_function): Don't set the merger type yet.
6548 (record_merge_function_type): New function for setting the merger type
6549 and checking for clashes.
6550 (grammar_current_rule_merge_set): Set the location of the %merge for
6551 the current rule.
6552 (packgram): Invoke record_merge_function_type for each rule now that
6553 all symbol type declarations have been parsed.
6554 * src/reader.h (merger_list.type_declaration_location): New member
6555 storing the location of the first %merge from which the type for this
6556 merging function was derived.
6557 * src/symlist.h (symbol_list.merger_declaration_location): New member
6558 storing the location of a rule's %merge, if any.
6559 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6560 declared later): New test to catch the error fixed by the above patch.
6561
6562 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6563
6564 Get action warnings (grammar_rule_check) right even when symbol
6565 declarations appear after the rules. Discussed at
6566 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6567 and
6568 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6569 Don't mistake the type of $$ in a midrule to be that of its parent
6570 rule's $$.
6571 * src/reader.c (grammar_current_rule_end): Don't invoke
6572 grammar_rule_check yet since not all symbol declarations may have been
6573 parsed yet.
6574 (grammar_midrule_action): Likewise.
6575 Don't record whether the midrule's $$ has been used yet since actions
6576 haven't been translated yet.
6577 Record the midrule's parent rule and its RHS index within the parent
6578 rule.
6579 (grammar_current_rule_action_append): Don't translate the action yet
6580 since not all symbol declarations may have been parsed yet and, thus,
6581 warnings about types for $$, $n, @$, and @n can't be reported yet.
6582 (packgram): Translate the action and invoke grammar_rule_check now that
6583 all symbol declarations have been parsed.
6584 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6585 after parsing the entire grammar file, the symbol list here in the case
6586 of a midrule is actually the midrule's empty RHS, so reference its
6587 parent rule's RHS where necessary.
6588 On the other hand, now that you can already know it's a midrule, you
6589 aren't forced to think $$ has the same type as its parent rule's $$.
6590 (handle_action_at): In the case of a midrule, reference the parent rule
6591 where necessary.
6592 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6593 members.
6594 (symbol_list_length): Now that this is invoked after all rules have
6595 been parsed, a NULL symbol (rather than a NULL symbol list node)
6596 terminates a rule. symbol_list_print already does this correctly.
6597 * src/symlist.h (symbol_list.midrule_parent_rule,
6598 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6599 remember their relationships with their parents.
6600 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6601 fixed by the above patch.
6602 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6603 implementing...
6604 (Unused values): ... this old test case and...
6605 (Unused values before symbol declarations): ... this new test case.
6606 This one is the same as `Unused values' except that all symbol
6607 declarations appear after the rules in order to catch the rest of the
6608 errors fixed by the above patch.
6609
6610 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6611
6612 More cleanup.
6613 * src/reader.c (current_rule): Declare it static since it's no longer
6614 used outside this file.
6615 (grammar_current_rule_action_append): Remove redundant arguments from
6616 translate_rule_action invocation.
6617 * src/reader.h (current_rule): Remove this unused extern.
6618 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6619 * src/scan-code.l (translate_rule_action): Likewise.
6620
6621 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6622
6623 Clean up yesterday's patch.
6624 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6625 to...
6626 * src/reader.c (grammar_current_rule_action_append): ... here for
6627 consistency with grammar_current_rule_symbol_append.
6628 * tests/regression.at (Braced code in declaration in rules section):
6629 Make yyerror and yylex static as usual.
6630
6631 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6632
6633 Fix bug that mistakes braced code in a declaration in the rules section
6634 to be a rule action. Mentioned at
6635 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6636 * src/scan-gram.l: Move midrule action detection from the start of the
6637 scanning of any braced code to...
6638 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6639 action. For readability, use $2 and @2 rather than the equivalent
6640 global variables.
6641 * tests/regression.at (Braced code in declaration in rules section):
6642 New test to catch the error fixed by the above patch.
6643
6644 Work on code readability some.
6645 * src/scan-code.l (current_rule): Get rid of this misleading and
6646 redundant declaration: it's actually extern'ed in reader.h.
6647 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6648 translate_action): Add a rule argument and use it instead of the global
6649 current_rule.
6650 (translate_rule_action): This already receives current_rule through an
6651 argument, so pass it on to translate_action instead of assigning
6652 current_rule to current_rule.
6653 (translate_symbol_action, translate_code): Pass rule = NULL to
6654 translate_action.
6655
6656 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6657
6658 Rename %before-definitions to %start-header and %after-definitions to
6659 %end-header. Don't use these declarations to separate pre-prologue
6660 blocks from post-prologue blocks. Add new order-independent
6661 declarations %before-header and %after-header as alternatives to the
6662 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6663 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6664 * NEWS (2.3+): Update for these changes.
6665 * data/glr.c (b4_before_definitions): Update to...
6666 (b4_start_header): ... this.
6667 (b4_after_definitions): Update to...
6668 (b4_end_header): ... this.
6669 * data/glr.cc: Likewise.
6670 * data/lalr1.cc: Likewise.
6671 * data/yacc.c: Likewise.
6672 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6673 prologue blocks with %*-header declarations.
6674 (Calc++ Parser): Likewise.
6675 (Decl Summary): Update names.
6676 (Table of Symbols): Update description.
6677 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6678 (PERCENT_END_HEADER): ... this.
6679 (PERCENT_BEFORE_DEFINITIONS): Update to...
6680 (PERCENT_START_HEADER): ... this.
6681 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6682 (declaration): Update token names and m4 macro names.
6683 When parsing %end-header and %start-header, invoke translate_code
6684 before muscle_code_grow, and no longer set global booleans to remember
6685 whether these declarations have been seen.
6686 Parse new %after-header and %before-header.
6687 * src/reader.c (before_definitions, after_definitions): Remove.
6688 (prologue_augment): Accept a new bool argument to specify whether to
6689 augment the pre-prologue or post-prologue.
6690 * src/reader.h (before_definitions, after_definitions): Remove these
6691 extern's.
6692 (prologue_augment): Add new bool argument.
6693 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6694 (PERCENT_END_HEADER): ... this.
6695 (PERCENT_BEFORE_DEFINITIONS): Update to...
6696 (PERCENT_START_HEADER): ... this.
6697 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6698 * tests/actions.at (Printers and Destructors): Update names.
6699
6700 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6701
6702 Add comparison operators for C++ location classes. Discussed at
6703 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6704 * data/c++.m4 (b4_define_location_comparison): New boolean %define
6705 declaration indicating whether filename_type has an operator==. If
6706 filename_type is `std::string', it defaults to `1', `0' otherwise.
6707 * data/location.cc: Iff b4_define_location_comparison is `1', add
6708 operator== and operator!= for class position and for class location.
6709
6710 Some minor fixes.
6711 * src/scan-action.l: Remove unused file.
6712 * src/symtab.c (symbol_printer_set): Use printer_location not
6713 destructor_location.
6714 * src/symtab.h (struct symbol): Replace incorrect source comment for
6715 printer members.
6716 * tests/input.at (Incompatible Aliases): Update output with correct
6717 printer location.
6718
6719 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
6720
6721 Don't put the pre-prologue in the header file. For the yacc.c code
6722 file and the glr.c header and code files, move the pre-prologue before
6723 the token definitions. Add new %before-definitions and
6724 %after-definitions to declare code that will go in both the header file
6725 and code file. Discussed at
6726 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
6727 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
6728 and
6729 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
6730 * NEWS (2.3+): Describe these changes.
6731 * data/glr.c (b4_pre_prologue): Move from within to before...
6732 (b4_shared_declarations): ... this.
6733 Add new b4_before_definitions before b4_token_enums.
6734 Add new b4_after_definitions at the end.
6735 * data/glr.cc (b4_pre_prologue): Replace with...
6736 (b4_before_definitions): ... this in the header file.
6737 (b4_after_definitions): New near the end of the header file.
6738 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
6739 code file right before including the header file.
6740 (b4_before_definitions): New in the previous position of
6741 b4_pre_prologue in the header file.
6742 (b4_after_definitions): New near the end of the header file.
6743 * data/yacc.c: Clean up some m4 quoting especially in the header file.
6744 (b4_token_enums_defines): In the code file, move to right before
6745 YYSTYPE for consistency with the header file.
6746 (b4_before_definitions): New right before b4_token_enums_defines in
6747 both the header and code file.
6748 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
6749 header and code file.
6750 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
6751 of prologues for %union dependencies.
6752 (Decl Summary): In %defines description, mention the effect of
6753 %before-definitions and %after-definitions on the header file.
6754 (Calc++ Parser): Forward declare driver in a %before-definitions rather
6755 than in the pre-prologue so that make check succeeds.
6756 (Table of Symbols): Add entries for %before-definitions and
6757 %after-definitions.
6758 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
6759 %before-definitions.
6760 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
6761 (declaration): Parse those declarations and append to
6762 b4_before_definitions and b4_after_definitions, respectively.
6763 * src/reader.c (before_definitions, after_definitions): New bools to
6764 track whether those declarations have been seen.
6765 (prologue_augment): Add to the post-prologue if %union,
6766 %before-definitions, or %after-definitions has been seen.
6767 * src/reader.h (before_definitions, after_definitions): New extern's.
6768 * src/scan-gram.l: Scan the new declarations.
6769 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
6770 prologue block in a %before-definitions or a %after-definitions based
6771 on whether the %union is declared.
6772 * tests/regression.at (Early token definitions with --yacc, Early token
6773 definitions without --yacc): Move tests for token definitions into the
6774 post-prologue since token names are no longer defined in the
6775 pre-prologue.
6776
6777 2006-06-20 Akim Demaille <akim@epita.fr>
6778
6779 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
6780 (symbol_get): Use it.
6781 * src/parse-gram.y: Use it.
6782
6783 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
6784
6785 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
6786 build succeeds when configured with --enable-gcc-warnings.
6787
6788 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
6789
6790 * src/parse-gram.y (char_name): New function.
6791 (CHAR, STRING, string_content): For %printer, properly escape.
6792 (ID): Prefer fputs to fprintf.
6793 (id): Reindent to be consistent with other rules.
6794 Properly quote char.
6795
6796 The Translation Project changed its way of publishing translations
6797 to maintainers. I haven't received any responses to my request
6798 for supporting the old way, or for documenting the new way. I
6799 have modified 'bootstrap' to use screen scraping
6800 (in this case, HTML scraping). This is unreliable and inelegant,
6801 but I don't see any better way. Yuck.
6802 * bootstrap (TP_URL, WGET_COMMAND): New vars.
6803 (get_translations): New function, which uses HTML scraping to
6804 deduce locations of latest translations.
6805 Use this function to grab both bison and bison-runtime .po files.
6806 Don't bother priming the pump for the runtime-po domain any more,
6807 as it's now translated better than bison is.
6808
6809 2006-06-19 Akim Demaille <akim@epita.fr>
6810
6811 * src/scan-gram.l: No longer "parse" things after `%union' until
6812 `{'. Rather, return a single "%union" token.
6813 No longer make symbols: return strings, and leave the conversion
6814 to symbols to the parser.
6815 (SC_PRE_CODE, token_type): Remove.
6816 * src/parse-gram.y (%union): New field `character'.
6817 Sort tokens.
6818 (CHAR): New token.
6819 (ID, ID_COLON): Now that the scanner no longer makes them
6820 identifiers, adjust all uses to invoke symbol_get.
6821 (id_colon): New, wraps the conversion from string to symbol.
6822 (%union): Accept a possible union_name.
6823 (symbol): Now can be a char.
6824 * data/c.m4 (b4_union_name): Leave a default value.
6825 * data/glr.c, data/yacc.c: Use it.
6826
6827 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
6828
6829 For associating token numbers with token names for "yacc.c", don't use
6830 #define statements unless `--yacc' is specified; always use enum
6831 yytokentype. Most important discussions start at:
6832 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
6833 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
6834 and
6835 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
6836 * NEWS (2.3+): Mention.
6837 * data/c.m4 (b4_yacc_if): New.
6838 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
6839 token #define's.
6840 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
6841 on token name definitions.
6842 * src/getargs.c (usage): Capitalize `Yacc' in English.
6843 * src/output.c (prepare): Define b4_yacc_flag.
6844 * tests/regression.at (Early token definitions): Test that tokens names
6845 are defined before the pre-prologue not just before the post-prologue.
6846 Remove this test case and copy to...
6847 (Early token definitions with --yacc): ... this to test #define's.
6848 (Early token definitions without --yacc): ... and this to test enums.
6849
6850 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
6851
6852 * NEWS: Reword the post-2.3 change to not be so optimistic about
6853 removing the old "look-ahead" spelling.
6854 Update previous look-ahead/lookahead change reports.
6855 * REFERENCES: look-ahead -> lookahead (since that's
6856 what he actually wrote).
6857 * doc/refcard.tex: look ahead -> lookahead,
6858 look-ahead -> lookahead
6859
6860 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
6861
6862 For consistency, use `lookahead' instead of `look-ahead' or
6863 `look_ahead'. Discussed starting at
6864 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
6865 and then at
6866 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
6867 * NEWS: For the next release, note the change to `--report'.
6868 * TODO, doc/bison.1: Update English.
6869 * doc/bison.texinfo: Update English.
6870 (Understanding Your Parser, Bison Options): Document as
6871 `--report=lookahead' rather than `--report=look-ahead'.
6872 * src/conflicts.c: Update English in comments.
6873 (lookahead_set): Rename from look_ahead_set.
6874 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
6875 (resolve_sr_conflict): Rename local look_ahead_tokens to
6876 lookahead_tokens, and update other uses.
6877 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
6878 count_rr_conflicts, conflicts_free): Update uses.
6879 * src/getargs.c (report_args): Move "lookahead" before alternate
6880 spellings.
6881 (report_types): Update uses.
6882 (usage): For `--report' usage description, state `lookahead' spelling
6883 rather than `look-ahead'.
6884 * src/getargs.h (report.report_lookahead_tokens): Rename from
6885 report_look_ahead_tokens.
6886 * src/lalr.c: Update English in comments.
6887 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
6888 (state_lookahead_tokens_count): Rename from
6889 state_look_ahead_tokens_count.
6890 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6891 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
6892 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6893 Update other uses.
6894 Update English in output.
6895 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
6896 * src/print.c: Update English in comments.
6897 (lookahead_set): Rename from look_ahead_set.
6898 (print_reduction): Rename argument lookahead_token from
6899 look_ahead_token.
6900 (print_core, state_default_rule, print_reductions, print_results):
6901 Update uses.
6902 * src/print_graph.c: Update English in comments.
6903 (print_core): Update uses.
6904 * src/state.c: Update English in comments.
6905 (reductions_new): Update uses.
6906 (state_rule_lookahead_tokens_print): Rename from
6907 state_rule_look_ahead_tokens_print, and update other uses.
6908 * src/state.h: Update English in comments.
6909 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
6910 (state_rule_lookahead_tokens_print): Rename from
6911 state_rule_look_ahead_tokens_print.
6912 * src/tables.c: Update English in comments.
6913 (conflict_row, action_row): Update uses.
6914 * tests/glr-regression.at
6915 (Incorrect lookahead during deterministic GLR,
6916 Incorrect lookahead during nondeterministic GLR): Rename
6917 print_look_ahead to print_lookahead.
6918 * tests/torture.at: Update English in comments.
6919 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
6920 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
6921 (Many lookahead tokens): Update uses.
6922 * data/glr.c: Update English in comments.
6923 * lalr1.cc: Likewise.
6924 * yacc.c: Likewise.
6925 * src/conflicts.h: Likewise.
6926 * src/lalr.h: Likewise.
6927 * src/main.c: Likewise.
6928 * src/output.c: Likewise.
6929 * src/parse-gram.c: Likewise.
6930 * src/tables.h: Likewise.
6931 * tests/calc.at: Likewise.
6932
6933 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
6934
6935 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
6936
6937 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
6938
6939 * TODO: Add request from Nelson H. F. Beebe to be able to install
6940 Bison without installing the yacc script.
6941
6942 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6943
6944 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
6945 and yytext if they're already #define'd.
6946 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
6947 * src/scan-code-c.c: ... here.
6948 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
6949 <config.h>.
6950
6951 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6952
6953 Get Bison to build again when configured with --enable-gcc-warnings.
6954 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
6955 missing #include's.
6956 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
6957 loc argument as it shadows a global.
6958 * src/scan-gram.l: Remove stray comma that prevents boundary_set
6959 invocation.
6960
6961 * src/.cvsignore: Add scan-code.c.
6962
6963 2006-06-07 Akim Demaille <akim@epita.fr>
6964
6965 * src/scan-gram.l: Move the "add a trailing ; to actions" code
6966 to...
6967 * src/scan-code.l: here.
6968 * tests/input.at (Torturing the Scanner): Fix another location
6969 error.
6970
6971 2006-06-07 Akim Demaille <akim@epita.fr>
6972
6973 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
6974
6975 2006-06-06 Akim Demaille <akim@epita.fr>
6976
6977 Extract the parsing of user actions from the grammar scanner.
6978 As a consequence, the relation between the grammar scanner and
6979 parser is much simpler. We can also split "composite tokens" back
6980 into simple tokens.
6981 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
6982 * src/scan-gram.l (add_column_width, adjust_location): Move to and
6983 rename as...
6984 * src/location.h, src/location.c (add_column_width)
6985 (location_compute): these.
6986 Fix the column count: the initial column is 0.
6987 (location_print): Be robust to ending column being 0.
6988 * src/location.h (boundary_set): New.
6989 * src/main.c: Adjust to scanner_free being renamed as
6990 gram_scanner_free.
6991 * src/output.c: Include scan-code.h.
6992 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
6993 Use boundary_set.
6994 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
6995 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
6996 which is now, again, a separate token.
6997 Adjust all dependencies.
6998 Whereever actions with $ and @ are used, use translate_code.
6999 (action): Remove this nonterminal which is now useless.
7000 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7001 (grammar_current_rule_action_append): Use translate_code.
7002 (packgram): Bound check ruleno, itemno, and rule_length.
7003 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7004 (last_string, last_braced_code_loc, max_left_semantic_context)
7005 (scanner_initialize, scanner_free, scanner_last_string_free)
7006 (gram_out, gram_lineno, YY_DECL_): Move to...
7007 * src/scan-gram.h: this new file.
7008 (YY_DECL): Rename as...
7009 (GRAM_DECL): this.
7010 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7011 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7012 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7013 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7014 Move these declarations, and...
7015 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7016 these to...
7017 * src/flex-scanner.h: this new file.
7018 * src/scan-gram.l (rule_length, rule_length_overflow)
7019 (increment_rule_length): Remove.
7020 (last_braced_code_loc): Rename as...
7021 (gram_last_braced_code_loc): this.
7022 Adjust to the changes of the parser.
7023 Move all the handling of $ and @ into...
7024 * src/scan-code.l: here.
7025 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7026 (handle_action_dollar, handle_action_at): Move to...
7027 * src/scan-code.l: here.
7028 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7029 scan-code.h, scan-code-c.c, scan-gram.h.
7030 (EXTRA_bison_SOURCES): Add scan-code.l.
7031 (BUILT_SOURCES): Add scan-code.c.
7032 (yacc): Be robust to white spaces.
7033
7034 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7035 * tests/regression.at: Adjust the column numbers.
7036 * tests/regression.at: Adjust the error message.
7037
7038 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7039
7040 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7041 Use Akim's wording from
7042 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7043
7044 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7045
7046 Between Bison releases, manually append `+' to the previous Bison
7047 release number, and use that as a signal to automatically print the
7048 ChangeLog's CVS Id keyword from --version. Discussed starting at
7049 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7050 * ChangeLog: Add Id header.
7051 * configure.ac (AC_INIT): Append `+' to `2.3'.
7052 * src/.cvsignore: Add revision.c.
7053 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7054 (BUILT_SOURCES): Add revision.c.
7055 (revision.c): New target rule. This file defines a new global variable
7056 named revision. It initializes it with either the Id from ChangeLog
7057 or, if VERSION doesn't contain `+', with the empty string.
7058 * src/getargs.c (version): Print the value of revision.
7059 * src/revision.h: Extern revision.
7060
7061 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7062
7063 * NEWS: Version 2.3.
7064 * configure.ac (AC_INIT): Likewise.
7065
7066 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7067
7068 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7069 with no arguments, not as an object-like macro. This is for
7070 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7071 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7072 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7073 Document this.
7074
7075 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7076
7077 * src/getargs.c (usage): Back out yesterday's modification of the
7078 --help output so that we don't have to wait for translation before
7079 releasing 2.3.
7080
7081 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7082
7083 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7084 Problem reported by Akim Demaille.
7085
7086 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7087
7088 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7089
7090 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7091
7092 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7093 generated source code. Problem reported by Frans Englich in
7094 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7095
7096 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7097
7098 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7099 shell, not within 'make', so that 'make' by an ordinary builder
7100 (using GNU make) does not worry about configuring gzip. This also
7101 works around a bug reported independently by Keith Thompson and by
7102 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7103 stderr rather than stdout, messing up the build logs.
7104
7105 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7106
7107 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7108 to make sure that YYID will never be unused. This fixes a 'make
7109 maintainer-check' failure caused by the recent changes to the 'Trivial
7110 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7111 not used.
7112 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7113
7114 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7115
7116 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7117 state before an empty RHS is always resolved here. Only the location
7118 of that state is guaranteed to be resolved, and that's enough. This
7119 fixes the remaining bug reported by Derek M. Jones in
7120 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7121 * tests/glr-regression.at (Uninitialized location when reporting
7122 ambiguity): Test the above case.
7123 Also, the embedded comments in this test case claim it checks the case
7124 of an empty RHS that has inherited the initial location. However, the
7125 corresponding LHS was already resolved, so yyresolveLocations didn't
7126 actually have reason to modify it. Fix this by forcing
7127 nondeterministic operation at the beginning of the parse.
7128
7129 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7130
7131 * data/c.m4 (b4_yy_symbol_print_generate):
7132 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7133 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7134 of the bugs reported today by Derek M Jones in
7135 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7136 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7137 defined to be a type name without parens or brackets.
7138 (Location Type): Similarly for YYLTYPE.
7139 * tests/regression.at (Trivial grammars): Put in a test for this
7140 bug that will be caught by 'make maintainer-check' (though not,
7141 alas, by 'make check' unless your compiler is picky).
7142
7143 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7144
7145 * NEWS: Version 2.2.
7146 * configure.ac (AC_INIT): Likewise.
7147
7148 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7149
7150 * data/glr.c (yyreportTree): Make room in yystates for the state
7151 preceding the RHS. This fixes the segmentation fault reported by Derek
7152 M. Jones in
7153 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7154 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7155 to the user. Reported for yyreportTree by Derek M. Jones later in the
7156 same thread.
7157 * THANKS: Add Derek M. Jones.
7158 Update my email address.
7159 Fix typo in Steve Murphy's name.
7160
7161 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7162
7163 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7164 checking against YYLAST that caused the parser to miss a potential
7165 alternative in its diagnostic.
7166 Problem reported by Maria Jose Moron Fernandez in
7167 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7168 * data/lalr1.cc (yysyntax_error_): Likewise.
7169 * data/yacc.c (yysyntax_error): Likewise.
7170 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7171 tokens, in case we run into an older C compiler.
7172 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7173 Use them to check for the off-by-one error fixed above.
7174
7175 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7176 YYSIZE_T, not size_t.
7177 * tests/regression.at (Trivial grammars): New test, to catch
7178 the error fixed by the above patch.
7179
7180 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7181
7182 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7183 scheme.
7184 Reported by Steve Murphy.
7185
7186 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7187
7188 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7189 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7190
7191 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7192
7193 Implement --trace=m4.
7194 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7195 * src/output.c (output_skeleton): When set, pass -dV to m4.
7196
7197 Factor the handling of flags in m4.
7198 * src/output.c (prepare): Rename the muscle names debug, defines,
7199 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7200 * data/c.m4: Adjust.
7201 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7202 Use b4_define_flag_if to define other b4_FLAG_if macros.
7203 (b4_location_if): As a consequence, rename as...
7204 (b4_locations_if): this, for consistency.
7205 Adjust all the skeletons.
7206
7207 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7208
7209 * etc/bench.pm: Shorten bench names.
7210
7211 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7212
7213 * src/output.h, src/output.c (error_verbose): Move to...
7214 * src/getargs.h, src/getargs.c: here.
7215 Sort the flags.
7216 Adjust dependencies.
7217
7218 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7219
7220 * data/c.m4 (b4_copyright): Put the special exception for Bison
7221 skeletons here, so we don't have to put it in each skeleton. All
7222 uses changed. Suggested by Akim Demaille. Also, wrap the
7223 copyright notice, in case it is longer than 80 columns. Replace
7224 comma by newline after title.
7225
7226 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7227
7228 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7229 incompatibility, not a bug. Mention that it wasn't fixed as of
7230 flex 2.5.33.
7231
7232 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7233
7234 * examples/extexi: Enforce the precedence of concatenation over
7235 >>.
7236 Reported by Tommy Nordgren.
7237
7238 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7239
7240 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7241 with the member "token".
7242 Reported by Martin Nylin.
7243
7244 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7245
7246 * data/glr.c: Switch to Bison 2.2 special-exception language in
7247 the copyright notice. Use more-regular format for titles and
7248 copyright notices.
7249 * data/glr.cc: Likewise.
7250 * data/location.cc: Likewise.
7251 * data/yacc.cc: Likewise.
7252 * doc/bison.texinfo (Conditions): Document this.
7253 * NEWS: likewise. Upgrade version to 2.2.
7254
7255 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
7256
7257 * data/glr.cc: Remove dead code.
7258
7259 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7260
7261 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7262 that variable and the line breaks the bootstrap. Problem reported
7263 by Juan M. Guerrero.
7264
7265 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7266
7267 * doc/bison.texinfo (Multiple start-symbols): New.
7268
7269 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7270
7271 * etc/README, etc/bench.pl: New.
7272
7273 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
7274
7275 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7276 rule.
7277 Reported by Mickael Labau.
7278 * tests/input.at (Torturing the Scanner): Test it.
7279
7280 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7281
7282 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7283 Problem reported by Bob Rossi.
7284
7285 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7286
7287 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7288 and didn't really work.
7289 For the index, use @ifnotinfo, not @iftex.
7290 Minor cleanups of spacing and terminology.
7291
7292 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7293
7294 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7295 of AT_NAME_PREFIX when %name-prefix is not used.
7296
7297 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7298
7299 Apply --prefix to C++ skeletons too: they change the namespace.
7300 The test suite already exercize these cases.
7301 * data/c++.m4 (b4_namespace): New.
7302 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7303 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7304 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7305 * doc/bison.texinfo: Document it.
7306 (Option Cross Key): Use @multitable in all formats. It looks
7307 nicer, even in TeX outputs.
7308 (Rules): Use the same code whatever the output type is.
7309 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7310 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7311 * tests/calc.at: Use it, instead of hard coding `yy'.
7312
7313 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7314
7315 * TODO: Remove dead items.
7316
7317 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7318
7319 * doc/FAQ: Remove, merged into...
7320 * doc/bison.texinfo (FAQ): this.
7321 * doc/Makefile.am (EXTRA_DIST): Adjust.
7322
7323 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7324
7325 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7326 even if empty.
7327 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7328 * doc/bison.texinfo (Calc++ Scanner): Use it.
7329
7330 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
7331
7332 Fix two nits reported by twlevo, plus one more that I discovered.
7333
7334 * src/assoc.h (assoc_to_string): Give a name to the arg, as
7335 this is the usual Bison style.
7336 * src/location.h (location_print): Likewise.
7337
7338 * src/reader.h (token_name): Likewise.
7339
7340 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7341
7342 Fix some nits reported by twlevo.
7343 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7344 and "POSIX". Use more-modern syntax for URLs. Mention C++
7345 and ask for Java. Don't hardwire OS version numbers. Add
7346 copyright notice.
7347 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7348 * src/conflicts.c (solved_conflicts_obstack): Now static.
7349
7350 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
7351
7352 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7353 page. Say "you can use it" not "you may use it" as on the web page;
7354 we're describing capabilities not granting permission.
7355
7356 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7357
7358 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7359 shadowing warnings. Use usual patter for iterating through RHS.
7360 * tests/glr-regression.at
7361 (Uninitialized location when reporting ambiguity):
7362 Modify yylex so that it uses its argument, rather than trying
7363 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7364 const char -> char const.
7365
7366 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7367 Don't use tabs inside commands; it messes up 'ps'.
7368 Problem reported by twlevo.
7369
7370 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7371
7372 * tests/glr-regression.at (Uninitialized location when reporting
7373 ambiguity): New test case.
7374 * data/glr.c (yyresolveLocations): New function, which uses
7375 YYLLOC_DEFAULT.
7376 (yyresolveValue): Invoke yyresolveLocations before reporting an
7377 ambiguity.
7378 * doc/bison.texinfo (Default Action for Locations): Note
7379 YYLLOC_DEFAULT's usage for ambiguity locations.
7380 (GLR Semantic Actions): Cross-reference those notes.
7381
7382 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7383
7384 * tests/glr-regression.at (Leaked semantic values when reporting
7385 ambiguity): Remove unnecessary union and type declarations.
7386 (Leaked lookahead after nondeterministic parse syntax error): New test
7387 case.
7388 * data/glr.c (yyparse): Check for zero stacks remaining before
7389 attempting to shift the lookahead so that you don't lose it.
7390
7391 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7392
7393 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7394 * tests/glr-regression.at (Leaked semantic values when reporting
7395 ambiguity): New test case.
7396 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7397 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7398 now unnecessary yystackp parameter.
7399 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7400 destructors can be called.
7401
7402 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7403 in existing testcases.
7404
7405 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7406
7407 Don't leak semantic values for parent RHS when a user action cuts the
7408 parser, and clean up related code a bit.
7409 * tests/glr-regression.at (Leaked merged semantic value if user action
7410 cuts parse): Rename to...
7411 (Leaked semantic values if user action cuts parse): ... this. Add check
7412 for leaked parent RHS values.
7413 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7414 between an unresolved state (non-empty chain of semantic options) and
7415 an incomplete one (signaled by an empty chain).
7416 (yyresolveStates): Document the interface. Move all manipulation of a
7417 successfully or unsuccessfully resolved yyGLRState to...
7418 (yyresolveValue): ... here so that yyresolveValue always leaves a
7419 yyGLRState with consistent data and thus is easier to understand.
7420 Remove the yyvalp and yylocp parameters since they are always just
7421 taken from the yys parameter. When reporting a discarded merged value
7422 in debugging output, note that it is incompletely merged. Document the
7423 interface.
7424 (yyresolveAction): If resolving any of the RHS states fails, destroy
7425 them all rather than leaking them. Thus, as long as user actions are
7426 written to clean up the RHS correctly, yyresolveAction always cleans up
7427 the RHS of a semantic option. Document the interface.
7428
7429 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7430
7431 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7432 led to a segmentation fault in GNU Pascal. Problem reported
7433 by Waldek Hebisch.
7434
7435 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7436
7437 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7438 mid-rule action inside a nonterminal symbol in order to declare a
7439 destructor for its semantic value.
7440
7441 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7442
7443 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7444 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7445 __cplusplus && ! defined _STDLIB_H && !
7446 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7447 defined free))]: Include <stdlib.h> rather than rolling our own
7448 declarations of malloc and free, to avoid problems with
7449 incompatible declarations (using 'throw') C++'s stdlib.h. This
7450 should fix Debian bug 340012
7451 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7452 reported by Guillaume Melquiond.
7453
7454 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7455
7456 * NEWS: Clarify symbols versus types in unused-value warnings.
7457
7458 * configure.ac (AC_INIT): Bump version number.
7459
7460 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7461
7462 * NEWS: Version 2.1a.
7463 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7464 since C99 requires this.
7465
7466 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7467
7468 * m4/c-working.m4: New file.
7469 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7470
7471 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7472
7473 * Makefile.maint: Merge from coreutils.
7474
7475 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7476
7477 More portability fixes for problems summarized by Nelson H. F. Beebe.
7478
7479 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7480 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7481 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7482 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7483 messes up because C++ code is compiled in 32-bit mode but linked
7484 in 64-bit mode.
7485
7486 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7487
7488 More portability fixes for problems summarized by Nelson H. F. Beebe.
7489
7490 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7491 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7492
7493 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7494 nodist_PROGRAMS, since we don't need to actually compile the
7495 example if we're just doing a plain 'make'. This avoids bothering
7496 the installer unnecessarily about problems due to weird C++
7497 compilers.
7498
7499 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7500
7501 More portability fixes for problems summarized by Nelson H. F. Beebe.
7502
7503 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7504 than #include "...", and compile with -I'.'. The old method was
7505 not portable, according to Posix and the C standard, and it does
7506 not work with Sun C 5.7, where previous #line directives affect
7507 the working directory used in later #include "..." directives.
7508
7509 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7510
7511 Various DJGGP specific issues in /djgpp
7512
7513 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7514
7515 More portability fixes for problems summarized by Nelson H. F. Beebe.
7516
7517 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7518 '#include <map>' works and that you can apply ++ to iterators.
7519
7520 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7521
7522 Work around portability problems summarized by Nelson H. F. Beebe in
7523 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7524
7525 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7526 that '#include <string>' works.
7527
7528 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7529 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7530 "warning: sorry: semantics of inline function static data `const
7531 unsigned char translate_table[262]' are wrong (you'll wind up with
7532 multiple copies)".
7533
7534 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7535 or, xor to not_, and_, or_, and xor_, respectively. This works
7536 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7537 random system header somewhere that includes the equivalent of
7538 <iso646.h>.
7539
7540 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7541 -E" works; it apparently doesn't work with PathScale EKO Compiler
7542 Suite Version 2.0.
7543
7544 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7545
7546 During deterministic GLR operation, user actions should be able to
7547 influence the parse by changing yychar. To make this easier to fix and
7548 to make glr.c easier to evolve in general, don't maintain yytoken in
7549 parallel with yychar; just compute yytoken when needed.
7550 * tests/glr-regression.at (Incorrect lookahead during deterministic
7551 GLR): Check that setting yychar in a user action has the intended
7552 effect.
7553 * data/glr.c (yyGLRStack): Remove yytokenp member.
7554 (yyclearin): Don't set *yytokenp.
7555 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7556 yychar rather than *yytokenp to determine the current lookahead.
7557 Compute yytoken locally when needed.
7558 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7559 point to.
7560
7561 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7562 after `--report' documentation.
7563
7564 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7565
7566 * src/parse-gram.y (grammar_declaration): Location of printer
7567 symbol is @1, not list->location. Bug reported by twlevo.
7568 * tests/input.at (Incompatible Aliases): Adjust to above change.
7569
7570 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7571
7572 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7573 all the test at once. This makes the output easier to read in the
7574 normal case.
7575
7576 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7577 got from <http://bro-ids.org/download.html>. The bug is that
7578 when two actions appeared in succession, the second one was
7579 scanned before the first one was added to the grammar rule
7580 as a midrule action. Bison then output the incorrect warning
7581 "parse.y:905.17-906.36: warning: unused value: $3".
7582 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7583 associated with a value.
7584 (rhs): Don't invoke grammar_current_rule_action_append.
7585 (action): Invoke it here instead.
7586 * src/reader.c (grammar_midrule_action): Now extern.
7587 (grammar_current_rule_action_append): Don't invoke
7588 grammar_midrule_action; that is now the scanner's job.
7589 * src/reader.h (last_string, last_braced_code_loc):
7590 (grammar_midrule_action): New decls.
7591 * src/scan-gram.l (last_string): Now extern, sigh.
7592 (last_braced_code_loc): New extern variable.
7593 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7594 rule already has an action.
7595 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7596 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7597 Add some tests to check that the above changes fixed the bug.
7598
7599 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7600
7601 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7602 All used changed. Check whether the symbol has a destructor,
7603 not whether it is typed.
7604 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7605 that the values are still reported as unused. All line numbers
7606 adjusted.
7607
7608 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7609
7610 Work around a bug in bro 0.8, which underparenthesizes its
7611 definition of YYLLOC_DEFAULT.
7612 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7613 their arguments.
7614 * data/lalr1.cc: Likewise.
7615 * data/yacc.cc: Likewise.
7616
7617 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7618
7619 Work around a bug in Pike 7.0, and give the Pike folks a
7620 better way to override the usual int widths.
7621 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7622 user can override the types.
7623 (short): #undef, to work around a bug in Pike 7.0.
7624 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7625 (union yyalloc.yyss): Use yytype_int16 rather than short.
7626 All uses changed.
7627 (yysigned_char): Remove.
7628 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7629 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7630 * tests/regression.at (Web2c Actions): Adjust to above changes.
7631
7632 * src/reader.c (check_and_convert_grammar): New function.
7633 (reader): Close the input file even if something went wrong during
7634 parsing. Minor file descriptor leak reported by twlevo.
7635
7636 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7637 to pacify gcc -Wswitch-default.
7638 * src/scan-gram.l (adjust_location): Use a default: break; case
7639 to pacify gcc -Wswitch-default.
7640 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7641 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7642 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7643 Move these decls to scan-skel.l, since they don't need to be
7644 visible elsewhere.
7645 * src/scan-skel.l: Accept the above decls.
7646 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7647 is used.
7648
7649 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7650
7651 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7652 since we don't want to insist on a version number at the start
7653 of the changelog every time.
7654 * Makefile.maint: Sync from coreutils a bit better.
7655 (sc_trailing_blank): Renamed from sc_trailing_space.
7656 All uses changed.
7657 (sc_no_if_have_config_h, sc_require_config_h):
7658 (sc_prohibit_assert_without_use): New rules.
7659 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7660 (sc_dd_max_sym_length): Fix leading spaces in rule.
7661 (sc_system_h_headers): Prefix with @.
7662 (sc_useless_cpp_parens, m4-check): Output line numbers.
7663 (changelog-check): Allow version only in head.
7664 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7665 satisfy new Makefile.maint rule.
7666 * data/glr.c: Likewise.
7667 * data/glr.cc: Likewise.
7668 * data/lalr1.cc: Likewise.
7669 * data/yacc.c: Likewise.
7670 * lib/ebitsetv.c: Likewise.
7671 * lib/lbitset.c: Likewise.
7672 * lib/subpipe.c: Likewise.
7673 * lib/timevar.c: Likewise.
7674 * src/system.h: Likewise.
7675 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7676 * djgpp/Makefile.maint: Add copyright notice.
7677 * djgpp/README.in: Likewise.
7678 * djgpp/config.bat: Likewise.
7679 * djgpp/config.site: Likewise.
7680 * djgpp/config_h.sed: Likewise.
7681 * djgpp/djunpack.bat: Likewise.
7682 * djgpp/config.sed: Fix copyright notice to match standard format.
7683 * djgpp/subpipe.h: Likewise.
7684 * lib/bitsetv-print.c: Likewise.
7685 * lib/bitsetv.c: Likewise.
7686 * lib/subpipe.h: Likewise.
7687 * lib/timevar.c: Likewise.
7688 * lib/timevar.h: Likewise.
7689 * djgpp/subpipe.c: Use standard recipe for config.h.
7690 * lib/abitset.c: Likewise.
7691 * lib/bitset.c: Likewise.
7692 * lib/bitset_stats.c: Likewise.
7693 * lib/bitsetv-print.c: Likewise.
7694 * lib/bitsetv.c: Likewise.
7695 * lib/ebitsetv.c: Likewise.
7696 * lib/get-errno.c: Likewise.
7697 * lib/lbitset.c: Likewise.
7698 * lib/subpipe.c: Likewise.
7699 * lib/timevar.c: Likewise.
7700 * lib/vbitset.c: Likewise.
7701 * tests/local.at: Likewise.
7702 * src/scan-gram.l: Don't include verify.h, since system.h does
7703 that for us.
7704 * .x-sc_require_config_h: New file.
7705 * .x-sc_unmarked_diagnostics: New file.
7706
7707 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
7708
7709 Be a bit more systematic about using 'abort'.
7710 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7711 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7712 Put 'default: abort ();' before some other case, to satisfy older
7713 pedantic compilers.
7714 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7715 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
7716 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
7717 * src/conflicts.c (resolve_sr_conflict): Likewise.
7718 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
7719 (get_decision_str, get_orientation_str, get_node_alignment_str):
7720 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
7721 (get_linestyle_str, get_arrowstyle_str): Likewise.
7722 * src/conflicts.c (resolve_sr_conflict):
7723 Use a default case rather than one for the one remaining enum
7724 value, to catch invalid enum values as well.
7725 * src/lalr.c (set_goto_map, map_goto):
7726 Prefer "assert (FOO);" to "if (!FOO) abort ();".
7727 * src/nullable.c (nullable_compute, token_definitions_output):
7728 Likewise.
7729 * src/reader.c (packgram, reader): Likewise.
7730 * src/state.c (transitions_to, state_new, state_reduction_find):
7731 Likewise.
7732 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
7733 (symbol_pack): Likewise.
7734 * src/tables.c (conflict_row, pack_vector): Likewise.
7735 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
7736 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
7737 * src/system.h: Don't include <assert.h>.
7738 (assert): New macro.
7739
7740 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
7741 (Destructor Decl, Parser Function, Pure Calling):
7742 Describe rules for braces inside C code more carefully.
7743
7744 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
7745
7746 Fix some porting glitches found by Nelson H. F. Beebe.
7747 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
7748 compilers that don't understand that abort () does not return.
7749 * src/state.c (transitions_to): Likewise.
7750 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7751 that '#include <cstdlib>' works.
7752 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
7753 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
7754 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
7755 for the benefit of some pre-C99 compilers.
7756
7757 * bootstrap: Undo changes to gnulib files that autoreconf made.
7758
7759 Minor fixups to get 'make maintainer-check' to work.
7760 * configure.ac: Don't use -Wnested-externs, as it's incompatible
7761 with the new verify.h implementation.
7762 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
7763 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
7764 * data/yacc.c (YYUSE): Likewise.
7765 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
7766 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
7767 * src/parse-gram.y (declaration): Don't pass a string constant
7768 to a function that expects char *, since GCC might complain
7769 about the constant value.
7770 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
7771 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
7772 before #defining them.
7773 * tests/glr-regression.at
7774 (Incorrectly initialized location for empty right-hand side in GLR):
7775 In yyerror, use the msg arg.
7776 (Corrupted semantic options if user action cuts parse):
7777 (Incorrect lookahead during deterministic GLR):
7778 (Incorrect lookahead during nondeterministic GLR):
7779 Don't name a local var 'index'; it shadows string.h's 'index'.
7780
7781 2006-01-19 Akim Demaille <akim@epita.fr>
7782
7783 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
7784 location, not just parts of it.
7785
7786 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
7787
7788 * NEWS: Document the fact that multiple %unions are now allowed.
7789 * doc/bison.texinfo (Union Decl): Likewise.
7790 * TODO: This feature is now implemented, so remove it from
7791 the wishlist.
7792
7793 * Makefile.maint: Merge with coreutils Makefile.maint.
7794 (CVS_LIST): Use build-aux version if available.
7795 (VERSION_REGEXP): New macro.
7796 (syntax-check-rules): Add sc_no_if_have_config_h,
7797 sc_prohibit_assert_without_use, sc_require_config_h,
7798 sc_useless_cpp_parens.
7799 (sc_obsolete_symbols): Check for O_NDELAY.
7800 (sc_dd_max_sym_length): Track coreutils.
7801 (sc_unmarked_diagnostics): Look in all files, not just *.c.
7802 (sc_useless_cpp_parens): New rule.
7803 (news-date-check): Look for version or today's date.
7804 (changelog-check): Don't require version number near head.
7805 (copyright-check): Use current year instead of hardwiring 2005.
7806 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
7807 (announcement): Add --gpg-key-ID.
7808
7809 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
7810 with "file system".
7811
7812 Avoid undefined behavior that addressed just before the start of an
7813 array. Problem reported by twlevo.
7814 * src/reader.c (packgram): Prepend a new sentinel before ritem.
7815 * src/lalr.c (build_relations): Rely on new sentinel.
7816 * src/gram.c (gram_free): Adjust to new sentinel.
7817
7818 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
7819
7820 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
7821 yylookaheadNeeds. All uses updated.
7822 (yysplitStack): Rename local yynewLookaheadStatuses to
7823 yynewLookaheadNeeds.
7824 * data/glr-regression.at (Incorrect lookahead during nondeterministic
7825 GLR): In comments, change `lookahead status' to `lookahead need'.
7826
7827 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7828
7829 * data/glr.c (yysplitStack): A little stylistic rewrite.
7830
7831 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7832
7833 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
7834
7835 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
7836
7837 * doc/bison.texinfo: Fix some typos.
7838 (GLR Semantic Actions): New subsection discussing special
7839 considerations because GLR semantic actions might be deferred.
7840 (Actions): Mention look-ahead usage of yylval.
7841 (Actions and Locations): Mention look-ahead usage of yylloc.
7842 (Special Features for Use in Actions): Add YYEOF entry and mention it
7843 in the yychar entry.
7844 In the yychar entry, remove mention of the local yychar case (pure
7845 parser) since this is irrelevant information when writing semantic
7846 actions and since it's already discussed in `Table of Symbols' where
7847 yychar is otherwise described as an external variable.
7848 In the yychar entry, don't call it the `current' look-ahead since it
7849 isn't when semantic actions are deferred.
7850 In the yychar and yyclearin entries, add note about deferred semantic
7851 actions.
7852 Add yylloc and yylval entries discussing look-ahead usage.
7853 (Look-Ahead Tokens): When discussing yychar, don't call it the
7854 `current' look-ahead, and do mention yylval and yylloc.
7855 (Error Recovery): Cross-reference `Action Features' when mentioning
7856 yyclearin.
7857 (Table of Symbols): In the yychar entry, don't call it the `current'
7858 look-ahead.
7859 In the yylloc and yylval entries, mention look-ahead usage.
7860
7861 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7862
7863 * tests/glr-regression.at: Update copyright year to 2006.
7864
7865 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7866
7867 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
7868 use during nondeterministic operation to track which stacks have
7869 actually needed the current lookahead.
7870 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
7871 Allocate, deallocate, resize, and otherwise shuffle space for
7872 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
7873 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
7874 appropriately during nondeterministic operation.
7875 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
7876 members to store the current lookahead to be used by the deferred
7877 user action.
7878 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
7879 from which the RHS is taken. Set the lookahead members of the new
7880 yySemanticOption according to the lookahead status for stack yyk.
7881 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
7882 yyaddDeferredAction.
7883 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
7884 members of yySemanticOption before invoking yyuserAction, and then set
7885 them back to their current values afterward.
7886 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
7887 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
7888 * tests/glr-regression.at: Remove `.' from the ends of recent test case
7889 titles for consistency.
7890 (Leaked merged semantic value if user action cuts parse): In order to
7891 suppress lint warnings, use arguments in merge function, and assign
7892 char value < 128 in main.
7893 (Incorrect lookahead during deterministic GLR): New test case.
7894 (Incorrect lookahead during nondeterministic GLR): New test case.
7895
7896 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7897
7898 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
7899 !yyvaluep as signal that no semantic value is available to print.
7900 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
7901 to print a semantic value.
7902
7903 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7904
7905 * tests/glr-regression.at: For consistency with my newer test cases,
7906 don't thank myself.
7907
7908 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7909
7910 * data/glr.c (yyresolveValue): When merging semantic options, if at
7911 least one user action succeeds but a later one cuts the parse, then
7912 destroy the semantic value before returning rather than leaking it.
7913 (yyresolveStates): If a user action cuts the parse and thus
7914 yyresolveValue fails, ignore the (unset) semantic value rather than
7915 corrupting the yyGLRState, and empty the semantic options list since
7916 the user actions should have called all necessary destructors.
7917 Simplify code with YYCHK.
7918 * tests/glr-regression.at (Corrupted semantic options if user action
7919 cuts parse): New test case.
7920 (Undesirable destructors if user action cuts parse): New test case.
7921 Before applying any of this patch, this test case never actually failed
7922 for me... but only because the corrupted semantic options usually
7923 masked this bug.
7924 (Leaked merged semantic value if user action cuts parse): New test
7925 case.
7926
7927 2006-01-05 Akim Demaille <akim@epita.fr>
7928
7929 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
7930
7931 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
7932
7933 * data/c.m4 (b4_c_modern): New macro, with a new provision for
7934 _MSC_VER. Problem reported by Cenzato Marco.
7935 (b4_c_function_def): Use it.
7936 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
7937 b4_c_modern.
7938 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
7939 than rolling our own.
7940
7941 2006-01-04 Akim Demaille <akim@epita.fr>
7942
7943 Also warn about non-used mid-rule values.
7944 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
7945 member.
7946 (symbol_list_new): Adjust.
7947 * src/reader.c (symbol_typed_p): New.
7948 (grammar_rule_check): Use it.
7949 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
7950 Check its rule.
7951 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
7952 Use it.
7953 * tests/actions.at (Exotic Dollars): Adjust.
7954
7955 2006-01-04 Akim Demaille <akim@epita.fr>
7956
7957 * src/reader.c (grammar_midrule_action): If $$ is set in a
7958 mid-rule, move the `used' bit to its lhs.
7959 * tests/input.at (Unused values): New.
7960 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
7961
7962 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
7963
7964 * doc/bison.texinfo (Bison Options): Say more accurately what
7965 --yacc does.
7966 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
7967 about declarations in the grammar when in Yacc mode, as POSIX does
7968 not require a diagnostic when the grammar uses extensions.
7969
7970 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
7971
7972 Warn about dubious constructions like "%token T T".
7973 Reported by twlevo.
7974 * src/symtab.h (struct symbol.declared): New member.
7975 * src/symtab.c (symbol_new): Initialize it to false.
7976 (symbol_class_set): New arg DECLARING, specifying whether
7977 this is a declaration that we want to warn about, if there
7978 is more than one of them. All uses changed.
7979
7980 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
7981 Allow multiple %union directives, whose contents concatenate.
7982 * src/parse-gram.y (grammar_declaration): Likewise.
7983 Use muscle_code_grow, so that we don't need stype_line any more.
7984 All uses changed.
7985
7986 * src/muscle_tab.c (muscle_grow): Fix comment.
7987
7988 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
7989 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
7990 Update copyright year to 2006.
7991
7992 2006-01-03 Akim Demaille <akim@epita.fr>
7993
7994 Have glr.cc pass (some of) the calc.at tests.
7995 * data/glr.cc (b4_parse_param_orig): New.
7996 (b4_parse_param): Improve its definition, and bound it more
7997 clearly in the skeleton.
7998 (b4_epilogue): Append, instead of prepending, in order to keep
7999 #line consistency.
8000 Simplify the generation of auxiliary functions: locations and
8001 purity are mandated.
8002 (b4_global_tokens_and_yystype): Honor it.
8003 * data/location.cc (c++.m4): Don't include it.
8004 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8005 and AT_SKEL_CC_IF.
8006 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8007 AT_LALR1_CC_IF.
8008 Be sure to initialize the first position's filename.
8009 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8010 mandated anyway.
8011 (AT_CHECK_CALC_GLR_CC): New.
8012 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8013
8014 2006-01-02 Akim Demaille <akim@epita.fr>
8015
8016 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8017 c.m4.
8018 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
8019 * data/glr.cc: Do not include stack.hh.
8020
8021 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8022
8023 * data/glr.c: Reformat whitespace with tabs.
8024 (b4_lpure_formals): Remove this unused m4 macro.
8025 * tests/cxx-type.at: Reformat whitespace with tabs.
8026 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8027 since it's a member. Rename type to isNterm for clarity.
8028
8029 2005-12-29 Akim <akim@sulaco.local>
8030
8031 Let glr.cc catch up with symbol_value_print.
8032 * data/glr.cc (b4_yysymprint_generate): Replace by...
8033 (b4_yy_symbol_print_generate): this.
8034 (yy_symbol_print, yy_symbol_value_print): Declare them.
8035
8036 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8037
8038 * src/location.h (boundary): Note that a line or column equal
8039 to INT_MAX indicates an overflow.
8040 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8041 (rule_length_overflow, increment_rule_length, add_column_width):
8042 New functions.
8043 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8044 (<SC_BRACED_CODE>"}"):
8045 Use increment_rule_length rather than incrementing it by hand.
8046 (adjust_location, handle_syncline): Diagnose overflow.
8047 (handle_action_dollar, handle_action_at):
8048 Fix bug with monstrosities like $-2147483648.
8049 Remove now-unnecessary checks.
8050 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8051 (convert_ucn_to_byte): Verify assumptions.
8052 (handle_syncline): New arg LOC. All callers changed.
8053 Don't store through a value derived from char const * pointer.
8054
8055 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8056 GCC warnings.
8057
8058 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8059
8060 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8061 Remove unnecessary forward static decls.
8062
8063 2005-12-27 Akim Demaille <akim@epita.fr>
8064
8065 * src/reader.c (grammar_current_rule_check): Also check that $$
8066 is used.
8067 Take the rule to check as argument, hence rename as...
8068 (grammar_rule_check): this.
8069 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8070 Rename as...
8071 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8072 (grammar_midrule_action, grammar_symbol_append): Now static.
8073 * tests/torture.at (input): Don't rely on the default action
8074 being always performed.
8075 * tests/calc.at: "Set" $$ even when the action is "cut" with
8076 YYERROR or other.
8077 * tests/actions.at (Exotic Dollars): Instead of using unused
8078 values, check that the warning is issued.
8079
8080 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8081
8082 * NEWS: Improve wording for unused-value warnings.
8083
8084 2005-12-22 Akim Demaille <akim@epita.fr>
8085
8086 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8087 (b4_yysymprint_generate): Rename as...
8088 (b4_yy_symbol_print_generate): this.
8089 Generate yy_symbol_print instead of yysymprint.
8090 Generate also yy_symbol_value_print, and use it.
8091
8092 2005-12-22 Akim Demaille <akim@epita.fr>
8093
8094 * NEWS: Warn about unused values.
8095 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8096 a `used' member.
8097 (symbol_list_n_get, symbol_list_n_used_set): New.
8098 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8099 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8100 * src/reader.c (grammar_current_rule_check): Check that values are
8101 used.
8102 * src/symtab.c (symbol_print): Accept 0.
8103 * tests/existing.at: Remove the type information.
8104 Empty the actions.
8105 Remove useless actions (beware of mid-rule actions: perl -000
8106 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8107 * tests/actions.at (Exotic Dollars): Use unused values.
8108 * tests/calc.at: Likewise.
8109 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8110 Likewise.
8111
8112 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8113 rule_useful_p.
8114
8115 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8116
8117 Undo 2005-12-01 tentative license wording change. The wording is
8118 still being reviewed by the lawyers, and we don't want to wait for
8119 them before publishing a test release. For now, revert to the
8120 previous wording.
8121 * NEWS: Undo 2005-12-01 change.
8122 * data/glr.c: Revert to previous license wording.
8123 * data/glr.cc: Likewise.
8124 * data/lalr1.cc: Likewise.
8125 * data/location.cc: Likewise.
8126 * data/yacc.c: Likewise.
8127
8128 * NEWS: Reword %destructor vs YYABORT etc.
8129 * data/glr.c: Use American spacing, for consistency.
8130 * data/glr.cc: Likewise.
8131 * data/lalr1.cc: Likewise.
8132 * data/yacc.c: Likewise.
8133 * data/yacc.c: Reformat comments slightly.
8134 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8135 for consistency. Fix some spelling errors and reword recently-included
8136 text slightly.
8137 * tests/cxx-type.at: Cast results of malloc, for C++.
8138
8139 2005-12-21 Joel E. Denny <address@hidden>
8140
8141 * tests/cxx-type.at: Construct a tree, count the parents of shared
8142 nodes, and free each node once and only once. Previously, the memory
8143 for semantic values was leaked instead.
8144
8145 2005-12-21 Joel E. Denny <address@hidden>
8146
8147 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8148 (yylval, yylloc): If pure, #define to yystackp->yyval and
8149 yystackp->yyloc similar to yychar and yynerrs.
8150 (yyparse): If pure, remove local yylval and yylloc. Add local
8151 yystackp to accommodate pure definitions of yylval and yylloc.
8152 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8153 yylvalp and yyllocp to &yylval and &yylloc.
8154 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8155 namespace. Previously, nerrs and char were missing, but lval and lloc
8156 weren't necessary.
8157 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8158 yylvalp and yyllocp parameters since, if pure, these are now always
8159 accessible through yystackp. If not pure, they are still accessible
8160 globally.
8161 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8162 `if (YYID (N))' to pacify lint.
8163
8164 2005-12-21 Akim Demaille <akim@epita.fr>
8165
8166 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8167 destroy the RHS symbols of a rule.
8168 * data/yacc.c (yylen): Initialize to 0.
8169 Keep its value to the number of items to possibly shift.
8170 In particular, a regular successful parse that ends on YYFINAL by
8171 a (internal) YYACCEPT must not have yylen != 0.
8172 (yyerrorlab, yyreturn): Pop the RHS.
8173 Reorder a bit to emphasize the `shifting' bits of code.
8174 (YYPOPSTACK): Now accept a number of items to pop.
8175 * data/lalr1.cc: Likewise.
8176 * data/glr.c: Formatting changes.
8177 Use goto instead of fall through.
8178 * doc/bison.texinfo (Destructor Decl): Complete.
8179
8180 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8181
8182 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8183 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8184 * djgpp/config.bat: Replace every occurence of the file name
8185 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8186 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8187 * djgpp/config.sed: Replace every occurence of the file name
8188 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8189 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8190 * djgpp/djunpack.bat: DJGPP specific file.
8191 * djgpp/fnchange.lst: DJGPP specific file.
8192 * djgpp/README.in: Add new information about how to unpack the bison
8193 source on MSDOS and other systems which have 8.3 file name restrictions
8194 using djunpack.bat and fnchange.lst.
8195
8196 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8197
8198 * bootstrap (build_cvs_prefix): Remove; unused.
8199 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8200 when getting gnulib.
8201
8202 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8203
8204 * data/glr.c: Reorder typedef declarations for structs to match order
8205 of struct declarations.
8206 Rename yystack everywhere to yystackp except in yyparse where it's not
8207 a pointer.
8208 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8209 consistency.
8210 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8211 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8212 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8213 lint.
8214
8215 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8216
8217 * tests/sets.at (Accept): Fix typos in regular expression used to
8218 sed out the final state number.
8219
8220 Work around portability problem on Solaris 10: flex-generated
8221 files include <stdio.h> before <config.h>, which messes up
8222 because the latter defines __EXTENSIONS__. Address the problem
8223 by creating two new little files that include <config.h> first,
8224 then include the flex-generated files. Rewrite everyone else
8225 to include <config.h> first, as well.
8226 * lib/timevar.c: Always include "config.h".
8227 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8228 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8229 (EXTRA_bison_SOURCES): New macro.
8230 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8231 * src/system.h: Don't include config.h.
8232 * src/LR0.c: Include <config.h> first.
8233 * src/assoc.c: Likewise.
8234 * src/closure.c: Likewise.
8235 * src/complain.c: Likewise.
8236 * src/conflicts.c: Likewise.
8237 * src/derives.c: Likewise.
8238 * src/files.c: Likewise.
8239 * src/getargs.c: Likewise.
8240 * src/gram.c: Likewise.
8241 * src/lalr.c: Likewise.
8242 * src/location.c: Likewise.
8243 * src/main.c: Likewise.
8244 * src/muscle_tab.c: Likewise.
8245 * src/nullable.c: Likewise.
8246 * src/output.c: Likewise.
8247 * src/parse-gram.y: Likewise.
8248 * src/print.c: Likewise.
8249 * src/print_graph.c: Likewise.
8250 * src/reader.c: Likewise.
8251 * src/reduce.c: Likewise.
8252 * src/relation.c: Likewise.
8253 * src/state.c: Likewise.
8254 * src/symlist.c: Likewise.
8255 * src/symtab.c: Likewise.
8256 * src/tables.c: Likewise.
8257 * src/uniqstr.c: Likewise.
8258 * src/vcg.c: Likewise.
8259
8260 * src/parse-gram.y: Fix minor problems uncovered by lint.
8261 (current_lhs, current_lhs_location): Now static.
8262 (current_assoc): Remove unused variable.
8263
8264 Cleanups so that Bison-generated parsers have less lint.
8265 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8266 Prepend /*ARGSUSED*/, for lint's sake.
8267 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8268 definition if 'lint' is defined.
8269 (YYID): New macro (or function, if lint).
8270 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8271 * data/yacc.c: Likewise.
8272 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8273 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8274 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8275 is C++ only.
8276 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8277 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8278 Use YYID(0) rather than 0, for lint.
8279 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8280 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8281
8282 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8283
8284 * tests/glr-regression.at
8285 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8286 Close memory leak reported by twlevo.
8287
8288 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8289
8290 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8291 all stacks.
8292 (yyparse): Iterate another stack in order to call user destructors.
8293 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8294 New test case.
8295 (Duplicated user destructor for lookahead): This test now is expected
8296 to succeed.
8297
8298 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8299
8300 * NEWS: Document the following change.
8301 * data/yacc.c: Say "parser skeleton" rather than "file", since
8302 it's no longer just a file.
8303 * data/glr.c: Grant a special exception for C GLR parsers, that
8304 reads like the already-existing exception for C LALR(1) parsers.
8305 * data/glr.cc: Likewise.
8306 * data/lalr1.cc: Likewise.
8307 * data/location.cc: Likewise.
8308 * data/yacc.c: Reword the "written by" statement to clarify that
8309 it was the parser skeleton, not the entire output file.
8310 * data/glr.c: Written by Paul Hilfinger.
8311 * data/glr.cc: Written by Akim Demaille.
8312 * data/lalr1.cc: Likewise.
8313
8314 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8315
8316 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8317 Fix typos in previous change that broke 'make check'.
8318 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8319 supported in C.
8320 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8321 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8322 We can revert this once things settle down.
8323
8324 * src/conflicts.c (conflicts_print): Don't print file name twice
8325 when %expect fails because there were no conflicts.
8326 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8327 change.
8328 * tests/conflicts.at (%expect not enough, %expect too much):
8329 (%expect with reduce conflicts): Adjust to new behavior.
8330
8331 2005-11-18 Akim Demaille <akim@epita.fr>
8332
8333 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8334 errors.
8335 * NEWS: Document this.
8336 * doc/bison.texinfo (Expect Decl): Likewise.
8337
8338 2005-11-16 Akim Demaille <akim@epita.fr>
8339
8340 Generalize the display of semantic values and locations in traces.
8341 * data/glr.c (yy_reduce_print): Fix indices (again).
8342 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8343 literal integers.
8344 * data/lalr1.cc (yyreduce_print): Rename as...
8345 (yy_reduce_print): this.
8346 Display values and locations.
8347 * data/yacc.c (yy_reduce_print): Likewise.
8348 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8349 (yysymprint): Move higher to be visible from yy_reduce_print).
8350 (yyparse): Adjust.
8351 * tests/calc.at: Adjust the expected length of the traces.
8352
8353 2005-11-14 Akim Demaille <akim@epita.fr>
8354
8355 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8356 from 1 to N, while values and location start at 0.
8357 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8358
8359 2005-11-14 Akim Demaille <akim@epita.fr>
8360
8361 * data/glr.c (yy_reduce_print): Fix the $ number.
8362
8363 2005-11-14 Akim Demaille <akim@epita.fr>
8364
8365 "Use" parse parameters.
8366 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8367 * data/glr.c, data/glr.cc: Use them.
8368 * data/glr.c (YYUSE): Have a C++ definition that supports
8369 non-pointer types.
8370
8371 2005-11-14 Akim Demaille <akim@epita.fr>
8372
8373 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8374
8375 2005-11-14 Akim Demaille <akim@epita.fr>
8376
8377 * data/glr.cc: New.
8378 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
8379
8380 2005-11-12 Akim Demaille <akim@epita.fr>
8381
8382 Let position and location be PODs.
8383 * data/location.cc (position::initialize, location::initialize): New.
8384 (position::position, location::location): Define only if
8385 b4_location_constructors is defined.
8386 * data/lalr1.cc (b4_location_constructors): Define it for backward
8387 compatibility.
8388 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8389
8390 2005-11-12 Akim Demaille <akim@epita.fr>
8391
8392 * data/lalr1.cc: Move the body of the ctor and dtor into the
8393 parser file (instead of the header).
8394 Wrap the implementations in a "namespace yy".
8395
8396 2005-11-12 Akim Demaille <akim@epita.fr>
8397
8398 Have glr.c include its header file when created.
8399 * data/glr.c (b4_shared_declarations): New.
8400 Output them verbatim in the parser if !%defines, otherwise
8401 output then in the header file, and include it instead.
8402
8403 2005-11-11 Akim Demaille <akim@epita.fr>
8404
8405 * data/glr.c: Comment changes.
8406
8407 2005-11-11 Akim Demaille <akim@epita.fr>
8408
8409 When yydebug, report semantic and location values for reductions.
8410 * data/glr.c (yy_reduce_print): Report the semantic values and the
8411 locations.
8412 (YY_REDUCE_PRINT): Adjust.
8413 (yyglrReduce): Use them.
8414 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8415 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8416 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8417 traces.
8418
8419 2005-11-10 Akim Demaille <akim@epita.fr>
8420
8421 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8422 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8423 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8424
8425 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8426
8427 * m4/cxx.m4, examples/Makefile.am: Don't build
8428 examples/calc++ if no C++ compiler is available. (trivial change)
8429
8430 2005-11-09 Akim Demaille <akim@epita.fr>
8431
8432 * src/scan-skel.l: Use a couple of asserts.
8433
8434 2005-11-03 Akim Demaille <akim@epita.fr>
8435
8436 In some (weird) cases, the final state number is incorrect.
8437 Reported by Alexandre Duret-Lutz.
8438 * src/LR0.c (state_list_append): Remove the computation of
8439 final_state.
8440 (save_reductions): Do it here.
8441 (get_state): Alpha conversion.
8442 (generate_states): Use a for loop.
8443 * src/gram.h (item_number_is_rule_number)
8444 (item_number_is_symbol_number): New.
8445 * src/state.c: Use assert.
8446 * src/system.h: Include assert.h.
8447 * tests/sets.at (Accept): New.
8448
8449 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8450
8451 * data/glr.c (yyfill): Adjust comment.
8452 (yyresolveAction): Initialize default location properly
8453 for empty right-hand sides.
8454 (yydoAction): Ditto.
8455 Add comment explaining apparently dead code.
8456 * tests/glr-regression.at
8457 (Incorrectly initialized location for empty right-hand side in GLR):
8458 New test.
8459
8460 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8461
8462 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8463 gnulib when interrupted. This fixes some race conditions and
8464 works around some portability problems (one noted by Paul
8465 Hilfinger).
8466
8467 2005-10-22 Akim <akim@epita.fr>
8468
8469 * Makefile.cfg: Adjust to config -> build-aux.
8470 Reported by twledo.
8471
8472 2005-10-21 Akim Demaille <akim@epita.fr>
8473
8474 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8475 the %parse-params.
8476 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8477 * data/yacc.c (b4_Pure_if): Rename as...
8478 (b4_yacc_pure_if): this.
8479 (YY_SYMBOL_PRINT, yyparse): Adjust.
8480 * doc/bison.texinfo: Formatting changes.
8481
8482 2005-10-21 Akim Demaille <akim@epita.fr>
8483
8484 Finish the transition config -> build-aux.
8485 * configure.ac, Makefile.am: Use build-aux.
8486 * config/prev-version, config/announce-gen, config/Makefile.am:
8487 Move to...
8488 * build-aux/prev-version, build-aux/announce-gen,
8489 * build-aux/Makefile.am: here.
8490
8491 2005-10-14 Akim Demaille <akim@epita.fr>
8492
8493 * examples/calc++/test: Use set -x only when VERBOSE.
8494
8495 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8496
8497 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8498 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8499
8500 2005-10-13 Akim Demaille <akim@epita.fr>
8501
8502 * src/scan-skel.l: Output the base name parts of the parser and
8503 header file names.
8504 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
8505 additional checks.
8506 Use this to exercise C++ outputs in subdirs.
8507 Reported by Oleg Smolsky.
8508
8509 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8510
8511 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8512 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8513 Problem reported by John P. Hartmann.
8514 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8515 already defined it.
8516
8517 2005-10-12 Akim Demaille <akim@epita.fr>
8518
8519 * src/parse-gram.y (version_check): Exit 63 to please missing
8520 (stands for "version mismatch).
8521 * tests/input.at, doc/bison.texinfo: Adjust.
8522
8523 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8524
8525 Work around portability problems with Visual Age C compiler
8526 (xlc and xlC_r) reported by John P. Hartmann.
8527 * data/location.cc (initial_column, initial_line): Remove.
8528 All uses replaced by 0 and 1.
8529 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8530 that xlc complains about.
8531 * src/scan-skel.l (skel_wrap): Likewise.
8532 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
8533 as __STDC__.
8534 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8535 __STDC_VERSION__. Use it everywhere instead of looking at
8536 __STDC__ and __cplusplus.
8537
8538 2005-10-10 Akim Demaille <akim@epita.fr>
8539
8540 * examples/calc++/test: Be quiet unless VERBOSE.
8541
8542 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8543
8544 * data/c.m4 (yydestruct, yysymprint):
8545 Use YYUSE instead of casting to void.
8546 * data/glr.c (YYUSE): New macro.
8547 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8548 Use it instead of rolling our own.
8549 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8550 (YYCHK1):
8551 Use /*CONSTCOND*/ to suppress lint warnings.
8552 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8553 (YY_STACK_PRINT): Use 'false' not '0'.
8554 (YYUSE): New macro.
8555 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8556 * data/yacc.c (YYUSE): New macro.
8557 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8558 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8559 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8560
8561
8562 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8563 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8564
8565 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8566
8567 Undo the parts of the unlocked-I/O change that substituted
8568 putc or puts for printf. This might hurt performance a bit,
8569 but some people prefer the printf style.
8570 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8571 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8572 All uses replaced by YYFPRINTF and YYDPRINTF.
8573 * data/yacc.c: Likewise.
8574 * lib/bitset.c (bitset_print): Likewise.
8575 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8576 putc and puts.
8577 * lib/lbitset.c (debug_lbitset): Likewise.
8578 * src/closure.c (print_firsts, print_fderives): Likewise.
8579 * src/gram.c (grammar_dump): Likewise.
8580 * src/lalr.c (look_ahead_tokens_print): Likewise.
8581 * src/output.c (escaped_output): Likewise.
8582 (user_actions_output): Break apart two printfs.
8583 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8584 * src/reduce.c (reduce_print): Likewise.
8585 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8586 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8587
8588 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8589 Use assignments rather than casts-to-void to suppress
8590 unused-variable warnings. This pacifies 'lint'.
8591 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8592 unused-variable warnings.
8593
8594 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8595
8596 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8597
8598 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8599
8600 Use unlocked I/O for a minor performance improvement on hosts like
8601 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8602 is to use the gnlib unlocked-io module, and to prefer putc and
8603 puts to printf when either will work (since the latter doesn't
8604 come in an unlocked flavor).
8605 * bootstrap (gnulib_modules): Add unlocked-io.
8606 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8607 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8608 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8609 and similarly for puts and putc and printf.
8610 * data/yacc.c: Likewise.
8611 * lib/bitset.c (bitset_print): Likewise.
8612 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8613 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8614 to printf.
8615 * lib/lbitset.c (debug_lbitset): Likewise.
8616 * src/closure.c (print_firsts, print_fderives): Likewise.
8617 * src/gram.c (grammar_dump): Likewise.
8618 * src/lalr.c (look_ahead_tokens_print): Likewise.
8619 * src/output.c (escaped_output): Likewise.
8620 (user_actions_output): Coalesce two printfs.
8621 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
8622 * src/reduce.c (reduce_print): Likewise.
8623 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8624 * src/system.h: Include unlocked-io.h rather than stdio.h.
8625
8626 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8627 this confuses xgettext.
8628
8629 2005-10-02 Akim Demaille <akim@epita.fr>
8630
8631 * bootstrap (gnulib_modules): Add strverscmp.
8632 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8633 * m4/.cvsignore: Add strverscmp.m4.
8634 * src/parse-gram.y (%require): New token, new rule.
8635 (version_check): New.
8636 * src/scan-gram.l (%require): Adjust.
8637 * tests/input.at (AT_REQUIRE): New.
8638 Use it.
8639 * doc/bison.texinfo (Require Decl): New.
8640 (Calc++ Parser): Use %require.
8641
8642 2005-10-02 Akim Demaille <akim@epita.fr>
8643
8644 * data/location.cc: New.
8645
8646 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8647 Akim Demaille <akim@epita.fr>
8648
8649 Make sure -odir/foo.cc creates dir/location.hh etc.
8650 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8651 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8652 (spec_defines_file): Now const.
8653 (dir_prefix): New.
8654 (short_base_name): Remove.
8655 * src/files.c: Adjust.
8656 (dirname.h): Include.
8657 (base_name): Don't prototype it.
8658 (finput): Remove, duplicates gram_in.
8659 (full_base_name, short_base_name): Replace by...
8660 (all_but_ext, all_but_tab_ext): these.
8661 (compute_base_names): Rename as...
8662 (compute_file_name_parts): this.
8663 Update to compute the new variables, including dir_prefix.
8664 Adjust dependencies.
8665 * src/output.c (prepare): Output them.
8666 * src/reader.c: Adjust to use gram_in, not finput.
8667 * src/scan-skel.l (@dir_prefix@): New.
8668
8669 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8670
8671 * lib/subpipe.c: New function end_of_output_subpipe() added
8672 to allow support for non-posix systems. This is a no-op function
8673 for posix systems.
8674
8675 * lib/subpipe.h: New function end_of_output_subpipe() added
8676 to allow support for non-posix systems. This is a no-op function
8677 for posix systems.
8678
8679 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8680 handle the lack of pipe/fork functionality on non-posix systems.
8681
8682 * djgpp/Makefile.maint: DJGPP specific file.
8683
8684 * djgpp/README.in: DJGPP specific file.
8685
8686 * djgpp/config.bat: DJGPP specific configuration file.
8687
8688 * djgpp/config.sed: DJGPP specific configuration file.
8689
8690 * djgpp/config.site: DJGPP specific configuration file.
8691
8692 * djgpp/config_h.sed: DJGPP specific configuration file.
8693
8694 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8695
8696 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8697
8698 2005-10-02 Akim Demaille <akim@epita.fr>
8699
8700 * data/location.cc: New, extract from...
8701 * data/lalr1.cc: here.
8702 (location.hh): Include it after the user prologue, in case the
8703 filename type is defined by the user.
8704 Forward declation location and position before the pre-prologue.
8705 (yyresult_): Rename as...
8706 (yyresult): this, it's a local variable, not an attribute.
8707 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8708
8709 2005-10-01 Akim Demaille <akim@epita.fr>
8710
8711 * examples/extexi: Restore the #line generation.
8712
8713 2005-09-30 Akim Demaille <akim@epita.fr>,
8714 Alexandre Duret-Lutz <adl@gnu.org>
8715
8716 Move the token type and YYSTYPE in the parser class.
8717 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
8718 (parser::token): New, from the moved free definition of tokens.
8719 (parser::semantic_value): Now a full definition instead of an
8720 indirection to YYSTYPE.
8721 (b4_post_prologue): No longer included in the header file, but
8722 in the implementation file.
8723 * doc/bison.texi (C+ Language Interface): Update.
8724 * src/parse-gram.y: Support unary %define.
8725 * tests/actions.at: Define global_tokens_and_yystype for backward
8726 compatibility until we update the tests.
8727 * tests/calc.at: Idem.
8728 (first_line, first_column, last_line, last_column): Define for lalr1.cc
8729 to simplify the code.
8730
8731 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
8732
8733 Port to SunOS 4.1.4, which lacks strtoul and strerror.
8734 Ah, the good old days! Problem reported by Peter Klein.
8735 * bootstrap (gnulib_modules): Add strerror, strtoul.
8736 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
8737 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
8738
8739 2005-09-29 Akim Demaille <akim@epita.fr>
8740
8741 * data/c.m4 (b4_error_verbose_if): New.
8742 * data/lalr1.cc: Use it.
8743 (YYERROR_VERBOSE_IF): Remove.
8744 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
8745 parser members, replaced by...
8746 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
8747 local variables.
8748 (yysyntax_error_): Takes the state number as argument.
8749 (yyreduce_print_): Use the argument yyrule, not the former
8750 attribute yyn_.
8751
8752 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
8753
8754 * bootstrap (gnulib_modules): Add verify.
8755 * lib/.cvsignore: Add verify.h.
8756 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
8757 * src/system.h (verify): Remove.
8758 Include verify.h instead.
8759 * src/tables.c (tables_generate): Use new API for 'verify'.
8760
8761 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
8762
8763 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
8764 local variables whose names begin with 'yy'.
8765 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8766 Trivial changes from Joel E. Denny.
8767
8768 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
8769 it itself.
8770 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
8771 don't use alloca any more.
8772
8773 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
8774 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
8775 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
8776 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
8777 to match yacc.c, to test more hosts.
8778
8779 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
8780
8781 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
8782 doesn't affect behavior.
8783 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
8784 Solaris, AIX, MSC.
8785 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
8786 This works a bit better with glibc, if user code has already included
8787 stdlib.h.
8788 * doc/bison.texinfo (Bison Parser): Document that users can't
8789 arbitrarily use malloc and free for other purposes. Document
8790 that <alloca.h> and <malloc.h> might be included.
8791 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
8792 user must declare alloca.
8793
8794 * HACKING (release): Forwarn the Translation Project about
8795 stable releses.
8796
8797 2005-09-20 Akim Demaille <akim@epita.fr>
8798
8799 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
8800
8801 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
8802
8803 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
8804 (YYSTACK_ALLOC_MAXIMUM): Use it.
8805 (yysyntax_error): New function.
8806 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
8807 multiple syntax errors are reported, and alloca is being used.
8808 Instead, reallocate buffers twice as big each time, so that
8809 we waste at most half the allocated memory. Start with a small
8810 (128-byte) buffer that will suffice in most cases anyway.
8811 Use yysyntax_error to do most of the work.
8812
8813 * doc/bison.texinfo (Error Reporting, Table of Symbols):
8814 yynerrs is the number of errors reported, not the number of
8815 errors encountered.
8816
8817 * tests/glr-regression.at (Duplicated user destructor for lookahead):
8818 Mark it as expected to fail.
8819 Cast result of malloc; problem reported by twlevo@xs4all.nl.
8820 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
8821 Don't start user-code symbols with "yy", to avoid name space problems.
8822
8823 2005-09-19 Akim Demaille <akim@epita.fr>
8824
8825 Remove the traits, failed experiment.
8826 It never proved useful, and anyway because of the current
8827 definition, it was not possible to have several specialization of
8828 this traits, making it useless.
8829 * data/lalr1.cc (yy:traits): Remove.
8830 Inline its definitions in the parser class.
8831
8832 2005-09-19 Akim Demaille <akim@epita.fr>
8833
8834 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
8835 least Mac OSX with a /usr/local install of gettext.
8836
8837 2005-09-19 Akim Demaille <akim@epita.fr>
8838
8839 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
8840 and yytoken for similarity with the other skeletons.
8841
8842 2005-09-19 Akim Demaille <akim@epita.fr>
8843
8844 * NEWS, configure.ac: update version number to 2.1a.
8845
8846 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
8847
8848 * NEWS: Version 2.1.
8849
8850 * NEWS: Remove notice of yytname change, since it was never in an
8851 official release.
8852 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
8853 diagnostic.
8854 * src/output.c (prepare): Likewise.
8855 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
8856 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
8857 is not defined. This is an awful hack, but it's enough for now.
8858 All callers changed.
8859 * tests/glr-regression-at (make_value): Args are const pointers now,
8860 to avoid GCC warning.
8861 (Duplicated user destructor for lookahead): New test. Currently
8862 skipped. It fails on my host but I'm not sure it'll always fail.
8863
8864 2005-09-16 Akim Demaille <akim@epita.fr>
8865
8866 * src/symtab.h (struct symbol): Declare the printer and destructor
8867 as const, to avoid accidental calls to free.
8868 (symbol_destructor_set, symbol_printer_set): Adjust.
8869 * src/symtab.c: Adjust.
8870
8871 2005-09-16 Akim Demaille <akim@epita.fr>
8872
8873 * data/c.m4 (b4_token_enums): New.
8874 (b4_token_defines): Rename as...
8875 (b4_token_enums_defines): this.
8876 (b4_token_defines): New, output only the #defines.
8877 * data/yacc.c, data/glr.c: Adjust.
8878 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
8879 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
8880 as default values.
8881
8882 2005-09-16 Akim Demaille <akim@epita.fr>
8883
8884 * data/lalr1.cc (yylex_): Remove, inline its code.
8885 (yyreport_syntax_error_): Remove, replaced by...
8886 (yysyntax_error_): this which returns a string and leaves to the
8887 caller the call to the users' error function.
8888 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
8889 Move from members of the parser object...
8890 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
8891 to local variables of the parse function.
8892
8893 2005-09-16 Akim Demaille <akim@epita.fr>
8894
8895 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
8896 since it's in Bison's name space.
8897
8898 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
8899
8900 * data/glr.c (yyresolveValue): Add default case to pacify
8901 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
8902
8903 * NEWS: Document when yyparse started to return 2.
8904 * doc/bison.texinfo (Parser Function): Document when yyparse
8905 returns 2.
8906
8907 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
8908 (b4_filename_type): Renamed back from b4_file_name_type. All uses
8909 changed.
8910 (class position): file_name -> filename (reverting). All uses changed.
8911
8912 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
8913
8914 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
8915 do anything if $@ exists. This reverts part of the 2005-07-07
8916 patch.
8917
8918 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
8919
8920 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
8921 contains obsolete information and isn't worth distributing as a
8922 separate file anyway.
8923 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
8924 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
8925 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
8926 (yyparse): Abort if user code uses longjmp to throw an unexpected
8927 value.
8928
8929 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
8930
8931 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
8932 Suggested by twlevo@xs4all.nl.
8933
8934 * data/glr.c (YYCHK1): Do not assume YYE is in range.
8935 This avoids a diagnostic from gcc -Wswitch-enum.
8936 Problem reported by twlevo@xs4all.nl.
8937
8938 * doc/bison.texinfo: Don't use "filename", as per GNU coding
8939 standards. Use "file name" or "file" or "name", depending on
8940 the context.
8941 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
8942 not to hack/foo.tab.c.
8943 (Calc++ Top Level): 2nd arg of main is not const.
8944 * data/glr.c: b4_filename -> b4_file_name.
8945 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
8946 All uses changed.
8947 (class position): filename -> file_name. All uses changed.
8948 * data/yacc.c: b4_filename -> b4_file_name.
8949 * lib/bitset.h: filename -> file_name in local vars.
8950 * lib/bitset_stats.c: Likewise.
8951 * src/files.c: Likewise.
8952 * src/scan-skel.l ("@output ".*\n): Likewise.
8953 * src/files.c (file_name_split): Renamed from filename_split.
8954 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
8955
8956 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
8957
8958 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
8959 to accommodate latest gnulib.
8960
8961 * tests/glr-regression.at (Duplicate representation of merged trees):
8962 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
8963
8964 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
8965 needed.
8966
8967 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
8968
8969 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
8970 All uses changed. Invoke user destructor after an error during a
8971 split parse (trivial change from Joel E. Denny).
8972
8973 * tests/glr-regression.at
8974 (User destructor after an error during a split parse): New test case.
8975 Problem reported by Joel E. Denny in:
8976 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
8977
8978 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
8979
8980 * README-cvs: Give URLs for recommended tools.
8981 Mention Gzip version problem, and bootstrapping issues.
8982 Remove troubleshooting section, as it's somewhat obsolete.
8983
8984 * bootstrap (no_cache): New var, to accommodate different wget
8985 variants. Use it instead of '-C off'. Problem reported by
8986 twlevo@xs4all.nl.
8987
8988 * data/glr.c (yydestroyStackItem): New function.
8989 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
8990 debugging information. Problem reported by Joel E. Denny.
8991
8992 2005-08-25 Akim Demaille <akim@epita.fr>
8993
8994 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
8995
8996 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
8997
8998 * data/glr.c (yyrecoverSyntaxError, yyreturn):
8999 Don't invoke destructor on unresolved entries.
9000 * tests/glr-regression.at
9001 (User destructor for unresolved GLR semantic value): New test case.
9002 Problem reported by Joel E. Denny in:
9003 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9004
9005 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9006
9007 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9008 Add strnlen.c.
9009 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9010 lib-prefix.m4, po.m4.
9011
9012 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9013 in yydestruct diagnostic, since it might not be an error.
9014 Problem reported by Joel Denny near end of
9015 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9016 * data/lalr1.cc (yyerturn): Likewise.
9017 * data/yacc.c (yyreturn): Likewise.
9018 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9019
9020 * src/files.c: Remove obsolete FIXME comment.
9021
9022 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9023 with the other templates, and to fix bogus run-on messages such
9024 as the one reported at the end of
9025 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9026 All callers changed to avoid the newline.
9027 (yyprocessOneStack): Output two lines rather than one, to accommodate
9028 the above change. This changes the debug output format slightly.
9029
9030 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9031 reported by Joel E. Denny in
9032 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9033 (trivial change).
9034 * tests/glr-regression.at (Duplicate representation of merged trees):
9035 New test, from Joel E. Denny in:
9036 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9037 * THANKS: Add Joel E. Denny.
9038
9039 * configure.ac (AC_INIT): Bump to 2.0c.
9040
9041 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9042
9043 * NEWS: Version 2.0b.
9044
9045 * Makefile.am (SUBDIRS): Put examples before tests, so that
9046 "make check" doesn't finish with "All 1 tests passed".
9047
9048 * tests/regression.at (Token definitions): Don't rely on
9049 AT_PARSER_CHECK for data that contains backslashes. It currently
9050 uses 'echo', and 'echo' isn't portable if its argument contains
9051 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9052 that the byte '\0xff' is not printable in the C locale; it is,
9053 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9054 not printable, so use '\0x81' to test.
9055
9056 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9057 version of GCC, since the macro is used with non-GCC compilers.
9058
9059 Fix core dump reported by Pablo De Napoli in
9060 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9061 * tests/regression.at (Invalid inputs with {}): New test.
9062 * src/parse-gram.y (token_name): Translate type before using
9063 it as an index.
9064
9065 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9066 the user's name space. All uses changed to __attribute__
9067 ((__unused__)).
9068 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9069 Add __attribute__ ((__noreturn__)).
9070
9071 * etc/clcommit: Remove. We weren't using it, and it failed
9072 "make maintainer-distcheck".
9073 * Makefile.maint: Merge from coreutils.
9074 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9075 (syntax-check-rules): Change list of rules as described below.
9076 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9077 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9078 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9079 (sc_trailing_space): New rules.
9080 (sc_xalloc_h_in_src): Remove.
9081 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9082 (sc_space_tab, sc_error_exit_success, sc_changelog):
9083 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9084 (makefile-check, po-check, author_mark_check):
9085 (makefile_path_separator_check, copyright-check):
9086 Use grep -n, to make it easier to find violations.
9087 Use CVS_LIST and CVS_LIST_EXCEPT.
9088 (header_regexp, h_re): Remove.
9089 (dd_c): New macro.
9090 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9091 (my-distcheck): Use more-modern GCC flags.
9092 (signatures, %.asc): Remove.
9093 (rel-files, announcement): Remove signatures.
9094 Restore old updating code, even though we don't use it, so
9095 that we're the same as coreutils.
9096 (alpha, beta, major): Depend on news-date-check.
9097 Make the upload commands.
9098
9099 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9100 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9101 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9102 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9103 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9104 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9105 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9106 * tests/sets.at: Likewise.
9107
9108 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9109 we comment out the Autoconf version number.
9110 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9111 it's error-prone and "make maintainer-distcheck" rejects it.
9112
9113 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9114 Indent calls to "error" to pacify "make maintainer-distcheck",
9115 when the calls are not intended to be translated.
9116 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9117
9118 * src/Makefile.am (DEFS): Use +=, to pacify
9119 "make maintainer-distcheck".
9120 (bison_SOURCES): Add scan-skel.h.
9121 (sc_tight_scope): New rule, from coreutils.
9122
9123 * src/files.c (src_extension, header_extension):
9124 Now static, not extern.
9125 * src/getargs.c (short_options): Likewise.
9126 * src/muscle_tab.c (muscle_table): Likewise.
9127 * src/parse-gram.y (current_class, current_type, current_prec):
9128 Likewise.
9129 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9130 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9131 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9132 void, to avoid warning when NLS is disabled.
9133 * src/output.c: Include scan-skel.h.
9134 (scan_skel): Remove decl, since scan-skel.h does this.
9135 (output_skeleton):
9136 Indent calls to "error" to pacify "make maintainer-distcheck".
9137 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9138 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9139 "make maintainer-distcheck".
9140 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9141 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9142 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9143 (skel_lex_destroy, scan_skel): Move these decls to...
9144 * src/scan-skel.h: New file.
9145 * src/uniqstr.c (uniqstr_assert):
9146 Indent calls to "error" to pacify "make maintainer-distcheck".
9147
9148 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9149 not @VAR@.
9150
9151 * tests/torture.at: Revamp to avoid misuse of atoi that
9152 "make maintainer-distcheck" complained about.
9153
9154 * examples/extexi (message): Don't print a message more than once,
9155 and omit line-number decoration that makes Emacs compile think
9156 that informative messages are worth worrying about.
9157
9158 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9159
9160 * configure.ac: Update version number.
9161
9162 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9163 accidentally.
9164 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9165 autogenerated by the maintainer.
9166 * examples/calc++/.cvsignore: Add *.yy.
9167
9168 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9169 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9170 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9171
9172 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9173
9174 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9175 from maintainer-distcheck about casting the argument of 'free'.
9176
9177 * NEWS: Mention recent yytname changes.
9178 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9179
9180 * bootstrap: For translations that have not yet been upgraded to
9181 the new runtime-po domain, prime the pump by extracting the
9182 relevant strings from the obsolete translations. This code can be
9183 removed once the bison-runtime domain has been translated by each
9184 team.
9185
9186 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9187 now that token names are already quoted.
9188
9189 Fix problem reported by Anthony Heading.
9190 * data/glr.c (YYTOKEN_TABLE): New macro.
9191 (yytname): Define if YYTOKEN_TABLE.
9192 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9193 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9194 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9195 * src/output.c (prepare_symbols): Output token_table_flag.
9196
9197 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9198
9199 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9200 again if the first call fails.
9201
9202 * data/glr.c (yytnamerr): New function.
9203 (yyreportSyntaxError): Use it to dequote most string literals.
9204 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9205 with other skeletons. All uses changed.
9206 (yytnameerr_): New function.
9207 (yyreport_syntax_error): Use it to dequote most string literals.
9208 * data/yacc.c (yytnamerr): New function.
9209 (yyerrlab): Use it to decode most string literals.
9210 * doc/bison.texinfo (Decl Summary, Calling Convention):
9211 Clarify quoting convention of yytname.
9212 * src/output.c (prepare_symbols): Quote all names. This undoes
9213 the 2005-04-17 change, which is now accomplished (mostly) via
9214 changes in the parsers as described above.
9215 * tests/regression.at (Token definitions, Web2c Actions):
9216 Undo most 2005-04-17 change here, too.
9217
9218 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9219
9220 Fix more problems reported by twlevo@xs4all.nl.
9221 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9222 remove trailing spaces. This loses the exit status of ./types,
9223 and isn't needed since ./types shouldn't be emitting trailing
9224 spaces.
9225 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9226 as the stack isn't valid in that case.
9227
9228 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9229 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9230 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9231 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9232 is used.
9233 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9234 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9235 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9236 Likewise.
9237
9238 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9239 overly-picky compilers that reject 'char *foo = "bar";'.
9240
9241 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9242 to FILE * parameter, not to stderr. This fixes a typo introduced
9243 in the 2005-07-12 change.
9244
9245 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9246 warnings from GCC 4.
9247
9248 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9249 (yyglrShiftDefer, yysplitStack):
9250 Remove unused parameters b4_pure_formals. All uses changed.
9251 (yyglrShift): Remove unused parameters b4_user_formals.
9252 All uses changed.
9253 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9254
9255 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9256
9257 Destructor cleanups and regularization among the three skeletons.
9258 * NEWS: Document the behavior changes.
9259 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9260 stack before failing, as the cleanup code will do it for us now.
9261 * data/lalr1.cc (yyerrlab): Likewise.
9262 * data/glr.c (yyparse): Pop everything off the stack before
9263 freeing it, so that destructors get called properly.
9264 * data/lalr1.cc (yyreturn): Likewise.
9265 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9266 This is more consistent.
9267 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9268 why destructors might be called. 1.875 -> 2.1.
9269 (Destructor Decl, Decl Summary, Table of Symbols):
9270 Some English-language cleanups for %destructor.
9271 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9272 Add output line for destructor of start symbol.
9273 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9274 because of that same extra output line.
9275
9276 * NEWS: Document minor wording changes in diagnostics of
9277 Bison-generated parsers.
9278 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9279 Remove unused formals. All uses changed.
9280 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9281 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9282 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9283 Rename yyoverflowab to yyexhaustedlab.
9284 When memory exhaustion occurs during syntax-error reporting,
9285 report it separately rather than in a single diagnostic; this
9286 eases translation.
9287 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9288 (Memory Exhausted): Renamed from Parser Stack Overflow.
9289 Revamp wording slightly to prefer "memory exhaustion".
9290 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9291
9292 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9293
9294 Add i18n support to the GLR skeleton. Partially fix the C++
9295 skeleton; a C++ expert needs to finish this. Remove debugging
9296 msgids; there's little point to having them translated, since they
9297 can be understood only by someone who can read the
9298 (English-language) source code.
9299
9300 Generate runtime-po/bison-runtime.pot automatically, so that we
9301 don't have to worry about garbage getting in that file. We'll
9302 make sure after the next official release that old msgids don't
9303 get lost. See
9304 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9305
9306 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9307 Now auto-generated.
9308 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9309 Fix typos in explanations of the runtime file.
9310 * bootstrap: Change gettext keyword from YYI18N to YY_.
9311 Use standard Makefile.in.in in runtime-po, since we'll arrange
9312 for backward-compatible bison-runtime.po files in a different way.
9313 * data/glr.c (YY_): New macro, from yacc.c.
9314 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9315 Translate messages intended for users.
9316 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9317 the wording in the other skeletons. We don't know that the memory
9318 is virtual.
9319 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
9320 Use same method that yacc.c uses.
9321 Don't translate debugging messages.
9322 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9323 it doesn't work (yet), and requires C++ expertise to fix.
9324 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
9325 Move defn to a more logical place, to be consistent with other
9326 skeletons.
9327 Don't translate debugging messages.
9328 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9329 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
9330 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
9331 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9332
9333 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9334 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9335 void, not int.
9336 * tests/glr-regression.at (Badly Collapsed GLR States):
9337 Likewise.
9338 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9339 yylex should return 0 at EOF rather than aborting.
9340
9341 Improve tests for stack overflow in GLR parser.
9342 Problem reported by twlevo@xs4all.nl.
9343 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9344 All uses removed.
9345 (yyStackOverflow): Just longjmp, but with value 2 so that caller
9346 can handle the problem.
9347 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9348 (yyparse): New local variable yyresult to record the result.
9349 Use result of setjmp to set it, rather than storing itinto
9350 struct.
9351 (yyDone): Remove label.
9352 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9353 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
9354 if YYABORT is used).
9355 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9356 yyparse status; put status > 1 into diagnostic.
9357 Check that status==2 works.
9358 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9359 Use exit status 3 for failure to open (which shouldn't happen).
9360
9361 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9362
9363 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9364 1 on syntax error; just let yyparse do its thing.
9365 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9366 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9367 (Exploding the Stack Size with Alloca):
9368 (Exploding the Stack Size with Malloc):
9369 Expect exit status 2, not 1, since the parser is supposed to blow
9370 its stack. Problem reported by twlevo@xs4all.nl.
9371
9372 * data/glr.c (yyparse): Don't assume that the initial calls
9373 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9374 Print a stack-overflow message and fail instead.
9375 Initialize the line-number information before creating the stack,
9376 so that the stack-overflow message can report line zero safely.
9377
9378 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9379
9380 Fix problems reported by twlevo@xs4all.nl.
9381 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9382 (yyuserMerge): Provide a default case if b4_mergers is empty.
9383 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9384 * tests/glr-regression.at
9385 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9386 Add casts to pacify C++ compilers.
9387 * tests/glr-regression.at (Improper merging of GLR delayed action
9388 sets): Declare yylex before using it.
9389 * tests/Makefile.am (maintainer-check-g++): Fix a stray
9390 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9391 test for valgrind; valgrind is independent of g++.
9392 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9393 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9394 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9395 Use a destructor, so that we can expand the stack. Change
9396 YYSTYPE to char * so that we can free it. Cast result of malloc.
9397
9398 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9399
9400 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9401 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9402
9403 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9404
9405 * PACKAGING: New file, suggested by Bruno Haible and taken from
9406 similar wording in gettext's PACKAGING file.
9407 * NEWS: Mention PACKAGING.
9408 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9409
9410 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9411
9412 * NEWS: Document recent i18n improvements.
9413 * bootstrap: Get runtime translations into runtime-po.
9414 Create runtime-po files automatically, if possible.
9415 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9416 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9417 does not infringe on the user's name space.
9418 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9419 * doc/bison.texinfo (Internationalization): Revamp the English
9420 and Texinfo syntax a bit, to try to make it clearer.
9421 (Bison Options, Option Cross Key): Mention --print-localedir.
9422 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9423 YYENABLE_NLS. Quote a bit more.
9424 * runtime-po/.cvsignore: New file.
9425 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9426 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9427 * runtime-po/quot.sed: Likewise.
9428 * runtime-po/boldquot.sed: Likewise.
9429 * runtime-po/en@quot.header: Likewise.
9430 * runtime-po/en@boldquot.header: Likewise.
9431 * runtime-po/insert-header.sin: Likewise.
9432 * runtime-po/remove-potcdate.sin: Likewise.
9433 * runtime-po/Makevars: Likewise.
9434 * runtime-po/LINGUAS: Likewise.
9435 * runtime-po/de.po: Likewise; we will rely on the translation project
9436 to maintain this, so "bootstrap" should get it.
9437 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
9438 its value.
9439 * src/main.c (main): Bind the bison-runtime domain, too.
9440
9441 2005-07-12 Bruno Haible <bruno@clisp.org>
9442
9443 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9444 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9445 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9446 * runtime-po: New directory.
9447 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9448 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9449 * runtime-po/Rules-quot: New file, copied from po/.
9450 * runtime-po/quot.sed: Likewise.
9451 * runtime-po/boldquot.sed: Likewise.
9452 * runtime-po/en@quot.header: Likewise.
9453 * runtime-po/en@boldquot.header: Likewise.
9454 * runtime-po/insert-header.sin: Likewise.
9455 * runtime-po/remove-potcdate.sin: Likewise.
9456 * runtime-po/Makevars: New file.
9457 * runtime-po/POTFILES.in: New file.
9458 * runtime-po/LINGUAS: New file.
9459 * runtime-po/bison-runtime.pot: New file.
9460 * runtime-po/de.po: New file.
9461 * m4/bison.m4: New file.
9462 * Makefile.am (SUBDIRS): Add runtime-po.
9463 (aclocaldir, aclocal_DATA): New variables.
9464 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9465 Define aclocaldir.
9466 * src/getargs.c (usage): Document --print-localedir option.
9467 (PRINT_LOCALEDIR_OPTION): New enum item.
9468 (long_options): Add --print-localedir option.
9469 (getargs): Handle --print-localedir option.
9470 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9471 (Internationalization): New section.
9472
9473 2005-07-12 Akim Demaille <akim@epita.fr>
9474
9475 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9476 for consistency with the rest of the code.
9477 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9478 Add separators.
9479
9480 2005-07-12 Akim Demaille <akim@epita.fr>
9481
9482 * src/parse-gram.y: Use %printer instead of YYPRINT.
9483
9484 2005-07-12 Akim Demaille <akim@epita.fr>
9485
9486 * src/symtab.h, src/symtab.c (symbol_print): New.
9487 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9488 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9489
9490 2005-07-12 Akim Demaille <akim@epita.fr>
9491
9492 * data/glr.c (b4_syncline): Fix (swap) the definitions of
9493 b4_at_dollar and b4_dollar_dollar.
9494
9495 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9496
9497 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9498 and Pennello's paper.
9499
9500 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9501
9502 * data/yacc.c (yyparse): Undo previous patch. Instead,
9503 set yylsp[0] and yyvsp[0] only if the initial action
9504 sets yylloc and yylval, respectively.
9505
9506 * data/yacc.c (yyparse): In the initial action, set
9507 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9508 This avoids the use of undefined variables if the initial
9509 action does not set yylloc and/or yylval.
9510
9511 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9512
9513 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9514 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9515 Remove from CVS. These files are automatically generated.
9516 * examples/extexi: Clarify that this file is now part of Bison,
9517 not GNU M4, and that it works with any POSIX-compatible Awk.
9518 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9519 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9520 so that we also get calc++-parser.yy. Geneate it.
9521 Use $(AWK), not gawk, since any conforming Awk will do.
9522 Put comment before action, since older 'make' can't handle comment
9523 in action.
9524 $(BUILT_SOURCES): List all built sources, not just some of them.
9525 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9526 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9527 $($(calc_sources_generated)): Remove unnecessary test for existence
9528 of target. (This had a shell syntax error anyway; a stray "x".)
9529 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9530 calc++-parser.yy.
9531 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9532
9533 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9534 implied by the other modules.
9535
9536 2005-07-06 Akim Demaille <akim@epita.fr>
9537
9538 Bind examples/calc++ to the package.
9539 * examples/calc++/Makefile: Remove, replaced by...
9540 * examples/calc++/Makefile.am: ... this new file.
9541 * examples/calc++/test: Remove input.
9542 * examples/calc++/compile: Remove.
9543 * examples/Makefile.am: New.
9544 * configure.ac, Makefile.am: Adjust.
9545 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9546
9547 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9548
9549 * data/glr.c (yyFail): Drastically simplify; since the format argument
9550 never had any % directives, we can simply pass it to yyerror.
9551 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9552 be modified later, as that is the usual style in glr.c.
9553 Problems reported by Paul Hilfinger.
9554
9555 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9556 and size overflow errors.
9557 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9558 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9559 (YYSIZEMAX): New macro.
9560 (yystpcpy): New function, taken from yacc.c.
9561 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9562 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9563 so that we don't have to maintain their signatures.
9564 (yyFail): Check for buffer overflow, by using vsnprintf rather
9565 than vsprintf. Allocate a bigger buffer if possible.
9566 Report an error if buffer allocation fails.
9567 (yyStackOverflow): New function.
9568 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9569 the initialization was successful. It might fail if storage was
9570 exhausted.
9571 (yyexpandGLRStack): Add more checks for storage allocation failure.
9572 Use yyStackOverflow to report failures.
9573 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9574 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9575 Don't assume stack number fits in int.
9576 (yysplitStack): Check for storage allocation failure.
9577 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9578 can print diagnostics on storage allocation failure. All callers
9579 changed.
9580 (yyresolveValue): Use yybool for boolean.
9581 (yyreportSyntaxError): Check for size-calculation overflow.
9582 This code is taken from yacc.c.
9583 (yyparse): Check for storage allocation errors when allocating
9584 the initial stack.
9585
9586 2005-07-05 Akim Demaille <akim@epita.fr>
9587
9588 Extract calc++ from the documentation.
9589 * doc/bison.texinfo (Calc++): Add the extraction marks.
9590 * examples/extexi: New, from the aborted GNU Programming 2E.
9591 Separate the different paragraph of a file with empty lines.
9592 * examples/Makefile: Use it to extract the whole calc++ example.
9593
9594 2005-06-24 Akim Demaille <akim@epita.fr>
9595
9596 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9597 class typedefs.
9598
9599 2005-06-22 Akim Demaille <akim@epita.fr>
9600
9601 * doc/bison.texinfo (C++ Language Interface): First stab.
9602 (C++ Parsers): Remove.
9603
9604 2005-06-22 Akim Demaille <akim@epita.fr>
9605
9606 * data/lalr1.cc (yylex_): Honor %lex-param.
9607
9608 2005-06-22 Akim Demaille <akim@epita.fr>
9609
9610 Start a set of simple examples.
9611 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9612 * examples/calc++/calc++-driver.hh,
9613 * examples/calc++/calc++-parser.yy,
9614 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9615 * examples/calc++/compile, examples/calc++/test: New.
9616
9617 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9618
9619 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9620 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9621 which stems from the 2005-05-27 patch.
9622
9623 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9624
9625 * data/glr.c: Modify treatment of unused parameters to permit use
9626 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9627
9628 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9629
9630 Fix infringement on user name space reported by Janos Zoltan Szabo.
9631 * data/yacc.c (yyparse): strlen -> yystrlen.
9632
9633 2005-05-30 Akim Demaille <akim@epita.fr>
9634
9635 * data/lalr1.cc (_): New.
9636 Translate the various messages.
9637
9638 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9639
9640 Fix infringement on user name space reported by Bruno Haible.
9641 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9642 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9643 the user's name space.
9644 (alloca): Include <stdlib.h> to get it, if it's not built in.
9645 (YYMALLOC, YYFREE): Define only if needed.
9646 (malloc, free): Declare, but only if needed, as this infringes on
9647 the user name space.
9648
9649 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9650
9651 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9652 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9653 with %d format.
9654 * lib/ebitset.c (min, max): Undef before defining.
9655 * lib/vbitset.c (min, max): Likewise.
9656 * lib/subpipe.c (create_subpipe): Save local variables in case
9657 vfork clobbers them.
9658
9659 2005-05-24 Bruno Haible <bruno@clisp.org>
9660
9661 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9662 error message syntax used by gcc-4.0.
9663
9664 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9665
9666 * README: Mention m4 1.4.3. Remove obsolete advice about
9667 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9668
9669 * bootstrap: Remove workaround for problem I encountered with
9670 gettext 0.14.1; it seems to be fixed now.
9671
9672 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9673
9674 * NEWS: Version 2.0a.
9675
9676 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9677 the previous change.
9678
9679 Various maintainer cleanups.
9680 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9681 conftest*, for benefit of CVS commands run at the same time as
9682 "configure". Add build-aux, since "bootstrap" now creates it and
9683 its subfiles.
9684 * Makefile.cfg (move_if_change): Remove.
9685 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9686 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9687 (po_repo, do-po-update, po-update, wget_files, get-targets):
9688 (config.guess-url_prefix, config.sub-url_prefix):
9689 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9690 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9691 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9692 Remove.
9693 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9694 this is now the recommended name.
9695 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9696 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9697 ylwrap. These files now go into build-aux.
9698 * config/move-if-change: Remove.
9699 * config/prev-version.txt: Bump from 1.75 to 2.0.
9700
9701 * bootstrap: Add stdio-safer, unistd-safer modules.
9702 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9703 we don't need it).
9704 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9705 fopen-safer.c, stdio-safer.h, unistd-safer.h.
9706 * lib/subpipe.c: Include "unistd-safer.h".
9707 (create_subpipe): Make sure all the newly-created
9708 file descriptors are > 2, so that diagnostics don't
9709 get sent down them (which might cause Bison to hang, in theory).
9710 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9711 * src/files.c (xfopen): Use fopen_safer, not fopen.
9712
9713 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
9714 yesterday's yacc.c fix.
9715
9716 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
9717
9718 * data/glr.c, data/lalr1.cc: Update copyright date.
9719
9720 Fix a destructor bug reported by Wolfgang Spraul in
9721 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
9722 * data/yacc.c (yyabortlab): Don't call destructor, and
9723 don't set yychar to EMPTY.
9724 (yyoverflowlab): Don't call destructor.
9725 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
9726 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
9727 since we no longer output the message "discarding lookahead token
9728 end of input ()".
9729
9730 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9731
9732 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
9733 fix a small glitch in debugging output.
9734 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
9735 after YY_SYMBOL_PRINT where needed.
9736
9737 (struct yyGLRState): Add some comments.
9738 (struct yySemanticOption): Add some comments.
9739 (union yyGLRStackItem): Add comment.
9740
9741 (yymergeOptionSets): Correct this to properly perform the union,
9742 avoiding infinite reported by Michael Rosien.
9743 Update comment.
9744
9745 * tests/glr-regression.at: Add test for GLR merging error reported
9746 by M. Rosien.
9747
9748 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
9749
9750 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
9751 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
9752 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
9753 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
9754 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
9755 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
9756 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
9757 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
9758 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
9759 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
9760 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
9761 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
9762 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
9763 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
9764 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
9765 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
9766 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
9767 src/derives.h, src/files.c, src/files.h, src/getargs.c,
9768 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
9769 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
9770 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
9771 src/output.h, src/parse-gram.c, src/parse-gram.h,
9772 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
9773 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
9774 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
9775 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
9776 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
9777 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
9778 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
9779 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
9780 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
9781 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
9782 tests/reduce.at, tests/regression.at, tests/sets.at,
9783 tests/synclines.at, tests/testsuite.at, tests/torture.at:
9784 Update FSF postal mail address.
9785
9786 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
9787
9788 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
9789 Problem reported by Ralf Menzel.
9790
9791 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
9792
9793 * tests/actions.at: Test that stack overflow invokes destructors.
9794 From Marcus Holland-Moritz.
9795 * data/yacc.c (yyerrlab): Move the code that destroys the stack
9796 from here....
9797 (yyreturn): to here. That way, destructors are called properly
9798 even if the stack overflows, or the user calls YYACCEPT or
9799 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
9800 (yyoverflowlab): Destroy the lookahead.
9801
9802 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
9803
9804 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
9805
9806 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
9807
9808 * NEWS: Bison-generated C parsers no longer quote literal strings
9809 associated with tokens.
9810 * src/output.c (prepare_symbols): Don't escape strings,
9811 since users don't want to see C escapes.
9812 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
9813 in diagnostics.
9814 * tests/input.at (Torturing the Scanner): Likewise.
9815 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
9816
9817 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
9818
9819 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
9820 the data size is known to be too small and we can't increase it.
9821 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
9822
9823 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
9824
9825 * src/parse-gram.y: Include quotearg.h.
9826 (string_as_id): Quote $1 before using it as a key, since the
9827 lexer no longer quotes it for us.
9828 (string_content): Don't strip quotes, since lexer no longer
9829 quotes it for us.
9830 * src/scan-gram.l: Include quotearg.h.
9831 ("\""): Omit quote.
9832 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
9833 a key, since the rest of the lexer doesn't quote it.
9834 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
9835 * tests/regression.at (Token definitions): Check for backslashes
9836 in token strings.
9837
9838 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
9839 (YYSIZE_T): Define to unsigned long int when using an older compiler.
9840 (yyparse): Revamp code to generate long syntax error message, to
9841 make it easier to translate, and to avoid problems with arithmetic
9842 overflow. Change "virtual memory" to "memory" in diagnostic, since
9843 we don't know whether the memory is virtual.
9844
9845 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
9846
9847 * NEWS: Bison-generated C parsers now use the _ macro to
9848 translate strings.
9849 * data/yacc.c (_) [!defined _]: New macro.
9850 All English strings wrapped inside this macro.
9851 * doc/bison.texinfo (Bison Parser): Document _.
9852 * po/POTFILES.in: Include src/parse-gram.c, since it now
9853 includes translateable strings that parse-gram.y doesn't.
9854
9855 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
9856
9857 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
9858 reverting the 2004-10-11 change to this function.
9859 (symbol_check_alias_consistency): Don't call symbol_type_set
9860 if the type name is already correct.
9861 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
9862
9863 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
9864
9865 * tests/regression.at (Token definitions): Don't use a token named
9866 c, as that generates a "#define c ..." that runs afoul of buggy
9867 stdlib.h that uses the identifier c as a member of struct
9868 drand48_data. Problem reported by Horst Wente.
9869
9870 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
9871
9872 * bootstrap: Change translation URL from
9873 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
9874 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
9875 redirection glitches. Problem reported by twlevo@xs4all.nl.
9876
9877 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
9878
9879 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
9880 after operands; POSIX says this isn't portable for the c99 command.
9881
9882 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
9883
9884 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
9885 immediately if a data overrun has occurred; this may help us track
9886 down what may be a spurious failure on MacOS.
9887
9888 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
9889
9890 Respond to problems reported by twlevo@xs4all.nl.
9891
9892 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
9893
9894 * src/vcg.h: Comment fix.
9895 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
9896 (G_CMAX): Change to -1 instead of INT_MAX.
9897
9898 * data/yacc.c (yyparse): Omit spaces before #line.
9899
9900 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
9901
9902 * src/tables.c (state_number_to_vector_number): Put it inside an
9903 "#if 0", since it's not currently used. Problem reported by
9904 Roland McGrath.
9905
9906 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
9907
9908 * src/output.c (escaped_output): Renamed from
9909 escaped_file_name_output, since we now use it for symbol tags as
9910 well. All uses changed.
9911 (symbol_destructors_output, symbol_printers_output):
9912 Escape symbol tags too.
9913 Problem reported by Matyas Forstner in
9914 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
9915
9916 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
9917 not needed.
9918 * src/output.c (user_actions_output, token_definitions_output,
9919 symbol_destructors_output, symbol_printers_output): Likewise.
9920 * src/reader.c (prologue_augment): Likewise.
9921 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
9922
9923 * src/vcg.c (output_edge): Don't quote linestyle arg.
9924 Problem reported by twlevo@xs4all.nl.
9925
9926 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
9927
9928 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
9929 example, reported by Derek M Jones. Also, make the example even
9930 more outrageous, to better illustrate how bad the problem is.
9931
9932 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
9933
9934 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
9935 putsym. Typo reported by Sebastian Piping.
9936
9937 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
9938
9939 * doc/bison.texinfo (Language and Grammar): some -> same
9940 (Epilogue): int he -> in the
9941 Typos reported by Sebastian Piping via Justin Pence.
9942
9943 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
9944
9945 * tests/glr-regression.at (Improper handling of embedded actions
9946 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
9947 embedded actions and $-N in GLR parsers", work around an Autoconf bug
9948 with dollar signs in test names.
9949 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
9950 for a similar reason.
9951
9952 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
9953
9954 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
9955 wants to redefine G_VIEW.
9956
9957 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
9958
9959 * src/vcg.c (get_view_str): Remove case for normal_view.
9960 Problem reported by twlevo@xs4all.nl.
9961
9962 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
9963
9964 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
9965 Problem reported by twlevo@xs4all.nl.
9966
9967 * doc/bison.texinfo: Change @dircategory from "GNU programming
9968 tools" to "Software development". Requested by Richard Stallman
9969 via Karl Berry.
9970
9971 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
9972
9973 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
9974 Problem reported by twlevo@xs4all.nl.
9975
9976 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
9977
9978 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
9979 keyword; it's not needed with modern compilers, and it doesn't
9980 affect correctness with older compilers. Suggested by
9981 twlevo@xs4all.nl.
9982
9983 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
9984
9985 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
9986 gcc -Wswitch-default.
9987 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9988 * data/yacc.c (yyparse): Likewise.
9989
9990 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
9991
9992 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
9993 already. Let config.h define any nonstandard values.
9994
9995 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
9996
9997 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
9998 for the benefit of slower hosts. Problem reported by
9999 Nelson H. F. Beebe.
10000
10001 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10002
10003 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10004 being defined and not used.
10005 * data/lalr1.cc (yyparse): Likewise.
10006 Use "if (false)" rather than "if (0)".
10007
10008 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10009
10010 * TODO: Mention that we should allow NUL bytes in tokens.
10011
10012 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10013
10014 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10015 Problem reported by Hans Aberg.
10016
10017 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10018
10019 * src/getargs.c (version): Happy new year; update overall
10020 program copyright date from 2004 to 2005.
10021
10022 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10023 Problem reported by Hans Aberg.
10024 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10025 (Output file names.): Add a test for the case when standard output
10026 is closed.
10027
10028 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10029
10030 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10031 to fix an oversight in the Bison 2.0 manual.
10032
10033 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10034
10035 * NEWS: Version 2.0. Reformat the existing news items since
10036 1.875, so that related items are grouped together.
10037 * configure.ac (AC_INIT): Bump version to 2.0.
10038 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10039
10040 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10041 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10042 otherwise, we're not testing alloca. Unfortunately there's no
10043 simple way to consult HAVE_ALLOCA here.
10044
10045 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10046 for yymsg, too.
10047
10048 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10049 hand. This avoids a warning about comparing int to size_t when
10050 GCC warnings are enabled.
10051
10052 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10053
10054 * NEWS: Bison-generated parsers no longer default to using the
10055 alloca function (when available) to extend the parser stack, due
10056 to widespread problems in unchecked stack-overflow detection.
10057 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10058 responsibility to set it to a positive value. This lets the user
10059 specify a value that is not a preprocessor constant.
10060 * data/yacc.c (YYMAXDEPTH): Likewise.
10061 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10062 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10063 to be a compile-time constant. However, explain the constraints on it.
10064 Also, explain the constraints on YYINITDEPTH.
10065 (Table of Symbols): Explain that alloca is no longer the default.
10066 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10067 to 1.
10068
10069 * doc/bison.texinfo (Location Default Action): Mention that n must
10070 be zero when k is zero. Suggested by Frank Heckenbach.
10071
10072 2004-12-22 Akim Demaille <akim@epita.fr>
10073
10074 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10075 (parser::state_type, parser::semantic_type, parser::location_type):
10076 Private, not public.
10077 (parser::parse): Return ints, not bool.
10078 Returning a bool introduces a problem: 0 corresponds to false, and
10079 it seems weird to return false on success. Returning true changes
10080 the conventions for yyparse.
10081 Alternatively we could return void and send an exception.
10082 There is no clear consensus (yet?).
10083 (state_stack, semantic_stack, location_stack): Rename as...
10084 (state_stack_type, semantic_stack_type, location_stack_type): these.
10085 Private, not public.
10086 * tests/c++.at: New.
10087 * tests/testsuite.at, tests/Makefile.am: Adjust.
10088
10089 2004-12-21 Akim Demaille <akim@epita.fr>
10090
10091 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10092
10093 2004-12-21 Akim Demaille <akim@epita.fr>
10094
10095 Don't impose std::string for filenames.
10096
10097 * data/lalr1.cc (b4_filename_type): New.
10098 (position::filename): Use it.
10099 (parser.hh): Move the inclusion of stack.hh and location.hh below
10100 the user code, so that needed headers for the filename type can be
10101 included first.
10102 Forward declare them before the user code.
10103 * tests/Makefile.am (check-local, installcheck-local): Pass
10104 TESTSUITEFLAGS to the TESTSUITE.
10105
10106 2004-12-20 Akim Demaille <akim@epita.fr>
10107
10108 Use more STL like names: my_class instead of MyClass.
10109
10110 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10111 (SemanticStack, SemanticType, StateStack, StateType)
10112 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10113 (Parser::value): Rename as...
10114 (location_stack, location_type, rhs_number_type, semantic_stack)
10115 (semantic_type, state_stack, state_type, token_number_type, stack)
10116 (slice, traits, parser::yylloc, parser::yylval): these.
10117
10118 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10119
10120 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10121
10122 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10123 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10124
10125 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10126
10127 Remove uses of 'short int' and 'unsigned short int'. This raises
10128 some arbitrary limits. It uses more memory but nowadays that's
10129 not much of an issue.
10130
10131 This change does not affect the generated parsers; that's a different
10132 task, as some users will want to conserve memory there.
10133
10134 Ideally we should use size_t to represent all object counts, and
10135 something like ptrdiff_t to represent signed differences of object
10136 counts; but that will require more code-cleanup than I have the
10137 time to do right now.
10138
10139 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10140 Use size_t, not int or short int, to count objects.
10141 * src/closure.c (nritemset, closure): Likewise.
10142 * src/closure.h (nritemset, closure): Likewise.
10143 * src/nullable.c (nullable_compute): Likewise.
10144 * src/print.c (print_core): Likewise.
10145 * src/print_graph.c (print_core): Likewise.
10146 * src/state.c (state_compare, state_hash): Likewise.
10147 * src/state.h (struct state): Likewise.
10148 * src/tables.c (default_goto, goto_actions): Likewise.
10149
10150 * src/gram.h (rule_number, rule): Use int, not short int.
10151 * src/output.c (prepare_rules): Likewise.
10152 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10153 errs, reductions): Likewise.
10154 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10155 Likewise.
10156 * src/tables.c (vector_number, tally, action_number,
10157 ACTION_NUMBER_MINIMUM): Likewise.
10158 * src/output.c (muscle_insert_short_int_table): Remove.
10159
10160 2004-12-17 Akim Demaille <akim@epita.fr>
10161
10162 * data/lalr1.cc: Extensive Doxygenation.
10163 (error_): Rename as...
10164 (error): this, since it is visible to the user.
10165 Adjust callers.
10166 (Parser::message): Now an automatic variable from...
10167 (Parser::yyreport_syntax_error_): here.
10168 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10169 Parser::error.
10170 * tests/input.at: Escape $.
10171
10172 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10173
10174 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10175 Parenthesize rhs to avoid obscure problems with mistakes like
10176 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10177 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10178 b4_rhs_location): Likewise.
10179 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10180 b4_rhs_location): Likewise.
10181
10182 2004-12-16 Akim Demaille <akim@epita.fr>
10183
10184 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10185 yacc.c: be sure to stay within yycheck_.
10186 * tests/actions.at: Re-enable C++ tests.
10187
10188 2004-12-16 Akim Demaille <akim@epita.fr>
10189
10190 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10191 real.
10192
10193 2004-12-16 Akim Demaille <akim@epita.fr>
10194
10195 Use #define to handle the %name-prefix.
10196
10197 * data/glr.c, data/yacc.c: Comment changes.
10198 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10199 so that one can refer to yylex in the parser file, and have it
10200 renamed, as is the case with other skeletons.
10201
10202 2004-12-16 Akim Demaille <akim@epita.fr>
10203
10204 Move lalr1.cc internals into yy*.
10205
10206 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10207 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10208 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10209 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10210 (empty_, final_, terror_, errcode_, ntokens_)
10211 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10212 (looka_, ilooka_, error_range_, nerrs_):
10213 Rename as...
10214 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10215 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10216 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10217 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10218 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10219 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10220 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10221 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10222 these.
10223
10224 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10225
10226 Fix some problems reported by twlevo at xs4all.
10227 * src/symtab.c (symbol_new): Report an error if the input grammar
10228 contains too many symbols. This is better than calling abort() later.
10229 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10230 (struct node, struct graph):
10231 Rename member expand to stretch. All uses changed.
10232 (struct graph): Remove member layoutalgorithm. All uses removed.
10233 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10234 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10235 All uses changed.
10236 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10237
10238 2004-12-15 Akim Demaille <akim@epita.fr>
10239
10240 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10241 Add more Doxygen comments.
10242 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10243 (report_syntax_error_, translate_): Rename as...
10244 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10245 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10246
10247 2004-12-15 Akim Demaille <akim@epita.fr>
10248
10249 * data/lalr1.cc (lex_): Rename as...
10250 (yylex_): this.
10251 Move the trace here.
10252 Take the %name-prefix into account.
10253 Reported by Alexandre Duret-Lutz.
10254
10255 2004-12-15 Akim Demaille <akim@epita.fr>
10256
10257 Simplify the C++ parser constructor.
10258
10259 * data/lalr1.cc (debug_): Rename as...
10260 (yydebug_): so that the parser's internals are always in the yy*
10261 pseudo namespace.
10262 Adjust uses.
10263 (b4_parse_param_decl): Remove the leading comma as it is now only
10264 called as unique argument list.
10265 (Parser::Parser): Remove the constructor accepting a location and
10266 an initial debugging level.
10267 Remove from the other ctor the argument for the debugging level.
10268 (debug_level_type, debug_level, set_debug_level): New.
10269
10270 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10271 constructor calls.
10272
10273 2004-12-15 Akim Demaille <akim@epita.fr>
10274
10275 Remove b4_root related material: failure experiment
10276 (which goal was to allow to derive from a class).
10277
10278 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10279 definitions and uses.
10280
10281 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10282
10283 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10284 not 2, since it's not portable to subtract 1 from the start of an
10285 array. The new item 0 is never set or used. All uses changed.
10286
10287 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10288 the default definition of YYLLOC_DEFAULT. Problem reported
10289 by Frank Heckenbach.
10290
10291 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10292
10293 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10294 the normal case and one for the error case. Just use the
10295 first one uniformly. Problem reported by Frank Heckenbach.
10296 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10297 use exactly the same macro in both places.
10298 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10299 so that the normal-case YYRHSLOC works for the error case too.
10300 All uses changed.
10301 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10302 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10303 * doc/bison.texinfo (Location Default Action): Don't claim that
10304 we have an array of locations. Use the same macro for both glr
10305 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10306 the index is 0.
10307
10308 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10309
10310 * HACKING: Update email addresses to send announcements to.
10311
10312 * configure.ac (AC_INIT): Bump version to 1.875f.
10313
10314 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10315
10316 * NEWS: Version 1.875e.
10317 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10318
10319 * src/scan-skel.l: Include "complain.h", for "fatal".
10320
10321 * src/relation.h (relation_print, relation_digraph):
10322 Relation sizes are of type relation_node, not size_t (this is
10323 merely a doc fix, since the two types are equivalent).
10324 (relation_transpose): Relation sizes are of type relation_node,
10325 not int.
10326 * src/relation.c: Likewise.
10327 (top, infinity): Now of type relation_node, not int.
10328 (traverse, relation_transpose): Use relation_node, not int.
10329
10330 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10331 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10332 (yyparse): Remove unused local introduced in 2004-10-25 patch.
10333
10334 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
10335 specifying whether the test should be skipped. Use it tp
10336 specify that the [%defines %skeleton "lalr1.cc"] tests currently
10337 fail on some hosts, and should be skipped.
10338
10339 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
10340
10341 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
10342 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10343 unless otherwise specified below.
10344
10345 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10346 to allocate kernel_base, kernel_items, kernel_size, since
10347 they needn't be initialized to 0.
10348 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10349 * src/closure.c (new_closure): Likewise, for itemset.
10350 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10351 * src/lalr.c (set_goto_map): Likewise, for temp_map.
10352 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10353 (build_relations): Likewise for edge, states1, includes.
10354 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10355 * src/reader.c (packgram): Likewise, for ritem, rules.
10356 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10357 * src/relation.c (relation_digraph): Likewise for VERTICES.
10358 (relation_transpose): Likewise for new_R, end_R.
10359 * src/symtab.c (symbols_token_translations_init): Likewise for
10360 token_translations.
10361 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10362 (token_actions): Likewise for yydefact, actrow, conflrow,
10363 conflict_list.
10364 (save_column): Likewise for froms[symno], tos[symno].
10365 (goto_actions): Likewise for state_count.
10366 (pack_table): Likewise for base, pos, check.
10367 (tables_generate): Likewise for width.
10368
10369 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10370 for initial core. Just have a separate core, so we needn't worry
10371 about whether kernel_size and kernel_base are initialized.
10372
10373 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10374 kernel_size, kernel_items): Remove unnecessary initialization.
10375 * src/conflicts.c (conflicts): Likewise.
10376 * src/derives.c (derives): Likewise.
10377 * src/muscle_tablc (muscle_insert): Likewise.
10378 * src/relation.c (relation_digraph): Likewise.
10379 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10380 conflrow, conflict_table, conflict_list, table, check):
10381 Likewise.
10382
10383 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10384 This is because all callers pass unsigned int.
10385 * src/closure.h (new_closure): Likewise.
10386
10387 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10388 (build_relations): Initialize includes[i] in all cases.
10389 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10390 and rules[ruleno].precsym. Initialize members in order.
10391 * src/relation.c (relation_transpose): Always initialize new_R[i]
10392 and end_R[i].
10393 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10394
10395 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10396 conflict_list[0] was always 0, but now it isn't initialized.
10397
10398 * src/table.c (table_grow): When conflict_table grew, the grown
10399 area wasn't cleared. Fix this.
10400
10401 * lib/.cvsignore: Add strdup.c, strdup.h.
10402 * m4/.cvsignore: Add strdup.m4.
10403
10404 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10405
10406 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10407 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10408 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10409 ngotos + 1 without checking for overflow.
10410 (build_relations): Use END_NODE, not -1, to denote end of edges.
10411 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10412 build_relations): Use goto_number, not int, for goto numbers.
10413 * src/tables.c (save_column, default_goto): Likewise.
10414
10415 2004-11-23 Akim Demaille <akim@epita.fr>
10416
10417 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10418 of #defining from yystype.
10419 Don't typedef yystype, C++ does not need it.
10420 This lets it possible to forward declare it as union.
10421
10422 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10423
10424 * bootstrap (gnulib_modules): Add extensions.
10425 Problem reported by Jim Meyering.
10426
10427 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10428
10429 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10430 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10431 src/system.h, src/tables.c: XFREE -> free, to accommodate
10432 recent change to gnulib xalloc.h.
10433 Problem reported by Jim Meyering.
10434
10435 2004-11-17 Akim Demaille <akim@epita.fr>
10436
10437 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10438
10439 2004-11-17 Akim Demaille <akim@epita.fr>,
10440 Alexandre Duret-Lutz <adl@gnu.org>
10441
10442 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10443 changes.
10444 (YYCDEBUG): Adjust.
10445 Use it instead of cdebug_.
10446 (Parser::debug_stream, Parser::set_debug_stream): New.
10447 (Parser::symprint_): Define cdebug_ for temporary backward
10448 compatibility.
10449 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10450 debug_stream ().
10451
10452 2004-11-17 Akim Demaille <akim@epita.fr>
10453
10454 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10455 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10456 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10457 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10458
10459 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10460
10461 * data/glr.c (yyloc_default): Remove; not used.
10462 Problem reported by Frank Heckenbach.
10463
10464 2004-10-25 Akim Demaille <akim@epita.fr>
10465
10466 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10467 Introduce another definition to address simple location arrays.
10468 (yyGLRStack): New member: yyerror_range.
10469 (yyrecoverSyntaxError, yyparse): Update it.
10470 (yyrecoverSyntaxError): Use it when shifting the error token to
10471 have an accurate range, equivalent to the one computed by both
10472 yacc.c and lalr1.cc.
10473 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10474 that column numbers start at column 0, as per GNU Coding
10475 Standards, the others tests, and the doc.
10476 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10477 Adjust to the above change (first column is 0).
10478 And adjust the location of the "<error>", now covering the whole
10479 line.
10480
10481 2004-10-22 Akim Demaille <akim@epita.fr>
10482 and Paul Eggert <eggert@cs.ucla.edu>
10483
10484 Remove some arbitrary limits on goto numbers and relations.
10485 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10486 initial values, since they're never used.
10487 (set_goto_map): ngotos is now unsigned, so test for overflow
10488 by seeing whether it wraps around to zero.
10489 * src/lalr.h (goto_number): Now size_t, not short int.
10490 (GOTO_NUMBER_MAXIMUM): Remove.
10491 * src/relation.c (relation_print, traverse, relation_transpose):
10492 Check for END_NODE rather than looking at sign.
10493 * src/relation.h (END_NODE): New macro.
10494 (relation_node): Now size_t, not short int.
10495
10496 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10497
10498 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10499 keyword, not an identifier. Problem reported by Baron Schwartz in
10500 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10501
10502 2004-10-11 Akim Demaille <akim@epita.fr>
10503
10504 * src/symtab.c (symbol_check_alias_consistency): Also check
10505 type names, destructors, and printers.
10506 Reported by Alexandre Duret-Lutz.
10507 Recode the handling of associativity and precedence in terms
10508 of symbol_precedence_set.
10509 Accept no redeclaration at all, not even equal to the previous
10510 value.
10511 (redeclaration): New.
10512 Use it to factor redeclaration complaints.
10513 (symbol_make_alias): Don't set the type of the alias, let
10514 symbol_check_alias_consistency do it as for other features.
10515 * src/symtab.h (symbol): Add new member prec_location, and
10516 type_location.
10517 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10518 * tests/input.at (Incompatible Aliases): New.
10519
10520 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10521
10522 .cvsignore fixes to accommodate gnulib changes,
10523 and the practice of naming build directories "_build".
10524 * .cvsignore: Add "_*". Sort.
10525 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10526 * m4/.cvsignore: Add "*_gl.m4".
10527
10528 2004-10-06 Akim Demaille <akim@epita.fr>
10529
10530 * src/parse-gram.y (add_param): Fix the truncation of trailing
10531 spaces.
10532
10533 2004-10-05 Akim Demaille <akim@epita.fr>
10534
10535 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10536 whether the reducion was empty or not. This leaves room to
10537 improve the use of YYLLOC_DEFAULT in such a case.
10538 lalr1.cc is still experimental, so changing this is acceptable.
10539 And finally, there are probably not many users who changed the
10540 handling of locations in GLR, so changing is admissible too.
10541
10542 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10543 empty reduction, set @$ to an empty location ending the previously
10544 stacked symbol.
10545 Adjust uses to make sure the code is triggered on empty
10546 reductions.
10547 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10548 expected output: empty reductions have empty locations.
10549
10550 2004-09-29 Akim Demaille <akim@epita.fr>
10551
10552 * data/lalr1.cc: Move towards a more standard C++ coding style
10553 for templates: Class < T > -> Class<T>.
10554
10555 2004-09-29 Akim Demaille <akim@epita.fr>
10556
10557 * data/lalr1.cc: Reinstall the former ctor, for sake of
10558 compatibility, but warn it will be removed.
10559 Move towards a more standard C++ coding style (i.e., type *var ->
10560 type* var).
10561
10562 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10563
10564 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10565 since it's less likely to work if NULs are involved in the future.
10566
10567 2004-09-27 Akim Demaille <akim@epita.fr>
10568
10569 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10570
10571 2004-09-27 Akim Demaille <akim@epita.fr>
10572
10573 * data/lalr1.cc (b4_parse_param_decl_1): New.
10574 (b4_parse_param_decl): Use it to have different names between attribute
10575 and argument names.
10576 (b4_cc_constructor_call): Likewise.
10577
10578 2004-09-24 Akim Demaille <akim@epita.fr>
10579
10580 * src/parse-gram.y (add_param): Strip the leading and trailing
10581 blanks from a formal argument declaration.
10582 (YY_LOCATION_PRINT): New.
10583
10584 2004-09-24 Akim Demaille <akim@epita.fr>
10585
10586 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10587 after the location.
10588
10589 2004-09-24 Akim Demaille <akim@epita.fr>
10590
10591 * doc/bison.texinfo (Table of Symbols): Sort.
10592
10593 2004-09-21 Akim Demaille <akim@epita.fr>
10594
10595 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10596 the useless parentheses.
10597 Suggested by Paul Eggert.
10598
10599 2004-09-20 Akim Demaille <akim@epita.fr>
10600
10601 Let the initial-action act on the look-ahead, and use it for the
10602 "initial push" (corresponding to an hypothetical beginning-of-file).
10603 And let lalr1.cc honor %initial-action.
10604
10605 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10606 example.
10607 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10608 (Parser::Parser): Remove the ctor that used to initialize it.
10609 (Parser::parse): Like in the other skeletons, issue the "starting
10610 parse" message before any action.
10611 Honor %initial-action.
10612 Initialize the stacks with the lookahead.
10613 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10614 look-ahead.
10615 Push them in the stacks.
10616 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10617
10618 2004-09-20 Akim Demaille <akim@epita.fr>
10619
10620 * doc/bison.texinfo (Initial Action Decl): New.
10621
10622 2004-09-20 Akim Demaille <akim@epita.fr>
10623
10624 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10625 clearer criterion to define it.
10626 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10627 When reducing on an empty RHS, use the latest stacked location as
10628 location.
10629 yylloc is not always available.
10630 * data/glr.c: Likewise.
10631 Also, honor initial-actions.
10632
10633 2004-09-20 Akim Demaille <akim@epita.fr>
10634
10635 * data/yacc.c (YY_LOCATION_PRINT): New.
10636 Define when we know YYLTYPE's structure, i.e., when the default
10637 YYLLOC_DEFAULT is used.
10638 * data/c.m4 (b4_yysymprint_generate): Use it.
10639 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10640 value of the result.
10641 (error_start_): Replace with...
10642 (error_range_): this location array.
10643 This allows to replace code relying on the implementation of
10644 locations by portable code.
10645 * data/yacc.c (yylerrsp): Replace with...
10646 (yyerror_range): this.
10647 Every time a token is popped, update yyerror_range[0], to have an
10648 accurate location for the error token.
10649 * data/glr.c (YY_LOCATION_PRINT): New.
10650 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10651 deference a pointer.
10652 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10653 report the location in %printers.
10654
10655 * src/scan-skel.l: Instead of abort, report error messages to ease
10656 understanding skeleton scanning failures.
10657
10658 2004-09-16 Akim Demaille <akim@epita.fr>
10659
10660 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10661 (iterator, const_iterator): these, to be more in the C++ spirit.
10662 Also, return reverse iterators so that when displaying the stack
10663 we display its bottom first.
10664 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10665 from yacc.c.
10666 We should probably use vector here though.
10667
10668 2004-09-16 Akim Demaille <akim@epita.fr>
10669
10670 Have more complete shift traces.
10671
10672 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10673 to report Shifts instead of ad hoc YYDPRINTF invocations,
10674 including for the error token.
10675 * data/lalr1.cc (symprint_): Output the location.
10676 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10677 output the location within the %printer.
10678 Activate GLR tests, at least to make sure they compile properly.
10679 They still don't pass though.
10680 * tests/calc.at: Adjust expect verbose output, since now "Entering
10681 state..." is on a different line than the "Shifting" message.
10682
10683 2004-09-08 Akim Demaille <akim@epita.fr>
10684
10685 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10686 Bison directive from the Bison file to the invocation of this
10687 macro, so that these directives are passed to
10688 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10689 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10690 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10691 the extra Bison directives instead of the whole series.
10692 Change the grammar so that there are recoverable errors, and
10693 unrecoverable errors. Now we can have the parser give up before
10694 consuming the whole input. As a result we now can observe that
10695 the lookahead is freed when needed.
10696 Change the parser source to parse argv[1] instead of a hard coded
10697 string.
10698 Simplify yylex, and give a value and location to EOF.
10699 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10700 passed directives already coded in the file.
10701 Add some tests to check the location of "error".
10702 For some tests, the C++ parser is correct, and not yacc.c.
10703 For other tests, they provide different, but unsatisfying, values,
10704 so keep the C++ value so that at least one parser is "correct"
10705 according to the test suite.
10706 (Actions after errors): Remove, this is subsumed by the
10707 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10708
10709 2004-09-06 Akim Demaille <akim@epita.fr>
10710
10711 * data/lalr1.cc: Adjust the indentation of the labels.
10712 (Parser::pop): New.
10713 Use it.
10714
10715 2004-09-06 Akim Demaille <akim@epita.fr>
10716
10717 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
10718 argument, an informative message.
10719 Call YY_SYMBOL_PRINT.
10720 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
10721 * data/lalr1.cc (destruct_): Likewise.
10722 In addition, no longer depend on b4_yysymprint_generate and
10723 b4_yydestruct_generate to generate these functions, do it "by
10724 hand".
10725
10726 2004-09-03 Akim Demaille <akim@epita.fr>
10727
10728 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
10729 invoked, yydestruct the lookahead.
10730 * tests/calc.at (Calculator $1): Update the expected lengths of
10731 traces: there is an added line for the discarded lookahead.
10732 * doc/bison.texinfo (Destructor Decl): Some rewording.
10733 Define "discarded" symbols.
10734
10735 2004-09-02 Akim Demaille <akim@epita.fr>
10736
10737 * data/lalr1.cc (translate_, destruct_): No reason to be static.
10738
10739 2004-09-02 Akim Demaille <akim@epita.fr>
10740
10741 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
10742 (YYDSYMPRINTF): Rename as...
10743 (YY_SYMBOL_PRINT): this.
10744 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
10745 two.
10746 Use it instead of direct symprint_ calls.
10747 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
10748 one.
10749
10750 2004-09-02 Akim Demaille <akim@epita.fr>
10751
10752 * data/lalr1.cc (b4_yysymprint_generate): New.
10753 (symprint_): New member function, defined when YYDEBUG.
10754 Use it consistently instead of token/nterm debugging output by
10755 hand.
10756 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
10757 %printer calls to use cdebug_ when using lalr1.cc.
10758
10759 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
10760
10761 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
10762 with #ifdef YYDEBUG.
10763
10764 2004-08-26 Akim Demaille <akim@epita.fr>
10765
10766 * doc/bison.texinfo (Implementing Loops): Rename as...
10767 (Implementing Gotos/Loops): this.
10768
10769 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
10770
10771 Adjust to latest gnulib.
10772 * bootstrap (gnulib_modules): Add xalloc-die.
10773 Set LC_ALL=C so that file names sort consistently.
10774 Prefer the gnulib copies of gettext.m4, glibc21.m4,
10775 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
10776 uintmax_t.m4, ulonglong.m4.
10777 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
10778 po.m4 since we are now using _gl.m4 instead.
10779
10780 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
10781
10782 * src/scan-action.l: Remove. Scanning of semantic actions is
10783 handled in scan-gram.l.
10784
10785 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
10786
10787 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
10788
10789 * src/location.h (struct): The file member is a uniqstr.
10790 (equal_boundaries): Use UNIQSTR_EQ for comparison.
10791
10792 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
10793
10794 Fix bug with non-%union parsers that have printers or destructors,
10795 which led to a Bison core dump. Reported by Peter Fales in
10796 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
10797
10798 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
10799 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
10800 not to our own type.
10801 * src/output.c (symbol_destructors_output, symbol_printers_output):
10802 Don't assume %union.
10803 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
10804 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
10805 UNION-FLAG. All callers changed.
10806 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
10807 Use type char, not unsigned int, when declaring an array of char;
10808 this lets us remove a cast.
10809 (Printers and Destructors): Add non-%union test cases.
10810
10811 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10812
10813 * doc/bison.texinfo: Minor editorial changes, mostly to the new
10814 GLR writeups. E.g., avoid frenchspacing and the future tense,
10815 change "lookahead" to "look-ahead", and change "wrt" to "with
10816 respect to".
10817
10818 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10819
10820 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
10821 New sections, split off from the GLR Parsers section. Put the new
10822 Simple GLR Parser near the start of the GLR section, for clarity.
10823 Rewrite connective text.
10824
10825 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
10826
10827 * doc/bison.texinfo (Simple GLR Parsers): New section.
10828
10829 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10830
10831 * NEWS, TODO, doc/bison.texinfo:
10832 Use "look-ahead" instead of "lookahead", to be consistent.
10833 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
10834 while we're fixing "look-ahead".
10835 * src/conflicts.c (shift_set): Renamed from shiftset.
10836 (look_ahead_set): Renamed from lookaheadset.
10837 * src/print.c: Likewise.
10838 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
10839 name for "lookahead".
10840 (report_types, usage): Likewise.
10841 * src/getargs.h (report_look_ahead_tokens): Renamed from
10842 report_lookaheads.
10843 * src/lalr.c (compute_look_ahead_tokens): Renamed from
10844 compute_lookaheads.
10845 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
10846 (look_ahead_tokens_print): Renamed from lookaheads_print.
10847 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
10848 state_rule_lookaheads_print.
10849 * src/state.h: Likewise.
10850 (reductions.look_ahead_tokens): Renamed from lookaheads.
10851 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
10852 AT_DATA_LOOKAHEADS_GRAMMAR.
10853
10854 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
10855
10856 * README: Update location of patched M4 distribution.
10857
10858 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
10859
10860 Don't assume the C++ compiler takes the same arguments as the C compiler
10861 (trivial change).
10862 * configure.ac (O0CXXFLAGS): New var.
10863 * tests/atlocal.in (CXXFLAGS): Use it.
10864
10865 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
10866
10867 Fix some "make check" problems with C++ reported by
10868 Albert Chin-A-Young for Tru64 C++ in this thread:
10869 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
10870
10871 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
10872 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10873 Output to a .cc file for C++, not to a .c file.
10874 * tests/calc.at (AT_CHECK_CALC): Likewise.
10875 * tests/regression.at (AT_CHECK_DANCER): Likewise.
10876 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
10877
10878 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
10879
10880 * tests/calc.at, tests/actions.at: Workaround for SGI
10881 C++ compiler. (trivial change)
10882
10883 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
10884
10885 Spent a few hours checking out which prerequisite versions the
10886 current sources actually require. I went all the way back to
10887 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
10888 a seemingly endless set of combinations of versions more recent
10889 than that. The bottom line is that the current sources require
10890 fairly recent versions of the build tools, and it'll be some work
10891 to change this.
10892 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
10893 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
10894 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
10895 Add comments explaining why those particular versions are
10896 currently needed.
10897
10898 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
10899 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
10900 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
10901
10902 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
10903 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
10904
10905 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
10906
10907 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
10908 0.11.5. Suggested by Bruno Haible.
10909 * bootstrap: Remove gettext version checking.
10910
10911 * doc/bison.texinfo (Decl Summary): Also mention that %union
10912 can depend on prerequisite types. Problem reported by Tim
10913 Van Holder.
10914
10915 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
10916
10917 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
10918 * README-alpha: Don't tell people not to package this.
10919
10920 * bootstrap: Don't assume $(...) works; use `...` instead.
10921 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
10922 gettext better.
10923
10924 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
10925 put into the -d output file, and mention what to do if YYSTYPE is
10926 defined as a macro.
10927
10928 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
10929
10930 Undo change made earlier today: it caused autopoint to not bring
10931 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
10932 autopoint's.
10933
10934 * bootstrap: Check that gettext version matches what's in
10935 configure.ac. Warn users to ignore robots.txt ERROR 404.
10936 * bootstrap: Undo today's earlier change (logged below).
10937 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
10938
10939 The gettext version checking is causing more trouble than it's
10940 curing; remove it. Problem reported by Paul Hilfinger.
10941
10942 * bootstrap: Issue a warning that one can expect a message
10943 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
10944 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
10945
10946 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
10947
10948 Ensure that the C++ compiler used for testing actually works on a
10949 simple test program; if not, skip the C++-related tests. Problem
10950 reported by Vin Shelton in:
10951 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
10952
10953 * m4/cxx.m4: New file.
10954 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
10955 * tests/atlocal.in (BISON_CXX_WORKS): Add.
10956 * tests/local.at (AT_COMPILE_CXX): Use it.
10957
10958 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10959
10960 * data/glr.c (yylloc): Output this macro even if locations are not
10961 being generated, as the GLR parser needs it even in that case.
10962 Problem reported by Troy A. Johnson
10963 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
10964
10965 * configure.ac (AC_INIT): Update to 1.875e.
10966
10967 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10968
10969 * NEWS: Version 1.875d.
10970 * configure.ac (AC_INIT): Likewise.
10971 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
10972
10973 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
10974 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
10975 lalr1.cc runs afoul of the first, and the last two are no longer
10976 supported by GCC 3.4.0.
10977 * README: Mention GNU m4 1.4 or later; mention m4 patches.
10978 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
10979
10980 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
10981
10982 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
10983 unsigned int, for compatibility with latest gnulib hash module.
10984 * src/state.c (state_hash, state_hasher): Likewise.
10985 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
10986 * src/uniqstr.c (hash_uniqstr): Likewise.
10987
10988 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
10989
10990 * NEWS: Unescaped newlines are no longer allowed in char & strings.
10991
10992 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
10993 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
10994 character and string literals.
10995 (unexpected_end): New function.
10996 (unexpected_eof): Use it.
10997 (unexpected_newline): New function.
10998 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
10999 actions.
11000
11001 * NEWS: Document %expect-rr.
11002
11003 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11004 Fix typo by replacing $1 with $option.
11005 Remove more 'intl'-related files.
11006 Don't DEFUN AM_INTL_SUBDIR twice.
11007
11008 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11009 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11010 strtoul.c.
11011 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11012 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11013 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11014 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11015 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11016 * src/.cvsignore: Add *.output.
11017
11018 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11019 gets copied to the output file.
11020
11021 2004-04-28 Paul Eggert <eggert@twinsun.com>
11022
11023 Get files from the gnulib and po repositories, instead of relying
11024 on them being in our CVS. Upgrade to latest versions of gnulib
11025 and Automake.
11026
11027 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11028 * bootstrap: Bootstrap from gnulib and po repositories.
11029 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11030 * README-cvs: Document these changes. Remove version numbers from
11031 mentions of build tools, since they change so often. Mention Flex.
11032
11033 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11034 (gl_USE_SYSTEM_EXTENSIONS): Add.
11035 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11036 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
11037 does this for us.
11038 (AC_ISC_POSIX): Remove; we no longer support this
11039 ancient OS, as it gets in the way of latest Autoconf & gnulib.
11040 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11041 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11042 Do not check for C89 headers, except for locale.h which is used
11043 by the Yacc library and must port to K&R hosts.
11044 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11045 Do not check for C89 functions, except for setlocale which is
11046 used by the Yacc library.
11047 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11048 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11049 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11050 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11051 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11052 AM_GNU_GETTEXT): Remove; now done by:
11053 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11054 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11055 for us.
11056
11057 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11058 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11059 Define to empty, as gnulib.mk will do the rest for us.
11060 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11061 for us.
11062 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11063 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11064
11065 * src/files.c: Include gnulib's xstrndup.h.
11066
11067 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11068 (REALLOC): Use xnrealloc, for likewise.
11069 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11070 (strnlen, memrchr): Remove decls; functions no longer used.
11071 Include <stpcpy.h>.
11072
11073 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11074 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11075 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11076 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11077 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11078 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11079 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11080 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11081 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11082 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11083 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11084 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11085 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11086 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11087 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11088 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11089 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11090 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11091 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11092 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11093 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11094 Remove, as these files are now generated automatically
11095 by bootstrap or automake.
11096
11097 * po/ChangeLog: Remove: all but one entry was a duplicate
11098 of this file, and I moved that 2000-11-02 entry here.
11099
11100 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11101 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11102 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11103 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11104 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11105 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11106 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11107 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11108 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11109 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11110 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11111 xstrndup.h.
11112 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11113 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11114 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11115 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11116 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11117 * src/.cvsignore: Remove *_.c.
11118
11119
11120 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11121 support it. (The latest stable gzip doesn't.)
11122
11123 2004-04-27 Paul Eggert <eggert@twinsun.com>
11124
11125 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11126 case, as stos_ is now used by destructors due to the 2004-02-09
11127 change.
11128
11129 Remove more K&R C support.
11130 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11131 * lib/subpipe.c (errno): Remove decl.
11132 Include <stdlib.h> unconditionally.
11133 (EXIT_FAILURE): Remove macro.
11134 * src/complain.c (vfprintf, strerror): Remove.
11135 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11136 unconditionally.
11137 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11138 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11139 (strchr, strspn, memchr): Remove decls.
11140 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11141 unconditionally. Do not declare perror.
11142 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11143 unconditionally.
11144
11145 * src/complain.c (_): Remove useless defn, as system.h defines this.
11146
11147 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11148 with latest obstack.h.
11149 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11150 to procedure types, as obstack.h now does that for us.
11151 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11152
11153 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11154 so that this include file can stand alone.
11155 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11156 does this now. Include subpipe.h first after config.h, to
11157 test whether it can stand alone.
11158
11159 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11160 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11161 unused declaration.
11162
11163 * tests/synclines.at (%union synch line): Put a dummy member in
11164 the union, because empty unions aren't allowed in C. Caught
11165 by GCC 3.4.0.
11166
11167 2004-04-13 Jim Meyering <jim@meyering.net>
11168
11169 * src/conflicts.c (conflicts_print): Correct format string typo:
11170 use `%%' to produce literal `%'. (trivial change)
11171
11172 2004-03-30 Paul Eggert <eggert@twinsun.com>
11173
11174 * src/getargs.c (version): Update copyright year to 2004.
11175
11176 * data/c.m4 (b4_int_type): Use 'short int' rather than
11177 'short', and similarly for 'long', 'unsigned', etc.
11178 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11179 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11180 yy_yypstack, yydumpstack): Likewise.
11181 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11182 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11183 Likewise.
11184 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11185 yy_stack_print, yyparse): Likewise.
11186 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11187 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11188 * lib/bitset.c (bitset_print): Likewise.
11189 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11190 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11191 * lib/bitsetv.c (bitsetv_dump): Likewise.
11192 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11193 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11194 Likewise.
11195 * src/LR0.c (allocate_itemsets): Likewise.
11196 * src/gram.h (rule_number, rule): Likewise.
11197 * src/lalr.h (goto_number): Likewise.
11198 * src/nullable.c (nullable_compute): Likewise.
11199 * src/output.c (prepare_rules): Likewise.
11200 * src/relation.c (relation_print, relation_digraph): Likewise.
11201 * src/relation.h (relation_node): Likewise.
11202 * src/state.h (state_number, transitions, errs, reductions,
11203 struct state): Likewise.
11204 * src/symtab.h (symbol_number, struct symbol): Likewise.
11205 * src/tables.c (vector_number, tally, action_number,
11206 default_goto, goto_actions): Likewise.
11207 * tests/existing.at (GNU Cim Grammar): Likewise.
11208 * tests/regression.at (Web2c Actions): Likewise.
11209
11210 * src/output.c (muscle_insert_short_int_table): Renamed from
11211 muscle_insert_short_table. All uses changed.
11212
11213 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11214
11215 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11216 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11217 Add %expect-rr rule.
11218
11219 * src/scan-gram.l: Recognize %expect-rr.
11220
11221 * src/conflicts.h (expected_sr_conflicts): Rename from
11222 expected_conflicts.
11223 (expected_rr_conflicts): Declare.
11224
11225 * src/conflicts.c (expected_sr_conflicts): Rename from
11226 expected_conflicts.
11227 (expected_rr_conflicts): Define.
11228 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11229 for GLR parsers.
11230 Use expected_sr_conflicts in place of expected_conflicts.
11231 Warn if expected_rr_conflicts used in non-GLR parser.
11232
11233 * doc/bison.texinfo: Add documentation for %expect-rr.
11234
11235 2004-03-08 Paul Eggert <eggert@gnu.org>
11236
11237 Add support for hex token numbers. Suggested by Odd Arild Olsen in
11238 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
11239
11240 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11241 in lalr1.cc.
11242 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11243 * src/scan-gram.l (scan_integer): New function.
11244 ({int}): Use it.
11245 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11246 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11247 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11248 Say "long int", not "long", for uniformity with GNU style.
11249
11250 2004-02-25 Paul Eggert <eggert@twinsun.com>
11251
11252 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11253 compilers. This fixes a problem with Intel's C++ compiler being
11254 chatty, reported by Guido Trentalancia in
11255 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
11256
11257 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11258
11259 Support %destructor and merge error locations in lalr1.cc.
11260
11261 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11262 (Parser::stos_): Define unconditionally.
11263 (Parser::destruct_): New method. Generate its body with
11264 b4_yydestruct_generate.
11265 (Parser::error_start_): New attribute.
11266 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11267 token which are discarded.
11268 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11269 error_start_ when erroneous token are discarded.
11270 (Parser::parse) <yyerrlab1>: Compute the location of the error
11271 token so that it covers all the discarded tokens.
11272 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11273 it can be called with `%skeleton "lalr1.cc"', and do that.
11274
11275 2004-02-02 Paul Eggert <eggert@twinsun.com>
11276
11277 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11278 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11279 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11280 There's no need to mention top_builddir since Automake does that
11281 for us.
11282 (INCLUDES): Remove, as Automake says it's obsolescent.
11283 Contents migrated into AM_CPPFLAGS as described above.
11284 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11285
11286 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11287
11288 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11289 (yyreportSyntaxError): Handle case where lookahead token is
11290 YYEMPTY.
11291
11292 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11293
11294 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11295 resulting parsers are compilable with C++.
11296
11297 2003-12-23 Paul Eggert <eggert@twinsun.com>
11298
11299 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11300 * src/output.c (output_skeleton): Rename local var.
11301 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11302 Bison tokens, as this runs afoul of the 2003-10-07 change that
11303 disallowed NUL bytes in character constants or string literals.
11304
11305 * tests/local.at: Require Autoconf 2.59's Autotest.
11306 * tests/testsuite.at: Don't include local.at, since we now assume
11307 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11308 including it.
11309 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11310 multiple inclusion warnings.
11311
11312 2003-12-02 Akim Demaille <akim@epita.fr>
11313
11314 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11315 conditions.
11316 From Bruno Haible.
11317
11318 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
11319
11320 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11321
11322 2003-10-07 Paul Eggert <eggert@twinsun.com>
11323
11324 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11325 if testsuite doesn't exist.
11326
11327 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11328 literals, unfortunately.
11329 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11330 Complain about NUL bytes in character constants or string literals.
11331
11332 2003-10-05 Paul Eggert <eggert@twinsun.com>
11333
11334 * NEWS: Don't document %no-default-prec, as it's still
11335 too experimental.
11336 * doc/bison.texinfo: Document %no-default-prec only if
11337 the defaultprec flag is set. Normally it's not.
11338
11339 2003-10-04 Paul Eggert <eggert@twinsun.com>
11340
11341 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11342 non-modifiable lvalue, instead of a modifiable one.
11343 * doc/bison.texinfo (Actions): Document that $$ can
11344 be assigned to. Do not claim that $$ and $N are
11345 array element references: user code should not rely on this.
11346
11347 2003-10-01 Paul Eggert <eggert@twinsun.com>
11348
11349 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11350 (grammar_declaration): Use it.
11351 * src/scan-gram.l: New token %no-default-prec.
11352 * tests/conflicts.at: Revamp tests to use %no-default-prec.
11353 * NEWS, doc/bison.texinfo: Document the above.
11354
11355 2003-10-01 Akim Demaille <akim@epita.fr>
11356
11357 VCG no longer supports long_straight_phase.
11358
11359 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11360 * src/print_graph.c (print_graph): Adjust.
11361
11362 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
11363 and Paul Eggert <eggert@twinsun.com>
11364
11365 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11366 Table of Symbols): Document %default-prec.
11367 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11368 (grammar_declaration): Set default_prec on %default-prec.
11369 * src/scan-gram.l (%default-prec): New token.
11370 * src/reader.h (default_prec): New flag.
11371 * src/reader.c: Likewise.
11372 (packgram): Handle it.
11373 * tests/conflicts.at (%default-prec without %prec,
11374 %default-prec with %prec, %default-prec 1): New tests.
11375
11376 2003-09-30 Paul Eggert <eggert@twinsun.com>
11377
11378 * tests/testsuite.at: Include local.at, not input.at, fixing
11379 a typo in the 2003-08-25 patch.
11380
11381 2003-08-27 Akim Demaille <akim@epita.fr>
11382
11383 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11384 GCC warnings.
11385
11386 2003-08-26 Akim Demaille <akim@epita.fr>
11387
11388 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11389 "<\#" to avoid magic from Gnus when posting parts of this script.
11390
11391 2003-08-26 Akim Demaille <akim@epita.fr>
11392
11393 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11394 (Parser::parse): here.
11395 Adjust: nerrs and errstatus is now replaced by...
11396 (Parser::nerrs_, Parser::errstatus_): New.
11397
11398 2003-08-25 Akim Demaille <akim@epita.fr>
11399
11400 * config/announce-gen, Makefile.cfg: New.
11401 * Makefile.am: Adjust.
11402 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11403 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11404
11405 2003-08-25 Akim Demaille <akim@epita.fr>
11406
11407 When reducing initial empty rules, Bison parser read an initial
11408 location that is not defined. This results in garbage, and that
11409 affects Bison's own parser. Therefore we need (i) to extend Bison
11410 to support a means to initialize this location, and (ii) to use
11411 this CVS Bison to fix CVS Bison's parser.
11412
11413 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11414 with...
11415 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11416 * src/parse-gram.y: Adjust.
11417 (%initial-action): New.
11418 (%error-verbose): Since we require CVS Bison, there is no reason
11419 not to use it.
11420 * src/scan-gram.l: Adjust.
11421 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11422 * data/yacc.c (yyparse): Use b4_initial_action.
11423
11424 2003-08-25 Akim Demaille <akim@epita.fr>
11425
11426 * doc/bison.texinfo: Don't promote stdout for error messages.
11427
11428 2003-08-25 Akim Demaille <akim@epita.fr>
11429
11430 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11431 From Alexandre Duret-Lutz.
11432
11433 2003-08-25 Akim Demaille <akim@epita.fr>
11434
11435 Version 1.875c.
11436
11437 2003-08-25 Akim Demaille <akim@epita.fr>
11438
11439 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11440 Use them.
11441
11442 2003-08-25 Akim Demaille <akim@epita.fr>
11443
11444 * data/lalr1.cc (Parser::reduce_print_): New.
11445 Use it.
11446
11447 2003-08-25 Akim Demaille <akim@epita.fr>
11448
11449 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11450 error recovery loops. This patch is based on
11451 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
11452 Also, augment the similarity between lalr1.cc and yacc.c.
11453 Note: the locations of error recovery rules are not correct yet.
11454
11455 * data/lalr1.cc: Comment changes to augment the similarity between
11456 lalr1.cc and yacc.c.
11457 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11458 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11459 yyerrlab), when hitting EOF, pop the whole stack here instead of
11460 merely falling thru the default error handling mechanism.
11461 (yyerrorlab): New label, with the old contents of YYERROR,
11462 plus the following change: pop the stack of rhs corresponding
11463 to the production that invoked YYERROR. That is how Yacc
11464 behaves (required by POSIX).
11465 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11466 fail.
11467
11468 2003-08-25 Akim Demaille <akim@epita.fr>
11469
11470 Tune local.at so that people can "autom4te -l autotest calc.at -o
11471 calc" for instance, to extract a sub test suite.
11472
11473 * tests/testsuite.at: Move the initialization, Autotest version
11474 requirement, and AT_TESTED invocation into...
11475 * tests/local.at: here.
11476 * tests/testsuite.at: Include it for compatibility with Autoconf
11477 2.57.
11478 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11479 be ignore.
11480
11481 2003-08-04 Paul Eggert <eggert@twinsun.com>
11482
11483 Rework code slightly to avoid gcc -Wtraditional warnings.
11484 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11485 The returned value is now stored in *YY0. All callers changed.
11486 * src/output.c (merge_output): Adjust to the above change.
11487
11488 2003-07-26 Paul Eggert <eggert@twinsun.com>
11489
11490 * data/glr.c (YYASSERT): New macro.
11491 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11492 yyresolveStates, yyprocessOneStack):
11493 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11494 Derived from a suggestion by Frank Heckenbach.
11495
11496 2003-07-25 Paul Eggert <eggert@twinsun.com>
11497
11498 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11499 for portability to K&R C (after ansi2knr, presumably). See
11500 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
11501 by Frank Heckenbach, though I have omitted the structure-initialization
11502 part of his glr-knr.diff patch since I recall that the Portable
11503 C Compiler didn't require that change.
11504
11505 Let the user specify how to allocate and free memory.
11506 Derived from a suggestion by Frank Heckenbach in
11507 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
11508 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11509 All uses of free, malloc, realloc changed to use these macros,
11510 and unnecessary casts removed.
11511 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11512
11513 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11514
11515 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11516 use s.empty() rather than s == "" to test for empty string; see
11517 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
11518 (trivial change)
11519
11520 2003-06-25 Akim Demaille <akim@epita.fr>
11521
11522 * config/depcomp, config/install-sh: Update from masters.
11523
11524 2003-06-20 Paul Eggert <eggert@twinsun.com>
11525
11526 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11527 and return properly parenthesized result.
11528 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11529 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11530 Remove unnecessary parentheses from uses.
11531 * doc/bison.texinfo (Location Default Action): Describe the
11532 conventions for parentheses.
11533
11534 2003-06-19 Paul Eggert <eggert@twinsun.com>
11535
11536 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11537 yyreportTree): Do not assume that size_t is the same width as int,
11538 when printing sizes. Print sizes using an unsigned format.
11539 Problem reported by Frank Heckenbach in
11540 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
11541
11542 Port to Forte Developer 7 C compiler.
11543 * data/glr.c (struct YYLTYPE): If locations are not being used,
11544 declare a single dummy member, as empty structs do not conform
11545 to the C standard.
11546 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11547 the Forte Developer 7 C compiler complains that end-of-loop
11548 code is not reached.
11549
11550 2003-06-17 Paul Eggert <eggert@twinsun.com>
11551
11552 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11553 avoid warnings from picky compilers about redefinition of PARAMS.
11554
11555 2003-06-17 Paul Eggert <eggert@twinsun.com>
11556
11557 Version 1.875b.
11558
11559 * NEWS: Document 1.875b.
11560
11561 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11562 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11563 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11564 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11565 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11566 per recent gettext manual's suggestion.
11567 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11568 Use prototypes, not old-style definitions.
11569 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11570 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11571 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11572 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11573 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11574 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11575 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11576 vbitset_or_and_cmp, vbitset_copy): Likewise.
11577
11578 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11579 Do not include <stdlib.h>.
11580 (PARAMS): Define unconditionally for C89.
11581 (ATTRIBUTE_NORETURN): Remove.
11582 (ATTRIBUTE_UNUSED): Define unconditionally.
11583
11584 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
11585 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
11586 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11587 * lib/vbitset.c, lib/vbitset.h: New files.
11588 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11589 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11590 from libbitset.
11591
11592 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11593 `How Can I Reset @code{yyparse}', since texinfo does not allow
11594 arbitrary @ in node names.
11595
11596 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11597 shouldn't be needed according to the gettext 0.12.1 documentation
11598 but which seem to be needed anyway: codeset.m4 glibc21.m4
11599 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
11600 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
11601 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
11602
11603 * lib/.cvsignore: Add stdbool.h.
11604 * m4/.cvsignore: Add nls.m4, po.m4.
11605
11606 Upgrade to CVS gnulib.
11607 * stdbool_.h: File renamed from stdbool.h.in.
11608 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11609 AC_HEADER_STDBOOL.
11610 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11611 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11612 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11613 (MOSTLYCLEANFILES): New var.
11614 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11615 (stdbool.h): New rule.
11616 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11617 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11618 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11619 m4/quote.m4: Upgrade to today's gnulib.
11620
11621 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11622 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11623 the tests right now.
11624 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11625 yyerror are declared before use; C99 requires this.
11626
11627 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11628
11629 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11630 first.
11631 (yyrecoverSyntaxError): Correct the logic for setting and testing
11632 yyerrState.
11633 Correct comment on handling EOF.
11634 Allow states with only a default reduction, rather than failing
11635 (I can't quite reconstruct why these were not allowed before).
11636
11637 Fixes to avoid problem that $-N rules in GLR parsers can cause
11638 buffer overruns, corrupting state.
11639
11640 * src/output.c (prepare_rules): Output max_left_semantic_context
11641 definition.
11642 * src/reader.h (max_left_semantic_context): New variable declaration.
11643 * src/scan-gram.l (max_left_semantic_context): Define.
11644 (handle_action_dollar): Update max_left_semantic_context.
11645 * data/glr.c (YYMAXLEFT): New definition.
11646 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11647 (yyresolveAction): Ditto.
11648
11649 Fixes to problems with location handling in GLR parsers reported by
11650 Frank Heckenbach (2003/06/05).
11651
11652 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11653 (YYRHSLOC): Add parentheses, and define only if locations used.
11654 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11655 locations not used.
11656 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11657 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
11658
11659 * tests/cxx-type.at: Exercise location information; update tests
11660 to differentiate output with and without locations.
11661 Remove forward declarations of yylex and yyerror---caused errors
11662 because default YYLTYPE not yet defined.
11663 Change semantic actions to compute strings, rather than printing
11664 them directly (to test proper passing of semantics values). Change
11665 output to prefix notation and update test data and expected results.
11666 (yylex): Track locations.
11667 (stmtMerge): Return value rather than printing, and include arguments
11668 in value.
11669
11670 2003-06-03 Paul Eggert <eggert@twinsun.com>
11671
11672 Avoid warnings generated by GCC 2.95.4 when Bison is
11673 configured with --enable-gcc-warnings.
11674 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11675 yy::]b4_parser_class_name[::translate_,
11676 yy::Stack::operator[] (unsigned),
11677 yy::Stack::operator[] (unsigned) const,
11678 yy::Slice::operator[] (unsigned),
11679 yy::Slice::operator[] (unsigned) const):
11680 Rename local vars to avoid warnings.
11681 * tests/glr-regression.at (Improper handling of embedded actions
11682 and $-N in GLR parsers): Remove unused local variable from yylex.
11683 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11684 (void) as arg when not pure, since we now assume C89 when building
11685 Bison. Pacify GCC by using parameter.
11686
11687 2003-06-02 Paul Eggert <eggert@twinsun.com>
11688
11689 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11690 yy::Location::lines, yy::Location::columns): Rename arguments
11691 to avoid shadowing; this removes a warning generated by GCC 3.3.
11692
11693 2003-06-01 Paul Eggert <eggert@twinsun.com>
11694
11695 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11696 to g++, as GCC 3.3 complains if you do it.
11697 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11698 everything that WARNING_CFLAGS has, except omit warnings
11699 not suitable for C++.
11700 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11701 * tests/atlocal.in (CXXFLAGS): New var.
11702 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11703
11704 Fix a GLR parser bug I reported in February; see
11705 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
11706 The problem was that GLR parsers did not conform to the C standard,
11707 because actions like { $1 = $2 + $3; } expanded to expressions
11708 that invoked YYFILL in separate subexpressions, and YYFILL assigned
11709 to a local variable. The C standard says that expressions
11710 like (var = f ()) + (var = f ()) have undefined behavior.
11711 Another problem was that GCC sometimes issues warnings that
11712 yyfill and its parameters are unused.
11713
11714 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
11715 as possibly unused.
11716 (yyfill): New function.
11717 (YYFILL): Use it.
11718 (yyuserAction): Change type of yynormal to bool, so that it matches
11719 the new yyfill signature. Mark it as possibly unused.
11720
11721
11722 Follow up on a bug I reported in February, where a Bison-generated
11723 parser can loop. Provide a test case and a fix for yacc.c. I
11724 don't have a fix for lalr1.cc or for glr.c, unfortunately.
11725 The original bug report is in:
11726 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
11727
11728 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
11729 macro's size was becoming unwieldy.
11730 (yyerrlab): Do not discard an empty lookahead symbol, as this
11731 might destroy garbage.
11732 (yyerrorlab): New label, with the old contents of YYERROR,
11733 plus the following change: pop the stack of rhs corresponding
11734 to the production that invoked YYERROR. That is how Yacc
11735 behaves, and POSIX requires this behavior.
11736 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
11737 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
11738 Define 'alarm' to do nothing if unistd.h is not available.
11739 Add a new rule "exp: '-' error;" to test the above change to
11740 data/yacc.c. Use 'alarm' to abort any test taking longer than
11741 10 seconds, as it's probably looping.
11742 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
11743 Also, the new yacc.c generates two fewer diagnostics for an
11744 existing test.
11745
11746 2003-05-24 Paul Eggert <eggert@twinsun.com>
11747
11748 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
11749 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
11750 This fixes a problem reported by John Bowman when the Compaq/HP
11751 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
11752 -ansi -Wall -gall).
11753 * data/yacc.c (union yyalloc): Likewise.
11754 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
11755
11756 Switch from 'int' to 'bool' where that makes sense.
11757
11758 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
11759 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
11760 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
11761 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
11762 Return or accept bool, not int. All callers changed.
11763 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
11764 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
11765 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
11766 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
11767 bitset_or_and_cmp_): Likewise.
11768 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
11769 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
11770 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
11771 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
11772 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
11773 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
11774 bitset_stats_or_and_cmp): Likewise.
11775 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
11776 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
11777 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
11778 ebitset_xor_cmp): Likewise.
11779 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
11780 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
11781 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
11782 lbitset_xor_cmp): Likewise.
11783 * lib/bbitset.h: Include <stdbool.h>.
11784 (struct bitset_vtable): The following members now return bool, not
11785 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
11786 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
11787 or_and_cmp).
11788 * src/conflicts.c (count_rr_conflicts): Likewise.
11789 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
11790 All uses changed.
11791 * lib/ebitset.c (ebitset_obstack_init): Likewise.
11792 * lib/lbitset.c (lbitset_obstack_init): Likewise.
11793 * src/getargs.c (debug_flag, defines_flag, locations_flag,
11794 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11795 graph_flag): Likewise.
11796 * src/getargs.h (debug_flag, defines_flag, locations_flag,
11797 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11798 graph_flag): Likewise.
11799 * src/output.c (error_verbose): Likewise.
11800 * src/output.h (error_verbose): Likewise.
11801 * src/reader.c (start_flag, typed): Likewise.
11802 * src/reader.h (typed): Likewise.
11803 * src/getargs.c (LOCATIONS_OPTION): New constant.
11804 (long_options, getargs): Use it.
11805 * src/lalr.c (build_relations): Use bool, not int.
11806 * src/nullable.c (nullable_compute): Likewise.
11807 * src/print.c (print_reductions): Likewise.
11808 * src/tables.c (action_row, pack_vector): Likewise.
11809 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
11810 * src/output.c (prepare): Use it.
11811 * src/output.c (token_definitions_output,
11812 symbol_destructors_output, symbol_destructors_output): Use string,
11813 not boolean integer, to keep track of whether to output separator.
11814 * src/print_graph.c (print_core): Likewise.
11815 * src/state.c (state_rule_lookaheads_print): Likewise.
11816
11817 * config/install-sh: Sync from automake 1.7.5.
11818
11819 2003-05-14 Paul Eggert <eggert@twinsun.com>
11820
11821 * src/parse-gram.y (rules_or_grammar_declaration): Require a
11822 semicolon after a grammar declaration, in the interest of possible
11823 future changes to the Bison input language.
11824 Do not allow a stray semicolon at the start of the grammar.
11825 (rhses.1): Allow one or more semicolons after any rule, including
11826 just before "|" as required by POSIX.
11827 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
11828 grammar.
11829
11830 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
11831
11832 %parse-param support for lalr1.cc.
11833
11834 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
11835 b4_cc_constructor_calls, b4_cc_constructor_call,
11836 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
11837 definitions.
11838 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
11839 parse-param arguments.
11840 (yy::b4_parser_class_name): Declare instance variables to
11841 hold parse-param arguments.
11842 * tests/calc.at: s/value/semantic_value/ because value clashes
11843 with a member of yy::b4_parser_class_name. Adjust C++ code
11844 to handle %parse-param. Enable %parse-param test in C++.
11845
11846 2003-05-12 Paul Eggert <eggert@twinsun.com>
11847
11848 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
11849 English a bit. Fix fclose typo. Change "const char" to "char
11850 const", and use ANSI C rather than K&R for "main". Suggest
11851 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
11852 and suggest yy_switch_to_buffer.
11853
11854 2003-05-05 Paul Eggert <eggert@twinsun.com>
11855
11856 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
11857 C89. This avoids a diagnostic on compilers that define __STDC__
11858 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
11859 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
11860
11861 2003-05-03 Paul Eggert <eggert@twinsun.com>
11862
11863 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
11864 Do not overrun array bounds.
11865 This should fix a bug reported today by Olatunji Oluwabukunmi in
11866 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
11867
11868 2003-04-29 Akim Demaille <akim@epita.fr>
11869
11870 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
11871 * src/getargs.c, src/getargs.h: here, as bool, not int.
11872 (nondeterministic_parser): New.
11873 * src/parse-gram.y, src/scan-gram.l: Support
11874 %nondeterministic-parser.
11875 * src/output.c (prepare): Use nondeterministic_parser instead
11876 of glr_parser where appropriate.
11877 * src/tables.c (conflict_row, action_row, save_row)
11878 (token_actions, token_actions, pack_vector): Ditto.
11879
11880 2003-04-29 Akim Demaille <akim@epita.fr>
11881
11882 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
11883
11884 2003-04-29 Akim Demaille <akim@epita.fr>
11885
11886 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
11887 with %pure-parser and %locations to exercise the patch from Yakov
11888 Markovitch below.
11889
11890 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
11891
11892 * data/yacc.c: (b4_lex_param): Corrected for the case where
11893 %lex-param is provided and %pure-parser isn't.
11894
11895 2003-04-27 Paul Eggert <eggert@twinsun.com>
11896
11897 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
11898 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
11899 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
11900 if it is not defined.
11901 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
11902
11903 2003-04-26 Paul Eggert <eggert@twinsun.com>
11904
11905 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
11906 Declare to be of type suitable for the ninf value itself, not of
11907 type suitable for the corresponding table, since the latter might
11908 be unsigned but the ninf value might be negative. This fixes a
11909 bug reported by Alexandre Duret-Lutz in
11910 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
11911
11912 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
11913 invokes it. We shouldn't invoke it twice because it will attempt
11914 to put error.o in the archive twice. This fixes a glitch reported
11915 by Martin Mokrejs in
11916 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
11917
11918 2003-04-21 Paul Eggert <eggert@twinsun.com>
11919
11920 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
11921 to gnulib.
11922
11923 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
11924
11925 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
11926 Fix obvious typo that results in uncompilable GLR parsers
11927 when both %pure-parser and %locations are used. (trivial change)
11928
11929 2003-04-17 Paul Eggert <eggert@twinsun.com>
11930
11931 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
11932 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
11933 Do not insert the expected token via unput, as this runs afoul
11934 of a POSIX-compatibility bug in flex 2.5.31.
11935 All uses changed to BEGIN the parent state,
11936 since we no longer insert the expected token via unput.
11937 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
11938 that is no longer emitted after the above change.
11939
11940 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
11941 the first one. This change is from Paul Hilfinger, and it fixes
11942 regression reported by Werner Lemberg in
11943 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
11944
11945 (resolve_sr_conflict): Don't invoke state_errs_set
11946 unless one or more tokens have been explicitly made errors.
11947 Otherwise, the above change causes Bison to abort.
11948
11949 * tests/existing.at (GNU pic Grammar): New test case, taken from
11950 Lemberg's email.
11951
11952 2003-03-31 Akim Demaille <akim@epita.fr>
11953
11954 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
11955
11956 2003-03-31 Akim Demaille <akim@epita.fr>
11957
11958 * src/output.c (prepare_symbols): Avoid trailing spaces in the
11959 output.
11960
11961 2003-03-31 Akim Demaille <akim@epita.fr>
11962
11963 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
11964 From Paul Hilfinger.
11965
11966 2003-03-29 Akim Demaille <akim@epita.fr>
11967
11968 * m4/error.m4: Do not put under dynamic conditions some code which
11969 expansion is under static control.
11970
11971 2003-03-29 Akim Demaille <akim@epita.fr>
11972
11973 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
11974
11975 2003-03-29 Akim Demaille <akim@epita.fr>
11976
11977 * doc/bison.texinfo (Strings are Destroyed): New.
11978
11979 2003-03-13 Paul Eggert <eggert@twinsun.com>
11980
11981 * .cvsignore: Add configure.lineno.
11982 * src/.cvsignore: Add yacc.
11983 * tests/.cvsignore: Add testsuite.log.
11984 * doc/fdl.texi: Sync with latest FSF version.
11985
11986 2003-03-12 Paul Eggert <eggert@twinsun.com>
11987
11988 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
11989 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
11990 cursor, instead of leaving it undefined. This fixes a bug
11991 reported by Tim Van Holder in
11992 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
11993 * tests/input.at (Torturing the Scanner): Test the scanner on
11994 an empty input file, which was Tim Van Holder's test case.
11995
11996 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
11997 <sys/resource.h> can be included, include sys/time.h and
11998 sys/times.h first, if available. This works around the SunOS
11999 4.1.4 porting bug reported by Bruce Becker in
12000 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12001
12002 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12003 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12004 AC_HEADER_SYS_WAIT.
12005
12006 Merge changes from gnulib. This was prompted because the CVS
12007 snapshot didn't build on Solaris 7 due to strnlen problems.
12008
12009 These changes need to be merged back into gnulib:
12010 * lib/hash.c: Include <stdbool.h> unconditionally.
12011 * m4/onceonly.m4 (m4_quote): New macro.
12012 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12013 Quote AC_FOREACH variable-expansions properly.
12014 The 2003-01-03 obstack.h change also needs merging.
12015 {end of changes requiring merging}
12016
12017 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12018 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12019 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12020 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12021 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12022 New files, imported from gnulib.
12023 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12024 above.
12025
12026 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12027 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12028 gnulib sources.
12029
12030 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12031 Add.
12032 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12033 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12034 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12035 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12036 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12037 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12038 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12039 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12040 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12041 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12042 (jm_PREREQ_ARGMATCH): Remove.
12043 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12044 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12045
12046 * src/system.h: Include <stdbool.h> unconditionally.
12047
12048 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12049 assuming at least C89 in the bitset code for some time now.
12050
12051 2003-03-03 Akim Demaille <akim@epita.fr>
12052
12053 * ro.po: New.
12054
12055 2003-03-02 Akim Demaille <akim@epita.fr>
12056
12057 * doc/bison.texinfo (Table of Symbols): Reactivate the
12058 documentation for %lex-param, and %parse-param.
12059
12060 2003-03-02 Akim Demaille <akim@epita.fr>
12061
12062 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12063 generate verbose error messages.
12064 Use the number of tokens as an upper bound in yytname, as it
12065 cannot be a non terminal.
12066
12067 2003-03-02 Akim Demaille <akim@epita.fr>
12068
12069 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12070 message.
12071
12072 2003-03-02 Akim Demaille <akim@epita.fr>
12073
12074 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12075 Use them to exercise yycheck overrun.
12076 Based on Andrew Suffield's grammar.
12077
12078 2003-03-02 Akim Demaille <akim@epita.fr>
12079
12080 Create tests/local.at for Bison generic testing macros.
12081
12082 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12083 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12084 This new file.
12085 * tests/calc.at (AT_CHECK_CALC): Adjust.
12086 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12087 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12088 * tests/local.at: here.
12089 (AT_COMPILE_CXX): Tags the tests using it as c++.
12090 Ignore the test if CXX is not functional.
12091
12092 2003-03-01 Paul Eggert <eggert@twinsun.com>
12093
12094 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12095 not loc->end, since loc->end might contain garbage and this leads
12096 to undefined behavior on some platforms.
12097 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12098 depend on *loc, so that the reader doesn't give the the false
12099 impression that *loc is initialized.
12100 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12101 does not survive the return.
12102
12103 2003-03-01 Akim Demaille <akim@epita.fr>
12104
12105 * src/scan-gram.l (code_start): Always initialize it when entering
12106 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12107 yylex invocation. An alternative would be making it static, but
12108 then it starts with the second %%'s beginning, instead of its end.
12109
12110 2003-02-28 Paul Eggert <eggert@twinsun.com>
12111
12112 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12113 around a UnixWare 7.1.1 porting bug reported by John Hughes in
12114 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
12115
12116 2003-02-26 Paul Eggert <eggert@twinsun.com>
12117
12118 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12119 Remove Sequent/Pyramid discussion (nobody uses them any more).
12120 Merge VMS and MS-DOS discussion; these ports may well be dead
12121 but let's keep mentioning them for now. Put <> around email
12122 addresses. Add copyright notice.
12123
12124 2003-02-24 Paul Eggert <eggert@twinsun.com>
12125
12126 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12127 to avoid collision with flex use of yylineno.
12128 Problem reported by Bruce Lilly in
12129 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
12130 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12131 * data/yacc.c (yy_reduce_print): Likewise.
12132
12133 * config/depcomp: Sync with Automake 1.7.3.
12134
12135 2003-02-21 Akim Demaille <akim@epita.fr>
12136
12137 * data/lalr1.cc: Use temporary variables instead of casts to
12138 change integer types.
12139 Suggested by Paul Eggert.
12140
12141 2003-02-21 Akim Demaille <akim@epita.fr>
12142
12143 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12144 to avoid confusions with lalr1.cc's notion of Position.
12145 Suggested by Paul Eggert.
12146
12147 2003-02-20 Akim Demaille <akim@epita.fr>
12148
12149 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12150 before initial_columns.
12151 (location.hh): Use consistent variable names when defining the
12152 operator<<.
12153 Use "last" so that we subtract from Positions, not from unsigned.
12154
12155 2003-02-20 Akim Demaille <akim@epita.fr>
12156
12157 * data/lalr1.cc (position.hh): New subfile, including the extended
12158 and Doxygen'ed documentation of class Position.
12159 (location.hh): Use it.
12160 Document a` la Doxygen.
12161 With the help of Benoit Perrot.
12162
12163 2003-02-20 Akim Demaille <akim@epita.fr>
12164
12165 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12166 AT_YACC_IF.
12167 Redefine AT_YYERROR_SEES_LOC_IF using it.
12168 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12169 not defined.
12170 Don't use the location in yy::Parser::error_ and
12171 yy::Parser::print_ when not %locations.
12172 Activate more lalr1.cc tests.
12173
12174 2003-02-19 Akim Demaille <akim@epita.fr>
12175
12176 * data/lalr1.cc: When displaying a line number, be sure to make it
12177 an int.
12178
12179 2003-02-19 Akim Demaille <akim@epita.fr>
12180
12181 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12182 Remove, useless.
12183 (YYABORT, YYACCEPT, YYERROR): New.
12184 * tests/calc.at: Renable the lalr1.cc test.
12185
12186 2003-02-19 Akim Demaille <akim@epita.fr>
12187
12188 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12189 error recovery, mixing with/without pops and discarding of the
12190 lookahead.
12191 Exercise YYERROR.
12192 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12193
12194 2003-02-17 Paul Eggert <eggert@twinsun.com>
12195
12196 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12197 * tests/testsuite.at (AT_COMPILE): Use them.
12198 This fixes the testsuite problem reported by Robert Lentz in
12199 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
12200
12201 2003-02-12 Paul Eggert <eggert@twinsun.com>
12202
12203 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12204 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
12205 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
12206 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12207 Check for malloc failure, for consistency with yacc.c.
12208 (yytname_size): Remove, for consistency with yacc.c.
12209
12210 The bug still remains in data/lalr1.cc, as I didn't have time
12211 to fix it there.
12212
12213 2003-02-06 Akim Demaille <akim@epita.fr>
12214
12215 * configure.ac (GXX): Rename as...
12216 (CXX): this, to keep the original Autoconf semantics.
12217 Require 2.57.
12218 * data/lalr1.cc: Fix b4_copyright invocations.
12219 If YYDEBUG is not defined, don't depend upon name_ being defined.
12220 (location.hh): Include string and iostream.
12221 (Position::filename): New member.
12222 (Position::Position ()): New.
12223 (operator<< (Position)): New.
12224 (operator- (Position, int)): New.
12225 (Location::first, Location::last): Rename as...
12226 (Location::begin, Location::end): these, to mock the conventional
12227 iterator names.
12228 (operator<< (Location)): New.
12229 * tests/atlocal.in (CXX): New.
12230 * tests/testsuite.at (AT_COMPILE_CXX): New.
12231 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12232 locations in a more synthetic way.
12233 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12234 lalr1.cc is used.
12235 Adjust the C locations to match those from Emacs: first column is
12236 column 0.
12237 Change all the expected results.
12238 Conform to the GCS: simplify the locations when applicable.
12239 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12240 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12241 these CPP macros with the m4 macros new defined by...
12242 (AT_CHECK_PUSHDEFS): this, i.e.:
12243 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
12244 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
12245 New macros.
12246 (AT_CHECK_POPDEFS): Undefine them.
12247 (AT_CHECK_CALC_LALR1_CC): New.
12248 Use it for the first lalr1.cc test.
12249
12250 2003-02-04 Akim Demaille <akim@epita.fr>
12251
12252 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12253 Location as is defined.
12254
12255 2003-02-04 Akim Demaille <akim@epita.fr>
12256
12257 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12258 name_ being defined.
12259
12260 2003-02-03 Paul Eggert <eggert@twinsun.com>
12261
12262 * src/gram.h (start_symbol): Remove unused decl.
12263
12264 Use more-consistent naming conventions for local vars.
12265
12266 * src/derives.c (derives_compute): Change type of local var from
12267 int to rule_number.
12268 * src/gram.c (grammar_rules_partial_print): Likewise.
12269 * src/print.c (print_core): Likewise.
12270 * src/reduce.c (reduce_grammar_tables): Likewise.
12271
12272 * src/gram.c (grammar_dump): Change name of item_number *
12273 local var from r to rp.
12274 * src/nullable.c (nullable_compute): Likewise.
12275
12276 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12277
12278 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12279 for symbol or symbol_number var.
12280 * src/reader.c (grammar_start_symbol_set): Likewise.
12281 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12282 Likewise.
12283 * src/state.c (transitions_to): Likewise.
12284 * src/state.h: Likewise.
12285 * src/tables.c (symbol_number_to_vector_number): Likewise.
12286
12287 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12288 char * var.
12289
12290 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12291 var.
12292
12293 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12294 var.
12295
12296 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12297 Use str, not s, for char * var. Use ch, not c, for character var.
12298 Use size for size var.
12299
12300 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12301 char * var.
12302 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12303 uniqstr var.
12304 * src/uniqstr.h: Likewise.
12305
12306 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12307 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12308 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12309 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12310 param to have same name as that of enum, so that we don't use
12311 "s" to stand for a non-state.
12312
12313 2003-02-02 Akim Demaille <akim@epita.fr>
12314
12315 * src/scan-skel.l: Scan more than one inert character per yylex
12316 invocation.
12317
12318 2003-02-01 Paul Eggert <eggert@twinsun.com>
12319
12320 Version 1.875a.
12321
12322 * po/LINGUAS: Add ms.
12323
12324 2003-01-30 Akim Demaille <akim@epita.fr>
12325
12326 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12327
12328 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12329
12330 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12331 of $1.
12332
12333 Changes in response to error report by S. Eken: GLR mode does not
12334 handle negative $ indices or $ indices in embedded rules correctly.
12335 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
12336
12337 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12338 (b4_rhs_location): Ditto.
12339 (yyfill): New function to copy from stack tree into array
12340 incrementally.
12341 (yyuserAction): Modify to allow incremental move of semantic values
12342 to rhs array when in GLR mode.
12343 Define YYFILL to use in user-defined actions to fill semantic array
12344 as needed.
12345 Remove dummy use of yystack, as there is now a guaranteed use.
12346 (yydoAction): Modify to allow incremental move of semantic values
12347 to rhs array when in GLR mode.
12348 (yyresolveAction): Ditto.
12349 (yyglrShiftDefer): Update comment.
12350 (yyresolveStates): Use X == NULL for pointers, not !X.
12351 (yyglrReduce): Ditto.
12352 (yydoAction): Ditto
12353
12354 * tests/glr-regr1.at: Rename to ...
12355 * tests/glr-regression.at: Add new regression test for the problems
12356 described above (adapted from S. Eken).
12357 Update copyright notice.
12358 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12359 * tests/Makefile.am: Ditto.
12360
12361 2003-01-28 Paul Eggert <eggert@twinsun.com>
12362
12363 * data/lalr1.cc: Do not use @output_header_name@ unless
12364 b4_defines_flag is set. This fixes two bugs reported by
12365 Tim Van Holder in
12366 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12367 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
12368
12369 2003-01-21 Paul Eggert <eggert@twinsun.com>
12370
12371 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12372 we don't need to worry about yyerrlab1 being reported as an
12373 "unused label" by non-GCC C compilers. The downside is that if
12374 locations are used then a couple of statements are duplicated each
12375 time YYERROR is invoked, but the upside is that the warnings
12376 should vanish.
12377 (yyerrlab1): Move code to YERROR.
12378 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12379 This reverts some of the 2002-12-27 change.
12380
12381 2003-01-17 Paul Eggert <eggert@twinsun.com>
12382
12383 * src/output.c (symbol_printers_output): Fix typo that led
12384 to core dump. Problem reported by Antonio Rus in
12385 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
12386
12387 2003-01-13 Akim Demaille <akim@epita.fr>,
12388 Quoc Peyrot <chojin@lrde.epita.fr>,
12389 Robert Anisko <anisko_r@lrde.epita.fr>
12390
12391 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12392 when the stacks contain one element, as the loop would otherwise
12393 free the last state, and then use the top state (the one we just
12394 popped). This means that the initial elements will not be freed
12395 explicitly, as is the case in yacc.c; it is not a problem, as
12396 these elements have fake values.
12397
12398 2003-01-11 Paul Eggert <eggert@twinsun.com>
12399
12400 * NEWS: %expect-violations are now just warnings, reverting
12401 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12402 bootstrapping problem reported by Matthias Klose; see
12403 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
12404 * src/conflicts.c (conflicts_print): Likewise.
12405 * tests/conflicts.at (%expect not enough, %expect too much,
12406 %expect with reduce conflicts): Likewise.
12407 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12408 that the warning is enabled if the number of conflicts changes
12409 (not necessarily increases).
12410
12411 * src/getargs.c (version): Update copyright year.
12412
12413 2003-01-09 Akim Demaille <akim@epita.fr>
12414
12415 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12416
12417 2003-01-08 Paul Eggert <eggert@twinsun.com>
12418
12419 * Makefile.maint (WGETFLAGS):
12420 New macro, containing "-C off" to disable proxy caches.
12421 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12422 (rel-check): Use $(WGET) instead of wget.
12423
12424 2003-01-06 Paul Eggert <eggert@twinsun.com>
12425
12426 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12427 the GLR paper of Scott, Johnstone and Hussain.
12428
12429 2003-01-04 Paul Eggert <eggert@twinsun.com>
12430
12431 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12432 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12433 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12434 (EXTRA_LIBRARIES): New var, for liby.a.
12435 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12436 (EXTRA_SCRIPTS): New var, for yacc.
12437
12438 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12439 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12440 Problem reported by Nelson H. F. Beebe.
12441
12442 2003-01-03 Paul Eggert <eggert@twinsun.com>
12443
12444 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12445 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12446 when compiling Bison 1.875's `bitset bset = obstack_alloc
12447 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12448
12449 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12450 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12451 grow to a huge size with typical invocation.
12452
12453 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12454 Use the pattern recommended by Autoconf 2.57, except also protect
12455 against double-definition.
12456 * src/system.h: Likewise.
12457 Portability issues reported by Nelson H. F. Beebe.
12458
12459 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12460 All uses changed. Provide a definition in both C and C++.
12461 (yytrue, yyfalse): Define even if defined (__cplusplus).
12462
12463 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12464 Reported by Nelson H. F. Beebe.
12465
12466 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12467
12468 2003-01-02 Paul Eggert <eggert@twinsun.com>
12469
12470 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12471 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12472 Bug reported by Nelson H. F. Beebe.
12473
12474 2003-01-01 Paul Eggert <eggert@twinsun.com>
12475
12476 * Version 1.875.
12477
12478 2002-12-30 Paul Eggert <eggert@twinsun.com>
12479
12480 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12481 Moved here from...
12482 (<INITIAL>","): Here. This causes stray "," to be treated
12483 more uniformly.
12484
12485 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
12486 last brace in braced code when not in Yacc mode, for compatibility
12487 with Bison 1.35. This resurrects the 2001-12-15 patch to
12488 src/reader.c.
12489
12490 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12491 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12492
12493 2002-12-28 Paul Eggert <eggert@twinsun.com>
12494
12495 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12496 that of SYM's type. This fixes Debian bug 168069, reported by
12497 Thomas Olsson.
12498
12499 2002-12-28 Paul Eggert <eggert@twinsun.com>
12500
12501 Version 1.75f.
12502
12503 Switch back to the Yacc style of conflict reports, undoing some
12504 of the 2002-07-30 change.
12505 * doc/bison.texinfo (Understanding): Use Yacc style for
12506 conflict reports. Also, use new way of locating rules.
12507 * src/conflicts.c (conflict_report):
12508 Renamed from conflict_report_yacc, removing the old
12509 'conflict_report'. Translate the entire conflict report at once,
12510 so that we don't assume that "," has the same interpretation in
12511 all languages.
12512 (conflicts_output): Use Yacc-style conflict report for each state,
12513 instead of our more-complicated style.
12514 (conflicts_print): Use Yacc-style conflict report, except print
12515 the input file name when not emulating Yacc.
12516 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12517 Conflicted Reduction, %expect not enough, %expect too much,
12518 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12519 * tests/existing.at (GNU Cim Grammar): Likewise.
12520 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12521
12522 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12523 fatal): Don't invoke fflush; it's not needed and it might even be
12524 harmful for stdout, as stdout might not be open.
12525 * src/reduce.c (reduce_print): Likewise.
12526
12527 2002-12-27 Paul Eggert <eggert@twinsun.com>
12528
12529 Fix a bug where error locations were not being recorded correctly.
12530 This problem was originally reported by Paul Hilfinger in
12531 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
12532
12533 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12534 top of the location stack's error locations.
12535 (yyerrlab): Set it. When discarding a token, push its location
12536 onto yylerrsp so that we don't lose track of the error's end.
12537 (yyerrlab1): Now is only the target of YYERROR, so that we can
12538 properly record the location of the action that failed. For GCC
12539 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12540 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12541 (yyerrlab2): New label, which yyerrlab now falls through to.
12542 Compute the error's location by applying YYLLOC_DEFAULT to
12543 the locations of all the symbols that went into the error.
12544 * doc/bison.texinfo (Location Default Action): Mention that
12545 YYLLOC_DEFAULT is also invoked for syntax errors.
12546 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12547 Error locations include the locations of all the tokens that were
12548 discarded, not just the last token.
12549
12550 2002-12-26 Paul Eggert <eggert@twinsun.com>
12551
12552 * src/files.c: Include quote.h.
12553 (compute_output_file_names): Warn if we detect conflicting
12554 outputs to the same file. This should catch the misunderstanding
12555 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12556
12557 * src/conflicts.c (conflicts_print): If the user specifies
12558 "%expect N", report an error if there are any reduce/reduce
12559 conflicts. This is what the manual says should happen.
12560 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12561 * tests/conflicts.at (%expect with reduce conflicts): New test.
12562
12563 Don't use m4_include on relative file names, as it doesn't work as
12564 desired if there happens to be a file with that name under ".".
12565
12566 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12567 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12568 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12569 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12570 * src/output.c (output_skeleton): Use full path names when
12571 specifying a file to include; don't rely on include path, as
12572 it's unreliable when the working file contains a file with
12573 that name.
12574
12575 2002-12-25 Paul Eggert <eggert@twinsun.com>
12576
12577 Remove obsolete references to bison.simple and bison.hairy.
12578 Problem mentioned by Aubin Mahe in
12579 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
12580 * data/glr.c: Comment fix.
12581 * doc/bison.1: Remove references. Also, mention "yacc".
12582
12583 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12584 with -g option.
12585
12586 * src/parse-gram.y (declaration): Use enum "report_states" rather
12587 than its numeric value 1.
12588
12589 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12590 opening a new one. This fixes Debian bug 165349, reported by
12591 Bruce Stephens.
12592
12593 2002-12-24 Paul Eggert <eggert@twinsun.com>
12594
12595 Version 1.75e.
12596
12597 * Makefile.maint (cvs-update): Don't assume that the shell
12598 supports $(...), as Solaris sh doesn't.
12599
12600 * src/parse-gram.y (lloc_default): Remove test for empty
12601 nonterminals at the end, since it didn't change the result.
12602
12603 2002-12-24 Paul Eggert <eggert@twinsun.com>
12604
12605 If the user does not define YYSTYPE as a macro, Bison now declares it
12606 using typedef instead of defining it as a macro. POSIX requires this.
12607 For consistency, YYLTYPE is also declared instead of defined.
12608
12609 %union directives can now have a tag before the `{', e.g., the
12610 directive `%union foo {...}' now generates the C code
12611 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12612 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12613 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12614 instead of `yyltype'.
12615
12616 `yystype' and `yyltype' are now obsolescent macros instead of being
12617 typedefs or tags; they are no longer documented and will be
12618 withdrawn in a future release.
12619
12620 * data/glr.c (b4_location_type): Remove.
12621 (YYSTYPE): Renamed from yystype.
12622 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12623 (struct YYLTYPE): Renamed from struct yyltype.
12624 (YYLTYPE): Renamed from yyltype.
12625 (yyltype, yystype): New (and obsolescent) macros,
12626 for backward compatibility.
12627 * data/yacc.c: Likewise.
12628
12629 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12630 does not specify a union tag. This is for compatibility with
12631 Solaris 9 yacc.
12632
12633 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12634 const *, since it is now modified by stripping surrounding { }.
12635 (current_braced_code): Remove.
12636 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12637 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12638 trailing " {...}". Now of type <chars>.
12639 (grammar_declaration): Adjust to bundled tokens.
12640 (code_content): Remove; stripping is now done by add_param.
12641 (print_token_value): Print contents of bundled tokens.
12642 (token_name): New function.
12643
12644 * src/reader.h (braced_code, current_braced_code): Remove.
12645 (token_name): New decl.
12646
12647 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12648 token_type, not braced_code code_kind. All uses changed.
12649 (SC_PRE_CODE): New state, for scanning after a keyword that
12650 has (or usually has) an immediately-following braced code.
12651 (token_type): New local var, to keep track of which token type
12652 to return when scanning braced code.
12653 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
12654 <INITIAL>"%parse-param", <INITIAL>"%printer",
12655 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12656 instead of returning a token type immediately.
12657 (<INITIAL>"{"): Set token type.
12658 (<SC_BRACED_CODE>"}"): Use it.
12659 (handle_action_dollar, handle_action_at): Now returns bool
12660 indicating success. Fail if ! current_rule; this prevents a core dump.
12661 (handle_symbol_code_dollar, handle_symbol_code_at):
12662 Remove; merge body into caller.
12663 (handle_dollar, handle_at): Complain in invalid contexts.
12664
12665 * NEWS, doc/bison.texinfo: Document the above.
12666 * NEWS: Fix years and program names in copyright notice.
12667
12668 2002-12-17 Paul Eggert <eggert@twinsun.com>
12669
12670 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12671 Reporting, Table of Symbols): Omit mentions of %lex-param and
12672 %parse-param from the documentation for now.
12673
12674 2002-12-15 Paul Eggert <eggert@twinsun.com>
12675
12676 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12677 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12678 lookahead symbol, and which sets yychar in parser actions) and it
12679 disagreed with the Bison documentation. Bug
12680 reported by Andrew Walrond.
12681
12682 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12683 as the caller now does that.
12684 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12685 (YYEMPTY): Parenthesize right hand side, since others use it.
12686 (yyparse): Don't assume that our generated code is the only code
12687 that sets yychar.
12688
12689 2002-12-13 Paul Eggert <eggert@twinsun.com>
12690
12691 Version 1.75d.
12692
12693 POSIX requires a "yacc" command.
12694 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12695 (MOSTLYCLEANFILES): Add yacc.
12696 (yacc): New rule.
12697 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
12698 as an alias for bison y.
12699
12700 * po/LINGUAS: Add da.
12701
12702 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12703 problem with latest <getopt.h>.
12704 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12705
12706 * doc/fdl.texi: Upgrade to 1.2.
12707 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12708 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12709 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12710 gnulib.
12711 * config/install-sh: Sync with autotools.
12712
12713 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
12714 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
12715 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
12716 locations are requested.
12717 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
12718 locations are requested.
12719
12720 2002-12-12 Paul Eggert <eggert@twinsun.com>
12721
12722 Remove unportable casts and storage allocation tricks.
12723 While we're at it, remove almost all casts, since they
12724 usually aren't needed and are a sign of trouble.
12725
12726 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
12727
12728 * src/derives.c (derives_compute): Do not subtract NTOKENS from
12729 the pointer DSET returned by malloc; this isn't portable.
12730 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
12731 Similarly for DERIVES.
12732 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
12733 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
12734 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
12735
12736 * src/derives.c (derives_compute): Do not bother invoking
12737 int_of_rule_number, since rule numbers are integers.
12738
12739 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
12740 rather than XMALLOC (char, N).
12741
12742 * src/files.c (filename_split): Rewrite to avoid cast.
12743
12744 * src/gram.h (symbol_number_as_item_number,
12745 item_number_as_symbol_number, rule_number_as_item_number,
12746 item_number_as_rule_number):
12747 Now inline functions rather than macros, to avoid casts.
12748 * src/state.h (state_number_as_int): Likewise.
12749 * src/tables.c (state_number_to_vector_number,
12750 symbol_number_to_vector_number): Likewise.
12751
12752 * src/gram.h (int_of_rule_number): Remove; no longer used.
12753
12754 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
12755 since the resulting storage is always stored into.
12756
12757 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
12758 where it's needed.
12759
12760 * src/muscle_tab.c (muscle_m4_output):
12761 Now inline. Return bool, not int.
12762 * src/state.c (state_compare): Likewise.
12763 * src/symtab.c (symbol_check_defined,
12764 symbol_check_alias_consistency, symbol_pack, symbol_translation,
12765 hash_compare_symbol, hash_symbol):
12766 Likewise.
12767 * src/uniqstr.c (uniqstr_print): Likewise.
12768 * src/muscle_tab.c (muscle_m4_output_processor):
12769 New function, to avoid casts.
12770 * src/state.c (state_comparator, stage_hasher): Likewise.
12771 * src/symtab.c (symbol_check_defined_processor,
12772 symbol_check_alias_consistency_processor, symbol_pack_processor,
12773 symbol_translation_processor, hash_symbol_comparator,
12774 hash_symbol_hasher): Likewise.
12775 * src/uniqstr.c (uniqstr_print_processor): Likewise.
12776 * src/muscle_tab.c (muscles_m4_output):
12777 Use new functions instead of casting old functions unportably.
12778 * src/state.c (state_hash_new): Likewise.
12779 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
12780 symbols_token_translations_init):
12781 Likewise.
12782 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
12783
12784 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
12785 var instead of casting to long, to avoid casts.
12786 (prepare_states): Use MALLOC rather than alloca, so that we don't
12787 have to worry about alloca.
12788 * src/state.c (state_hash_lookup): Likewise.
12789
12790 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
12791 local var instead of casting to unsigned char, to avoid casts.
12792
12793 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
12794 STATE_ALLOC): Remove.
12795 (transitions_new, errs_new, reductions_new, state_new): Use malloc
12796 rather than calloc, and use offsetof to avoid allocating slightly
12797 too much storage.
12798 (state_new): Initialize all members.
12799
12800 * src/state.c (state_hash): Use unsigned accumulator, not signed.
12801
12802 * src/symtab.c (symbol_free): Remove; unused.
12803 (symbol_get): Remove cast in lhs of assignment.
12804 (symbols_do): Now static. Accept generic arguments, not
12805 hashing-related ones.
12806
12807 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
12808 (symbol_processor): Remove.
12809 (symbols_do): Remove decl; now static.
12810
12811 * src/system.h (alloca): Remove; decl no longer needed.
12812 (<stddef.h>): Include, for offsetof.
12813 (<inttypes.>, <stdint.h>): Include if available.
12814 (uintptr_t): New type, if system lacks it.
12815 (CALLOC, MALLOC, REALLOC): New macros.
12816 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
12817 new macros.
12818
12819 * src/tables.c (table_size): Now int, to pacify GCC.
12820 (table_grow, table_ninf_remap): Use signed table size.
12821 (save_row): Don't bother initializing locals when not needed.
12822 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
12823 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
12824
12825 * src/vcg.h: Correct misspellings.
12826
12827 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
12828
12829
12830 * src/getargs.c (getargs): Don't assume EOF == -1.
12831
12832 2002-12-09 Paul Eggert <eggert@twinsun.com>
12833
12834 Change identifier spellings to avoid collisions with names
12835 that are reserved by POSIX.
12836
12837 Don't use names ending in _t, since POSIX reserves them.
12838 For consistency, remove _e and _s endings -- they're weren't
12839 needed to remove ambiguity. All uses changed.
12840 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
12841 turn was just renamed from struniq_t.
12842 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
12843 which in turn was just renamed from struniq_processor_t.
12844 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
12845 in turn was renamed from hash_compare_struniq_t.
12846 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
12847 (state_list): Renamed from state_list_t.
12848 * src/assoc.h (assoc): Renamed from assoc_t.
12849 * src/conflicts.c (enum conflict_resolution): Renamed from
12850 enum conflict_resolution_e.
12851 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
12852 (rule_list): Renamed from rule_list_t.
12853 * src/getargs.h (enum trace): Renamed from enum trace_e.
12854 (enum report): Renamed from enum report_e.
12855 * src/gram.h (item_number): Renamed from item_number_t.
12856 (rule_number): Renamed from rule_number_t.
12857 (struct rule_s): Remove the "rule_s" part; not used.
12858 (rule): Renamed from rule_t.
12859 (rule_filter): Renamed from rule_filter_t.
12860 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
12861 (goto_list): Renamed from goto_list_t.
12862 * src/lalr.h (goto_number): Renamed from goto_number_t.
12863 * src/location.h (location): Renamed from location_t.
12864 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
12865 and moved here from:
12866 * src/muscle_tab.h (muscle_entry_t): here.
12867 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
12868 (rule_list): Renamed from rule_list_t.
12869 * src/print_graph.c (static_graph): Renamed from graph.
12870 * src/reader.h (braced_code): Renamed from braced_code_t.
12871 Remove brace_code_e tag.
12872 * src/relation.h (relation_node): Renamed from relation_node_t.
12873 (relation_nodes): Renamed from relation_nodes_t.
12874 (relation): Renamed from relation_t.
12875 * src/state.h (state_number): Renamed from state_number_t.
12876 (struct state): Renamed from struct state_s.
12877 (state): Renamed from state_t.
12878 (transitions): Renamed from transitions_t. Unused (and
12879 misspelled) transtion_s tag removed.
12880 (errs): Renamed from errs_t. Unused errs_s tag removed.
12881 (reductions): Renamed from reductions_t. Unused tag
12882 reductions_s removed.
12883 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
12884 (struct symbol_list): Renamed from struct symbol_list_s.
12885 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
12886 (struct symbol): Renamed from struct symbol_s.
12887 (symbol): Renamed from symbol_t.
12888 * src/tables.c (vector_number): Renamed from vector_number_t.
12889 (action_number): Renamed from action_t.
12890 * src/tables.h (base_number): Renamed from base_t.
12891 * src/vcg.h (enum color): Renamed from enum color_e.
12892 (enum textmode): Renamed from enum textmode_e.
12893 (enum shape): Renamed from enum shape_e.
12894 (struct colorentry): Renamed from struct colorentry_s.
12895 (struct classname): Renamed from struct classname_s.
12896 (struct infoname): Renamed from struct infoname_s.
12897 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
12898 (enum decision): Renamed from enum decision_e.
12899 (enum orientation): Renamed from enum orientation_e.
12900 (enum alignment): Renamed from enum alignment_e.
12901 (enum arrow_mode): Renamed from enum arrow_mode_e.
12902 (enum crossing_type): Renamed from enum crossing_type_e.
12903 (enum view): Renamed from enum view_e.
12904 (struct node): Renamed from struct node_s.
12905 (node): Renamed from node_t.
12906 (enum linestyle): Renamed from enum linestyle_e.
12907 (enum arrowstyle): Renamed from enum arrowstyle_e.
12908 (struct edge): Renamed from struct edge.
12909 (edge): Renamed from edge_t.
12910 (struct graph): Renamed from struct graph_s.
12911 (graph): Renamed from graph_t.
12912 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
12913 Rename value_t -> value.
12914 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
12915 value_t_as_yystype -> value_as_yystype.
12916
12917 Don't include <errno.h> in the mainstream code, since it
12918 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
12919 * lib/get-errno.c, lib/get-errno.h: New files.
12920 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
12921 get-errno.c.
12922 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
12923 * src/output.c (output_skeleton): Likewise.
12924 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
12925 instead of errno.
12926 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
12927 Likewise.
12928 (handle_action_dollar, handle_action_at): Likewise.
12929 * src/system.h: Do not include <errno.h>.
12930 (TAB_EXT): Renamed from EXT_TAB.
12931 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
12932
12933 Avoid str[a-z]*, since <string.h> reserves that name space.
12934 Change all instances of "struniq" in names to "uniqstr", and
12935 likewise for "STRUNIQ" and "UNIQSTR".
12936 * src/uniqstr.c: Renamed from src/struniq.c.
12937 * src/uniqstr.h: Renamed from src/struniq.h.
12938 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
12939 * src/files.c (strsuffix): Remove; unused.
12940 (concat2): Renamed from stringappend. Now static.
12941 * src/files.h (strsuffix, stringappend): Remove; unused.
12942 * src/parse-gram.y (<chars>): Renamed from <string>.
12943 (<uniqstr>): Renamed from <struniq>.
12944 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
12945 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
12946 (struct graph_s.expand): Renamed from struct graph_s.stretch.
12947 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
12948 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
12949 (N_EXPAND): Renamed from N_STRETCH.
12950
12951 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
12952 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
12953 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
12954 Remove; unused.
12955 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
12956 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
12957 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
12958 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
12959 (BASE_MAXIMUM): Renamed from BASE_MAX.
12960 (BASE_MINIMUM): Renamed from BASE_MIN.
12961 (ACTION_MAX): Remove; unused.
12962 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
12963 Unnecessary casts removed from above defines.
12964
12965
12966 Fix misspelling in names.
12967 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
12968 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
12969 G_NODE_ALIGNEMENT.
12970
12971
12972 * lib/timevar.c (timevar_report): Renamed from time_report,
12973 for consistency with other names.
12974 * lib/timevar.h (timevar_report): New decl.
12975 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
12976
12977
12978 Sort include-file uses.
12979
12980 Reorder all include files under src to be in the order "system.h".
12981 then the ../lib include files in angle brackets (alphabetized),
12982 then the . include files in double-quotes (alphabetized). Fix
12983 dependency breakages encountered in this process, as follows:
12984 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
12985 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
12986 * src/state.h: Include "symtab.h".
12987
12988 2002-12-08 Paul Eggert <eggert@twinsun.com>
12989
12990 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
12991 since this causes problems when __file__ contains character
12992 sequences like "@" that are treated specially by src/scan-skel.l.
12993 Instead, just use the file's basename. This fixes the bug
12994 reported by Martin Mokrejs in
12995 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
12996
12997 2002-12-06 Paul Eggert <eggert@twinsun.com>
12998
12999 Add support for rules that do not have trailing semicolons, as
13000 POSIX requires. Improve the quality of locations in Bison
13001 diagnostics.
13002
13003 * src/location.c: Include <quotearg.h>.
13004 (empty_location): Now const.
13005 (location_print): New function. Follow the recommendation of the
13006 GNU Coding Standards for locations that span file boundaries.
13007 * src/location.h: Do not include <quotearg.h>; no longer needed.
13008 (boundary): New type.
13009 (location_t): Use it. This allows locations to span file boundaries.
13010 All member uses changed: file -> start.file or end.file (as needed),
13011 first_line -> start.line, first_column -> start.column,
13012 last_line -> end.line, last_column -> end.column.
13013 (equal_boundaries): New function.
13014 (LOCATION_RESET, LOCATION_STEP): Remove.
13015 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13016 (empty_location): Now const.
13017 (location_print): New decl.
13018 * src/parse-gram.y (lloc_default): New function, which handles
13019 empty locations more accurately.
13020 (YYLLOC_DEFAULT): Use it.
13021 (%token COLON): Remove.
13022 (%token ID_COLON): New token.
13023 (rules): Use it.
13024 (declarations, rules): Remove trailing semicolon.
13025 (declaration, rules_or_grammar_declaration):
13026 Allow empty (";") declaration.
13027 (symbol_def): Remove empty actions; no longer needed.
13028 (rules_or_grammar_declaration): Remove trailing semicolon.
13029 (semi_colon.opt): Remove.
13030 * src/reader.h: Include location.h.
13031 (scanner_cursor): New decl.
13032 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13033 rolling our own.
13034 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13035 of *loc.
13036 (STEP): Remove. No longer needed, now that adjust_location does
13037 the work. All uses removed.
13038 (scanner_cursor): New var.
13039 (adjust_location): Renamed from extend_location. It now sets
13040 *loc and adjusts the scanner cursor. All uses changed.
13041 Don't bother testing for CR.
13042 (handle_syncline): Remove location arg; now updates scanner cursor.
13043 All callers changed.
13044 (unexpected_end_of_file): Now accepts start boundary of token or
13045 comment, not location. All callers changed. Update scanner cursor,
13046 not the location.
13047 (SC_AFTER_IDENTIFIER): New state.
13048 (context_state): Renamed from c_context. All uses changed.
13049 (id_loc, code_start, token_start): New local vars.
13050 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13051 processing of Yacc white space and equivalents here.
13052 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13053 instead of returning ID immediately, since we need to search for
13054 a subsequent colon.
13055 (<INITIAL>"'", "\""): Save token_start.
13056 (<INITIAL>"%{", "{", "%%"): Save code_start.
13057 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13058 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13059 BEGIN context_state at end, not INITIAL.
13060 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13061 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13062 Return correct token start.
13063 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13064 the start of a character, string or multiline comment is found.
13065 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13066 Reduction): Adjust reported locations to match the more-precise
13067 results now expected.
13068 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13069 * tests/reduce.at (Useless Rules, Reduced Automaton,
13070 Underivable Rules): Likewise.
13071 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13072 or "|"' now that so many other tokens are allowed by the new grammar.
13073
13074 * src/complain.h (current_file): Remove duplicate decl;
13075 current_file is now owned by files.h.
13076 * src/complain.c, src/scan-gram.l: Include files.h.
13077
13078 2002-12-06 Paul Eggert <eggert@twinsun.com>
13079
13080 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13081 promotes to int; it might be unsigned int.
13082 * data/yacc.c (yy_reduce_print): Likewise.
13083
13084 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13085 be #defined in the prologue, not in the Bison declarations.
13086 This fixes Debian Bug 102878, reported by Shaul Karl.
13087
13088 2002-12-02 Paul Eggert <eggert@twinsun.com>
13089
13090 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13091 * lib/strtoul.c: New file, from gnulib.
13092 This fixes a porting bug reported by Peter Klein in
13093 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
13094
13095 2002-11-30 Paul Eggert <eggert@twinsun.com>
13096
13097 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13098 and put only a forward declaration in the prologue. This is for
13099 consistency with the other scanner helper functions.
13100
13101 Type clashes now generate warnings, not errors, since it
13102 appears that POSIX may allow some grammars with type clashes.
13103 * src/reader.c (grammar_current_rule_check): Warn about
13104 type clashes instead of complaining.
13105 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13106
13107 Add Yacc library, since POSIX requires it.
13108 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13109 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13110 * lib/main.c, lib/yyerror.c: New files.
13111
13112 gram_error can be static; it need not be extern.
13113 * src/reader.h (gram_error): Remove decl.
13114 * src/parse-gram.y (gram_error): Now static. Add static decl.
13115 (print_token_value): Omit parameter names from forward decl,
13116 for consistency.
13117
13118 2002-11-29 Paul Eggert <eggert@twinsun.com>
13119
13120 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13121 be declared before being used. E.g., one should typically
13122 declare them in the prologue. Use GNU coding style in examples.
13123 Put "const" consistently after the type it modifies. Mention
13124 that C99 supports "inline". Mention that yyerror traditionally
13125 returns "int".
13126
13127 %parse-param and %lex-param now take just one argument, the
13128 declaration; the argument name is deduced from the declaration.
13129
13130 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13131 Reporting, Table of Symbols): Document this.
13132 * src/parse-gram.y (add_param): New function.
13133 (COMMA): Remove.
13134 (declaration): Implement new rule for %parse-param and %lex-param.
13135 * src/scan-gram.l: "," now elicits a warning, rather than being
13136 a token; this is more compatible with byacc.
13137 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13138
13139 2002-11-27 Paul Eggert <eggert@twinsun.com>
13140
13141 Rename identifiers to avoid real and potential collisions.
13142
13143 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13144 to avoid collision with lex macro described by Bruce Lilly in
13145 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13146 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13147 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13148 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13149 All uses changed.
13150 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13151 The name "yycontrol" violates the name space rules, and this stuff
13152 wasn't being used anyway.
13153 (input): Remove action; this stuff wasn't being used.
13154 (gram_error): Rename local variable yylloc -> loc.
13155 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13156 (YY_DECL): Don't use "yy" at start of local variables.
13157 All uses changed, e.g., yylloc -> loc.
13158 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13159 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13160 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13161 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13162
13163 * src/parse-gram.y (gram_error): loc is now const *.
13164 * src/reader.h (gram_error): Likewise.
13165
13166 2002-11-24 Paul Eggert <eggert@twinsun.com>
13167
13168 Version 1.75c.
13169
13170 * tests/actions.at (Actions after errors): Use an output format
13171 more similar to that of the Printers and Destructors test.
13172 Test the position of the ';' token too.
13173 (Printers and Destructors): Likewise.
13174 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13175 unnecessarily alarming people when the test fails.
13176
13177 * data/yacc.c (yyerrlab1): Move this label down, so that the
13178 parser does not discard the lookahead token if the user code
13179 invokes YYERROR. This change is required for POSIX conformance.
13180
13181 * lib/error.c: Sync with gnulib.
13182
13183 2002-11-22 Paul Eggert <eggert@twinsun.com>
13184
13185 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13186 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13187 * lib/xmalloc.c: Likewise.
13188
13189 2002-11-20 Paul Eggert <eggert@twinsun.com>
13190
13191 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13192
13193 2002-11-20 Paul Eggert <eggert@twinsun.com>
13194
13195 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13196 should use `if (! x) abort ();' rather than `assert (x);', and
13197 anyway it's one less thing to worry about configuring.
13198
13199 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13200 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13201 and replace all instances of assert with abort.
13202 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13203 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13204
13205 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13206 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13207 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13208 hash_find_entry, hash_rehash, hash_insert): Likewise.
13209 * src/conflicts.c (resolve_sr_conflict): Likewise.
13210 * src/lalr.c (set_goto_map, map_goto): Likewise.
13211 * src/nullable.c (nullable_compute): Likewise.
13212 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13213 * src/reader.c (packgram, reader): Likewise.
13214 * src/state.c (state_new, state_free, state_transitions_set,
13215 state_reduction_find): Likewise.
13216 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13217 symbol_pack): Likewise.
13218 * src/tables.c (conflict_row, pack_vector): Likewise.
13219 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13220 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13221 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13222 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13223
13224 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13225 (ARGMATCH_CONSTRAINT): New macro.
13226 (ARGMATCH_ASSERT): Use it.
13227
13228 * src/system.h (verify): New macro.
13229 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13230 rather than assert.
13231 * src/tables.c (tables_generate): Likewise.
13232
13233 * src/struniq.c (struniq_assert): Now returns void, and aborts
13234 if the assertion is false.
13235 (struniq_assert_p): Remove.
13236 * src/struniq.h: Likewise.
13237
13238 2002-11-18 Paul Eggert <eggert@twinsun.com>
13239
13240 * data/glr.c (yygetLRActions): Replace `yyindex' with
13241 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13242 This fixes the regression with Sun ONE Studio 7 cc that I reported in
13243 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
13244
13245 2002-11-18 Akim Demaille <akim@epita.fr>
13246
13247 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13248 space.
13249 From Tim Van Holder.
13250
13251 2002-11-17 Paul Eggert <eggert@twinsun.com>
13252
13253 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13254 to "SyntaxError" for consistency with my 2002-11-15 change.
13255
13256 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13257 not define to {}, since this breaks the common use of `YYDPRINTF
13258 ((...));' if a single statement is desired (e.g. before `else').
13259 Work around GCC warnings by surrounding corresponding calls with
13260 {} if needed.
13261 (yyhasResolvedValue): Remove unused function.
13262 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13263 loop body.
13264 (yyreportSyntaxError): Renamed from yyreportParseError.
13265 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13266 All uses changed.
13267 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13268 extern when possible. Remove unused initializations.
13269
13270 2002-11-16 Akim Demaille <akim@epita.fr>
13271
13272 Augment the similarity between GLR and LALR traces.
13273
13274 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13275 (YY_REDUCE_PRINT): New.
13276 (yyparse): Use them.
13277 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13278 YYDPRINT here.
13279 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13280 state reached after the reduction/recovery, since...
13281 (yyparse, yyprocessOneStack): Report the state we are entering in.
13282
13283 2002-11-16 Akim Demaille <akim@epita.fr>
13284
13285 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13286 Add support for --trace=skeleton.
13287 * src/scan-skel.l: %option debug.
13288 Scan strings of non-@ or \n instead of character by character.
13289 (scan_skel): Handle trace_skeleton.
13290 (QPUTS): New.
13291 (@output_parser_name@, @output_header_name@): ``Restore'' their
13292 support (used to be M4 macros).
13293 * data/yacc.c: Quote larger chunks, a la glr.c.
13294 * data/lalr1.cc: Likewise.
13295 The header guards are no longer available, so use some other
13296 string than `YYLSP_NEEDED'.
13297
13298 2002-11-16 Akim Demaille <akim@epita.fr>
13299
13300 Make the ``Printers and Destructors'' test more verbose, taking
13301 `yacc.c''s behavior as (possibly wrong) reference.
13302
13303 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13304 instead of fprint on stdout.
13305 Set and report the last_line of the symbols.
13306 Consistently display values and locations.
13307
13308 2002-11-16 Paul Eggert <eggert@twinsun.com>
13309
13310 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13311
13312 2002-11-15 Paul Eggert <eggert@twinsun.com>
13313
13314 * tests/actions.at (Actions after errors): New test case.
13315
13316 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13317 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13318 tests/action.at, tests/calc.at, tests/conflicts.at,
13319 tests/cxx-type.at, tests/regression.at:
13320 "parse error" -> "syntax error" for POSIX compatibility.
13321 "parsing stack overflow..." -> "parser stack overflow" so
13322 that code matches Bison documentation.
13323
13324 2002-11-15 Akim Demaille <akim@epita.fr>
13325
13326 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13327 take two BRACED_CODE, not two string_content.
13328 Free the scanner's obstack when we are done.
13329 (code_content): New.
13330 * tests/calc.at: Adjust.
13331 * doc/bison.texinfo: Adjust.
13332 Also, make sure to include the `,' for these declarations.
13333
13334 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13335
13336 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13337 definition; avoids potential autoreconf problems.
13338
13339 2002-11-15 Akim Demaille <akim@epita.fr>
13340
13341 Always check the value returned by yyparse.
13342
13343 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13344 returned by yyparse.
13345 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13346 Adjust calls.
13347 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13348 returned by yyparse.
13349
13350 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13351
13352 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
13353 on input.at test.
13354
13355 2002-11-14 Paul Eggert <eggert@twinsun.com>
13356
13357 * src/output.c (output_skeleton): Call xfopen instead of
13358 duplicating xfopen's body.
13359
13360 Fix bugs reported by Nelson H. F. Beebe in
13361 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
13362
13363 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13364 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13365 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13366 file twice in the grammar, as an extra check.
13367
13368 * tests/input.at (Torturing the Scanner): Surround the
13369 backslash-newline tests with "#if 0", to make it less likely that
13370 we'll run into compiler bugs. Bring back solitary \ inside
13371 comment, but add a closing comment to work around HP C bug. Don't
13372 test backslash-newline in C character constant.
13373
13374 2002-11-14 Akim Demaille <akim@epita.fr>
13375
13376 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13377 status of the compiler.
13378 Calling `exit 1' is no longer needed.
13379 Reported by Nelson H. F. Beebe.
13380
13381 2002-11-14 Akim Demaille <akim@epita.fr>
13382
13383 * tests/atlocal.in (CPPFLAGS): We have config.h.
13384 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13385 New.
13386 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13387 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13388 * tests/regression.at, tests/torture.at: Use them for all the
13389 grammars that are to be compiled.
13390 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13391 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13392 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13393
13394 2002-11-14 Akim Demaille <akim@epita.fr>
13395
13396 * doc/bison.texinfo: Various formatting changes (alignments in
13397 samples, additional @group/@end group, GCS in samples.
13398 Use @deffn instead of simple @table to define the directives,
13399 macros, variables etc.
13400
13401 2002-11-13 Paul Eggert <eggert@twinsun.com>
13402
13403 Fix some bugs reported by Albert Chin-A-Young in
13404 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
13405
13406 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
13407 -o c"; the HP C compiler chatters during compilation.
13408 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13409 * tests/headers.at (export YYLTYPE): Likewise.
13410
13411 * tests/input.at (Torturing the Scanner): Remove lines containing
13412 solitary backslashes, as they tickle a bug in the HP C compiler.
13413
13414 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13415 comments, since they're not portable. Use GNU coding style.
13416
13417 2002-11-13 Akim Demaille <akim@epita.fr>
13418
13419 * data/yacc.c: Leave bigger chunks of quoted text.
13420 (YYDSYMPRINTF): New.
13421 Use it to report symbol activities.
13422 * data/glr.c (YYDSYMPRINTF): New.
13423 Use it.
13424
13425 2002-11-12 Paul Eggert <eggert@twinsun.com>
13426
13427 Version 1.75b.
13428
13429 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13430 (yyglrReduce): Return yyok, not 0.
13431 This should avoid the enumerated-type warnings reported
13432 by Nelson H. F. Beebe in
13433 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
13434
13435 * lib/bbitset.h (BITSET_INLINE): Remove.
13436 * lib/bitset.h [! BITSET_INLINE]: Remove.
13437 (bitset_set, bitset_reset, bitset_test): Rename local vars
13438 to avoid shadowing warnings by GCC.
13439
13440 * data/glr.c (inline): Remove #define. It's the user's
13441 responsibility to #define it away, just like 'const'.
13442 This fixes one of the bugs reported by Nelson H. F. Beebe in
13443 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
13444
13445 * Makefile.maint (po-check): Scan .l and .y files instead of the
13446 .c and the .h files that they generate. This fixes the bug
13447 reported by Tim Van Holder in:
13448 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
13449 Look for N_ as well as for _. Try to avoid matching #define for
13450 N_ and _.
13451 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13452 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13453 * src/scan-gram.l: Revamp regular expressions so that " and '
13454 do not confuse xgettext.
13455
13456 * src/struniq.h (struniq_new): Do not declare the return type
13457 to be 'const'; this violates the C standard.
13458 * src/struniq.c (struniq_new): Likewise.
13459
13460 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13461
13462 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13463 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13464 linker.
13465
13466 2002-11-12 Akim Demaille <akim@epita.fr>
13467
13468 * Makefile.maint: Sync with Autoconf:
13469 (local_updates): New.
13470
13471 2002-11-12 Akim Demaille <akim@epita.fr>
13472
13473 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13474
13475 2002-11-12 Akim Demaille <akim@epita.fr>
13476
13477 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13478 locations.
13479
13480 2002-11-12 Akim Demaille <akim@epita.fr>
13481
13482 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13483 not yyvalue.
13484
13485 2002-11-12 Akim Demaille <akim@epita.fr>
13486
13487 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13488 Use it to test the GLR parser.
13489
13490 2002-11-12 Akim Demaille <akim@epita.fr>
13491
13492 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13493 defines it.
13494 * data/glr.c (yystos): New.
13495 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13496 (YYDSYMPRINT): New.
13497 (yyval): Don't define it, it is handled via M4.
13498 (yyrecoverParseError): Free verbosely the discarded symbols.
13499 * data/yacc.c (yysymprint): Remove, rather...
13500 (b4_yysymprint_generate): invoke.
13501 * data/c.m4 (b4_yysymprint_generate): New.
13502 Accept pointers as arguments, as opposed to the version from
13503 yacc.c.
13504 (b4_yydestruct_generate): Likewise.
13505 * tests/cations.at (Printers and Destructors): Use Bison directives
13506 instead of CPP macros.
13507 Don't rely on internal details.
13508
13509 2002-11-12 Akim Demaille <akim@epita.fr>
13510
13511 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13512 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13513 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13514 it against YYEMPTY and so forth), work on yytoken (i.e., set
13515 it to YYEMPTY etc.).
13516 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13517 (b4_symbol_actions): Remove.
13518 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13519 for 0, end-of-input.
13520
13521 2002-11-12 Akim Demaille <akim@epita.fr>
13522
13523 * doc/bison.texinfo (Destructor Decl): New.
13524
13525 2002-11-12 Akim Demaille <akim@epita.fr>
13526
13527 * src/tables.c (tables_generate): Use free for pointers that
13528 cannot be NULL, not XFREE.
13529 (pack_vector): Use assert, not fatal, for bound violations.
13530 * src/state.c (state_new): Likewise.
13531 * src/reader.c (reader): Likewise.
13532 * src/lalr.c (set_goto_map): Likewise.
13533 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
13534 the file name.
13535
13536 2002-11-12 Akim Demaille <akim@epita.fr>
13537
13538 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13539 Restore.
13540 * src/scan-gram.l (last_string): Is global to the file, not to
13541 yylex.
13542 * src/parse-gram.y (input): Don't append the epilogue here,
13543 (epilogue.opt): do it here, and free the scanner's obstack.
13544 * src/reader.c (epilogue_set): Rename as...
13545 (epilogue_augment): this.
13546 * data/c.m4 (b4_epilogue): Defaults to empty.
13547
13548 2002-11-12 Akim Demaille <akim@epita.fr>
13549
13550 * src/getargs.c (long_options): Remove duplicates.
13551 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13552 Remove.
13553 * doc/bison.rnh: Remove.
13554 * doc/bison.texinfo (VMS Invocation): Remove.
13555
13556 2002-11-12 Akim Demaille <akim@epita.fr>
13557
13558 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13559 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13560
13561 Use struniq for symbols.
13562
13563 * src/symtab.h (symbol_t): The tag member is a struniq.
13564 (symbol_type_set): Adjust.
13565 * src/symtab.c (symbol_new): Takes a struniq.
13566 (symbol_free): Don't free the tag member.
13567 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13568 (hash_compare_symbol, hash_symbol): these.
13569 Use the fact that tags as struniqs.
13570 (symbol_get): Use struniq_new.
13571 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13572 Returns a strniq.
13573 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13574 and type members are struniqs.
13575 * src/reader.c (get_merge_function)
13576 (grammar_current_rule_merge_set): Adjust.
13577 (TYPE, current_type): Are struniq.
13578
13579 Use struniq for file names.
13580
13581 * src/files.h, src/files.c (infile): Split into...
13582 (grammar_file, current_file): these.
13583 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13584 * src/reduce.c (reduce_print): Likewise.
13585 * src/getargs.c (getargs): Likewise.
13586 * src/complain.h, src/complain.c: Likewise.
13587 * src/main.c (main): Call struniqs_new early enough to use it for
13588 file names.
13589 Don't free the input file name.
13590
13591 2002-11-12 Akim Demaille <akim@epita.fr>
13592
13593 * src/symtab.c (symbol_free): Remove dead deactivated code:
13594 type_name are properly removed.
13595 Don't use XFREE to free items that cannot be NULL.
13596 * src/struniq.h, src/struniq.c: New.
13597 * src/main.c (main): Initialize/free struniqs.
13598 * src/parse-gram.y (%union): Add astruniq member.
13599 (yyprint): Adjust.
13600 * src/scan-gram.l (<{tag}>): Return a struniq.
13601 Free the obstack bit that used to store it.
13602 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13603
13604 2002-11-11 Paul Eggert <eggert@twinsun.com>
13605
13606 Revamp to fix many (but not all) of the C- and M4-related quoting
13607 problems. Among other things, this fixes the Bison bug reported
13608 by Jan Hubicka when processing the Bash grammar; see:
13609 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
13610
13611 Use new @ escapes consistently. Represent brackets with @{ and @}
13612 rather than @<:@ and @:>@, since this works a bit better with dumb
13613 editors like vi. Represent @ with @@, since @ is now consistently
13614 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13615 __ofile__, to avoid unexpected expansions. Similarly, use @output
13616 rather than #output.
13617
13618 * data/c.m4 (b4_copyright): Omit file name from comment, since
13619 the file name could contain "*/".
13620 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13621 be quoted. All uses changed.
13622
13623 * data/glr.c: Use new @ escapes consistently.
13624 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13625 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13626 Remove, since they couldn't handle arbitrary characters in file
13627 names.
13628 * data/lalr1.cc: Likewise.
13629 * data/yacc.c: Likewise.
13630
13631 * src/files.c (output_infix): Remove; all uses removed.
13632 * src/files.h: Likewise.
13633
13634 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13635 mishandled funny characters in file names, and anyway it isn't
13636 needed any more.
13637 * data/yacc.c: Likewise.
13638 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13639
13640 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13641 * data/yacc.c: Likewise.
13642
13643 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13644 strings now.
13645 (muscle_init): Quote filename as a C string.
13646 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13647 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13648 * src/output.c (escaped_file_name_output): New function.
13649 (prepare_symbols): Quote tokens for M4.
13650 (prepare): Don't insert output_infix, output_prefix,
13651 output_parser_name, output_header_name; this is now down by scan-skel.
13652 Insert skeleton as a C string.
13653
13654 * src/output.c (user_actions_output, symbol_destructors_output,
13655 symbol_printers_output): Quote filenames for C and M4.
13656 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13657
13658 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13659 escapes other than \\ and \'; this simplifies the code.
13660 (<SC_STRING>): Likewise, for \\ and \".
13661 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13662 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13663 Use new escapes @{ and @} for [ and ].
13664
13665 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13666 them with auto vars.
13667 Switch to new escape scheme, where @ is the escape character uniformly.
13668 Abort if a stray escape character is found. Avoid unbounded input
13669 buffer when parsing non-escaped text.
13670
13671 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13672 __oline__, #output, $@, and @{ do not have unintended meanings.
13673
13674 2002-11-09 Paul Eggert <eggert@twinsun.com>
13675
13676 Fix the test failure due to GCC warnings described in
13677 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
13678 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13679 evaluate to 0 if it's impossible for NINF to be in the respective
13680 table.
13681 (yygetLRActions, yyrecoverParseError): Use them.
13682
13683 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13684 counted in the token inserted at end of file. Now takes
13685 location_t *, not location_t, so that the location can be
13686 adjusted. All uses changed.
13687
13688 * tests/regression.at (Invalid inputs): Adjust wording in
13689 diagnostic to match the new behavior.
13690
13691 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13692 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13693 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13694 abort ();'. This reduces the runtime of the "Many lookaheads"
13695 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13696 GCC 3.2.
13697
13698 2002-11-07 Paul Eggert <eggert@twinsun.com>
13699
13700 * src/parse-gram.y (CHARACTER): Remove unused token.
13701 All uses removed.
13702
13703 * src/scan-gram.l: Remove stack option. We no longer use the
13704 stack, since the stack was never deeper than 1; instead, use the
13705 new auto var c_context to record the stacked value.
13706
13707 Remove nounput option. At an unexpected end of file, we now unput
13708 the minimal input necessary to end cleanly; this simplifies the
13709 code.
13710
13711 Avoid unbounded token sizes where this is easy.
13712
13713 (unexpected_end_of_file): New function.
13714 Use it to systematize the error message on unexpected EOF.
13715 (last-string): Now auto, not static.
13716 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
13717 (scanner_last_string_free): Remove; not used.
13718 (percent_percent_count): Move decl to just before use.
13719 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
13720 not the (never otherwised-used) CHARACTER.
13721
13722 2002-11-07 Akim Demaille <akim@epita.fr>
13723
13724 Let yyerror always receive the msg as last argument, so that
13725 yyerror can be variadic.
13726
13727 * data/yacc.c (b4_yyerror_args): New.
13728 Use it when calling yyerror.
13729 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
13730 Use it when calling yyerror.
13731 * doc/bison.texinfo (Error Reporting): Adjust.
13732 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
13733 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
13734
13735 2002-11-06 Akim Demaille <akim@epita.fr>
13736
13737 #line should have quoted strings.
13738 Ideally, this should be done by m4_quotearg.
13739
13740 * src/scan-skel.l: Include quotearg.h.
13741 Quote __ofile__.
13742 * src/output.c (symbol_printers_output)
13743 (symbol_destructors_output): Quote the file name.
13744
13745 2002-11-06 Akim Demaille <akim@epita.fr>
13746
13747 * tests/regression.at (Invalid inputs): Adjust to the recent
13748 messages.
13749
13750 2002-11-06 Akim Demaille <akim@epita.fr>
13751
13752 Restore --no-lines.
13753 Reported by Jim Kent.
13754
13755 * data/c.m4 (b4_syncline): New.
13756 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
13757 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
13758 * src/output.c (user_actions_output): Likewise.
13759 (prepare): Define 'b4_synclines_flag'.
13760 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
13761
13762 2002-11-06 Akim Demaille <akim@epita.fr>
13763
13764 * src/main.c (main): Free `infile'.
13765 * src/scan-gram.l (handle_syncline): New.
13766 Recognize `#line'.
13767 * src/output.c (user_actions_output, symbol_destructors_output)
13768 (symbol_printers_output): Use the location's file name, not
13769 infile.
13770 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13771
13772 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13773
13774 * src/tables.c (matching_state): Don't allow states to match if
13775 either has GLR conflict entries.
13776
13777 2002-11-05 Paul Eggert <eggert@twinsun.com>
13778
13779 * src/scan-gram.l: Use more accurate diagnostics, e.g.
13780 "integer out of range" rather than "invalid value".
13781 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
13782 accordingly.
13783
13784 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
13785 Also, remove one static variable in the scanner.
13786
13787 * src/scan-gram.l (braces_level): Now auto, not static.
13788 Initialize to zero if the compiler is being picky.
13789 (INITIAL): Clear braces_level instead of incrementing it.
13790 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
13791 as POSIX 1003.1-2001 requires.
13792 * src/system.h (IF_LINT): New macro, taken from coreutils.
13793 * configure.ac: Define "lint" if --enable-gcc-warnings.
13794
13795 2002-11-05 Akim Demaille <akim@epita.fr>
13796
13797 * src/scan-gram.l: When it starts with `%', complain about the
13798 whole directive, not just that `invalid character: %'.
13799
13800 2002-11-04 Akim Demaille <akim@epita.fr>
13801
13802 * Makefile.maint: Update from Autoconf.
13803 (update, cvs-update, po-update, do-po-update): New.
13804
13805 2002-11-04 Akim Demaille <akim@epita.fr>
13806
13807 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
13808 and yyerror.
13809 Have yyerror `use' its arguments.
13810 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
13811 returns true when location & yacc & pure & parse-param.
13812 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
13813
13814 2002-11-04 Akim Demaille <akim@epita.fr>
13815
13816 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
13817 clashes.
13818 * src/scan-gram.l: Use [\'] instead of ['] to pacify
13819 font-lock-mode.
13820 Use complain_at.
13821 Use quote, not quote_n since LOCATION_PRINT no longer uses the
13822 slot 0.
13823
13824 2002-11-03 Paul Eggert <eggert@twinsun.com>
13825
13826 * src/reader.c (get_merge_function, grammar_current_rule_check):
13827 Use consistent diagnostics for reporting type name clashes.
13828 Quote the types with <>, for consistency with Yacc.
13829 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
13830
13831 2002-11-03 Akim Demaille <akim@epita.fr>
13832
13833 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
13834 New.
13835 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
13836 (b4_parse_param): Remove.
13837 Use b4_identification.
13838 Propagate b4_pure_args where needed to pass them to yyerror.
13839 * data/glr.m4 (b4_parse_param): Remove.
13840 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
13841 (b4_lpure_formals): New.
13842 Use b4_identification.
13843 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
13844 b4_user_formals and b4_user_args.
13845 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
13846 (yyreportAmbiguity): When using a pure parser, also need
13847 the location, and the parse-params.
13848 Adjust callers.
13849 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
13850 When using a pure parser, also need the parse-params.
13851 Adjust callers.
13852 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
13853 (%pure-parser + %parse-param) LALR and GLR parsers.
13854 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
13855 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
13856 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
13857 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
13858 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
13859 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
13860 * doc/bison.texinfo: Untabify the whole file.
13861 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
13862 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
13863 (Error Reporting): Adjust to these new directives.
13864 Document %error-verbose, deprecate YYERROR_VERBOSE.
13865
13866 2002-11-03 Akim Demaille <akim@epita.fr>
13867
13868 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
13869 AT_CHECK_CALC_GLR invocations to use % directives, instead of
13870 command line options.
13871 * tests/cxx-type.at: Formatting changes.
13872
13873 2002-11-03 Paul Eggert <eggert@twinsun.com>
13874
13875 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
13876 to count columns correctly, and to check for invalid inputs.
13877
13878 Use mbsnwidth to count columns correctly. Account for tabs, too.
13879 Include mbswidth.h.
13880 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
13881 (extend_location): New function.
13882 (YY_LINES): Remove.
13883
13884 Handle CRLF in C code rather than in Lex code.
13885 (YY_INPUT): New macro.
13886 (no_cr_read): New function.
13887
13888 Scan UCNs, even though we don't fully handle them yet.
13889 (convert_ucn_to_byte): New function.
13890
13891 Handle backslash-newline correctly in C code.
13892 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
13893 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
13894 all uses changed.
13895 (tag, splice): New EREs. Do not allow NUL or newline in tags.
13896 Use {splice} wherever C allows backslash-newline.
13897 YY_STEP after space, newline, vertical-tab.
13898 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
13899
13900 (letter, id): Don't assume ASCII; e.g., spell out a-z.
13901
13902 ({int}, handle_action_dollar, handle_action_at): Check for integer
13903 overflow.
13904
13905 (YY_STEP): Omit trailing semicolon, so that it's more like C.
13906
13907 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
13908 as well as \000. Check for UCHAR_MAX, not 255.
13909 Allow \x with an arbitrary positive number of digits, as in C.
13910 Check for overflow here.
13911 Allow \? and UCNs, for compatibility with C.
13912
13913 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
13914 with quote slot used by complain_at.
13915
13916 * tests/input.at: Add tests for backslash-newline, m4 quotes
13917 in symbols, long literals, and funny escapes in strings.
13918
13919 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
13920 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
13921 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
13922 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
13923 * m4/mbswidth.m4: New file, from GNU coreutils.
13924
13925 * doc/bison.texinfo (Grammar Outline): Document // comments.
13926 (Symbols): Document that trigraphs have no special meaning in Bison,
13927 nor is backslash-newline allowed.
13928 (Actions): Document that trigraphs have no special meaning.
13929
13930 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
13931 no longer used.
13932
13933 2002-11-02 Paul Eggert <eggert@twinsun.com>
13934
13935 * src/reader.c: Don't include quote.h; not needed.
13936 (get_merge_function): Reword warning to be consistent with
13937 type clash diagnostic in grammar_current_rule_check.
13938
13939 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
13940 bug in trigraph handling.
13941
13942 * src/output.c (prepare_symbols): When printing token names,
13943 escape "[" as "@<:@" and likewise for "]".
13944
13945 * src/system.h (errno): Remove declaration, as we are now
13946 assuming C89 or better, and C89 guarantees errno.
13947
13948 2002-10-30 Paul Eggert <eggert@twinsun.com>
13949
13950 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
13951 Check for close failures.
13952 * src/files.h (xfclose): Return void, not int, since it always
13953 returned zero.
13954 * src/files.c (xfclose): Likewise. Report I/O error if ferror
13955 indicates one.
13956 * src/output.c (output_skeleton): Use xfclose rather than fclose
13957 and ferror. xfclose now checks ferror.
13958
13959 * data/glr.c (YYLEFTMOST_STATE): Remove.
13960 (yyreportTree): Use a stack-based leftmost state. This avoids
13961 our continuing battles with bogus warnings about initializers.
13962
13963 2002-10-30 Akim Demaille <akim@epita.fr>
13964
13965 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
13966 #if.
13967
13968 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13969
13970 * tests/glr-regr1.at: New test for reported regressions.
13971 * tests/testsuite.at: Add glr-regr1.at test.
13972 * tests/Makefile.am: Add glr-regr1.at test.
13973
13974 2002-10-24 Paul Eggert <eggert@twinsun.com>
13975
13976 Version 1.75a.
13977
13978 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
13979 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
13980 we use malloc. Don't assume 'A' through 'Z' are contiguous.
13981 Don't assume strdup exists; POSIX says its an XSI extension.
13982 Check for buffer overflow on input.
13983
13984 2002-10-24 Akim Demaille <akim@epita.fr>
13985
13986 * src/output.c (output_skeleton): Don't disable M4sugar comments
13987 too soon: it results in comments being expanded.
13988 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
13989 first output.
13990
13991 2002-10-24 Akim Demaille <akim@epita.fr>
13992
13993 * data/yacc.c (m4_int_type): New.
13994 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
13995 char' as only yacc.c wants K&R portability.
13996 * data/glr.c (yysigned_char): Remove.
13997 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
13998 Reported by Quoc Peyrot.
13999
14000 2002-10-23 Paul Eggert <eggert@twinsun.com>
14001
14002 * src/main.c (main): With --trace=time, report times even if a
14003 non-fatal error occurs. Formerly, the times were reported in some
14004 such cases but not in others.
14005 * src/reader.c (reader): Just return if a complaint has been issued,
14006 instead of exiting, so that 'main' can report times.
14007
14008 2002-10-22 Akim Demaille <akim@epita.fr>
14009
14010 * src/system.h: Include sys/types.
14011 Reported by Bert Deknuydt.
14012
14013 2002-10-23 Paul Eggert <eggert@twinsun.com>
14014
14015 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14016 Suggested by Art Haas.
14017
14018 2002-10-22 Paul Eggert <eggert@twinsun.com>
14019
14020 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14021 decl; not needed any more.
14022 * src/main.c (main): Use return to exit, undoing yesterday's change.
14023 The last OS that we could find where this wouldn't work is
14024 SunOS 3.5, and that's too old to worry about now.
14025
14026 * data/glr.c (struct yyltype): Define members even when not
14027 doing locations. This is more consistent with yacc.c, and it
14028 works around the following bug reports:
14029 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14030 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
14031
14032 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14033 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14034 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14035
14036 2002-10-22 Akim Demaille <akim@epita.fr>
14037
14038 * data/README: New.
14039
14040 2002-10-21 Paul Eggert <eggert@twinsun.com>
14041
14042 Be consistent about 'bool'; the old code used an enum in one
14043 module and an int in another, and this violates the C standard.
14044 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14045 * configure.ac (AC_HEADER_STDBOOL): Add.
14046 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14047 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14048 * src/symtab.c (hash_compare_symbol_t): Likewise.
14049 * src/system.h (bool, false, true): Use a definition consistent
14050 with ../lib/hash.c. All uses changed.
14051
14052 * src/complain.c (warning_issued): Renamed from warn_message_count,
14053 so that we needn't worry about integer overflow (!).
14054 Now of type bool. All uses changed.
14055 (complaint_issued): Renamed from complain_message_count; likewise.
14056
14057 * src/main.c (main): Use exit to exit with failure.
14058
14059 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14060 rather than 1 and 0.
14061 * src/main.c (main): Likewise.
14062 * src/getargs.c (getargs): Likewise.
14063 * src/reader.c (reader): Likewise.
14064
14065 * src/getarg.c (getargs): Remove duplicate code for
14066 "Try `bison --help'".
14067
14068 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14069 What was that "2" for?
14070
14071 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14072 * src/getargs.c (usage): Likewise.
14073
14074 * src/getargs.c (getargs): When there are too few operands, report
14075 the last one. When there are too many, report the first extra
14076 one. This is how diffutils does it.
14077
14078 2002-10-20 Paul Eggert <eggert@twinsun.com>
14079
14080 Remove K&R vestiges.
14081 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14082 * src/complain.c (VA_START): Remove. Assume prototypes.
14083 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14084 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14085 fatal): Assume prototypes.
14086 * src/complain.h: Assume prototypes.
14087 * src/system.h (PARAMS): Remove.
14088 Include <limits.h> unconditionally, since it's guaranteeed even
14089 for a freestanding C89 compiler.
14090 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14091 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
14092
14093 2002-10-20 Akim Demaille <akim@epita.fr>
14094
14095 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14096 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14097 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14098 (yyresolveStates, yyresolveAction, yyresolveStack)
14099 (yyprocessOneStack): Use them.
14100 (yy_reduce_print): New.
14101 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14102
14103 2002-10-20 Akim Demaille <akim@epita.fr>
14104
14105 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14106 arguments and output `void'.
14107 (b4_c_function): Rename as...
14108 (b4_c_function_def): this.
14109 (b4_c_function_decl, b4_c_ansi_function_def)
14110 (b4_c_ansi_function_decl): New.
14111 Change the interpretation of the arguments: before `int, foo', now
14112 `int foo, foo'.
14113 * data/yacc.c (yyparse): Prototype and define thanks to these.
14114 Adjust b4_c_function_def uses.
14115 * data/glr.c (yyparse): Likewise, but ANSI only.
14116
14117 2002-10-20 Akim Demaille <akim@epita.fr>
14118
14119 * src/output.c (prepare): Move the definition of `tokens_number',
14120 `nterms_number', `undef_token_number', `user_token_number_max'
14121 to...
14122 (prepare_tokens): Here.
14123 (prepare_tokens): Rename as...
14124 (prepare_symbols): this.
14125 (prepare): Move the definition of `rules_number' to...
14126 (prepare_rules): here.
14127 (prepare): Move the definition of `last', `final_state_number',
14128 `states_number' to...
14129 (prepare_states): here.
14130 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14131
14132 2002-10-20 Akim Demaille <akim@epita.fr>
14133
14134 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14135
14136 2002-10-20 Akim Demaille <akim@epita.fr>
14137
14138 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14139 * data/c.m4: here.
14140
14141 2002-10-20 Akim Demaille <akim@epita.fr>
14142
14143 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14144 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14145 `pair'.
14146 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14147 `name' to...
14148 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14149 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14150 These.
14151
14152 2002-10-19 Paul Eggert <eggert@twinsun.com>
14153
14154 Do not create a temporary file, as that involves security and
14155 cleanup headaches. Instead, use a pair of pipes.
14156 Derived from a suggestion by Florian Krohm.
14157 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14158 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14159 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14160 (BISON_PREREQ_SUBPIPE): Add.
14161 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14162 Add subpipe.h, subpipe.c.
14163 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14164 * po/POTFILES.in: Add lib/subpipe.c.
14165 * src/output.c: Include "subpipe.h".
14166 (m4_invoke): Remove decl.
14167 (scan_skel): New decl.
14168 (output_skeleton): Use pipe rather than temporary file for m4 input.
14169 Check that m4sugar.m4 is readable, to avoid deadlock.
14170 Check for pipe I/O error.
14171 * src/scan-skel.l (readpipe): Remove decl.
14172 (scan_skel): New function, to be used in place of m4_invoke.
14173 Read from stream rather than file.
14174
14175 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14176 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14177 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14178 this generates a more-accurate value anyway.
14179
14180 * lib/timevar.c (timervar_accumulate): Rename locals to
14181 avoid confusion with similarly-named more-global.
14182 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14183
14184 * src/output.c (prepare): Use xstrdup to convert char const *
14185 to char *, to avoid GCC warning.
14186
14187 2002-10-19 Akim Demaille <akim@epita.fr>
14188
14189 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14190 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14191 Use them to have `calc.y' ready for %pure-parser.
14192 * data/yacc.c (YYLEX): Pass a yylex return type to
14193 b4_c_function_call.
14194
14195 2002-10-19 Akim Demaille <akim@epita.fr>
14196
14197 Prototype support of %lex-param and %parse-param.
14198
14199 * src/parse-gram.y: Add the definition of the %lex-param and
14200 %parse-param tokens, plus their rules.
14201 Drop the `_' version of %glr-parser.
14202 Add the "," token.
14203 * src/scan-gram.l (INITIAL): Scan them.
14204 * src/muscle_tab.c: Comment changes.
14205 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14206 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14207 (muscle_entry_s): The `value' member is no longer const.
14208 Adjust all dependencies.
14209 * src/muscle_tab.c (muscle_init): Adjust: use
14210 MUSCLE_INSERT_STRING.
14211 Initialize the obstack earlier.
14212 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14213 (muscle_pair_list_grow): New.
14214 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14215 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14216 * tests/calc.at: Use %locations, not --locations.
14217 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14218
14219 2002-10-19 Akim Demaille <akim@epita.fr>
14220
14221 * src/getargs.c (usage): Take status as argument and exit
14222 accordingly.
14223 Report the traditional `Try ... --help' message when status != 0.
14224 (usage, version): Don't take a FILE * as arg, it is pointless.
14225 (getargs): When there is an incorrect number of arguments, make it
14226 an error, and report it GNUlically thanks to `usage ()'.
14227
14228 2002-10-18 Paul Eggert <eggert@twinsun.com>
14229
14230 * data/glr.c (yyreportParseError): Don't assume that sprintf
14231 yields the length of the printed string, as this is not true
14232 on SunOS 4.1.4. Reported by Peter Klein.
14233
14234 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14235 * tests/conflicts.at (%nonassoc and eof): Likewise.
14236 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14237
14238 2002-10-17 Akim Demaille <akim@epita.fr>
14239
14240 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14241 * src/getargs.c (trace_types, trace_args): Adjust.
14242 * src/reader.c (grammar_current_rule_prec_set)
14243 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14244 Standardize error messages.
14245 And s/@prec/%prec/!
14246 (reader): Use trace_flag to enable scanner/parser debugging,
14247 instead of an adhoc scheme.
14248 * src/scan-gram.l: Remove trailing debugging code.
14249
14250 2002-10-16 Paul Eggert <eggert@twinsun.com>
14251
14252 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14253 MUSCLE_TAB_H.
14254
14255 * NEWS: Officially drop support for building Bison with K&R C,
14256 since it didn't work anyway and it's not worth worrying about.
14257 * Makefile.maint (wget_files): Remove ansi2knr.c.
14258 (ansi2knr.c-url_prefix): Remove.
14259 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14260 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14261 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14262
14263 2002-10-15 Paul Eggert <eggert@twinsun.com>
14264
14265 Stop using the "enum_" trick for K&R-style function definitions;
14266 it confused me, and I was the author! Instead, assume that people
14267 who want to use K&R C compilers (when using these modules in GCC,
14268 perhaps?) will run ansi2knr.
14269
14270 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14271 All uses of "enum_" changed to "enum ".
14272 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14273 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14274
14275 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14276 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14277 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14278 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14279 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14280 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14281 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14282 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14283 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14284 Use function prototypes; this removes the need for declaring
14285 static functions simply to provide their prototypes.
14286 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14287 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14288 bitset_count_, bitset_create, bitset_dump, bitset_first,
14289 bitset_free, bitset_init, bitset_last, bitset_next,
14290 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14291 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14292 bitset_print, bitset_release_memory, bitset_toggle_,
14293 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14294 debug_bitset): Likewise.
14295 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14296 * lib/bitset_stats.c (bitset_log_histogram_print,
14297 bitset_percent_histogram_print, bitset_stats_and,
14298 bitset_stats_and_cmp, bitset_stats_and_or,
14299 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14300 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14301 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14302 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14303 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14304 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14305 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14306 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14307 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14308 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14309 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14310 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14311 bitset_stats_zero): Likewise.
14312 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14313 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14314 bitsetv_dump, debug_bitsetv): Likewise.
14315 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14316 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14317 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14318 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14319 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14320 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14321 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14322 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14323 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14324 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14325 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14326 Likewise.
14327 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14328 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14329 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14330 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14331 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14332 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14333 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14334 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14335 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14336 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14337 lbitset_xor_cmp, lbitset_zero): Likewise.
14338
14339 2002-10-14 Akim Demaille <akim@epita.fr>
14340
14341 Version 1.75.
14342
14343 2002-10-14 Akim Demaille <akim@epita.fr>
14344
14345 * tests/Makefile.am (maintainer-check-posix): New.
14346
14347 2002-10-14 Akim Demaille <akim@epita.fr>
14348
14349 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14350 member.
14351
14352 2002-10-14 Akim Demaille <akim@epita.fr>
14353
14354 * src/tables.c (table_ninf_remap): base -> tab.
14355 Reported by Matt Rosing.
14356
14357 2002-10-14 Paul Eggert <eggert@twinsun.com>
14358
14359 * tests/action.at, tests/calc.at, tests/conflicts.at,
14360 tests/cxx-type.at, tests/headers.at, tests/input.at,
14361 tests/regression.at, tests/synclines.at, tests/torture.at:
14362 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14363 so that the tests still work even if POSIXLY_CORRECT is set.
14364 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
14365
14366 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14367 for portability to K&R hosts. Fix typo: signed char is guaranteed
14368 only to 127, not to 128.
14369 * data/glr.c (yysigned_char): New type.
14370 * data/yacc.c (yysigned_char): Likewise.
14371 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14372
14373 2002-10-13 Paul Eggert <eggert@twinsun.com>
14374
14375 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14376 true due to limited range of data type" warning from GCC.
14377
14378 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14379 by wrapping enum yytokentype's definition inside #ifndef
14380 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14381
14382 2002-10-13 Akim Demaille <akim@epita.fr>
14383
14384 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14385 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14386
14387 2002-10-13 Akim Demaille <akim@epita.fr>
14388
14389 * Makefile.maint: Update from Autoconf 2.54.
14390 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14391
14392 2002-10-13 Akim Demaille <akim@epita.fr>
14393
14394 * src/print.c (print_state): Separate the list of solved conflicts
14395 from the other items.
14396 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14397
14398 2002-10-13 Akim Demaille <akim@epita.fr>
14399
14400 Let nondeterministic skeletons be usable with deterministic
14401 tables.
14402
14403 With the patch, GAWK compiled by GCC without -O2 passes its test
14404 suite using a GLR parser driven by LALR tables. It fails with -O2
14405 because `struct stat' gives two different answers on my machine:
14406 88 (definition of an auto var) and later 96 (memset on this var).
14407 Hence the stack is badly corrumpted. The headers inclusion is to
14408 blame: if I move the awk.h inclusion before GLR's system header
14409 inclusion, the two struct stat have the same size.
14410
14411 * src/tables.c (pack_table): Always create conflict_table.
14412 (token_actions): Always create conflict_list.
14413 * data/glr.c (YYFLAG): Remove, unused.
14414
14415 2002-10-13 Akim Demaille <akim@epita.fr>
14416
14417 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14418 (O0FLAGS): New.
14419 (VALGRIND, GXX): New.
14420 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14421 * tests/bison.in: Run $PREBISON a pre-command.
14422 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14423 (maintainer-check-g++): New.
14424 * Makefile.am (maintainer-check): New.
14425
14426 2002-10-13 Akim Demaille <akim@epita.fr>
14427
14428 * data/glr.c: Formatting changes.
14429 Tweak some trace messages to match yacc.c's.
14430
14431 2002-10-13 Akim Demaille <akim@epita.fr>
14432
14433 GLR parsers sometimes raise parse errors instead of performing the
14434 default reduction.
14435 Reported by Charles-Henry de Boysson.
14436
14437 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
14438 check the length of the traces when %glr.
14439 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14440 GLR's traces.
14441 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14442 Test GLR parsers.
14443 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14444 (yyltype): Remove the yy prefix from the member names.
14445 (yytable): Complete its comment.
14446 (yygetLRActions): Map error action number from YYTABLE from
14447 YYTABLE_NINF to 0.
14448 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14449 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14450 not satisfying as we could compare an YYACTION computed from
14451 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14452 only value for error actions.
14453 (yyreportParseError): In verbose parse error messages, don't issue
14454 `error' in the list of expected tokens.
14455 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14456 next action to perform to match glr.c's decoding.
14457 (yytable): Complete its comment.
14458
14459 2002-10-13 Paul Eggert <eggert@twinsun.com>
14460
14461 Fix problem reported by Henrik Grubbstroem in
14462 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
14463 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14464 because the Bison parser reads the second action before reducing
14465 the first one.
14466 * src/scan-gram.l (rule_length): New static var.
14467 Use it to keep track of the rule length in the scanner, since
14468 we can't expect the parser to be in lock-step sync with the scanner.
14469 (handle_action_dollar, handle_action_at): Use this var.
14470 * tests/actions.at (Exotic Dollars): Test for the problem.
14471
14472 2002-10-12 Paul Eggert <eggert@twinsun.com>
14473
14474 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14475 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14476 Include <sys/time.h> when checking for clock_t and struct tms.
14477 Use same include order as source.
14478 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
14479 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
14480
14481 * lib/timevar.c: Update copyright date and clarify comments.
14482 (get_time) [IN_GCC]: Keep the GCC version for reference.
14483
14484 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14485 GCC version as of today, then merge Bison's changes.
14486 Change "GCC" to "Bison" in copyright notice. timevar.def's
14487 author is Akim, so change that too.
14488
14489 * src/reader.c (grammar_current_rule_check):
14490 Don't worry about the default action if $$ is untyped.
14491 Prevents bogus warnings reported by Jim Gifford in
14492 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
14493
14494 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14495 * data/glr.c, data/lalr1.cc, data/yacc.c:
14496 Output token definitions before the first part of user declarations.
14497 Fixes compatibility problem reported by Jim Gifford for kbd in
14498 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14499
14500 2002-10-11 Paul Eggert <eggert@twinsun.com>
14501
14502 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14503 (yyparse): here. This undoes some of the 2002-07-25 change.
14504 Compatibility problem reported by Ralf S. Engelschall with
14505 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14506
14507 2002-10-11 Akim Demaille <akim@epita.fr>
14508
14509 * tests/regression.at Characters Escapes): New.
14510 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14511 characters.
14512 Reported by Jan Nieuwenhuizen.
14513
14514 2002-10-11 Akim Demaille <akim@epita.fr>
14515
14516 * po/id.po: New.
14517
14518 2002-10-10 Paul Eggert <eggert@twinsun.com>
14519
14520 Portability fixes for bitsets; this also avoids several GCC
14521 warnings.
14522
14523 * lib/abitset.c: Include <stddef.h>, for offsetof.
14524 * lib/lbitset.c: Likewise.
14525
14526 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14527 properly for vectors of objects. Do not assume that adding a
14528 header size to a multiple of a word size yields a value that is
14529 properly aligned for the whole union.
14530 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14531
14532 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14533 unique names for structures.
14534 * lib/ebitset.c (ebitset_bytes): Likewise.
14535 * lib/lbitset.c (lbitset_bytes): Likewise.
14536
14537 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14538 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14539 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14540 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14541 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14542 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14543 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14544 to improve the type-checking that GCC can do.
14545 * lib/bitset.c (bitset_op4_cmp): Likewise.
14546 * lib/bitset_stats.c (bitset_stats_count,
14547 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14548 bitset_stats_copy, bitset_stats_disjoint_p,
14549 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14550 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14551 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14552 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14553 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14554 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14555 bitset_stats_or_and_cmp): Likewise.
14556 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14557 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14558 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14559 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14560
14561 * lib/abitset.h: Include bitset.h, not bbitset.h.
14562 * lib/ebitset.h: Likewise.
14563 * lib/lbitset.h: Likewise.
14564
14565 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14566 All instances of parameters of type enum bitset_opts are now of
14567 type enum_bitset_opts, to conform to the C Standard, and similarly
14568 for enum_bitset_type.
14569 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14570 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14571
14572 Do not use "struct bitset_struct" to mean different things in
14573 different modules. Not only is this confusing, it violates
14574 the C Standard, which requires that structure types in different
14575 modules must be compatible if one is to be passed to the other.
14576 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14577 All instances of "struct bitset_struct *" replaced with "bitset".
14578 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14579 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14580 struct lbitset_struct, struct bitset_stats_struct): New types.
14581 All uses of struct bitset_struct changed to union bitset_union,
14582 etc.
14583 * lib/abitset.c (struct abitset_struct, abitset,
14584 struct bitset_struct): Remove.
14585 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14586 struct bitset_struct): Remove.
14587 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14588 bitset_struct): Remove.
14589 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14590 Likewise.
14591
14592 Do not call a function of type T using a call that assumes the
14593 function is of a different type U. Standard C requires that a
14594 function must be called with a type that is compatible with its
14595 definition.
14596 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14597 New decls.
14598 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14599 New functions.
14600 * lib/ebitset.c (PFV): Remove.
14601 * lib/lbitset.c (PFV): Likewise.
14602 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14603 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14604 decls.
14605 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14606 (ebitset_vtable): Use them.
14607 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14608 lbitset_xor): New functions.
14609 (lbitset_vtable): Use them.
14610
14611 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14612 Declare.
14613
14614 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14615 GCC warning.
14616 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14617 Use offsetof, for simplicity.
14618
14619 2002-10-06 Paul Eggert <eggert@twinsun.com>
14620
14621 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14622 the same width as int. This reapplies a hunk of the 2002-08-12 patch
14623 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
14624 which was inadvertently undone by the 2002-09-30 patch.
14625 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14626 the same width as int.
14627
14628 2002-10-04 Paul Eggert <eggert@twinsun.com>
14629
14630 Version 1.50.
14631
14632 * configure.ac (AC_INIT), NEWS: Increment version number.
14633
14634 * doc/bison.texinfo: Minor spelling, grammar, and white space
14635 fixes.
14636 (Symbols): Mention that any negative value returned from yylex
14637 signifies end-of-input. Warn about negative chars. Mention
14638 the portable Standard C character set.
14639
14640 The GNU coding standard says CFLAGS and YFLAGS are reserved
14641 for the installer to set.
14642 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14643 * src/Makefile.am (AM_CFLAGS): Likewise.
14644 (AM_YFLAGS): Renamed from YFLAGS.
14645
14646 Fix some MAX and MIN problems.
14647 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14648 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14649 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14650 * src/reader.c (reader): Use it.
14651
14652 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14653 POSIX 1003.1-2001 has removed fgrep.
14654
14655 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14656
14657 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14658 interpreted as signed.
14659 * lib/ebitset.c (ebitset_list): Fix bug.
14660
14661 2002-10-01 Paul Eggert <eggert@twinsun.com>
14662
14663 More fixes for 64-bit hosts and large bitsets.
14664
14665 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14666 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14667 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14668 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14669 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14670 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14671 bitset_count_): Likewise.
14672 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14673 bitset_first, bitset_last): Likewise.
14674 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14675 bitset_stats_list_reverse, bitset_stats_size,
14676 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14677 Likewise.
14678 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14679 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14680 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14681 bitsetv_reflexive_transitive_closure): Likewise.
14682 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14683 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14684 Likewise.
14685 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14686 Likewise.
14687
14688 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14689 Use size_t, not unsigned int, to count bytes.
14690 * lib/abitset.h (abitset_bytes): Likewise.
14691 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14692 Likewise.
14693 * lib/bitset.h (bitset_bytes): Likewise.
14694 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14695 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14696 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14697 * lib/ebitset.c (ebitset_bytes): Likewise.
14698 * lib/ebitset.h (ebitset_bytes): Likewise.
14699 * lib/lbitset.c (lbitset_bytes): Likewise.
14700 * lib/lbitset.h (lbitset_bytes): Likewise.
14701
14702 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14703 abitset_subset_p, abitset_disjoint_p, abitset_and,
14704 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14705 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14706 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14707 abitset_or_and, abitset_or_and_cmp):
14708 Use bitset_windex instead of unsigned int.
14709 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14710 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14711 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14712 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
14713 Likewise.
14714 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
14715
14716 * lib/bitset.c (bitset_print):
14717 Use proper printf formats for widths of integer types.
14718 * lib/bitset_stats.c (bitset_percent_histogram_print,
14719 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
14720 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14721 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14722 * lib/lbitset.c (lbitset_bytes): Likewise.
14723
14724 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
14725 BITSET_SIZE_MAX): New macros.
14726 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
14727 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
14728 to BITSET_WINDEX_MAX.
14729
14730 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
14731 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
14732 since we now return the bitset_bindex type (not int).
14733
14734 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
14735 when computing sizes.
14736 * lib/ebitset.c (ebitset_elts_grow): Likewise.
14737
14738 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
14739 and avoid cast to unsigned.
14740
14741 2002-09-30 Akim Demaille <akim@epita.fr>
14742
14743 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14744 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
14745 Updates from Michael Hayes.
14746
14747 2002-09-30 Art Haas <ahaas@neosoft.com>
14748
14749 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
14750 invocations.
14751 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
14752 defined.
14753
14754 2002-09-27 Akim Demaille <akim@epita.fr>
14755
14756 Version 1.49c.
14757
14758 2002-09-27 Akim Demaille <akim@epita.fr>
14759
14760 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
14761 (Because of AC_LIBSOURCE).
14762
14763 2002-09-27 Akim Demaille <akim@epita.fr>
14764
14765 Playing with Autoscan.
14766
14767 * configure.ac: Remove the old LIBOBJ tweaks.
14768 (AC_REPLACE_FUNCS): Add strrchr and strtol.
14769 * lib/strrchr.c: New.
14770 * lib/strtol.c: New, from the Coreutils 4.5.1.
14771
14772 2002-09-27 Akim Demaille <akim@epita.fr>
14773
14774 Playing with Autoscan.
14775
14776 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
14777 * lib/Makefile.am (libbison_a_SOURCES): No longer include
14778 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
14779 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
14780 Coreutils 4.5.1.
14781
14782 2002-09-24 Akim Demaille <akim@epita.fr>
14783
14784 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
14785 (Frequently Asked Questions, Parser Stack Overflow): New.
14786
14787 2002-09-13 Akim Demaille <akim@epita.fr>
14788
14789 Playing with autoscan.
14790
14791 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
14792 * src/files.c (skeleton_find): Remove, unused.
14793 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
14794 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
14795
14796 2002-09-13 Akim Demaille <akim@epita.fr>
14797
14798 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
14799 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
14800
14801 2002-09-13 Akim Demaille <akim@epita.fr>
14802
14803 * configure.ac: Require 2.54.
14804 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
14805 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
14806 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
14807 Remove, provided by Autoconf macros.
14808
14809 2002-09-12 Akim Demaille <akim@epita.fr>
14810
14811 * m4/prereq.m4: Update, from Coreutils 4.5.1.
14812
14813 2002-09-12 Akim Demaille <akim@epita.fr>
14814
14815 * m4/prereq.m4: Update, from Fileutils 4.1.5.
14816 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
14817 Reported by Martin Mokrejs.
14818
14819 2002-09-10 Akim Demaille <akim@epita.fr>
14820
14821 * src/parse-gram.y: Associate a human readable string to each
14822 token type.
14823 * tests/regression.at (Invalid inputs): Adjust.
14824
14825 2002-09-10 Gary V. Vaughan <gary@gnu.org>
14826
14827 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
14828 with an Autoconf-2.5x style configure.ac.
14829
14830 2002-09-06 Paul Eggert <eggert@twinsun.com>
14831
14832 * doc/bison.texinfo (Conditions): Make explicit that the GPL
14833 exception applies only to yacc.c. This is a modification of a
14834 patch originally suggested by Akim Demaille.
14835
14836 2002-09-06 Akim Demaille <akim@epita.fr>
14837
14838 * data/c.m4 (b4_copyright): Move the GPL exception comment from
14839 here to...
14840 * data/yacc.c: here.
14841
14842 * data/lalr1.cc (struct yyltype): Don't define it, since we use
14843 LocationType.
14844 (b4_ltype): Default to yy::Location from location.hh.
14845
14846 2002-09-04 Jim Meyering <jim@meyering.net>
14847
14848 * data/yacc.c: Guard the declaration of yytoknum also with
14849 `#ifdef YYPRINT', so it is declared only when used.
14850
14851 2002-09-04 Akim Demaille <akim@epita.fr>
14852
14853 * configure.in: Rename as...
14854 * configure.ac: this.
14855 Bump to 1.49c.
14856
14857 2002-09-04 Akim Demaille <akim@epita.fr>
14858
14859 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
14860 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
14861 translate maintainer only messages.
14862
14863 2002-08-12 Paul Eggert <eggert@twinsun.com>
14864
14865 Version 1.49b.
14866
14867 * Makefile.am (SUBDIRS): Remove intl.
14868 (DISTCLEANFILES): Remove.
14869 * NEWS: Mention that GNU M4 is now required. Clarify what is
14870 meant by "larger grammars". Mention the pt_BR translation.
14871 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
14872 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
14873 Bump version from 0.11.2 to 0.11.5.
14874 (BISON_PREREQ_STAGE): Remove.
14875 (AM_GNU_GETTEXT): Use external gettext.
14876 (AC_OUTPUT): Remove intl/Makefile.
14877
14878 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
14879
14880 * data/glr.c: Include string.h, for strlen.
14881 (yyreportParseError): Use size_t for yysize.
14882 (yy_yypstack): No longer nested inside yypstates, as nested
14883 functions are not portable. Do not assume size_t is the
14884 same width as int.
14885 (yypstates): Do not assume that ptrdiff_t is the same width
14886 as int, and similarly for yyposn and YYINDEX.
14887
14888 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
14889
14890 * lib/Makefile.am (INCLUDES): Do not include from the intl
14891 directory, which has been removed.
14892 * src/Makefile.am (INCLUDES): Likewise.
14893
14894 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
14895 (bitsets_sources, additional_bitsets_sources, timevars_sources):
14896 New vars.
14897
14898 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
14899 * tests/Makefile.am (EXTRA_DIST): Likewise.
14900
14901 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
14902 Do not assume that bitset_windex is the same width as unsigned.
14903
14904 * lib/abitset.c (abitset_unused_clear): Do not assume that
14905 bitset_word is the same width as int.
14906 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
14907 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
14908 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
14909 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
14910 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
14911
14912 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
14913 portability to one's complement hosts!).
14914 * lib/ebitset.c (ebitset_op1): Likewise.
14915 * lib/lbitset.c (lbitset_op1): Likewise.
14916
14917 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
14918 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14919 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
14920 Sync with fileutils.
14921 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
14922 lib/gettext.h: Sync with diffutils.
14923
14924 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
14925 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
14926
14927 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
14928 PROTOTYPES to check for prototypes, and "defined __STDC__" to
14929 check for void *.
14930
14931 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
14932 size_t; the old version tried to do this but casted improperly.
14933 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
14934 (bitset_test): Now returns int, not unsigned long.
14935
14936 * lib/bitset_stats.c: Include "gettext.h".
14937 (_): New macro.
14938 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
14939 name locals "index", as it generates unnecessary warnings on some
14940 hosts that have an "index" function.
14941
14942 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
14943 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
14944 they need translation.
14945 * src/LR0.c (state_list_append, new_itemsets, get_state,
14946 append_states, generate_states): Likewise.
14947 * src/assoc.c (assoc_to_string): Likewise.
14948 * src/closure.c (print_closure, set_firsts, closure): Likewise.
14949 * src/gram.c (grammar_dump): Likewise.
14950 * src/injections.c (injections_compute): Likewise.
14951 * src/lalr.c (lookaheads_print): Likewise.
14952 * src/relation.c (relation_transpose): Likewise.
14953 * src/scan-gram.l: Likewise.
14954 * src/tables.c (table_grow, pack_vector): Likewise.
14955
14956 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
14957 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
14958 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
14959 * m4/mbstate_t.m4: Sync with fileutils.
14960 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
14961
14962 * po/LINGUAS: Add pt_BR.
14963 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
14964 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
14965 lib/timevar.c.
14966 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
14967 manual recommends.
14968 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
14969
14970 * src/complain.c (strerror_r): Remove decl; not needed.
14971 (strerror): Use same pattern as ../lib/error.c.
14972
14973 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
14974
14975 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
14976
14977 * src/main.c (main): Cast result of bindtextdomain and textdomain
14978 to void, to avoid a GCC warning when --disable-nls is in effect.
14979
14980 * src/scan-gram.l: Use strings rather than escapes when possible,
14981 to minimize the number of warnings from xgettext.
14982 (handle_action_dollar, handle_action_at): Don't use isdigit,
14983 as it mishandles negative chars and it may not work as expected
14984 outside the C locale.
14985
14986 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
14987 this is a GCC extension and is not portable to other compilers.
14988
14989 * src/system.h (alloca): Use same pattern as ../lib/error.c.
14990 Do not include <ctype.h>; no longer needed.
14991 Do not include <malloc.h>; no longer needed (and generates
14992 warnings on OpenBSD 3.0).
14993
14994 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
14995 it's not portable.
14996
14997 * tests/regression.at: Do not use 'cc -c input.c -o input';
14998 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
14999
15000 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15001 exit status as failure, not just exit status 1. Sun C exits
15002 with status 2 sometimes.
15003
15004 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15005 Use it for the two large tests.
15006
15007 2002-08-02 Akim Demaille <akim@epita.fr>
15008
15009 * src/conflicts.c (conflicts_output): Don't output rules never
15010 reduced here, since anyway that computation doesn't work.
15011 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15012 (rule_useless_p, rule_never_reduced_p): New.
15013 (grammar_rules_partial_print): Use a filter instead of a range.
15014 Display the title only if needed.
15015 (grammar_rules_print): Adjust.
15016 (grammar_rules_never_reduced_report): New.
15017 * src/tables.c (action_row): Move the computation of rules never
15018 reduced to...
15019 (token_actions): here.
15020 * src/main.c (main): Make the parser before making the report, so
15021 that rules never reduced are computed.
15022 Call grammar_rules_never_reduced_report.
15023 * src/print.c (print_results): Report rules never reduced.
15024 * tests/conflicts.at, tests/reduce.at: Adjust.
15025
15026 2002-08-01 Akim Demaille <akim@epita.fr>
15027
15028 Instead of attaching lookaheads and duplicating the rules being
15029 reduced by a state, attach the lookaheads to the reductions.
15030
15031 * src/state.h (state_t): Remove the `lookaheads',
15032 `lookaheads_rule' member.
15033 (reductions_t): Add a `lookaheads' member.
15034 Use a regular array for the `rules'.
15035 * src/state.c (reductions_new): Initialize the lookaheads member
15036 to 0.
15037 (state_rule_lookaheads_print): Adjust.
15038 * src/state.h, src/state.c (state_reductions_find): New.
15039 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15040 (count_rr_conflicts): Adjust.
15041 * src/lalr.c (LArule): Remove.
15042 (add_lookback_edge): Adjust.
15043 (state_lookaheads_count): New.
15044 (states_lookaheads_initialize): Merge into...
15045 (initialize_LA): this.
15046 (lalr_free): Adjust.
15047 * src/main.c (main): Don't free nullable and derives too early: it
15048 is used by --verbose.
15049 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15050
15051 2002-08-01 Akim Demaille <akim@epita.fr>
15052
15053 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15054 `rule_number_t**'.
15055 (set_derives, free_derives): Rename as...
15056 (derives_compute, derives_free): this.
15057 Adjust all dependencies.
15058 * src/nullable.c (set_nullable, free_nullable): Rename as...
15059 (nullable_compute, nullable_free): these.
15060 (rule_list_t): Store rule_t *, not rule_number_t.
15061 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15062 pointers, instead of their numbers.
15063 * src/main.c (main): Call nullable_free, and derives_free earlier,
15064 as they were lo longer used.
15065
15066 2002-08-01 Akim Demaille <akim@epita.fr>
15067
15068 * lib/timevar.c (get_time): Include children time.
15069 * src/lalr.h (LA, LArule): Don't export them: used with the
15070 state_t.
15071 * src/lalr.c (LA, LArule): Static.
15072 * src/lalr.h, src/lalr.c (lalr_free): New.
15073 * src/main.c (main): Call it.
15074 * src/tables.c (pack_vector): Check whether loc is >= to the
15075 table_size, not >.
15076 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15077 (tables_generate): do it, since that's also it which allocates
15078 them.
15079 Don't free LA and LArule, main does.
15080
15081 2002-07-31 Akim Demaille <akim@epita.fr>
15082
15083 Separate parser tables computation and output.
15084
15085 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15086 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15087 (yydefgoto, yydefact, high): Move to...
15088 * src/tables.h, src/tables.c: here.
15089 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15090 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15091 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15092 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15093 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15094 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15095 (action_row, save_row, token_actions, save_column, default_goto)
15096 (goto_actions, sort_actions, matching_state, pack_vector)
15097 (table_ninf_remap, pack_table, prepare_actions): Move to...
15098 * src/tables.c: here.
15099 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15100 * src/output.c (token_actions, output_base, output_conflicts)
15101 (output_check): Merge into...
15102 (prepare_actions): this.
15103 (actions_output): Rename as...
15104 (user_actions_output): this.
15105 * src/main.c (main): Call tables_generate and tables_free.
15106
15107 2002-07-31 Akim Demaille <akim@epita.fr>
15108
15109 Steal GCC's --time-report support.
15110
15111 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15112 stolen/adjusted from GCC.
15113 * m4/stage.m4: Remove time related checks.
15114 * m4/timevar.m4: New.
15115 * configure.in: Adjust.
15116 * src/system.h: Adjust to using timevar.h.
15117 * src/getargs.h, src/getargs.c: Support trace_time for
15118 --trace=time.
15119 * src/main.c (stage): Remove.
15120 (main): Replace `stage' invocations with timevar calls.
15121 * src/output.c: Insert pertinent timevar calls.
15122
15123 2002-07-31 Akim Demaille <akim@epita.fr>
15124
15125 Let --trace have arguments.
15126
15127 * src/getargs.h (enum trace_e): New.
15128 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15129 (long_options, short_options): --trace/-T takes an optional
15130 argument.
15131 Change all the uses of trace_flag to reflect the new flags.
15132 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15133
15134 Strengthen `stage' portability.
15135
15136 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15137 * configure.in: Use it.
15138 Don't check for malloc.h and sys/times.h.
15139 * src/system.h: Include them when appropriate.
15140 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15141 times and struct tms are available.
15142
15143 2002-07-30 Akim Demaille <akim@epita.fr>
15144
15145 In verbose parse error message, don't report `error' as an
15146 expected token.
15147 * tests/actions.at (Printers and Destructors): Adjust.
15148 * tests/calc.at (Calculator $1): Adjust.
15149 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15150 error message, do not report the parser accepts the error token in
15151 that state.
15152
15153 2002-07-30 Akim Demaille <akim@epita.fr>
15154
15155 Normalize conflict related messages.
15156
15157 * src/complain.h, src/complain.c (warn, complain): New.
15158 * src/conflicts.c (conflicts_print): Use them.
15159 (conflict_report_yacc): New, extracted from...
15160 (conflicts_print): here.
15161 * tests/conflicts.at, tests/existing.at: Adjust.
15162
15163 2002-07-30 Akim Demaille <akim@epita.fr>
15164
15165 Report rules which are never reduced by the parser: those hidden
15166 by conflicts.
15167
15168 * src/LR0.c (save_reductions): Don't make the final state too
15169 different: save its reduction (accept) instead of having a state
15170 without any action (no shift or goto, no reduce).
15171 Note: the final state is now a ``regular'' state, i.e., the
15172 parsers now contain `reduce 0' as default reduction.
15173 Nevertheless, since they decide to `accept' when yystate =
15174 final_state, they still will not reduce rule 0.
15175 * src/print.c (print_actions, print_reduction): Adjust.
15176 * src/output.c (action_row): Track reduced rules.
15177 (token_actions): Report rules never reduced.
15178 * tests/conflicts.at, tests/regression.at: Adjust.
15179
15180 2002-07-30 Akim Demaille <akim@epita.fr>
15181
15182 `stage' was accidently included in a previous patch.
15183 Initiate its autoconfiscation.
15184
15185 * configure.in: Look for malloc.h and sys/times.h.
15186 * src/main.c (stage): Adjust.
15187 Report only when trace_flag.
15188
15189 2002-07-29 Akim Demaille <akim@epita.fr>
15190
15191 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15192 state_number_t.
15193 (errs_t): symbol_t*, not symbol_number_t.
15194 (reductions_t): rule_t*, not rule_number_t.
15195 (FOR_EACH_SHIFT): New.
15196 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15197 * src/print.c, src/print_graph.c: Adjust.
15198
15199 2002-07-29 Akim Demaille <akim@epita.fr>
15200
15201 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15202
15203 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15204 (endtoken, accept): these.
15205 * src/reader.c (reader): Set endtoken's default tag to "$end".
15206 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15207 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15208 Adjust.
15209
15210 2002-07-29 Akim Demaille <akim@epita.fr>
15211
15212 * src/reduce.c (reduce_grammar): When the language is empty,
15213 complain about the start symbol, not the axiom.
15214 Use its location.
15215 * tests/reduce.at (Empty Language): New.
15216
15217 2002-07-26 Akim Demaille <akim@epita.fr>
15218
15219 * src/reader.h, src/reader.c (gram_error): ... can't get
15220 yycontrol without making too strong assumptions on the parser
15221 itself.
15222 * src/output.c (prepare_tokens): Use the real 0th value of
15223 token_translations instead of `0'.
15224 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15225 visible here.
15226 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15227 for the time being: %locations ought to provide it to yyerror.
15228
15229 2002-07-25 Akim Demaille <akim@epita.fr>
15230
15231 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15232 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15233 * tests/regression.at (Web2c Actions): Adjust.
15234
15235 2002-07-25 Akim Demaille <akim@epita.fr>
15236
15237 Stop storing rules from 1 to nrules + 1.
15238
15239 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15240 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15241 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15242 Iterate from 0 to nrules.
15243 Use rule_number_as_item_number and item_number_as_rule_number.
15244 Adjust to `derive' now containing possibly 0.
15245 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15246 Handle the `- 1' part in rule numbers from/to item numbers.
15247 * src/conflicts.c (log_resolution): Fix the message which reversed
15248 shift and reduce.
15249 * src/output.c (action_row): Initialize default_rule to -1.
15250 (token_actions): Adjust.
15251 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15252 expected output.
15253 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15254
15255 2002-07-25 Akim Demaille <akim@epita.fr>
15256
15257 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15258 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15259 (b4_c_knr_arg_decl): New.
15260 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15261 yyreport_parse_error.
15262
15263 2002-07-25 Akim Demaille <akim@epita.fr>
15264
15265 * data/yacc.c (yyreport_parse_error): New, extracted from...
15266 (yyparse): here.
15267 (yydestruct, yysymprint): Move above yyparse.
15268 Be K&R compliant.
15269
15270 2002-07-25 Akim Demaille <akim@epita.fr>
15271
15272 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15273 replace...
15274 (b4_sint_type, b4_uint_type): these.
15275 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15276 * tests/regression.at (Web2c Actions): Adjust.
15277
15278 2002-07-25 Akim Demaille <akim@epita.fr>
15279
15280 * src/gram.h (TIEM_NUMBER_MAX): New.
15281 (item_number_of_rule_number, rule_number_of_item_number): Rename
15282 as...
15283 (rule_number_as_item_number, item_number_as_rule_number): these.
15284 Adjust dependencies.
15285 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15286 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15287 (symbol_number_to_vector_number): New.
15288 (order): Of vector_number_t* type.
15289 (base_t, BASE_MAX, BASE_MIN): New.
15290 (froms, tos, width, pos, check): Of base_t type.
15291 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15292 (actrow): Of action_number_t type.
15293 (conflrow): Of unsigned int type.
15294 (table_ninf, base_ninf): New.
15295 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15296 (muscle_insert_int_table, muscle_insert_base_table)
15297 (muscle_insert_rule_number_table): New.
15298 (prepare_tokens): Output `toknum' as int_table.
15299 (action_row): Returns a rule_number_t.
15300 Use ACTION_MIN, not SHRT_MIN.
15301 (token_actions): yydefact is rule_number_t*.
15302 (table_ninf_remap): New.
15303 (pack_table): Use it for `base' and `table'.
15304 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15305 replaced with...
15306 (YYPACT_NINF, YYTABLE_NINF): these.
15307 (yypact, yytable): Compute their types instead of hard-coded
15308 `short'.
15309 * tests/regression.at (Web2c Actions): Adjust.
15310
15311 2002-07-19 Akim Demaille <akim@epita.fr>
15312
15313 * src/scan-gram.l (id): Can start with an underscore.
15314
15315 2002-07-16 Akim Demaille <akim@epita.fr>
15316
15317 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15318 Adjust all former `associativity' dependencies.
15319 * src/symtab.c (symbol_new): Default associativity is `undef', not
15320 `right'.
15321 (symbol_check_alias_consistence): Adjust.
15322
15323 2002-07-09 Akim Demaille <akim@epita.fr>
15324
15325 * doc/bison.texinfo: Properly set the ``header'' part.
15326 Use @dircategory ``GNU programming tools'' as per Texinfo's
15327 documentation.
15328 Use @copying.
15329
15330 2002-07-09 Akim Demaille <akim@epita.fr>
15331
15332 * lib/quotearg.h: Protect against multiple inclusions.
15333 * src/location.h (location_t): Add a `file' member.
15334 (LOCATION_RESET, LOCATION_PRINT): Adjust.
15335 * src/complain.c (warn_at, complain_at, fatal_at): Drop
15336 `error_one_per_line' support.
15337
15338 2002-07-09 Akim Demaille <akim@epita.fr>
15339
15340 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15341 * src/reader.c (lineno): Remove.
15342 Adjust all dependencies.
15343 (get_merge_function): Take a location and use complain_at.
15344 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15345 * tests/regression.at (Invalid inputs, Mixing %token styles):
15346 Adjust.
15347
15348 2002-07-09 Akim Demaille <akim@epita.fr>
15349
15350 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15351 recovery rule, and forbid extensions when --yacc.
15352 (gram_error): Use complain_at.
15353 * src/reader.c (reader): Exit if there were parse errors.
15354
15355 2002-07-09 Akim Demaille <akim@epita.fr>
15356
15357 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15358 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15359 Reported by R Blake <blakers@mac.com>.
15360
15361 2002-07-09 Akim Demaille <akim@epita.fr>
15362
15363 * data/yacc.c: Output the copyright notive in the header.
15364
15365 2002-07-03 Akim Demaille <akim@epita.fr>
15366
15367 * src/output.c (froms, tos): Are state_number_t.
15368 (save_column): sp, sp1, and sp2 are state_number_t.
15369 (prepare): Rename `final' as `final_state_number', `nnts' as
15370 `nterms_number', `nrules' as `rules_number', `nstates' as
15371 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15372 unused.
15373 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15374 * data/lalr1.cc (nsym_): Remove, unused.
15375
15376 2002-07-03 Akim Demaille <akim@epita.fr>
15377
15378 * src/lalr.h, src/lalr.c (goto_number_t): New.
15379 * src/lalr.c (goto_list_t): New.
15380 Propagate them.
15381 * src/nullable.c (rule_list_t): New.
15382 Propagate.
15383 * src/types.h: Remove.
15384
15385 2002-07-03 Akim Demaille <akim@epita.fr>
15386
15387 * src/closure.c (print_fderives): Use rule_rhs_print.
15388 * src/derives.c (print_derives): Use rule_rhs_print.
15389 (rule_list_t): New, replaces `shorts'.
15390 (set_derives): Add comments.
15391 * tests/sets.at (Nullable, Firsts): Adjust.
15392
15393 2002-07-03 Akim Demaille <akim@epita.fr>
15394
15395 * src/output.c (prepare_actions): Free `tally' and `width'.
15396 (prepare_actions): Allocate and free `order'.
15397 * src/symtab.c (symbols_free): Free `symbols'.
15398 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15399 * src/output.c (m4_invoke): Move to...
15400 * src/scan-skel.l: here.
15401 (<<EOF>>): Close yyout, and free its name.
15402
15403 2002-07-03 Akim Demaille <akim@epita.fr>
15404
15405 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15406
15407 * src/LR0.c (new_state): Merge into...
15408 (state_list_append): this.
15409 (new_states): Merge into...
15410 (generate_states): here.
15411 (set_states): Don't ensure a proper `errs' state member here, do it...
15412 * src/conflicts.c (conflicts_solve): here.
15413 * src/state.h, src/state.c: Comment changes.
15414 (state_t): Rename member `shifts' as `transitions'.
15415 Adjust all dependencies.
15416 (errs_new): For consistency, also take the values as argument.
15417 (errs_dup): Remove.
15418 (state_errs_set): New.
15419 (state_reductions_set, state_transitions_set): Assert that no
15420 previous value was assigned.
15421 (state_free): New.
15422 (states_free): Use it.
15423 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15424 temporary storage: use `errs' and `nerrs' as elsewhere.
15425 (set_conflicts): Allocate and free this `errs'.
15426
15427 2002-07-02 Akim Demaille <akim@epita.fr>
15428
15429 * lib/libiberty.h: New.
15430 * lib: Update the bitset implementation from upstream.
15431 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15432 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15433 * src/main.c: Adjust bitset stats calls.
15434
15435 2002-07-01 Paul Eggert <eggert@twinsun.com>
15436
15437 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15438 char, so that negative chars don't collide with $.
15439
15440 2002-06-30 Akim Demaille <akim@epita.fr>
15441
15442 Have the GLR tests be `warning' checked, and fix the warnings.
15443
15444 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15445 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15446 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15447 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15448 (yyaddDeferredAction): static.
15449 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15450 (yyreportParseError): yyprefix is const.
15451 yytokenp is used only when verbose.
15452 (yy__GNUC__): Replace with __GNUC__.
15453 (yypdumpstack): yyi is size_t.
15454 (yypreference): Un-yy local variables and arguments, to avoid
15455 clashes with `yyr1'. Anyway, we are not in the user name space.
15456 (yytname_size): be an int, as is compared with ints.
15457 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15458 Use them.
15459 * tests/cxx-gram.at: Use quotation to protect $1.
15460 Use AT_COMPILE to enable warnings hunts.
15461 Prototype yylex and yyerror.
15462 `Use' argc.
15463 Include `string.h', not `strings.h'.
15464 Produce and prototype stmtMerge only when used.
15465 yylex takes a location.
15466
15467 2002-06-30 Akim Demaille <akim@epita.fr>
15468
15469 We spend a lot of time in quotearg, in particular when --verbose.
15470
15471 * src/symtab.c (symbol_get): Store a quoted version of the key.
15472 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15473 Adjust all callers.
15474
15475 2002-06-30 Akim Demaille <akim@epita.fr>
15476
15477 * src/state.h (reductions_t): Rename member `nreds' as num.
15478 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15479 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15480
15481 2002-06-30 Akim Demaille <akim@epita.fr>
15482
15483 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15484 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15485 (shifts_to): Rename as...
15486 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15487 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15488 (TRANSITION_IS_DISABLED, transitions_to): these.
15489
15490 2002-06-30 Akim Demaille <akim@epita.fr>
15491
15492 * src/print.c (print_shifts, print_gotos): Merge into...
15493 (print_transitions): this.
15494 (print_transitions, print_errs, print_reductions): Align the
15495 lookaheads columns.
15496 (print_core, print_transitions, print_errs, print_state,
15497 print_grammar): Output empty lines separator before, not after.
15498 (state_default_rule_compute): Rename as...
15499 (state_default_rule): this.
15500 * tests/conflicts.at (Defaulted Conflicted Reduction),
15501 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15502 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15503
15504 2002-06-30 Akim Demaille <akim@epita.fr>
15505
15506 Display items as we display rules.
15507
15508 * src/gram.h, src/gram.c (rule_lhs_print): New.
15509 * src/gram.c (grammar_rules_partial_print): Use it.
15510 * src/print.c (print_core): Likewise.
15511 * tests/conflicts.at (Defaulted Conflicted Reduction),
15512 (Unresolved SR Conflicts): Adjust.
15513 (Unresolved SR Conflicts): Adjust and rename as...
15514 (Resolved SR Conflicts): this, as was meant.
15515 * tests/regression.at (Web2c Report): Adjust.
15516
15517 2002-06-30 Akim Demaille <akim@epita.fr>
15518
15519 * src/print.c (state_default_rule_compute): New, extracted from...
15520 (print_reductions): here.
15521 Pessimize, but clarify the code.
15522 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15523
15524 2002-06-30 Akim Demaille <akim@epita.fr>
15525
15526 * src/output.c (action_row): Let default_rule be always a rule
15527 number.
15528
15529 2002-06-30 Akim Demaille <akim@epita.fr>
15530
15531 * src/closure.c (print_firsts, print_fderives, closure):
15532 Use BITSET_EXECUTE.
15533 * src/lalr.c (lookaheads_print): Likewise.
15534 * src/state.c (state_rule_lookaheads_print): Likewise.
15535 * src/print_graph.c (print_core): Likewise.
15536 * src/print.c (print_reductions): Likewise.
15537 * src/output.c (action_row): Likewise.
15538 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15539
15540 2002-06-30 Akim Demaille <akim@epita.fr>
15541
15542 * src/print_graph.c: Use report_flag.
15543
15544 2002-06-30 Akim Demaille <akim@epita.fr>
15545
15546 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15547 to...
15548 * src/relation.h, src/relation.c (traverse, relation_digraph)
15549 (relation_print, relation_transpose): New.
15550
15551 2002-06-30 Akim Demaille <akim@epita.fr>
15552
15553 * src/state.h, src/state.c (shifts_to): New.
15554 * src/lalr.c (build_relations): Use it.
15555
15556 2002-06-30 Akim Demaille <akim@epita.fr>
15557
15558 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15559 (item_number_of_rule_number, rule_number_of_item_number): New.
15560 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15561 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15562 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15563 Propagate their use.
15564 Much remains to be done, in particular wrt `shorts' from types.h.
15565
15566 2002-06-30 Akim Demaille <akim@epita.fr>
15567
15568 * src/symtab.c (symbol_new): Initialize the `printer' member.
15569
15570 2002-06-30 Akim Demaille <akim@epita.fr>
15571
15572 * src/LR0.c (save_reductions): Remove, replaced by...
15573 * src/state.h, src/state.c (state_reductions_set): New.
15574 (reductions, errs): Rename as...
15575 (reductions_t, errs_t): these.
15576 Adjust all dependencies.
15577
15578 2002-06-30 Akim Demaille <akim@epita.fr>
15579
15580 * src/LR0.c (state_list_t, state_list_append): New.
15581 (first_state, last_state): Now symbol_list_t.
15582 (this_state): Remove.
15583 (new_itemsets, append_states, save_reductions): Take a state_t as
15584 argument.
15585 (set_states, generate_states): Adjust.
15586 (save_shifts): Remove, replaced by...
15587 * src/state.h, src/state.c (state_shifts_set): New.
15588 (shifts): Rename as...
15589 (shifts_t): this.
15590 Adjust all dependencies.
15591 * src/state.h (state_t): Remove the `next' member.
15592
15593 2002-06-30 Akim Demaille <akim@epita.fr>
15594
15595 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15596 escaped in slot 0.
15597
15598 2002-06-30 Akim Demaille <akim@epita.fr>
15599
15600 Use hash.h for the state hash table.
15601
15602 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15603 (allocate_storage): Use state_hash_new.
15604 (free_storage): Use state_hash_free.
15605 (new_state, get_state): Adjust.
15606 * src/lalr.h, src/lalr.c (states): Move to...
15607 * src/states.h (state_t): Remove the `link' member, no longer
15608 used.
15609 * src/states.h, src/states.c: here.
15610 (state_hash_new, state_hash_free, state_hash_lookup)
15611 (state_hash_insert, states_free): New.
15612 * src/states.c (state_table, state_compare, state_hash): New.
15613 * src/output.c (output_actions): Do not free states now, since we
15614 still need to know the final_state number in `prepare', called
15615 afterwards. Do it...
15616 * src/main.c (main): here: call states_free after `output'.
15617
15618 2002-06-30 Akim Demaille <akim@epita.fr>
15619
15620 * src/state.h, src/state.c (state_new): New, extracted from...
15621 * src/LR0.c (new_state): here.
15622 * src/state.h (STATE_ALLOC): Move to...
15623 * src/state.c: here.
15624 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15625 * src/state.h, src/state.c: here.
15626
15627 2002-06-30 Akim Demaille <akim@epita.fr>
15628
15629 * src/reader.c (gensym): Rename as...
15630 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15631 (getsym): Rename as...
15632 (symbol_get): this.
15633
15634 2002-06-30 Akim Demaille <akim@epita.fr>
15635
15636 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15637 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15638 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15639 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15640
15641 2002-06-30 Akim Demaille <akim@epita.fr>
15642
15643 Make the test suite pass with warnings checked.
15644
15645 * tests/actions.at (Printers and Destructors): Improve.
15646 Avoid unsigned vs. signed issues.
15647 * tests/calc.at: Don't exercise the scanner here, do it...
15648 * tests/input.at (Torturing the Scanner): here.
15649
15650 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15651
15652 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
15653 reorganize first lines parallel to yacc.c.
15654
15655 2002-06-28 Akim Demaille <akim@epita.fr>
15656
15657 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15658 (b4_token_enum, b4_token_defines): New, factored from...
15659 * data/lalr1.cc, data/yacc.c, glr.c: here.
15660
15661 2002-06-28 Akim Demaille <akim@epita.fr>
15662
15663 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15664 unused variables.
15665 * src/output.c (merger_output): static.
15666
15667 2002-06-28 Akim Demaille <akim@epita.fr>
15668
15669 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
15670 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15671 pacify GCC.
15672 * src/output.c (save_row): Initialize all the variables to pacify GCC.
15673
15674 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15675
15676 Accumulated changelog for new GLR parsing features.
15677
15678 * src/conflicts.c (count_total_conflicts): Change name to
15679 conflicts_total_count.
15680 * src/conflicts.h: Ditto.
15681 * src/output.c (token_actions): Use the new name.
15682 (output_conflicts): Change conflp => conflict_list_heads, and
15683 confl => conflict_list for better readability.
15684 * data/glr.c: Use the new names.
15685 * NEWS: Add self to GLR announcement.
15686
15687 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15688
15689 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15690 Akim Demaille.
15691
15692 * data/bison.glr: Change name to glr.c
15693 * data/glr.c: Renamed from bison.glr.
15694 * data/Makefile.am: Add glr.c
15695
15696 * src/getargs.c:
15697
15698 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
15699 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
15700
15701 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15702
15703 * data/bison.glr: Be sure to restore the
15704 current #line when returning to the skeleton contents after having
15705 exposed the input file's #line.
15706
15707 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15708
15709 * data/bison.glr: Bring up to date with changes to bison.simple.
15710
15711 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15712
15713 * data/bison.glr: Correct definitions that use b4_prefix.
15714 Various reformatting.
15715 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
15716 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
15717 yytokenp argument; now part of stack.
15718 (yychar): Define to behave as documented.
15719 (yyclearin): Ditto.
15720
15721 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15722
15723 * src/reader.h: Add declaration for free_merger_functions.
15724
15725 * src/reader.c (merge_functions): New variable.
15726 (get_merge_function): New function.
15727 (free_merger_functions): New function.
15728 (readgram): Check for %prec that is not followed by a symbol.
15729 Handle %dprec and %merge declarations.
15730 (packgram): Initialize dprec and merger fields in rules array.
15731
15732 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
15733 conflict_list_cnt, conflict_list_free): New variables.
15734 (table_grow): Also grow conflict_table.
15735 (prepare_rules): Output dprec and merger tables.
15736 (conflict_row): New function.
15737 (action_row): Output conflict lists for GLR parser. Don't use
15738 default reduction in conflicted states for GLR parser so that there
15739 are spaces for the conflict lists.
15740 (save_row): Also save conflict information.
15741 (token_actions): Allocate conflict list.
15742 (merger_output): New function.
15743 (pack_vector): Pack conflict table, too.
15744 (output_conflicts): New function to output yyconflp and yyconfl.
15745 (output_check): Allocate conflict_tos.
15746 (output_actions): Output conflict tables, also.
15747 (output_skeleton): Output b4_mergers definition.
15748 (prepare): Output b4_max_rhs_length definition.
15749 Use 'bison.glr' as default skeleton for GLR parsers.
15750
15751 * src/gram.c (glr_parser): New flag.
15752 (grammar_free): Call free_merger_functions.
15753
15754 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
15755 all pairs of conflicting reductions, rather than just all tokens
15756 causing conflicts. Needed to size conflict tables.
15757 (conflicts_output): Modify call to count_rr_conflicts for new
15758 interface.
15759 (conflicts_print): Ditto.
15760 (count_total_conflicts): New function.
15761
15762 * src/reader.h (merger_list): New type.
15763 (merge_functions): New variable.
15764
15765 * src/lex.h (tok_dprec, tok_merge): New token types.
15766
15767 * src/gram.h (rule_s): Add dprec and merger fields.
15768 (glr_parser): New flag.
15769
15770 * src/conflicts.h (count_total_conflicts): New function.
15771
15772 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
15773
15774 * doc/bison.texinfo (Generalized LR Parsing): New section.
15775 (GLR Parsers): New section.
15776 (Language and Grammar): Mention GLR parsing.
15777 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
15778 Correct typo ("tge" -> "the").
15779
15780 * data/bison.glr: New skeleton for GLR parsing.
15781
15782 * tests/cxx-gram.at: New tests for GLR parsing.
15783
15784 * tests/testsuite.at: Include cxx-gram.at.
15785
15786 * tests/Makefile.am: Add cxx-gram.at.
15787
15788 * src/parse-gram.y:
15789
15790 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
15791
15792 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
15793
15794 2002-06-27 Akim Demaille <akim@epita.fr>
15795
15796 * src/options.h, src/options.c: Remove.
15797 * src/getargs.c (short_options, long_options): New.
15798
15799 2002-06-27 Akim Demaille <akim@epita.fr>
15800
15801 * data/bison.simple, data/bison.c++: Rename as...
15802 * data/yacc.c, data/lalr1.cc: these.
15803 * doc/bison.texinfo (Environment Variables): Remove.
15804
15805 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
15806
15807 * src/getargs.c (report_argmatch): Initialize strtok().
15808
15809 2002-06-20 Akim Demaille <akim@epita.fr>
15810
15811 * data/bison.simple (b4_symbol_actions): New, replaces...
15812 (b4_symbol_destructor, b4_symbol_printer): these.
15813 (yysymprint): Be sure to call YYPRINT only for tokens, and using
15814 user token numbers.
15815
15816 2002-06-20 Akim Demaille <akim@epita.fr>
15817
15818 * data/bison.simple (yydestructor): Rename as...
15819 (yydestruct): this.
15820
15821 2002-06-20 Akim Demaille <akim@epita.fr>
15822
15823 * src/symtab.h, src/symtab.c (symbol_type_set)
15824 (symbol_destructor_set, symbol_precedence_set): The location is
15825 the last argument.
15826 Adjust all callers.
15827
15828 2002-06-20 Akim Demaille <akim@epita.fr>
15829
15830 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
15831 internals.
15832 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
15833 Takes a location.
15834 * src/symtab.h, src/symtab.c (symbol_class_set)
15835 (symbol_user_token_number_set): Likewise.
15836 Adjust all callers.
15837 Promote complain_at.
15838 * tests/input.at (Type Clashes): Adjust.
15839
15840 2002-06-20 Akim Demaille <akim@epita.fr>
15841
15842 * data/bison.simple (YYLEX): Fix the declaration when
15843 %pure-parser.
15844
15845 2002-06-20 Akim Demaille <akim@epita.fr>
15846
15847 * data/bison.simple (yysymprint): Don't print the token number,
15848 just its name.
15849 * tests/actions.at (Destructors): Rename as...
15850 (Printers and Destructors): this.
15851 Also exercise %printer.
15852
15853 2002-06-20 Akim Demaille <akim@epita.fr>
15854
15855 * data/bison.simple (YYDSYMPRINT): New.
15856 Use it to remove many of the #if YYDEBUG/if (yydebug).
15857
15858 2002-06-20 Akim Demaille <akim@epita.fr>
15859
15860 * src/symtab.h, src/symtab.c (symbol_t): printer and
15861 printer_location are new members.
15862 (symbol_printer_set): New.
15863 * src/parse-gram.y (PERCENT_PRINTER): New token.
15864 Handle its associated rule.
15865 * src/scan-gram.l: Adjust.
15866 (handle_destructor_at, handle_destructor_dollar): Rename as...
15867 (handle_symbol_code_at, handle_symbol_code_dollar): these.
15868 * src/output.c (symbol_printers_output): New.
15869 (output_skeleton): Call it.
15870 * data/bison.simple (yysymprint): New. Cannot be named yyprint
15871 since there are already many grammar files with a user `yyprint'.
15872 Replace the calls to YYPRINT to calls to yysymprint.
15873 * tests/calc.at: Adjust.
15874 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
15875 taking advantage of parser very internal details (stack size!).
15876
15877 2002-06-20 Akim Demaille <akim@epita.fr>
15878
15879 * src/scan-gram.l: Complete the scanner with the missing patterns
15880 to pacify Flex.
15881 Use `quote' and `symbol_tag_get' where appropriate.
15882
15883 2002-06-19 Akim Demaille <akim@epita.fr>
15884
15885 * tests/actions.at (Destructors): Augment to test locations.
15886 * data/bison.simple (yydestructor): Pass it the current location
15887 if locations are enabled.
15888 Prototype only when __STDC__ or C++.
15889 Change the argument names to move into the yy name space: there is
15890 user code here.
15891
15892 2002-06-19 Akim Demaille <akim@epita.fr>
15893
15894 * data/bison.simple (b4_pure_if): New.
15895 Use it instead of #ifdef YYPURE.
15896
15897 2002-06-19 Akim Demaille <akim@epita.fr>
15898
15899 * data/bison.simple (b4_location_if): New.
15900 Use it instead of #ifdef YYLSP_NEEDED.
15901
15902 2002-06-19 Akim Demaille <akim@epita.fr>
15903
15904 Prepare @$ in %destructor, but currently don't bind it in the
15905 skeleton, as %location use is not cleaned up yet.
15906
15907 * src/scan-gram.l (handle_dollar, handle_destructor_at)
15908 (handle_action_at): New.
15909 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
15910 a braced_code_t and a location as additional arguments.
15911 (handle_destructor_dollar): Instead of requiring `b4_eval', just
15912 unquote one when outputting `b4_dollar_dollar'.
15913 Adjust callers.
15914 * data/bison.simple (b4_eval): Remove.
15915 (b4_symbol_destructor): Adjust.
15916 * tests/input.at (Invalid @n): Adjust.
15917
15918 2002-06-19 Zack Weinberg <zack@codesourcery.com>
15919
15920 * doc/bison.texinfo: Document ability to have multiple
15921 prologue sections.
15922
15923 2002-06-18 Akim Demaille <akim@epita.fr>
15924
15925 * src/files.c (compute_base_names): When computing the output file
15926 names from the input file name, strip the directory part.
15927
15928 2002-06-18 Akim Demaille <akim@epita.fr>
15929
15930 * data/bison.simple.new: Comment changes.
15931 Reported by Andreas Schwab.
15932
15933 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
15934
15935 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
15936 there are no `label `yyoverflowlab' defined but not used' warnings
15937 when yyoverflow is defined.
15938
15939 2002-06-18 Akim Demaille <akim@epita.fr>
15940
15941 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
15942 new member.
15943 (symbol_destructor_set): Adjust.
15944 * src/output.c (symbol_destructors_output): Output the destructor
15945 locations.
15946 Output the symbol name.
15947 * data/bison.simple (b4_symbol_destructor): Adjust.
15948
15949 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
15950 and Akim Demaille <akim@epita.fr>
15951
15952 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
15953 what's left on the stack when the error recovery hits EOF.
15954 * tests/actions.at (Destructors): Complete to exercise this case.
15955
15956 2002-06-17 Akim Demaille <akim@epita.fr>
15957
15958 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
15959 arguments is really empty, not only equal to `[]'.
15960 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
15961 member.
15962 (symbol_destructor_set): New.
15963 * src/output.c (symbol_destructors_output): New.
15964 * src/reader.h (brace_code_t, current_braced_code): New.
15965 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
15966 (handle_dollar): Rename as...
15967 (handle_action_dollar): this.
15968 (handle_destructor_dollar): New.
15969 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
15970 (grammar_declaration): Use it.
15971 * data/bison.simple (yystos): Is always defined.
15972 (yydestructor): New.
15973 * tests/actions.at (Destructors): New.
15974 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
15975
15976 2002-06-17 Akim Demaille <akim@epita.fr>
15977
15978 * src/symlist.h, src/symlist.c (symbol_list_length): New.
15979 * src/scan-gram.l (handle_dollar, handle_at): Compute the
15980 rule_length only when needed.
15981 * src/output.c (actions_output, token_definitions_output): Output
15982 the full M4 block.
15983 * src/symtab.c: Don't access directly to the symbol tag, use
15984 symbol_tag_get.
15985 * src/parse-gram.y: Use symbol_list_free.
15986
15987 2002-06-17 Akim Demaille <akim@epita.fr>
15988
15989 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
15990 (symbol_list_prepend, get_type_name): Move to...
15991 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
15992 (symbol_list_prepend, symbol_list_n_type_name_get): here.
15993 Adjust all callers.
15994 (symbol_list_free): New.
15995 * src/scan-gram.l (handle_dollar): Takes a location.
15996 * tests/input.at (Invalid $n): Adjust.
15997
15998 2002-06-17 Akim Demaille <akim@epita.fr>
15999
16000 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16001 (symbol_list_prepend): New.
16002 * src/parse-gram.y (%union): `list' is a new member.
16003 (symbols.1): New, replaces...
16004 (terms_to_prec.1, nterms_to_type.1): these.
16005 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16006 Take a location as additional argument.
16007 Adjust all callers.
16008
16009 2002-06-15 Akim Demaille <akim@epita.fr>
16010
16011 * src/parse-gram.y: Move %token in the declaration section so that
16012 we don't depend upon CVS Bison.
16013
16014 2002-06-15 Akim Demaille <akim@epita.fr>
16015
16016 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16017 * src/print.c (print_core): Use it.
16018
16019 2002-06-15 Akim Demaille <akim@epita.fr>
16020
16021 * src/conflicts.c (log_resolution): Accept the rule involved in
16022 the sr conflicts instead of the lookahead number that points to
16023 that rule.
16024 (flush_reduce): Accept the current lookahead vector as argument,
16025 instead of the index in LA.
16026 (resolve_sr_conflict): Accept the current number of lookahead
16027 bitset to consider for the STATE, instead of the index in LA.
16028 (set_conflicts): Adjust.
16029 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16030
16031 2002-06-15 Akim Demaille <akim@epita.fr>
16032
16033 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16034 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16035 Adjust all dependencies.
16036 * src/lalr.c (initialize_lookaheads): Split into...
16037 (states_lookaheads_count, states_lookaheads_initialize): these.
16038 (lalr): Adjust.
16039
16040 2002-06-15 Akim Demaille <akim@epita.fr>
16041
16042 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16043 out of...
16044 (grammar_rules_print): here.
16045 * src/reduce.c (reduce_output): Use it.
16046 * tests/reduce.at (Useless Rules, Reduced Automaton)
16047 (Underivable Rules): Adjust.
16048
16049 2002-06-15 Akim Demaille <akim@epita.fr>
16050
16051 Copy BYacc's nice way to report the grammar.
16052
16053 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16054 New.
16055 Don't print the rules' location, it is confusing and useless.
16056 (rule_print): Use grammar_rhs_print.
16057 * src/print.c (print_grammar): Use grammar_rules_print.
16058
16059 2002-06-15 Akim Demaille <akim@epita.fr>
16060
16061 Complete and rationalize `useless thing' warnings.
16062
16063 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16064 (symbol_tag_print): New.
16065 Use them everywhere in place of accessing directly the tag member.
16066 * src/gram.h, src/gram.c (rule_print): New.
16067 Use it where a rule used to be printed `by hand'.
16068 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16069 (reduce_grammar_tables): Report the useless rules.
16070 (reduce_print): Useless things are a warning, not an error.
16071 Report it as such.
16072 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16073 (Reduced Automaton, Underivable Rules): Adjust.
16074 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16075 * tests/conflicts.at (Unresolved SR Conflicts)
16076 (Solved SR Conflicts): Adjust.
16077
16078 2002-06-15 Akim Demaille <akim@epita.fr>
16079
16080 Let symbols have a location.
16081
16082 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16083 (getsym): Adjust.
16084 Adjust all callers.
16085 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16086 Use location_t, not int.
16087 * src/symtab.c (symbol_check_defined): Take advantage of the
16088 location.
16089 * tests/regression.at (Invalid inputs): Adjust.
16090
16091 2002-06-15 Akim Demaille <akim@epita.fr>
16092
16093 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16094 (input): Don't try to initialize yylloc here, do it in the
16095 scanner.
16096 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16097 * src/gram.h (rule_t): Change line and action_line into location
16098 and action_location, of location_t type.
16099 Adjust all dependencies.
16100 * src/location.h, src/location.c (empty_location): New.
16101 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16102 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16103 (grammar_current_rule_symbol_append)
16104 (grammar_current_rule_action_append): Expect a location as argument.
16105 * src/reader.c (grammar_midrule_action): Adjust to attach an
16106 action's location as dummy symbol location.
16107 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16108 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16109 the line numbers.
16110
16111 2002-06-14 Akim Demaille <akim@epita.fr>
16112
16113 Grammar declarations may be found in the grammar section.
16114
16115 * src/parse-gram.y (rules_or_grammar_declaration): New.
16116 (declarations): Each declaration may end with a semicolon, not
16117 just...
16118 (grammar_declaration): `"%union"'.
16119 (grammar): Branch to rules_or_grammar_declaration.
16120
16121 2002-06-14 Akim Demaille <akim@epita.fr>
16122
16123 * src/main.c (main): Invoke scanner_free.
16124
16125 2002-06-14 Akim Demaille <akim@epita.fr>
16126
16127 * src/output.c (m4_invoke): Extracted from...
16128 (output_skeleton): here.
16129 Free tempfile.
16130
16131 2002-06-14 Akim Demaille <akim@epita.fr>
16132
16133 * src/parse-gram.y (directives, directive, gram)
16134 (grammar_directives, precedence_directives, precedence_directive):
16135 Rename as...
16136 (declarations, declaration, grammar, grammar_declaration)
16137 (precedence_declaration, precedence_declarator): these.
16138 (symbol_declaration): New.
16139
16140 2002-06-14 Akim Demaille <akim@epita.fr>
16141
16142 * src/files.c (action_obstack): Remove, unused.
16143 (output_obstack): Remove it, and all its dependencies, as it is no
16144 longer needed.
16145 * src/reader.c (epilogue_set): Build the epilogue in the
16146 muscle_obstack.
16147 * src/output.h, src/output.c (muscle_obstack): Move to...
16148 * src/muscle_tab.h, src/muscle_tab.h: here.
16149 (muscle_init): Initialize muscle_obstack.
16150 (muscle_free): New.
16151 * src/main.c (main): Call it.
16152
16153 2002-06-14 Akim Demaille <akim@epita.fr>
16154
16155 * src/location.h: New, extracted from...
16156 * src/reader.h: here.
16157 * src/Makefile.am (noinst_HEADERS): Merge into
16158 (bison_SOURCES): this.
16159 Add location.h.
16160 * src/parse-gram.y: Use location_t instead of Bison's.
16161 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16162 Use location_t instead of ints.
16163
16164 2002-06-14 Akim Demaille <akim@epita.fr>
16165
16166 * data/bison.simple, data/bison.c++: Be sure to restore the
16167 current #line when returning to the skeleton contents after having
16168 exposed the input file's #line.
16169
16170 2002-06-12 Akim Demaille <akim@epita.fr>
16171
16172 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16173 eager.
16174 * tests/actions.at (Exotic Dollars): New.
16175
16176 2002-06-12 Akim Demaille <akim@epita.fr>
16177
16178 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16179 ['"/] too eagerly.
16180 * tests/input.at (Torturing the Scanner): New.
16181
16182 2002-06-11 Akim Demaille <akim@epita.fr>
16183
16184 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16185 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16186 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16187 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16188 * src/reader.c (reader): Use it.
16189
16190 2002-06-11 Akim Demaille <akim@epita.fr>
16191
16192 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16193 Adjust all callers.
16194 (scanner_last_string_free): New.
16195
16196 2002-06-11 Akim Demaille <akim@epita.fr>
16197
16198 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16199 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16200 (last_string, YY_OBS_FREE): New.
16201 Use them when returning an ID.
16202
16203 2002-06-11 Akim Demaille <akim@epita.fr>
16204
16205 Have Bison grammars parsed by a Bison grammar.
16206
16207 * src/reader.c, src/reader.h (prologue_augment): New.
16208 * src/reader.c (copy_definition): Remove.
16209
16210 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16211 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16212 (grammar_current_rule_prec_set, grammar_current_rule_check)
16213 (grammar_current_rule_symbol_append)
16214 (grammar_current_rule_action_append): Export.
16215 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16216 (symbol_list_action_append): Remove.
16217 Hook the routines from reader.
16218 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16219 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16220
16221 * src/reader.c (read_declarations): Remove, unused.
16222
16223 * src/parse-gram.y: Handle the epilogue.
16224 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16225 (grammar_start_symbol_set): this.
16226 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16227 * src/reader.c (readgram): Remove, unused.
16228 (reader): Adjust to insert eoftoken and axiom where appropriate.
16229
16230 * src/reader.c (copy_dollar): Replace with...
16231 * src/scan-gram.h (handle_dollar): this.
16232 * src/parse-gram.y: Remove `%thong'.
16233
16234 * src/reader.c (copy_at): Replace with...
16235 * src/scan-gram.h (handle_at): this.
16236
16237 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16238 New.
16239
16240 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16241 time being.
16242
16243 * src/reader.h, src/reader.c (grammar_rule_end): New.
16244
16245 * src/parse.y (current_type, current_class): New.
16246 Implement `%nterm', `%token' support.
16247 Merge `%term' into `%token'.
16248 (string_as_id): New.
16249 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16250 type name.
16251
16252 * src/parse-gram.y: Be sure to handle properly the beginning of
16253 rules.
16254
16255 * src/parse-gram.y: Handle %type.
16256 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16257
16258 * src/parse-gram.y: More directives support.
16259 * src/options.c: No longer handle source directives.
16260
16261 * src/parse-gram.y: Fix %output.
16262
16263 * src/parse-gram.y: Handle %union.
16264 Use the prologue locations.
16265 * src/reader.c (parse_union_decl): Remove.
16266
16267 * src/reader.h, src/reader.c (epilogue_set): New.
16268 * src/parse-gram.y: Use it.
16269
16270 * data/bison.simple, data/bison.c++: b4_stype is now either not
16271 defined, then default to int, or to the contents of %union,
16272 without `union' itself.
16273 Adjust.
16274 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16275
16276 * src/output.c (actions_output): Don't output braces, as they are
16277 already handled by the scanner.
16278
16279 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16280 characters to themselves.
16281
16282 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16283 that the epilogue has a proper #line.
16284
16285 * src/parse-gram.y: Handle precedence/associativity.
16286
16287 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16288 a terminal.
16289 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16290 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16291 at all to define terminals that cannot be emitted.
16292
16293 * src/scan-gram.l: Escape M4 characters.
16294
16295 * src/scan-gram.l: Working properly with escapes in user
16296 strings/characters.
16297
16298 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16299 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16300 grammar.
16301 Use more modest sizes, as for the time being the parser does not
16302 release memory, and therefore the process swallows a huge amount
16303 of memory.
16304
16305 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16306 stricter %token grammar.
16307
16308 * src/symtab.h (associativity): Add `undef_assoc'.
16309 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16310 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16311
16312 * tests/regression.at (Invalid %directive): Remove, as it is now
16313 meaningless.
16314 (Invalid inputs): Adjust to the new error messages.
16315 (Token definitions): The new grammar doesn't allow too many
16316 eccentricities.
16317
16318 * src/lex.h, src/lex.c: Remove.
16319 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16320 (copy_character, copy_string2, copy_string, copy_identifier)
16321 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16322 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16323 (parse_action): Remove.
16324 * po/POTFILES.in: Adjust.
16325
16326 2002-06-11 Akim Demaille <akim@epita.fr>
16327
16328 * src/reader.c (parse_action): Don't store directly into the
16329 rule's action member: return the action as a string.
16330 Don't require `rule_length' as an argument: compute it.
16331 (grammar_current_rule_symbol_append)
16332 (grammar_current_rule_action_append): New, eved out from
16333 (readgram): here.
16334 Remove `action_flag', `rulelength', unused now.
16335
16336 2002-06-11 Akim Demaille <akim@epita.fr>
16337
16338 * src/reader.c (grammar_current_rule_prec_set).
16339 (grammar_current_rule_check): New, eved out from...
16340 (readgram): here.
16341 Remove `xaction', `first_rhs': useless.
16342 * tests/input.at (Type clashes): New.
16343 * tests/existing.at (GNU Cim Grammar): Adjust.
16344
16345 2002-06-11 Akim Demaille <akim@epita.fr>
16346
16347 * src/reader.c (grammar_midrule_action): New, Eved out from
16348 (readgram): here.
16349
16350 2002-06-11 Akim Demaille <akim@epita.fr>
16351
16352 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16353 New.
16354 (readgram): Use them as replacement of inlined code, crule and
16355 crule1.
16356
16357 2002-06-11 Akim Demaille <akim@epita.fr>
16358
16359 * src/reader.c (grammar_end, grammar_symbol_append): New.
16360 (readgram): Use them.
16361 Make the use of `p' as local as possible.
16362
16363 2002-06-10 Akim Demaille <akim@epita.fr>
16364
16365 GCJ's parser requires the tokens to be defined before the prologue.
16366
16367 * data/bison.simple: Output the token definition before the user's
16368 prologue.
16369 * tests/regression.at (Braces parsing, Duplicate string)
16370 (Mixing %token styles): Check the output from bison.
16371 (Early token definitions): New.
16372
16373 2002-06-10 Akim Demaille <akim@epita.fr>
16374
16375 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16376 assigning twice the same user number to a token, so that we can
16377 use it in...
16378 * src/lex.c (lex): here.
16379 Also use `symbol_class_set' instead of hand written code.
16380 * src/reader.c (parse_assoc_decl): Likewise.
16381
16382 2002-06-10 Akim Demaille <akim@epita.fr>
16383
16384 * src/symtab.c, src/symtab.c (symbol_class_set)
16385 (symbol_user_token_number_set): New.
16386 * src/reader.c (parse_token_decl): Use them.
16387 Use a switch instead of ifs.
16388 Use a single argument.
16389
16390 2002-06-10 Akim Demaille <akim@epita.fr>
16391
16392 Remove `%thong' support as it is undocumented, unused, duplicates
16393 `%token's job, and creates useless e-mail traffic with people who
16394 want to know what it is, why it is undocumented, unused, and
16395 duplicates `%token's job.
16396
16397 * src/reader.c (parse_thong_decl): Remove.
16398 * src/options.c (option_table): Remove "thong".
16399 * src/lex.h (tok_thong): Remove.
16400
16401 2002-06-10 Akim Demaille <akim@epita.fr>
16402
16403 * src/symtab.c, src/symtab.c (symbol_type_set)
16404 (symbol_precedence_set): New.
16405 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16406 (value_components_used): Remove, unused.
16407
16408 2002-06-09 Akim Demaille <akim@epita.fr>
16409
16410 Move symbols handling code out of the reader.
16411
16412 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16413 (axiom): Move to...
16414 * src/symtab.h, src/symtab.c: here.
16415
16416 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16417 * src/reader.c (startval): Rename as...
16418 * src/symtab.h, src/symtab.c (startsymbol): this.
16419 * src/reader.c: Adjust.
16420
16421 * src/reader.c (symbol_check_defined, symbol_make_alias)
16422 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16423 (token_translations_init)
16424 Move to...
16425 * src/symtab.c: here.
16426 * src/reader.c (packsymbols): Move to...
16427 * src/symtab.h, src/symtab.c (symbols_pack): here.
16428 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16429 argument.
16430
16431 2002-06-03 Akim Demaille <akim@epita.fr>
16432
16433 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16434 then statements.
16435
16436 2002-06-03 Akim Demaille <akim@epita.fr>
16437
16438 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16439 structs with non literals.
16440 * src/scan-skel.l: never-interactive.
16441 * src/conflicts.c (enum conflict_resolution_e): No trailing
16442 comma.
16443 * src/getargs.c (usage): Split long literal strings.
16444 Reported by Hans Aberg.
16445
16446 2002-05-28 Akim Demaille <akim@epita.fr>
16447
16448 * data/bison.c++: Use C++ ostreams.
16449 (cdebug_): New member.
16450
16451 2002-05-28 Akim Demaille <akim@epita.fr>
16452
16453 * src/output.c (output_skeleton): Be sure to allocate enough room
16454 for `/' _and_ for `\0' in full_skeleton.
16455
16456 2002-05-28 Akim Demaille <akim@epita.fr>
16457
16458 * data/bison.c++: Catch up with bison.simple:
16459 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16460 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16461 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16462 and popping traces.
16463
16464 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16465
16466 * src/output.c (output_skeleton): Put an explicit path in front of
16467 the skeleton file name, rather than relying on the -I directory,
16468 to partially alleviate effects of having a skeleton file lying around
16469 in the current directory.
16470
16471 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16472
16473 * src/conflicts.c (log_resolution): Correct typo:
16474 obstack_printf should be obstack_fgrow1.
16475
16476 2002-05-26 Akim Demaille <akim@epita.fr>
16477
16478 * src/state.h (state_t): `solved_conflicts' is a new member.
16479 * src/LR0.c (new_state): Set it to 0.
16480 * src/conflicts.h, src/conflicts.c (print_conflicts)
16481 (free_conflicts, solve_conflicts): Rename as...
16482 (conflicts_print, conflicts_free, conflicts_solve): these.
16483 Adjust callers.
16484 * src/conflicts.c (enum conflict_resolution_e)
16485 (solved_conflicts_obstack): New, used by...
16486 (log_resolution): this.
16487 Adjust to attach the conflict resolution to each state.
16488 Complete the description with the precedence/associativity
16489 information.
16490 (resolve_sr_conflict): Adjust.
16491 * src/print.c (print_state): Output its solved_conflicts.
16492 * tests/conflicts.at (Unresolved SR Conflicts)
16493 (Solved SR Conflicts): Exercise --report=all.
16494
16495 2002-05-26 Akim Demaille <akim@epita.fr>
16496
16497 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16498 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16499 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16500 (token_number_t, item_number_as_token_number)
16501 (token_number_as_item_number, muscle_insert_token_number_table):
16502 Rename as...
16503 (symbol_number_t, item_number_as_symbol_number)
16504 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16505 these, since it is more appropriate.
16506
16507 2002-05-26 Akim Demaille <akim@epita.fr>
16508
16509 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16510 `Error:' lines.
16511 * data/bison.simple (yystos) [YYDEBUG]: New.
16512 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16513 error recovery.
16514 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16515
16516 2002-05-25 Akim Demaille <akim@epita.fr>
16517
16518 * doc/bison.texinfo (Debugging): Split into...
16519 (Tracing): this new section, its former contents, and...
16520 (Understanding): this new section.
16521 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16522 by...
16523 (report_flag): this.
16524 Adjust all dependencies.
16525 (report_args, report_types, report_argmatch): New.
16526 (usage, getargs): Report/support -r, --report.
16527 * src/options.h
16528 (struct option_table_struct): Rename as..,
16529 (struct option_table_s): this.
16530 Rename the `set_flag' member to `flag' to match with getopt_long's
16531 struct.
16532 * src/options.c (option_table): Split verbose into an entry for
16533 %verbose, and another for --verbose.
16534 Support --report/-r, so remove -r from the obsolete --raw.
16535 * src/print.c: Attach full item sets and lookaheads reports to
16536 report_flag instead of trace_flag.
16537 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16538
16539 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16540 and Paul Eggert <eggert@twinsun.com>
16541
16542 * data/bison.simple (yyparse): Correct error handling to conform to
16543 POSIX and yacc. Specifically, after syntax error is discovered,
16544 do not reduce further before shifting the error token.
16545 Clean up the code a bit by removing the labels yyerrdefault,
16546 yyerrhandle, yyerrpop.
16547 * NEWS: Document the above.
16548
16549 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16550
16551 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16552 type; it isn't always big enough, since it doesn't necessarily
16553 include non-terminals.
16554 (yytranslate): Expand definition of yy_token_number_type, so that
16555 the latter can be removed.
16556 (yy_token_number_type): Remove, only one use.
16557 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16558 don't use TokenNumberType as element type.
16559
16560 * tests/regression.at: Modify expected output to agree with change
16561 to yyr1 and yytranslate.
16562
16563 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16564
16565 * src/reader.c (parse_action): Use copy_character instead of
16566 obstack_1grow.
16567
16568 2002-05-13 Akim Demaille <akim@epita.fr>
16569
16570 * tests/regression.at (Token definitions): Prototype yylex and
16571 yyerror.
16572
16573 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16574
16575 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
16576 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16577 32-bit arithmetic.
16578 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16579
16580 2002-05-07 Akim Demaille <akim@epita.fr>
16581
16582 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16583 avoid GCC warnings.
16584
16585 2002-05-07 Akim Demaille <akim@epita.fr>
16586
16587 Kill GCC warnings.
16588
16589 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16590 over the RHS of each rule.
16591 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16592 * src/state.h (state_t): Member `nitems' is unsigned short.
16593 * src/LR0.c (get_state): Adjust.
16594 * src/reader.c (packgram): Likewise.
16595 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16596 `Type'.
16597 (muscle_insert_int_table): Remove, unused.
16598 (prepare_rules): Remove `max'.
16599
16600 2002-05-06 Akim Demaille <akim@epita.fr>
16601
16602 * src/closure.c (print_firsts): Display of the symbol tags.
16603 (bitmatrix_print): Move to...
16604 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16605 here.
16606 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16607
16608 2002-05-06 Akim Demaille <akim@epita.fr>
16609
16610 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16611 hash_do_for_each.
16612
16613 2002-05-06 Akim Demaille <akim@epita.fr>
16614
16615 * src/LR0.c (new_state, get_state): Instead of using the global
16616 `kernel_size' and `kernel_base', have two new arguments:
16617 `core_size' and `core'.
16618 Adjust callers.
16619
16620 2002-05-06 Akim Demaille <akim@epita.fr>
16621
16622 * src/reader.c (packgram): No longer end `ritem' with a 0
16623 sentinel: it is not used.
16624
16625 2002-05-05 Akim Demaille <akim@epita.fr>
16626
16627 New experimental feature: display the lookaheads in the report and
16628 graph.
16629
16630 * src/print (print_core): When --trace-flag, display the rules
16631 lookaheads.
16632 * src/print_graph.c (print_core): Likewise.
16633 Swap the arguments.
16634 Adjust caller.
16635
16636 2002-05-05 Akim Demaille <akim@epita.fr>
16637
16638 * tests/torture.at (Many lookaheads): New test.
16639
16640 2002-05-05 Akim Demaille <akim@epita.fr>
16641
16642 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16643 (GENERATE_MUSCLE_INSERT_TABLE): this.
16644 (output_int_table, output_unsigned_int_table, output_short_table)
16645 (output_token_number_table, output_item_number_table): Replace with...
16646 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16647 (muscle_insert_short_table, muscle_insert_token_number_table)
16648 (muscle_insert_item_number_table): these.
16649 Adjust all callers.
16650 (prepare_tokens): Don't free `translations', since...
16651 * src/reader.h, src/reader.c (grammar_free): do it.
16652 Move to...
16653 * src/gram.h, src/gram.c (grammar_free): here.
16654 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16655 b4_translate_max.
16656
16657 2002-05-05 Akim Demaille <akim@epita.fr>
16658
16659 * src/output.c (output_unsigned_int_table): New.
16660 (prepare_rules): `i' is unsigned.
16661 `prhs', `rline', `r2' are unsigned int.
16662 Rename muscle `rhs_number_max' as `rhs_max'.
16663 Output muscles `prhs_max', `rline_max', and `r2_max'.
16664 Free rline and r1.
16665 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16666 to compute types instead of constant types.
16667 * tests/regression.at (Web2c Actions): Adjust.
16668
16669 2002-05-04 Akim Demaille <akim@epita.fr>
16670
16671 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16672 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16673 Adjust dependencies.
16674 * src/output.c (token_definitions_output): Be sure not to output a
16675 `#define 'a'' when fed with `%token 'a' "a"'.
16676 * tests/regression.at (Token definitions): New.
16677
16678 2002-05-03 Paul Eggert <eggert@twinsun.com>
16679
16680 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16681 for K&R C.
16682
16683 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16684
16685 * Makefile.am (SUBDIRS): Remove intl.
16686 (EXTRA_DIST): Add config/config.rpath.
16687
16688 2002-05-03 Akim Demaille <akim@epita.fr>
16689
16690 * data/bison.simple (m4_if): Don't output empty enums.
16691 And actually, output valid enum definitions :(.
16692
16693 2002-05-03 Akim Demaille <akim@epita.fr>
16694
16695 * configure.bat: Remove, completely obsolete.
16696 * Makefile.am (EXTRA_DIST): Adjust.
16697 Don't distribute config.rpath...
16698 * config/Makefile.am (EXTRA_DIST): Do it.
16699
16700 2002-05-03 Akim Demaille <akim@epita.fr>
16701
16702 * configure.in (GETTEXT_VERSION): New.
16703 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16704
16705 2002-05-03 Akim Demaille <akim@epita.fr>
16706
16707 * data/bison.simple (b4_token_enum): New.
16708 (b4_token_defines): Use it to output tokens both as #define and
16709 enums.
16710 Suggested by Paul Eggert.
16711 * src/output.c (token_definitions_output): Don't output spurious
16712 white spaces.
16713
16714 2002-05-03 Akim Demaille <akim@epita.fr>
16715
16716 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16717
16718 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
16719
16720 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
16721 Update the stack class, give a try to deque as the default container.
16722
16723 2002-05-02 Akim Demaille <akim@epita.fr>
16724
16725 * data/bison.simple (yyparse): Do not implement @$ = @1.
16726 (YYLLOC_DEFAULT): Adjust to do it.
16727 * doc/bison.texinfo (Location Default Action): Fix.
16728
16729 2002-05-02 Akim Demaille <akim@epita.fr>
16730
16731 * src/reader.c (parse_braces): Merge into...
16732 (parse_action): this.
16733
16734 2002-05-02 Akim Demaille <akim@epita.fr>
16735
16736 * configure.in (ALL_LINGUAS): Remove.
16737 * po/LINGUAS, hr.po: New.
16738
16739 2002-05-02 Akim Demaille <akim@epita.fr>
16740
16741 Remove the so called hairy (semantic) parsers.
16742
16743 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
16744 * src/gram.h, src/gram.c (semantic_parser): Remove.
16745 (rule_t): Remove the guard and guard_line members.
16746 * src/lex.h (token_t): remove tok_guard.
16747 * src/options.c (option_table): Remove %guard and %semantic_parser
16748 support.
16749 * src/output.c, src/output.h (guards_output): Remove.
16750 (prepare): Adjust.
16751 (token_definitions_output): Don't output the `T'
16752 tokens (???).
16753 (output_skeleton): Don't output the guards.
16754 * src/files.c, src/files.c (attrsfile): Remove.
16755 * src/reader.c (symbol_list): Remove the guard and guard_line
16756 members.
16757 Adjust dependencies.
16758 (parse_guard): Remove.
16759 * data/bison.hairy: Remove.
16760 * doc/bison.texinfo (Environment Variables): Remove occurrences of
16761 BISON_HAIRY.
16762
16763 2002-05-02 Akim Demaille <akim@epita.fr>
16764
16765 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
16766 (parse_guard): Rename the formal argument `stack_offset' as
16767 `rule_length', which is more readable.
16768 Adjust callers.
16769 (copy_at, copy_dollar): Instead of outputting the hard coded
16770 values of $$, $n and so forth, output invocation to b4_lhs_value,
16771 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
16772 Note: this patch partially drops `semantic-parser' support: it
16773 always does `rule_length - n', where semantic parsers ought to
16774 always use `-n'.
16775 * data/bison.simple, data/bison.c++ (b4_lhs_value)
16776 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
16777
16778 2002-05-02 Akim Demaille <akim@epita.fr>
16779
16780 * configure.in (AC_INIT): Bump to 1.49b.
16781 (AM_INIT_AUTOMAKE): Short invocation.
16782
16783 2002-05-02 Akim Demaille <akim@epita.fr>
16784
16785 Version 1.49a.
16786
16787 2002-05-01 Akim Demaille <akim@epita.fr>
16788
16789 * src/skeleton.h: Remove.
16790
16791 2002-05-01 Akim Demaille <akim@epita.fr>
16792
16793 * src/skeleton.h: Fix the #endif.
16794 Reported by Magnus Fromreide.
16795
16796 2002-04-26 Paul Eggert <eggert@twinsun.com>
16797
16798 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
16799 Define if we define YYSTYPE and YYLTYPE, respectively.
16800 (YYCOPY): Fix [] quoting problem in the non-GCC case.
16801
16802 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
16803
16804 * src/scan-skel.l: Postprocess quadrigraphs.
16805
16806 * src/reader.c (copy_character): New function, used to output
16807 single characters while replacing `[' and `]' with quadrigraphs, to
16808 avoid troubles with M4 quotes.
16809 (copy_comment): Output characters with copy_character.
16810 (read_additionnal_code): Likewise.
16811 (copy_string2): Likewise.
16812 (copy_definition): Likewise.
16813
16814 * tests/calc.at: Exercise M4 quoting.
16815
16816 2002-04-25 Akim Demaille <akim@epita.fr>
16817
16818 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
16819 between `!' and the command.
16820 Reported by Paul Eggert.
16821
16822 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
16823
16824 * tests/calc.at: Exercise prologue splitting.
16825
16826 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
16827 `b4_post_prologue' instead of `b4_prologue'.
16828
16829 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
16830 muscles.
16831 (output): Free pre_prologue_obstack and post_prologue_obstack.
16832 * src/files.h, src/files.c (attrs_obstack): Remove.
16833 (pre_prologue_obstack, post_prologue_obstack): New.
16834 * src/reader.c (copy_definition): Add a parameter to specify the
16835 obstack to fill, instead of using attrs_obstack unconditionally.
16836 (read_declarations): Pass pre_prologue_obstack to copy_definition if
16837 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
16838
16839 2002-04-23 Paul Eggert <eggert@twinsun.com>
16840
16841 * data/bison.simple: Remove unnecessary commentary and white
16842 space differences from 1_29-branch.
16843 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
16844
16845 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
16846 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
16847 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
16848 constructors or destructors.
16849
16850 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
16851
16852 2002-04-23 Akim Demaille <akim@epita.fr>
16853
16854 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
16855 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
16856 location with columns.
16857 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
16858 All reported by Paul Eggert.
16859
16860 2002-04-22 Akim Demaille <akim@epita.fr>
16861
16862 * src/reduce.c (dump_grammar): Move to...
16863 * src/gram.h, src/gram.c (grammar_dump): here.
16864 Be sure to separate long item numbers.
16865 Don't read the members of a rule's prec if its nil.
16866
16867 2002-04-22 Akim Demaille <akim@epita.fr>
16868
16869 * src/output.c (table_size, table_grow): New.
16870 (MAXTABLE): Remove, replace uses with table_size.
16871 (pack_vector): Instead of dying when the table is too big, grow it.
16872
16873 2002-04-22 Akim Demaille <akim@epita.fr>
16874
16875 * data/bison.simple (yyr1): Its type is that of a token number.
16876 * data/bison.c++ (r1_): Likewise.
16877 * tests/regression.at (Web2c Actions): Adjust.
16878
16879 2002-04-22 Akim Demaille <akim@epita.fr>
16880
16881 * src/reader.c (token_translations_init): 256 is now the default
16882 value for the error token, i.e., it will be assigned another
16883 number if the user assigned 256 to one of her tokens.
16884 (reader): Don't force 256 to error.
16885 * doc/bison.texinfo (Symbols): Adjust.
16886 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
16887 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
16888 etc. instead of 10, 20, 30 (which was used to `jump' over error
16889 (256) and undefined (2)).
16890
16891 2002-04-22 Akim Demaille <akim@epita.fr>
16892
16893 Propagate more token_number_t.
16894
16895 * src/gram.h (token_number_as_item_number)
16896 (item_number_as_token_number): New.
16897 * src/output.c (GENERATE_OUTPUT_TABLE): New.
16898 Use it to create output_item_number_table and
16899 output_token_number_table.
16900 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16901 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
16902 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
16903 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
16904
16905 2002-04-22 Akim Demaille <akim@epita.fr>
16906
16907 * src/output.h, src/output.c (get_lines_number): Remove.
16908
16909 2002-04-19 Akim Demaille <akim@epita.fr>
16910
16911 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
16912 as Lex/Flex'.
16913 (Debugging): More details about enabling the debugging features.
16914 (Table of Symbols): Describe $$, $n, @$, and @n.
16915 Suggested by Tim Josling.
16916
16917 2002-04-19 Akim Demaille <akim@epita.fr>
16918
16919 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
16920
16921 2002-04-10 Akim Demaille <akim@epita.fr>
16922
16923 * src/system.h: Rely on HAVE_LIMITS_H.
16924 Suggested by Paul Eggert.
16925
16926 2002-04-09 Akim Demaille <akim@epita.fr>
16927
16928 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
16929 full stderr, and strip it according to the bison options, instead
16930 of composing the error message from different bits.
16931 This makes it easier to check for several error messages.
16932 Adjust all the invocations.
16933 Add an invocation exercising the error token.
16934 Add an invocation demonstrating a stupid error message.
16935 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
16936 Adjust the tests.
16937 Error message are for stderr, not stdout.
16938
16939 2002-04-09 Akim Demaille <akim@epita.fr>
16940
16941 * src/gram.h, src/gram.c (error_token_number): Remove, use
16942 errtoken->number.
16943 * src/reader.c (reader): Don't specify the user token number (2)
16944 for $undefined, as it uselessly prevents using it.
16945 * src/gram.h (token_number_t): Move to...
16946 * src/symtab.h: here.
16947 (state_t.number): Is a token_number_t.
16948 * src/print.c, src/reader.c: Use undeftoken->number instead of
16949 hard coded 2.
16950 (Even though this 2 is not the same as above: the number of the
16951 undeftoken remains being 2, it is its user token number which
16952 might not be 2).
16953 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
16954 `user_token_number_max'.
16955 Output `undef_token_number'.
16956 * data/bison.simple, data/bison.c++: Use them.
16957 Be sure to map invalid yylex return values to
16958 `undef_token_number'. This saves us from gratuitous SEGV.
16959
16960 * tests/conflicts.at (Solved SR Conflicts)
16961 (Unresolved SR Conflicts): Adjust.
16962 * tests/regression.at (Web2c Actions): Adjust.
16963
16964 2002-04-08 Akim Demaille <akim@epita.fr>
16965
16966 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
16967 Adding #line.
16968 Remove the duplicate `typedefs'.
16969 (RhsNumberType): Fix the declaration and various other typos.
16970 Use __ofile__.
16971 * data/bison.simple: Use __ofile__.
16972 * src/scan-skel.l: Handle __ofile__.
16973
16974 2002-04-08 Akim Demaille <akim@epita.fr>
16975
16976 * src/gram.h (item_number_t): New, the type of item numbers in
16977 RITEM. Note that it must be able to code symbol numbers as
16978 positive number, and the negation of rule numbers as negative
16979 numbers.
16980 Adjust all dependencies (pretty many).
16981 * src/reduce.c (rule): Remove this `short *' pointer: use
16982 item_number_t.
16983 * src/system.h (MINSHORT, MAXSHORT): Remove.
16984 Include `limits.h'.
16985 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
16986 (shortcpy): Remove.
16987 (MAXTABLE): Move to...
16988 * src/output.c (MAXTABLE): here.
16989 (prepare_rules): Use output_int_table to output rhs.
16990 * data/bison.simple, data/bison.c++: Adjust.
16991 * tests/torture.at (Big triangle): Move the limit from 254 to
16992 500.
16993 * tests/regression.at (Web2c Actions): Ajust.
16994
16995 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
16996 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
16997 passes, but produces negative #line number, once fixed, GCC is
16998 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
16999 C), it passes.
17000 * src/state.h (state_h): Code input lines on ints, not shorts.
17001
17002 2002-04-08 Akim Demaille <akim@epita.fr>
17003
17004 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17005 and then the grammar.
17006
17007 2002-04-08 Akim Demaille <akim@epita.fr>
17008
17009 * src/system.h: No longer using strndup.
17010
17011 2002-04-07 Akim Demaille <akim@epita.fr>
17012
17013 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17014 * src/output.c (output_table_data): Return the longest number.
17015 (prepare_tokens): Output `token_number_max').
17016 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17017 New.
17018 Use them to define yy_token_number_type/TokenNumberType.
17019 Use this type for yytranslate.
17020 * tests/torture.at (Big triangle): Push the limit from 124 to
17021 253.
17022 * tests/regression.at (Web2c Actions): Adjust.
17023
17024 2002-04-07 Akim Demaille <akim@epita.fr>
17025
17026 * tests/torture.at (Big triangle): New.
17027 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17028 * tests/existing.at: here.
17029
17030 2002-04-07 Akim Demaille <akim@epita.fr>
17031
17032 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17033 nritems.
17034 Adjust dependencies.
17035
17036 2002-04-07 Akim Demaille <akim@epita.fr>
17037
17038 * src/reader.c: Normalize increments to prefix form.
17039
17040 2002-04-07 Akim Demaille <akim@epita.fr>
17041
17042 * src/reader.c, symtab.c: Remove debugging code.
17043
17044 2002-04-07 Akim Demaille <akim@epita.fr>
17045
17046 Rename all the `bucket's as `symbol_t'.
17047
17048 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17049 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17050 * src/symtab.c, src/symtab.h (bucket): Rename as...
17051 (symbol_t): this.
17052 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17053 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17054 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17055 (buckets_new, buckets_free, buckets_do): Rename as...
17056 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17057 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17058 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17059 (symbols_new, symbols_free, symbols_do): these.
17060
17061 2002-04-07 Akim Demaille <akim@epita.fr>
17062
17063 Use lib/hash for the symbol table.
17064
17065 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17066 EOF.
17067 * src/lex.c (lex): Set the `number' member of new terminals.
17068 * src/reader.c (bucket_check_defined, bucket_make_alias)
17069 (bucket_check_alias_consistence, bucket_translation): New.
17070 (reader, grammar_free, readgram, token_translations_init)
17071 (packsymbols): Adjust.
17072 (reader): Number the predefined tokens.
17073 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17074 for predefined tokens.
17075 * src/symtab.h (bucket): Remove all the hash table related
17076 members.
17077 * src/symtab.c (symtab): Replace by...
17078 (bucket_table): this.
17079 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17080 (buckets_new, buckets_do): New.
17081
17082 2002-04-07 Akim Demaille <akim@epita.fr>
17083
17084 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17085 (start_symbol, max_user_token_number, semantic_parser)
17086 (error_token_number): Initialize.
17087 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17088 Initialize.
17089 (reader): Don't.
17090 (errtoken, eoftoken, undeftoken, axiom): Extern.
17091
17092 2002-04-07 Akim Demaille <akim@epita.fr>
17093
17094 * src/gram.h (rule_s): prec and precsym are now pointers
17095 to the bucket giving the priority/associativity.
17096 Member `associativity' removed: useless.
17097 * src/reduce.c, src/conflicts.c: Adjust.
17098
17099 2002-04-07 Akim Demaille <akim@epita.fr>
17100
17101 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17102 Properly escape the symbols' TAG when outputting them.
17103
17104 2002-04-07 Akim Demaille <akim@epita.fr>
17105
17106 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17107
17108 2002-04-07 Akim Demaille <akim@epita.fr>
17109
17110 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17111 (LArule): this, which is an array to rule_t*.
17112 * src/print.c, src/conflicts.c: Adjust.
17113
17114 2002-04-07 Akim Demaille <akim@epita.fr>
17115
17116 * src/gram.h (rule_t): Rename `number' as `user_number'.
17117 `number' is a new member.
17118 Adjust dependencies.
17119 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17120
17121 2002-04-07 Akim Demaille <akim@epita.fr>
17122
17123 As a result of the previous patch, it is no longer needed
17124 to reorder ritem itself.
17125
17126 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17127
17128 2002-04-07 Akim Demaille <akim@epita.fr>
17129
17130 Be sure never to walk through RITEMS, but use only data related to
17131 the rules themselves. RITEMS should be banished.
17132
17133 * src/output.c (output_token_translations): Rename as...
17134 (prepare_tokens): this.
17135 In addition to `translate', prepare the muscles `tname' and
17136 `toknum', which were handled by...
17137 (output_rule_data): this.
17138 Remove, and move the remainder of its outputs into...
17139 (prepare_rules): this new routines, which also merges content from
17140 (output_gram): this.
17141 (prepare_rules): Be sure never to walk through RITEMS.
17142 (output_stos): Rename as...
17143 (prepare_stos): this.
17144 (output): Always invoke prepare_states, after all, just don't use it
17145 in the output if you don't need it.
17146
17147 2002-04-07 Akim Demaille <akim@epita.fr>
17148
17149 * src/LR0.c (new_state): Display `nstates' as the name of the
17150 newly created state.
17151 Adjust to initialize first_state and last_state if needed.
17152 Be sure to distinguish the initial from the final state.
17153 (new_states): Create the itemset of the initial state, and use
17154 new_state.
17155 * src/closure.c (closure): Now that the initial state has its
17156 items properly set, there is no need for a special case when
17157 creating `ruleset'.
17158
17159 As a result, now the rule 0, reducing to $axiom, is visible in the
17160 outputs. Adjust the test suite.
17161
17162 * tests/conflicts.at (Solved SR Conflicts)
17163 (Unresolved SR Conflicts): Adjust.
17164 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17165 * tests/conflicts.at (S/R in initial): New.
17166
17167 2002-04-07 Akim Demaille <akim@epita.fr>
17168
17169 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17170 the RHS of the rules.
17171 * src/output.c (output_gram): Likewise.
17172
17173 2002-04-07 Akim Demaille <akim@epita.fr>
17174
17175 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17176 bucket.
17177 Adjust all dependencies.
17178 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17179 `number' of the buckets too.
17180 * src/gram.h: Include `symtab.h'.
17181 (associativity): Move to...
17182 * src/symtab.h: here.
17183 No longer include `gram.h'.
17184
17185 2002-04-07 Akim Demaille <akim@epita.fr>
17186
17187 * src/gram.h, src/gram.c (rules_rhs_length): New.
17188 (ritem_longest_rhs): Use it.
17189 * src/gram.h (rule_t): `number' is a new member.
17190 * src/reader.c (packgram): Set it.
17191 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17192 the end of `rules', and count them out of `nrules'.
17193 (reduce_output, dump_grammar): Adjust.
17194 * src/print.c (print_grammar): It is no longer needed to check for
17195 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17196 * tests/reduce.at (Reduced Automaton): New test.
17197
17198 2002-04-07 Akim Demaille <akim@epita.fr>
17199
17200 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17201 lacking `+ 1' to nrules, Bison reported as useless a token if it
17202 was used solely to set the precedence of the last rule...
17203
17204 2002-04-07 Akim Demaille <akim@epita.fr>
17205
17206 * data/bison.c++, data/bison.simple: Don't output the current file
17207 name in #line, to avoid useless diffs between two identical
17208 outputs under different names.
17209
17210 2002-04-07 Akim Demaille <akim@epita.fr>
17211
17212 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17213 Normalize loops to using `< nrules + 1', not `<= nrules'.
17214
17215 2002-04-07 Akim Demaille <akim@epita.fr>
17216
17217 * TODO: Update.
17218
17219 2002-04-07 Akim Demaille <akim@epita.fr>
17220
17221 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17222 bucket.value as bucket.number.
17223
17224 2002-04-07 Akim Demaille <akim@epita.fr>
17225
17226 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17227 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17228 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17229 RHS, instead of being an index in RITEMS.
17230
17231 2002-04-04 Paul Eggert <eggert@twinsun.com>
17232
17233 * doc/bison.texinfo: Update copyright date.
17234 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17235 (Symbols): Warn about running Bison in one character set,
17236 but compiling and/or running in an incompatible one.
17237 Warn about character code 256, too.
17238
17239 2002-04-03 Paul Eggert <eggert@twinsun.com>
17240
17241 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17242 YYERROR_VERBOSE is nonzero, not whether it is defined.
17243
17244 Merge changes from bison-1_29-branch.
17245
17246 2002-03-20 Paul Eggert <eggert@twinsun.com>
17247
17248 Merge fixes from Debian bison_1.34-1.diff.
17249
17250 * configure.in (AC_PREREQ): 2.53.
17251
17252 2002-03-20 Akim Demaille <akim@epita.fr>
17253
17254 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17255
17256 2002-03-19 Paul Eggert <eggert@twinsun.com>
17257
17258 * src/bison.simple (YYCOPY): New macro.
17259 (YYSTACK_RELOCATE): Use it.
17260 Remove Type arg; no longer needed. All callers changed.
17261 (yymemcpy): Remove; no longer needed.
17262
17263 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17264 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17265
17266 2002-03-19 Akim Demaille <akim@epita.fr>
17267
17268 Test and fix the #line outputs.
17269
17270 * tests/atlocal.at (GCC): New.
17271 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
17272 (Prologue synch line, %union synch line, Postprologue synch line)
17273 (Action synch line, Epilogue synch line): New tests.
17274 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17275 * data/bison.simple, data/bison.c++: Use it.
17276
17277 2002-03-19 Akim Demaille <akim@epita.fr>
17278
17279 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17280 (Solved SR Conflicts, %expect not enough, %expect right)
17281 (%expect too much): Move to...
17282 * tests/conflicts.at: this new file.
17283
17284 2002-03-19 Akim Demaille <akim@epita.fr>
17285
17286 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17287 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17288 that we can move to enums for instance.
17289 * src/output.c (token_definitions_output): Output a list of
17290 `token-name, token-number' instead of the #define.
17291 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17292
17293 2002-03-14 Akim Demaille <akim@epita.fr>
17294
17295 Use Gettext 0.11.1.
17296
17297 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
17298
17299 * data/bison.c++: Make the user able to add members to the generated
17300 parser by subclassing.
17301
17302 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
17303
17304 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17305 a character.
17306 Reported by Nicolas Tisserand and Nicolas Burrus.
17307
17308 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17309
17310 * src/reader.c: Warn about lacking semi-colons, do not complain.
17311
17312 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17313
17314 * data/bison.c++: Remove a debug line.
17315
17316 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17317
17318 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
17319 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
17320 provide a default implementation.
17321
17322 2002-03-04 Akim Demaille <akim@epita.fr>
17323
17324 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17325 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17326 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17327 * tests/semantic.at (Parsing Guards): Similarly.
17328 * src/reader.at (readgram): Complain if the last rule is not ended
17329 with a semi-colon.
17330
17331 2002-03-04 Akim Demaille <akim@epita.fr>
17332
17333 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17334 * src/closure.c: here.
17335 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17336 RTC.
17337 * src/warshall.h, src/warshall.c: Remove.
17338 * tests/sets.at (Broken Closure): Adjust.
17339
17340 2002-03-04 Akim Demaille <akim@epita.fr>
17341
17342 * src/output.c (output_skeleton): tempdir is const.
17343 bytes_read is unused.
17344
17345 2002-03-04 Akim Demaille <akim@epita.fr>
17346
17347 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17348 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17349 Update.
17350 From Michael Hayes.
17351
17352 2002-03-04 Akim Demaille <akim@epita.fr>
17353
17354 * src/closure.c (closure): `r' is unused.
17355
17356 2002-03-04 Akim Demaille <akim@epita.fr>
17357
17358 * tests/sets.at (Broken Closure): Add the ending `;'.
17359 * src/reader.at (readgram): Complain if a rule is not ended with a
17360 semi-colon.
17361
17362 2002-03-04 Akim Demaille <akim@epita.fr>
17363
17364 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17365 (count_sr_conflicts): Use bitset_count.
17366 * src/reduce.c (inaccessable_symbols): Ditto.
17367 (bits_size): Remove.
17368 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17369
17370 2002-03-04 Akim Demaille <akim@epita.fr>
17371
17372 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17373 * src/reduce.c: Remove the `bitset_zero's following the
17374 `bitset_create's, as now it is performed by the latter.
17375
17376 2002-03-04 Akim Demaille <akim@epita.fr>
17377
17378 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17379 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17380 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17381 latest sources from Michael.
17382
17383 2002-03-04 Akim Demaille <akim@epita.fr>
17384
17385 * src/output.c (output): Don't free the grammar.
17386 * src/reader.c (grammar_free): New.
17387 * src/main.c (main): Call it and don't free symtab here.
17388
17389 2002-03-04 Akim Demaille <akim@epita.fr>
17390
17391 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17392 before returning.
17393 Reported by Benoit Perrot.
17394
17395 2002-03-04 Akim Demaille <akim@epita.fr>
17396
17397 Use bitset operations when possible, not loops over bits.
17398
17399 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17400 bitset_or.
17401 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17402 * src/reduce.c (useless_nonterminals): Formatting changes.
17403 * src/warshall.c (TC): Use bitset_or.
17404
17405 2002-03-04 Akim Demaille <akim@epita.fr>
17406
17407 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17408 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17409 Ditto.
17410
17411 2002-03-04 Akim Demaille <akim@epita.fr>
17412
17413 * src/lalr.c (F): Now a bitset*.
17414 Adjust all dependencies.
17415
17416 2002-03-04 Akim Demaille <akim@epita.fr>
17417
17418 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17419 Adjust all dependencies.
17420
17421 2002-03-04 Akim Demaille <akim@epita.fr>
17422
17423 * src/L0.c, src/LR0.h (nstates): Be size_t.
17424 Adjust comparisons (signed vs unsigned).
17425 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17426 bitset*.
17427 Adjust all dependencies.
17428
17429 2002-03-04 Akim Demaille <akim@epita.fr>
17430
17431 * src/closure.c (firsts): Now, also a bitset.
17432 Adjust all dependencies.
17433 (varsetsize): Remove, now unused.
17434 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17435
17436 2002-03-04 Akim Demaille <akim@epita.fr>
17437
17438 * src/print.c: Convert to use bitset.h, not hand coded iterations
17439 over ints.
17440
17441 2002-03-04 Akim Demaille <akim@epita.fr>
17442
17443 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17444
17445 2002-03-04 Akim Demaille <akim@epita.fr>
17446
17447 * src/closure.c (ruleset): Be a bitset.
17448 (rulesetsize): Remove.
17449
17450 2002-03-04 Akim Demaille <akim@epita.fr>
17451
17452 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17453 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17454 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17455 * src/closure.c (fderives): Be an array of bitsets.
17456
17457 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
17458
17459 * data/bison.c++: Merge the two generated headers. Insert a copyright
17460 notice in each output file.
17461
17462 2002-02-28 Akim Demaille <akim@epita.fr>
17463
17464 * data/bison.c++: Copy the prologue of bison.simple to fetch
17465 useful M4 definitions, such as b4_header_guard.
17466
17467 2002-02-25 Akim Demaille <akim@epita.fr>
17468
17469 * src/getargs.c (version): Give the name of the authors, and use a
17470 translator friendly scheme for the bgr
17471 copyright notice.
17472
17473 2002-02-25 Akim Demaille <akim@epita.fr>
17474
17475 * src/output.c (header_output): Remove, now handled completely via
17476 M4.
17477
17478 2002-02-25 Akim Demaille <akim@epita.fr>
17479
17480 * m4/m4.m4: New, from CVS Autoconf.
17481 * configure.in: Invoke it.
17482 * src/output.c (output_skeleton): Use its result instead of the
17483 hard coded name.
17484
17485 2002-02-25 Akim Demaille <akim@epita.fr>
17486
17487 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17488 Fileutils 4.1.5.
17489 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17490 * src/output.c (output_skeleton): Use mkstemp to create a real
17491 temporary file.
17492 Move the filling of `skeleton' and its muscle to...
17493 (prepare): here.
17494 (output): Move the definition of the prologue muscle to...
17495 (prepare): here.
17496 * src/system.h (DEFAULT_TMPDIR): New.
17497
17498 2002-02-14 Paul Eggert <eggert@twinsun.com>
17499
17500 Remove the support for C++ namespace cleanliness; it was
17501 causing more problems than it was curing, since it didn't work
17502 properly on some nonstandard C++ compilers. This can wait
17503 for a proper C++ parser.
17504
17505 * NEWS: Document this.
17506 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17507 of C++, as it's treated like C now.
17508 * src/bison.simple (YYSTD): Remove.
17509 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17510 Treat C++ just like Standard C instead of trying to support
17511 namespace cleanliness.
17512
17513 2002-02-14 Akim Demaille <akim@epita.fr>
17514
17515 * tests/regression.at (else): Adjust to Andreas' change.
17516
17517 2002-02-14 Akim Demaille <akim@epita.fr>
17518
17519 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17520
17521 2002-02-13 Andreas Schwab <schwab@suse.de>
17522
17523 * src/output.c (output_rule_data): Don't output NULL, it might
17524 not be defined yet.
17525
17526 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
17527
17528 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17529 (Copyright notice): Update.
17530
17531 2002-02-11 Akim Demaille <akim@epita.fr>
17532
17533 * tests/regression.at (%nonassoc and eof): Don't include
17534 nonportable headers.
17535
17536 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
17537
17538 * data/bison.c++: Correct error recovery. Make the user able to
17539 initialize the starting location.
17540
17541 2002-02-07 Akim Demaille <akim@epita.fr>
17542
17543 * tests/input.at: New.
17544
17545 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17546
17547 * data/bison.c++: Replace some direct m4 expansions by constants. Be
17548 more consistent when naming methods and variables. Put preprocessor
17549 directives around tables only needed for debugging.
17550
17551 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17552
17553 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17554 C++ parsers.
17555 (yy::b4_name::parse): Use print_.
17556
17557 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17558
17559 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17560
17561 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17562
17563 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17564 C++ parsers.
17565 (yy::b4_name::parse): Build verbose error messages, and use error_.
17566
17567 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17568
17569 * data/bison.c++: Fix m4 quoting in comments.
17570
17571 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17572
17573 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17574 not expanded by m4.
17575
17576 2002-02-05 Akim Demaille <akim@epita.fr>
17577
17578 * data/bison.c++: Adjust to the M4 back end.
17579 More is certainly needed.
17580
17581 2002-02-05 Akim Demaille <akim@epita.fr>
17582
17583 Give a try to M4 as a back end.
17584
17585 * lib/readpipe.c: New, from wdiff.
17586 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17587 BISON_HAIRY.
17588 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17589 specific values. Now it is m4 that performs the lookup.
17590 * src/parse-skel.y: Remove.
17591 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17592 * src/output.c (actions_output, guards_output)
17593 (token_definitions_output): No longer keeps track of the output
17594 line number, hence remove the second argument.
17595 (guards_output): Check against the guard member of a rule, not the
17596 action member.
17597 Adjust callers.
17598 (output_skeleton): Don't look for the skeleton location, let m4 do
17599 that.
17600 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17601 file will be used.
17602 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17603 (prepare): Given that for the time being changesyntax is not
17604 usable in M4, rename the muscles using `-' to `_'.
17605 Define `defines_flag', `output_parser_name' and `output_header_name'.
17606 * src/output.h (actions_output, guards_output)
17607 (token_definitions_output): Adjust prototypes.
17608 * src/scan-skel.l: Instead of scanning the skeletons, it now
17609 processes the output of m4: `__oline__' and `#output'.
17610 * data/bison.simple: Adjust to be used by M4(sugar).
17611 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17612 to date.
17613 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17614 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17615 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17616 shamelessly stolen from CVS Autoconf.
17617
17618 2002-02-05 Akim Demaille <akim@epita.fr>
17619
17620 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17621 * configure.in: Check for the declarations of free and malloc.
17622 * src/muscle_tab.c: Adjust.
17623
17624 2002-02-05 Akim Demaille <akim@epita.fr>
17625
17626 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17627 which have no values.
17628
17629 2002-02-05 Akim Demaille <akim@epita.fr>
17630
17631 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17632 * data/: here.
17633
17634 2002-01-29 Paul Eggert <eggert@twinsun.com>
17635
17636 * src/bison.simple (YYSIZE_T): Do not define merely because
17637 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17638 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17639
17640 2002-01-27 Akim Demaille <akim@epita.fr>
17641
17642 Fix `%nonassoc and eof'.
17643
17644 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17645 which were not properly copied! Replace
17646 memcpy (res->errs, src->errs, src->nerrs);
17647 with
17648 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17649 !!!
17650 * tests/regression.at (%nonassoc and eof): Adjust to newest
17651 Autotest: `.' is not in the PATH.
17652
17653 2002-01-27 Akim Demaille <akim@epita.fr>
17654
17655 * tests/sets.at (AT_EXTRACT_SETS): New.
17656 (Nullable): Use it.
17657 (Firsts): New.
17658
17659 2002-01-26 Akim Demaille <akim@epita.fr>
17660
17661 * tests/actions.at, tests/calc.at, tests/headers.at,
17662 * tests/torture.at: Adjust to the newest Autotest which no longer
17663 forces `.' in the PATH.
17664
17665 2002-01-25 Akim Demaille <akim@epita.fr>
17666
17667 * tests/regression.at (%nonassoc and eof): New.
17668 Suggested by Robert Anisko.
17669
17670 2002-01-24 Akim Demaille <akim@epita.fr>
17671
17672 Bison dumps core when trying to complain about broken input files.
17673 Reported by Cris van Pelt.
17674
17675 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17676 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17677 into...
17678 (Invalid inputs): Strengthen: exercise parse_percent_token.
17679
17680 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
17681
17682 * src/Makefile.am: Add bison.c++.
17683 * src/bison.c++: New skeleton.
17684
17685 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
17686
17687 * po/it.po: New.
17688
17689 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17690
17691 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17692
17693 2002-01-20 Marc Autret <marc@gnu.org>
17694
17695 * src/files.c (compute_output_file_names): Fix
17696
17697 2002-01-20 Marc Autret <marc@gnu.org>
17698
17699 * tests/output.at: New test.
17700 * src/files.c (compute_base_names): Don't map extensions when
17701 the YACC flag is set, use defaults.
17702 Reported by Evgeny Stambulchik.
17703
17704 2002-01-20 Marc Autret <marc@gnu.org>
17705
17706 * src/system.h: Need to define __attribute__ away for non-GCC
17707 compilers as well (i.e., the vendor C compiler).
17708 Suggested by Albert Chin-A-Young.
17709
17710 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
17711
17712 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17713 canonical definition.
17714 * src/system.h: Use the canonical definition for PARAMS (avoids
17715 a conflict with the macro from lib/hash.h).
17716
17717 2002-01-11 Akim Demaille <akim@epita.fr>
17718
17719 * configure.in: Use AC_FUNC_STRNLEN.
17720 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
17721
17722 2002-01-09 Akim Demaille <akim@epita.fr>
17723
17724 * src/files.c, src/files.h (output_infix): New.
17725 (tab_extension): Remove.
17726 (compute_base_names): Compute the former, drop the latter.
17727 * src/output.c (prepare): Insert the muscles `output-infix', and
17728 `output-suffix'.
17729 * src/parse-skel.y (string, string.1): New.
17730 (section.header): Use it.
17731 (section.yacc): Remove.
17732 (prefix): Remove too.
17733 * src/scan-skel.l: Adjust.
17734 * src/bison.simple, src/bison.hairy: Adjust.
17735
17736 2002-01-09 Akim Demaille <akim@epita.fr>
17737
17738 * configure.in (WERROR_CFLAGS): Compute it.
17739 * src/Makefile.am (CFLAGS): Pass it.
17740 * tests/atlocal.in (CFLAGS): Idem.
17741 * src/files.c: Fix a few warnings.
17742 (get_extension_index): Remove, unused.
17743
17744 2002-01-08 Akim Demaille <akim@epita.fr>
17745
17746 * src/getargs.c (AS_FILE_NAME): New.
17747 (getargs): Use it to convert DOSish file names.
17748 * src/files.c (base_name): Rename as full_base_name to avoid
17749 clashes with `base_name ()'.
17750 (filename_split): New.
17751 (compute_base_names): N-th rewrite, using filename_split.
17752
17753 2002-01-08 Akim Demaille <akim@epita.fr>
17754
17755 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
17756 New, stolen from the Fileutils 4.1.
17757 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17758 * configure.in: Check for the presence of memrchr, and of its
17759 prototype.
17760
17761 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
17762
17763 * lib/hash.h (__P): Added definition for this macro.
17764 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
17765 BUILT_SOURCES, to ensure they are generated first.
17766 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
17767 %error-verbose to allow bootstrapping with bison 1.30x.
17768
17769 2002-01-06 Akim Demaille <akim@epita.fr>
17770
17771 * src/reader.c (parse_braces): Don't fetch the next char, the
17772 convention is to fetch on entry.
17773 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
17774 'switch' without a following semicolon.
17775 * tests/regression.at (braces parsing): New.
17776
17777 2002-01-06 Akim Demaille <akim@epita.fr>
17778
17779 Bison is dead wrong in its RR conflict reports.
17780
17781 * tests/torture.at (GNU Cim Grammar): New.
17782 * src/conflicts.c (count_rr_conflicts): Fix.
17783
17784 2002-01-06 Akim Demaille <akim@epita.fr>
17785
17786 Creating package.m4 from configure.ac causes too many problems.
17787
17788 * tests/Makefile.am (package.m4): Create it by hand,
17789 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
17790
17791 2002-01-06 Akim Demaille <akim@epita.fr>
17792
17793 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
17794 skeleton.h.
17795
17796 2002-01-04 Paul Eggert <eggert@twinsun.com>
17797
17798 * doc/bison.texinfo (Debugging):
17799 Remove YYSTDERR; it's no longer defined or used.
17800 Also, s/cstdio.h/cstdio/.
17801
17802 2002-01-03 Akim Demaille <akim@epita.fr>
17803
17804 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
17805
17806 2002-01-03 Akim Demaille <akim@epita.fr>
17807
17808 * src/parse-skel.y (process_skeleton): Don't bind the parser's
17809 tracing code to --trace, wait for a better --trace option, with
17810 args.
17811
17812 2002-01-03 Akim Demaille <akim@epita.fr>
17813
17814 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
17815 The ISO C++ standard is extremely clear about it: stderr is
17816 considered a macro, not a regular symbol (see table 94 `Header
17817 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
17818 Therefore std:: does not apply to it. It still does with fprintf.
17819 Also, s/cstdio.h/cstdio/.
17820
17821 2002-01-03 Akim Demaille <akim@epita.fr>
17822
17823 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
17824 for non system headers.
17825
17826 2002-01-02 Akim Demaille <akim@epita.fr>
17827
17828 Equip the skeleton chain with location tracking, runtime trace,
17829 pure parser and scanner.
17830
17831 * src/parse-skel.y: Request a pure parser, locations, and prefix
17832 renaming.
17833 (%union): Having several members with the same type does not help
17834 type mismatches, simplify.
17835 (YYPRINT, yyprint): New.
17836 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
17837 (skel_error): this.
17838 Handle locations.
17839 * src/scan-skel.l: Adjust to these changes.
17840 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
17841 (LOCATION_PRINT, skel_control_t): New.
17842
17843 2001-12-30 Akim Demaille <akim@epita.fr>
17844
17845 * src/parse-skel.y: Get rid of the shift/reduce conflict:
17846 replace `gb' with BLANKS.
17847 * src/scan-skel.l: Adjust.
17848
17849 2001-12-30 Akim Demaille <akim@epita.fr>
17850
17851 * src/system.h: We don't need nor want bcopy.
17852 Throw away MS-DOS crap: we don't need getpid.
17853 * configure.in: We don't need strndup. It was even causing
17854 problems: because Flex includes the headers *before* us,
17855 _GNU_SOURCE is not defined by config.h, and therefore strndup was
17856 not visible.
17857 * lib/xstrndup.c: New.
17858 * src/scan-skel.l: Use it.
17859 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
17860 * src/parse-skel.y: Use %directives instead of #defines.
17861
17862 2001-12-30 Akim Demaille <akim@epita.fr>
17863
17864 * src/skeleton.h: New.
17865 * src/output.c (output_parser, output_master_parser): Remove, dead
17866 code.
17867 * src/output.h (get_lines_number, actions_output, guards_output)
17868 (token_definitions_output): Prototype them.
17869 * src/parse-skel.y: Add the license notice.
17870 Include output.h and skeleton.h.
17871 (process_skeleton): Returns void, and takes a single parameter.
17872 * src/scan-skel.l: Add the license notice.
17873 Include skeleton.h.
17874 Don't use %option yylineno: it seems that then Flex imagines
17875 REJECT has been used, and therefore it won't reallocate its
17876 buffers (which makes no other sense to me than a bug). It results
17877 in warnings for `unused: yy_flex_realloc'.
17878
17879 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
17880
17881 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17882 (MUSCLE_INSERT_PREFIX): ...to there.
17883 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17884 (MUSCLE_INSERT_PREFIX): Move from here...
17885
17886 * src/bison.hairy: Add a section directive. Put braces around muscle
17887 names. This parser skeleton is still broken, but Bison should not
17888 choke on a bad muscle 'syntax'.
17889 * src/bison.simple: Add a section directive. Put braces around muscle
17890 names.
17891
17892 * src/files.h (strsuffix, stringappend): Add declarations.
17893 (tab_extension): Add declaration.
17894 (short_base_name): Add declaration.
17895
17896 * src/files.c (strsuffix, stringappend): No longer static. These
17897 functions are used in the skeleton parser.
17898 (tab_extension): New.
17899 (compute_base_names): Use the computations done in this function
17900 to guess if the generated parsers should have '.tab' in their
17901 names.
17902 (short_base_name): No longer static.
17903
17904 * src/output.c (output_skeleton): New.
17905 (output): Disable call to output_master_parser, and give a try to
17906 a new skeleton handling system.
17907 (guards_output, actions_output): No longer static.
17908 (token_definitions_output, get_lines_number): No longer static.
17909
17910 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
17911
17912 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
17913 parse-skel.y.
17914
17915 * src/parse-skel.y: New file.
17916 * src/scan-skel.l: New file.
17917
17918 2001-12-29 Akim Demaille <akim@epita.fr>
17919
17920 %name-prefix is broken.
17921
17922 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
17923 Adjust all dependencies.
17924 * tests/headers.at (export YYLTYPE): Strengthen this test: use
17925 %name-prefix.
17926
17927 Renaming yylval but not yylloc is not consistent. Now we do.
17928
17929 * src/bison.simple: Prefix yylloc if used.
17930 * doc/bison.texinfo (Decl Summary): Document that.
17931
17932 2001-12-29 Akim Demaille <akim@epita.fr>
17933
17934 * doc/bison.texinfo: Promote `%long-directive' over
17935 `%long_directive'.
17936 Remove all references to fixed-output-files, yacc is enough.
17937
17938 2001-12-29 Akim Demaille <akim@epita.fr>
17939
17940 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
17941 user prologue. These are defaults.
17942 * tests/actions.at (Mid-rule actions): Make sure the user can
17943 define YYDEBUG and YYERROR_VERBOSE.
17944
17945 2001-12-29 Akim Demaille <akim@epita.fr>
17946
17947 * src/output.c (header_output): Don't forget to export YYLTYPE and
17948 yylloc.
17949 * tests/headers.at (export YYLTYPE): New, make sure it does.
17950 * tests/regression.at (%union and --defines, Invalid CPP headers):
17951 Move to...
17952 * tests/headers.at: here.
17953
17954 2001-12-29 Akim Demaille <akim@epita.fr>
17955
17956 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
17957
17958 2001-12-29 Akim Demaille <akim@epita.fr>
17959
17960 * tests/actions.at (Mid-rule actions): Output on a single line
17961 instead of several.
17962
17963 2001-12-29 Akim Demaille <akim@epita.fr>
17964
17965 * doc/bison.texinfo: Formatting changes.
17966
17967 2001-12-29 Akim Demaille <akim@epita.fr>
17968
17969 Don't store the token defs in a muscle, just be ready to output it
17970 on command. Now possible via `symbols'. Fixes a memory leak.
17971
17972 * src/output.c (token_definitions_output): New.
17973 (output_parser, header_output): Use it.
17974 * src/reader.c (symbols_save): Remove.
17975
17976 2001-12-29 Akim Demaille <akim@epita.fr>
17977
17978 * src/bison.simple: Do not provide a default for YYSTYPE and
17979 YYLTYPE before the user's prologue. Otherwise it's hardly... a
17980 default.
17981
17982 2001-12-29 Akim Demaille <akim@epita.fr>
17983
17984 Mid-rule actions are simply... ignored!
17985
17986 * src/reader.c (readgram): Be sure to attach mid-rule actions to
17987 the empty-rule associated to the dummy symbol, not to the host
17988 rule.
17989 * tests/actions.at (Mid-rule actions): New.
17990
17991 2001-12-29 Akim Demaille <akim@epita.fr>
17992
17993 Memory leak.
17994
17995 * src/reader.c (reader): Free grammar.
17996
17997 2001-12-29 Akim Demaille <akim@epita.fr>
17998
17999 Memory leak.
18000
18001 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18002 since it allocates it for each state, although only one is needed.
18003 (allocate_storage): Do it here.
18004
18005 2001-12-29 Akim Demaille <akim@epita.fr>
18006
18007 * src/options.h, src/options.c (create_long_option_table): Rename
18008 as...
18009 (long_option_table_new): this, with a clearer prototype.
18010 (percent_table): Remove, unused,
18011 * src/getargs.c (getargs): Adjust.
18012
18013 2001-12-29 Akim Demaille <akim@epita.fr>
18014
18015 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18016 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18017 as states.
18018
18019 2001-12-29 Akim Demaille <akim@epita.fr>
18020
18021 * src/lalr.c (build_relations): Rename `states' as `states1'.
18022 Sorry, I don't understand exactly what it is, no better name...
18023
18024 2001-12-29 Akim Demaille <akim@epita.fr>
18025
18026 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18027 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18028 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18029 as rules.
18030
18031 2001-12-29 Akim Demaille <akim@epita.fr>
18032
18033 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18034 ago.
18035
18036 2001-12-29 Akim Demaille <akim@epita.fr>
18037
18038 * src/reader.c, src/reader.h (user_toknums): Remove.
18039 Adjust all users to use symbols[i]->user_token_number.
18040
18041 2001-12-29 Akim Demaille <akim@epita.fr>
18042
18043 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18044 Adjust all users to use symbols[i]->prec or ->assoc.
18045
18046 2001-12-29 Akim Demaille <akim@epita.fr>
18047
18048 * src/reader.c, src/reader.h (tags): Remove.
18049 Adjust all users to use symbols[i]->tag.
18050
18051 2001-12-29 Akim Demaille <akim@epita.fr>
18052
18053 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18054 and rule_table.
18055 * src/reader.c (packsymbols): Fill this table.
18056 Drop sprec.
18057 * src/conflicts.c (resolve_sr_conflict): Adjust.
18058 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18059 single table.
18060 Use symbols[i]->tag instead of tags[i].
18061
18062 2001-12-29 Akim Demaille <akim@epita.fr>
18063
18064 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18065 In addition, put a comment in there, to replace...
18066 * tests/regression.at (%union and C comments): Remove.
18067
18068 2001-12-29 Akim Demaille <akim@epita.fr>
18069
18070 * tests/regression.at (Web2c Actions): Blindly move the actual
18071 output as expected output. The contents *seem* right to me, but I
18072 can't pretend reading perfectly parser tables... Nonetheless, all
18073 the other tests pass correctly, the table look OK, even though the
18074 presence of `$axiom' is to be noted: AFAICS it is useless (but
18075 harmless).
18076
18077 2001-12-29 Akim Demaille <akim@epita.fr>
18078
18079 * src/reader.c (readgram): Don't add the rule 0 if there were no
18080 rules read. In other words, add it _after_ having performed
18081 grammar sanity checks.
18082 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18083
18084 2001-12-29 Akim Demaille <akim@epita.fr>
18085
18086 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18087 visible, and some states have now a different number.
18088
18089 2001-12-29 Akim Demaille <akim@epita.fr>
18090
18091 * src/reader.c (readgram): Bind the initial rule's lineno to that
18092 of the first rule.
18093 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18094 (Solved SR Conflicts): Adjust rule 0's line number.
18095
18096 2001-12-29 Akim Demaille <akim@epita.fr>
18097
18098 Fix the `GAWK Grammar' failure.
18099
18100 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18101 the reductions of the first state which was mistakenly confused
18102 with the final state because precisely final_state was initialized
18103 to 0.
18104 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18105 now noticed by Bison.
18106 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18107 have a reduction on $default.
18108
18109 2001-12-29 Akim Demaille <akim@epita.fr>
18110
18111 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18112 rule line numbers.
18113 * src/closure.c (print_closure): Likewise.
18114 * src/derives.c (print_derives): Likewise.
18115 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18116 now.
18117
18118 2001-12-29 Akim Demaille <akim@epita.fr>
18119
18120 * src/lalr.c (lookaheads_print): New.
18121 (lalr): Call it when --trace-flag.
18122 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18123 are dumped.
18124
18125 2001-12-29 Akim Demaille <akim@epita.fr>
18126
18127 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18128 when walking through ritem, even via rule->rhs.
18129 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18130 (useful_production, useless_nonterminals): Likewise.
18131 (reduce_grammar_tables): Likewise, plus update nritems.
18132 * src/nullable.c (set_nullable): Likewise.
18133 * src/lalr.c (build_relations): Likewise.
18134 * tests/sets.at (Nullable): Adjust.
18135 Fortunately, now, the $axiom is no longer nullable.
18136
18137 2001-12-29 Akim Demaille <akim@epita.fr>
18138
18139 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18140 the 0-sentinel.
18141 * src/gram.c (ritem_longest_rhs): Likewise.
18142 * src/reduce.c (nonterminals_reduce): Likewise.
18143 * src/print_graph.c (print_graph): Likewise.
18144 * src/output.c (output_rule_data): Likewise.
18145 * src/nullable.c (set_nullable): Likewise.
18146
18147 2001-12-29 Akim Demaille <akim@epita.fr>
18148
18149 * src/output.c: Comment changes.
18150
18151 2001-12-27 Paul Eggert <eggert@twinsun.com>
18152
18153 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18154 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18155 Sparc, as they were causing more porting problems than the
18156 (minor) performance improvement was worth.
18157
18158 Also, catch up with 1.31's YYSTD.
18159
18160 2001-12-27 Akim Demaille <akim@epita.fr>
18161
18162 * src/output.c (output_gram): Rely on nritems, not the
18163 0-sentinel. See below.
18164 Use -1 as separator, not 0.
18165 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18166 Rely on -1 as separator in yyrhs, instead of 0.
18167 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18168 twice `Now at end of input', therefore there are two lines less to
18169 expect.
18170
18171 2001-12-27 Akim Demaille <akim@epita.fr>
18172
18173 * tests/regression.at (Unresolved SR Conflicts):
18174 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18175 below.
18176
18177 2001-12-27 Akim Demaille <akim@epita.fr>
18178
18179 * src/LR0.c (new_state): Recognize the final state by the fact it
18180 is reached by eoftoken.
18181 (insert_start_shifting_state, insert_eof_shifting_state)
18182 (insert_accepting_state, augment_automaton): Remove, since now
18183 these states are automatically computed from the initial state.
18184 (generate_states): Adjust.
18185 * src/print.c: When reporting a rule number to the user, substract
18186 1, so that the axiom rule is rule 0, and the first user rule is 1.
18187 * src/reduce.c: Likewise.
18188 * src/print_graph.c (print_core): For the time being, just as for
18189 the report, depend upon --trace-flags to dump the full set of
18190 items.
18191 * src/reader.c (readgram): Once the grammar read, insert the rule
18192 0: `$axiom: START-SYMBOL $'.
18193 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18194 number of the states has changed (the final state is no longer
18195 necessarily the last), catch up.
18196
18197 2001-12-27 Akim Demaille <akim@epita.fr>
18198
18199 Try to make the use of the eoftoken valid. Given that its value
18200 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18201 is used instead of > 0 where appropriate, (ii), depend upon nritems
18202 instead of the 0-sentinel.
18203
18204 * src/gram.h, src/gram.c (nritems): New.
18205 Expected to be duplication of nitems, but for the time being...
18206 * src/reader.c (packgram): Assert nritems and nitems are equal.
18207 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18208 * src/closure.c (print_closure, print_fderives): Likewise.
18209 * src/gram.c (ritem_print): Likewise.
18210 * src/print.c (print_core, print_grammar): Likewise.
18211 * src/print_graph.c: Likewise.
18212
18213 2001-12-27 Akim Demaille <akim@epita.fr>
18214
18215 * src/main.c (main): If there are complains after grammar
18216 reductions, then output the report anyway if requested, then die.
18217 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18218 * src/reader.c (eoftoken): New.
18219 (parse_token_decl): If the token being defined has value `0', it
18220 is the eoftoken.
18221 (packsymbols): No longer hack `tags' to insert `$' by hand.
18222 Be sure to preserve the value of the eoftoken.
18223 (reader): Make sure eoftoken is defined.
18224 Initialize nsyms to 0: now eoftoken is created just like the others.
18225 * src/print.c (print_grammar): Don't special case the eof token.
18226 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18227 lie anyway, albeit pleasant.
18228 * tests/calc.at: Exercise error messages with eoftoken.
18229 Change the grammar so that empty input is invalid.
18230 Adjust expectations.
18231 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18232
18233 2001-12-27 Akim Demaille <akim@epita.fr>
18234
18235 * configure.in: Check the protos of strchr ans strspn.
18236 Replace strchr if needed.
18237 * src/system.h: Provide the protos of strchr, strspn and memchr if
18238 missing.
18239 * lib/strchr.c: New.
18240 * src/reader.c (symbols_save): Use strchr.
18241
18242 2001-12-27 Akim Demaille <akim@epita.fr>
18243
18244 * src/print.c, src/print_graph.c (escape): New.
18245 Use it to quote the TAGS outputs.
18246 * src/print_graph.c (print_state): Now errors are in red, and
18247 reductions in green.
18248 Prefer high to wide: output the state number on a line of its own.
18249
18250 2001-12-27 Akim Demaille <akim@epita.fr>
18251
18252 * src/state.h, src/state.c (reductions_new): New.
18253 * src/LR0.c (set_state_table): Let all the states have a
18254 `reductions', even if reduced to 0.
18255 (save_reductions): Adjust.
18256 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18257 * src/print.c (print_reductions, print_actions): Adjust.
18258 * src/output.c (action_row): Adjust.
18259
18260 2001-12-27 Akim Demaille <akim@epita.fr>
18261
18262 * src/state.h, src/state.c (errs_new, errs_dup): New.
18263 * src/LR0.c (set_state_table): Let all the states have an errs,
18264 even if reduced to 0.
18265 * src/print.c (print_errs, print_reductions): Adjust.
18266 * src/output.c (output_actions, action_row): Adjust.
18267 * src/conflicts.c (resolve_sr_conflict): Adjust.
18268
18269 2001-12-27 Akim Demaille <akim@epita.fr>
18270
18271 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18272
18273 2001-12-27 Akim Demaille <akim@epita.fr>
18274
18275 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18276 * src/print.c: here.
18277 (lookaheadset, shiftset): New, used as additional storage by
18278 print_reductions.
18279 (print_results): Adjust.
18280 (print_shifts, print_gotos, print_errs): New, extracted from...
18281 (print_actions): here.
18282 * src/print_graph.c (print_actions): Remove dead code.
18283
18284 2001-12-27 Akim Demaille <akim@epita.fr>
18285
18286 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18287 `$n' and `@n'.
18288
18289 2001-12-27 Akim Demaille <akim@epita.fr>
18290
18291 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18292 (build_relations): Adjust.
18293
18294 2001-12-27 Akim Demaille <akim@epita.fr>
18295
18296 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18297 duplication.
18298
18299 2001-12-27 Akim Demaille <akim@epita.fr>
18300
18301 * src/reader.c (packgram): Catch nitems overflows.
18302
18303 2001-12-27 Akim Demaille <akim@epita.fr>
18304
18305 * src/files.c, src/files.h (guard_obstack): Remove.
18306 * src/output.c (output): Adjust.
18307 * src/reader.c (parse_braces): New, factoring...
18308 (copy_action, copy_guard): these two which are renamed as...
18309 (parse_action, parse_guard): these.
18310 As a voluntary consequence, using braces around guards is now
18311 mandatory.
18312
18313 2001-12-27 Akim Demaille <akim@epita.fr>
18314
18315 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18316 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18317 members.
18318 (symbol_list_new): Adjust.
18319 (copy_action): action_line is the first line, not the last.
18320 (copy_guard): Just as for actions, store the `action' only, not
18321 the switch/case/break flesh.
18322 Don't parse the user action that might follow the guard, let...
18323 (readgram): do it, i.e., now, there can be an action after a
18324 guard.
18325 In other words the guard is just explicitly optional.
18326 (packgram): Adjust.
18327 * src/output.c (guards_output): New.
18328 (output_parser): Call it when needed.
18329 (output): Also free the guard and attrs obstacks.
18330 * src/files.c, src/files.h (obstack_save): Remove.
18331 (output_files): Remove.
18332 As a result, if one needs the former `.act' file, using an
18333 appropriate skeleton which requires actions and guards is now
18334 required.
18335 * src/main.c (main): Adjust.
18336 * tests/semantic.at: New.
18337 * tests/regression.at: Use `input.y' as input file name.
18338 Avoid 8+3 problems by requiring input.c when the test needs the
18339 parser.
18340
18341 2001-12-27 Akim Demaille <akim@epita.fr>
18342
18343 * src/reader.c (symbol_list_new): Be sure to initialize all the
18344 fields.
18345
18346 2001-12-27 Akim Demaille <akim@epita.fr>
18347
18348 All the hacks using a final pseudo state are now useless.
18349
18350 * src/LR0.c (set_state_table): state_table holds exactly nstates.
18351 * src/lalr.c (nLA): New.
18352 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18353 instead of lookaheadsp from the pseudo state (nstate + 1).
18354
18355 2001-12-27 Akim Demaille <akim@epita.fr>
18356
18357 * src/output.c (action_row, token_actions): Use a state_t instead
18358 of a integer, and nlookaheads instead of the following state's
18359 lookaheadsp.
18360
18361 2001-12-27 Akim Demaille <akim@epita.fr>
18362
18363 * src/conflicts.c (log_resolution, flush_shift)
18364 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18365 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18366 (conflicts_print, print_reductions): Use a state_t instead of an
18367 integer when referring to a state.
18368 As much as possible, depend upon nlookaheads, instead of the
18369 `lookaheadsp' member of the following state (since lookaheads of
18370 successive states are successive, the difference between state n + 1
18371 and n served as the number of lookaheads for state n).
18372 * src/lalr.c (add_lookback_edge): Likewise.
18373 * src/print.c (print_core, print_actions, print_state)
18374 (print_results): Likewise.
18375 * src/print_graph.c (print_core, print_actions, print_state)
18376 (print_graph): Likewise.
18377 * src/conflicts.h: Adjust.
18378
18379 2001-12-27 Akim Demaille <akim@epita.fr>
18380
18381 * src/bison.hairy: Formatting/comment changes.
18382 ANSIfy.
18383 Remove `register' indications.
18384 Add plenty of `static'.
18385
18386 2001-12-27 Akim Demaille <akim@epita.fr>
18387
18388 * src/output.c (prepare): Drop the muscle `ntbase' which
18389 duplicates ntokens.
18390 * src/bison.simple: Formatting/comment changes.
18391 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18392 is an undocumented synonym.
18393
18394 2001-12-22 Akim Demaille <akim@epita.fr>
18395
18396 * src/output.c (output_table_data): Change the prototype to use
18397 `int' for array ranges: some invocations do pass an int, not a
18398 short.
18399 Reported by Wayne Green.
18400
18401 2001-12-22 Akim Demaille <akim@epita.fr>
18402
18403 Some actions of web2c.y are improperly triggered.
18404 Reported by Mike Castle.
18405
18406 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18407 * tests/regression.at (Web2c): Rename as...
18408 (Web2c Report): this.
18409 (Web2c Actions): New.
18410
18411 2001-12-22 Akim Demaille <akim@epita.fr>
18412
18413 Reductions in web2c.y are improperly reported.
18414 Reported by Mike Castle.
18415
18416 * src/conflicts.c (print_reductions): Fix.
18417 * tests/regression.at (Web2c): New.
18418
18419 2001-12-18 Akim Demaille <akim@epita.fr>
18420
18421 Some host fail on `assert (!"foo")', which expands to
18422 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18423 Reported by Nelson Beebee.
18424
18425 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18426 `#define it_succeeded 0' and `assert (it_succeeded)'.
18427
18428 2001-12-17 Marc Autret <autret_m@epita.fr>
18429
18430 * src/bison.simple: Don't hard code the skeleton line and filename.
18431 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18432 New line counter 'skeleton_line' (skeleton-line muscle).
18433
18434 2001-12-17 Paul Eggert <eggert@twinsun.com>
18435
18436 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18437 YYDEBUG must be defined to a nonzero value.
18438
18439 * src/bison.simple (yytname): Do not assume that the user defines
18440 YYDEBUG to a properly parenthesized expression.
18441
18442 2001-12-17 Akim Demaille <akim@epita.fr>
18443
18444 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18445 nlookaheads is a new member.
18446 Adjust all users.
18447 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18448 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18449 state.
18450
18451 2001-12-17 Akim Demaille <akim@epita.fr>
18452
18453 * src/files.h, src/files.c (open_files, close_files): Remove.
18454 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18455 let...
18456 * src/reader.c (reader): Do it.
18457
18458 2001-12-17 Akim Demaille <akim@epita.fr>
18459
18460 * src/conflicts.c (print_reductions): Formatting changes.
18461
18462 2001-12-17 Akim Demaille <akim@epita.fr>
18463
18464 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18465 (flush_reduce): New.
18466 (resolve_sr_conflict): Adjust.
18467
18468 2001-12-17 Akim Demaille <akim@epita.fr>
18469
18470 * src/output.c (output_obstack): Be static and rename as...
18471 (format_obstack): this, to avoid any confusion with files.c's
18472 output_obstack.
18473 * src/reader.h (muscle_obstack): Move to...
18474 * src/output.h: here, since it's defined in output.c.
18475
18476 2001-12-17 Akim Demaille <akim@epita.fr>
18477
18478 * src/output.c (action_row, save_column, default_goto)
18479 (sort_actions, matching_state, pack_vector): Better variable
18480 locality.
18481
18482 2001-12-17 Akim Demaille <akim@epita.fr>
18483
18484 * src/output.c: Various formatting changes.
18485
18486 2001-12-17 Akim Demaille <akim@epita.fr>
18487
18488 * src/files.c (output_files): Free the output_obstack.
18489 * src/main.c (main): Call print and print_graph conditionally.
18490 * src/print.c (print): Work unconditionally.
18491 * src/print_graph.c (print_graph): Work unconditionally.
18492 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18493
18494 2001-12-16 Marc Autret <autret_m@epita.fr>
18495
18496 * src/output.c (actions_output): Fix. When we use %no-lines,
18497 there is one less line per action.
18498
18499 2001-12-16 Marc Autret <autret_m@epita.fr>
18500
18501 * src/bison.simple: Remove a useless #line directive.
18502 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18503 * src/output.c (get_lines_number): New.
18504 (output_parser): Adjust, now takes care about the lines of a
18505 output muscles.
18506 Fix line numbering.
18507 (actions_output): Computes the number of lines taken by actions.
18508 (output_master_parser): Insert new skeleton which is the name of
18509 the output parser file name.
18510
18511 2001-12-15 Marc Autret <autret_m@epita.fr>
18512
18513 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18514
18515 2001-12-15 Marc Autret <autret_m@epita.fr>
18516
18517 * src/output.c (output_gram): Keep track of the hairy one.
18518
18519 2001-12-15 Akim Demaille <akim@epita.fr>
18520
18521 Make `make distcheck' work.
18522
18523 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18524 system.h which uses libgettext.h.
18525
18526 2001-12-15 Akim Demaille <akim@epita.fr>
18527
18528 * src/nullable.c (set_nullable): Useless rules must be skipped,
18529 otherwise, since we range over their symbols, we might look at a
18530 nonterminal which no longer ``exists'', i.e., it is not counted in
18531 `nvars', hence we overflow our arrays.
18532
18533 2001-12-15 Akim Demaille <akim@epita.fr>
18534
18535 The header can also be produced directly, without any obstack!
18536 Yahoo!
18537
18538 * src/files.c, src/files.h (defines_obstack): Remove.
18539 (compute_header_macro): Global.
18540 (defines_obstack_save): Remove.
18541 * src/reader.c (parse_union_decl): No longer output to
18542 defines_obstack: its content can be found in the `stype' muscle
18543 anyway.
18544 (output_token_translations): Merge into...
18545 (symbols_output): this.
18546 Rename as...
18547 (symbols_save): this.
18548 (reader): Adjust.
18549 * src/output.c (header_output): New.
18550 (output): Call it.
18551
18552 2001-12-15 Akim Demaille <akim@epita.fr>
18553
18554 * src/reader.c (parse_union_decl): Instead of handling two obstack
18555 simultaneously, use one to define the `stype' muscle, and use the
18556 value of the latter to fill defines_obstack.
18557 (copy_comment): Remove.
18558 (copy_comment2): Work for a single obstack.
18559 Rename as...
18560 (copy_comment): this.
18561
18562 2001-12-15 Akim Demaille <akim@epita.fr>
18563
18564 * src/lex.c, src/lex.h (xgetc): No longer static.
18565 * src/reader.c (parse_union_decl): Revamp.
18566
18567 2001-12-15 Akim Demaille <akim@epita.fr>
18568
18569 Still making progress in separating Bison into (i) input, (ii)
18570 process, (iii) output: now we can directly output the parser file
18571 without using table_obstack at all.
18572
18573 * src/files.c, src/files.h (table_obstack): Bye bye.
18574 (parser_file_name): New.
18575 * src/files.c (compute_output_file_names): Compute it.
18576 * src/output.c (actions_output, output_parser)
18577 (output_master_parser): To a file instead of an obstack.
18578
18579 2001-12-15 Akim Demaille <akim@epita.fr>
18580
18581 Attach actions to rules, instead of pre-outputting them to
18582 actions_obstack.
18583
18584 * src/gram.h (rule_t): action and action_line are new members.
18585 * src/reader.c (symbol_list): Likewise.
18586 (copy_action): Save the actions within the rule.
18587 (packgram): Save them in rule_table.
18588 * src/output.c (actions_output): New.
18589 (output_parser): Use it on `%%actions'.
18590 (output_rule_data): Don't free rule_table.
18591 (output): Do it.
18592 (prepare): Don't save the `action' muscle.
18593 * src/bison.simple: s/%%action/%%actions/.
18594
18595 2001-12-15 Akim Demaille <akim@epita.fr>
18596
18597 * src/reader.c (copy_action): When --yacc, don't append a `;'
18598 to the user action: let it fail if lacking.
18599 Suggested by Arnold Robbins and Tom Tromey.
18600
18601 2001-12-14 Akim Demaille <akim@epita.fr>
18602
18603 * src/lex.c (literalchar): Simply return the char you decoded, non
18604 longer mess around with obstacks and int pointers.
18605 Adjust all callers.
18606
18607 2001-12-14 Akim Demaille <akim@epita.fr>
18608
18609 * src/lex.c (literalchar): Don't escape the special characters,
18610 just decode them, and keep them as char (before, eol was output as
18611 the 2 char string `\n' etc.).
18612 * src/output.c (output_rule_data): Use quotearg to output the
18613 token strings.
18614
18615 2001-12-13 Paul Eggert <eggert@twinsun.com>
18616
18617 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18618 Do not infringe on the global user namespace when using C++.
18619 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18620 All uses of `fprintf' and `stderr' changed.
18621
18622 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18623
18624 2001-12-13 Akim Demaille <akim@epita.fr>
18625
18626 The computation of nullable is broken: it doesn't handle empty
18627 RHS's properly.
18628
18629 * tests/torture.at (GNU AWK Grammar): New.
18630 * tests/sets.at (Nullable): New.
18631 * src/nullable.c (set_nullable): Instead of blindly looping over
18632 `ritems', loop over the rules, and then over their rhs's.
18633
18634 Work around Autotest bugs.
18635
18636 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18637 frame, because Autotest understand lines starting with a `+' as
18638 traces from the shell. Then, they are not processed properly.
18639 Admittedly an Autotest bug, but we don't have time to wait for
18640 Autotest to catch up.
18641 * tests/regression.at (Broken Closure): Adjust to the new table
18642 frames.
18643 Move to...
18644 * tests/sets.at: here.
18645
18646 2001-12-13 Akim Demaille <akim@epita.fr>
18647
18648 * src/closure.c (closure): Use nrules instead of playing tricks
18649 with BITS_PER_WORD.
18650
18651 2001-12-13 Akim Demaille <akim@epita.fr>
18652
18653 * src/print.c (print_actions): Output the handling of `$' as the
18654 traces do: shifting the token EOF. Before EOF was treated as a
18655 nonterminal.
18656 * tests/regression.at: Adjust some tests.
18657 * src/print_graph.c (print_core): Complete the set of items via
18658 closure. The next-to-final and final states are still unsatisfying,
18659 but that's to be addressed elsewhere.
18660 No longer output the rule numbers, but do output the state number.
18661 A single loop for the shifts + gotos is enough, but picked a
18662 distinct color for each.
18663 (print_graph): Initialize and finalize closure.
18664
18665 2001-12-13 Akim Demaille <akim@epita.fr>
18666
18667 * src/reader.c (readgram): Remove dead code, an strip useless
18668 braces.
18669 (get_type): Remove, unused.
18670
18671 2001-12-12 Akim Demaille <akim@epita.fr>
18672
18673 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18674 on that of lib/error.c.
18675
18676 2001-12-12 Akim Demaille <akim@epita.fr>
18677
18678 Some hosts don't like `/' in includes.
18679
18680 * src/system.h: Include libgettext.h without qualifying the path.
18681 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18682 $(top_srcdir).
18683
18684 2001-12-11 Marc Autret <autret_m@epita.fr>
18685
18686 * src/output.c (output_parser): Remove useless muscle.
18687
18688 2001-12-11 Marc Autret <autret_m@epita.fr>
18689
18690 * src/bison.simple: Remove #line just before %%epilogue. It
18691 is now handled in ...
18692 * src/reader.c (read_additionnal_code): Add the output of a
18693 #line for the epilogue.
18694
18695 2001-12-10 Marc Autret <autret_m@epita.fr>
18696
18697 * src/reader.c (copy_definition): Re-use CPP-outed code which
18698 replace precedent remove.
18699 * src/bison.simple: Remove #line before %%prologue because
18700 %%input-line is wrong at this time.
18701
18702 2001-12-10 Marc Autret <autret_m@epita.fr>
18703
18704 * src/reader.c (symbols_output): Clean up.
18705 * src/output.c (output_gram, output): Clean up.
18706
18707 2001-12-10 Akim Demaille <akim@epita.fr>
18708
18709 * src/lalr.c (initialize_lookaheads): New. Extracted from...
18710 * src/LR0.c (set_state_table): here.
18711 * src/lalr.c (lalr): Call it.
18712
18713 2001-12-10 Akim Demaille <akim@epita.fr>
18714
18715 * src/state.h (shifts): Remove the `number' member: shifts are
18716 attached to state, hence no longer need to be labelled with a
18717 state number.
18718
18719 2001-12-10 Akim Demaille <akim@epita.fr>
18720
18721 Now that states have a complete set of members, the linked list of
18722 shifts is useless: just fill directly the state's shifts member.
18723
18724 * src/state.h (shifts): Remove the `next' member.
18725 * src/LR0.c (first_state, last_state): Remove.
18726 Adjust the callers.
18727 (augment_automaton): Don't look for the shifts that must be added
18728 a shift on EOF: it is those of the state we looked for! But now,
18729 since shifts are attached, it is no longer needed to looking
18730 merely by its id: its number.
18731
18732 2001-12-10 Akim Demaille <akim@epita.fr>
18733
18734 * src/LR0.c (augment_automaton): Better variable locality.
18735 Remove an impossible branch: if there is a state corresponding to
18736 the start symbol being shifted, then there is shift for the start
18737 symbol from the initial state.
18738
18739 2001-12-10 Akim Demaille <akim@epita.fr>
18740
18741 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
18742 only when appropriate: when insert_start_shifting_state' is not
18743 invoked.
18744 * tests/regression.at (Rule Line Numbers): Adjust.
18745
18746 2001-12-10 Akim Demaille <akim@epita.fr>
18747
18748 * src/LR0.c (augment_automaton): Now that all states have shifts,
18749 merge the two cases addition shifts to the initial state.
18750
18751 2001-12-10 Akim Demaille <akim@epita.fr>
18752
18753 * src/lalr.c (set_state_table): Move to...
18754 * src/LR0.c: here.
18755 * src/lalr.c (lalr): Don't call it...
18756 * src/LR0.c (generate_states): do it.
18757 * src/LR0.h (first_state): Remove, only the table is used.
18758
18759 2001-12-10 Akim Demaille <akim@epita.fr>
18760
18761 * src/LR0.h (first_shift, first_reduction): Remove.
18762 * src/lalr.c: Don't use first_shift: find shifts through the
18763 states.
18764
18765 2001-12-10 Akim Demaille <akim@epita.fr>
18766
18767 * src/LR0.c: Attach shifts to states as soon as they are
18768 computed.
18769 * src/lalr.c (set_state_table): Instead of assigning shifts to
18770 state, just assert that the mapping was properly done.
18771
18772 2001-12-10 Akim Demaille <akim@epita.fr>
18773
18774 * src/LR0.c (insert_start_shift): Rename as...
18775 (insert_start_shifting_state): this.
18776 (insert_eof_shifting_state, insert_accepting_state): New.
18777 (augment_automaton): Adjust.
18778 Better locality of the variables.
18779 When looking if the start_symbol is shifted from the initial
18780 state, using `while (... symbol != start_symbol ...)' sounds
18781 better than `while (... symbol < start_symbol ...)': If fail
18782 to see how the order between symbols could be relevant!
18783
18784 2001-12-10 Akim Demaille <akim@epita.fr>
18785
18786 * src/getargs.h: Don't declare `spec_name_prefix' and
18787 `spec_file_prefix', declared by src/files.h.
18788 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
18789 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
18790 * src/output.c (prepare): Adjust.
18791 * src/reader.c (symbols_output): Likewise.
18792 * src/vmsgetargs.c: Vaguely adjust, but who cares?
18793
18794 2001-12-10 Akim Demaille <akim@epita.fr>
18795
18796 * src/muscle_tab.c (muscle_init): NULL is a better default than
18797 `"0"'.
18798
18799 2001-12-10 Akim Demaille <akim@epita.fr>
18800
18801 * src/reader.c (reader): Calling symbols_output once is enough.
18802
18803 2001-12-10 Akim Demaille <akim@epita.fr>
18804
18805 Now that states have a complete set of members, the linked list of
18806 reductions is useless: just fill directly the state's reductions
18807 member.
18808
18809 * src/state.h (struct reductions): Remove member `number' and
18810 `next'.
18811 * src/LR0.c (first_reduction, last_reduction): Remove.
18812 (save_reductions): Don't link the new reductions, store them in
18813 this_state.
18814 * src/lalr.c (set_state_table): No need to attach reductions to
18815 states, it's already done.
18816 * src/output.c (output_actions): No longer free the shifts, then
18817 the reductions, then the states: free all the states and their
18818 members.
18819
18820 2001-12-10 Akim Demaille <akim@epita.fr>
18821
18822 * src/options.c (OPTN, DRTV, BOTH): New.
18823 (option_table): Use them.
18824
18825 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
18826 the job of system.h.
18827 * src/options.c: Don't include stdio.h and xalloc.h for the same
18828 reasons.
18829
18830 2001-12-10 Akim Demaille <akim@epita.fr>
18831
18832 * src/output.c (output, prepare): Make sure the values of the
18833 muscles `action' and `prologue' are 0-terminated.
18834
18835 2001-12-10 Akim Demaille <akim@epita.fr>
18836
18837 Clean up GCC warnings.
18838
18839 * src/reader.c (copy_action): `buf' is not used.
18840 (parse_skel_decl): Be static.
18841 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
18842 * src/options.h (create_long_option_table): Have a real prototype.
18843 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
18844 (hash_delete_at): Return const void *.
18845 Adjust casts to preserve the const.
18846
18847 2001-12-10 Akim Demaille <akim@epita.fr>
18848
18849 * configure.in: Require 2.52g.
18850 M4 is not needed, but AUTOM4TE is.
18851 * m4/m4.m4: Remove.
18852 * tests/Makefile.am: Adjust.
18853
18854 2001-12-10 Akim Demaille <akim@epita.fr>
18855
18856 One structure for states is enough, even though theoretically
18857 there are LR(0) states and LALR(1) states.
18858
18859 * src/lalr.h (state_t): Remove.
18860 (state_table): Be state_t **, not state_t *.
18861 * src/state.h (core, CORE_ALLOC): Rename as...
18862 (state_t, STATE_ALLOC): this.
18863 Add the LALR(1) members: shifts, reductions, errs.
18864 * src/LR0.c (state_table): Rename as...
18865 (state_hash): this, to avoid name clashes with the global
18866 `state_table'.
18867 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
18868 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
18869
18870 2001-12-10 Akim Demaille <akim@epita.fr>
18871
18872 Bison dumps core on bash.y.
18873 Reported by Pascal Bart.
18874
18875 * src/warshall.c (bitmatrix_print): New.
18876 (TC): Use it.
18877 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
18878 j must be the outer loop.
18879 * tests/regression.at (Broken Closure): New.
18880
18881 2001-12-05 Akim Demaille <akim@epita.fr>
18882
18883 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
18884 its argument.
18885 Reported by Peter Hamorsky.
18886
18887 2001-12-05 Akim Demaille <akim@epita.fr>
18888
18889 * src/conflicts.c (err_table): Remove.
18890 (resolve_sr_conflict): Adjust.
18891 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
18892 Rename as...
18893 (state_t.reductions, state_t.shifts): this.
18894
18895 2001-12-05 Akim Demaille <akim@epita.fr>
18896
18897 * src/reduce.c (reduce_grammar_tables): No longer disable the
18898 removal of useless rules via CPP but via `if (0)', so that the
18899 compiler still check the code is valid.
18900 For instance, it should have noticed `rline' no longer exists: use
18901 the `line' member of rule_t.
18902 * src/gram.c (dummy, rline): Remove, unused.
18903
18904 2001-12-05 Akim Demaille <akim@epita.fr>
18905
18906 * src/output.c (pack_vector): Use assert, not berror.
18907 * src/main.c (berror): Remove, unused.
18908
18909 2001-12-05 Akim Demaille <akim@epita.fr>
18910
18911 New experimental feature: if --verbose --trace output all the
18912 items of a state, not only its kernel.
18913
18914 * src/print.c (print_core): If `trace_flag', then invoke closure
18915 before outputting the items of the state (print_core is no longer
18916 a correct name them).
18917 (print_results): Invoke new_closure/free_closure if needed.
18918
18919 2001-12-05 Akim Demaille <akim@epita.fr>
18920
18921 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
18922 * src/closure.c, src/closure.h (itemsetsize): Rename as...
18923 (nitemset): for consistency with the rest of the project.
18924
18925 2001-12-05 Akim Demaille <akim@epita.fr>
18926
18927 * src/closure.c (print_closure): Improve.
18928 (closure): Use it for printing input and output.
18929
18930 2001-12-05 Akim Demaille <akim@epita.fr>
18931
18932 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
18933 indexed by nonterminals.
18934
18935 2001-12-05 Akim Demaille <akim@epita.fr>
18936
18937 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
18938 what it was!).
18939 * src/warshall.h: Remove accidental duplication of the content.
18940
18941 2001-12-05 Akim Demaille <akim@epita.fr>
18942
18943 * src/closure.c (set_fderives): De-obfuscate.
18944
18945 2001-12-05 Akim Demaille <akim@epita.fr>
18946
18947 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
18948
18949 2001-12-05 Akim Demaille <akim@epita.fr>
18950
18951 * src/closure.c (set_firsts): De-obfuscate.
18952
18953 2001-12-05 Akim Demaille <akim@epita.fr>
18954
18955 * src/output.c (action_row): De-obfuscate
18956 using the good o' techniques: arrays not pointers, variable
18957 locality, BITISSET, RESETBIT etc.
18958
18959 2001-12-05 Akim Demaille <akim@epita.fr>
18960
18961 Pessimize the code to simplify it: from now on, all the states
18962 have a valid SHIFTS, which NSHIFTS is possibly 0.
18963
18964 * src/LR0.c (shifts_new): Be global and move to..
18965 * src/state.c, src/state.h: here.
18966 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
18967 * src/print_graph: Adjust.
18968
18969 2001-12-05 Akim Demaille <akim@epita.fr>
18970
18971 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
18972 * src/conflicts.c: Use it.
18973 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
18974 incorrectly ``simplified''.
18975
18976 2001-12-05 Akim Demaille <akim@epita.fr>
18977
18978 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
18979 using the good o' techniques: arrays not pointers, variable
18980 locality, BITISSET, RESETBIT etc.
18981
18982 2001-12-05 Akim Demaille <akim@epita.fr>
18983
18984 * src/state.h (SHIFT_SYMBOL): New.
18985 * src/conflicts.c: Use it to deobfuscate.
18986
18987 2001-12-05 Akim Demaille <akim@epita.fr>
18988
18989 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
18990 (print_reductions): De-obfuscate using the good o' techniques:
18991 arrays not pointers, variable locality, BITISSET.
18992
18993 2001-12-05 Akim Demaille <akim@epita.fr>
18994
18995 * src/conflicts.c (print_reductions): Arrays, not pointers.
18996 Use BITISSET.
18997
18998 2001-12-05 Akim Demaille <akim@epita.fr>
18999
19000 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19001
19002 2001-12-05 Akim Demaille <akim@epita.fr>
19003
19004 * src/conflicts.c (print_reductions): Improve variable locality.
19005
19006 2001-12-05 Akim Demaille <akim@epita.fr>
19007
19008 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19009
19010 2001-12-05 Akim Demaille <akim@epita.fr>
19011
19012 * src/conflicts.c (print_reductions): Improve variable locality.
19013
19014 2001-12-05 Akim Demaille <akim@epita.fr>
19015
19016 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19017 * src/lalr.c: Use them.
19018
19019 2001-12-05 Akim Demaille <akim@epita.fr>
19020
19021 * src/LR0.c (augment_automaton): Formatting changes.
19022 Better variable locality.
19023
19024 2001-12-05 Akim Demaille <akim@epita.fr>
19025
19026 * src/lalr.c (matrix_print): New.
19027 (transpose): Use it.
19028 Use arrays instead of pointers.
19029
19030 2001-12-05 Akim Demaille <akim@epita.fr>
19031
19032 * src/lalr.c (maxrhs): Move to...
19033 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19034 * src/lalr.c (build_relations): Adjust.
19035
19036 2001-12-05 Akim Demaille <akim@epita.fr>
19037
19038 * src/lalr.c (transpose): Free the memory allocated to the
19039 argument, as it is replaced by the results by the unique caller.
19040 (build_relations): Merely invoke transpose: it handles the memory
19041 deallocation.
19042 Improve variable locality.
19043 Avoid variables used as mere abbreviations.
19044 (compute_lookaheads): Use arrays instead of pointers.
19045
19046 2001-12-05 Akim Demaille <akim@epita.fr>
19047
19048 * src/lalr.c (initialize_F): Improve variable locality.
19049 Avoid variables used as mere abbreviations.
19050
19051 2001-12-05 Akim Demaille <akim@epita.fr>
19052
19053 * src/derives.c (print_derives): Display the ruleno.
19054 * src/lalr.c (initialize_F, transpose): Better variable locality
19055 to improve readability.
19056 Avoid variables used as mere abbreviations.
19057
19058 2001-12-05 Akim Demaille <akim@epita.fr>
19059
19060 * src/lalr.c (traverse): Use arrays instead of pointers.
19061
19062 2001-12-05 Akim Demaille <akim@epita.fr>
19063
19064 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19065 the handling of squeue.
19066 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19067
19068 2001-12-05 Akim Demaille <akim@epita.fr>
19069
19070 Because useless nonterminals are now kept alive (instead of being
19071 `destroyed'), we now sometimes examine them, and store information
19072 related to them. Hence we need to know their number, and adjust
19073 memory allocations.
19074
19075 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19076 static.
19077 * src/LR0.c (allocate_itemsets): The memory allocated to
19078 `symbol_count' was used for two different purpose: once to count
19079 the number of occurrences of each symbol, and later reassigned to
19080 `shift_symbol', containing the symbol that can be shifted from a
19081 given state.
19082 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19083 only, and...
19084 (new_itemsets): Allocate `shift_symbol' here.
19085 (allocate_itemsets): symbol_count includes useless nonterminals.
19086 Make room for them.
19087 (free_storage): Use `free', not `XFREE', for pointers that cannot
19088 be null.
19089
19090 2001-12-05 Akim Demaille <akim@epita.fr>
19091
19092 * src/nullable.c (set_nullable): Deobfuscate the handling of
19093 ritem.
19094 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19095
19096 2001-12-05 Akim Demaille <akim@epita.fr>
19097
19098 * src/gram.c, src/gram.h (ritem_print): New.
19099 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19100 (This useless function was defined only to work around VMS linkers
19101 that can't handle compilation units with variables only).
19102 * src/reduce.c (dump_grammar): Use it to trace the construction of
19103 ritem.
19104
19105 2001-12-04 Paul Eggert <eggert@twinsun.com>
19106
19107 * src/bison.simple (union yyalloc): Change member names
19108 to be the same as the stack names.
19109 (yyparse): yyptr is now union yyalloc *, not char *.
19110 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19111 and may generate better code on some machines.
19112 (yystpcpy): Use prototype if __STDC__ is defined, not just
19113 if __cplusplus is defined.
19114
19115 2001-11-30 Akim Demaille <akim@epita.fr>
19116
19117 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19118 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19119 Gettext doesn't compile cleanly, and dies with -Werror.
19120 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19121 Include WARNING_CFLAGS here.
19122 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19123 before being defined.
19124
19125 2001-11-27 Paul Eggert <eggert@twinsun.com>
19126
19127 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19128 First arg is int, not unsigned.
19129 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19130 (SIZE_MAX, UINT_MAX): New macros.
19131 (quotearg_n_options): Abort if N is negative.
19132 Avoid overflow check on hosts where size_t is 64 bits and int
19133 is 32 bits, as overflow is impossible there.
19134 Fix off-by-one typo that caused unnecessary reallocation.
19135
19136 2001-11-29 Paul Eggert <eggert@twinsun.com>
19137
19138 Name space cleanup in generated parser.
19139
19140 * doc/bison.texinfo (Bison Parser): Discuss system headers
19141 and their effect on the user name space.
19142
19143 * src/bison.simple:
19144 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19145 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19146 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19147
19148 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19149 on user names when possible.
19150
19151 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19152 Simplify test for whather <alloca.h> exists.
19153
19154 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19155
19156 (<stdio.h>): Include if YYDEBUG.
19157
19158 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19159 ! defined (yyoverflow) && ! defined (yymemcpy).
19160
19161 (yymemcpy, yyparse): Rename local variables as needed so that
19162 they all begin with 'yy'.
19163
19164 (yystrlen, yystpcpy): New functions.
19165
19166 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19167 All uses changed.
19168
19169 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19170 instead of relying on string.h functions. Use YYSTACK_ALLOC
19171 and YYSTACK_FREE instead of malloc and free.
19172
19173 2001-11-30 Akim Demaille <akim@epita.fr>
19174
19175 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19176 before their first uses.
19177 (YYBISON, YYPURE): Move to the top of the output.
19178
19179 2001-11-30 Akim Demaille <akim@epita.fr>
19180
19181 * tests/reduce.at (Useless Nonterminals): Fix.
19182
19183 2001-11-30 Akim Demaille <akim@epita.fr>
19184
19185 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19186 if body instead of `;' to pacify GCC's warnings.
19187
19188 2001-11-30 Akim Demaille <akim@epita.fr>
19189
19190 Instead of mapping the LHS of unused rules to -1, keep the LHS
19191 valid, but flag the rules as invalid.
19192
19193 * src/gram.h (rule_t): `useful' is a new member.
19194 * src/print.c (print_grammar): Adjust.
19195 * src/derives.c (set_derives): Likewise.
19196 * src/reader.c (packgram, reduce_output): Likewise.
19197 * src/reduce.c (reduce_grammar_tables): Likewise.
19198 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19199
19200 2001-11-30 Akim Demaille <akim@epita.fr>
19201
19202 * src/reduce.c (reduce_output): Formatting changes.
19203 * src/print.c (print_results, print_grammar): Likewise.
19204 * tests/regression.at (Rule Line Numbers)
19205 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19206
19207 2001-11-30 Akim Demaille <akim@epita.fr>
19208
19209 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19210 useless nonterminals, move them at the end of the symbol arrays.
19211 (reduce_output): Adjust.
19212 * tests/reduce.at (Useless Nonterminals): Adjust.
19213
19214 2001-11-30 Akim Demaille <akim@epita.fr>
19215
19216 * src/reduce.c: Various comment/formatting changes.
19217 (nonterminals_reduce): New, extracted from...
19218 (reduce_grammar_tables): here.
19219 (reduce_grammar): Call nonterminals_reduce.
19220
19221 2001-11-29 Paul Eggert <eggert@twinsun.com>
19222
19223 * src/bison.simple (YYSTACK_REALLOC): Remove.
19224 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19225 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19226 New macros.
19227 (union yyalloc): New type.
19228 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19229 an arbitrary restriction on hosts where size_t is wider than int.
19230
19231 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19232 a parser stack overflow. Allocate just one block of memory for all
19233 three stacks, instead of allocating three blocks; this typically is
19234 faster and reduces fragmentation.
19235
19236 Do not limit the number of items in the stack to a value that fits
19237 in 'int', as this is an arbitrary limit on hosts with 64-bit
19238 size_t and 32-bit int.
19239
19240 2001-11-29 Marc Autret <autret_m@epita.fr>
19241
19242 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19243 of defining YYERROR_VERBOSE.
19244 [AT_DATA]: $4 is now out of C declarations in the prologue.
19245
19246 2001-11-28 Marc Autret <autret_m@epita.fr>
19247
19248 * src/reader.c (parse_dquoted_param): New.
19249 (parse_skel_decl): Use it.
19250 * src/lex.h: Add its prototype.
19251 * src/lex.c (literalchar): Become not static.
19252
19253 2001-11-28 Marc Autret <autret_m@epita.fr>
19254
19255 * src/output.h: And put its extern declaration here.
19256 * src/output.c (error_verbose): Define here.
19257 (prepare): Echo name modification.
19258 * src/getargs.h: Clean its extern declaration.
19259 * src/getargs.c (error_verbose_flag): Remove.
19260 (getargs): Remove case 'e'.
19261 * src/options.c (option_table): 'error-verbose' is now seen as simple
19262 percent option.
19263 Include output.h.
19264
19265 * src/reader.c (read_declarations): Remove case tok_include.
19266 (parse_include_decl): Remove.
19267 * src/lex.h (token_t): Remove tok_include.
19268 * src/options.c (option_table): 'include' is now a simple command line
19269 option.
19270
19271 2001-11-28 Marc Autret <autret_m@epita.fr>
19272
19273 * src/bison.simple: Adjust muscle names.
19274 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19275 * src/output.c (prepare): s/_/-/ for the muscles names.
19276 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19277
19278 2001-11-28 Marc Autret <autret_m@epita.fr>
19279
19280 * src/bison.simple: Fix debug.
19281 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19282
19283 2001-11-28 Akim Demaille <akim@epita.fr>
19284
19285 * src/LR0.c (shifts_new): New.
19286 (save_shifts, insert_start_shift, augment_automaton): Use it.
19287
19288 2001-11-28 Akim Demaille <akim@epita.fr>
19289
19290 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19291 keep ruleno only.
19292
19293 2001-11-28 Akim Demaille <akim@epita.fr>
19294
19295 * src/closure.c (closure): Instead of looping over word in array
19296 then bits in words, loop over bits in array.
19297
19298 2001-11-28 Akim Demaille <akim@epita.fr>
19299
19300 * src/closure.c (closure): No longer optimize the special case
19301 where all the bits of `ruleset[r]' are set to 0, to make the code
19302 clearer.
19303
19304 2001-11-28 Akim Demaille <akim@epita.fr>
19305
19306 * src/closure.c (closure): `r' and `c' are new variables, used to
19307 de-obfuscate accesses to RULESET and CORE.
19308
19309 2001-11-28 Akim Demaille <akim@epita.fr>
19310
19311 * src/reduce.c (reduce_print): Use ngettext.
19312 (dump_grammar): Improve the trace accuracy.
19313
19314 2001-11-28 Akim Demaille <akim@epita.fr>
19315
19316 * src/reduce.c (dump_grammar): Don't translate trace messages.
19317
19318 2001-11-28 Akim Demaille <akim@epita.fr>
19319
19320 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19321 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19322 as all tags are free'ed afterwards.
19323 From Enrico Scholz.
19324
19325 2001-11-27 Paul Eggert <eggert@twinsun.com>
19326
19327 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19328 use alloca when we didn't want to, and vice versa.
19329
19330 2001-11-27 Marc Autret <autret_m@epita.fr>
19331
19332 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19333 initialization.
19334 * src/output.c (prepare): Remove its update.
19335
19336 2001-11-27 Marc Autret <autret_m@epita.fr>
19337
19338 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19339 Use %error-verbose.
19340
19341 2001-11-27 Marc Autret <autret_m@epita.fr>
19342
19343 * src/bison.simple: Remove YYERROR_VERBOSE using.
19344 Use %%error_verbose.
19345 (yyparse): Likewise.
19346 * src/output.c (prepare): Give its final value.
19347 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19348 * src/getargs.h: Add its extern declaration.
19349 * src/getargs.c (error_verbose_flag): New int.
19350 (getargs): Update to catch new case.
19351 * src/options.c (option_table): 'error-verbose' is a new option.
19352 (shortopts): Update.
19353
19354 2001-11-27 Akim Demaille <akim@epita.fr>
19355
19356 * src/system.h: Use intl/libgettext.h.
19357 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19358
19359 2001-11-27 Akim Demaille <akim@epita.fr>
19360
19361 * tests/torture.at (Exploding the Stack Size with Malloc):
19362 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19363
19364 2001-11-27 Akim Demaille <akim@epita.fr>
19365
19366 * src/files.c: Include error.h.
19367 Reported by Hans Aberg.
19368
19369 2001-11-26 Marc Autret <autret_m@epita.fr>
19370
19371 * src/reader.c (parse_include_decl): New, not yet implemented.
19372 (read_declarations): Add case tok_include.
19373 * src/getargs.h (include): Add its extern definition.
19374 * src/getargs.c (include): New const char *.
19375 (getargs): Add case '-I'.
19376 * src/options.c (option_table): Add include as command line and
19377 percent option.
19378 * src/lex.h (token_t): Add tok_include.
19379
19380 2001-11-26 Akim Demaille <akim@epita.fr>
19381
19382 * src/reader.c (readgram): Make sure rules for mid-rule actions
19383 have a lineno equal to that of their host rule.
19384 Reported by Hans Aberg.
19385 * tests/regression.at (Rule Line Numbers): New.
19386
19387 2001-11-26 Akim Demaille <akim@epita.fr>
19388
19389 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19390 size_ts.
19391
19392 2001-11-26 Akim Demaille <akim@epita.fr>
19393
19394 * src/complain.c, src/complain.h (error): Remove, provided by
19395 lib/error.[ch].
19396
19397 2001-11-26 Akim Demaille <akim@epita.fr>
19398
19399 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19400 issue an error message.
19401 * tests/regression.at (Invalid %directive): New.
19402 Reported by Hans Aberg.
19403
19404 2001-11-26 Akim Demaille <akim@epita.fr>
19405
19406 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19407 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19408
19409 2001-11-26 Akim Demaille <akim@epita.fr>
19410
19411 * src/conflicts.c (conflicts_print): Don't complain at all when
19412 there are no reduce/reduce conflicts, and as many shift/reduce
19413 conflicts as expected.
19414 * tests/regression.at (%expect right): Adjust.
19415
19416 2001-11-23 Akim Demaille <akim@epita.fr>
19417
19418 * lib/alloca.c: Update, from fileutils.
19419
19420 2001-11-23 Akim Demaille <akim@epita.fr>
19421
19422 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19423
19424 2001-11-23 Akim Demaille <akim@epita.fr>
19425
19426 * src/system.h: Include alloca.h.
19427 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19428
19429 2001-11-23 Akim Demaille <akim@epita.fr>
19430
19431 * src/print_graph.c (print_actions): Remove `rule', unused.
19432 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19433 pacify GCC's signed < unsigned warnings.
19434 * src/closure.c (itemsetsize): Likewise.
19435 * src/reader.c (symbol_list_new): Static.
19436
19437 2001-11-23 Akim Demaille <akim@epita.fr>
19438
19439 Attaching lineno to buckets is stupid, since only one copy of each
19440 symbol is kept, only the line of the first occurrence is kept too.
19441
19442 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19443 * src/reader.c (rline_allocated): Remove, unused.
19444 (symbol_list): Have a `line' member.
19445 (symbol_list_new): New.
19446 (readgram): Use it.
19447 * src/print.c (print_grammar): Output the rule line numbers.
19448 * tests/regression.at (Solved SR Conflicts)
19449 (Unresolved SR Conflicts): Adjust.
19450 Reported by Hans Aberg.
19451
19452 2001-11-22 Marc Autret <autret_m@epita.fr>
19453
19454 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19455
19456 2001-11-22 Marc Autret <autret_m@epita.fr>
19457
19458 * src/muscle_tab.c (muscle_init): Remove initialization of
19459 skeleton muscle.
19460 * src/output.c (output_master_parser): Do it here.
19461
19462 2001-11-20 Akim Demaille <akim@epita.fr>
19463
19464 * po/sv.po: New.
19465 * configure.in (ALL_LINGUAS): Adjust.
19466 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19467 longer contains strings to translate.
19468
19469 2001-11-19 Akim Demaille <akim@epita.fr>
19470
19471 * src/conflicts.c (conflicts_print): Add a missing \n.
19472
19473 2001-11-19 Akim Demaille <akim@epita.fr>
19474
19475 * src/nullable.c (nullable_print): New.
19476 (set_nullable): Call it when tracing.
19477 Better locality of variables.
19478
19479 2001-11-19 Akim Demaille <akim@epita.fr>
19480
19481 * src/print.c (print_actions): Better locality of variables.
19482
19483 2001-11-19 Akim Demaille <akim@epita.fr>
19484
19485 * src/derives.c (print_derives): Fix and enrich.
19486 * src/closure.c (print_fderives): Likewise.
19487
19488 2001-11-19 Akim Demaille <akim@epita.fr>
19489
19490 * src/closure.c (itemsetend): Remove, replaced with...
19491 (itemsetsize): new.
19492
19493 2001-11-19 Akim Demaille <akim@epita.fr>
19494
19495 * src/LR0.c (kernel_end): Remove, replaced with...
19496 (kernel_size): new.
19497
19498 2001-11-19 Akim Demaille <akim@epita.fr>
19499
19500 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19501 to clarify.
19502
19503 2001-11-19 Akim Demaille <akim@epita.fr>
19504
19505 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19506
19507 2001-11-19 Akim Demaille <akim@epita.fr>
19508
19509 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19510 trace messages.
19511 * src/LR0.c: Likewise.
19512 (allocate_itemsets): Use arrays instead of pointers to clarify.
19513
19514 2001-11-19 Akim Demaille <akim@epita.fr>
19515
19516 * src/getargs.c (statistics_flag): Replace with...
19517 (trace_flag): New.
19518 (longopts): Accept --trace instead of --statistics.
19519 * src/getargs.h, src/options.c: Adjust.
19520 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19521 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19522
19523 2001-11-19 Akim Demaille <akim@epita.fr>
19524
19525 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
19526 pointers to clarify the code.
19527 (save_reductions, save_shifts): Factor common parts of alternatives.
19528
19529 2001-11-19 Akim Demaille <akim@epita.fr>
19530
19531 * src/LR0.c (new_state, get_state): Complete TRACE code.
19532 * src/closure.c: Include `reader.h' to get `tags', needed by the
19533 trace code.
19534 Rename the conditional DEBUG as TRACE.
19535 Output consistently TRACEs to stderr, not stdout.
19536 * src/derives.c: Likewise.
19537 * src/reduce.c: (inaccessable_symbols): Using if is better style
19538 than goto.
19539 Use `#if TRACE' instead of `#if 0' for tracing code.
19540
19541 2001-11-19 Akim Demaille <akim@epita.fr>
19542
19543 * src/system.h (LIST_FREE, shortcpy): New.
19544 * src/LR0.c: Use them.
19545 * src/output.c (free_itemsets, free_reductions, free_shifts):
19546 Remove, replaced by LIST_FREE.
19547
19548 2001-11-19 Akim Demaille <akim@epita.fr>
19549
19550 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19551 (REDUCTIONS_ALLOC): New.
19552 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19553 allocation.
19554
19555 2001-11-19 Akim Demaille <akim@epita.fr>
19556
19557 * src/LR0.c (new_state): Complete trace code.
19558 * src/nullable.c (set_nullable): Don't translate traces.
19559
19560 2001-11-19 Akim Demaille <akim@epita.fr>
19561
19562 * src/print_graph.c (print_core): Better locality of variables.
19563 * src/print.c (print_core): Likewise.
19564
19565 2001-11-19 Akim Demaille <akim@epita.fr>
19566
19567 * src/vcg.c: You do the output, so you are responsible of the
19568 handling of VCG syntax, in particular: use quotearg.
19569 * src/print_graph.c: Don't.
19570 (print_actions): Don't output the actions as part of the nodes,
19571 since that's the job of the edges.
19572 (print_state): Don't output by hand: fill the node description,
19573 and ask for its output.
19574
19575 2001-11-19 Akim Demaille <akim@epita.fr>
19576
19577 * src/bison.simple (yyparse): When verbosely reporting an error,
19578 no longer put additional quotes around token names.
19579 * tests/calc.at: Adjust.
19580
19581 2001-11-19 Akim Demaille <akim@epita.fr>
19582
19583 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19584 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19585 * src/output.c: Adjust.
19586
19587 2001-11-19 Akim Demaille <akim@epita.fr>
19588
19589 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19590 (rule_t): this.
19591 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19592
19593 2001-11-19 Akim Demaille <akim@epita.fr>
19594
19595 * src/gram.h (rule_t): New.
19596 (rule_table): New.
19597 (rrhs, rlhs): Remove, part of state_t.
19598 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19599 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19600 * src/reader.c, src/reduce.c: Adjust.
19601
19602 2001-11-19 Akim Demaille <akim@epita.fr>
19603
19604 * src/reader.c (symbols_output): New, extracted from...
19605 (packsymbols): Here.
19606 (reader): Call it.
19607
19608 2001-11-19 Akim Demaille <akim@epita.fr>
19609
19610 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19611 (maxrhs): this new function.
19612
19613 2001-11-19 Akim Demaille <akim@epita.fr>
19614
19615 * src/lalr.c (F): New macro to access the variable F.
19616 Adjust.
19617
19618 2001-11-19 Akim Demaille <akim@epita.fr>
19619
19620 * src/lalr.h (LA): New macro to access the variable LA.
19621 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19622 * src/lalr.c: Adjust.
19623
19624 2001-11-19 Akim Demaille <akim@epita.fr>
19625
19626 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19627 (set_state_table): handle the `lookaheads' members.
19628
19629 2001-11-19 Akim Demaille <akim@epita.fr>
19630
19631 * src/lalr.h (lookaheads): Removed array, whose contents is now
19632 a member of...
19633 (state_t): this structure.
19634 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19635 Adjust.
19636
19637 2001-11-19 Akim Demaille <akim@epita.fr>
19638
19639 * src/lalr.h (consistent): Removed array, whose contents is now
19640 a member of...
19641 (state_t): this structure.
19642 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19643 Adjust.
19644
19645 2001-11-19 Akim Demaille <akim@epita.fr>
19646
19647 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19648 contents are now members of...
19649 (state_t): this structure.
19650 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19651 Adjust.
19652
19653 2001-11-19 Akim Demaille <akim@epita.fr>
19654
19655 * src/lalr.h (state_t): New.
19656 (state_table): Be a state_t * instead of a core **.
19657 (accessing_symbol): Remove, part of state_t.
19658 * src/lalr.c: Adjust.
19659 (set_accessing_symbol): Merge into...
19660 (set_state_table): this.
19661 * src/print_graph.c, src/conflicts.c: Adjust.
19662
19663 2001-11-14 Akim Demaille <akim@epita.fr>
19664
19665 * tests/calc.at, tests/output.at, tests/regression.at,
19666 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19667 now the tests are run in private dirs, therefore AC_CLEANUP and
19668 family can be simplified to 0-ary.
19669 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19670 use abs. path to find config.h.
19671 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19672 stderr, there can be way too much random noise.
19673 Instead pass -Werror to GCC and rely on the exit status.
19674 Reported by Wolfram Wagner.
19675
19676 2001-11-14 Akim Demaille <akim@epita.fr>
19677
19678 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19679 defined only if yyoverflow is defined, to avoid `warning: unused
19680 variable `yyvs1''.
19681 Reported by The Test Suite.
19682
19683 2001-11-14 Akim Demaille <akim@epita.fr>
19684
19685 * src/print.c: Include reduce.h.
19686 Reported by Hans Aberg.
19687
19688 2001-11-14 Akim Demaille <akim@epita.fr>
19689
19690 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19691 Revert a previous patch: these are really const.
19692 * src/conflicts.c (conflict_report): Additional useless pair of
19693 braces to pacify GCC's warnings for `if () if () {} else {}'.
19694 * src/lex.c (parse_percent_token): Replace equal_offset with
19695 arg_offset.
19696 arg is const.
19697 Be sure to strdup `arg' when used, since there is no reason for
19698 token_buffer not to change.
19699
19700 2001-11-14 Akim Demaille <akim@epita.fr>
19701
19702 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19703 definition.
19704 * src/main.c (main): Use them.
19705 Suggested by Hans Aberg.
19706
19707 2001-11-12 Akim Demaille <akim@epita.fr>
19708
19709 * src/system.h (ngettext): Now that we use ngettext, be sure to
19710 provide a default definition when NLS are not used.
19711
19712 2001-11-12 Akim Demaille <akim@epita.fr>
19713
19714 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
19715 Use @kbd to denote user input.
19716 (Language and Grammar): ANSIfy the example.
19717 Adjust its layout for info/notinfo.
19718 (Location Tracking Calc): Output error messages to stderr.
19719 Output locations in a more GNUtically correct way.
19720 Fix a couple of Englishos.
19721 Adjust @group/@end group pairs.
19722
19723 2001-11-12 Akim Demaille <akim@epita.fr>
19724
19725 %expect was not functioning at all.
19726
19727 * src/conflicts.c (expected_conflicts): Set to -1.
19728 (conflict_report): Use ngettext.
19729 (conflicts_print): Check %expect and make its violation an error.
19730 * doc/bison.texinfo (Expect Decl): Adjust.
19731 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
19732 * tests/regression.at (%expect not enough, %expect right)
19733 (%expect too much): New.
19734
19735 2001-11-12 Akim Demaille <akim@epita.fr>
19736
19737 * tests/regression.at (Conflicts): Rename as...
19738 (Unresolved SR Conflicts): this.
19739 (Solved SR Conflicts): New.
19740
19741 2001-11-12 Akim Demaille <akim@epita.fr>
19742
19743 * src/reduce.c (print_results): Rename as...
19744 (reduce_output): This.
19745 Output to OUT, passed as argument, instead of output_obstack.
19746 (dump_grammar): Likewise.
19747 (reduce_free): New.
19748 Also free V1.
19749 (reduce_grammar): No longer call reduce_output, since...
19750 * src/print.c (print_results): do it.
19751 * src/main.c (main): Call reduce_free;
19752
19753 2001-11-12 Akim Demaille <akim@epita.fr>
19754
19755 * src/conflicts.c (print_reductions): Accept OUT as argument.
19756 Output to it, not to output_obstack.
19757 * src/print.c (print_actions): Adjust.
19758
19759 2001-11-12 Akim Demaille <akim@epita.fr>
19760
19761 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
19762 the result instead of using...
19763 (src_total, rrc_total, src_count, rrc_count): Remove.
19764 (any_conflicts): Remove.
19765 (print_conflicts): Split into...
19766 (conflicts_print, conflicts_output): New.
19767 * src/conflicts.h: Adjust.
19768 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
19769 * src/print.c (print_grammar): Issue `\n' between two rules.
19770 * tests/regression.at (Conflicts): New.
19771 Reported by Tom Lane.
19772
19773 2001-11-12 Akim Demaille <akim@epita.fr>
19774
19775 * tests/regression.at (Invalid input): Remove, duplicate with
19776 ``Invalid input: 1''.
19777
19778 2001-11-12 Akim Demaille <akim@epita.fr>
19779
19780 * tests/torture.at (AT_DATA_STACK_TORTURE)
19781 (Exploding the Stack Size with Alloca)
19782 (Exploding the Stack Size with Malloc): New.
19783
19784 2001-11-12 Akim Demaille <akim@epita.fr>
19785
19786 * src/bison.simple (YYSTACK_REALLOC): New.
19787 (yyparse) [!yyoverflow]: Use it and free the old stack.
19788 Reported by Per Allansson.
19789
19790 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
19791
19792 * src/bison.simple: Define type yystype instead of YYSTYPE, and
19793 define CPP macro, which substitute YYSTYPE by yystype.
19794 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
19795 with yyltype/YYLTYPE. This allows inclusion of the generated
19796 header within the parser if the compiler, such as GGC, accepts
19797 multiple equivalent #defines.
19798 From Akim.
19799
19800 2001-11-05 Akim Demaille <akim@epita.fr>
19801
19802 * src/reader.c (symbols_output): New, extracted from...
19803 (packsymbols): here.
19804 (reader): Adjust.
19805
19806 2001-11-05 Akim Demaille <akim@epita.fr>
19807
19808 * src/lex.c (parse_percent_token): s/quotearg/quote/.
19809
19810 2001-11-05 Akim Demaille <akim@epita.fr>
19811
19812 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
19813 pattern.
19814
19815 2001-11-05 Akim Demaille <akim@epita.fr>
19816
19817 * src/options.h (struct option_table_struct): set_flags is void*.
19818 * src/options.c (longopts): Support `--output' and `%output'.
19819 (usage): Adjust.
19820 * src/lex.h (tok_setopt): Remove, replaced with...
19821 (tok_intopt, tok_stropt): these new guys.
19822 * src/lex.c (getopt.h): Not needed.
19823 (token_buffer, unlexed_token_buffer): Not const.
19824 (percent_table): Promote `-' over `_' in directive names.
19825 Active `%name-prefix', `file-prefix', and `output'.
19826 (parse_percent_token): Accept possible arguments to directives.
19827 Promote `-' over `_' in directive names.
19828
19829 2001-11-04 Akim Demaille <akim@epita.fr>
19830
19831 * doc/bison.texinfo (Decl Summary): Split the list into
19832 `directives for grammars' and `directives for bison'.
19833 Sort'em.
19834 Add description of `%name-prefix', `file-prefix', and `output'.
19835 Promote `-' over `_' in directive names.
19836 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
19837 Simplify the description of `--name-prefix'.
19838 Promote `-' over `_' in directive names.
19839 Promote `--output' over `--output-file'.
19840 Fix the description of `--defines'.
19841 * tests/output.at: Exercise %file-prefix and %output.
19842
19843 2001-11-02 Akim Demaille <akim@epita.fr>
19844
19845 * doc/refcard.tex: Update.
19846
19847 2001-11-02 Akim Demaille <akim@epita.fr>
19848
19849 * src/symtab.h (SUNDEF): New.
19850 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
19851 stand for `uninitialized', instead of 0.
19852 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
19853 * src/lex.c (lex): Adjust.
19854
19855 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
19856 Number it 0.
19857 Let yylex return it instead of a plain 0.
19858 Reported by Dick Streefland.
19859
19860 2001-11-02 Akim Demaille <akim@epita.fr>
19861
19862 * tests/regression.at (Mixing %token styles): New test.
19863
19864 2001-11-02 Akim Demaille <akim@epita.fr>
19865
19866 * src/reader.c (parse_thong_decl): Formatting changes.
19867 (token_translations_init): New, extracted from...
19868 (packsymbols): Here.
19869 Adjust.
19870
19871 2001-11-01 Akim Demaille <akim@epita.fr>
19872
19873 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
19874 Check that `9foo.y' produces correct cpp guards.
19875 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
19876 guards.
19877 Reported by Wwp.
19878
19879 2001-11-01 Akim Demaille <akim@epita.fr>
19880
19881 * tests/regression.at (Invalid input: 2): New.
19882 * src/lex.c (unlexed_token_buffer): New.
19883 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
19884 too.
19885 Reported by Wwp.
19886
19887 2001-11-01 Akim Demaille <akim@epita.fr>
19888
19889 * tests/calc.at: Catch up with 1.30.
19890 * configure.in: Bump to 1.49a.
19891 Adjust to newer Autotest.
19892
19893 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
19894
19895 * src/conflicts.c: Move global variables rrc_total and src_total ...
19896 (print_conflicts): here.
19897 * src/output.c (output): Free global variable user_toknums.
19898 * src/lex.c (token_obstack): Become static.
19899
19900 2001-10-18 Akim Demaille <akim@epita.fr>
19901
19902 * tests/atlocal.in (GCC): Add.
19903 * tests/calc.at: s/m4_match/m4_bmatch/.
19904 s/m4_patsubst/m4_bpatsubst/.
19905 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
19906 * configure.in: AC_SUBST(GCC).
19907
19908 2001-10-14 Marc Autret <autret_m@epita.fr>
19909
19910 * src/options.c (create_long_option_table): Fix.
19911
19912 2001-10-10 Akim Demaille <akim@epita.fr>
19913
19914 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
19915
19916 2001-10-04 Akim Demaille <akim@epita.fr>
19917
19918 * src/reader.c (parse_union_decl): Push the caracters in
19919 union_obstack, not attrs_obstack.
19920
19921 2001-10-04 Akim Demaille <akim@epita.fr>
19922
19923 Merge in the branch 1.29.
19924
19925 * src/reader.c (packsymbols): Use a temporary obstack for
19926 `%%tokendef', since output_stack is already used elsewhere.
19927
19928 2001-10-02 Akim Demaille <akim@epita.fr>
19929
19930 Bump 1.29d.
19931
19932 2001-10-02 Akim Demaille <akim@epita.fr>
19933
19934 Version 1.29c.
19935
19936 2001-10-02 Akim Demaille <akim@epita.fr>
19937
19938 * tests/regression.at (Invalid CPP headers): New.
19939 From Alexander Belopolsky.
19940 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
19941
19942 2001-10-02 Akim Demaille <akim@epita.fr>
19943
19944 * tests/regression.at (Invalid input): New.
19945 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
19946 Reported by Shura.
19947
19948 2001-10-02 Akim Demaille <akim@epita.fr>
19949
19950 * tests/calc.at: Now that --debug works, the tests must be adjusted.
19951
19952 2001-10-02 Akim Demaille <akim@epita.fr>
19953
19954 * src/output.c (output_parser): Assert `skeleton'.
19955 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
19956 systems.
19957 From Shura.
19958
19959 2001-10-01 Marc Autret <autret_m@epita.fr>
19960
19961 * src/lex.h: Echo modifications.
19962 * src/lex.c (unlex): Parameter is now token_t.
19963 From Hans Aberg.
19964
19965 2001-10-01 Marc Autret <autret_m@epita.fr>
19966
19967 * src/main.c: Include lex.h.
19968 From Hans Aberg.
19969
19970 2001-09-29 Akim Demaille <akim@epita.fr>
19971
19972 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
19973
19974 2001-09-28 Akim Demaille <akim@epita.fr>
19975
19976 * tests/testsuite.at: Update to newer Autotest.
19977 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
19978
19979 2001-09-27 Akim Demaille <akim@epita.fr>
19980
19981 Position independent wrapper.
19982
19983 * tests/bison: Remove.
19984 * tests/bison.in: New.
19985 * configure.in: Adjust.
19986
19987 2001-09-27 Paul Eggert <eggert@twinsun.com>
19988
19989 Port quotearg fixes from tar 1.13.24.
19990
19991 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
19992 tm to be declared.
19993 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19994 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19995
19996 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
19997 * m4/mbrtowc.m4: New file.
19998 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
19999 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20000
20001 2001-09-27 Akim Demaille <akim@epita.fr>
20002
20003 Bump to 1.29c.
20004
20005 2001-09-27 Akim Demaille <akim@epita.fr>
20006
20007 Version 1.29b.
20008
20009 2001-09-25 Akim Demaille <akim@epita.fr>
20010
20011 * src/system.h: Include `xalloc.h'.
20012 Remove it from the C files.
20013 * src/files.c (output_files): Free the obstacks.
20014 * src/lex.c (init_lex): Rename as...
20015 (lex_init): this.
20016 (lex_free): New.
20017 * src/main.c (main): Use it.
20018
20019 2001-09-24 Marc Autret <autret_m@epita.fr>
20020
20021 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20022 to output informations in fout (FILE*).
20023 (open_graph, close_graph): Likewise.
20024 (output_graph, output_edge, output_node): Likewise.
20025 * src/vcg.h: Update function prototypes.
20026 * src/print_graph.c (print_graph): Open output graph file.
20027 (print_actions): Adjust.
20028 * src/files.h: Remove extern declaration.
20029 * src/files.c: Remove graph_obstack declaration.
20030 (open_files): Remove graph_obstack initialization.
20031 (output_files): Remove graph_obstack saving.
20032
20033 2001-09-24 Marc Autret <autret_m@epita.fr>
20034
20035 * src/files.c (compute_output_file_names): Fix.
20036
20037 2001-09-24 Marc Autret <autret_m@epita.fr>,
20038 Akim Demaille <akim@epita.fr>
20039
20040 * src/reader.c (reader): Remove call to free_symtab ().
20041 * src/main.c (main): Call it here.
20042 Include symtab.h.
20043 * src/conflicts.c (initialize_conflicts): Rename as...
20044 (solve_conflicts): this.
20045 * src/print.c (print_core, print_actions, print_state)
20046 (print_grammar): Dump to a file instead a `output_obstack'.
20047 (print_results): Dump `output_obstack', and then proceed with the
20048 FILE *.
20049 * src/files.c (compute_output_file_names, close_files): New.
20050 (output_files): Adjust.
20051 * src/main.c (main): Adjust.
20052
20053 2001-09-23 Marc Autret <autret_m@epita.fr>
20054
20055 * src/files.c (compute_header_macro): Computes header macro name
20056 from spec_defines_file when given.
20057
20058 2001-09-23 Marc Autret <autret_m@epita.fr>
20059
20060 * src/files.c (output_files): Add default extensions.
20061
20062 2001-09-22 Akim Demaille <akim@epita.fr>
20063
20064 * src/conflicts.c (finalize_conflicts): Rename as...
20065 (free_conflicts): this.
20066
20067 2001-09-22 Akim Demaille <akim@epita.fr>
20068
20069 * src/gram.c (gram_free): Rename back as...
20070 (dummy): this.
20071 (output_token_translations): Free `token_translations'.
20072 * src/symtab.c (free_symtab): Free the tag field.
20073
20074 2001-09-22 Akim Demaille <akim@epita.fr>
20075
20076 Remove `translations' as it is always set to true.
20077
20078 * src/gram.h: Adjust.
20079 * src/reader.c (packsymbols, parse_token_decl): Adjust
20080 * src/print.c (print_grammar): Adjust.
20081 * src/output.c (output_token_translations): Adjust.
20082 * src/lex.c (lex): Adjust.
20083 * src/gram.c: Be sure the set pointers to NULL.
20084 (dummy): Rename as...
20085 (gram_free): this.
20086
20087 2001-09-22 Akim Demaille <akim@epita.fr>
20088
20089 * configure.in: Invoke AM_LIB_DMALLOC.
20090 * src/system.h: Use dmalloc.
20091 * src/LR0.c: Be sure to have pointers initialized to NULL.
20092 (allocate_itemsets): Allocate kernel_items only if needed.
20093
20094 2001-09-22 Akim Demaille <akim@epita.fr>
20095
20096 * configure.in: Bump to 1.29b.
20097 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20098 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20099 need xmalloc.c in calc.y.
20100 From Pascal Bart.
20101
20102 2001-09-21 Akim Demaille <akim@epita.fr>
20103
20104 Version 1.29a.
20105 * Makefile.maint, config/config.guess, config/config.sub,
20106 * config/missing: Update from masters.
20107 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20108 upon package.m4.
20109 * configure.in (ALL_LINGUAS): Add `tr'.
20110
20111 2001-09-21 Akim Demaille <akim@epita.fr>
20112
20113 * tests/Makefile.am (package.m4): Move to...
20114 ($(srcdir)/$(TESTSUITE)): here.
20115
20116 2001-09-20 Akim Demaille <akim@epita.fr>
20117
20118 * src/complain.c: No longer try to be standalone: use system.h.
20119 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20120 * src/complain.h: Likewise.
20121 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20122 Remove the unused variable `n'.
20123 From Albert Chin-A-Young.
20124
20125 2001-09-18 Marc Autret <autret_m@epita.fr>
20126
20127 * doc/bison.1: Update.
20128 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20129 descriptions.
20130 (Option Cross Key): Update.
20131 Add --graph.
20132
20133 2001-09-18 Marc Autret <autret_m@epita.fr>
20134
20135 * tests/regression.at: New test (comment in %union).
20136
20137 2001-09-18 Marc Autret <autret_m@epita.fr>
20138
20139 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20140 do that.
20141 Reported by Keith Browne.
20142
20143 2001-09-18 Marc Autret <autret_m@epita.fr>
20144
20145 * tests/output.at: Add tests for --defines and --graph.
20146
20147 2001-09-18 Marc Autret <autret_m@epita.fr>
20148
20149 * tests/output.at: Removes tests of %{header,src}_extension features.
20150
20151 2001-09-18 Akim Demaille <akim@epita.fr>
20152
20153 * tests/Makefile.am (package.m4): New.
20154 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20155 (_AT_CHECK_CALC_ERROR): Likewise.
20156 Factor the `, ' part of verbose error messages.
20157
20158 2001-09-18 Marc Autret <autret_m@epita.fr>
20159
20160 * src/getargs.c (longopts): Declare --defines and --graph as options
20161 with optional arguments.
20162 * src/files.h: Add extern declarations.
20163 * src/files.c (spec_graph_file, spec_defines_file): New.
20164 (output_files): Update.
20165 Remove CPP-outed code.
20166
20167 2001-09-18 Marc Autret <autret_m@epita.fr>
20168
20169 Turn off %{source,header}_extension feature.
20170
20171 * src/files.c (compute_exts_from_gf): Update.
20172 (compute_exts_from_src): Update.
20173 (output_files): CPP-out useless code.
20174 * src/files.h: Remove {header,source}_extension extern declarations.
20175 * src/reader.c (parse_dquoted_param): CPP-out.
20176 (parse_header_extension_decl): Remove.
20177 (parse_source_extension_decl): Remove.
20178 (read_declarations): Remove cases tok_{hdrext,srcext}.
20179 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20180 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20181
20182 2001-09-10 Akim Demaille <akim@epita.fr>
20183
20184 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20185 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20186 (AT_CHECK_OUTPUT): this.
20187 Merely check ls' exit status, its output is useless.
20188
20189 2001-09-10 Akim Demaille <akim@epita.fr>
20190
20191 * tests/calc.at: Use m4_match.
20192 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20193
20194 2001-09-10 Marc Autret <autret_m@epita.fr>,
20195 Akim Demaille <akim@epita.fr>
20196
20197 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20198 enum color_e.
20199 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20200 to `normal'.
20201 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20202 * src/lex.h: Adjust prototype.
20203 (token_t): Add `tok_undef'.
20204 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20205 (parse_percent_token): Now returns token_t.
20206 Add default statement in switch.
20207 (lex): Separate `c' as an input variable, from the token_t result
20208 part.
20209 (unlexed): Is a token_t.
20210
20211 2001-09-10 Akim Demaille <akim@epita.fr>
20212
20213 * configure.in: Bump to 1.29a.
20214
20215 2001-09-07 Akim Demaille <akim@epita.fr>
20216
20217 Version 1.29.
20218
20219 2001-08-30 Akim Demaille <akim@epita.fr>
20220
20221 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20222 * m4/atconfig.m4: Remove.
20223 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20224 * tests/bison: New.
20225 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20226 m4_if, m4_patsubst, and m4_regexp.
20227 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20228 `input' file instead of echo.
20229
20230 2001-08-29 Akim Demaille <akim@epita.fr>
20231
20232 Bump to 1.28e.
20233
20234 2001-08-29 Akim Demaille <akim@epita.fr>
20235
20236 Version 1.28d.
20237
20238 2001-08-29 Paul Eggert <eggert@twinsun.com>
20239
20240 * src/bison.simple (yyparse): Don't take the address of an
20241 item before the start of an array, as that doesn't conform to
20242 the C Standard.
20243
20244 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20245
20246 * doc/bison.texinfo (Location Tracking Calc): New node.
20247
20248 2001-08-29 Paul Eggert <eggert@twinsun.com>
20249
20250 * src/output.c (output): Do not define const, as this now
20251 causes more problems than it cures.
20252
20253 2001-08-29 Akim Demaille <akim@epita.fr>
20254
20255 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20256 the nodes.
20257 Be sure to tag the `detailmenu'.
20258
20259 2001-08-29 Akim Demaille <akim@epita.fr>
20260
20261 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20262 download in a tmp dir.
20263
20264 2001-08-28 Marc Autret <autret_m@epita.fr>
20265
20266 * config/depcomp: New file.
20267
20268 2001-08-28 Marc Autret <autret_m@epita.fr>
20269
20270 * doc/bison.1 (mandoc): Adjust.
20271 From Juan Manuel Guerrero.
20272
20273 2001-08-28 Marc Autret <autret_m@epita.fr>
20274
20275 * src/print_graph.c (print_state): Fix.
20276
20277 2001-08-27 Marc Autret <autret_m@epita.fr>
20278
20279 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20280 char * members.
20281 Echo modifications to the functions prototypes.
20282 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20283
20284 2001-08-27 Marc Autret <autret_m@epita.fr>
20285
20286 * src/vcg.c: Include `xalloc.h'.
20287 (add_colorentry): New.
20288 (add_classname): New.
20289 (add_infoname): New.
20290 * src/vcg.h: Add new prototypes.
20291
20292 2001-08-27 Akim Demaille <akim@epita.fr>
20293
20294 * Makefile.maint: Sync. again with CVS Autoconf.
20295
20296 2001-08-27 Akim Demaille <akim@epita.fr>
20297
20298 * Makefile.maint: Formatting changes.
20299 (po-update, cvs-update, update): New targets.
20300 (AMTAR): Remove.
20301
20302 2001-08-27 Akim Demaille <akim@epita.fr>
20303
20304 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20305 * Makefile.maint: Sync. with CVS Autoconf.
20306
20307 2001-08-27 Marc Autret <autret_m@epita.fr>
20308
20309 * src/vcg.h (struct infoname_s): New.
20310 (struct colorentry_s): New.
20311 (graph_s): New fields {vertical,horizontal}_order in structure.
20312 Add `infoname' field.
20313 Add `colorentry' field;
20314 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20315 (G_HORIZONTAL_ORDER): New.
20316 (G_INFONAME): New.
20317 (G_COLORENTRY): New.
20318 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20319 Add output of `infoname'.
20320 Add output of `colorentry'.
20321
20322 2001-08-27 Marc Autret <autret_m@epita.fr>
20323
20324 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20325 This one shadowed a global parameter.
20326
20327 2001-08-24 Marc Autret <autret_m@epita.fr>
20328
20329 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20330 instead of `unsigned'.
20331 (print_state): Do not call obstack_object_size () in obstack_grow ()
20332 to avoid macro variables shadowing.
20333
20334 2001-08-23 Marc Autret <autret_m@epita.fr>
20335
20336 * src/lex.c (percent_table): Typo: s/naem/name/.
20337 Add graph option.
20338 Normalize new options declarations.
20339
20340 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
20341
20342 * tests/suite.at: Exercise %header_extension and %source_extension.
20343
20344 2001-08-16 Marc Autret <autret_m@epita.fr>
20345
20346 * src/reader.c (parse_dquoted_param): New.
20347 (parse_header_extension_decl): Use it.
20348 (parse_source_extension_decl): Likewise.
20349
20350 2001-08-16 Marc Autret <autret_m@epita.fr>
20351
20352 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20353 (get_xxxx_str): Use assert () instead of complain ().
20354 Remove return invokations in default cases.
20355 (get_decision_str): Modify default behaviour. Remove second argument.
20356 Echo modifications on calls.
20357 (output_graph): Fix.
20358
20359 2001-08-16 Marc Autret <autret_m@epita.fr>
20360
20361 * src/getargs.c (usage): Update with ``-g, --graph''.
20362
20363 2001-08-16 Marc Autret <autret_m@epita.fr>
20364
20365 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20366 (Option Cross Key): Likewise.
20367 * doc/bison.1: Update.
20368
20369 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
20370
20371 * src/output.c (output_master_parser): Don't finish action_obstack.
20372 (output_parser): Don't care about the muscle action, here.
20373 (prepare): Copy the action_obstack in the action muscle.
20374 (output): Free action_obstack.
20375
20376 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20377
20378 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20379 will contain `%union' declaration.
20380 (parse_union_decl): Delete #line directive output.
20381 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20382 informations about %union.
20383 (parse_union_decl): Copy the union_obstack in the muscle stype.
20384 * src/bison.simple: Add new #line directive.
20385 Add typdef %%stype YYSTYPE.
20386
20387 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20388
20389 * src/bison.simple: Add new `#line' directive.
20390
20391 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
20392
20393 * src/bison.simple: New `#line' directive.
20394 * src/output.c (output_parser): Support new dynamic muscle input_line.
20395
20396 2001-09-22 Marc Autret <autret_m@epita.fr>
20397
20398 * src/output.c (output_master_parser): New.
20399 (output_parser): Be more re-entrant.
20400
20401 2001-09-21 Marc Autret <autret_m@epita.fr>
20402
20403 * src/reader.c (copy_definition, parse_union_decl): Update and use
20404 `linef' muscle.
20405 (copy_action): Likewise.
20406 Use obstack_1grow ().
20407 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20408
20409 2001-09-21 Marc Autret <autret_m@epita.fr>
20410
20411 * src/options.c (option_table): Adjust.
20412 * src/lex.c (parse_percent_token): Fix.
20413
20414 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20415
20416 * src/options.c (symtab.h): Include it, need by lex.h.
20417
20418 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20419
20420 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20421 is now an option_table_struct*.
20422 (option_strcmp): New function option_strcmp.
20423 (parse_percent_token): Call option_strcmp.
20424 * src/getargs.c (xalloc.h, options.h): Include it.
20425 (getargs): Call create_long_option_table.
20426 (getargs): Free longopts at the end of the function.
20427 (shortopts): Move in options.c.
20428 * src/options.c (create_long_option_table): New function. Convert
20429 information from option_table to option structure.
20430 * src/reader.c (options.h): Include it.
20431
20432 * src/Makefile.am: Adjust.
20433 * src/options.c (option_table): Create from longopts and percent_table.
20434 * src/getargs.c (longopts): Delete.
20435 * src/lex.c (struct percent_table_struct): Delete.
20436 (percent_table): Delete.
20437 (options.h): Include it.
20438 * src/options.c: Create.
20439 * src/options.h: Create.
20440 Declare enum opt_access_e.
20441 Define struct option_table_struct.
20442
20443 2001-09-20 Marc Autret <autret_m@epita.fr>
20444
20445 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20446 sections of Bison.
20447
20448 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
20449
20450 * src/bison.simple: s/%%filename/%%skeleton.
20451 * src/muscle_tab.c (getargs.h): Include it.
20452 (muscle_init): Insert new muscle skeleton.
20453
20454 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
20455
20456 * src/output.c (output_parser): Delete unused variable actions_dumped.
20457
20458 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
20459
20460 * src/output.c (output): Delete call to reader_output_yylsp.
20461 * src/reader.c (reader): Likewise.
20462 * src/reader.h: Delete declaration of reader_output_yylsp.
20463
20464 2001-09-02 Marc Autret <autret_m@epita.fr>
20465
20466 * src/reader.c: Include muscle_tab.h.
20467 (parse_union_decl): Update.
20468 (parse_macro_decl): Rename parse_muscle_decl.
20469 Update to use renamed functions and variable.
20470 (read_declarations, copy_action, read_additionnal_code, : Updated
20471 with correct variables and functions names.
20472 (packsymbols, reader): Likewise.
20473
20474 * src/reader.h (muscle_obstack): Extern declaration update.
20475
20476 * src/output.c: Include muscle_tab.h
20477 In all functions using macro_insert, change by using muscle_insert ().
20478 (macro_obstack): Rename muscle_obstack.
20479 Echo modifications in the whole file.
20480 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20481 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20482 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20483
20484 * src/muscle_tab.h: Update double inclusion macros.
20485 (macro_entry_s): Rename muscle_entry_s.
20486 Update prototypes.
20487
20488 * src/muscle_tab.c: Include muscle_tab.h.
20489 Rename macro_tabble to muscle_table.
20490 (mhash1, mhash2, mcmp): Use muscle_entry.
20491 (macro_init): Rename muscle_init. Update.
20492 (macro_insert): Rename muscle_insert. Update.
20493 (macro_find): Rename muscle_find. Update.
20494
20495 * src/main.c: Include muscle_tab.h.
20496 (main): Call muscle_init ().
20497 * src/Makefile.am (bison_SOURCES): Echo modifications.
20498
20499 2001-09-02 Marc Autret <autret_m@epita.fr>
20500
20501 Now the files macro_tab.[ch] are named muscle_tab.[ch].
20502
20503 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20504
20505 2001-09-02 Marc Autret <autret_m@epita.fr>
20506
20507 * src/macrotab.c, src/macrotab.h: Remove.
20508
20509 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
20510
20511 * src/reader.c (copy_guard): Use muscle to specify the `#line'
20512 filename.
20513
20514 2001-09-01 Marc Autret <autret_m@epita.fr>
20515
20516 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20517 to an explicit value to activate the feature. We do it here.
20518
20519 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20520
20521 * src/output.c (prepare): Delete the `filename' muscule insertion.
20522 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20523 (parse_union_decl): Likewise.
20524 * src/macrotab.c (macro_init): Initialize filename by infile.
20525
20526 2001-08-31 Marc Autret <autret_m@epita.fr>
20527
20528 * src/bison.simple (YYLSP_NEEDED): New definition.
20529 * src/output.c (prepare): Add macro insertion of `locations_flag'
20530
20531 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20532
20533 * src/output.c (prepare): Delete insertion of previous muscles,
20534 and insert the `prefix' muscles.
20535 * src/macrotab.c (macro_init): Likewise.
20536 (macro_init): Initialization prefix directive by `yy'.
20537 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
20538 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20539 yylval, yydebug, yyerror, yynerrs and yyparse.
20540 New directive `#define' to substitute yydebug, ... with option
20541 name_prefix.
20542
20543 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20544
20545 * src/main.c (main): Standardize.
20546 * src/output.c (output_table_data, output_parser): Likewise.
20547 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20548
20549 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20550
20551 * src/reader.c (read_additionnal_code): Rename %%user_code to
20552 %%epilogue.
20553 * src/output.c (output): Rename %%declarations to %%prologue.
20554 * src/bison.simple: Echo modifications.
20555
20556 2001-08-31 Marc Autret <autret_m@epita.fr>
20557
20558 * src/reader.c (readgram): CleanUp.
20559 (output_token_defines): Likewise.
20560 (packsymbols): Likewise.
20561 (reader): Likewise.
20562 * src/output.c (output): CPP-out useless code.
20563
20564 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20565
20566 * src/reader.c (reader): Delete obsolete call to function
20567 output_trailers and output_headers.
20568 * src/output.h: Remove obsolete functions prototypes of output_headers
20569 and output_trailers.
20570
20571 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
20572
20573 * src/main.c: Include macrotab.h.
20574 * src/macrotab.h (macro_entry_s): Constify fields.
20575 Adjust functions prototypes.
20576 * src/macrotab.c (macro_insert): Constify key and value.
20577 (macro_find): Constify key.
20578 (macro_insert): Include 'xalloc.h'
20579 (macro_insert): Use XMALLOC.
20580 (macro_find): Constify return value.
20581 * src/output.c (output_table_data): Rename table to table_data.
20582 (output_parser): Constify macro_key, macro_value.
20583
20584 2001-08-30 Marc Autret <autret_m@epita.fr>
20585
20586 * src/reader.c (parse_skel_decl): New.
20587 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
20588 * src/lex.h (token_t): New token `tok_skel'.
20589 * src/lex.c (percent_table): Add skeleton option entry.
20590 Standardize.
20591
20592 2001-08-29 Marc Autret <autret_m@epita.fr>
20593
20594 * src/bison.simple: Add %%user_code directive at the end.
20595 * src/reader.c (read_additionnal_code): New.
20596 (reader): Use it.
20597 * src/output.c (output_program): Remove.
20598 (output): Update.
20599
20600 2001-08-28 Marc Autret <autret_m@epita.fr>
20601
20602 * src/output.c (output_actions): Clean up.
20603 (output_gram): CPP-out useless code.
20604 * src/reader.c (reader): Clean up, CPP-out useless code.
20605
20606 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
20607
20608 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
20609 directive.
20610 * src/bison.simple: Add `%%definitions'.
20611
20612 2001-08-28 Marc Autret <autret_m@epita.fr>
20613
20614 * config/depcomp: New file.
20615
20616 2001-08-27 Paul Eggert <eggert@twinsun.com>
20617
20618 * src/bison.simple (yyparse): Don't take the address of an
20619 item before the start of an array, as that doesn't conform to
20620 the C Standard.
20621
20622 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20623
20624 * src/output.c (output): Remove the initialization of the macro
20625 obstack. It was done too late here.
20626
20627 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20628 completely wrong.
20629 (reader): Initialize the macro obstack here, since we need it to grow
20630 '%define' directives.
20631
20632 * src/reader.h: Declare the macro obstack as extern.
20633
20634 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20635
20636 * src/output.c (output_parser): Fix. Store single '%' characters in
20637 the output obstack instead of throwing them away.
20638
20639 2001-08-27 Akim Demaille <akim@epita.fr>
20640
20641 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20642
20643 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20644
20645 * lib/Makefile.am: Adjust.
20646
20647 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20648
20649 * src/bison.simple: Update and add '%%' directives.
20650
20651 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20652
20653 * src/reader.c (reader): Remove calls to 'output_headers' and
20654 'output_trailers'. Remove some C output.
20655 (readgram): Disable a piece of code that was writing a default
20656 definition for 'YYSTYPE'.
20657 (reader_output_yylsp): Remove.
20658 (packsymbols): Output token defintions to a macro.
20659 (copy_definition): Disable C output.
20660
20661 * src/reader.c (parse_macro_decl): New function used to parse macro
20662 declarations.
20663 (copy_string2): Put the body of copy_string into this new function.
20664 Add a parameter to let the caller choose whether he wants to copy the
20665 string delimiters or not.
20666 (copy_string): Be a simple call to copy_string2 with the last argument
20667 bound to true.
20668 (read_declarations): Add case for macro definition.
20669 (copy_identifier): New.
20670 (parse_macro_decl): Read macro identifiers using copy_identifier
20671 rather than lex.
20672
20673 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20674
20675 * src/output.c (prepare): Add prefixed names.
20676 (output_parser): Output semantic actions.
20677 (output_parser): Fix bug on '%%line' directives.
20678
20679 * src/output.c (output_headers): Remove. The C code printed by this
20680 function should now be in the skeletons.
20681 (output_trailers): Remove.
20682 (output): Disable call to 'reader_output_yylsp'.
20683 (output_rule_data): Do not output tables to the table obstack.
20684
20685 * src/output.c: Remove some C dedicated output.
20686 Improve the use of macro and output obstacks.
20687 (output_defines): Remove.
20688
20689 * src/output.c (output_token_translations): Associate 'translate'
20690 table with a macro. No output to the table obstack.
20691 (output_gram): Same for 'rhs' and 'prhs'.
20692 (output_stos): Same for 'stos'.
20693 (output_rule_data): Same for 'r1' and 'r2'.
20694 (token_actions): Same for 'defact'.
20695 (goto_actions): Same for 'defgoto'.
20696 (output_base): Same for 'pact' and 'pgoto'.
20697 (output_table): Same for 'table'.
20698 (output_check): Same for 'check'.
20699
20700 * src/output.c (output_table_data): New function.
20701 (output_short_table): Remove.
20702 (output_short_or_char_table): Remove.
20703
20704 * src/output.c (output_parser): Replace most of the skeleton copy code
20705 with something new. Skeletons are now processed character by character
20706 rather than line by line, and Bison looks for '%%' macros. This is the
20707 first step in making Bison's output process (a lot) more flexible.
20708 (output_parser): Use the macro table.
20709
20710 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20711
20712 * src/main.c (main): Initialize the macro table.
20713
20714 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20715
20716 * src/lex.c (percent_table): Add tok_define.
20717 * src/lex.h: Add tok_define.
20718
20719 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20720
20721 * src/macrotab.c: New file.
20722 * src/macrotab.h: New file.
20723 * src/Makefile.am: Update.
20724
20725 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20726
20727 * lib/hash.c: New file.
20728 * lib/hash.h: New file.
20729 * lib/Makefile.am: Update.
20730
20731 2001-08-15 Akim Demaille <akim@epita.fr>
20732
20733 Version 1.28c.
20734
20735 2001-08-15 Marc Autret <autret_m@epita.fr>
20736
20737 * src/reader.c (readgram): Indent output macro YYSTYPE.
20738 (packsymbols): Likewise.
20739 (output_token_defines): Likewise.
20740 * src/files.c: Standardize.
20741 (compute_header_macro): New.
20742 (defines_obstack_save): New. Use compute_header_macro.
20743 (output_files): Update. Use defines_obstack_save.
20744
20745 2001-08-15 Akim Demaille <akim@epita.fr>
20746
20747 * doc/bison.texinfo (Table of Symbols): Document
20748 YYSTACK_USE_ALLOCA.
20749
20750 2001-08-15 Akim Demaille <akim@epita.fr>
20751
20752 * missing: Update from CVS Automake.
20753 * config/config.guess, config/config.sub, config/texinfo.tex:
20754 Update from gnu.org.
20755
20756 2001-08-15 Akim Demaille <akim@epita.fr>
20757
20758 * Makefile.maint: Sync with CVS Autoconf.
20759
20760 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
20761
20762 * doc/bison.texinfo: Include GNU Free Documentation License from
20763 `fdl.texi'.
20764 * doc/fdl.texi: Add to package.
20765
20766 2001-08-14 Marc Autret <autret_m@epita.fr>
20767
20768 Turn on %{source,header}_extension features.
20769
20770 * src/lex.c (percent_table): Un-CPP out header_extension and
20771 source_extension.
20772 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
20773 (compute_exts_from_src): Remove conditions. It restores priorities
20774 between options.
20775
20776 2001-08-14 Marc Autret <autret_m@epita.fr>
20777
20778 * src/files.c (compute_base_names): Add extensions computing when
20779 `--file-prefix' used.
20780 Standardize function calls.
20781
20782 2001-08-13 Marc Autret <autret_m@epita.fr>
20783
20784 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
20785 defining it (defined but null disables alloca).
20786
20787 2001-08-13 Marc Autret <autret_m@epita.fr>
20788
20789 * src/bison.simple (_yy_memcpy): CPP reformat.
20790
20791 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
20792
20793 * tests/atconfig.in (CPPFLAGS): Fix.
20794
20795 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
20796
20797 * doc/bison.texinfo: Include GNU General Public License from
20798 `gpl.texi'.
20799 * doc/gpl.texi: Add to package.
20800
20801 2001-08-10 Marc Autret <autret_m@epita.fr>
20802
20803 * src/print_graph.h: Fix.
20804 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
20805
20806 2001-08-10 Akim Demaille <akim@epita.fr>
20807
20808 * src/system.h: Provide default declarations for stpcpy, strndup,
20809 and strnlen.
20810
20811 2001-08-10 Robert Anisko <anisko_r@epita.fr>
20812
20813 * doc/bison.texinfo (Locations): Update @$ stuff.
20814
20815 2001-08-09 Robert Anisko <anisko_r@epita.fr>
20816
20817 * src/bison.simple (YYLLOC_DEFAULT): Update.
20818 (yyparse): Adjust.
20819
20820 2001-08-08 Marc Autret <autret_m@epita.fr>
20821
20822 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
20823 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
20824 Reported by Fabrice Bauzac.
20825
20826 2001-08-08 Marc Autret <autret_m@epita.fr>
20827
20828 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
20829 * src/vcg.c (output_node): Fix.
20830 * src/vcg.h: Cleanup.
20831 * src/print_graph.c: Add comments.
20832 (node_output_size): New global variable. Simplify the formatting of
20833 the VCG graph output.
20834 (print_actions): Unused code is now used. It notifies the final state
20835 and no action states in the VCG graph. It also give the reduce actions.
20836 The `shift and goto' edges are red and the `go to state' edges are
20837 blue.
20838 Get the current node name and node_obstack by argument.
20839 (node_obstack): New variable.
20840 (print_state): Manage node_obstack.
20841 (print_core): Use node_obstack given by argument.
20842 A node is not only computed here but in print_actions also.
20843 (print_graph): CPP out useless code instead of commenting it.
20844
20845 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
20846
20847 * tests/atconfig.in (CPPFLAGS): Fix.
20848
20849 2001-08-07 Akim Demaille <akim@epita.fr>
20850
20851 * src/print_graph.c (quote): New.
20852 (print_core): Use it.
20853
20854 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
20855
20856 * src/vcg.c (complain.h): Include it.
20857 Unepitaize `return' invocations.
20858 [NDEBUG] (main): Remove.
20859 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
20860 * src/files.c (open_files): Initialize graph_obstack.
20861 * src/print_graph.c (print_actions): CPP out useless code.
20862 (print_core): Don't output the last `\n' in labels.
20863 Use `quote'.
20864 * src/files.c (output_files): Output the VCG file.
20865 * src/main.c (main): Invoke print_graph ();
20866
20867 2001-08-06 Marc Autret <autret_m@epita.fr>
20868
20869 Automaton VCG graph output.
20870 Using option ``-g'' or long option ``--graph'', you can generate
20871 a gram_filename.vcg file containing a VCG description of the LALR (1)
20872 automaton of your grammar.
20873
20874 * src/main.c: Call to print_graph() function.
20875 * src/getargs.h: Update.
20876 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
20877 (graph_flag): New flag.
20878 (longopts): Update.
20879 (getargs): Add case `g'.
20880 * src/files.c (graph_obstack): New obstack struct.
20881 (open_files): Initialize new obstack.
20882 (output_files): Saves graph_obstack if required.
20883 * src/files.h (graph_obstack): New extern declaration.
20884 * src/Makefile.am: Add new source files.
20885
20886 2001-08-06 Marc Autret <autret_m@epita.fr>
20887
20888 * src/print_graph.c, src/print_graph.h (graph): New.
20889 * src/vcg.h: New file.
20890 * src/vcg.c: New file, VCG graph handling.
20891
20892 2001-08-06 Marc Autret <autret_m@epita.fr>
20893
20894 Add of %source_extension and %header_extension which specify
20895 the source or/and the header output file extension.
20896
20897 * src/files.c (compute_base_names): Remove initialisation of
20898 src_extension and header_extension.
20899 (compute_exts_from_gf): Update.
20900 (compute_exts_from_src): Update.
20901 (output_files): Update.
20902 * src/reader.c (parse_header_extension_decl): New.
20903 (parse_source_extension_decl): New.
20904 (read_declarations): New case statements for the new tokens.
20905 * src/lex.c (percent_table): Add entries for %source_extension
20906 and %header_extension.
20907 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
20908
20909 2001-08-06 Marc Autret <autret_m@epita.fr>
20910
20911 * configure.in: Bump to 1.28c.
20912 * doc/bison.texinfo: Texinfo thingies.
20913
20914 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
20915
20916 * tests/atconfig.in (CPPFLAGS): Add.
20917 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
20918
20919 2001-08-03 Akim Demaille <akim@epita.fr>
20920
20921 Version 1.28b.
20922
20923 2001-08-03 Akim Demaille <akim@epita.fr>
20924
20925 * tests/Makefile.am (check-local): Ship testsuite.
20926 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
20927 Include `string.h'.
20928
20929 2001-08-03 Akim Demaille <akim@epita.fr>
20930
20931 * configure.in: Try using -Wformat when compiling.
20932
20933 2001-08-03 Akim Demaille <akim@epita.fr>
20934
20935 * configure.in: Bump to 1.28b.
20936
20937 2001-08-03 Akim Demaille <akim@epita.fr>
20938
20939 * src/complain.c: Adjust strerror_r portability issues.
20940
20941 2001-08-03 Akim Demaille <akim@epita.fr>
20942
20943 Version 1.28a.
20944
20945 2001-08-03 Akim Demaille <akim@epita.fr>
20946
20947 * src/getargs.c, src/getarg.h (skeleton)): Constify.
20948 * src/lex.c (literalchar): Avoid name clashes on `buf'.
20949 * src/getargs.c: Include complain.h.
20950 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
20951 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
20952
20953 2001-08-03 Akim Demaille <akim@epita.fr>
20954
20955 * src/reader.c (readgram): Display hidden chars in error messages.
20956
20957 2001-08-03 Akim Demaille <akim@epita.fr>
20958
20959 Update to gettext 0.10.39.
20960
20961 2001-08-03 Akim Demaille <akim@epita.fr>
20962
20963 * lib/strspn.c: New.
20964
20965 2001-08-01 Marc Autret <autret_m@epita.fr>
20966
20967 * doc/bison.texinfo: Update.
20968 * doc/bison.1 (mandoc): Update.
20969 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
20970 * src/files.c: Support output files extensions computing.
20971 (src_extension): New static variable.
20972 (header_extension): New static variable.
20973 (tr): New function.
20974 (get_extension_index): New function, gets the index of an extension
20975 filename in a string.
20976 (compute_exts_from_gf): New function, computes extensions from the
20977 grammar file extension.
20978 (compute_exts_from_src): New functions, computes extensions from the
20979 C source file extension, file given by ``-o'' option.
20980 (compute_base_names): Update.
20981 (output_files): Update.
20982
20983 2001-08-01 Robert Anisko <anisko_r@epita.fr>
20984
20985 * doc/bison.texi: Document @$.
20986 (Locations): New section.
20987
20988 2001-07-18 Akim Demaille <akim@epita.fr>
20989
20990 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
20991 * config/prev-version.txt, config/move-if-change: New.
20992 * Makefile.am: Adjust.
20993
20994 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
20995
20996 * src/bison.simple (yyparse): Suppress warning `comparaison
20997 between signed and unsigned'.
20998
20999 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
21000
21001 * src/getargs.h (raw_flag): Remove.
21002 * src/getargs.c: Die on `-r'/`--raw'.
21003 * src/lex.c (parse_percent_token): Die on `%raw'.
21004 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21005 * tests/calc.at: Suppress test with option `--raw'.
21006
21007 2001-07-14 Akim Demaille <akim@epita.fr>
21008
21009 * config/: New.
21010 * configure.in: Require Autoconf 2.50.
21011 Update to gettext 0.10.38.
21012
21013 2001-03-16 Akim Demaille <akim@epita.fr>
21014
21015 * doc/bison.texinfo: ANSIfy the examples.
21016
21017 2001-03-16 Akim Demaille <akim@epita.fr>
21018
21019 * getargs.c (skeleton): New variable.
21020 (longopts): --skeleton is a new option.
21021 (shortopts, getargs): -S is a new option.
21022 * getargs.h: Declare skeleton.
21023 * output.c (output_parser): Use it.
21024
21025 2001-03-16 Akim Demaille <akim@epita.fr>
21026
21027 * m4/strerror_r.m4: New.
21028 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21029 * lib/error.h, lib/error.c: Update.
21030
21031 2001-03-16 Akim Demaille <akim@epita.fr>
21032
21033 * src/getargs.c (longopts): Clean up.
21034
21035 2001-02-21 Akim Demaille <akim@epita.fr>
21036
21037 * src/reader.c (gensym): `gensym_count' is your own.
21038 Use a static buf to create the symbol name, as token_buffer is no
21039 longer a buffer.
21040
21041 2001-02-08 Akim Demaille <akim@epita.fr>
21042
21043 * src/conflicts.c (conflict_report): Be sure not to append to res
21044 between two calls, which could happen if both first sprintf were
21045 skipped, but not the first cp += strlen.
21046
21047 2001-02-08 Akim Demaille <akim@epita.fr>
21048
21049 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21050 New, from fileutils 4.0.37.
21051 * configure.in: Require Autoconf 2.49c. I took some time before
21052 making this decision. This is the only way out for portability
21053 issues in Bison, it would mean way too much duplicate effort to
21054 import in Bison features implemented in 2.49c since 2.13.
21055 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21056
21057 2001-02-02 Akim Demaille <akim@epita.fr>
21058
21059 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
21060 * lib/xalloc.h, lib/xmalloc.c: Update.
21061
21062 2001-01-19 Akim Demaille <akim@epita.fr>
21063
21064 Get rid of the ad hoc handling of token_buffer in the scanner: use
21065 the obstacks.
21066
21067 * src/lex.c (token_obstack): New.
21068 (init_lex): Initialize it. No longer call...
21069 (grow_token_buffer): this. Remove it.
21070 Adjust all the places which used it to use the obstack.
21071
21072 2001-01-19 Akim Demaille <akim@epita.fr>
21073
21074 * src/lex.h: Rename all the tokens:
21075 s/\bENDFILE\b/tok_eof/g;
21076 s/\bIDENTIFIER\b/tok_identifier/g;
21077 etc.
21078 Let them be enums, not #define, to ease debugging.
21079 Adjust all the code.
21080
21081 2001-01-18 Akim Demaille <akim@epita.fr>
21082
21083 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21084 * src/lex.c (maxtoken, grow_token_buffer): Static.
21085
21086 2001-01-18 Akim Demaille <akim@epita.fr>
21087
21088 Since we now use obstacks, more % directives can be enabled.
21089
21090 * src/lex.c (percent_table): Also accept `%yacc',
21091 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21092 `%debug'.
21093 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21094 instead of returning a token.
21095 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21096 * src/reader.c (read_declarations): Adjust.
21097 * src/files.c (open_files): Don't call `compute_base_names', don't
21098 compute `attrsfile' since they depend upon data which might be
21099 *in* the input file now.
21100 (output_files): Do it here.
21101 * src/output.c (output_headers): Document the fact that this patch
21102 introduces a guaranteed SEGV for semantic parsers.
21103 * doc/bison.texinfo: Document them.
21104 * tests/suite.at: Exercise these %options.
21105
21106 2000-12-20 Akim Demaille <akim@epita.fr>
21107
21108 Also handle the output file (--verbose) with obstacks.
21109
21110 * files.c (foutput): Remove.
21111 (output_obstack): New.
21112 Adjust all dependencies.
21113 * src/conflicts.c: Return a string.
21114 * src/system.h (obstack_grow_string): Rename as...
21115 (obstack_sgrow): this. Be ready to work with non literals.
21116 (obstack_fgrow4): New.
21117
21118 2000-12-20 Akim Demaille <akim@epita.fr>
21119
21120 * src/files.c (open_files): Fix the computation of short_base_name
21121 in the case of `-o foo.tab.c'.
21122
21123 2000-12-20 Akim Demaille <akim@epita.fr>
21124
21125 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21126 (copy_dollar): Now that everything uses obstacks, get rid of the
21127 FILE * parameters.
21128
21129 2000-12-20 Akim Demaille <akim@epita.fr>
21130
21131 * src/files.c (open_files): Actually the `.output' file is based
21132 on the short_base_name, not base_name.
21133 * tests/suite.at (Checking output file names): Adjust.
21134
21135 2000-12-20 Akim Demaille <akim@epita.fr>
21136
21137 * src/bison.s1: Remove, we now use directly...
21138 * src/bison.simple: this.
21139 * src/Makefile.am: Use pkgdata instead of data.
21140
21141 2000-12-20 Akim Demaille <akim@epita.fr>
21142
21143 * src/files.c (guard_obstack): New.
21144 (open_files): Initialize it.
21145 (output_files): Dump it...
21146 * src/files.h: Export it.
21147 * src/reader.c (copy_guard): Use it.
21148
21149 2000-12-19 Akim Demaille <akim@epita.fr>
21150
21151 * src/files.c (outfile, defsfile, actfile): Removed as global
21152 vars.
21153 (open_files): Don't compute them.
21154 (output_files): Adjust.
21155 (base_name, short_base_name): Be global.
21156 Adjust dependencies.
21157
21158 2000-12-19 Akim Demaille <akim@epita.fr>
21159
21160 * src/files.c (strsuffix): New.
21161 (stringappend): Be just like strcat but allocate.
21162 (base_names): Eve out from open_files.
21163 Try to simplify the rather hairy computation of base_name and
21164 short_base_name.
21165 (open_files): Use it.
21166 * tests/suite.at (Checking output file names): New test.
21167
21168 2000-12-19 Akim Demaille <akim@epita.fr>
21169
21170 * src/system.h (obstack_grow_literal_string): Rename as...
21171 (obstack_grow_string): this.
21172 * src/output.c (output_parser): Recognize `%% actions' instead of
21173 `$'.
21174 * src/bison.s1: s/$/%% actions/.
21175 * src/bison.hairy: Likewise.
21176
21177 2000-12-19 Akim Demaille <akim@epita.fr>
21178
21179 * src/output.c (output_parser): Compute the `#line' lines when
21180 there are.
21181 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21182 Suggested by Hans Aberg.
21183
21184 2000-12-19 Akim Demaille <akim@epita.fr>
21185
21186 Let the handling of the skeleton files be local to the procedures
21187 that use it.
21188
21189 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21190 longer static.
21191 (fparser, open_extra_files): Remove.
21192 (open_files, output_files): Don't take care of fparser.
21193 * src/files.h: Adjust.
21194 * src/output.c (output_parser): Open and close the file to the
21195 skeleton.
21196 * src/reader.c (read_declarations): When %semantic_parser, open
21197 fguard.
21198
21199 2000-12-19 Akim Demaille <akim@epita.fr>
21200
21201 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21202 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21203
21204 2000-12-19 Akim Demaille <akim@epita.fr>
21205
21206 * src/files.c (open_files): Yipee! We no longer need all the code
21207 looking for `/tmp' since we have no tmp file.
21208
21209 2000-12-19 Akim Demaille <akim@epita.fr>
21210
21211 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21212 New macros.
21213 * src/files.c (open_files): Less dependency on MSDOS etc.
21214
21215 2000-12-14 Akim Demaille <akim@epita.fr>
21216
21217 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21218 Provide a default definition.
21219 Use it when executing the default @ action.
21220 * src/reader.c (reader_output_yylsp): No longer include
21221 `timestamp' and `text' in the default YYLTYPE.
21222
21223 2000-12-12 Akim Demaille <akim@epita.fr>
21224
21225 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21226 (copy_guard): Quote the file names.
21227 Reported by Laurent Mascherpa.
21228
21229 2000-12-12 Akim Demaille <akim@epita.fr>
21230
21231 * src/output.c (output_headers, output_program, output): Be sure
21232 to escape special characters when outputting filenames.
21233 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21234 (output_headers): Don't depend on them, Use ACTSTR.
21235
21236 2000-11-17 Akim Demaille <akim@epita.fr>
21237
21238 * lib/obstack.h: Formatting changes.
21239 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21240 prevents type checking.
21241 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21242 cast the value to (void *): assigning a `foo *' to a `void *'
21243 variable is valid.
21244 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21245 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21246 append characters.
21247
21248 2000-11-17 Akim Demaille <akim@epita.fr>
21249
21250 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21251 as...
21252 (suite.m4, regression.m4, calc.m4): these.
21253 * tests/atgeneral.m4: Update from CVS Autoconf.
21254
21255 2000-11-17 Akim Demaille <akim@epita.fr>
21256
21257 * tests/regression.m4 (%union and --defines): New test,
21258 demonstrating a current bug in the obstack implementation.
21259
21260 2000-11-17 Akim Demaille <akim@epita.fr>
21261
21262 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21263 macros.
21264 Use them to declare the variables which are global or local to
21265 `yyparse'.
21266
21267 2000-11-17 Akim Demaille <akim@epita.fr>
21268
21269 * acconfig.h: Remove, no longer used.
21270
21271 2000-11-07 Akim Demaille <akim@epita.fr>
21272
21273 * src: s/Copyright (C)/Copyright/g.
21274
21275 2000-11-07 Akim Demaille <akim@epita.fr>
21276
21277 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21278 defining.
21279 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21280
21281 2000-11-07 Akim Demaille <akim@epita.fr>
21282
21283 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21284 Merge in a single CPP if/else.
21285
21286 2000-11-07 Akim Demaille <akim@epita.fr>
21287
21288 * src/output.c (output): Remove useless variables.
21289 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21290 argument `data' for consistency with the prototypes.
21291 Qualify it `const'.
21292 (obstack_copy, obstack_copy0): Rename the second argument as
21293 `address' for consistency. Qualify it `const'.
21294 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21295 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21296 `const' their input argument (`data' or `address').
21297 Adjust the corresponding macros to include `const' in casts.
21298
21299 2000-11-03 Akim Demaille <akim@epita.fr>
21300
21301 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21302 s/PFILE1/BISON_HAIRY/.
21303 Adjust dependencies.
21304
21305 2000-11-03 Akim Demaille <akim@epita.fr>
21306
21307 For some reason, this was not applied.
21308
21309 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21310 `unlink': it's no longer used.
21311
21312 2000-11-03 Akim Demaille <akim@epita.fr>
21313
21314 * src/files.c (skeleton_find): New function, eved out of...
21315 (open_files, open_extra_files): here.
21316
21317 2000-11-03 Akim Demaille <akim@epita.fr>
21318
21319 Don't use `atexit'.
21320
21321 * src/files.c (obstack_save): New function.
21322 (done): Rename as...
21323 (output_files): this.
21324 Use `obstack_save'.
21325 * src/main.c (main): Don't use `atexit' to register `done', since
21326 it no longer has to remove tmp files, just call `output_files'
21327 when there are no errors.
21328
21329 2000-11-02 Akim Demaille <akim@epita.fr>
21330
21331 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21332 `unlink': it's no longer used.
21333 * src/files.h: Formatting changes.
21334
21335 2000-11-02 Akim Demaille <akim@epita.fr>
21336
21337 Remove the last uses of mktemp and unlink/delete.
21338
21339 * src/files.c (fdefines, ftable): Removed.
21340 (defines_ostack, table_obstack): New.
21341 Adjust dependencies of the former into uses of the latter.
21342 * src/output.c (output_short_or_char_table, output_short_table):
21343 Convert to using obstacks.
21344 * src/reader.c (copy_comment2): Accept one FILE * and two
21345 obstacks.
21346 (output_token_defines, reader_output_yylsp): Use obstacks.
21347 * src/system.h (obstack_fgrow3): New.
21348 * po/POTFILES.in: Adjust.
21349
21350 2000-11-01 Akim Demaille <akim@epita.fr>
21351
21352 Change each use of `fattrs' into a use of `attrs_obstack'.
21353
21354 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21355 * src/files.c (fattrs): Remove.
21356 (attrs_obstack): New.
21357 Adjust all dependencies.
21358 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21359
21360 2000-11-01 Akim Demaille <akim@epita.fr>
21361
21362 Introduce obstacks.
21363 Change each use of `faction' into a use of `action_obstack'.
21364
21365 * lib/obstack.h, lib/obstack.c: New files.
21366 * src/files.c (faction): Remove.
21367 (action_obstack): New.
21368 Adjust all dependencies.
21369
21370 2000-10-20 Akim Demaille <akim@epita.fr>
21371
21372 * lib/quote.h (PARAMS): New macro. Use it.
21373
21374 2000-10-16 Akim Demaille <akim@epita.fr>
21375
21376 * src/output.c (output_short_or_char_table): New function.
21377 (output_short_table, output_token_translations): Use it.
21378 (goto_actions): Use output_short_table.
21379
21380 2000-10-16 Akim Demaille <akim@epita.fr>
21381
21382 * src/symtab.c (bucket_new): New function.
21383 (getsym): Use it.
21384
21385 * src/output.c (output_short_table): New argument to display the
21386 comment associated with the table.
21387 Adjust dependencies.
21388 (output_gram): Use it.
21389 (output_rule_data): Nicer output layout for YYTNAME.
21390
21391 2000-10-16 Akim Demaille <akim@epita.fr>
21392
21393 * src/lex.c (read_typename): New function.
21394 (lex): Use it.
21395 * src/reader.c (copy_dollar): Likewise.
21396
21397 2000-10-16 Akim Demaille <akim@epita.fr>
21398
21399 * src/reader.c (copy_comment2): Expect the input stream to be on
21400 the `/' which is suspected to open a comment, instead of being
21401 called after `//' or `/*' was read.
21402 (copy_comment, copy_definition, parse_union_decl, copy_action)
21403 (copy_guard): Adjust.
21404
21405 2000-10-16 Akim Demaille <akim@epita.fr>
21406
21407 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21408 `read_signed_integer'.
21409
21410 2000-10-16 Akim Demaille <akim@epita.fr>
21411
21412 * src/reader.c (copy_dollar): New function.
21413 (copy_guard, copy_action): Use it.
21414
21415 2000-10-16 Akim Demaille <akim@epita.fr>
21416
21417 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21418 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21419 New files, from Fileutils 4.0.27.
21420 * src/main.c (printable_version): Remove.
21421 * src/lex.c, src/reader.c: Use `quote'.
21422
21423 2000-10-04 Akim Demaille <akim@epita.fr>
21424
21425 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21426
21427 2000-10-04 Akim Demaille <akim@epita.fr>
21428
21429 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21430
21431 2000-10-04 Akim Demaille <akim@epita.fr>
21432
21433 When a literal string is used to define two different tokens,
21434 `bison -v' segfaults.
21435 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21436
21437 * tests/regression.m4: New file.
21438 Include the core of the sample provided by Piotr Gackiewicz.
21439 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21440 properly.
21441
21442 2000-10-04 Akim Demaille <akim@epita.fr>
21443
21444 * src/reader.c (parse_expect_decl): Keep `count' within the size
21445 of `buffer'.
21446 From Neil Booth.
21447
21448 2000-10-02 Paul Eggert <eggert@twinsun.com>
21449
21450 * bison.s1 (yyparse): Assign the default value
21451 unconditionally, to avoid a GCC warning and make the parser a
21452 tad smaller.
21453
21454 2000-10-02 Akim Demaille <akim@epita.fr>
21455
21456 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21457 options.
21458
21459 2000-10-02 Akim Demaille <akim@epita.fr>
21460
21461 * src/derives.c, src/print.c, src/reduce.c: To ease the
21462 translation, move some `\n' out of the translated strings.
21463
21464 2000-10-02 Akim Demaille <akim@epita.fr>
21465
21466 The location tracking mechanism is precious for parse error
21467 messages. Nevertheless, it is enabled only when `@n' is used in
21468 the grammar, which is a different issue (you can use it in error
21469 message, but not in the grammar per se). Therefore, there should
21470 be another means to enable it.
21471
21472 * src/getargs.c (getargs): Support `--locations'.
21473 (usage): Report it.
21474 * src/getargs.h (locationsflag): Export it.
21475 * src/lex.c (percent_table): Support `%locations'.
21476 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21477 with `locationsflag'.
21478 * doc/bison.texinfo: Document `--locations' and `%locations'.
21479 Sort the options.
21480 * tests/calc.m4: Test it.
21481
21482 For regularity of the names, replace each
21483 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21484 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21485 In addition replace each `flag' with `_flag'.
21486
21487 2000-10-02 Akim Demaille <akim@epita.fr>
21488
21489 Also test parse error messages, including with YYERROR_VERBOSE.
21490
21491 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21492 associative).
21493 Use it to check the computations.
21494 Use it to check `nonassoc' is honored.
21495 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21496 `--yyerror-verbose'.
21497 (_AT_CHECK_CALC): Adjust to this option.
21498 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21499
21500 2000-10-02 Akim Demaille <akim@epita.fr>
21501
21502 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21503 the latter demonstrates a flaw in the handling of non debugging
21504 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21505 was used in order to simplify:
21506
21507 #if YYDEBUG
21508 if (yydebug)
21509 {
21510 ...
21511 }
21512 #endif
21513
21514 into
21515
21516 if (yydebug)
21517 {
21518 ...
21519 }
21520
21521 unfortunately this leads to a CPP conflict when
21522 `--name-prefix=foo' is used since it produces `#define yydebug
21523 foodebug'.
21524
21525 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21526 (YYDPRINTF): New macro.
21527 Spread its use.
21528 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21529 the bison options.
21530 Also test `--verbose', `--defines' and `--name-prefix'.
21531
21532 2000-10-02 Akim Demaille <akim@epita.fr>
21533
21534 Improve the readability of the produced parsers.
21535
21536 * src/bison.s1: Formatting changes.
21537 Improve the comment related to the `$' mark.
21538 (yydefault): Don't fall through to `yyresume': `goto' there.
21539 * src/output.c (output_parser): When the `$' is met, skip the end
21540 of its line.
21541 New variable, `number_of_dollar_signs', to check there's exactly
21542 one `$' in the parser skeleton.
21543
21544 2000-10-02 Akim Demaille <akim@epita.fr>
21545
21546 * lib/xstrdup.c: New file, from the fileutils.
21547 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21548 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21549 instead of strlen + xmalloc + strcpy.
21550 * src/symtab.c (copys): Remove, use xstrdup instead.
21551
21552 2000-10-02 Akim Demaille <akim@epita.fr>
21553
21554 * src/gram.h (associativity): New enum type which replaces the
21555 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21556 `right_assoc', `left_assoc' and `non_assoc'.
21557 Adjust all dependencies.
21558 * src/reader.c: Formatting changes.
21559 (LTYPESTR): Don't define it, use it as a literal in
21560 `reader_output_yylsp'.
21561 * src/symtab.h (symbol_class): New enum type which replaces the
21562 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21563 `sunknown', `stoken and `snterm'.
21564
21565 2000-10-02 Akim Demaille <akim@epita.fr>
21566
21567 * src/getargs.c (fixed_outfiles): Rename as...
21568 (yaccflag): for consistency and accuracy.
21569 Adjust dependencies.
21570
21571 2000-10-02 Akim Demaille <akim@epita.fr>
21572
21573 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21574 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21575 difficult and introduced a lot of core dump. It turns out that
21576 Bison used an implementation of `xmalloc' based on `calloc', and
21577 at various places it does depend upon the initialization to 0. I
21578 have not tried to isolate the pertinent places, and all the former
21579 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21580 someone should address this issue.
21581
21582 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21583 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21584 files.
21585 Adjust dependencies.
21586 * src/warshall.h: New file.
21587 Propagate.
21588
21589 2000-10-02 Akim Demaille <akim@epita.fr>
21590
21591 Various anti-`extern in *.c' changes.
21592
21593 * src/system.h: Include `assert.h'.
21594
21595 2000-10-02 Akim Demaille <akim@epita.fr>
21596
21597 * src/state.h (nstates, final_state, first_state, first_shift)
21598 (first_reduction): Move their exportation from here...
21599 * src/LR0.h: to here.
21600 Adjust dependencies.
21601 * src/getargs.c (statisticsflag): New variable.
21602 Add support for `--statistics'.
21603 Adjust dependencies.
21604
21605 Remove a lot of now useless `extern' statements in most files.
21606
21607 2000-10-02 Akim Demaille <akim@epita.fr>
21608
21609 * src/LR0.h: New file.
21610 Propagate its use.
21611
21612 2000-10-02 Akim Demaille <akim@epita.fr>
21613
21614 * src/print.h: New file.
21615 Propagate its use.
21616 * src/print.c: Formatting and ordering changes.
21617 (verbose, terse): Replace with...
21618 (print_results): this new function.
21619 Adjust dependencies.
21620
21621 2000-10-02 Akim Demaille <akim@epita.fr>
21622
21623 * src/conflicts.c (conflict_report): New function.
21624 (conflict_log, verbose_conflict_log): Replace with...
21625 (print_conflicts): this function.
21626 Adjust dependencies.
21627 * src/conflicts.h: New file.
21628 Propagate its inclusion.
21629
21630 2000-10-02 Akim Demaille <akim@epita.fr>
21631
21632 * src/nullable.h: New file.
21633 Propagate its inclusion.
21634 * src/nullable.c: Formatting changes.
21635
21636 2000-10-02 Akim Demaille <akim@epita.fr>
21637
21638 * src/reduce.h: New file.
21639 Propagate its inclusion.
21640 * src/reduce.c: Topological sort and other formatting changes.
21641 (bool, TRUE, FALSE): Move their definition to...
21642 * src/system.h: here.
21643
21644 2000-10-02 Akim Demaille <akim@epita.fr>
21645
21646 * src/files.c: Formatting changes.
21647 (tryopen, tryclose, openfiles): Rename as...
21648 (xfopen, xfclose, open_files): this.
21649 (stringappend): static.
21650 * src/files.h: Complete the list of exported symbols.
21651 Propagate its use.
21652
21653 2000-10-02 Akim Demaille <akim@epita.fr>
21654
21655 * src/reader.h: New file.
21656 Propagate its use instead of tedious list of `extern' and
21657 prototypes.
21658 * src/reader.c: Formatting changes, topological sort,
21659 s/register//.
21660
21661 2000-10-02 Akim Demaille <akim@epita.fr>
21662
21663 * src/lex.h: Prototype `lex.c' exported functions.
21664 * src/reader.c: Adjust.
21665 * src/lex.c: Formatting changes.
21666 (safegetc): Rename as...
21667 (xgetc): this.
21668
21669 2000-10-02 Akim Demaille <akim@epita.fr>
21670
21671 * src/lalr.h: New file.
21672 Propagate its inclusion instead of prototypes and `extern'.
21673 * src/lalr.c: Formatting changes, topological sorting etc.
21674
21675 2000-10-02 Akim Demaille <akim@epita.fr>
21676
21677 * src/output.c (token_actions): Introduce a temporary array,
21678 YYDEFACT, that makes it possible for this function to use
21679 output_short_table.
21680
21681 2000-10-02 Akim Demaille <akim@epita.fr>
21682
21683 `user_toknums' is output as a `short[]' in `output.c', while it is
21684 defined as a `int[]' in `reader.c'. For consistency with the
21685 other output tables, `user_toknums' is now defined as a table of
21686 shorts.
21687
21688 * src/reader.c (user_toknums): Be a short table instead of an int
21689 table.
21690 Adjust dependencies.
21691
21692 Factor the short table outputs.
21693
21694 * src/output.c (output_short_table): New function.
21695 * src/output.c (output_gram, output_stos, output_rule_data)
21696 (output_base, output_table, output_check): Use it.
21697
21698 2000-10-02 Akim Demaille <akim@epita.fr>
21699
21700 * src/output.c (output): Topological sort of the functions, in
21701 order to get rid of the `static' prototypes.
21702 No longer use `register'.
21703 * src/output.h: New file.
21704 Propagate its inclusion in files explicitly prototyping functions
21705 from output.c.
21706
21707 2000-09-21 Akim Demaille <akim@epita.fr>
21708
21709 * src/atgeneral.m4: Update from Autoconf.
21710
21711 2000-09-21 Akim Demaille <akim@epita.fr>
21712
21713 * src/closure.h: New file.
21714 * src/closure.c: Formatting changes, topological sort over the
21715 functions, use of closure.h.
21716 (initialize_closure, finalize_closure): Rename as...
21717 (new_closure, free_closure): these. Adjust dependencies.
21718 * src/LR0.c: Formatting changes, topological sort, use of
21719 cloture.h.
21720 (initialize_states): Rename as...
21721 (new_states): this.
21722 * src/Makefile.am (noinst_HEADERS): Adjust.
21723
21724 2000-09-20 Akim Demaille <akim@epita.fr>
21725
21726 * src/acconfig.h: Don't protect config.h against multiple
21727 inclusion.
21728 Don't define PARAMS.
21729 * src/system.h: Define PARAMS.
21730 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
21731 purpose of config.h. system.h must not try to fix wrong
21732 definitions in config.h.
21733
21734 2000-09-20 Akim Demaille <akim@epita.fr>
21735
21736 * src/derives.h: New file.
21737 * src/main.c, src/derives.h: Use it.
21738 Formatting changes.
21739 * src/Makefile.am (noinst_HEADERS): Adjust.
21740
21741 2000-09-20 Akim Demaille <akim@epita.fr>
21742
21743 * tests/atgeneral.m4: Update from Autoconf.
21744 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
21745 (AT_CHECK_CALC): New macros.
21746 Use these macros to test bison with options `', `--raw',
21747 `--debug', `--yacc', `--yacc --debug'.
21748
21749 2000-09-19 Akim Demaille <akim@epita.fr>
21750
21751 * src/output.c: Formatting changes.
21752 * src/machine.h: Remove, leaving its contents in...
21753 * src/system.h: here.
21754 Include stdio.h.
21755 Adjust all dependencies on stdio.h and machine.h.
21756 * src/getargs.h: New file.
21757 Let all `extern' declarations about getargs.c be replaced with
21758 inclusion of `getargs.h'.
21759 * src/Makefile.am (noinst_HEADERS): Adjust.
21760
21761 * tests/calc.m4 (yyin): Be initialized in main, not on the global
21762 scope.
21763 (yyerror): Returns void, not int.
21764 * doc/bison.texinfo: Formatting changes.
21765
21766 2000-09-19 Akim Demaille <akim@epita.fr>
21767
21768 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
21769 portable.
21770
21771 2000-09-18 Akim Demaille <akim@epita.fr>
21772
21773 * configure.in: Append WARNING_CFLAGS to CFLAGS.
21774 * src/Makefile.am (INCLUDES): Don't.
21775 Be ready to fetch headers in lib/.
21776
21777 2000-09-18 Akim Demaille <akim@epita.fr>
21778
21779 * doc/bison.texinfo: Update the copyright.
21780 ANSIfy and GNUify the examples.
21781 Remove the old menu.
21782
21783 2000-09-18 Akim Demaille <akim@epita.fr>
21784
21785 First set of tests: use the `calc' example from the documentation.
21786
21787 * src/bison.s1 (yyparse): Condition the code using `yytname' which
21788 is defined only when YYDEBUG is.
21789 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
21790 * src/files.c (tryopen, tryclose): Formatting changes.
21791 Move to the top and be static.
21792 * src/reader.c (read_signed_integer): Likewise.
21793 * tests/calc.m4: New file.
21794 * Makefile.am, suite.m4: Adjust.
21795 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
21796
21797 2000-09-18 Akim Demaille <akim@epita.fr>
21798
21799 Add support for an Autotest test suite for Bison.
21800
21801 * m4/m4.m4, m4/atconfig.m4: New files.
21802 * m4/Makefile.am (EXTRA_DIST): Adjust.
21803 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
21804 files.
21805 * src/getargs.c: Display a more standard --version message.
21806 * src/reader.c (reader): Formatting changes.
21807 No longer depend upon VERSION_STRING.
21808 * configure.in: No longer use `dnl'.
21809 Set up the test suite and the new directory `tests/.
21810 (VERSION_STRING): Remove.
21811
21812 2000-04-14 Akim Demaille <akim@epita.fr>
21813
21814 * src/reader.c (copy_comment2): New function, same as former
21815 `copy_comment', but outputs into two FILE *.
21816 (copy_comment): Use it.
21817 (parse_union_decl): Use it.
21818 (get_type, parse_start_decl): Use the same `invalid' message.
21819 (parse_start_decl, parse_union_decl): Use the same `multiple'
21820 message.
21821 (parse_union_decl, copy_guard, copy_action): Use the same
21822 `unmatched' message.
21823 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
21824
21825 2000-03-31 Akim Demaille <akim@epita.fr>
21826
21827 * src/files.c (tryopen, tryclose): Move to the top.
21828 Be static.
21829
21830 2000-03-31 Akim Demaille <akim@epita.fr>
21831
21832 * src/main.c (main): Don't call `done', exit does it.
21833
21834 2000-03-31 Akim Demaille <akim@epita.fr>
21835
21836 * allocate.c: s/return (foo)/return foo/.
21837 * lalr.c: Likewise.
21838 * LR0.c: Likewise.
21839 * output.c: Likewise.
21840 * reader.c: Likewise.
21841 * symtab.c: Likewise.
21842 * vmsgetargs.c: Likewise.
21843
21844 2000-03-31 Akim Demaille <akim@epita.fr>
21845
21846 Clean up the error reporting functions.
21847
21848 * src/report.c: New file.
21849 * src/report.h: Likewise.
21850 * src/Makefile.am: Adjust.
21851 * m4/error.m4: New file.
21852 * m4/Makefile.am: Adjust.
21853 * configure.in (jm_PREREQ_ERROR): Call it.
21854 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
21855 Remove.
21856 (fatal, fatals): Remove. All callers use complain.c::fatal.
21857 (warn, warni, warns, warnss, warnss): Remove. All callers use
21858 complain.c::complain.
21859 (toomany): Remove, use fatal instead.
21860 * src/files.c (done): No argument, use complain_message_count.
21861 * src/main.c (main): Register `done' to `atexit'.
21862
21863 * src/getargs.c (usage): More `fputs', less `fprintf'.
21864
21865 2000-03-28 Akim Demaille <akim@epita.fr>
21866
21867 * lib/: New directory.
21868 * Makefile.am (SUBDIRS): Adjust.
21869 * configure.in: Adjust.
21870 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
21871 useless.
21872 * src/alloca.c: Moved to lib/.
21873 * src/getopt.c: Likewise.
21874 * src/getopt1.c: Likewise.
21875 * src/getopt.h: Likewise.
21876 * src/ansi2knr.c: Likewise.
21877 * src/ansi2knr.1: Likewise.
21878 * src/Makefile.am: Adjust.
21879 * lib/Makefile.am: New file.
21880
21881 2000-03-28 Akim Demaille <akim@epita.fr>
21882
21883 * src/getargs.c (usage): Refresh the help message.
21884
21885 2000-03-17 Akim Demaille <akim@epita.fr>
21886
21887 * src/getopt1.c: Updated from textutils 2.0e
21888 * src/getopt.c: Likewise.
21889 * src/getopt.h: Likewise.
21890
21891 2000-03-17 Akim Demaille <akim@epita.fr>
21892
21893 * src/Makefile.am (bison.simple): Fix the awk program: quote only
21894 the file name, not the whole `#line LINE FILE'.
21895
21896 2000-03-17 Akim Demaille <akim@epita.fr>
21897
21898 On syntax errors, report the token on which we choked.
21899
21900 * src/bison.s1 (yyparse): In the label yyerrlab, when
21901 YYERROR_VERBOSE, add yychar in msg.
21902
21903 2000-03-17 Akim Demaille <akim@epita.fr>
21904
21905 * src/reader.c (copy_at): New function.
21906 (copy_guard): Use it.
21907 (copy_action): Use it.
21908
21909 2000-03-17 Akim Demaille <akim@epita.fr>
21910
21911 Be kind to translators, save some useless translations.
21912
21913 * src/main.c (banner): New function.
21914 (fatal_banner): Use it.
21915 (warn_banner): Use it.
21916
21917 2000-03-17 Akim Demaille <akim@epita.fr>
21918
21919 * src/reader.c (copy_definition): Use copy_string and
21920 copy_comment. Removed now unused `match', `ended',
21921 `cplus_comment'.
21922 (copy_comment, copy_string): Moved, to be visible from
21923 copy_definition.
21924
21925 2000-03-17 Akim Demaille <akim@epita.fr>
21926
21927 * src/reader.c (copy_string): Declare `static inline'. No
21928 problems with inline, since it is checked by configure.
21929 (copy_comment): Likewise.
21930
21931 2000-03-17 Akim Demaille <akim@epita.fr>
21932
21933 * src/reader.c (packsymbols): Formatting changes.
21934
21935 2000-03-17 Akim Demaille <akim@epita.fr>
21936
21937 * src/reader.c (copy_comment): New function, factored out from:
21938 (copy_action): Use it. Removed now unused `match', `ended',
21939 `cplus_comment'.
21940 (copy_guard): Likewise.
21941
21942 2000-03-17 Akim Demaille <akim@epita.fr>
21943
21944 * src/reader.c (copy_string): New function, factored out from:
21945 (copy_action): Use it.
21946 (copy_guard): Likewise.
21947
21948 2000-03-17 Akim Demaille <akim@epita.fr>
21949
21950 Change the handling of @s so that they behave exactly like $s.
21951 There is now a pseudo variable @$ (readble and writable), location
21952 of the lhs of the rule (by default ranging from the location of
21953 the first symbol of the rhs, to the location of the last symbol,
21954 or, if the rhs is empty, YYLLOC).
21955
21956 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
21957 yyval.
21958 (yyparse): When providing a default semantic action, provide a
21959 default location action.
21960 (after the $): No longer change `*YYLSP', just stack YYLOC the
21961 same way you stack YYVAL.
21962 * src/reader.c (read_declarations): Use warns.
21963 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
21964 (copy_action, case '@'): Likewise.
21965 Use a standard error message, to save useless work from
21966 translators.
21967
21968 2000-03-17 Akim Demaille <akim@epita.fr>
21969
21970 * src/bison.s1: Formatting and cosmetics changes.
21971 * src/reader.c: Likewise.
21972 Update the Copyright notice.
21973
21974 2000-03-17 Akim Demaille <akim@epita.fr>
21975
21976 * src/bison.s1 (#line): All set to `#line' only, since the
21977 Makefile now handles them.
21978
21979 2000-03-16 Akim Demaille <akim@epita.fr>
21980
21981 * src/output.c (output_rule_data): Output the documentation of
21982 some of the tables.
21983 (Copyright notice): Update.
21984 Formatting changes.
21985
21986 2000-03-16 Akim Demaille <akim@epita.fr>
21987
21988 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
21989 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
21990 One `#if YYDEBUG' remains, since it uses variables which are
21991 defined only if `YYDEBUG != 0'.
21992
21993 2000-03-16 Akim Demaille <akim@epita.fr>
21994
21995 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
21996 and related variables so that the similarities are highlighted.
21997
21998 2000-03-16 Akim Demaille <akim@epita.fr>
21999
22000 * src/bison.s1: Properly indent CPP directives.
22001
22002 2000-03-16 Akim Demaille <akim@epita.fr>
22003
22004 * src/bison.s1: Properly indent the `alloca' CPP section.
22005
22006 2000-03-16 Akim Demaille <akim@epita.fr>
22007
22008 Do not hard code values of directories in `configure.in'.
22009 Update the `configure' tool chain.
22010
22011 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22012 src/makefile.am.
22013 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22014 (AC_OUTPUT): Add m4/Makefile.
22015 Bump to bison 1.28a, 1.29 has never been released.
22016 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22017 handled via src/Makefile.am.
22018 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22019 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22020 autoheader.
22021 * Makefile.am (SUBDIRS): Add m4.
22022 (ACLOCAL_AM_FLAGS): New variable.
22023 (AUTOMAKE_OPTIONS): Add check-news.
22024 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22025 the proper line number and file name.
22026 (DEFS): Propagate the location of bison library files and of the
22027 locale files.
22028 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22029 builddir.
22030 * acinclude.m4: Remove, replaced by the directory m4.
22031 * m4/Makefile.am (EXTRA_DIST): New variable.
22032 * m4/gettext.m4: New file, from the fileutils.
22033 * m4/lcmessage.m4: Likewise
22034 * m4/progtest.m4: Likewise.
22035 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22036
22037 2000-03-10 Akim Demaille <akim@epita.fr>
22038
22039 * src/closure.c:
22040 Formatting changes of various comments.
22041 Respect the GNU coding standards at various places.
22042 Don't use `_()' when no translation is needed.
22043
22044 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22045
22046 * src/files.c:
22047 OS/2 honors TMPDIR environment variable.
22048
22049 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22050
22051 * doc/bison.texinfo: Tweaked spelling and grammar.
22052 Updated ISBN.
22053 Removed reference to price of printed copy.
22054 Mention BISON_SIMPLE and BISON_HAIRY.
22055
22056 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22057
22058 * configure.in, NEWS:
22059 Bison 1.29 released.
22060
22061 1999-10-27 Jesse Thilo <jthilo@gnu.org>
22062
22063 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22064 Added reference card.
22065
22066 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22067
22068 * po/ru.po: Added Russian translation.
22069
22070 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22071
22072 * configure.in: Added Russian translation.
22073
22074 1999-07-06 Jesse Thilo <jthilo@gnu.org>
22075
22076 * configure.in, NEWS, README:
22077 Released version 1.28.
22078
22079 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22080
22081 * src/system.h:
22082 Squashed redefinition warning on some systems.
22083
22084 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22085 Have configure build version string instead of relying on ANSI string
22086 concatentation.
22087
22088 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22089
22090 * po/POTFILES.in: Got rid of version.c.
22091
22092 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22093
22094 * acconfig.h, configure.in:
22095 Have configure build version string instead of relying on ANSI string
22096 concatentation.
22097
22098 1999-06-08 Jesse Thilo <jthilo@gnu.org>
22099
22100 * doc/bison.1:
22101 Dropped mention of `+' for long-named options.
22102
22103 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22104
22105 * src/files.c: Added <unistd.h> for unlink().
22106
22107 * src/Makefile.am, src/system.h:
22108 I18n fixes.
22109
22110 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22111
22112 * README: Added a FAQ list.
22113
22114 * configure.in, acconfig.h:
22115 I18n fixes.
22116
22117 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22118
22119 * doc/FAQ, doc/Makefile.am:
22120 Added a FAQ list.
22121
22122 1999-05-19 Jesse Thilo <jthilo@gnu.org>
22123
22124 * src/alloc.h, src/symtab.h, src/version.c:
22125 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22126
22127 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22128
22129 * src/.cvsignore, src/Makefile.am:
22130 Reorganized: sources in `src', documentation in `doc'.
22131
22132 * src/lex.c (literalchar):
22133 fixed the code for escaping double quotes (thanks
22134 Jonathan Czisny.)
22135
22136 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22137
22138 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22139 Adjusted paths to reflect directory reorganization.
22140
22141 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22142
22143 * doc/.cvsignore, doc/Makefile.am:
22144 Reorganized: sources in `src', documentation in `doc'.
22145
22146 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22147
22148 * configure.in:
22149 Updated AC_INIT file to reflect directory reorganization.
22150
22151 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22152 Reorganized: sources in `src', documentation in `doc'.
22153
22154 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22155
22156 * src/allocate.c:
22157 Don't declare calloc() and realloc() if not necessary.
22158
22159 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22160
22161 * configure.in, acconfig.h, acinclude.m4:
22162 Don't declare calloc() and realloc() if not necessary.
22163
22164 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22165
22166 * po/.cvsignore: Added i18n support.
22167
22168 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22169
22170 * acconfig.h, configure.in, Makefile.am:
22171 Added i18n support.
22172
22173 1999-03-22 Jesse Thilo <jthilo@gnu.org>
22174
22175 * src/bison.s1: Fixed #line numbers.
22176
22177 1999-03-15 Jesse Thilo <jthilo@gnu.org>
22178
22179 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22180 Added PO files from Translation Project.
22181
22182 1999-03-03 Jesse Thilo <jthilo@gnu.org>
22183
22184 * Makefile.am:
22185 Added support for non-ANSI compilers (ansi2knr).
22186
22187 1999-02-16 Jesse Thilo <jthilo@gnu.org>
22188
22189 * configure.in: Bumped version number to 1.27.
22190
22191 * Makefile.am:
22192 Added `bison.simple' to list of files removed by `make distclean'.
22193
22194 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22195
22196 * src/files.c, src/files.h:
22197 Defined locations of parser files in config.h instead of Makefile.
22198
22199 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22200
22201 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22202 Defined locations of parser files in config.h instead of Makefile.
22203
22204 1999-02-09 Jesse Thilo <jthilo@gnu.org>
22205
22206 * Makefile.am:
22207 Removed inappropriate use of $< macro.
22208
22209 1999-02-05 Jesse Thilo <jthilo@gnu.org>
22210
22211 * po/Makefile.in.in, po/POTFILES.in:
22212 Add `po' directory skeleton.
22213
22214 1999-01-27 Jesse Thilo <jthilo@gnu.org>
22215
22216 * README: Document help-bison list.
22217
22218 * configure.in: Add check for mkstemp().
22219
22220 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22221
22222 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22223 Hush a few compiler warnings.
22224
22225 * src/files.c:
22226 Add tryclose(), which verifies that fclose was successful.
22227 Hush a couple of compiler warnings.
22228
22229 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22230
22231 * Makefile.am, OChangeLog:
22232 ChangeLog is now automatically generated. Include the old version as
22233 OChangeLog.
22234
22235 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22236
22237 * 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:
22238 Update FSF address.
22239
22240 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22241
22242 * doc/bison.texinfo: Fix formatting glitch.
22243
22244 * doc/bison.texinfo: Update FSF address.
22245
22246 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22247
22248 * acconfig.h: Update FSF address.
22249
22250 1999-01-08 Jesse Thilo <jthilo@gnu.org>
22251
22252 * src/system.h:
22253 Don't define PACKAGE here, since config.h defines it.
22254
22255 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22256
22257 * src/reader.c: Update copyright date.
22258
22259 * src/main.c:
22260 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22261 favor of output directly to stderr (avoids buffer overruns).
22262
22263 * src/reader.c: Some checks for premature EOF.
22264
22265 * 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:
22266 Use prototypes if the compiler understands them.
22267
22268 * src/files.c: Honor TMPDIR on Unix hosts.
22269 Use prototypes if the compiler understands them.
22270
22271 * src/reader.c:
22272 Fix a couple of buffer overrun bugs.
22273 Use prototypes if the compiler understands them.
22274
22275 * src/system.h: Include unistd.h and ctype.h.
22276 Use #ifdef instead of #if for NLS symbols.
22277
22278 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22279
22280 * doc/bison.texinfo:
22281 Delete comment "consider using @set for edition number, etc..." since
22282 we now are doing so.
22283
22284 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22285
22286 * configure.in:
22287 Use prototypes if the compiler understands them.
22288
22289 * NEWS: Document 1.26 highlights.
22290
22291 * Makefile.am: Require Automake 1.3 or later.
22292
22293 * acconfig.h:
22294 Use prototypes if the compiler understands them.
22295
22296 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22297
22298 * src/version.c:
22299 Use VERSION symbol from automake for version number.
22300
22301 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22302
22303 * acconfig.h, configure.in, version.cin:
22304 Use VERSION symbol from automake for version number.
22305
22306 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22307
22308 * Makefile.am:
22309 Distribute original version of simple parser (bison.s1), not built
22310 version (bison.simple).
22311
22312 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22313
22314 * doc/bison.texinfo: Add info dir entry.
22315
22316 * doc/bison.texinfo:
22317 Let automake put version number into documentation.
22318
22319 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22320
22321 * src/bison.cld, src/build.com, src/vmshlp.mar:
22322 Add non-RCS files from /gd/gnu/bison.
22323
22324 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22325
22326 * doc/bison.1:
22327 Document the BISON_HAIRY and BISON_SIMPLE variables.
22328
22329 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22330
22331 * src/version.c: Build version.c automatically.
22332
22333 * src/reader.c:
22334 Fix token numbering (used to start at 258, not 257).
22335
22336 * src/system.h: Include config.h.
22337
22338 * src/getargs.c: Update bug report address.
22339
22340 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22341 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22342
22343 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22344
22345 * Makefile.am:
22346 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22347
22348 * configure.in, version.cin:
22349 Build version.c automatically.
22350
22351 * AUTHORS: Add AUTHORS file.
22352
22353 * README: Update bug report address.
22354
22355 * bison.simple:
22356 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22357
22358 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22359 Add automake stuff.
22360
22361 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22362
22363 * doc/bison.texinfo: Clean up some formatting.
22364
22365 1998-05-05 Richard Stallman <rms@gnu.org>
22366
22367 * doc/bison.texinfo:
22368 Explain better why to make a pure parser.
22369
22370 1998-01-05 Richard Stallman <rms@gnu.org>
22371
22372 * src/files.c (openfiles):
22373 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22374 find a temporary directory, if possible. Do not unlink files while
22375 they are open.
22376
22377 1997-08-25 Richard Stallman <rms@gnu.org>
22378
22379 * src/reader.c (stack_offset;):
22380 Change some warni to warns.
22381
22382 * src/lex.c (literalchar): Use warns, not warni.
22383
22384 1997-06-28 Richard Stallman <rms@gnu.org>
22385
22386 * src/bison.s1: Add a Bison version comment.
22387
22388 * src/main.c (fatal, warn, berror):
22389 Use program_name.
22390
22391 1997-06-28 Richard Stallman <rms@gnu.org>
22392
22393 * Makefile.in (bison_version): New variable.
22394 (dist): Use that variable.
22395 (bison.s1): Substitute the Bison version into bison.simple.
22396
22397 * bison.simple: Add a Bison version comment.
22398
22399 1997-06-18 Richard Stallman <rms@gnu.org>
22400
22401 * src/main.c (fatal, warn, berror):
22402 Make error messages standard.
22403 (toomany): Improve error message text.
22404
22405 * 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:
22406 new.h renamed to alloc.h.
22407
22408 1997-06-18 Richard Stallman <rms@gnu.org>
22409
22410 * Makefile.in: new.h renamed to alloc.h.
22411
22412 1997-05-24 Richard Stallman <rms@gnu.org>
22413
22414 * src/lex.c (literalchar):
22415 Fix the code for escaping \, " and '.
22416
22417 (lex): Avoid trouble when there are many chars
22418 to discard in a char literal with just several chars in it.
22419
22420 1997-05-17 Richard Stallman <rms@gnu.org>
22421
22422 * src/bison.s1:
22423 Use malloc, if using alloca is troublesome.
22424 (YYSTACK_USE_ALLOCA): New flag macro.
22425 Define it for some systems and compilers.
22426 (YYSTACK_ALLOC): New macro.
22427 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22428 If it was malloc'd, free it.
22429
22430 1997-05-17 Richard Stallman <rms@gnu.org>
22431
22432 * bison.simple:
22433 Use malloc, if using alloca is troublesome.
22434 (YYSTACK_USE_ALLOCA): New flag macro.
22435 Define it for some systems and compilers.
22436 (YYSTACK_ALLOC): New macro.
22437 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22438 If it was malloc'd, free it.
22439
22440 1997-04-23 Richard Stallman <rms@gnu.org>
22441
22442 * src/bison.s1:
22443 (alloca) [__hpux]: Always define as __builtin_alloca.
22444
22445 1997-04-23 Richard Stallman <rms@gnu.org>
22446
22447 * bison.simple:
22448 (alloca) [__hpux]: Always define as __builtin_alloca.
22449
22450 1997-04-22 Richard Stallman <rms@gnu.org>
22451
22452 * src/bison.s1:
22453 [__hpux]: Include alloca.h (right for HPUX 10)
22454 instead of declaring alloca (right for HPUX 9).
22455
22456 * src/bison.s1 (__yy_memcpy):
22457 Declare arg `count' as unsigned int.
22458 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22459
22460 1997-04-22 Richard Stallman <rms@gnu.org>
22461
22462 * bison.simple:
22463 [__hpux]: Include alloca.h (right for HPUX 10)
22464 instead of declaring alloca (right for HPUX 9).
22465
22466 * bison.simple (__yy_memcpy):
22467 Declare arg `count' as unsigned int.
22468 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22469
22470 1997-01-03 Richard Stallman <rms@gnu.org>
22471
22472 * src/allocate.c: [__STDC__ or _MSC_VER]:
22473 Declare calloc and realloc to return void *.
22474
22475 1997-01-02 Richard Stallman <rms@gnu.org>
22476
22477 * src/system.h:
22478 [_MSC_VER]: Include stdlib.h and process.h.
22479 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22480
22481 * src/main.c (main): Return FAILURE as a value.
22482 (printable_version): Declare arg as int, not char.
22483
22484 1997-01-02 Richard Stallman <rms@gnu.org>
22485
22486 * Makefile.in (dist):
22487 Explicitly check for symlinks, and copy them.
22488
22489 1996-12-19 Richard Stallman <rms@gnu.org>
22490
22491 * src/files.c:
22492 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22493
22494 1996-12-18 Paul Eggert <eggert@gnu.org>
22495
22496 * src/bison.s1 (yyparse):
22497 If __GNUC__ and YYPARSE_PARAM are both defined,
22498 declare yyparse to have a void * argument.
22499
22500 1996-12-18 Paul Eggert <eggert@gnu.org>
22501
22502 * bison.simple (yyparse):
22503 If __GNUC__ and YYPARSE_PARAM are both defined,
22504 declare yyparse to have a void * argument.
22505
22506 1996-12-17 Richard Stallman <rms@gnu.org>
22507
22508 * src/reduce.c (nbits): Add some casts.
22509
22510 1996-08-12 Richard Stallman <rms@gnu.org>
22511
22512 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22513
22514 1996-08-12 Richard Stallman <rms@gnu.org>
22515
22516 * bison.simple: Test _MSDOS as well as _MSDOS_.
22517
22518 1996-07-31 Richard Stallman <rms@gnu.org>
22519
22520 * src/bison.s1:
22521 [__sun && __i386]: Include alloca.h.
22522
22523 1996-07-31 Richard Stallman <rms@gnu.org>
22524
22525 * bison.simple:
22526 [__sun && __i386]: Include alloca.h.
22527
22528 1996-07-30 Richard Stallman <rms@gnu.org>
22529
22530 * src/bison.s1: Comment change.
22531
22532 * src/bison.s1: Test _MSDOS_, not MSDOS.
22533
22534 1996-07-30 Richard Stallman <rms@gnu.org>
22535
22536 * bison.simple: Comment change.
22537
22538 * bison.simple: Test _MSDOS_, not MSDOS.
22539
22540 1996-06-01 Richard Stallman <rms@gnu.org>
22541
22542 * 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:
22543 Insert `_' macro around many string constants.
22544
22545 * src/main.c:
22546 Insert `_' macro around many string constants.
22547
22548 (main): Call setlocale, bindtextdomain and textdomain.
22549
22550 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22551 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22552 [ENABLE_NLS]: Include libintl.h.
22553 [ENABLE_NLS] (gettext): Define.
22554 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22555 (N_, PACKAGE, LOCALEDIR): New macros.
22556
22557 1996-06-01 Richard Stallman <rms@gnu.org>
22558
22559 * POTFILES.in: New file.
22560
22561 * Makefile.in (allocate.o):
22562 Define target explicitly.
22563
22564 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22565 (LDFLAGS): Set to @LDFLAGS@.
22566 (configure): Run autoconf only if preceding `cd' succeeds.
22567 (bison.s1): Redirect output to temporary file then move the
22568 temporary to the target, rather than redirecting directly to bison.s1.
22569 (clean): Remove config.status and config.log.
22570 (distclean): Don't remove config.status here.
22571
22572 1996-05-12 Richard Stallman <rms@gnu.org>
22573
22574 * src/bison.s1:
22575 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22576
22577 1996-05-12 Richard Stallman <rms@gnu.org>
22578
22579 * bison.simple:
22580 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22581
22582 1996-05-11 Richard Stallman <rms@gnu.org>
22583
22584 * src/bison.s1 (__yy_memcpy):
22585 Really reorder the args, as was supposedly done on Feb 14 1995.
22586 (yyparse): Calls changed accordingly.
22587
22588 1996-05-11 Richard Stallman <rms@gnu.org>
22589
22590 * Makefile.in (dist): Don't use $(srcdir).
22591
22592 * bison.simple (__yy_memcpy):
22593 Really reorder the args, as was supposedly done on Feb 14 1995.
22594 (yyparse): Calls changed accordingly.
22595
22596 1996-01-27 Richard Stallman <rms@gnu.org>
22597
22598 * src/output.c (output_rule_data):
22599 Test YYERROR_VERBOSE in the conditional
22600 around the definition of ttyname.
22601
22602 1995-12-29 Richard Stallman <rms@gnu.org>
22603
22604 * src/bison.s1:
22605 Fix line numbers in #line commands.
22606
22607 1995-12-29 Richard Stallman <rms@gnu.org>
22608
22609 * bison.simple:
22610 Fix line numbers in #line commands.
22611
22612 1995-12-27 Richard Stallman <rms@gnu.org>
22613
22614 * src/bison.s1 (YYPARSE_PARAM_DECL):
22615 In C++, make it always null.
22616 (YYPARSE_PARAM_ARG): New macro.
22617 (yyparse): Use YYPARSE_PARAM_ARG.
22618
22619 1995-12-27 Richard Stallman <rms@gnu.org>
22620
22621 * bison.simple (YYPARSE_PARAM_DECL):
22622 In C++, make it always null.
22623 (YYPARSE_PARAM_ARG): New macro.
22624 (yyparse): Use YYPARSE_PARAM_ARG.
22625
22626 1995-11-29 Richard Stallman <rms@gnu.org>
22627
22628 * doc/bison.texinfo:
22629 Describe literal string tokens, %raw, %no_lines, %token_table.
22630
22631 1995-11-29 Daniel Hagerty <hag@gnu.org>
22632
22633 * doc/bison.texinfo: Fixed update date
22634
22635 1995-10-16 Richard Stallman <rms@gnu.org>
22636
22637 * src/version.c: Version 1.25.
22638
22639 1995-10-16 Richard Stallman <rms@gnu.org>
22640
22641 * NEWS: *** empty log message ***
22642
22643 1995-10-16 Richard Stallman <rms@gnu.org>
22644
22645 * doc/bison.1, doc/bison.rnh:
22646 Add new options.
22647
22648 1995-10-15 Richard Stallman <rms@gnu.org>
22649
22650 * src/vmsgetargs.c, src/getargs.c:
22651 Added -n, -k, and -raw switches.
22652 (noparserflag, toknumflag, rawtoknumflag): New variables.
22653
22654 * src/symtab.h (SALIAS):
22655 New #define for adding aliases to %token.
22656 (struct bucket): Added `alias' field.
22657
22658 * src/reduce.c (reduce_grammar):
22659 Revise error message.
22660 (print_notices): Remove final `.' from error message.
22661
22662 * src/reader.c (reader_output_yylsp):
22663 New function.
22664 (readgram): Use `#if 0' around code that accepted %command
22665 inside grammar rules: The documentation doesn't allow it,
22666 and it will fail since the %command processors scan for the next %.
22667 (parse_token_decl): Extended the %token
22668 declaration to allow a multi-character symbol as an alias.
22669 (parse_thong_decl): New function.
22670 (read_declarations): Added %thong declarations.
22671 (read_declarations): Handle NOOP to deal with allowing
22672 % declarations as another means to specify the flags.
22673 (readgram): Allow %prec prior to semantics embedded in a rule.
22674 (skip_to_char, read_declarations, copy_definition)
22675 (parse_token_decl, parse_start_decl, parse_type_decl)
22676 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22677 (get_type_name, copy_guard, copy_action, readgram)
22678 (get_type, packsymbols): Revised most error messages.
22679 Changed `fatal' to `warnxxx' to avoid aborting for error.
22680 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22681 (read_declarations): Improve the error message for
22682 an invalid character. Do not abort.
22683 (read_declarations, copy_guard, copy_action): Use
22684 printable_version to avoid unprintable characters in printed output.
22685 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22686 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22687 Allow the type of a non-terminal can be given
22688 more than once, as long as all specifications give the same type.
22689
22690 * src/output.c:
22691 (output_headers, output_trailers, output, output_gram)
22692 (output_rule_data): Implement noparserflag variable.
22693 Implement toknumflag variable.
22694 (output): Call reader_output_yylsp to output LTYPESTR.
22695
22696 * src/main.c (main):
22697 If reader sees an error, don't process the grammar.
22698 (fatals): Updated to not use VARARGS1.
22699 (printable_version, int_to_string, warn, warni, warns, warnss)
22700 (warnsss): New error reporting functions. Avoid abort for error.
22701
22702 * src/lex.h:
22703 Added THONG and NOOP for alias processing.
22704 Added SETOPT for the new code that allows setting options with %flags.
22705
22706 * src/lex.c:
22707 Include getopt.h. Add some extern decls.
22708 (safegetc): New function to deal with EOF gracefully.
22709 (literalchar); new function to deal with reading \ escapes.
22710 (lex): Use literalchar.
22711 (lex): Implemented "..." tokens.
22712 (literalchar, lex, parse_percent_token): Made tokenbuffer
22713 always contain the token. This includes growing the token
22714 buffer while reading an integer.
22715 (parse_percent_token): Replaced if-else statement with percent_table.
22716 (parse_percent_token): Added % declarations as another
22717 way to specify the flags -n, -l, and -r. Also added hooks for
22718 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
22719 major changes to files.c.
22720 (lex) Retain in the incoming stream a character following
22721 an incorrect '/'.
22722 (skip_white_space, lex): Revised most error messages
22723 and changed fatal to warn to avoid aborting.
22724 (percent_table): Added %thong declarations.
22725
22726 * src/gram.h: Comment changes.
22727
22728 * src/files.c (openfiles, open_extra_files, done):
22729 Add faction flag
22730 and actfile file. Handle noparserflag. Both for -n switch.
22731
22732 * src/conflicts.c (resolve_sr_conflict):
22733 Remove use of alloca.
22734
22735 1995-06-01 Jim Meyering <meyering@gnu.org>
22736
22737 * doc/bison.texinfo: *** empty log message ***
22738
22739 1995-05-06 Richard Stallman <rms@gnu.org>
22740
22741 * src/bison.s1: Comment change.
22742
22743 1995-05-06 Richard Stallman <rms@gnu.org>
22744
22745 * bison.simple: Comment change.
22746
22747 1995-05-03 Richard Stallman <rms@gnu.org>
22748
22749 * src/version.c: Version now 1.24.
22750
22751 * src/bison.s1: Change distribution terms.
22752
22753 * src/version.c: Version now 1.23.
22754
22755 1995-05-03 Richard Stallman <rms@gnu.org>
22756
22757 * doc/bison.texinfo:
22758 Rewrite "Conditions for Using Bison".
22759 Update version to 1.24.
22760
22761 1995-05-03 Richard Stallman <rms@gnu.org>
22762
22763 * bison.simple: Change distribution terms.
22764
22765 1995-02-23 Richard Stallman <rms@gnu.org>
22766
22767 * src/files.c: Test __VMS_POSIX as well as VMS.
22768
22769 1995-02-14 Jim Meyering <meyering@gnu.org>
22770
22771 * src/bison.s1 (__yy_memcpy):
22772 Renamed from __yy_bcopy to avoid
22773 confusion. Reverse FROM and TO arguments to be consistent with
22774 those of memcpy.
22775
22776 1995-02-14 Jim Meyering <meyering@gnu.org>
22777
22778 * bison.simple (__yy_memcpy):
22779 Renamed from __yy_bcopy to avoid
22780 confusion. Reverse FROM and TO arguments to be consistent with
22781 those of memcpy.
22782
22783 1994-11-10 David J. MacKenzie <djm@gnu.org>
22784
22785 * NEWS: reformat
22786
22787 * NEWS: New file.
22788
22789 * Makefile.in (DISTFILES): Include NEWS.
22790
22791 * Makefile.in (DISTFILES):
22792 Include install-sh, not install.sh.
22793
22794 * configure.in: Update to Autoconf v2 macro names.
22795
22796 1994-10-05 David J. MacKenzie <djm@gnu.org>
22797
22798 * Makefile.in: fix typo
22799
22800 * Makefile.in (prefix, exec_prefix):
22801 Let configure set them.
22802
22803 1994-09-28 David J. MacKenzie <djm@gnu.org>
22804
22805 * Makefile.in: Set datadir to $(prefix)/share.
22806
22807 1994-09-15 Richard Stallman <rms@gnu.org>
22808
22809 * src/bison.s1:
22810 Update copyright notice and GPL version.
22811
22812 1994-09-15 Richard Stallman <rms@gnu.org>
22813
22814 * bison.simple:
22815 Update copyright notice and GPL version.
22816
22817 1994-07-12 Richard Stallman <rms@gnu.org>
22818
22819 * src/reduce.c, src/reader.c:
22820 entered into RCS
22821
22822 1994-05-05 David J. MacKenzie <djm@gnu.org>
22823
22824 * Makefile.in: entered into RCS
22825
22826 1994-03-26 Richard Stallman <rms@gnu.org>
22827
22828 * src/bison.s1: entered into RCS
22829
22830 1994-03-26 Richard Stallman <rms@gnu.org>
22831
22832 * bison.simple: entered into RCS
22833
22834 1994-03-25 Richard Stallman <rms@gnu.org>
22835
22836 * src/main.c: entered into RCS
22837
22838 1994-03-24 Richard Stallman <rms@gnu.org>
22839
22840 * src/conflicts.c: entered into RCS
22841
22842 1994-01-02 Richard Stallman <rms@gnu.org>
22843
22844 * Makefile.in: *** empty log message ***
22845
22846 1993-11-21 Richard Stallman <rms@gnu.org>
22847
22848 * src/bison.s1: *** empty log message ***
22849
22850 1993-11-21 Richard Stallman <rms@gnu.org>
22851
22852 * doc/bison.texinfo: entered into RCS
22853
22854 * doc/bison.texinfo: *** empty log message ***
22855
22856 1993-11-21 Richard Stallman <rms@gnu.org>
22857
22858 * bison.simple: *** empty log message ***
22859
22860 1993-10-25 David J. MacKenzie <djm@gnu.org>
22861
22862 * doc/bison.texinfo: *** empty log message ***
22863
22864 1993-10-19 Richard Stallman <rms@gnu.org>
22865
22866 * src/bison.s1: *** empty log message ***
22867
22868 1993-10-19 Richard Stallman <rms@gnu.org>
22869
22870 * bison.simple: *** empty log message ***
22871
22872 1993-10-14 Richard Stallman <rms@gnu.org>
22873
22874 * src/bison.s1: *** empty log message ***
22875
22876 1993-10-14 Richard Stallman <rms@gnu.org>
22877
22878 * bison.simple: *** empty log message ***
22879
22880 1993-09-14 David J. MacKenzie <djm@gnu.org>
22881
22882 * doc/bison.texinfo: *** empty log message ***
22883
22884 1993-09-13 Noah Friedman <friedman@gnu.org>
22885
22886 * Makefile.in: *** empty log message ***
22887
22888 1993-09-10 Richard Stallman <rms@gnu.org>
22889
22890 * src/conflicts.c: *** empty log message ***
22891
22892 * src/system.h: entered into RCS
22893
22894 1993-09-10 Richard Stallman <rms@gnu.org>
22895
22896 * doc/bison.1: entered into RCS
22897
22898 1993-09-06 Noah Friedman <friedman@gnu.org>
22899
22900 * src/version.c: entered into RCS
22901
22902 1993-09-06 Noah Friedman <friedman@gnu.org>
22903
22904 * Makefile.in: *** empty log message ***
22905
22906 1993-07-30 David J. MacKenzie <djm@gnu.org>
22907
22908 * Makefile.in: *** empty log message ***
22909
22910 1993-07-24 Richard Stallman <rms@gnu.org>
22911
22912 * src/bison.s1: *** empty log message ***
22913
22914 1993-07-24 Richard Stallman <rms@gnu.org>
22915
22916 * bison.simple: *** empty log message ***
22917
22918 1993-07-08 David J. MacKenzie <djm@gnu.org>
22919
22920 * Makefile.in: *** empty log message ***
22921
22922 1993-07-04 Richard Stallman <rms@gnu.org>
22923
22924 * src/bison.s1: *** empty log message ***
22925
22926 1993-07-04 Richard Stallman <rms@gnu.org>
22927
22928 * bison.simple: *** empty log message ***
22929
22930 1993-06-26 David J. MacKenzie <djm@gnu.org>
22931
22932 * src/getargs.c: entered into RCS
22933
22934 1993-06-26 David J. MacKenzie <djm@gnu.org>
22935
22936 * doc/bison.texinfo: *** empty log message ***
22937
22938 * doc/bison.1: New file.
22939
22940 1993-06-25 Richard Stallman <rms@gnu.org>
22941
22942 * src/getargs.c: New file.
22943
22944 1993-06-16 Richard Stallman <rms@gnu.org>
22945
22946 * src/bison.s1: *** empty log message ***
22947
22948 1993-06-16 Richard Stallman <rms@gnu.org>
22949
22950 * bison.simple: *** empty log message ***
22951
22952 1993-06-03 Richard Stallman <rms@gnu.org>
22953
22954 * src/bison.s1: New file.
22955
22956 1993-06-03 Richard Stallman <rms@gnu.org>
22957
22958 * doc/bison.texinfo: *** empty log message ***
22959
22960 1993-06-03 Richard Stallman <rms@gnu.org>
22961
22962 * bison.simple: New file.
22963
22964 1993-05-19 Richard Stallman <rms@gnu.org>
22965
22966 * doc/bison.texinfo: New file.
22967
22968 1993-05-07 Noah Friedman <friedman@gnu.org>
22969
22970 * Makefile.in: *** empty log message ***
22971
22972 1993-04-28 Noah Friedman <friedman@gnu.org>
22973
22974 * src/reader.c: *** empty log message ***
22975
22976 1993-04-23 Noah Friedman <friedman@gnu.org>
22977
22978 * src/alloc.h: entered into RCS
22979
22980 1993-04-20 David J. MacKenzie <djm@gnu.org>
22981
22982 * src/version.c: *** empty log message ***
22983
22984 * src/files.c, src/allocate.c:
22985 entered into RCS
22986
22987 * src/reader.c: *** empty log message ***
22988
22989 * src/lex.c: entered into RCS
22990
22991 * src/conflicts.c: New file.
22992
22993 * src/symtab.c: entered into RCS
22994
22995 * src/alloc.h: New file.
22996
22997 * src/LR0.c: entered into RCS
22998
22999 1993-04-18 Noah Friedman <friedman@gnu.org>
23000
23001 * src/reader.c: New file.
23002
23003 * src/version.c: *** empty log message ***
23004
23005 1993-04-18 Noah Friedman <friedman@gnu.org>
23006
23007 * Makefile.in: *** empty log message ***
23008
23009 1993-04-17 Noah Friedman <friedman@gnu.org>
23010
23011 * Makefile.in: *** empty log message ***
23012
23013 1993-04-15 Richard Stallman <rms@gnu.org>
23014
23015 * src/main.c, src/files.c:
23016 New file.
23017
23018 1993-04-15 Noah Friedman <friedman@gnu.org>
23019
23020 * configure.in: entered into RCS
23021
23022 * configure.in: *** empty log message ***
23023
23024 * configure.in: New file.
23025
23026 1993-04-14 Richard Stallman <rms@gnu.org>
23027
23028 * Makefile.in: New file.
23029
23030 1993-04-13 Richard Stallman <rms@gnu.org>
23031
23032 * src/version.c: New file.
23033
23034 1993-03-25 Richard Stallman <rms@gnu.org>
23035
23036 * src/output.c: entered into RCS
23037
23038 1992-09-25 Richard Stallman <rms@gnu.org>
23039
23040 * configure.bat: entered into RCS
23041
23042 1992-06-22 Richard Stallman <rms@gnu.org>
23043
23044 * src/vmsgetargs.c: entered into RCS
23045
23046 1992-06-22 Richard Stallman <rms@gnu.org>
23047
23048 * doc/bison.rnh: entered into RCS
23049
23050 1992-04-20 David J. MacKenzie <djm@gnu.org>
23051
23052 * README: entered into RCS
23053
23054 1992-01-22 Richard Stallman <rms@gnu.org>
23055
23056 * src/machine.h: entered into RCS
23057
23058 1991-12-21 Richard Stallman <rms@gnu.org>
23059
23060 * src/lalr.c, src/closure.c:
23061 entered into RCS
23062
23063 1991-12-20 Richard Stallman <rms@gnu.org>
23064
23065 * src/state.h: entered into RCS
23066
23067 1991-12-18 Richard Stallman <rms@gnu.org>
23068
23069 * src/print.c, src/nullable.c, src/derives.c:
23070 entered into RCS
23071
23072 1991-11-03 David J. MacKenzie <djm@gnu.org>
23073
23074 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23075 entered into RCS
23076
23077 1988-09-09 Richard Stallman <rms@gnu.org>
23078
23079 * src/bison.hairy: entered into RCS
23080
23081 1987-12-16 Richard Stallman <rms@gnu.org>
23082
23083 * REFERENCES: entered into RCS
23084
23085
23086 -----
23087
23088 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
23089 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
23090 Free Software Foundation, Inc.
23091
23092 Copying and distribution of this file, with or without
23093 modification, are permitted provided the copyright notice and this
23094 notice are preserved.