]> git.saurik.com Git - bison.git/blob - ChangeLog
Use b4_c_modern.
[bison.git] / ChangeLog
1 2009-02-19 Akim Demaille <demaille@gostai.com>
2
3 Use b4_c_modern.
4 * data/c.m4 (b4_c_function_decl): Here.
5
6 2009-02-19 Akim Demaille <demaille@gostai.com>
7
8 Comment changes.
9 * data/lalr1.cc: here.
10
11 2009-02-19 Akim Demaille <demaille@gostai.com>
12
13 Extract variant.hh
14 * data/variant.hh: New, extracted from...
15 * data/lalr1.cc: here.
16 Adjust.
17 * data/local.mk: Adjust.
18
19 2009-02-19 Akim Demaille <demaille@gostai.com>
20
21 Extract stack.hh from lalr1.cc.
22 * data/stack.hh: New.
23 * data/lalr1.cc: Extract from here.
24 * data/local.mk: Adjust.
25
26 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
27
28 Add reminder about uploading public key to keys.gnupg.net.
29 * HACKING (Release Procedure): Here.
30
31 2009-01-28 Akim Demaille <demaille@gostai.com>
32
33 * NEWS: Update information about 2.4.1 and 2.4.2.
34
35 2008-11-04 Akim Demaille <demaille@gostai.com>
36
37 Reformat NEWS.
38 * NEWS: Use more outline-mode markup.
39 Suggested by Jim Meyering.
40
41 2009-01-08 Akim Demaille <demaille@gostai.com>
42
43 Fix grep portability issues.
44 Grep on Solaris does not support -q.
45 Reported by Summum Bonum.
46
47 * NEWS: Add a stub for 2.4.2.
48 * THANKS: Add Summum Bonum.
49 * tests/atlocal.in (EGREP): New.
50 (CC, CXX, XSLTPROC): Make it possible to override them via
51 envvars.
52 * tests/java.at: Use $EGREP instead of egrep.
53 Use AT_CHECK's ignore instead of grep's -q.
54
55 2008-12-11 Akim Demaille <demaille@gostai.com>
56
57 Pass the token type to yysyntax_error.
58 * data/yacc.c (yysyntax_error): Take the transated token instead
59 of the raw number.
60 Adjust callers.
61 * TODO: Update.
62
63 2008-12-11 Akim Demaille <demaille@gostai.com>
64
65 Formatting changes.
66 * data/glr.c: Formatting changes.
67
68 2008-12-11 Akim Demaille <demaille@gostai.com>
69
70 Propagate i18n changes into glr.c.
71 * TODO: Update.
72 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
73 building the error message format dynamically.
74 * data/lalr1.java: Formatting changes.
75
76 2008-12-11 Akim Demaille <demaille@gostai.com>
77
78 Use testsuite -C.
79 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
80 Solves problems when top_srcdir is an absolute path.
81 Suggested by Eric Blake.
82 * configure.ac: Require Autoconf 2.62.
83
84 2008-12-11 Akim Demaille <demaille@gostai.com>
85
86 Simplify the i18n of the error messages.
87 * data/lalr1.cc: Comment changes.
88 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
89 lalr1.cc instead of building dynamically the format string.
90
91 2008-12-08 Akim Demaille <demaille@gostai.com>
92
93 Fix portability issue in the test suite.
94 * tests/local.at (AT_MATCHES_CHECK): New.
95 Based on Perl instead of Sed. Sed has too many portability
96 pitfalls, not ever Sed is GNU Sed.
97 * tests/actions.at (Fix user actions without a trailing semicolon):
98 Use it.
99
100 2008-12-08 Akim Demaille <demaille@gostai.com>
101
102 Update data/README.
103 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
104
105 2008-12-08 Akim Demaille <demaille@gostai.com>
106
107 Install autoconf as a submodule to get m4sugar.
108 * .gitmodules: Add submodules/autoconf.
109 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
110 submodules/autoconf.
111
112 2008-12-08 Akim Demaille <demaille@gostai.com>
113
114 Test token.prefix in all the skeletons.
115 * data/java.m4 (b4_token_enum): Use the token.prefix.
116 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
117 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
118 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
119 * tests/java.at: Comment changes.
120 (AT_CHECK_JAVA_MINIMAL): Define the END token.
121 (Java parser class and package names): Add token.prefix check.
122
123 2008-12-08 Akim Demaille <demaille@gostai.com>
124
125 Fix regeneration of atconfig.
126 * tests/local.mk (tests/atconfig): The rule was incorrect, but
127 remove it: now that there is no tests/Makefile.am, the top-level
128 Makefile properly updates atconfig when needed.
129
130 2008-12-07 Di-an Jan <dianj@freeshell.org>
131
132 Implement the FIXME that ends an user action with a semicolon
133 if it seems necessary.
134 * src/scan-code.l (flex rules section): Flag cpp directive from
135 any `#' to the first unescaped end-of-line. Semicolon is not
136 needed after `;', `{', '}', or cpp directives and is needed after
137 any other token (whitespaces and comments have no effect).
138 * tests/actions.at (Fix user actions without a trailing semicolon):
139 New test.
140 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
141 to make user actions complete statements.
142 Adjust column numbers in error messages.
143 * tests/regression.at (Fix user actions without a trailing semicolon):
144 Remove. Covered by new test.
145
146 2008-12-07 Akim Demaille <demaille@gostai.com>
147
148 Update gnulib.
149 * gnulib: Update from master.
150
151 2008-12-05 Eric Blake <ebb9@byu.net>
152
153 Avoid compiler warning.
154 * src/output.c (muscle_insert_item_number_table): Delete unused
155 function.
156
157 2008-12-02 Eric Blake <ebb9@byu.net>
158
159 Build testsuite with newer autoconf.
160 * tests/output.at (m4_expand): Don't override in newer autoconf,
161 where the underlying implementation changed.
162 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
163 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
164 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
165 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
166 since some of them contain unbalanced ')'.
167
168 2008-12-01 Akim Demaille <demaille@gostai.com>
169
170 Use b4_symbol for printers and destructors everywhere.
171 * data/bison.m4 (b4_symbol_action_location): New.
172 * data/c.m4 (b4_symbol_actions): Remove.
173 Adjust all callers to use by b4_symbol_foreach and the corresponding
174 b4_symbol_printer/destructor macro.
175 * data/glr.cc: Adjust.
176 * data/lalr1.java: Adjust the %destructor sanity check.
177 * src/output.c (symbol_code_props_output): Remove, we no longer
178 need the b4_symbol_printers/destructors tables.
179
180 2008-12-01 Akim Demaille <demaille@gostai.com>
181
182 Use b4_symbol_case_.
183 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
184 b4_symbol_case_.
185
186 2008-12-01 Akim Demaille <demaille@gostai.com>
187
188 Move b4_symbol based macro to bison.m4.
189 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
190 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
191 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
192 (b4_type_foreach): Move to...
193 * data/bison.m4: Here.
194 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
195 b4_symbol_value_template instead of b4_symbol_value.
196
197 2008-12-01 Akim Demaille <demaille@gostai.com>
198
199 b4_symbol/type_foreach.
200 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
201 Use them.
202
203 2008-12-01 Akim Demaille <demaille@gostai.com>
204
205 Use the symbol properties to output the printer/destructor for lalr1.cc.
206 Instead of defining complex list of tuples to define various
207 properties of the symbols, we now prefer to define symbols as
208 "structs" in m4: using the symbol key (its number), and the
209 property name, b4_symbol gives it value. Use this to handle
210 destructors and printers.
211
212 * src/output.c (CODE_PROP): New.
213 (prepare_symbol_definitions): Use it to define the printer and
214 destructor related attributes of the symbols.
215 * data/lalr1.cc (b4_symbol_actions): Rename as...
216 (b4_symbol_action): this.
217 Use b4_symbol instead of 6 arguments.
218 (b4_symbol_printer, b4_symbol_destructor): New.
219 Use them instead of b4_symbol_actions.
220
221 2008-12-01 Akim Demaille <demaille@gostai.com>
222
223 Avoid capturing variables too easily.
224 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
225 v__ and p__ instead of v and p.
226
227 2008-12-01 Akim Demaille <demaille@gostai.com>
228
229 Remove spurious empty line before syncline.
230 * data/bison.m4 (b4_syncline): Don't output an empty line before
231 the output.
232
233 2008-11-26 Akim Demaille <demaille@gostai.com>
234
235 Convert lib/Makefile.am into lib/local.mk.
236 The real problem is rather gnulib.mk, which itself is extracted
237 from a Makefile.am that gnulib expects to the "recursive". The
238 tool prefix-gnulib-mk converts such a gnulib.mk to be
239 non-recursive. Also, some AC_SUBST variables need to be adjusted.
240
241 * etc/prefix-gnulib-mk: New.
242 * bootstrap (slurp): Use it to convert further gnulib.mk.
243 No longer try to avoid re-creation of lib/gnulib.mk as the changes
244 are deeper.
245 * lib/Makefile.am: Rename as...
246 * lib/local.mk: this.
247 Adjust to be prefixed.
248 * Makefile.am, configure.ac: Adjust.
249 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
250
251 2008-11-26 Akim Demaille <demaille@gostai.com>
252
253 s/_FLAGS/FLAGS/.
254 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
255 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
256 Reported by Eric Blake.
257
258 2008-11-26 Akim Demaille <demaille@gostai.com>
259
260 Use b4_parser_tables_define in glr.cc.
261 * data/glr.c: Use b4_parser_tables_define instead of defining the
262 (deterministic integral) tables by hand.
263
264 2008-11-26 Akim Demaille <demaille@gostai.com>
265
266 Use b4_parser_tables_define in Java.
267 * data/java.m4 (b4_typed_parser_table): Rename as...
268 (b4_typed_parser_table_define): this, for consistency.
269 Accept a comment as $4.
270 Move $2 into yy*_.
271 (b4_integral_parser_table): Rename as...
272 (b4_integral_parser_table_define): this.
273 * data/lalr1.java: Adjust all uses.
274 Use b4_parser_tables_define instead of generation by hand.
275
276 2008-11-26 Akim Demaille <demaille@gostai.com>
277
278 Prepare the convergence bw C style and Java table generation.
279 * data/bison.m4 (b4_tables_map, b4_tables_declare)
280 (b4_tables_define): Rename as...
281 (b4_integral_parser_tables_map, b4_parser_tables_declare)
282 (b4_parser_tables_define): these.
283 * data/c.m4 (b4_table_define): Rename as...
284 (b4_integral_parser_table_define): this.
285 * data/lalr1.cc: Adjust.
286 (b4_table_define, b4_table_declare): Rename as...
287 (b4_integral_parser_table_define)
288 (b4_integral_parser_table_declare): these.
289 (yyrline_): Move the comment where it is actually used.
290 * data/yacc.c: Adjust.
291 (yyrline): Use b4_integral_parser_table_define.
292
293 2008-11-26 Akim Demaille <demaille@gostai.com>
294
295 Regen.
296 * src/parse-gram.h, src/parse-gram.c: Regen.
297
298 2008-11-26 Akim Demaille <demaille@gostai.com>
299
300 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
301 * data/lalr1.cc (b4_tables_map): Move to...
302 * data/bison.m4: here.
303 Update the comment for yytable during the flight.
304 (b4_tables_declare, b4_tables_define): New.
305 * data/lalr1.cc: Use them.
306 * data/c.m4 (b4_table_define): New.
307 * data/yacc.c: Use b4_tables_define instead of output the tables
308 by hand.
309 * tests/regression.at (Web2c Actions): Adjust the expected output,
310 the order of the tables changed.
311
312 2008-11-26 Akim Demaille <demaille@gostai.com>
313
314 Get rid of (yy)rhs and (yy)prhs.
315 These tables are no longer needed in the parsers, and they don't seem to
316 be useful. They are not documented either.
317
318 * src/output.c (prepare_rules): Get rid of rhs and prhs.
319 Adjust the computation of (yy)r2.
320
321 2008-11-26 Akim Demaille <demaille@gostai.com>
322
323 Rule length is unsigned.
324 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
325
326 2008-11-26 Akim Demaille <demaille@gostai.com>
327
328 Get rid of lalr1-split.cc.
329 It was no longer maintainer.
330
331 * data/lalr1-split.cc: Remove.
332 * etc/bench.pl.in (bench_fusion_parser): Remove.
333 Adjust.
334
335 2008-11-26 Akim Demaille <demaille@gostai.com>
336
337 Use yy* consistently.
338 * data/glr.c: Now that yyrhs no longer exists as a global
339 variable, rename local "rhs" variables into "yyrhs" for
340 consistency.
341
342 2008-11-25 Akim Demaille <demaille@gostai.com>
343
344 Get rid of yyrhs and yyprhs in glr.c.
345 * data/glr.c (yyrhs, yyprhs): Remove.
346 Instead, use the state stack and yystos.
347
348 2008-11-25 Akim Demaille <demaille@gostai.com>
349
350 Flag glr tests.
351 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
352 as an Autotest keyword.
353
354 2008-11-25 Akim Demaille <demaille@gostai.com>
355
356 Prefer TESTSUITE_FLAGS.
357 TESTSUITEFLAGS is barely readable.
358
359 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
360 for backward compatibility.
361 Use the former instead of the latter.
362
363 2008-11-25 Akim Demaille <demaille@gostai.com>
364
365 Get rid of yyrhs and yyprhs in larl1.java.
366 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
367 (yy_reduce_print): Rather, use yystos_ and the state stack.
368
369 2008-11-25 Akim Demaille <demaille@gostai.com>
370
371 Formatting changes.
372
373 2008-11-25 Akim Demaille <demaille@gostai.com>
374
375 Get rid of yyrhs and yyprhs in yacc.c.
376 They were used to get the symbol types, given a rule number, when
377 displaying the top of the stack before a reduction. But the
378 symbol type is available from the state stack. This has two be
379 benefits: two tables less in the parser (making it smaller), and a
380 more consistent use of the three stacks which will help to fuse
381 them.
382
383 * data/yacc.c (yyprhs, yyrhs): Remove.
384 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
385 (yy_reduce_print): Take yyssp as argument.
386 Use it, together with yystos, to get the symbol type.
387 * tests/regression.at (Web2c Report): Remove these tables from the
388 expected output.
389
390 2008-11-25 Akim Demaille <demaille@gostai.com>
391
392 b4_tables_map.
393 The point is to factor the generation of the tables across skeletons.
394 This is language dependant.
395
396 * data/c.m4 (b4_comment_): New.
397 Should be usable to define how to generate tables independently of
398 the language.
399 (b4_c_comment): New.
400 (b4_comment): Bounce to b4_c_comment.
401 Now support $2 = [PREFIX] for indentation.
402 * data/lalr1.cc (b4_table_declare): Don't output a comment if
403 there is no comment.
404 Indent it properly when there is one.
405 Output the ending semicolon.
406 (b4_table_define): Space changes.
407 Output the ending semicolon.
408 (b4_tables_map): New.
409 Use it twice instead of declaring and defining the (integral)
410 tables by hand.
411
412 2008-11-25 Akim Demaille <demaille@gostai.com>
413
414 b4_table_declare.
415 * data/lalr1.cc (b4_table_declare): New.
416 Use it to declare the tables defined with b4_table_define.
417 (b4_table_define): Declare a third arg to match b4_table_declare
418 signature.
419 Move all the comments around invocations of b4_table_define into
420 the invocations itselves.
421 Move things around to have the order for declarations and
422 definitions.
423
424 2008-11-25 Akim Demaille <demaille@gostai.com>
425
426 Formatting changes.
427 * data/lalr1.java: here.
428
429 2008-11-25 Akim Demaille <demaille@gostai.com>
430
431 b4_args is more general than only C++.
432 * data/lalr1.cc (b4_args, _b4_args): Move to...
433 * data/bison.m4: here.
434
435 2008-11-21 Di-an Jan <dianj@freeshell.org>
436
437 Implement no-XXX arguments for --warnings, --report, --trace.
438 * src/getargs.c (flags_argmatch): Handles no-XXX.
439 Fix typo in doxygen comment.
440
441 2008-11-21 Akim Demaille <demaille@gostai.com>
442
443 Display the changes in cross-options.texi.
444 * build-aux/cross-options.pl ($sep): New, to separate items.
445 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
446 changes.
447
448 2008-11-20 Di-an Jan <dianj@freeshell.org>
449
450 Improves options in the manual.
451 * doc/bison.texinfo (-g, -x): Add space before argument.
452 (Option Cross Key): Implement FIXME: listing directives also.
453 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
454 (Short Option): Special case -d. Put arguments inside @option.
455 (Bison Directive): Add column, automatically extracted from
456 src/scan-gram.l (actual name passed as the first argument)
457 with special case for %define.
458 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
459 to build-aux/cross-options.pl.
460 * src/getargs.c (usage): Document limitations of cross-options.pl.
461 * src/scan-gram.l: Likewise.
462
463 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
464
465 Fix unexpanded macros in GLR defines file.
466 Reported by Csaba Raduly at
467 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
468 * THANKS (Csaba Raduly): Add.
469 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
470 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
471 lexer in a separate module that includes the defines file.
472 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
473 source.
474 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
475 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
476 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
477 (AT_DATA_SOURCE_PROLOGUE): New.
478 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
479 (AT_DATA_SOURCE): New.
480 (AT_FULL_COMPILE): Extend to support an additional source file.
481
482 2008-11-18 Akim Demaille <demaille@gostai.com>
483
484 More TODO.
485 * TODO: More short term issues.
486
487 2008-11-18 Akim Demaille <demaille@gostai.com>
488
489 Regen.
490 * src/parse-gram.h, src/parse-gram.c: Regen.
491
492 2008-11-18 Akim Demaille <demaille@gostai.com>
493
494 Use b4_subtract where possible.
495 * data/lalr1.cc (b4_subtract): Move to...
496 * data/bison.m4: here.
497 * data/glr.c (b4_rhs_data): Use it.
498 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
499
500 2008-11-18 Akim Demaille <demaille@gostai.com>
501
502 Remove incorrect mode specification.
503 * data/glr.cc: Don't pretend it's C code.
504
505 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
506
507 Simplify last patch slightly.
508 * src/getargs.c (getargs): Here.
509
510 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
511
512 Fix last warning from --enable-gcc-warnings.
513 * src/getargs.c (getargs): Don't assign const address to non-const
514 pointer.
515
516 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
517
518 Don't let maintainer-*-check targets force a version update.
519 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
520 handled.
521
522 2008-11-17 Di-an Jan <dianj@freeshell.org>
523
524 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
525 Align menus. Adjust word wrapping. Use node names for menu names.
526 (Examples): Don't abbreviate node names.
527 (LocalWords): Remove abbreviations.
528 (Copying): Make description a sentence.
529 (Java Action Features): Remove period to match the rest of menu.
530
531 2008-11-17 Di-an Jan <dianj@freeshell.org>
532
533 Handles several --enable-gcc-warnings.
534 * src/getargs.c (command_line_location): Set parameters to void.
535 * src/output.c (symbol_type_name_cmp): Make static.
536 (symbols_by_type_name): Set parameters to void.
537 (symbol_definitions_output): Remove unused parameter. Rename as...
538 (prepare_symbol_definitions): this.
539 (muscles_output): Move symbol_definitions_output to...
540 (output): here as prepare_symbol_definitions.
541 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
542 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
543
544 2008-11-17 Di-an Jan <dianj@freeshell.org>
545
546 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
547 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
548
549 2008-11-16 Akim Demaille <demaille@gostai.com>
550
551 Add missing $(EXEEXT).
552 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
553 "src/bison$(EXEEXT)".
554 Reported by Di-an Jan.
555
556 2008-11-15 Akim Demaille <demaille@gostai.com>
557
558 * TODO: Update.
559
560 2008-11-15 Akim Demaille <demaille@gostai.com>
561
562 Formatting changes.
563 * tests/input.at: here.
564
565 2008-11-15 Akim Demaille <demaille@gostai.com>
566
567 Remove duplicate header inclusion.
568 * src/LR0.c: here.
569
570 2008-11-15 Akim Demaille <demaille@gostai.com>
571
572 * src/parse-gram.h, src/parse-gram.c: Regen.
573
574 2008-11-15 Akim Demaille <demaille@gostai.com>
575
576 Support parametric types.
577
578 There are two issues to handle: first scanning nested angle
579 bracket pairs to support types such as std::pair< std::string,
580 std::list<std::string> > >.
581
582 Another issue is to address idiosyncracies of C++: do not glue two
583 closing angle brackets together (otherwise it's operator>>), and
584 avoid sticking blindly a TYPE to the opening <, as it can result
585 in '<:' which is a digraph for '['.
586
587 * src/scan-gram.l (brace_level): Rename as...
588 (nesting): this.
589 (SC_TAG): New.
590 Implement support for complex tags.
591 (tag): Accept
592 , but not <.
593 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
594 (b4_symbol_variant): Leave space around types as parameters.
595 * examples/variant.yy: Use nested template types and leading ::.
596 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
597 Rename as...
598 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
599 * tests/c++.at: Test parametric types.
600
601 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
602
603 Test token.prefix.
604 This is not sufficient, but we test at least that the make_SYMBOL
605 interface is not affected by token.prefix. A more general test
606 will be implemented when the support of token.prefix is generalized
607 to more skeletons.
608
609 * tests/c++.at: One more variant test, using token.prefix.
610
611 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
612
613 Test the make_TOKEN interface.
614 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
615 Factor the common code in yylex.
616 Use it to test "%define lex_symbol".
617
618 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
619
620 Formatting change.
621
622 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
623
624 Simplify code for variants bench marks.
625 * etc/bench.pl.in (&generate_grammar_list): Define and use
626 location_type.
627 Factor the common code in yylex.
628
629 2008-11-15 Akim Demaille <demaille@gostai.com>
630
631 Better error message.
632 * bootstrap (find_tool): Fix the error message.
633
634 2008-11-15 Akim Demaille <demaille@gostai.com>
635
636 Update variant.yy to newest interface.
637 * examples/variant.yy: Define lex_symbol.
638 Adjust.
639
640 2008-11-15 Akim Demaille <demaille@gostai.com>
641
642 Don't use locations in variant.yy.
643 * examples/variant.yy: Adjust to not using locations.
644
645 2008-11-15 Akim Demaille <demaille@gostai.com>
646
647 Comment changes.
648 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
649 comments for the license.
650
651 2008-11-15 Akim Demaille <demaille@gostai.com>
652
653 Remove tests/Makefile.am.
654 * tests/Makefile.am: Rename as...
655 * tests/local.mk: this.
656 * Makefile.am, configure.ac: Adjust.
657 * Makefile.am (DISTCLEANFILES): Define.
658 (maintainer-check, maintainer-xml-check, maintainer-push-check):
659 Remove, we no longer need to bounce to the real targets.
660
661 2008-11-15 Akim Demaille <demaille@gostai.com>
662
663 Comment changes.
664
665 2008-11-15 Akim Demaille <demaille@gostai.com>
666
667 djgpp/local.mk.
668 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
669 * djgpp/local.mk: this new file.
670
671 2008-11-15 Akim Demaille <demaille@gostai.com>
672
673 Remove doc/Makefile.am.
674 * doc/Makefile.am: Rename as...
675 * doc/local.mk: this.
676 Adjust paths
677 * Makefile.am, configure.ac: Adjust.
678 * Makefile.am (MOSTLYCLEANFILES): New.
679 * src/local.mk: Adjust.
680
681 2008-11-15 Akim Demaille <demaille@gostai.com>
682
683 Move sc_tight_scope into maint.mk.
684 It does not work, and I don't know how it was supposed to work: it
685 seems to be looking for sources in the build tree. I just moved
686 it at a better place, fixing it is still required.
687
688 * src/local.mk (echo): Remove.
689 (sc_tight_scope): Move to...
690 * maint.mk: here.
691
692 2008-11-15 Akim Demaille <demaille@gostai.com>
693
694 Regen.
695 * src/parse-gram.h, src/parse-gram.h: Regen.
696
697 2008-11-15 Akim Demaille <demaille@gostai.com>
698
699 Remove src/Makefile.am.
700 * src/Makefile.am: Rename as...
701 * src/local.mk: this.
702 Prefix all the paths with src/.
703 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
704 (AM_CPPFLAGS): Find find in builddir/src.
705 (YACC): Move the flags into...
706 (AM_YFLAGS): here.
707 * maint.mk (sc_tight_scope): Disable.
708 It used to bounce to the version in src/Makefile.am which is now
709 part of this very Makefile.
710 * Makefile.am, configure.ac: Adjust.
711 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
712 include "..." to find files "here": we are no longer in src/, so
713 qualify the includes with src/.
714 * doc/Makefile.am (PREPATH): No longer include the top_builddir
715 prefix.
716 (.x.1): Adjust to be able to create src/foo from the top level
717 Makefile, instead of going bounce to src/Makefile the creation of
718 foo.
719
720 2008-11-15 Akim Demaille <demaille@gostai.com>
721
722 Remove useless variable.
723 * doc/Makefile.am (srcsrcdir): Remove.
724
725 2008-11-15 Akim Demaille <demaille@gostai.com>
726
727 Remove data/Makefile.am.
728 * data/Makefile.am: Rename as...
729 * data/local.mk: this.
730 Adjust paths.
731 * Makefile.am, configure.ac: Adjust.
732
733 2008-11-15 Akim Demaille <demaille@gostai.com>
734
735 Remove etc/Makefile.am.
736 * etc/Makefile.am: Rename as...
737 * etc/local.mk: this.
738 Adjust.
739 * Makefile.am, configure.ac: Adjust.
740
741 2008-11-15 Akim Demaille <demaille@gostai.com>
742
743 Remove examples/local.mk.
744 examples/calc++/Makefile.am might be interesting to keep as is, since
745 it is an example in itself.
746
747 * examples/Makefile.am: Rename as...
748 * examples/local.mk: this.
749 Adjust.
750 * Makefile.am, configure.ac: Adjust.
751
752 2008-11-15 Akim Demaille <demaille@gostai.com>
753
754 Remove build-aux/Makefile.am.
755 Recursive Makefiles are really way too slow, let's get rid of some of
756 them.
757
758 * build-aux/Makefile.am: Rename as...
759 * build-aux/local.mk: this.
760 Adjust paths.
761 * Makefile.am, configure.ac: Adjust.
762
763 2008-11-15 Akim Demaille <demaille@gostai.com>
764
765 Provide convenience constructors for locations and positions.
766 * data/location.cc (position::position): Accept file, line and
767 column as arguments with default values.
768 Always qualify initial line and column literals as unsigned.
769 (location::location): Provide convenience constructors.
770
771 2008-11-15 Akim Demaille <demaille@gostai.com>
772
773 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
774 token type.
775 Using template buys us nothing, and makes it uselessly complex to
776 construct a symbol. Besides, it could not be generalized to other
777 languages, while make_FOO would work in C/Java etc.
778
779 * data/lalr1.cc (b4_symbol_): New.
780 (b4_symbol): Use it.
781 (b4_symbol_constructor_declaration_)
782 (b4_symbol_constructor_definition_): Instead of generating
783 specializations of an overloaded template function, just generate
784 several functions whose names are forged from the token names
785 without the token.prefix.
786 (b4_symbol_constructor_declarations): Generate them for all the
787 symbols, not just by class of symbol type, now that instead of
788 specializing a function template by the token, we generate a
789 function named after the token.
790 (b4_symbol_constructor_specialization_)
791 (b4_symbol_constructor_specializations): Remove.
792 * etc/bench.pl.in: Adjust to this new API.
793
794 2008-11-13 Akim Demaille <demaille@gostai.com>
795
796 %define token.prefix.
797 Provide a means to add a prefix to the name of the tokens as
798 output in the generated files. Because of name clashes, it is
799 good to have such a prefix such as TOK_ that protects from names
800 such as EOF, FILE etc. But it clutters the grammar itself.
801
802 * data/bison.m4 (token.prefix): Empty by default.
803 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
804 * data/lalr1.cc (b4_symbol): Ditto.
805
806 2008-11-13 Akim Demaille <demaille@gostai.com>
807
808 Compute at M4 time some of the subtractions.
809 * data/lalr1.cc (b4_subtract): New.
810 (b4_rhs_data): Use it.
811
812 2008-11-13 Akim Demaille <demaille@gostai.com>
813
814 symbol::token.
815 This allows the user to get the type of a token returned by yylex.
816
817 * data/lalr1.cc (symbol::token): New.
818 (yytoknum_): Define when %define lex_symbol, independently of
819 %debug.
820 (yytoken_number_): Move into...
821 (symbol::token): here, since that's the only use.
822 The other one is YYPRINT which was not officially supported
823 by lalr1.cc, and anyway it did not work since YYPRINT uses this
824 array under a different name (yytoknum).
825
826 2008-11-13 Akim Demaille <demaille@gostai.com>
827
828 YYERRCODE.
829 * TODO (YYERRCODE): Mention the case of $undef.
830
831 2008-11-13 Akim Demaille <demaille@gostai.com>
832
833 TODO: YYPRINT.
834 * TODO (YYPRINT): New.
835
836 2008-11-13 Akim Demaille <demaille@gostai.com>
837
838 Comment changes.
839 * data/lalr1.cc, data/yacc.c: Fix the description of the
840 yytranslate and yytoknum tables.
841
842 2008-11-13 Akim Demaille <demaille@gostai.com>
843
844 Define make_symbol in the header.
845 To reach good performances these functions should be inlined (yet
846 this is to measure precisely). To this end they must be available
847 to the caller.
848
849 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
850 location_type with the class name.
851 Since will now be output in the header, declare "inline".
852 No longer use b4_symbol_constructor_specializations, but
853 b4_symbol_constructor_definitions in the header.
854 Don't call it in the *.cc file.
855
856 2008-11-13 Akim Demaille <demaille@gostai.com>
857
858 Define yytranslate in the header for lex_symbol.
859 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
860 into the header file when using %define lex_symbol.
861 (yytranslate_): Declare inline.
862
863 2008-11-13 Akim Demaille <demaille@gostai.com>
864
865 Define the constructors of symbol_type in
866 b4_symbol_constructor_definitions.
867 The constructors are called by the make_symbol functions, which a
868 forthcoming patch will move elsewhere. Hence the interest of
869 putting them together.
870
871 The stack_symbol_type does not need to be moved, it is used only
872 by the parser.
873
874 * data/lalr1.cc: Move symbol_type and symbol_base_type
875 constructors into...
876 (b4_symbol_constructor_definitions): here.
877 Adjust.
878
879 2008-11-13 Akim Demaille <demaille@gostai.com>
880
881 Make it easier to move the definition of yytranslate_.
882 Forthcoming changes will make it possible to use yytranslate_
883 from outside the parser implementation file.
884
885 * data/lalr1.cc (b4_yytranslate_definition): New.
886 Use it.
887
888 2008-11-13 Akim Demaille <demaille@gostai.com>
889
890 Remove useless class specification.
891 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
892 to refer to the class name to use a type defined by the class for
893 arguments of member functions.
894
895 2008-11-13 Akim Demaille <demaille@gostai.com>
896
897 Finer input type for yytranslate.
898 This patch is debatable: the tradition expects yylex to return an int
899 which happens to correspond to token_number (which is an enum). This
900 allows for instance to return characters (such as '*' etc.). But this
901 goes against the stronger typing I am trying to have with the new
902 lex interface which return a symbol_type. So in this case, feed
903 yytranslate_ with a token_type.
904
905 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
906 expect a token_type.
907
908 2008-11-13 Akim Demaille <demaille@gostai.com>
909
910 Honor lex-params in %define lex_symbol mode.
911 * data/lalr1.cc: Use b4_lex_param.
912
913 2008-11-13 Akim Demaille <demaille@gostai.com>
914
915 Simplify names.
916 * src/output.c (symbol_definitions_output): Rename symbol
917 attributes type_name and has_type_name as type and has_type.
918 * data/lalr1.cc: Adjust uses.
919
920 2008-11-13 Akim Demaille <demaille@gostai.com>
921
922 Use b4_type_names for the union type.
923 The union used to compute the size of the variant used to iterate
924 over the type of all the symbols, with a lot of redundancy. Now
925 iterate over the lists of symbols having the same type-name.
926
927 * data/lalr1.cc (b4_char_sizeof_): New.
928 (b4_char_sizeof): Use it.
929 Adjust to be called with a list of numbers instead of a single
930 number.
931 Adjust its caller for new-line issues.
932
933 2008-11-13 Akim Demaille <demaille@gostai.com>
934
935 Define the "identifier" of a symbol.
936 Symbols may have several string representations, for instance if
937 they have an alias. What I call its "id" is a string that can be
938 used as an identifier. May not exist.
939
940 Currently the symbols which have the "tag_is_id" flag set are
941 those that don't have an alias. Look harder for the id.
942
943 * src/output.c (is_identifier): Move to...
944 * src/symtab.c (is_identifier): here.
945 * src/symtab.h, src/symtab.c (symbol_id_get): New.
946 * src/output.c (symbol_definitions_output): Use it to define "id"
947 and "has_id".
948 Remove the definition of "tag_is_id".
949 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
950 "tag_is_id" were used to produce code.
951 We still use "tag" for documentation.
952
953 2008-11-11 Akim Demaille <demaille@gostai.com>
954
955 Locations are no longer required by lalr1.cc.
956 * data/lalr1.cc (_b4_args, b4_args): New.
957 Adjust all uses of locations to make them optional.
958 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
959 (AT_CHECK_NAMESPACE): Check the use of locations.
960 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
961 without locations with lalr1.cc.
962 Test these cases.
963 * tests/output.at: Check lalr1.cc with and without location
964 support.
965 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
966 Don't use locations.
967
968 2008-11-11 Akim Demaille <demaille@gostai.com>
969
970 AT_FULL_COMPILE.
971 * tests/local.at (AT_FULL_COMPILE): New.
972 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
973
974 2008-11-11 Akim Demaille <demaille@gostai.com>
975
976 Support parens in calc++.
977 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
978 * examples/calc++/test (run): Check the expected output.
979 Adjust callers.
980 Check parens too.
981
982 2008-11-11 Akim Demaille <demaille@gostai.com>
983
984 Simplify lalr1.cc since %defines is mandatory.
985 * data/lalr1.cc: Remove useless calls to b4_defines_if.
986
987 2008-11-11 Akim Demaille <demaille@gostai.com>
988
989 TODO: yyfmt.
990 * TODO (yysyntax_error): New item.
991
992 2008-11-11 Akim Demaille <demaille@gostai.com>
993
994 Prefer M4 to CPP.
995 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
996 YYERROR_VERBOSE.
997
998 2008-11-11 Akim Demaille <demaille@gostai.com>
999
1000 Support i18n of the parse error messages.
1001 * TODO (lalr1.cc/I18n): Remove.
1002 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1003 error messages, as done in yacc.c.
1004 Stay within the yy* pseudo namespace.
1005
1006 2008-11-11 Akim Demaille <demaille@gostai.com>
1007
1008 More TODO.
1009 * TODO (single stack, yysyntax_error): New.
1010
1011 2008-11-11 Akim Demaille <demaille@gostai.com>
1012
1013 Make it possible to return a symbol_type from yylex.
1014 * data/lalr1.cc (b4_lex_symbol_if): New.
1015 (parse): When lex_symbol is defined, expected yylex to return the
1016 complete lookahead.
1017 * etc/bench.pl.in (generate_grammar_list): Extend to support this
1018 yylex interface.
1019 (bench_variant_parser): Exercise it.
1020
1021 2008-11-11 Akim Demaille <demaille@gostai.com>
1022
1023 Remove useless bench case.
1024 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
1025 no longer used.
1026
1027 2008-11-11 Akim Demaille <demaille@gostai.com>
1028
1029 Improve display of directives.
1030 * etc/bench.pl.in (parse_term): Don't add useless eol.
1031
1032 2008-11-11 Akim Demaille <demaille@gostai.com>
1033
1034 Use string_cast in the bench.
1035 * etc/bench.pl.in (generate_grammar_list): Define and use
1036 string_cast.
1037
1038 2008-11-11 Akim Demaille <demaille@gostai.com>
1039
1040 Replace yychar with a Boolean.
1041 * data/lalr1.cc (parse::yychar): Replace by...
1042 (parse::yyempty): this.
1043
1044 2008-11-11 Akim Demaille <demaille@gostai.com>
1045
1046 Factor the tables.
1047 * TODO: New item.
1048
1049 2008-11-11 Akim Demaille <demaille@gostai.com>
1050
1051 Let yytranslate handle the eof case.
1052 * data/lalr1.cc (yytranslate_): Handle the EOF case.
1053 Adjust callers.
1054 No longer expect yychar to be equal to yyeof_, rather, test the
1055 lookahead's (translated) kind.
1056
1057 2008-11-11 Akim Demaille <demaille@gostai.com>
1058
1059 yychar cannot be empty in yyerrlab.
1060 * TODO (yychar == yyempty_): New.
1061 * data/lalr1.cc: Remove the handling of this case.
1062 This eases forthcoming changes related to yychar and yytranslate.
1063
1064 2008-11-11 Akim Demaille <demaille@gostai.com>
1065
1066 Bench: syntactic sugar for %define/#define.
1067 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
1068 (&bench_push_parser, bench_variant_parser): Use this feature.
1069 (&eat): New.
1070 Use it.
1071
1072 2008-11-11 Akim Demaille <demaille@gostai.com>
1073
1074 Less memory pressure on the "list" bench.
1075 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
1076 the values, to limit memory pressure.
1077
1078 2008-11-11 Akim Demaille <demaille@gostai.com>
1079
1080 Introduce make_symbol.
1081 make_symbol provides a means to construct a full symbol (kind,
1082 value, location) in a single shot. It is meant to be a Symbol
1083 constructor, parameterized by the symbol kind so that overloading
1084 would prevent incorrect kind/value pairs. Unfortunately
1085 parameterized constructors do not work well in C++ (unless the
1086 parameter also appears as an argument, which is not acceptable),
1087 hence the use of a function instead of a constructor.
1088
1089 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1090 (b4_symbol_constructor_declarations)
1091 (b4_symbol_constructor_specialization_)
1092 (b4_symbol_constructor_specializations)
1093 (b4_symbol_constructor_definition_)
1094 (b4_symbol_constructor_definitions): New.
1095 Use them where appropriate to generate declaration, declaration of
1096 the specializations, and implementations of the templated
1097 overloaded function "make_symbol".
1098 (variant::variant): Always define a default ctor.
1099 Also provide a copy ctor.
1100 (symbol_base_type, symbol_type): New ctor overloads for value-less
1101 symbols.
1102 (symbol_type): Now public, so that functions such as yylex can use
1103 it.
1104
1105 2008-11-11 Akim Demaille <demaille@gostai.com>
1106
1107 Inform m4 whether a tag is a valid id.
1108 * src/output.c (is_identifier): New.
1109 (symbol_definitions_output): Use it to define tag_is_id.
1110 But maybe this should be done at m4 level?
1111
1112 2008-11-11 Akim Demaille <demaille@gostai.com>
1113
1114 Test 214 was failing: it greps with a pattern containing [ ]*
1115 which obviously meant to catch spaces and tabs, but contained only
1116 spaces. Tabulations in sources are a nuisance, so to simplify the
1117 matter, get rid of all the tabulations in the Java sources. The
1118 other skeletons will be treated equally later.
1119
1120 * data/java.m4, data/lalr1.java: Untabify.
1121 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
1122 tabulations are no longer generated.
1123
1124 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
1125
1126 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1127 * configure.ac: Adjust usage.
1128 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1129 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1130 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1131
1132 2008-11-10 Di-an Jan <dianj@freeshell.org>
1133
1134 Workaround Java's ``code too large'' problem for parser tables
1135 in most cases, by using one function per initialization.
1136 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
1137 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
1138 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
1139 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
1140 (yytname_): Use b4_typed_parser_table.
1141 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
1142 ``code too large'' error.
1143
1144 2008-11-10 Di-an Jan <dianj@freeshell.org>
1145
1146 * NEWS: Document them.
1147
1148 General Java skeleton improvements.
1149 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
1150 using gcj < 4.3 in the testsuite, according to comments in
1151 gnulib/m4/javacomp.m4.
1152 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
1153 location_type, position_type): Remove extraneous brackets from
1154 b4_percent_define_default.
1155 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
1156 m4_define and m4_define_default.
1157 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
1158 which marks the end of user code with appropriate syncline, like all
1159 the other skeletons.
1160 (b4_user_post_prologue): Add. Don't silently drop.
1161 (yylex): Remove.
1162 (parse): Inline yylex.
1163 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
1164 (%{...%}): Fix typo of %code imports.
1165 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
1166
1167 Support annotations on parser class with %define annotations.
1168 * data/lalr1.java (annotations): Add to parser class modifier.
1169 * doc/bison.texinfo (Java Parser Interface): Document
1170 %define annotations.
1171 (Java Declarations Summary): Document %define annotations.
1172 * tests/java.at (Java parser class modifiers): Test annotations.
1173
1174 Do not generate code for %error-verbose unless requested.
1175 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
1176 Make private. Make conditional on %error-verbose.
1177 (getErrorVerbose, setErrorVerbose): New.
1178 (yytnamerr_): Make conditional on %error-verbose.
1179 (yysyntax_error): Make some code conditional on %error-verbose.
1180 * doc/bison.texinfo (Java Bison Interface): Remove the parts
1181 about %error-verbose having no effect.
1182 (getErrorVerbose, setErrorVerbose): Document.
1183
1184 Move constants for token names to Lexer interface.
1185 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
1186 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
1187 (parse): Qualify EOF to Lexer.EOF.
1188 * doc/bison.texinfo (Java Parser Interface): Move documentation of
1189 EOF and token names to Java Lexer Interface.
1190 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
1191
1192 Make yyerror public.
1193 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
1194 (yyerror): Change to public. Add Javadoc comments. Use longer
1195 parameter names. Make the body rather than the declarator
1196 conditional on %locations.
1197 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
1198
1199 Allow user to add code to the constructor with %code init.
1200 * data/java.m4 (b4_init_throws): New, for %define init_throws.
1201 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
1202 Add %code init to the front of the constructor body.
1203 * doc/bison.texinfo (YYParser.YYParser): Document %code init
1204 and %define init_throws.
1205 (Java Declarations Summary): Document %code init and
1206 %define init_throws.
1207 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
1208 (Java constructor init and init_throws): Add tests.
1209
1210 2008-11-10 Akim Demaille <demaille@gostai.com>
1211
1212 Update TODO.
1213 * TODO (-D): is implemented.
1214 (associativity): Same precedence must have the same associativity.
1215 For instance, how can a * b / c be parsed if * is %left and / is
1216 %right?
1217 (YYERRORCODE, YYFAIL, YYBACKUP): New.
1218
1219 2008-11-10 Akim Demaille <demaille@gostai.com>
1220
1221 Formatting changes.
1222
1223 2008-11-10 Akim Demaille <demaille@gostai.com>
1224
1225 More information about the symbols.
1226 * src/output.c (type_names_output): Document all the symbols,
1227 including those that don't have a type-name.
1228 (symbol_definitions_output): Define "is_token" and
1229 "has_type_name".
1230 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
1231 type-name, now that they are defined too in b4_type_names.
1232
1233 2008-11-10 Akim Demaille <demaille@gostai.com>
1234
1235 Regen.
1236
1237 2008-11-10 Akim Demaille <demaille@gostai.com>
1238
1239 Make parser::yytranslate static.
1240 Small speedup (1%) on the list grammar. And makes yytranslate_
1241 available in non member functions.
1242
1243 * data/lalr1.cc (yytranslate_): Does not need to be a instance
1244 function.
1245
1246 2008-11-10 Akim Demaille <demaille@gostai.com>
1247
1248 Avoid trailing spaces.
1249 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
1250 * data/lalr1.cc: Don't indent before rule and symbol actions, as
1251 they can be empty, and anyway this incorrectly indents the first
1252 action.
1253
1254 2008-11-10 Akim Demaille <demaille@gostai.com>
1255
1256 Comment changes.
1257
1258 2008-11-10 Akim Demaille <demaille@gostai.com>
1259
1260 Use "enum" for integral constants.
1261 This is just nicer to read, I observed no speedup.
1262
1263 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
1264 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
1265 (yyuser_token_number_max_, yyundef_token_): Move into...
1266 (yytranslate_): here.
1267
1268 2008-11-10 Akim Demaille <demaille@gostai.com>
1269
1270 Shortcuts in bench directives.
1271 * etc/bench.pl.in (parse_dirs): New.
1272 Use it.
1273 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
1274 Create the benches in "benches/".
1275
1276 2008-11-10 Akim Demaille <demaille@gostai.com>
1277
1278 Formatting changes.
1279 * data/lalr1.cc: here.
1280
1281 2008-11-10 Akim Demaille <demaille@gostai.com>
1282
1283 Adjust verbose message to using emacs.
1284 * etc/bench.pl.in: Inform compilation-mode when we change the
1285 directory.
1286 (generate_grammar_list): Recognize %define "variant" in addition
1287 to %define variant.
1288
1289 2008-11-10 Akim Demaille <demaille@gostai.com>
1290
1291 Classify symbols by type-name.
1292 * src/uniqstr.h (UNIQSTR_CMP): New.
1293 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
1294 (type_names_output): New.
1295 (muscles_output): Use it.
1296 * data/lalr1.cc (b4_symbol_action_): Remove.
1297 (b4_symbol_case_, b4_type_action_): New.
1298 Adjust uses of b4_symbol_action_ to use b4_type_action_.
1299
1300 2008-11-10 Akim Demaille <demaille@gostai.com>
1301
1302 Change the handling of the symbols in the skeletons.
1303 Before we were using tables which lines were the symbols and which
1304 columns were things like number, tag, type-name etc. It is was
1305 difficult to extend: each time a column was added, all the numbers had
1306 to be updated (you asked for colon $2, not for "tag"). Also, it was
1307 hard to filter these tables when only a subset of the symbols (say the
1308 tokens, or the nterms, or the tokens that have and external number
1309 *and* a type-name) was of interest.
1310
1311 Now instead of monolithic tables, we define one macro per cell. For
1312 instance "b4_symbol(0, tag)" is a macro name which contents is
1313 self-decriptive. The macro "b4_symbol" provides easier access to
1314 these cells.
1315
1316 * src/output.c (type_names_output): Remove.
1317 (symbol_numbers_output, symbol_definitions_output): New.
1318 (muscles_output): Call them.
1319 (prepare_symbols): Define b4_symbols_number.
1320
1321 2008-11-10 Akim Demaille <demaille@gostai.com>
1322
1323 --trace=muscles
1324 * src/getargs.h, src/getargs.c (trace_muscle): New.
1325 (trace_types, trace_args): Support it.
1326 * src/output.c (output_skeleton): Use it.
1327
1328 2008-11-10 Akim Demaille <demaille@gostai.com>
1329
1330 muscles_output.
1331 * src/output.c (muscles_output): New, extracted from...
1332 (output_skeleton): here.
1333 Adjust.
1334
1335 2008-11-10 Akim Demaille <demaille@gostai.com>
1336
1337 Formatting changes.
1338
1339 2008-11-10 Akim Demaille <demaille@gostai.com>
1340
1341 Update the variant example.
1342 * examples/variant.yy: Formatting changes.
1343 One stage build.
1344
1345 2008-11-10 Akim Demaille <demaille@gostai.com>
1346
1347 Support constructor with an argument.
1348 This improves the "list" bench by 2%.
1349
1350 * data/lalr1.cc (variant::build): Add an overloaded version with
1351 an argument.
1352 * tests/c++.at (AT_CHECK_VARIANT): Check it.
1353
1354 2008-11-10 Akim Demaille <demaille@gostai.com>
1355
1356 Test variants.
1357 * tests/c++.at (AT_CHECK_VARIANTS): New.
1358 Use it with and without %define assert.
1359
1360 2008-11-10 Akim Demaille <demaille@gostai.com>
1361
1362 Add %precedence support.
1363 Unfortunately it is not possible to reuse the %prec directive. This
1364 is because to please POSIX, we do not require to end the rules with a
1365 semicolon. As a result,
1366
1367 foo: bar %prec baz
1368
1369 is ambiguous: either a rule which precedence is that of baz, or a rule,
1370 and then a declaration of the precedence of the token baz.
1371
1372 * doc/bison.texinfo: Document %precedence.
1373 (Precedence Only): New.
1374 * src/assoc.h, src/assoc.c (precedence_assoc): New.
1375 * src/conflicts.c (resolve_sr_conflict): Support it.
1376 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
1377 Parse it.
1378 * tests/calc.at: Use %precedence for NEG.
1379 * tests/conflicts.at (%precedence does not suffice)
1380 (%precedence suffices): New tests.
1381
1382 2008-11-09 Akim Demaille <demaille@gostai.com>
1383
1384 Make benches in a sub dirs.
1385 * etc/bench.pl.in ($dir): New.
1386 Use it.
1387 Check the use of constructors with an argument.
1388 (bench_variant_parser): Fix.
1389
1390 2008-11-09 Akim Demaille <demaille@gostai.com>
1391
1392 fix eof condition
1393
1394 2008-11-09 Akim Demaille <demaille@gostai.com>
1395
1396 Fix --help.
1397
1398 2008-11-09 Akim Demaille <demaille@gostai.com>
1399
1400 Require the generation of parse-gram.output.
1401 * src/Makefile.am (YACC): Pass --report=all.
1402
1403 2008-11-09 Akim Demaille <demaille@gostai.com>
1404
1405 Formatting changes.
1406
1407 2008-11-09 Akim Demaille <demaille@gostai.com>
1408
1409 Update TODO.
1410 * TODO: Remove obsolete items.
1411 Update others.
1412
1413 2008-11-09 Akim Demaille <demaille@gostai.com>
1414
1415 Enhance bench.pl.
1416 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
1417 (@token, $grammar, $bench): New.
1418 (generate_grammar_variant): Rename as...
1419 (generate_grammar_list): this.
1420 (generate_grammar): Adjust.
1421 (bench_grammar): Rename as...
1422 (bench): this.
1423 Use it in the various bench-marking routines.
1424 (-b, -g): New options.
1425
1426 2008-11-09 Akim Demaille <demaille@gostai.com>
1427
1428 Use a static hierarchy for symbols in the C++ parser.
1429 * data/lalr1.cc (symbol_base_type, symbol_type)
1430 (stack_symbol_type): Make it a static hierarchy.
1431 Adjust dependencies.
1432
1433 2008-11-09 Akim Demaille <demaille@gostai.com>
1434
1435 bench.pl -d, --directive.
1436 * etc/bench.pl.in (@directive): New.
1437 (&bench_grammar): Use it.
1438 (&bench_list_grammar): New, to provide access to the "variant"
1439 grammar.
1440 Use it.
1441 (getopts): Support -d, --directive.
1442
1443 2008-11-09 Akim Demaille <demaille@gostai.com>
1444
1445 Use inline for small operations.
1446 * data/lalr1.cc (symbol_base_type, symbol_type)
1447 (stack_symbol_type): Declare constructor and other operations as
1448 inline.
1449 (yy_destroy_): Inline.
1450
1451 2008-11-09 Akim Demaille <demaille@gostai.com>
1452
1453 Introduce a hierarchy for symbols.
1454 * data/lalr1.cc (symbol_base_type, symbol_type): New.
1455 (data_type): Rename as...
1456 (stack_symbol_type): this.
1457 Derive from symbol_base_type.
1458 (yy_symbol_value_print_): Merge into...
1459 (yy_symbol_print_): this.
1460 Rename as...
1461 (yy_print_): this.
1462 (yydestruct_): Rename as...
1463 (yy_destroy_): this.
1464 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
1465 (parser::parse): yyla is now of symbol_type.
1466 Use its type member instead of yytoken.
1467
1468 2008-11-09 Akim Demaille <demaille@gostai.com>
1469
1470 Rename data_type and stack_symbol_type.
1471 * data/lalr1.cc (data_type): Rename as...
1472 (stack_symbol_type): this.
1473
1474 2008-11-09 Akim Demaille <demaille@gostai.com>
1475
1476 Handle semantic value and location together.
1477 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
1478 yydata.value and yydata.location.
1479 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
1480 (YY_SYMBOL_PRINT): Now take semantic value and location as a
1481 single arg.
1482 Adjust all callers.
1483 (yydestruct_): New overload for a stack symbol.
1484
1485 2008-11-09 Akim Demaille <demaille@gostai.com>
1486
1487 Push a complete symbol, not connected parts.
1488 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
1489 state, value and location.
1490 Adjust callers.
1491
1492 2008-11-09 Akim Demaille <demaille@gostai.com>
1493
1494 Agregate yylval and yylloc.
1495 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
1496 (parser::yyla): this.
1497
1498 2008-11-09 Akim Demaille <demaille@gostai.com>
1499
1500 Rely on the state stack to display reduction traces.
1501 To display rhs symbols before a reduction, we used information
1502 about the rule reduced, which required the tables yyrhs and
1503 yyprhs. Now use rely only on the state stack to get the same
1504 information.
1505
1506 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
1507 Use them.
1508 (parser::yyrhs_, parser::yyprhs_): Remove.
1509 (parser::yy_reduce_print_): Use the state stack.
1510
1511 2008-11-09 Akim Demaille <demaille@gostai.com>
1512
1513 Fuse yyval and yyloc into yylhs.
1514 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
1515 yylhs.
1516 (parse): Replace yyval and yyloc with yylhs.value and
1517 yylhs.location.
1518 After a user action, compute yylhs.state earlier.
1519 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
1520 fresh error_token.
1521
1522 2008-11-09 Di-an Jan <dianj@freeshell.org>
1523
1524 Remove unused variable.
1525 * src/output.c (type_names_output): Remove unused variable sep.
1526
1527 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
1528
1529 Change tests/output.at quoting.
1530 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
1531 expanding arguments.
1532
1533 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1534
1535 Don't add a semicolon to actions for %skeleton or %language.
1536 It breaks Java test cases as reported by Akim Demaille.
1537 * src/scan-code.l: Implement.
1538
1539 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1540
1541 Clean up %skeleton and %language priority implementation.
1542 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1543 remove static qualifier because others will soon need to see it.
1544 (language_prio): Likewise.
1545 (getargs): Use command_line_prio rather than 0.
1546 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1547 enum fields.
1548 (skeleton_prio): Extern it.
1549 (language_prio): Extern it.
1550 * src/parse-gram.y: Use grammar_prio rather than 1.
1551
1552 2008-11-07 Akim Demaille <demaille@gostai.com>
1553
1554 Moving push traces into yypush_.
1555 * data/lalr1.cc (yypush_): Now takes a optional trace message.
1556 Adjust all uses.
1557
1558 2008-11-07 Akim Demaille <demaille@gostai.com>
1559
1560 The single-stack C++ parser is now the standard one.
1561 * data/lalr1.cc: Rename as...
1562 * data/lalr1-split.cc: this.
1563 * data/lalr1-fusion.cc: Rename as...
1564 * data/lalr1.cc: this.
1565 * etc/bench.pl.in: Adjust.
1566
1567 2008-11-07 Akim Demaille <demaille@gostai.com>
1568
1569 Avoid empty-if warnings.
1570 Reported by Quentin Hocquet.
1571
1572 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
1573 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
1574
1575 2008-11-07 Akim Demaille <demaille@gostai.com>
1576
1577 Pass command line location to skeleton_arg and language_argmatch.
1578 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
1579 The location argument is now mandatory.
1580 Adjust all dependencies.
1581 (getargs): Use command_line_location.
1582
1583 2008-11-07 Akim Demaille <demaille@gostai.com>
1584
1585 -D, --define.
1586 * src/getargs.c (usage): Document -D.
1587 Fix help string for --locations.
1588 (command_line_location): New.
1589 (short_options, long_options, getargs): Support -D, --define.
1590 (getargs): Move -d support at the right place.
1591 * doc/bison.texinfo (Bison Options): Update.
1592 * tests/input.at (%define, --define): New.
1593
1594 2008-11-07 Akim Demaille <demaille@gostai.com>
1595
1596 Initialize the muscle table before parsing the command line.
1597 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
1598 (getargs): Define file_name.
1599 * src/main.c (main): Initialize muscle_tab before calling
1600 getargs.
1601 * src/muscle_tab.c (muscle_init): No longer define file_name, as
1602 its value is not available yet.
1603
1604 2008-11-07 Akim Demaille <demaille@gostai.com>
1605
1606 Locations without columns for command line arguments.
1607 * src/location.c (location_print): Don't display negative columns.
1608 * src/location.h: Document this.
1609
1610 2008-11-07 Akim Demaille <demaille@gostai.com>
1611
1612 Fix --help.
1613 * src/getargs.c (usage): Fix help string for -W.
1614
1615 2008-11-07 Akim Demaille <demaille@gostai.com>
1616
1617 Handle more general types of option arguments.
1618 * build-aux/cross-options.pl: The argument ends at the first
1619 space, not the first non-symbol character.
1620 Use @var for each word appearing the argument description.
1621
1622 2008-11-07 Akim Demaille <demaille@gostai.com>
1623
1624 Destroy the variants that remain on the stack in case of error.
1625 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
1626 destructor.
1627 Display the value only if yymsg is nonnull.
1628 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
1629
1630 2008-11-07 Akim Demaille <demaille@gostai.com>
1631
1632 Add "%define assert" to variants.
1633 This is used to help the user catch cases where some value gets
1634 ovewritten by a new one. This should not happen, as this will
1635 probably leak.
1636
1637 Unfortunately this uncovered a bug in the C++ parser itself: the
1638 lookahead value was not destroyed between two calls to yylex. For
1639 instance if the previous lookahead was a std::string, and then an int,
1640 then the value of the std::string was correctly taken (i.e., the
1641 lookahead was now an empty string), but std::string structure itself
1642 was not reclaimed.
1643
1644 This is now done in variant::build(other&) (which is used to take the
1645 value of the lookahead): other is not only stolen from its value, it
1646 is also destroyed. This incurs a new performance penalty of a few
1647 percent, and union becomes faster again.
1648
1649 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
1650 (b4_variant_if): New.
1651 (variant::built): New.
1652 Use it whereever the status of the variant changes.
1653 * etc/bench.pl.in: Check the penalty of %define assert.
1654
1655 2008-11-07 Akim Demaille <demaille@gostai.com>
1656
1657 Use "%define variant" in bench.pl.
1658 * etc/bench.pl.in: No longer use the pseudo directive %variants,
1659 just use %define variants.
1660
1661 2008-11-07 Akim Demaille <demaille@gostai.com>
1662
1663 Regen.
1664 * src/parse-gram.h, src/parse-gram.c: Regen.
1665
1666 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
1667
1668 Fix user actions without a trailing semicolon.
1669 Reported by Sergei Steshenko at
1670 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1671 * THANKS (Sergei Steshenko): Add.
1672 * src/scan-code.l (SC_RULE_ACTION): Fix it.
1673 * tests/regression.at (Fix user actions without a trailing semicolon):
1674 New test case.
1675
1676 2008-11-04 Akim Demaille <demaille@gostai.com>
1677
1678 Use b4_copyright_years.
1679 * data/yacc.c (b4_copyright_years): New.
1680 Fix its value according to the comments in the file.
1681 Use it and undefine it.
1682
1683 2008-11-04 Akim Demaille <demaille@gostai.com>
1684
1685 Formatting changes.
1686 * data/lalr1-fusion.cc, src/parse-gram.y: here.
1687
1688 2008-11-04 Akim Demaille <demaille@gostai.com>
1689
1690 Formatting changes.
1691 * data/lalr1-fusion.cc: here.
1692
1693 2008-11-04 Akim Demaille <demaille@gostai.com>
1694
1695 Use strict on bench.pl.
1696 * etc/bench.pl.in (&run, &generate_grammar): New.
1697 Rename the grammar generating functions for consistency.
1698 Change the interface so that the list of benches to run is passed
1699 as (optionless) arguments.
1700 (&compile): Use &run.
1701
1702 2008-11-04 Akim Demaille <demaille@gostai.com>
1703
1704 Remove spurious initial empty lines.
1705 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1706 * data/yacc.c: End the @output lines with an @.
1707
1708 2008-11-04 Akim Demaille <demaille@gostai.com>
1709
1710 Improve the display of sizes.
1711 * etc/bench.p.in: Higher precision.
1712 Sort by decreasing size.
1713
1714 2008-11-04 Akim Demaille <demaille@gostai.com>
1715
1716 Don't memcpy C++ structures.
1717 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
1718 arguments.
1719 (variant::build): New overload for
1720 copy-construction-that-destroys.
1721 (variant::swap): New.
1722 (parser::yypush_): Use it in variant mode.
1723
1724 2008-11-04 Akim Demaille <demaille@gostai.com>
1725
1726 Better defaults for bench.pl.
1727 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
1728 default values.
1729 Adjust &verbose uses.
1730 (-q, --quiet): New.
1731
1732 2008-11-04 Akim Demaille <demaille@gostai.com>
1733
1734 Make variant.yy more complex.
1735 std::list cannot be copied via memcpy, they are more demanding than
1736 std::string. Use one std::list to strengthen the test.
1737
1738 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
1739 Adjust.
1740 Create a list of strings, instead of a single large string.
1741
1742 2008-11-04 Akim Demaille <demaille@gostai.com>
1743
1744 bench.pl --bench.
1745 * etc/bench.pl.in (--bench, $bench): New.
1746
1747 2008-11-04 Akim Demaille <demaille@gostai.com>
1748
1749 Sort methods.
1750 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
1751 Define it after as().
1752
1753 2008-11-04 Akim Demaille <demaille@gostai.com>
1754
1755 Useless parens.
1756 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
1757
1758 2008-11-04 Akim Demaille <demaille@gostai.com>
1759
1760 Issue missing synclines after user actions.
1761 * data/c.m4 (b4_case): Issue synclines on the output file.
1762
1763 2008-11-04 Akim Demaille <demaille@gostai.com>
1764
1765 Remove trailing empty line.
1766 * data/lalr1-fusion.cc: Don't add an empty line after the user's
1767 epilogue.
1768
1769 2008-11-04 Akim Demaille <demaille@gostai.com>
1770
1771 Fix output of copyright years.
1772 * data/bison.m4 (b4_copyright): Fix the indentation of the
1773 copyright year paragraph.
1774 Use b4_copyright_years when no years are given.
1775 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
1776 (b4_copyright_years): New.
1777 Use it.
1778
1779 2008-11-04 Akim Demaille <demaille@gostai.com>
1780
1781 Avoid the spurious initial empty line.
1782 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
1783 the end of @output request to suppress the empty line that
1784 results.
1785
1786 2008-11-04 Akim Demaille <demaille@gostai.com>
1787
1788 Remove parser::rhs_number_type.
1789 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
1790 (yyrhs_): Use b4_table_define.
1791
1792 2008-11-04 Akim Demaille <demaille@gostai.com>
1793
1794 Fix iteration type.
1795 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
1796
1797 2008-11-04 Akim Demaille <demaille@gostai.com>
1798
1799 Factor the declaration of the integer tables.
1800 * data/lalr1-fusion.cc (b4_table_define): New.
1801 Use it.
1802
1803 2008-11-03 Akim Demaille <demaille@gostai.com>
1804
1805 Fix indentation of tables in lalr1.cc
1806 * data/lalr1-fusion.cc: Fix the indentation.
1807
1808 2008-11-03 Akim Demaille <demaille@gostai.com>
1809
1810 Destroy the lhs symbols after reduction.
1811 * data/lalr1-fusion.cc (parse): After the user action, when in
1812 variant mode, destroy the lhs symbols.
1813
1814 2008-11-03 Akim Demaille <demaille@gostai.com>
1815
1816 Simplify yysyntax_error_ use.
1817 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
1818 type, but make it unnamed in the declaration when it is not used.
1819
1820 2008-11-03 Akim Demaille <demaille@gostai.com>
1821
1822 Let yy::variant::build return an lvalue.
1823 * data/lalr1-fusion.cc (variant::build): Return a reference to the
1824 object.
1825
1826 2008-11-03 Akim Demaille <demaille@gostai.com>
1827
1828 Define yy::variant only when needed.
1829 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
1830 used.
1831
1832 2008-11-03 Akim Demaille <demaille@gostai.com>
1833
1834 Bench the three-stack lalr1.cc.
1835 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
1836 one-stack one.
1837
1838 2008-11-03 Akim Demaille <demaille@gostai.com>
1839
1840 Fail on parse error in calc++.
1841 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
1842 status.
1843 * examples/calc++/test ($me, $number, $exit, run): New.
1844 Use them to propagate errors to the exit status.
1845
1846 2008-11-03 Akim Demaille <demaille@gostai.com>
1847
1848 Don't specify the skeleton twice in the example.
1849 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
1850 file does what is needed.
1851
1852 2008-11-03 Akim Demaille <demaille@gostai.com>
1853
1854 bench: Improve output.
1855 * etc/bench.pl.in (bench_grammar): Tune the printf format.
1856
1857 2008-11-03 Akim Demaille <demaille@gostai.com>
1858
1859 bench: check impact of %debug on variants.
1860 * etc/bench.pl.in (variant_grammar): Fix the computation of
1861 $variant.
1862 Generate a grammar file that can work with or without %debug.
1863 Do use the @directive.
1864 (bench_variant_parser): Check impact of %debug.
1865 (@directives): Rename all the occurrences to...
1866 (@directive): this, for consistency.
1867
1868 2008-11-03 Akim Demaille <demaille@gostai.com>
1869
1870 bench: report the size too.
1871 * etc/bench.pl.in ($iterations): Defaults to -3.
1872 (&bench_grammar): Require hireswallclock.
1873 Compute and display the size of the result.
1874 More comments.
1875
1876 2008-11-03 Akim Demaille <demaille@gostai.com>
1877
1878 bench: More use of the verbosity level.
1879 * etc/bench.pl.in ($verbose, &verbose): New.
1880 Use them.
1881 More POD documentation.
1882
1883 2008-11-03 Akim Demaille <demaille@gostai.com>
1884
1885 bench.pl: a command line interface
1886 * etc/bench.pl.in: More doc.
1887 Some fixes in the documentation.
1888 ($cflags, $iterations, &help, &getopt): New.
1889 Use them.
1890 (&variant_grammar): Let the number of stages be 10 times what is
1891 specified.
1892
1893 2008-11-03 Akim Demaille <demaille@gostai.com>
1894
1895 Bench the use of Boost.Variants.
1896 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
1897 New.
1898 (&compile): Be ready to compile C++ parsers.
1899 (&bench_push_parser): Move debug information to the outermost
1900 level.
1901 * THANKS: Add Michiel De Wilde.
1902
1903 2008-11-03 Akim Demaille <demaille@gostai.com>
1904
1905 bench.pl: Pass directives as a list instead of as a string.
1906 * etc/bench.pl.in (&directives): New.
1907 (&triangular_grammar, &calc_grammar): Use it to format the Bison
1908 directives.
1909 (&triangular_grammar): Do use the directives (were ignored).
1910 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
1911 directives.
1912
1913 2008-11-03 Akim Demaille <demaille@gostai.com>
1914
1915 Improve genericity of bench.pl.
1916 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
1917 argument.
1918 (&bench_push_parser): New.
1919 Call it.
1920
1921 2008-11-03 Akim Demaille <demaille@gostai.com>
1922
1923 Add documentation to bench.pl.
1924 * etc/bench.pl.in: Comment changes.
1925
1926 2008-11-03 Akim Demaille <demaille@gostai.com>
1927
1928 Fuse the three stacks into a single one.
1929
1930 In order to make it easy to perform benchmarks to ensure that
1931 there are no performance loss, lalr1.cc is forked into
1932 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
1933 lalr1.cc.
1934
1935 Meanwhile, to make sure that lalr1-fusion.cc is correctly
1936 exercized by the test suite, the user must install a symbolic link
1937 from lalr1.cc to it.
1938
1939 Instead of having three stacks (state, value, location), use a
1940 stack of triples. This considerably simplifies the code (and it
1941 will be easier not to require locations as currently does the C++
1942 parser), and also gives a 10% speedup according to
1943 etc/bench (probably mainly since memory allocation is done once
1944 instead of three times).
1945
1946 Another motivation is to make it easier to destruct properly
1947 semantic values: now that they are bound to their state (hence
1948 symbol type) it will be easier to call the appropriate destructor.
1949
1950 These changes should probably benefit the C parser too.
1951
1952 * data/lalr1.cc: Copy as...
1953 * data/lalr1-fusion.cc: this new file.
1954 (b4_rhs_value, b4_rhs_location): New definitions overriding those
1955 from c++.m4.
1956 (state_stack_type, semantic_stack_type, location_stack_type)
1957 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
1958 (data_type, stack_type, yystack_): New.
1959 (YYLLOC_DEFAULT, yypush_): Adjust.
1960 (yyerror_range): Now based on data_type, not location_type.
1961
1962 2008-11-03 Akim Demaille <demaille@gostai.com>
1963
1964 Push the state, value, and location at the same time.
1965 This is needed to prepare a forthcoming patch that fuses the three
1966 stacks into one.
1967
1968 * data/lalr1.cc (parser::yypush_): New.
1969 (parser::yynewstate): Change the semantics: instead of arriving to
1970 this label when value and location have been pushed, but yystate
1971 is to be pushed on the state stack, now the three of them must
1972 have been pushed before. yystate still must be the new state.
1973 This allows to use yypush_ everywhere instead of individual
1974 handling of the stacks.
1975
1976 2008-11-03 Akim Demaille <demaille@gostai.com>
1977
1978 Prefer references to pointers.
1979 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
1980 definition to use references instead of pointers.
1981 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
1982 Take the value and location as references.
1983 Adjust callers.
1984
1985 2008-11-03 Akim Demaille <demaille@gostai.com>
1986
1987 stack::size instead of stack::height.
1988 * data/lalr1.cc (stack::height): Rename as...
1989 (stack::size): this.
1990 Fix the output type.
1991 Comment changes.
1992
1993 2008-11-03 Akim Demaille <demaille@gostai.com>
1994
1995 Use variants to support objects as semantic values.
1996 This patch was inspired by work by Michiel De Wilde. But he used
1997 Boost variants which (i) requires Boost on the user side, (ii) is
1998 slow, and (iii) has useless overhead (the parser knows the type of
1999 the semantic value there is no reason to duplicate this
2000 information as Boost.Variants do).
2001
2002 This implementation reserves a buffer large enough to store the
2003 largest objects. yy::variant implements this buffer. It was
2004 implemented with Quentin Hocquet.
2005
2006 * src/output.c (type_names_output): New.
2007 (output_skeleton): Invoke it.
2008 * data/c++.m4 (b4_variant_if): New.
2009 (b4_symbol_value): If needed, provide a definition for variants.
2010 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
2011 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
2012 (b4_char_sizeof, yy::variant): New.
2013 (parser::parse): If variants are requested, define
2014 parser::union_type, parser::variant, change the definition of
2015 semantic_type, construct $$ before running the user action instead
2016 of performing a default $$ = $1.
2017 * examples/variant.yy: New.
2018 Based on an example by Michiel De Wilde.
2019
2020 2008-11-03 Akim Demaille <demaille@gostai.com>
2021
2022 Parameterize the extraction of semantic values.
2023 To make future changes easier, no longer rely on ".TYPE" being the
2024 way to get a semantic value.
2025
2026 * data/c.m4 (b4_symbol_value): New.
2027 Use it.
2028 * data/c++.m4, data/yacc.c: Use it.
2029 * data/glr.c: Use b4_symbol_value.
2030 (b4_rhs_data): New.
2031 Use it.
2032
2033 2008-11-03 Akim Demaille <demaille@gostai.com>
2034
2035 Prepare easier M4 changes.
2036 * data/lalr1.cc: Use escaped [] instead of literals to prepare
2037 future changes.
2038
2039 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2040
2041 Initiate further development.
2042 * NEWS: Create an empty section for new entries.
2043 * gnulib: Update submodule to HEAD.
2044
2045 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2046
2047 * NEWS: Version 2.4.
2048
2049 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2050
2051 Prepare for next release.
2052 * NEWS: Briefly mention changes since 2.3b.
2053 * README: Say GNU m4 1.4.6, which we've been requiring in release
2054 announcements already, not 1.4.3, which breaks the build.
2055
2056 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2057
2058 Say %language is experimental.
2059 We're thinking of extending it's effect on output file naming. See the
2060 thread at
2061 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2062 * NEWS: Say it's experimental.
2063 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2064 recommend it over %skeleton for now.
2065 (Bison Options): Likewise.
2066 (C++ Bison Interface): Use %skeleton not %language.
2067 (Calc++ Parser): Use %skeleton not %language.
2068 * src/getargs.c (usage): Say it's experimental.
2069
2070 2008-11-01 Di-an Jan <dianj@freeshell.org>
2071 Paolo Bonzini <bonzini@gnu.org>
2072
2073 Support all Java parser class modifiers.
2074 * data/java.m4 (b4_percent_define_get3): New.
2075 (b4_final_if, b4_strictfp_if): New.
2076 * data/lalr1.java (final, strictfp, extends, implements): Support.
2077 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2078 documentation.
2079 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2080 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2081 (AT_CHECK_JAVA_GREP): New.
2082 (Java parser class modifiers): New test.
2083 (Java parser class extends and implements): New test.
2084
2085 Model exception propagation better with throws and lex_throws.
2086 * data/java.m4 (b4_list2): New.
2087 (throws): Change default.
2088 * data/lalr1.java (yyaction): Add throws.
2089 (parse): Add lex_throws in addition to throws.
2090 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2091 * tests/java.at (Java throws specifications): New test.
2092
2093 Improve documentation for Java parsers.
2094 * doc/bison.texinfo (Java Parsers): Add subsections.
2095 Don't quote first argument of %define.
2096 (Java Bison Interface): Document output files. Move documentation
2097 of parser class and merge into Java Parser Interface. Document
2098 features that error out. Document directives with no effect.
2099 Move note about Javadoc higher.
2100 (Java Semantic Values): Explicitly mention stype.
2101 Document that generic types cannot be used.
2102 (Java Location Values): Use @deftypeivar. Document constructors.
2103 Correct return value for toString.
2104 (Java Parser Interface): List undocumented constants/fields.
2105 Move documentation of fields added by %parse-param closer to list
2106 of members. Document that token names are added as fields.
2107 Document constructors accurately. Remove error method.
2108 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2109 Interface. Describe %code lexer and yylex accutately.
2110 Remove documentation that does not match the code.
2111 (Java Action Features): New.
2112 (Java Differences): Add reference. Add item on semantic values.
2113 Add note about @{ ... @}. Clarify %% epilogue placement.
2114 (Java Declarations Summary): New.
2115
2116 Fix Java skeleton.
2117 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2118 (b4_remove_comma): Quote test argument.
2119 (b4_identification): Remove "bison" field.
2120 * tests/java.at (Java parser class and package names): New test.
2121 (Java %parse-param and %lex-param): New test.
2122 (Java stype, position_class and location_class): New test.
2123
2124 2008-10-31 Di-an Jan <dianj@freeshell.org>
2125
2126 * data/lalr1.jave: Update copyright years.
2127 (YYParser): Correct name of "generated from" file in Javadoc:
2128 use b4_file_name instead of @ofile@.
2129 (Location constructor): Correct Javadoc parameter name.
2130 (yylloc): Add missing opening m4 quote after b4_location_if.
2131 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2132 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2133 (YYParser constructor): Correct Javadoc parameter name.
2134
2135 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2136
2137 Always put auxiliary code files in the same dir as other output files.
2138 * src/files.c (compute_file_name_parts): When the user specifies
2139 --output but not --file-prefix, extract the directory prefix from the
2140 file prefix not from the grammar file name. This affects the location
2141 of files like location.hh generated by the C++ skeleton. The includes
2142 in the other output files require this fix.
2143 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2144 for expected output files.
2145 (Output files): Add a test for the above.
2146
2147 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2148
2149 * gnulib: Update submodule to HEAD.
2150
2151 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2152
2153 Update copyright year.
2154 * src/files.c: Here.
2155
2156 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2157
2158 Don't overwrite the input file.
2159 * src/files.c (output_file_name_check): Fatal error if using input file
2160 for output.
2161 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2162 argument.
2163 (Conflicting output files): Add test.
2164
2165 2008-10-28 Akim Demaille <demaille@gostai.com>
2166
2167 Space changes.
2168 * data/lalr1.cc: Formatting changes.
2169
2170 2008-10-28 Akim Demaille <demaille@gostai.com>
2171
2172 Don't define debugging functions when !YYDEBUG.
2173 * data/lalr1.cc (debug_stream, set_debug_stream)
2174 (debug_level_type, debug_level, set_debug_level): Don't
2175 declare them when YYDEBUG is not defined.
2176 The implementation are already YYDEBUG-aware.
2177
2178 2008-10-28 Akim Demaille <demaille@gostai.com>
2179
2180 Prefer "continue" for empty loop bodies.
2181 * etc/bench.pl.in: Use "continue" instead of {}.
2182
2183 2008-10-28 Akim Demaille <demaille@gostai.com>
2184
2185 Space and comments changes.
2186 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2187 * data/c.m4, data/lalr1.cc: Space changes.
2188
2189 2008-10-28 Akim Demaille <demaille@gostai.com>
2190
2191 Make gnulib a submodule.
2192 * gnulib: New.
2193 * .gitmodules (gnulib): New.
2194
2195 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2196
2197 Fix yyerror_range for user-defined location type in C++. Reported by
2198 Georg Sauthoff at
2199 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2200 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2201 * THANKS (Georg Sauthoff): Add.
2202
2203 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2204
2205 Update several administrative files mainly to facilitate releasing.
2206 * HACKING (Administrivia): Make the git-merge-changelog notes more
2207 helpful.
2208 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2209 (Release Procedure): Update for git and add numerous details that were
2210 previously missing.
2211 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2212 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2213 that announcements don't claim we bootstrapped with whatever bison
2214 happened to be in PATH. Add flex as a bootstrap tool.
2215 * Makefile.maint: Remove, previously replaced by maint.mk.
2216 * Makefile.cfg: Remove, and migrate settings to...
2217 * cfg.mk: ... here for the sake of `make announcement'.
2218 * bootstrap.conf (gnulib_modules): Add announce-gen.
2219 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2220 Berry.
2221
2222 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2223
2224 Small but important bugfixes for the Java skeleton.
2225 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2226 (yy_symbol_print): Call toString on yyvaluep.
2227
2228 2008-08-29 Akim Demaille <demaille@gostai.com>
2229
2230 Clarify UPDATED use.
2231 * doc/bison.texinfo: It refers to the last edition of this file,
2232 not to the release date of Bison.
2233 Reported by Joel E. Denny.
2234
2235 2008-08-29 Akim Demaille <demaille@gostai.com>
2236
2237 * README: Update FAQ pointer.
2238 Reported by Joel E. Denny.
2239
2240 2008-08-27 Eric Blake <ebb9@byu.net>
2241
2242 Resync m4sugar from autoconf.
2243 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2244 (m4_init): Adjust to latest m4.git changes.
2245 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2246 effects.
2247 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2248 (_m4_list_cmp): Reduce side effects.
2249
2250 2008-08-27 Akim Demaille <demaille@gostai.com>
2251
2252 Check yyerrok in calc.at.
2253 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2254 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2255 expected.
2256
2257 2008-08-27 Akim Demaille <demaille@gostai.com>
2258
2259 Support yyerrok in lalr1.cc.
2260 YYBACKUP is still to import back into lalr1.cc.
2261 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
2262
2263 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2264
2265 For maintainer-check*, don't recompile for a $(VERSION) update.
2266 * cfg.mk: New file.
2267 (_is-dist-target): Override the one in GNUmakefile.
2268 * Makefile.am (EXTRA_DIST): Add cfg.mk.
2269
2270 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2271
2272 Update for recent change to gnulib.
2273 * src/parse-gram.y: Don't include strverscmp.h. It comes from
2274 string.h now.
2275
2276 2008-08-15 Eric Blake <ebb9@byu.net>
2277
2278 Remaining m4sugar merge from autoconf.
2279 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2280 * data/m4sugar/foreach.m4: New file, copied from autoconf.
2281 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2282 * src/output.c (output_skeleton): Tell m4 how to find it.
2283
2284 Partial m4sugar merge from autoconf: m4_map.
2285 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2286 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2287 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2288 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2289 for empty list.
2290 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2291 Likewise.
2292 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2293 declares it.
2294
2295 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2296
2297 Keep .version and PACKAGE_VERSION in sync.
2298 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2299 dependency, and add comments justifying this in more detail. Discussed
2300 starting at
2301 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2302
2303 2008-08-06 Eric Blake <ebb9@byu.net>
2304
2305 Partial m4sugar merge from autoconf: m4_shiftn.
2306 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2307 (m4_shift2, m4_shift3): New macros.
2308 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2309 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2310 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2311 * data/java.m4 (b4_remove_comma): Likewise.
2312
2313 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2314 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2315 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2316 (m4_init): Consolidate wrapped text into single m4_wrap.
2317 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2318 in wrapped text.
2319
2320 2008-08-05 Eric Blake <ebb9@byu.net>
2321
2322 Partial m4sugar merge from autoconf: builtins, version.m4.
2323 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2324 (m4_prepend): Remove, as it is unused and inherently quadratic,
2325 whereas m4_append is linear in newer m4.
2326 (m4_mkstemp): New builtin.
2327 (m4_symbols): Make rename conditional.
2328 (m4_version_prereq): Ensure fatal error if used in bison, which
2329 intentionally lacks version.m4.
2330
2331 Fix comments in m4sugar.
2332 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2333
2334 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2335
2336 Update for recent .gitignore fix in Gnulib.
2337 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2338 anchored .gitignore entries.
2339
2340 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2341
2342 Set gnu or gnits strictness.
2343 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2344 development and gnits strictness for releases. Based on Eric Blake's
2345 suggestion at
2346 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2347
2348 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2349
2350 * NEWS: Clarify documentation of %language.
2351
2352 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2353
2354 Support usage of git-merge-changelog.
2355 * .gitattributes: New.
2356 * HACKING: Document usage of git-merge-changelog.
2357 * bootstrap: Install git-merge-changelog entries in .git/config
2358 if appropriate.
2359
2360 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2361
2362 Remove remaining dependence on CVS Id keyword.
2363 * ChangeLog: For the sake of people still using CVS, don't use dollars
2364 when mentioning Id.
2365 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2366 unusual anyway.
2367 * data/xslt/xml2dot.xsl: Likewise.
2368 * data/xslt/xml2text.xsl: Likewise.
2369 * data/xslt/xml2xhtml.xsl: Likewise.
2370 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2371 * doc/Makefile.am (neutralize): Remove, no longer needed.
2372 (.x.1): Don't use neutralize.
2373 (edit): Don't substitute for ID.
2374 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2375
2376 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2377
2378 Fix dependence on computed configure variables.
2379 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2380 $(top_srcdir)/configure.ac so that changes to computed variables, such
2381 as PACKAGE_VERSION, are seen.
2382 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2383
2384 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2385
2386 Update copyright dates for recent changes.
2387 * Makefile.am: Here.
2388 * src/Makefile.am: Here.
2389 * src/reduce.c: Here.
2390 * tests/reduce.at: Here.
2391
2392 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2393
2394 Use git-version-gen for version names between releases.
2395 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2396 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2397 * .prev-version: New.
2398 * .version.in: Remove.
2399 * ChangeLog: Remove the Id previously used for capturing the CVS
2400 revision.
2401 * GNUmakefile: Remove, now copied from Gnulib.
2402 * Makefile.am: Add code suggested by comments in
2403 build-aux/git-version-gen.
2404 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2405 .prev-version, and .version.
2406 * NEWS (2.3b+): Rename to...
2407 (?.?): ... this because we're dropping the "+" version naming scheme,
2408 but, in general, we still can't be sure of our next release name.
2409 * bootstrap: Add a quick hack to remove from .gitignore the
2410 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2411 entry. This should really be fixed in gnulib instead.
2412 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2413 * configure.ac (AC_INIT): Set version name by invoking
2414 build-aux/git-version-gen.
2415 (AC_CONFIG_FILES): Remove .version, now generated by
2416 build-aux/git-version-gen.
2417 * maint.mk: New, copied from coreutils.
2418 * doc/.cvsignore (bison.1): Add.
2419 * doc/.gitignore (/bison.1): Add.
2420 * doc/bison.1: Remove, generated.
2421 * src/.cvsignore (revision.c): Remove.
2422 * src/.gitignore (/revision.c): Remove.
2423 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2424 (BUILT_SOURCES): Remove revision.c.
2425 (revision.c): Remove.
2426 * src/getargs.c (version): Don't print revision after the VERSION.
2427 * src/revision.h: Remove.
2428
2429 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2430
2431 Fix untranslatable composition of sentences. Reported by Goran
2432 Uddeborg at
2433 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2434 * THANKS (Goran Uddeborg): Add.
2435 * src/reduce.c (reduce_print): Report the number of nonterminals and
2436 rules useless in the grammar in separate sentences.
2437 * tests/reduce.at (Useless Rules): Update output.
2438 (Reduced Automaton): Likewise.
2439 (Underivable Rules): Likewise.
2440 (Empty Language): Likewise.
2441
2442 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2443
2444 Fix some .gitignore and .cvsignore problems.
2445 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2446 (insert_vc_ignore): ... this new function, which prepends `/' to all
2447 .gitignore entries before passing them to insert_sorted_if_absent.
2448 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2449 .cvsignore files are maintained even though Bison developers run
2450 bootstrap while using Git.
2451 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2452 unneeded by Bison.
2453 (gnulib): Add.
2454 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2455 unneeded. Reported by Eric Blake.
2456 * lib/.gitignore (/*~): Add.
2457 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2458 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2459 Blake.
2460 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2461
2462 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2463
2464 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2465 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2466 * bootstrap.conf (gnulib_modules): Add unsetenv.
2467 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2468 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2469 (/setenv.m4): Add.
2470 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2471 the first argument because it may become position-dependent, and unset
2472 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2473 Add comments explaining these issues in more detail.
2474
2475 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2476
2477 Add .gitignore everywhere based on .cvsignore.
2478 * .gitignore: New.
2479 * build-aux/.gitignore: New.
2480 * data/.gitignore: New.
2481 * doc/.gitignore: New.
2482 * etc/.gitignore: New.
2483 * examples/.gitignore: New.
2484 * examples/calc++/.gitignore: New.
2485 * lib/.gitignore: New.
2486 * m4/.gitignore: New.
2487 * po/.gitignore: New.
2488 * runtime-po/.gitignore: New.
2489 * src/.gitignore: New.
2490 * tests/.gitignore: New.
2491
2492 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2493
2494 * NEWS (2.3b+): New section, empty for now.
2495 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2496
2497 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2498
2499 * NEWS (2.3b): Update release date since there has been a delay in
2500 getting the announcements and tarballs out.
2501
2502 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2503
2504 * NEWS: Version 2.3b.
2505 * configure.ac (AC_INIT): Likewise.
2506 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2507
2508 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2509
2510 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2511 been doing it for years.
2512 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2513 (Release Procedure): Add FIXME about make alpha being unmaintained.
2514
2515 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2516
2517 * data/yacc.c: Reformat m4 a little for readability.
2518 * src/lalr.c (build_relations): Correct comment.
2519
2520 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2521
2522 DJGPP specific issue.
2523 * djgpp/config.sed: Fixes required to run configure scripts generated
2524 by autoconf 2.62.
2525
2526 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2527
2528 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2529 coordinator@translationproject.org.
2530
2531 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2532
2533 * THANKS: Add Eric Blake.
2534
2535 2008-04-23 Eric Blake <ebb9@byu.net>
2536
2537 Revert prior patch, by working around autoconf regression.
2538 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2539 ("Output file name: ("): Uncomment test.
2540 ("Output file name: )"): Likewise.
2541 Based on an idea from Noah Misch.
2542
2543 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2544
2545 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2546 2.61. Reported by Juan Manuel Guerrero at
2547 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2548 * tests/output.at ("Output file name: ("): Comment out test case for
2549 now.
2550 ("Output file name: )"): Likewise.
2551
2552 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2553
2554 * GNUmakefile: Update git-version-gen invocation so make dist
2555 succeeds.
2556
2557 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2558
2559 Update to the current gnulib CVS repository, and fix trigraph handling
2560 in Bison.
2561 * bootstrap: Update gnulib CVS repository URL.
2562 (symlink_to_dir): Encapsulate the code that guarantees the destination
2563 directory exists into...
2564 (check_dst_dir): ... this new function, and...
2565 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2566 fail when copying files into lib/uniwidth/.
2567 * src/output.c (prepare_symbols): When writing yytname muscles, where
2568 symbol names will be encoded in C-string literals, tell quotearg to
2569 escape trigraphs. This used to be the default in gnulib.
2570 * tests/regression.at (Token definitions): Because of the change in
2571 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2572 escapes trigraphs in symbol names. Thus, yytname no longer has
2573 trigraphs unnecessarily doubly escaped. Update test case output.
2574 Extend test case to be sure Bison's own error messages will no longer
2575 have trigraphs in symbol names unnecessarily escaped once.
2576
2577 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2578
2579 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2580 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2581 * .cvsignore: Add .version.
2582 * .version.in: New.
2583 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2584 * configure.ac (AC_CONFIG_FILES): Add .version.
2585 * build-aux/.cvsignore: Add git-version-gen.
2586
2587 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2588
2589 * NEWS (2.3a+): Mention that -g now takes an argument.
2590 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2591 consistency. Update the -g and -x entries now that they take
2592 arguments. Use brackets to indicate optional arguments.
2593 * src/getargs.c (usage): Explain the relationship between arguments of
2594 long and short options more completely. Document --defines and -d
2595 separately since the former takes an argument but, for POSIX Yacc, the
2596 latter does not.
2597 (short_options): Let -W take an optional argument like --warnings.
2598 (getargs): Sort cases.
2599
2600 2008-02-28 Akim Demaille <demaille@gostai.com>
2601
2602 * doc/bison.texinfo: Fix a few typos.
2603
2604 2008-02-28 Akim Demaille <akim@epita.fr>
2605
2606 * doc/bison.texinfo (Bison Options): Document -W.
2607 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2608
2609 2008-02-28 Akim Demaille <akim@epita.fr>
2610
2611 * src/getargs.c (short_options): Split and sort for readability.
2612 -g and -x take optional arguments, just like their long options.
2613 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2614 understand.
2615 Fix the handling of $opt which resulted in all the argument to be
2616 considered as optional.
2617
2618 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2619
2620 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2621 say its interface is experimental.
2622 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2623 Java.
2624 (Bison Options): In the -L and --language entry, mention Java.
2625 (Java Bison Interface): Say the interface is experimental.
2626 * src/getargs.c (usage): Mention -L and --language.
2627
2628 * NEWS (2.3a+): Say the push parsing interface is experimental.
2629 * doc/bison.texinfo (Push Decl): Likewise.
2630 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2631 (Push Parser Function): Likewise.
2632 (Pull Parser Function): Likewise.
2633 (Parser Create Function): Likewise.
2634 (Parser Delete Function): Likewise.
2635 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2636 yypull_parse, and yypush_parse entries.
2637
2638 * NEWS (2.3a+): Mention XML support, and say the schema is
2639 experimental.
2640 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2641 * src/getargs.c (usage): Say the XML schema is experimental.
2642
2643 * NEWS (2.3a+): Say option instead of flag.
2644
2645 2008-02-21 Wojciech Polak <polak@gnu.org>
2646
2647 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2648 text.
2649
2650 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
2651
2652 Fix impure push parser compile error reported by Bob Rossi at
2653 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
2654 * data/yacc.c: Clean up whitespace in the output a little.
2655 (yypstate_allocated): Define for impure push parsers regardless of
2656 whether the pull interface is also requested.
2657 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
2658 check impure push parsers without the pull interface.
2659
2660 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
2661 yyerror takes arguments specified by %parse-param while yypstate_new
2662 does not.
2663 * doc/bison.texinfo (Parser Create Function): Document that
2664 yypstate_new returns 0 for multiple impure parser instances.
2665 * tests/push.at (Push Parsing: Multiple impure instances): Update
2666 expected stderr output.
2667
2668 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2669
2670 * runtime-po/POTFILES.in (push.c): Remove.
2671
2672 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2673
2674 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
2675 * data/push.c: Rename to...
2676 * data/yacc.c: ... this, overwriting it.
2677 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
2678 `%push-pull-parser' -> `%define api.push_pull "both"'.
2679 Remove old yacc.c tests, and update push.c tests to yacc.c.
2680
2681 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2682
2683 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
2684 `"%code top" blocks' instead of `%code "top" blocks'.
2685 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
2686 Clean up whitespace in the output a little.
2687
2688 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2689
2690 Fix documentation problems reported by Tim Josling at
2691 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
2692 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
2693 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
2694 integers. Explain the effect of literal string aliases on error
2695 messages. Copy token 0 documentation from the C++ skeleton
2696 documentation.
2697
2698 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2699
2700 Accept a token number in a %left, %right, or %nonassoc for POSIX
2701 conformance. Reported by Tim Josling at
2702 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
2703 * NEWS (2.3a+): Mention.
2704 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
2705 and code numbers are treated by precedence declarations.
2706 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
2707 of symbols.1.
2708 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
2709 of symbol.
2710 (symbol.prec): New, just like symbol but allows INT.
2711 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
2712 longer holds.
2713 * tests/regression.at (Token number in precedence declaration): New
2714 test case.
2715
2716 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2717
2718 DJGPP specific issues.
2719 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
2720 be changed. Copyright timestamp adjusted.
2721 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
2722 be changed. Copyright timestamp adjusted.
2723 * djgpp/config.site: Copyright timestamp adjusted.
2724 * djgpp/config_h.sed: Copyright timestamp adjusted.
2725 * djgpp/djunpack.bat: Copyright timestamp adjusted.
2726 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
2727 filename translation list.
2728 * djgpp/subpipe.c (init_subpipe): Check the environment variables
2729 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
2730 files shall be created. Before trying to use the temp dir where the
2731 environment variable points to check that the dir really exists. If
2732 not default to the cwd as temp dir. Copyright timestamp adjusted.
2733 * djgpp/subpipe.h: Copyright timestamp adjusted.
2734 * djgpp/testsuite.sed: Copyright timestamp adjusted.
2735
2736 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
2737
2738 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
2739
2740 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
2741
2742 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
2743 Problem reported by Claudio Saavedra in
2744 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
2745
2746 2008-01-05 Wojciech Polak <polak@gnu.org>
2747
2748 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
2749 document's title with the input grammar file name.
2750
2751 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
2752
2753 Automate regression testing of the XML/XSLT implementation. Discussed
2754 starting at
2755 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
2756 * configure.ac (XSLTPROC): New substitution.
2757 * Makefile.am (maintainer-xml-check): New phony target invoking...
2758 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
2759 invoking make maintainer-check with BISON_TEST_XML=1.
2760 * tests/atlocal.in (XSLTPROC): New.
2761 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
2762 not to report reachable memory when Bison is expected to have a
2763 non-zero exit status and (2) to compare XML/XSLT output with --graph
2764 and --report=all output for every working grammar when
2765 BISON_TEST_XML=1.
2766 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
2767 (AT_BISON_CHECK_XML): New.
2768 (AT_QUELL_VALGRIND): New.
2769 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
2770 (AT_CHECK): ... don't redefine this since this was the old way to
2771 quell Valgrind.
2772 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
2773 AT_BISON_CHECK invocations.
2774 * tests/c++.at: Likewise.
2775 * tests/calc.at: Likewise.
2776 * tests/conflicts.at: Likewise.
2777 * tests/cxx-type.at: Likewise.
2778 * tests/existing.at: Likewise.
2779 * tests/glr-regression.at: Likewise.
2780 * tests/headers.at: Likewise.
2781 * tests/input.at: Likewise.
2782 * tests/java.at: Likewise.
2783 * tests/output.at: Likewise.
2784 * tests/push.at: Likewise.
2785 * tests/reduce.at: Likewise.
2786 * tests/regression.at: Likewise.
2787 * tests/sets.at: Likewise.
2788 * tests/skeletons.at: Likewise.
2789 * tests/synclines.at: Likewise.
2790 * tests/torture.at: Likewise.
2791 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
2792 tends to hang xsltproc.
2793 (Big horizontal): Likewise.
2794
2795 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2796
2797 In XML output, remove redundant class attribute on symbol element.
2798 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
2799 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
2800 look up a symbol to determine whether it's a nonterminal or terminal.
2801 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
2802 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
2803
2804 Add prec/assoc information to XML output.
2805 * src/gram.c (grammar_rules_print_xml): For each rule that has a
2806 %prec, add a percent_prec attribute.
2807 * src/print-xml.c (print_grammar): For each terminal that has a
2808 precedence or associativity, add a prec or assoc attribute.
2809 (xml_indent): New.
2810 (xml_puts): Use xml_indent.
2811 (xml_printf): Use xml_indent.
2812 * src/print-xml.h (xml_indent): Prototype.
2813
2814 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
2815 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2816
2817 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2818
2819 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
2820 (bison:ruleByNumber): ... this for clarity.
2821 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
2822 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
2823 (xsl:template match="reduction"): Update.
2824 (xsl:template match="item"): Update.
2825 (xsl:template match="reduction"): Update.
2826
2827 In the XML output, don't print the list of rules where symbols appear.
2828 Compute it in XSLT instead. Discussed at
2829 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
2830 * data/xslt/bison.xsl (bison:ruleByLhs): New.
2831 (bison:ruleByRhs): New.
2832 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
2833 bison:ruleByRhs.
2834 (xsl:template match="terminal/rule"): Remove.
2835 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2836 bison:ruleByRhs.
2837 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2838 Remove.
2839 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
2840 bison:ruleByRhs and mode="number-link" for rule template.
2841 (xsl:template match="terminal/rule"): Remove.
2842 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2843 bison:ruleByRhs and mode="number-link" for rule template.
2844 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2845 Rewrite as...
2846 (xsl:template match="rule" mode="number-link"): ... this.
2847 * src/print-xml.c (print_grammar): Don't print the list of rules.
2848
2849 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2850
2851 Don't let --report affect XML output; always print all information.
2852 Discussed at
2853 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
2854 * src/conflicts.c (log_resolution): Implement.
2855 * src/print-xml.c (print_core): Implement.
2856 (print_state): Implement.
2857 (print_xml): Implement.
2858
2859 * NEWS (2.3a+): Fix quotes.
2860 * src/parse-gram.y (prologue_declaration): For consistency with -v,
2861 don't let %verbose clear the list specified by --report.
2862
2863 2007-11-26 Akim Demaille <akim@epita.fr>
2864
2865 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
2866
2867 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
2868
2869 In the XML output, list useless and unused symbols and rules with the
2870 useful ones and add a "usefulness" attribute. Discussed starting at
2871 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
2872 * src/gram.c (grammar_rules_partial_print_xml): Remove.
2873 (grammar_rules_print_xml): Print all rules instead of just those
2874 useful in the grammar, and add a "usefulness" attribute.
2875 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
2876 * src/print-xml.c (print_rules_useless_in_parser): Remove.
2877 (print_grammar): Print all nonterminals instead of just useful ones,
2878 and add a "usefulness" attribute to nonterminals and terminals.
2879 (print_xml): Don't print a separate "reductions" or
2880 "rules-useless-in-parser" element.
2881 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
2882 (reduce_xml): Remove.
2883 (reduce_token_unused_in_grammar): New.
2884 (reduce_nonterminal_useless_in_grammar): New.
2885 * src/reduce.h (reduce_xml): Remove prototype.
2886 (reduce_token_unused_in_grammar): Add prototype.
2887 (reduce_nonterminal_useless_in_grammar): Add prototype.
2888 * data/xslt/xml2text.xsl: Update for XML changes.
2889 * data/xslt/xml2xhtml.xsl: Update for XML changes.
2890 * tests/reduce.at (Useless Terminals): Update output.
2891 (Useless Rules): Update output.
2892 (Reduced Automaton): Update output.
2893
2894 Say "Terminals unused in grammar" instead of "Unused terminals".
2895 * NEWS (2.3a+): Update.
2896 * doc/bison.texinfo (Understanding): Update example output.
2897 * src/reduce.c (reduce_output): Implement.
2898 * data/xslt/xml2text.xsl: Implement.
2899 * data/xslt/xml2xhtml.xsl: Implement.
2900
2901 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2902
2903 Accept --report-file=FILE to override the default `.output' filename.
2904 * NEWS (2.3a+): Mention.
2905 * doc/bison.texinfo (Bison Options): Add an entry.
2906 * src/files.c (compute_output_file_names): Don't override
2907 spec_verbose_file if already set.
2908 * src/getargs.c (usage): Document --report-file.
2909 (REPORT_FILE_OPTION): New anonymous enum member.
2910 (long_options): Add entry for it.
2911 (getargs): Add case for it setting spec_verbose_file.
2912
2913 * build-aux/cross-options.pl: Don't record a short option just because
2914 there's an arg.
2915 * doc/.cvsignore: Add yacc.1.
2916
2917 2007-11-14 Akim Demaille <akim@epita.fr>
2918
2919 * doc/yacc.1.in: New.
2920 * configure.ac, doc/Makefile.am: Adjust.
2921 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
2922 config.h symbol.
2923 Use AC_SUBST for assignments too.
2924 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
2925
2926 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2927
2928 * src/gram.c: Remove comments that duplicate comments in gram.h.
2929
2930 When reporting useless rules and nonterminals, say "useless in grammar"
2931 instead of "useless", and say "useless in parser" instead of "never
2932 reduced". Discussed starting at
2933 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
2934 * NEWS (2.3a+): Mention this change.
2935 * data/xslt/xml2text.xsl: Update output text and expected input XML
2936 element names to match changes below.
2937 * data/xslt/xml2xhtml.xsl: Likewise.
2938 (xsl:template match="bison-xml-report"): Add missing entry in Table of
2939 Contents: "Rules useless in parser due to conflicts".
2940 * doc/bison.texinfo (Decl Summary): Reword a little.
2941 (Understanding): Update example output for changes below.
2942 * src/gram.c: (rule_useful_p): Rename to...
2943 (rule_useful_in_grammar_p): ... this.
2944 (rule_useless_p): Rename to...
2945 (rule_useless_in_grammar_p): ... this.
2946 (rule_never_reduced_p): Rename to...
2947 (rule_useless_in_parser_p): ... this.
2948 (grammar_rules_print): Update for renames.
2949 (grammar_rules_print_xml): Update for renames.
2950 (grammar_rules_never_reduced_report): Rename to...
2951 (grammar_rules_useless_report): ... this since it is used for either
2952 kind of useless rule.
2953 * src/gram.h: Reword comments and update function names in prototypes.
2954 * src/main.c (main): Say "rule useless in parser due to conflicts".
2955 * src/print-xml.c (print_rules_never_reduced): Rename to...
2956 (print_rules_useless_in_parser): ... this, and rename output XML
2957 element "rules-never-reduced" to "rules-useless-in-parser".
2958 (print_xml): Update for rename.
2959 * src/print.c (print_results): Say "Rules useless in parser due to
2960 conflicts".
2961 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
2962 (nonterminals_reduce): Say "nonterminal useless in grammar".
2963 (reduce_output): Say "Nonterminals useless in grammar".
2964 Say "Rules useless in grammar".
2965 (reduce_xml): Rename output XML element "useless" to
2966 "useless-in-grammar".
2967 (reduce_print): Don't report the count of grammatically useless rules
2968 as "rules never reduced" just because %yacc is specified.
2969 In the correct report of this count, say nonterminal(s) and rule(s)
2970 "useless in grammar".
2971 * tests/conflicts.at (S/R in initial): Update expected output.
2972 (Defaulted Conflicted Reduction): Likewise.
2973 (Unreachable States After Conflict Resolution): Likewise.
2974 * tests/existing.at (GNU pic Grammar): Likewise.
2975 * tests/reduce.at (Useless Nonterminals): Likewise.
2976 (Useless Rules): Likewise.
2977 (Reduced Automaton): Likewise.
2978 (Underivable Rules): Likewise.
2979 (Empty Language): Likewise.
2980
2981 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2982
2983 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
2984 here document and before the EOF so that BSD's implementation of Bourne
2985 shell doesn't parse the delimiter as part of the here document.
2986 * doc/.cvsignore: Add cross-options.texi.
2987 * src/getargs.c (usage): Add a blank line after the warning categories.
2988
2989 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
2990
2991 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
2992
2993 2007-11-05 Akim Demaille <akim@epita.fr>
2994
2995 Remove Id: from bison.1.
2996 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
2997 (perl -0777 -pi -e 's/\.PP\nId): New.
2998 (.x.1): Use it to ignore the version control revision.
2999
3000 2007-11-05 Akim Demaille <demaille@gostai.com>
3001
3002 * build-aux/Makefile.am: Ship cross-options.pl.
3003 * doc/Makefile.am: Always refer to cross-options.texi with
3004 $(srcdir).
3005 (MAINTAINERCLEANFILES): Add it.
3006
3007 2007-11-04 Akim Demaille <demaille@gostai.com>
3008
3009 Generate the long/short option cross-table.
3010 * build-aux/cross-options.pl: New.
3011 * doc/Makefile.am (cross-options.texi): New.
3012 * doc/bison.texinfo: Use it.
3013
3014 2007-11-04 Akim Demaille <demaille@gostai.com>
3015
3016 Generate bison.1 using help2man.
3017 * doc/common.x, doc/bison.x: New.
3018 * doc/Makefile.am (bison.1, .x.1): New.
3019 The code is taken from autoconf-2.61/man/Makefile.am.
3020 * configure.ac: Look for help2man.
3021
3022 2007-11-04 Akim Demaille <demaille@gostai.com>
3023
3024 Complete --help.
3025 * src/getargs.c (usage): Document -W, make it clear that -d,
3026 -g and -x have optional arguments.
3027
3028 2007-11-04 Akim Demaille <demaille@gostai.com>
3029
3030 Find sha1sum when named gsha1sum.
3031 * bootstrap (find_tool): New.
3032 ($SHA1SUM): New.
3033
3034 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3035
3036 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3037 at
3038 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3039 * NEWS (2.3a+): Mention.
3040 * data/bison.m4 (b4_pure_if): Don't define it here.
3041 * data/c.m4 (b4_identification): Depend on individual skeletons to
3042 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3043 values of the %define variables api.pure or api.push_pull. Define
3044 YYPURE, YYPUSH, and YYPULL accordingly.
3045 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3046 glr.cc has already defined b4_pure_flag.
3047 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3048 Remove YYPUSH and YYPULL since they're back in b4_identification again.
3049 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
3050 * doc/bison.texinfo (Pure Decl): Update.
3051 (Push Decl): Update.
3052 (Decl Summary): Add api.pure to %define entry.
3053 In %pure-parser entry, say it's deprecated and reference %define.
3054 (Pure Calling): Update.
3055 (Error Reporting): Update.
3056 (C++ Scanner Interface): Update.
3057 (How Can I Reset the Parser): Update.
3058 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3059 reference %define.
3060 * src/getargs.c (pure_parser): Remove global variable.
3061 * src/getargs.h (pure_parser): Remove extern.
3062 * src/output.c (prepare): Don't define pure_flag muscle.
3063 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3064 wrapper around `%define api.pure'.
3065 * tests/calc.at (Simple LALR Calculator): Update.
3066 (Simple GLR Calculator): Update.
3067 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3068 Update.
3069 (GLR: Resolve ambiguity, pure, locations): Update.
3070 (GLR: Merge conflicting parses, pure, no locations): Update.
3071 (GLR: Merge conflicting parses, pure, locations): Update.
3072 * tests/glr-regression.at (Uninitialized location when reporting
3073 ambiguity): Update
3074 * tests/input.at (Unused %define api.pure): New test case.
3075 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3076 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3077 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3078
3079 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3080
3081 %define push_pull -> %define api.push_pull. Discussed starting at
3082 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3083 * data/push.c: Expect the new name.
3084 * data/yacc.c: Likewise.
3085 * doc/bison.texinfo (Push Decl): Update.
3086 (Decl Summary): Update %define entry.
3087 (Push Parser Function): Update.
3088 (Pull Parser Function): Update.
3089 (Parser Create Function): Update.
3090 (Parser Delete Function): Update.
3091 * tests/calc.at (Simple LALR Calculator): Update.
3092 * tests/input.at (%define enum variables): Update.
3093 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3094 (Push Parsing: Multiple impure instances): Update.
3095 (Push Parsing: Unsupported Skeletons): Update.
3096 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3097 (Exploding the Stack Size with Malloc): Update.
3098
3099 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3100 other entries some.
3101
3102 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3103
3104 For the XML output's terminal element, rename @number to @token-number,
3105 and add @symbol-number. In the nonterminal element, rename @number to
3106 @symbol-number. Discussed starting at
3107 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3108 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3109 renames.
3110 (xsl:template match="nonterminal"): Likewise.
3111 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3112 (xsl:template match="nonterminal"): Likewise.
3113 * src/print-xml.c (print_grammar): Implement.
3114
3115 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3116
3117 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3118 2007-10-11 change, the child elements here are items not rules.
3119 (xsl:template match="item"): New.
3120 (xsl:template match="rule"): Update for new reduced itemset.
3121 (xsl:template match="point"): Remove.
3122 (xsl:template match="empty"): For consistency with --graph, don't
3123 output "/* empty */".
3124 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3125 line-wrap, don't pass a negative value as first-line-length since this
3126 won't work with the following changes.
3127 (xsl:template name="line-wrap"): Simplify slightly.
3128 (xsl:template name="ws-search"): Eliminate recursion.
3129 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3130 set next to an item whose dot is not at the end of the RHS even if it
3131 happens to be associated with the same rule.
3132
3133 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3134
3135 Add %define lr.keep_unreachable_states.
3136 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3137 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3138 * src/main.c (main): Implement it.
3139 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3140 Extend to test it, and fix a typo.
3141
3142 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3143
3144 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
3145 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3146 the example .output text.
3147 * tests/regression.at (Extra lookahead sets in report): Improve wording
3148 of comments.
3149
3150 2007-10-17 Wojciech Polak <polak@gnu.org>
3151
3152 * src/print-xml.c (print_grammar): Renamed
3153 <terminal> and <nonterminal> attributes:
3154 "type" to "number" and "symbol" to "name".
3155 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3156 Use new attribute names.
3157 (xsl:template match="nonterminal"): Likewise.
3158 * data/xslt/xml2xhtml.xsl: Likewise.
3159
3160 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3161
3162 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3163 (Option Cross Key): Likewise.
3164
3165 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3166 next to an item whose dot is not at the end of the RHS even if it
3167 happens to be associated with the same rule.
3168 * src/print.c (print_core): Likewise.
3169 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3170 (Resolved SR Conflicts): Update output.
3171 * tests/regression.at (Extra lookahead sets in report): New test case.
3172
3173 2007-10-11 Wojciech Polak <polak@gnu.org>
3174
3175 * src/print-xml.c (print_core): Remove item set
3176 redundancy.
3177 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3178 Improve processing time. Suggested by Joel E. Denny.
3179 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3180 Write xsl:param "required" attribute as comment.
3181 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3182 (xsl:template match="rule"): Support new reduced itemset.
3183 (xsl:template match="point"): Remove.
3184 * data/xslt/xml2xhtml.xsl: Likewise.
3185
3186 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3187
3188 * src/getargs.c (version): Update copyright year.
3189
3190 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3191
3192 Make xml2dot.xsl and --graph produce the same output.
3193 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
3194 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3195 escaped later.
3196 (xsl:template name="output-node"): Use the new escape template instead
3197 of the string-replace template directly.
3198 (xsl:template name="output-edge"): Likewise.
3199 (xsl:template name="escape"): New, escapes backslashes and newlines in
3200 addition to quotation marks.
3201 * src/graphviz.c (start_graph, output_node, output_edge): Add
3202 whitespace to output for legibility.
3203
3204 Make xml2text.xsl and --report produce the same output, and remove the
3205 XML "conflicts" element since a conflict summary is easily extracted
3206 from the automaton.
3207 * data/xslt/bison.xsl: New.
3208 (xsl:template match="state" mode="bison:count-conflicts): New.
3209 * data/xslt/xml2text.xsl: Import bison.xsl.
3210 (xsl:template match="bison-xml-report"): Instead of styling the
3211 "conflicts" element, style the "automaton" element with mode
3212 "conflicts". Unlike the former, the latter lists S/R and R/R
3213 conflicts for a state on the same line.
3214 (xsl:template match="conflicts"): Remove.
3215 (xsl:template match="conflict"): Remove.
3216 (xsl:template match="terminal"): Line-wrap the list of rules in which
3217 the terminal is used.
3218 (xsl:template match="nonterminal"): Likewise for nonterminals.
3219 (xsl:template match="automaton" mode="conflicts"): New.
3220 (xsl:template match="state" mode="conflicts"): New.
3221 (xsl:template name="line-wrap"): New.
3222 (xsl:template name="ws-search"): New.
3223 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3224 (xsl:template match="bison-xml-report"): Instead of styling the
3225 "conflicts" element, style the "automaton" element with mode
3226 "conflicts."
3227 (xsl:template match="conflicts"): Remove.
3228 (xsl:template match="conflict"): Remove.
3229 (xsl:template match="automaton" mode="conflicts"): New.
3230 (xsl:template match="state" mode="conflicts): New.
3231 * src/conflicts.c (conflicts_output_xml): Remove.
3232 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3233 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3234 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3235 the corresponding XSLT is easier. Also, never wrap between a word and
3236 the comma that follows it.
3237
3238 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3239
3240 Improve C++ namespace support. Discussed starting at
3241 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3242 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3243 b4_namespace_close): New macros that interpret the %define variable
3244 "namespace" so its value can contain "::" to indicate nested
3245 namespaces.
3246 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3247 the above macros.
3248 * data/lalr1.cc (b4_namespace): Likewise.
3249 * data/location.cc (b4_namespace): Likewise.
3250 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3251 inside a new table in the general %define entry. Document `%define
3252 namespace' there as well. Point the %name-prefix entry to it since it
3253 explains it more completely in the case of C++.
3254 (C++ Bison Interface): Mention `%define namespace' instead of
3255 %name-prefix.
3256 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3257 entry suffices.
3258 * tests/c++.at (Relative namespace references): New test case.
3259 (Absolute namespace references): New test case.
3260 (Syntactically invalid namespace references): New test case.
3261 * tests/input.at (C++ namespace reference errors): New test case.
3262
3263 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3264
3265 Add syncline support and location accessor to internal %define
3266 interfaces.
3267 * data/bison.m4 (b4_percent_define_get_loc): New.
3268 (b4_percent_define_get_syncline): New.
3269 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3270 (b4_percent_define_default): Record defining location as line 1 rather
3271 than 0 for the sake of synchronizing #line's, and define
3272 b4_percent_define_syncline(VARIABLE).
3273 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3274 * src/muscle_tab.c (muscle_syncline_grow): New.
3275 (muscle_code_grow): Use muscle_syncline_grow.
3276 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3277 define b4_percent_define_syncline(VARIABLE).
3278 (muscle_percent_define_get_loc): New.
3279 (muscle_percent_define_get_syncline): New.
3280 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3281 remove some unused variables.
3282 (muscle_percent_define_default): Record defining location as line 1
3283 rather than 0 for the sake of synchronizing #line's, and define
3284 b4_percent_define_syncline(VARIABLE).
3285 (muscle_percent_define_check_values): Use
3286 muscle_percent_define_get_loc.
3287 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3288 (muscle_percent_define_get_syncline): Prototype.
3289 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3290 defaults): Update output for location change.
3291 (Complaining during macro argument expansion): Extend to test
3292 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3293
3294 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3295
3296 Fix some error-reporting macro bugs.
3297 * data/bison.m4 (b4_cat): New.
3298 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3299 to stdout so they don't become arguments to other macros. Update
3300 comments and add examples.
3301 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3302 add examples.
3303 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3304 after printing the error directive so that M4 doesn't report subsequent
3305 problems that are induced by this problem.
3306 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3307 instead of just in them. Recognize @\n in both places. Both expand to
3308 the empty string. Needed by b4_cat.
3309 * tests/skeletons.at (Complaining during macro argument expansion):
3310 New test case.
3311 (Fatal errors make M4 exit immediately): New test case.
3312
3313 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3314
3315 Implement --print-datadir.
3316 * src/getargs.c (usage): Mention.
3317 (PRINT_DATADIR_OPTION): New anonymous enum member.
3318 (long_options): Add entry for it.
3319 (getargs): Add case for it calling compute_pkgdatadir.
3320 * src/output.c (output_skeleton): Encapsulate data directory
3321 computation from here...
3322 (prepare): ... and from here...
3323 (compute_pkgdatadir): ... into this new function.
3324 * src/output.h (compute_pkgdatadir): Prototype.
3325
3326 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3327
3328 * src/print-xml.c (escape_bufs): New static global variable
3329 replacing...
3330 (xml_escape_n): ... the static local variable buf here.
3331 (print_xml): Free memory for escape_bufs.
3332 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3333
3334 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3335
3336 Replace `%push-parser' and `%push-pull-parser' with
3337 `%define push_pull "push"' and `%define push_pull "both"'.
3338 `%define push_pull "pull"' is the default.
3339 * doc/bison.texinfo (Push Decl, Push Parser Function,
3340 Pull Parser Function, Parser Create Function, Parser Delete Function):
3341 Update declarations.
3342 (Decl Summary, Table of Symbols): Replace %push-parser and
3343 %push-pull-parser entries with a %define push_pull entry.
3344 * data/bison.m4 (b4_percent_define_check_values): New macro.
3345 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3346 definitions...
3347 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3348 definitions...
3349 * data/push.c: ... to here and compute them from the value of the
3350 %define variable push_pull.
3351 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3352 parsing requests here...
3353 * data/yacc.c: ... hack this to switch to push.c any time
3354 b4_use_push_pull_flag or the %define variable push_pull is set. This
3355 will go away when we mv push.c yacc.c.
3356 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3357 push parsing is not supported since unused %define variables are
3358 reported anyway.
3359 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3360 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3361 comments for consistency with b4_percent_define_check_values.
3362 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3363 muscles.
3364 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3365 Remove.
3366 (prologue_declaration): Remove %push-parser and %push-pull-parser
3367 rules.
3368 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3369 * tests/calc.at: Update declarations.
3370 * tests/input.at (%define enum variables): New test case.
3371 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3372 declaration.
3373 (Push Parsing: Multiple impure instances): Update declaration.
3374 (Push Parsing: Unsupported Skeletons): New test case.
3375 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3376 declaration.
3377 (Exploding the Stack Size with Malloc): Update declaration.
3378
3379 2007-09-24 Wojciech Polak <polak@gnu.org>
3380
3381 Add XSLT transformations.
3382
3383 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3384 * data/xslt/xml2text.xsl: Transform XML into plain text.
3385 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3386 * data/Makefile.am (xsltdir): New variable.
3387 (dist_xslt_DATA): Add xslt/*.xsl files.
3388
3389 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3390
3391 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3392 Problem reported by Wojciech Polak.
3393 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3394 (xml_printf): Undo change I made on 21 September; that is,
3395 indent 2 spaces, not 1.
3396
3397 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3398
3399 Pacify ./configure --enable-gcc-warnings.
3400 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3401 `char const *' instead of `char *'.
3402 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3403 local variable `sep'.
3404
3405 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3406
3407 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3408 elsewhere.
3409 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3410 (xml_printf): Indent just 1 space for level.
3411 (e_char, xlate_char): Remove.
3412 (xml_escape_string): Rewrite to avoid undefined behavior (used
3413 storage that was freed from the stack).
3414 (xml_escape_n): Don't bother checking for subscript error.
3415
3416 2007-09-21 Wojciech Polak <polak@gnu.org>
3417
3418 Add Bison XML Automaton Report.
3419
3420 Add support for an -x option to generate an XML report.
3421 It is not documented yet.
3422 * src/print-xml.c: New file.
3423 * src/print-xml.h: Likewise.
3424 * lib/timevar.def (TV_XML): New var.
3425 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3426 * src/conflicts.c: Include print-xml.h.
3427 (solved_conflicts_xml_obstack): New var.
3428 (log_resolution, conflicts_solve, conflicts_free):
3429 Add support for XML report.
3430 (conflicts_output_val): New function.
3431 * src/conflicts.h (conflicts_output_val): New decl.
3432 * src/files.c (spec_xml_file): New var.
3433 (compute_output_file_names, output_file_names_free): Add XML support.
3434 * src/files.h (spec_xml_file): New decl.
3435 * src/getargs.c (xml_flag): New var.
3436 (usage, short_options, long_options, getargs): Add XML support.
3437 * src/getargs.h (xml_flag): New decl.
3438 * src/gram.c: Include print-xml.h.
3439 (rule_lhs_print_xml, rule_rhs_print_xml):
3440 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3441 New functions.
3442 * src/gram.h: Declare external ones.
3443 * src/main.c: Include print-xml.h.
3444 (main): Add XML support.
3445 * src/reduce.c: Include print-xml.h.
3446 (reduce_xml): New function.
3447 * src/reduce.h: Declare it.
3448 * src/state.c: Include print-xml.h.
3449 (state_new): Add XML support.
3450 (state_rule_lookahead_tokens_print_xml): New function.
3451 * src/state.h: Declare it.
3452 (struct state): New member solved_conflicts_xml.
3453 * src/symtab.c (symbol_class_get_string): New function.
3454 * src/symtab.h: Declare it.
3455
3456 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3457
3458 * GNUmakefile: Switch to coreutils's version.
3459 * bootstrap: Likewise.
3460 * Makefile.cfg: Adjust to new GNUmakefile.
3461 * README-hacking: Likewise.
3462
3463 Import from gnulib:
3464
3465 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3466 Bruno Haible <bruno@clisp.org>
3467
3468 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3469 and is a script that invokes bison. Tighten the code. Add comments.
3470
3471 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3472
3473 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3474 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3475 * doc/bison.texinfo (Decl Summary): Fix.
3476 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3477 * tests/input.at (Boolean %define variables): Update output.
3478 * tests/skeletons.at (%define boolean variables: invalid skeleton
3479 defaults): Rename to...
3480 (%define Boolean variables: invalid skeleton defaults): ... this and
3481 update output.
3482
3483 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3484
3485 In impure push mode, don't allow more than one yypstate to be allocated
3486 since multiple impure parsers would corrupt yynerrs.
3487 * data/push.c (yypstate_allocated): New static global variable
3488 initialized to 0.
3489 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3490 exhaustion if yypstate_allocated is 1, but still return 2.
3491 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3492 already 1. Otherwise, set it to 1.
3493 (yypstate_delete): Set it to 0.
3494 * tests/push.at (Push Parsing: Multiple impure instances): New test
3495 case.
3496
3497 2007-08-17 Bob Rossi <bob@brasko.net>
3498
3499 * doc/bison.texinfo (Push Decl): Document the push parser.
3500 (Table of Symbols): Ditto.
3501 (Pure Decl): Ditto.
3502 (Decl Summary): Ditto.
3503 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3504 Parser Create Function, Parser Delete Function):
3505 Add new push parser symbols.
3506 (Table of Symbols): Document push-parser, push-pull-parser,
3507 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3508
3509 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3510
3511 Update to GPLv3.
3512 * doc/gpl-3.0.texi: New file.
3513 * doc/gpl.texi: Remove.
3514 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3515 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3516 * README-hacking, TODO, bootstrap, bootstrap.conf:
3517 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3518 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3519 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3520 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3521 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3522 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3523 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3524 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3525 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3526 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3527 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3528 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3529 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3530 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3531 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3532 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3533 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3534 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3535 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3536 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3537 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3538 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3539 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3540 * src/complain.c, src/complain.h, src/conflicts.c:
3541 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3542 * src/files.h, src/flex-scanner.h, src/getargs.c:
3543 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3544 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3545 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3546 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3547 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3548 * src/print.c, src/print.h, src/print_graph.c:
3549 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3550 * src/reduce.h, src/relation.c, src/relation.h:
3551 * src/revision.h, src/scan-code.h, src/scan-code.l:
3552 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3553 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3554 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3555 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3556 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3557 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3558 * tests/existing.at, tests/glr-regression.at:
3559 * tests/headers.at, tests/input.at, tests/java.at:
3560 * tests/local.at, tests/output.at, tests/push.at:
3561 * tests/reduce.at, tests/regression.at, tests/sets.at:
3562 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3563 * tests/torture.at:
3564 Update to GPLv3.
3565
3566 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3567
3568 Get rid of broken %no-parser, -n, and --no-parser implementation and
3569 documentation.
3570 * TODO: Don't mention them.
3571 * doc/bison.1: Likewise.
3572 * doc/bison.texinfo (Decl Summary): Likewise.
3573 (Bison Options): Likewise.
3574 (Option Cross Key): Likewise.
3575 * src/getargs.c (no_parser_flag): Remove global variable.
3576 (usage): Don't print description of -n and --no-parser.
3577 (long_options): Remove --no-parser entry here.
3578 (getargs): Remove -n case in the switch here.
3579 * src/getargs.h (no_parser_flag): Remove extern.
3580 * tests/regression.at (Web2c Actions): Remove comment that mentions
3581 --no-parser.
3582
3583 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3584
3585 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3586 name user variables starting with `yy'. Just pass NULL instead of a
3587 dummy local &yylval to yypush_parse.
3588 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3589 starting with `yy'.
3590
3591 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3592
3593 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3594 true since it's then always used regardless of whether yyoverflow is
3595 defined. Reported by Christian Burger at
3596 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3597 * THANKS: Add Christian Burger.
3598
3599 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3600 node names: say "Decl Summary" not "Bison Declaration Summary".
3601
3602 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3603
3604 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3605 determine whether this function has already complained about an invalid
3606 value for a %define boolean variable, don't check whether Bison has
3607 ever examined the value. As written, the check was a tautology.
3608 Instead, record and check for this complaint using a separate muscle.
3609
3610 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3611
3612 Fix push parsing memory leak reported by Brandon Lucia at
3613 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3614 * THANKS: Add Brandon Lucia.
3615 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3616 but the parse never completed and thus freed it.
3617 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3618 * tests/testsuite.at: Include push.at.
3619 * test/push.at: New.
3620 (Push Parsing: Memory Leak for Early Deletion): New test case.
3621
3622 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3623
3624 Improve handling of multiple S/R conflicts in the same state and of S/R
3625 conflicts involving multiple reductions.
3626 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3627 set for a state here or Bison will abort if it is reassigned on a
3628 later conflicted reduction in the same state.
3629 Similarly, don't finalize and assign the solved conflicts report here
3630 or it will be lost if it is reassigned on a later conflicted reduction
3631 in the same state.
3632 (set_conflicts): Instead, assign them both here after all S/R conflicts
3633 in the state have been fully examined.
3634 * src/print.c (shift_set): Rename to...
3635 (no_reduce_set): ... this.
3636 (print_reductions): Update for rename, and add %nonassoc error action
3637 tokens to no_reduce_set so that, when printing the first remaining
3638 reduction on an error action token, the reduction is enclosed in
3639 brackets.
3640 (print_results): Update for rename.
3641 * tests/conflicts.at (Solved conflicts report for multiple reductions
3642 in a state): New test case.
3643 (%nonassoc error actions for multiple reductions in a state): New test
3644 case.
3645
3646 * src/main.c (main): Don't depend on C99 features.
3647
3648 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3649
3650 * build-aux/.cvsignore: Add compile.
3651 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
3652 uniwidth.
3653
3654 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
3655
3656 * bootstrap (slurp): Create target directories that don't exist.
3657 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
3658
3659 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3660
3661 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
3662 than item number.
3663 * closure.c (closure): Likewise.
3664 * state.h (reductions): Comment sorting of rules.
3665 (state): Comment sorting of items.
3666
3667 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
3668
3669 Fix C++ test cases after recent Gnulib changes. Discussed starting at
3670 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
3671 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
3672 definition in order to avoid Gnulib headers since we don't use config.h
3673 here.
3674 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
3675 rather than AT_DATA so that config.h is included.
3676
3677 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
3678
3679 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
3680 instead of fprintf. Guard these functions with #if YYDEBUG instead of
3681 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
3682 and so that YYFPRINTF is guaranteed to be defined here.
3683
3684 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3685
3686 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
3687 with...
3688 (muscle_percent_define_check_values): ... this more helpful function.
3689 Again, it's not used yet, but it will be.
3690 * src/muscle_tab.h: Likewise.
3691
3692 Improve some comments in parser table construction.
3693 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
3694 (generate_states): Don't mention ruleset, which is internal to closure.
3695 * src/closure.c (closure): Explain sorting of core and itemset, which
3696 is required for this function to behave correctly.
3697 * src/closure.h (closure): Mention sorting.
3698
3699 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
3700
3701 * src/lalr.c (state_lookahead_tokens_count): For code readability,
3702 move the check for disabled transitions to an aver since conflict
3703 resolution hasn't happened yet.
3704
3705 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
3706 labels a state as inconsistent just because it has error transitions.
3707 The original form of this check appeared in revision 1.1 of lalr.c,
3708 which was committed on 1991-12-21. Now (at least), changing the
3709 consistency label on such a state appears to have no useful effect in
3710 any of the places it is examined, which I enumerate below. The key
3711 point to understanding each item in this enumeration is that a state
3712 with an error transition is labelled consistent in the first place only
3713 if it has no rules, so the check cannot matter for states that have
3714 rules. (1) Labelling a state as inconsistent will cause set_conflicts
3715 to try to identify its conflicts, and a state must have *rules* to have
3716 conflicts. (2) Labelling a state as inconsistent will affect how
3717 action_row sets the default *rule* for the state. (3) Labelling a
3718 state as inconsistent will cause build_relations to add lookback edges
3719 to *rules* in that state.
3720 * src/state.h (struct state): Word the comment for member consistent
3721 more carefully.
3722
3723 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3724
3725 Don't depend on C99 features.
3726 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
3727 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
3728 * src/reader.c (check_and_convert_grammar): Fix for-loop.
3729 * src/state.c (state_mark_reachable_states): Fix for-loop.
3730 (state_remove_unreachable_states): Fix for-loop.
3731
3732 Don't widen struct state with member reachable just to temporarily
3733 record reachability. Instead, use a local bitset.
3734 * src/state.h (struct state): Remove member.
3735 * src/state.c (state_new): Don't initialize it.
3736 (state_mark_reachable_states): Rename to...
3737 (state_record_reachable_states): ... this, and use bitset.
3738 (state_remove_unreachable_states): Use bitset.
3739
3740 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
3741
3742 * src/Makefile.am (yacc): Quote target action commands properly so
3743 that the yacc script isn't corrupt. Reported by Hans Aberg at
3744 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
3745
3746 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
3747 the case of pure parsers. Reported by Frans Englich at
3748 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
3749 * THANKS: Add Frans Englich.
3750
3751 * NEWS (2.3a+): In the %code entry, reference section `Bison
3752 Declaration Summary' from the manual now since the %code summary has
3753 moved there.
3754 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
3755 in the rules section must be terminated by semicolons.
3756
3757 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
3758
3759 Extend the front-end API for %define variables to more completely
3760 mirror the back-end. This will be useful in the future.
3761 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
3762 Update comments to mention the new front-end counterparts of these
3763 macros.
3764 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
3765 for muscle_string_decode and muscle_location_decode.
3766 (muscle_string_decode): New static function.
3767 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
3768 (muscle_percent_define_get, muscle_percent_define_ifdef): New
3769 functions.
3770 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
3771 muscle_percent_define_get to mimic the b4_percent_define_flag_if
3772 implementation more closely.
3773 (muscle_percent_define_invalid_value): New function.
3774 * src/muscle_tab.h (muscle_percent_define_get,
3775 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
3776 Prototype.
3777
3778 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3779
3780 * NEWS (2.3a+): Mention yesterday's state-removal change.
3781 (2.3a): Remove the %language entry, which was added after 2.3a.
3782 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
3783 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
3784 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
3785 tests/existing.at: Update copyright date.
3786
3787 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3788
3789 If conflict resolution makes states unreachable, remove those states,
3790 report rules that are then unused, and don't report conflicts in those
3791 states.
3792 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
3793 New global function.
3794 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
3795 function.
3796 * src/main.c (main): After conflict resolution, remove the unreachable
3797 states and update all data structures that reference states by number.
3798 * src/state.c (state_new): Initialize each state's reachable member to
3799 false.
3800 (state_mark_reachable_states): New static function.
3801 (state_remove_unreachable_states): New global function.
3802 * src/state.h (struct state): Add member bool reachable.
3803 (state_remove_unreachable_states): Prototype.
3804 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3805 New test case.
3806 * tests/existing.at (GNU pic Grammar): Update test case output now that
3807 an unused rule is discovered.
3808
3809 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3810
3811 Minor code cleanup in parser table construction.
3812 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
3813 (new_itemsets, save_reductions): Update for rename to nitemset.
3814 * src/closure.c (nritemset): Rename to...
3815 (nitemset): ... this since the "r" appears to meaningless and isn't
3816 used in the comments.
3817 (closure): Update for rename.
3818 * src/closure.h (nritemset): Update extern to...
3819 (nitemset): ... this.
3820 * src/lalr.c (LA): Fix a typo in comments.
3821 * src/print.c (print_core): Update for rename to nitemset.
3822 * src/print_graph.c (print_graph): Likewise.
3823 * src/state.h: Fix some typos in header comments.
3824
3825 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
3826
3827 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
3828 still sticks to ASCII. Sorry!
3829
3830 * README-hacking: New file, taken mostly from coreutils, with changes
3831 for Bison. Contains much of the contents of:
3832 * README-cvs: Remove.
3833 * bootstrap: Sync from gnulib.
3834 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
3835 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
3836
3837 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
3838
3839 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
3840 Setzer.
3841 (Java Differences): Fix some typos.
3842 * THANKS: Add Sebastian Setzer.
3843
3844 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
3845
3846 * data/java.m4 (b4_single_class_if): Remove.
3847 (b4_abstract_if): Look at "%define abstract".
3848 (b4_lexer_if): New.
3849 (b4_union_name): Rename...
3850 (b4_yystype): ... to this. Map to "%define stype".
3851 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
3852 b4_maybe_throws): Fix quoting.
3853 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
3854 * data/lalr1.java (Lexer interface): Always define.
3855 (Lexer interface within parser class): Remove.
3856 (YYLexer class): New, used when "%code lexer" is present.
3857 (constructor): When "%code lexer" is used, pass %lex-param
3858 to the lexer constructor.
3859 (yylex, yyparse): Remove %lex-param from method invocations
3860 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
3861
3862 * doc/bison.texinfo (Java Bison Interface): Mention "%define
3863 abstract". Rename "%define union_name" to "%define stype".
3864 Rename method names according to previous patch.
3865 (Java Scanner Interface): Describe "%code lexer" instead of
3866 "%pure-parser" and "%define single_class".
3867 (Java Differences): Mention "%code lexer".
3868
3869 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
3870 Include scanner here, using macros from tests/local.at.
3871 (AT_DATA_CALC_Y): Remove final argument.
3872 (_AT_CHECK_JAVA_CALC): Likewise.
3873 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
3874 of %locations and %error-verbose.
3875 (main): Test with and without %lex-param.
3876 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
3877 (AT_BISON_OPTION_POPDEFS): Pop it.
3878
3879 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3880
3881 DJGPP spefic issue. Inhibit the use of disallowed characters for
3882 file name genertion on Win98, WinXP, etc. These are |<>":?*\
3883 and concern testsuite case 46.
3884 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
3885 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
3886 * djgpp/config.bat: Inhibit the use of disallowed characters.
3887
3888 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3889
3890 Miscellaneous %define and %code cleanup.
3891 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
3892 values are interpreted.
3893 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
3894 documentation a little more.
3895 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
3896 muscle_percent_define_insert, muscle_percent_code_grow): New
3897 functions/macros.
3898 * src/muscle_tab.h (muscle_percent_define_insert,
3899 muscle_percent_code_grow): Prototype.
3900 * src/parse-gram.y (prologue_declaration): Use
3901 muscle_percent_define_insert and muscle_percent_code_grow when parsing
3902 %define and %code directives.
3903
3904 Make it easy to share %define boolean variables between the front-end
3905 and back-end. Though not used yet, this will be useful in the future.
3906 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
3907 Bison uses of names rather than just skeleton uses of names.
3908 (b4_percent_define_get, b4_percent_define_ifdef): Rename
3909 b4_percent_define_skeleton_variables(VARIABLE) to
3910 b4_percent_define_bison_variables(VARIABLE).
3911 (b4_percent_code_get, b4_percent_code_ifdef): Rename
3912 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
3913 b4_percent_code_bison_qualifiers(QUALIFIER).
3914 (b4_check_user_names_wrap): Update for renames.
3915 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
3916 muscle_percent_define_default): New functions mimicking
3917 b4_percent_define_flag_if and b4_percent_define_default.
3918
3919 For %define variables, report locations for invalid values and
3920 redefinitions.
3921 * data/bison.m4 (b4_percent_define_flag_if): Read
3922 b4_percent_define_loc(VARIABLE) to report the location of an invalid
3923 value for VARIABLE.
3924 (b4_percent_define_default): Save a special location in
3925 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
3926 must later be reported as invalid.
3927 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
3928 functions.
3929 (muscle_percent_define_insert): Record the location of VARIABLE in
3930 muscle percent_define_loc(VARIABLE), and use it to report the previous
3931 location for a redefinition.
3932 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
3933 (muscle_percent_define_default): Update like b4_percent_define_default.
3934 (muscle_grow_user_name_list): Rename to...
3935 (muscle_user_name_list_grow): ... this for consistency and use
3936 muscle_location_grow.
3937 * src/muscle_tab.h (muscle_location_grow): Prototype.
3938 * tests/input.at (%define errors): Update expected output.
3939 * tests/skeletons.at (%define boolean variables: invalid skeleton
3940 defaults): New test case.
3941
3942 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
3943
3944 * src/print.c (lookahead_set, state_default_rule): Remove.
3945 (print_reductions): Replace state_default_rule invocation with
3946 equivalent use of yydefact, which was computed in token_actions in
3947 tables.c.
3948 (print_results): Don't allocate lookahead_set.
3949
3950 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
3951
3952 * data/lalr1.java: Prefix all private members with yy.
3953
3954 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
3955
3956 Use YYFPRINTF instead of fprintf where appropriate. Reported by
3957 Sebastien Fricker at
3958 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
3959 * THANKS: Add Sebastien Fricker.
3960 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
3961 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
3962 accept a variable number of arguments.
3963
3964 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3965
3966 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
3967
3968 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3969
3970 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
3971 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
3972 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
3973
3974 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
3975
3976 Undo my 2007-02-07 change, switching back to the c-strcase module
3977 introduced in the 2007-02-03 change. Bruno Haible reported that
3978 the 2007-02-07 change would be dangerous in Turkish if we add a
3979 language whose name contains "i", since "i" is not lowercase "I"
3980 in Turkish.
3981 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
3982 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
3983 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
3984 * m4/.cvsignore: Remove strcase.m4.
3985 * src/getargs.c: Revert 2007-02-07 change, as follows.
3986 Include c-strcase.h.
3987 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
3988
3989 2007-02-11 Bruno Haible <bruno@clisp.org>
3990
3991 Enable the Java related testsuite tests when the only Java compiler
3992 found is a gcj < 4.3. Discussed at
3993 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
3994 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
3995
3996 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
3997
3998 * data/Makefile.am: Update copyright date.
3999 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4000 yypstate_new returns NULL.
4001 (yypstate_new): Return NULL if malloc does.
4002 * src/reader.c (packgram): Move translation of rule actions from the
4003 beginning of packgram to...
4004 (check_and_convert_grammar): ... here right before packgram is invoked
4005 so it's easier to write more complete comments, and remove redundant
4006 code.
4007
4008 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4009
4010 As in semantic actions, make @$ in %initial-action, %destructor, and
4011 %printer imply %locations.
4012 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4013 scanning @$.
4014 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4015 (@$ in %initial-action implies %locations,
4016 @$ in %destructor implies %locations,
4017 @$ in %printer implies %locations): ... these new test cases.
4018
4019 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4020
4021 Undo most of the 2007-02-03 change, switching to the strcase module
4022 now that gnulib strcase has been fixed.
4023 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4024 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4025 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4026 * m4/.cvsignore: Add strcase.m4.
4027 * src/getargs.c: Revert 2007-02-03 change, as follows.
4028 Don't include c-strcase.h.
4029 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4030 strcasecmp has "unspecified behavior" outside the POSIX locale,
4031 but it works fine in practice if at least one argument is ASCII,
4032 as is the case in Bison.
4033
4034 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
4035
4036 * tests/java.at: Skip tests if only one of javac/java is present.
4037 Reported by Joel E. Denny.
4038 * tests/atlocal.in: Adjust copyright years.
4039
4040 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
4041
4042 * data/lalr1.java (Stack): Work around old verifiers that disallow
4043 access to the private fields of an inner class, from the outer class.
4044 We can make Stack's fields public because user code doesn't have access
4045 to the instance of Stack used by parse(). Reported by Paul Eggert.
4046
4047 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4048
4049 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4050 the right spot for these files?
4051 * bootstrap.conf (gnulib_modules): Add c-strcase.
4052 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4053 c-strncasecmp.c.
4054 * src/getargs.c: Include c-strcase.h.
4055 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4056 to avoid unspecified behavior.
4057
4058 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4059
4060 * doc/bison.texinfo (Decl Summary): Correct typo.
4061
4062 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
4063
4064 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4065 Complain if the value does not match empty, "true" or "false".
4066 * data/c++.m4: Adjust default definitions of %define variables.
4067 * data/java.m4: Adjust default definitions of %define variables.
4068 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4069 to above behavior.
4070 * tests/input.at (Boolean %define variables): Test new behavior.
4071
4072 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
4073
4074 * NEWS: Mention java.
4075 * TODO: Remove things that are done.
4076 * bootstrap.conf: Add javacomp-script and javaexec-script.
4077 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4078
4079 * data/Makefile.am: Add new files.
4080 * data/java-skel.m4: New.
4081 * data/java.m4: New.
4082 * data/lalr1.java: New.
4083
4084 * doc/bison.texinfo: Put "A Complete C++ Example" under
4085 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4086 under Other Languages.
4087
4088 * src/getargs.c (valid_languages): Add Java.
4089 * src/getargs.h (struct bison_language): Update size of string fields.
4090
4091 * tests/Makefile.am: Add java.at.
4092 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4093 * tests/java.at: New.
4094 * tests/testsuite.at: Include it.
4095
4096 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4097
4098 Clean up.
4099 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4100 at_directive_argv arguments so these no longer have to be global
4101 variables. Also, update the implementation for the following changes.
4102 (fail_for_at_directive_too_many_args,
4103 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4104 (at_directive_name): Remove as at_directive_argv[0] will be used for
4105 this now.
4106 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4107 for the directive name.
4108 (at_directive_argc, at_directive_argv): Make these local within
4109 skel_lex instead of global.
4110 (INITIAL): Update directive start action for above changes.
4111 (SC_AT_DIRECTIVE_ARG): Rename to...
4112 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4113 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4114 (scan_skel): Move yylex_destroy to...
4115 (skel_scanner_free): ... here.
4116 * tests/skeletons.at (installed skeleton file name): Rename to...
4117 (installed skeleton file names): ... this.
4118
4119 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4120
4121 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4122 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4123 Summary" not "Directives".
4124 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4125 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4126 since the former is now the more complete one.
4127 (Prologue Alternatives): Likewise and do the same for %defines.
4128 (Table of Symbols): Add summary of %code, add summary of %define, and
4129 move full %code documentation to...
4130 (Decl Summary): ... here for consistency with other entries in these
4131 sections.
4132 Move %define entry in order to keep this list alphabetized.
4133 Reword %define entry a little to put less emphasis on the skeleton
4134 concept, which most users shouldn't have to think about.
4135
4136 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4137
4138 Adjust to recent gnulib changes.
4139 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4140 Add string.h, string_.h, unistd_.h, wchar_.h.
4141 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4142 * src/system.h: Don't include <stpcpy.h>; this is now done by
4143 <string.h>.
4144
4145 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
4146
4147 Simplify implementation of unqualified %code, implement macros for
4148 uniform treatment of boolean %define flags. Document %define.
4149 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4150 b4_percent_code_ifdef): New.
4151 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4152 * data/c++.m4: Define default value for global_tokens_and_yystype.
4153 * data/glr.cc: Likewise.
4154 * data/location.cc: Use b4_percent_define_flag_if.
4155
4156 * doc/bison.texinfo (Decl Summary): Document %define.
4157
4158 * src/parse-gram.y (Unqualified %code): Change muscle name to
4159 b4_percent_code().
4160 (content.opt): Default to empty.
4161
4162 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4163
4164 Implement support for relative and absolute skeleton file names.
4165 Discussed starting at
4166 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4167 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4168 (Bison Options): Document in --skeleton entry.
4169 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4170 full_skeleton can't necessarily hold all of pkgdatadir.
4171 If the specified skeleton file name contains a `/', don't prepend
4172 pkgdatadir.
4173 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4174 file name contains a `/', prepend the grammar file directory.
4175 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4176 * skeletons.at: New file.
4177 (relative skeleton file names): New test case.
4178 (installed skeleton file names): New test case.
4179 * tests/testsuite.at: Include skeletons.at.
4180
4181 * bootstrap: Update copyright to 2007.
4182
4183 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
4184
4185 * bootstrap: Remove occurrences of .#bootmp from the files.
4186
4187 2007-01-17 Akim Demaille <akim@epita.fr>
4188
4189 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4190 nonterminals.
4191 Use per-type %printer.
4192
4193 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4194
4195 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4196 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4197 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4198 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4199 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4200 tests/glr-regression.at, tests/input.at, tests/local.at,
4201 tests/output.at, tests/torture.at: Update copyright to 2007.
4202
4203 2007-01-16 Akim Demaille <akim@epita.fr>
4204
4205 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4206 error code.
4207 (Calc++ Scanner): Exit with failure if we can't open the input
4208 file.
4209 Accept "-" standing for stdin.
4210 (Calc++ Top Level): Print the result only if the parsing was
4211 successful.
4212
4213 2007-01-16 Akim Demaille <akim@epita.fr>
4214
4215 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4216
4217 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
4218 and Joel E. Denny <jdenny@ces.clemson.edu>
4219
4220 Clean up %define and %code implementation in M4 some. Most
4221 importantly, rename all related macros to be in the b4_percent_define
4222 and b4_percent_code namespaces. Also, complete support for `.' in
4223 %define variable names and %code qualifiers.
4224 * data/bison.m4 (b4_check_user_names): Check for special
4225 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4226 m4_foreach loops.
4227 (b4_get_percent_define, b4_get_percent_code): Rename to...
4228 (b4_percent_define_get, b4_percent_code_get): ... these.
4229 Extend documentation with examples.
4230 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4231 b4_percent_define_skeleton_variables and
4232 b4_percent_code_skeleton_qualifiers.
4233 Expect any value for the %define variable `foo' to be stored in the
4234 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4235 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4236 expect any unqualified %code blocks to be stored in a macro named
4237 `b4_percent_code_unqualified'.
4238 Use m4_indir so that %define variable names and %code qualifiers can
4239 contain `.', which is allowed by the grammar parser.
4240 (b4_percent_define_default): New macro to set a default value for a
4241 %define variable.
4242 (m4_wrap): Update wrapped code, and fix some underquoting.
4243 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4244 Expect grammar uses of %define variables and %code qualifiers to be
4245 defined in b4_percent_define_user_variables and
4246 b4_percent_code_user_qualifiers.
4247 * data/c++.m4: Use b4_percent_define_default rather than
4248 m4_define_default. Fix some underquoting. Skeleton usage of %define
4249 variable define_location_comparison now implies skeleton usage of
4250 %define variable filename_type.
4251 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4252 data/push.c, data/yacc.c: Update macro names.
4253 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4254 muscle names.
4255
4256 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4257
4258 DJGPP specific issues.
4259
4260 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4261 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4262
4263 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4264
4265 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4266 run parsers in all tests so that Valgrind is invoked during
4267 maintainer-check-valgrind.
4268 (Duplicate representation of merged trees): Free all semantic values.
4269 (Duplicated user destructor for lookahead): Likewise.
4270
4271 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4272
4273 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4274 command-line prefix.
4275 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4276 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4277 miss Valgrind messages.
4278 (Exploding the Stack Size with Malloc): Likewise.
4279
4280 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4281
4282 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4283 locals. Reported by Juan Manuel Guerrero at
4284 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4285 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4286 Fix some indentation also.
4287 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4288 explaining this issue.
4289
4290 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
4291 and Joel E. Denny <jdenny@ces.clemson.edu>
4292
4293 Simplify union and prologue handling, and escape union and lex/parse
4294 params with digraphs.
4295 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4296 values to the empty string since these are no longer guaranteed
4297 initialized by the front-end.
4298 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4299 braces around b4_user_stype since this is no longer done by the
4300 front-end.
4301 * src/files.c, src/files.h (pre_prologue_obstack,
4302 post_prologue_obstack): Remove.
4303 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4304 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4305 with digraphs. This fixes lex params and parse params.
4306 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4307 * src/output.c (prepare): Remove muscle insertion of the prologues.
4308 (output): Remove freeing of pre_prologue_obstack and
4309 post_prologue_obstack.
4310 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4311 than prologue_augment for prologue parsing so you don't need prologue
4312 obstacks.
4313 (grammar_declaration): For %union RHS, use `braceless' instead of
4314 "{...}" so that braces are already stripped and code is escaped with
4315 digraphs.
4316 * src/reader.c (prologue_augment): Remove.
4317 (reader): Remove initialization of pre_prologue_obstack and
4318 post_prologue_obstack.
4319 * src/reader.h (prologue_augment): Remove.
4320
4321 * data/c.m4: Remove stray parenthesis.
4322
4323 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4324
4325 Remove quotes from variables names in %define directives and from
4326 qualifiers in %code directives, and restrict the characters that are
4327 allowed in them to M4-friendly ones. For %define, continue to support
4328 the quoted form as a deprecated feature. Discussed starting at
4329 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4330 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4331 %code.
4332 * doc/bison.texinfo (Prologue Alternatives): Update.
4333 (Decl Summary): In %defines entry, update mention of `%code requires'
4334 and `%code provides'.
4335 (C++ Location Values): Update %define uses.
4336 (Calc++ Parser Interface): Likewise.
4337 (Calc++ Parser): Likewise, and update `%code requires' uses.
4338 (Table of Symbols): Update %code documentation.
4339 * src/parse-gram.y (prologue_declaration): For %define variables, use
4340 `variable' instead of `STRING'.
4341 (grammar_declaration): For %code qualifiers, use `ID' instead of
4342 `STRING'.
4343 (variable): New nonterminal that takes an `ID' or a `STRING'.
4344 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4345 and %define uses.
4346 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4347 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4348 (%define errors): Update %define uses.
4349
4350 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4351
4352 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4353 instead of muscle_insert for %define values so that M4-special
4354 characters are replaced with digraphs.
4355 * tests/input.at (%define errors): Extend to check weird values.
4356
4357 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4358
4359 Instead of having skeletons declare all valid %define variables and
4360 %code qualifiers, provide macros that retrieve the associated values
4361 and build these lists automatically. Thus Bison will now warn when a
4362 variable or qualifier is not used by the skeleton in the current
4363 invocation regardless of whether it might sometimes be used by that
4364 skeleton in other invocations. Also, move all %define value macros to
4365 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4366 form, which is replaced by %code.
4367 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4368 (b4_check_user_names): ... this, and change the series of valid name
4369 arguments to a single list argument for names used in the skeleton
4370 similar to the existing list argument for names used in the grammar.
4371 Warn instead of complaining.
4372 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4373 values and %code code, to format %code code properly, and to build
4374 lists of all %define variables and %code qualifiers used in the
4375 skeleton: b4_skeleton_percent_define_variables and
4376 b4_skeleton_percent_code_qualifiers.
4377 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4378 Remove, and...
4379 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4380 the skeleton names lists can finish building first. In place of
4381 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4382 expect the lists b4_user_percent_define_variables and
4383 b4_user_percent_code_qualifiers.
4384 * data/c++.m4: Where setting default values for b4_parser_class_name,
4385 b4_location_type, b4_filename_type, b4_namespace, and
4386 b4_define_location_comparison, update their names to the
4387 b4_percent_define_ namespace.
4388 * data/glr.c: Don't use b4_check_percent_define_variables and
4389 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4390 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4391 (b4_parser_class_name, b4_namespace): Define these using
4392 b4_get_percent_define for parser_class_name and namespace.
4393 * data/location.cc: Use b4_get_percent_define.
4394 * data/push.c: Don't use b4_check_percent_define_variables and
4395 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4396 * data/yacc.c: Likewise, and don't call m4_exit in
4397 b4_use_push_for_pull_if or m4_wrap code will never execute.
4398 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4399 Rename to...
4400 (muscle_grow_user_name_list): ... this for consistency with the
4401 terminology used in bison.m4.
4402 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4403 %define variable names, and rename muscle used_percent_define_variables
4404 to user_percent_define_variables.
4405 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4406 user_percent_code_qualifiers.
4407 (content): Remove.
4408 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4409 {CODE} form is no longer accepted.
4410 * tests/input.at (Reject bad %code qualifiers): Rename to...
4411 (Reject unused %code qualifiers): ... this, and update test output.
4412 (%define error): Update test output.
4413
4414 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4415
4416 Check for unrecognized %define variables similar to checking for
4417 unrecognized %code qualifiers. Check for redefined %define variables.
4418 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4419 generalizes...
4420 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4421 (b4_check_percent_define_variables): New, also wraps it.
4422 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4423 variables using b4_check_percent_define_variables.
4424 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4425 all those exercised in the test suite and all those listed in the
4426 `Default values' section of c++.m4. Are there others?
4427 * data/push.c, data/yacc.c: Declare no valid %define variables.
4428 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4429 similar to muscle_find, but it works even when the muscle stores a
4430 const value.
4431 (muscle_grow_used_name_list): New function for constructing the used
4432 name list muscles that b4_check_for_unrecognized_names requires.
4433 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4434 %define'd more than once. Define the b4_used_percent_define_variables
4435 muscle with muscle_grow_used_name_list.
4436 (grammar_declaration): Abbreviate %code code with
4437 muscle_grow_used_name_list.
4438 * tests/input.at (%define errors): New.
4439
4440 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4441
4442 Provide warn_at, complain_at, and fatal_at function callbacks to the
4443 skeletons, and use this for %code qualifier complaints.
4444 * data/bison.m4 (b4_error_at): New, invoked by...
4445 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4446 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4447 @fatal_at(...@) directives.
4448 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4449 qualifiers in b4_used_percent_code_qualifiers and to use
4450 b4_complain_at.
4451 * src/location.c, src/location.h (boundary_set_from_string): New global
4452 function.
4453 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4454 function.
4455 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4456 to b4_used_percent_code_qualifiers.
4457 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4458 function.
4459 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4460 (lineno): Rename to...
4461 (out_lineno): ... this so I don't misunderstand it again.
4462 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4463 here; these newlines are in the input but not the output file.
4464 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4465 (at_directive_perform): ... this new static function, and add handling
4466 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4467 directives.
4468 * tests/input.at (Reject bad %code qualifiers): Update test output with
4469 locations and extend.
4470
4471 * tests/output.at (Output file name: [, Output file name: ]): Remove
4472 bogus comment about these tests failing.
4473
4474 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4475
4476 Clean up b4_check_percent_code_qualifiers a little.
4477 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4478 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4479 documentation and add examples.
4480 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4481 qualifiers here.
4482
4483 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4484
4485 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4486 unreliable -- especially when they're hidden inside another macro.
4487 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4488 data/c.m4: Remove m4_divert(-1).
4489 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4490 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4491 m4_divert_push(0) and m4_divert_pop(0).
4492 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
4493 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4494 pushed and popped by m4sugar, should be first on the stack.
4495
4496 Provide warn, complain, and fatal function callbacks to the skeletons.
4497 This provides more flexibility than m4_fatal, improves the error
4498 message format, and captures messages for translation. Discussed
4499 starting at
4500 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4501 * data/bison.m4 (b4_error): New, invoked by...
4502 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4503 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4504 directives. Because these M4 macros might be called when the current
4505 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4506 the previous removal of uses of m4_divert, which caused trouble.
4507 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4508 m4_fatal to report unrecognized %code qualifiers.
4509 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4510 push parser requests.
4511 * data/glr.c: Use b4_complain instead of m4_fatal to report
4512 non-deterministic push parser requests.
4513 Update @output usage to @output(...@) form.
4514 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4515 report missing %defines. Update @output usage to @output(...@) form.
4516 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4517 @output(...@) form.
4518 * src/main.c (main): Invoke skel_scanner_free.
4519 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4520 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4521 obstack_for_string from flex-scanner.h.
4522 (YY_DECL): Use to declare skel_lex static.
4523 (decode_at_digraphs): Remove; now handled in the new
4524 SC_AT_DIRECTIVE_ARG start condition.
4525 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4526 functions.
4527 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4528 at_directive_argv): New static globals.
4529 (INITIAL): Use fail_for_invalid_at.
4530 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4531 recognize the start of a generalized `@directive(...@)' form and
4532 start...
4533 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4534 directive args (using the new obstack_for_string), to decode the
4535 contained @ diagraphs, and to perform the directive. It recognizes
4536 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4537 @output(...@).
4538 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4539 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4540 `@,'.
4541 (scan_skel): Initialize obstack_for_string on the first call.
4542 (skel_scanner_free): New function to free obstack_for_string.
4543 * tests/input.at (Reject bad %code qualifiers): Update test output.
4544
4545 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4546
4547 Consolidate the 4 prologue alternative directives (%code, %requires,
4548 %provides, and %code-top) into a single %code directive with an
4549 optional qualifier field. Discussed at
4550 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4551 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4552 alternatives.
4553 * doc/bison.texinfo (Prologue Alternatives): Update.
4554 (Decl Summary): Update to %code "requires" and %code "provides".
4555 (Calc++ Parser): Update to %code "requires".
4556 (Table of Symbols): Remove entries for %requires, %provides, and
4557 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4558 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4559 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4560 which are skeleton-specific.
4561 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4562 declare what %code qualifiers it supports and to complain if any other
4563 qualifiers were used in the grammar.
4564 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4565 and b4_user_code([b4_percent_code_provides]) in place of
4566 b4_user_requires and b4_user_provides.
4567 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4568 Add b4_user_code([b4_percent_code_top]) and
4569 b4_user_code([b4_percent_code]).
4570 Invoke b4_check_percent_code_qualifiers.
4571 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4572 PERCENT_REQUIRES): Remove.
4573 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4574 %requires. Rewrite the %code RHS as the unqualified form defining the
4575 muscle b4_percent_code. Add another RHS for the qualified %code form,
4576 which defines muscles of the form b4_percent_code_QUALIFIER and the
4577 b4_used_percent_code_qualifiers muscle.
4578 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4579 PERCENT_REQUIRES): Remove.
4580 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4581 %code "requires" and %code "provides".
4582 * tests/input.at (Reject bad %code qualifiers): New.
4583
4584 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4585
4586 Use the new code_props interface for destructors and printers.
4587 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4588 printer_location members, and change the type of the destructor and
4589 printer members to code_props.
4590 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4591 symbol_printer_get, semantic_type_destructor_set,
4592 semantic_type_printer_set, default_tagged_destructor_set,
4593 default_tagless_destructor_set, default_tagged_printer_set,
4594 default_tagless_printer_set): Use code_props in arguments and return
4595 types in place of char const * and location.
4596 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4597 since the locations are now contained in the return of
4598 symbol_destructor_get and symbol_printer_get.
4599 * src/output.c (symbol_destructors_output, symbol_printers_output):
4600 Replace with...
4601 (symbol_code_props_output): ... this to eliminate duplicate code.
4602 (output_skeleton): Update to use symbol_code_props_output.
4603 * src/reader.c (symbol_should_be_used): Update use of
4604 symbol_destructor_get.
4605 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4606 Update uses of the various _destructor_set and _printer_set functions.
4607 * src/symtab.c: (default_tagged_destructor_location,
4608 default_tagless_destructor_location, default_tagged_printer_location,
4609 default_tagless_printer_location): Remove since we...
4610 (default_tagged_destructor, default_tagless_destructor,
4611 default_tagged_printer, default_tagless_printer): ... change the type
4612 of these to code_props.
4613 (symbol_new, semantic_type_new, symbol_destructor_set,
4614 semantic_type_destructor_set, symbol_destructor_get,
4615 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4616 symbol_check_alias_consistency, default_tagged_destructor_set,
4617 default_tagless_destructor_set, default_tagged_printer_set,
4618 default_tagless_printer_set): Update.
4619 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4620 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4621 code_props members.
4622 (symbol_print): Use SYMBOL_CODE_PRINT.
4623
4624 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4625
4626 Use the new code_props interface for rule actions.
4627 * src/symlist.h (symbol_list): Replace action, action_location, and
4628 used members with a code_props action_props member.
4629 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4630 grammar_midrule_action, grammar_current_rule_merge_set,
4631 grammar_current_rule_symbol_append, packgram): Update.
4632 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4633 * src/scan-code.l (handle_action_dollar): Update.
4634 (translate_rule_action): Remove, no longer used.
4635 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4636
4637 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4638
4639 Use the new code_props interface in parse-gram.y.
4640 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4641 Update all uses of translate_* functions to use the new code_props
4642 interface and to use gram_scanner_last_string_free and
4643 code_scanner_last_string_free where possible.
4644 (grammar_declaration): symbol_list_destructor_set and
4645 symbol_list_printer_set now perform the translation, so don't do it
4646 here. Use gram_scanner_last_string_free where possible.
4647 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4648 translate_code): Remove, no longer used.
4649 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4650 symbol_list_printer_set): Perform code translation here rather than
4651 depending on the caller to do so.
4652
4653 * src/symlist.h (struct symbol_list): Correct some documentation typos.
4654 * src/scan-gram.h (gram_last_string): Remove declaration.
4655 * src/scan-gram.l (last_string): Declare it static.
4656
4657 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4658
4659 Encapsulate code properties and related functionality for the various
4660 destructors, printers, and actions into a code_props structure and
4661 interface. This patch merely implements code_props in scan-code.h and
4662 scan-code.l. Future patches will rewrite other modules to use it.
4663 Discussed starting at
4664 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
4665 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
4666 consistently initialize const structs that have an empty location
4667 field.
4668 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
4669 to ensure consistency.
4670 * src/scan-code.h (code_props): New structure.
4671 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
4672 function, macro, and const global variable for initializing a
4673 code_props with no code.
4674 (code_props_plain_init, code_props_symbol_action_init,
4675 code_props_rule_action_init, code_props_translate_code): The rest of
4676 the new code_props functional interface. Among other things, the init
4677 functions set the code_props kind field so that
4678 code_props_translate_code will know whether to behave like
4679 translate_symbol_action, translate_rule_action, or translate_code.
4680 These old translate functions must remain until all other modules are
4681 updated to use the new code_props interface.
4682 (code_scanner_last_string_free): New function similar to
4683 gram_scanner_last_string_free.
4684 (code_scanner_free): Add documentation.
4685 * src/scan-code.l: Implement the new interface.
4686 (code_lex): Make it static, add a code_props* argument, and remove the
4687 rule argument.
4688 (last_string): New static global similar to the one in scan-gram.l.
4689 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
4690 instead of rule.
4691 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
4692 code_props since Bison may one day use this information for destructors
4693 and printers.
4694 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
4695 (handle_action_dollar): Use symbol_list_n_get and set used flag
4696 directly since symbol_list_n_used_set is removed.
4697 (translate_action): Add a code_props* argument and remove the rule,
4698 action, and location arguments. Pass the code_props* on to code_lex.
4699 (translate_rule_action, translate_symbol_action, translate_code):
4700 Rewrite as wrappers around the new code_props interface.
4701 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
4702 it would eventually need to break the encapsulation of code_props.
4703
4704 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4705
4706 * etc/.cvsignore: New.
4707
4708 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4709
4710 Add maintainer-push-check to run maintainer-check using push parsing in
4711 place of pull parsing where available.
4712 * Makefile.am (maintainer-push-check): New.
4713 * data/bison.m4 (b4_use_push_for_pull_if): New.
4714 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
4715 appropriately based on their existing values.
4716 (yypush_parse): Don't print push-parser-specific diagnostics if push
4717 parsing is being used in place of pull parsing.
4718 * data/yacc.c: If push parsing should replace pull parsing, redirect to
4719 push.c.
4720 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
4721 variable, and insert b4_use_push_for_pull_flag into muscles.
4722 * tests/Makefile.am (maintainer-push-check): New.
4723
4724 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4725
4726 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
4727 (whether successful or failed) so that yypush_parse can be invoked
4728 again to start a new parse using the same yypstate.
4729 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
4730 check multiple yypull_parse invocations on the same yypstate. For pull
4731 mode, extend to check multiple yyparse invocations.
4732 (Exploding the Stack Size with Alloca): Extend to try with
4733 %push-pull-parser.
4734 (Exploding the Stack Size with Malloc): Likewise.
4735
4736 * tests/calc.at (Simple LALR Calculator): Don't specify
4737 %skeleton "push.c" since %push-pull-parser implies that now.
4738 * tests/headers.at (export YYLTYPE): Don't check for the push
4739 declarations. Otherwise, this test case can't be used to see if push
4740 mode can truly emulate pull mode.
4741 * tests/input.at (Torturing the Scanner): Likewise.
4742 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
4743 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
4744 AT_YACC_IF, which now includes the case of push mode since %skeleton
4745 need not be used for push mode. This will be more intuitive once
4746 push.c is renamed to yacc.c.
4747
4748 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4749
4750 For push mode, convert yyparse from a macro to a function, invoke yylex
4751 instead of passing a yylexp argument to yypull_parse, and don't
4752 generate yypull_parse or yyparse unless %push-pull-parser is declared.
4753 Discussed starting at
4754 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
4755 * data/bison.m4 (b4_pull_if): New.
4756 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
4757 * data/push.c: Improve M4 quoting a little.
4758 (b4_generate_macro_args, b4_parenthesize): Remove.
4759 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
4760 any time a pull parser is requested.
4761 Don't #define this as a wrapper around yypull_parse. Instead, when
4762 both push and pull are requested, make it a function that does that
4763 same thing.
4764 (yypull_parse): If there's a b4_prefix, #define this to
4765 b4_prefix[pull_parse] when both push and pull are requested.
4766 Don't define this as a function unless both push and pull are
4767 requested.
4768 Remove the yylexp argument and hard-code yylex invocation instead.
4769 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
4770 %push-parser.
4771 * src/getargs.c (pull_parser): New global initialized to true.
4772 * getargs.h (pull_parser): extern it.
4773 * src/output.c (prepare): Insert pull_flag muscle.
4774 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
4775 (prologue_declaration): Set both push_parser and pull_parser = true for
4776 %push-pull-parser. Set push_parser = true and pull_parser = false for
4777 %push-parser.
4778 * src/scan-gram.l: Don't accept %push_parser as an alternative to
4779 %push-parser since there's no backward-compatibility concern here.
4780 Scan %push-pull-parser.
4781 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
4782 instead of %push-parser.
4783 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
4784 prototype it in the module that calls yyparse.
4785 * tests/input.at (Torturing the Scanner): Likewise.
4786 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
4787
4788 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
4789
4790 Update etc/bench.pl. Optimize push mode a little (the yyn change
4791 deserves most of the credit).
4792 * Makefile.am (SUBDIRS): Add etc subdirectory.
4793 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
4794 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
4795 yytoken, yyval, and yyloc declarations to...
4796 (yyparse or yypush_parse): ... here to improve performance. For
4797 yypush_parse invocations after the first, be sure to assign yyn its old
4798 value again.
4799 (yypstate_new): Don't bother initializing the yyresult field since the
4800 initial value isn't used.
4801 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
4802 remove the #define that, in push mode, set it to yyps->NAME.
4803 * etc/Makefile.am: New.
4804 * etc/bench.pl: Remove and build it instead from...
4805 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
4806 "tests/bison" from the build directory by default rather than just
4807 invoking "bison" from $PATH.
4808 (calc_grammar): Update push parser code: don't declare yylval globally,
4809 don't define yyparse_wrapper, and don't #define yyparse.
4810 (bench_grammar): Update to check all working combinations of yacc.c,
4811 push.c, impure, pure, pull, and push.
4812
4813 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4814
4815 For push mode, add pull wrappers around yypush_parse.
4816 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
4817 (yypull_parse): New function wrapping yypush_parse.
4818 (yyparse): New #define wrapping yypull_parse.
4819 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
4820 is declared.
4821 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
4822 prototype yylex in the module that calls yyparse, and don't prototype
4823 yyparse there. Otherwise, the yyparse expansion won't compile.
4824 * tests/input.at (Torturing the Scanner): Likewise.
4825
4826 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4827
4828 Enable push parsers to operate in impure mode. Thus, %push-parser no
4829 longer implies %pure-parser. The point of this change is to move
4830 towards being able to test the push parser code by running the entire
4831 test suite as if %push-parser had been declared.
4832 * data/push.c (yypush_parse): For impure mode, remove the
4833 yypushed_char, yypushed_val, and yypushed_loc arguments.
4834 Instead, declare these as local variables initialized to the global
4835 yychar, yylval, and yylloc.
4836 For the first yypush_parse invocation only, restore the initial values
4837 of these global variables when it's time to read a token since they
4838 have been overwritten.
4839 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
4840 %push-parser.
4841 * tests/calc.at (Simple LALR(1) Calculator): Always declare
4842 %pure-parser along with %push-parser since this test case was designed
4843 for pure push parsers.
4844 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
4845 (AT_YACC_OR_PUSH_IF): New.
4846 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
4847 add a note that it's still wrong for some cases (as it has been for a
4848 while).
4849 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
4850 %push-parser no longer implies %pure-parser.
4851
4852 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4853
4854 Remove some unnecessary differences between the pull parser code and
4855 the push parser code. This patch enables yynerrs in push mode.
4856 * data/push.c: Reformat M4 a little.
4857 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
4858 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
4859 because push mode is on. Instead, if pure mode is on, move yynerrs
4860 to...
4861 (b4_declare_parser_state_variables): ... here.
4862 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
4863 to yyps->NAME so it can be used in yypush_parse.
4864 (yypush_parse): Don't omit uses of yynerrs in push mode.
4865
4866 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4867
4868 Fix bug such that the first pushed token's value and location are
4869 sometimes overwritten (sometimes by %initial-action) before being used.
4870 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
4871 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
4872 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
4873 more closely mimic the pull parser logic.
4874 Don't copy the pushed token to yychar, yylval, and yylloc until it's
4875 time to read a token, which is after any initialization of yylval and
4876 yylloc.
4877 (gottoken): Rename label to...
4878 (yyread_pushed_token): ... for clarity and to avoid infringing on the
4879 user namespace.
4880
4881 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4882
4883 Rearrange initialization of the parser state variables so that the
4884 skeleton doesn't have to have a copy for pull mode and another for push
4885 mode. This patch also fixes at least a bug such that yylloc was not
4886 initialized (with b4_location_initial_line and
4887 b4_location_initial_column) upon calling yypush_parse. However, that
4888 initialization now overwrites the first token's location;
4889 %initial-action assigning @$ already did the same thing, and both bugs
4890 will be fixed in a later patch.
4891 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
4892 (b4_declare_parser_state_variables): Remove initialization of yytoken,
4893 yyss, yyvs, yyls, and yystacksize.
4894 (yypstate_new): Remove initialization of some yypstate fields: yystate,
4895 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
4896 yylsp.
4897 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
4898 yyps->NAME so it can be used in yypush_parse.
4899 (yyparse or yypush_parse): For yypush_parse, don't print the
4900 "Starting parse" diagnostic for invocations after the first.
4901 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
4902 yypush_parse, only do it for the first invocation.
4903 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
4904 initialization to occur in yypush_parse but only on the first
4905 invocation.
4906
4907 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4908
4909 * data/push.c: Add CPP guards around push parser declarations in both
4910 the header and the code file.
4911 In the code file, move the push parser declarations to the same place
4912 they appear in the header file.
4913 Clean up the M4 some, especially the inconsistent underquoting in
4914 some b4_c_function_def and b4_c_function_decl uses.
4915
4916 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4917
4918 Encapsulate the push parser state variables into an M4 macro so the
4919 push skeleton doesn't have to list them again for pull mode's yyparse.
4920 For push mode, remove yypush_parse's local equivalents of these
4921 variables to eliminate unnecessary copying between the two sets at
4922 run-time. This patch also fixes at least a bug related to multiple
4923 %initial-action invocations in push mode.
4924 * data/push.c (b4_declare_parser_variables): Rename to...
4925 (b4_declare_scanner_communication_variables): ... this for clarity and
4926 update both uses.
4927 (b4_declare_yyparse_variables): Remove and move its contents to the one
4928 spot where it was invoked.
4929 (b4_declare_parser_state_variables): New macro containing the parser
4930 state variables required by push mode.
4931 (struct yypstate): Replace all fields but yynew with
4932 b4_declare_parser_state_variables.
4933 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
4934 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
4935 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
4936 (yyparse or yypush_parse): For yyparse in pull mode, replace local
4937 parser state variable declarations with
4938 b4_declare_parser_state_variables.
4939 Don't initialize parser state variables when calling yypush_parse since
4940 yypstate_new already does that.
4941 Invoke the user's initial action only upon the first yypush_parse
4942 invocation.
4943 Remove all code that copies between the local parser state variables
4944 and the yypstate.
4945
4946 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4947
4948 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
4949 prevent a name collision in a future patch where these names will
4950 sometimes be #define'd.
4951 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
4952 since it no longer has the same name as the existing argument.
4953 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
4954
4955 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
4956 and Joel E. Denny <jdenny@ces.clemson.edu>
4957
4958 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4959 that the argument is case-insensitive, and there's no `=' here.
4960 For the %skeleton entry, mention that %language is better.
4961 (Bison Options): Likewise for --language and --skeleton. Move the
4962 --skeleton entry so that the `Tuning the parser' section is sorted
4963 alphabetically on long options.
4964 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
4965 %language directive in detail here; cross-reference the %language
4966 documentation instead.
4967 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
4968 `%require "2.3b"' so that the example is always up-to-date.
4969 (Table of Symbols): Add entries for %language and %skeleton.
4970 * examples/extexi (normalize): Instead of replacing every %require
4971 argument with the current Bison version, just substitute for
4972 `@value{VERSION}'. This guarantees that we're testing what actually
4973 appears in the documentation.
4974 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
4975 rather than `@VERSION@'.
4976
4977 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4978
4979 * NEWS: Reword the %language news a bit, and put it earlier.
4980
4981 * src/getargs.c (skeleton_arg): Last arg is now location const *.
4982 Rewrite to simplify the logic.
4983 (language_argmatch): Likewise.
4984 (program_name): We now own this var.
4985 * src/getargs.h (struct bison_language): Use char[] rather than
4986 const char *.
4987
4988 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
4989 Java is supported.
4990 * src/complain.c (program_name): Remove decl; no longer needed.
4991 * src/main.c (program_name): Remove; now belongs to getargs.
4992
4993 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
4994
4995 * NEWS: Document %language.
4996
4997 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
4998
4999 * data/c-skel.m4, data/c++-skel.m4: New files.
5000 * data/glr.c: Complain on push parsers.
5001
5002 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5003 over %skeleton.
5004 (Decl Summary): Document %language and %skeleton.
5005 (Command line): Document -L.
5006
5007 * examples/extexi: Rewrite %require directive.
5008 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5009
5010 * src/files.c (compute_exts_from_gc): Look in language structure
5011 for .y extension.
5012 (compute_file_name_parts): Check whether .tab should be added.
5013 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5014 (language, skeleton_arg, language_argmatch): New.
5015 (long_options): Add --language.
5016 (getargs): Use skeleton_arg, add -L/--language.
5017 * src/getargs.h: Include location.h.
5018 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5019 * src/output.c (prepare): Pick default skeleton from struct language.
5020 Don't dispatch C skeletons here.
5021 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5022 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5023 * src/scan-gram.l ("%language"): New rule.
5024
5025 * tests/calc.at: Test %skeleton and %language.
5026 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5027 (AT_GLR_IF): Look for %skeleton "glr.cc".
5028 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5029 (AT_YACC_IF): Reject %language.
5030
5031 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5032
5033 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5034 since it wasn't used; only the typedef name 'semantic_type' is needed.
5035 Also, omit trailing white space.
5036
5037 * bootstrap: Sync from coreutils.
5038 (gnulib_extra_files): Add build-aux/announce.gen.
5039 (slurp): Adjust .gitignore files like .cvsignore files.
5040 * build-aux/announce-gen: Remove from CVS, since bootstrap
5041 now creates this.
5042
5043 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5044
5045 Make %push-parser imply %pure-parser. This fixes several bugs; see
5046 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5047 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5048 pure_parser = true.
5049 * data/push.c: Don't bother testing b4_push_if when deciding whether
5050 to expand b4_declare_parser_variables globally.
5051 (yypush_parse): Likewise in here.
5052
5053 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5054 (yy_reduce_print): Reformat M4 for readability.
5055
5056 2006-12-15 Bob Rossi <bob@brasko.net>
5057 and Joel Denny <jdenny@ces.clemson.edu>
5058
5059 * data/push.c (yypstate): Add typedef, and update all uses of
5060 struct yypstate to just yypstate.
5061 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5062
5063 2006-12-14 Bob Rossi <bob@brasko.net>
5064
5065 * data/push.c (yypush_parse): Declare prototype regardless of
5066 %locations option.
5067
5068 2006-12-14 Bob Rossi <bob@brasko.net>
5069
5070 * data/push.c (yyparse): Remove the prototype and the #define when in
5071 push-parser mode.
5072
5073 2006-12-13 Bob Rossi <bob@brasko.net>
5074
5075 * data/push.c (yypstate_init): Rename to...
5076 (yypstate_new): ... this and use b4_c_function_def.
5077 (yypstate_delete): New.
5078 (yypush_parse): Change parameters yynval and yynlloc to be const.
5079 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5080 yypstate_delete functions.
5081
5082 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5083
5084 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5085 strange test case titles. Reported by Bob Rossi.
5086
5087 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5088
5089 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5090 of potential ambiguities in GLR grammers.
5091
5092 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5093
5094 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5095 `bison ', use m4_index instead of m4_substr since chopping up a string
5096 containing M4-special characters causes problems here.
5097
5098 Fix a couple of bugs related to special characters in user-specified
5099 file names, and make it easier for skeletons to compute output file
5100 names with the same file name prefix as Bison-computed output file
5101 names.
5102 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5103 b4_parser_file_name and b4_spec_defines_file instead of
5104 @output_parser_name@ and @output_header_name@, which are now redundant.
5105 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5106 b4_parser_file_name, b4_spec_defines_file, and the new
5107 @basename(FILENAME@) instead of @output_parser_name@ and
5108 @output_header_name@, which inappropriately escaped the file names as
5109 C string literals.
5110 * src/files.c (all_but_ext): Remove static qualifier.
5111 (compute_output_file_names): Move `free (all_but_ext)' to...
5112 (output_file_names_free): ... here since all_but_ext is needed later.
5113 * src/files.h (all_but_ext): Extern.
5114 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5115 exactly what MUSCLE_INSERT_STRING used to do.
5116 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5117 characters are escaped properly.
5118 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5119 all_but_ext.
5120 For pkgdatadir muscle, maintain previous functionality by using
5121 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5122 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5123 digraphs would never be expanded. Hopefully no one has M4-special
5124 characters in his Bison installation path.
5125 * src/scan-skel.l: Don't parse @output_header_name@ and
5126 @output_parser_name@ anymore since they're now redundant.
5127 In @output, use decode_at_digraphs.
5128 Parse a new @basename command that invokes last_component.
5129 (decode_at_digraphs): New.
5130 (BASE_QPUTS): Remove unused.
5131 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5132 (Output file name): New tests.
5133
5134 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5135
5136 Warn about output files that are generated by the skeletons and that
5137 conflict with other output files.
5138 * data/glr.c: Don't generate the header file here when glr.cc does.
5139 * src/files.c (file_names, file_names_count): New static globals.
5140 (compute_output_file_names): Invoke output_file_name_check for files
5141 not generated by the skeletons and remove existing checks.
5142 (output_file_name_check): New function that warns about conflicting
5143 output file names.
5144 (output_file_names_free): Free file_names.
5145 * src/files.h (output_file_name_check): Declare.
5146 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5147 the skeletons.
5148 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5149 (Conflicting output files): New tests.
5150
5151 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5152
5153 * doc/bison.texinfo: Fix a couple of typos.
5154
5155 2006-12-08 Bob Rossi <bob@brasko.net>
5156
5157 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5158 Rename to...
5159 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5160 update all uses.
5161 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5162 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5163 local pv.
5164 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5165 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5166
5167 2006-12-07 Bob Rossi <bob@brasko.net>
5168 and Joel Denny <jdenny@ces.clemson.edu>
5169
5170 * data/push.c (yypvarsinit): Change return type from void* to struct
5171 yypvars*. No longer cast to void* on return.
5172 (struct yypvars): Remove yylen since it need not be remembered between
5173 yypushparse invocations.
5174 (yypushparse): Don't copy between yylen and pv->yylen.
5175
5176 2006-12-05 Bob Rossi <bob@brasko.net>
5177
5178 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5179 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5180 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5181 (struct yypvars): Remove b4_declare_parser_variables.
5182 (yypvarsinit): Remove init code for removed variables.
5183 (global scope): Do not declare b4_declare_parser_variables if
5184 push or pure mode.
5185 (yypushparse): Add b4_declare_parser_variables.
5186 Init new local variables, and remove init code for removed
5187 yypvars variables.
5188 (yyparse): Delete.
5189 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5190 and yyparse for other modes.
5191 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5192 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5193 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5194 (AT_PURE_LEX_IF): True if pure or push parser.
5195
5196 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5197
5198 Document Yacc prologue alternatives and default %destructor's and
5199 %printer's as experimental. Don't mention Java yet. Discussed at
5200 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5201 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5202 (2.3a): Annotate this entry to say the old forms of these features were
5203 also experimental.
5204 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
5205 Table of Symbols): Say they're experimental. Comment out any mention
5206 of Java (we'll want this back eventually).
5207
5208 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5209
5210 Support a file name argument to %defines. Deprecate `=' in
5211 %file-prefix, %name-prefix, and %output. Discussed at
5212 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5213 * NEWS (2.3a+): Mention.
5214 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
5215 form of %defines, and remove `=' from entries for %file-prefix,
5216 %name-prefix, and %output.
5217 * src/parse-gram.y (prologue_declaration): Implement.
5218 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5219 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5220 all but one occurrence of %name-prefix.
5221 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5222 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5223 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5224 occurrence of each of %file-prefix and %output. Add check for %defines
5225 with argument.
5226 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5227 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5228 Remove the `=' from %output.
5229
5230 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5231
5232 Don't escape $ in test case titles since Autoconf 2.61 now does that
5233 correctly.
5234 * tests/actions.at (Default %printer and %destructor are not for error
5235 or $undefined): Here.
5236 (Default %printer and %destructor are not for $accept): Here.
5237 * tests/input.at (Invalid $n and @n): Here.
5238
5239 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5240
5241 Rename <!> to <>. Discussed starting at
5242 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5243 * NEWS (2.3a+): Update.
5244 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
5245 Update.
5246 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5247 * src/scan-gram.l (INITIAL): Implement.
5248 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5249 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5250 comment.
5251 * tests/actions.at (Default tagless %printer and %destructor,
5252 Default tagged and per-type %printer and %destructor,
5253 Default %printer and %destructor are not for error or $undefined,
5254 Default %printer and %destructor are not for $accept,
5255 Default %printer and %destructor for mid-rule values): Update.
5256 * tests/input.at (Default %printer and %destructor redeclared,
5257 Unused values with default %destructor): Update.
5258
5259 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
5260
5261 Don't let %prec take a nonterminal.
5262 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5263 token.
5264 * tests/input.at (%prec takes a token): New test checking that %prec
5265 won't take a nonterminal.
5266
5267 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5268
5269 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5270 it was double-quoted.
5271 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5272 grammar is maintained with Bison's highest standards.
5273 * src/getargs.c: Fix some typos in Doxygen comments.
5274
5275 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5276
5277 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5278 later. Reported by Paul Eggert in
5279 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5280 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5281 * src/scan-code.l (translate_action): Don't bother invoking
5282 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5283 (code_scanner_free): Instead of invoking
5284 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5285 which frees more.
5286 * src/scan-gram.l (gram_scanner_free): Likewise.
5287 * src/scan-skel.l (scan_skel): Likewise.
5288
5289 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5290
5291 * src/files.c (tr): Change return type to void.
5292 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5293 has been called previously for the same key.
5294 (muscle_find): Return storage instead of value so that
5295 --enable-gcc-warnings doesn't produce warnings that the return discards
5296 const. aver that the value and storage are the same since storage
5297 could potentially be NULL when value is not.
5298 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5299 same as 0.
5300
5301 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5302
5303 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5304 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5305 us a slightly cleaner distribution, and also works.
5306 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5307 gnulib changes.
5308
5309 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5310 and Paul Eggert <eggert@cs.ucla.edu>
5311
5312 Don't let Bison leak memory except when it complains.
5313 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5314 (spec_defines_file, dir_prefix): Now char *, not const char *,
5315 since they are freed.
5316 * src/files.c: Likewise.
5317 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5318 Likewise.
5319 (tr): Now operates in-place. All uses changed.
5320 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5321 values.
5322 (compute_file_name_parts, compute_output_file_names): Don't store
5323 read-only data in variables that will be freed.
5324 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5325 src_extension, and header_extension.
5326 (output_file_names_free): New public function to free
5327 spec_verbose_file, spec_graph_file, spec_defines_file,
5328 parser_file_name, and dir_prefix.
5329 * src/getargs.c (getargs): Don't store read-only data in variables that
5330 will be freed.
5331 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5332 (which previously existed but was unused), and quotearg_free.
5333 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5334 * src/muscle_tab.c: Likewise.
5335 (muscle_entry): Make the value char const *,
5336 and add a new storage member that is char * and can be freed.
5337 (muscle_entry_free): New private function.
5338 (muscle_init): Use it instead of free.
5339 (muscle_insert, muscle_grow): Update and use new storage member.
5340 (muscle_code_grow): Free the string passed to muscle_grow
5341 since it's not needed anymore.
5342 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5343 add a new `char *code' member.
5344 ("{...}"): Declare semantic type as code.
5345 * src/scan-code.h (translate_rule_action):
5346 (translate_symbol_action, translate_code, translate_action): Return
5347 `char const *' rather than `char *' since external code should not free
5348 these strings.
5349 * src/scan-code.l: Likewise.
5350 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5351 which is "{...}" in the parser.
5352 * tests/Makefile.am (maintainer-check-valgrind): Set
5353 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5354 Valgrind.
5355 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5356 complain.
5357 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5358 expecting a non-zero exit status sets --leak-check=summary and
5359 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5360 this case, and we don't want to hear about it.
5361
5362 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5363
5364 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5365 instead of from the template, to simplify configuration a bit.
5366 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5367 and m4/wint_t.m4, as they are needed with the latest gnulib.
5368
5369 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5370
5371 Disable unset/unused mid-rule value warnings by default, and recognize
5372 --warnings=midrule-values to enable them. Discussed starting at
5373 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5374 * NEWS (2.3a+): Mention.
5375 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5376 warnings): Add entry for midrule-values subargument.
5377 * src/reader.c (symbol_should_be_used): Don't return true just because
5378 the value is a set/used mid-rule value unless
5379 --warnings=midrule-values was specified.
5380 * tests/input.at (Unused values, Unused values before symbol
5381 declarations): Run tests with and without --warnings=midrule-values.
5382
5383 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5384 than LIST_FREE directly.
5385
5386 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5387
5388 Finish implementing --warnings=error, which should not be implied by
5389 --warnings=all (or by its synonyms -W and --warnings without
5390 subarguments).
5391 * src/complain.c (set_warning_issued): New function to report that
5392 warnings are being treated as errors and to record an error if so.
5393 Invoke...
5394 (warn_at, warn): ... here.
5395 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5396 "error - warnings are errors" does not appear above "all - all of the
5397 above".
5398 (getargs): For -W and --warnings without subarguments, don't let
5399 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5400 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5401
5402 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5403
5404 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5405 empty subargument list. For example: `bison --warnings= parser.y'.
5406
5407 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5408
5409 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5410 the parser header file so that gcc doesn't warn.
5411
5412 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5413
5414 Split the default %destructor/%printer into two kinds: <*> and <!>.
5415 Discussed starting at
5416 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5417 * NEWS (2.3a+): Mention.
5418 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5419 previous change today related to mid-rules.
5420 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
5421 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
5422 (TYPE_TAG_ANY): Add as <*>.
5423 (TYPE_TAG_NONE): Add as <!>.
5424 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5425 for <*> and <!>.
5426 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5427 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5428 * src/symlist.c (symbol_list_default_new): Split into tagged and
5429 tagless versions.
5430 (symbol_list_destructor_set, symbol_list_printer_set): Split
5431 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5432 SYMLIST_DEFAULT_TAGLESS.
5433 * src/symlist.h: Update symbol_list_default*_new prototypes.
5434 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5435 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5436 * src/symtab.c (default_destructor, default_destructor_location,
5437 default_printer, default_printer_location): Split each into tagged and
5438 tagless versions.
5439 (symbol_destructor_get, symbol_destructor_location_get,
5440 symbol_printer_get, symbol_printer_location_get): Implement tagged
5441 default and tagless default cases.
5442 (default_destructor_set, default_printer_set): Split each into tagged
5443 and tagless versions.
5444 * src/symtab.h: Update prototypes.
5445 * tests/actions.at (Default %printer and %destructor): Rename to...
5446 (Default tagless %printer and %destructor): ... this, and extend.
5447 (Per-type %printer and %destructor): Rename to...
5448 (Default tagged and per-type %printer and %destructor): ... this, and
5449 extend.
5450 (Default %printer and %destructor for user-defined end token): Extend.
5451 (Default %printer and %destructor are not for error or $undefined):
5452 Update.
5453 (Default %printer and %destructor are not for $accept): Update.
5454 (Default %printer and %destructor for mid-rule values): Extend.
5455 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5456 (Unused values with default %destructor): Extend.
5457
5458 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5459
5460 Don't apply the default %destructor/%printer to an unreferenced midrule
5461 value. Mentioned at
5462 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5463 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5464 like $@n instead of just @n so that the default %destructor/%printer
5465 logic doesn't see them as user-defined symbols.
5466 (symbol_is_dummy): Check for both forms of the name.
5467 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5468 name for which the midrule value is referenced in any action.
5469 * tests/actions.at (Default %printer and %destructor for mid-rule
5470 values): New test.
5471 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5472 for change to dummy symbol names.
5473
5474 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5475
5476 Warn about unset midrule $$ if the corresponding $n is used.
5477 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5478 $n usage.
5479 (packgram): Before invoking grammar_rule_check on any rule, make sure
5480 all actions have already been scanned in order to set `used' flags.
5481 Otherwise, checking that a midrule's $$ is set will not always work
5482 properly because the midrule check must forward-reference the midrule's
5483 parent rule.
5484 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5485 warning.
5486
5487 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5488
5489 More improvements to the documentation of the prologue alternatives:
5490 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5491 Bison manual.
5492 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5493 some text to clarify the relative importance of the new directives and
5494 to show how these directives may be viewed as code labels.
5495
5496 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5497
5498 Similar to the recently removed %before-header, add %code-top as the
5499 alternative to the pre-prologue. Mentioned at
5500 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5501 Also, let the prologue alternatives appear in the grammar section.
5502 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5503 (prologue_declaration): Move the existing prologue alternatives to...
5504 (grammar_declaration): ... here and add %code-top.
5505 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5506
5507 Clean up and extend documentation for the prologue alternatives.
5508 * NEWS (2.3a+): Describe prologue alternatives.
5509 * doc/bison.texinfo (Prologue): Move discussion of prologue
5510 alternatives to...
5511 (Prologue Alternatives): ... this new section, and extend it to discuss
5512 all 4 directives in detail.
5513 (Table of Symbols): Clean up discussion of prologue alternatives and
5514 add %code-top.
5515
5516 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5517
5518 DJGPP specific issues.
5519
5520 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5521 config.bat accordingly.
5522 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5523 * djgpp/config.site: Likewise.
5524
5525 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
5526
5527 Replace %*-header with %provides, %requires, %code. See discussion at
5528 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5529
5530 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5531 (b4_user_start_header): Remove.
5532 * data/glr.c: Use new macros instead of b4_*start_header
5533 and b4_*end_header.
5534 * data/glr.cc: Likewise.
5535 * data/lalr1.cc: Likewise.
5536 * data/push.c: Likewise.
5537 * data/yacc.c: Likewise.
5538
5539 * doc/bison.texinfo: Remove %before-header, rename
5540 %{start,end,after}-header to %requires, %provides, %code.
5541
5542 * src/parse-gram.y: Likewise (also rename token names accordingly).
5543 * src/scan-gram.l: Likewise.
5544 * tests/actions.at: Likewise.
5545
5546 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5547
5548 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5549 Problem reported by Joel E. Denny.
5550
5551 2006-10-14 Jim Meyering <jim@meyering.net>
5552
5553 (Sync from coreutils.)
5554 Work also when the working directory (with e.g. coreutils sources)
5555 is version controlled with git, rather than CVS.
5556 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5557 rather than CVS.
5558 In messages and comments, say e.g., "checked-out sources",
5559 rather than "CVS sources".
5560 (version_controlled_file): New function. Work for git as well as
5561 for CVS. Don't use grep's -q option.
5562 (slurp): Call it here, in place of CVS-specific code.
5563
5564 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5565
5566 Fix testsuite for ./configure --enable-gcc-warnings:
5567 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5568 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5569 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5570 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5571 * test/regression.at (Diagnostic that expects two alternatives):
5572 Likewise.
5573
5574 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5575
5576 * bootstrap.conf (gnulib_modules): Add config-h.
5577 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5578 worry about HAVE_CONFIG_H.
5579 * lib/abitset.c: Likewise.
5580 * lib/bitset.c: Likewise.
5581 * lib/bitset_stats.c: Likewise.
5582 * lib/bitsetv-print.c: Likewise.
5583 * lib/bitsetv.c: Likewise.
5584 * lib/ebitset.c: Likewise.
5585 * lib/get-errno.c: Likewise.
5586 * lib/lbitset.c: Likewise.
5587 * lib/subpipe.c: Likewise.
5588 * lib/timevar.c: Likewise.
5589 * lib/vbitset.c: Likewise.
5590 * lib/bitset.c: Include "bitset.h" first, to test interface.
5591 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5592 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5593 * lib/bitsetv.c: Include "bitsetv.h" first.
5594 * lib/get-errno.c: Include "get-errno.h" first.
5595 * m4/.cvsignore: Add config-h.m4.
5596 * tests/actions.at (Default %printer and %destructor for ...):
5597 Adjust expected line numbers in output to reflect removal of #if
5598 HAVE_CONFIG_H lines.
5599 * tests/glr-regression.at (Missed %merge type warnings when ...):
5600 Likewise.
5601 * tests/regression.at (Braced code in declaration in rules section):
5602 Likewise.
5603 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5604 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5605 Include <config.h> unconditionally.
5606
5607 * bootstrap: Sync from coreutils, as follows:
5608
5609 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5610
5611 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5612 variable was sometimes used without being initialized. This
5613 messed up the installation of the INSTALL file in some cases.
5614
5615 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5616
5617 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5618 --copy. Inspired by a suggestion from Bruno Haible.
5619
5620 2006-10-03 Jim Meyering <jim@meyering.net>
5621
5622 * bootstrap: Undo last change to this file, since now gnulib-tool
5623 sticks with the automake default in generating dependencies.
5624
5625 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5626
5627 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5628 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5629
5630 * doc/bison.1: Add copyright notice.
5631
5632 * data/glr.c: Don't include <stdarg.h>; not used.
5633
5634 * NEWS: The -g and --graph options now output graphs in Graphviz
5635 DOT format, not VCG format.
5636 * doc/bison.1: Likewise.
5637 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
5638 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5639 of this change in
5640 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
5641 * TODO: Remove Graphviz entry.
5642 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5643 remove vcg.c, vcg.h, vcg_defaults.h.
5644 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5645 * src/graphviz.c, src/graphviz.h: New files.
5646 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5647 * src/files.h: Make comment more generic.
5648 * src/main.c (main): Likewise.
5649 * src/print_graph.h: Likewise.
5650 * src/getargs.c (usage): Make usage description more generic.
5651 * src/print_graph.c: Include graphviz.h rather than vcg.h.
5652 (static_graph, fgraph): Remove. All uses changed to pass
5653 arguments instead of sharing a static var.
5654 (print_core, print_actions, print_state, print_graph):
5655 Output graphviz format rather than VCG format.
5656 * tests/.cvsignore: Remove *.vcg; add *.dot.
5657 * tests/output.at: Expect *.dot files, not *.vcg files.
5658
5659 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
5660 accommodates the 2006-10-08 change.
5661
5662 2006-10-11 Bob Rossi <bob@brasko.net>
5663
5664 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
5665 (b4_yyssa, b4_yyerror_range): New macros.
5666 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
5667 (yypvarsinit): Remove init of removed fields.
5668 (yypushparse): Remove use of removed fields; use new macros instead.
5669
5670 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5671
5672 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
5673 in a push parser. Reindent slightly to match yacc.c better.
5674
5675 2006-10-11 Bob Rossi <bob@brasko.net>
5676
5677 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
5678 yymsg_alloc fields.
5679 (yypvarsinit, yypushparse): Remove init of removed fields.
5680 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
5681
5682 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5683
5684 * THANKS: Add Paolo Bonzini and Bob Rossi.
5685
5686 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
5687
5688 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
5689 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
5690 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
5691 b4_define_user_cde and uses): Remove.
5692 (b4_comment, b4_prefix, b4_sync_start): New.
5693 * data/bison.m4: New file, with most of the content removed from c.m4.
5694 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
5695 * src/output.c (output_skeleton): Pass bison.m4.
5696 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
5697 only if specified.
5698
5699 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
5700
5701 Fix test failure reported by Tom Lane in
5702 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
5703 and try to make such failures easier to catch in the future.
5704 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
5705 that's now the caller's responsibility.
5706 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
5707 Set yychar = YYEOF if it's negative.
5708 * tests/actions.at (yylex): Abort if asked to read past EOF.
5709 * tests/conflicts.at (yylex): Likewise.
5710 * tests/cxx-type.at (yylex): Likewise.
5711 * tests/glr-regression.at (yylex): Likewise.
5712 * tests/input.at (yylex): Likewise.
5713 * tests/regression.at (yylex): Likewise.
5714 * tests/torture.at (yylex): Likewise.
5715
5716 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
5717
5718 Fix problems with translating English-language diagnostics.
5719 * bootstrap: Fix bug introduced in recent bootstrap changes, with
5720 respect to bison-runtime pot generation. The YY_ stuff
5721 wasn't being captured.
5722 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
5723 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
5724 * runtime-po/POTFILES.in: Add data/push.c.
5725
5726 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5727
5728 Merge bootstrap changes from coreutils.
5729
5730 2006-09-28 Jim Meyering <jim@meyering.net>
5731
5732 Automatically generated dependencies are important even
5733 when all of the sources in a directory come from gnulib.
5734 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
5735 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
5736
5737 2006-09-23 Jim Meyering <jim@meyering.net>
5738
5739 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
5740
5741 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5742
5743 * bootstrap: Add support for --force.
5744 (usage): New function. Describe usage less tersely.
5745 (CVS_only_file): New var.
5746
5747 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
5748
5749 * data/push.c (YYPUSH_MORE): Make it an enum instead.
5750 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
5751 Adjust white space and comments to match GNU style better.
5752
5753 2006-09-20 Bob Rossi <bob@brasko.net>
5754
5755 * data/push.c (yyresult_get): Remove function.
5756 (YYPUSH_MORE): Add #define.
5757 (yypushparse): Modify return value.
5758
5759 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5760
5761 * stamp-h.in: Remove; no longer needed.
5762 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
5763 Remove config.h, config.hin, intl (no longer created).
5764 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
5765 stamp-h1.
5766
5767 Sync bootstrap from coreutils, as follows:
5768
5769 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
5770
5771 * bootstrap (symlink_to_gnulib): New function.
5772 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
5773 to copies-of-gnulib.
5774 (cp_mark_as_generated, slurp, gnulib_files):
5775 Avoid making a copy if it's the same as the old version.
5776 (gnulib_files): Add support for this variable (used by Bison).
5777
5778 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5779
5780 * src/getargs.c (usage): Rework to use conventions similar to
5781 coreutils, to make translation a bit easier and the code a bit
5782 smaller. Problem reported by Tim Van Holder.
5783
5784 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
5785
5786 Use some of gnulib's new modules, taken from coreutils.
5787
5788 * bootstrap: Sync from coreutils, except add support for gnulib_files.
5789 * bootstrap.conf: New file.
5790 (gnulib_modules): Add configmake, inttypes, unistd.
5791 (XGETTEXT_OPTIONS): Add complain, complain_at,
5792 fatal, fatal_at, warn, warn_at, unexpected_end.
5793 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
5794 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
5795 (gl_EARLY): Add.
5796 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
5797 (gl_INIT): Add
5798 (GNULIB_AUTOCONF_SNIPPET): Remove.
5799 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
5800 the pickiest.
5801 * lib/.cvsignore: Add inttypes_.h.
5802 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
5803 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
5804 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
5805 no-longer-necessary initializations.
5806 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
5807 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
5808 use the unistd module.
5809 * src/system.h: Likewise.
5810 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
5811 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
5812 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
5813 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
5814 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
5815 * src/system.h: Include inttypes.h unconditionally, now that we
5816 use the inttypes module. Don't bother to include stdint.h, since
5817 inttypes.h now does that for us.
5818 (LOCALEDIR): Remove, now that we use the configmake module.
5819 * src/getargs.c: Include configmake.h.
5820 * src/main.c: Likewise.
5821 * src/output.c: Likewise.
5822 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
5823 not from $abs_top_builddir, since config.h moved.
5824
5825
5826 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
5827 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
5828
5829 * src/parse-gram.y (symbol_declaration): Don't put statements
5830 before declarations; it's not portable to C89.
5831 * src/scan-code.l (handle_action_at): Likewise.
5832
5833 * src/scan-code.l: Always initialize braces_level; the old code
5834 left it uninitialized and therefore had undefined behavior.
5835
5836 Don't attempt to redefine 'assert', since it runs afoul of
5837 systems where standard headers (mistakenly) include <assert.h>.
5838 Instead, define and use our own alternative, called 'aver'.
5839 * src/reader.c: Don't include assert.h, since we no longer
5840 use assert.
5841 * src/scan-code.l: Likewise.
5842 * src/system.h (assert): Remove, replacing with....
5843 (aver): New function, taking a bool arg. All uses changed.
5844 * src/tables.c (pack_vector): Ensure that aver arg is bool,
5845 not merely an integer.
5846
5847 2006-09-15 Bob Rossi <bob@brasko.net>
5848
5849 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
5850 * data/c.m4 (YYPUSH): New.
5851 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
5852 * src/getargs.c (push_parser): New var.
5853 * src/getargs.h (push_parser): New declaration.
5854 * src/output.c (prepare): Add macro insertion of `push_flag'.
5855 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
5856 (prologue_declaration): Parse %push-parser.
5857 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
5858 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
5859 list of removed lines from the traces observed.
5860 (AT_CHECK_CALC_LALR): Added push parser tests.
5861
5862 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
5863
5864 * NEWS: Version 2.3a.
5865 * configure.ac (AC_INIT): Likewise.
5866
5867 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
5868 "#define YYSTYPE int" that caused "make maintainer-check" to fail
5869 due to header ordering dependencies. I don't know why the #define
5870 was there.
5871
5872 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
5873 runtime cost when YYDEBUG is not defined, and so that some tests
5874 that used to fail now work. Problem and initial suggestion by
5875 Paolo Bonzini.
5876 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
5877 * data/glr.cc (b4_parser_class_name):
5878 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
5879 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
5880 (yydebug_) [YYDEBUG]: New member.
5881 (yycdebug_): Now defined only if YYDEBUG.
5882 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
5883 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
5884 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
5885 if YYYDEBUG.
5886 (debug_stream, set_debug_stream, debug_level, set_debug_level):
5887 Define only if YYDEBUG.
5888 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
5889 set_debug_level.
5890 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
5891 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
5892 AT_CHECK_CALC_GLR_CC that are working now.
5893
5894 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
5895
5896 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
5897 We don't need them in glr.cc, and glr.c defines them.
5898 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
5899 assumes that defining it to anything is the same as defining
5900 it to 1. Problem reported by Paolo Bonzini.
5901
5902 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
5903
5904 * data/c.m4 (b4_null, b4_case): Define.
5905 * src/output.c (prepare_symbols): Use b4_null.
5906 (user_actions_output): Use b4_case.
5907
5908 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
5909
5910 * data/glr.c (b4_shared_declarations): Put start-header first,
5911 before any #includes that we generate, so that feature-test
5912 macros work. Problem reported by Michael Deutschmann in
5913 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
5914 * data/lalr1.cc: Likewise.
5915 * doc/bison.texinfo (Prologue): Document that feature-test macros
5916 should be defined before any Bison declarations.
5917 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
5918 that depend on location.hh after, not before, Bison decls, since
5919 we now include location.hh after the first user prologue.
5920
5921 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
5922 Sander Brandenburg in
5923 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
5924 Also, fix minor white space and comment issues.
5925 (Prologue): Mention that it's better to define feature-test macros
5926 before Bison declarations. Problem reported by Michael Deutschmann.
5927
5928 * README-cvs: Fix typo: "&" should be "&&". Problem reported
5929 by Jim Meyering.
5930 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
5931 This adjusts to recent gnulib changes.
5932
5933 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5934
5935 Finish implementation of per-type %destructor/%printer. Discussed
5936 starting at
5937 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
5938 and
5939 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
5940 * NEWS (2.3+): Add a description of this feature to the default
5941 %destructor/%printer description.
5942 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
5943 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5944 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
5945 list node contains a semantic type.
5946 * src/symtab.c, src/symtab.h: Extend with a table that associates
5947 semantic types with their %destructor's and %printer's.
5948 (semantic_type_from_uniqstr, semantic_type_get,
5949 semantic_type_destructor_set, semantic_type_printer_set): New functions
5950 composing the public interface of that table.
5951 (symbol_destructor_get, symbol_destructor_location_get,
5952 symbol_printer_get, symbol_printer_location_get): If there's no
5953 per-symbol %destructor/%printer, look up the per-type before trying
5954 the default.
5955 * tests/actions.at (Per-type %printer and %destructor): New test case.
5956 * tests/input.at (Default %printer and %destructor redeclared):
5957 Extend to check that multiple occurrences of %symbol-default in a
5958 single %destructor/%printer declaration is an error.
5959 (Per-type %printer and %destructor redeclared, Unused values with
5960 per-type %destructor): New test cases.
5961
5962 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5963
5964 Require default %destructor/%printer to be declared using
5965 %symbol-default instead of an empty symbol list, and start working on
5966 new per-type %destructor/%printer. Discussed at
5967 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
5968 * NEWS (2.3+): Add %symbol-default to example.
5969 * bison.texinfo (Freeing Discarded Symbols): Likewise.
5970 (Table of Symbols): Add entry for %symbol-default.
5971 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
5972 (generic_symlist, generic_symlist_item): New nonterminals for creating
5973 a list in which each item is a symbol, semantic type, or
5974 %symbol-default.
5975 (grammar_declaration): Use generic_symlist in %destructor and %printer
5976 declarations instead of symbols.1 or an empty list.
5977 (symbol_declaration, precedence_declaration, symbols.1): Update actions
5978 for changes to symbol_list.
5979 * src/reader.c: Update for changes to symbol_list.
5980 * src/scan-code.l: Likewise.
5981 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
5982 * src/symlist.c, src/symlist.h: Extend such that a list node may
5983 represent a semantic type or a %symbol-default in addition to just an
5984 ordinary symbol. Add switched functions for setting %destructor's and
5985 %printer's.
5986 * tests/actions.at, tests/input.at: Add %symbol-default to all default
5987 %destructor/%printer declarations.
5988
5989 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
5990
5991 Whether the default %destructor/%printer applies to a particular symbol
5992 isn't a question of whether the user *declares* that symbol (in %token,
5993 for example). It's a question of whether the user by any means
5994 *defines* the symbol at all (by simply using a char token, for
5995 example). $end is defined by Bison whereas any other token with token
5996 number 0 is defined by the user. The error token is always defined by
5997 Bison regardless of whether the user declares it with %token, but we
5998 may one day let the user define error as a nonterminal instead.
5999 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6000 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6001 the meaning of "user-defined".
6002 * tests/actions.at (Default %printer and %destructor for user-declared
6003 end token): Rename to...
6004 (Default %printer and %destructor for user-defined end token): ...
6005 this.
6006
6007 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6008 computation of whether to apply the default, don't maintain a list of
6009 every Bison-defined symbol. Instead, just check for a first character
6010 of '$', which a user symbol cannot have, and check for the error token.
6011
6012 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6013
6014 Don't apply the default %destructor or %printer to the error token,
6015 $undefined, or $accept. This change fits the general rule that the
6016 default %destructor and %printer are only for user-declared symbols,
6017 and it solves several difficulties that are described in the new test
6018 cases listed below.
6019 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6020 * tests/actions.at (Default %printer and %destructor are not for error
6021 or $undefined, Default %printer and %destructor are not for $accept):
6022 New test cases.
6023
6024 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6025
6026 Allow %start after the first rule.
6027 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6028 when parsing the first rule.
6029 (check_and_convert_grammar): Search for it here after all grammar
6030 declarations have been parsed. Skip midrules, which have dummy LHS
6031 nonterminals.
6032 * src/symtab.c (symbol_is_dummy): New function.
6033 * src/symtab.h (symbol_is_dummy): Declare it.
6034 * tests/input.at (%start after first rule): New test.
6035
6036 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6037
6038 Redo some of the previous commit: add back the ability to use
6039 non-aliased/undeclared string literals since it might be useful to
6040 those declaring %token-table.
6041 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6042 commit: don't worry about complaints from symbols_pack.
6043 * src/symtab.c (symbol_new, symbol_class_set,
6044 symbol_check_alias_consistency): Undo changes in previous commit: count
6045 each string literal as a new symbol and token, assign it a symbol
6046 number, and don't complain about non-aliased string literals.
6047 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6048 and token counts but does still set aliased tokens to the same number,
6049 symbol_pack_processor now leaves empty slots in the symbols array.
6050 Remove those slots.
6051 * tests/regression.at (Undeclared string literal): Remove test case
6052 added in previous commit since non-aliased string literals are allowed
6053 again.
6054 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6055 remove unnecessary string literal declarations.
6056 * tests/sets.at (Firsts): Likewise.
6057
6058 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6059
6060 Don't allow an undeclared string literal, but allow a string literal to
6061 be used before its declaration.
6062 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6063 symbols_pack complained.
6064 * src/symtab.c (symbol_new): Don't count a string literal as a new
6065 symbol.
6066 (symbol_class_set): Don't count a string literal as a new token, and
6067 don't assign it a symbol number since symbol_make_alias does that.
6068 (symbol_make_alias): It's not necessary to decrement the symbol and
6069 token counts anymore. Don't assume that an alias declaration occurs
6070 before any uses of the identifier or string, and thus don't assert that
6071 one of them has the highest symbol number so far.
6072 (symbol_check_alias_consistency): Complain if there's a string literal
6073 that wasn't declared as an alias.
6074 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6075 symbol_pack asserts that every token has been assigned a symbol number
6076 although undeclared string literals have not.
6077 * tests/regression.at (String alias declared after use, Undeclared
6078 string literal): New test cases.
6079 (Characters Escapes, Web2c Actions): Declare string literals as
6080 aliases.
6081 * tests/sets.at (Firsts): Likewise.
6082
6083 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6084
6085 In the grammar scanner, STRING_FINISH unclosed constructs and return
6086 them to the parser in order to improve error messages.
6087 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6088 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6089 * tests/input.at (Unclosed constructs): New test case.
6090 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6091 seen.
6092
6093 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6094 unused global.
6095
6096 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6097
6098 Handle string aliases for character tokens correctly.
6099 * src/symtab.c (symbol_user_token_number_set): If the token has an
6100 alias, check and set its alias's user token number instead of its own,
6101 which is set to indicate the alias. Previously, every occurrence of
6102 the character token in the grammar overwrote that alias indicator with
6103 the character code.
6104 * tests/input.at (String aliases for character tokens): New test.
6105
6106 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6107
6108 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6109
6110 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6111
6112 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6113 to prevent failures when building on older platforms.
6114 Check for autopoint failure.
6115 Set XGETTEXT_OPTIONS to values that check for C format strings,
6116 so that translators are warned about them (this also helps
6117 prevent core dumps).
6118
6119 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6120 function, since it simplifies our code a bit.
6121
6122 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6123 rather than -W, so we don't get bogus warnings about sign comparisons.
6124 Add -Wpointer-arith, since that warning is useful (it reports code
6125 that does not conform to C89 and that some compilers reject).
6126 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6127 since it's no longer needed.
6128
6129 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6130
6131 Clean up scanners a bit.
6132 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6133 definitions so gcc won't warn when obstack_for_string is unused.
6134 * src/scan-code.l: config.h and system.h are already #include'd by
6135 scan-code-c.c, so get rid of them here.
6136 * src/scan-gram.l: Likewise.
6137 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6138 definitions rather than duplicating the rest of it.
6139 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6140
6141 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6142
6143 Suppress signed/unsigned comparison warnings for yycheck.
6144 * data/c.m4 (b4_safest_int_type): New macro.
6145 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6146 a signed int type, cast it to b4_safest_int_type first.
6147 * data/yacc.c: Likewise.
6148 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6149 also overwritten.
6150
6151 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6152
6153 * doc/bison.texinfo: Fix some typos.
6154
6155 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6156
6157 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6158 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6159
6160 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6161 the latest gnulib does this a different way.
6162 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6163 translation was patched, so stop omitting it.
6164
6165 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6166
6167 Enable declaration of default %printer/%destructor. Make the parser
6168 use these for all user-declared grammar symbols for which the user does
6169 not declare a specific %printer/%destructor. Thus, the parser uses it
6170 for token 0 if the user declares it but not if Bison generates it as
6171 $end. Discussed starting at
6172 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6173 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6174 and
6175 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6176 * NEWS (2.3+): Mention.
6177 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6178 declare a %destructor for a mid-rule's semantic value. It's just
6179 impossible to declare one specific to it.
6180 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6181 code. Describe default %destructor form.
6182 * src/parse-gram.y (grammar_declaration): Parse default
6183 %printer/%destructor declarations.
6184 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6185 and symbol_destructor_location_get rather than accessing the destructor
6186 and destructor_location members of struct symbol.
6187 (symbol_printers_output): Likewise but for %printer's.
6188 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6189 again.
6190 * src/symtab.c (default_destructor, default_destructor_location,
6191 default_printer, default_printer_location): New static global
6192 variables to record the default %destructor and %printer.
6193 (symbol_destructor_get, symbol_destructor_location_get,
6194 symbol_printer_get, symbol_printer_location_get): New functions to
6195 compute the appropriate %destructor and %printer for a symbol.
6196 (default_destructor_set, default_printer_set): New functions to set the
6197 default %destructor and %printer.
6198 * src/symtab.h: Prototype all those new functions.
6199 * tests/actions.at (Default %printer and %destructor): New test to
6200 check that the right %printer and %destructor are called, that they're
6201 not called for $end, and that $$ and @$ work correctly.
6202 (Default %printer and %destructor for user-declared end token): New
6203 test to check that the default %printer and %destructor are called for
6204 a user-declared end token.
6205 * tests/input.at (Default %printer and %destructor redeclared, Unused
6206 values with default %destructor): New tests to check related grammar
6207 warnings and errors.
6208
6209 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6210
6211 Clean up handling of %destructor for the end token (token 0).
6212 Discussed starting at
6213 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6214 and
6215 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6216
6217 Make the skeletons consistent in how they pop the end token and invoke
6218 its %destructor.
6219 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6220 state, which has token number 0, since this would invoke the
6221 %destructor for the end token.
6222 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6223 until after shifting the end token, or else it won't be popped.
6224 * data/yacc.c (yyparse): Likewise.
6225
6226 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6227 it's the end token. Upon termination, destroy an unshifted lookahead
6228 even when it's the end token.
6229 * data/lalr1.cc (yy::parser::parse): Likewise.
6230 * data/yacc.c (yyparse): Likewise.
6231
6232 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6233 value warnings for the end token when the user gives the end token a
6234 %destructor.
6235
6236 * tests/actions.at (Printers and Destructors): Test all the above.
6237
6238 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6239
6240 Update to latest gnulib and gettext versions.
6241 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6242 Add fopen-safer.
6243 (gnulib_files): Add m4/warning.m4. Don't worry about files
6244 overwritten by autopoint.
6245 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6246 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6247 rejects them.
6248 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6249 so that we can remove the intl files at a better time.
6250 (intl_files_to_remove): Remove aclocal.m4, since it gets
6251 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6252 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6253 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6254 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6255 Remove datarootdir hack; no longer needed.
6256 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6257 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6258 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6259 strdup.h.
6260 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6261 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6262
6263 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
6264
6265 * bootstrap: Adjust to today's change to gnulib-tool by invoking
6266 it with --assume-autoconf='latest-stable'.
6267
6268 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
6269
6270 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6271 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6272 YYSTYPE' and `{'.
6273 * src/muscle_tab.h (muscle_grow): Replace the header comments with
6274 those from muscle_tab.c since the old ones are misleading.
6275
6276 2006-07-13 Akim Demaille <akim@epita.fr>
6277
6278 Support %define "KEY" {VALUE}.
6279 * src/scan-code.h, src/scan-code.l (translate_action)
6280 (translate_rule_action, translate_symbol_action, translate_code):
6281 Return char *, not const char *.
6282 * src/parse-gram.y (declaration): Rename as...
6283 (prologue_declaration): this.
6284 (string_content): Remove this nonterminal, use STRING.
6285 (braceless, content, content.opt): New nonterminal.
6286 Use them.
6287 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6288 as value.
6289 * src/scan-gram.l (getargs.h): Don't include it.
6290
6291 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
6292
6293 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6294 rather than a for-loop that declares a local bool variable. This
6295 should work around a compatibility problem with a Cray x1e C++
6296 compiler reported by Hung Nguyen in
6297 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6298 The for-loop was introduced in the 2004-11-17 change but I don't
6299 know why it was needed.
6300
6301 2006-07-12 Akim Demaille <akim@epita.fr>
6302
6303 * data/c.m4: Comment changes.
6304
6305 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
6306
6307 * src/complain.c (error_message, ERROR_MESSAGE): New.
6308 To factor...
6309 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6310 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6311
6312 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6313
6314 * NEWS: Instead of %union, you can define and use your own union type
6315 YYSTYPE if your grammar contains at least one <type> tag.
6316 Your YYSTYPE need not be a macro; it can be a typedef.
6317 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6318 (Union Decl, Decl Summary): Document this.
6319 * data/glr.c (YYSTYPE): Implement this.
6320 * data/glr.cc (YYSTYPE): Likewise.
6321 * data/lalr1.cc (YYSTYPE): Likewise.
6322 * data/yacc.c (YYSTYPE): Likewise.
6323 * src/output.c (prepare): Output tag_seen_flag.
6324 * src/parse-gram.y (declaration, grammar_declaration):
6325 Use 'union_seen' rather than 'typed' to determine whether
6326 %union has been seen, since grammars can now be typed without
6327 %union.
6328 (symbol_declaration, type.opt, symbol_def):
6329 Keep track of whether a tag has been seen.
6330 * src/reader.c (union_seen, tag_seen): New vars.
6331 (typed): remove.
6332 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6333 * src/scan-code.l (untyped_var_seen): New variable.
6334 (handle_action_dollar): Adjust to above changes.
6335 (handle_action_dollar, handle_action_at):
6336 Improve overflow checking for outlandish numbers.
6337 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6338 avoid new diagnostics generated by above changes.
6339 * tests/regression.at (YYSTYPE typedef): Add test to check
6340 for type tags without %union.
6341
6342 * src/symlist.c (symbol_list_length): Return int, not unsigned
6343 int, since callers expect int. This may need to get revisited
6344 once we have proper integer overflow checking.
6345
6346 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6347 object is now static.
6348
6349 * src/getargs.c (flags_argmatch): Return void, not int,
6350 to pacify ./configure --enable-gcc-warnings.
6351
6352 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6353 since last_string is already defined to FLEX_PREFIX (last_string).
6354
6355 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6356
6357 Implement --warnings/-W.
6358 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6359 replaced by...
6360 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6361 Adjust callers.
6362 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6363 (warnings_args, warnings_types): New.
6364 (getargs, short_options, long_options): Accept -W/--warnings.
6365 Sort the options by alphabetical order, upper case letter right
6366 before its lower case.
6367
6368 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6369
6370 Change %merge result type clash warnings to errors. Discussed at
6371 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6372 * src/reader.c (record_merge_function_type): Use complain_at.
6373 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6374 declared later): Update test case results.
6375
6376 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6377
6378 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6379 to be in alphabetical order.
6380 (trace_args): Spelling fixes.
6381
6382 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6383
6384 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6385 so they don't collide with user-defined macros.
6386 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6387 this was never guaranteed, and now that we're using gnulib stdint,
6388 which defines int_fast16_t to long int, the problem is exposed.
6389
6390 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6391
6392 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6393 need the full POSIX semantics (and weren't implementing them
6394 anyway).
6395
6396 Adjust to Autoconf 2.60 and today's gnulib.
6397 * bootstrap (gnulib_modules): Add stdint.
6398 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6399 no longer copies it.
6400 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6401 since stdint needs the former and wcwidth (which is now required
6402 by mbswidth) needs the latter.
6403 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6404 work around a compatibility glitch between gettext 0.14.6 and
6405 Autoconf 2.60.
6406 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6407 Do not check for uintptr_t, since new stdint module does the right
6408 thing.
6409 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6410 Add stdint.h, stdint_.h, wcwidth.h.
6411 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6412 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6413 stdint.m4, wchar_t.m4, wcwidth.m4.
6414 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6415 usual order for ../lib/*.h files.
6416 (file_name_split): Use last_component, not base_name, to adjust
6417 to gnulib changes.
6418 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6419 for ../lib/*.h files.
6420 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6421 Define unconditionally, since we now assume the stdint module.
6422 * src/scan-skel.l: Include <dirname.h>.
6423 (BASE_QPUTS): Use last_component, not base_name.
6424 * src/system.h: Include <unlocked-io.h> in the usual order
6425 for ../lib/*.h files. Include <stdint.h> unconditionally,
6426 since we now use the stdint module.
6427 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6428 HAVE_UINTPTR_T, since we now use the stdint module.
6429 (base_name): Remove decl, since files now include <dirname.h>
6430 to get the decl.
6431
6432 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6433
6434 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6435 New, default to 1.
6436 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6437 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6438 default.
6439 * tests/calc.at: Adjust.
6440
6441 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6442
6443 * data/c.m4 (b4_basename): New.
6444 (b4_syncline): Also output the location of its invocation (from
6445 the skeleton).
6446 (b4_user_action, b4_define_user_action, b4_user_actions)
6447 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6448 (b4_user_stype): New.
6449 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6450
6451 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6452
6453 In the grammar file, the first column is 1 not 0 on the first line as
6454 on every other line.
6455 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6456 * tests/input.at (Torturing the Scanner): Update output.
6457
6458 * src/scan-gram.l (scanner_cursor): Declare it static.
6459
6460 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6461
6462 In warnings, say "previous declaration" rather than "first
6463 declaration".
6464 * src/symtab.c (redeclaration): Do that here.
6465 * src/reader.c (record_merge_function_type): In the case of a result
6466 type clash, report the previous declaration rather than the very first
6467 one in the grammar file.
6468 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6469 declared later): Add a third declaration to check this behavior.
6470 * tests/input.at (Incompatible Aliases): Update output.
6471
6472 2006-06-27 Akim Demaille <akim@epita.fr>
6473
6474 * doc/Doxyfile.in: New.
6475 * doc/Makefile.am: Use it.
6476 * src/lalr.h, src/symtab.h: Initial doxygenation.
6477
6478 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6479
6480 Don't miss %merge result type warnings just because the LHS types are
6481 declared after the %merge. This continues the effort of the previous
6482 patch.
6483 * src/reader.c (get_merge_function): Don't set the merger type yet.
6484 (record_merge_function_type): New function for setting the merger type
6485 and checking for clashes.
6486 (grammar_current_rule_merge_set): Set the location of the %merge for
6487 the current rule.
6488 (packgram): Invoke record_merge_function_type for each rule now that
6489 all symbol type declarations have been parsed.
6490 * src/reader.h (merger_list.type_declaration_location): New member
6491 storing the location of the first %merge from which the type for this
6492 merging function was derived.
6493 * src/symlist.h (symbol_list.merger_declaration_location): New member
6494 storing the location of a rule's %merge, if any.
6495 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6496 declared later): New test to catch the error fixed by the above patch.
6497
6498 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6499
6500 Get action warnings (grammar_rule_check) right even when symbol
6501 declarations appear after the rules. Discussed at
6502 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6503 and
6504 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6505 Don't mistake the type of $$ in a midrule to be that of its parent
6506 rule's $$.
6507 * src/reader.c (grammar_current_rule_end): Don't invoke
6508 grammar_rule_check yet since not all symbol declarations may have been
6509 parsed yet.
6510 (grammar_midrule_action): Likewise.
6511 Don't record whether the midrule's $$ has been used yet since actions
6512 haven't been translated yet.
6513 Record the midrule's parent rule and its RHS index within the parent
6514 rule.
6515 (grammar_current_rule_action_append): Don't translate the action yet
6516 since not all symbol declarations may have been parsed yet and, thus,
6517 warnings about types for $$, $n, @$, and @n can't be reported yet.
6518 (packgram): Translate the action and invoke grammar_rule_check now that
6519 all symbol declarations have been parsed.
6520 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6521 after parsing the entire grammar file, the symbol list here in the case
6522 of a midrule is actually the midrule's empty RHS, so reference its
6523 parent rule's RHS where necessary.
6524 On the other hand, now that you can already know it's a midrule, you
6525 aren't forced to think $$ has the same type as its parent rule's $$.
6526 (handle_action_at): In the case of a midrule, reference the parent rule
6527 where necessary.
6528 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6529 members.
6530 (symbol_list_length): Now that this is invoked after all rules have
6531 been parsed, a NULL symbol (rather than a NULL symbol list node)
6532 terminates a rule. symbol_list_print already does this correctly.
6533 * src/symlist.h (symbol_list.midrule_parent_rule,
6534 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6535 remember their relationships with their parents.
6536 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6537 fixed by the above patch.
6538 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6539 implementing...
6540 (Unused values): ... this old test case and...
6541 (Unused values before symbol declarations): ... this new test case.
6542 This one is the same as `Unused values' except that all symbol
6543 declarations appear after the rules in order to catch the rest of the
6544 errors fixed by the above patch.
6545
6546 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6547
6548 More cleanup.
6549 * src/reader.c (current_rule): Declare it static since it's no longer
6550 used outside this file.
6551 (grammar_current_rule_action_append): Remove redundant arguments from
6552 translate_rule_action invocation.
6553 * src/reader.h (current_rule): Remove this unused extern.
6554 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6555 * src/scan-code.l (translate_rule_action): Likewise.
6556
6557 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6558
6559 Clean up yesterday's patch.
6560 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6561 to...
6562 * src/reader.c (grammar_current_rule_action_append): ... here for
6563 consistency with grammar_current_rule_symbol_append.
6564 * tests/regression.at (Braced code in declaration in rules section):
6565 Make yyerror and yylex static as usual.
6566
6567 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6568
6569 Fix bug that mistakes braced code in a declaration in the rules section
6570 to be a rule action. Mentioned at
6571 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6572 * src/scan-gram.l: Move midrule action detection from the start of the
6573 scanning of any braced code to...
6574 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6575 action. For readability, use $2 and @2 rather than the equivalent
6576 global variables.
6577 * tests/regression.at (Braced code in declaration in rules section):
6578 New test to catch the error fixed by the above patch.
6579
6580 Work on code readability some.
6581 * src/scan-code.l (current_rule): Get rid of this misleading and
6582 redundant declaration: it's actually extern'ed in reader.h.
6583 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6584 translate_action): Add a rule argument and use it instead of the global
6585 current_rule.
6586 (translate_rule_action): This already receives current_rule through an
6587 argument, so pass it on to translate_action instead of assigning
6588 current_rule to current_rule.
6589 (translate_symbol_action, translate_code): Pass rule = NULL to
6590 translate_action.
6591
6592 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6593
6594 Rename %before-definitions to %start-header and %after-definitions to
6595 %end-header. Don't use these declarations to separate pre-prologue
6596 blocks from post-prologue blocks. Add new order-independent
6597 declarations %before-header and %after-header as alternatives to the
6598 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6599 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6600 * NEWS (2.3+): Update for these changes.
6601 * data/glr.c (b4_before_definitions): Update to...
6602 (b4_start_header): ... this.
6603 (b4_after_definitions): Update to...
6604 (b4_end_header): ... this.
6605 * data/glr.cc: Likewise.
6606 * data/lalr1.cc: Likewise.
6607 * data/yacc.c: Likewise.
6608 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6609 prologue blocks with %*-header declarations.
6610 (Calc++ Parser): Likewise.
6611 (Decl Summary): Update names.
6612 (Table of Symbols): Update description.
6613 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6614 (PERCENT_END_HEADER): ... this.
6615 (PERCENT_BEFORE_DEFINITIONS): Update to...
6616 (PERCENT_START_HEADER): ... this.
6617 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6618 (declaration): Update token names and m4 macro names.
6619 When parsing %end-header and %start-header, invoke translate_code
6620 before muscle_code_grow, and no longer set global booleans to remember
6621 whether these declarations have been seen.
6622 Parse new %after-header and %before-header.
6623 * src/reader.c (before_definitions, after_definitions): Remove.
6624 (prologue_augment): Accept a new bool argument to specify whether to
6625 augment the pre-prologue or post-prologue.
6626 * src/reader.h (before_definitions, after_definitions): Remove these
6627 extern's.
6628 (prologue_augment): Add new bool argument.
6629 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6630 (PERCENT_END_HEADER): ... this.
6631 (PERCENT_BEFORE_DEFINITIONS): Update to...
6632 (PERCENT_START_HEADER): ... this.
6633 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6634 * tests/actions.at (Printers and Destructors): Update names.
6635
6636 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6637
6638 Add comparison operators for C++ location classes. Discussed at
6639 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6640 * data/c++.m4 (b4_define_location_comparison): New boolean %define
6641 declaration indicating whether filename_type has an operator==. If
6642 filename_type is `std::string', it defaults to `1', `0' otherwise.
6643 * data/location.cc: Iff b4_define_location_comparison is `1', add
6644 operator== and operator!= for class position and for class location.
6645
6646 Some minor fixes.
6647 * src/scan-action.l: Remove unused file.
6648 * src/symtab.c (symbol_printer_set): Use printer_location not
6649 destructor_location.
6650 * src/symtab.h (struct symbol): Replace incorrect source comment for
6651 printer members.
6652 * tests/input.at (Incompatible Aliases): Update output with correct
6653 printer location.
6654
6655 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
6656
6657 Don't put the pre-prologue in the header file. For the yacc.c code
6658 file and the glr.c header and code files, move the pre-prologue before
6659 the token definitions. Add new %before-definitions and
6660 %after-definitions to declare code that will go in both the header file
6661 and code file. Discussed at
6662 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
6663 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
6664 and
6665 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
6666 * NEWS (2.3+): Describe these changes.
6667 * data/glr.c (b4_pre_prologue): Move from within to before...
6668 (b4_shared_declarations): ... this.
6669 Add new b4_before_definitions before b4_token_enums.
6670 Add new b4_after_definitions at the end.
6671 * data/glr.cc (b4_pre_prologue): Replace with...
6672 (b4_before_definitions): ... this in the header file.
6673 (b4_after_definitions): New near the end of the header file.
6674 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
6675 code file right before including the header file.
6676 (b4_before_definitions): New in the previous position of
6677 b4_pre_prologue in the header file.
6678 (b4_after_definitions): New near the end of the header file.
6679 * data/yacc.c: Clean up some m4 quoting especially in the header file.
6680 (b4_token_enums_defines): In the code file, move to right before
6681 YYSTYPE for consistency with the header file.
6682 (b4_before_definitions): New right before b4_token_enums_defines in
6683 both the header and code file.
6684 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
6685 header and code file.
6686 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
6687 of prologues for %union dependencies.
6688 (Decl Summary): In %defines description, mention the effect of
6689 %before-definitions and %after-definitions on the header file.
6690 (Calc++ Parser): Forward declare driver in a %before-definitions rather
6691 than in the pre-prologue so that make check succeeds.
6692 (Table of Symbols): Add entries for %before-definitions and
6693 %after-definitions.
6694 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
6695 %before-definitions.
6696 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
6697 (declaration): Parse those declarations and append to
6698 b4_before_definitions and b4_after_definitions, respectively.
6699 * src/reader.c (before_definitions, after_definitions): New bools to
6700 track whether those declarations have been seen.
6701 (prologue_augment): Add to the post-prologue if %union,
6702 %before-definitions, or %after-definitions has been seen.
6703 * src/reader.h (before_definitions, after_definitions): New extern's.
6704 * src/scan-gram.l: Scan the new declarations.
6705 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
6706 prologue block in a %before-definitions or a %after-definitions based
6707 on whether the %union is declared.
6708 * tests/regression.at (Early token definitions with --yacc, Early token
6709 definitions without --yacc): Move tests for token definitions into the
6710 post-prologue since token names are no longer defined in the
6711 pre-prologue.
6712
6713 2006-06-20 Akim Demaille <akim@epita.fr>
6714
6715 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
6716 (symbol_get): Use it.
6717 * src/parse-gram.y: Use it.
6718
6719 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
6720
6721 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
6722 build succeeds when configured with --enable-gcc-warnings.
6723
6724 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
6725
6726 * src/parse-gram.y (char_name): New function.
6727 (CHAR, STRING, string_content): For %printer, properly escape.
6728 (ID): Prefer fputs to fprintf.
6729 (id): Reindent to be consistent with other rules.
6730 Properly quote char.
6731
6732 The Translation Project changed its way of publishing translations
6733 to maintainers. I haven't received any responses to my request
6734 for supporting the old way, or for documenting the new way. I
6735 have modified 'bootstrap' to use screen scraping
6736 (in this case, HTML scraping). This is unreliable and inelegant,
6737 but I don't see any better way. Yuck.
6738 * bootstrap (TP_URL, WGET_COMMAND): New vars.
6739 (get_translations): New function, which uses HTML scraping to
6740 deduce locations of latest translations.
6741 Use this function to grab both bison and bison-runtime .po files.
6742 Don't bother priming the pump for the runtime-po domain any more,
6743 as it's now translated better than bison is.
6744
6745 2006-06-19 Akim Demaille <akim@epita.fr>
6746
6747 * src/scan-gram.l: No longer "parse" things after `%union' until
6748 `{'. Rather, return a single "%union" token.
6749 No longer make symbols: return strings, and leave the conversion
6750 to symbols to the parser.
6751 (SC_PRE_CODE, token_type): Remove.
6752 * src/parse-gram.y (%union): New field `character'.
6753 Sort tokens.
6754 (CHAR): New token.
6755 (ID, ID_COLON): Now that the scanner no longer makes them
6756 identifiers, adjust all uses to invoke symbol_get.
6757 (id_colon): New, wraps the conversion from string to symbol.
6758 (%union): Accept a possible union_name.
6759 (symbol): Now can be a char.
6760 * data/c.m4 (b4_union_name): Leave a default value.
6761 * data/glr.c, data/yacc.c: Use it.
6762
6763 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
6764
6765 For associating token numbers with token names for "yacc.c", don't use
6766 #define statements unless `--yacc' is specified; always use enum
6767 yytokentype. Most important discussions start at:
6768 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
6769 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
6770 and
6771 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
6772 * NEWS (2.3+): Mention.
6773 * data/c.m4 (b4_yacc_if): New.
6774 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
6775 token #define's.
6776 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
6777 on token name definitions.
6778 * src/getargs.c (usage): Capitalize `Yacc' in English.
6779 * src/output.c (prepare): Define b4_yacc_flag.
6780 * tests/regression.at (Early token definitions): Test that tokens names
6781 are defined before the pre-prologue not just before the post-prologue.
6782 Remove this test case and copy to...
6783 (Early token definitions with --yacc): ... this to test #define's.
6784 (Early token definitions without --yacc): ... and this to test enums.
6785
6786 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
6787
6788 * NEWS: Reword the post-2.3 change to not be so optimistic about
6789 removing the old "look-ahead" spelling.
6790 Update previous look-ahead/lookahead change reports.
6791 * REFERENCES: look-ahead -> lookahead (since that's
6792 what he actually wrote).
6793 * doc/refcard.tex: look ahead -> lookahead,
6794 look-ahead -> lookahead
6795
6796 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
6797
6798 For consistency, use `lookahead' instead of `look-ahead' or
6799 `look_ahead'. Discussed starting at
6800 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
6801 and then at
6802 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
6803 * NEWS: For the next release, note the change to `--report'.
6804 * TODO, doc/bison.1: Update English.
6805 * doc/bison.texinfo: Update English.
6806 (Understanding Your Parser, Bison Options): Document as
6807 `--report=lookahead' rather than `--report=look-ahead'.
6808 * src/conflicts.c: Update English in comments.
6809 (lookahead_set): Rename from look_ahead_set.
6810 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
6811 (resolve_sr_conflict): Rename local look_ahead_tokens to
6812 lookahead_tokens, and update other uses.
6813 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
6814 count_rr_conflicts, conflicts_free): Update uses.
6815 * src/getargs.c (report_args): Move "lookahead" before alternate
6816 spellings.
6817 (report_types): Update uses.
6818 (usage): For `--report' usage description, state `lookahead' spelling
6819 rather than `look-ahead'.
6820 * src/getargs.h (report.report_lookahead_tokens): Rename from
6821 report_look_ahead_tokens.
6822 * src/lalr.c: Update English in comments.
6823 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
6824 (state_lookahead_tokens_count): Rename from
6825 state_look_ahead_tokens_count.
6826 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6827 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
6828 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6829 Update other uses.
6830 Update English in output.
6831 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
6832 * src/print.c: Update English in comments.
6833 (lookahead_set): Rename from look_ahead_set.
6834 (print_reduction): Rename argument lookahead_token from
6835 look_ahead_token.
6836 (print_core, state_default_rule, print_reductions, print_results):
6837 Update uses.
6838 * src/print_graph.c: Update English in comments.
6839 (print_core): Update uses.
6840 * src/state.c: Update English in comments.
6841 (reductions_new): Update uses.
6842 (state_rule_lookahead_tokens_print): Rename from
6843 state_rule_look_ahead_tokens_print, and update other uses.
6844 * src/state.h: Update English in comments.
6845 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
6846 (state_rule_lookahead_tokens_print): Rename from
6847 state_rule_look_ahead_tokens_print.
6848 * src/tables.c: Update English in comments.
6849 (conflict_row, action_row): Update uses.
6850 * tests/glr-regression.at
6851 (Incorrect lookahead during deterministic GLR,
6852 Incorrect lookahead during nondeterministic GLR): Rename
6853 print_look_ahead to print_lookahead.
6854 * tests/torture.at: Update English in comments.
6855 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
6856 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
6857 (Many lookahead tokens): Update uses.
6858 * data/glr.c: Update English in comments.
6859 * lalr1.cc: Likewise.
6860 * yacc.c: Likewise.
6861 * src/conflicts.h: Likewise.
6862 * src/lalr.h: Likewise.
6863 * src/main.c: Likewise.
6864 * src/output.c: Likewise.
6865 * src/parse-gram.c: Likewise.
6866 * src/tables.h: Likewise.
6867 * tests/calc.at: Likewise.
6868
6869 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
6870
6871 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
6872
6873 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
6874
6875 * TODO: Add request from Nelson H. F. Beebe to be able to install
6876 Bison without installing the yacc script.
6877
6878 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6879
6880 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
6881 and yytext if they're already #define'd.
6882 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
6883 * src/scan-code-c.c: ... here.
6884 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
6885 <config.h>.
6886
6887 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6888
6889 Get Bison to build again when configured with --enable-gcc-warnings.
6890 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
6891 missing #include's.
6892 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
6893 loc argument as it shadows a global.
6894 * src/scan-gram.l: Remove stray comma that prevents boundary_set
6895 invocation.
6896
6897 * src/.cvsignore: Add scan-code.c.
6898
6899 2006-06-07 Akim Demaille <akim@epita.fr>
6900
6901 * src/scan-gram.l: Move the "add a trailing ; to actions" code
6902 to...
6903 * src/scan-code.l: here.
6904 * tests/input.at (Torturing the Scanner): Fix another location
6905 error.
6906
6907 2006-06-07 Akim Demaille <akim@epita.fr>
6908
6909 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
6910
6911 2006-06-06 Akim Demaille <akim@epita.fr>
6912
6913 Extract the parsing of user actions from the grammar scanner.
6914 As a consequence, the relation between the grammar scanner and
6915 parser is much simpler. We can also split "composite tokens" back
6916 into simple tokens.
6917 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
6918 * src/scan-gram.l (add_column_width, adjust_location): Move to and
6919 rename as...
6920 * src/location.h, src/location.c (add_column_width)
6921 (location_compute): these.
6922 Fix the column count: the initial column is 0.
6923 (location_print): Be robust to ending column being 0.
6924 * src/location.h (boundary_set): New.
6925 * src/main.c: Adjust to scanner_free being renamed as
6926 gram_scanner_free.
6927 * src/output.c: Include scan-code.h.
6928 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
6929 Use boundary_set.
6930 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
6931 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
6932 which is now, again, a separate token.
6933 Adjust all dependencies.
6934 Whereever actions with $ and @ are used, use translate_code.
6935 (action): Remove this nonterminal which is now useless.
6936 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
6937 (grammar_current_rule_action_append): Use translate_code.
6938 (packgram): Bound check ruleno, itemno, and rule_length.
6939 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
6940 (last_string, last_braced_code_loc, max_left_semantic_context)
6941 (scanner_initialize, scanner_free, scanner_last_string_free)
6942 (gram_out, gram_lineno, YY_DECL_): Move to...
6943 * src/scan-gram.h: this new file.
6944 (YY_DECL): Rename as...
6945 (GRAM_DECL): this.
6946 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
6947 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6948 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6949 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6950 Move these declarations, and...
6951 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
6952 these to...
6953 * src/flex-scanner.h: this new file.
6954 * src/scan-gram.l (rule_length, rule_length_overflow)
6955 (increment_rule_length): Remove.
6956 (last_braced_code_loc): Rename as...
6957 (gram_last_braced_code_loc): this.
6958 Adjust to the changes of the parser.
6959 Move all the handling of $ and @ into...
6960 * src/scan-code.l: here.
6961 * src/scan-gram.l (handle_dollar, handle_at): Remove.
6962 (handle_action_dollar, handle_action_at): Move to...
6963 * src/scan-code.l: here.
6964 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
6965 scan-code.h, scan-code-c.c, scan-gram.h.
6966 (EXTRA_bison_SOURCES): Add scan-code.l.
6967 (BUILT_SOURCES): Add scan-code.c.
6968 (yacc): Be robust to white spaces.
6969
6970 * tests/conflicts.at, tests/input.at, tests/reduce.at,
6971 * tests/regression.at: Adjust the column numbers.
6972 * tests/regression.at: Adjust the error message.
6973
6974 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6975
6976 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6977 Use Akim's wording from
6978 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
6979
6980 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6981
6982 Between Bison releases, manually append `+' to the previous Bison
6983 release number, and use that as a signal to automatically print the
6984 ChangeLog's CVS Id keyword from --version. Discussed starting at
6985 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
6986 * ChangeLog: Add Id header.
6987 * configure.ac (AC_INIT): Append `+' to `2.3'.
6988 * src/.cvsignore: Add revision.c.
6989 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
6990 (BUILT_SOURCES): Add revision.c.
6991 (revision.c): New target rule. This file defines a new global variable
6992 named revision. It initializes it with either the Id from ChangeLog
6993 or, if VERSION doesn't contain `+', with the empty string.
6994 * src/getargs.c (version): Print the value of revision.
6995 * src/revision.h: Extern revision.
6996
6997 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
6998
6999 * NEWS: Version 2.3.
7000 * configure.ac (AC_INIT): Likewise.
7001
7002 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7003
7004 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7005 with no arguments, not as an object-like macro. This is for
7006 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7007 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7008 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7009 Document this.
7010
7011 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7012
7013 * src/getargs.c (usage): Back out yesterday's modification of the
7014 --help output so that we don't have to wait for translation before
7015 releasing 2.3.
7016
7017 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7018
7019 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7020 Problem reported by Akim Demaille.
7021
7022 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7023
7024 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7025
7026 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7027
7028 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7029 generated source code. Problem reported by Frans Englich in
7030 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7031
7032 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7033
7034 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7035 shell, not within 'make', so that 'make' by an ordinary builder
7036 (using GNU make) does not worry about configuring gzip. This also
7037 works around a bug reported independently by Keith Thompson and by
7038 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7039 stderr rather than stdout, messing up the build logs.
7040
7041 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7042
7043 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7044 to make sure that YYID will never be unused. This fixes a 'make
7045 maintainer-check' failure caused by the recent changes to the 'Trivial
7046 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7047 not used.
7048 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7049
7050 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7051
7052 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7053 state before an empty RHS is always resolved here. Only the location
7054 of that state is guaranteed to be resolved, and that's enough. This
7055 fixes the remaining bug reported by Derek M. Jones in
7056 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7057 * tests/glr-regression.at (Uninitialized location when reporting
7058 ambiguity): Test the above case.
7059 Also, the embedded comments in this test case claim it checks the case
7060 of an empty RHS that has inherited the initial location. However, the
7061 corresponding LHS was already resolved, so yyresolveLocations didn't
7062 actually have reason to modify it. Fix this by forcing
7063 nondeterministic operation at the beginning of the parse.
7064
7065 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7066
7067 * data/c.m4 (b4_yy_symbol_print_generate):
7068 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7069 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7070 of the bugs reported today by Derek M Jones in
7071 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7072 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7073 defined to be a type name without parens or brackets.
7074 (Location Type): Similarly for YYLTYPE.
7075 * tests/regression.at (Trivial grammars): Put in a test for this
7076 bug that will be caught by 'make maintainer-check' (though not,
7077 alas, by 'make check' unless your compiler is picky).
7078
7079 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7080
7081 * NEWS: Version 2.2.
7082 * configure.ac (AC_INIT): Likewise.
7083
7084 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7085
7086 * data/glr.c (yyreportTree): Make room in yystates for the state
7087 preceding the RHS. This fixes the segmentation fault reported by Derek
7088 M. Jones in
7089 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7090 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7091 to the user. Reported for yyreportTree by Derek M. Jones later in the
7092 same thread.
7093 * THANKS: Add Derek M. Jones.
7094 Update my email address.
7095 Fix typo in Steve Murphy's name.
7096
7097 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7098
7099 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7100 checking against YYLAST that caused the parser to miss a potential
7101 alternative in its diagnostic.
7102 Problem reported by Maria Jose Moron Fernandez in
7103 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7104 * data/lalr1.cc (yysyntax_error_): Likewise.
7105 * data/yacc.c (yysyntax_error): Likewise.
7106 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7107 tokens, in case we run into an older C compiler.
7108 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7109 Use them to check for the off-by-one error fixed above.
7110
7111 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7112 YYSIZE_T, not size_t.
7113 * tests/regression.at (Trivial grammars): New test, to catch
7114 the error fixed by the above patch.
7115
7116 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7117
7118 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7119 scheme.
7120 Reported by Steve Murphy.
7121
7122 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7123
7124 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7125 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7126
7127 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7128
7129 Implement --trace=m4.
7130 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7131 * src/output.c (output_skeleton): When set, pass -dV to m4.
7132
7133 Factor the handling of flags in m4.
7134 * src/output.c (prepare): Rename the muscle names debug, defines,
7135 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7136 * data/c.m4: Adjust.
7137 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7138 Use b4_define_flag_if to define other b4_FLAG_if macros.
7139 (b4_location_if): As a consequence, rename as...
7140 (b4_locations_if): this, for consistency.
7141 Adjust all the skeletons.
7142
7143 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7144
7145 * etc/bench.pm: Shorten bench names.
7146
7147 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7148
7149 * src/output.h, src/output.c (error_verbose): Move to...
7150 * src/getargs.h, src/getargs.c: here.
7151 Sort the flags.
7152 Adjust dependencies.
7153
7154 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7155
7156 * data/c.m4 (b4_copyright): Put the special exception for Bison
7157 skeletons here, so we don't have to put it in each skeleton. All
7158 uses changed. Suggested by Akim Demaille. Also, wrap the
7159 copyright notice, in case it is longer than 80 columns. Replace
7160 comma by newline after title.
7161
7162 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7163
7164 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7165 incompatibility, not a bug. Mention that it wasn't fixed as of
7166 flex 2.5.33.
7167
7168 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7169
7170 * examples/extexi: Enforce the precedence of concatenation over
7171 >>.
7172 Reported by Tommy Nordgren.
7173
7174 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7175
7176 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7177 with the member "token".
7178 Reported by Martin Nylin.
7179
7180 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7181
7182 * data/glr.c: Switch to Bison 2.2 special-exception language in
7183 the copyright notice. Use more-regular format for titles and
7184 copyright notices.
7185 * data/glr.cc: Likewise.
7186 * data/location.cc: Likewise.
7187 * data/yacc.cc: Likewise.
7188 * doc/bison.texinfo (Conditions): Document this.
7189 * NEWS: likewise. Upgrade version to 2.2.
7190
7191 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
7192
7193 * data/glr.cc: Remove dead code.
7194
7195 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7196
7197 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7198 that variable and the line breaks the bootstrap. Problem reported
7199 by Juan M. Guerrero.
7200
7201 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7202
7203 * doc/bison.texinfo (Multiple start-symbols): New.
7204
7205 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7206
7207 * etc/README, etc/bench.pl: New.
7208
7209 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
7210
7211 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7212 rule.
7213 Reported by Mickael Labau.
7214 * tests/input.at (Torturing the Scanner): Test it.
7215
7216 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7217
7218 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7219 Problem reported by Bob Rossi.
7220
7221 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7222
7223 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7224 and didn't really work.
7225 For the index, use @ifnotinfo, not @iftex.
7226 Minor cleanups of spacing and terminology.
7227
7228 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7229
7230 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7231 of AT_NAME_PREFIX when %name-prefix is not used.
7232
7233 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7234
7235 Apply --prefix to C++ skeletons too: they change the namespace.
7236 The test suite already exercize these cases.
7237 * data/c++.m4 (b4_namespace): New.
7238 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7239 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7240 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7241 * doc/bison.texinfo: Document it.
7242 (Option Cross Key): Use @multitable in all formats. It looks
7243 nicer, even in TeX outputs.
7244 (Rules): Use the same code whatever the output type is.
7245 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7246 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7247 * tests/calc.at: Use it, instead of hard coding `yy'.
7248
7249 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7250
7251 * TODO: Remove dead items.
7252
7253 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7254
7255 * doc/FAQ: Remove, merged into...
7256 * doc/bison.texinfo (FAQ): this.
7257 * doc/Makefile.am (EXTRA_DIST): Adjust.
7258
7259 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7260
7261 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7262 even if empty.
7263 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7264 * doc/bison.texinfo (Calc++ Scanner): Use it.
7265
7266 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
7267
7268 Fix two nits reported by twlevo, plus one more that I discovered.
7269
7270 * src/assoc.h (assoc_to_string): Give a name to the arg, as
7271 this is the usual Bison style.
7272 * src/location.h (location_print): Likewise.
7273
7274 * src/reader.h (token_name): Likewise.
7275
7276 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7277
7278 Fix some nits reported by twlevo.
7279 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7280 and "POSIX". Use more-modern syntax for URLs. Mention C++
7281 and ask for Java. Don't hardwire OS version numbers. Add
7282 copyright notice.
7283 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7284 * src/conflicts.c (solved_conflicts_obstack): Now static.
7285
7286 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
7287
7288 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7289 page. Say "you can use it" not "you may use it" as on the web page;
7290 we're describing capabilities not granting permission.
7291
7292 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7293
7294 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7295 shadowing warnings. Use usual patter for iterating through RHS.
7296 * tests/glr-regression.at
7297 (Uninitialized location when reporting ambiguity):
7298 Modify yylex so that it uses its argument, rather than trying
7299 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7300 const char -> char const.
7301
7302 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7303 Don't use tabs inside commands; it messes up 'ps'.
7304 Problem reported by twlevo.
7305
7306 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7307
7308 * tests/glr-regression.at (Uninitialized location when reporting
7309 ambiguity): New test case.
7310 * data/glr.c (yyresolveLocations): New function, which uses
7311 YYLLOC_DEFAULT.
7312 (yyresolveValue): Invoke yyresolveLocations before reporting an
7313 ambiguity.
7314 * doc/bison.texinfo (Default Action for Locations): Note
7315 YYLLOC_DEFAULT's usage for ambiguity locations.
7316 (GLR Semantic Actions): Cross-reference those notes.
7317
7318 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7319
7320 * tests/glr-regression.at (Leaked semantic values when reporting
7321 ambiguity): Remove unnecessary union and type declarations.
7322 (Leaked lookahead after nondeterministic parse syntax error): New test
7323 case.
7324 * data/glr.c (yyparse): Check for zero stacks remaining before
7325 attempting to shift the lookahead so that you don't lose it.
7326
7327 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7328
7329 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7330 * tests/glr-regression.at (Leaked semantic values when reporting
7331 ambiguity): New test case.
7332 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7333 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7334 now unnecessary yystackp parameter.
7335 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7336 destructors can be called.
7337
7338 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7339 in existing testcases.
7340
7341 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7342
7343 Don't leak semantic values for parent RHS when a user action cuts the
7344 parser, and clean up related code a bit.
7345 * tests/glr-regression.at (Leaked merged semantic value if user action
7346 cuts parse): Rename to...
7347 (Leaked semantic values if user action cuts parse): ... this. Add check
7348 for leaked parent RHS values.
7349 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7350 between an unresolved state (non-empty chain of semantic options) and
7351 an incomplete one (signaled by an empty chain).
7352 (yyresolveStates): Document the interface. Move all manipulation of a
7353 successfully or unsuccessfully resolved yyGLRState to...
7354 (yyresolveValue): ... here so that yyresolveValue always leaves a
7355 yyGLRState with consistent data and thus is easier to understand.
7356 Remove the yyvalp and yylocp parameters since they are always just
7357 taken from the yys parameter. When reporting a discarded merged value
7358 in debugging output, note that it is incompletely merged. Document the
7359 interface.
7360 (yyresolveAction): If resolving any of the RHS states fails, destroy
7361 them all rather than leaking them. Thus, as long as user actions are
7362 written to clean up the RHS correctly, yyresolveAction always cleans up
7363 the RHS of a semantic option. Document the interface.
7364
7365 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7366
7367 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7368 led to a segmentation fault in GNU Pascal. Problem reported
7369 by Waldek Hebisch.
7370
7371 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7372
7373 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7374 mid-rule action inside a nonterminal symbol in order to declare a
7375 destructor for its semantic value.
7376
7377 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7378
7379 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7380 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7381 __cplusplus && ! defined _STDLIB_H && !
7382 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7383 defined free))]: Include <stdlib.h> rather than rolling our own
7384 declarations of malloc and free, to avoid problems with
7385 incompatible declarations (using 'throw') C++'s stdlib.h. This
7386 should fix Debian bug 340012
7387 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7388 reported by Guillaume Melquiond.
7389
7390 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7391
7392 * NEWS: Clarify symbols versus types in unused-value warnings.
7393
7394 * configure.ac (AC_INIT): Bump version number.
7395
7396 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7397
7398 * NEWS: Version 2.1a.
7399 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7400 since C99 requires this.
7401
7402 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7403
7404 * m4/c-working.m4: New file.
7405 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7406
7407 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7408
7409 * Makefile.maint: Merge from coreutils.
7410
7411 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7412
7413 More portability fixes for problems summarized by Nelson H. F. Beebe.
7414
7415 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7416 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7417 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7418 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7419 messes up because C++ code is compiled in 32-bit mode but linked
7420 in 64-bit mode.
7421
7422 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7423
7424 More portability fixes for problems summarized by Nelson H. F. Beebe.
7425
7426 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7427 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7428
7429 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7430 nodist_PROGRAMS, since we don't need to actually compile the
7431 example if we're just doing a plain 'make'. This avoids bothering
7432 the installer unnecessarily about problems due to weird C++
7433 compilers.
7434
7435 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7436
7437 More portability fixes for problems summarized by Nelson H. F. Beebe.
7438
7439 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7440 than #include "...", and compile with -I'.'. The old method was
7441 not portable, according to Posix and the C standard, and it does
7442 not work with Sun C 5.7, where previous #line directives affect
7443 the working directory used in later #include "..." directives.
7444
7445 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7446
7447 Various DJGGP specific issues in /djgpp
7448
7449 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7450
7451 More portability fixes for problems summarized by Nelson H. F. Beebe.
7452
7453 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7454 '#include <map>' works and that you can apply ++ to iterators.
7455
7456 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7457
7458 Work around portability problems summarized by Nelson H. F. Beebe in
7459 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7460
7461 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7462 that '#include <string>' works.
7463
7464 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7465 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7466 "warning: sorry: semantics of inline function static data `const
7467 unsigned char translate_table[262]' are wrong (you'll wind up with
7468 multiple copies)".
7469
7470 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7471 or, xor to not_, and_, or_, and xor_, respectively. This works
7472 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7473 random system header somewhere that includes the equivalent of
7474 <iso646.h>.
7475
7476 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7477 -E" works; it apparently doesn't work with PathScale EKO Compiler
7478 Suite Version 2.0.
7479
7480 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7481
7482 During deterministic GLR operation, user actions should be able to
7483 influence the parse by changing yychar. To make this easier to fix and
7484 to make glr.c easier to evolve in general, don't maintain yytoken in
7485 parallel with yychar; just compute yytoken when needed.
7486 * tests/glr-regression.at (Incorrect lookahead during deterministic
7487 GLR): Check that setting yychar in a user action has the intended
7488 effect.
7489 * data/glr.c (yyGLRStack): Remove yytokenp member.
7490 (yyclearin): Don't set *yytokenp.
7491 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7492 yychar rather than *yytokenp to determine the current lookahead.
7493 Compute yytoken locally when needed.
7494 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7495 point to.
7496
7497 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7498 after `--report' documentation.
7499
7500 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7501
7502 * src/parse-gram.y (grammar_declaration): Location of printer
7503 symbol is @1, not list->location. Bug reported by twlevo.
7504 * tests/input.at (Incompatible Aliases): Adjust to above change.
7505
7506 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7507
7508 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7509 all the test at once. This makes the output easier to read in the
7510 normal case.
7511
7512 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7513 got from <http://bro-ids.org/download.html>. The bug is that
7514 when two actions appeared in succession, the second one was
7515 scanned before the first one was added to the grammar rule
7516 as a midrule action. Bison then output the incorrect warning
7517 "parse.y:905.17-906.36: warning: unused value: $3".
7518 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7519 associated with a value.
7520 (rhs): Don't invoke grammar_current_rule_action_append.
7521 (action): Invoke it here instead.
7522 * src/reader.c (grammar_midrule_action): Now extern.
7523 (grammar_current_rule_action_append): Don't invoke
7524 grammar_midrule_action; that is now the scanner's job.
7525 * src/reader.h (last_string, last_braced_code_loc):
7526 (grammar_midrule_action): New decls.
7527 * src/scan-gram.l (last_string): Now extern, sigh.
7528 (last_braced_code_loc): New extern variable.
7529 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7530 rule already has an action.
7531 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7532 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7533 Add some tests to check that the above changes fixed the bug.
7534
7535 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7536
7537 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7538 All used changed. Check whether the symbol has a destructor,
7539 not whether it is typed.
7540 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7541 that the values are still reported as unused. All line numbers
7542 adjusted.
7543
7544 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7545
7546 Work around a bug in bro 0.8, which underparenthesizes its
7547 definition of YYLLOC_DEFAULT.
7548 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7549 their arguments.
7550 * data/lalr1.cc: Likewise.
7551 * data/yacc.cc: Likewise.
7552
7553 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7554
7555 Work around a bug in Pike 7.0, and give the Pike folks a
7556 better way to override the usual int widths.
7557 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7558 user can override the types.
7559 (short): #undef, to work around a bug in Pike 7.0.
7560 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7561 (union yyalloc.yyss): Use yytype_int16 rather than short.
7562 All uses changed.
7563 (yysigned_char): Remove.
7564 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7565 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7566 * tests/regression.at (Web2c Actions): Adjust to above changes.
7567
7568 * src/reader.c (check_and_convert_grammar): New function.
7569 (reader): Close the input file even if something went wrong during
7570 parsing. Minor file descriptor leak reported by twlevo.
7571
7572 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7573 to pacify gcc -Wswitch-default.
7574 * src/scan-gram.l (adjust_location): Use a default: break; case
7575 to pacify gcc -Wswitch-default.
7576 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7577 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7578 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7579 Move these decls to scan-skel.l, since they don't need to be
7580 visible elsewhere.
7581 * src/scan-skel.l: Accept the above decls.
7582 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7583 is used.
7584
7585 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7586
7587 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7588 since we don't want to insist on a version number at the start
7589 of the changelog every time.
7590 * Makefile.maint: Sync from coreutils a bit better.
7591 (sc_trailing_blank): Renamed from sc_trailing_space.
7592 All uses changed.
7593 (sc_no_if_have_config_h, sc_require_config_h):
7594 (sc_prohibit_assert_without_use): New rules.
7595 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7596 (sc_dd_max_sym_length): Fix leading spaces in rule.
7597 (sc_system_h_headers): Prefix with @.
7598 (sc_useless_cpp_parens, m4-check): Output line numbers.
7599 (changelog-check): Allow version only in head.
7600 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7601 satisfy new Makefile.maint rule.
7602 * data/glr.c: Likewise.
7603 * data/glr.cc: Likewise.
7604 * data/lalr1.cc: Likewise.
7605 * data/yacc.c: Likewise.
7606 * lib/ebitsetv.c: Likewise.
7607 * lib/lbitset.c: Likewise.
7608 * lib/subpipe.c: Likewise.
7609 * lib/timevar.c: Likewise.
7610 * src/system.h: Likewise.
7611 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7612 * djgpp/Makefile.maint: Add copyright notice.
7613 * djgpp/README.in: Likewise.
7614 * djgpp/config.bat: Likewise.
7615 * djgpp/config.site: Likewise.
7616 * djgpp/config_h.sed: Likewise.
7617 * djgpp/djunpack.bat: Likewise.
7618 * djgpp/config.sed: Fix copyright notice to match standard format.
7619 * djgpp/subpipe.h: Likewise.
7620 * lib/bitsetv-print.c: Likewise.
7621 * lib/bitsetv.c: Likewise.
7622 * lib/subpipe.h: Likewise.
7623 * lib/timevar.c: Likewise.
7624 * lib/timevar.h: Likewise.
7625 * djgpp/subpipe.c: Use standard recipe for config.h.
7626 * lib/abitset.c: Likewise.
7627 * lib/bitset.c: Likewise.
7628 * lib/bitset_stats.c: Likewise.
7629 * lib/bitsetv-print.c: Likewise.
7630 * lib/bitsetv.c: Likewise.
7631 * lib/ebitsetv.c: Likewise.
7632 * lib/get-errno.c: Likewise.
7633 * lib/lbitset.c: Likewise.
7634 * lib/subpipe.c: Likewise.
7635 * lib/timevar.c: Likewise.
7636 * lib/vbitset.c: Likewise.
7637 * tests/local.at: Likewise.
7638 * src/scan-gram.l: Don't include verify.h, since system.h does
7639 that for us.
7640 * .x-sc_require_config_h: New file.
7641 * .x-sc_unmarked_diagnostics: New file.
7642
7643 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
7644
7645 Be a bit more systematic about using 'abort'.
7646 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7647 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7648 Put 'default: abort ();' before some other case, to satisfy older
7649 pedantic compilers.
7650 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7651 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
7652 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
7653 * src/conflicts.c (resolve_sr_conflict): Likewise.
7654 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
7655 (get_decision_str, get_orientation_str, get_node_alignment_str):
7656 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
7657 (get_linestyle_str, get_arrowstyle_str): Likewise.
7658 * src/conflicts.c (resolve_sr_conflict):
7659 Use a default case rather than one for the one remaining enum
7660 value, to catch invalid enum values as well.
7661 * src/lalr.c (set_goto_map, map_goto):
7662 Prefer "assert (FOO);" to "if (!FOO) abort ();".
7663 * src/nullable.c (nullable_compute, token_definitions_output):
7664 Likewise.
7665 * src/reader.c (packgram, reader): Likewise.
7666 * src/state.c (transitions_to, state_new, state_reduction_find):
7667 Likewise.
7668 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
7669 (symbol_pack): Likewise.
7670 * src/tables.c (conflict_row, pack_vector): Likewise.
7671 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
7672 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
7673 * src/system.h: Don't include <assert.h>.
7674 (assert): New macro.
7675
7676 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
7677 (Destructor Decl, Parser Function, Pure Calling):
7678 Describe rules for braces inside C code more carefully.
7679
7680 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
7681
7682 Fix some porting glitches found by Nelson H. F. Beebe.
7683 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
7684 compilers that don't understand that abort () does not return.
7685 * src/state.c (transitions_to): Likewise.
7686 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7687 that '#include <cstdlib>' works.
7688 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
7689 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
7690 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
7691 for the benefit of some pre-C99 compilers.
7692
7693 * bootstrap: Undo changes to gnulib files that autoreconf made.
7694
7695 Minor fixups to get 'make maintainer-check' to work.
7696 * configure.ac: Don't use -Wnested-externs, as it's incompatible
7697 with the new verify.h implementation.
7698 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
7699 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
7700 * data/yacc.c (YYUSE): Likewise.
7701 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
7702 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
7703 * src/parse-gram.y (declaration): Don't pass a string constant
7704 to a function that expects char *, since GCC might complain
7705 about the constant value.
7706 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
7707 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
7708 before #defining them.
7709 * tests/glr-regression.at
7710 (Incorrectly initialized location for empty right-hand side in GLR):
7711 In yyerror, use the msg arg.
7712 (Corrupted semantic options if user action cuts parse):
7713 (Incorrect lookahead during deterministic GLR):
7714 (Incorrect lookahead during nondeterministic GLR):
7715 Don't name a local var 'index'; it shadows string.h's 'index'.
7716
7717 2006-01-19 Akim Demaille <akim@epita.fr>
7718
7719 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
7720 location, not just parts of it.
7721
7722 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
7723
7724 * NEWS: Document the fact that multiple %unions are now allowed.
7725 * doc/bison.texinfo (Union Decl): Likewise.
7726 * TODO: This feature is now implemented, so remove it from
7727 the wishlist.
7728
7729 * Makefile.maint: Merge with coreutils Makefile.maint.
7730 (CVS_LIST): Use build-aux version if available.
7731 (VERSION_REGEXP): New macro.
7732 (syntax-check-rules): Add sc_no_if_have_config_h,
7733 sc_prohibit_assert_without_use, sc_require_config_h,
7734 sc_useless_cpp_parens.
7735 (sc_obsolete_symbols): Check for O_NDELAY.
7736 (sc_dd_max_sym_length): Track coreutils.
7737 (sc_unmarked_diagnostics): Look in all files, not just *.c.
7738 (sc_useless_cpp_parens): New rule.
7739 (news-date-check): Look for version or today's date.
7740 (changelog-check): Don't require version number near head.
7741 (copyright-check): Use current year instead of hardwiring 2005.
7742 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
7743 (announcement): Add --gpg-key-ID.
7744
7745 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
7746 with "file system".
7747
7748 Avoid undefined behavior that addressed just before the start of an
7749 array. Problem reported by twlevo.
7750 * src/reader.c (packgram): Prepend a new sentinel before ritem.
7751 * src/lalr.c (build_relations): Rely on new sentinel.
7752 * src/gram.c (gram_free): Adjust to new sentinel.
7753
7754 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
7755
7756 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
7757 yylookaheadNeeds. All uses updated.
7758 (yysplitStack): Rename local yynewLookaheadStatuses to
7759 yynewLookaheadNeeds.
7760 * data/glr-regression.at (Incorrect lookahead during nondeterministic
7761 GLR): In comments, change `lookahead status' to `lookahead need'.
7762
7763 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7764
7765 * data/glr.c (yysplitStack): A little stylistic rewrite.
7766
7767 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7768
7769 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
7770
7771 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
7772
7773 * doc/bison.texinfo: Fix some typos.
7774 (GLR Semantic Actions): New subsection discussing special
7775 considerations because GLR semantic actions might be deferred.
7776 (Actions): Mention look-ahead usage of yylval.
7777 (Actions and Locations): Mention look-ahead usage of yylloc.
7778 (Special Features for Use in Actions): Add YYEOF entry and mention it
7779 in the yychar entry.
7780 In the yychar entry, remove mention of the local yychar case (pure
7781 parser) since this is irrelevant information when writing semantic
7782 actions and since it's already discussed in `Table of Symbols' where
7783 yychar is otherwise described as an external variable.
7784 In the yychar entry, don't call it the `current' look-ahead since it
7785 isn't when semantic actions are deferred.
7786 In the yychar and yyclearin entries, add note about deferred semantic
7787 actions.
7788 Add yylloc and yylval entries discussing look-ahead usage.
7789 (Look-Ahead Tokens): When discussing yychar, don't call it the
7790 `current' look-ahead, and do mention yylval and yylloc.
7791 (Error Recovery): Cross-reference `Action Features' when mentioning
7792 yyclearin.
7793 (Table of Symbols): In the yychar entry, don't call it the `current'
7794 look-ahead.
7795 In the yylloc and yylval entries, mention look-ahead usage.
7796
7797 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7798
7799 * tests/glr-regression.at: Update copyright year to 2006.
7800
7801 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7802
7803 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
7804 use during nondeterministic operation to track which stacks have
7805 actually needed the current lookahead.
7806 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
7807 Allocate, deallocate, resize, and otherwise shuffle space for
7808 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
7809 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
7810 appropriately during nondeterministic operation.
7811 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
7812 members to store the current lookahead to be used by the deferred
7813 user action.
7814 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
7815 from which the RHS is taken. Set the lookahead members of the new
7816 yySemanticOption according to the lookahead status for stack yyk.
7817 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
7818 yyaddDeferredAction.
7819 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
7820 members of yySemanticOption before invoking yyuserAction, and then set
7821 them back to their current values afterward.
7822 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
7823 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
7824 * tests/glr-regression.at: Remove `.' from the ends of recent test case
7825 titles for consistency.
7826 (Leaked merged semantic value if user action cuts parse): In order to
7827 suppress lint warnings, use arguments in merge function, and assign
7828 char value < 128 in main.
7829 (Incorrect lookahead during deterministic GLR): New test case.
7830 (Incorrect lookahead during nondeterministic GLR): New test case.
7831
7832 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7833
7834 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
7835 !yyvaluep as signal that no semantic value is available to print.
7836 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
7837 to print a semantic value.
7838
7839 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7840
7841 * tests/glr-regression.at: For consistency with my newer test cases,
7842 don't thank myself.
7843
7844 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7845
7846 * data/glr.c (yyresolveValue): When merging semantic options, if at
7847 least one user action succeeds but a later one cuts the parse, then
7848 destroy the semantic value before returning rather than leaking it.
7849 (yyresolveStates): If a user action cuts the parse and thus
7850 yyresolveValue fails, ignore the (unset) semantic value rather than
7851 corrupting the yyGLRState, and empty the semantic options list since
7852 the user actions should have called all necessary destructors.
7853 Simplify code with YYCHK.
7854 * tests/glr-regression.at (Corrupted semantic options if user action
7855 cuts parse): New test case.
7856 (Undesirable destructors if user action cuts parse): New test case.
7857 Before applying any of this patch, this test case never actually failed
7858 for me... but only because the corrupted semantic options usually
7859 masked this bug.
7860 (Leaked merged semantic value if user action cuts parse): New test
7861 case.
7862
7863 2006-01-05 Akim Demaille <akim@epita.fr>
7864
7865 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
7866
7867 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
7868
7869 * data/c.m4 (b4_c_modern): New macro, with a new provision for
7870 _MSC_VER. Problem reported by Cenzato Marco.
7871 (b4_c_function_def): Use it.
7872 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
7873 b4_c_modern.
7874 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
7875 than rolling our own.
7876
7877 2006-01-04 Akim Demaille <akim@epita.fr>
7878
7879 Also warn about non-used mid-rule values.
7880 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
7881 member.
7882 (symbol_list_new): Adjust.
7883 * src/reader.c (symbol_typed_p): New.
7884 (grammar_rule_check): Use it.
7885 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
7886 Check its rule.
7887 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
7888 Use it.
7889 * tests/actions.at (Exotic Dollars): Adjust.
7890
7891 2006-01-04 Akim Demaille <akim@epita.fr>
7892
7893 * src/reader.c (grammar_midrule_action): If $$ is set in a
7894 mid-rule, move the `used' bit to its lhs.
7895 * tests/input.at (Unused values): New.
7896 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
7897
7898 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
7899
7900 * doc/bison.texinfo (Bison Options): Say more accurately what
7901 --yacc does.
7902 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
7903 about declarations in the grammar when in Yacc mode, as POSIX does
7904 not require a diagnostic when the grammar uses extensions.
7905
7906 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
7907
7908 Warn about dubious constructions like "%token T T".
7909 Reported by twlevo.
7910 * src/symtab.h (struct symbol.declared): New member.
7911 * src/symtab.c (symbol_new): Initialize it to false.
7912 (symbol_class_set): New arg DECLARING, specifying whether
7913 this is a declaration that we want to warn about, if there
7914 is more than one of them. All uses changed.
7915
7916 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
7917 Allow multiple %union directives, whose contents concatenate.
7918 * src/parse-gram.y (grammar_declaration): Likewise.
7919 Use muscle_code_grow, so that we don't need stype_line any more.
7920 All uses changed.
7921
7922 * src/muscle_tab.c (muscle_grow): Fix comment.
7923
7924 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
7925 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
7926 Update copyright year to 2006.
7927
7928 2006-01-03 Akim Demaille <akim@epita.fr>
7929
7930 Have glr.cc pass (some of) the calc.at tests.
7931 * data/glr.cc (b4_parse_param_orig): New.
7932 (b4_parse_param): Improve its definition, and bound it more
7933 clearly in the skeleton.
7934 (b4_epilogue): Append, instead of prepending, in order to keep
7935 #line consistency.
7936 Simplify the generation of auxiliary functions: locations and
7937 purity are mandated.
7938 (b4_global_tokens_and_yystype): Honor it.
7939 * data/location.cc (c++.m4): Don't include it.
7940 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
7941 and AT_SKEL_CC_IF.
7942 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
7943 AT_LALR1_CC_IF.
7944 Be sure to initialize the first position's filename.
7945 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
7946 mandated anyway.
7947 (AT_CHECK_CALC_GLR_CC): New.
7948 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
7949
7950 2006-01-02 Akim Demaille <akim@epita.fr>
7951
7952 * src/output.c (output_skeleton): Don't hard wire the inclusion of
7953 c.m4.
7954 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
7955 * data/glr.cc: Do not include stack.hh.
7956
7957 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7958
7959 * data/glr.c: Reformat whitespace with tabs.
7960 (b4_lpure_formals): Remove this unused m4 macro.
7961 * tests/cxx-type.at: Reformat whitespace with tabs.
7962 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
7963 since it's a member. Rename type to isNterm for clarity.
7964
7965 2005-12-29 Akim <akim@sulaco.local>
7966
7967 Let glr.cc catch up with symbol_value_print.
7968 * data/glr.cc (b4_yysymprint_generate): Replace by...
7969 (b4_yy_symbol_print_generate): this.
7970 (yy_symbol_print, yy_symbol_value_print): Declare them.
7971
7972 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
7973
7974 * src/location.h (boundary): Note that a line or column equal
7975 to INT_MAX indicates an overflow.
7976 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
7977 (rule_length_overflow, increment_rule_length, add_column_width):
7978 New functions.
7979 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
7980 (<SC_BRACED_CODE>"}"):
7981 Use increment_rule_length rather than incrementing it by hand.
7982 (adjust_location, handle_syncline): Diagnose overflow.
7983 (handle_action_dollar, handle_action_at):
7984 Fix bug with monstrosities like $-2147483648.
7985 Remove now-unnecessary checks.
7986 (scan_integer): Verify assumptions and remove now-unnecessary checks.
7987 (convert_ucn_to_byte): Verify assumptions.
7988 (handle_syncline): New arg LOC. All callers changed.
7989 Don't store through a value derived from char const * pointer.
7990
7991 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
7992 GCC warnings.
7993
7994 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
7995
7996 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
7997 Remove unnecessary forward static decls.
7998
7999 2005-12-27 Akim Demaille <akim@epita.fr>
8000
8001 * src/reader.c (grammar_current_rule_check): Also check that $$
8002 is used.
8003 Take the rule to check as argument, hence rename as...
8004 (grammar_rule_check): this.
8005 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8006 Rename as...
8007 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8008 (grammar_midrule_action, grammar_symbol_append): Now static.
8009 * tests/torture.at (input): Don't rely on the default action
8010 being always performed.
8011 * tests/calc.at: "Set" $$ even when the action is "cut" with
8012 YYERROR or other.
8013 * tests/actions.at (Exotic Dollars): Instead of using unused
8014 values, check that the warning is issued.
8015
8016 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8017
8018 * NEWS: Improve wording for unused-value warnings.
8019
8020 2005-12-22 Akim Demaille <akim@epita.fr>
8021
8022 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8023 (b4_yysymprint_generate): Rename as...
8024 (b4_yy_symbol_print_generate): this.
8025 Generate yy_symbol_print instead of yysymprint.
8026 Generate also yy_symbol_value_print, and use it.
8027
8028 2005-12-22 Akim Demaille <akim@epita.fr>
8029
8030 * NEWS: Warn about unused values.
8031 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8032 a `used' member.
8033 (symbol_list_n_get, symbol_list_n_used_set): New.
8034 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8035 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8036 * src/reader.c (grammar_current_rule_check): Check that values are
8037 used.
8038 * src/symtab.c (symbol_print): Accept 0.
8039 * tests/existing.at: Remove the type information.
8040 Empty the actions.
8041 Remove useless actions (beware of mid-rule actions: perl -000
8042 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8043 * tests/actions.at (Exotic Dollars): Use unused values.
8044 * tests/calc.at: Likewise.
8045 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8046 Likewise.
8047
8048 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8049 rule_useful_p.
8050
8051 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8052
8053 Undo 2005-12-01 tentative license wording change. The wording is
8054 still being reviewed by the lawyers, and we don't want to wait for
8055 them before publishing a test release. For now, revert to the
8056 previous wording.
8057 * NEWS: Undo 2005-12-01 change.
8058 * data/glr.c: Revert to previous license wording.
8059 * data/glr.cc: Likewise.
8060 * data/lalr1.cc: Likewise.
8061 * data/location.cc: Likewise.
8062 * data/yacc.c: Likewise.
8063
8064 * NEWS: Reword %destructor vs YYABORT etc.
8065 * data/glr.c: Use American spacing, for consistency.
8066 * data/glr.cc: Likewise.
8067 * data/lalr1.cc: Likewise.
8068 * data/yacc.c: Likewise.
8069 * data/yacc.c: Reformat comments slightly.
8070 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8071 for consistency. Fix some spelling errors and reword recently-included
8072 text slightly.
8073 * tests/cxx-type.at: Cast results of malloc, for C++.
8074
8075 2005-12-21 Joel E. Denny <address@hidden>
8076
8077 * tests/cxx-type.at: Construct a tree, count the parents of shared
8078 nodes, and free each node once and only once. Previously, the memory
8079 for semantic values was leaked instead.
8080
8081 2005-12-21 Joel E. Denny <address@hidden>
8082
8083 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8084 (yylval, yylloc): If pure, #define to yystackp->yyval and
8085 yystackp->yyloc similar to yychar and yynerrs.
8086 (yyparse): If pure, remove local yylval and yylloc. Add local
8087 yystackp to accommodate pure definitions of yylval and yylloc.
8088 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8089 yylvalp and yyllocp to &yylval and &yylloc.
8090 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8091 namespace. Previously, nerrs and char were missing, but lval and lloc
8092 weren't necessary.
8093 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8094 yylvalp and yyllocp parameters since, if pure, these are now always
8095 accessible through yystackp. If not pure, they are still accessible
8096 globally.
8097 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8098 `if (YYID (N))' to pacify lint.
8099
8100 2005-12-21 Akim Demaille <akim@epita.fr>
8101
8102 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8103 destroy the RHS symbols of a rule.
8104 * data/yacc.c (yylen): Initialize to 0.
8105 Keep its value to the number of items to possibly shift.
8106 In particular, a regular successful parse that ends on YYFINAL by
8107 a (internal) YYACCEPT must not have yylen != 0.
8108 (yyerrorlab, yyreturn): Pop the RHS.
8109 Reorder a bit to emphasize the `shifting' bits of code.
8110 (YYPOPSTACK): Now accept a number of items to pop.
8111 * data/lalr1.cc: Likewise.
8112 * data/glr.c: Formatting changes.
8113 Use goto instead of fall through.
8114 * doc/bison.texinfo (Destructor Decl): Complete.
8115
8116 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8117
8118 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8119 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8120 * djgpp/config.bat: Replace every occurence of the file name
8121 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8122 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8123 * djgpp/config.sed: Replace every occurence of the file name
8124 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8125 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8126 * djgpp/djunpack.bat: DJGPP specific file.
8127 * djgpp/fnchange.lst: DJGPP specific file.
8128 * djgpp/README.in: Add new information about how to unpack the bison
8129 source on MSDOS and other systems which have 8.3 file name restrictions
8130 using djunpack.bat and fnchange.lst.
8131
8132 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8133
8134 * bootstrap (build_cvs_prefix): Remove; unused.
8135 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8136 when getting gnulib.
8137
8138 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8139
8140 * data/glr.c: Reorder typedef declarations for structs to match order
8141 of struct declarations.
8142 Rename yystack everywhere to yystackp except in yyparse where it's not
8143 a pointer.
8144 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8145 consistency.
8146 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8147 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8148 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8149 lint.
8150
8151 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8152
8153 * tests/sets.at (Accept): Fix typos in regular expression used to
8154 sed out the final state number.
8155
8156 Work around portability problem on Solaris 10: flex-generated
8157 files include <stdio.h> before <config.h>, which messes up
8158 because the latter defines __EXTENSIONS__. Address the problem
8159 by creating two new little files that include <config.h> first,
8160 then include the flex-generated files. Rewrite everyone else
8161 to include <config.h> first, as well.
8162 * lib/timevar.c: Always include "config.h".
8163 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8164 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8165 (EXTRA_bison_SOURCES): New macro.
8166 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8167 * src/system.h: Don't include config.h.
8168 * src/LR0.c: Include <config.h> first.
8169 * src/assoc.c: Likewise.
8170 * src/closure.c: Likewise.
8171 * src/complain.c: Likewise.
8172 * src/conflicts.c: Likewise.
8173 * src/derives.c: Likewise.
8174 * src/files.c: Likewise.
8175 * src/getargs.c: Likewise.
8176 * src/gram.c: Likewise.
8177 * src/lalr.c: Likewise.
8178 * src/location.c: Likewise.
8179 * src/main.c: Likewise.
8180 * src/muscle_tab.c: Likewise.
8181 * src/nullable.c: Likewise.
8182 * src/output.c: Likewise.
8183 * src/parse-gram.y: Likewise.
8184 * src/print.c: Likewise.
8185 * src/print_graph.c: Likewise.
8186 * src/reader.c: Likewise.
8187 * src/reduce.c: Likewise.
8188 * src/relation.c: Likewise.
8189 * src/state.c: Likewise.
8190 * src/symlist.c: Likewise.
8191 * src/symtab.c: Likewise.
8192 * src/tables.c: Likewise.
8193 * src/uniqstr.c: Likewise.
8194 * src/vcg.c: Likewise.
8195
8196 * src/parse-gram.y: Fix minor problems uncovered by lint.
8197 (current_lhs, current_lhs_location): Now static.
8198 (current_assoc): Remove unused variable.
8199
8200 Cleanups so that Bison-generated parsers have less lint.
8201 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8202 Prepend /*ARGSUSED*/, for lint's sake.
8203 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8204 definition if 'lint' is defined.
8205 (YYID): New macro (or function, if lint).
8206 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8207 * data/yacc.c: Likewise.
8208 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8209 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8210 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8211 is C++ only.
8212 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8213 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8214 Use YYID(0) rather than 0, for lint.
8215 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8216 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8217
8218 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8219
8220 * tests/glr-regression.at
8221 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8222 Close memory leak reported by twlevo.
8223
8224 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8225
8226 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8227 all stacks.
8228 (yyparse): Iterate another stack in order to call user destructors.
8229 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8230 New test case.
8231 (Duplicated user destructor for lookahead): This test now is expected
8232 to succeed.
8233
8234 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8235
8236 * NEWS: Document the following change.
8237 * data/yacc.c: Say "parser skeleton" rather than "file", since
8238 it's no longer just a file.
8239 * data/glr.c: Grant a special exception for C GLR parsers, that
8240 reads like the already-existing exception for C LALR(1) parsers.
8241 * data/glr.cc: Likewise.
8242 * data/lalr1.cc: Likewise.
8243 * data/location.cc: Likewise.
8244 * data/yacc.c: Reword the "written by" statement to clarify that
8245 it was the parser skeleton, not the entire output file.
8246 * data/glr.c: Written by Paul Hilfinger.
8247 * data/glr.cc: Written by Akim Demaille.
8248 * data/lalr1.cc: Likewise.
8249
8250 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8251
8252 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8253 Fix typos in previous change that broke 'make check'.
8254 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8255 supported in C.
8256 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8257 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8258 We can revert this once things settle down.
8259
8260 * src/conflicts.c (conflicts_print): Don't print file name twice
8261 when %expect fails because there were no conflicts.
8262 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8263 change.
8264 * tests/conflicts.at (%expect not enough, %expect too much):
8265 (%expect with reduce conflicts): Adjust to new behavior.
8266
8267 2005-11-18 Akim Demaille <akim@epita.fr>
8268
8269 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8270 errors.
8271 * NEWS: Document this.
8272 * doc/bison.texinfo (Expect Decl): Likewise.
8273
8274 2005-11-16 Akim Demaille <akim@epita.fr>
8275
8276 Generalize the display of semantic values and locations in traces.
8277 * data/glr.c (yy_reduce_print): Fix indices (again).
8278 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8279 literal integers.
8280 * data/lalr1.cc (yyreduce_print): Rename as...
8281 (yy_reduce_print): this.
8282 Display values and locations.
8283 * data/yacc.c (yy_reduce_print): Likewise.
8284 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8285 (yysymprint): Move higher to be visible from yy_reduce_print).
8286 (yyparse): Adjust.
8287 * tests/calc.at: Adjust the expected length of the traces.
8288
8289 2005-11-14 Akim Demaille <akim@epita.fr>
8290
8291 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8292 from 1 to N, while values and location start at 0.
8293 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8294
8295 2005-11-14 Akim Demaille <akim@epita.fr>
8296
8297 * data/glr.c (yy_reduce_print): Fix the $ number.
8298
8299 2005-11-14 Akim Demaille <akim@epita.fr>
8300
8301 "Use" parse parameters.
8302 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8303 * data/glr.c, data/glr.cc: Use them.
8304 * data/glr.c (YYUSE): Have a C++ definition that supports
8305 non-pointer types.
8306
8307 2005-11-14 Akim Demaille <akim@epita.fr>
8308
8309 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8310
8311 2005-11-14 Akim Demaille <akim@epita.fr>
8312
8313 * data/glr.cc: New.
8314 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
8315
8316 2005-11-12 Akim Demaille <akim@epita.fr>
8317
8318 Let position and location be PODs.
8319 * data/location.cc (position::initialize, location::initialize): New.
8320 (position::position, location::location): Define only if
8321 b4_location_constructors is defined.
8322 * data/lalr1.cc (b4_location_constructors): Define it for backward
8323 compatibility.
8324 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8325
8326 2005-11-12 Akim Demaille <akim@epita.fr>
8327
8328 * data/lalr1.cc: Move the body of the ctor and dtor into the
8329 parser file (instead of the header).
8330 Wrap the implementations in a "namespace yy".
8331
8332 2005-11-12 Akim Demaille <akim@epita.fr>
8333
8334 Have glr.c include its header file when created.
8335 * data/glr.c (b4_shared_declarations): New.
8336 Output them verbatim in the parser if !%defines, otherwise
8337 output then in the header file, and include it instead.
8338
8339 2005-11-11 Akim Demaille <akim@epita.fr>
8340
8341 * data/glr.c: Comment changes.
8342
8343 2005-11-11 Akim Demaille <akim@epita.fr>
8344
8345 When yydebug, report semantic and location values for reductions.
8346 * data/glr.c (yy_reduce_print): Report the semantic values and the
8347 locations.
8348 (YY_REDUCE_PRINT): Adjust.
8349 (yyglrReduce): Use them.
8350 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8351 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8352 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8353 traces.
8354
8355 2005-11-10 Akim Demaille <akim@epita.fr>
8356
8357 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8358 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8359 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8360
8361 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8362
8363 * m4/cxx.m4, examples/Makefile.am: Don't build
8364 examples/calc++ if no C++ compiler is available. (trivial change)
8365
8366 2005-11-09 Akim Demaille <akim@epita.fr>
8367
8368 * src/scan-skel.l: Use a couple of asserts.
8369
8370 2005-11-03 Akim Demaille <akim@epita.fr>
8371
8372 In some (weird) cases, the final state number is incorrect.
8373 Reported by Alexandre Duret-Lutz.
8374 * src/LR0.c (state_list_append): Remove the computation of
8375 final_state.
8376 (save_reductions): Do it here.
8377 (get_state): Alpha conversion.
8378 (generate_states): Use a for loop.
8379 * src/gram.h (item_number_is_rule_number)
8380 (item_number_is_symbol_number): New.
8381 * src/state.c: Use assert.
8382 * src/system.h: Include assert.h.
8383 * tests/sets.at (Accept): New.
8384
8385 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8386
8387 * data/glr.c (yyfill): Adjust comment.
8388 (yyresolveAction): Initialize default location properly
8389 for empty right-hand sides.
8390 (yydoAction): Ditto.
8391 Add comment explaining apparently dead code.
8392 * tests/glr-regression.at
8393 (Incorrectly initialized location for empty right-hand side in GLR):
8394 New test.
8395
8396 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8397
8398 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8399 gnulib when interrupted. This fixes some race conditions and
8400 works around some portability problems (one noted by Paul
8401 Hilfinger).
8402
8403 2005-10-22 Akim <akim@epita.fr>
8404
8405 * Makefile.cfg: Adjust to config -> build-aux.
8406 Reported by twledo.
8407
8408 2005-10-21 Akim Demaille <akim@epita.fr>
8409
8410 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8411 the %parse-params.
8412 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8413 * data/yacc.c (b4_Pure_if): Rename as...
8414 (b4_yacc_pure_if): this.
8415 (YY_SYMBOL_PRINT, yyparse): Adjust.
8416 * doc/bison.texinfo: Formatting changes.
8417
8418 2005-10-21 Akim Demaille <akim@epita.fr>
8419
8420 Finish the transition config -> build-aux.
8421 * configure.ac, Makefile.am: Use build-aux.
8422 * config/prev-version, config/announce-gen, config/Makefile.am:
8423 Move to...
8424 * build-aux/prev-version, build-aux/announce-gen,
8425 * build-aux/Makefile.am: here.
8426
8427 2005-10-14 Akim Demaille <akim@epita.fr>
8428
8429 * examples/calc++/test: Use set -x only when VERBOSE.
8430
8431 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8432
8433 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8434 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8435
8436 2005-10-13 Akim Demaille <akim@epita.fr>
8437
8438 * src/scan-skel.l: Output the base name parts of the parser and
8439 header file names.
8440 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
8441 additional checks.
8442 Use this to exercise C++ outputs in subdirs.
8443 Reported by Oleg Smolsky.
8444
8445 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8446
8447 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8448 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8449 Problem reported by John P. Hartmann.
8450 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8451 already defined it.
8452
8453 2005-10-12 Akim Demaille <akim@epita.fr>
8454
8455 * src/parse-gram.y (version_check): Exit 63 to please missing
8456 (stands for "version mismatch).
8457 * tests/input.at, doc/bison.texinfo: Adjust.
8458
8459 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8460
8461 Work around portability problems with Visual Age C compiler
8462 (xlc and xlC_r) reported by John P. Hartmann.
8463 * data/location.cc (initial_column, initial_line): Remove.
8464 All uses replaced by 0 and 1.
8465 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8466 that xlc complains about.
8467 * src/scan-skel.l (skel_wrap): Likewise.
8468 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
8469 as __STDC__.
8470 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8471 __STDC_VERSION__. Use it everywhere instead of looking at
8472 __STDC__ and __cplusplus.
8473
8474 2005-10-10 Akim Demaille <akim@epita.fr>
8475
8476 * examples/calc++/test: Be quiet unless VERBOSE.
8477
8478 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8479
8480 * data/c.m4 (yydestruct, yysymprint):
8481 Use YYUSE instead of casting to void.
8482 * data/glr.c (YYUSE): New macro.
8483 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8484 Use it instead of rolling our own.
8485 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8486 (YYCHK1):
8487 Use /*CONSTCOND*/ to suppress lint warnings.
8488 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8489 (YY_STACK_PRINT): Use 'false' not '0'.
8490 (YYUSE): New macro.
8491 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8492 * data/yacc.c (YYUSE): New macro.
8493 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8494 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8495 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8496
8497
8498 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8499 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8500
8501 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8502
8503 Undo the parts of the unlocked-I/O change that substituted
8504 putc or puts for printf. This might hurt performance a bit,
8505 but some people prefer the printf style.
8506 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8507 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8508 All uses replaced by YYFPRINTF and YYDPRINTF.
8509 * data/yacc.c: Likewise.
8510 * lib/bitset.c (bitset_print): Likewise.
8511 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8512 putc and puts.
8513 * lib/lbitset.c (debug_lbitset): Likewise.
8514 * src/closure.c (print_firsts, print_fderives): Likewise.
8515 * src/gram.c (grammar_dump): Likewise.
8516 * src/lalr.c (look_ahead_tokens_print): Likewise.
8517 * src/output.c (escaped_output): Likewise.
8518 (user_actions_output): Break apart two printfs.
8519 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8520 * src/reduce.c (reduce_print): Likewise.
8521 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8522 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8523
8524 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8525 Use assignments rather than casts-to-void to suppress
8526 unused-variable warnings. This pacifies 'lint'.
8527 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8528 unused-variable warnings.
8529
8530 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8531
8532 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8533
8534 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8535
8536 Use unlocked I/O for a minor performance improvement on hosts like
8537 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8538 is to use the gnlib unlocked-io module, and to prefer putc and
8539 puts to printf when either will work (since the latter doesn't
8540 come in an unlocked flavor).
8541 * bootstrap (gnulib_modules): Add unlocked-io.
8542 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8543 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8544 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8545 and similarly for puts and putc and printf.
8546 * data/yacc.c: Likewise.
8547 * lib/bitset.c (bitset_print): Likewise.
8548 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8549 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8550 to printf.
8551 * lib/lbitset.c (debug_lbitset): Likewise.
8552 * src/closure.c (print_firsts, print_fderives): Likewise.
8553 * src/gram.c (grammar_dump): Likewise.
8554 * src/lalr.c (look_ahead_tokens_print): Likewise.
8555 * src/output.c (escaped_output): Likewise.
8556 (user_actions_output): Coalesce two printfs.
8557 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
8558 * src/reduce.c (reduce_print): Likewise.
8559 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8560 * src/system.h: Include unlocked-io.h rather than stdio.h.
8561
8562 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8563 this confuses xgettext.
8564
8565 2005-10-02 Akim Demaille <akim@epita.fr>
8566
8567 * bootstrap (gnulib_modules): Add strverscmp.
8568 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8569 * m4/.cvsignore: Add strverscmp.m4.
8570 * src/parse-gram.y (%require): New token, new rule.
8571 (version_check): New.
8572 * src/scan-gram.l (%require): Adjust.
8573 * tests/input.at (AT_REQUIRE): New.
8574 Use it.
8575 * doc/bison.texinfo (Require Decl): New.
8576 (Calc++ Parser): Use %require.
8577
8578 2005-10-02 Akim Demaille <akim@epita.fr>
8579
8580 * data/location.cc: New.
8581
8582 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8583 Akim Demaille <akim@epita.fr>
8584
8585 Make sure -odir/foo.cc creates dir/location.hh etc.
8586 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8587 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8588 (spec_defines_file): Now const.
8589 (dir_prefix): New.
8590 (short_base_name): Remove.
8591 * src/files.c: Adjust.
8592 (dirname.h): Include.
8593 (base_name): Don't prototype it.
8594 (finput): Remove, duplicates gram_in.
8595 (full_base_name, short_base_name): Replace by...
8596 (all_but_ext, all_but_tab_ext): these.
8597 (compute_base_names): Rename as...
8598 (compute_file_name_parts): this.
8599 Update to compute the new variables, including dir_prefix.
8600 Adjust dependencies.
8601 * src/output.c (prepare): Output them.
8602 * src/reader.c: Adjust to use gram_in, not finput.
8603 * src/scan-skel.l (@dir_prefix@): New.
8604
8605 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8606
8607 * lib/subpipe.c: New function end_of_output_subpipe() added
8608 to allow support for non-posix systems. This is a no-op function
8609 for posix systems.
8610
8611 * lib/subpipe.h: New function end_of_output_subpipe() added
8612 to allow support for non-posix systems. This is a no-op function
8613 for posix systems.
8614
8615 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8616 handle the lack of pipe/fork functionality on non-posix systems.
8617
8618 * djgpp/Makefile.maint: DJGPP specific file.
8619
8620 * djgpp/README.in: DJGPP specific file.
8621
8622 * djgpp/config.bat: DJGPP specific configuration file.
8623
8624 * djgpp/config.sed: DJGPP specific configuration file.
8625
8626 * djgpp/config.site: DJGPP specific configuration file.
8627
8628 * djgpp/config_h.sed: DJGPP specific configuration file.
8629
8630 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8631
8632 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8633
8634 2005-10-02 Akim Demaille <akim@epita.fr>
8635
8636 * data/location.cc: New, extract from...
8637 * data/lalr1.cc: here.
8638 (location.hh): Include it after the user prologue, in case the
8639 filename type is defined by the user.
8640 Forward declation location and position before the pre-prologue.
8641 (yyresult_): Rename as...
8642 (yyresult): this, it's a local variable, not an attribute.
8643 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8644
8645 2005-10-01 Akim Demaille <akim@epita.fr>
8646
8647 * examples/extexi: Restore the #line generation.
8648
8649 2005-09-30 Akim Demaille <akim@epita.fr>,
8650 Alexandre Duret-Lutz <adl@gnu.org>
8651
8652 Move the token type and YYSTYPE in the parser class.
8653 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
8654 (parser::token): New, from the moved free definition of tokens.
8655 (parser::semantic_value): Now a full definition instead of an
8656 indirection to YYSTYPE.
8657 (b4_post_prologue): No longer included in the header file, but
8658 in the implementation file.
8659 * doc/bison.texi (C+ Language Interface): Update.
8660 * src/parse-gram.y: Support unary %define.
8661 * tests/actions.at: Define global_tokens_and_yystype for backward
8662 compatibility until we update the tests.
8663 * tests/calc.at: Idem.
8664 (first_line, first_column, last_line, last_column): Define for lalr1.cc
8665 to simplify the code.
8666
8667 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
8668
8669 Port to SunOS 4.1.4, which lacks strtoul and strerror.
8670 Ah, the good old days! Problem reported by Peter Klein.
8671 * bootstrap (gnulib_modules): Add strerror, strtoul.
8672 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
8673 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
8674
8675 2005-09-29 Akim Demaille <akim@epita.fr>
8676
8677 * data/c.m4 (b4_error_verbose_if): New.
8678 * data/lalr1.cc: Use it.
8679 (YYERROR_VERBOSE_IF): Remove.
8680 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
8681 parser members, replaced by...
8682 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
8683 local variables.
8684 (yysyntax_error_): Takes the state number as argument.
8685 (yyreduce_print_): Use the argument yyrule, not the former
8686 attribute yyn_.
8687
8688 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
8689
8690 * bootstrap (gnulib_modules): Add verify.
8691 * lib/.cvsignore: Add verify.h.
8692 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
8693 * src/system.h (verify): Remove.
8694 Include verify.h instead.
8695 * src/tables.c (tables_generate): Use new API for 'verify'.
8696
8697 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
8698
8699 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
8700 local variables whose names begin with 'yy'.
8701 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8702 Trivial changes from Joel E. Denny.
8703
8704 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
8705 it itself.
8706 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
8707 don't use alloca any more.
8708
8709 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
8710 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
8711 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
8712 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
8713 to match yacc.c, to test more hosts.
8714
8715 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
8716
8717 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
8718 doesn't affect behavior.
8719 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
8720 Solaris, AIX, MSC.
8721 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
8722 This works a bit better with glibc, if user code has already included
8723 stdlib.h.
8724 * doc/bison.texinfo (Bison Parser): Document that users can't
8725 arbitrarily use malloc and free for other purposes. Document
8726 that <alloca.h> and <malloc.h> might be included.
8727 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
8728 user must declare alloca.
8729
8730 * HACKING (release): Forwarn the Translation Project about
8731 stable releses.
8732
8733 2005-09-20 Akim Demaille <akim@epita.fr>
8734
8735 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
8736
8737 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
8738
8739 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
8740 (YYSTACK_ALLOC_MAXIMUM): Use it.
8741 (yysyntax_error): New function.
8742 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
8743 multiple syntax errors are reported, and alloca is being used.
8744 Instead, reallocate buffers twice as big each time, so that
8745 we waste at most half the allocated memory. Start with a small
8746 (128-byte) buffer that will suffice in most cases anyway.
8747 Use yysyntax_error to do most of the work.
8748
8749 * doc/bison.texinfo (Error Reporting, Table of Symbols):
8750 yynerrs is the number of errors reported, not the number of
8751 errors encountered.
8752
8753 * tests/glr-regression.at (Duplicated user destructor for lookahead):
8754 Mark it as expected to fail.
8755 Cast result of malloc; problem reported by twlevo@xs4all.nl.
8756 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
8757 Don't start user-code symbols with "yy", to avoid name space problems.
8758
8759 2005-09-19 Akim Demaille <akim@epita.fr>
8760
8761 Remove the traits, failed experiment.
8762 It never proved useful, and anyway because of the current
8763 definition, it was not possible to have several specialization of
8764 this traits, making it useless.
8765 * data/lalr1.cc (yy:traits): Remove.
8766 Inline its definitions in the parser class.
8767
8768 2005-09-19 Akim Demaille <akim@epita.fr>
8769
8770 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
8771 least Mac OSX with a /usr/local install of gettext.
8772
8773 2005-09-19 Akim Demaille <akim@epita.fr>
8774
8775 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
8776 and yytoken for similarity with the other skeletons.
8777
8778 2005-09-19 Akim Demaille <akim@epita.fr>
8779
8780 * NEWS, configure.ac: update version number to 2.1a.
8781
8782 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
8783
8784 * NEWS: Version 2.1.
8785
8786 * NEWS: Remove notice of yytname change, since it was never in an
8787 official release.
8788 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
8789 diagnostic.
8790 * src/output.c (prepare): Likewise.
8791 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
8792 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
8793 is not defined. This is an awful hack, but it's enough for now.
8794 All callers changed.
8795 * tests/glr-regression-at (make_value): Args are const pointers now,
8796 to avoid GCC warning.
8797 (Duplicated user destructor for lookahead): New test. Currently
8798 skipped. It fails on my host but I'm not sure it'll always fail.
8799
8800 2005-09-16 Akim Demaille <akim@epita.fr>
8801
8802 * src/symtab.h (struct symbol): Declare the printer and destructor
8803 as const, to avoid accidental calls to free.
8804 (symbol_destructor_set, symbol_printer_set): Adjust.
8805 * src/symtab.c: Adjust.
8806
8807 2005-09-16 Akim Demaille <akim@epita.fr>
8808
8809 * data/c.m4 (b4_token_enums): New.
8810 (b4_token_defines): Rename as...
8811 (b4_token_enums_defines): this.
8812 (b4_token_defines): New, output only the #defines.
8813 * data/yacc.c, data/glr.c: Adjust.
8814 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
8815 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
8816 as default values.
8817
8818 2005-09-16 Akim Demaille <akim@epita.fr>
8819
8820 * data/lalr1.cc (yylex_): Remove, inline its code.
8821 (yyreport_syntax_error_): Remove, replaced by...
8822 (yysyntax_error_): this which returns a string and leaves to the
8823 caller the call to the users' error function.
8824 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
8825 Move from members of the parser object...
8826 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
8827 to local variables of the parse function.
8828
8829 2005-09-16 Akim Demaille <akim@epita.fr>
8830
8831 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
8832 since it's in Bison's name space.
8833
8834 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
8835
8836 * data/glr.c (yyresolveValue): Add default case to pacify
8837 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
8838
8839 * NEWS: Document when yyparse started to return 2.
8840 * doc/bison.texinfo (Parser Function): Document when yyparse
8841 returns 2.
8842
8843 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
8844 (b4_filename_type): Renamed back from b4_file_name_type. All uses
8845 changed.
8846 (class position): file_name -> filename (reverting). All uses changed.
8847
8848 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
8849
8850 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
8851 do anything if $@ exists. This reverts part of the 2005-07-07
8852 patch.
8853
8854 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
8855
8856 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
8857 contains obsolete information and isn't worth distributing as a
8858 separate file anyway.
8859 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
8860 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
8861 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
8862 (yyparse): Abort if user code uses longjmp to throw an unexpected
8863 value.
8864
8865 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
8866
8867 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
8868 Suggested by twlevo@xs4all.nl.
8869
8870 * data/glr.c (YYCHK1): Do not assume YYE is in range.
8871 This avoids a diagnostic from gcc -Wswitch-enum.
8872 Problem reported by twlevo@xs4all.nl.
8873
8874 * doc/bison.texinfo: Don't use "filename", as per GNU coding
8875 standards. Use "file name" or "file" or "name", depending on
8876 the context.
8877 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
8878 not to hack/foo.tab.c.
8879 (Calc++ Top Level): 2nd arg of main is not const.
8880 * data/glr.c: b4_filename -> b4_file_name.
8881 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
8882 All uses changed.
8883 (class position): filename -> file_name. All uses changed.
8884 * data/yacc.c: b4_filename -> b4_file_name.
8885 * lib/bitset.h: filename -> file_name in local vars.
8886 * lib/bitset_stats.c: Likewise.
8887 * src/files.c: Likewise.
8888 * src/scan-skel.l ("@output ".*\n): Likewise.
8889 * src/files.c (file_name_split): Renamed from filename_split.
8890 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
8891
8892 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
8893
8894 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
8895 to accommodate latest gnulib.
8896
8897 * tests/glr-regression.at (Duplicate representation of merged trees):
8898 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
8899
8900 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
8901 needed.
8902
8903 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
8904
8905 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
8906 All uses changed. Invoke user destructor after an error during a
8907 split parse (trivial change from Joel E. Denny).
8908
8909 * tests/glr-regression.at
8910 (User destructor after an error during a split parse): New test case.
8911 Problem reported by Joel E. Denny in:
8912 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
8913
8914 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
8915
8916 * README-cvs: Give URLs for recommended tools.
8917 Mention Gzip version problem, and bootstrapping issues.
8918 Remove troubleshooting section, as it's somewhat obsolete.
8919
8920 * bootstrap (no_cache): New var, to accommodate different wget
8921 variants. Use it instead of '-C off'. Problem reported by
8922 twlevo@xs4all.nl.
8923
8924 * data/glr.c (yydestroyStackItem): New function.
8925 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
8926 debugging information. Problem reported by Joel E. Denny.
8927
8928 2005-08-25 Akim Demaille <akim@epita.fr>
8929
8930 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
8931
8932 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
8933
8934 * data/glr.c (yyrecoverSyntaxError, yyreturn):
8935 Don't invoke destructor on unresolved entries.
8936 * tests/glr-regression.at
8937 (User destructor for unresolved GLR semantic value): New test case.
8938 Problem reported by Joel E. Denny in:
8939 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
8940
8941 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
8942
8943 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
8944 Add strnlen.c.
8945 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
8946 lib-prefix.m4, po.m4.
8947
8948 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
8949 in yydestruct diagnostic, since it might not be an error.
8950 Problem reported by Joel Denny near end of
8951 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8952 * data/lalr1.cc (yyerturn): Likewise.
8953 * data/yacc.c (yyreturn): Likewise.
8954 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
8955
8956 * src/files.c: Remove obsolete FIXME comment.
8957
8958 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
8959 with the other templates, and to fix bogus run-on messages such
8960 as the one reported at the end of
8961 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8962 All callers changed to avoid the newline.
8963 (yyprocessOneStack): Output two lines rather than one, to accommodate
8964 the above change. This changes the debug output format slightly.
8965
8966 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
8967 reported by Joel E. Denny in
8968 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
8969 (trivial change).
8970 * tests/glr-regression.at (Duplicate representation of merged trees):
8971 New test, from Joel E. Denny in:
8972 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
8973 * THANKS: Add Joel E. Denny.
8974
8975 * configure.ac (AC_INIT): Bump to 2.0c.
8976
8977 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
8978
8979 * NEWS: Version 2.0b.
8980
8981 * Makefile.am (SUBDIRS): Put examples before tests, so that
8982 "make check" doesn't finish with "All 1 tests passed".
8983
8984 * tests/regression.at (Token definitions): Don't rely on
8985 AT_PARSER_CHECK for data that contains backslashes. It currently
8986 uses 'echo', and 'echo' isn't portable if its argument contains
8987 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
8988 that the byte '\0xff' is not printable in the C locale; it is,
8989 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
8990 not printable, so use '\0x81' to test.
8991
8992 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
8993 version of GCC, since the macro is used with non-GCC compilers.
8994
8995 Fix core dump reported by Pablo De Napoli in
8996 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
8997 * tests/regression.at (Invalid inputs with {}): New test.
8998 * src/parse-gram.y (token_name): Translate type before using
8999 it as an index.
9000
9001 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9002 the user's name space. All uses changed to __attribute__
9003 ((__unused__)).
9004 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9005 Add __attribute__ ((__noreturn__)).
9006
9007 * etc/clcommit: Remove. We weren't using it, and it failed
9008 "make maintainer-distcheck".
9009 * Makefile.maint: Merge from coreutils.
9010 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9011 (syntax-check-rules): Change list of rules as described below.
9012 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9013 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9014 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9015 (sc_trailing_space): New rules.
9016 (sc_xalloc_h_in_src): Remove.
9017 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9018 (sc_space_tab, sc_error_exit_success, sc_changelog):
9019 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9020 (makefile-check, po-check, author_mark_check):
9021 (makefile_path_separator_check, copyright-check):
9022 Use grep -n, to make it easier to find violations.
9023 Use CVS_LIST and CVS_LIST_EXCEPT.
9024 (header_regexp, h_re): Remove.
9025 (dd_c): New macro.
9026 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9027 (my-distcheck): Use more-modern GCC flags.
9028 (signatures, %.asc): Remove.
9029 (rel-files, announcement): Remove signatures.
9030 Restore old updating code, even though we don't use it, so
9031 that we're the same as coreutils.
9032 (alpha, beta, major): Depend on news-date-check.
9033 Make the upload commands.
9034
9035 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9036 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9037 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9038 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9039 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9040 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9041 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9042 * tests/sets.at: Likewise.
9043
9044 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9045 we comment out the Autoconf version number.
9046 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9047 it's error-prone and "make maintainer-distcheck" rejects it.
9048
9049 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9050 Indent calls to "error" to pacify "make maintainer-distcheck",
9051 when the calls are not intended to be translated.
9052 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9053
9054 * src/Makefile.am (DEFS): Use +=, to pacify
9055 "make maintainer-distcheck".
9056 (bison_SOURCES): Add scan-skel.h.
9057 (sc_tight_scope): New rule, from coreutils.
9058
9059 * src/files.c (src_extension, header_extension):
9060 Now static, not extern.
9061 * src/getargs.c (short_options): Likewise.
9062 * src/muscle_tab.c (muscle_table): Likewise.
9063 * src/parse-gram.y (current_class, current_type, current_prec):
9064 Likewise.
9065 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9066 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9067 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9068 void, to avoid warning when NLS is disabled.
9069 * src/output.c: Include scan-skel.h.
9070 (scan_skel): Remove decl, since scan-skel.h does this.
9071 (output_skeleton):
9072 Indent calls to "error" to pacify "make maintainer-distcheck".
9073 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9074 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9075 "make maintainer-distcheck".
9076 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9077 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9078 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9079 (skel_lex_destroy, scan_skel): Move these decls to...
9080 * src/scan-skel.h: New file.
9081 * src/uniqstr.c (uniqstr_assert):
9082 Indent calls to "error" to pacify "make maintainer-distcheck".
9083
9084 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9085 not @VAR@.
9086
9087 * tests/torture.at: Revamp to avoid misuse of atoi that
9088 "make maintainer-distcheck" complained about.
9089
9090 * examples/extexi (message): Don't print a message more than once,
9091 and omit line-number decoration that makes Emacs compile think
9092 that informative messages are worth worrying about.
9093
9094 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9095
9096 * configure.ac: Update version number.
9097
9098 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9099 accidentally.
9100 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9101 autogenerated by the maintainer.
9102 * examples/calc++/.cvsignore: Add *.yy.
9103
9104 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9105 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9106 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9107
9108 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9109
9110 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9111 from maintainer-distcheck about casting the argument of 'free'.
9112
9113 * NEWS: Mention recent yytname changes.
9114 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9115
9116 * bootstrap: For translations that have not yet been upgraded to
9117 the new runtime-po domain, prime the pump by extracting the
9118 relevant strings from the obsolete translations. This code can be
9119 removed once the bison-runtime domain has been translated by each
9120 team.
9121
9122 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9123 now that token names are already quoted.
9124
9125 Fix problem reported by Anthony Heading.
9126 * data/glr.c (YYTOKEN_TABLE): New macro.
9127 (yytname): Define if YYTOKEN_TABLE.
9128 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9129 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9130 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9131 * src/output.c (prepare_symbols): Output token_table_flag.
9132
9133 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9134
9135 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9136 again if the first call fails.
9137
9138 * data/glr.c (yytnamerr): New function.
9139 (yyreportSyntaxError): Use it to dequote most string literals.
9140 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9141 with other skeletons. All uses changed.
9142 (yytnameerr_): New function.
9143 (yyreport_syntax_error): Use it to dequote most string literals.
9144 * data/yacc.c (yytnamerr): New function.
9145 (yyerrlab): Use it to decode most string literals.
9146 * doc/bison.texinfo (Decl Summary, Calling Convention):
9147 Clarify quoting convention of yytname.
9148 * src/output.c (prepare_symbols): Quote all names. This undoes
9149 the 2005-04-17 change, which is now accomplished (mostly) via
9150 changes in the parsers as described above.
9151 * tests/regression.at (Token definitions, Web2c Actions):
9152 Undo most 2005-04-17 change here, too.
9153
9154 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9155
9156 Fix more problems reported by twlevo@xs4all.nl.
9157 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9158 remove trailing spaces. This loses the exit status of ./types,
9159 and isn't needed since ./types shouldn't be emitting trailing
9160 spaces.
9161 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9162 as the stack isn't valid in that case.
9163
9164 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9165 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9166 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9167 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9168 is used.
9169 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9170 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9171 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9172 Likewise.
9173
9174 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9175 overly-picky compilers that reject 'char *foo = "bar";'.
9176
9177 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9178 to FILE * parameter, not to stderr. This fixes a typo introduced
9179 in the 2005-07-12 change.
9180
9181 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9182 warnings from GCC 4.
9183
9184 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9185 (yyglrShiftDefer, yysplitStack):
9186 Remove unused parameters b4_pure_formals. All uses changed.
9187 (yyglrShift): Remove unused parameters b4_user_formals.
9188 All uses changed.
9189 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9190
9191 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9192
9193 Destructor cleanups and regularization among the three skeletons.
9194 * NEWS: Document the behavior changes.
9195 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9196 stack before failing, as the cleanup code will do it for us now.
9197 * data/lalr1.cc (yyerrlab): Likewise.
9198 * data/glr.c (yyparse): Pop everything off the stack before
9199 freeing it, so that destructors get called properly.
9200 * data/lalr1.cc (yyreturn): Likewise.
9201 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9202 This is more consistent.
9203 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9204 why destructors might be called. 1.875 -> 2.1.
9205 (Destructor Decl, Decl Summary, Table of Symbols):
9206 Some English-language cleanups for %destructor.
9207 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9208 Add output line for destructor of start symbol.
9209 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9210 because of that same extra output line.
9211
9212 * NEWS: Document minor wording changes in diagnostics of
9213 Bison-generated parsers.
9214 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9215 Remove unused formals. All uses changed.
9216 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9217 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9218 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9219 Rename yyoverflowab to yyexhaustedlab.
9220 When memory exhaustion occurs during syntax-error reporting,
9221 report it separately rather than in a single diagnostic; this
9222 eases translation.
9223 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9224 (Memory Exhausted): Renamed from Parser Stack Overflow.
9225 Revamp wording slightly to prefer "memory exhaustion".
9226 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9227
9228 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9229
9230 Add i18n support to the GLR skeleton. Partially fix the C++
9231 skeleton; a C++ expert needs to finish this. Remove debugging
9232 msgids; there's little point to having them translated, since they
9233 can be understood only by someone who can read the
9234 (English-language) source code.
9235
9236 Generate runtime-po/bison-runtime.pot automatically, so that we
9237 don't have to worry about garbage getting in that file. We'll
9238 make sure after the next official release that old msgids don't
9239 get lost. See
9240 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9241
9242 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9243 Now auto-generated.
9244 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9245 Fix typos in explanations of the runtime file.
9246 * bootstrap: Change gettext keyword from YYI18N to YY_.
9247 Use standard Makefile.in.in in runtime-po, since we'll arrange
9248 for backward-compatible bison-runtime.po files in a different way.
9249 * data/glr.c (YY_): New macro, from yacc.c.
9250 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9251 Translate messages intended for users.
9252 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9253 the wording in the other skeletons. We don't know that the memory
9254 is virtual.
9255 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
9256 Use same method that yacc.c uses.
9257 Don't translate debugging messages.
9258 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9259 it doesn't work (yet), and requires C++ expertise to fix.
9260 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
9261 Move defn to a more logical place, to be consistent with other
9262 skeletons.
9263 Don't translate debugging messages.
9264 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9265 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
9266 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
9267 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9268
9269 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9270 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9271 void, not int.
9272 * tests/glr-regression.at (Badly Collapsed GLR States):
9273 Likewise.
9274 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9275 yylex should return 0 at EOF rather than aborting.
9276
9277 Improve tests for stack overflow in GLR parser.
9278 Problem reported by twlevo@xs4all.nl.
9279 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9280 All uses removed.
9281 (yyStackOverflow): Just longjmp, but with value 2 so that caller
9282 can handle the problem.
9283 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9284 (yyparse): New local variable yyresult to record the result.
9285 Use result of setjmp to set it, rather than storing itinto
9286 struct.
9287 (yyDone): Remove label.
9288 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9289 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
9290 if YYABORT is used).
9291 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9292 yyparse status; put status > 1 into diagnostic.
9293 Check that status==2 works.
9294 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9295 Use exit status 3 for failure to open (which shouldn't happen).
9296
9297 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9298
9299 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9300 1 on syntax error; just let yyparse do its thing.
9301 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9302 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9303 (Exploding the Stack Size with Alloca):
9304 (Exploding the Stack Size with Malloc):
9305 Expect exit status 2, not 1, since the parser is supposed to blow
9306 its stack. Problem reported by twlevo@xs4all.nl.
9307
9308 * data/glr.c (yyparse): Don't assume that the initial calls
9309 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9310 Print a stack-overflow message and fail instead.
9311 Initialize the line-number information before creating the stack,
9312 so that the stack-overflow message can report line zero safely.
9313
9314 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9315
9316 Fix problems reported by twlevo@xs4all.nl.
9317 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9318 (yyuserMerge): Provide a default case if b4_mergers is empty.
9319 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9320 * tests/glr-regression.at
9321 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9322 Add casts to pacify C++ compilers.
9323 * tests/glr-regression.at (Improper merging of GLR delayed action
9324 sets): Declare yylex before using it.
9325 * tests/Makefile.am (maintainer-check-g++): Fix a stray
9326 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9327 test for valgrind; valgrind is independent of g++.
9328 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9329 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9330 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9331 Use a destructor, so that we can expand the stack. Change
9332 YYSTYPE to char * so that we can free it. Cast result of malloc.
9333
9334 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9335
9336 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9337 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9338
9339 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9340
9341 * PACKAGING: New file, suggested by Bruno Haible and taken from
9342 similar wording in gettext's PACKAGING file.
9343 * NEWS: Mention PACKAGING.
9344 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9345
9346 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9347
9348 * NEWS: Document recent i18n improvements.
9349 * bootstrap: Get runtime translations into runtime-po.
9350 Create runtime-po files automatically, if possible.
9351 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9352 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9353 does not infringe on the user's name space.
9354 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9355 * doc/bison.texinfo (Internationalization): Revamp the English
9356 and Texinfo syntax a bit, to try to make it clearer.
9357 (Bison Options, Option Cross Key): Mention --print-localedir.
9358 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9359 YYENABLE_NLS. Quote a bit more.
9360 * runtime-po/.cvsignore: New file.
9361 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9362 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9363 * runtime-po/quot.sed: Likewise.
9364 * runtime-po/boldquot.sed: Likewise.
9365 * runtime-po/en@quot.header: Likewise.
9366 * runtime-po/en@boldquot.header: Likewise.
9367 * runtime-po/insert-header.sin: Likewise.
9368 * runtime-po/remove-potcdate.sin: Likewise.
9369 * runtime-po/Makevars: Likewise.
9370 * runtime-po/LINGUAS: Likewise.
9371 * runtime-po/de.po: Likewise; we will rely on the translation project
9372 to maintain this, so "bootstrap" should get it.
9373 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
9374 its value.
9375 * src/main.c (main): Bind the bison-runtime domain, too.
9376
9377 2005-07-12 Bruno Haible <bruno@clisp.org>
9378
9379 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9380 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9381 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9382 * runtime-po: New directory.
9383 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9384 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9385 * runtime-po/Rules-quot: New file, copied from po/.
9386 * runtime-po/quot.sed: Likewise.
9387 * runtime-po/boldquot.sed: Likewise.
9388 * runtime-po/en@quot.header: Likewise.
9389 * runtime-po/en@boldquot.header: Likewise.
9390 * runtime-po/insert-header.sin: Likewise.
9391 * runtime-po/remove-potcdate.sin: Likewise.
9392 * runtime-po/Makevars: New file.
9393 * runtime-po/POTFILES.in: New file.
9394 * runtime-po/LINGUAS: New file.
9395 * runtime-po/bison-runtime.pot: New file.
9396 * runtime-po/de.po: New file.
9397 * m4/bison.m4: New file.
9398 * Makefile.am (SUBDIRS): Add runtime-po.
9399 (aclocaldir, aclocal_DATA): New variables.
9400 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9401 Define aclocaldir.
9402 * src/getargs.c (usage): Document --print-localedir option.
9403 (PRINT_LOCALEDIR_OPTION): New enum item.
9404 (long_options): Add --print-localedir option.
9405 (getargs): Handle --print-localedir option.
9406 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9407 (Internationalization): New section.
9408
9409 2005-07-12 Akim Demaille <akim@epita.fr>
9410
9411 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9412 for consistency with the rest of the code.
9413 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9414 Add separators.
9415
9416 2005-07-12 Akim Demaille <akim@epita.fr>
9417
9418 * src/parse-gram.y: Use %printer instead of YYPRINT.
9419
9420 2005-07-12 Akim Demaille <akim@epita.fr>
9421
9422 * src/symtab.h, src/symtab.c (symbol_print): New.
9423 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9424 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9425
9426 2005-07-12 Akim Demaille <akim@epita.fr>
9427
9428 * data/glr.c (b4_syncline): Fix (swap) the definitions of
9429 b4_at_dollar and b4_dollar_dollar.
9430
9431 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9432
9433 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9434 and Pennello's paper.
9435
9436 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9437
9438 * data/yacc.c (yyparse): Undo previous patch. Instead,
9439 set yylsp[0] and yyvsp[0] only if the initial action
9440 sets yylloc and yylval, respectively.
9441
9442 * data/yacc.c (yyparse): In the initial action, set
9443 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9444 This avoids the use of undefined variables if the initial
9445 action does not set yylloc and/or yylval.
9446
9447 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9448
9449 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9450 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9451 Remove from CVS. These files are automatically generated.
9452 * examples/extexi: Clarify that this file is now part of Bison,
9453 not GNU M4, and that it works with any POSIX-compatible Awk.
9454 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9455 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9456 so that we also get calc++-parser.yy. Geneate it.
9457 Use $(AWK), not gawk, since any conforming Awk will do.
9458 Put comment before action, since older 'make' can't handle comment
9459 in action.
9460 $(BUILT_SOURCES): List all built sources, not just some of them.
9461 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9462 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9463 $($(calc_sources_generated)): Remove unnecessary test for existence
9464 of target. (This had a shell syntax error anyway; a stray "x".)
9465 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9466 calc++-parser.yy.
9467 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9468
9469 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9470 implied by the other modules.
9471
9472 2005-07-06 Akim Demaille <akim@epita.fr>
9473
9474 Bind examples/calc++ to the package.
9475 * examples/calc++/Makefile: Remove, replaced by...
9476 * examples/calc++/Makefile.am: ... this new file.
9477 * examples/calc++/test: Remove input.
9478 * examples/calc++/compile: Remove.
9479 * examples/Makefile.am: New.
9480 * configure.ac, Makefile.am: Adjust.
9481 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9482
9483 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9484
9485 * data/glr.c (yyFail): Drastically simplify; since the format argument
9486 never had any % directives, we can simply pass it to yyerror.
9487 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9488 be modified later, as that is the usual style in glr.c.
9489 Problems reported by Paul Hilfinger.
9490
9491 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9492 and size overflow errors.
9493 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9494 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9495 (YYSIZEMAX): New macro.
9496 (yystpcpy): New function, taken from yacc.c.
9497 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9498 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9499 so that we don't have to maintain their signatures.
9500 (yyFail): Check for buffer overflow, by using vsnprintf rather
9501 than vsprintf. Allocate a bigger buffer if possible.
9502 Report an error if buffer allocation fails.
9503 (yyStackOverflow): New function.
9504 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9505 the initialization was successful. It might fail if storage was
9506 exhausted.
9507 (yyexpandGLRStack): Add more checks for storage allocation failure.
9508 Use yyStackOverflow to report failures.
9509 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9510 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9511 Don't assume stack number fits in int.
9512 (yysplitStack): Check for storage allocation failure.
9513 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9514 can print diagnostics on storage allocation failure. All callers
9515 changed.
9516 (yyresolveValue): Use yybool for boolean.
9517 (yyreportSyntaxError): Check for size-calculation overflow.
9518 This code is taken from yacc.c.
9519 (yyparse): Check for storage allocation errors when allocating
9520 the initial stack.
9521
9522 2005-07-05 Akim Demaille <akim@epita.fr>
9523
9524 Extract calc++ from the documentation.
9525 * doc/bison.texinfo (Calc++): Add the extraction marks.
9526 * examples/extexi: New, from the aborted GNU Programming 2E.
9527 Separate the different paragraph of a file with empty lines.
9528 * examples/Makefile: Use it to extract the whole calc++ example.
9529
9530 2005-06-24 Akim Demaille <akim@epita.fr>
9531
9532 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9533 class typedefs.
9534
9535 2005-06-22 Akim Demaille <akim@epita.fr>
9536
9537 * doc/bison.texinfo (C++ Language Interface): First stab.
9538 (C++ Parsers): Remove.
9539
9540 2005-06-22 Akim Demaille <akim@epita.fr>
9541
9542 * data/lalr1.cc (yylex_): Honor %lex-param.
9543
9544 2005-06-22 Akim Demaille <akim@epita.fr>
9545
9546 Start a set of simple examples.
9547 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9548 * examples/calc++/calc++-driver.hh,
9549 * examples/calc++/calc++-parser.yy,
9550 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9551 * examples/calc++/compile, examples/calc++/test: New.
9552
9553 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9554
9555 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9556 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9557 which stems from the 2005-05-27 patch.
9558
9559 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9560
9561 * data/glr.c: Modify treatment of unused parameters to permit use
9562 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9563
9564 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9565
9566 Fix infringement on user name space reported by Janos Zoltan Szabo.
9567 * data/yacc.c (yyparse): strlen -> yystrlen.
9568
9569 2005-05-30 Akim Demaille <akim@epita.fr>
9570
9571 * data/lalr1.cc (_): New.
9572 Translate the various messages.
9573
9574 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9575
9576 Fix infringement on user name space reported by Bruno Haible.
9577 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9578 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9579 the user's name space.
9580 (alloca): Include <stdlib.h> to get it, if it's not built in.
9581 (YYMALLOC, YYFREE): Define only if needed.
9582 (malloc, free): Declare, but only if needed, as this infringes on
9583 the user name space.
9584
9585 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9586
9587 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9588 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9589 with %d format.
9590 * lib/ebitset.c (min, max): Undef before defining.
9591 * lib/vbitset.c (min, max): Likewise.
9592 * lib/subpipe.c (create_subpipe): Save local variables in case
9593 vfork clobbers them.
9594
9595 2005-05-24 Bruno Haible <bruno@clisp.org>
9596
9597 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9598 error message syntax used by gcc-4.0.
9599
9600 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9601
9602 * README: Mention m4 1.4.3. Remove obsolete advice about
9603 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9604
9605 * bootstrap: Remove workaround for problem I encountered with
9606 gettext 0.14.1; it seems to be fixed now.
9607
9608 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9609
9610 * NEWS: Version 2.0a.
9611
9612 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9613 the previous change.
9614
9615 Various maintainer cleanups.
9616 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9617 conftest*, for benefit of CVS commands run at the same time as
9618 "configure". Add build-aux, since "bootstrap" now creates it and
9619 its subfiles.
9620 * Makefile.cfg (move_if_change): Remove.
9621 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9622 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9623 (po_repo, do-po-update, po-update, wget_files, get-targets):
9624 (config.guess-url_prefix, config.sub-url_prefix):
9625 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9626 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9627 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9628 Remove.
9629 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9630 this is now the recommended name.
9631 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9632 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9633 ylwrap. These files now go into build-aux.
9634 * config/move-if-change: Remove.
9635 * config/prev-version.txt: Bump from 1.75 to 2.0.
9636
9637 * bootstrap: Add stdio-safer, unistd-safer modules.
9638 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9639 we don't need it).
9640 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9641 fopen-safer.c, stdio-safer.h, unistd-safer.h.
9642 * lib/subpipe.c: Include "unistd-safer.h".
9643 (create_subpipe): Make sure all the newly-created
9644 file descriptors are > 2, so that diagnostics don't
9645 get sent down them (which might cause Bison to hang, in theory).
9646 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9647 * src/files.c (xfopen): Use fopen_safer, not fopen.
9648
9649 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
9650 yesterday's yacc.c fix.
9651
9652 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
9653
9654 * data/glr.c, data/lalr1.cc: Update copyright date.
9655
9656 Fix a destructor bug reported by Wolfgang Spraul in
9657 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
9658 * data/yacc.c (yyabortlab): Don't call destructor, and
9659 don't set yychar to EMPTY.
9660 (yyoverflowlab): Don't call destructor.
9661 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
9662 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
9663 since we no longer output the message "discarding lookahead token
9664 end of input ()".
9665
9666 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9667
9668 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
9669 fix a small glitch in debugging output.
9670 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
9671 after YY_SYMBOL_PRINT where needed.
9672
9673 (struct yyGLRState): Add some comments.
9674 (struct yySemanticOption): Add some comments.
9675 (union yyGLRStackItem): Add comment.
9676
9677 (yymergeOptionSets): Correct this to properly perform the union,
9678 avoiding infinite reported by Michael Rosien.
9679 Update comment.
9680
9681 * tests/glr-regression.at: Add test for GLR merging error reported
9682 by M. Rosien.
9683
9684 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
9685
9686 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
9687 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
9688 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
9689 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
9690 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
9691 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
9692 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
9693 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
9694 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
9695 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
9696 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
9697 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
9698 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
9699 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
9700 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
9701 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
9702 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
9703 src/derives.h, src/files.c, src/files.h, src/getargs.c,
9704 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
9705 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
9706 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
9707 src/output.h, src/parse-gram.c, src/parse-gram.h,
9708 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
9709 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
9710 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
9711 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
9712 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
9713 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
9714 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
9715 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
9716 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
9717 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
9718 tests/reduce.at, tests/regression.at, tests/sets.at,
9719 tests/synclines.at, tests/testsuite.at, tests/torture.at:
9720 Update FSF postal mail address.
9721
9722 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
9723
9724 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
9725 Problem reported by Ralf Menzel.
9726
9727 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
9728
9729 * tests/actions.at: Test that stack overflow invokes destructors.
9730 From Marcus Holland-Moritz.
9731 * data/yacc.c (yyerrlab): Move the code that destroys the stack
9732 from here....
9733 (yyreturn): to here. That way, destructors are called properly
9734 even if the stack overflows, or the user calls YYACCEPT or
9735 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
9736 (yyoverflowlab): Destroy the lookahead.
9737
9738 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
9739
9740 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
9741
9742 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
9743
9744 * NEWS: Bison-generated C parsers no longer quote literal strings
9745 associated with tokens.
9746 * src/output.c (prepare_symbols): Don't escape strings,
9747 since users don't want to see C escapes.
9748 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
9749 in diagnostics.
9750 * tests/input.at (Torturing the Scanner): Likewise.
9751 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
9752
9753 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
9754
9755 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
9756 the data size is known to be too small and we can't increase it.
9757 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
9758
9759 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
9760
9761 * src/parse-gram.y: Include quotearg.h.
9762 (string_as_id): Quote $1 before using it as a key, since the
9763 lexer no longer quotes it for us.
9764 (string_content): Don't strip quotes, since lexer no longer
9765 quotes it for us.
9766 * src/scan-gram.l: Include quotearg.h.
9767 ("\""): Omit quote.
9768 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
9769 a key, since the rest of the lexer doesn't quote it.
9770 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
9771 * tests/regression.at (Token definitions): Check for backslashes
9772 in token strings.
9773
9774 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
9775 (YYSIZE_T): Define to unsigned long int when using an older compiler.
9776 (yyparse): Revamp code to generate long syntax error message, to
9777 make it easier to translate, and to avoid problems with arithmetic
9778 overflow. Change "virtual memory" to "memory" in diagnostic, since
9779 we don't know whether the memory is virtual.
9780
9781 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
9782
9783 * NEWS: Bison-generated C parsers now use the _ macro to
9784 translate strings.
9785 * data/yacc.c (_) [!defined _]: New macro.
9786 All English strings wrapped inside this macro.
9787 * doc/bison.texinfo (Bison Parser): Document _.
9788 * po/POTFILES.in: Include src/parse-gram.c, since it now
9789 includes translateable strings that parse-gram.y doesn't.
9790
9791 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
9792
9793 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
9794 reverting the 2004-10-11 change to this function.
9795 (symbol_check_alias_consistency): Don't call symbol_type_set
9796 if the type name is already correct.
9797 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
9798
9799 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
9800
9801 * tests/regression.at (Token definitions): Don't use a token named
9802 c, as that generates a "#define c ..." that runs afoul of buggy
9803 stdlib.h that uses the identifier c as a member of struct
9804 drand48_data. Problem reported by Horst Wente.
9805
9806 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
9807
9808 * bootstrap: Change translation URL from
9809 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
9810 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
9811 redirection glitches. Problem reported by twlevo@xs4all.nl.
9812
9813 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
9814
9815 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
9816 after operands; POSIX says this isn't portable for the c99 command.
9817
9818 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
9819
9820 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
9821 immediately if a data overrun has occurred; this may help us track
9822 down what may be a spurious failure on MacOS.
9823
9824 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
9825
9826 Respond to problems reported by twlevo@xs4all.nl.
9827
9828 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
9829
9830 * src/vcg.h: Comment fix.
9831 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
9832 (G_CMAX): Change to -1 instead of INT_MAX.
9833
9834 * data/yacc.c (yyparse): Omit spaces before #line.
9835
9836 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
9837
9838 * src/tables.c (state_number_to_vector_number): Put it inside an
9839 "#if 0", since it's not currently used. Problem reported by
9840 Roland McGrath.
9841
9842 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
9843
9844 * src/output.c (escaped_output): Renamed from
9845 escaped_file_name_output, since we now use it for symbol tags as
9846 well. All uses changed.
9847 (symbol_destructors_output, symbol_printers_output):
9848 Escape symbol tags too.
9849 Problem reported by Matyas Forstner in
9850 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
9851
9852 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
9853 not needed.
9854 * src/output.c (user_actions_output, token_definitions_output,
9855 symbol_destructors_output, symbol_printers_output): Likewise.
9856 * src/reader.c (prologue_augment): Likewise.
9857 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
9858
9859 * src/vcg.c (output_edge): Don't quote linestyle arg.
9860 Problem reported by twlevo@xs4all.nl.
9861
9862 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
9863
9864 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
9865 example, reported by Derek M Jones. Also, make the example even
9866 more outrageous, to better illustrate how bad the problem is.
9867
9868 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
9869
9870 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
9871 putsym. Typo reported by Sebastian Piping.
9872
9873 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
9874
9875 * doc/bison.texinfo (Language and Grammar): some -> same
9876 (Epilogue): int he -> in the
9877 Typos reported by Sebastian Piping via Justin Pence.
9878
9879 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
9880
9881 * tests/glr-regression.at (Improper handling of embedded actions
9882 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
9883 embedded actions and $-N in GLR parsers", work around an Autoconf bug
9884 with dollar signs in test names.
9885 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
9886 for a similar reason.
9887
9888 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
9889
9890 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
9891 wants to redefine G_VIEW.
9892
9893 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
9894
9895 * src/vcg.c (get_view_str): Remove case for normal_view.
9896 Problem reported by twlevo@xs4all.nl.
9897
9898 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
9899
9900 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
9901 Problem reported by twlevo@xs4all.nl.
9902
9903 * doc/bison.texinfo: Change @dircategory from "GNU programming
9904 tools" to "Software development". Requested by Richard Stallman
9905 via Karl Berry.
9906
9907 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
9908
9909 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
9910 Problem reported by twlevo@xs4all.nl.
9911
9912 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
9913
9914 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
9915 keyword; it's not needed with modern compilers, and it doesn't
9916 affect correctness with older compilers. Suggested by
9917 twlevo@xs4all.nl.
9918
9919 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
9920
9921 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
9922 gcc -Wswitch-default.
9923 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9924 * data/yacc.c (yyparse): Likewise.
9925
9926 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
9927
9928 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
9929 already. Let config.h define any nonstandard values.
9930
9931 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
9932
9933 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
9934 for the benefit of slower hosts. Problem reported by
9935 Nelson H. F. Beebe.
9936
9937 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
9938
9939 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
9940 being defined and not used.
9941 * data/lalr1.cc (yyparse): Likewise.
9942 Use "if (false)" rather than "if (0)".
9943
9944 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
9945
9946 * TODO: Mention that we should allow NUL bytes in tokens.
9947
9948 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
9949
9950 * src/scan-skel.l (<<EOF>>): Don't close standard output.
9951 Problem reported by Hans Aberg.
9952
9953 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
9954
9955 * src/getargs.c (version): Happy new year; update overall
9956 program copyright date from 2004 to 2005.
9957
9958 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
9959 Problem reported by Hans Aberg.
9960 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
9961 (Output file names.): Add a test for the case when standard output
9962 is closed.
9963
9964 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
9965
9966 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
9967 to fix an oversight in the Bison 2.0 manual.
9968
9969 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
9970
9971 * NEWS: Version 2.0. Reformat the existing news items since
9972 1.875, so that related items are grouped together.
9973 * configure.ac (AC_INIT): Bump version to 2.0.
9974 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
9975
9976 * tests/torture.at (Exploding the Stack Size with Alloca): Set
9977 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
9978 otherwise, we're not testing alloca. Unfortunately there's no
9979 simple way to consult HAVE_ALLOCA here.
9980
9981 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
9982 for yymsg, too.
9983
9984 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
9985 hand. This avoids a warning about comparing int to size_t when
9986 GCC warnings are enabled.
9987
9988 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
9989
9990 * NEWS: Bison-generated parsers no longer default to using the
9991 alloca function (when available) to extend the parser stack, due
9992 to widespread problems in unchecked stack-overflow detection.
9993 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
9994 responsibility to set it to a positive value. This lets the user
9995 specify a value that is not a preprocessor constant.
9996 * data/yacc.c (YYMAXDEPTH): Likewise.
9997 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
9998 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
9999 to be a compile-time constant. However, explain the constraints on it.
10000 Also, explain the constraints on YYINITDEPTH.
10001 (Table of Symbols): Explain that alloca is no longer the default.
10002 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10003 to 1.
10004
10005 * doc/bison.texinfo (Location Default Action): Mention that n must
10006 be zero when k is zero. Suggested by Frank Heckenbach.
10007
10008 2004-12-22 Akim Demaille <akim@epita.fr>
10009
10010 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10011 (parser::state_type, parser::semantic_type, parser::location_type):
10012 Private, not public.
10013 (parser::parse): Return ints, not bool.
10014 Returning a bool introduces a problem: 0 corresponds to false, and
10015 it seems weird to return false on success. Returning true changes
10016 the conventions for yyparse.
10017 Alternatively we could return void and send an exception.
10018 There is no clear consensus (yet?).
10019 (state_stack, semantic_stack, location_stack): Rename as...
10020 (state_stack_type, semantic_stack_type, location_stack_type): these.
10021 Private, not public.
10022 * tests/c++.at: New.
10023 * tests/testsuite.at, tests/Makefile.am: Adjust.
10024
10025 2004-12-21 Akim Demaille <akim@epita.fr>
10026
10027 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10028
10029 2004-12-21 Akim Demaille <akim@epita.fr>
10030
10031 Don't impose std::string for filenames.
10032
10033 * data/lalr1.cc (b4_filename_type): New.
10034 (position::filename): Use it.
10035 (parser.hh): Move the inclusion of stack.hh and location.hh below
10036 the user code, so that needed headers for the filename type can be
10037 included first.
10038 Forward declare them before the user code.
10039 * tests/Makefile.am (check-local, installcheck-local): Pass
10040 TESTSUITEFLAGS to the TESTSUITE.
10041
10042 2004-12-20 Akim Demaille <akim@epita.fr>
10043
10044 Use more STL like names: my_class instead of MyClass.
10045
10046 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10047 (SemanticStack, SemanticType, StateStack, StateType)
10048 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10049 (Parser::value): Rename as...
10050 (location_stack, location_type, rhs_number_type, semantic_stack)
10051 (semantic_type, state_stack, state_type, token_number_type, stack)
10052 (slice, traits, parser::yylloc, parser::yylval): these.
10053
10054 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10055
10056 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10057
10058 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10059 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10060
10061 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10062
10063 Remove uses of 'short int' and 'unsigned short int'. This raises
10064 some arbitrary limits. It uses more memory but nowadays that's
10065 not much of an issue.
10066
10067 This change does not affect the generated parsers; that's a different
10068 task, as some users will want to conserve memory there.
10069
10070 Ideally we should use size_t to represent all object counts, and
10071 something like ptrdiff_t to represent signed differences of object
10072 counts; but that will require more code-cleanup than I have the
10073 time to do right now.
10074
10075 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10076 Use size_t, not int or short int, to count objects.
10077 * src/closure.c (nritemset, closure): Likewise.
10078 * src/closure.h (nritemset, closure): Likewise.
10079 * src/nullable.c (nullable_compute): Likewise.
10080 * src/print.c (print_core): Likewise.
10081 * src/print_graph.c (print_core): Likewise.
10082 * src/state.c (state_compare, state_hash): Likewise.
10083 * src/state.h (struct state): Likewise.
10084 * src/tables.c (default_goto, goto_actions): Likewise.
10085
10086 * src/gram.h (rule_number, rule): Use int, not short int.
10087 * src/output.c (prepare_rules): Likewise.
10088 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10089 errs, reductions): Likewise.
10090 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10091 Likewise.
10092 * src/tables.c (vector_number, tally, action_number,
10093 ACTION_NUMBER_MINIMUM): Likewise.
10094 * src/output.c (muscle_insert_short_int_table): Remove.
10095
10096 2004-12-17 Akim Demaille <akim@epita.fr>
10097
10098 * data/lalr1.cc: Extensive Doxygenation.
10099 (error_): Rename as...
10100 (error): this, since it is visible to the user.
10101 Adjust callers.
10102 (Parser::message): Now an automatic variable from...
10103 (Parser::yyreport_syntax_error_): here.
10104 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10105 Parser::error.
10106 * tests/input.at: Escape $.
10107
10108 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10109
10110 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10111 Parenthesize rhs to avoid obscure problems with mistakes like
10112 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10113 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10114 b4_rhs_location): Likewise.
10115 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10116 b4_rhs_location): Likewise.
10117
10118 2004-12-16 Akim Demaille <akim@epita.fr>
10119
10120 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10121 yacc.c: be sure to stay within yycheck_.
10122 * tests/actions.at: Re-enable C++ tests.
10123
10124 2004-12-16 Akim Demaille <akim@epita.fr>
10125
10126 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10127 real.
10128
10129 2004-12-16 Akim Demaille <akim@epita.fr>
10130
10131 Use #define to handle the %name-prefix.
10132
10133 * data/glr.c, data/yacc.c: Comment changes.
10134 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10135 so that one can refer to yylex in the parser file, and have it
10136 renamed, as is the case with other skeletons.
10137
10138 2004-12-16 Akim Demaille <akim@epita.fr>
10139
10140 Move lalr1.cc internals into yy*.
10141
10142 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10143 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10144 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10145 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10146 (empty_, final_, terror_, errcode_, ntokens_)
10147 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10148 (looka_, ilooka_, error_range_, nerrs_):
10149 Rename as...
10150 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10151 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10152 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10153 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10154 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10155 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10156 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10157 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10158 these.
10159
10160 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10161
10162 Fix some problems reported by twlevo at xs4all.
10163 * src/symtab.c (symbol_new): Report an error if the input grammar
10164 contains too many symbols. This is better than calling abort() later.
10165 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10166 (struct node, struct graph):
10167 Rename member expand to stretch. All uses changed.
10168 (struct graph): Remove member layoutalgorithm. All uses removed.
10169 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10170 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10171 All uses changed.
10172 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10173
10174 2004-12-15 Akim Demaille <akim@epita.fr>
10175
10176 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10177 Add more Doxygen comments.
10178 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10179 (report_syntax_error_, translate_): Rename as...
10180 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10181 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10182
10183 2004-12-15 Akim Demaille <akim@epita.fr>
10184
10185 * data/lalr1.cc (lex_): Rename as...
10186 (yylex_): this.
10187 Move the trace here.
10188 Take the %name-prefix into account.
10189 Reported by Alexandre Duret-Lutz.
10190
10191 2004-12-15 Akim Demaille <akim@epita.fr>
10192
10193 Simplify the C++ parser constructor.
10194
10195 * data/lalr1.cc (debug_): Rename as...
10196 (yydebug_): so that the parser's internals are always in the yy*
10197 pseudo namespace.
10198 Adjust uses.
10199 (b4_parse_param_decl): Remove the leading comma as it is now only
10200 called as unique argument list.
10201 (Parser::Parser): Remove the constructor accepting a location and
10202 an initial debugging level.
10203 Remove from the other ctor the argument for the debugging level.
10204 (debug_level_type, debug_level, set_debug_level): New.
10205
10206 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10207 constructor calls.
10208
10209 2004-12-15 Akim Demaille <akim@epita.fr>
10210
10211 Remove b4_root related material: failure experiment
10212 (which goal was to allow to derive from a class).
10213
10214 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10215 definitions and uses.
10216
10217 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10218
10219 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10220 not 2, since it's not portable to subtract 1 from the start of an
10221 array. The new item 0 is never set or used. All uses changed.
10222
10223 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10224 the default definition of YYLLOC_DEFAULT. Problem reported
10225 by Frank Heckenbach.
10226
10227 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10228
10229 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10230 the normal case and one for the error case. Just use the
10231 first one uniformly. Problem reported by Frank Heckenbach.
10232 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10233 use exactly the same macro in both places.
10234 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10235 so that the normal-case YYRHSLOC works for the error case too.
10236 All uses changed.
10237 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10238 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10239 * doc/bison.texinfo (Location Default Action): Don't claim that
10240 we have an array of locations. Use the same macro for both glr
10241 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10242 the index is 0.
10243
10244 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10245
10246 * HACKING: Update email addresses to send announcements to.
10247
10248 * configure.ac (AC_INIT): Bump version to 1.875f.
10249
10250 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10251
10252 * NEWS: Version 1.875e.
10253 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10254
10255 * src/scan-skel.l: Include "complain.h", for "fatal".
10256
10257 * src/relation.h (relation_print, relation_digraph):
10258 Relation sizes are of type relation_node, not size_t (this is
10259 merely a doc fix, since the two types are equivalent).
10260 (relation_transpose): Relation sizes are of type relation_node,
10261 not int.
10262 * src/relation.c: Likewise.
10263 (top, infinity): Now of type relation_node, not int.
10264 (traverse, relation_transpose): Use relation_node, not int.
10265
10266 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10267 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10268 (yyparse): Remove unused local introduced in 2004-10-25 patch.
10269
10270 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
10271 specifying whether the test should be skipped. Use it tp
10272 specify that the [%defines %skeleton "lalr1.cc"] tests currently
10273 fail on some hosts, and should be skipped.
10274
10275 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
10276
10277 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
10278 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10279 unless otherwise specified below.
10280
10281 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10282 to allocate kernel_base, kernel_items, kernel_size, since
10283 they needn't be initialized to 0.
10284 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10285 * src/closure.c (new_closure): Likewise, for itemset.
10286 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10287 * src/lalr.c (set_goto_map): Likewise, for temp_map.
10288 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10289 (build_relations): Likewise for edge, states1, includes.
10290 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10291 * src/reader.c (packgram): Likewise, for ritem, rules.
10292 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10293 * src/relation.c (relation_digraph): Likewise for VERTICES.
10294 (relation_transpose): Likewise for new_R, end_R.
10295 * src/symtab.c (symbols_token_translations_init): Likewise for
10296 token_translations.
10297 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10298 (token_actions): Likewise for yydefact, actrow, conflrow,
10299 conflict_list.
10300 (save_column): Likewise for froms[symno], tos[symno].
10301 (goto_actions): Likewise for state_count.
10302 (pack_table): Likewise for base, pos, check.
10303 (tables_generate): Likewise for width.
10304
10305 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10306 for initial core. Just have a separate core, so we needn't worry
10307 about whether kernel_size and kernel_base are initialized.
10308
10309 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10310 kernel_size, kernel_items): Remove unnecessary initialization.
10311 * src/conflicts.c (conflicts): Likewise.
10312 * src/derives.c (derives): Likewise.
10313 * src/muscle_tablc (muscle_insert): Likewise.
10314 * src/relation.c (relation_digraph): Likewise.
10315 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10316 conflrow, conflict_table, conflict_list, table, check):
10317 Likewise.
10318
10319 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10320 This is because all callers pass unsigned int.
10321 * src/closure.h (new_closure): Likewise.
10322
10323 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10324 (build_relations): Initialize includes[i] in all cases.
10325 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10326 and rules[ruleno].precsym. Initialize members in order.
10327 * src/relation.c (relation_transpose): Always initialize new_R[i]
10328 and end_R[i].
10329 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10330
10331 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10332 conflict_list[0] was always 0, but now it isn't initialized.
10333
10334 * src/table.c (table_grow): When conflict_table grew, the grown
10335 area wasn't cleared. Fix this.
10336
10337 * lib/.cvsignore: Add strdup.c, strdup.h.
10338 * m4/.cvsignore: Add strdup.m4.
10339
10340 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10341
10342 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10343 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10344 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10345 ngotos + 1 without checking for overflow.
10346 (build_relations): Use END_NODE, not -1, to denote end of edges.
10347 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10348 build_relations): Use goto_number, not int, for goto numbers.
10349 * src/tables.c (save_column, default_goto): Likewise.
10350
10351 2004-11-23 Akim Demaille <akim@epita.fr>
10352
10353 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10354 of #defining from yystype.
10355 Don't typedef yystype, C++ does not need it.
10356 This lets it possible to forward declare it as union.
10357
10358 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10359
10360 * bootstrap (gnulib_modules): Add extensions.
10361 Problem reported by Jim Meyering.
10362
10363 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10364
10365 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10366 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10367 src/system.h, src/tables.c: XFREE -> free, to accommodate
10368 recent change to gnulib xalloc.h.
10369 Problem reported by Jim Meyering.
10370
10371 2004-11-17 Akim Demaille <akim@epita.fr>
10372
10373 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10374
10375 2004-11-17 Akim Demaille <akim@epita.fr>,
10376 Alexandre Duret-Lutz <adl@gnu.org>
10377
10378 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10379 changes.
10380 (YYCDEBUG): Adjust.
10381 Use it instead of cdebug_.
10382 (Parser::debug_stream, Parser::set_debug_stream): New.
10383 (Parser::symprint_): Define cdebug_ for temporary backward
10384 compatibility.
10385 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10386 debug_stream ().
10387
10388 2004-11-17 Akim Demaille <akim@epita.fr>
10389
10390 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10391 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10392 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10393 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10394
10395 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10396
10397 * data/glr.c (yyloc_default): Remove; not used.
10398 Problem reported by Frank Heckenbach.
10399
10400 2004-10-25 Akim Demaille <akim@epita.fr>
10401
10402 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10403 Introduce another definition to address simple location arrays.
10404 (yyGLRStack): New member: yyerror_range.
10405 (yyrecoverSyntaxError, yyparse): Update it.
10406 (yyrecoverSyntaxError): Use it when shifting the error token to
10407 have an accurate range, equivalent to the one computed by both
10408 yacc.c and lalr1.cc.
10409 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10410 that column numbers start at column 0, as per GNU Coding
10411 Standards, the others tests, and the doc.
10412 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10413 Adjust to the above change (first column is 0).
10414 And adjust the location of the "<error>", now covering the whole
10415 line.
10416
10417 2004-10-22 Akim Demaille <akim@epita.fr>
10418 and Paul Eggert <eggert@cs.ucla.edu>
10419
10420 Remove some arbitrary limits on goto numbers and relations.
10421 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10422 initial values, since they're never used.
10423 (set_goto_map): ngotos is now unsigned, so test for overflow
10424 by seeing whether it wraps around to zero.
10425 * src/lalr.h (goto_number): Now size_t, not short int.
10426 (GOTO_NUMBER_MAXIMUM): Remove.
10427 * src/relation.c (relation_print, traverse, relation_transpose):
10428 Check for END_NODE rather than looking at sign.
10429 * src/relation.h (END_NODE): New macro.
10430 (relation_node): Now size_t, not short int.
10431
10432 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10433
10434 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10435 keyword, not an identifier. Problem reported by Baron Schwartz in
10436 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10437
10438 2004-10-11 Akim Demaille <akim@epita.fr>
10439
10440 * src/symtab.c (symbol_check_alias_consistency): Also check
10441 type names, destructors, and printers.
10442 Reported by Alexandre Duret-Lutz.
10443 Recode the handling of associativity and precedence in terms
10444 of symbol_precedence_set.
10445 Accept no redeclaration at all, not even equal to the previous
10446 value.
10447 (redeclaration): New.
10448 Use it to factor redeclaration complaints.
10449 (symbol_make_alias): Don't set the type of the alias, let
10450 symbol_check_alias_consistency do it as for other features.
10451 * src/symtab.h (symbol): Add new member prec_location, and
10452 type_location.
10453 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10454 * tests/input.at (Incompatible Aliases): New.
10455
10456 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10457
10458 .cvsignore fixes to accommodate gnulib changes,
10459 and the practice of naming build directories "_build".
10460 * .cvsignore: Add "_*". Sort.
10461 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10462 * m4/.cvsignore: Add "*_gl.m4".
10463
10464 2004-10-06 Akim Demaille <akim@epita.fr>
10465
10466 * src/parse-gram.y (add_param): Fix the truncation of trailing
10467 spaces.
10468
10469 2004-10-05 Akim Demaille <akim@epita.fr>
10470
10471 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10472 whether the reducion was empty or not. This leaves room to
10473 improve the use of YYLLOC_DEFAULT in such a case.
10474 lalr1.cc is still experimental, so changing this is acceptable.
10475 And finally, there are probably not many users who changed the
10476 handling of locations in GLR, so changing is admissible too.
10477
10478 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10479 empty reduction, set @$ to an empty location ending the previously
10480 stacked symbol.
10481 Adjust uses to make sure the code is triggered on empty
10482 reductions.
10483 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10484 expected output: empty reductions have empty locations.
10485
10486 2004-09-29 Akim Demaille <akim@epita.fr>
10487
10488 * data/lalr1.cc: Move towards a more standard C++ coding style
10489 for templates: Class < T > -> Class<T>.
10490
10491 2004-09-29 Akim Demaille <akim@epita.fr>
10492
10493 * data/lalr1.cc: Reinstall the former ctor, for sake of
10494 compatibility, but warn it will be removed.
10495 Move towards a more standard C++ coding style (i.e., type *var ->
10496 type* var).
10497
10498 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10499
10500 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10501 since it's less likely to work if NULs are involved in the future.
10502
10503 2004-09-27 Akim Demaille <akim@epita.fr>
10504
10505 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10506
10507 2004-09-27 Akim Demaille <akim@epita.fr>
10508
10509 * data/lalr1.cc (b4_parse_param_decl_1): New.
10510 (b4_parse_param_decl): Use it to have different names between attribute
10511 and argument names.
10512 (b4_cc_constructor_call): Likewise.
10513
10514 2004-09-24 Akim Demaille <akim@epita.fr>
10515
10516 * src/parse-gram.y (add_param): Strip the leading and trailing
10517 blanks from a formal argument declaration.
10518 (YY_LOCATION_PRINT): New.
10519
10520 2004-09-24 Akim Demaille <akim@epita.fr>
10521
10522 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10523 after the location.
10524
10525 2004-09-24 Akim Demaille <akim@epita.fr>
10526
10527 * doc/bison.texinfo (Table of Symbols): Sort.
10528
10529 2004-09-21 Akim Demaille <akim@epita.fr>
10530
10531 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10532 the useless parentheses.
10533 Suggested by Paul Eggert.
10534
10535 2004-09-20 Akim Demaille <akim@epita.fr>
10536
10537 Let the initial-action act on the look-ahead, and use it for the
10538 "initial push" (corresponding to an hypothetical beginning-of-file).
10539 And let lalr1.cc honor %initial-action.
10540
10541 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10542 example.
10543 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10544 (Parser::Parser): Remove the ctor that used to initialize it.
10545 (Parser::parse): Like in the other skeletons, issue the "starting
10546 parse" message before any action.
10547 Honor %initial-action.
10548 Initialize the stacks with the lookahead.
10549 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10550 look-ahead.
10551 Push them in the stacks.
10552 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10553
10554 2004-09-20 Akim Demaille <akim@epita.fr>
10555
10556 * doc/bison.texinfo (Initial Action Decl): New.
10557
10558 2004-09-20 Akim Demaille <akim@epita.fr>
10559
10560 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10561 clearer criterion to define it.
10562 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10563 When reducing on an empty RHS, use the latest stacked location as
10564 location.
10565 yylloc is not always available.
10566 * data/glr.c: Likewise.
10567 Also, honor initial-actions.
10568
10569 2004-09-20 Akim Demaille <akim@epita.fr>
10570
10571 * data/yacc.c (YY_LOCATION_PRINT): New.
10572 Define when we know YYLTYPE's structure, i.e., when the default
10573 YYLLOC_DEFAULT is used.
10574 * data/c.m4 (b4_yysymprint_generate): Use it.
10575 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10576 value of the result.
10577 (error_start_): Replace with...
10578 (error_range_): this location array.
10579 This allows to replace code relying on the implementation of
10580 locations by portable code.
10581 * data/yacc.c (yylerrsp): Replace with...
10582 (yyerror_range): this.
10583 Every time a token is popped, update yyerror_range[0], to have an
10584 accurate location for the error token.
10585 * data/glr.c (YY_LOCATION_PRINT): New.
10586 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10587 deference a pointer.
10588 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10589 report the location in %printers.
10590
10591 * src/scan-skel.l: Instead of abort, report error messages to ease
10592 understanding skeleton scanning failures.
10593
10594 2004-09-16 Akim Demaille <akim@epita.fr>
10595
10596 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10597 (iterator, const_iterator): these, to be more in the C++ spirit.
10598 Also, return reverse iterators so that when displaying the stack
10599 we display its bottom first.
10600 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10601 from yacc.c.
10602 We should probably use vector here though.
10603
10604 2004-09-16 Akim Demaille <akim@epita.fr>
10605
10606 Have more complete shift traces.
10607
10608 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10609 to report Shifts instead of ad hoc YYDPRINTF invocations,
10610 including for the error token.
10611 * data/lalr1.cc (symprint_): Output the location.
10612 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10613 output the location within the %printer.
10614 Activate GLR tests, at least to make sure they compile properly.
10615 They still don't pass though.
10616 * tests/calc.at: Adjust expect verbose output, since now "Entering
10617 state..." is on a different line than the "Shifting" message.
10618
10619 2004-09-08 Akim Demaille <akim@epita.fr>
10620
10621 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10622 Bison directive from the Bison file to the invocation of this
10623 macro, so that these directives are passed to
10624 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10625 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10626 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10627 the extra Bison directives instead of the whole series.
10628 Change the grammar so that there are recoverable errors, and
10629 unrecoverable errors. Now we can have the parser give up before
10630 consuming the whole input. As a result we now can observe that
10631 the lookahead is freed when needed.
10632 Change the parser source to parse argv[1] instead of a hard coded
10633 string.
10634 Simplify yylex, and give a value and location to EOF.
10635 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10636 passed directives already coded in the file.
10637 Add some tests to check the location of "error".
10638 For some tests, the C++ parser is correct, and not yacc.c.
10639 For other tests, they provide different, but unsatisfying, values,
10640 so keep the C++ value so that at least one parser is "correct"
10641 according to the test suite.
10642 (Actions after errors): Remove, this is subsumed by the
10643 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10644
10645 2004-09-06 Akim Demaille <akim@epita.fr>
10646
10647 * data/lalr1.cc: Adjust the indentation of the labels.
10648 (Parser::pop): New.
10649 Use it.
10650
10651 2004-09-06 Akim Demaille <akim@epita.fr>
10652
10653 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
10654 argument, an informative message.
10655 Call YY_SYMBOL_PRINT.
10656 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
10657 * data/lalr1.cc (destruct_): Likewise.
10658 In addition, no longer depend on b4_yysymprint_generate and
10659 b4_yydestruct_generate to generate these functions, do it "by
10660 hand".
10661
10662 2004-09-03 Akim Demaille <akim@epita.fr>
10663
10664 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
10665 invoked, yydestruct the lookahead.
10666 * tests/calc.at (Calculator $1): Update the expected lengths of
10667 traces: there is an added line for the discarded lookahead.
10668 * doc/bison.texinfo (Destructor Decl): Some rewording.
10669 Define "discarded" symbols.
10670
10671 2004-09-02 Akim Demaille <akim@epita.fr>
10672
10673 * data/lalr1.cc (translate_, destruct_): No reason to be static.
10674
10675 2004-09-02 Akim Demaille <akim@epita.fr>
10676
10677 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
10678 (YYDSYMPRINTF): Rename as...
10679 (YY_SYMBOL_PRINT): this.
10680 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
10681 two.
10682 Use it instead of direct symprint_ calls.
10683 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
10684 one.
10685
10686 2004-09-02 Akim Demaille <akim@epita.fr>
10687
10688 * data/lalr1.cc (b4_yysymprint_generate): New.
10689 (symprint_): New member function, defined when YYDEBUG.
10690 Use it consistently instead of token/nterm debugging output by
10691 hand.
10692 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
10693 %printer calls to use cdebug_ when using lalr1.cc.
10694
10695 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
10696
10697 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
10698 with #ifdef YYDEBUG.
10699
10700 2004-08-26 Akim Demaille <akim@epita.fr>
10701
10702 * doc/bison.texinfo (Implementing Loops): Rename as...
10703 (Implementing Gotos/Loops): this.
10704
10705 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
10706
10707 Adjust to latest gnulib.
10708 * bootstrap (gnulib_modules): Add xalloc-die.
10709 Set LC_ALL=C so that file names sort consistently.
10710 Prefer the gnulib copies of gettext.m4, glibc21.m4,
10711 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
10712 uintmax_t.m4, ulonglong.m4.
10713 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
10714 po.m4 since we are now using _gl.m4 instead.
10715
10716 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
10717
10718 * src/scan-action.l: Remove. Scanning of semantic actions is
10719 handled in scan-gram.l.
10720
10721 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
10722
10723 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
10724
10725 * src/location.h (struct): The file member is a uniqstr.
10726 (equal_boundaries): Use UNIQSTR_EQ for comparison.
10727
10728 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
10729
10730 Fix bug with non-%union parsers that have printers or destructors,
10731 which led to a Bison core dump. Reported by Peter Fales in
10732 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
10733
10734 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
10735 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
10736 not to our own type.
10737 * src/output.c (symbol_destructors_output, symbol_printers_output):
10738 Don't assume %union.
10739 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
10740 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
10741 UNION-FLAG. All callers changed.
10742 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
10743 Use type char, not unsigned int, when declaring an array of char;
10744 this lets us remove a cast.
10745 (Printers and Destructors): Add non-%union test cases.
10746
10747 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10748
10749 * doc/bison.texinfo: Minor editorial changes, mostly to the new
10750 GLR writeups. E.g., avoid frenchspacing and the future tense,
10751 change "lookahead" to "look-ahead", and change "wrt" to "with
10752 respect to".
10753
10754 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10755
10756 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
10757 New sections, split off from the GLR Parsers section. Put the new
10758 Simple GLR Parser near the start of the GLR section, for clarity.
10759 Rewrite connective text.
10760
10761 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
10762
10763 * doc/bison.texinfo (Simple GLR Parsers): New section.
10764
10765 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10766
10767 * NEWS, TODO, doc/bison.texinfo:
10768 Use "look-ahead" instead of "lookahead", to be consistent.
10769 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
10770 while we're fixing "look-ahead".
10771 * src/conflicts.c (shift_set): Renamed from shiftset.
10772 (look_ahead_set): Renamed from lookaheadset.
10773 * src/print.c: Likewise.
10774 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
10775 name for "lookahead".
10776 (report_types, usage): Likewise.
10777 * src/getargs.h (report_look_ahead_tokens): Renamed from
10778 report_lookaheads.
10779 * src/lalr.c (compute_look_ahead_tokens): Renamed from
10780 compute_lookaheads.
10781 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
10782 (look_ahead_tokens_print): Renamed from lookaheads_print.
10783 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
10784 state_rule_lookaheads_print.
10785 * src/state.h: Likewise.
10786 (reductions.look_ahead_tokens): Renamed from lookaheads.
10787 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
10788 AT_DATA_LOOKAHEADS_GRAMMAR.
10789
10790 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
10791
10792 * README: Update location of patched M4 distribution.
10793
10794 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
10795
10796 Don't assume the C++ compiler takes the same arguments as the C compiler
10797 (trivial change).
10798 * configure.ac (O0CXXFLAGS): New var.
10799 * tests/atlocal.in (CXXFLAGS): Use it.
10800
10801 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
10802
10803 Fix some "make check" problems with C++ reported by
10804 Albert Chin-A-Young for Tru64 C++ in this thread:
10805 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
10806
10807 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
10808 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10809 Output to a .cc file for C++, not to a .c file.
10810 * tests/calc.at (AT_CHECK_CALC): Likewise.
10811 * tests/regression.at (AT_CHECK_DANCER): Likewise.
10812 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
10813
10814 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
10815
10816 * tests/calc.at, tests/actions.at: Workaround for SGI
10817 C++ compiler. (trivial change)
10818
10819 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
10820
10821 Spent a few hours checking out which prerequisite versions the
10822 current sources actually require. I went all the way back to
10823 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
10824 a seemingly endless set of combinations of versions more recent
10825 than that. The bottom line is that the current sources require
10826 fairly recent versions of the build tools, and it'll be some work
10827 to change this.
10828 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
10829 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
10830 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
10831 Add comments explaining why those particular versions are
10832 currently needed.
10833
10834 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
10835 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
10836 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
10837
10838 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
10839 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
10840
10841 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
10842
10843 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
10844 0.11.5. Suggested by Bruno Haible.
10845 * bootstrap: Remove gettext version checking.
10846
10847 * doc/bison.texinfo (Decl Summary): Also mention that %union
10848 can depend on prerequisite types. Problem reported by Tim
10849 Van Holder.
10850
10851 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
10852
10853 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
10854 * README-alpha: Don't tell people not to package this.
10855
10856 * bootstrap: Don't assume $(...) works; use `...` instead.
10857 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
10858 gettext better.
10859
10860 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
10861 put into the -d output file, and mention what to do if YYSTYPE is
10862 defined as a macro.
10863
10864 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
10865
10866 Undo change made earlier today: it caused autopoint to not bring
10867 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
10868 autopoint's.
10869
10870 * bootstrap: Check that gettext version matches what's in
10871 configure.ac. Warn users to ignore robots.txt ERROR 404.
10872 * bootstrap: Undo today's earlier change (logged below).
10873 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
10874
10875 The gettext version checking is causing more trouble than it's
10876 curing; remove it. Problem reported by Paul Hilfinger.
10877
10878 * bootstrap: Issue a warning that one can expect a message
10879 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
10880 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
10881
10882 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
10883
10884 Ensure that the C++ compiler used for testing actually works on a
10885 simple test program; if not, skip the C++-related tests. Problem
10886 reported by Vin Shelton in:
10887 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
10888
10889 * m4/cxx.m4: New file.
10890 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
10891 * tests/atlocal.in (BISON_CXX_WORKS): Add.
10892 * tests/local.at (AT_COMPILE_CXX): Use it.
10893
10894 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10895
10896 * data/glr.c (yylloc): Output this macro even if locations are not
10897 being generated, as the GLR parser needs it even in that case.
10898 Problem reported by Troy A. Johnson
10899 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
10900
10901 * configure.ac (AC_INIT): Update to 1.875e.
10902
10903 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10904
10905 * NEWS: Version 1.875d.
10906 * configure.ac (AC_INIT): Likewise.
10907 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
10908
10909 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
10910 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
10911 lalr1.cc runs afoul of the first, and the last two are no longer
10912 supported by GCC 3.4.0.
10913 * README: Mention GNU m4 1.4 or later; mention m4 patches.
10914 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
10915
10916 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
10917
10918 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
10919 unsigned int, for compatibility with latest gnulib hash module.
10920 * src/state.c (state_hash, state_hasher): Likewise.
10921 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
10922 * src/uniqstr.c (hash_uniqstr): Likewise.
10923
10924 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
10925
10926 * NEWS: Unescaped newlines are no longer allowed in char & strings.
10927
10928 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
10929 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
10930 character and string literals.
10931 (unexpected_end): New function.
10932 (unexpected_eof): Use it.
10933 (unexpected_newline): New function.
10934 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
10935 actions.
10936
10937 * NEWS: Document %expect-rr.
10938
10939 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
10940 Fix typo by replacing $1 with $option.
10941 Remove more 'intl'-related files.
10942 Don't DEFUN AM_INTL_SUBDIR twice.
10943
10944 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
10945 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
10946 strtoul.c.
10947 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
10948 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
10949 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
10950 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
10951 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
10952 * src/.cvsignore: Add *.output.
10953
10954 * src/parse-gram.y: Put copyright notice inside %{ %} so it
10955 gets copied to the output file.
10956
10957 2004-04-28 Paul Eggert <eggert@twinsun.com>
10958
10959 Get files from the gnulib and po repositories, instead of relying
10960 on them being in our CVS. Upgrade to latest versions of gnulib
10961 and Automake.
10962
10963 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
10964 * bootstrap: Bootstrap from gnulib and po repositories.
10965 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
10966 * README-cvs: Document these changes. Remove version numbers from
10967 mentions of build tools, since they change so often. Mention Flex.
10968
10969 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
10970 (gl_USE_SYSTEM_EXTENSIONS): Add.
10971 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
10972 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
10973 does this for us.
10974 (AC_ISC_POSIX): Remove; we no longer support this
10975 ancient OS, as it gets in the way of latest Autoconf & gnulib.
10976 (AC_HEADER_STDC): Remove: we now assume C89 or better.
10977 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
10978 Do not check for C89 headers, except for locale.h which is used
10979 by the Yacc library and must port to K&R hosts.
10980 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
10981 Do not check for C89 functions, except for setlocale which is
10982 used by the Yacc library.
10983 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
10984 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
10985 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
10986 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
10987 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
10988 AM_GNU_GETTEXT): Remove; now done by:
10989 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
10990 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
10991 for us.
10992
10993 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
10994 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
10995 Define to empty, as gnulib.mk will do the rest for us.
10996 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
10997 for us.
10998 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
10999 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11000
11001 * src/files.c: Include gnulib's xstrndup.h.
11002
11003 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11004 (REALLOC): Use xnrealloc, for likewise.
11005 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11006 (strnlen, memrchr): Remove decls; functions no longer used.
11007 Include <stpcpy.h>.
11008
11009 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11010 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11011 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11012 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11013 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11014 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11015 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11016 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11017 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11018 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11019 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11020 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11021 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11022 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11023 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11024 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11025 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11026 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11027 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11028 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11029 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11030 Remove, as these files are now generated automatically
11031 by bootstrap or automake.
11032
11033 * po/ChangeLog: Remove: all but one entry was a duplicate
11034 of this file, and I moved that 2000-11-02 entry here.
11035
11036 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11037 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11038 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11039 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11040 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11041 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11042 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11043 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11044 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11045 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11046 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11047 xstrndup.h.
11048 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11049 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11050 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11051 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11052 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11053 * src/.cvsignore: Remove *_.c.
11054
11055
11056 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11057 support it. (The latest stable gzip doesn't.)
11058
11059 2004-04-27 Paul Eggert <eggert@twinsun.com>
11060
11061 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11062 case, as stos_ is now used by destructors due to the 2004-02-09
11063 change.
11064
11065 Remove more K&R C support.
11066 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11067 * lib/subpipe.c (errno): Remove decl.
11068 Include <stdlib.h> unconditionally.
11069 (EXIT_FAILURE): Remove macro.
11070 * src/complain.c (vfprintf, strerror): Remove.
11071 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11072 unconditionally.
11073 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11074 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11075 (strchr, strspn, memchr): Remove decls.
11076 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11077 unconditionally. Do not declare perror.
11078 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11079 unconditionally.
11080
11081 * src/complain.c (_): Remove useless defn, as system.h defines this.
11082
11083 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11084 with latest obstack.h.
11085 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11086 to procedure types, as obstack.h now does that for us.
11087 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11088
11089 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11090 so that this include file can stand alone.
11091 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11092 does this now. Include subpipe.h first after config.h, to
11093 test whether it can stand alone.
11094
11095 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11096 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11097 unused declaration.
11098
11099 * tests/synclines.at (%union synch line): Put a dummy member in
11100 the union, because empty unions aren't allowed in C. Caught
11101 by GCC 3.4.0.
11102
11103 2004-04-13 Jim Meyering <jim@meyering.net>
11104
11105 * src/conflicts.c (conflicts_print): Correct format string typo:
11106 use `%%' to produce literal `%'. (trivial change)
11107
11108 2004-03-30 Paul Eggert <eggert@twinsun.com>
11109
11110 * src/getargs.c (version): Update copyright year to 2004.
11111
11112 * data/c.m4 (b4_int_type): Use 'short int' rather than
11113 'short', and similarly for 'long', 'unsigned', etc.
11114 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11115 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11116 yy_yypstack, yydumpstack): Likewise.
11117 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11118 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11119 Likewise.
11120 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11121 yy_stack_print, yyparse): Likewise.
11122 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11123 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11124 * lib/bitset.c (bitset_print): Likewise.
11125 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11126 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11127 * lib/bitsetv.c (bitsetv_dump): Likewise.
11128 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11129 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11130 Likewise.
11131 * src/LR0.c (allocate_itemsets): Likewise.
11132 * src/gram.h (rule_number, rule): Likewise.
11133 * src/lalr.h (goto_number): Likewise.
11134 * src/nullable.c (nullable_compute): Likewise.
11135 * src/output.c (prepare_rules): Likewise.
11136 * src/relation.c (relation_print, relation_digraph): Likewise.
11137 * src/relation.h (relation_node): Likewise.
11138 * src/state.h (state_number, transitions, errs, reductions,
11139 struct state): Likewise.
11140 * src/symtab.h (symbol_number, struct symbol): Likewise.
11141 * src/tables.c (vector_number, tally, action_number,
11142 default_goto, goto_actions): Likewise.
11143 * tests/existing.at (GNU Cim Grammar): Likewise.
11144 * tests/regression.at (Web2c Actions): Likewise.
11145
11146 * src/output.c (muscle_insert_short_int_table): Renamed from
11147 muscle_insert_short_table. All uses changed.
11148
11149 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11150
11151 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11152 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11153 Add %expect-rr rule.
11154
11155 * src/scan-gram.l: Recognize %expect-rr.
11156
11157 * src/conflicts.h (expected_sr_conflicts): Rename from
11158 expected_conflicts.
11159 (expected_rr_conflicts): Declare.
11160
11161 * src/conflicts.c (expected_sr_conflicts): Rename from
11162 expected_conflicts.
11163 (expected_rr_conflicts): Define.
11164 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11165 for GLR parsers.
11166 Use expected_sr_conflicts in place of expected_conflicts.
11167 Warn if expected_rr_conflicts used in non-GLR parser.
11168
11169 * doc/bison.texinfo: Add documentation for %expect-rr.
11170
11171 2004-03-08 Paul Eggert <eggert@gnu.org>
11172
11173 Add support for hex token numbers. Suggested by Odd Arild Olsen in
11174 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
11175
11176 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11177 in lalr1.cc.
11178 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11179 * src/scan-gram.l (scan_integer): New function.
11180 ({int}): Use it.
11181 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11182 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11183 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11184 Say "long int", not "long", for uniformity with GNU style.
11185
11186 2004-02-25 Paul Eggert <eggert@twinsun.com>
11187
11188 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11189 compilers. This fixes a problem with Intel's C++ compiler being
11190 chatty, reported by Guido Trentalancia in
11191 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
11192
11193 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11194
11195 Support %destructor and merge error locations in lalr1.cc.
11196
11197 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11198 (Parser::stos_): Define unconditionally.
11199 (Parser::destruct_): New method. Generate its body with
11200 b4_yydestruct_generate.
11201 (Parser::error_start_): New attribute.
11202 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11203 token which are discarded.
11204 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11205 error_start_ when erroneous token are discarded.
11206 (Parser::parse) <yyerrlab1>: Compute the location of the error
11207 token so that it covers all the discarded tokens.
11208 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11209 it can be called with `%skeleton "lalr1.cc"', and do that.
11210
11211 2004-02-02 Paul Eggert <eggert@twinsun.com>
11212
11213 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11214 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11215 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11216 There's no need to mention top_builddir since Automake does that
11217 for us.
11218 (INCLUDES): Remove, as Automake says it's obsolescent.
11219 Contents migrated into AM_CPPFLAGS as described above.
11220 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11221
11222 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11223
11224 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11225 (yyreportSyntaxError): Handle case where lookahead token is
11226 YYEMPTY.
11227
11228 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11229
11230 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11231 resulting parsers are compilable with C++.
11232
11233 2003-12-23 Paul Eggert <eggert@twinsun.com>
11234
11235 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11236 * src/output.c (output_skeleton): Rename local var.
11237 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11238 Bison tokens, as this runs afoul of the 2003-10-07 change that
11239 disallowed NUL bytes in character constants or string literals.
11240
11241 * tests/local.at: Require Autoconf 2.59's Autotest.
11242 * tests/testsuite.at: Don't include local.at, since we now assume
11243 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11244 including it.
11245 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11246 multiple inclusion warnings.
11247
11248 2003-12-02 Akim Demaille <akim@epita.fr>
11249
11250 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11251 conditions.
11252 From Bruno Haible.
11253
11254 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
11255
11256 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11257
11258 2003-10-07 Paul Eggert <eggert@twinsun.com>
11259
11260 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11261 if testsuite doesn't exist.
11262
11263 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11264 literals, unfortunately.
11265 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11266 Complain about NUL bytes in character constants or string literals.
11267
11268 2003-10-05 Paul Eggert <eggert@twinsun.com>
11269
11270 * NEWS: Don't document %no-default-prec, as it's still
11271 too experimental.
11272 * doc/bison.texinfo: Document %no-default-prec only if
11273 the defaultprec flag is set. Normally it's not.
11274
11275 2003-10-04 Paul Eggert <eggert@twinsun.com>
11276
11277 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11278 non-modifiable lvalue, instead of a modifiable one.
11279 * doc/bison.texinfo (Actions): Document that $$ can
11280 be assigned to. Do not claim that $$ and $N are
11281 array element references: user code should not rely on this.
11282
11283 2003-10-01 Paul Eggert <eggert@twinsun.com>
11284
11285 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11286 (grammar_declaration): Use it.
11287 * src/scan-gram.l: New token %no-default-prec.
11288 * tests/conflicts.at: Revamp tests to use %no-default-prec.
11289 * NEWS, doc/bison.texinfo: Document the above.
11290
11291 2003-10-01 Akim Demaille <akim@epita.fr>
11292
11293 VCG no longer supports long_straight_phase.
11294
11295 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11296 * src/print_graph.c (print_graph): Adjust.
11297
11298 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
11299 and Paul Eggert <eggert@twinsun.com>
11300
11301 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11302 Table of Symbols): Document %default-prec.
11303 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11304 (grammar_declaration): Set default_prec on %default-prec.
11305 * src/scan-gram.l (%default-prec): New token.
11306 * src/reader.h (default_prec): New flag.
11307 * src/reader.c: Likewise.
11308 (packgram): Handle it.
11309 * tests/conflicts.at (%default-prec without %prec,
11310 %default-prec with %prec, %default-prec 1): New tests.
11311
11312 2003-09-30 Paul Eggert <eggert@twinsun.com>
11313
11314 * tests/testsuite.at: Include local.at, not input.at, fixing
11315 a typo in the 2003-08-25 patch.
11316
11317 2003-08-27 Akim Demaille <akim@epita.fr>
11318
11319 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11320 GCC warnings.
11321
11322 2003-08-26 Akim Demaille <akim@epita.fr>
11323
11324 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11325 "<\#" to avoid magic from Gnus when posting parts of this script.
11326
11327 2003-08-26 Akim Demaille <akim@epita.fr>
11328
11329 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11330 (Parser::parse): here.
11331 Adjust: nerrs and errstatus is now replaced by...
11332 (Parser::nerrs_, Parser::errstatus_): New.
11333
11334 2003-08-25 Akim Demaille <akim@epita.fr>
11335
11336 * config/announce-gen, Makefile.cfg: New.
11337 * Makefile.am: Adjust.
11338 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11339 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11340
11341 2003-08-25 Akim Demaille <akim@epita.fr>
11342
11343 When reducing initial empty rules, Bison parser read an initial
11344 location that is not defined. This results in garbage, and that
11345 affects Bison's own parser. Therefore we need (i) to extend Bison
11346 to support a means to initialize this location, and (ii) to use
11347 this CVS Bison to fix CVS Bison's parser.
11348
11349 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11350 with...
11351 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11352 * src/parse-gram.y: Adjust.
11353 (%initial-action): New.
11354 (%error-verbose): Since we require CVS Bison, there is no reason
11355 not to use it.
11356 * src/scan-gram.l: Adjust.
11357 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11358 * data/yacc.c (yyparse): Use b4_initial_action.
11359
11360 2003-08-25 Akim Demaille <akim@epita.fr>
11361
11362 * doc/bison.texinfo: Don't promote stdout for error messages.
11363
11364 2003-08-25 Akim Demaille <akim@epita.fr>
11365
11366 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11367 From Alexandre Duret-Lutz.
11368
11369 2003-08-25 Akim Demaille <akim@epita.fr>
11370
11371 Version 1.875c.
11372
11373 2003-08-25 Akim Demaille <akim@epita.fr>
11374
11375 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11376 Use them.
11377
11378 2003-08-25 Akim Demaille <akim@epita.fr>
11379
11380 * data/lalr1.cc (Parser::reduce_print_): New.
11381 Use it.
11382
11383 2003-08-25 Akim Demaille <akim@epita.fr>
11384
11385 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11386 error recovery loops. This patch is based on
11387 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
11388 Also, augment the similarity between lalr1.cc and yacc.c.
11389 Note: the locations of error recovery rules are not correct yet.
11390
11391 * data/lalr1.cc: Comment changes to augment the similarity between
11392 lalr1.cc and yacc.c.
11393 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11394 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11395 yyerrlab), when hitting EOF, pop the whole stack here instead of
11396 merely falling thru the default error handling mechanism.
11397 (yyerrorlab): New label, with the old contents of YYERROR,
11398 plus the following change: pop the stack of rhs corresponding
11399 to the production that invoked YYERROR. That is how Yacc
11400 behaves (required by POSIX).
11401 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11402 fail.
11403
11404 2003-08-25 Akim Demaille <akim@epita.fr>
11405
11406 Tune local.at so that people can "autom4te -l autotest calc.at -o
11407 calc" for instance, to extract a sub test suite.
11408
11409 * tests/testsuite.at: Move the initialization, Autotest version
11410 requirement, and AT_TESTED invocation into...
11411 * tests/local.at: here.
11412 * tests/testsuite.at: Include it for compatibility with Autoconf
11413 2.57.
11414 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11415 be ignore.
11416
11417 2003-08-04 Paul Eggert <eggert@twinsun.com>
11418
11419 Rework code slightly to avoid gcc -Wtraditional warnings.
11420 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11421 The returned value is now stored in *YY0. All callers changed.
11422 * src/output.c (merge_output): Adjust to the above change.
11423
11424 2003-07-26 Paul Eggert <eggert@twinsun.com>
11425
11426 * data/glr.c (YYASSERT): New macro.
11427 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11428 yyresolveStates, yyprocessOneStack):
11429 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11430 Derived from a suggestion by Frank Heckenbach.
11431
11432 2003-07-25 Paul Eggert <eggert@twinsun.com>
11433
11434 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11435 for portability to K&R C (after ansi2knr, presumably). See
11436 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
11437 by Frank Heckenbach, though I have omitted the structure-initialization
11438 part of his glr-knr.diff patch since I recall that the Portable
11439 C Compiler didn't require that change.
11440
11441 Let the user specify how to allocate and free memory.
11442 Derived from a suggestion by Frank Heckenbach in
11443 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
11444 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11445 All uses of free, malloc, realloc changed to use these macros,
11446 and unnecessary casts removed.
11447 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11448
11449 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11450
11451 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11452 use s.empty() rather than s == "" to test for empty string; see
11453 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
11454 (trivial change)
11455
11456 2003-06-25 Akim Demaille <akim@epita.fr>
11457
11458 * config/depcomp, config/install-sh: Update from masters.
11459
11460 2003-06-20 Paul Eggert <eggert@twinsun.com>
11461
11462 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11463 and return properly parenthesized result.
11464 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11465 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11466 Remove unnecessary parentheses from uses.
11467 * doc/bison.texinfo (Location Default Action): Describe the
11468 conventions for parentheses.
11469
11470 2003-06-19 Paul Eggert <eggert@twinsun.com>
11471
11472 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11473 yyreportTree): Do not assume that size_t is the same width as int,
11474 when printing sizes. Print sizes using an unsigned format.
11475 Problem reported by Frank Heckenbach in
11476 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
11477
11478 Port to Forte Developer 7 C compiler.
11479 * data/glr.c (struct YYLTYPE): If locations are not being used,
11480 declare a single dummy member, as empty structs do not conform
11481 to the C standard.
11482 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11483 the Forte Developer 7 C compiler complains that end-of-loop
11484 code is not reached.
11485
11486 2003-06-17 Paul Eggert <eggert@twinsun.com>
11487
11488 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11489 avoid warnings from picky compilers about redefinition of PARAMS.
11490
11491 2003-06-17 Paul Eggert <eggert@twinsun.com>
11492
11493 Version 1.875b.
11494
11495 * NEWS: Document 1.875b.
11496
11497 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11498 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11499 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11500 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11501 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11502 per recent gettext manual's suggestion.
11503 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11504 Use prototypes, not old-style definitions.
11505 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11506 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11507 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11508 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11509 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11510 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11511 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11512 vbitset_or_and_cmp, vbitset_copy): Likewise.
11513
11514 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11515 Do not include <stdlib.h>.
11516 (PARAMS): Define unconditionally for C89.
11517 (ATTRIBUTE_NORETURN): Remove.
11518 (ATTRIBUTE_UNUSED): Define unconditionally.
11519
11520 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
11521 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
11522 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11523 * lib/vbitset.c, lib/vbitset.h: New files.
11524 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11525 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11526 from libbitset.
11527
11528 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11529 `How Can I Reset @code{yyparse}', since texinfo does not allow
11530 arbitrary @ in node names.
11531
11532 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11533 shouldn't be needed according to the gettext 0.12.1 documentation
11534 but which seem to be needed anyway: codeset.m4 glibc21.m4
11535 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
11536 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
11537 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
11538
11539 * lib/.cvsignore: Add stdbool.h.
11540 * m4/.cvsignore: Add nls.m4, po.m4.
11541
11542 Upgrade to CVS gnulib.
11543 * stdbool_.h: File renamed from stdbool.h.in.
11544 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11545 AC_HEADER_STDBOOL.
11546 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11547 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11548 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11549 (MOSTLYCLEANFILES): New var.
11550 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11551 (stdbool.h): New rule.
11552 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11553 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11554 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11555 m4/quote.m4: Upgrade to today's gnulib.
11556
11557 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11558 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11559 the tests right now.
11560 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11561 yyerror are declared before use; C99 requires this.
11562
11563 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11564
11565 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11566 first.
11567 (yyrecoverSyntaxError): Correct the logic for setting and testing
11568 yyerrState.
11569 Correct comment on handling EOF.
11570 Allow states with only a default reduction, rather than failing
11571 (I can't quite reconstruct why these were not allowed before).
11572
11573 Fixes to avoid problem that $-N rules in GLR parsers can cause
11574 buffer overruns, corrupting state.
11575
11576 * src/output.c (prepare_rules): Output max_left_semantic_context
11577 definition.
11578 * src/reader.h (max_left_semantic_context): New variable declaration.
11579 * src/scan-gram.l (max_left_semantic_context): Define.
11580 (handle_action_dollar): Update max_left_semantic_context.
11581 * data/glr.c (YYMAXLEFT): New definition.
11582 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11583 (yyresolveAction): Ditto.
11584
11585 Fixes to problems with location handling in GLR parsers reported by
11586 Frank Heckenbach (2003/06/05).
11587
11588 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11589 (YYRHSLOC): Add parentheses, and define only if locations used.
11590 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11591 locations not used.
11592 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11593 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
11594
11595 * tests/cxx-type.at: Exercise location information; update tests
11596 to differentiate output with and without locations.
11597 Remove forward declarations of yylex and yyerror---caused errors
11598 because default YYLTYPE not yet defined.
11599 Change semantic actions to compute strings, rather than printing
11600 them directly (to test proper passing of semantics values). Change
11601 output to prefix notation and update test data and expected results.
11602 (yylex): Track locations.
11603 (stmtMerge): Return value rather than printing, and include arguments
11604 in value.
11605
11606 2003-06-03 Paul Eggert <eggert@twinsun.com>
11607
11608 Avoid warnings generated by GCC 2.95.4 when Bison is
11609 configured with --enable-gcc-warnings.
11610 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11611 yy::]b4_parser_class_name[::translate_,
11612 yy::Stack::operator[] (unsigned),
11613 yy::Stack::operator[] (unsigned) const,
11614 yy::Slice::operator[] (unsigned),
11615 yy::Slice::operator[] (unsigned) const):
11616 Rename local vars to avoid warnings.
11617 * tests/glr-regression.at (Improper handling of embedded actions
11618 and $-N in GLR parsers): Remove unused local variable from yylex.
11619 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11620 (void) as arg when not pure, since we now assume C89 when building
11621 Bison. Pacify GCC by using parameter.
11622
11623 2003-06-02 Paul Eggert <eggert@twinsun.com>
11624
11625 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11626 yy::Location::lines, yy::Location::columns): Rename arguments
11627 to avoid shadowing; this removes a warning generated by GCC 3.3.
11628
11629 2003-06-01 Paul Eggert <eggert@twinsun.com>
11630
11631 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11632 to g++, as GCC 3.3 complains if you do it.
11633 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11634 everything that WARNING_CFLAGS has, except omit warnings
11635 not suitable for C++.
11636 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11637 * tests/atlocal.in (CXXFLAGS): New var.
11638 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11639
11640 Fix a GLR parser bug I reported in February; see
11641 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
11642 The problem was that GLR parsers did not conform to the C standard,
11643 because actions like { $1 = $2 + $3; } expanded to expressions
11644 that invoked YYFILL in separate subexpressions, and YYFILL assigned
11645 to a local variable. The C standard says that expressions
11646 like (var = f ()) + (var = f ()) have undefined behavior.
11647 Another problem was that GCC sometimes issues warnings that
11648 yyfill and its parameters are unused.
11649
11650 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
11651 as possibly unused.
11652 (yyfill): New function.
11653 (YYFILL): Use it.
11654 (yyuserAction): Change type of yynormal to bool, so that it matches
11655 the new yyfill signature. Mark it as possibly unused.
11656
11657
11658 Follow up on a bug I reported in February, where a Bison-generated
11659 parser can loop. Provide a test case and a fix for yacc.c. I
11660 don't have a fix for lalr1.cc or for glr.c, unfortunately.
11661 The original bug report is in:
11662 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
11663
11664 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
11665 macro's size was becoming unwieldy.
11666 (yyerrlab): Do not discard an empty lookahead symbol, as this
11667 might destroy garbage.
11668 (yyerrorlab): New label, with the old contents of YYERROR,
11669 plus the following change: pop the stack of rhs corresponding
11670 to the production that invoked YYERROR. That is how Yacc
11671 behaves, and POSIX requires this behavior.
11672 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
11673 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
11674 Define 'alarm' to do nothing if unistd.h is not available.
11675 Add a new rule "exp: '-' error;" to test the above change to
11676 data/yacc.c. Use 'alarm' to abort any test taking longer than
11677 10 seconds, as it's probably looping.
11678 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
11679 Also, the new yacc.c generates two fewer diagnostics for an
11680 existing test.
11681
11682 2003-05-24 Paul Eggert <eggert@twinsun.com>
11683
11684 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
11685 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
11686 This fixes a problem reported by John Bowman when the Compaq/HP
11687 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
11688 -ansi -Wall -gall).
11689 * data/yacc.c (union yyalloc): Likewise.
11690 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
11691
11692 Switch from 'int' to 'bool' where that makes sense.
11693
11694 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
11695 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
11696 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
11697 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
11698 Return or accept bool, not int. All callers changed.
11699 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
11700 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
11701 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
11702 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
11703 bitset_or_and_cmp_): Likewise.
11704 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
11705 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
11706 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
11707 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
11708 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
11709 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
11710 bitset_stats_or_and_cmp): Likewise.
11711 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
11712 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
11713 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
11714 ebitset_xor_cmp): Likewise.
11715 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
11716 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
11717 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
11718 lbitset_xor_cmp): Likewise.
11719 * lib/bbitset.h: Include <stdbool.h>.
11720 (struct bitset_vtable): The following members now return bool, not
11721 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
11722 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
11723 or_and_cmp).
11724 * src/conflicts.c (count_rr_conflicts): Likewise.
11725 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
11726 All uses changed.
11727 * lib/ebitset.c (ebitset_obstack_init): Likewise.
11728 * lib/lbitset.c (lbitset_obstack_init): Likewise.
11729 * src/getargs.c (debug_flag, defines_flag, locations_flag,
11730 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11731 graph_flag): Likewise.
11732 * src/getargs.h (debug_flag, defines_flag, locations_flag,
11733 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11734 graph_flag): Likewise.
11735 * src/output.c (error_verbose): Likewise.
11736 * src/output.h (error_verbose): Likewise.
11737 * src/reader.c (start_flag, typed): Likewise.
11738 * src/reader.h (typed): Likewise.
11739 * src/getargs.c (LOCATIONS_OPTION): New constant.
11740 (long_options, getargs): Use it.
11741 * src/lalr.c (build_relations): Use bool, not int.
11742 * src/nullable.c (nullable_compute): Likewise.
11743 * src/print.c (print_reductions): Likewise.
11744 * src/tables.c (action_row, pack_vector): Likewise.
11745 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
11746 * src/output.c (prepare): Use it.
11747 * src/output.c (token_definitions_output,
11748 symbol_destructors_output, symbol_destructors_output): Use string,
11749 not boolean integer, to keep track of whether to output separator.
11750 * src/print_graph.c (print_core): Likewise.
11751 * src/state.c (state_rule_lookaheads_print): Likewise.
11752
11753 * config/install-sh: Sync from automake 1.7.5.
11754
11755 2003-05-14 Paul Eggert <eggert@twinsun.com>
11756
11757 * src/parse-gram.y (rules_or_grammar_declaration): Require a
11758 semicolon after a grammar declaration, in the interest of possible
11759 future changes to the Bison input language.
11760 Do not allow a stray semicolon at the start of the grammar.
11761 (rhses.1): Allow one or more semicolons after any rule, including
11762 just before "|" as required by POSIX.
11763 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
11764 grammar.
11765
11766 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
11767
11768 %parse-param support for lalr1.cc.
11769
11770 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
11771 b4_cc_constructor_calls, b4_cc_constructor_call,
11772 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
11773 definitions.
11774 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
11775 parse-param arguments.
11776 (yy::b4_parser_class_name): Declare instance variables to
11777 hold parse-param arguments.
11778 * tests/calc.at: s/value/semantic_value/ because value clashes
11779 with a member of yy::b4_parser_class_name. Adjust C++ code
11780 to handle %parse-param. Enable %parse-param test in C++.
11781
11782 2003-05-12 Paul Eggert <eggert@twinsun.com>
11783
11784 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
11785 English a bit. Fix fclose typo. Change "const char" to "char
11786 const", and use ANSI C rather than K&R for "main". Suggest
11787 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
11788 and suggest yy_switch_to_buffer.
11789
11790 2003-05-05 Paul Eggert <eggert@twinsun.com>
11791
11792 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
11793 C89. This avoids a diagnostic on compilers that define __STDC__
11794 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
11795 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
11796
11797 2003-05-03 Paul Eggert <eggert@twinsun.com>
11798
11799 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
11800 Do not overrun array bounds.
11801 This should fix a bug reported today by Olatunji Oluwabukunmi in
11802 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
11803
11804 2003-04-29 Akim Demaille <akim@epita.fr>
11805
11806 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
11807 * src/getargs.c, src/getargs.h: here, as bool, not int.
11808 (nondeterministic_parser): New.
11809 * src/parse-gram.y, src/scan-gram.l: Support
11810 %nondeterministic-parser.
11811 * src/output.c (prepare): Use nondeterministic_parser instead
11812 of glr_parser where appropriate.
11813 * src/tables.c (conflict_row, action_row, save_row)
11814 (token_actions, token_actions, pack_vector): Ditto.
11815
11816 2003-04-29 Akim Demaille <akim@epita.fr>
11817
11818 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
11819
11820 2003-04-29 Akim Demaille <akim@epita.fr>
11821
11822 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
11823 with %pure-parser and %locations to exercise the patch from Yakov
11824 Markovitch below.
11825
11826 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
11827
11828 * data/yacc.c: (b4_lex_param): Corrected for the case where
11829 %lex-param is provided and %pure-parser isn't.
11830
11831 2003-04-27 Paul Eggert <eggert@twinsun.com>
11832
11833 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
11834 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
11835 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
11836 if it is not defined.
11837 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
11838
11839 2003-04-26 Paul Eggert <eggert@twinsun.com>
11840
11841 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
11842 Declare to be of type suitable for the ninf value itself, not of
11843 type suitable for the corresponding table, since the latter might
11844 be unsigned but the ninf value might be negative. This fixes a
11845 bug reported by Alexandre Duret-Lutz in
11846 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
11847
11848 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
11849 invokes it. We shouldn't invoke it twice because it will attempt
11850 to put error.o in the archive twice. This fixes a glitch reported
11851 by Martin Mokrejs in
11852 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
11853
11854 2003-04-21 Paul Eggert <eggert@twinsun.com>
11855
11856 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
11857 to gnulib.
11858
11859 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
11860
11861 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
11862 Fix obvious typo that results in uncompilable GLR parsers
11863 when both %pure-parser and %locations are used. (trivial change)
11864
11865 2003-04-17 Paul Eggert <eggert@twinsun.com>
11866
11867 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
11868 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
11869 Do not insert the expected token via unput, as this runs afoul
11870 of a POSIX-compatibility bug in flex 2.5.31.
11871 All uses changed to BEGIN the parent state,
11872 since we no longer insert the expected token via unput.
11873 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
11874 that is no longer emitted after the above change.
11875
11876 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
11877 the first one. This change is from Paul Hilfinger, and it fixes
11878 regression reported by Werner Lemberg in
11879 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
11880
11881 (resolve_sr_conflict): Don't invoke state_errs_set
11882 unless one or more tokens have been explicitly made errors.
11883 Otherwise, the above change causes Bison to abort.
11884
11885 * tests/existing.at (GNU pic Grammar): New test case, taken from
11886 Lemberg's email.
11887
11888 2003-03-31 Akim Demaille <akim@epita.fr>
11889
11890 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
11891
11892 2003-03-31 Akim Demaille <akim@epita.fr>
11893
11894 * src/output.c (prepare_symbols): Avoid trailing spaces in the
11895 output.
11896
11897 2003-03-31 Akim Demaille <akim@epita.fr>
11898
11899 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
11900 From Paul Hilfinger.
11901
11902 2003-03-29 Akim Demaille <akim@epita.fr>
11903
11904 * m4/error.m4: Do not put under dynamic conditions some code which
11905 expansion is under static control.
11906
11907 2003-03-29 Akim Demaille <akim@epita.fr>
11908
11909 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
11910
11911 2003-03-29 Akim Demaille <akim@epita.fr>
11912
11913 * doc/bison.texinfo (Strings are Destroyed): New.
11914
11915 2003-03-13 Paul Eggert <eggert@twinsun.com>
11916
11917 * .cvsignore: Add configure.lineno.
11918 * src/.cvsignore: Add yacc.
11919 * tests/.cvsignore: Add testsuite.log.
11920 * doc/fdl.texi: Sync with latest FSF version.
11921
11922 2003-03-12 Paul Eggert <eggert@twinsun.com>
11923
11924 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
11925 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
11926 cursor, instead of leaving it undefined. This fixes a bug
11927 reported by Tim Van Holder in
11928 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
11929 * tests/input.at (Torturing the Scanner): Test the scanner on
11930 an empty input file, which was Tim Van Holder's test case.
11931
11932 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
11933 <sys/resource.h> can be included, include sys/time.h and
11934 sys/times.h first, if available. This works around the SunOS
11935 4.1.4 porting bug reported by Bruce Becker in
11936 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
11937
11938 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
11939 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
11940 AC_HEADER_SYS_WAIT.
11941
11942 Merge changes from gnulib. This was prompted because the CVS
11943 snapshot didn't build on Solaris 7 due to strnlen problems.
11944
11945 These changes need to be merged back into gnulib:
11946 * lib/hash.c: Include <stdbool.h> unconditionally.
11947 * m4/onceonly.m4 (m4_quote): New macro.
11948 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
11949 Quote AC_FOREACH variable-expansions properly.
11950 The 2003-01-03 obstack.h change also needs merging.
11951 {end of changes requiring merging}
11952
11953 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11954 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
11955 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
11956 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
11957 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
11958 New files, imported from gnulib.
11959 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
11960 above.
11961
11962 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
11963 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
11964 gnulib sources.
11965
11966 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
11967 Add.
11968 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
11969 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
11970 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
11971 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
11972 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
11973 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
11974 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
11975 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
11976 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
11977 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
11978 (jm_PREREQ_ARGMATCH): Remove.
11979 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
11980 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
11981
11982 * src/system.h: Include <stdbool.h> unconditionally.
11983
11984 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
11985 assuming at least C89 in the bitset code for some time now.
11986
11987 2003-03-03 Akim Demaille <akim@epita.fr>
11988
11989 * ro.po: New.
11990
11991 2003-03-02 Akim Demaille <akim@epita.fr>
11992
11993 * doc/bison.texinfo (Table of Symbols): Reactivate the
11994 documentation for %lex-param, and %parse-param.
11995
11996 2003-03-02 Akim Demaille <akim@epita.fr>
11997
11998 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
11999 generate verbose error messages.
12000 Use the number of tokens as an upper bound in yytname, as it
12001 cannot be a non terminal.
12002
12003 2003-03-02 Akim Demaille <akim@epita.fr>
12004
12005 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12006 message.
12007
12008 2003-03-02 Akim Demaille <akim@epita.fr>
12009
12010 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12011 Use them to exercise yycheck overrun.
12012 Based on Andrew Suffield's grammar.
12013
12014 2003-03-02 Akim Demaille <akim@epita.fr>
12015
12016 Create tests/local.at for Bison generic testing macros.
12017
12018 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12019 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12020 This new file.
12021 * tests/calc.at (AT_CHECK_CALC): Adjust.
12022 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12023 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12024 * tests/local.at: here.
12025 (AT_COMPILE_CXX): Tags the tests using it as c++.
12026 Ignore the test if CXX is not functional.
12027
12028 2003-03-01 Paul Eggert <eggert@twinsun.com>
12029
12030 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12031 not loc->end, since loc->end might contain garbage and this leads
12032 to undefined behavior on some platforms.
12033 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12034 depend on *loc, so that the reader doesn't give the the false
12035 impression that *loc is initialized.
12036 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12037 does not survive the return.
12038
12039 2003-03-01 Akim Demaille <akim@epita.fr>
12040
12041 * src/scan-gram.l (code_start): Always initialize it when entering
12042 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12043 yylex invocation. An alternative would be making it static, but
12044 then it starts with the second %%'s beginning, instead of its end.
12045
12046 2003-02-28 Paul Eggert <eggert@twinsun.com>
12047
12048 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12049 around a UnixWare 7.1.1 porting bug reported by John Hughes in
12050 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
12051
12052 2003-02-26 Paul Eggert <eggert@twinsun.com>
12053
12054 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12055 Remove Sequent/Pyramid discussion (nobody uses them any more).
12056 Merge VMS and MS-DOS discussion; these ports may well be dead
12057 but let's keep mentioning them for now. Put <> around email
12058 addresses. Add copyright notice.
12059
12060 2003-02-24 Paul Eggert <eggert@twinsun.com>
12061
12062 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12063 to avoid collision with flex use of yylineno.
12064 Problem reported by Bruce Lilly in
12065 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
12066 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12067 * data/yacc.c (yy_reduce_print): Likewise.
12068
12069 * config/depcomp: Sync with Automake 1.7.3.
12070
12071 2003-02-21 Akim Demaille <akim@epita.fr>
12072
12073 * data/lalr1.cc: Use temporary variables instead of casts to
12074 change integer types.
12075 Suggested by Paul Eggert.
12076
12077 2003-02-21 Akim Demaille <akim@epita.fr>
12078
12079 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12080 to avoid confusions with lalr1.cc's notion of Position.
12081 Suggested by Paul Eggert.
12082
12083 2003-02-20 Akim Demaille <akim@epita.fr>
12084
12085 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12086 before initial_columns.
12087 (location.hh): Use consistent variable names when defining the
12088 operator<<.
12089 Use "last" so that we subtract from Positions, not from unsigned.
12090
12091 2003-02-20 Akim Demaille <akim@epita.fr>
12092
12093 * data/lalr1.cc (position.hh): New subfile, including the extended
12094 and Doxygen'ed documentation of class Position.
12095 (location.hh): Use it.
12096 Document a` la Doxygen.
12097 With the help of Benoit Perrot.
12098
12099 2003-02-20 Akim Demaille <akim@epita.fr>
12100
12101 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12102 AT_YACC_IF.
12103 Redefine AT_YYERROR_SEES_LOC_IF using it.
12104 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12105 not defined.
12106 Don't use the location in yy::Parser::error_ and
12107 yy::Parser::print_ when not %locations.
12108 Activate more lalr1.cc tests.
12109
12110 2003-02-19 Akim Demaille <akim@epita.fr>
12111
12112 * data/lalr1.cc: When displaying a line number, be sure to make it
12113 an int.
12114
12115 2003-02-19 Akim Demaille <akim@epita.fr>
12116
12117 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12118 Remove, useless.
12119 (YYABORT, YYACCEPT, YYERROR): New.
12120 * tests/calc.at: Renable the lalr1.cc test.
12121
12122 2003-02-19 Akim Demaille <akim@epita.fr>
12123
12124 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12125 error recovery, mixing with/without pops and discarding of the
12126 lookahead.
12127 Exercise YYERROR.
12128 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12129
12130 2003-02-17 Paul Eggert <eggert@twinsun.com>
12131
12132 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12133 * tests/testsuite.at (AT_COMPILE): Use them.
12134 This fixes the testsuite problem reported by Robert Lentz in
12135 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
12136
12137 2003-02-12 Paul Eggert <eggert@twinsun.com>
12138
12139 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12140 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
12141 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
12142 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12143 Check for malloc failure, for consistency with yacc.c.
12144 (yytname_size): Remove, for consistency with yacc.c.
12145
12146 The bug still remains in data/lalr1.cc, as I didn't have time
12147 to fix it there.
12148
12149 2003-02-06 Akim Demaille <akim@epita.fr>
12150
12151 * configure.ac (GXX): Rename as...
12152 (CXX): this, to keep the original Autoconf semantics.
12153 Require 2.57.
12154 * data/lalr1.cc: Fix b4_copyright invocations.
12155 If YYDEBUG is not defined, don't depend upon name_ being defined.
12156 (location.hh): Include string and iostream.
12157 (Position::filename): New member.
12158 (Position::Position ()): New.
12159 (operator<< (Position)): New.
12160 (operator- (Position, int)): New.
12161 (Location::first, Location::last): Rename as...
12162 (Location::begin, Location::end): these, to mock the conventional
12163 iterator names.
12164 (operator<< (Location)): New.
12165 * tests/atlocal.in (CXX): New.
12166 * tests/testsuite.at (AT_COMPILE_CXX): New.
12167 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12168 locations in a more synthetic way.
12169 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12170 lalr1.cc is used.
12171 Adjust the C locations to match those from Emacs: first column is
12172 column 0.
12173 Change all the expected results.
12174 Conform to the GCS: simplify the locations when applicable.
12175 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12176 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12177 these CPP macros with the m4 macros new defined by...
12178 (AT_CHECK_PUSHDEFS): this, i.e.:
12179 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
12180 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
12181 New macros.
12182 (AT_CHECK_POPDEFS): Undefine them.
12183 (AT_CHECK_CALC_LALR1_CC): New.
12184 Use it for the first lalr1.cc test.
12185
12186 2003-02-04 Akim Demaille <akim@epita.fr>
12187
12188 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12189 Location as is defined.
12190
12191 2003-02-04 Akim Demaille <akim@epita.fr>
12192
12193 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12194 name_ being defined.
12195
12196 2003-02-03 Paul Eggert <eggert@twinsun.com>
12197
12198 * src/gram.h (start_symbol): Remove unused decl.
12199
12200 Use more-consistent naming conventions for local vars.
12201
12202 * src/derives.c (derives_compute): Change type of local var from
12203 int to rule_number.
12204 * src/gram.c (grammar_rules_partial_print): Likewise.
12205 * src/print.c (print_core): Likewise.
12206 * src/reduce.c (reduce_grammar_tables): Likewise.
12207
12208 * src/gram.c (grammar_dump): Change name of item_number *
12209 local var from r to rp.
12210 * src/nullable.c (nullable_compute): Likewise.
12211
12212 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12213
12214 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12215 for symbol or symbol_number var.
12216 * src/reader.c (grammar_start_symbol_set): Likewise.
12217 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12218 Likewise.
12219 * src/state.c (transitions_to): Likewise.
12220 * src/state.h: Likewise.
12221 * src/tables.c (symbol_number_to_vector_number): Likewise.
12222
12223 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12224 char * var.
12225
12226 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12227 var.
12228
12229 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12230 var.
12231
12232 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12233 Use str, not s, for char * var. Use ch, not c, for character var.
12234 Use size for size var.
12235
12236 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12237 char * var.
12238 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12239 uniqstr var.
12240 * src/uniqstr.h: Likewise.
12241
12242 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12243 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12244 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12245 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12246 param to have same name as that of enum, so that we don't use
12247 "s" to stand for a non-state.
12248
12249 2003-02-02 Akim Demaille <akim@epita.fr>
12250
12251 * src/scan-skel.l: Scan more than one inert character per yylex
12252 invocation.
12253
12254 2003-02-01 Paul Eggert <eggert@twinsun.com>
12255
12256 Version 1.875a.
12257
12258 * po/LINGUAS: Add ms.
12259
12260 2003-01-30 Akim Demaille <akim@epita.fr>
12261
12262 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12263
12264 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12265
12266 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12267 of $1.
12268
12269 Changes in response to error report by S. Eken: GLR mode does not
12270 handle negative $ indices or $ indices in embedded rules correctly.
12271 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
12272
12273 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12274 (b4_rhs_location): Ditto.
12275 (yyfill): New function to copy from stack tree into array
12276 incrementally.
12277 (yyuserAction): Modify to allow incremental move of semantic values
12278 to rhs array when in GLR mode.
12279 Define YYFILL to use in user-defined actions to fill semantic array
12280 as needed.
12281 Remove dummy use of yystack, as there is now a guaranteed use.
12282 (yydoAction): Modify to allow incremental move of semantic values
12283 to rhs array when in GLR mode.
12284 (yyresolveAction): Ditto.
12285 (yyglrShiftDefer): Update comment.
12286 (yyresolveStates): Use X == NULL for pointers, not !X.
12287 (yyglrReduce): Ditto.
12288 (yydoAction): Ditto
12289
12290 * tests/glr-regr1.at: Rename to ...
12291 * tests/glr-regression.at: Add new regression test for the problems
12292 described above (adapted from S. Eken).
12293 Update copyright notice.
12294 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12295 * tests/Makefile.am: Ditto.
12296
12297 2003-01-28 Paul Eggert <eggert@twinsun.com>
12298
12299 * data/lalr1.cc: Do not use @output_header_name@ unless
12300 b4_defines_flag is set. This fixes two bugs reported by
12301 Tim Van Holder in
12302 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12303 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
12304
12305 2003-01-21 Paul Eggert <eggert@twinsun.com>
12306
12307 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12308 we don't need to worry about yyerrlab1 being reported as an
12309 "unused label" by non-GCC C compilers. The downside is that if
12310 locations are used then a couple of statements are duplicated each
12311 time YYERROR is invoked, but the upside is that the warnings
12312 should vanish.
12313 (yyerrlab1): Move code to YERROR.
12314 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12315 This reverts some of the 2002-12-27 change.
12316
12317 2003-01-17 Paul Eggert <eggert@twinsun.com>
12318
12319 * src/output.c (symbol_printers_output): Fix typo that led
12320 to core dump. Problem reported by Antonio Rus in
12321 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
12322
12323 2003-01-13 Akim Demaille <akim@epita.fr>,
12324 Quoc Peyrot <chojin@lrde.epita.fr>,
12325 Robert Anisko <anisko_r@lrde.epita.fr>
12326
12327 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12328 when the stacks contain one element, as the loop would otherwise
12329 free the last state, and then use the top state (the one we just
12330 popped). This means that the initial elements will not be freed
12331 explicitly, as is the case in yacc.c; it is not a problem, as
12332 these elements have fake values.
12333
12334 2003-01-11 Paul Eggert <eggert@twinsun.com>
12335
12336 * NEWS: %expect-violations are now just warnings, reverting
12337 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12338 bootstrapping problem reported by Matthias Klose; see
12339 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
12340 * src/conflicts.c (conflicts_print): Likewise.
12341 * tests/conflicts.at (%expect not enough, %expect too much,
12342 %expect with reduce conflicts): Likewise.
12343 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12344 that the warning is enabled if the number of conflicts changes
12345 (not necessarily increases).
12346
12347 * src/getargs.c (version): Update copyright year.
12348
12349 2003-01-09 Akim Demaille <akim@epita.fr>
12350
12351 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12352
12353 2003-01-08 Paul Eggert <eggert@twinsun.com>
12354
12355 * Makefile.maint (WGETFLAGS):
12356 New macro, containing "-C off" to disable proxy caches.
12357 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12358 (rel-check): Use $(WGET) instead of wget.
12359
12360 2003-01-06 Paul Eggert <eggert@twinsun.com>
12361
12362 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12363 the GLR paper of Scott, Johnstone and Hussain.
12364
12365 2003-01-04 Paul Eggert <eggert@twinsun.com>
12366
12367 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12368 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12369 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12370 (EXTRA_LIBRARIES): New var, for liby.a.
12371 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12372 (EXTRA_SCRIPTS): New var, for yacc.
12373
12374 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12375 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12376 Problem reported by Nelson H. F. Beebe.
12377
12378 2003-01-03 Paul Eggert <eggert@twinsun.com>
12379
12380 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12381 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12382 when compiling Bison 1.875's `bitset bset = obstack_alloc
12383 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12384
12385 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12386 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12387 grow to a huge size with typical invocation.
12388
12389 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12390 Use the pattern recommended by Autoconf 2.57, except also protect
12391 against double-definition.
12392 * src/system.h: Likewise.
12393 Portability issues reported by Nelson H. F. Beebe.
12394
12395 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12396 All uses changed. Provide a definition in both C and C++.
12397 (yytrue, yyfalse): Define even if defined (__cplusplus).
12398
12399 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12400 Reported by Nelson H. F. Beebe.
12401
12402 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12403
12404 2003-01-02 Paul Eggert <eggert@twinsun.com>
12405
12406 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12407 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12408 Bug reported by Nelson H. F. Beebe.
12409
12410 2003-01-01 Paul Eggert <eggert@twinsun.com>
12411
12412 * Version 1.875.
12413
12414 2002-12-30 Paul Eggert <eggert@twinsun.com>
12415
12416 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12417 Moved here from...
12418 (<INITIAL>","): Here. This causes stray "," to be treated
12419 more uniformly.
12420
12421 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
12422 last brace in braced code when not in Yacc mode, for compatibility
12423 with Bison 1.35. This resurrects the 2001-12-15 patch to
12424 src/reader.c.
12425
12426 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12427 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12428
12429 2002-12-28 Paul Eggert <eggert@twinsun.com>
12430
12431 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12432 that of SYM's type. This fixes Debian bug 168069, reported by
12433 Thomas Olsson.
12434
12435 2002-12-28 Paul Eggert <eggert@twinsun.com>
12436
12437 Version 1.75f.
12438
12439 Switch back to the Yacc style of conflict reports, undoing some
12440 of the 2002-07-30 change.
12441 * doc/bison.texinfo (Understanding): Use Yacc style for
12442 conflict reports. Also, use new way of locating rules.
12443 * src/conflicts.c (conflict_report):
12444 Renamed from conflict_report_yacc, removing the old
12445 'conflict_report'. Translate the entire conflict report at once,
12446 so that we don't assume that "," has the same interpretation in
12447 all languages.
12448 (conflicts_output): Use Yacc-style conflict report for each state,
12449 instead of our more-complicated style.
12450 (conflicts_print): Use Yacc-style conflict report, except print
12451 the input file name when not emulating Yacc.
12452 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12453 Conflicted Reduction, %expect not enough, %expect too much,
12454 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12455 * tests/existing.at (GNU Cim Grammar): Likewise.
12456 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12457
12458 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12459 fatal): Don't invoke fflush; it's not needed and it might even be
12460 harmful for stdout, as stdout might not be open.
12461 * src/reduce.c (reduce_print): Likewise.
12462
12463 2002-12-27 Paul Eggert <eggert@twinsun.com>
12464
12465 Fix a bug where error locations were not being recorded correctly.
12466 This problem was originally reported by Paul Hilfinger in
12467 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
12468
12469 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12470 top of the location stack's error locations.
12471 (yyerrlab): Set it. When discarding a token, push its location
12472 onto yylerrsp so that we don't lose track of the error's end.
12473 (yyerrlab1): Now is only the target of YYERROR, so that we can
12474 properly record the location of the action that failed. For GCC
12475 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12476 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12477 (yyerrlab2): New label, which yyerrlab now falls through to.
12478 Compute the error's location by applying YYLLOC_DEFAULT to
12479 the locations of all the symbols that went into the error.
12480 * doc/bison.texinfo (Location Default Action): Mention that
12481 YYLLOC_DEFAULT is also invoked for syntax errors.
12482 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12483 Error locations include the locations of all the tokens that were
12484 discarded, not just the last token.
12485
12486 2002-12-26 Paul Eggert <eggert@twinsun.com>
12487
12488 * src/files.c: Include quote.h.
12489 (compute_output_file_names): Warn if we detect conflicting
12490 outputs to the same file. This should catch the misunderstanding
12491 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12492
12493 * src/conflicts.c (conflicts_print): If the user specifies
12494 "%expect N", report an error if there are any reduce/reduce
12495 conflicts. This is what the manual says should happen.
12496 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12497 * tests/conflicts.at (%expect with reduce conflicts): New test.
12498
12499 Don't use m4_include on relative file names, as it doesn't work as
12500 desired if there happens to be a file with that name under ".".
12501
12502 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12503 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12504 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12505 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12506 * src/output.c (output_skeleton): Use full path names when
12507 specifying a file to include; don't rely on include path, as
12508 it's unreliable when the working file contains a file with
12509 that name.
12510
12511 2002-12-25 Paul Eggert <eggert@twinsun.com>
12512
12513 Remove obsolete references to bison.simple and bison.hairy.
12514 Problem mentioned by Aubin Mahe in
12515 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
12516 * data/glr.c: Comment fix.
12517 * doc/bison.1: Remove references. Also, mention "yacc".
12518
12519 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12520 with -g option.
12521
12522 * src/parse-gram.y (declaration): Use enum "report_states" rather
12523 than its numeric value 1.
12524
12525 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12526 opening a new one. This fixes Debian bug 165349, reported by
12527 Bruce Stephens.
12528
12529 2002-12-24 Paul Eggert <eggert@twinsun.com>
12530
12531 Version 1.75e.
12532
12533 * Makefile.maint (cvs-update): Don't assume that the shell
12534 supports $(...), as Solaris sh doesn't.
12535
12536 * src/parse-gram.y (lloc_default): Remove test for empty
12537 nonterminals at the end, since it didn't change the result.
12538
12539 2002-12-24 Paul Eggert <eggert@twinsun.com>
12540
12541 If the user does not define YYSTYPE as a macro, Bison now declares it
12542 using typedef instead of defining it as a macro. POSIX requires this.
12543 For consistency, YYLTYPE is also declared instead of defined.
12544
12545 %union directives can now have a tag before the `{', e.g., the
12546 directive `%union foo {...}' now generates the C code
12547 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12548 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12549 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12550 instead of `yyltype'.
12551
12552 `yystype' and `yyltype' are now obsolescent macros instead of being
12553 typedefs or tags; they are no longer documented and will be
12554 withdrawn in a future release.
12555
12556 * data/glr.c (b4_location_type): Remove.
12557 (YYSTYPE): Renamed from yystype.
12558 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12559 (struct YYLTYPE): Renamed from struct yyltype.
12560 (YYLTYPE): Renamed from yyltype.
12561 (yyltype, yystype): New (and obsolescent) macros,
12562 for backward compatibility.
12563 * data/yacc.c: Likewise.
12564
12565 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12566 does not specify a union tag. This is for compatibility with
12567 Solaris 9 yacc.
12568
12569 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12570 const *, since it is now modified by stripping surrounding { }.
12571 (current_braced_code): Remove.
12572 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12573 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12574 trailing " {...}". Now of type <chars>.
12575 (grammar_declaration): Adjust to bundled tokens.
12576 (code_content): Remove; stripping is now done by add_param.
12577 (print_token_value): Print contents of bundled tokens.
12578 (token_name): New function.
12579
12580 * src/reader.h (braced_code, current_braced_code): Remove.
12581 (token_name): New decl.
12582
12583 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12584 token_type, not braced_code code_kind. All uses changed.
12585 (SC_PRE_CODE): New state, for scanning after a keyword that
12586 has (or usually has) an immediately-following braced code.
12587 (token_type): New local var, to keep track of which token type
12588 to return when scanning braced code.
12589 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
12590 <INITIAL>"%parse-param", <INITIAL>"%printer",
12591 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12592 instead of returning a token type immediately.
12593 (<INITIAL>"{"): Set token type.
12594 (<SC_BRACED_CODE>"}"): Use it.
12595 (handle_action_dollar, handle_action_at): Now returns bool
12596 indicating success. Fail if ! current_rule; this prevents a core dump.
12597 (handle_symbol_code_dollar, handle_symbol_code_at):
12598 Remove; merge body into caller.
12599 (handle_dollar, handle_at): Complain in invalid contexts.
12600
12601 * NEWS, doc/bison.texinfo: Document the above.
12602 * NEWS: Fix years and program names in copyright notice.
12603
12604 2002-12-17 Paul Eggert <eggert@twinsun.com>
12605
12606 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12607 Reporting, Table of Symbols): Omit mentions of %lex-param and
12608 %parse-param from the documentation for now.
12609
12610 2002-12-15 Paul Eggert <eggert@twinsun.com>
12611
12612 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12613 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12614 lookahead symbol, and which sets yychar in parser actions) and it
12615 disagreed with the Bison documentation. Bug
12616 reported by Andrew Walrond.
12617
12618 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12619 as the caller now does that.
12620 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12621 (YYEMPTY): Parenthesize right hand side, since others use it.
12622 (yyparse): Don't assume that our generated code is the only code
12623 that sets yychar.
12624
12625 2002-12-13 Paul Eggert <eggert@twinsun.com>
12626
12627 Version 1.75d.
12628
12629 POSIX requires a "yacc" command.
12630 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12631 (MOSTLYCLEANFILES): Add yacc.
12632 (yacc): New rule.
12633 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
12634 as an alias for bison y.
12635
12636 * po/LINGUAS: Add da.
12637
12638 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12639 problem with latest <getopt.h>.
12640 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12641
12642 * doc/fdl.texi: Upgrade to 1.2.
12643 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12644 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12645 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12646 gnulib.
12647 * config/install-sh: Sync with autotools.
12648
12649 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
12650 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
12651 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
12652 locations are requested.
12653 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
12654 locations are requested.
12655
12656 2002-12-12 Paul Eggert <eggert@twinsun.com>
12657
12658 Remove unportable casts and storage allocation tricks.
12659 While we're at it, remove almost all casts, since they
12660 usually aren't needed and are a sign of trouble.
12661
12662 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
12663
12664 * src/derives.c (derives_compute): Do not subtract NTOKENS from
12665 the pointer DSET returned by malloc; this isn't portable.
12666 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
12667 Similarly for DERIVES.
12668 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
12669 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
12670 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
12671
12672 * src/derives.c (derives_compute): Do not bother invoking
12673 int_of_rule_number, since rule numbers are integers.
12674
12675 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
12676 rather than XMALLOC (char, N).
12677
12678 * src/files.c (filename_split): Rewrite to avoid cast.
12679
12680 * src/gram.h (symbol_number_as_item_number,
12681 item_number_as_symbol_number, rule_number_as_item_number,
12682 item_number_as_rule_number):
12683 Now inline functions rather than macros, to avoid casts.
12684 * src/state.h (state_number_as_int): Likewise.
12685 * src/tables.c (state_number_to_vector_number,
12686 symbol_number_to_vector_number): Likewise.
12687
12688 * src/gram.h (int_of_rule_number): Remove; no longer used.
12689
12690 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
12691 since the resulting storage is always stored into.
12692
12693 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
12694 where it's needed.
12695
12696 * src/muscle_tab.c (muscle_m4_output):
12697 Now inline. Return bool, not int.
12698 * src/state.c (state_compare): Likewise.
12699 * src/symtab.c (symbol_check_defined,
12700 symbol_check_alias_consistency, symbol_pack, symbol_translation,
12701 hash_compare_symbol, hash_symbol):
12702 Likewise.
12703 * src/uniqstr.c (uniqstr_print): Likewise.
12704 * src/muscle_tab.c (muscle_m4_output_processor):
12705 New function, to avoid casts.
12706 * src/state.c (state_comparator, stage_hasher): Likewise.
12707 * src/symtab.c (symbol_check_defined_processor,
12708 symbol_check_alias_consistency_processor, symbol_pack_processor,
12709 symbol_translation_processor, hash_symbol_comparator,
12710 hash_symbol_hasher): Likewise.
12711 * src/uniqstr.c (uniqstr_print_processor): Likewise.
12712 * src/muscle_tab.c (muscles_m4_output):
12713 Use new functions instead of casting old functions unportably.
12714 * src/state.c (state_hash_new): Likewise.
12715 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
12716 symbols_token_translations_init):
12717 Likewise.
12718 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
12719
12720 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
12721 var instead of casting to long, to avoid casts.
12722 (prepare_states): Use MALLOC rather than alloca, so that we don't
12723 have to worry about alloca.
12724 * src/state.c (state_hash_lookup): Likewise.
12725
12726 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
12727 local var instead of casting to unsigned char, to avoid casts.
12728
12729 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
12730 STATE_ALLOC): Remove.
12731 (transitions_new, errs_new, reductions_new, state_new): Use malloc
12732 rather than calloc, and use offsetof to avoid allocating slightly
12733 too much storage.
12734 (state_new): Initialize all members.
12735
12736 * src/state.c (state_hash): Use unsigned accumulator, not signed.
12737
12738 * src/symtab.c (symbol_free): Remove; unused.
12739 (symbol_get): Remove cast in lhs of assignment.
12740 (symbols_do): Now static. Accept generic arguments, not
12741 hashing-related ones.
12742
12743 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
12744 (symbol_processor): Remove.
12745 (symbols_do): Remove decl; now static.
12746
12747 * src/system.h (alloca): Remove; decl no longer needed.
12748 (<stddef.h>): Include, for offsetof.
12749 (<inttypes.>, <stdint.h>): Include if available.
12750 (uintptr_t): New type, if system lacks it.
12751 (CALLOC, MALLOC, REALLOC): New macros.
12752 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
12753 new macros.
12754
12755 * src/tables.c (table_size): Now int, to pacify GCC.
12756 (table_grow, table_ninf_remap): Use signed table size.
12757 (save_row): Don't bother initializing locals when not needed.
12758 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
12759 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
12760
12761 * src/vcg.h: Correct misspellings.
12762
12763 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
12764
12765
12766 * src/getargs.c (getargs): Don't assume EOF == -1.
12767
12768 2002-12-09 Paul Eggert <eggert@twinsun.com>
12769
12770 Change identifier spellings to avoid collisions with names
12771 that are reserved by POSIX.
12772
12773 Don't use names ending in _t, since POSIX reserves them.
12774 For consistency, remove _e and _s endings -- they're weren't
12775 needed to remove ambiguity. All uses changed.
12776 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
12777 turn was just renamed from struniq_t.
12778 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
12779 which in turn was just renamed from struniq_processor_t.
12780 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
12781 in turn was renamed from hash_compare_struniq_t.
12782 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
12783 (state_list): Renamed from state_list_t.
12784 * src/assoc.h (assoc): Renamed from assoc_t.
12785 * src/conflicts.c (enum conflict_resolution): Renamed from
12786 enum conflict_resolution_e.
12787 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
12788 (rule_list): Renamed from rule_list_t.
12789 * src/getargs.h (enum trace): Renamed from enum trace_e.
12790 (enum report): Renamed from enum report_e.
12791 * src/gram.h (item_number): Renamed from item_number_t.
12792 (rule_number): Renamed from rule_number_t.
12793 (struct rule_s): Remove the "rule_s" part; not used.
12794 (rule): Renamed from rule_t.
12795 (rule_filter): Renamed from rule_filter_t.
12796 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
12797 (goto_list): Renamed from goto_list_t.
12798 * src/lalr.h (goto_number): Renamed from goto_number_t.
12799 * src/location.h (location): Renamed from location_t.
12800 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
12801 and moved here from:
12802 * src/muscle_tab.h (muscle_entry_t): here.
12803 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
12804 (rule_list): Renamed from rule_list_t.
12805 * src/print_graph.c (static_graph): Renamed from graph.
12806 * src/reader.h (braced_code): Renamed from braced_code_t.
12807 Remove brace_code_e tag.
12808 * src/relation.h (relation_node): Renamed from relation_node_t.
12809 (relation_nodes): Renamed from relation_nodes_t.
12810 (relation): Renamed from relation_t.
12811 * src/state.h (state_number): Renamed from state_number_t.
12812 (struct state): Renamed from struct state_s.
12813 (state): Renamed from state_t.
12814 (transitions): Renamed from transitions_t. Unused (and
12815 misspelled) transtion_s tag removed.
12816 (errs): Renamed from errs_t. Unused errs_s tag removed.
12817 (reductions): Renamed from reductions_t. Unused tag
12818 reductions_s removed.
12819 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
12820 (struct symbol_list): Renamed from struct symbol_list_s.
12821 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
12822 (struct symbol): Renamed from struct symbol_s.
12823 (symbol): Renamed from symbol_t.
12824 * src/tables.c (vector_number): Renamed from vector_number_t.
12825 (action_number): Renamed from action_t.
12826 * src/tables.h (base_number): Renamed from base_t.
12827 * src/vcg.h (enum color): Renamed from enum color_e.
12828 (enum textmode): Renamed from enum textmode_e.
12829 (enum shape): Renamed from enum shape_e.
12830 (struct colorentry): Renamed from struct colorentry_s.
12831 (struct classname): Renamed from struct classname_s.
12832 (struct infoname): Renamed from struct infoname_s.
12833 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
12834 (enum decision): Renamed from enum decision_e.
12835 (enum orientation): Renamed from enum orientation_e.
12836 (enum alignment): Renamed from enum alignment_e.
12837 (enum arrow_mode): Renamed from enum arrow_mode_e.
12838 (enum crossing_type): Renamed from enum crossing_type_e.
12839 (enum view): Renamed from enum view_e.
12840 (struct node): Renamed from struct node_s.
12841 (node): Renamed from node_t.
12842 (enum linestyle): Renamed from enum linestyle_e.
12843 (enum arrowstyle): Renamed from enum arrowstyle_e.
12844 (struct edge): Renamed from struct edge.
12845 (edge): Renamed from edge_t.
12846 (struct graph): Renamed from struct graph_s.
12847 (graph): Renamed from graph_t.
12848 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
12849 Rename value_t -> value.
12850 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
12851 value_t_as_yystype -> value_as_yystype.
12852
12853 Don't include <errno.h> in the mainstream code, since it
12854 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
12855 * lib/get-errno.c, lib/get-errno.h: New files.
12856 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
12857 get-errno.c.
12858 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
12859 * src/output.c (output_skeleton): Likewise.
12860 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
12861 instead of errno.
12862 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
12863 Likewise.
12864 (handle_action_dollar, handle_action_at): Likewise.
12865 * src/system.h: Do not include <errno.h>.
12866 (TAB_EXT): Renamed from EXT_TAB.
12867 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
12868
12869 Avoid str[a-z]*, since <string.h> reserves that name space.
12870 Change all instances of "struniq" in names to "uniqstr", and
12871 likewise for "STRUNIQ" and "UNIQSTR".
12872 * src/uniqstr.c: Renamed from src/struniq.c.
12873 * src/uniqstr.h: Renamed from src/struniq.h.
12874 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
12875 * src/files.c (strsuffix): Remove; unused.
12876 (concat2): Renamed from stringappend. Now static.
12877 * src/files.h (strsuffix, stringappend): Remove; unused.
12878 * src/parse-gram.y (<chars>): Renamed from <string>.
12879 (<uniqstr>): Renamed from <struniq>.
12880 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
12881 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
12882 (struct graph_s.expand): Renamed from struct graph_s.stretch.
12883 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
12884 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
12885 (N_EXPAND): Renamed from N_STRETCH.
12886
12887 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
12888 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
12889 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
12890 Remove; unused.
12891 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
12892 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
12893 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
12894 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
12895 (BASE_MAXIMUM): Renamed from BASE_MAX.
12896 (BASE_MINIMUM): Renamed from BASE_MIN.
12897 (ACTION_MAX): Remove; unused.
12898 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
12899 Unnecessary casts removed from above defines.
12900
12901
12902 Fix misspelling in names.
12903 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
12904 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
12905 G_NODE_ALIGNEMENT.
12906
12907
12908 * lib/timevar.c (timevar_report): Renamed from time_report,
12909 for consistency with other names.
12910 * lib/timevar.h (timevar_report): New decl.
12911 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
12912
12913
12914 Sort include-file uses.
12915
12916 Reorder all include files under src to be in the order "system.h".
12917 then the ../lib include files in angle brackets (alphabetized),
12918 then the . include files in double-quotes (alphabetized). Fix
12919 dependency breakages encountered in this process, as follows:
12920 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
12921 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
12922 * src/state.h: Include "symtab.h".
12923
12924 2002-12-08 Paul Eggert <eggert@twinsun.com>
12925
12926 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
12927 since this causes problems when __file__ contains character
12928 sequences like "@" that are treated specially by src/scan-skel.l.
12929 Instead, just use the file's basename. This fixes the bug
12930 reported by Martin Mokrejs in
12931 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
12932
12933 2002-12-06 Paul Eggert <eggert@twinsun.com>
12934
12935 Add support for rules that do not have trailing semicolons, as
12936 POSIX requires. Improve the quality of locations in Bison
12937 diagnostics.
12938
12939 * src/location.c: Include <quotearg.h>.
12940 (empty_location): Now const.
12941 (location_print): New function. Follow the recommendation of the
12942 GNU Coding Standards for locations that span file boundaries.
12943 * src/location.h: Do not include <quotearg.h>; no longer needed.
12944 (boundary): New type.
12945 (location_t): Use it. This allows locations to span file boundaries.
12946 All member uses changed: file -> start.file or end.file (as needed),
12947 first_line -> start.line, first_column -> start.column,
12948 last_line -> end.line, last_column -> end.column.
12949 (equal_boundaries): New function.
12950 (LOCATION_RESET, LOCATION_STEP): Remove.
12951 (LOCATION_PRINT): Remove. All callers changed to use location_print.
12952 (empty_location): Now const.
12953 (location_print): New decl.
12954 * src/parse-gram.y (lloc_default): New function, which handles
12955 empty locations more accurately.
12956 (YYLLOC_DEFAULT): Use it.
12957 (%token COLON): Remove.
12958 (%token ID_COLON): New token.
12959 (rules): Use it.
12960 (declarations, rules): Remove trailing semicolon.
12961 (declaration, rules_or_grammar_declaration):
12962 Allow empty (";") declaration.
12963 (symbol_def): Remove empty actions; no longer needed.
12964 (rules_or_grammar_declaration): Remove trailing semicolon.
12965 (semi_colon.opt): Remove.
12966 * src/reader.h: Include location.h.
12967 (scanner_cursor): New decl.
12968 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
12969 rolling our own.
12970 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
12971 of *loc.
12972 (STEP): Remove. No longer needed, now that adjust_location does
12973 the work. All uses removed.
12974 (scanner_cursor): New var.
12975 (adjust_location): Renamed from extend_location. It now sets
12976 *loc and adjusts the scanner cursor. All uses changed.
12977 Don't bother testing for CR.
12978 (handle_syncline): Remove location arg; now updates scanner cursor.
12979 All callers changed.
12980 (unexpected_end_of_file): Now accepts start boundary of token or
12981 comment, not location. All callers changed. Update scanner cursor,
12982 not the location.
12983 (SC_AFTER_IDENTIFIER): New state.
12984 (context_state): Renamed from c_context. All uses changed.
12985 (id_loc, code_start, token_start): New local vars.
12986 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
12987 processing of Yacc white space and equivalents here.
12988 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
12989 instead of returning ID immediately, since we need to search for
12990 a subsequent colon.
12991 (<INITIAL>"'", "\""): Save token_start.
12992 (<INITIAL>"%{", "{", "%%"): Save code_start.
12993 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
12994 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
12995 BEGIN context_state at end, not INITIAL.
12996 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
12997 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
12998 Return correct token start.
12999 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13000 the start of a character, string or multiline comment is found.
13001 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13002 Reduction): Adjust reported locations to match the more-precise
13003 results now expected.
13004 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13005 * tests/reduce.at (Useless Rules, Reduced Automaton,
13006 Underivable Rules): Likewise.
13007 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13008 or "|"' now that so many other tokens are allowed by the new grammar.
13009
13010 * src/complain.h (current_file): Remove duplicate decl;
13011 current_file is now owned by files.h.
13012 * src/complain.c, src/scan-gram.l: Include files.h.
13013
13014 2002-12-06 Paul Eggert <eggert@twinsun.com>
13015
13016 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13017 promotes to int; it might be unsigned int.
13018 * data/yacc.c (yy_reduce_print): Likewise.
13019
13020 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13021 be #defined in the prologue, not in the Bison declarations.
13022 This fixes Debian Bug 102878, reported by Shaul Karl.
13023
13024 2002-12-02 Paul Eggert <eggert@twinsun.com>
13025
13026 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13027 * lib/strtoul.c: New file, from gnulib.
13028 This fixes a porting bug reported by Peter Klein in
13029 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
13030
13031 2002-11-30 Paul Eggert <eggert@twinsun.com>
13032
13033 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13034 and put only a forward declaration in the prologue. This is for
13035 consistency with the other scanner helper functions.
13036
13037 Type clashes now generate warnings, not errors, since it
13038 appears that POSIX may allow some grammars with type clashes.
13039 * src/reader.c (grammar_current_rule_check): Warn about
13040 type clashes instead of complaining.
13041 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13042
13043 Add Yacc library, since POSIX requires it.
13044 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13045 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13046 * lib/main.c, lib/yyerror.c: New files.
13047
13048 gram_error can be static; it need not be extern.
13049 * src/reader.h (gram_error): Remove decl.
13050 * src/parse-gram.y (gram_error): Now static. Add static decl.
13051 (print_token_value): Omit parameter names from forward decl,
13052 for consistency.
13053
13054 2002-11-29 Paul Eggert <eggert@twinsun.com>
13055
13056 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13057 be declared before being used. E.g., one should typically
13058 declare them in the prologue. Use GNU coding style in examples.
13059 Put "const" consistently after the type it modifies. Mention
13060 that C99 supports "inline". Mention that yyerror traditionally
13061 returns "int".
13062
13063 %parse-param and %lex-param now take just one argument, the
13064 declaration; the argument name is deduced from the declaration.
13065
13066 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13067 Reporting, Table of Symbols): Document this.
13068 * src/parse-gram.y (add_param): New function.
13069 (COMMA): Remove.
13070 (declaration): Implement new rule for %parse-param and %lex-param.
13071 * src/scan-gram.l: "," now elicits a warning, rather than being
13072 a token; this is more compatible with byacc.
13073 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13074
13075 2002-11-27 Paul Eggert <eggert@twinsun.com>
13076
13077 Rename identifiers to avoid real and potential collisions.
13078
13079 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13080 to avoid collision with lex macro described by Bruce Lilly in
13081 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13082 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13083 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13084 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13085 All uses changed.
13086 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13087 The name "yycontrol" violates the name space rules, and this stuff
13088 wasn't being used anyway.
13089 (input): Remove action; this stuff wasn't being used.
13090 (gram_error): Rename local variable yylloc -> loc.
13091 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13092 (YY_DECL): Don't use "yy" at start of local variables.
13093 All uses changed, e.g., yylloc -> loc.
13094 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13095 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13096 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13097 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13098
13099 * src/parse-gram.y (gram_error): loc is now const *.
13100 * src/reader.h (gram_error): Likewise.
13101
13102 2002-11-24 Paul Eggert <eggert@twinsun.com>
13103
13104 Version 1.75c.
13105
13106 * tests/actions.at (Actions after errors): Use an output format
13107 more similar to that of the Printers and Destructors test.
13108 Test the position of the ';' token too.
13109 (Printers and Destructors): Likewise.
13110 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13111 unnecessarily alarming people when the test fails.
13112
13113 * data/yacc.c (yyerrlab1): Move this label down, so that the
13114 parser does not discard the lookahead token if the user code
13115 invokes YYERROR. This change is required for POSIX conformance.
13116
13117 * lib/error.c: Sync with gnulib.
13118
13119 2002-11-22 Paul Eggert <eggert@twinsun.com>
13120
13121 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13122 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13123 * lib/xmalloc.c: Likewise.
13124
13125 2002-11-20 Paul Eggert <eggert@twinsun.com>
13126
13127 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13128
13129 2002-11-20 Paul Eggert <eggert@twinsun.com>
13130
13131 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13132 should use `if (! x) abort ();' rather than `assert (x);', and
13133 anyway it's one less thing to worry about configuring.
13134
13135 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13136 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13137 and replace all instances of assert with abort.
13138 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13139 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13140
13141 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13142 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13143 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13144 hash_find_entry, hash_rehash, hash_insert): Likewise.
13145 * src/conflicts.c (resolve_sr_conflict): Likewise.
13146 * src/lalr.c (set_goto_map, map_goto): Likewise.
13147 * src/nullable.c (nullable_compute): Likewise.
13148 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13149 * src/reader.c (packgram, reader): Likewise.
13150 * src/state.c (state_new, state_free, state_transitions_set,
13151 state_reduction_find): Likewise.
13152 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13153 symbol_pack): Likewise.
13154 * src/tables.c (conflict_row, pack_vector): Likewise.
13155 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13156 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13157 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13158 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13159
13160 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13161 (ARGMATCH_CONSTRAINT): New macro.
13162 (ARGMATCH_ASSERT): Use it.
13163
13164 * src/system.h (verify): New macro.
13165 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13166 rather than assert.
13167 * src/tables.c (tables_generate): Likewise.
13168
13169 * src/struniq.c (struniq_assert): Now returns void, and aborts
13170 if the assertion is false.
13171 (struniq_assert_p): Remove.
13172 * src/struniq.h: Likewise.
13173
13174 2002-11-18 Paul Eggert <eggert@twinsun.com>
13175
13176 * data/glr.c (yygetLRActions): Replace `yyindex' with
13177 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13178 This fixes the regression with Sun ONE Studio 7 cc that I reported in
13179 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
13180
13181 2002-11-18 Akim Demaille <akim@epita.fr>
13182
13183 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13184 space.
13185 From Tim Van Holder.
13186
13187 2002-11-17 Paul Eggert <eggert@twinsun.com>
13188
13189 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13190 to "SyntaxError" for consistency with my 2002-11-15 change.
13191
13192 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13193 not define to {}, since this breaks the common use of `YYDPRINTF
13194 ((...));' if a single statement is desired (e.g. before `else').
13195 Work around GCC warnings by surrounding corresponding calls with
13196 {} if needed.
13197 (yyhasResolvedValue): Remove unused function.
13198 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13199 loop body.
13200 (yyreportSyntaxError): Renamed from yyreportParseError.
13201 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13202 All uses changed.
13203 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13204 extern when possible. Remove unused initializations.
13205
13206 2002-11-16 Akim Demaille <akim@epita.fr>
13207
13208 Augment the similarity between GLR and LALR traces.
13209
13210 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13211 (YY_REDUCE_PRINT): New.
13212 (yyparse): Use them.
13213 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13214 YYDPRINT here.
13215 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13216 state reached after the reduction/recovery, since...
13217 (yyparse, yyprocessOneStack): Report the state we are entering in.
13218
13219 2002-11-16 Akim Demaille <akim@epita.fr>
13220
13221 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13222 Add support for --trace=skeleton.
13223 * src/scan-skel.l: %option debug.
13224 Scan strings of non-@ or \n instead of character by character.
13225 (scan_skel): Handle trace_skeleton.
13226 (QPUTS): New.
13227 (@output_parser_name@, @output_header_name@): ``Restore'' their
13228 support (used to be M4 macros).
13229 * data/yacc.c: Quote larger chunks, a la glr.c.
13230 * data/lalr1.cc: Likewise.
13231 The header guards are no longer available, so use some other
13232 string than `YYLSP_NEEDED'.
13233
13234 2002-11-16 Akim Demaille <akim@epita.fr>
13235
13236 Make the ``Printers and Destructors'' test more verbose, taking
13237 `yacc.c''s behavior as (possibly wrong) reference.
13238
13239 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13240 instead of fprint on stdout.
13241 Set and report the last_line of the symbols.
13242 Consistently display values and locations.
13243
13244 2002-11-16 Paul Eggert <eggert@twinsun.com>
13245
13246 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13247
13248 2002-11-15 Paul Eggert <eggert@twinsun.com>
13249
13250 * tests/actions.at (Actions after errors): New test case.
13251
13252 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13253 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13254 tests/action.at, tests/calc.at, tests/conflicts.at,
13255 tests/cxx-type.at, tests/regression.at:
13256 "parse error" -> "syntax error" for POSIX compatibility.
13257 "parsing stack overflow..." -> "parser stack overflow" so
13258 that code matches Bison documentation.
13259
13260 2002-11-15 Akim Demaille <akim@epita.fr>
13261
13262 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13263 take two BRACED_CODE, not two string_content.
13264 Free the scanner's obstack when we are done.
13265 (code_content): New.
13266 * tests/calc.at: Adjust.
13267 * doc/bison.texinfo: Adjust.
13268 Also, make sure to include the `,' for these declarations.
13269
13270 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13271
13272 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13273 definition; avoids potential autoreconf problems.
13274
13275 2002-11-15 Akim Demaille <akim@epita.fr>
13276
13277 Always check the value returned by yyparse.
13278
13279 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13280 returned by yyparse.
13281 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13282 Adjust calls.
13283 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13284 returned by yyparse.
13285
13286 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13287
13288 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
13289 on input.at test.
13290
13291 2002-11-14 Paul Eggert <eggert@twinsun.com>
13292
13293 * src/output.c (output_skeleton): Call xfopen instead of
13294 duplicating xfopen's body.
13295
13296 Fix bugs reported by Nelson H. F. Beebe in
13297 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
13298
13299 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13300 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13301 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13302 file twice in the grammar, as an extra check.
13303
13304 * tests/input.at (Torturing the Scanner): Surround the
13305 backslash-newline tests with "#if 0", to make it less likely that
13306 we'll run into compiler bugs. Bring back solitary \ inside
13307 comment, but add a closing comment to work around HP C bug. Don't
13308 test backslash-newline in C character constant.
13309
13310 2002-11-14 Akim Demaille <akim@epita.fr>
13311
13312 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13313 status of the compiler.
13314 Calling `exit 1' is no longer needed.
13315 Reported by Nelson H. F. Beebe.
13316
13317 2002-11-14 Akim Demaille <akim@epita.fr>
13318
13319 * tests/atlocal.in (CPPFLAGS): We have config.h.
13320 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13321 New.
13322 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13323 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13324 * tests/regression.at, tests/torture.at: Use them for all the
13325 grammars that are to be compiled.
13326 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13327 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13328 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13329
13330 2002-11-14 Akim Demaille <akim@epita.fr>
13331
13332 * doc/bison.texinfo: Various formatting changes (alignments in
13333 samples, additional @group/@end group, GCS in samples.
13334 Use @deffn instead of simple @table to define the directives,
13335 macros, variables etc.
13336
13337 2002-11-13 Paul Eggert <eggert@twinsun.com>
13338
13339 Fix some bugs reported by Albert Chin-A-Young in
13340 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
13341
13342 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
13343 -o c"; the HP C compiler chatters during compilation.
13344 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13345 * tests/headers.at (export YYLTYPE): Likewise.
13346
13347 * tests/input.at (Torturing the Scanner): Remove lines containing
13348 solitary backslashes, as they tickle a bug in the HP C compiler.
13349
13350 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13351 comments, since they're not portable. Use GNU coding style.
13352
13353 2002-11-13 Akim Demaille <akim@epita.fr>
13354
13355 * data/yacc.c: Leave bigger chunks of quoted text.
13356 (YYDSYMPRINTF): New.
13357 Use it to report symbol activities.
13358 * data/glr.c (YYDSYMPRINTF): New.
13359 Use it.
13360
13361 2002-11-12 Paul Eggert <eggert@twinsun.com>
13362
13363 Version 1.75b.
13364
13365 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13366 (yyglrReduce): Return yyok, not 0.
13367 This should avoid the enumerated-type warnings reported
13368 by Nelson H. F. Beebe in
13369 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
13370
13371 * lib/bbitset.h (BITSET_INLINE): Remove.
13372 * lib/bitset.h [! BITSET_INLINE]: Remove.
13373 (bitset_set, bitset_reset, bitset_test): Rename local vars
13374 to avoid shadowing warnings by GCC.
13375
13376 * data/glr.c (inline): Remove #define. It's the user's
13377 responsibility to #define it away, just like 'const'.
13378 This fixes one of the bugs reported by Nelson H. F. Beebe in
13379 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
13380
13381 * Makefile.maint (po-check): Scan .l and .y files instead of the
13382 .c and the .h files that they generate. This fixes the bug
13383 reported by Tim Van Holder in:
13384 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
13385 Look for N_ as well as for _. Try to avoid matching #define for
13386 N_ and _.
13387 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13388 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13389 * src/scan-gram.l: Revamp regular expressions so that " and '
13390 do not confuse xgettext.
13391
13392 * src/struniq.h (struniq_new): Do not declare the return type
13393 to be 'const'; this violates the C standard.
13394 * src/struniq.c (struniq_new): Likewise.
13395
13396 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13397
13398 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13399 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13400 linker.
13401
13402 2002-11-12 Akim Demaille <akim@epita.fr>
13403
13404 * Makefile.maint: Sync with Autoconf:
13405 (local_updates): New.
13406
13407 2002-11-12 Akim Demaille <akim@epita.fr>
13408
13409 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13410
13411 2002-11-12 Akim Demaille <akim@epita.fr>
13412
13413 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13414 locations.
13415
13416 2002-11-12 Akim Demaille <akim@epita.fr>
13417
13418 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13419 not yyvalue.
13420
13421 2002-11-12 Akim Demaille <akim@epita.fr>
13422
13423 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13424 Use it to test the GLR parser.
13425
13426 2002-11-12 Akim Demaille <akim@epita.fr>
13427
13428 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13429 defines it.
13430 * data/glr.c (yystos): New.
13431 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13432 (YYDSYMPRINT): New.
13433 (yyval): Don't define it, it is handled via M4.
13434 (yyrecoverParseError): Free verbosely the discarded symbols.
13435 * data/yacc.c (yysymprint): Remove, rather...
13436 (b4_yysymprint_generate): invoke.
13437 * data/c.m4 (b4_yysymprint_generate): New.
13438 Accept pointers as arguments, as opposed to the version from
13439 yacc.c.
13440 (b4_yydestruct_generate): Likewise.
13441 * tests/cations.at (Printers and Destructors): Use Bison directives
13442 instead of CPP macros.
13443 Don't rely on internal details.
13444
13445 2002-11-12 Akim Demaille <akim@epita.fr>
13446
13447 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13448 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13449 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13450 it against YYEMPTY and so forth), work on yytoken (i.e., set
13451 it to YYEMPTY etc.).
13452 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13453 (b4_symbol_actions): Remove.
13454 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13455 for 0, end-of-input.
13456
13457 2002-11-12 Akim Demaille <akim@epita.fr>
13458
13459 * doc/bison.texinfo (Destructor Decl): New.
13460
13461 2002-11-12 Akim Demaille <akim@epita.fr>
13462
13463 * src/tables.c (tables_generate): Use free for pointers that
13464 cannot be NULL, not XFREE.
13465 (pack_vector): Use assert, not fatal, for bound violations.
13466 * src/state.c (state_new): Likewise.
13467 * src/reader.c (reader): Likewise.
13468 * src/lalr.c (set_goto_map): Likewise.
13469 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
13470 the file name.
13471
13472 2002-11-12 Akim Demaille <akim@epita.fr>
13473
13474 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13475 Restore.
13476 * src/scan-gram.l (last_string): Is global to the file, not to
13477 yylex.
13478 * src/parse-gram.y (input): Don't append the epilogue here,
13479 (epilogue.opt): do it here, and free the scanner's obstack.
13480 * src/reader.c (epilogue_set): Rename as...
13481 (epilogue_augment): this.
13482 * data/c.m4 (b4_epilogue): Defaults to empty.
13483
13484 2002-11-12 Akim Demaille <akim@epita.fr>
13485
13486 * src/getargs.c (long_options): Remove duplicates.
13487 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13488 Remove.
13489 * doc/bison.rnh: Remove.
13490 * doc/bison.texinfo (VMS Invocation): Remove.
13491
13492 2002-11-12 Akim Demaille <akim@epita.fr>
13493
13494 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13495 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13496
13497 Use struniq for symbols.
13498
13499 * src/symtab.h (symbol_t): The tag member is a struniq.
13500 (symbol_type_set): Adjust.
13501 * src/symtab.c (symbol_new): Takes a struniq.
13502 (symbol_free): Don't free the tag member.
13503 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13504 (hash_compare_symbol, hash_symbol): these.
13505 Use the fact that tags as struniqs.
13506 (symbol_get): Use struniq_new.
13507 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13508 Returns a strniq.
13509 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13510 and type members are struniqs.
13511 * src/reader.c (get_merge_function)
13512 (grammar_current_rule_merge_set): Adjust.
13513 (TYPE, current_type): Are struniq.
13514
13515 Use struniq for file names.
13516
13517 * src/files.h, src/files.c (infile): Split into...
13518 (grammar_file, current_file): these.
13519 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13520 * src/reduce.c (reduce_print): Likewise.
13521 * src/getargs.c (getargs): Likewise.
13522 * src/complain.h, src/complain.c: Likewise.
13523 * src/main.c (main): Call struniqs_new early enough to use it for
13524 file names.
13525 Don't free the input file name.
13526
13527 2002-11-12 Akim Demaille <akim@epita.fr>
13528
13529 * src/symtab.c (symbol_free): Remove dead deactivated code:
13530 type_name are properly removed.
13531 Don't use XFREE to free items that cannot be NULL.
13532 * src/struniq.h, src/struniq.c: New.
13533 * src/main.c (main): Initialize/free struniqs.
13534 * src/parse-gram.y (%union): Add astruniq member.
13535 (yyprint): Adjust.
13536 * src/scan-gram.l (<{tag}>): Return a struniq.
13537 Free the obstack bit that used to store it.
13538 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13539
13540 2002-11-11 Paul Eggert <eggert@twinsun.com>
13541
13542 Revamp to fix many (but not all) of the C- and M4-related quoting
13543 problems. Among other things, this fixes the Bison bug reported
13544 by Jan Hubicka when processing the Bash grammar; see:
13545 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
13546
13547 Use new @ escapes consistently. Represent brackets with @{ and @}
13548 rather than @<:@ and @:>@, since this works a bit better with dumb
13549 editors like vi. Represent @ with @@, since @ is now consistently
13550 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13551 __ofile__, to avoid unexpected expansions. Similarly, use @output
13552 rather than #output.
13553
13554 * data/c.m4 (b4_copyright): Omit file name from comment, since
13555 the file name could contain "*/".
13556 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13557 be quoted. All uses changed.
13558
13559 * data/glr.c: Use new @ escapes consistently.
13560 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13561 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13562 Remove, since they couldn't handle arbitrary characters in file
13563 names.
13564 * data/lalr1.cc: Likewise.
13565 * data/yacc.c: Likewise.
13566
13567 * src/files.c (output_infix): Remove; all uses removed.
13568 * src/files.h: Likewise.
13569
13570 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13571 mishandled funny characters in file names, and anyway it isn't
13572 needed any more.
13573 * data/yacc.c: Likewise.
13574 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13575
13576 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13577 * data/yacc.c: Likewise.
13578
13579 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13580 strings now.
13581 (muscle_init): Quote filename as a C string.
13582 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13583 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13584 * src/output.c (escaped_file_name_output): New function.
13585 (prepare_symbols): Quote tokens for M4.
13586 (prepare): Don't insert output_infix, output_prefix,
13587 output_parser_name, output_header_name; this is now down by scan-skel.
13588 Insert skeleton as a C string.
13589
13590 * src/output.c (user_actions_output, symbol_destructors_output,
13591 symbol_printers_output): Quote filenames for C and M4.
13592 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13593
13594 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13595 escapes other than \\ and \'; this simplifies the code.
13596 (<SC_STRING>): Likewise, for \\ and \".
13597 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13598 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13599 Use new escapes @{ and @} for [ and ].
13600
13601 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13602 them with auto vars.
13603 Switch to new escape scheme, where @ is the escape character uniformly.
13604 Abort if a stray escape character is found. Avoid unbounded input
13605 buffer when parsing non-escaped text.
13606
13607 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13608 __oline__, #output, $@, and @{ do not have unintended meanings.
13609
13610 2002-11-09 Paul Eggert <eggert@twinsun.com>
13611
13612 Fix the test failure due to GCC warnings described in
13613 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
13614 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13615 evaluate to 0 if it's impossible for NINF to be in the respective
13616 table.
13617 (yygetLRActions, yyrecoverParseError): Use them.
13618
13619 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13620 counted in the token inserted at end of file. Now takes
13621 location_t *, not location_t, so that the location can be
13622 adjusted. All uses changed.
13623
13624 * tests/regression.at (Invalid inputs): Adjust wording in
13625 diagnostic to match the new behavior.
13626
13627 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13628 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13629 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13630 abort ();'. This reduces the runtime of the "Many lookaheads"
13631 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13632 GCC 3.2.
13633
13634 2002-11-07 Paul Eggert <eggert@twinsun.com>
13635
13636 * src/parse-gram.y (CHARACTER): Remove unused token.
13637 All uses removed.
13638
13639 * src/scan-gram.l: Remove stack option. We no longer use the
13640 stack, since the stack was never deeper than 1; instead, use the
13641 new auto var c_context to record the stacked value.
13642
13643 Remove nounput option. At an unexpected end of file, we now unput
13644 the minimal input necessary to end cleanly; this simplifies the
13645 code.
13646
13647 Avoid unbounded token sizes where this is easy.
13648
13649 (unexpected_end_of_file): New function.
13650 Use it to systematize the error message on unexpected EOF.
13651 (last-string): Now auto, not static.
13652 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
13653 (scanner_last_string_free): Remove; not used.
13654 (percent_percent_count): Move decl to just before use.
13655 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
13656 not the (never otherwised-used) CHARACTER.
13657
13658 2002-11-07 Akim Demaille <akim@epita.fr>
13659
13660 Let yyerror always receive the msg as last argument, so that
13661 yyerror can be variadic.
13662
13663 * data/yacc.c (b4_yyerror_args): New.
13664 Use it when calling yyerror.
13665 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
13666 Use it when calling yyerror.
13667 * doc/bison.texinfo (Error Reporting): Adjust.
13668 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
13669 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
13670
13671 2002-11-06 Akim Demaille <akim@epita.fr>
13672
13673 #line should have quoted strings.
13674 Ideally, this should be done by m4_quotearg.
13675
13676 * src/scan-skel.l: Include quotearg.h.
13677 Quote __ofile__.
13678 * src/output.c (symbol_printers_output)
13679 (symbol_destructors_output): Quote the file name.
13680
13681 2002-11-06 Akim Demaille <akim@epita.fr>
13682
13683 * tests/regression.at (Invalid inputs): Adjust to the recent
13684 messages.
13685
13686 2002-11-06 Akim Demaille <akim@epita.fr>
13687
13688 Restore --no-lines.
13689 Reported by Jim Kent.
13690
13691 * data/c.m4 (b4_syncline): New.
13692 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
13693 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
13694 * src/output.c (user_actions_output): Likewise.
13695 (prepare): Define 'b4_synclines_flag'.
13696 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
13697
13698 2002-11-06 Akim Demaille <akim@epita.fr>
13699
13700 * src/main.c (main): Free `infile'.
13701 * src/scan-gram.l (handle_syncline): New.
13702 Recognize `#line'.
13703 * src/output.c (user_actions_output, symbol_destructors_output)
13704 (symbol_printers_output): Use the location's file name, not
13705 infile.
13706 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13707
13708 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13709
13710 * src/tables.c (matching_state): Don't allow states to match if
13711 either has GLR conflict entries.
13712
13713 2002-11-05 Paul Eggert <eggert@twinsun.com>
13714
13715 * src/scan-gram.l: Use more accurate diagnostics, e.g.
13716 "integer out of range" rather than "invalid value".
13717 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
13718 accordingly.
13719
13720 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
13721 Also, remove one static variable in the scanner.
13722
13723 * src/scan-gram.l (braces_level): Now auto, not static.
13724 Initialize to zero if the compiler is being picky.
13725 (INITIAL): Clear braces_level instead of incrementing it.
13726 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
13727 as POSIX 1003.1-2001 requires.
13728 * src/system.h (IF_LINT): New macro, taken from coreutils.
13729 * configure.ac: Define "lint" if --enable-gcc-warnings.
13730
13731 2002-11-05 Akim Demaille <akim@epita.fr>
13732
13733 * src/scan-gram.l: When it starts with `%', complain about the
13734 whole directive, not just that `invalid character: %'.
13735
13736 2002-11-04 Akim Demaille <akim@epita.fr>
13737
13738 * Makefile.maint: Update from Autoconf.
13739 (update, cvs-update, po-update, do-po-update): New.
13740
13741 2002-11-04 Akim Demaille <akim@epita.fr>
13742
13743 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
13744 and yyerror.
13745 Have yyerror `use' its arguments.
13746 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
13747 returns true when location & yacc & pure & parse-param.
13748 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
13749
13750 2002-11-04 Akim Demaille <akim@epita.fr>
13751
13752 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
13753 clashes.
13754 * src/scan-gram.l: Use [\'] instead of ['] to pacify
13755 font-lock-mode.
13756 Use complain_at.
13757 Use quote, not quote_n since LOCATION_PRINT no longer uses the
13758 slot 0.
13759
13760 2002-11-03 Paul Eggert <eggert@twinsun.com>
13761
13762 * src/reader.c (get_merge_function, grammar_current_rule_check):
13763 Use consistent diagnostics for reporting type name clashes.
13764 Quote the types with <>, for consistency with Yacc.
13765 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
13766
13767 2002-11-03 Akim Demaille <akim@epita.fr>
13768
13769 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
13770 New.
13771 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
13772 (b4_parse_param): Remove.
13773 Use b4_identification.
13774 Propagate b4_pure_args where needed to pass them to yyerror.
13775 * data/glr.m4 (b4_parse_param): Remove.
13776 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
13777 (b4_lpure_formals): New.
13778 Use b4_identification.
13779 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
13780 b4_user_formals and b4_user_args.
13781 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
13782 (yyreportAmbiguity): When using a pure parser, also need
13783 the location, and the parse-params.
13784 Adjust callers.
13785 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
13786 When using a pure parser, also need the parse-params.
13787 Adjust callers.
13788 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
13789 (%pure-parser + %parse-param) LALR and GLR parsers.
13790 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
13791 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
13792 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
13793 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
13794 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
13795 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
13796 * doc/bison.texinfo: Untabify the whole file.
13797 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
13798 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
13799 (Error Reporting): Adjust to these new directives.
13800 Document %error-verbose, deprecate YYERROR_VERBOSE.
13801
13802 2002-11-03 Akim Demaille <akim@epita.fr>
13803
13804 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
13805 AT_CHECK_CALC_GLR invocations to use % directives, instead of
13806 command line options.
13807 * tests/cxx-type.at: Formatting changes.
13808
13809 2002-11-03 Paul Eggert <eggert@twinsun.com>
13810
13811 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
13812 to count columns correctly, and to check for invalid inputs.
13813
13814 Use mbsnwidth to count columns correctly. Account for tabs, too.
13815 Include mbswidth.h.
13816 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
13817 (extend_location): New function.
13818 (YY_LINES): Remove.
13819
13820 Handle CRLF in C code rather than in Lex code.
13821 (YY_INPUT): New macro.
13822 (no_cr_read): New function.
13823
13824 Scan UCNs, even though we don't fully handle them yet.
13825 (convert_ucn_to_byte): New function.
13826
13827 Handle backslash-newline correctly in C code.
13828 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
13829 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
13830 all uses changed.
13831 (tag, splice): New EREs. Do not allow NUL or newline in tags.
13832 Use {splice} wherever C allows backslash-newline.
13833 YY_STEP after space, newline, vertical-tab.
13834 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
13835
13836 (letter, id): Don't assume ASCII; e.g., spell out a-z.
13837
13838 ({int}, handle_action_dollar, handle_action_at): Check for integer
13839 overflow.
13840
13841 (YY_STEP): Omit trailing semicolon, so that it's more like C.
13842
13843 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
13844 as well as \000. Check for UCHAR_MAX, not 255.
13845 Allow \x with an arbitrary positive number of digits, as in C.
13846 Check for overflow here.
13847 Allow \? and UCNs, for compatibility with C.
13848
13849 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
13850 with quote slot used by complain_at.
13851
13852 * tests/input.at: Add tests for backslash-newline, m4 quotes
13853 in symbols, long literals, and funny escapes in strings.
13854
13855 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
13856 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
13857 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
13858 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
13859 * m4/mbswidth.m4: New file, from GNU coreutils.
13860
13861 * doc/bison.texinfo (Grammar Outline): Document // comments.
13862 (Symbols): Document that trigraphs have no special meaning in Bison,
13863 nor is backslash-newline allowed.
13864 (Actions): Document that trigraphs have no special meaning.
13865
13866 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
13867 no longer used.
13868
13869 2002-11-02 Paul Eggert <eggert@twinsun.com>
13870
13871 * src/reader.c: Don't include quote.h; not needed.
13872 (get_merge_function): Reword warning to be consistent with
13873 type clash diagnostic in grammar_current_rule_check.
13874
13875 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
13876 bug in trigraph handling.
13877
13878 * src/output.c (prepare_symbols): When printing token names,
13879 escape "[" as "@<:@" and likewise for "]".
13880
13881 * src/system.h (errno): Remove declaration, as we are now
13882 assuming C89 or better, and C89 guarantees errno.
13883
13884 2002-10-30 Paul Eggert <eggert@twinsun.com>
13885
13886 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
13887 Check for close failures.
13888 * src/files.h (xfclose): Return void, not int, since it always
13889 returned zero.
13890 * src/files.c (xfclose): Likewise. Report I/O error if ferror
13891 indicates one.
13892 * src/output.c (output_skeleton): Use xfclose rather than fclose
13893 and ferror. xfclose now checks ferror.
13894
13895 * data/glr.c (YYLEFTMOST_STATE): Remove.
13896 (yyreportTree): Use a stack-based leftmost state. This avoids
13897 our continuing battles with bogus warnings about initializers.
13898
13899 2002-10-30 Akim Demaille <akim@epita.fr>
13900
13901 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
13902 #if.
13903
13904 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13905
13906 * tests/glr-regr1.at: New test for reported regressions.
13907 * tests/testsuite.at: Add glr-regr1.at test.
13908 * tests/Makefile.am: Add glr-regr1.at test.
13909
13910 2002-10-24 Paul Eggert <eggert@twinsun.com>
13911
13912 Version 1.75a.
13913
13914 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
13915 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
13916 we use malloc. Don't assume 'A' through 'Z' are contiguous.
13917 Don't assume strdup exists; POSIX says its an XSI extension.
13918 Check for buffer overflow on input.
13919
13920 2002-10-24 Akim Demaille <akim@epita.fr>
13921
13922 * src/output.c (output_skeleton): Don't disable M4sugar comments
13923 too soon: it results in comments being expanded.
13924 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
13925 first output.
13926
13927 2002-10-24 Akim Demaille <akim@epita.fr>
13928
13929 * data/yacc.c (m4_int_type): New.
13930 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
13931 char' as only yacc.c wants K&R portability.
13932 * data/glr.c (yysigned_char): Remove.
13933 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
13934 Reported by Quoc Peyrot.
13935
13936 2002-10-23 Paul Eggert <eggert@twinsun.com>
13937
13938 * src/main.c (main): With --trace=time, report times even if a
13939 non-fatal error occurs. Formerly, the times were reported in some
13940 such cases but not in others.
13941 * src/reader.c (reader): Just return if a complaint has been issued,
13942 instead of exiting, so that 'main' can report times.
13943
13944 2002-10-22 Akim Demaille <akim@epita.fr>
13945
13946 * src/system.h: Include sys/types.
13947 Reported by Bert Deknuydt.
13948
13949 2002-10-23 Paul Eggert <eggert@twinsun.com>
13950
13951 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
13952 Suggested by Art Haas.
13953
13954 2002-10-22 Paul Eggert <eggert@twinsun.com>
13955
13956 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
13957 decl; not needed any more.
13958 * src/main.c (main): Use return to exit, undoing yesterday's change.
13959 The last OS that we could find where this wouldn't work is
13960 SunOS 3.5, and that's too old to worry about now.
13961
13962 * data/glr.c (struct yyltype): Define members even when not
13963 doing locations. This is more consistent with yacc.c, and it
13964 works around the following bug reports:
13965 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
13966 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
13967
13968 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
13969 @acronym consistently. Standardize on "Yacc" instead of "YACC",
13970 "Algol" instead of "ALGOL". Give a bit more history about BNF.
13971
13972 2002-10-22 Akim Demaille <akim@epita.fr>
13973
13974 * data/README: New.
13975
13976 2002-10-21 Paul Eggert <eggert@twinsun.com>
13977
13978 Be consistent about 'bool'; the old code used an enum in one
13979 module and an int in another, and this violates the C standard.
13980 * m4/stdbool.m4: New file, from coreutils 4.5.3.
13981 * configure.ac (AC_HEADER_STDBOOL): Add.
13982 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
13983 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
13984 * src/symtab.c (hash_compare_symbol_t): Likewise.
13985 * src/system.h (bool, false, true): Use a definition consistent
13986 with ../lib/hash.c. All uses changed.
13987
13988 * src/complain.c (warning_issued): Renamed from warn_message_count,
13989 so that we needn't worry about integer overflow (!).
13990 Now of type bool. All uses changed.
13991 (complaint_issued): Renamed from complain_message_count; likewise.
13992
13993 * src/main.c (main): Use exit to exit with failure.
13994
13995 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
13996 rather than 1 and 0.
13997 * src/main.c (main): Likewise.
13998 * src/getargs.c (getargs): Likewise.
13999 * src/reader.c (reader): Likewise.
14000
14001 * src/getarg.c (getargs): Remove duplicate code for
14002 "Try `bison --help'".
14003
14004 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14005 What was that "2" for?
14006
14007 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14008 * src/getargs.c (usage): Likewise.
14009
14010 * src/getargs.c (getargs): When there are too few operands, report
14011 the last one. When there are too many, report the first extra
14012 one. This is how diffutils does it.
14013
14014 2002-10-20 Paul Eggert <eggert@twinsun.com>
14015
14016 Remove K&R vestiges.
14017 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14018 * src/complain.c (VA_START): Remove. Assume prototypes.
14019 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14020 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14021 fatal): Assume prototypes.
14022 * src/complain.h: Assume prototypes.
14023 * src/system.h (PARAMS): Remove.
14024 Include <limits.h> unconditionally, since it's guaranteeed even
14025 for a freestanding C89 compiler.
14026 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14027 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
14028
14029 2002-10-20 Akim Demaille <akim@epita.fr>
14030
14031 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14032 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14033 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14034 (yyresolveStates, yyresolveAction, yyresolveStack)
14035 (yyprocessOneStack): Use them.
14036 (yy_reduce_print): New.
14037 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14038
14039 2002-10-20 Akim Demaille <akim@epita.fr>
14040
14041 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14042 arguments and output `void'.
14043 (b4_c_function): Rename as...
14044 (b4_c_function_def): this.
14045 (b4_c_function_decl, b4_c_ansi_function_def)
14046 (b4_c_ansi_function_decl): New.
14047 Change the interpretation of the arguments: before `int, foo', now
14048 `int foo, foo'.
14049 * data/yacc.c (yyparse): Prototype and define thanks to these.
14050 Adjust b4_c_function_def uses.
14051 * data/glr.c (yyparse): Likewise, but ANSI only.
14052
14053 2002-10-20 Akim Demaille <akim@epita.fr>
14054
14055 * src/output.c (prepare): Move the definition of `tokens_number',
14056 `nterms_number', `undef_token_number', `user_token_number_max'
14057 to...
14058 (prepare_tokens): Here.
14059 (prepare_tokens): Rename as...
14060 (prepare_symbols): this.
14061 (prepare): Move the definition of `rules_number' to...
14062 (prepare_rules): here.
14063 (prepare): Move the definition of `last', `final_state_number',
14064 `states_number' to...
14065 (prepare_states): here.
14066 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14067
14068 2002-10-20 Akim Demaille <akim@epita.fr>
14069
14070 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14071
14072 2002-10-20 Akim Demaille <akim@epita.fr>
14073
14074 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14075 * data/c.m4: here.
14076
14077 2002-10-20 Akim Demaille <akim@epita.fr>
14078
14079 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14080 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14081 `pair'.
14082 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14083 `name' to...
14084 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14085 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14086 These.
14087
14088 2002-10-19 Paul Eggert <eggert@twinsun.com>
14089
14090 Do not create a temporary file, as that involves security and
14091 cleanup headaches. Instead, use a pair of pipes.
14092 Derived from a suggestion by Florian Krohm.
14093 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14094 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14095 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14096 (BISON_PREREQ_SUBPIPE): Add.
14097 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14098 Add subpipe.h, subpipe.c.
14099 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14100 * po/POTFILES.in: Add lib/subpipe.c.
14101 * src/output.c: Include "subpipe.h".
14102 (m4_invoke): Remove decl.
14103 (scan_skel): New decl.
14104 (output_skeleton): Use pipe rather than temporary file for m4 input.
14105 Check that m4sugar.m4 is readable, to avoid deadlock.
14106 Check for pipe I/O error.
14107 * src/scan-skel.l (readpipe): Remove decl.
14108 (scan_skel): New function, to be used in place of m4_invoke.
14109 Read from stream rather than file.
14110
14111 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14112 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14113 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14114 this generates a more-accurate value anyway.
14115
14116 * lib/timevar.c (timervar_accumulate): Rename locals to
14117 avoid confusion with similarly-named more-global.
14118 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14119
14120 * src/output.c (prepare): Use xstrdup to convert char const *
14121 to char *, to avoid GCC warning.
14122
14123 2002-10-19 Akim Demaille <akim@epita.fr>
14124
14125 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14126 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14127 Use them to have `calc.y' ready for %pure-parser.
14128 * data/yacc.c (YYLEX): Pass a yylex return type to
14129 b4_c_function_call.
14130
14131 2002-10-19 Akim Demaille <akim@epita.fr>
14132
14133 Prototype support of %lex-param and %parse-param.
14134
14135 * src/parse-gram.y: Add the definition of the %lex-param and
14136 %parse-param tokens, plus their rules.
14137 Drop the `_' version of %glr-parser.
14138 Add the "," token.
14139 * src/scan-gram.l (INITIAL): Scan them.
14140 * src/muscle_tab.c: Comment changes.
14141 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14142 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14143 (muscle_entry_s): The `value' member is no longer const.
14144 Adjust all dependencies.
14145 * src/muscle_tab.c (muscle_init): Adjust: use
14146 MUSCLE_INSERT_STRING.
14147 Initialize the obstack earlier.
14148 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14149 (muscle_pair_list_grow): New.
14150 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14151 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14152 * tests/calc.at: Use %locations, not --locations.
14153 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14154
14155 2002-10-19 Akim Demaille <akim@epita.fr>
14156
14157 * src/getargs.c (usage): Take status as argument and exit
14158 accordingly.
14159 Report the traditional `Try ... --help' message when status != 0.
14160 (usage, version): Don't take a FILE * as arg, it is pointless.
14161 (getargs): When there is an incorrect number of arguments, make it
14162 an error, and report it GNUlically thanks to `usage ()'.
14163
14164 2002-10-18 Paul Eggert <eggert@twinsun.com>
14165
14166 * data/glr.c (yyreportParseError): Don't assume that sprintf
14167 yields the length of the printed string, as this is not true
14168 on SunOS 4.1.4. Reported by Peter Klein.
14169
14170 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14171 * tests/conflicts.at (%nonassoc and eof): Likewise.
14172 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14173
14174 2002-10-17 Akim Demaille <akim@epita.fr>
14175
14176 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14177 * src/getargs.c (trace_types, trace_args): Adjust.
14178 * src/reader.c (grammar_current_rule_prec_set)
14179 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14180 Standardize error messages.
14181 And s/@prec/%prec/!
14182 (reader): Use trace_flag to enable scanner/parser debugging,
14183 instead of an adhoc scheme.
14184 * src/scan-gram.l: Remove trailing debugging code.
14185
14186 2002-10-16 Paul Eggert <eggert@twinsun.com>
14187
14188 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14189 MUSCLE_TAB_H.
14190
14191 * NEWS: Officially drop support for building Bison with K&R C,
14192 since it didn't work anyway and it's not worth worrying about.
14193 * Makefile.maint (wget_files): Remove ansi2knr.c.
14194 (ansi2knr.c-url_prefix): Remove.
14195 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14196 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14197 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14198
14199 2002-10-15 Paul Eggert <eggert@twinsun.com>
14200
14201 Stop using the "enum_" trick for K&R-style function definitions;
14202 it confused me, and I was the author! Instead, assume that people
14203 who want to use K&R C compilers (when using these modules in GCC,
14204 perhaps?) will run ansi2knr.
14205
14206 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14207 All uses of "enum_" changed to "enum ".
14208 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14209 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14210
14211 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14212 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14213 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14214 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14215 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14216 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14217 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14218 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14219 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14220 Use function prototypes; this removes the need for declaring
14221 static functions simply to provide their prototypes.
14222 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14223 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14224 bitset_count_, bitset_create, bitset_dump, bitset_first,
14225 bitset_free, bitset_init, bitset_last, bitset_next,
14226 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14227 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14228 bitset_print, bitset_release_memory, bitset_toggle_,
14229 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14230 debug_bitset): Likewise.
14231 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14232 * lib/bitset_stats.c (bitset_log_histogram_print,
14233 bitset_percent_histogram_print, bitset_stats_and,
14234 bitset_stats_and_cmp, bitset_stats_and_or,
14235 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14236 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14237 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14238 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14239 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14240 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14241 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14242 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14243 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14244 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14245 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14246 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14247 bitset_stats_zero): Likewise.
14248 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14249 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14250 bitsetv_dump, debug_bitsetv): Likewise.
14251 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14252 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14253 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14254 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14255 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14256 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14257 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14258 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14259 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14260 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14261 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14262 Likewise.
14263 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14264 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14265 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14266 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14267 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14268 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14269 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14270 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14271 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14272 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14273 lbitset_xor_cmp, lbitset_zero): Likewise.
14274
14275 2002-10-14 Akim Demaille <akim@epita.fr>
14276
14277 Version 1.75.
14278
14279 2002-10-14 Akim Demaille <akim@epita.fr>
14280
14281 * tests/Makefile.am (maintainer-check-posix): New.
14282
14283 2002-10-14 Akim Demaille <akim@epita.fr>
14284
14285 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14286 member.
14287
14288 2002-10-14 Akim Demaille <akim@epita.fr>
14289
14290 * src/tables.c (table_ninf_remap): base -> tab.
14291 Reported by Matt Rosing.
14292
14293 2002-10-14 Paul Eggert <eggert@twinsun.com>
14294
14295 * tests/action.at, tests/calc.at, tests/conflicts.at,
14296 tests/cxx-type.at, tests/headers.at, tests/input.at,
14297 tests/regression.at, tests/synclines.at, tests/torture.at:
14298 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14299 so that the tests still work even if POSIXLY_CORRECT is set.
14300 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
14301
14302 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14303 for portability to K&R hosts. Fix typo: signed char is guaranteed
14304 only to 127, not to 128.
14305 * data/glr.c (yysigned_char): New type.
14306 * data/yacc.c (yysigned_char): Likewise.
14307 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14308
14309 2002-10-13 Paul Eggert <eggert@twinsun.com>
14310
14311 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14312 true due to limited range of data type" warning from GCC.
14313
14314 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14315 by wrapping enum yytokentype's definition inside #ifndef
14316 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14317
14318 2002-10-13 Akim Demaille <akim@epita.fr>
14319
14320 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14321 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14322
14323 2002-10-13 Akim Demaille <akim@epita.fr>
14324
14325 * Makefile.maint: Update from Autoconf 2.54.
14326 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14327
14328 2002-10-13 Akim Demaille <akim@epita.fr>
14329
14330 * src/print.c (print_state): Separate the list of solved conflicts
14331 from the other items.
14332 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14333
14334 2002-10-13 Akim Demaille <akim@epita.fr>
14335
14336 Let nondeterministic skeletons be usable with deterministic
14337 tables.
14338
14339 With the patch, GAWK compiled by GCC without -O2 passes its test
14340 suite using a GLR parser driven by LALR tables. It fails with -O2
14341 because `struct stat' gives two different answers on my machine:
14342 88 (definition of an auto var) and later 96 (memset on this var).
14343 Hence the stack is badly corrumpted. The headers inclusion is to
14344 blame: if I move the awk.h inclusion before GLR's system header
14345 inclusion, the two struct stat have the same size.
14346
14347 * src/tables.c (pack_table): Always create conflict_table.
14348 (token_actions): Always create conflict_list.
14349 * data/glr.c (YYFLAG): Remove, unused.
14350
14351 2002-10-13 Akim Demaille <akim@epita.fr>
14352
14353 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14354 (O0FLAGS): New.
14355 (VALGRIND, GXX): New.
14356 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14357 * tests/bison.in: Run $PREBISON a pre-command.
14358 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14359 (maintainer-check-g++): New.
14360 * Makefile.am (maintainer-check): New.
14361
14362 2002-10-13 Akim Demaille <akim@epita.fr>
14363
14364 * data/glr.c: Formatting changes.
14365 Tweak some trace messages to match yacc.c's.
14366
14367 2002-10-13 Akim Demaille <akim@epita.fr>
14368
14369 GLR parsers sometimes raise parse errors instead of performing the
14370 default reduction.
14371 Reported by Charles-Henry de Boysson.
14372
14373 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
14374 check the length of the traces when %glr.
14375 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14376 GLR's traces.
14377 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14378 Test GLR parsers.
14379 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14380 (yyltype): Remove the yy prefix from the member names.
14381 (yytable): Complete its comment.
14382 (yygetLRActions): Map error action number from YYTABLE from
14383 YYTABLE_NINF to 0.
14384 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14385 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14386 not satisfying as we could compare an YYACTION computed from
14387 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14388 only value for error actions.
14389 (yyreportParseError): In verbose parse error messages, don't issue
14390 `error' in the list of expected tokens.
14391 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14392 next action to perform to match glr.c's decoding.
14393 (yytable): Complete its comment.
14394
14395 2002-10-13 Paul Eggert <eggert@twinsun.com>
14396
14397 Fix problem reported by Henrik Grubbstroem in
14398 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
14399 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14400 because the Bison parser reads the second action before reducing
14401 the first one.
14402 * src/scan-gram.l (rule_length): New static var.
14403 Use it to keep track of the rule length in the scanner, since
14404 we can't expect the parser to be in lock-step sync with the scanner.
14405 (handle_action_dollar, handle_action_at): Use this var.
14406 * tests/actions.at (Exotic Dollars): Test for the problem.
14407
14408 2002-10-12 Paul Eggert <eggert@twinsun.com>
14409
14410 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14411 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14412 Include <sys/time.h> when checking for clock_t and struct tms.
14413 Use same include order as source.
14414 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
14415 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
14416
14417 * lib/timevar.c: Update copyright date and clarify comments.
14418 (get_time) [IN_GCC]: Keep the GCC version for reference.
14419
14420 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14421 GCC version as of today, then merge Bison's changes.
14422 Change "GCC" to "Bison" in copyright notice. timevar.def's
14423 author is Akim, so change that too.
14424
14425 * src/reader.c (grammar_current_rule_check):
14426 Don't worry about the default action if $$ is untyped.
14427 Prevents bogus warnings reported by Jim Gifford in
14428 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
14429
14430 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14431 * data/glr.c, data/lalr1.cc, data/yacc.c:
14432 Output token definitions before the first part of user declarations.
14433 Fixes compatibility problem reported by Jim Gifford for kbd in
14434 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14435
14436 2002-10-11 Paul Eggert <eggert@twinsun.com>
14437
14438 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14439 (yyparse): here. This undoes some of the 2002-07-25 change.
14440 Compatibility problem reported by Ralf S. Engelschall with
14441 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14442
14443 2002-10-11 Akim Demaille <akim@epita.fr>
14444
14445 * tests/regression.at Characters Escapes): New.
14446 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14447 characters.
14448 Reported by Jan Nieuwenhuizen.
14449
14450 2002-10-11 Akim Demaille <akim@epita.fr>
14451
14452 * po/id.po: New.
14453
14454 2002-10-10 Paul Eggert <eggert@twinsun.com>
14455
14456 Portability fixes for bitsets; this also avoids several GCC
14457 warnings.
14458
14459 * lib/abitset.c: Include <stddef.h>, for offsetof.
14460 * lib/lbitset.c: Likewise.
14461
14462 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14463 properly for vectors of objects. Do not assume that adding a
14464 header size to a multiple of a word size yields a value that is
14465 properly aligned for the whole union.
14466 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14467
14468 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14469 unique names for structures.
14470 * lib/ebitset.c (ebitset_bytes): Likewise.
14471 * lib/lbitset.c (lbitset_bytes): Likewise.
14472
14473 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14474 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14475 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14476 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14477 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14478 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14479 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14480 to improve the type-checking that GCC can do.
14481 * lib/bitset.c (bitset_op4_cmp): Likewise.
14482 * lib/bitset_stats.c (bitset_stats_count,
14483 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14484 bitset_stats_copy, bitset_stats_disjoint_p,
14485 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14486 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14487 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14488 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14489 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14490 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14491 bitset_stats_or_and_cmp): Likewise.
14492 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14493 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14494 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14495 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14496
14497 * lib/abitset.h: Include bitset.h, not bbitset.h.
14498 * lib/ebitset.h: Likewise.
14499 * lib/lbitset.h: Likewise.
14500
14501 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14502 All instances of parameters of type enum bitset_opts are now of
14503 type enum_bitset_opts, to conform to the C Standard, and similarly
14504 for enum_bitset_type.
14505 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14506 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14507
14508 Do not use "struct bitset_struct" to mean different things in
14509 different modules. Not only is this confusing, it violates
14510 the C Standard, which requires that structure types in different
14511 modules must be compatible if one is to be passed to the other.
14512 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14513 All instances of "struct bitset_struct *" replaced with "bitset".
14514 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14515 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14516 struct lbitset_struct, struct bitset_stats_struct): New types.
14517 All uses of struct bitset_struct changed to union bitset_union,
14518 etc.
14519 * lib/abitset.c (struct abitset_struct, abitset,
14520 struct bitset_struct): Remove.
14521 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14522 struct bitset_struct): Remove.
14523 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14524 bitset_struct): Remove.
14525 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14526 Likewise.
14527
14528 Do not call a function of type T using a call that assumes the
14529 function is of a different type U. Standard C requires that a
14530 function must be called with a type that is compatible with its
14531 definition.
14532 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14533 New decls.
14534 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14535 New functions.
14536 * lib/ebitset.c (PFV): Remove.
14537 * lib/lbitset.c (PFV): Likewise.
14538 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14539 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14540 decls.
14541 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14542 (ebitset_vtable): Use them.
14543 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14544 lbitset_xor): New functions.
14545 (lbitset_vtable): Use them.
14546
14547 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14548 Declare.
14549
14550 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14551 GCC warning.
14552 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14553 Use offsetof, for simplicity.
14554
14555 2002-10-06 Paul Eggert <eggert@twinsun.com>
14556
14557 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14558 the same width as int. This reapplies a hunk of the 2002-08-12 patch
14559 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
14560 which was inadvertently undone by the 2002-09-30 patch.
14561 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14562 the same width as int.
14563
14564 2002-10-04 Paul Eggert <eggert@twinsun.com>
14565
14566 Version 1.50.
14567
14568 * configure.ac (AC_INIT), NEWS: Increment version number.
14569
14570 * doc/bison.texinfo: Minor spelling, grammar, and white space
14571 fixes.
14572 (Symbols): Mention that any negative value returned from yylex
14573 signifies end-of-input. Warn about negative chars. Mention
14574 the portable Standard C character set.
14575
14576 The GNU coding standard says CFLAGS and YFLAGS are reserved
14577 for the installer to set.
14578 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14579 * src/Makefile.am (AM_CFLAGS): Likewise.
14580 (AM_YFLAGS): Renamed from YFLAGS.
14581
14582 Fix some MAX and MIN problems.
14583 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14584 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14585 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14586 * src/reader.c (reader): Use it.
14587
14588 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14589 POSIX 1003.1-2001 has removed fgrep.
14590
14591 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14592
14593 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14594 interpreted as signed.
14595 * lib/ebitset.c (ebitset_list): Fix bug.
14596
14597 2002-10-01 Paul Eggert <eggert@twinsun.com>
14598
14599 More fixes for 64-bit hosts and large bitsets.
14600
14601 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14602 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14603 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14604 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14605 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14606 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14607 bitset_count_): Likewise.
14608 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14609 bitset_first, bitset_last): Likewise.
14610 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14611 bitset_stats_list_reverse, bitset_stats_size,
14612 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14613 Likewise.
14614 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14615 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14616 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14617 bitsetv_reflexive_transitive_closure): Likewise.
14618 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14619 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14620 Likewise.
14621 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14622 Likewise.
14623
14624 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14625 Use size_t, not unsigned int, to count bytes.
14626 * lib/abitset.h (abitset_bytes): Likewise.
14627 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14628 Likewise.
14629 * lib/bitset.h (bitset_bytes): Likewise.
14630 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14631 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14632 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14633 * lib/ebitset.c (ebitset_bytes): Likewise.
14634 * lib/ebitset.h (ebitset_bytes): Likewise.
14635 * lib/lbitset.c (lbitset_bytes): Likewise.
14636 * lib/lbitset.h (lbitset_bytes): Likewise.
14637
14638 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14639 abitset_subset_p, abitset_disjoint_p, abitset_and,
14640 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14641 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14642 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14643 abitset_or_and, abitset_or_and_cmp):
14644 Use bitset_windex instead of unsigned int.
14645 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14646 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14647 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14648 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
14649 Likewise.
14650 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
14651
14652 * lib/bitset.c (bitset_print):
14653 Use proper printf formats for widths of integer types.
14654 * lib/bitset_stats.c (bitset_percent_histogram_print,
14655 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
14656 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14657 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14658 * lib/lbitset.c (lbitset_bytes): Likewise.
14659
14660 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
14661 BITSET_SIZE_MAX): New macros.
14662 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
14663 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
14664 to BITSET_WINDEX_MAX.
14665
14666 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
14667 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
14668 since we now return the bitset_bindex type (not int).
14669
14670 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
14671 when computing sizes.
14672 * lib/ebitset.c (ebitset_elts_grow): Likewise.
14673
14674 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
14675 and avoid cast to unsigned.
14676
14677 2002-09-30 Akim Demaille <akim@epita.fr>
14678
14679 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14680 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
14681 Updates from Michael Hayes.
14682
14683 2002-09-30 Art Haas <ahaas@neosoft.com>
14684
14685 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
14686 invocations.
14687 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
14688 defined.
14689
14690 2002-09-27 Akim Demaille <akim@epita.fr>
14691
14692 Version 1.49c.
14693
14694 2002-09-27 Akim Demaille <akim@epita.fr>
14695
14696 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
14697 (Because of AC_LIBSOURCE).
14698
14699 2002-09-27 Akim Demaille <akim@epita.fr>
14700
14701 Playing with Autoscan.
14702
14703 * configure.ac: Remove the old LIBOBJ tweaks.
14704 (AC_REPLACE_FUNCS): Add strrchr and strtol.
14705 * lib/strrchr.c: New.
14706 * lib/strtol.c: New, from the Coreutils 4.5.1.
14707
14708 2002-09-27 Akim Demaille <akim@epita.fr>
14709
14710 Playing with Autoscan.
14711
14712 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
14713 * lib/Makefile.am (libbison_a_SOURCES): No longer include
14714 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
14715 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
14716 Coreutils 4.5.1.
14717
14718 2002-09-24 Akim Demaille <akim@epita.fr>
14719
14720 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
14721 (Frequently Asked Questions, Parser Stack Overflow): New.
14722
14723 2002-09-13 Akim Demaille <akim@epita.fr>
14724
14725 Playing with autoscan.
14726
14727 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
14728 * src/files.c (skeleton_find): Remove, unused.
14729 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
14730 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
14731
14732 2002-09-13 Akim Demaille <akim@epita.fr>
14733
14734 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
14735 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
14736
14737 2002-09-13 Akim Demaille <akim@epita.fr>
14738
14739 * configure.ac: Require 2.54.
14740 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
14741 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
14742 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
14743 Remove, provided by Autoconf macros.
14744
14745 2002-09-12 Akim Demaille <akim@epita.fr>
14746
14747 * m4/prereq.m4: Update, from Coreutils 4.5.1.
14748
14749 2002-09-12 Akim Demaille <akim@epita.fr>
14750
14751 * m4/prereq.m4: Update, from Fileutils 4.1.5.
14752 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
14753 Reported by Martin Mokrejs.
14754
14755 2002-09-10 Akim Demaille <akim@epita.fr>
14756
14757 * src/parse-gram.y: Associate a human readable string to each
14758 token type.
14759 * tests/regression.at (Invalid inputs): Adjust.
14760
14761 2002-09-10 Gary V. Vaughan <gary@gnu.org>
14762
14763 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
14764 with an Autoconf-2.5x style configure.ac.
14765
14766 2002-09-06 Paul Eggert <eggert@twinsun.com>
14767
14768 * doc/bison.texinfo (Conditions): Make explicit that the GPL
14769 exception applies only to yacc.c. This is a modification of a
14770 patch originally suggested by Akim Demaille.
14771
14772 2002-09-06 Akim Demaille <akim@epita.fr>
14773
14774 * data/c.m4 (b4_copyright): Move the GPL exception comment from
14775 here to...
14776 * data/yacc.c: here.
14777
14778 * data/lalr1.cc (struct yyltype): Don't define it, since we use
14779 LocationType.
14780 (b4_ltype): Default to yy::Location from location.hh.
14781
14782 2002-09-04 Jim Meyering <jim@meyering.net>
14783
14784 * data/yacc.c: Guard the declaration of yytoknum also with
14785 `#ifdef YYPRINT', so it is declared only when used.
14786
14787 2002-09-04 Akim Demaille <akim@epita.fr>
14788
14789 * configure.in: Rename as...
14790 * configure.ac: this.
14791 Bump to 1.49c.
14792
14793 2002-09-04 Akim Demaille <akim@epita.fr>
14794
14795 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
14796 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
14797 translate maintainer only messages.
14798
14799 2002-08-12 Paul Eggert <eggert@twinsun.com>
14800
14801 Version 1.49b.
14802
14803 * Makefile.am (SUBDIRS): Remove intl.
14804 (DISTCLEANFILES): Remove.
14805 * NEWS: Mention that GNU M4 is now required. Clarify what is
14806 meant by "larger grammars". Mention the pt_BR translation.
14807 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
14808 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
14809 Bump version from 0.11.2 to 0.11.5.
14810 (BISON_PREREQ_STAGE): Remove.
14811 (AM_GNU_GETTEXT): Use external gettext.
14812 (AC_OUTPUT): Remove intl/Makefile.
14813
14814 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
14815
14816 * data/glr.c: Include string.h, for strlen.
14817 (yyreportParseError): Use size_t for yysize.
14818 (yy_yypstack): No longer nested inside yypstates, as nested
14819 functions are not portable. Do not assume size_t is the
14820 same width as int.
14821 (yypstates): Do not assume that ptrdiff_t is the same width
14822 as int, and similarly for yyposn and YYINDEX.
14823
14824 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
14825
14826 * lib/Makefile.am (INCLUDES): Do not include from the intl
14827 directory, which has been removed.
14828 * src/Makefile.am (INCLUDES): Likewise.
14829
14830 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
14831 (bitsets_sources, additional_bitsets_sources, timevars_sources):
14832 New vars.
14833
14834 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
14835 * tests/Makefile.am (EXTRA_DIST): Likewise.
14836
14837 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
14838 Do not assume that bitset_windex is the same width as unsigned.
14839
14840 * lib/abitset.c (abitset_unused_clear): Do not assume that
14841 bitset_word is the same width as int.
14842 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
14843 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
14844 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
14845 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
14846 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
14847
14848 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
14849 portability to one's complement hosts!).
14850 * lib/ebitset.c (ebitset_op1): Likewise.
14851 * lib/lbitset.c (lbitset_op1): Likewise.
14852
14853 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
14854 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14855 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
14856 Sync with fileutils.
14857 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
14858 lib/gettext.h: Sync with diffutils.
14859
14860 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
14861 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
14862
14863 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
14864 PROTOTYPES to check for prototypes, and "defined __STDC__" to
14865 check for void *.
14866
14867 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
14868 size_t; the old version tried to do this but casted improperly.
14869 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
14870 (bitset_test): Now returns int, not unsigned long.
14871
14872 * lib/bitset_stats.c: Include "gettext.h".
14873 (_): New macro.
14874 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
14875 name locals "index", as it generates unnecessary warnings on some
14876 hosts that have an "index" function.
14877
14878 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
14879 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
14880 they need translation.
14881 * src/LR0.c (state_list_append, new_itemsets, get_state,
14882 append_states, generate_states): Likewise.
14883 * src/assoc.c (assoc_to_string): Likewise.
14884 * src/closure.c (print_closure, set_firsts, closure): Likewise.
14885 * src/gram.c (grammar_dump): Likewise.
14886 * src/injections.c (injections_compute): Likewise.
14887 * src/lalr.c (lookaheads_print): Likewise.
14888 * src/relation.c (relation_transpose): Likewise.
14889 * src/scan-gram.l: Likewise.
14890 * src/tables.c (table_grow, pack_vector): Likewise.
14891
14892 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
14893 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
14894 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
14895 * m4/mbstate_t.m4: Sync with fileutils.
14896 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
14897
14898 * po/LINGUAS: Add pt_BR.
14899 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
14900 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
14901 lib/timevar.c.
14902 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
14903 manual recommends.
14904 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
14905
14906 * src/complain.c (strerror_r): Remove decl; not needed.
14907 (strerror): Use same pattern as ../lib/error.c.
14908
14909 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
14910
14911 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
14912
14913 * src/main.c (main): Cast result of bindtextdomain and textdomain
14914 to void, to avoid a GCC warning when --disable-nls is in effect.
14915
14916 * src/scan-gram.l: Use strings rather than escapes when possible,
14917 to minimize the number of warnings from xgettext.
14918 (handle_action_dollar, handle_action_at): Don't use isdigit,
14919 as it mishandles negative chars and it may not work as expected
14920 outside the C locale.
14921
14922 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
14923 this is a GCC extension and is not portable to other compilers.
14924
14925 * src/system.h (alloca): Use same pattern as ../lib/error.c.
14926 Do not include <ctype.h>; no longer needed.
14927 Do not include <malloc.h>; no longer needed (and generates
14928 warnings on OpenBSD 3.0).
14929
14930 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
14931 it's not portable.
14932
14933 * tests/regression.at: Do not use 'cc -c input.c -o input';
14934 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
14935
14936 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
14937 exit status as failure, not just exit status 1. Sun C exits
14938 with status 2 sometimes.
14939
14940 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
14941 Use it for the two large tests.
14942
14943 2002-08-02 Akim Demaille <akim@epita.fr>
14944
14945 * src/conflicts.c (conflicts_output): Don't output rules never
14946 reduced here, since anyway that computation doesn't work.
14947 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
14948 (rule_useless_p, rule_never_reduced_p): New.
14949 (grammar_rules_partial_print): Use a filter instead of a range.
14950 Display the title only if needed.
14951 (grammar_rules_print): Adjust.
14952 (grammar_rules_never_reduced_report): New.
14953 * src/tables.c (action_row): Move the computation of rules never
14954 reduced to...
14955 (token_actions): here.
14956 * src/main.c (main): Make the parser before making the report, so
14957 that rules never reduced are computed.
14958 Call grammar_rules_never_reduced_report.
14959 * src/print.c (print_results): Report rules never reduced.
14960 * tests/conflicts.at, tests/reduce.at: Adjust.
14961
14962 2002-08-01 Akim Demaille <akim@epita.fr>
14963
14964 Instead of attaching lookaheads and duplicating the rules being
14965 reduced by a state, attach the lookaheads to the reductions.
14966
14967 * src/state.h (state_t): Remove the `lookaheads',
14968 `lookaheads_rule' member.
14969 (reductions_t): Add a `lookaheads' member.
14970 Use a regular array for the `rules'.
14971 * src/state.c (reductions_new): Initialize the lookaheads member
14972 to 0.
14973 (state_rule_lookaheads_print): Adjust.
14974 * src/state.h, src/state.c (state_reductions_find): New.
14975 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
14976 (count_rr_conflicts): Adjust.
14977 * src/lalr.c (LArule): Remove.
14978 (add_lookback_edge): Adjust.
14979 (state_lookaheads_count): New.
14980 (states_lookaheads_initialize): Merge into...
14981 (initialize_LA): this.
14982 (lalr_free): Adjust.
14983 * src/main.c (main): Don't free nullable and derives too early: it
14984 is used by --verbose.
14985 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
14986
14987 2002-08-01 Akim Demaille <akim@epita.fr>
14988
14989 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
14990 `rule_number_t**'.
14991 (set_derives, free_derives): Rename as...
14992 (derives_compute, derives_free): this.
14993 Adjust all dependencies.
14994 * src/nullable.c (set_nullable, free_nullable): Rename as...
14995 (nullable_compute, nullable_free): these.
14996 (rule_list_t): Store rule_t *, not rule_number_t.
14997 * src/state.c (state_rule_lookaheads_print): Directly compare rule
14998 pointers, instead of their numbers.
14999 * src/main.c (main): Call nullable_free, and derives_free earlier,
15000 as they were lo longer used.
15001
15002 2002-08-01 Akim Demaille <akim@epita.fr>
15003
15004 * lib/timevar.c (get_time): Include children time.
15005 * src/lalr.h (LA, LArule): Don't export them: used with the
15006 state_t.
15007 * src/lalr.c (LA, LArule): Static.
15008 * src/lalr.h, src/lalr.c (lalr_free): New.
15009 * src/main.c (main): Call it.
15010 * src/tables.c (pack_vector): Check whether loc is >= to the
15011 table_size, not >.
15012 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15013 (tables_generate): do it, since that's also it which allocates
15014 them.
15015 Don't free LA and LArule, main does.
15016
15017 2002-07-31 Akim Demaille <akim@epita.fr>
15018
15019 Separate parser tables computation and output.
15020
15021 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15022 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15023 (yydefgoto, yydefact, high): Move to...
15024 * src/tables.h, src/tables.c: here.
15025 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15026 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15027 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15028 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15029 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15030 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15031 (action_row, save_row, token_actions, save_column, default_goto)
15032 (goto_actions, sort_actions, matching_state, pack_vector)
15033 (table_ninf_remap, pack_table, prepare_actions): Move to...
15034 * src/tables.c: here.
15035 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15036 * src/output.c (token_actions, output_base, output_conflicts)
15037 (output_check): Merge into...
15038 (prepare_actions): this.
15039 (actions_output): Rename as...
15040 (user_actions_output): this.
15041 * src/main.c (main): Call tables_generate and tables_free.
15042
15043 2002-07-31 Akim Demaille <akim@epita.fr>
15044
15045 Steal GCC's --time-report support.
15046
15047 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15048 stolen/adjusted from GCC.
15049 * m4/stage.m4: Remove time related checks.
15050 * m4/timevar.m4: New.
15051 * configure.in: Adjust.
15052 * src/system.h: Adjust to using timevar.h.
15053 * src/getargs.h, src/getargs.c: Support trace_time for
15054 --trace=time.
15055 * src/main.c (stage): Remove.
15056 (main): Replace `stage' invocations with timevar calls.
15057 * src/output.c: Insert pertinent timevar calls.
15058
15059 2002-07-31 Akim Demaille <akim@epita.fr>
15060
15061 Let --trace have arguments.
15062
15063 * src/getargs.h (enum trace_e): New.
15064 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15065 (long_options, short_options): --trace/-T takes an optional
15066 argument.
15067 Change all the uses of trace_flag to reflect the new flags.
15068 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15069
15070 Strengthen `stage' portability.
15071
15072 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15073 * configure.in: Use it.
15074 Don't check for malloc.h and sys/times.h.
15075 * src/system.h: Include them when appropriate.
15076 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15077 times and struct tms are available.
15078
15079 2002-07-30 Akim Demaille <akim@epita.fr>
15080
15081 In verbose parse error message, don't report `error' as an
15082 expected token.
15083 * tests/actions.at (Printers and Destructors): Adjust.
15084 * tests/calc.at (Calculator $1): Adjust.
15085 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15086 error message, do not report the parser accepts the error token in
15087 that state.
15088
15089 2002-07-30 Akim Demaille <akim@epita.fr>
15090
15091 Normalize conflict related messages.
15092
15093 * src/complain.h, src/complain.c (warn, complain): New.
15094 * src/conflicts.c (conflicts_print): Use them.
15095 (conflict_report_yacc): New, extracted from...
15096 (conflicts_print): here.
15097 * tests/conflicts.at, tests/existing.at: Adjust.
15098
15099 2002-07-30 Akim Demaille <akim@epita.fr>
15100
15101 Report rules which are never reduced by the parser: those hidden
15102 by conflicts.
15103
15104 * src/LR0.c (save_reductions): Don't make the final state too
15105 different: save its reduction (accept) instead of having a state
15106 without any action (no shift or goto, no reduce).
15107 Note: the final state is now a ``regular'' state, i.e., the
15108 parsers now contain `reduce 0' as default reduction.
15109 Nevertheless, since they decide to `accept' when yystate =
15110 final_state, they still will not reduce rule 0.
15111 * src/print.c (print_actions, print_reduction): Adjust.
15112 * src/output.c (action_row): Track reduced rules.
15113 (token_actions): Report rules never reduced.
15114 * tests/conflicts.at, tests/regression.at: Adjust.
15115
15116 2002-07-30 Akim Demaille <akim@epita.fr>
15117
15118 `stage' was accidently included in a previous patch.
15119 Initiate its autoconfiscation.
15120
15121 * configure.in: Look for malloc.h and sys/times.h.
15122 * src/main.c (stage): Adjust.
15123 Report only when trace_flag.
15124
15125 2002-07-29 Akim Demaille <akim@epita.fr>
15126
15127 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15128 state_number_t.
15129 (errs_t): symbol_t*, not symbol_number_t.
15130 (reductions_t): rule_t*, not rule_number_t.
15131 (FOR_EACH_SHIFT): New.
15132 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15133 * src/print.c, src/print_graph.c: Adjust.
15134
15135 2002-07-29 Akim Demaille <akim@epita.fr>
15136
15137 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15138
15139 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15140 (endtoken, accept): these.
15141 * src/reader.c (reader): Set endtoken's default tag to "$end".
15142 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15143 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15144 Adjust.
15145
15146 2002-07-29 Akim Demaille <akim@epita.fr>
15147
15148 * src/reduce.c (reduce_grammar): When the language is empty,
15149 complain about the start symbol, not the axiom.
15150 Use its location.
15151 * tests/reduce.at (Empty Language): New.
15152
15153 2002-07-26 Akim Demaille <akim@epita.fr>
15154
15155 * src/reader.h, src/reader.c (gram_error): ... can't get
15156 yycontrol without making too strong assumptions on the parser
15157 itself.
15158 * src/output.c (prepare_tokens): Use the real 0th value of
15159 token_translations instead of `0'.
15160 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15161 visible here.
15162 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15163 for the time being: %locations ought to provide it to yyerror.
15164
15165 2002-07-25 Akim Demaille <akim@epita.fr>
15166
15167 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15168 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15169 * tests/regression.at (Web2c Actions): Adjust.
15170
15171 2002-07-25 Akim Demaille <akim@epita.fr>
15172
15173 Stop storing rules from 1 to nrules + 1.
15174
15175 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15176 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15177 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15178 Iterate from 0 to nrules.
15179 Use rule_number_as_item_number and item_number_as_rule_number.
15180 Adjust to `derive' now containing possibly 0.
15181 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15182 Handle the `- 1' part in rule numbers from/to item numbers.
15183 * src/conflicts.c (log_resolution): Fix the message which reversed
15184 shift and reduce.
15185 * src/output.c (action_row): Initialize default_rule to -1.
15186 (token_actions): Adjust.
15187 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15188 expected output.
15189 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15190
15191 2002-07-25 Akim Demaille <akim@epita.fr>
15192
15193 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15194 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15195 (b4_c_knr_arg_decl): New.
15196 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15197 yyreport_parse_error.
15198
15199 2002-07-25 Akim Demaille <akim@epita.fr>
15200
15201 * data/yacc.c (yyreport_parse_error): New, extracted from...
15202 (yyparse): here.
15203 (yydestruct, yysymprint): Move above yyparse.
15204 Be K&R compliant.
15205
15206 2002-07-25 Akim Demaille <akim@epita.fr>
15207
15208 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15209 replace...
15210 (b4_sint_type, b4_uint_type): these.
15211 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15212 * tests/regression.at (Web2c Actions): Adjust.
15213
15214 2002-07-25 Akim Demaille <akim@epita.fr>
15215
15216 * src/gram.h (TIEM_NUMBER_MAX): New.
15217 (item_number_of_rule_number, rule_number_of_item_number): Rename
15218 as...
15219 (rule_number_as_item_number, item_number_as_rule_number): these.
15220 Adjust dependencies.
15221 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15222 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15223 (symbol_number_to_vector_number): New.
15224 (order): Of vector_number_t* type.
15225 (base_t, BASE_MAX, BASE_MIN): New.
15226 (froms, tos, width, pos, check): Of base_t type.
15227 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15228 (actrow): Of action_number_t type.
15229 (conflrow): Of unsigned int type.
15230 (table_ninf, base_ninf): New.
15231 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15232 (muscle_insert_int_table, muscle_insert_base_table)
15233 (muscle_insert_rule_number_table): New.
15234 (prepare_tokens): Output `toknum' as int_table.
15235 (action_row): Returns a rule_number_t.
15236 Use ACTION_MIN, not SHRT_MIN.
15237 (token_actions): yydefact is rule_number_t*.
15238 (table_ninf_remap): New.
15239 (pack_table): Use it for `base' and `table'.
15240 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15241 replaced with...
15242 (YYPACT_NINF, YYTABLE_NINF): these.
15243 (yypact, yytable): Compute their types instead of hard-coded
15244 `short'.
15245 * tests/regression.at (Web2c Actions): Adjust.
15246
15247 2002-07-19 Akim Demaille <akim@epita.fr>
15248
15249 * src/scan-gram.l (id): Can start with an underscore.
15250
15251 2002-07-16 Akim Demaille <akim@epita.fr>
15252
15253 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15254 Adjust all former `associativity' dependencies.
15255 * src/symtab.c (symbol_new): Default associativity is `undef', not
15256 `right'.
15257 (symbol_check_alias_consistence): Adjust.
15258
15259 2002-07-09 Akim Demaille <akim@epita.fr>
15260
15261 * doc/bison.texinfo: Properly set the ``header'' part.
15262 Use @dircategory ``GNU programming tools'' as per Texinfo's
15263 documentation.
15264 Use @copying.
15265
15266 2002-07-09 Akim Demaille <akim@epita.fr>
15267
15268 * lib/quotearg.h: Protect against multiple inclusions.
15269 * src/location.h (location_t): Add a `file' member.
15270 (LOCATION_RESET, LOCATION_PRINT): Adjust.
15271 * src/complain.c (warn_at, complain_at, fatal_at): Drop
15272 `error_one_per_line' support.
15273
15274 2002-07-09 Akim Demaille <akim@epita.fr>
15275
15276 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15277 * src/reader.c (lineno): Remove.
15278 Adjust all dependencies.
15279 (get_merge_function): Take a location and use complain_at.
15280 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15281 * tests/regression.at (Invalid inputs, Mixing %token styles):
15282 Adjust.
15283
15284 2002-07-09 Akim Demaille <akim@epita.fr>
15285
15286 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15287 recovery rule, and forbid extensions when --yacc.
15288 (gram_error): Use complain_at.
15289 * src/reader.c (reader): Exit if there were parse errors.
15290
15291 2002-07-09 Akim Demaille <akim@epita.fr>
15292
15293 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15294 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15295 Reported by R Blake <blakers@mac.com>.
15296
15297 2002-07-09 Akim Demaille <akim@epita.fr>
15298
15299 * data/yacc.c: Output the copyright notive in the header.
15300
15301 2002-07-03 Akim Demaille <akim@epita.fr>
15302
15303 * src/output.c (froms, tos): Are state_number_t.
15304 (save_column): sp, sp1, and sp2 are state_number_t.
15305 (prepare): Rename `final' as `final_state_number', `nnts' as
15306 `nterms_number', `nrules' as `rules_number', `nstates' as
15307 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15308 unused.
15309 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15310 * data/lalr1.cc (nsym_): Remove, unused.
15311
15312 2002-07-03 Akim Demaille <akim@epita.fr>
15313
15314 * src/lalr.h, src/lalr.c (goto_number_t): New.
15315 * src/lalr.c (goto_list_t): New.
15316 Propagate them.
15317 * src/nullable.c (rule_list_t): New.
15318 Propagate.
15319 * src/types.h: Remove.
15320
15321 2002-07-03 Akim Demaille <akim@epita.fr>
15322
15323 * src/closure.c (print_fderives): Use rule_rhs_print.
15324 * src/derives.c (print_derives): Use rule_rhs_print.
15325 (rule_list_t): New, replaces `shorts'.
15326 (set_derives): Add comments.
15327 * tests/sets.at (Nullable, Firsts): Adjust.
15328
15329 2002-07-03 Akim Demaille <akim@epita.fr>
15330
15331 * src/output.c (prepare_actions): Free `tally' and `width'.
15332 (prepare_actions): Allocate and free `order'.
15333 * src/symtab.c (symbols_free): Free `symbols'.
15334 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15335 * src/output.c (m4_invoke): Move to...
15336 * src/scan-skel.l: here.
15337 (<<EOF>>): Close yyout, and free its name.
15338
15339 2002-07-03 Akim Demaille <akim@epita.fr>
15340
15341 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15342
15343 * src/LR0.c (new_state): Merge into...
15344 (state_list_append): this.
15345 (new_states): Merge into...
15346 (generate_states): here.
15347 (set_states): Don't ensure a proper `errs' state member here, do it...
15348 * src/conflicts.c (conflicts_solve): here.
15349 * src/state.h, src/state.c: Comment changes.
15350 (state_t): Rename member `shifts' as `transitions'.
15351 Adjust all dependencies.
15352 (errs_new): For consistency, also take the values as argument.
15353 (errs_dup): Remove.
15354 (state_errs_set): New.
15355 (state_reductions_set, state_transitions_set): Assert that no
15356 previous value was assigned.
15357 (state_free): New.
15358 (states_free): Use it.
15359 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15360 temporary storage: use `errs' and `nerrs' as elsewhere.
15361 (set_conflicts): Allocate and free this `errs'.
15362
15363 2002-07-02 Akim Demaille <akim@epita.fr>
15364
15365 * lib/libiberty.h: New.
15366 * lib: Update the bitset implementation from upstream.
15367 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15368 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15369 * src/main.c: Adjust bitset stats calls.
15370
15371 2002-07-01 Paul Eggert <eggert@twinsun.com>
15372
15373 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15374 char, so that negative chars don't collide with $.
15375
15376 2002-06-30 Akim Demaille <akim@epita.fr>
15377
15378 Have the GLR tests be `warning' checked, and fix the warnings.
15379
15380 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15381 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15382 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15383 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15384 (yyaddDeferredAction): static.
15385 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15386 (yyreportParseError): yyprefix is const.
15387 yytokenp is used only when verbose.
15388 (yy__GNUC__): Replace with __GNUC__.
15389 (yypdumpstack): yyi is size_t.
15390 (yypreference): Un-yy local variables and arguments, to avoid
15391 clashes with `yyr1'. Anyway, we are not in the user name space.
15392 (yytname_size): be an int, as is compared with ints.
15393 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15394 Use them.
15395 * tests/cxx-gram.at: Use quotation to protect $1.
15396 Use AT_COMPILE to enable warnings hunts.
15397 Prototype yylex and yyerror.
15398 `Use' argc.
15399 Include `string.h', not `strings.h'.
15400 Produce and prototype stmtMerge only when used.
15401 yylex takes a location.
15402
15403 2002-06-30 Akim Demaille <akim@epita.fr>
15404
15405 We spend a lot of time in quotearg, in particular when --verbose.
15406
15407 * src/symtab.c (symbol_get): Store a quoted version of the key.
15408 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15409 Adjust all callers.
15410
15411 2002-06-30 Akim Demaille <akim@epita.fr>
15412
15413 * src/state.h (reductions_t): Rename member `nreds' as num.
15414 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15415 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15416
15417 2002-06-30 Akim Demaille <akim@epita.fr>
15418
15419 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15420 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15421 (shifts_to): Rename as...
15422 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15423 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15424 (TRANSITION_IS_DISABLED, transitions_to): these.
15425
15426 2002-06-30 Akim Demaille <akim@epita.fr>
15427
15428 * src/print.c (print_shifts, print_gotos): Merge into...
15429 (print_transitions): this.
15430 (print_transitions, print_errs, print_reductions): Align the
15431 lookaheads columns.
15432 (print_core, print_transitions, print_errs, print_state,
15433 print_grammar): Output empty lines separator before, not after.
15434 (state_default_rule_compute): Rename as...
15435 (state_default_rule): this.
15436 * tests/conflicts.at (Defaulted Conflicted Reduction),
15437 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15438 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15439
15440 2002-06-30 Akim Demaille <akim@epita.fr>
15441
15442 Display items as we display rules.
15443
15444 * src/gram.h, src/gram.c (rule_lhs_print): New.
15445 * src/gram.c (grammar_rules_partial_print): Use it.
15446 * src/print.c (print_core): Likewise.
15447 * tests/conflicts.at (Defaulted Conflicted Reduction),
15448 (Unresolved SR Conflicts): Adjust.
15449 (Unresolved SR Conflicts): Adjust and rename as...
15450 (Resolved SR Conflicts): this, as was meant.
15451 * tests/regression.at (Web2c Report): Adjust.
15452
15453 2002-06-30 Akim Demaille <akim@epita.fr>
15454
15455 * src/print.c (state_default_rule_compute): New, extracted from...
15456 (print_reductions): here.
15457 Pessimize, but clarify the code.
15458 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15459
15460 2002-06-30 Akim Demaille <akim@epita.fr>
15461
15462 * src/output.c (action_row): Let default_rule be always a rule
15463 number.
15464
15465 2002-06-30 Akim Demaille <akim@epita.fr>
15466
15467 * src/closure.c (print_firsts, print_fderives, closure):
15468 Use BITSET_EXECUTE.
15469 * src/lalr.c (lookaheads_print): Likewise.
15470 * src/state.c (state_rule_lookaheads_print): Likewise.
15471 * src/print_graph.c (print_core): Likewise.
15472 * src/print.c (print_reductions): Likewise.
15473 * src/output.c (action_row): Likewise.
15474 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15475
15476 2002-06-30 Akim Demaille <akim@epita.fr>
15477
15478 * src/print_graph.c: Use report_flag.
15479
15480 2002-06-30 Akim Demaille <akim@epita.fr>
15481
15482 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15483 to...
15484 * src/relation.h, src/relation.c (traverse, relation_digraph)
15485 (relation_print, relation_transpose): New.
15486
15487 2002-06-30 Akim Demaille <akim@epita.fr>
15488
15489 * src/state.h, src/state.c (shifts_to): New.
15490 * src/lalr.c (build_relations): Use it.
15491
15492 2002-06-30 Akim Demaille <akim@epita.fr>
15493
15494 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15495 (item_number_of_rule_number, rule_number_of_item_number): New.
15496 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15497 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15498 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15499 Propagate their use.
15500 Much remains to be done, in particular wrt `shorts' from types.h.
15501
15502 2002-06-30 Akim Demaille <akim@epita.fr>
15503
15504 * src/symtab.c (symbol_new): Initialize the `printer' member.
15505
15506 2002-06-30 Akim Demaille <akim@epita.fr>
15507
15508 * src/LR0.c (save_reductions): Remove, replaced by...
15509 * src/state.h, src/state.c (state_reductions_set): New.
15510 (reductions, errs): Rename as...
15511 (reductions_t, errs_t): these.
15512 Adjust all dependencies.
15513
15514 2002-06-30 Akim Demaille <akim@epita.fr>
15515
15516 * src/LR0.c (state_list_t, state_list_append): New.
15517 (first_state, last_state): Now symbol_list_t.
15518 (this_state): Remove.
15519 (new_itemsets, append_states, save_reductions): Take a state_t as
15520 argument.
15521 (set_states, generate_states): Adjust.
15522 (save_shifts): Remove, replaced by...
15523 * src/state.h, src/state.c (state_shifts_set): New.
15524 (shifts): Rename as...
15525 (shifts_t): this.
15526 Adjust all dependencies.
15527 * src/state.h (state_t): Remove the `next' member.
15528
15529 2002-06-30 Akim Demaille <akim@epita.fr>
15530
15531 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15532 escaped in slot 0.
15533
15534 2002-06-30 Akim Demaille <akim@epita.fr>
15535
15536 Use hash.h for the state hash table.
15537
15538 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15539 (allocate_storage): Use state_hash_new.
15540 (free_storage): Use state_hash_free.
15541 (new_state, get_state): Adjust.
15542 * src/lalr.h, src/lalr.c (states): Move to...
15543 * src/states.h (state_t): Remove the `link' member, no longer
15544 used.
15545 * src/states.h, src/states.c: here.
15546 (state_hash_new, state_hash_free, state_hash_lookup)
15547 (state_hash_insert, states_free): New.
15548 * src/states.c (state_table, state_compare, state_hash): New.
15549 * src/output.c (output_actions): Do not free states now, since we
15550 still need to know the final_state number in `prepare', called
15551 afterwards. Do it...
15552 * src/main.c (main): here: call states_free after `output'.
15553
15554 2002-06-30 Akim Demaille <akim@epita.fr>
15555
15556 * src/state.h, src/state.c (state_new): New, extracted from...
15557 * src/LR0.c (new_state): here.
15558 * src/state.h (STATE_ALLOC): Move to...
15559 * src/state.c: here.
15560 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15561 * src/state.h, src/state.c: here.
15562
15563 2002-06-30 Akim Demaille <akim@epita.fr>
15564
15565 * src/reader.c (gensym): Rename as...
15566 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15567 (getsym): Rename as...
15568 (symbol_get): this.
15569
15570 2002-06-30 Akim Demaille <akim@epita.fr>
15571
15572 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15573 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15574 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15575 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15576
15577 2002-06-30 Akim Demaille <akim@epita.fr>
15578
15579 Make the test suite pass with warnings checked.
15580
15581 * tests/actions.at (Printers and Destructors): Improve.
15582 Avoid unsigned vs. signed issues.
15583 * tests/calc.at: Don't exercise the scanner here, do it...
15584 * tests/input.at (Torturing the Scanner): here.
15585
15586 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15587
15588 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
15589 reorganize first lines parallel to yacc.c.
15590
15591 2002-06-28 Akim Demaille <akim@epita.fr>
15592
15593 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15594 (b4_token_enum, b4_token_defines): New, factored from...
15595 * data/lalr1.cc, data/yacc.c, glr.c: here.
15596
15597 2002-06-28 Akim Demaille <akim@epita.fr>
15598
15599 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15600 unused variables.
15601 * src/output.c (merger_output): static.
15602
15603 2002-06-28 Akim Demaille <akim@epita.fr>
15604
15605 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
15606 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15607 pacify GCC.
15608 * src/output.c (save_row): Initialize all the variables to pacify GCC.
15609
15610 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15611
15612 Accumulated changelog for new GLR parsing features.
15613
15614 * src/conflicts.c (count_total_conflicts): Change name to
15615 conflicts_total_count.
15616 * src/conflicts.h: Ditto.
15617 * src/output.c (token_actions): Use the new name.
15618 (output_conflicts): Change conflp => conflict_list_heads, and
15619 confl => conflict_list for better readability.
15620 * data/glr.c: Use the new names.
15621 * NEWS: Add self to GLR announcement.
15622
15623 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15624
15625 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15626 Akim Demaille.
15627
15628 * data/bison.glr: Change name to glr.c
15629 * data/glr.c: Renamed from bison.glr.
15630 * data/Makefile.am: Add glr.c
15631
15632 * src/getargs.c:
15633
15634 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
15635 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
15636
15637 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15638
15639 * data/bison.glr: Be sure to restore the
15640 current #line when returning to the skeleton contents after having
15641 exposed the input file's #line.
15642
15643 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15644
15645 * data/bison.glr: Bring up to date with changes to bison.simple.
15646
15647 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15648
15649 * data/bison.glr: Correct definitions that use b4_prefix.
15650 Various reformatting.
15651 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
15652 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
15653 yytokenp argument; now part of stack.
15654 (yychar): Define to behave as documented.
15655 (yyclearin): Ditto.
15656
15657 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15658
15659 * src/reader.h: Add declaration for free_merger_functions.
15660
15661 * src/reader.c (merge_functions): New variable.
15662 (get_merge_function): New function.
15663 (free_merger_functions): New function.
15664 (readgram): Check for %prec that is not followed by a symbol.
15665 Handle %dprec and %merge declarations.
15666 (packgram): Initialize dprec and merger fields in rules array.
15667
15668 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
15669 conflict_list_cnt, conflict_list_free): New variables.
15670 (table_grow): Also grow conflict_table.
15671 (prepare_rules): Output dprec and merger tables.
15672 (conflict_row): New function.
15673 (action_row): Output conflict lists for GLR parser. Don't use
15674 default reduction in conflicted states for GLR parser so that there
15675 are spaces for the conflict lists.
15676 (save_row): Also save conflict information.
15677 (token_actions): Allocate conflict list.
15678 (merger_output): New function.
15679 (pack_vector): Pack conflict table, too.
15680 (output_conflicts): New function to output yyconflp and yyconfl.
15681 (output_check): Allocate conflict_tos.
15682 (output_actions): Output conflict tables, also.
15683 (output_skeleton): Output b4_mergers definition.
15684 (prepare): Output b4_max_rhs_length definition.
15685 Use 'bison.glr' as default skeleton for GLR parsers.
15686
15687 * src/gram.c (glr_parser): New flag.
15688 (grammar_free): Call free_merger_functions.
15689
15690 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
15691 all pairs of conflicting reductions, rather than just all tokens
15692 causing conflicts. Needed to size conflict tables.
15693 (conflicts_output): Modify call to count_rr_conflicts for new
15694 interface.
15695 (conflicts_print): Ditto.
15696 (count_total_conflicts): New function.
15697
15698 * src/reader.h (merger_list): New type.
15699 (merge_functions): New variable.
15700
15701 * src/lex.h (tok_dprec, tok_merge): New token types.
15702
15703 * src/gram.h (rule_s): Add dprec and merger fields.
15704 (glr_parser): New flag.
15705
15706 * src/conflicts.h (count_total_conflicts): New function.
15707
15708 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
15709
15710 * doc/bison.texinfo (Generalized LR Parsing): New section.
15711 (GLR Parsers): New section.
15712 (Language and Grammar): Mention GLR parsing.
15713 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
15714 Correct typo ("tge" -> "the").
15715
15716 * data/bison.glr: New skeleton for GLR parsing.
15717
15718 * tests/cxx-gram.at: New tests for GLR parsing.
15719
15720 * tests/testsuite.at: Include cxx-gram.at.
15721
15722 * tests/Makefile.am: Add cxx-gram.at.
15723
15724 * src/parse-gram.y:
15725
15726 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
15727
15728 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
15729
15730 2002-06-27 Akim Demaille <akim@epita.fr>
15731
15732 * src/options.h, src/options.c: Remove.
15733 * src/getargs.c (short_options, long_options): New.
15734
15735 2002-06-27 Akim Demaille <akim@epita.fr>
15736
15737 * data/bison.simple, data/bison.c++: Rename as...
15738 * data/yacc.c, data/lalr1.cc: these.
15739 * doc/bison.texinfo (Environment Variables): Remove.
15740
15741 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
15742
15743 * src/getargs.c (report_argmatch): Initialize strtok().
15744
15745 2002-06-20 Akim Demaille <akim@epita.fr>
15746
15747 * data/bison.simple (b4_symbol_actions): New, replaces...
15748 (b4_symbol_destructor, b4_symbol_printer): these.
15749 (yysymprint): Be sure to call YYPRINT only for tokens, and using
15750 user token numbers.
15751
15752 2002-06-20 Akim Demaille <akim@epita.fr>
15753
15754 * data/bison.simple (yydestructor): Rename as...
15755 (yydestruct): this.
15756
15757 2002-06-20 Akim Demaille <akim@epita.fr>
15758
15759 * src/symtab.h, src/symtab.c (symbol_type_set)
15760 (symbol_destructor_set, symbol_precedence_set): The location is
15761 the last argument.
15762 Adjust all callers.
15763
15764 2002-06-20 Akim Demaille <akim@epita.fr>
15765
15766 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
15767 internals.
15768 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
15769 Takes a location.
15770 * src/symtab.h, src/symtab.c (symbol_class_set)
15771 (symbol_user_token_number_set): Likewise.
15772 Adjust all callers.
15773 Promote complain_at.
15774 * tests/input.at (Type Clashes): Adjust.
15775
15776 2002-06-20 Akim Demaille <akim@epita.fr>
15777
15778 * data/bison.simple (YYLEX): Fix the declaration when
15779 %pure-parser.
15780
15781 2002-06-20 Akim Demaille <akim@epita.fr>
15782
15783 * data/bison.simple (yysymprint): Don't print the token number,
15784 just its name.
15785 * tests/actions.at (Destructors): Rename as...
15786 (Printers and Destructors): this.
15787 Also exercise %printer.
15788
15789 2002-06-20 Akim Demaille <akim@epita.fr>
15790
15791 * data/bison.simple (YYDSYMPRINT): New.
15792 Use it to remove many of the #if YYDEBUG/if (yydebug).
15793
15794 2002-06-20 Akim Demaille <akim@epita.fr>
15795
15796 * src/symtab.h, src/symtab.c (symbol_t): printer and
15797 printer_location are new members.
15798 (symbol_printer_set): New.
15799 * src/parse-gram.y (PERCENT_PRINTER): New token.
15800 Handle its associated rule.
15801 * src/scan-gram.l: Adjust.
15802 (handle_destructor_at, handle_destructor_dollar): Rename as...
15803 (handle_symbol_code_at, handle_symbol_code_dollar): these.
15804 * src/output.c (symbol_printers_output): New.
15805 (output_skeleton): Call it.
15806 * data/bison.simple (yysymprint): New. Cannot be named yyprint
15807 since there are already many grammar files with a user `yyprint'.
15808 Replace the calls to YYPRINT to calls to yysymprint.
15809 * tests/calc.at: Adjust.
15810 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
15811 taking advantage of parser very internal details (stack size!).
15812
15813 2002-06-20 Akim Demaille <akim@epita.fr>
15814
15815 * src/scan-gram.l: Complete the scanner with the missing patterns
15816 to pacify Flex.
15817 Use `quote' and `symbol_tag_get' where appropriate.
15818
15819 2002-06-19 Akim Demaille <akim@epita.fr>
15820
15821 * tests/actions.at (Destructors): Augment to test locations.
15822 * data/bison.simple (yydestructor): Pass it the current location
15823 if locations are enabled.
15824 Prototype only when __STDC__ or C++.
15825 Change the argument names to move into the yy name space: there is
15826 user code here.
15827
15828 2002-06-19 Akim Demaille <akim@epita.fr>
15829
15830 * data/bison.simple (b4_pure_if): New.
15831 Use it instead of #ifdef YYPURE.
15832
15833 2002-06-19 Akim Demaille <akim@epita.fr>
15834
15835 * data/bison.simple (b4_location_if): New.
15836 Use it instead of #ifdef YYLSP_NEEDED.
15837
15838 2002-06-19 Akim Demaille <akim@epita.fr>
15839
15840 Prepare @$ in %destructor, but currently don't bind it in the
15841 skeleton, as %location use is not cleaned up yet.
15842
15843 * src/scan-gram.l (handle_dollar, handle_destructor_at)
15844 (handle_action_at): New.
15845 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
15846 a braced_code_t and a location as additional arguments.
15847 (handle_destructor_dollar): Instead of requiring `b4_eval', just
15848 unquote one when outputting `b4_dollar_dollar'.
15849 Adjust callers.
15850 * data/bison.simple (b4_eval): Remove.
15851 (b4_symbol_destructor): Adjust.
15852 * tests/input.at (Invalid @n): Adjust.
15853
15854 2002-06-19 Zack Weinberg <zack@codesourcery.com>
15855
15856 * doc/bison.texinfo: Document ability to have multiple
15857 prologue sections.
15858
15859 2002-06-18 Akim Demaille <akim@epita.fr>
15860
15861 * src/files.c (compute_base_names): When computing the output file
15862 names from the input file name, strip the directory part.
15863
15864 2002-06-18 Akim Demaille <akim@epita.fr>
15865
15866 * data/bison.simple.new: Comment changes.
15867 Reported by Andreas Schwab.
15868
15869 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
15870
15871 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
15872 there are no `label `yyoverflowlab' defined but not used' warnings
15873 when yyoverflow is defined.
15874
15875 2002-06-18 Akim Demaille <akim@epita.fr>
15876
15877 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
15878 new member.
15879 (symbol_destructor_set): Adjust.
15880 * src/output.c (symbol_destructors_output): Output the destructor
15881 locations.
15882 Output the symbol name.
15883 * data/bison.simple (b4_symbol_destructor): Adjust.
15884
15885 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
15886 and Akim Demaille <akim@epita.fr>
15887
15888 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
15889 what's left on the stack when the error recovery hits EOF.
15890 * tests/actions.at (Destructors): Complete to exercise this case.
15891
15892 2002-06-17 Akim Demaille <akim@epita.fr>
15893
15894 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
15895 arguments is really empty, not only equal to `[]'.
15896 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
15897 member.
15898 (symbol_destructor_set): New.
15899 * src/output.c (symbol_destructors_output): New.
15900 * src/reader.h (brace_code_t, current_braced_code): New.
15901 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
15902 (handle_dollar): Rename as...
15903 (handle_action_dollar): this.
15904 (handle_destructor_dollar): New.
15905 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
15906 (grammar_declaration): Use it.
15907 * data/bison.simple (yystos): Is always defined.
15908 (yydestructor): New.
15909 * tests/actions.at (Destructors): New.
15910 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
15911
15912 2002-06-17 Akim Demaille <akim@epita.fr>
15913
15914 * src/symlist.h, src/symlist.c (symbol_list_length): New.
15915 * src/scan-gram.l (handle_dollar, handle_at): Compute the
15916 rule_length only when needed.
15917 * src/output.c (actions_output, token_definitions_output): Output
15918 the full M4 block.
15919 * src/symtab.c: Don't access directly to the symbol tag, use
15920 symbol_tag_get.
15921 * src/parse-gram.y: Use symbol_list_free.
15922
15923 2002-06-17 Akim Demaille <akim@epita.fr>
15924
15925 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
15926 (symbol_list_prepend, get_type_name): Move to...
15927 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
15928 (symbol_list_prepend, symbol_list_n_type_name_get): here.
15929 Adjust all callers.
15930 (symbol_list_free): New.
15931 * src/scan-gram.l (handle_dollar): Takes a location.
15932 * tests/input.at (Invalid $n): Adjust.
15933
15934 2002-06-17 Akim Demaille <akim@epita.fr>
15935
15936 * src/reader.h, src/reader.c (symbol_list_new): Export it.
15937 (symbol_list_prepend): New.
15938 * src/parse-gram.y (%union): `list' is a new member.
15939 (symbols.1): New, replaces...
15940 (terms_to_prec.1, nterms_to_type.1): these.
15941 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
15942 Take a location as additional argument.
15943 Adjust all callers.
15944
15945 2002-06-15 Akim Demaille <akim@epita.fr>
15946
15947 * src/parse-gram.y: Move %token in the declaration section so that
15948 we don't depend upon CVS Bison.
15949
15950 2002-06-15 Akim Demaille <akim@epita.fr>
15951
15952 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
15953 * src/print.c (print_core): Use it.
15954
15955 2002-06-15 Akim Demaille <akim@epita.fr>
15956
15957 * src/conflicts.c (log_resolution): Accept the rule involved in
15958 the sr conflicts instead of the lookahead number that points to
15959 that rule.
15960 (flush_reduce): Accept the current lookahead vector as argument,
15961 instead of the index in LA.
15962 (resolve_sr_conflict): Accept the current number of lookahead
15963 bitset to consider for the STATE, instead of the index in LA.
15964 (set_conflicts): Adjust.
15965 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
15966
15967 2002-06-15 Akim Demaille <akim@epita.fr>
15968
15969 * src/state.h (state_t): Replace the `lookaheadsp' member, a
15970 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
15971 Adjust all dependencies.
15972 * src/lalr.c (initialize_lookaheads): Split into...
15973 (states_lookaheads_count, states_lookaheads_initialize): these.
15974 (lalr): Adjust.
15975
15976 2002-06-15 Akim Demaille <akim@epita.fr>
15977
15978 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
15979 out of...
15980 (grammar_rules_print): here.
15981 * src/reduce.c (reduce_output): Use it.
15982 * tests/reduce.at (Useless Rules, Reduced Automaton)
15983 (Underivable Rules): Adjust.
15984
15985 2002-06-15 Akim Demaille <akim@epita.fr>
15986
15987 Copy BYacc's nice way to report the grammar.
15988
15989 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
15990 New.
15991 Don't print the rules' location, it is confusing and useless.
15992 (rule_print): Use grammar_rhs_print.
15993 * src/print.c (print_grammar): Use grammar_rules_print.
15994
15995 2002-06-15 Akim Demaille <akim@epita.fr>
15996
15997 Complete and rationalize `useless thing' warnings.
15998
15999 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16000 (symbol_tag_print): New.
16001 Use them everywhere in place of accessing directly the tag member.
16002 * src/gram.h, src/gram.c (rule_print): New.
16003 Use it where a rule used to be printed `by hand'.
16004 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16005 (reduce_grammar_tables): Report the useless rules.
16006 (reduce_print): Useless things are a warning, not an error.
16007 Report it as such.
16008 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16009 (Reduced Automaton, Underivable Rules): Adjust.
16010 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16011 * tests/conflicts.at (Unresolved SR Conflicts)
16012 (Solved SR Conflicts): Adjust.
16013
16014 2002-06-15 Akim Demaille <akim@epita.fr>
16015
16016 Let symbols have a location.
16017
16018 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16019 (getsym): Adjust.
16020 Adjust all callers.
16021 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16022 Use location_t, not int.
16023 * src/symtab.c (symbol_check_defined): Take advantage of the
16024 location.
16025 * tests/regression.at (Invalid inputs): Adjust.
16026
16027 2002-06-15 Akim Demaille <akim@epita.fr>
16028
16029 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16030 (input): Don't try to initialize yylloc here, do it in the
16031 scanner.
16032 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16033 * src/gram.h (rule_t): Change line and action_line into location
16034 and action_location, of location_t type.
16035 Adjust all dependencies.
16036 * src/location.h, src/location.c (empty_location): New.
16037 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16038 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16039 (grammar_current_rule_symbol_append)
16040 (grammar_current_rule_action_append): Expect a location as argument.
16041 * src/reader.c (grammar_midrule_action): Adjust to attach an
16042 action's location as dummy symbol location.
16043 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16044 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16045 the line numbers.
16046
16047 2002-06-14 Akim Demaille <akim@epita.fr>
16048
16049 Grammar declarations may be found in the grammar section.
16050
16051 * src/parse-gram.y (rules_or_grammar_declaration): New.
16052 (declarations): Each declaration may end with a semicolon, not
16053 just...
16054 (grammar_declaration): `"%union"'.
16055 (grammar): Branch to rules_or_grammar_declaration.
16056
16057 2002-06-14 Akim Demaille <akim@epita.fr>
16058
16059 * src/main.c (main): Invoke scanner_free.
16060
16061 2002-06-14 Akim Demaille <akim@epita.fr>
16062
16063 * src/output.c (m4_invoke): Extracted from...
16064 (output_skeleton): here.
16065 Free tempfile.
16066
16067 2002-06-14 Akim Demaille <akim@epita.fr>
16068
16069 * src/parse-gram.y (directives, directive, gram)
16070 (grammar_directives, precedence_directives, precedence_directive):
16071 Rename as...
16072 (declarations, declaration, grammar, grammar_declaration)
16073 (precedence_declaration, precedence_declarator): these.
16074 (symbol_declaration): New.
16075
16076 2002-06-14 Akim Demaille <akim@epita.fr>
16077
16078 * src/files.c (action_obstack): Remove, unused.
16079 (output_obstack): Remove it, and all its dependencies, as it is no
16080 longer needed.
16081 * src/reader.c (epilogue_set): Build the epilogue in the
16082 muscle_obstack.
16083 * src/output.h, src/output.c (muscle_obstack): Move to...
16084 * src/muscle_tab.h, src/muscle_tab.h: here.
16085 (muscle_init): Initialize muscle_obstack.
16086 (muscle_free): New.
16087 * src/main.c (main): Call it.
16088
16089 2002-06-14 Akim Demaille <akim@epita.fr>
16090
16091 * src/location.h: New, extracted from...
16092 * src/reader.h: here.
16093 * src/Makefile.am (noinst_HEADERS): Merge into
16094 (bison_SOURCES): this.
16095 Add location.h.
16096 * src/parse-gram.y: Use location_t instead of Bison's.
16097 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16098 Use location_t instead of ints.
16099
16100 2002-06-14 Akim Demaille <akim@epita.fr>
16101
16102 * data/bison.simple, data/bison.c++: Be sure to restore the
16103 current #line when returning to the skeleton contents after having
16104 exposed the input file's #line.
16105
16106 2002-06-12 Akim Demaille <akim@epita.fr>
16107
16108 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16109 eager.
16110 * tests/actions.at (Exotic Dollars): New.
16111
16112 2002-06-12 Akim Demaille <akim@epita.fr>
16113
16114 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16115 ['"/] too eagerly.
16116 * tests/input.at (Torturing the Scanner): New.
16117
16118 2002-06-11 Akim Demaille <akim@epita.fr>
16119
16120 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16121 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16122 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16123 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16124 * src/reader.c (reader): Use it.
16125
16126 2002-06-11 Akim Demaille <akim@epita.fr>
16127
16128 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16129 Adjust all callers.
16130 (scanner_last_string_free): New.
16131
16132 2002-06-11 Akim Demaille <akim@epita.fr>
16133
16134 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16135 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16136 (last_string, YY_OBS_FREE): New.
16137 Use them when returning an ID.
16138
16139 2002-06-11 Akim Demaille <akim@epita.fr>
16140
16141 Have Bison grammars parsed by a Bison grammar.
16142
16143 * src/reader.c, src/reader.h (prologue_augment): New.
16144 * src/reader.c (copy_definition): Remove.
16145
16146 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16147 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16148 (grammar_current_rule_prec_set, grammar_current_rule_check)
16149 (grammar_current_rule_symbol_append)
16150 (grammar_current_rule_action_append): Export.
16151 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16152 (symbol_list_action_append): Remove.
16153 Hook the routines from reader.
16154 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16155 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16156
16157 * src/reader.c (read_declarations): Remove, unused.
16158
16159 * src/parse-gram.y: Handle the epilogue.
16160 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16161 (grammar_start_symbol_set): this.
16162 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16163 * src/reader.c (readgram): Remove, unused.
16164 (reader): Adjust to insert eoftoken and axiom where appropriate.
16165
16166 * src/reader.c (copy_dollar): Replace with...
16167 * src/scan-gram.h (handle_dollar): this.
16168 * src/parse-gram.y: Remove `%thong'.
16169
16170 * src/reader.c (copy_at): Replace with...
16171 * src/scan-gram.h (handle_at): this.
16172
16173 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16174 New.
16175
16176 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16177 time being.
16178
16179 * src/reader.h, src/reader.c (grammar_rule_end): New.
16180
16181 * src/parse.y (current_type, current_class): New.
16182 Implement `%nterm', `%token' support.
16183 Merge `%term' into `%token'.
16184 (string_as_id): New.
16185 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16186 type name.
16187
16188 * src/parse-gram.y: Be sure to handle properly the beginning of
16189 rules.
16190
16191 * src/parse-gram.y: Handle %type.
16192 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16193
16194 * src/parse-gram.y: More directives support.
16195 * src/options.c: No longer handle source directives.
16196
16197 * src/parse-gram.y: Fix %output.
16198
16199 * src/parse-gram.y: Handle %union.
16200 Use the prologue locations.
16201 * src/reader.c (parse_union_decl): Remove.
16202
16203 * src/reader.h, src/reader.c (epilogue_set): New.
16204 * src/parse-gram.y: Use it.
16205
16206 * data/bison.simple, data/bison.c++: b4_stype is now either not
16207 defined, then default to int, or to the contents of %union,
16208 without `union' itself.
16209 Adjust.
16210 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16211
16212 * src/output.c (actions_output): Don't output braces, as they are
16213 already handled by the scanner.
16214
16215 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16216 characters to themselves.
16217
16218 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16219 that the epilogue has a proper #line.
16220
16221 * src/parse-gram.y: Handle precedence/associativity.
16222
16223 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16224 a terminal.
16225 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16226 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16227 at all to define terminals that cannot be emitted.
16228
16229 * src/scan-gram.l: Escape M4 characters.
16230
16231 * src/scan-gram.l: Working properly with escapes in user
16232 strings/characters.
16233
16234 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16235 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16236 grammar.
16237 Use more modest sizes, as for the time being the parser does not
16238 release memory, and therefore the process swallows a huge amount
16239 of memory.
16240
16241 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16242 stricter %token grammar.
16243
16244 * src/symtab.h (associativity): Add `undef_assoc'.
16245 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16246 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16247
16248 * tests/regression.at (Invalid %directive): Remove, as it is now
16249 meaningless.
16250 (Invalid inputs): Adjust to the new error messages.
16251 (Token definitions): The new grammar doesn't allow too many
16252 eccentricities.
16253
16254 * src/lex.h, src/lex.c: Remove.
16255 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16256 (copy_character, copy_string2, copy_string, copy_identifier)
16257 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16258 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16259 (parse_action): Remove.
16260 * po/POTFILES.in: Adjust.
16261
16262 2002-06-11 Akim Demaille <akim@epita.fr>
16263
16264 * src/reader.c (parse_action): Don't store directly into the
16265 rule's action member: return the action as a string.
16266 Don't require `rule_length' as an argument: compute it.
16267 (grammar_current_rule_symbol_append)
16268 (grammar_current_rule_action_append): New, eved out from
16269 (readgram): here.
16270 Remove `action_flag', `rulelength', unused now.
16271
16272 2002-06-11 Akim Demaille <akim@epita.fr>
16273
16274 * src/reader.c (grammar_current_rule_prec_set).
16275 (grammar_current_rule_check): New, eved out from...
16276 (readgram): here.
16277 Remove `xaction', `first_rhs': useless.
16278 * tests/input.at (Type clashes): New.
16279 * tests/existing.at (GNU Cim Grammar): Adjust.
16280
16281 2002-06-11 Akim Demaille <akim@epita.fr>
16282
16283 * src/reader.c (grammar_midrule_action): New, Eved out from
16284 (readgram): here.
16285
16286 2002-06-11 Akim Demaille <akim@epita.fr>
16287
16288 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16289 New.
16290 (readgram): Use them as replacement of inlined code, crule and
16291 crule1.
16292
16293 2002-06-11 Akim Demaille <akim@epita.fr>
16294
16295 * src/reader.c (grammar_end, grammar_symbol_append): New.
16296 (readgram): Use them.
16297 Make the use of `p' as local as possible.
16298
16299 2002-06-10 Akim Demaille <akim@epita.fr>
16300
16301 GCJ's parser requires the tokens to be defined before the prologue.
16302
16303 * data/bison.simple: Output the token definition before the user's
16304 prologue.
16305 * tests/regression.at (Braces parsing, Duplicate string)
16306 (Mixing %token styles): Check the output from bison.
16307 (Early token definitions): New.
16308
16309 2002-06-10 Akim Demaille <akim@epita.fr>
16310
16311 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16312 assigning twice the same user number to a token, so that we can
16313 use it in...
16314 * src/lex.c (lex): here.
16315 Also use `symbol_class_set' instead of hand written code.
16316 * src/reader.c (parse_assoc_decl): Likewise.
16317
16318 2002-06-10 Akim Demaille <akim@epita.fr>
16319
16320 * src/symtab.c, src/symtab.c (symbol_class_set)
16321 (symbol_user_token_number_set): New.
16322 * src/reader.c (parse_token_decl): Use them.
16323 Use a switch instead of ifs.
16324 Use a single argument.
16325
16326 2002-06-10 Akim Demaille <akim@epita.fr>
16327
16328 Remove `%thong' support as it is undocumented, unused, duplicates
16329 `%token's job, and creates useless e-mail traffic with people who
16330 want to know what it is, why it is undocumented, unused, and
16331 duplicates `%token's job.
16332
16333 * src/reader.c (parse_thong_decl): Remove.
16334 * src/options.c (option_table): Remove "thong".
16335 * src/lex.h (tok_thong): Remove.
16336
16337 2002-06-10 Akim Demaille <akim@epita.fr>
16338
16339 * src/symtab.c, src/symtab.c (symbol_type_set)
16340 (symbol_precedence_set): New.
16341 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16342 (value_components_used): Remove, unused.
16343
16344 2002-06-09 Akim Demaille <akim@epita.fr>
16345
16346 Move symbols handling code out of the reader.
16347
16348 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16349 (axiom): Move to...
16350 * src/symtab.h, src/symtab.c: here.
16351
16352 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16353 * src/reader.c (startval): Rename as...
16354 * src/symtab.h, src/symtab.c (startsymbol): this.
16355 * src/reader.c: Adjust.
16356
16357 * src/reader.c (symbol_check_defined, symbol_make_alias)
16358 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16359 (token_translations_init)
16360 Move to...
16361 * src/symtab.c: here.
16362 * src/reader.c (packsymbols): Move to...
16363 * src/symtab.h, src/symtab.c (symbols_pack): here.
16364 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16365 argument.
16366
16367 2002-06-03 Akim Demaille <akim@epita.fr>
16368
16369 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16370 then statements.
16371
16372 2002-06-03 Akim Demaille <akim@epita.fr>
16373
16374 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16375 structs with non literals.
16376 * src/scan-skel.l: never-interactive.
16377 * src/conflicts.c (enum conflict_resolution_e): No trailing
16378 comma.
16379 * src/getargs.c (usage): Split long literal strings.
16380 Reported by Hans Aberg.
16381
16382 2002-05-28 Akim Demaille <akim@epita.fr>
16383
16384 * data/bison.c++: Use C++ ostreams.
16385 (cdebug_): New member.
16386
16387 2002-05-28 Akim Demaille <akim@epita.fr>
16388
16389 * src/output.c (output_skeleton): Be sure to allocate enough room
16390 for `/' _and_ for `\0' in full_skeleton.
16391
16392 2002-05-28 Akim Demaille <akim@epita.fr>
16393
16394 * data/bison.c++: Catch up with bison.simple:
16395 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16396 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16397 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16398 and popping traces.
16399
16400 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16401
16402 * src/output.c (output_skeleton): Put an explicit path in front of
16403 the skeleton file name, rather than relying on the -I directory,
16404 to partially alleviate effects of having a skeleton file lying around
16405 in the current directory.
16406
16407 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16408
16409 * src/conflicts.c (log_resolution): Correct typo:
16410 obstack_printf should be obstack_fgrow1.
16411
16412 2002-05-26 Akim Demaille <akim@epita.fr>
16413
16414 * src/state.h (state_t): `solved_conflicts' is a new member.
16415 * src/LR0.c (new_state): Set it to 0.
16416 * src/conflicts.h, src/conflicts.c (print_conflicts)
16417 (free_conflicts, solve_conflicts): Rename as...
16418 (conflicts_print, conflicts_free, conflicts_solve): these.
16419 Adjust callers.
16420 * src/conflicts.c (enum conflict_resolution_e)
16421 (solved_conflicts_obstack): New, used by...
16422 (log_resolution): this.
16423 Adjust to attach the conflict resolution to each state.
16424 Complete the description with the precedence/associativity
16425 information.
16426 (resolve_sr_conflict): Adjust.
16427 * src/print.c (print_state): Output its solved_conflicts.
16428 * tests/conflicts.at (Unresolved SR Conflicts)
16429 (Solved SR Conflicts): Exercise --report=all.
16430
16431 2002-05-26 Akim Demaille <akim@epita.fr>
16432
16433 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16434 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16435 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16436 (token_number_t, item_number_as_token_number)
16437 (token_number_as_item_number, muscle_insert_token_number_table):
16438 Rename as...
16439 (symbol_number_t, item_number_as_symbol_number)
16440 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16441 these, since it is more appropriate.
16442
16443 2002-05-26 Akim Demaille <akim@epita.fr>
16444
16445 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16446 `Error:' lines.
16447 * data/bison.simple (yystos) [YYDEBUG]: New.
16448 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16449 error recovery.
16450 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16451
16452 2002-05-25 Akim Demaille <akim@epita.fr>
16453
16454 * doc/bison.texinfo (Debugging): Split into...
16455 (Tracing): this new section, its former contents, and...
16456 (Understanding): this new section.
16457 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16458 by...
16459 (report_flag): this.
16460 Adjust all dependencies.
16461 (report_args, report_types, report_argmatch): New.
16462 (usage, getargs): Report/support -r, --report.
16463 * src/options.h
16464 (struct option_table_struct): Rename as..,
16465 (struct option_table_s): this.
16466 Rename the `set_flag' member to `flag' to match with getopt_long's
16467 struct.
16468 * src/options.c (option_table): Split verbose into an entry for
16469 %verbose, and another for --verbose.
16470 Support --report/-r, so remove -r from the obsolete --raw.
16471 * src/print.c: Attach full item sets and lookaheads reports to
16472 report_flag instead of trace_flag.
16473 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16474
16475 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16476 and Paul Eggert <eggert@twinsun.com>
16477
16478 * data/bison.simple (yyparse): Correct error handling to conform to
16479 POSIX and yacc. Specifically, after syntax error is discovered,
16480 do not reduce further before shifting the error token.
16481 Clean up the code a bit by removing the labels yyerrdefault,
16482 yyerrhandle, yyerrpop.
16483 * NEWS: Document the above.
16484
16485 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16486
16487 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16488 type; it isn't always big enough, since it doesn't necessarily
16489 include non-terminals.
16490 (yytranslate): Expand definition of yy_token_number_type, so that
16491 the latter can be removed.
16492 (yy_token_number_type): Remove, only one use.
16493 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16494 don't use TokenNumberType as element type.
16495
16496 * tests/regression.at: Modify expected output to agree with change
16497 to yyr1 and yytranslate.
16498
16499 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16500
16501 * src/reader.c (parse_action): Use copy_character instead of
16502 obstack_1grow.
16503
16504 2002-05-13 Akim Demaille <akim@epita.fr>
16505
16506 * tests/regression.at (Token definitions): Prototype yylex and
16507 yyerror.
16508
16509 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16510
16511 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
16512 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16513 32-bit arithmetic.
16514 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16515
16516 2002-05-07 Akim Demaille <akim@epita.fr>
16517
16518 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16519 avoid GCC warnings.
16520
16521 2002-05-07 Akim Demaille <akim@epita.fr>
16522
16523 Kill GCC warnings.
16524
16525 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16526 over the RHS of each rule.
16527 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16528 * src/state.h (state_t): Member `nitems' is unsigned short.
16529 * src/LR0.c (get_state): Adjust.
16530 * src/reader.c (packgram): Likewise.
16531 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16532 `Type'.
16533 (muscle_insert_int_table): Remove, unused.
16534 (prepare_rules): Remove `max'.
16535
16536 2002-05-06 Akim Demaille <akim@epita.fr>
16537
16538 * src/closure.c (print_firsts): Display of the symbol tags.
16539 (bitmatrix_print): Move to...
16540 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16541 here.
16542 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16543
16544 2002-05-06 Akim Demaille <akim@epita.fr>
16545
16546 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16547 hash_do_for_each.
16548
16549 2002-05-06 Akim Demaille <akim@epita.fr>
16550
16551 * src/LR0.c (new_state, get_state): Instead of using the global
16552 `kernel_size' and `kernel_base', have two new arguments:
16553 `core_size' and `core'.
16554 Adjust callers.
16555
16556 2002-05-06 Akim Demaille <akim@epita.fr>
16557
16558 * src/reader.c (packgram): No longer end `ritem' with a 0
16559 sentinel: it is not used.
16560
16561 2002-05-05 Akim Demaille <akim@epita.fr>
16562
16563 New experimental feature: display the lookaheads in the report and
16564 graph.
16565
16566 * src/print (print_core): When --trace-flag, display the rules
16567 lookaheads.
16568 * src/print_graph.c (print_core): Likewise.
16569 Swap the arguments.
16570 Adjust caller.
16571
16572 2002-05-05 Akim Demaille <akim@epita.fr>
16573
16574 * tests/torture.at (Many lookaheads): New test.
16575
16576 2002-05-05 Akim Demaille <akim@epita.fr>
16577
16578 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16579 (GENERATE_MUSCLE_INSERT_TABLE): this.
16580 (output_int_table, output_unsigned_int_table, output_short_table)
16581 (output_token_number_table, output_item_number_table): Replace with...
16582 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16583 (muscle_insert_short_table, muscle_insert_token_number_table)
16584 (muscle_insert_item_number_table): these.
16585 Adjust all callers.
16586 (prepare_tokens): Don't free `translations', since...
16587 * src/reader.h, src/reader.c (grammar_free): do it.
16588 Move to...
16589 * src/gram.h, src/gram.c (grammar_free): here.
16590 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16591 b4_translate_max.
16592
16593 2002-05-05 Akim Demaille <akim@epita.fr>
16594
16595 * src/output.c (output_unsigned_int_table): New.
16596 (prepare_rules): `i' is unsigned.
16597 `prhs', `rline', `r2' are unsigned int.
16598 Rename muscle `rhs_number_max' as `rhs_max'.
16599 Output muscles `prhs_max', `rline_max', and `r2_max'.
16600 Free rline and r1.
16601 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16602 to compute types instead of constant types.
16603 * tests/regression.at (Web2c Actions): Adjust.
16604
16605 2002-05-04 Akim Demaille <akim@epita.fr>
16606
16607 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16608 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16609 Adjust dependencies.
16610 * src/output.c (token_definitions_output): Be sure not to output a
16611 `#define 'a'' when fed with `%token 'a' "a"'.
16612 * tests/regression.at (Token definitions): New.
16613
16614 2002-05-03 Paul Eggert <eggert@twinsun.com>
16615
16616 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16617 for K&R C.
16618
16619 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16620
16621 * Makefile.am (SUBDIRS): Remove intl.
16622 (EXTRA_DIST): Add config/config.rpath.
16623
16624 2002-05-03 Akim Demaille <akim@epita.fr>
16625
16626 * data/bison.simple (m4_if): Don't output empty enums.
16627 And actually, output valid enum definitions :(.
16628
16629 2002-05-03 Akim Demaille <akim@epita.fr>
16630
16631 * configure.bat: Remove, completely obsolete.
16632 * Makefile.am (EXTRA_DIST): Adjust.
16633 Don't distribute config.rpath...
16634 * config/Makefile.am (EXTRA_DIST): Do it.
16635
16636 2002-05-03 Akim Demaille <akim@epita.fr>
16637
16638 * configure.in (GETTEXT_VERSION): New.
16639 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16640
16641 2002-05-03 Akim Demaille <akim@epita.fr>
16642
16643 * data/bison.simple (b4_token_enum): New.
16644 (b4_token_defines): Use it to output tokens both as #define and
16645 enums.
16646 Suggested by Paul Eggert.
16647 * src/output.c (token_definitions_output): Don't output spurious
16648 white spaces.
16649
16650 2002-05-03 Akim Demaille <akim@epita.fr>
16651
16652 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16653
16654 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
16655
16656 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
16657 Update the stack class, give a try to deque as the default container.
16658
16659 2002-05-02 Akim Demaille <akim@epita.fr>
16660
16661 * data/bison.simple (yyparse): Do not implement @$ = @1.
16662 (YYLLOC_DEFAULT): Adjust to do it.
16663 * doc/bison.texinfo (Location Default Action): Fix.
16664
16665 2002-05-02 Akim Demaille <akim@epita.fr>
16666
16667 * src/reader.c (parse_braces): Merge into...
16668 (parse_action): this.
16669
16670 2002-05-02 Akim Demaille <akim@epita.fr>
16671
16672 * configure.in (ALL_LINGUAS): Remove.
16673 * po/LINGUAS, hr.po: New.
16674
16675 2002-05-02 Akim Demaille <akim@epita.fr>
16676
16677 Remove the so called hairy (semantic) parsers.
16678
16679 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
16680 * src/gram.h, src/gram.c (semantic_parser): Remove.
16681 (rule_t): Remove the guard and guard_line members.
16682 * src/lex.h (token_t): remove tok_guard.
16683 * src/options.c (option_table): Remove %guard and %semantic_parser
16684 support.
16685 * src/output.c, src/output.h (guards_output): Remove.
16686 (prepare): Adjust.
16687 (token_definitions_output): Don't output the `T'
16688 tokens (???).
16689 (output_skeleton): Don't output the guards.
16690 * src/files.c, src/files.c (attrsfile): Remove.
16691 * src/reader.c (symbol_list): Remove the guard and guard_line
16692 members.
16693 Adjust dependencies.
16694 (parse_guard): Remove.
16695 * data/bison.hairy: Remove.
16696 * doc/bison.texinfo (Environment Variables): Remove occurrences of
16697 BISON_HAIRY.
16698
16699 2002-05-02 Akim Demaille <akim@epita.fr>
16700
16701 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
16702 (parse_guard): Rename the formal argument `stack_offset' as
16703 `rule_length', which is more readable.
16704 Adjust callers.
16705 (copy_at, copy_dollar): Instead of outputting the hard coded
16706 values of $$, $n and so forth, output invocation to b4_lhs_value,
16707 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
16708 Note: this patch partially drops `semantic-parser' support: it
16709 always does `rule_length - n', where semantic parsers ought to
16710 always use `-n'.
16711 * data/bison.simple, data/bison.c++ (b4_lhs_value)
16712 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
16713
16714 2002-05-02 Akim Demaille <akim@epita.fr>
16715
16716 * configure.in (AC_INIT): Bump to 1.49b.
16717 (AM_INIT_AUTOMAKE): Short invocation.
16718
16719 2002-05-02 Akim Demaille <akim@epita.fr>
16720
16721 Version 1.49a.
16722
16723 2002-05-01 Akim Demaille <akim@epita.fr>
16724
16725 * src/skeleton.h: Remove.
16726
16727 2002-05-01 Akim Demaille <akim@epita.fr>
16728
16729 * src/skeleton.h: Fix the #endif.
16730 Reported by Magnus Fromreide.
16731
16732 2002-04-26 Paul Eggert <eggert@twinsun.com>
16733
16734 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
16735 Define if we define YYSTYPE and YYLTYPE, respectively.
16736 (YYCOPY): Fix [] quoting problem in the non-GCC case.
16737
16738 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
16739
16740 * src/scan-skel.l: Postprocess quadrigraphs.
16741
16742 * src/reader.c (copy_character): New function, used to output
16743 single characters while replacing `[' and `]' with quadrigraphs, to
16744 avoid troubles with M4 quotes.
16745 (copy_comment): Output characters with copy_character.
16746 (read_additionnal_code): Likewise.
16747 (copy_string2): Likewise.
16748 (copy_definition): Likewise.
16749
16750 * tests/calc.at: Exercise M4 quoting.
16751
16752 2002-04-25 Akim Demaille <akim@epita.fr>
16753
16754 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
16755 between `!' and the command.
16756 Reported by Paul Eggert.
16757
16758 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
16759
16760 * tests/calc.at: Exercise prologue splitting.
16761
16762 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
16763 `b4_post_prologue' instead of `b4_prologue'.
16764
16765 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
16766 muscles.
16767 (output): Free pre_prologue_obstack and post_prologue_obstack.
16768 * src/files.h, src/files.c (attrs_obstack): Remove.
16769 (pre_prologue_obstack, post_prologue_obstack): New.
16770 * src/reader.c (copy_definition): Add a parameter to specify the
16771 obstack to fill, instead of using attrs_obstack unconditionally.
16772 (read_declarations): Pass pre_prologue_obstack to copy_definition if
16773 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
16774
16775 2002-04-23 Paul Eggert <eggert@twinsun.com>
16776
16777 * data/bison.simple: Remove unnecessary commentary and white
16778 space differences from 1_29-branch.
16779 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
16780
16781 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
16782 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
16783 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
16784 constructors or destructors.
16785
16786 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
16787
16788 2002-04-23 Akim Demaille <akim@epita.fr>
16789
16790 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
16791 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
16792 location with columns.
16793 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
16794 All reported by Paul Eggert.
16795
16796 2002-04-22 Akim Demaille <akim@epita.fr>
16797
16798 * src/reduce.c (dump_grammar): Move to...
16799 * src/gram.h, src/gram.c (grammar_dump): here.
16800 Be sure to separate long item numbers.
16801 Don't read the members of a rule's prec if its nil.
16802
16803 2002-04-22 Akim Demaille <akim@epita.fr>
16804
16805 * src/output.c (table_size, table_grow): New.
16806 (MAXTABLE): Remove, replace uses with table_size.
16807 (pack_vector): Instead of dying when the table is too big, grow it.
16808
16809 2002-04-22 Akim Demaille <akim@epita.fr>
16810
16811 * data/bison.simple (yyr1): Its type is that of a token number.
16812 * data/bison.c++ (r1_): Likewise.
16813 * tests/regression.at (Web2c Actions): Adjust.
16814
16815 2002-04-22 Akim Demaille <akim@epita.fr>
16816
16817 * src/reader.c (token_translations_init): 256 is now the default
16818 value for the error token, i.e., it will be assigned another
16819 number if the user assigned 256 to one of her tokens.
16820 (reader): Don't force 256 to error.
16821 * doc/bison.texinfo (Symbols): Adjust.
16822 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
16823 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
16824 etc. instead of 10, 20, 30 (which was used to `jump' over error
16825 (256) and undefined (2)).
16826
16827 2002-04-22 Akim Demaille <akim@epita.fr>
16828
16829 Propagate more token_number_t.
16830
16831 * src/gram.h (token_number_as_item_number)
16832 (item_number_as_token_number): New.
16833 * src/output.c (GENERATE_OUTPUT_TABLE): New.
16834 Use it to create output_item_number_table and
16835 output_token_number_table.
16836 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16837 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
16838 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
16839 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
16840
16841 2002-04-22 Akim Demaille <akim@epita.fr>
16842
16843 * src/output.h, src/output.c (get_lines_number): Remove.
16844
16845 2002-04-19 Akim Demaille <akim@epita.fr>
16846
16847 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
16848 as Lex/Flex'.
16849 (Debugging): More details about enabling the debugging features.
16850 (Table of Symbols): Describe $$, $n, @$, and @n.
16851 Suggested by Tim Josling.
16852
16853 2002-04-19 Akim Demaille <akim@epita.fr>
16854
16855 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
16856
16857 2002-04-10 Akim Demaille <akim@epita.fr>
16858
16859 * src/system.h: Rely on HAVE_LIMITS_H.
16860 Suggested by Paul Eggert.
16861
16862 2002-04-09 Akim Demaille <akim@epita.fr>
16863
16864 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
16865 full stderr, and strip it according to the bison options, instead
16866 of composing the error message from different bits.
16867 This makes it easier to check for several error messages.
16868 Adjust all the invocations.
16869 Add an invocation exercising the error token.
16870 Add an invocation demonstrating a stupid error message.
16871 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
16872 Adjust the tests.
16873 Error message are for stderr, not stdout.
16874
16875 2002-04-09 Akim Demaille <akim@epita.fr>
16876
16877 * src/gram.h, src/gram.c (error_token_number): Remove, use
16878 errtoken->number.
16879 * src/reader.c (reader): Don't specify the user token number (2)
16880 for $undefined, as it uselessly prevents using it.
16881 * src/gram.h (token_number_t): Move to...
16882 * src/symtab.h: here.
16883 (state_t.number): Is a token_number_t.
16884 * src/print.c, src/reader.c: Use undeftoken->number instead of
16885 hard coded 2.
16886 (Even though this 2 is not the same as above: the number of the
16887 undeftoken remains being 2, it is its user token number which
16888 might not be 2).
16889 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
16890 `user_token_number_max'.
16891 Output `undef_token_number'.
16892 * data/bison.simple, data/bison.c++: Use them.
16893 Be sure to map invalid yylex return values to
16894 `undef_token_number'. This saves us from gratuitous SEGV.
16895
16896 * tests/conflicts.at (Solved SR Conflicts)
16897 (Unresolved SR Conflicts): Adjust.
16898 * tests/regression.at (Web2c Actions): Adjust.
16899
16900 2002-04-08 Akim Demaille <akim@epita.fr>
16901
16902 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
16903 Adding #line.
16904 Remove the duplicate `typedefs'.
16905 (RhsNumberType): Fix the declaration and various other typos.
16906 Use __ofile__.
16907 * data/bison.simple: Use __ofile__.
16908 * src/scan-skel.l: Handle __ofile__.
16909
16910 2002-04-08 Akim Demaille <akim@epita.fr>
16911
16912 * src/gram.h (item_number_t): New, the type of item numbers in
16913 RITEM. Note that it must be able to code symbol numbers as
16914 positive number, and the negation of rule numbers as negative
16915 numbers.
16916 Adjust all dependencies (pretty many).
16917 * src/reduce.c (rule): Remove this `short *' pointer: use
16918 item_number_t.
16919 * src/system.h (MINSHORT, MAXSHORT): Remove.
16920 Include `limits.h'.
16921 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
16922 (shortcpy): Remove.
16923 (MAXTABLE): Move to...
16924 * src/output.c (MAXTABLE): here.
16925 (prepare_rules): Use output_int_table to output rhs.
16926 * data/bison.simple, data/bison.c++: Adjust.
16927 * tests/torture.at (Big triangle): Move the limit from 254 to
16928 500.
16929 * tests/regression.at (Web2c Actions): Ajust.
16930
16931 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
16932 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
16933 passes, but produces negative #line number, once fixed, GCC is
16934 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
16935 C), it passes.
16936 * src/state.h (state_h): Code input lines on ints, not shorts.
16937
16938 2002-04-08 Akim Demaille <akim@epita.fr>
16939
16940 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
16941 and then the grammar.
16942
16943 2002-04-08 Akim Demaille <akim@epita.fr>
16944
16945 * src/system.h: No longer using strndup.
16946
16947 2002-04-07 Akim Demaille <akim@epita.fr>
16948
16949 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
16950 * src/output.c (output_table_data): Return the longest number.
16951 (prepare_tokens): Output `token_number_max').
16952 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
16953 New.
16954 Use them to define yy_token_number_type/TokenNumberType.
16955 Use this type for yytranslate.
16956 * tests/torture.at (Big triangle): Push the limit from 124 to
16957 253.
16958 * tests/regression.at (Web2c Actions): Adjust.
16959
16960 2002-04-07 Akim Demaille <akim@epita.fr>
16961
16962 * tests/torture.at (Big triangle): New.
16963 (GNU AWK Grammar, GNU Cim Grammar): Move to...
16964 * tests/existing.at: here.
16965
16966 2002-04-07 Akim Demaille <akim@epita.fr>
16967
16968 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
16969 nritems.
16970 Adjust dependencies.
16971
16972 2002-04-07 Akim Demaille <akim@epita.fr>
16973
16974 * src/reader.c: Normalize increments to prefix form.
16975
16976 2002-04-07 Akim Demaille <akim@epita.fr>
16977
16978 * src/reader.c, symtab.c: Remove debugging code.
16979
16980 2002-04-07 Akim Demaille <akim@epita.fr>
16981
16982 Rename all the `bucket's as `symbol_t'.
16983
16984 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
16985 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
16986 * src/symtab.c, src/symtab.h (bucket): Rename as...
16987 (symbol_t): this.
16988 (symbol_list_new, bucket_check_defined, bucket_make_alias)
16989 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
16990 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16991 (buckets_new, buckets_free, buckets_do): Rename as...
16992 (symbol_list_new, symbol_check_defined, symbol_make_alias)
16993 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16994 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
16995 (symbols_new, symbols_free, symbols_do): these.
16996
16997 2002-04-07 Akim Demaille <akim@epita.fr>
16998
16999 Use lib/hash for the symbol table.
17000
17001 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17002 EOF.
17003 * src/lex.c (lex): Set the `number' member of new terminals.
17004 * src/reader.c (bucket_check_defined, bucket_make_alias)
17005 (bucket_check_alias_consistence, bucket_translation): New.
17006 (reader, grammar_free, readgram, token_translations_init)
17007 (packsymbols): Adjust.
17008 (reader): Number the predefined tokens.
17009 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17010 for predefined tokens.
17011 * src/symtab.h (bucket): Remove all the hash table related
17012 members.
17013 * src/symtab.c (symtab): Replace by...
17014 (bucket_table): this.
17015 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17016 (buckets_new, buckets_do): New.
17017
17018 2002-04-07 Akim Demaille <akim@epita.fr>
17019
17020 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17021 (start_symbol, max_user_token_number, semantic_parser)
17022 (error_token_number): Initialize.
17023 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17024 Initialize.
17025 (reader): Don't.
17026 (errtoken, eoftoken, undeftoken, axiom): Extern.
17027
17028 2002-04-07 Akim Demaille <akim@epita.fr>
17029
17030 * src/gram.h (rule_s): prec and precsym are now pointers
17031 to the bucket giving the priority/associativity.
17032 Member `associativity' removed: useless.
17033 * src/reduce.c, src/conflicts.c: Adjust.
17034
17035 2002-04-07 Akim Demaille <akim@epita.fr>
17036
17037 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17038 Properly escape the symbols' TAG when outputting them.
17039
17040 2002-04-07 Akim Demaille <akim@epita.fr>
17041
17042 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17043
17044 2002-04-07 Akim Demaille <akim@epita.fr>
17045
17046 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17047 (LArule): this, which is an array to rule_t*.
17048 * src/print.c, src/conflicts.c: Adjust.
17049
17050 2002-04-07 Akim Demaille <akim@epita.fr>
17051
17052 * src/gram.h (rule_t): Rename `number' as `user_number'.
17053 `number' is a new member.
17054 Adjust dependencies.
17055 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17056
17057 2002-04-07 Akim Demaille <akim@epita.fr>
17058
17059 As a result of the previous patch, it is no longer needed
17060 to reorder ritem itself.
17061
17062 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17063
17064 2002-04-07 Akim Demaille <akim@epita.fr>
17065
17066 Be sure never to walk through RITEMS, but use only data related to
17067 the rules themselves. RITEMS should be banished.
17068
17069 * src/output.c (output_token_translations): Rename as...
17070 (prepare_tokens): this.
17071 In addition to `translate', prepare the muscles `tname' and
17072 `toknum', which were handled by...
17073 (output_rule_data): this.
17074 Remove, and move the remainder of its outputs into...
17075 (prepare_rules): this new routines, which also merges content from
17076 (output_gram): this.
17077 (prepare_rules): Be sure never to walk through RITEMS.
17078 (output_stos): Rename as...
17079 (prepare_stos): this.
17080 (output): Always invoke prepare_states, after all, just don't use it
17081 in the output if you don't need it.
17082
17083 2002-04-07 Akim Demaille <akim@epita.fr>
17084
17085 * src/LR0.c (new_state): Display `nstates' as the name of the
17086 newly created state.
17087 Adjust to initialize first_state and last_state if needed.
17088 Be sure to distinguish the initial from the final state.
17089 (new_states): Create the itemset of the initial state, and use
17090 new_state.
17091 * src/closure.c (closure): Now that the initial state has its
17092 items properly set, there is no need for a special case when
17093 creating `ruleset'.
17094
17095 As a result, now the rule 0, reducing to $axiom, is visible in the
17096 outputs. Adjust the test suite.
17097
17098 * tests/conflicts.at (Solved SR Conflicts)
17099 (Unresolved SR Conflicts): Adjust.
17100 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17101 * tests/conflicts.at (S/R in initial): New.
17102
17103 2002-04-07 Akim Demaille <akim@epita.fr>
17104
17105 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17106 the RHS of the rules.
17107 * src/output.c (output_gram): Likewise.
17108
17109 2002-04-07 Akim Demaille <akim@epita.fr>
17110
17111 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17112 bucket.
17113 Adjust all dependencies.
17114 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17115 `number' of the buckets too.
17116 * src/gram.h: Include `symtab.h'.
17117 (associativity): Move to...
17118 * src/symtab.h: here.
17119 No longer include `gram.h'.
17120
17121 2002-04-07 Akim Demaille <akim@epita.fr>
17122
17123 * src/gram.h, src/gram.c (rules_rhs_length): New.
17124 (ritem_longest_rhs): Use it.
17125 * src/gram.h (rule_t): `number' is a new member.
17126 * src/reader.c (packgram): Set it.
17127 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17128 the end of `rules', and count them out of `nrules'.
17129 (reduce_output, dump_grammar): Adjust.
17130 * src/print.c (print_grammar): It is no longer needed to check for
17131 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17132 * tests/reduce.at (Reduced Automaton): New test.
17133
17134 2002-04-07 Akim Demaille <akim@epita.fr>
17135
17136 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17137 lacking `+ 1' to nrules, Bison reported as useless a token if it
17138 was used solely to set the precedence of the last rule...
17139
17140 2002-04-07 Akim Demaille <akim@epita.fr>
17141
17142 * data/bison.c++, data/bison.simple: Don't output the current file
17143 name in #line, to avoid useless diffs between two identical
17144 outputs under different names.
17145
17146 2002-04-07 Akim Demaille <akim@epita.fr>
17147
17148 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17149 Normalize loops to using `< nrules + 1', not `<= nrules'.
17150
17151 2002-04-07 Akim Demaille <akim@epita.fr>
17152
17153 * TODO: Update.
17154
17155 2002-04-07 Akim Demaille <akim@epita.fr>
17156
17157 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17158 bucket.value as bucket.number.
17159
17160 2002-04-07 Akim Demaille <akim@epita.fr>
17161
17162 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17163 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17164 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17165 RHS, instead of being an index in RITEMS.
17166
17167 2002-04-04 Paul Eggert <eggert@twinsun.com>
17168
17169 * doc/bison.texinfo: Update copyright date.
17170 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17171 (Symbols): Warn about running Bison in one character set,
17172 but compiling and/or running in an incompatible one.
17173 Warn about character code 256, too.
17174
17175 2002-04-03 Paul Eggert <eggert@twinsun.com>
17176
17177 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17178 YYERROR_VERBOSE is nonzero, not whether it is defined.
17179
17180 Merge changes from bison-1_29-branch.
17181
17182 2002-03-20 Paul Eggert <eggert@twinsun.com>
17183
17184 Merge fixes from Debian bison_1.34-1.diff.
17185
17186 * configure.in (AC_PREREQ): 2.53.
17187
17188 2002-03-20 Akim Demaille <akim@epita.fr>
17189
17190 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17191
17192 2002-03-19 Paul Eggert <eggert@twinsun.com>
17193
17194 * src/bison.simple (YYCOPY): New macro.
17195 (YYSTACK_RELOCATE): Use it.
17196 Remove Type arg; no longer needed. All callers changed.
17197 (yymemcpy): Remove; no longer needed.
17198
17199 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17200 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17201
17202 2002-03-19 Akim Demaille <akim@epita.fr>
17203
17204 Test and fix the #line outputs.
17205
17206 * tests/atlocal.at (GCC): New.
17207 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
17208 (Prologue synch line, %union synch line, Postprologue synch line)
17209 (Action synch line, Epilogue synch line): New tests.
17210 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17211 * data/bison.simple, data/bison.c++: Use it.
17212
17213 2002-03-19 Akim Demaille <akim@epita.fr>
17214
17215 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17216 (Solved SR Conflicts, %expect not enough, %expect right)
17217 (%expect too much): Move to...
17218 * tests/conflicts.at: this new file.
17219
17220 2002-03-19 Akim Demaille <akim@epita.fr>
17221
17222 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17223 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17224 that we can move to enums for instance.
17225 * src/output.c (token_definitions_output): Output a list of
17226 `token-name, token-number' instead of the #define.
17227 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17228
17229 2002-03-14 Akim Demaille <akim@epita.fr>
17230
17231 Use Gettext 0.11.1.
17232
17233 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
17234
17235 * data/bison.c++: Make the user able to add members to the generated
17236 parser by subclassing.
17237
17238 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
17239
17240 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17241 a character.
17242 Reported by Nicolas Tisserand and Nicolas Burrus.
17243
17244 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17245
17246 * src/reader.c: Warn about lacking semi-colons, do not complain.
17247
17248 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17249
17250 * data/bison.c++: Remove a debug line.
17251
17252 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17253
17254 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
17255 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
17256 provide a default implementation.
17257
17258 2002-03-04 Akim Demaille <akim@epita.fr>
17259
17260 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17261 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17262 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17263 * tests/semantic.at (Parsing Guards): Similarly.
17264 * src/reader.at (readgram): Complain if the last rule is not ended
17265 with a semi-colon.
17266
17267 2002-03-04 Akim Demaille <akim@epita.fr>
17268
17269 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17270 * src/closure.c: here.
17271 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17272 RTC.
17273 * src/warshall.h, src/warshall.c: Remove.
17274 * tests/sets.at (Broken Closure): Adjust.
17275
17276 2002-03-04 Akim Demaille <akim@epita.fr>
17277
17278 * src/output.c (output_skeleton): tempdir is const.
17279 bytes_read is unused.
17280
17281 2002-03-04 Akim Demaille <akim@epita.fr>
17282
17283 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17284 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17285 Update.
17286 From Michael Hayes.
17287
17288 2002-03-04 Akim Demaille <akim@epita.fr>
17289
17290 * src/closure.c (closure): `r' is unused.
17291
17292 2002-03-04 Akim Demaille <akim@epita.fr>
17293
17294 * tests/sets.at (Broken Closure): Add the ending `;'.
17295 * src/reader.at (readgram): Complain if a rule is not ended with a
17296 semi-colon.
17297
17298 2002-03-04 Akim Demaille <akim@epita.fr>
17299
17300 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17301 (count_sr_conflicts): Use bitset_count.
17302 * src/reduce.c (inaccessable_symbols): Ditto.
17303 (bits_size): Remove.
17304 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17305
17306 2002-03-04 Akim Demaille <akim@epita.fr>
17307
17308 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17309 * src/reduce.c: Remove the `bitset_zero's following the
17310 `bitset_create's, as now it is performed by the latter.
17311
17312 2002-03-04 Akim Demaille <akim@epita.fr>
17313
17314 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17315 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17316 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17317 latest sources from Michael.
17318
17319 2002-03-04 Akim Demaille <akim@epita.fr>
17320
17321 * src/output.c (output): Don't free the grammar.
17322 * src/reader.c (grammar_free): New.
17323 * src/main.c (main): Call it and don't free symtab here.
17324
17325 2002-03-04 Akim Demaille <akim@epita.fr>
17326
17327 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17328 before returning.
17329 Reported by Benoit Perrot.
17330
17331 2002-03-04 Akim Demaille <akim@epita.fr>
17332
17333 Use bitset operations when possible, not loops over bits.
17334
17335 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17336 bitset_or.
17337 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17338 * src/reduce.c (useless_nonterminals): Formatting changes.
17339 * src/warshall.c (TC): Use bitset_or.
17340
17341 2002-03-04 Akim Demaille <akim@epita.fr>
17342
17343 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17344 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17345 Ditto.
17346
17347 2002-03-04 Akim Demaille <akim@epita.fr>
17348
17349 * src/lalr.c (F): Now a bitset*.
17350 Adjust all dependencies.
17351
17352 2002-03-04 Akim Demaille <akim@epita.fr>
17353
17354 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17355 Adjust all dependencies.
17356
17357 2002-03-04 Akim Demaille <akim@epita.fr>
17358
17359 * src/L0.c, src/LR0.h (nstates): Be size_t.
17360 Adjust comparisons (signed vs unsigned).
17361 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17362 bitset*.
17363 Adjust all dependencies.
17364
17365 2002-03-04 Akim Demaille <akim@epita.fr>
17366
17367 * src/closure.c (firsts): Now, also a bitset.
17368 Adjust all dependencies.
17369 (varsetsize): Remove, now unused.
17370 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17371
17372 2002-03-04 Akim Demaille <akim@epita.fr>
17373
17374 * src/print.c: Convert to use bitset.h, not hand coded iterations
17375 over ints.
17376
17377 2002-03-04 Akim Demaille <akim@epita.fr>
17378
17379 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17380
17381 2002-03-04 Akim Demaille <akim@epita.fr>
17382
17383 * src/closure.c (ruleset): Be a bitset.
17384 (rulesetsize): Remove.
17385
17386 2002-03-04 Akim Demaille <akim@epita.fr>
17387
17388 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17389 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17390 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17391 * src/closure.c (fderives): Be an array of bitsets.
17392
17393 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
17394
17395 * data/bison.c++: Merge the two generated headers. Insert a copyright
17396 notice in each output file.
17397
17398 2002-02-28 Akim Demaille <akim@epita.fr>
17399
17400 * data/bison.c++: Copy the prologue of bison.simple to fetch
17401 useful M4 definitions, such as b4_header_guard.
17402
17403 2002-02-25 Akim Demaille <akim@epita.fr>
17404
17405 * src/getargs.c (version): Give the name of the authors, and use a
17406 translator friendly scheme for the bgr
17407 copyright notice.
17408
17409 2002-02-25 Akim Demaille <akim@epita.fr>
17410
17411 * src/output.c (header_output): Remove, now handled completely via
17412 M4.
17413
17414 2002-02-25 Akim Demaille <akim@epita.fr>
17415
17416 * m4/m4.m4: New, from CVS Autoconf.
17417 * configure.in: Invoke it.
17418 * src/output.c (output_skeleton): Use its result instead of the
17419 hard coded name.
17420
17421 2002-02-25 Akim Demaille <akim@epita.fr>
17422
17423 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17424 Fileutils 4.1.5.
17425 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17426 * src/output.c (output_skeleton): Use mkstemp to create a real
17427 temporary file.
17428 Move the filling of `skeleton' and its muscle to...
17429 (prepare): here.
17430 (output): Move the definition of the prologue muscle to...
17431 (prepare): here.
17432 * src/system.h (DEFAULT_TMPDIR): New.
17433
17434 2002-02-14 Paul Eggert <eggert@twinsun.com>
17435
17436 Remove the support for C++ namespace cleanliness; it was
17437 causing more problems than it was curing, since it didn't work
17438 properly on some nonstandard C++ compilers. This can wait
17439 for a proper C++ parser.
17440
17441 * NEWS: Document this.
17442 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17443 of C++, as it's treated like C now.
17444 * src/bison.simple (YYSTD): Remove.
17445 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17446 Treat C++ just like Standard C instead of trying to support
17447 namespace cleanliness.
17448
17449 2002-02-14 Akim Demaille <akim@epita.fr>
17450
17451 * tests/regression.at (else): Adjust to Andreas' change.
17452
17453 2002-02-14 Akim Demaille <akim@epita.fr>
17454
17455 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17456
17457 2002-02-13 Andreas Schwab <schwab@suse.de>
17458
17459 * src/output.c (output_rule_data): Don't output NULL, it might
17460 not be defined yet.
17461
17462 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
17463
17464 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17465 (Copyright notice): Update.
17466
17467 2002-02-11 Akim Demaille <akim@epita.fr>
17468
17469 * tests/regression.at (%nonassoc and eof): Don't include
17470 nonportable headers.
17471
17472 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
17473
17474 * data/bison.c++: Correct error recovery. Make the user able to
17475 initialize the starting location.
17476
17477 2002-02-07 Akim Demaille <akim@epita.fr>
17478
17479 * tests/input.at: New.
17480
17481 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17482
17483 * data/bison.c++: Replace some direct m4 expansions by constants. Be
17484 more consistent when naming methods and variables. Put preprocessor
17485 directives around tables only needed for debugging.
17486
17487 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17488
17489 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17490 C++ parsers.
17491 (yy::b4_name::parse): Use print_.
17492
17493 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17494
17495 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17496
17497 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17498
17499 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17500 C++ parsers.
17501 (yy::b4_name::parse): Build verbose error messages, and use error_.
17502
17503 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17504
17505 * data/bison.c++: Fix m4 quoting in comments.
17506
17507 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17508
17509 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17510 not expanded by m4.
17511
17512 2002-02-05 Akim Demaille <akim@epita.fr>
17513
17514 * data/bison.c++: Adjust to the M4 back end.
17515 More is certainly needed.
17516
17517 2002-02-05 Akim Demaille <akim@epita.fr>
17518
17519 Give a try to M4 as a back end.
17520
17521 * lib/readpipe.c: New, from wdiff.
17522 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17523 BISON_HAIRY.
17524 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17525 specific values. Now it is m4 that performs the lookup.
17526 * src/parse-skel.y: Remove.
17527 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17528 * src/output.c (actions_output, guards_output)
17529 (token_definitions_output): No longer keeps track of the output
17530 line number, hence remove the second argument.
17531 (guards_output): Check against the guard member of a rule, not the
17532 action member.
17533 Adjust callers.
17534 (output_skeleton): Don't look for the skeleton location, let m4 do
17535 that.
17536 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17537 file will be used.
17538 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17539 (prepare): Given that for the time being changesyntax is not
17540 usable in M4, rename the muscles using `-' to `_'.
17541 Define `defines_flag', `output_parser_name' and `output_header_name'.
17542 * src/output.h (actions_output, guards_output)
17543 (token_definitions_output): Adjust prototypes.
17544 * src/scan-skel.l: Instead of scanning the skeletons, it now
17545 processes the output of m4: `__oline__' and `#output'.
17546 * data/bison.simple: Adjust to be used by M4(sugar).
17547 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17548 to date.
17549 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17550 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17551 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17552 shamelessly stolen from CVS Autoconf.
17553
17554 2002-02-05 Akim Demaille <akim@epita.fr>
17555
17556 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17557 * configure.in: Check for the declarations of free and malloc.
17558 * src/muscle_tab.c: Adjust.
17559
17560 2002-02-05 Akim Demaille <akim@epita.fr>
17561
17562 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17563 which have no values.
17564
17565 2002-02-05 Akim Demaille <akim@epita.fr>
17566
17567 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17568 * data/: here.
17569
17570 2002-01-29 Paul Eggert <eggert@twinsun.com>
17571
17572 * src/bison.simple (YYSIZE_T): Do not define merely because
17573 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17574 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17575
17576 2002-01-27 Akim Demaille <akim@epita.fr>
17577
17578 Fix `%nonassoc and eof'.
17579
17580 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17581 which were not properly copied! Replace
17582 memcpy (res->errs, src->errs, src->nerrs);
17583 with
17584 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17585 !!!
17586 * tests/regression.at (%nonassoc and eof): Adjust to newest
17587 Autotest: `.' is not in the PATH.
17588
17589 2002-01-27 Akim Demaille <akim@epita.fr>
17590
17591 * tests/sets.at (AT_EXTRACT_SETS): New.
17592 (Nullable): Use it.
17593 (Firsts): New.
17594
17595 2002-01-26 Akim Demaille <akim@epita.fr>
17596
17597 * tests/actions.at, tests/calc.at, tests/headers.at,
17598 * tests/torture.at: Adjust to the newest Autotest which no longer
17599 forces `.' in the PATH.
17600
17601 2002-01-25 Akim Demaille <akim@epita.fr>
17602
17603 * tests/regression.at (%nonassoc and eof): New.
17604 Suggested by Robert Anisko.
17605
17606 2002-01-24 Akim Demaille <akim@epita.fr>
17607
17608 Bison dumps core when trying to complain about broken input files.
17609 Reported by Cris van Pelt.
17610
17611 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17612 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17613 into...
17614 (Invalid inputs): Strengthen: exercise parse_percent_token.
17615
17616 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
17617
17618 * src/Makefile.am: Add bison.c++.
17619 * src/bison.c++: New skeleton.
17620
17621 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
17622
17623 * po/it.po: New.
17624
17625 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17626
17627 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17628
17629 2002-01-20 Marc Autret <marc@gnu.org>
17630
17631 * src/files.c (compute_output_file_names): Fix
17632
17633 2002-01-20 Marc Autret <marc@gnu.org>
17634
17635 * tests/output.at: New test.
17636 * src/files.c (compute_base_names): Don't map extensions when
17637 the YACC flag is set, use defaults.
17638 Reported by Evgeny Stambulchik.
17639
17640 2002-01-20 Marc Autret <marc@gnu.org>
17641
17642 * src/system.h: Need to define __attribute__ away for non-GCC
17643 compilers as well (i.e., the vendor C compiler).
17644 Suggested by Albert Chin-A-Young.
17645
17646 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
17647
17648 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17649 canonical definition.
17650 * src/system.h: Use the canonical definition for PARAMS (avoids
17651 a conflict with the macro from lib/hash.h).
17652
17653 2002-01-11 Akim Demaille <akim@epita.fr>
17654
17655 * configure.in: Use AC_FUNC_STRNLEN.
17656 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
17657
17658 2002-01-09 Akim Demaille <akim@epita.fr>
17659
17660 * src/files.c, src/files.h (output_infix): New.
17661 (tab_extension): Remove.
17662 (compute_base_names): Compute the former, drop the latter.
17663 * src/output.c (prepare): Insert the muscles `output-infix', and
17664 `output-suffix'.
17665 * src/parse-skel.y (string, string.1): New.
17666 (section.header): Use it.
17667 (section.yacc): Remove.
17668 (prefix): Remove too.
17669 * src/scan-skel.l: Adjust.
17670 * src/bison.simple, src/bison.hairy: Adjust.
17671
17672 2002-01-09 Akim Demaille <akim@epita.fr>
17673
17674 * configure.in (WERROR_CFLAGS): Compute it.
17675 * src/Makefile.am (CFLAGS): Pass it.
17676 * tests/atlocal.in (CFLAGS): Idem.
17677 * src/files.c: Fix a few warnings.
17678 (get_extension_index): Remove, unused.
17679
17680 2002-01-08 Akim Demaille <akim@epita.fr>
17681
17682 * src/getargs.c (AS_FILE_NAME): New.
17683 (getargs): Use it to convert DOSish file names.
17684 * src/files.c (base_name): Rename as full_base_name to avoid
17685 clashes with `base_name ()'.
17686 (filename_split): New.
17687 (compute_base_names): N-th rewrite, using filename_split.
17688
17689 2002-01-08 Akim Demaille <akim@epita.fr>
17690
17691 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
17692 New, stolen from the Fileutils 4.1.
17693 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17694 * configure.in: Check for the presence of memrchr, and of its
17695 prototype.
17696
17697 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
17698
17699 * lib/hash.h (__P): Added definition for this macro.
17700 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
17701 BUILT_SOURCES, to ensure they are generated first.
17702 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
17703 %error-verbose to allow bootstrapping with bison 1.30x.
17704
17705 2002-01-06 Akim Demaille <akim@epita.fr>
17706
17707 * src/reader.c (parse_braces): Don't fetch the next char, the
17708 convention is to fetch on entry.
17709 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
17710 'switch' without a following semicolon.
17711 * tests/regression.at (braces parsing): New.
17712
17713 2002-01-06 Akim Demaille <akim@epita.fr>
17714
17715 Bison is dead wrong in its RR conflict reports.
17716
17717 * tests/torture.at (GNU Cim Grammar): New.
17718 * src/conflicts.c (count_rr_conflicts): Fix.
17719
17720 2002-01-06 Akim Demaille <akim@epita.fr>
17721
17722 Creating package.m4 from configure.ac causes too many problems.
17723
17724 * tests/Makefile.am (package.m4): Create it by hand,
17725 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
17726
17727 2002-01-06 Akim Demaille <akim@epita.fr>
17728
17729 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
17730 skeleton.h.
17731
17732 2002-01-04 Paul Eggert <eggert@twinsun.com>
17733
17734 * doc/bison.texinfo (Debugging):
17735 Remove YYSTDERR; it's no longer defined or used.
17736 Also, s/cstdio.h/cstdio/.
17737
17738 2002-01-03 Akim Demaille <akim@epita.fr>
17739
17740 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
17741
17742 2002-01-03 Akim Demaille <akim@epita.fr>
17743
17744 * src/parse-skel.y (process_skeleton): Don't bind the parser's
17745 tracing code to --trace, wait for a better --trace option, with
17746 args.
17747
17748 2002-01-03 Akim Demaille <akim@epita.fr>
17749
17750 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
17751 The ISO C++ standard is extremely clear about it: stderr is
17752 considered a macro, not a regular symbol (see table 94 `Header
17753 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
17754 Therefore std:: does not apply to it. It still does with fprintf.
17755 Also, s/cstdio.h/cstdio/.
17756
17757 2002-01-03 Akim Demaille <akim@epita.fr>
17758
17759 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
17760 for non system headers.
17761
17762 2002-01-02 Akim Demaille <akim@epita.fr>
17763
17764 Equip the skeleton chain with location tracking, runtime trace,
17765 pure parser and scanner.
17766
17767 * src/parse-skel.y: Request a pure parser, locations, and prefix
17768 renaming.
17769 (%union): Having several members with the same type does not help
17770 type mismatches, simplify.
17771 (YYPRINT, yyprint): New.
17772 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
17773 (skel_error): this.
17774 Handle locations.
17775 * src/scan-skel.l: Adjust to these changes.
17776 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
17777 (LOCATION_PRINT, skel_control_t): New.
17778
17779 2001-12-30 Akim Demaille <akim@epita.fr>
17780
17781 * src/parse-skel.y: Get rid of the shift/reduce conflict:
17782 replace `gb' with BLANKS.
17783 * src/scan-skel.l: Adjust.
17784
17785 2001-12-30 Akim Demaille <akim@epita.fr>
17786
17787 * src/system.h: We don't need nor want bcopy.
17788 Throw away MS-DOS crap: we don't need getpid.
17789 * configure.in: We don't need strndup. It was even causing
17790 problems: because Flex includes the headers *before* us,
17791 _GNU_SOURCE is not defined by config.h, and therefore strndup was
17792 not visible.
17793 * lib/xstrndup.c: New.
17794 * src/scan-skel.l: Use it.
17795 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
17796 * src/parse-skel.y: Use %directives instead of #defines.
17797
17798 2001-12-30 Akim Demaille <akim@epita.fr>
17799
17800 * src/skeleton.h: New.
17801 * src/output.c (output_parser, output_master_parser): Remove, dead
17802 code.
17803 * src/output.h (get_lines_number, actions_output, guards_output)
17804 (token_definitions_output): Prototype them.
17805 * src/parse-skel.y: Add the license notice.
17806 Include output.h and skeleton.h.
17807 (process_skeleton): Returns void, and takes a single parameter.
17808 * src/scan-skel.l: Add the license notice.
17809 Include skeleton.h.
17810 Don't use %option yylineno: it seems that then Flex imagines
17811 REJECT has been used, and therefore it won't reallocate its
17812 buffers (which makes no other sense to me than a bug). It results
17813 in warnings for `unused: yy_flex_realloc'.
17814
17815 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
17816
17817 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17818 (MUSCLE_INSERT_PREFIX): ...to there.
17819 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17820 (MUSCLE_INSERT_PREFIX): Move from here...
17821
17822 * src/bison.hairy: Add a section directive. Put braces around muscle
17823 names. This parser skeleton is still broken, but Bison should not
17824 choke on a bad muscle 'syntax'.
17825 * src/bison.simple: Add a section directive. Put braces around muscle
17826 names.
17827
17828 * src/files.h (strsuffix, stringappend): Add declarations.
17829 (tab_extension): Add declaration.
17830 (short_base_name): Add declaration.
17831
17832 * src/files.c (strsuffix, stringappend): No longer static. These
17833 functions are used in the skeleton parser.
17834 (tab_extension): New.
17835 (compute_base_names): Use the computations done in this function
17836 to guess if the generated parsers should have '.tab' in their
17837 names.
17838 (short_base_name): No longer static.
17839
17840 * src/output.c (output_skeleton): New.
17841 (output): Disable call to output_master_parser, and give a try to
17842 a new skeleton handling system.
17843 (guards_output, actions_output): No longer static.
17844 (token_definitions_output, get_lines_number): No longer static.
17845
17846 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
17847
17848 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
17849 parse-skel.y.
17850
17851 * src/parse-skel.y: New file.
17852 * src/scan-skel.l: New file.
17853
17854 2001-12-29 Akim Demaille <akim@epita.fr>
17855
17856 %name-prefix is broken.
17857
17858 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
17859 Adjust all dependencies.
17860 * tests/headers.at (export YYLTYPE): Strengthen this test: use
17861 %name-prefix.
17862
17863 Renaming yylval but not yylloc is not consistent. Now we do.
17864
17865 * src/bison.simple: Prefix yylloc if used.
17866 * doc/bison.texinfo (Decl Summary): Document that.
17867
17868 2001-12-29 Akim Demaille <akim@epita.fr>
17869
17870 * doc/bison.texinfo: Promote `%long-directive' over
17871 `%long_directive'.
17872 Remove all references to fixed-output-files, yacc is enough.
17873
17874 2001-12-29 Akim Demaille <akim@epita.fr>
17875
17876 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
17877 user prologue. These are defaults.
17878 * tests/actions.at (Mid-rule actions): Make sure the user can
17879 define YYDEBUG and YYERROR_VERBOSE.
17880
17881 2001-12-29 Akim Demaille <akim@epita.fr>
17882
17883 * src/output.c (header_output): Don't forget to export YYLTYPE and
17884 yylloc.
17885 * tests/headers.at (export YYLTYPE): New, make sure it does.
17886 * tests/regression.at (%union and --defines, Invalid CPP headers):
17887 Move to...
17888 * tests/headers.at: here.
17889
17890 2001-12-29 Akim Demaille <akim@epita.fr>
17891
17892 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
17893
17894 2001-12-29 Akim Demaille <akim@epita.fr>
17895
17896 * tests/actions.at (Mid-rule actions): Output on a single line
17897 instead of several.
17898
17899 2001-12-29 Akim Demaille <akim@epita.fr>
17900
17901 * doc/bison.texinfo: Formatting changes.
17902
17903 2001-12-29 Akim Demaille <akim@epita.fr>
17904
17905 Don't store the token defs in a muscle, just be ready to output it
17906 on command. Now possible via `symbols'. Fixes a memory leak.
17907
17908 * src/output.c (token_definitions_output): New.
17909 (output_parser, header_output): Use it.
17910 * src/reader.c (symbols_save): Remove.
17911
17912 2001-12-29 Akim Demaille <akim@epita.fr>
17913
17914 * src/bison.simple: Do not provide a default for YYSTYPE and
17915 YYLTYPE before the user's prologue. Otherwise it's hardly... a
17916 default.
17917
17918 2001-12-29 Akim Demaille <akim@epita.fr>
17919
17920 Mid-rule actions are simply... ignored!
17921
17922 * src/reader.c (readgram): Be sure to attach mid-rule actions to
17923 the empty-rule associated to the dummy symbol, not to the host
17924 rule.
17925 * tests/actions.at (Mid-rule actions): New.
17926
17927 2001-12-29 Akim Demaille <akim@epita.fr>
17928
17929 Memory leak.
17930
17931 * src/reader.c (reader): Free grammar.
17932
17933 2001-12-29 Akim Demaille <akim@epita.fr>
17934
17935 Memory leak.
17936
17937 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
17938 since it allocates it for each state, although only one is needed.
17939 (allocate_storage): Do it here.
17940
17941 2001-12-29 Akim Demaille <akim@epita.fr>
17942
17943 * src/options.h, src/options.c (create_long_option_table): Rename
17944 as...
17945 (long_option_table_new): this, with a clearer prototype.
17946 (percent_table): Remove, unused,
17947 * src/getargs.c (getargs): Adjust.
17948
17949 2001-12-29 Akim Demaille <akim@epita.fr>
17950
17951 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
17952 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
17953 as states.
17954
17955 2001-12-29 Akim Demaille <akim@epita.fr>
17956
17957 * src/lalr.c (build_relations): Rename `states' as `states1'.
17958 Sorry, I don't understand exactly what it is, no better name...
17959
17960 2001-12-29 Akim Demaille <akim@epita.fr>
17961
17962 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
17963 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
17964 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
17965 as rules.
17966
17967 2001-12-29 Akim Demaille <akim@epita.fr>
17968
17969 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
17970 ago.
17971
17972 2001-12-29 Akim Demaille <akim@epita.fr>
17973
17974 * src/reader.c, src/reader.h (user_toknums): Remove.
17975 Adjust all users to use symbols[i]->user_token_number.
17976
17977 2001-12-29 Akim Demaille <akim@epita.fr>
17978
17979 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
17980 Adjust all users to use symbols[i]->prec or ->assoc.
17981
17982 2001-12-29 Akim Demaille <akim@epita.fr>
17983
17984 * src/reader.c, src/reader.h (tags): Remove.
17985 Adjust all users to use symbols[i]->tag.
17986
17987 2001-12-29 Akim Demaille <akim@epita.fr>
17988
17989 * src/gram.h, src/gram.c (symbols): New, similar to state_table
17990 and rule_table.
17991 * src/reader.c (packsymbols): Fill this table.
17992 Drop sprec.
17993 * src/conflicts.c (resolve_sr_conflict): Adjust.
17994 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
17995 single table.
17996 Use symbols[i]->tag instead of tags[i].
17997
17998 2001-12-29 Akim Demaille <akim@epita.fr>
17999
18000 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18001 In addition, put a comment in there, to replace...
18002 * tests/regression.at (%union and C comments): Remove.
18003
18004 2001-12-29 Akim Demaille <akim@epita.fr>
18005
18006 * tests/regression.at (Web2c Actions): Blindly move the actual
18007 output as expected output. The contents *seem* right to me, but I
18008 can't pretend reading perfectly parser tables... Nonetheless, all
18009 the other tests pass correctly, the table look OK, even though the
18010 presence of `$axiom' is to be noted: AFAICS it is useless (but
18011 harmless).
18012
18013 2001-12-29 Akim Demaille <akim@epita.fr>
18014
18015 * src/reader.c (readgram): Don't add the rule 0 if there were no
18016 rules read. In other words, add it _after_ having performed
18017 grammar sanity checks.
18018 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18019
18020 2001-12-29 Akim Demaille <akim@epita.fr>
18021
18022 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18023 visible, and some states have now a different number.
18024
18025 2001-12-29 Akim Demaille <akim@epita.fr>
18026
18027 * src/reader.c (readgram): Bind the initial rule's lineno to that
18028 of the first rule.
18029 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18030 (Solved SR Conflicts): Adjust rule 0's line number.
18031
18032 2001-12-29 Akim Demaille <akim@epita.fr>
18033
18034 Fix the `GAWK Grammar' failure.
18035
18036 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18037 the reductions of the first state which was mistakenly confused
18038 with the final state because precisely final_state was initialized
18039 to 0.
18040 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18041 now noticed by Bison.
18042 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18043 have a reduction on $default.
18044
18045 2001-12-29 Akim Demaille <akim@epita.fr>
18046
18047 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18048 rule line numbers.
18049 * src/closure.c (print_closure): Likewise.
18050 * src/derives.c (print_derives): Likewise.
18051 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18052 now.
18053
18054 2001-12-29 Akim Demaille <akim@epita.fr>
18055
18056 * src/lalr.c (lookaheads_print): New.
18057 (lalr): Call it when --trace-flag.
18058 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18059 are dumped.
18060
18061 2001-12-29 Akim Demaille <akim@epita.fr>
18062
18063 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18064 when walking through ritem, even via rule->rhs.
18065 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18066 (useful_production, useless_nonterminals): Likewise.
18067 (reduce_grammar_tables): Likewise, plus update nritems.
18068 * src/nullable.c (set_nullable): Likewise.
18069 * src/lalr.c (build_relations): Likewise.
18070 * tests/sets.at (Nullable): Adjust.
18071 Fortunately, now, the $axiom is no longer nullable.
18072
18073 2001-12-29 Akim Demaille <akim@epita.fr>
18074
18075 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18076 the 0-sentinel.
18077 * src/gram.c (ritem_longest_rhs): Likewise.
18078 * src/reduce.c (nonterminals_reduce): Likewise.
18079 * src/print_graph.c (print_graph): Likewise.
18080 * src/output.c (output_rule_data): Likewise.
18081 * src/nullable.c (set_nullable): Likewise.
18082
18083 2001-12-29 Akim Demaille <akim@epita.fr>
18084
18085 * src/output.c: Comment changes.
18086
18087 2001-12-27 Paul Eggert <eggert@twinsun.com>
18088
18089 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18090 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18091 Sparc, as they were causing more porting problems than the
18092 (minor) performance improvement was worth.
18093
18094 Also, catch up with 1.31's YYSTD.
18095
18096 2001-12-27 Akim Demaille <akim@epita.fr>
18097
18098 * src/output.c (output_gram): Rely on nritems, not the
18099 0-sentinel. See below.
18100 Use -1 as separator, not 0.
18101 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18102 Rely on -1 as separator in yyrhs, instead of 0.
18103 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18104 twice `Now at end of input', therefore there are two lines less to
18105 expect.
18106
18107 2001-12-27 Akim Demaille <akim@epita.fr>
18108
18109 * tests/regression.at (Unresolved SR Conflicts):
18110 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18111 below.
18112
18113 2001-12-27 Akim Demaille <akim@epita.fr>
18114
18115 * src/LR0.c (new_state): Recognize the final state by the fact it
18116 is reached by eoftoken.
18117 (insert_start_shifting_state, insert_eof_shifting_state)
18118 (insert_accepting_state, augment_automaton): Remove, since now
18119 these states are automatically computed from the initial state.
18120 (generate_states): Adjust.
18121 * src/print.c: When reporting a rule number to the user, substract
18122 1, so that the axiom rule is rule 0, and the first user rule is 1.
18123 * src/reduce.c: Likewise.
18124 * src/print_graph.c (print_core): For the time being, just as for
18125 the report, depend upon --trace-flags to dump the full set of
18126 items.
18127 * src/reader.c (readgram): Once the grammar read, insert the rule
18128 0: `$axiom: START-SYMBOL $'.
18129 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18130 number of the states has changed (the final state is no longer
18131 necessarily the last), catch up.
18132
18133 2001-12-27 Akim Demaille <akim@epita.fr>
18134
18135 Try to make the use of the eoftoken valid. Given that its value
18136 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18137 is used instead of > 0 where appropriate, (ii), depend upon nritems
18138 instead of the 0-sentinel.
18139
18140 * src/gram.h, src/gram.c (nritems): New.
18141 Expected to be duplication of nitems, but for the time being...
18142 * src/reader.c (packgram): Assert nritems and nitems are equal.
18143 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18144 * src/closure.c (print_closure, print_fderives): Likewise.
18145 * src/gram.c (ritem_print): Likewise.
18146 * src/print.c (print_core, print_grammar): Likewise.
18147 * src/print_graph.c: Likewise.
18148
18149 2001-12-27 Akim Demaille <akim@epita.fr>
18150
18151 * src/main.c (main): If there are complains after grammar
18152 reductions, then output the report anyway if requested, then die.
18153 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18154 * src/reader.c (eoftoken): New.
18155 (parse_token_decl): If the token being defined has value `0', it
18156 is the eoftoken.
18157 (packsymbols): No longer hack `tags' to insert `$' by hand.
18158 Be sure to preserve the value of the eoftoken.
18159 (reader): Make sure eoftoken is defined.
18160 Initialize nsyms to 0: now eoftoken is created just like the others.
18161 * src/print.c (print_grammar): Don't special case the eof token.
18162 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18163 lie anyway, albeit pleasant.
18164 * tests/calc.at: Exercise error messages with eoftoken.
18165 Change the grammar so that empty input is invalid.
18166 Adjust expectations.
18167 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18168
18169 2001-12-27 Akim Demaille <akim@epita.fr>
18170
18171 * configure.in: Check the protos of strchr ans strspn.
18172 Replace strchr if needed.
18173 * src/system.h: Provide the protos of strchr, strspn and memchr if
18174 missing.
18175 * lib/strchr.c: New.
18176 * src/reader.c (symbols_save): Use strchr.
18177
18178 2001-12-27 Akim Demaille <akim@epita.fr>
18179
18180 * src/print.c, src/print_graph.c (escape): New.
18181 Use it to quote the TAGS outputs.
18182 * src/print_graph.c (print_state): Now errors are in red, and
18183 reductions in green.
18184 Prefer high to wide: output the state number on a line of its own.
18185
18186 2001-12-27 Akim Demaille <akim@epita.fr>
18187
18188 * src/state.h, src/state.c (reductions_new): New.
18189 * src/LR0.c (set_state_table): Let all the states have a
18190 `reductions', even if reduced to 0.
18191 (save_reductions): Adjust.
18192 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18193 * src/print.c (print_reductions, print_actions): Adjust.
18194 * src/output.c (action_row): Adjust.
18195
18196 2001-12-27 Akim Demaille <akim@epita.fr>
18197
18198 * src/state.h, src/state.c (errs_new, errs_dup): New.
18199 * src/LR0.c (set_state_table): Let all the states have an errs,
18200 even if reduced to 0.
18201 * src/print.c (print_errs, print_reductions): Adjust.
18202 * src/output.c (output_actions, action_row): Adjust.
18203 * src/conflicts.c (resolve_sr_conflict): Adjust.
18204
18205 2001-12-27 Akim Demaille <akim@epita.fr>
18206
18207 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18208
18209 2001-12-27 Akim Demaille <akim@epita.fr>
18210
18211 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18212 * src/print.c: here.
18213 (lookaheadset, shiftset): New, used as additional storage by
18214 print_reductions.
18215 (print_results): Adjust.
18216 (print_shifts, print_gotos, print_errs): New, extracted from...
18217 (print_actions): here.
18218 * src/print_graph.c (print_actions): Remove dead code.
18219
18220 2001-12-27 Akim Demaille <akim@epita.fr>
18221
18222 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18223 `$n' and `@n'.
18224
18225 2001-12-27 Akim Demaille <akim@epita.fr>
18226
18227 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18228 (build_relations): Adjust.
18229
18230 2001-12-27 Akim Demaille <akim@epita.fr>
18231
18232 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18233 duplication.
18234
18235 2001-12-27 Akim Demaille <akim@epita.fr>
18236
18237 * src/reader.c (packgram): Catch nitems overflows.
18238
18239 2001-12-27 Akim Demaille <akim@epita.fr>
18240
18241 * src/files.c, src/files.h (guard_obstack): Remove.
18242 * src/output.c (output): Adjust.
18243 * src/reader.c (parse_braces): New, factoring...
18244 (copy_action, copy_guard): these two which are renamed as...
18245 (parse_action, parse_guard): these.
18246 As a voluntary consequence, using braces around guards is now
18247 mandatory.
18248
18249 2001-12-27 Akim Demaille <akim@epita.fr>
18250
18251 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18252 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18253 members.
18254 (symbol_list_new): Adjust.
18255 (copy_action): action_line is the first line, not the last.
18256 (copy_guard): Just as for actions, store the `action' only, not
18257 the switch/case/break flesh.
18258 Don't parse the user action that might follow the guard, let...
18259 (readgram): do it, i.e., now, there can be an action after a
18260 guard.
18261 In other words the guard is just explicitly optional.
18262 (packgram): Adjust.
18263 * src/output.c (guards_output): New.
18264 (output_parser): Call it when needed.
18265 (output): Also free the guard and attrs obstacks.
18266 * src/files.c, src/files.h (obstack_save): Remove.
18267 (output_files): Remove.
18268 As a result, if one needs the former `.act' file, using an
18269 appropriate skeleton which requires actions and guards is now
18270 required.
18271 * src/main.c (main): Adjust.
18272 * tests/semantic.at: New.
18273 * tests/regression.at: Use `input.y' as input file name.
18274 Avoid 8+3 problems by requiring input.c when the test needs the
18275 parser.
18276
18277 2001-12-27 Akim Demaille <akim@epita.fr>
18278
18279 * src/reader.c (symbol_list_new): Be sure to initialize all the
18280 fields.
18281
18282 2001-12-27 Akim Demaille <akim@epita.fr>
18283
18284 All the hacks using a final pseudo state are now useless.
18285
18286 * src/LR0.c (set_state_table): state_table holds exactly nstates.
18287 * src/lalr.c (nLA): New.
18288 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18289 instead of lookaheadsp from the pseudo state (nstate + 1).
18290
18291 2001-12-27 Akim Demaille <akim@epita.fr>
18292
18293 * src/output.c (action_row, token_actions): Use a state_t instead
18294 of a integer, and nlookaheads instead of the following state's
18295 lookaheadsp.
18296
18297 2001-12-27 Akim Demaille <akim@epita.fr>
18298
18299 * src/conflicts.c (log_resolution, flush_shift)
18300 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18301 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18302 (conflicts_print, print_reductions): Use a state_t instead of an
18303 integer when referring to a state.
18304 As much as possible, depend upon nlookaheads, instead of the
18305 `lookaheadsp' member of the following state (since lookaheads of
18306 successive states are successive, the difference between state n + 1
18307 and n served as the number of lookaheads for state n).
18308 * src/lalr.c (add_lookback_edge): Likewise.
18309 * src/print.c (print_core, print_actions, print_state)
18310 (print_results): Likewise.
18311 * src/print_graph.c (print_core, print_actions, print_state)
18312 (print_graph): Likewise.
18313 * src/conflicts.h: Adjust.
18314
18315 2001-12-27 Akim Demaille <akim@epita.fr>
18316
18317 * src/bison.hairy: Formatting/comment changes.
18318 ANSIfy.
18319 Remove `register' indications.
18320 Add plenty of `static'.
18321
18322 2001-12-27 Akim Demaille <akim@epita.fr>
18323
18324 * src/output.c (prepare): Drop the muscle `ntbase' which
18325 duplicates ntokens.
18326 * src/bison.simple: Formatting/comment changes.
18327 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18328 is an undocumented synonym.
18329
18330 2001-12-22 Akim Demaille <akim@epita.fr>
18331
18332 * src/output.c (output_table_data): Change the prototype to use
18333 `int' for array ranges: some invocations do pass an int, not a
18334 short.
18335 Reported by Wayne Green.
18336
18337 2001-12-22 Akim Demaille <akim@epita.fr>
18338
18339 Some actions of web2c.y are improperly triggered.
18340 Reported by Mike Castle.
18341
18342 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18343 * tests/regression.at (Web2c): Rename as...
18344 (Web2c Report): this.
18345 (Web2c Actions): New.
18346
18347 2001-12-22 Akim Demaille <akim@epita.fr>
18348
18349 Reductions in web2c.y are improperly reported.
18350 Reported by Mike Castle.
18351
18352 * src/conflicts.c (print_reductions): Fix.
18353 * tests/regression.at (Web2c): New.
18354
18355 2001-12-18 Akim Demaille <akim@epita.fr>
18356
18357 Some host fail on `assert (!"foo")', which expands to
18358 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18359 Reported by Nelson Beebee.
18360
18361 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18362 `#define it_succeeded 0' and `assert (it_succeeded)'.
18363
18364 2001-12-17 Marc Autret <autret_m@epita.fr>
18365
18366 * src/bison.simple: Don't hard code the skeleton line and filename.
18367 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18368 New line counter 'skeleton_line' (skeleton-line muscle).
18369
18370 2001-12-17 Paul Eggert <eggert@twinsun.com>
18371
18372 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18373 YYDEBUG must be defined to a nonzero value.
18374
18375 * src/bison.simple (yytname): Do not assume that the user defines
18376 YYDEBUG to a properly parenthesized expression.
18377
18378 2001-12-17 Akim Demaille <akim@epita.fr>
18379
18380 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18381 nlookaheads is a new member.
18382 Adjust all users.
18383 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18384 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18385 state.
18386
18387 2001-12-17 Akim Demaille <akim@epita.fr>
18388
18389 * src/files.h, src/files.c (open_files, close_files): Remove.
18390 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18391 let...
18392 * src/reader.c (reader): Do it.
18393
18394 2001-12-17 Akim Demaille <akim@epita.fr>
18395
18396 * src/conflicts.c (print_reductions): Formatting changes.
18397
18398 2001-12-17 Akim Demaille <akim@epita.fr>
18399
18400 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18401 (flush_reduce): New.
18402 (resolve_sr_conflict): Adjust.
18403
18404 2001-12-17 Akim Demaille <akim@epita.fr>
18405
18406 * src/output.c (output_obstack): Be static and rename as...
18407 (format_obstack): this, to avoid any confusion with files.c's
18408 output_obstack.
18409 * src/reader.h (muscle_obstack): Move to...
18410 * src/output.h: here, since it's defined in output.c.
18411
18412 2001-12-17 Akim Demaille <akim@epita.fr>
18413
18414 * src/output.c (action_row, save_column, default_goto)
18415 (sort_actions, matching_state, pack_vector): Better variable
18416 locality.
18417
18418 2001-12-17 Akim Demaille <akim@epita.fr>
18419
18420 * src/output.c: Various formatting changes.
18421
18422 2001-12-17 Akim Demaille <akim@epita.fr>
18423
18424 * src/files.c (output_files): Free the output_obstack.
18425 * src/main.c (main): Call print and print_graph conditionally.
18426 * src/print.c (print): Work unconditionally.
18427 * src/print_graph.c (print_graph): Work unconditionally.
18428 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18429
18430 2001-12-16 Marc Autret <autret_m@epita.fr>
18431
18432 * src/output.c (actions_output): Fix. When we use %no-lines,
18433 there is one less line per action.
18434
18435 2001-12-16 Marc Autret <autret_m@epita.fr>
18436
18437 * src/bison.simple: Remove a useless #line directive.
18438 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18439 * src/output.c (get_lines_number): New.
18440 (output_parser): Adjust, now takes care about the lines of a
18441 output muscles.
18442 Fix line numbering.
18443 (actions_output): Computes the number of lines taken by actions.
18444 (output_master_parser): Insert new skeleton which is the name of
18445 the output parser file name.
18446
18447 2001-12-15 Marc Autret <autret_m@epita.fr>
18448
18449 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18450
18451 2001-12-15 Marc Autret <autret_m@epita.fr>
18452
18453 * src/output.c (output_gram): Keep track of the hairy one.
18454
18455 2001-12-15 Akim Demaille <akim@epita.fr>
18456
18457 Make `make distcheck' work.
18458
18459 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18460 system.h which uses libgettext.h.
18461
18462 2001-12-15 Akim Demaille <akim@epita.fr>
18463
18464 * src/nullable.c (set_nullable): Useless rules must be skipped,
18465 otherwise, since we range over their symbols, we might look at a
18466 nonterminal which no longer ``exists'', i.e., it is not counted in
18467 `nvars', hence we overflow our arrays.
18468
18469 2001-12-15 Akim Demaille <akim@epita.fr>
18470
18471 The header can also be produced directly, without any obstack!
18472 Yahoo!
18473
18474 * src/files.c, src/files.h (defines_obstack): Remove.
18475 (compute_header_macro): Global.
18476 (defines_obstack_save): Remove.
18477 * src/reader.c (parse_union_decl): No longer output to
18478 defines_obstack: its content can be found in the `stype' muscle
18479 anyway.
18480 (output_token_translations): Merge into...
18481 (symbols_output): this.
18482 Rename as...
18483 (symbols_save): this.
18484 (reader): Adjust.
18485 * src/output.c (header_output): New.
18486 (output): Call it.
18487
18488 2001-12-15 Akim Demaille <akim@epita.fr>
18489
18490 * src/reader.c (parse_union_decl): Instead of handling two obstack
18491 simultaneously, use one to define the `stype' muscle, and use the
18492 value of the latter to fill defines_obstack.
18493 (copy_comment): Remove.
18494 (copy_comment2): Work for a single obstack.
18495 Rename as...
18496 (copy_comment): this.
18497
18498 2001-12-15 Akim Demaille <akim@epita.fr>
18499
18500 * src/lex.c, src/lex.h (xgetc): No longer static.
18501 * src/reader.c (parse_union_decl): Revamp.
18502
18503 2001-12-15 Akim Demaille <akim@epita.fr>
18504
18505 Still making progress in separating Bison into (i) input, (ii)
18506 process, (iii) output: now we can directly output the parser file
18507 without using table_obstack at all.
18508
18509 * src/files.c, src/files.h (table_obstack): Bye bye.
18510 (parser_file_name): New.
18511 * src/files.c (compute_output_file_names): Compute it.
18512 * src/output.c (actions_output, output_parser)
18513 (output_master_parser): To a file instead of an obstack.
18514
18515 2001-12-15 Akim Demaille <akim@epita.fr>
18516
18517 Attach actions to rules, instead of pre-outputting them to
18518 actions_obstack.
18519
18520 * src/gram.h (rule_t): action and action_line are new members.
18521 * src/reader.c (symbol_list): Likewise.
18522 (copy_action): Save the actions within the rule.
18523 (packgram): Save them in rule_table.
18524 * src/output.c (actions_output): New.
18525 (output_parser): Use it on `%%actions'.
18526 (output_rule_data): Don't free rule_table.
18527 (output): Do it.
18528 (prepare): Don't save the `action' muscle.
18529 * src/bison.simple: s/%%action/%%actions/.
18530
18531 2001-12-15 Akim Demaille <akim@epita.fr>
18532
18533 * src/reader.c (copy_action): When --yacc, don't append a `;'
18534 to the user action: let it fail if lacking.
18535 Suggested by Arnold Robbins and Tom Tromey.
18536
18537 2001-12-14 Akim Demaille <akim@epita.fr>
18538
18539 * src/lex.c (literalchar): Simply return the char you decoded, non
18540 longer mess around with obstacks and int pointers.
18541 Adjust all callers.
18542
18543 2001-12-14 Akim Demaille <akim@epita.fr>
18544
18545 * src/lex.c (literalchar): Don't escape the special characters,
18546 just decode them, and keep them as char (before, eol was output as
18547 the 2 char string `\n' etc.).
18548 * src/output.c (output_rule_data): Use quotearg to output the
18549 token strings.
18550
18551 2001-12-13 Paul Eggert <eggert@twinsun.com>
18552
18553 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18554 Do not infringe on the global user namespace when using C++.
18555 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18556 All uses of `fprintf' and `stderr' changed.
18557
18558 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18559
18560 2001-12-13 Akim Demaille <akim@epita.fr>
18561
18562 The computation of nullable is broken: it doesn't handle empty
18563 RHS's properly.
18564
18565 * tests/torture.at (GNU AWK Grammar): New.
18566 * tests/sets.at (Nullable): New.
18567 * src/nullable.c (set_nullable): Instead of blindly looping over
18568 `ritems', loop over the rules, and then over their rhs's.
18569
18570 Work around Autotest bugs.
18571
18572 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18573 frame, because Autotest understand lines starting with a `+' as
18574 traces from the shell. Then, they are not processed properly.
18575 Admittedly an Autotest bug, but we don't have time to wait for
18576 Autotest to catch up.
18577 * tests/regression.at (Broken Closure): Adjust to the new table
18578 frames.
18579 Move to...
18580 * tests/sets.at: here.
18581
18582 2001-12-13 Akim Demaille <akim@epita.fr>
18583
18584 * src/closure.c (closure): Use nrules instead of playing tricks
18585 with BITS_PER_WORD.
18586
18587 2001-12-13 Akim Demaille <akim@epita.fr>
18588
18589 * src/print.c (print_actions): Output the handling of `$' as the
18590 traces do: shifting the token EOF. Before EOF was treated as a
18591 nonterminal.
18592 * tests/regression.at: Adjust some tests.
18593 * src/print_graph.c (print_core): Complete the set of items via
18594 closure. The next-to-final and final states are still unsatisfying,
18595 but that's to be addressed elsewhere.
18596 No longer output the rule numbers, but do output the state number.
18597 A single loop for the shifts + gotos is enough, but picked a
18598 distinct color for each.
18599 (print_graph): Initialize and finalize closure.
18600
18601 2001-12-13 Akim Demaille <akim@epita.fr>
18602
18603 * src/reader.c (readgram): Remove dead code, an strip useless
18604 braces.
18605 (get_type): Remove, unused.
18606
18607 2001-12-12 Akim Demaille <akim@epita.fr>
18608
18609 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18610 on that of lib/error.c.
18611
18612 2001-12-12 Akim Demaille <akim@epita.fr>
18613
18614 Some hosts don't like `/' in includes.
18615
18616 * src/system.h: Include libgettext.h without qualifying the path.
18617 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18618 $(top_srcdir).
18619
18620 2001-12-11 Marc Autret <autret_m@epita.fr>
18621
18622 * src/output.c (output_parser): Remove useless muscle.
18623
18624 2001-12-11 Marc Autret <autret_m@epita.fr>
18625
18626 * src/bison.simple: Remove #line just before %%epilogue. It
18627 is now handled in ...
18628 * src/reader.c (read_additionnal_code): Add the output of a
18629 #line for the epilogue.
18630
18631 2001-12-10 Marc Autret <autret_m@epita.fr>
18632
18633 * src/reader.c (copy_definition): Re-use CPP-outed code which
18634 replace precedent remove.
18635 * src/bison.simple: Remove #line before %%prologue because
18636 %%input-line is wrong at this time.
18637
18638 2001-12-10 Marc Autret <autret_m@epita.fr>
18639
18640 * src/reader.c (symbols_output): Clean up.
18641 * src/output.c (output_gram, output): Clean up.
18642
18643 2001-12-10 Akim Demaille <akim@epita.fr>
18644
18645 * src/lalr.c (initialize_lookaheads): New. Extracted from...
18646 * src/LR0.c (set_state_table): here.
18647 * src/lalr.c (lalr): Call it.
18648
18649 2001-12-10 Akim Demaille <akim@epita.fr>
18650
18651 * src/state.h (shifts): Remove the `number' member: shifts are
18652 attached to state, hence no longer need to be labelled with a
18653 state number.
18654
18655 2001-12-10 Akim Demaille <akim@epita.fr>
18656
18657 Now that states have a complete set of members, the linked list of
18658 shifts is useless: just fill directly the state's shifts member.
18659
18660 * src/state.h (shifts): Remove the `next' member.
18661 * src/LR0.c (first_state, last_state): Remove.
18662 Adjust the callers.
18663 (augment_automaton): Don't look for the shifts that must be added
18664 a shift on EOF: it is those of the state we looked for! But now,
18665 since shifts are attached, it is no longer needed to looking
18666 merely by its id: its number.
18667
18668 2001-12-10 Akim Demaille <akim@epita.fr>
18669
18670 * src/LR0.c (augment_automaton): Better variable locality.
18671 Remove an impossible branch: if there is a state corresponding to
18672 the start symbol being shifted, then there is shift for the start
18673 symbol from the initial state.
18674
18675 2001-12-10 Akim Demaille <akim@epita.fr>
18676
18677 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
18678 only when appropriate: when insert_start_shifting_state' is not
18679 invoked.
18680 * tests/regression.at (Rule Line Numbers): Adjust.
18681
18682 2001-12-10 Akim Demaille <akim@epita.fr>
18683
18684 * src/LR0.c (augment_automaton): Now that all states have shifts,
18685 merge the two cases addition shifts to the initial state.
18686
18687 2001-12-10 Akim Demaille <akim@epita.fr>
18688
18689 * src/lalr.c (set_state_table): Move to...
18690 * src/LR0.c: here.
18691 * src/lalr.c (lalr): Don't call it...
18692 * src/LR0.c (generate_states): do it.
18693 * src/LR0.h (first_state): Remove, only the table is used.
18694
18695 2001-12-10 Akim Demaille <akim@epita.fr>
18696
18697 * src/LR0.h (first_shift, first_reduction): Remove.
18698 * src/lalr.c: Don't use first_shift: find shifts through the
18699 states.
18700
18701 2001-12-10 Akim Demaille <akim@epita.fr>
18702
18703 * src/LR0.c: Attach shifts to states as soon as they are
18704 computed.
18705 * src/lalr.c (set_state_table): Instead of assigning shifts to
18706 state, just assert that the mapping was properly done.
18707
18708 2001-12-10 Akim Demaille <akim@epita.fr>
18709
18710 * src/LR0.c (insert_start_shift): Rename as...
18711 (insert_start_shifting_state): this.
18712 (insert_eof_shifting_state, insert_accepting_state): New.
18713 (augment_automaton): Adjust.
18714 Better locality of the variables.
18715 When looking if the start_symbol is shifted from the initial
18716 state, using `while (... symbol != start_symbol ...)' sounds
18717 better than `while (... symbol < start_symbol ...)': If fail
18718 to see how the order between symbols could be relevant!
18719
18720 2001-12-10 Akim Demaille <akim@epita.fr>
18721
18722 * src/getargs.h: Don't declare `spec_name_prefix' and
18723 `spec_file_prefix', declared by src/files.h.
18724 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
18725 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
18726 * src/output.c (prepare): Adjust.
18727 * src/reader.c (symbols_output): Likewise.
18728 * src/vmsgetargs.c: Vaguely adjust, but who cares?
18729
18730 2001-12-10 Akim Demaille <akim@epita.fr>
18731
18732 * src/muscle_tab.c (muscle_init): NULL is a better default than
18733 `"0"'.
18734
18735 2001-12-10 Akim Demaille <akim@epita.fr>
18736
18737 * src/reader.c (reader): Calling symbols_output once is enough.
18738
18739 2001-12-10 Akim Demaille <akim@epita.fr>
18740
18741 Now that states have a complete set of members, the linked list of
18742 reductions is useless: just fill directly the state's reductions
18743 member.
18744
18745 * src/state.h (struct reductions): Remove member `number' and
18746 `next'.
18747 * src/LR0.c (first_reduction, last_reduction): Remove.
18748 (save_reductions): Don't link the new reductions, store them in
18749 this_state.
18750 * src/lalr.c (set_state_table): No need to attach reductions to
18751 states, it's already done.
18752 * src/output.c (output_actions): No longer free the shifts, then
18753 the reductions, then the states: free all the states and their
18754 members.
18755
18756 2001-12-10 Akim Demaille <akim@epita.fr>
18757
18758 * src/options.c (OPTN, DRTV, BOTH): New.
18759 (option_table): Use them.
18760
18761 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
18762 the job of system.h.
18763 * src/options.c: Don't include stdio.h and xalloc.h for the same
18764 reasons.
18765
18766 2001-12-10 Akim Demaille <akim@epita.fr>
18767
18768 * src/output.c (output, prepare): Make sure the values of the
18769 muscles `action' and `prologue' are 0-terminated.
18770
18771 2001-12-10 Akim Demaille <akim@epita.fr>
18772
18773 Clean up GCC warnings.
18774
18775 * src/reader.c (copy_action): `buf' is not used.
18776 (parse_skel_decl): Be static.
18777 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
18778 * src/options.h (create_long_option_table): Have a real prototype.
18779 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
18780 (hash_delete_at): Return const void *.
18781 Adjust casts to preserve the const.
18782
18783 2001-12-10 Akim Demaille <akim@epita.fr>
18784
18785 * configure.in: Require 2.52g.
18786 M4 is not needed, but AUTOM4TE is.
18787 * m4/m4.m4: Remove.
18788 * tests/Makefile.am: Adjust.
18789
18790 2001-12-10 Akim Demaille <akim@epita.fr>
18791
18792 One structure for states is enough, even though theoretically
18793 there are LR(0) states and LALR(1) states.
18794
18795 * src/lalr.h (state_t): Remove.
18796 (state_table): Be state_t **, not state_t *.
18797 * src/state.h (core, CORE_ALLOC): Rename as...
18798 (state_t, STATE_ALLOC): this.
18799 Add the LALR(1) members: shifts, reductions, errs.
18800 * src/LR0.c (state_table): Rename as...
18801 (state_hash): this, to avoid name clashes with the global
18802 `state_table'.
18803 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
18804 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
18805
18806 2001-12-10 Akim Demaille <akim@epita.fr>
18807
18808 Bison dumps core on bash.y.
18809 Reported by Pascal Bart.
18810
18811 * src/warshall.c (bitmatrix_print): New.
18812 (TC): Use it.
18813 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
18814 j must be the outer loop.
18815 * tests/regression.at (Broken Closure): New.
18816
18817 2001-12-05 Akim Demaille <akim@epita.fr>
18818
18819 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
18820 its argument.
18821 Reported by Peter Hamorsky.
18822
18823 2001-12-05 Akim Demaille <akim@epita.fr>
18824
18825 * src/conflicts.c (err_table): Remove.
18826 (resolve_sr_conflict): Adjust.
18827 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
18828 Rename as...
18829 (state_t.reductions, state_t.shifts): this.
18830
18831 2001-12-05 Akim Demaille <akim@epita.fr>
18832
18833 * src/reduce.c (reduce_grammar_tables): No longer disable the
18834 removal of useless rules via CPP but via `if (0)', so that the
18835 compiler still check the code is valid.
18836 For instance, it should have noticed `rline' no longer exists: use
18837 the `line' member of rule_t.
18838 * src/gram.c (dummy, rline): Remove, unused.
18839
18840 2001-12-05 Akim Demaille <akim@epita.fr>
18841
18842 * src/output.c (pack_vector): Use assert, not berror.
18843 * src/main.c (berror): Remove, unused.
18844
18845 2001-12-05 Akim Demaille <akim@epita.fr>
18846
18847 New experimental feature: if --verbose --trace output all the
18848 items of a state, not only its kernel.
18849
18850 * src/print.c (print_core): If `trace_flag', then invoke closure
18851 before outputting the items of the state (print_core is no longer
18852 a correct name them).
18853 (print_results): Invoke new_closure/free_closure if needed.
18854
18855 2001-12-05 Akim Demaille <akim@epita.fr>
18856
18857 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
18858 * src/closure.c, src/closure.h (itemsetsize): Rename as...
18859 (nitemset): for consistency with the rest of the project.
18860
18861 2001-12-05 Akim Demaille <akim@epita.fr>
18862
18863 * src/closure.c (print_closure): Improve.
18864 (closure): Use it for printing input and output.
18865
18866 2001-12-05 Akim Demaille <akim@epita.fr>
18867
18868 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
18869 indexed by nonterminals.
18870
18871 2001-12-05 Akim Demaille <akim@epita.fr>
18872
18873 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
18874 what it was!).
18875 * src/warshall.h: Remove accidental duplication of the content.
18876
18877 2001-12-05 Akim Demaille <akim@epita.fr>
18878
18879 * src/closure.c (set_fderives): De-obfuscate.
18880
18881 2001-12-05 Akim Demaille <akim@epita.fr>
18882
18883 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
18884
18885 2001-12-05 Akim Demaille <akim@epita.fr>
18886
18887 * src/closure.c (set_firsts): De-obfuscate.
18888
18889 2001-12-05 Akim Demaille <akim@epita.fr>
18890
18891 * src/output.c (action_row): De-obfuscate
18892 using the good o' techniques: arrays not pointers, variable
18893 locality, BITISSET, RESETBIT etc.
18894
18895 2001-12-05 Akim Demaille <akim@epita.fr>
18896
18897 Pessimize the code to simplify it: from now on, all the states
18898 have a valid SHIFTS, which NSHIFTS is possibly 0.
18899
18900 * src/LR0.c (shifts_new): Be global and move to..
18901 * src/state.c, src/state.h: here.
18902 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
18903 * src/print_graph: Adjust.
18904
18905 2001-12-05 Akim Demaille <akim@epita.fr>
18906
18907 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
18908 * src/conflicts.c: Use it.
18909 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
18910 incorrectly ``simplified''.
18911
18912 2001-12-05 Akim Demaille <akim@epita.fr>
18913
18914 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
18915 using the good o' techniques: arrays not pointers, variable
18916 locality, BITISSET, RESETBIT etc.
18917
18918 2001-12-05 Akim Demaille <akim@epita.fr>
18919
18920 * src/state.h (SHIFT_SYMBOL): New.
18921 * src/conflicts.c: Use it to deobfuscate.
18922
18923 2001-12-05 Akim Demaille <akim@epita.fr>
18924
18925 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
18926 (print_reductions): De-obfuscate using the good o' techniques:
18927 arrays not pointers, variable locality, BITISSET.
18928
18929 2001-12-05 Akim Demaille <akim@epita.fr>
18930
18931 * src/conflicts.c (print_reductions): Arrays, not pointers.
18932 Use BITISSET.
18933
18934 2001-12-05 Akim Demaille <akim@epita.fr>
18935
18936 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18937
18938 2001-12-05 Akim Demaille <akim@epita.fr>
18939
18940 * src/conflicts.c (print_reductions): Improve variable locality.
18941
18942 2001-12-05 Akim Demaille <akim@epita.fr>
18943
18944 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18945
18946 2001-12-05 Akim Demaille <akim@epita.fr>
18947
18948 * src/conflicts.c (print_reductions): Improve variable locality.
18949
18950 2001-12-05 Akim Demaille <akim@epita.fr>
18951
18952 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
18953 * src/lalr.c: Use them.
18954
18955 2001-12-05 Akim Demaille <akim@epita.fr>
18956
18957 * src/LR0.c (augment_automaton): Formatting changes.
18958 Better variable locality.
18959
18960 2001-12-05 Akim Demaille <akim@epita.fr>
18961
18962 * src/lalr.c (matrix_print): New.
18963 (transpose): Use it.
18964 Use arrays instead of pointers.
18965
18966 2001-12-05 Akim Demaille <akim@epita.fr>
18967
18968 * src/lalr.c (maxrhs): Move to...
18969 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
18970 * src/lalr.c (build_relations): Adjust.
18971
18972 2001-12-05 Akim Demaille <akim@epita.fr>
18973
18974 * src/lalr.c (transpose): Free the memory allocated to the
18975 argument, as it is replaced by the results by the unique caller.
18976 (build_relations): Merely invoke transpose: it handles the memory
18977 deallocation.
18978 Improve variable locality.
18979 Avoid variables used as mere abbreviations.
18980 (compute_lookaheads): Use arrays instead of pointers.
18981
18982 2001-12-05 Akim Demaille <akim@epita.fr>
18983
18984 * src/lalr.c (initialize_F): Improve variable locality.
18985 Avoid variables used as mere abbreviations.
18986
18987 2001-12-05 Akim Demaille <akim@epita.fr>
18988
18989 * src/derives.c (print_derives): Display the ruleno.
18990 * src/lalr.c (initialize_F, transpose): Better variable locality
18991 to improve readability.
18992 Avoid variables used as mere abbreviations.
18993
18994 2001-12-05 Akim Demaille <akim@epita.fr>
18995
18996 * src/lalr.c (traverse): Use arrays instead of pointers.
18997
18998 2001-12-05 Akim Demaille <akim@epita.fr>
18999
19000 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19001 the handling of squeue.
19002 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19003
19004 2001-12-05 Akim Demaille <akim@epita.fr>
19005
19006 Because useless nonterminals are now kept alive (instead of being
19007 `destroyed'), we now sometimes examine them, and store information
19008 related to them. Hence we need to know their number, and adjust
19009 memory allocations.
19010
19011 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19012 static.
19013 * src/LR0.c (allocate_itemsets): The memory allocated to
19014 `symbol_count' was used for two different purpose: once to count
19015 the number of occurrences of each symbol, and later reassigned to
19016 `shift_symbol', containing the symbol that can be shifted from a
19017 given state.
19018 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19019 only, and...
19020 (new_itemsets): Allocate `shift_symbol' here.
19021 (allocate_itemsets): symbol_count includes useless nonterminals.
19022 Make room for them.
19023 (free_storage): Use `free', not `XFREE', for pointers that cannot
19024 be null.
19025
19026 2001-12-05 Akim Demaille <akim@epita.fr>
19027
19028 * src/nullable.c (set_nullable): Deobfuscate the handling of
19029 ritem.
19030 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19031
19032 2001-12-05 Akim Demaille <akim@epita.fr>
19033
19034 * src/gram.c, src/gram.h (ritem_print): New.
19035 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19036 (This useless function was defined only to work around VMS linkers
19037 that can't handle compilation units with variables only).
19038 * src/reduce.c (dump_grammar): Use it to trace the construction of
19039 ritem.
19040
19041 2001-12-04 Paul Eggert <eggert@twinsun.com>
19042
19043 * src/bison.simple (union yyalloc): Change member names
19044 to be the same as the stack names.
19045 (yyparse): yyptr is now union yyalloc *, not char *.
19046 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19047 and may generate better code on some machines.
19048 (yystpcpy): Use prototype if __STDC__ is defined, not just
19049 if __cplusplus is defined.
19050
19051 2001-11-30 Akim Demaille <akim@epita.fr>
19052
19053 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19054 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19055 Gettext doesn't compile cleanly, and dies with -Werror.
19056 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19057 Include WARNING_CFLAGS here.
19058 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19059 before being defined.
19060
19061 2001-11-27 Paul Eggert <eggert@twinsun.com>
19062
19063 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19064 First arg is int, not unsigned.
19065 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19066 (SIZE_MAX, UINT_MAX): New macros.
19067 (quotearg_n_options): Abort if N is negative.
19068 Avoid overflow check on hosts where size_t is 64 bits and int
19069 is 32 bits, as overflow is impossible there.
19070 Fix off-by-one typo that caused unnecessary reallocation.
19071
19072 2001-11-29 Paul Eggert <eggert@twinsun.com>
19073
19074 Name space cleanup in generated parser.
19075
19076 * doc/bison.texinfo (Bison Parser): Discuss system headers
19077 and their effect on the user name space.
19078
19079 * src/bison.simple:
19080 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19081 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19082 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19083
19084 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19085 on user names when possible.
19086
19087 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19088 Simplify test for whather <alloca.h> exists.
19089
19090 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19091
19092 (<stdio.h>): Include if YYDEBUG.
19093
19094 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19095 ! defined (yyoverflow) && ! defined (yymemcpy).
19096
19097 (yymemcpy, yyparse): Rename local variables as needed so that
19098 they all begin with 'yy'.
19099
19100 (yystrlen, yystpcpy): New functions.
19101
19102 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19103 All uses changed.
19104
19105 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19106 instead of relying on string.h functions. Use YYSTACK_ALLOC
19107 and YYSTACK_FREE instead of malloc and free.
19108
19109 2001-11-30 Akim Demaille <akim@epita.fr>
19110
19111 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19112 before their first uses.
19113 (YYBISON, YYPURE): Move to the top of the output.
19114
19115 2001-11-30 Akim Demaille <akim@epita.fr>
19116
19117 * tests/reduce.at (Useless Nonterminals): Fix.
19118
19119 2001-11-30 Akim Demaille <akim@epita.fr>
19120
19121 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19122 if body instead of `;' to pacify GCC's warnings.
19123
19124 2001-11-30 Akim Demaille <akim@epita.fr>
19125
19126 Instead of mapping the LHS of unused rules to -1, keep the LHS
19127 valid, but flag the rules as invalid.
19128
19129 * src/gram.h (rule_t): `useful' is a new member.
19130 * src/print.c (print_grammar): Adjust.
19131 * src/derives.c (set_derives): Likewise.
19132 * src/reader.c (packgram, reduce_output): Likewise.
19133 * src/reduce.c (reduce_grammar_tables): Likewise.
19134 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19135
19136 2001-11-30 Akim Demaille <akim@epita.fr>
19137
19138 * src/reduce.c (reduce_output): Formatting changes.
19139 * src/print.c (print_results, print_grammar): Likewise.
19140 * tests/regression.at (Rule Line Numbers)
19141 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19142
19143 2001-11-30 Akim Demaille <akim@epita.fr>
19144
19145 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19146 useless nonterminals, move them at the end of the symbol arrays.
19147 (reduce_output): Adjust.
19148 * tests/reduce.at (Useless Nonterminals): Adjust.
19149
19150 2001-11-30 Akim Demaille <akim@epita.fr>
19151
19152 * src/reduce.c: Various comment/formatting changes.
19153 (nonterminals_reduce): New, extracted from...
19154 (reduce_grammar_tables): here.
19155 (reduce_grammar): Call nonterminals_reduce.
19156
19157 2001-11-29 Paul Eggert <eggert@twinsun.com>
19158
19159 * src/bison.simple (YYSTACK_REALLOC): Remove.
19160 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19161 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19162 New macros.
19163 (union yyalloc): New type.
19164 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19165 an arbitrary restriction on hosts where size_t is wider than int.
19166
19167 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19168 a parser stack overflow. Allocate just one block of memory for all
19169 three stacks, instead of allocating three blocks; this typically is
19170 faster and reduces fragmentation.
19171
19172 Do not limit the number of items in the stack to a value that fits
19173 in 'int', as this is an arbitrary limit on hosts with 64-bit
19174 size_t and 32-bit int.
19175
19176 2001-11-29 Marc Autret <autret_m@epita.fr>
19177
19178 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19179 of defining YYERROR_VERBOSE.
19180 [AT_DATA]: $4 is now out of C declarations in the prologue.
19181
19182 2001-11-28 Marc Autret <autret_m@epita.fr>
19183
19184 * src/reader.c (parse_dquoted_param): New.
19185 (parse_skel_decl): Use it.
19186 * src/lex.h: Add its prototype.
19187 * src/lex.c (literalchar): Become not static.
19188
19189 2001-11-28 Marc Autret <autret_m@epita.fr>
19190
19191 * src/output.h: And put its extern declaration here.
19192 * src/output.c (error_verbose): Define here.
19193 (prepare): Echo name modification.
19194 * src/getargs.h: Clean its extern declaration.
19195 * src/getargs.c (error_verbose_flag): Remove.
19196 (getargs): Remove case 'e'.
19197 * src/options.c (option_table): 'error-verbose' is now seen as simple
19198 percent option.
19199 Include output.h.
19200
19201 * src/reader.c (read_declarations): Remove case tok_include.
19202 (parse_include_decl): Remove.
19203 * src/lex.h (token_t): Remove tok_include.
19204 * src/options.c (option_table): 'include' is now a simple command line
19205 option.
19206
19207 2001-11-28 Marc Autret <autret_m@epita.fr>
19208
19209 * src/bison.simple: Adjust muscle names.
19210 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19211 * src/output.c (prepare): s/_/-/ for the muscles names.
19212 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19213
19214 2001-11-28 Marc Autret <autret_m@epita.fr>
19215
19216 * src/bison.simple: Fix debug.
19217 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19218
19219 2001-11-28 Akim Demaille <akim@epita.fr>
19220
19221 * src/LR0.c (shifts_new): New.
19222 (save_shifts, insert_start_shift, augment_automaton): Use it.
19223
19224 2001-11-28 Akim Demaille <akim@epita.fr>
19225
19226 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19227 keep ruleno only.
19228
19229 2001-11-28 Akim Demaille <akim@epita.fr>
19230
19231 * src/closure.c (closure): Instead of looping over word in array
19232 then bits in words, loop over bits in array.
19233
19234 2001-11-28 Akim Demaille <akim@epita.fr>
19235
19236 * src/closure.c (closure): No longer optimize the special case
19237 where all the bits of `ruleset[r]' are set to 0, to make the code
19238 clearer.
19239
19240 2001-11-28 Akim Demaille <akim@epita.fr>
19241
19242 * src/closure.c (closure): `r' and `c' are new variables, used to
19243 de-obfuscate accesses to RULESET and CORE.
19244
19245 2001-11-28 Akim Demaille <akim@epita.fr>
19246
19247 * src/reduce.c (reduce_print): Use ngettext.
19248 (dump_grammar): Improve the trace accuracy.
19249
19250 2001-11-28 Akim Demaille <akim@epita.fr>
19251
19252 * src/reduce.c (dump_grammar): Don't translate trace messages.
19253
19254 2001-11-28 Akim Demaille <akim@epita.fr>
19255
19256 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19257 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19258 as all tags are free'ed afterwards.
19259 From Enrico Scholz.
19260
19261 2001-11-27 Paul Eggert <eggert@twinsun.com>
19262
19263 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19264 use alloca when we didn't want to, and vice versa.
19265
19266 2001-11-27 Marc Autret <autret_m@epita.fr>
19267
19268 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19269 initialization.
19270 * src/output.c (prepare): Remove its update.
19271
19272 2001-11-27 Marc Autret <autret_m@epita.fr>
19273
19274 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19275 Use %error-verbose.
19276
19277 2001-11-27 Marc Autret <autret_m@epita.fr>
19278
19279 * src/bison.simple: Remove YYERROR_VERBOSE using.
19280 Use %%error_verbose.
19281 (yyparse): Likewise.
19282 * src/output.c (prepare): Give its final value.
19283 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19284 * src/getargs.h: Add its extern declaration.
19285 * src/getargs.c (error_verbose_flag): New int.
19286 (getargs): Update to catch new case.
19287 * src/options.c (option_table): 'error-verbose' is a new option.
19288 (shortopts): Update.
19289
19290 2001-11-27 Akim Demaille <akim@epita.fr>
19291
19292 * src/system.h: Use intl/libgettext.h.
19293 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19294
19295 2001-11-27 Akim Demaille <akim@epita.fr>
19296
19297 * tests/torture.at (Exploding the Stack Size with Malloc):
19298 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19299
19300 2001-11-27 Akim Demaille <akim@epita.fr>
19301
19302 * src/files.c: Include error.h.
19303 Reported by Hans Aberg.
19304
19305 2001-11-26 Marc Autret <autret_m@epita.fr>
19306
19307 * src/reader.c (parse_include_decl): New, not yet implemented.
19308 (read_declarations): Add case tok_include.
19309 * src/getargs.h (include): Add its extern definition.
19310 * src/getargs.c (include): New const char *.
19311 (getargs): Add case '-I'.
19312 * src/options.c (option_table): Add include as command line and
19313 percent option.
19314 * src/lex.h (token_t): Add tok_include.
19315
19316 2001-11-26 Akim Demaille <akim@epita.fr>
19317
19318 * src/reader.c (readgram): Make sure rules for mid-rule actions
19319 have a lineno equal to that of their host rule.
19320 Reported by Hans Aberg.
19321 * tests/regression.at (Rule Line Numbers): New.
19322
19323 2001-11-26 Akim Demaille <akim@epita.fr>
19324
19325 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19326 size_ts.
19327
19328 2001-11-26 Akim Demaille <akim@epita.fr>
19329
19330 * src/complain.c, src/complain.h (error): Remove, provided by
19331 lib/error.[ch].
19332
19333 2001-11-26 Akim Demaille <akim@epita.fr>
19334
19335 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19336 issue an error message.
19337 * tests/regression.at (Invalid %directive): New.
19338 Reported by Hans Aberg.
19339
19340 2001-11-26 Akim Demaille <akim@epita.fr>
19341
19342 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19343 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19344
19345 2001-11-26 Akim Demaille <akim@epita.fr>
19346
19347 * src/conflicts.c (conflicts_print): Don't complain at all when
19348 there are no reduce/reduce conflicts, and as many shift/reduce
19349 conflicts as expected.
19350 * tests/regression.at (%expect right): Adjust.
19351
19352 2001-11-23 Akim Demaille <akim@epita.fr>
19353
19354 * lib/alloca.c: Update, from fileutils.
19355
19356 2001-11-23 Akim Demaille <akim@epita.fr>
19357
19358 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19359
19360 2001-11-23 Akim Demaille <akim@epita.fr>
19361
19362 * src/system.h: Include alloca.h.
19363 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19364
19365 2001-11-23 Akim Demaille <akim@epita.fr>
19366
19367 * src/print_graph.c (print_actions): Remove `rule', unused.
19368 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19369 pacify GCC's signed < unsigned warnings.
19370 * src/closure.c (itemsetsize): Likewise.
19371 * src/reader.c (symbol_list_new): Static.
19372
19373 2001-11-23 Akim Demaille <akim@epita.fr>
19374
19375 Attaching lineno to buckets is stupid, since only one copy of each
19376 symbol is kept, only the line of the first occurrence is kept too.
19377
19378 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19379 * src/reader.c (rline_allocated): Remove, unused.
19380 (symbol_list): Have a `line' member.
19381 (symbol_list_new): New.
19382 (readgram): Use it.
19383 * src/print.c (print_grammar): Output the rule line numbers.
19384 * tests/regression.at (Solved SR Conflicts)
19385 (Unresolved SR Conflicts): Adjust.
19386 Reported by Hans Aberg.
19387
19388 2001-11-22 Marc Autret <autret_m@epita.fr>
19389
19390 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19391
19392 2001-11-22 Marc Autret <autret_m@epita.fr>
19393
19394 * src/muscle_tab.c (muscle_init): Remove initialization of
19395 skeleton muscle.
19396 * src/output.c (output_master_parser): Do it here.
19397
19398 2001-11-20 Akim Demaille <akim@epita.fr>
19399
19400 * po/sv.po: New.
19401 * configure.in (ALL_LINGUAS): Adjust.
19402 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19403 longer contains strings to translate.
19404
19405 2001-11-19 Akim Demaille <akim@epita.fr>
19406
19407 * src/conflicts.c (conflicts_print): Add a missing \n.
19408
19409 2001-11-19 Akim Demaille <akim@epita.fr>
19410
19411 * src/nullable.c (nullable_print): New.
19412 (set_nullable): Call it when tracing.
19413 Better locality of variables.
19414
19415 2001-11-19 Akim Demaille <akim@epita.fr>
19416
19417 * src/print.c (print_actions): Better locality of variables.
19418
19419 2001-11-19 Akim Demaille <akim@epita.fr>
19420
19421 * src/derives.c (print_derives): Fix and enrich.
19422 * src/closure.c (print_fderives): Likewise.
19423
19424 2001-11-19 Akim Demaille <akim@epita.fr>
19425
19426 * src/closure.c (itemsetend): Remove, replaced with...
19427 (itemsetsize): new.
19428
19429 2001-11-19 Akim Demaille <akim@epita.fr>
19430
19431 * src/LR0.c (kernel_end): Remove, replaced with...
19432 (kernel_size): new.
19433
19434 2001-11-19 Akim Demaille <akim@epita.fr>
19435
19436 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19437 to clarify.
19438
19439 2001-11-19 Akim Demaille <akim@epita.fr>
19440
19441 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19442
19443 2001-11-19 Akim Demaille <akim@epita.fr>
19444
19445 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19446 trace messages.
19447 * src/LR0.c: Likewise.
19448 (allocate_itemsets): Use arrays instead of pointers to clarify.
19449
19450 2001-11-19 Akim Demaille <akim@epita.fr>
19451
19452 * src/getargs.c (statistics_flag): Replace with...
19453 (trace_flag): New.
19454 (longopts): Accept --trace instead of --statistics.
19455 * src/getargs.h, src/options.c: Adjust.
19456 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19457 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19458
19459 2001-11-19 Akim Demaille <akim@epita.fr>
19460
19461 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
19462 pointers to clarify the code.
19463 (save_reductions, save_shifts): Factor common parts of alternatives.
19464
19465 2001-11-19 Akim Demaille <akim@epita.fr>
19466
19467 * src/LR0.c (new_state, get_state): Complete TRACE code.
19468 * src/closure.c: Include `reader.h' to get `tags', needed by the
19469 trace code.
19470 Rename the conditional DEBUG as TRACE.
19471 Output consistently TRACEs to stderr, not stdout.
19472 * src/derives.c: Likewise.
19473 * src/reduce.c: (inaccessable_symbols): Using if is better style
19474 than goto.
19475 Use `#if TRACE' instead of `#if 0' for tracing code.
19476
19477 2001-11-19 Akim Demaille <akim@epita.fr>
19478
19479 * src/system.h (LIST_FREE, shortcpy): New.
19480 * src/LR0.c: Use them.
19481 * src/output.c (free_itemsets, free_reductions, free_shifts):
19482 Remove, replaced by LIST_FREE.
19483
19484 2001-11-19 Akim Demaille <akim@epita.fr>
19485
19486 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19487 (REDUCTIONS_ALLOC): New.
19488 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19489 allocation.
19490
19491 2001-11-19 Akim Demaille <akim@epita.fr>
19492
19493 * src/LR0.c (new_state): Complete trace code.
19494 * src/nullable.c (set_nullable): Don't translate traces.
19495
19496 2001-11-19 Akim Demaille <akim@epita.fr>
19497
19498 * src/print_graph.c (print_core): Better locality of variables.
19499 * src/print.c (print_core): Likewise.
19500
19501 2001-11-19 Akim Demaille <akim@epita.fr>
19502
19503 * src/vcg.c: You do the output, so you are responsible of the
19504 handling of VCG syntax, in particular: use quotearg.
19505 * src/print_graph.c: Don't.
19506 (print_actions): Don't output the actions as part of the nodes,
19507 since that's the job of the edges.
19508 (print_state): Don't output by hand: fill the node description,
19509 and ask for its output.
19510
19511 2001-11-19 Akim Demaille <akim@epita.fr>
19512
19513 * src/bison.simple (yyparse): When verbosely reporting an error,
19514 no longer put additional quotes around token names.
19515 * tests/calc.at: Adjust.
19516
19517 2001-11-19 Akim Demaille <akim@epita.fr>
19518
19519 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19520 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19521 * src/output.c: Adjust.
19522
19523 2001-11-19 Akim Demaille <akim@epita.fr>
19524
19525 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19526 (rule_t): this.
19527 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19528
19529 2001-11-19 Akim Demaille <akim@epita.fr>
19530
19531 * src/gram.h (rule_t): New.
19532 (rule_table): New.
19533 (rrhs, rlhs): Remove, part of state_t.
19534 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19535 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19536 * src/reader.c, src/reduce.c: Adjust.
19537
19538 2001-11-19 Akim Demaille <akim@epita.fr>
19539
19540 * src/reader.c (symbols_output): New, extracted from...
19541 (packsymbols): Here.
19542 (reader): Call it.
19543
19544 2001-11-19 Akim Demaille <akim@epita.fr>
19545
19546 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19547 (maxrhs): this new function.
19548
19549 2001-11-19 Akim Demaille <akim@epita.fr>
19550
19551 * src/lalr.c (F): New macro to access the variable F.
19552 Adjust.
19553
19554 2001-11-19 Akim Demaille <akim@epita.fr>
19555
19556 * src/lalr.h (LA): New macro to access the variable LA.
19557 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19558 * src/lalr.c: Adjust.
19559
19560 2001-11-19 Akim Demaille <akim@epita.fr>
19561
19562 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19563 (set_state_table): handle the `lookaheads' members.
19564
19565 2001-11-19 Akim Demaille <akim@epita.fr>
19566
19567 * src/lalr.h (lookaheads): Removed array, whose contents is now
19568 a member of...
19569 (state_t): this structure.
19570 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19571 Adjust.
19572
19573 2001-11-19 Akim Demaille <akim@epita.fr>
19574
19575 * src/lalr.h (consistent): Removed array, whose contents is now
19576 a member of...
19577 (state_t): this structure.
19578 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19579 Adjust.
19580
19581 2001-11-19 Akim Demaille <akim@epita.fr>
19582
19583 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19584 contents are now members of...
19585 (state_t): this structure.
19586 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19587 Adjust.
19588
19589 2001-11-19 Akim Demaille <akim@epita.fr>
19590
19591 * src/lalr.h (state_t): New.
19592 (state_table): Be a state_t * instead of a core **.
19593 (accessing_symbol): Remove, part of state_t.
19594 * src/lalr.c: Adjust.
19595 (set_accessing_symbol): Merge into...
19596 (set_state_table): this.
19597 * src/print_graph.c, src/conflicts.c: Adjust.
19598
19599 2001-11-14 Akim Demaille <akim@epita.fr>
19600
19601 * tests/calc.at, tests/output.at, tests/regression.at,
19602 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19603 now the tests are run in private dirs, therefore AC_CLEANUP and
19604 family can be simplified to 0-ary.
19605 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19606 use abs. path to find config.h.
19607 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19608 stderr, there can be way too much random noise.
19609 Instead pass -Werror to GCC and rely on the exit status.
19610 Reported by Wolfram Wagner.
19611
19612 2001-11-14 Akim Demaille <akim@epita.fr>
19613
19614 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19615 defined only if yyoverflow is defined, to avoid `warning: unused
19616 variable `yyvs1''.
19617 Reported by The Test Suite.
19618
19619 2001-11-14 Akim Demaille <akim@epita.fr>
19620
19621 * src/print.c: Include reduce.h.
19622 Reported by Hans Aberg.
19623
19624 2001-11-14 Akim Demaille <akim@epita.fr>
19625
19626 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19627 Revert a previous patch: these are really const.
19628 * src/conflicts.c (conflict_report): Additional useless pair of
19629 braces to pacify GCC's warnings for `if () if () {} else {}'.
19630 * src/lex.c (parse_percent_token): Replace equal_offset with
19631 arg_offset.
19632 arg is const.
19633 Be sure to strdup `arg' when used, since there is no reason for
19634 token_buffer not to change.
19635
19636 2001-11-14 Akim Demaille <akim@epita.fr>
19637
19638 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19639 definition.
19640 * src/main.c (main): Use them.
19641 Suggested by Hans Aberg.
19642
19643 2001-11-12 Akim Demaille <akim@epita.fr>
19644
19645 * src/system.h (ngettext): Now that we use ngettext, be sure to
19646 provide a default definition when NLS are not used.
19647
19648 2001-11-12 Akim Demaille <akim@epita.fr>
19649
19650 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
19651 Use @kbd to denote user input.
19652 (Language and Grammar): ANSIfy the example.
19653 Adjust its layout for info/notinfo.
19654 (Location Tracking Calc): Output error messages to stderr.
19655 Output locations in a more GNUtically correct way.
19656 Fix a couple of Englishos.
19657 Adjust @group/@end group pairs.
19658
19659 2001-11-12 Akim Demaille <akim@epita.fr>
19660
19661 %expect was not functioning at all.
19662
19663 * src/conflicts.c (expected_conflicts): Set to -1.
19664 (conflict_report): Use ngettext.
19665 (conflicts_print): Check %expect and make its violation an error.
19666 * doc/bison.texinfo (Expect Decl): Adjust.
19667 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
19668 * tests/regression.at (%expect not enough, %expect right)
19669 (%expect too much): New.
19670
19671 2001-11-12 Akim Demaille <akim@epita.fr>
19672
19673 * tests/regression.at (Conflicts): Rename as...
19674 (Unresolved SR Conflicts): this.
19675 (Solved SR Conflicts): New.
19676
19677 2001-11-12 Akim Demaille <akim@epita.fr>
19678
19679 * src/reduce.c (print_results): Rename as...
19680 (reduce_output): This.
19681 Output to OUT, passed as argument, instead of output_obstack.
19682 (dump_grammar): Likewise.
19683 (reduce_free): New.
19684 Also free V1.
19685 (reduce_grammar): No longer call reduce_output, since...
19686 * src/print.c (print_results): do it.
19687 * src/main.c (main): Call reduce_free;
19688
19689 2001-11-12 Akim Demaille <akim@epita.fr>
19690
19691 * src/conflicts.c (print_reductions): Accept OUT as argument.
19692 Output to it, not to output_obstack.
19693 * src/print.c (print_actions): Adjust.
19694
19695 2001-11-12 Akim Demaille <akim@epita.fr>
19696
19697 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
19698 the result instead of using...
19699 (src_total, rrc_total, src_count, rrc_count): Remove.
19700 (any_conflicts): Remove.
19701 (print_conflicts): Split into...
19702 (conflicts_print, conflicts_output): New.
19703 * src/conflicts.h: Adjust.
19704 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
19705 * src/print.c (print_grammar): Issue `\n' between two rules.
19706 * tests/regression.at (Conflicts): New.
19707 Reported by Tom Lane.
19708
19709 2001-11-12 Akim Demaille <akim@epita.fr>
19710
19711 * tests/regression.at (Invalid input): Remove, duplicate with
19712 ``Invalid input: 1''.
19713
19714 2001-11-12 Akim Demaille <akim@epita.fr>
19715
19716 * tests/torture.at (AT_DATA_STACK_TORTURE)
19717 (Exploding the Stack Size with Alloca)
19718 (Exploding the Stack Size with Malloc): New.
19719
19720 2001-11-12 Akim Demaille <akim@epita.fr>
19721
19722 * src/bison.simple (YYSTACK_REALLOC): New.
19723 (yyparse) [!yyoverflow]: Use it and free the old stack.
19724 Reported by Per Allansson.
19725
19726 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
19727
19728 * src/bison.simple: Define type yystype instead of YYSTYPE, and
19729 define CPP macro, which substitute YYSTYPE by yystype.
19730 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
19731 with yyltype/YYLTYPE. This allows inclusion of the generated
19732 header within the parser if the compiler, such as GGC, accepts
19733 multiple equivalent #defines.
19734 From Akim.
19735
19736 2001-11-05 Akim Demaille <akim@epita.fr>
19737
19738 * src/reader.c (symbols_output): New, extracted from...
19739 (packsymbols): here.
19740 (reader): Adjust.
19741
19742 2001-11-05 Akim Demaille <akim@epita.fr>
19743
19744 * src/lex.c (parse_percent_token): s/quotearg/quote/.
19745
19746 2001-11-05 Akim Demaille <akim@epita.fr>
19747
19748 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
19749 pattern.
19750
19751 2001-11-05 Akim Demaille <akim@epita.fr>
19752
19753 * src/options.h (struct option_table_struct): set_flags is void*.
19754 * src/options.c (longopts): Support `--output' and `%output'.
19755 (usage): Adjust.
19756 * src/lex.h (tok_setopt): Remove, replaced with...
19757 (tok_intopt, tok_stropt): these new guys.
19758 * src/lex.c (getopt.h): Not needed.
19759 (token_buffer, unlexed_token_buffer): Not const.
19760 (percent_table): Promote `-' over `_' in directive names.
19761 Active `%name-prefix', `file-prefix', and `output'.
19762 (parse_percent_token): Accept possible arguments to directives.
19763 Promote `-' over `_' in directive names.
19764
19765 2001-11-04 Akim Demaille <akim@epita.fr>
19766
19767 * doc/bison.texinfo (Decl Summary): Split the list into
19768 `directives for grammars' and `directives for bison'.
19769 Sort'em.
19770 Add description of `%name-prefix', `file-prefix', and `output'.
19771 Promote `-' over `_' in directive names.
19772 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
19773 Simplify the description of `--name-prefix'.
19774 Promote `-' over `_' in directive names.
19775 Promote `--output' over `--output-file'.
19776 Fix the description of `--defines'.
19777 * tests/output.at: Exercise %file-prefix and %output.
19778
19779 2001-11-02 Akim Demaille <akim@epita.fr>
19780
19781 * doc/refcard.tex: Update.
19782
19783 2001-11-02 Akim Demaille <akim@epita.fr>
19784
19785 * src/symtab.h (SUNDEF): New.
19786 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
19787 stand for `uninitialized', instead of 0.
19788 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
19789 * src/lex.c (lex): Adjust.
19790
19791 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
19792 Number it 0.
19793 Let yylex return it instead of a plain 0.
19794 Reported by Dick Streefland.
19795
19796 2001-11-02 Akim Demaille <akim@epita.fr>
19797
19798 * tests/regression.at (Mixing %token styles): New test.
19799
19800 2001-11-02 Akim Demaille <akim@epita.fr>
19801
19802 * src/reader.c (parse_thong_decl): Formatting changes.
19803 (token_translations_init): New, extracted from...
19804 (packsymbols): Here.
19805 Adjust.
19806
19807 2001-11-01 Akim Demaille <akim@epita.fr>
19808
19809 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
19810 Check that `9foo.y' produces correct cpp guards.
19811 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
19812 guards.
19813 Reported by Wwp.
19814
19815 2001-11-01 Akim Demaille <akim@epita.fr>
19816
19817 * tests/regression.at (Invalid input: 2): New.
19818 * src/lex.c (unlexed_token_buffer): New.
19819 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
19820 too.
19821 Reported by Wwp.
19822
19823 2001-11-01 Akim Demaille <akim@epita.fr>
19824
19825 * tests/calc.at: Catch up with 1.30.
19826 * configure.in: Bump to 1.49a.
19827 Adjust to newer Autotest.
19828
19829 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
19830
19831 * src/conflicts.c: Move global variables rrc_total and src_total ...
19832 (print_conflicts): here.
19833 * src/output.c (output): Free global variable user_toknums.
19834 * src/lex.c (token_obstack): Become static.
19835
19836 2001-10-18 Akim Demaille <akim@epita.fr>
19837
19838 * tests/atlocal.in (GCC): Add.
19839 * tests/calc.at: s/m4_match/m4_bmatch/.
19840 s/m4_patsubst/m4_bpatsubst/.
19841 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
19842 * configure.in: AC_SUBST(GCC).
19843
19844 2001-10-14 Marc Autret <autret_m@epita.fr>
19845
19846 * src/options.c (create_long_option_table): Fix.
19847
19848 2001-10-10 Akim Demaille <akim@epita.fr>
19849
19850 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
19851
19852 2001-10-04 Akim Demaille <akim@epita.fr>
19853
19854 * src/reader.c (parse_union_decl): Push the caracters in
19855 union_obstack, not attrs_obstack.
19856
19857 2001-10-04 Akim Demaille <akim@epita.fr>
19858
19859 Merge in the branch 1.29.
19860
19861 * src/reader.c (packsymbols): Use a temporary obstack for
19862 `%%tokendef', since output_stack is already used elsewhere.
19863
19864 2001-10-02 Akim Demaille <akim@epita.fr>
19865
19866 Bump 1.29d.
19867
19868 2001-10-02 Akim Demaille <akim@epita.fr>
19869
19870 Version 1.29c.
19871
19872 2001-10-02 Akim Demaille <akim@epita.fr>
19873
19874 * tests/regression.at (Invalid CPP headers): New.
19875 From Alexander Belopolsky.
19876 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
19877
19878 2001-10-02 Akim Demaille <akim@epita.fr>
19879
19880 * tests/regression.at (Invalid input): New.
19881 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
19882 Reported by Shura.
19883
19884 2001-10-02 Akim Demaille <akim@epita.fr>
19885
19886 * tests/calc.at: Now that --debug works, the tests must be adjusted.
19887
19888 2001-10-02 Akim Demaille <akim@epita.fr>
19889
19890 * src/output.c (output_parser): Assert `skeleton'.
19891 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
19892 systems.
19893 From Shura.
19894
19895 2001-10-01 Marc Autret <autret_m@epita.fr>
19896
19897 * src/lex.h: Echo modifications.
19898 * src/lex.c (unlex): Parameter is now token_t.
19899 From Hans Aberg.
19900
19901 2001-10-01 Marc Autret <autret_m@epita.fr>
19902
19903 * src/main.c: Include lex.h.
19904 From Hans Aberg.
19905
19906 2001-09-29 Akim Demaille <akim@epita.fr>
19907
19908 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
19909
19910 2001-09-28 Akim Demaille <akim@epita.fr>
19911
19912 * tests/testsuite.at: Update to newer Autotest.
19913 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
19914
19915 2001-09-27 Akim Demaille <akim@epita.fr>
19916
19917 Position independent wrapper.
19918
19919 * tests/bison: Remove.
19920 * tests/bison.in: New.
19921 * configure.in: Adjust.
19922
19923 2001-09-27 Paul Eggert <eggert@twinsun.com>
19924
19925 Port quotearg fixes from tar 1.13.24.
19926
19927 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
19928 tm to be declared.
19929 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19930 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19931
19932 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
19933 * m4/mbrtowc.m4: New file.
19934 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
19935 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
19936
19937 2001-09-27 Akim Demaille <akim@epita.fr>
19938
19939 Bump to 1.29c.
19940
19941 2001-09-27 Akim Demaille <akim@epita.fr>
19942
19943 Version 1.29b.
19944
19945 2001-09-25 Akim Demaille <akim@epita.fr>
19946
19947 * src/system.h: Include `xalloc.h'.
19948 Remove it from the C files.
19949 * src/files.c (output_files): Free the obstacks.
19950 * src/lex.c (init_lex): Rename as...
19951 (lex_init): this.
19952 (lex_free): New.
19953 * src/main.c (main): Use it.
19954
19955 2001-09-24 Marc Autret <autret_m@epita.fr>
19956
19957 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
19958 to output informations in fout (FILE*).
19959 (open_graph, close_graph): Likewise.
19960 (output_graph, output_edge, output_node): Likewise.
19961 * src/vcg.h: Update function prototypes.
19962 * src/print_graph.c (print_graph): Open output graph file.
19963 (print_actions): Adjust.
19964 * src/files.h: Remove extern declaration.
19965 * src/files.c: Remove graph_obstack declaration.
19966 (open_files): Remove graph_obstack initialization.
19967 (output_files): Remove graph_obstack saving.
19968
19969 2001-09-24 Marc Autret <autret_m@epita.fr>
19970
19971 * src/files.c (compute_output_file_names): Fix.
19972
19973 2001-09-24 Marc Autret <autret_m@epita.fr>,
19974 Akim Demaille <akim@epita.fr>
19975
19976 * src/reader.c (reader): Remove call to free_symtab ().
19977 * src/main.c (main): Call it here.
19978 Include symtab.h.
19979 * src/conflicts.c (initialize_conflicts): Rename as...
19980 (solve_conflicts): this.
19981 * src/print.c (print_core, print_actions, print_state)
19982 (print_grammar): Dump to a file instead a `output_obstack'.
19983 (print_results): Dump `output_obstack', and then proceed with the
19984 FILE *.
19985 * src/files.c (compute_output_file_names, close_files): New.
19986 (output_files): Adjust.
19987 * src/main.c (main): Adjust.
19988
19989 2001-09-23 Marc Autret <autret_m@epita.fr>
19990
19991 * src/files.c (compute_header_macro): Computes header macro name
19992 from spec_defines_file when given.
19993
19994 2001-09-23 Marc Autret <autret_m@epita.fr>
19995
19996 * src/files.c (output_files): Add default extensions.
19997
19998 2001-09-22 Akim Demaille <akim@epita.fr>
19999
20000 * src/conflicts.c (finalize_conflicts): Rename as...
20001 (free_conflicts): this.
20002
20003 2001-09-22 Akim Demaille <akim@epita.fr>
20004
20005 * src/gram.c (gram_free): Rename back as...
20006 (dummy): this.
20007 (output_token_translations): Free `token_translations'.
20008 * src/symtab.c (free_symtab): Free the tag field.
20009
20010 2001-09-22 Akim Demaille <akim@epita.fr>
20011
20012 Remove `translations' as it is always set to true.
20013
20014 * src/gram.h: Adjust.
20015 * src/reader.c (packsymbols, parse_token_decl): Adjust
20016 * src/print.c (print_grammar): Adjust.
20017 * src/output.c (output_token_translations): Adjust.
20018 * src/lex.c (lex): Adjust.
20019 * src/gram.c: Be sure the set pointers to NULL.
20020 (dummy): Rename as...
20021 (gram_free): this.
20022
20023 2001-09-22 Akim Demaille <akim@epita.fr>
20024
20025 * configure.in: Invoke AM_LIB_DMALLOC.
20026 * src/system.h: Use dmalloc.
20027 * src/LR0.c: Be sure to have pointers initialized to NULL.
20028 (allocate_itemsets): Allocate kernel_items only if needed.
20029
20030 2001-09-22 Akim Demaille <akim@epita.fr>
20031
20032 * configure.in: Bump to 1.29b.
20033 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20034 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20035 need xmalloc.c in calc.y.
20036 From Pascal Bart.
20037
20038 2001-09-21 Akim Demaille <akim@epita.fr>
20039
20040 Version 1.29a.
20041 * Makefile.maint, config/config.guess, config/config.sub,
20042 * config/missing: Update from masters.
20043 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20044 upon package.m4.
20045 * configure.in (ALL_LINGUAS): Add `tr'.
20046
20047 2001-09-21 Akim Demaille <akim@epita.fr>
20048
20049 * tests/Makefile.am (package.m4): Move to...
20050 ($(srcdir)/$(TESTSUITE)): here.
20051
20052 2001-09-20 Akim Demaille <akim@epita.fr>
20053
20054 * src/complain.c: No longer try to be standalone: use system.h.
20055 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20056 * src/complain.h: Likewise.
20057 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20058 Remove the unused variable `n'.
20059 From Albert Chin-A-Young.
20060
20061 2001-09-18 Marc Autret <autret_m@epita.fr>
20062
20063 * doc/bison.1: Update.
20064 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20065 descriptions.
20066 (Option Cross Key): Update.
20067 Add --graph.
20068
20069 2001-09-18 Marc Autret <autret_m@epita.fr>
20070
20071 * tests/regression.at: New test (comment in %union).
20072
20073 2001-09-18 Marc Autret <autret_m@epita.fr>
20074
20075 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20076 do that.
20077 Reported by Keith Browne.
20078
20079 2001-09-18 Marc Autret <autret_m@epita.fr>
20080
20081 * tests/output.at: Add tests for --defines and --graph.
20082
20083 2001-09-18 Marc Autret <autret_m@epita.fr>
20084
20085 * tests/output.at: Removes tests of %{header,src}_extension features.
20086
20087 2001-09-18 Akim Demaille <akim@epita.fr>
20088
20089 * tests/Makefile.am (package.m4): New.
20090 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20091 (_AT_CHECK_CALC_ERROR): Likewise.
20092 Factor the `, ' part of verbose error messages.
20093
20094 2001-09-18 Marc Autret <autret_m@epita.fr>
20095
20096 * src/getargs.c (longopts): Declare --defines and --graph as options
20097 with optional arguments.
20098 * src/files.h: Add extern declarations.
20099 * src/files.c (spec_graph_file, spec_defines_file): New.
20100 (output_files): Update.
20101 Remove CPP-outed code.
20102
20103 2001-09-18 Marc Autret <autret_m@epita.fr>
20104
20105 Turn off %{source,header}_extension feature.
20106
20107 * src/files.c (compute_exts_from_gf): Update.
20108 (compute_exts_from_src): Update.
20109 (output_files): CPP-out useless code.
20110 * src/files.h: Remove {header,source}_extension extern declarations.
20111 * src/reader.c (parse_dquoted_param): CPP-out.
20112 (parse_header_extension_decl): Remove.
20113 (parse_source_extension_decl): Remove.
20114 (read_declarations): Remove cases tok_{hdrext,srcext}.
20115 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20116 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20117
20118 2001-09-10 Akim Demaille <akim@epita.fr>
20119
20120 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20121 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20122 (AT_CHECK_OUTPUT): this.
20123 Merely check ls' exit status, its output is useless.
20124
20125 2001-09-10 Akim Demaille <akim@epita.fr>
20126
20127 * tests/calc.at: Use m4_match.
20128 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20129
20130 2001-09-10 Marc Autret <autret_m@epita.fr>,
20131 Akim Demaille <akim@epita.fr>
20132
20133 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20134 enum color_e.
20135 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20136 to `normal'.
20137 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20138 * src/lex.h: Adjust prototype.
20139 (token_t): Add `tok_undef'.
20140 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20141 (parse_percent_token): Now returns token_t.
20142 Add default statement in switch.
20143 (lex): Separate `c' as an input variable, from the token_t result
20144 part.
20145 (unlexed): Is a token_t.
20146
20147 2001-09-10 Akim Demaille <akim@epita.fr>
20148
20149 * configure.in: Bump to 1.29a.
20150
20151 2001-09-07 Akim Demaille <akim@epita.fr>
20152
20153 Version 1.29.
20154
20155 2001-08-30 Akim Demaille <akim@epita.fr>
20156
20157 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20158 * m4/atconfig.m4: Remove.
20159 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20160 * tests/bison: New.
20161 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20162 m4_if, m4_patsubst, and m4_regexp.
20163 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20164 `input' file instead of echo.
20165
20166 2001-08-29 Akim Demaille <akim@epita.fr>
20167
20168 Bump to 1.28e.
20169
20170 2001-08-29 Akim Demaille <akim@epita.fr>
20171
20172 Version 1.28d.
20173
20174 2001-08-29 Paul Eggert <eggert@twinsun.com>
20175
20176 * src/bison.simple (yyparse): Don't take the address of an
20177 item before the start of an array, as that doesn't conform to
20178 the C Standard.
20179
20180 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20181
20182 * doc/bison.texinfo (Location Tracking Calc): New node.
20183
20184 2001-08-29 Paul Eggert <eggert@twinsun.com>
20185
20186 * src/output.c (output): Do not define const, as this now
20187 causes more problems than it cures.
20188
20189 2001-08-29 Akim Demaille <akim@epita.fr>
20190
20191 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20192 the nodes.
20193 Be sure to tag the `detailmenu'.
20194
20195 2001-08-29 Akim Demaille <akim@epita.fr>
20196
20197 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20198 download in a tmp dir.
20199
20200 2001-08-28 Marc Autret <autret_m@epita.fr>
20201
20202 * config/depcomp: New file.
20203
20204 2001-08-28 Marc Autret <autret_m@epita.fr>
20205
20206 * doc/bison.1 (mandoc): Adjust.
20207 From Juan Manuel Guerrero.
20208
20209 2001-08-28 Marc Autret <autret_m@epita.fr>
20210
20211 * src/print_graph.c (print_state): Fix.
20212
20213 2001-08-27 Marc Autret <autret_m@epita.fr>
20214
20215 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20216 char * members.
20217 Echo modifications to the functions prototypes.
20218 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20219
20220 2001-08-27 Marc Autret <autret_m@epita.fr>
20221
20222 * src/vcg.c: Include `xalloc.h'.
20223 (add_colorentry): New.
20224 (add_classname): New.
20225 (add_infoname): New.
20226 * src/vcg.h: Add new prototypes.
20227
20228 2001-08-27 Akim Demaille <akim@epita.fr>
20229
20230 * Makefile.maint: Sync. again with CVS Autoconf.
20231
20232 2001-08-27 Akim Demaille <akim@epita.fr>
20233
20234 * Makefile.maint: Formatting changes.
20235 (po-update, cvs-update, update): New targets.
20236 (AMTAR): Remove.
20237
20238 2001-08-27 Akim Demaille <akim@epita.fr>
20239
20240 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20241 * Makefile.maint: Sync. with CVS Autoconf.
20242
20243 2001-08-27 Marc Autret <autret_m@epita.fr>
20244
20245 * src/vcg.h (struct infoname_s): New.
20246 (struct colorentry_s): New.
20247 (graph_s): New fields {vertical,horizontal}_order in structure.
20248 Add `infoname' field.
20249 Add `colorentry' field;
20250 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20251 (G_HORIZONTAL_ORDER): New.
20252 (G_INFONAME): New.
20253 (G_COLORENTRY): New.
20254 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20255 Add output of `infoname'.
20256 Add output of `colorentry'.
20257
20258 2001-08-27 Marc Autret <autret_m@epita.fr>
20259
20260 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20261 This one shadowed a global parameter.
20262
20263 2001-08-24 Marc Autret <autret_m@epita.fr>
20264
20265 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20266 instead of `unsigned'.
20267 (print_state): Do not call obstack_object_size () in obstack_grow ()
20268 to avoid macro variables shadowing.
20269
20270 2001-08-23 Marc Autret <autret_m@epita.fr>
20271
20272 * src/lex.c (percent_table): Typo: s/naem/name/.
20273 Add graph option.
20274 Normalize new options declarations.
20275
20276 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
20277
20278 * tests/suite.at: Exercise %header_extension and %source_extension.
20279
20280 2001-08-16 Marc Autret <autret_m@epita.fr>
20281
20282 * src/reader.c (parse_dquoted_param): New.
20283 (parse_header_extension_decl): Use it.
20284 (parse_source_extension_decl): Likewise.
20285
20286 2001-08-16 Marc Autret <autret_m@epita.fr>
20287
20288 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20289 (get_xxxx_str): Use assert () instead of complain ().
20290 Remove return invokations in default cases.
20291 (get_decision_str): Modify default behaviour. Remove second argument.
20292 Echo modifications on calls.
20293 (output_graph): Fix.
20294
20295 2001-08-16 Marc Autret <autret_m@epita.fr>
20296
20297 * src/getargs.c (usage): Update with ``-g, --graph''.
20298
20299 2001-08-16 Marc Autret <autret_m@epita.fr>
20300
20301 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20302 (Option Cross Key): Likewise.
20303 * doc/bison.1: Update.
20304
20305 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
20306
20307 * src/output.c (output_master_parser): Don't finish action_obstack.
20308 (output_parser): Don't care about the muscle action, here.
20309 (prepare): Copy the action_obstack in the action muscle.
20310 (output): Free action_obstack.
20311
20312 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20313
20314 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20315 will contain `%union' declaration.
20316 (parse_union_decl): Delete #line directive output.
20317 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20318 informations about %union.
20319 (parse_union_decl): Copy the union_obstack in the muscle stype.
20320 * src/bison.simple: Add new #line directive.
20321 Add typdef %%stype YYSTYPE.
20322
20323 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20324
20325 * src/bison.simple: Add new `#line' directive.
20326
20327 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
20328
20329 * src/bison.simple: New `#line' directive.
20330 * src/output.c (output_parser): Support new dynamic muscle input_line.
20331
20332 2001-09-22 Marc Autret <autret_m@epita.fr>
20333
20334 * src/output.c (output_master_parser): New.
20335 (output_parser): Be more re-entrant.
20336
20337 2001-09-21 Marc Autret <autret_m@epita.fr>
20338
20339 * src/reader.c (copy_definition, parse_union_decl): Update and use
20340 `linef' muscle.
20341 (copy_action): Likewise.
20342 Use obstack_1grow ().
20343 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20344
20345 2001-09-21 Marc Autret <autret_m@epita.fr>
20346
20347 * src/options.c (option_table): Adjust.
20348 * src/lex.c (parse_percent_token): Fix.
20349
20350 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20351
20352 * src/options.c (symtab.h): Include it, need by lex.h.
20353
20354 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20355
20356 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20357 is now an option_table_struct*.
20358 (option_strcmp): New function option_strcmp.
20359 (parse_percent_token): Call option_strcmp.
20360 * src/getargs.c (xalloc.h, options.h): Include it.
20361 (getargs): Call create_long_option_table.
20362 (getargs): Free longopts at the end of the function.
20363 (shortopts): Move in options.c.
20364 * src/options.c (create_long_option_table): New function. Convert
20365 information from option_table to option structure.
20366 * src/reader.c (options.h): Include it.
20367
20368 * src/Makefile.am: Adjust.
20369 * src/options.c (option_table): Create from longopts and percent_table.
20370 * src/getargs.c (longopts): Delete.
20371 * src/lex.c (struct percent_table_struct): Delete.
20372 (percent_table): Delete.
20373 (options.h): Include it.
20374 * src/options.c: Create.
20375 * src/options.h: Create.
20376 Declare enum opt_access_e.
20377 Define struct option_table_struct.
20378
20379 2001-09-20 Marc Autret <autret_m@epita.fr>
20380
20381 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20382 sections of Bison.
20383
20384 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
20385
20386 * src/bison.simple: s/%%filename/%%skeleton.
20387 * src/muscle_tab.c (getargs.h): Include it.
20388 (muscle_init): Insert new muscle skeleton.
20389
20390 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
20391
20392 * src/output.c (output_parser): Delete unused variable actions_dumped.
20393
20394 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
20395
20396 * src/output.c (output): Delete call to reader_output_yylsp.
20397 * src/reader.c (reader): Likewise.
20398 * src/reader.h: Delete declaration of reader_output_yylsp.
20399
20400 2001-09-02 Marc Autret <autret_m@epita.fr>
20401
20402 * src/reader.c: Include muscle_tab.h.
20403 (parse_union_decl): Update.
20404 (parse_macro_decl): Rename parse_muscle_decl.
20405 Update to use renamed functions and variable.
20406 (read_declarations, copy_action, read_additionnal_code, : Updated
20407 with correct variables and functions names.
20408 (packsymbols, reader): Likewise.
20409
20410 * src/reader.h (muscle_obstack): Extern declaration update.
20411
20412 * src/output.c: Include muscle_tab.h
20413 In all functions using macro_insert, change by using muscle_insert ().
20414 (macro_obstack): Rename muscle_obstack.
20415 Echo modifications in the whole file.
20416 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20417 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20418 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20419
20420 * src/muscle_tab.h: Update double inclusion macros.
20421 (macro_entry_s): Rename muscle_entry_s.
20422 Update prototypes.
20423
20424 * src/muscle_tab.c: Include muscle_tab.h.
20425 Rename macro_tabble to muscle_table.
20426 (mhash1, mhash2, mcmp): Use muscle_entry.
20427 (macro_init): Rename muscle_init. Update.
20428 (macro_insert): Rename muscle_insert. Update.
20429 (macro_find): Rename muscle_find. Update.
20430
20431 * src/main.c: Include muscle_tab.h.
20432 (main): Call muscle_init ().
20433 * src/Makefile.am (bison_SOURCES): Echo modifications.
20434
20435 2001-09-02 Marc Autret <autret_m@epita.fr>
20436
20437 Now the files macro_tab.[ch] are named muscle_tab.[ch].
20438
20439 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20440
20441 2001-09-02 Marc Autret <autret_m@epita.fr>
20442
20443 * src/macrotab.c, src/macrotab.h: Remove.
20444
20445 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
20446
20447 * src/reader.c (copy_guard): Use muscle to specify the `#line'
20448 filename.
20449
20450 2001-09-01 Marc Autret <autret_m@epita.fr>
20451
20452 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20453 to an explicit value to activate the feature. We do it here.
20454
20455 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20456
20457 * src/output.c (prepare): Delete the `filename' muscule insertion.
20458 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20459 (parse_union_decl): Likewise.
20460 * src/macrotab.c (macro_init): Initialize filename by infile.
20461
20462 2001-08-31 Marc Autret <autret_m@epita.fr>
20463
20464 * src/bison.simple (YYLSP_NEEDED): New definition.
20465 * src/output.c (prepare): Add macro insertion of `locations_flag'
20466
20467 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20468
20469 * src/output.c (prepare): Delete insertion of previous muscles,
20470 and insert the `prefix' muscles.
20471 * src/macrotab.c (macro_init): Likewise.
20472 (macro_init): Initialization prefix directive by `yy'.
20473 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
20474 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20475 yylval, yydebug, yyerror, yynerrs and yyparse.
20476 New directive `#define' to substitute yydebug, ... with option
20477 name_prefix.
20478
20479 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20480
20481 * src/main.c (main): Standardize.
20482 * src/output.c (output_table_data, output_parser): Likewise.
20483 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20484
20485 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20486
20487 * src/reader.c (read_additionnal_code): Rename %%user_code to
20488 %%epilogue.
20489 * src/output.c (output): Rename %%declarations to %%prologue.
20490 * src/bison.simple: Echo modifications.
20491
20492 2001-08-31 Marc Autret <autret_m@epita.fr>
20493
20494 * src/reader.c (readgram): CleanUp.
20495 (output_token_defines): Likewise.
20496 (packsymbols): Likewise.
20497 (reader): Likewise.
20498 * src/output.c (output): CPP-out useless code.
20499
20500 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20501
20502 * src/reader.c (reader): Delete obsolete call to function
20503 output_trailers and output_headers.
20504 * src/output.h: Remove obsolete functions prototypes of output_headers
20505 and output_trailers.
20506
20507 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
20508
20509 * src/main.c: Include macrotab.h.
20510 * src/macrotab.h (macro_entry_s): Constify fields.
20511 Adjust functions prototypes.
20512 * src/macrotab.c (macro_insert): Constify key and value.
20513 (macro_find): Constify key.
20514 (macro_insert): Include 'xalloc.h'
20515 (macro_insert): Use XMALLOC.
20516 (macro_find): Constify return value.
20517 * src/output.c (output_table_data): Rename table to table_data.
20518 (output_parser): Constify macro_key, macro_value.
20519
20520 2001-08-30 Marc Autret <autret_m@epita.fr>
20521
20522 * src/reader.c (parse_skel_decl): New.
20523 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
20524 * src/lex.h (token_t): New token `tok_skel'.
20525 * src/lex.c (percent_table): Add skeleton option entry.
20526 Standardize.
20527
20528 2001-08-29 Marc Autret <autret_m@epita.fr>
20529
20530 * src/bison.simple: Add %%user_code directive at the end.
20531 * src/reader.c (read_additionnal_code): New.
20532 (reader): Use it.
20533 * src/output.c (output_program): Remove.
20534 (output): Update.
20535
20536 2001-08-28 Marc Autret <autret_m@epita.fr>
20537
20538 * src/output.c (output_actions): Clean up.
20539 (output_gram): CPP-out useless code.
20540 * src/reader.c (reader): Clean up, CPP-out useless code.
20541
20542 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
20543
20544 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
20545 directive.
20546 * src/bison.simple: Add `%%definitions'.
20547
20548 2001-08-28 Marc Autret <autret_m@epita.fr>
20549
20550 * config/depcomp: New file.
20551
20552 2001-08-27 Paul Eggert <eggert@twinsun.com>
20553
20554 * src/bison.simple (yyparse): Don't take the address of an
20555 item before the start of an array, as that doesn't conform to
20556 the C Standard.
20557
20558 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20559
20560 * src/output.c (output): Remove the initialization of the macro
20561 obstack. It was done too late here.
20562
20563 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20564 completely wrong.
20565 (reader): Initialize the macro obstack here, since we need it to grow
20566 '%define' directives.
20567
20568 * src/reader.h: Declare the macro obstack as extern.
20569
20570 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20571
20572 * src/output.c (output_parser): Fix. Store single '%' characters in
20573 the output obstack instead of throwing them away.
20574
20575 2001-08-27 Akim Demaille <akim@epita.fr>
20576
20577 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20578
20579 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20580
20581 * lib/Makefile.am: Adjust.
20582
20583 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20584
20585 * src/bison.simple: Update and add '%%' directives.
20586
20587 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20588
20589 * src/reader.c (reader): Remove calls to 'output_headers' and
20590 'output_trailers'. Remove some C output.
20591 (readgram): Disable a piece of code that was writing a default
20592 definition for 'YYSTYPE'.
20593 (reader_output_yylsp): Remove.
20594 (packsymbols): Output token defintions to a macro.
20595 (copy_definition): Disable C output.
20596
20597 * src/reader.c (parse_macro_decl): New function used to parse macro
20598 declarations.
20599 (copy_string2): Put the body of copy_string into this new function.
20600 Add a parameter to let the caller choose whether he wants to copy the
20601 string delimiters or not.
20602 (copy_string): Be a simple call to copy_string2 with the last argument
20603 bound to true.
20604 (read_declarations): Add case for macro definition.
20605 (copy_identifier): New.
20606 (parse_macro_decl): Read macro identifiers using copy_identifier
20607 rather than lex.
20608
20609 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20610
20611 * src/output.c (prepare): Add prefixed names.
20612 (output_parser): Output semantic actions.
20613 (output_parser): Fix bug on '%%line' directives.
20614
20615 * src/output.c (output_headers): Remove. The C code printed by this
20616 function should now be in the skeletons.
20617 (output_trailers): Remove.
20618 (output): Disable call to 'reader_output_yylsp'.
20619 (output_rule_data): Do not output tables to the table obstack.
20620
20621 * src/output.c: Remove some C dedicated output.
20622 Improve the use of macro and output obstacks.
20623 (output_defines): Remove.
20624
20625 * src/output.c (output_token_translations): Associate 'translate'
20626 table with a macro. No output to the table obstack.
20627 (output_gram): Same for 'rhs' and 'prhs'.
20628 (output_stos): Same for 'stos'.
20629 (output_rule_data): Same for 'r1' and 'r2'.
20630 (token_actions): Same for 'defact'.
20631 (goto_actions): Same for 'defgoto'.
20632 (output_base): Same for 'pact' and 'pgoto'.
20633 (output_table): Same for 'table'.
20634 (output_check): Same for 'check'.
20635
20636 * src/output.c (output_table_data): New function.
20637 (output_short_table): Remove.
20638 (output_short_or_char_table): Remove.
20639
20640 * src/output.c (output_parser): Replace most of the skeleton copy code
20641 with something new. Skeletons are now processed character by character
20642 rather than line by line, and Bison looks for '%%' macros. This is the
20643 first step in making Bison's output process (a lot) more flexible.
20644 (output_parser): Use the macro table.
20645
20646 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20647
20648 * src/main.c (main): Initialize the macro table.
20649
20650 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20651
20652 * src/lex.c (percent_table): Add tok_define.
20653 * src/lex.h: Add tok_define.
20654
20655 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20656
20657 * src/macrotab.c: New file.
20658 * src/macrotab.h: New file.
20659 * src/Makefile.am: Update.
20660
20661 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20662
20663 * lib/hash.c: New file.
20664 * lib/hash.h: New file.
20665 * lib/Makefile.am: Update.
20666
20667 2001-08-15 Akim Demaille <akim@epita.fr>
20668
20669 Version 1.28c.
20670
20671 2001-08-15 Marc Autret <autret_m@epita.fr>
20672
20673 * src/reader.c (readgram): Indent output macro YYSTYPE.
20674 (packsymbols): Likewise.
20675 (output_token_defines): Likewise.
20676 * src/files.c: Standardize.
20677 (compute_header_macro): New.
20678 (defines_obstack_save): New. Use compute_header_macro.
20679 (output_files): Update. Use defines_obstack_save.
20680
20681 2001-08-15 Akim Demaille <akim@epita.fr>
20682
20683 * doc/bison.texinfo (Table of Symbols): Document
20684 YYSTACK_USE_ALLOCA.
20685
20686 2001-08-15 Akim Demaille <akim@epita.fr>
20687
20688 * missing: Update from CVS Automake.
20689 * config/config.guess, config/config.sub, config/texinfo.tex:
20690 Update from gnu.org.
20691
20692 2001-08-15 Akim Demaille <akim@epita.fr>
20693
20694 * Makefile.maint: Sync with CVS Autoconf.
20695
20696 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
20697
20698 * doc/bison.texinfo: Include GNU Free Documentation License from
20699 `fdl.texi'.
20700 * doc/fdl.texi: Add to package.
20701
20702 2001-08-14 Marc Autret <autret_m@epita.fr>
20703
20704 Turn on %{source,header}_extension features.
20705
20706 * src/lex.c (percent_table): Un-CPP out header_extension and
20707 source_extension.
20708 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
20709 (compute_exts_from_src): Remove conditions. It restores priorities
20710 between options.
20711
20712 2001-08-14 Marc Autret <autret_m@epita.fr>
20713
20714 * src/files.c (compute_base_names): Add extensions computing when
20715 `--file-prefix' used.
20716 Standardize function calls.
20717
20718 2001-08-13 Marc Autret <autret_m@epita.fr>
20719
20720 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
20721 defining it (defined but null disables alloca).
20722
20723 2001-08-13 Marc Autret <autret_m@epita.fr>
20724
20725 * src/bison.simple (_yy_memcpy): CPP reformat.
20726
20727 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
20728
20729 * tests/atconfig.in (CPPFLAGS): Fix.
20730
20731 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
20732
20733 * doc/bison.texinfo: Include GNU General Public License from
20734 `gpl.texi'.
20735 * doc/gpl.texi: Add to package.
20736
20737 2001-08-10 Marc Autret <autret_m@epita.fr>
20738
20739 * src/print_graph.h: Fix.
20740 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
20741
20742 2001-08-10 Akim Demaille <akim@epita.fr>
20743
20744 * src/system.h: Provide default declarations for stpcpy, strndup,
20745 and strnlen.
20746
20747 2001-08-10 Robert Anisko <anisko_r@epita.fr>
20748
20749 * doc/bison.texinfo (Locations): Update @$ stuff.
20750
20751 2001-08-09 Robert Anisko <anisko_r@epita.fr>
20752
20753 * src/bison.simple (YYLLOC_DEFAULT): Update.
20754 (yyparse): Adjust.
20755
20756 2001-08-08 Marc Autret <autret_m@epita.fr>
20757
20758 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
20759 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
20760 Reported by Fabrice Bauzac.
20761
20762 2001-08-08 Marc Autret <autret_m@epita.fr>
20763
20764 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
20765 * src/vcg.c (output_node): Fix.
20766 * src/vcg.h: Cleanup.
20767 * src/print_graph.c: Add comments.
20768 (node_output_size): New global variable. Simplify the formatting of
20769 the VCG graph output.
20770 (print_actions): Unused code is now used. It notifies the final state
20771 and no action states in the VCG graph. It also give the reduce actions.
20772 The `shift and goto' edges are red and the `go to state' edges are
20773 blue.
20774 Get the current node name and node_obstack by argument.
20775 (node_obstack): New variable.
20776 (print_state): Manage node_obstack.
20777 (print_core): Use node_obstack given by argument.
20778 A node is not only computed here but in print_actions also.
20779 (print_graph): CPP out useless code instead of commenting it.
20780
20781 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
20782
20783 * tests/atconfig.in (CPPFLAGS): Fix.
20784
20785 2001-08-07 Akim Demaille <akim@epita.fr>
20786
20787 * src/print_graph.c (quote): New.
20788 (print_core): Use it.
20789
20790 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
20791
20792 * src/vcg.c (complain.h): Include it.
20793 Unepitaize `return' invocations.
20794 [NDEBUG] (main): Remove.
20795 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
20796 * src/files.c (open_files): Initialize graph_obstack.
20797 * src/print_graph.c (print_actions): CPP out useless code.
20798 (print_core): Don't output the last `\n' in labels.
20799 Use `quote'.
20800 * src/files.c (output_files): Output the VCG file.
20801 * src/main.c (main): Invoke print_graph ();
20802
20803 2001-08-06 Marc Autret <autret_m@epita.fr>
20804
20805 Automaton VCG graph output.
20806 Using option ``-g'' or long option ``--graph'', you can generate
20807 a gram_filename.vcg file containing a VCG description of the LALR (1)
20808 automaton of your grammar.
20809
20810 * src/main.c: Call to print_graph() function.
20811 * src/getargs.h: Update.
20812 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
20813 (graph_flag): New flag.
20814 (longopts): Update.
20815 (getargs): Add case `g'.
20816 * src/files.c (graph_obstack): New obstack struct.
20817 (open_files): Initialize new obstack.
20818 (output_files): Saves graph_obstack if required.
20819 * src/files.h (graph_obstack): New extern declaration.
20820 * src/Makefile.am: Add new source files.
20821
20822 2001-08-06 Marc Autret <autret_m@epita.fr>
20823
20824 * src/print_graph.c, src/print_graph.h (graph): New.
20825 * src/vcg.h: New file.
20826 * src/vcg.c: New file, VCG graph handling.
20827
20828 2001-08-06 Marc Autret <autret_m@epita.fr>
20829
20830 Add of %source_extension and %header_extension which specify
20831 the source or/and the header output file extension.
20832
20833 * src/files.c (compute_base_names): Remove initialisation of
20834 src_extension and header_extension.
20835 (compute_exts_from_gf): Update.
20836 (compute_exts_from_src): Update.
20837 (output_files): Update.
20838 * src/reader.c (parse_header_extension_decl): New.
20839 (parse_source_extension_decl): New.
20840 (read_declarations): New case statements for the new tokens.
20841 * src/lex.c (percent_table): Add entries for %source_extension
20842 and %header_extension.
20843 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
20844
20845 2001-08-06 Marc Autret <autret_m@epita.fr>
20846
20847 * configure.in: Bump to 1.28c.
20848 * doc/bison.texinfo: Texinfo thingies.
20849
20850 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
20851
20852 * tests/atconfig.in (CPPFLAGS): Add.
20853 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
20854
20855 2001-08-03 Akim Demaille <akim@epita.fr>
20856
20857 Version 1.28b.
20858
20859 2001-08-03 Akim Demaille <akim@epita.fr>
20860
20861 * tests/Makefile.am (check-local): Ship testsuite.
20862 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
20863 Include `string.h'.
20864
20865 2001-08-03 Akim Demaille <akim@epita.fr>
20866
20867 * configure.in: Try using -Wformat when compiling.
20868
20869 2001-08-03 Akim Demaille <akim@epita.fr>
20870
20871 * configure.in: Bump to 1.28b.
20872
20873 2001-08-03 Akim Demaille <akim@epita.fr>
20874
20875 * src/complain.c: Adjust strerror_r portability issues.
20876
20877 2001-08-03 Akim Demaille <akim@epita.fr>
20878
20879 Version 1.28a.
20880
20881 2001-08-03 Akim Demaille <akim@epita.fr>
20882
20883 * src/getargs.c, src/getarg.h (skeleton)): Constify.
20884 * src/lex.c (literalchar): Avoid name clashes on `buf'.
20885 * src/getargs.c: Include complain.h.
20886 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
20887 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
20888
20889 2001-08-03 Akim Demaille <akim@epita.fr>
20890
20891 * src/reader.c (readgram): Display hidden chars in error messages.
20892
20893 2001-08-03 Akim Demaille <akim@epita.fr>
20894
20895 Update to gettext 0.10.39.
20896
20897 2001-08-03 Akim Demaille <akim@epita.fr>
20898
20899 * lib/strspn.c: New.
20900
20901 2001-08-01 Marc Autret <autret_m@epita.fr>
20902
20903 * doc/bison.texinfo: Update.
20904 * doc/bison.1 (mandoc): Update.
20905 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
20906 * src/files.c: Support output files extensions computing.
20907 (src_extension): New static variable.
20908 (header_extension): New static variable.
20909 (tr): New function.
20910 (get_extension_index): New function, gets the index of an extension
20911 filename in a string.
20912 (compute_exts_from_gf): New function, computes extensions from the
20913 grammar file extension.
20914 (compute_exts_from_src): New functions, computes extensions from the
20915 C source file extension, file given by ``-o'' option.
20916 (compute_base_names): Update.
20917 (output_files): Update.
20918
20919 2001-08-01 Robert Anisko <anisko_r@epita.fr>
20920
20921 * doc/bison.texi: Document @$.
20922 (Locations): New section.
20923
20924 2001-07-18 Akim Demaille <akim@epita.fr>
20925
20926 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
20927 * config/prev-version.txt, config/move-if-change: New.
20928 * Makefile.am: Adjust.
20929
20930 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
20931
20932 * src/bison.simple (yyparse): Suppress warning `comparaison
20933 between signed and unsigned'.
20934
20935 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
20936
20937 * src/getargs.h (raw_flag): Remove.
20938 * src/getargs.c: Die on `-r'/`--raw'.
20939 * src/lex.c (parse_percent_token): Die on `%raw'.
20940 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
20941 * tests/calc.at: Suppress test with option `--raw'.
20942
20943 2001-07-14 Akim Demaille <akim@epita.fr>
20944
20945 * config/: New.
20946 * configure.in: Require Autoconf 2.50.
20947 Update to gettext 0.10.38.
20948
20949 2001-03-16 Akim Demaille <akim@epita.fr>
20950
20951 * doc/bison.texinfo: ANSIfy the examples.
20952
20953 2001-03-16 Akim Demaille <akim@epita.fr>
20954
20955 * getargs.c (skeleton): New variable.
20956 (longopts): --skeleton is a new option.
20957 (shortopts, getargs): -S is a new option.
20958 * getargs.h: Declare skeleton.
20959 * output.c (output_parser): Use it.
20960
20961 2001-03-16 Akim Demaille <akim@epita.fr>
20962
20963 * m4/strerror_r.m4: New.
20964 * m4/error.m4: Run AC_FUNC_STRERROR_R.
20965 * lib/error.h, lib/error.c: Update.
20966
20967 2001-03-16 Akim Demaille <akim@epita.fr>
20968
20969 * src/getargs.c (longopts): Clean up.
20970
20971 2001-02-21 Akim Demaille <akim@epita.fr>
20972
20973 * src/reader.c (gensym): `gensym_count' is your own.
20974 Use a static buf to create the symbol name, as token_buffer is no
20975 longer a buffer.
20976
20977 2001-02-08 Akim Demaille <akim@epita.fr>
20978
20979 * src/conflicts.c (conflict_report): Be sure not to append to res
20980 between two calls, which could happen if both first sprintf were
20981 skipped, but not the first cp += strlen.
20982
20983 2001-02-08 Akim Demaille <akim@epita.fr>
20984
20985 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
20986 New, from fileutils 4.0.37.
20987 * configure.in: Require Autoconf 2.49c. I took some time before
20988 making this decision. This is the only way out for portability
20989 issues in Bison, it would mean way too much duplicate effort to
20990 import in Bison features implemented in 2.49c since 2.13.
20991 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
20992
20993 2001-02-02 Akim Demaille <akim@epita.fr>
20994
20995 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
20996 * lib/xalloc.h, lib/xmalloc.c: Update.
20997
20998 2001-01-19 Akim Demaille <akim@epita.fr>
20999
21000 Get rid of the ad hoc handling of token_buffer in the scanner: use
21001 the obstacks.
21002
21003 * src/lex.c (token_obstack): New.
21004 (init_lex): Initialize it. No longer call...
21005 (grow_token_buffer): this. Remove it.
21006 Adjust all the places which used it to use the obstack.
21007
21008 2001-01-19 Akim Demaille <akim@epita.fr>
21009
21010 * src/lex.h: Rename all the tokens:
21011 s/\bENDFILE\b/tok_eof/g;
21012 s/\bIDENTIFIER\b/tok_identifier/g;
21013 etc.
21014 Let them be enums, not #define, to ease debugging.
21015 Adjust all the code.
21016
21017 2001-01-18 Akim Demaille <akim@epita.fr>
21018
21019 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21020 * src/lex.c (maxtoken, grow_token_buffer): Static.
21021
21022 2001-01-18 Akim Demaille <akim@epita.fr>
21023
21024 Since we now use obstacks, more % directives can be enabled.
21025
21026 * src/lex.c (percent_table): Also accept `%yacc',
21027 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21028 `%debug'.
21029 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21030 instead of returning a token.
21031 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21032 * src/reader.c (read_declarations): Adjust.
21033 * src/files.c (open_files): Don't call `compute_base_names', don't
21034 compute `attrsfile' since they depend upon data which might be
21035 *in* the input file now.
21036 (output_files): Do it here.
21037 * src/output.c (output_headers): Document the fact that this patch
21038 introduces a guaranteed SEGV for semantic parsers.
21039 * doc/bison.texinfo: Document them.
21040 * tests/suite.at: Exercise these %options.
21041
21042 2000-12-20 Akim Demaille <akim@epita.fr>
21043
21044 Also handle the output file (--verbose) with obstacks.
21045
21046 * files.c (foutput): Remove.
21047 (output_obstack): New.
21048 Adjust all dependencies.
21049 * src/conflicts.c: Return a string.
21050 * src/system.h (obstack_grow_string): Rename as...
21051 (obstack_sgrow): this. Be ready to work with non literals.
21052 (obstack_fgrow4): New.
21053
21054 2000-12-20 Akim Demaille <akim@epita.fr>
21055
21056 * src/files.c (open_files): Fix the computation of short_base_name
21057 in the case of `-o foo.tab.c'.
21058
21059 2000-12-20 Akim Demaille <akim@epita.fr>
21060
21061 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21062 (copy_dollar): Now that everything uses obstacks, get rid of the
21063 FILE * parameters.
21064
21065 2000-12-20 Akim Demaille <akim@epita.fr>
21066
21067 * src/files.c (open_files): Actually the `.output' file is based
21068 on the short_base_name, not base_name.
21069 * tests/suite.at (Checking output file names): Adjust.
21070
21071 2000-12-20 Akim Demaille <akim@epita.fr>
21072
21073 * src/bison.s1: Remove, we now use directly...
21074 * src/bison.simple: this.
21075 * src/Makefile.am: Use pkgdata instead of data.
21076
21077 2000-12-20 Akim Demaille <akim@epita.fr>
21078
21079 * src/files.c (guard_obstack): New.
21080 (open_files): Initialize it.
21081 (output_files): Dump it...
21082 * src/files.h: Export it.
21083 * src/reader.c (copy_guard): Use it.
21084
21085 2000-12-19 Akim Demaille <akim@epita.fr>
21086
21087 * src/files.c (outfile, defsfile, actfile): Removed as global
21088 vars.
21089 (open_files): Don't compute them.
21090 (output_files): Adjust.
21091 (base_name, short_base_name): Be global.
21092 Adjust dependencies.
21093
21094 2000-12-19 Akim Demaille <akim@epita.fr>
21095
21096 * src/files.c (strsuffix): New.
21097 (stringappend): Be just like strcat but allocate.
21098 (base_names): Eve out from open_files.
21099 Try to simplify the rather hairy computation of base_name and
21100 short_base_name.
21101 (open_files): Use it.
21102 * tests/suite.at (Checking output file names): New test.
21103
21104 2000-12-19 Akim Demaille <akim@epita.fr>
21105
21106 * src/system.h (obstack_grow_literal_string): Rename as...
21107 (obstack_grow_string): this.
21108 * src/output.c (output_parser): Recognize `%% actions' instead of
21109 `$'.
21110 * src/bison.s1: s/$/%% actions/.
21111 * src/bison.hairy: Likewise.
21112
21113 2000-12-19 Akim Demaille <akim@epita.fr>
21114
21115 * src/output.c (output_parser): Compute the `#line' lines when
21116 there are.
21117 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21118 Suggested by Hans Aberg.
21119
21120 2000-12-19 Akim Demaille <akim@epita.fr>
21121
21122 Let the handling of the skeleton files be local to the procedures
21123 that use it.
21124
21125 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21126 longer static.
21127 (fparser, open_extra_files): Remove.
21128 (open_files, output_files): Don't take care of fparser.
21129 * src/files.h: Adjust.
21130 * src/output.c (output_parser): Open and close the file to the
21131 skeleton.
21132 * src/reader.c (read_declarations): When %semantic_parser, open
21133 fguard.
21134
21135 2000-12-19 Akim Demaille <akim@epita.fr>
21136
21137 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21138 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21139
21140 2000-12-19 Akim Demaille <akim@epita.fr>
21141
21142 * src/files.c (open_files): Yipee! We no longer need all the code
21143 looking for `/tmp' since we have no tmp file.
21144
21145 2000-12-19 Akim Demaille <akim@epita.fr>
21146
21147 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21148 New macros.
21149 * src/files.c (open_files): Less dependency on MSDOS etc.
21150
21151 2000-12-14 Akim Demaille <akim@epita.fr>
21152
21153 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21154 Provide a default definition.
21155 Use it when executing the default @ action.
21156 * src/reader.c (reader_output_yylsp): No longer include
21157 `timestamp' and `text' in the default YYLTYPE.
21158
21159 2000-12-12 Akim Demaille <akim@epita.fr>
21160
21161 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21162 (copy_guard): Quote the file names.
21163 Reported by Laurent Mascherpa.
21164
21165 2000-12-12 Akim Demaille <akim@epita.fr>
21166
21167 * src/output.c (output_headers, output_program, output): Be sure
21168 to escape special characters when outputting filenames.
21169 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21170 (output_headers): Don't depend on them, Use ACTSTR.
21171
21172 2000-11-17 Akim Demaille <akim@epita.fr>
21173
21174 * lib/obstack.h: Formatting changes.
21175 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21176 prevents type checking.
21177 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21178 cast the value to (void *): assigning a `foo *' to a `void *'
21179 variable is valid.
21180 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21181 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21182 append characters.
21183
21184 2000-11-17 Akim Demaille <akim@epita.fr>
21185
21186 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21187 as...
21188 (suite.m4, regression.m4, calc.m4): these.
21189 * tests/atgeneral.m4: Update from CVS Autoconf.
21190
21191 2000-11-17 Akim Demaille <akim@epita.fr>
21192
21193 * tests/regression.m4 (%union and --defines): New test,
21194 demonstrating a current bug in the obstack implementation.
21195
21196 2000-11-17 Akim Demaille <akim@epita.fr>
21197
21198 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21199 macros.
21200 Use them to declare the variables which are global or local to
21201 `yyparse'.
21202
21203 2000-11-17 Akim Demaille <akim@epita.fr>
21204
21205 * acconfig.h: Remove, no longer used.
21206
21207 2000-11-07 Akim Demaille <akim@epita.fr>
21208
21209 * src: s/Copyright (C)/Copyright/g.
21210
21211 2000-11-07 Akim Demaille <akim@epita.fr>
21212
21213 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21214 defining.
21215 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21216
21217 2000-11-07 Akim Demaille <akim@epita.fr>
21218
21219 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21220 Merge in a single CPP if/else.
21221
21222 2000-11-07 Akim Demaille <akim@epita.fr>
21223
21224 * src/output.c (output): Remove useless variables.
21225 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21226 argument `data' for consistency with the prototypes.
21227 Qualify it `const'.
21228 (obstack_copy, obstack_copy0): Rename the second argument as
21229 `address' for consistency. Qualify it `const'.
21230 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21231 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21232 `const' their input argument (`data' or `address').
21233 Adjust the corresponding macros to include `const' in casts.
21234
21235 2000-11-03 Akim Demaille <akim@epita.fr>
21236
21237 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21238 s/PFILE1/BISON_HAIRY/.
21239 Adjust dependencies.
21240
21241 2000-11-03 Akim Demaille <akim@epita.fr>
21242
21243 For some reason, this was not applied.
21244
21245 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21246 `unlink': it's no longer used.
21247
21248 2000-11-03 Akim Demaille <akim@epita.fr>
21249
21250 * src/files.c (skeleton_find): New function, eved out of...
21251 (open_files, open_extra_files): here.
21252
21253 2000-11-03 Akim Demaille <akim@epita.fr>
21254
21255 Don't use `atexit'.
21256
21257 * src/files.c (obstack_save): New function.
21258 (done): Rename as...
21259 (output_files): this.
21260 Use `obstack_save'.
21261 * src/main.c (main): Don't use `atexit' to register `done', since
21262 it no longer has to remove tmp files, just call `output_files'
21263 when there are no errors.
21264
21265 2000-11-02 Akim Demaille <akim@epita.fr>
21266
21267 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21268 `unlink': it's no longer used.
21269 * src/files.h: Formatting changes.
21270
21271 2000-11-02 Akim Demaille <akim@epita.fr>
21272
21273 Remove the last uses of mktemp and unlink/delete.
21274
21275 * src/files.c (fdefines, ftable): Removed.
21276 (defines_ostack, table_obstack): New.
21277 Adjust dependencies of the former into uses of the latter.
21278 * src/output.c (output_short_or_char_table, output_short_table):
21279 Convert to using obstacks.
21280 * src/reader.c (copy_comment2): Accept one FILE * and two
21281 obstacks.
21282 (output_token_defines, reader_output_yylsp): Use obstacks.
21283 * src/system.h (obstack_fgrow3): New.
21284 * po/POTFILES.in: Adjust.
21285
21286 2000-11-01 Akim Demaille <akim@epita.fr>
21287
21288 Change each use of `fattrs' into a use of `attrs_obstack'.
21289
21290 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21291 * src/files.c (fattrs): Remove.
21292 (attrs_obstack): New.
21293 Adjust all dependencies.
21294 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21295
21296 2000-11-01 Akim Demaille <akim@epita.fr>
21297
21298 Introduce obstacks.
21299 Change each use of `faction' into a use of `action_obstack'.
21300
21301 * lib/obstack.h, lib/obstack.c: New files.
21302 * src/files.c (faction): Remove.
21303 (action_obstack): New.
21304 Adjust all dependencies.
21305
21306 2000-10-20 Akim Demaille <akim@epita.fr>
21307
21308 * lib/quote.h (PARAMS): New macro. Use it.
21309
21310 2000-10-16 Akim Demaille <akim@epita.fr>
21311
21312 * src/output.c (output_short_or_char_table): New function.
21313 (output_short_table, output_token_translations): Use it.
21314 (goto_actions): Use output_short_table.
21315
21316 2000-10-16 Akim Demaille <akim@epita.fr>
21317
21318 * src/symtab.c (bucket_new): New function.
21319 (getsym): Use it.
21320
21321 * src/output.c (output_short_table): New argument to display the
21322 comment associated with the table.
21323 Adjust dependencies.
21324 (output_gram): Use it.
21325 (output_rule_data): Nicer output layout for YYTNAME.
21326
21327 2000-10-16 Akim Demaille <akim@epita.fr>
21328
21329 * src/lex.c (read_typename): New function.
21330 (lex): Use it.
21331 * src/reader.c (copy_dollar): Likewise.
21332
21333 2000-10-16 Akim Demaille <akim@epita.fr>
21334
21335 * src/reader.c (copy_comment2): Expect the input stream to be on
21336 the `/' which is suspected to open a comment, instead of being
21337 called after `//' or `/*' was read.
21338 (copy_comment, copy_definition, parse_union_decl, copy_action)
21339 (copy_guard): Adjust.
21340
21341 2000-10-16 Akim Demaille <akim@epita.fr>
21342
21343 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21344 `read_signed_integer'.
21345
21346 2000-10-16 Akim Demaille <akim@epita.fr>
21347
21348 * src/reader.c (copy_dollar): New function.
21349 (copy_guard, copy_action): Use it.
21350
21351 2000-10-16 Akim Demaille <akim@epita.fr>
21352
21353 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21354 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21355 New files, from Fileutils 4.0.27.
21356 * src/main.c (printable_version): Remove.
21357 * src/lex.c, src/reader.c: Use `quote'.
21358
21359 2000-10-04 Akim Demaille <akim@epita.fr>
21360
21361 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21362
21363 2000-10-04 Akim Demaille <akim@epita.fr>
21364
21365 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21366
21367 2000-10-04 Akim Demaille <akim@epita.fr>
21368
21369 When a literal string is used to define two different tokens,
21370 `bison -v' segfaults.
21371 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21372
21373 * tests/regression.m4: New file.
21374 Include the core of the sample provided by Piotr Gackiewicz.
21375 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21376 properly.
21377
21378 2000-10-04 Akim Demaille <akim@epita.fr>
21379
21380 * src/reader.c (parse_expect_decl): Keep `count' within the size
21381 of `buffer'.
21382 From Neil Booth.
21383
21384 2000-10-02 Paul Eggert <eggert@twinsun.com>
21385
21386 * bison.s1 (yyparse): Assign the default value
21387 unconditionally, to avoid a GCC warning and make the parser a
21388 tad smaller.
21389
21390 2000-10-02 Akim Demaille <akim@epita.fr>
21391
21392 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21393 options.
21394
21395 2000-10-02 Akim Demaille <akim@epita.fr>
21396
21397 * src/derives.c, src/print.c, src/reduce.c: To ease the
21398 translation, move some `\n' out of the translated strings.
21399
21400 2000-10-02 Akim Demaille <akim@epita.fr>
21401
21402 The location tracking mechanism is precious for parse error
21403 messages. Nevertheless, it is enabled only when `@n' is used in
21404 the grammar, which is a different issue (you can use it in error
21405 message, but not in the grammar per se). Therefore, there should
21406 be another means to enable it.
21407
21408 * src/getargs.c (getargs): Support `--locations'.
21409 (usage): Report it.
21410 * src/getargs.h (locationsflag): Export it.
21411 * src/lex.c (percent_table): Support `%locations'.
21412 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21413 with `locationsflag'.
21414 * doc/bison.texinfo: Document `--locations' and `%locations'.
21415 Sort the options.
21416 * tests/calc.m4: Test it.
21417
21418 For regularity of the names, replace each
21419 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21420 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21421 In addition replace each `flag' with `_flag'.
21422
21423 2000-10-02 Akim Demaille <akim@epita.fr>
21424
21425 Also test parse error messages, including with YYERROR_VERBOSE.
21426
21427 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21428 associative).
21429 Use it to check the computations.
21430 Use it to check `nonassoc' is honored.
21431 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21432 `--yyerror-verbose'.
21433 (_AT_CHECK_CALC): Adjust to this option.
21434 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21435
21436 2000-10-02 Akim Demaille <akim@epita.fr>
21437
21438 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21439 the latter demonstrates a flaw in the handling of non debugging
21440 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21441 was used in order to simplify:
21442
21443 #if YYDEBUG
21444 if (yydebug)
21445 {
21446 ...
21447 }
21448 #endif
21449
21450 into
21451
21452 if (yydebug)
21453 {
21454 ...
21455 }
21456
21457 unfortunately this leads to a CPP conflict when
21458 `--name-prefix=foo' is used since it produces `#define yydebug
21459 foodebug'.
21460
21461 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21462 (YYDPRINTF): New macro.
21463 Spread its use.
21464 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21465 the bison options.
21466 Also test `--verbose', `--defines' and `--name-prefix'.
21467
21468 2000-10-02 Akim Demaille <akim@epita.fr>
21469
21470 Improve the readability of the produced parsers.
21471
21472 * src/bison.s1: Formatting changes.
21473 Improve the comment related to the `$' mark.
21474 (yydefault): Don't fall through to `yyresume': `goto' there.
21475 * src/output.c (output_parser): When the `$' is met, skip the end
21476 of its line.
21477 New variable, `number_of_dollar_signs', to check there's exactly
21478 one `$' in the parser skeleton.
21479
21480 2000-10-02 Akim Demaille <akim@epita.fr>
21481
21482 * lib/xstrdup.c: New file, from the fileutils.
21483 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21484 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21485 instead of strlen + xmalloc + strcpy.
21486 * src/symtab.c (copys): Remove, use xstrdup instead.
21487
21488 2000-10-02 Akim Demaille <akim@epita.fr>
21489
21490 * src/gram.h (associativity): New enum type which replaces the
21491 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21492 `right_assoc', `left_assoc' and `non_assoc'.
21493 Adjust all dependencies.
21494 * src/reader.c: Formatting changes.
21495 (LTYPESTR): Don't define it, use it as a literal in
21496 `reader_output_yylsp'.
21497 * src/symtab.h (symbol_class): New enum type which replaces the
21498 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21499 `sunknown', `stoken and `snterm'.
21500
21501 2000-10-02 Akim Demaille <akim@epita.fr>
21502
21503 * src/getargs.c (fixed_outfiles): Rename as...
21504 (yaccflag): for consistency and accuracy.
21505 Adjust dependencies.
21506
21507 2000-10-02 Akim Demaille <akim@epita.fr>
21508
21509 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21510 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21511 difficult and introduced a lot of core dump. It turns out that
21512 Bison used an implementation of `xmalloc' based on `calloc', and
21513 at various places it does depend upon the initialization to 0. I
21514 have not tried to isolate the pertinent places, and all the former
21515 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21516 someone should address this issue.
21517
21518 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21519 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21520 files.
21521 Adjust dependencies.
21522 * src/warshall.h: New file.
21523 Propagate.
21524
21525 2000-10-02 Akim Demaille <akim@epita.fr>
21526
21527 Various anti-`extern in *.c' changes.
21528
21529 * src/system.h: Include `assert.h'.
21530
21531 2000-10-02 Akim Demaille <akim@epita.fr>
21532
21533 * src/state.h (nstates, final_state, first_state, first_shift)
21534 (first_reduction): Move their exportation from here...
21535 * src/LR0.h: to here.
21536 Adjust dependencies.
21537 * src/getargs.c (statisticsflag): New variable.
21538 Add support for `--statistics'.
21539 Adjust dependencies.
21540
21541 Remove a lot of now useless `extern' statements in most files.
21542
21543 2000-10-02 Akim Demaille <akim@epita.fr>
21544
21545 * src/LR0.h: New file.
21546 Propagate its use.
21547
21548 2000-10-02 Akim Demaille <akim@epita.fr>
21549
21550 * src/print.h: New file.
21551 Propagate its use.
21552 * src/print.c: Formatting and ordering changes.
21553 (verbose, terse): Replace with...
21554 (print_results): this new function.
21555 Adjust dependencies.
21556
21557 2000-10-02 Akim Demaille <akim@epita.fr>
21558
21559 * src/conflicts.c (conflict_report): New function.
21560 (conflict_log, verbose_conflict_log): Replace with...
21561 (print_conflicts): this function.
21562 Adjust dependencies.
21563 * src/conflicts.h: New file.
21564 Propagate its inclusion.
21565
21566 2000-10-02 Akim Demaille <akim@epita.fr>
21567
21568 * src/nullable.h: New file.
21569 Propagate its inclusion.
21570 * src/nullable.c: Formatting changes.
21571
21572 2000-10-02 Akim Demaille <akim@epita.fr>
21573
21574 * src/reduce.h: New file.
21575 Propagate its inclusion.
21576 * src/reduce.c: Topological sort and other formatting changes.
21577 (bool, TRUE, FALSE): Move their definition to...
21578 * src/system.h: here.
21579
21580 2000-10-02 Akim Demaille <akim@epita.fr>
21581
21582 * src/files.c: Formatting changes.
21583 (tryopen, tryclose, openfiles): Rename as...
21584 (xfopen, xfclose, open_files): this.
21585 (stringappend): static.
21586 * src/files.h: Complete the list of exported symbols.
21587 Propagate its use.
21588
21589 2000-10-02 Akim Demaille <akim@epita.fr>
21590
21591 * src/reader.h: New file.
21592 Propagate its use instead of tedious list of `extern' and
21593 prototypes.
21594 * src/reader.c: Formatting changes, topological sort,
21595 s/register//.
21596
21597 2000-10-02 Akim Demaille <akim@epita.fr>
21598
21599 * src/lex.h: Prototype `lex.c' exported functions.
21600 * src/reader.c: Adjust.
21601 * src/lex.c: Formatting changes.
21602 (safegetc): Rename as...
21603 (xgetc): this.
21604
21605 2000-10-02 Akim Demaille <akim@epita.fr>
21606
21607 * src/lalr.h: New file.
21608 Propagate its inclusion instead of prototypes and `extern'.
21609 * src/lalr.c: Formatting changes, topological sorting etc.
21610
21611 2000-10-02 Akim Demaille <akim@epita.fr>
21612
21613 * src/output.c (token_actions): Introduce a temporary array,
21614 YYDEFACT, that makes it possible for this function to use
21615 output_short_table.
21616
21617 2000-10-02 Akim Demaille <akim@epita.fr>
21618
21619 `user_toknums' is output as a `short[]' in `output.c', while it is
21620 defined as a `int[]' in `reader.c'. For consistency with the
21621 other output tables, `user_toknums' is now defined as a table of
21622 shorts.
21623
21624 * src/reader.c (user_toknums): Be a short table instead of an int
21625 table.
21626 Adjust dependencies.
21627
21628 Factor the short table outputs.
21629
21630 * src/output.c (output_short_table): New function.
21631 * src/output.c (output_gram, output_stos, output_rule_data)
21632 (output_base, output_table, output_check): Use it.
21633
21634 2000-10-02 Akim Demaille <akim@epita.fr>
21635
21636 * src/output.c (output): Topological sort of the functions, in
21637 order to get rid of the `static' prototypes.
21638 No longer use `register'.
21639 * src/output.h: New file.
21640 Propagate its inclusion in files explicitly prototyping functions
21641 from output.c.
21642
21643 2000-09-21 Akim Demaille <akim@epita.fr>
21644
21645 * src/atgeneral.m4: Update from Autoconf.
21646
21647 2000-09-21 Akim Demaille <akim@epita.fr>
21648
21649 * src/closure.h: New file.
21650 * src/closure.c: Formatting changes, topological sort over the
21651 functions, use of closure.h.
21652 (initialize_closure, finalize_closure): Rename as...
21653 (new_closure, free_closure): these. Adjust dependencies.
21654 * src/LR0.c: Formatting changes, topological sort, use of
21655 cloture.h.
21656 (initialize_states): Rename as...
21657 (new_states): this.
21658 * src/Makefile.am (noinst_HEADERS): Adjust.
21659
21660 2000-09-20 Akim Demaille <akim@epita.fr>
21661
21662 * src/acconfig.h: Don't protect config.h against multiple
21663 inclusion.
21664 Don't define PARAMS.
21665 * src/system.h: Define PARAMS.
21666 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
21667 purpose of config.h. system.h must not try to fix wrong
21668 definitions in config.h.
21669
21670 2000-09-20 Akim Demaille <akim@epita.fr>
21671
21672 * src/derives.h: New file.
21673 * src/main.c, src/derives.h: Use it.
21674 Formatting changes.
21675 * src/Makefile.am (noinst_HEADERS): Adjust.
21676
21677 2000-09-20 Akim Demaille <akim@epita.fr>
21678
21679 * tests/atgeneral.m4: Update from Autoconf.
21680 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
21681 (AT_CHECK_CALC): New macros.
21682 Use these macros to test bison with options `', `--raw',
21683 `--debug', `--yacc', `--yacc --debug'.
21684
21685 2000-09-19 Akim Demaille <akim@epita.fr>
21686
21687 * src/output.c: Formatting changes.
21688 * src/machine.h: Remove, leaving its contents in...
21689 * src/system.h: here.
21690 Include stdio.h.
21691 Adjust all dependencies on stdio.h and machine.h.
21692 * src/getargs.h: New file.
21693 Let all `extern' declarations about getargs.c be replaced with
21694 inclusion of `getargs.h'.
21695 * src/Makefile.am (noinst_HEADERS): Adjust.
21696
21697 * tests/calc.m4 (yyin): Be initialized in main, not on the global
21698 scope.
21699 (yyerror): Returns void, not int.
21700 * doc/bison.texinfo: Formatting changes.
21701
21702 2000-09-19 Akim Demaille <akim@epita.fr>
21703
21704 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
21705 portable.
21706
21707 2000-09-18 Akim Demaille <akim@epita.fr>
21708
21709 * configure.in: Append WARNING_CFLAGS to CFLAGS.
21710 * src/Makefile.am (INCLUDES): Don't.
21711 Be ready to fetch headers in lib/.
21712
21713 2000-09-18 Akim Demaille <akim@epita.fr>
21714
21715 * doc/bison.texinfo: Update the copyright.
21716 ANSIfy and GNUify the examples.
21717 Remove the old menu.
21718
21719 2000-09-18 Akim Demaille <akim@epita.fr>
21720
21721 First set of tests: use the `calc' example from the documentation.
21722
21723 * src/bison.s1 (yyparse): Condition the code using `yytname' which
21724 is defined only when YYDEBUG is.
21725 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
21726 * src/files.c (tryopen, tryclose): Formatting changes.
21727 Move to the top and be static.
21728 * src/reader.c (read_signed_integer): Likewise.
21729 * tests/calc.m4: New file.
21730 * Makefile.am, suite.m4: Adjust.
21731 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
21732
21733 2000-09-18 Akim Demaille <akim@epita.fr>
21734
21735 Add support for an Autotest test suite for Bison.
21736
21737 * m4/m4.m4, m4/atconfig.m4: New files.
21738 * m4/Makefile.am (EXTRA_DIST): Adjust.
21739 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
21740 files.
21741 * src/getargs.c: Display a more standard --version message.
21742 * src/reader.c (reader): Formatting changes.
21743 No longer depend upon VERSION_STRING.
21744 * configure.in: No longer use `dnl'.
21745 Set up the test suite and the new directory `tests/.
21746 (VERSION_STRING): Remove.
21747
21748 2000-04-14 Akim Demaille <akim@epita.fr>
21749
21750 * src/reader.c (copy_comment2): New function, same as former
21751 `copy_comment', but outputs into two FILE *.
21752 (copy_comment): Use it.
21753 (parse_union_decl): Use it.
21754 (get_type, parse_start_decl): Use the same `invalid' message.
21755 (parse_start_decl, parse_union_decl): Use the same `multiple'
21756 message.
21757 (parse_union_decl, copy_guard, copy_action): Use the same
21758 `unmatched' message.
21759 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
21760
21761 2000-03-31 Akim Demaille <akim@epita.fr>
21762
21763 * src/files.c (tryopen, tryclose): Move to the top.
21764 Be static.
21765
21766 2000-03-31 Akim Demaille <akim@epita.fr>
21767
21768 * src/main.c (main): Don't call `done', exit does it.
21769
21770 2000-03-31 Akim Demaille <akim@epita.fr>
21771
21772 * allocate.c: s/return (foo)/return foo/.
21773 * lalr.c: Likewise.
21774 * LR0.c: Likewise.
21775 * output.c: Likewise.
21776 * reader.c: Likewise.
21777 * symtab.c: Likewise.
21778 * vmsgetargs.c: Likewise.
21779
21780 2000-03-31 Akim Demaille <akim@epita.fr>
21781
21782 Clean up the error reporting functions.
21783
21784 * src/report.c: New file.
21785 * src/report.h: Likewise.
21786 * src/Makefile.am: Adjust.
21787 * m4/error.m4: New file.
21788 * m4/Makefile.am: Adjust.
21789 * configure.in (jm_PREREQ_ERROR): Call it.
21790 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
21791 Remove.
21792 (fatal, fatals): Remove. All callers use complain.c::fatal.
21793 (warn, warni, warns, warnss, warnss): Remove. All callers use
21794 complain.c::complain.
21795 (toomany): Remove, use fatal instead.
21796 * src/files.c (done): No argument, use complain_message_count.
21797 * src/main.c (main): Register `done' to `atexit'.
21798
21799 * src/getargs.c (usage): More `fputs', less `fprintf'.
21800
21801 2000-03-28 Akim Demaille <akim@epita.fr>
21802
21803 * lib/: New directory.
21804 * Makefile.am (SUBDIRS): Adjust.
21805 * configure.in: Adjust.
21806 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
21807 useless.
21808 * src/alloca.c: Moved to lib/.
21809 * src/getopt.c: Likewise.
21810 * src/getopt1.c: Likewise.
21811 * src/getopt.h: Likewise.
21812 * src/ansi2knr.c: Likewise.
21813 * src/ansi2knr.1: Likewise.
21814 * src/Makefile.am: Adjust.
21815 * lib/Makefile.am: New file.
21816
21817 2000-03-28 Akim Demaille <akim@epita.fr>
21818
21819 * src/getargs.c (usage): Refresh the help message.
21820
21821 2000-03-17 Akim Demaille <akim@epita.fr>
21822
21823 * src/getopt1.c: Updated from textutils 2.0e
21824 * src/getopt.c: Likewise.
21825 * src/getopt.h: Likewise.
21826
21827 2000-03-17 Akim Demaille <akim@epita.fr>
21828
21829 * src/Makefile.am (bison.simple): Fix the awk program: quote only
21830 the file name, not the whole `#line LINE FILE'.
21831
21832 2000-03-17 Akim Demaille <akim@epita.fr>
21833
21834 On syntax errors, report the token on which we choked.
21835
21836 * src/bison.s1 (yyparse): In the label yyerrlab, when
21837 YYERROR_VERBOSE, add yychar in msg.
21838
21839 2000-03-17 Akim Demaille <akim@epita.fr>
21840
21841 * src/reader.c (copy_at): New function.
21842 (copy_guard): Use it.
21843 (copy_action): Use it.
21844
21845 2000-03-17 Akim Demaille <akim@epita.fr>
21846
21847 Be kind to translators, save some useless translations.
21848
21849 * src/main.c (banner): New function.
21850 (fatal_banner): Use it.
21851 (warn_banner): Use it.
21852
21853 2000-03-17 Akim Demaille <akim@epita.fr>
21854
21855 * src/reader.c (copy_definition): Use copy_string and
21856 copy_comment. Removed now unused `match', `ended',
21857 `cplus_comment'.
21858 (copy_comment, copy_string): Moved, to be visible from
21859 copy_definition.
21860
21861 2000-03-17 Akim Demaille <akim@epita.fr>
21862
21863 * src/reader.c (copy_string): Declare `static inline'. No
21864 problems with inline, since it is checked by configure.
21865 (copy_comment): Likewise.
21866
21867 2000-03-17 Akim Demaille <akim@epita.fr>
21868
21869 * src/reader.c (packsymbols): Formatting changes.
21870
21871 2000-03-17 Akim Demaille <akim@epita.fr>
21872
21873 * src/reader.c (copy_comment): New function, factored out from:
21874 (copy_action): Use it. Removed now unused `match', `ended',
21875 `cplus_comment'.
21876 (copy_guard): Likewise.
21877
21878 2000-03-17 Akim Demaille <akim@epita.fr>
21879
21880 * src/reader.c (copy_string): New function, factored out from:
21881 (copy_action): Use it.
21882 (copy_guard): Likewise.
21883
21884 2000-03-17 Akim Demaille <akim@epita.fr>
21885
21886 Change the handling of @s so that they behave exactly like $s.
21887 There is now a pseudo variable @$ (readble and writable), location
21888 of the lhs of the rule (by default ranging from the location of
21889 the first symbol of the rhs, to the location of the last symbol,
21890 or, if the rhs is empty, YYLLOC).
21891
21892 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
21893 yyval.
21894 (yyparse): When providing a default semantic action, provide a
21895 default location action.
21896 (after the $): No longer change `*YYLSP', just stack YYLOC the
21897 same way you stack YYVAL.
21898 * src/reader.c (read_declarations): Use warns.
21899 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
21900 (copy_action, case '@'): Likewise.
21901 Use a standard error message, to save useless work from
21902 translators.
21903
21904 2000-03-17 Akim Demaille <akim@epita.fr>
21905
21906 * src/bison.s1: Formatting and cosmetics changes.
21907 * src/reader.c: Likewise.
21908 Update the Copyright notice.
21909
21910 2000-03-17 Akim Demaille <akim@epita.fr>
21911
21912 * src/bison.s1 (#line): All set to `#line' only, since the
21913 Makefile now handles them.
21914
21915 2000-03-16 Akim Demaille <akim@epita.fr>
21916
21917 * src/output.c (output_rule_data): Output the documentation of
21918 some of the tables.
21919 (Copyright notice): Update.
21920 Formatting changes.
21921
21922 2000-03-16 Akim Demaille <akim@epita.fr>
21923
21924 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
21925 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
21926 One `#if YYDEBUG' remains, since it uses variables which are
21927 defined only if `YYDEBUG != 0'.
21928
21929 2000-03-16 Akim Demaille <akim@epita.fr>
21930
21931 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
21932 and related variables so that the similarities are highlighted.
21933
21934 2000-03-16 Akim Demaille <akim@epita.fr>
21935
21936 * src/bison.s1: Properly indent CPP directives.
21937
21938 2000-03-16 Akim Demaille <akim@epita.fr>
21939
21940 * src/bison.s1: Properly indent the `alloca' CPP section.
21941
21942 2000-03-16 Akim Demaille <akim@epita.fr>
21943
21944 Do not hard code values of directories in `configure.in'.
21945 Update the `configure' tool chain.
21946
21947 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
21948 src/makefile.am.
21949 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
21950 (AC_OUTPUT): Add m4/Makefile.
21951 Bump to bison 1.28a, 1.29 has never been released.
21952 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
21953 handled via src/Makefile.am.
21954 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
21955 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
21956 autoheader.
21957 * Makefile.am (SUBDIRS): Add m4.
21958 (ACLOCAL_AM_FLAGS): New variable.
21959 (AUTOMAKE_OPTIONS): Add check-news.
21960 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
21961 the proper line number and file name.
21962 (DEFS): Propagate the location of bison library files and of the
21963 locale files.
21964 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
21965 builddir.
21966 * acinclude.m4: Remove, replaced by the directory m4.
21967 * m4/Makefile.am (EXTRA_DIST): New variable.
21968 * m4/gettext.m4: New file, from the fileutils.
21969 * m4/lcmessage.m4: Likewise
21970 * m4/progtest.m4: Likewise.
21971 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
21972
21973 2000-03-10 Akim Demaille <akim@epita.fr>
21974
21975 * src/closure.c:
21976 Formatting changes of various comments.
21977 Respect the GNU coding standards at various places.
21978 Don't use `_()' when no translation is needed.
21979
21980 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21981
21982 * src/files.c:
21983 OS/2 honors TMPDIR environment variable.
21984
21985 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21986
21987 * doc/bison.texinfo: Tweaked spelling and grammar.
21988 Updated ISBN.
21989 Removed reference to price of printed copy.
21990 Mention BISON_SIMPLE and BISON_HAIRY.
21991
21992 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21993
21994 * configure.in, NEWS:
21995 Bison 1.29 released.
21996
21997 1999-10-27 Jesse Thilo <jthilo@gnu.org>
21998
21999 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22000 Added reference card.
22001
22002 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22003
22004 * po/ru.po: Added Russian translation.
22005
22006 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22007
22008 * configure.in: Added Russian translation.
22009
22010 1999-07-06 Jesse Thilo <jthilo@gnu.org>
22011
22012 * configure.in, NEWS, README:
22013 Released version 1.28.
22014
22015 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22016
22017 * src/system.h:
22018 Squashed redefinition warning on some systems.
22019
22020 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22021 Have configure build version string instead of relying on ANSI string
22022 concatentation.
22023
22024 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22025
22026 * po/POTFILES.in: Got rid of version.c.
22027
22028 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22029
22030 * acconfig.h, configure.in:
22031 Have configure build version string instead of relying on ANSI string
22032 concatentation.
22033
22034 1999-06-08 Jesse Thilo <jthilo@gnu.org>
22035
22036 * doc/bison.1:
22037 Dropped mention of `+' for long-named options.
22038
22039 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22040
22041 * src/files.c: Added <unistd.h> for unlink().
22042
22043 * src/Makefile.am, src/system.h:
22044 I18n fixes.
22045
22046 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22047
22048 * README: Added a FAQ list.
22049
22050 * configure.in, acconfig.h:
22051 I18n fixes.
22052
22053 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22054
22055 * doc/FAQ, doc/Makefile.am:
22056 Added a FAQ list.
22057
22058 1999-05-19 Jesse Thilo <jthilo@gnu.org>
22059
22060 * src/alloc.h, src/symtab.h, src/version.c:
22061 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22062
22063 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22064
22065 * src/.cvsignore, src/Makefile.am:
22066 Reorganized: sources in `src', documentation in `doc'.
22067
22068 * src/lex.c (literalchar):
22069 fixed the code for escaping double quotes (thanks
22070 Jonathan Czisny.)
22071
22072 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22073
22074 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22075 Adjusted paths to reflect directory reorganization.
22076
22077 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22078
22079 * doc/.cvsignore, doc/Makefile.am:
22080 Reorganized: sources in `src', documentation in `doc'.
22081
22082 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22083
22084 * configure.in:
22085 Updated AC_INIT file to reflect directory reorganization.
22086
22087 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22088 Reorganized: sources in `src', documentation in `doc'.
22089
22090 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22091
22092 * src/allocate.c:
22093 Don't declare calloc() and realloc() if not necessary.
22094
22095 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22096
22097 * configure.in, acconfig.h, acinclude.m4:
22098 Don't declare calloc() and realloc() if not necessary.
22099
22100 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22101
22102 * po/.cvsignore: Added i18n support.
22103
22104 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22105
22106 * acconfig.h, configure.in, Makefile.am:
22107 Added i18n support.
22108
22109 1999-03-22 Jesse Thilo <jthilo@gnu.org>
22110
22111 * src/bison.s1: Fixed #line numbers.
22112
22113 1999-03-15 Jesse Thilo <jthilo@gnu.org>
22114
22115 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22116 Added PO files from Translation Project.
22117
22118 1999-03-03 Jesse Thilo <jthilo@gnu.org>
22119
22120 * Makefile.am:
22121 Added support for non-ANSI compilers (ansi2knr).
22122
22123 1999-02-16 Jesse Thilo <jthilo@gnu.org>
22124
22125 * configure.in: Bumped version number to 1.27.
22126
22127 * Makefile.am:
22128 Added `bison.simple' to list of files removed by `make distclean'.
22129
22130 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22131
22132 * src/files.c, src/files.h:
22133 Defined locations of parser files in config.h instead of Makefile.
22134
22135 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22136
22137 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22138 Defined locations of parser files in config.h instead of Makefile.
22139
22140 1999-02-09 Jesse Thilo <jthilo@gnu.org>
22141
22142 * Makefile.am:
22143 Removed inappropriate use of $< macro.
22144
22145 1999-02-05 Jesse Thilo <jthilo@gnu.org>
22146
22147 * po/Makefile.in.in, po/POTFILES.in:
22148 Add `po' directory skeleton.
22149
22150 1999-01-27 Jesse Thilo <jthilo@gnu.org>
22151
22152 * README: Document help-bison list.
22153
22154 * configure.in: Add check for mkstemp().
22155
22156 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22157
22158 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22159 Hush a few compiler warnings.
22160
22161 * src/files.c:
22162 Add tryclose(), which verifies that fclose was successful.
22163 Hush a couple of compiler warnings.
22164
22165 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22166
22167 * Makefile.am, OChangeLog:
22168 ChangeLog is now automatically generated. Include the old version as
22169 OChangeLog.
22170
22171 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22172
22173 * 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:
22174 Update FSF address.
22175
22176 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22177
22178 * doc/bison.texinfo: Fix formatting glitch.
22179
22180 * doc/bison.texinfo: Update FSF address.
22181
22182 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22183
22184 * acconfig.h: Update FSF address.
22185
22186 1999-01-08 Jesse Thilo <jthilo@gnu.org>
22187
22188 * src/system.h:
22189 Don't define PACKAGE here, since config.h defines it.
22190
22191 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22192
22193 * src/reader.c: Update copyright date.
22194
22195 * src/main.c:
22196 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22197 favor of output directly to stderr (avoids buffer overruns).
22198
22199 * src/reader.c: Some checks for premature EOF.
22200
22201 * 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:
22202 Use prototypes if the compiler understands them.
22203
22204 * src/files.c: Honor TMPDIR on Unix hosts.
22205 Use prototypes if the compiler understands them.
22206
22207 * src/reader.c:
22208 Fix a couple of buffer overrun bugs.
22209 Use prototypes if the compiler understands them.
22210
22211 * src/system.h: Include unistd.h and ctype.h.
22212 Use #ifdef instead of #if for NLS symbols.
22213
22214 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22215
22216 * doc/bison.texinfo:
22217 Delete comment "consider using @set for edition number, etc..." since
22218 we now are doing so.
22219
22220 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22221
22222 * configure.in:
22223 Use prototypes if the compiler understands them.
22224
22225 * NEWS: Document 1.26 highlights.
22226
22227 * Makefile.am: Require Automake 1.3 or later.
22228
22229 * acconfig.h:
22230 Use prototypes if the compiler understands them.
22231
22232 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22233
22234 * src/version.c:
22235 Use VERSION symbol from automake for version number.
22236
22237 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22238
22239 * acconfig.h, configure.in, version.cin:
22240 Use VERSION symbol from automake for version number.
22241
22242 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22243
22244 * Makefile.am:
22245 Distribute original version of simple parser (bison.s1), not built
22246 version (bison.simple).
22247
22248 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22249
22250 * doc/bison.texinfo: Add info dir entry.
22251
22252 * doc/bison.texinfo:
22253 Let automake put version number into documentation.
22254
22255 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22256
22257 * src/bison.cld, src/build.com, src/vmshlp.mar:
22258 Add non-RCS files from /gd/gnu/bison.
22259
22260 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22261
22262 * doc/bison.1:
22263 Document the BISON_HAIRY and BISON_SIMPLE variables.
22264
22265 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22266
22267 * src/version.c: Build version.c automatically.
22268
22269 * src/reader.c:
22270 Fix token numbering (used to start at 258, not 257).
22271
22272 * src/system.h: Include config.h.
22273
22274 * src/getargs.c: Update bug report address.
22275
22276 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22277 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22278
22279 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22280
22281 * Makefile.am:
22282 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22283
22284 * configure.in, version.cin:
22285 Build version.c automatically.
22286
22287 * AUTHORS: Add AUTHORS file.
22288
22289 * README: Update bug report address.
22290
22291 * bison.simple:
22292 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22293
22294 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22295 Add automake stuff.
22296
22297 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22298
22299 * doc/bison.texinfo: Clean up some formatting.
22300
22301 1998-05-05 Richard Stallman <rms@gnu.org>
22302
22303 * doc/bison.texinfo:
22304 Explain better why to make a pure parser.
22305
22306 1998-01-05 Richard Stallman <rms@gnu.org>
22307
22308 * src/files.c (openfiles):
22309 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22310 find a temporary directory, if possible. Do not unlink files while
22311 they are open.
22312
22313 1997-08-25 Richard Stallman <rms@gnu.org>
22314
22315 * src/reader.c (stack_offset;):
22316 Change some warni to warns.
22317
22318 * src/lex.c (literalchar): Use warns, not warni.
22319
22320 1997-06-28 Richard Stallman <rms@gnu.org>
22321
22322 * src/bison.s1: Add a Bison version comment.
22323
22324 * src/main.c (fatal, warn, berror):
22325 Use program_name.
22326
22327 1997-06-28 Richard Stallman <rms@gnu.org>
22328
22329 * Makefile.in (bison_version): New variable.
22330 (dist): Use that variable.
22331 (bison.s1): Substitute the Bison version into bison.simple.
22332
22333 * bison.simple: Add a Bison version comment.
22334
22335 1997-06-18 Richard Stallman <rms@gnu.org>
22336
22337 * src/main.c (fatal, warn, berror):
22338 Make error messages standard.
22339 (toomany): Improve error message text.
22340
22341 * 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:
22342 new.h renamed to alloc.h.
22343
22344 1997-06-18 Richard Stallman <rms@gnu.org>
22345
22346 * Makefile.in: new.h renamed to alloc.h.
22347
22348 1997-05-24 Richard Stallman <rms@gnu.org>
22349
22350 * src/lex.c (literalchar):
22351 Fix the code for escaping \, " and '.
22352
22353 (lex): Avoid trouble when there are many chars
22354 to discard in a char literal with just several chars in it.
22355
22356 1997-05-17 Richard Stallman <rms@gnu.org>
22357
22358 * src/bison.s1:
22359 Use malloc, if using alloca is troublesome.
22360 (YYSTACK_USE_ALLOCA): New flag macro.
22361 Define it for some systems and compilers.
22362 (YYSTACK_ALLOC): New macro.
22363 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22364 If it was malloc'd, free it.
22365
22366 1997-05-17 Richard Stallman <rms@gnu.org>
22367
22368 * bison.simple:
22369 Use malloc, if using alloca is troublesome.
22370 (YYSTACK_USE_ALLOCA): New flag macro.
22371 Define it for some systems and compilers.
22372 (YYSTACK_ALLOC): New macro.
22373 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22374 If it was malloc'd, free it.
22375
22376 1997-04-23 Richard Stallman <rms@gnu.org>
22377
22378 * src/bison.s1:
22379 (alloca) [__hpux]: Always define as __builtin_alloca.
22380
22381 1997-04-23 Richard Stallman <rms@gnu.org>
22382
22383 * bison.simple:
22384 (alloca) [__hpux]: Always define as __builtin_alloca.
22385
22386 1997-04-22 Richard Stallman <rms@gnu.org>
22387
22388 * src/bison.s1:
22389 [__hpux]: Include alloca.h (right for HPUX 10)
22390 instead of declaring alloca (right for HPUX 9).
22391
22392 * src/bison.s1 (__yy_memcpy):
22393 Declare arg `count' as unsigned int.
22394 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22395
22396 1997-04-22 Richard Stallman <rms@gnu.org>
22397
22398 * bison.simple:
22399 [__hpux]: Include alloca.h (right for HPUX 10)
22400 instead of declaring alloca (right for HPUX 9).
22401
22402 * bison.simple (__yy_memcpy):
22403 Declare arg `count' as unsigned int.
22404 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22405
22406 1997-01-03 Richard Stallman <rms@gnu.org>
22407
22408 * src/allocate.c: [__STDC__ or _MSC_VER]:
22409 Declare calloc and realloc to return void *.
22410
22411 1997-01-02 Richard Stallman <rms@gnu.org>
22412
22413 * src/system.h:
22414 [_MSC_VER]: Include stdlib.h and process.h.
22415 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22416
22417 * src/main.c (main): Return FAILURE as a value.
22418 (printable_version): Declare arg as int, not char.
22419
22420 1997-01-02 Richard Stallman <rms@gnu.org>
22421
22422 * Makefile.in (dist):
22423 Explicitly check for symlinks, and copy them.
22424
22425 1996-12-19 Richard Stallman <rms@gnu.org>
22426
22427 * src/files.c:
22428 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22429
22430 1996-12-18 Paul Eggert <eggert@gnu.org>
22431
22432 * src/bison.s1 (yyparse):
22433 If __GNUC__ and YYPARSE_PARAM are both defined,
22434 declare yyparse to have a void * argument.
22435
22436 1996-12-18 Paul Eggert <eggert@gnu.org>
22437
22438 * bison.simple (yyparse):
22439 If __GNUC__ and YYPARSE_PARAM are both defined,
22440 declare yyparse to have a void * argument.
22441
22442 1996-12-17 Richard Stallman <rms@gnu.org>
22443
22444 * src/reduce.c (nbits): Add some casts.
22445
22446 1996-08-12 Richard Stallman <rms@gnu.org>
22447
22448 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22449
22450 1996-08-12 Richard Stallman <rms@gnu.org>
22451
22452 * bison.simple: Test _MSDOS as well as _MSDOS_.
22453
22454 1996-07-31 Richard Stallman <rms@gnu.org>
22455
22456 * src/bison.s1:
22457 [__sun && __i386]: Include alloca.h.
22458
22459 1996-07-31 Richard Stallman <rms@gnu.org>
22460
22461 * bison.simple:
22462 [__sun && __i386]: Include alloca.h.
22463
22464 1996-07-30 Richard Stallman <rms@gnu.org>
22465
22466 * src/bison.s1: Comment change.
22467
22468 * src/bison.s1: Test _MSDOS_, not MSDOS.
22469
22470 1996-07-30 Richard Stallman <rms@gnu.org>
22471
22472 * bison.simple: Comment change.
22473
22474 * bison.simple: Test _MSDOS_, not MSDOS.
22475
22476 1996-06-01 Richard Stallman <rms@gnu.org>
22477
22478 * 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:
22479 Insert `_' macro around many string constants.
22480
22481 * src/main.c:
22482 Insert `_' macro around many string constants.
22483
22484 (main): Call setlocale, bindtextdomain and textdomain.
22485
22486 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22487 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22488 [ENABLE_NLS]: Include libintl.h.
22489 [ENABLE_NLS] (gettext): Define.
22490 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22491 (N_, PACKAGE, LOCALEDIR): New macros.
22492
22493 1996-06-01 Richard Stallman <rms@gnu.org>
22494
22495 * POTFILES.in: New file.
22496
22497 * Makefile.in (allocate.o):
22498 Define target explicitly.
22499
22500 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22501 (LDFLAGS): Set to @LDFLAGS@.
22502 (configure): Run autoconf only if preceding `cd' succeeds.
22503 (bison.s1): Redirect output to temporary file then move the
22504 temporary to the target, rather than redirecting directly to bison.s1.
22505 (clean): Remove config.status and config.log.
22506 (distclean): Don't remove config.status here.
22507
22508 1996-05-12 Richard Stallman <rms@gnu.org>
22509
22510 * src/bison.s1:
22511 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22512
22513 1996-05-12 Richard Stallman <rms@gnu.org>
22514
22515 * bison.simple:
22516 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22517
22518 1996-05-11 Richard Stallman <rms@gnu.org>
22519
22520 * src/bison.s1 (__yy_memcpy):
22521 Really reorder the args, as was supposedly done on Feb 14 1995.
22522 (yyparse): Calls changed accordingly.
22523
22524 1996-05-11 Richard Stallman <rms@gnu.org>
22525
22526 * Makefile.in (dist): Don't use $(srcdir).
22527
22528 * bison.simple (__yy_memcpy):
22529 Really reorder the args, as was supposedly done on Feb 14 1995.
22530 (yyparse): Calls changed accordingly.
22531
22532 1996-01-27 Richard Stallman <rms@gnu.org>
22533
22534 * src/output.c (output_rule_data):
22535 Test YYERROR_VERBOSE in the conditional
22536 around the definition of ttyname.
22537
22538 1995-12-29 Richard Stallman <rms@gnu.org>
22539
22540 * src/bison.s1:
22541 Fix line numbers in #line commands.
22542
22543 1995-12-29 Richard Stallman <rms@gnu.org>
22544
22545 * bison.simple:
22546 Fix line numbers in #line commands.
22547
22548 1995-12-27 Richard Stallman <rms@gnu.org>
22549
22550 * src/bison.s1 (YYPARSE_PARAM_DECL):
22551 In C++, make it always null.
22552 (YYPARSE_PARAM_ARG): New macro.
22553 (yyparse): Use YYPARSE_PARAM_ARG.
22554
22555 1995-12-27 Richard Stallman <rms@gnu.org>
22556
22557 * bison.simple (YYPARSE_PARAM_DECL):
22558 In C++, make it always null.
22559 (YYPARSE_PARAM_ARG): New macro.
22560 (yyparse): Use YYPARSE_PARAM_ARG.
22561
22562 1995-11-29 Richard Stallman <rms@gnu.org>
22563
22564 * doc/bison.texinfo:
22565 Describe literal string tokens, %raw, %no_lines, %token_table.
22566
22567 1995-11-29 Daniel Hagerty <hag@gnu.org>
22568
22569 * doc/bison.texinfo: Fixed update date
22570
22571 1995-10-16 Richard Stallman <rms@gnu.org>
22572
22573 * src/version.c: Version 1.25.
22574
22575 1995-10-16 Richard Stallman <rms@gnu.org>
22576
22577 * NEWS: *** empty log message ***
22578
22579 1995-10-16 Richard Stallman <rms@gnu.org>
22580
22581 * doc/bison.1, doc/bison.rnh:
22582 Add new options.
22583
22584 1995-10-15 Richard Stallman <rms@gnu.org>
22585
22586 * src/vmsgetargs.c, src/getargs.c:
22587 Added -n, -k, and -raw switches.
22588 (noparserflag, toknumflag, rawtoknumflag): New variables.
22589
22590 * src/symtab.h (SALIAS):
22591 New #define for adding aliases to %token.
22592 (struct bucket): Added `alias' field.
22593
22594 * src/reduce.c (reduce_grammar):
22595 Revise error message.
22596 (print_notices): Remove final `.' from error message.
22597
22598 * src/reader.c (reader_output_yylsp):
22599 New function.
22600 (readgram): Use `#if 0' around code that accepted %command
22601 inside grammar rules: The documentation doesn't allow it,
22602 and it will fail since the %command processors scan for the next %.
22603 (parse_token_decl): Extended the %token
22604 declaration to allow a multi-character symbol as an alias.
22605 (parse_thong_decl): New function.
22606 (read_declarations): Added %thong declarations.
22607 (read_declarations): Handle NOOP to deal with allowing
22608 % declarations as another means to specify the flags.
22609 (readgram): Allow %prec prior to semantics embedded in a rule.
22610 (skip_to_char, read_declarations, copy_definition)
22611 (parse_token_decl, parse_start_decl, parse_type_decl)
22612 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22613 (get_type_name, copy_guard, copy_action, readgram)
22614 (get_type, packsymbols): Revised most error messages.
22615 Changed `fatal' to `warnxxx' to avoid aborting for error.
22616 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22617 (read_declarations): Improve the error message for
22618 an invalid character. Do not abort.
22619 (read_declarations, copy_guard, copy_action): Use
22620 printable_version to avoid unprintable characters in printed output.
22621 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22622 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22623 Allow the type of a non-terminal can be given
22624 more than once, as long as all specifications give the same type.
22625
22626 * src/output.c:
22627 (output_headers, output_trailers, output, output_gram)
22628 (output_rule_data): Implement noparserflag variable.
22629 Implement toknumflag variable.
22630 (output): Call reader_output_yylsp to output LTYPESTR.
22631
22632 * src/main.c (main):
22633 If reader sees an error, don't process the grammar.
22634 (fatals): Updated to not use VARARGS1.
22635 (printable_version, int_to_string, warn, warni, warns, warnss)
22636 (warnsss): New error reporting functions. Avoid abort for error.
22637
22638 * src/lex.h:
22639 Added THONG and NOOP for alias processing.
22640 Added SETOPT for the new code that allows setting options with %flags.
22641
22642 * src/lex.c:
22643 Include getopt.h. Add some extern decls.
22644 (safegetc): New function to deal with EOF gracefully.
22645 (literalchar); new function to deal with reading \ escapes.
22646 (lex): Use literalchar.
22647 (lex): Implemented "..." tokens.
22648 (literalchar, lex, parse_percent_token): Made tokenbuffer
22649 always contain the token. This includes growing the token
22650 buffer while reading an integer.
22651 (parse_percent_token): Replaced if-else statement with percent_table.
22652 (parse_percent_token): Added % declarations as another
22653 way to specify the flags -n, -l, and -r. Also added hooks for
22654 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
22655 major changes to files.c.
22656 (lex) Retain in the incoming stream a character following
22657 an incorrect '/'.
22658 (skip_white_space, lex): Revised most error messages
22659 and changed fatal to warn to avoid aborting.
22660 (percent_table): Added %thong declarations.
22661
22662 * src/gram.h: Comment changes.
22663
22664 * src/files.c (openfiles, open_extra_files, done):
22665 Add faction flag
22666 and actfile file. Handle noparserflag. Both for -n switch.
22667
22668 * src/conflicts.c (resolve_sr_conflict):
22669 Remove use of alloca.
22670
22671 1995-06-01 Jim Meyering <meyering@gnu.org>
22672
22673 * doc/bison.texinfo: *** empty log message ***
22674
22675 1995-05-06 Richard Stallman <rms@gnu.org>
22676
22677 * src/bison.s1: Comment change.
22678
22679 1995-05-06 Richard Stallman <rms@gnu.org>
22680
22681 * bison.simple: Comment change.
22682
22683 1995-05-03 Richard Stallman <rms@gnu.org>
22684
22685 * src/version.c: Version now 1.24.
22686
22687 * src/bison.s1: Change distribution terms.
22688
22689 * src/version.c: Version now 1.23.
22690
22691 1995-05-03 Richard Stallman <rms@gnu.org>
22692
22693 * doc/bison.texinfo:
22694 Rewrite "Conditions for Using Bison".
22695 Update version to 1.24.
22696
22697 1995-05-03 Richard Stallman <rms@gnu.org>
22698
22699 * bison.simple: Change distribution terms.
22700
22701 1995-02-23 Richard Stallman <rms@gnu.org>
22702
22703 * src/files.c: Test __VMS_POSIX as well as VMS.
22704
22705 1995-02-14 Jim Meyering <meyering@gnu.org>
22706
22707 * src/bison.s1 (__yy_memcpy):
22708 Renamed from __yy_bcopy to avoid
22709 confusion. Reverse FROM and TO arguments to be consistent with
22710 those of memcpy.
22711
22712 1995-02-14 Jim Meyering <meyering@gnu.org>
22713
22714 * bison.simple (__yy_memcpy):
22715 Renamed from __yy_bcopy to avoid
22716 confusion. Reverse FROM and TO arguments to be consistent with
22717 those of memcpy.
22718
22719 1994-11-10 David J. MacKenzie <djm@gnu.org>
22720
22721 * NEWS: reformat
22722
22723 * NEWS: New file.
22724
22725 * Makefile.in (DISTFILES): Include NEWS.
22726
22727 * Makefile.in (DISTFILES):
22728 Include install-sh, not install.sh.
22729
22730 * configure.in: Update to Autoconf v2 macro names.
22731
22732 1994-10-05 David J. MacKenzie <djm@gnu.org>
22733
22734 * Makefile.in: fix typo
22735
22736 * Makefile.in (prefix, exec_prefix):
22737 Let configure set them.
22738
22739 1994-09-28 David J. MacKenzie <djm@gnu.org>
22740
22741 * Makefile.in: Set datadir to $(prefix)/share.
22742
22743 1994-09-15 Richard Stallman <rms@gnu.org>
22744
22745 * src/bison.s1:
22746 Update copyright notice and GPL version.
22747
22748 1994-09-15 Richard Stallman <rms@gnu.org>
22749
22750 * bison.simple:
22751 Update copyright notice and GPL version.
22752
22753 1994-07-12 Richard Stallman <rms@gnu.org>
22754
22755 * src/reduce.c, src/reader.c:
22756 entered into RCS
22757
22758 1994-05-05 David J. MacKenzie <djm@gnu.org>
22759
22760 * Makefile.in: entered into RCS
22761
22762 1994-03-26 Richard Stallman <rms@gnu.org>
22763
22764 * src/bison.s1: entered into RCS
22765
22766 1994-03-26 Richard Stallman <rms@gnu.org>
22767
22768 * bison.simple: entered into RCS
22769
22770 1994-03-25 Richard Stallman <rms@gnu.org>
22771
22772 * src/main.c: entered into RCS
22773
22774 1994-03-24 Richard Stallman <rms@gnu.org>
22775
22776 * src/conflicts.c: entered into RCS
22777
22778 1994-01-02 Richard Stallman <rms@gnu.org>
22779
22780 * Makefile.in: *** empty log message ***
22781
22782 1993-11-21 Richard Stallman <rms@gnu.org>
22783
22784 * src/bison.s1: *** empty log message ***
22785
22786 1993-11-21 Richard Stallman <rms@gnu.org>
22787
22788 * doc/bison.texinfo: entered into RCS
22789
22790 * doc/bison.texinfo: *** empty log message ***
22791
22792 1993-11-21 Richard Stallman <rms@gnu.org>
22793
22794 * bison.simple: *** empty log message ***
22795
22796 1993-10-25 David J. MacKenzie <djm@gnu.org>
22797
22798 * doc/bison.texinfo: *** empty log message ***
22799
22800 1993-10-19 Richard Stallman <rms@gnu.org>
22801
22802 * src/bison.s1: *** empty log message ***
22803
22804 1993-10-19 Richard Stallman <rms@gnu.org>
22805
22806 * bison.simple: *** empty log message ***
22807
22808 1993-10-14 Richard Stallman <rms@gnu.org>
22809
22810 * src/bison.s1: *** empty log message ***
22811
22812 1993-10-14 Richard Stallman <rms@gnu.org>
22813
22814 * bison.simple: *** empty log message ***
22815
22816 1993-09-14 David J. MacKenzie <djm@gnu.org>
22817
22818 * doc/bison.texinfo: *** empty log message ***
22819
22820 1993-09-13 Noah Friedman <friedman@gnu.org>
22821
22822 * Makefile.in: *** empty log message ***
22823
22824 1993-09-10 Richard Stallman <rms@gnu.org>
22825
22826 * src/conflicts.c: *** empty log message ***
22827
22828 * src/system.h: entered into RCS
22829
22830 1993-09-10 Richard Stallman <rms@gnu.org>
22831
22832 * doc/bison.1: entered into RCS
22833
22834 1993-09-06 Noah Friedman <friedman@gnu.org>
22835
22836 * src/version.c: entered into RCS
22837
22838 1993-09-06 Noah Friedman <friedman@gnu.org>
22839
22840 * Makefile.in: *** empty log message ***
22841
22842 1993-07-30 David J. MacKenzie <djm@gnu.org>
22843
22844 * Makefile.in: *** empty log message ***
22845
22846 1993-07-24 Richard Stallman <rms@gnu.org>
22847
22848 * src/bison.s1: *** empty log message ***
22849
22850 1993-07-24 Richard Stallman <rms@gnu.org>
22851
22852 * bison.simple: *** empty log message ***
22853
22854 1993-07-08 David J. MacKenzie <djm@gnu.org>
22855
22856 * Makefile.in: *** empty log message ***
22857
22858 1993-07-04 Richard Stallman <rms@gnu.org>
22859
22860 * src/bison.s1: *** empty log message ***
22861
22862 1993-07-04 Richard Stallman <rms@gnu.org>
22863
22864 * bison.simple: *** empty log message ***
22865
22866 1993-06-26 David J. MacKenzie <djm@gnu.org>
22867
22868 * src/getargs.c: entered into RCS
22869
22870 1993-06-26 David J. MacKenzie <djm@gnu.org>
22871
22872 * doc/bison.texinfo: *** empty log message ***
22873
22874 * doc/bison.1: New file.
22875
22876 1993-06-25 Richard Stallman <rms@gnu.org>
22877
22878 * src/getargs.c: New file.
22879
22880 1993-06-16 Richard Stallman <rms@gnu.org>
22881
22882 * src/bison.s1: *** empty log message ***
22883
22884 1993-06-16 Richard Stallman <rms@gnu.org>
22885
22886 * bison.simple: *** empty log message ***
22887
22888 1993-06-03 Richard Stallman <rms@gnu.org>
22889
22890 * src/bison.s1: New file.
22891
22892 1993-06-03 Richard Stallman <rms@gnu.org>
22893
22894 * doc/bison.texinfo: *** empty log message ***
22895
22896 1993-06-03 Richard Stallman <rms@gnu.org>
22897
22898 * bison.simple: New file.
22899
22900 1993-05-19 Richard Stallman <rms@gnu.org>
22901
22902 * doc/bison.texinfo: New file.
22903
22904 1993-05-07 Noah Friedman <friedman@gnu.org>
22905
22906 * Makefile.in: *** empty log message ***
22907
22908 1993-04-28 Noah Friedman <friedman@gnu.org>
22909
22910 * src/reader.c: *** empty log message ***
22911
22912 1993-04-23 Noah Friedman <friedman@gnu.org>
22913
22914 * src/alloc.h: entered into RCS
22915
22916 1993-04-20 David J. MacKenzie <djm@gnu.org>
22917
22918 * src/version.c: *** empty log message ***
22919
22920 * src/files.c, src/allocate.c:
22921 entered into RCS
22922
22923 * src/reader.c: *** empty log message ***
22924
22925 * src/lex.c: entered into RCS
22926
22927 * src/conflicts.c: New file.
22928
22929 * src/symtab.c: entered into RCS
22930
22931 * src/alloc.h: New file.
22932
22933 * src/LR0.c: entered into RCS
22934
22935 1993-04-18 Noah Friedman <friedman@gnu.org>
22936
22937 * src/reader.c: New file.
22938
22939 * src/version.c: *** empty log message ***
22940
22941 1993-04-18 Noah Friedman <friedman@gnu.org>
22942
22943 * Makefile.in: *** empty log message ***
22944
22945 1993-04-17 Noah Friedman <friedman@gnu.org>
22946
22947 * Makefile.in: *** empty log message ***
22948
22949 1993-04-15 Richard Stallman <rms@gnu.org>
22950
22951 * src/main.c, src/files.c:
22952 New file.
22953
22954 1993-04-15 Noah Friedman <friedman@gnu.org>
22955
22956 * configure.in: entered into RCS
22957
22958 * configure.in: *** empty log message ***
22959
22960 * configure.in: New file.
22961
22962 1993-04-14 Richard Stallman <rms@gnu.org>
22963
22964 * Makefile.in: New file.
22965
22966 1993-04-13 Richard Stallman <rms@gnu.org>
22967
22968 * src/version.c: New file.
22969
22970 1993-03-25 Richard Stallman <rms@gnu.org>
22971
22972 * src/output.c: entered into RCS
22973
22974 1992-09-25 Richard Stallman <rms@gnu.org>
22975
22976 * configure.bat: entered into RCS
22977
22978 1992-06-22 Richard Stallman <rms@gnu.org>
22979
22980 * src/vmsgetargs.c: entered into RCS
22981
22982 1992-06-22 Richard Stallman <rms@gnu.org>
22983
22984 * doc/bison.rnh: entered into RCS
22985
22986 1992-04-20 David J. MacKenzie <djm@gnu.org>
22987
22988 * README: entered into RCS
22989
22990 1992-01-22 Richard Stallman <rms@gnu.org>
22991
22992 * src/machine.h: entered into RCS
22993
22994 1991-12-21 Richard Stallman <rms@gnu.org>
22995
22996 * src/lalr.c, src/closure.c:
22997 entered into RCS
22998
22999 1991-12-20 Richard Stallman <rms@gnu.org>
23000
23001 * src/state.h: entered into RCS
23002
23003 1991-12-18 Richard Stallman <rms@gnu.org>
23004
23005 * src/print.c, src/nullable.c, src/derives.c:
23006 entered into RCS
23007
23008 1991-11-03 David J. MacKenzie <djm@gnu.org>
23009
23010 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23011 entered into RCS
23012
23013 1988-09-09 Richard Stallman <rms@gnu.org>
23014
23015 * src/bison.hairy: entered into RCS
23016
23017 1987-12-16 Richard Stallman <rms@gnu.org>
23018
23019 * REFERENCES: entered into RCS
23020
23021
23022 -----
23023
23024 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
23025 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
23026 Free Software Foundation, Inc.
23027
23028 Copying and distribution of this file, with or without
23029 modification, are permitted provided the copyright notice and this
23030 notice are preserved.