]> git.saurik.com Git - bison.git/blob - ChangeLog
Regen.
[bison.git] / ChangeLog
1 2009-04-03 Akim Demaille <demaille@gostai.com>
2
3 Regen.
4 * src/parse-gram.h, src/parse-gram.c: Regen.
5
6 2009-04-03 Akim Demaille <demaille@gostai.com>
7
8 Factor %FLAG at scan level.
9 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
10 definitions and associated rules, replaced by....
11 (PERCENT_FLAG): this new token type, and rule.
12 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
13 Use it for %debug and %error-verbose.
14
15 2009-04-03 Akim Demaille <demaille@gostai.com>
16
17 Regen.
18 * src/parse-gram.h, src/parse-gram.c: Regen.
19
20 2009-04-03 Akim Demaille <demaille@gostai.com>
21
22 Treat %debug as %define debug.
23 * data/bison.m4 (b4_debug_if): New.
24 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
25 * data/lalr1.java: Use it instead of b4_debug_flag.
26 * src/getargs.h, src/getargs.c (debug_flag): Remove.
27 * src/output.c (prepare): Don't output it.
28 * src/parse-gram.y: Treat %debug as %define debug.
29
30 2009-04-03 Akim Demaille <demaille@gostai.com>
31
32 Treat %error-verbose as %define error_verbose.
33 This allows to pass -Derror_verbose on the command line. Better
34 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
35 ERROR_VERBOSE being defined as false or true.
36 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
37 on b4_percent_define_ifdef, for does not check the defined value,
38 but only whether the symbol is defined, rely on
39 b4_percent_define_flag_if, so that a value of "false" is processed
40 as a false.
41 If not defined, define the flag to "false".
42 (b4_error_verbose_if): New.
43 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
44 b4_error_verbose_flag.
45 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
46 * src/output.c (prepare): Don't output it.
47 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
48
49 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
50
51 Fix strange %define locations for default values.
52 Reported by Akim Demaille at
53 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
54 and discussed again starting at
55 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
56 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
57 because location information is bogus.
58 Use angle brackets to delimit fake file name because square brackets
59 look like underexpanded m4. Choose a better fake file name.
60 Use negative line numbers.
61 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
62 * src/location.c (location_print): If line for a boundary is negative,
63 only print that boundary's file name.
64 * src/location.h: Document that.
65 * tests/skeletons.at (%define Boolean variables: invalid skeleton
66 defaults): Update output.
67
68 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
69
70 Pacify ./configure --enable-gcc-warnings.
71 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
72 in lib won't compile with it.
73 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
74
75 2009-03-31 Akim Demaille <demaille@gostai.com>
76
77 bootstrap: --help to stdout.
78 * bootstrap (usage): Don't send --help to stderr.
79 Use a here doc instead of a long string.
80
81 2009-03-31 Akim Demaille <demaille@gostai.com>
82
83 bootstrap: README-hacking no longer exists
84 * bootstrap (checkout_only_file): Set to HACKING.
85
86 2009-03-26 Akim Demaille <demaille@gostai.com>
87
88 doc: merge HACKING and README-hacking.
89 Two files is confusing.
90 Reported by Alexandre Duret-Lutz.
91
92 * README-hacking: Merge into...
93 * HACKING (Working from the repository): here.
94
95 2009-03-26 Akim Demaille <demaille@gostai.com>
96
97 doc: update README-hacking.
98 * README-hacking: We now use git and git submodules.
99 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
100
101 2009-03-26 Akim Demaille <demaille@gostai.com>
102
103 lalr1.cc: avoid GCC 4.3 warnings.
104 GCC 4.3 now warns about "a || b && c" and asks for explicit
105 parentheses.
106 Reported by Alexandre Duret-Lutz.
107 * data/location.cc: Update copyright years.
108 (Position::operator==): Use parens to make precedence explicit.
109 Compare lines and columns first, as they are more likely to be
110 different, and they are faster to compare.
111
112 2009-03-26 Akim Demaille <demaille@gostai.com>
113
114 gnulib: update.
115 * gnulib: Update to latest.
116 * src/local.mk (AM_CFLAGS): Move to...
117 * Makefile.am: here.
118 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
119 AM_CFLAGS.
120
121 2009-03-02 Akim Demaille <demaille@gostai.com>
122
123 Comment changes.
124
125 2009-03-02 Akim Demaille <demaille@gostai.com>
126
127 Share b4_yytranslate_define.
128 * data/lalr1.cc (b4_yytranslate_define): Move to...
129 * data/c++.m4: here.
130
131 2009-03-02 Akim Demaille <demaille@gostai.com>
132
133 Use locations in the variant example.
134 Yes, this obfuscates the point of this example, variants only.
135 But glr.cc cannot work (yet?) without locations. This change
136 makes it easier to use this example with glr.cc.
137
138 * examples/variant.yy (assert): %define it.
139 (locations): Request them.
140 (yylex): Bind the location to the stage.
141
142 2009-03-02 Akim Demaille <demaille@gostai.com>
143
144 Dub make_TOKEN as a public type interface.
145 * data/c++.m4 (b4_symbol_constructor_declare)
146 (b4_symbol_constructor_define): New empty stubs.
147 (b4_public_types_declare, b4_public_types_define): Use them.
148 * data/lalr1.cc (b4_symbol_constructor_declare)
149 (b4_symbol_constructor_declare_)
150 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
151 Move to...
152 * data/variant.hh: here.
153 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
154 needed.
155 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
156 b4_symbol_constructor_declare, as it is now done by
157 b4_public_types_define and b4_public_types_declare.
158
159 2009-03-02 Akim Demaille <demaille@gostai.com>
160
161 Coding style changes.
162 * data/lalr1.cc (b4_symbol_constructor_declaration_)
163 (b4_symbol_constructor_declarations)
164 (b4_symbol_constructor_definition_)
165 (b4_symbol_constructor_definitions)
166 (b4_yytranslate_definition): Rename as...
167 (b4_symbol_constructor_declare_)
168 (b4_symbol_constructor_declare)
169 (b4_symbol_constructor_define_)
170 (b4_symbol_constructor_define)
171 (b4_yytranslate_define): these.
172 * data/variant.hh (b4_variant_definition): Rename as...
173 (b4_variant_define): this.
174
175 2009-03-02 Akim Demaille <demaille@gostai.com>
176
177 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
178 * data/bison.m4 (b4_percent_define_if_define): New.
179 * data/c++.m4 (b4_variant_if): Move to...
180 * data/bison.m4: Here, using b4_percent_define_if_define.
181 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
182 * data/bison.m4: Here, using b4_percent_define_if_define.
183
184 2009-03-02 Akim Demaille <demaille@gostai.com>
185
186 Dub symbol_type_base as a public type.
187 * data/c++.m4 (b4_public_types_declare): Now define
188 symbol_type_base and symbol_type.
189 (b4_public_types_define): New.
190 In both cases, the definitions are taken verbatim from lalr1.cc.
191 * data/lalr1.cc: Adjust.
192
193 2009-03-02 Akim Demaille <demaille@gostai.com>
194
195 b4_public_types_declare.
196 * data/c++.m4 (b4_public_types_declare): New.
197 * data/glr.cc, data/lalr1.cc: Use it.
198
199 2009-03-02 Akim Demaille <demaille@gostai.com>
200
201 b4_semantic_type_declare.
202 * data/c++.m4 (b4_semantic_type_declare): New.
203 Factors and generalizes what was in glr.cc and lalr1.cc.
204 * data/variant.hh (b4_semantic_type_declare): Redefine it for
205 variants.
206 * data/lalr1.cc, data/glr.cc: Use it.
207
208 2009-02-26 Akim Demaille <demaille@gostai.com>
209
210 Upgrade gnulib.
211 * gnulib: Upgrade from master.
212 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
213 Regen.
214
215 2009-02-25 Akim Demaille <demaille@gostai.com>
216
217 Remove useless arguments.
218 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
219 relevant.
220
221 2009-02-25 Akim Demaille <demaille@gostai.com>
222
223 Comment changes.
224 * data/lalr1.cc: here.
225
226 2009-02-25 Akim Demaille <demaille@gostai.com>
227
228 Fix glr.cc's debug level handling.
229 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
230 glr.c which is used.
231 (debug_level, set_debug_level): Adjust.
232
233 2009-02-25 Akim Demaille <demaille@gostai.com>
234
235 Copyright years.
236 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
237
238 2009-02-25 Akim Demaille <demaille@gostai.com>
239
240 Style changes.
241 * etc/bench.pl.in (generate_grammar_list): Consitently use
242 location_type, not yy::location.
243
244 2009-02-25 Akim Demaille <demaille@gostai.com>
245
246 Comment change.
247 * data/lalr1.cc: here.
248
249 2009-02-19 Akim Demaille <demaille@gostai.com>
250
251 Make yyparser::error public.
252 * data/lalr1.cc: here.
253 There is no good reason to keep it private (and it is convenient
254 to use it from the scanner for instance). It is already public in
255 glr.cc.
256
257 2009-02-19 Akim Demaille <demaille@gostai.com>
258
259 Comment changes.
260 * data/glr.cc: here.
261
262 2009-02-19 Akim Demaille <demaille@gostai.com>
263
264 Remove trailing blanks.
265 The epilogue has its own ending \n, no need to add another.
266
267 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
268 epilogue.
269 * data/glr.cc: dnl when extending the epilogue.
270 Remove stray "private:".
271
272 2009-02-19 Akim Demaille <demaille@gostai.com>
273
274 Use b4_c_modern.
275 * data/c.m4 (b4_c_function_decl): Here.
276
277 2009-02-19 Akim Demaille <demaille@gostai.com>
278
279 Comment changes.
280 * data/lalr1.cc: here.
281
282 2009-02-19 Akim Demaille <demaille@gostai.com>
283
284 Extract variant.hh
285 * data/variant.hh: New, extracted from...
286 * data/lalr1.cc: here.
287 Adjust.
288 * data/local.mk: Adjust.
289
290 2009-02-19 Akim Demaille <demaille@gostai.com>
291
292 Extract stack.hh from lalr1.cc.
293 * data/stack.hh: New.
294 * data/lalr1.cc: Extract from here.
295 * data/local.mk: Adjust.
296
297 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
298
299 Add reminder about uploading public key to keys.gnupg.net.
300 * HACKING (Release Procedure): Here.
301
302 2009-01-28 Akim Demaille <demaille@gostai.com>
303
304 * NEWS: Update information about 2.4.1 and 2.4.2.
305
306 2008-11-04 Akim Demaille <demaille@gostai.com>
307
308 Reformat NEWS.
309 * NEWS: Use more outline-mode markup.
310 Suggested by Jim Meyering.
311
312 2009-01-08 Akim Demaille <demaille@gostai.com>
313
314 Fix grep portability issues.
315 Grep on Solaris does not support -q.
316 Reported by Summum Bonum.
317
318 * NEWS: Add a stub for 2.4.2.
319 * THANKS: Add Summum Bonum.
320 * tests/atlocal.in (EGREP): New.
321 (CC, CXX, XSLTPROC): Make it possible to override them via
322 envvars.
323 * tests/java.at: Use $EGREP instead of egrep.
324 Use AT_CHECK's ignore instead of grep's -q.
325
326 2008-12-11 Akim Demaille <demaille@gostai.com>
327
328 Pass the token type to yysyntax_error.
329 * data/yacc.c (yysyntax_error): Take the transated token instead
330 of the raw number.
331 Adjust callers.
332 * TODO: Update.
333
334 2008-12-11 Akim Demaille <demaille@gostai.com>
335
336 Formatting changes.
337 * data/glr.c: Formatting changes.
338
339 2008-12-11 Akim Demaille <demaille@gostai.com>
340
341 Propagate i18n changes into glr.c.
342 * TODO: Update.
343 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
344 building the error message format dynamically.
345 * data/lalr1.java: Formatting changes.
346
347 2008-12-11 Akim Demaille <demaille@gostai.com>
348
349 Use testsuite -C.
350 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
351 Solves problems when top_srcdir is an absolute path.
352 Suggested by Eric Blake.
353 * configure.ac: Require Autoconf 2.62.
354
355 2008-12-11 Akim Demaille <demaille@gostai.com>
356
357 Simplify the i18n of the error messages.
358 * data/lalr1.cc: Comment changes.
359 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
360 lalr1.cc instead of building dynamically the format string.
361
362 2008-12-08 Akim Demaille <demaille@gostai.com>
363
364 Fix portability issue in the test suite.
365 * tests/local.at (AT_MATCHES_CHECK): New.
366 Based on Perl instead of Sed. Sed has too many portability
367 pitfalls, not ever Sed is GNU Sed.
368 * tests/actions.at (Fix user actions without a trailing semicolon):
369 Use it.
370
371 2008-12-08 Akim Demaille <demaille@gostai.com>
372
373 Update data/README.
374 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
375
376 2008-12-08 Akim Demaille <demaille@gostai.com>
377
378 Install autoconf as a submodule to get m4sugar.
379 * .gitmodules: Add submodules/autoconf.
380 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
381 submodules/autoconf.
382
383 2008-12-08 Akim Demaille <demaille@gostai.com>
384
385 Test token.prefix in all the skeletons.
386 * data/java.m4 (b4_token_enum): Use the token.prefix.
387 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
388 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
389 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
390 * tests/java.at: Comment changes.
391 (AT_CHECK_JAVA_MINIMAL): Define the END token.
392 (Java parser class and package names): Add token.prefix check.
393
394 2008-12-08 Akim Demaille <demaille@gostai.com>
395
396 Fix regeneration of atconfig.
397 * tests/local.mk (tests/atconfig): The rule was incorrect, but
398 remove it: now that there is no tests/Makefile.am, the top-level
399 Makefile properly updates atconfig when needed.
400
401 2008-12-07 Di-an Jan <dianj@freeshell.org>
402
403 Implement the FIXME that ends an user action with a semicolon
404 if it seems necessary.
405 * src/scan-code.l (flex rules section): Flag cpp directive from
406 any `#' to the first unescaped end-of-line. Semicolon is not
407 needed after `;', `{', '}', or cpp directives and is needed after
408 any other token (whitespaces and comments have no effect).
409 * tests/actions.at (Fix user actions without a trailing semicolon):
410 New test.
411 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
412 to make user actions complete statements.
413 Adjust column numbers in error messages.
414 * tests/regression.at (Fix user actions without a trailing semicolon):
415 Remove. Covered by new test.
416
417 2008-12-07 Akim Demaille <demaille@gostai.com>
418
419 Update gnulib.
420 * gnulib: Update from master.
421
422 2008-12-05 Eric Blake <ebb9@byu.net>
423
424 Avoid compiler warning.
425 * src/output.c (muscle_insert_item_number_table): Delete unused
426 function.
427
428 2008-12-02 Eric Blake <ebb9@byu.net>
429
430 Build testsuite with newer autoconf.
431 * tests/output.at (m4_expand): Don't override in newer autoconf,
432 where the underlying implementation changed.
433 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
434 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
435 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
436 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
437 since some of them contain unbalanced ')'.
438
439 2008-12-01 Akim Demaille <demaille@gostai.com>
440
441 Use b4_symbol for printers and destructors everywhere.
442 * data/bison.m4 (b4_symbol_action_location): New.
443 * data/c.m4 (b4_symbol_actions): Remove.
444 Adjust all callers to use by b4_symbol_foreach and the corresponding
445 b4_symbol_printer/destructor macro.
446 * data/glr.cc: Adjust.
447 * data/lalr1.java: Adjust the %destructor sanity check.
448 * src/output.c (symbol_code_props_output): Remove, we no longer
449 need the b4_symbol_printers/destructors tables.
450
451 2008-12-01 Akim Demaille <demaille@gostai.com>
452
453 Use b4_symbol_case_.
454 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
455 b4_symbol_case_.
456
457 2008-12-01 Akim Demaille <demaille@gostai.com>
458
459 Move b4_symbol based macro to bison.m4.
460 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
461 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
462 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
463 (b4_type_foreach): Move to...
464 * data/bison.m4: Here.
465 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
466 b4_symbol_value_template instead of b4_symbol_value.
467
468 2008-12-01 Akim Demaille <demaille@gostai.com>
469
470 b4_symbol/type_foreach.
471 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
472 Use them.
473
474 2008-12-01 Akim Demaille <demaille@gostai.com>
475
476 Use the symbol properties to output the printer/destructor for lalr1.cc.
477 Instead of defining complex list of tuples to define various
478 properties of the symbols, we now prefer to define symbols as
479 "structs" in m4: using the symbol key (its number), and the
480 property name, b4_symbol gives it value. Use this to handle
481 destructors and printers.
482
483 * src/output.c (CODE_PROP): New.
484 (prepare_symbol_definitions): Use it to define the printer and
485 destructor related attributes of the symbols.
486 * data/lalr1.cc (b4_symbol_actions): Rename as...
487 (b4_symbol_action): this.
488 Use b4_symbol instead of 6 arguments.
489 (b4_symbol_printer, b4_symbol_destructor): New.
490 Use them instead of b4_symbol_actions.
491
492 2008-12-01 Akim Demaille <demaille@gostai.com>
493
494 Avoid capturing variables too easily.
495 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
496 v__ and p__ instead of v and p.
497
498 2008-12-01 Akim Demaille <demaille@gostai.com>
499
500 Remove spurious empty line before syncline.
501 * data/bison.m4 (b4_syncline): Don't output an empty line before
502 the output.
503
504 2008-11-26 Akim Demaille <demaille@gostai.com>
505
506 Convert lib/Makefile.am into lib/local.mk.
507 The real problem is rather gnulib.mk, which itself is extracted
508 from a Makefile.am that gnulib expects to the "recursive". The
509 tool prefix-gnulib-mk converts such a gnulib.mk to be
510 non-recursive. Also, some AC_SUBST variables need to be adjusted.
511
512 * etc/prefix-gnulib-mk: New.
513 * bootstrap (slurp): Use it to convert further gnulib.mk.
514 No longer try to avoid re-creation of lib/gnulib.mk as the changes
515 are deeper.
516 * lib/Makefile.am: Rename as...
517 * lib/local.mk: this.
518 Adjust to be prefixed.
519 * Makefile.am, configure.ac: Adjust.
520 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
521
522 2008-11-26 Akim Demaille <demaille@gostai.com>
523
524 s/_FLAGS/FLAGS/.
525 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
526 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
527 Reported by Eric Blake.
528
529 2008-11-26 Akim Demaille <demaille@gostai.com>
530
531 Use b4_parser_tables_define in glr.cc.
532 * data/glr.c: Use b4_parser_tables_define instead of defining the
533 (deterministic integral) tables by hand.
534
535 2008-11-26 Akim Demaille <demaille@gostai.com>
536
537 Use b4_parser_tables_define in Java.
538 * data/java.m4 (b4_typed_parser_table): Rename as...
539 (b4_typed_parser_table_define): this, for consistency.
540 Accept a comment as $4.
541 Move $2 into yy*_.
542 (b4_integral_parser_table): Rename as...
543 (b4_integral_parser_table_define): this.
544 * data/lalr1.java: Adjust all uses.
545 Use b4_parser_tables_define instead of generation by hand.
546
547 2008-11-26 Akim Demaille <demaille@gostai.com>
548
549 Prepare the convergence bw C style and Java table generation.
550 * data/bison.m4 (b4_tables_map, b4_tables_declare)
551 (b4_tables_define): Rename as...
552 (b4_integral_parser_tables_map, b4_parser_tables_declare)
553 (b4_parser_tables_define): these.
554 * data/c.m4 (b4_table_define): Rename as...
555 (b4_integral_parser_table_define): this.
556 * data/lalr1.cc: Adjust.
557 (b4_table_define, b4_table_declare): Rename as...
558 (b4_integral_parser_table_define)
559 (b4_integral_parser_table_declare): these.
560 (yyrline_): Move the comment where it is actually used.
561 * data/yacc.c: Adjust.
562 (yyrline): Use b4_integral_parser_table_define.
563
564 2008-11-26 Akim Demaille <demaille@gostai.com>
565
566 Regen.
567 * src/parse-gram.h, src/parse-gram.c: Regen.
568
569 2008-11-26 Akim Demaille <demaille@gostai.com>
570
571 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
572 * data/lalr1.cc (b4_tables_map): Move to...
573 * data/bison.m4: here.
574 Update the comment for yytable during the flight.
575 (b4_tables_declare, b4_tables_define): New.
576 * data/lalr1.cc: Use them.
577 * data/c.m4 (b4_table_define): New.
578 * data/yacc.c: Use b4_tables_define instead of output the tables
579 by hand.
580 * tests/regression.at (Web2c Actions): Adjust the expected output,
581 the order of the tables changed.
582
583 2008-11-26 Akim Demaille <demaille@gostai.com>
584
585 Get rid of (yy)rhs and (yy)prhs.
586 These tables are no longer needed in the parsers, and they don't seem to
587 be useful. They are not documented either.
588
589 * src/output.c (prepare_rules): Get rid of rhs and prhs.
590 Adjust the computation of (yy)r2.
591
592 2008-11-26 Akim Demaille <demaille@gostai.com>
593
594 Rule length is unsigned.
595 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
596
597 2008-11-26 Akim Demaille <demaille@gostai.com>
598
599 Get rid of lalr1-split.cc.
600 It was no longer maintainer.
601
602 * data/lalr1-split.cc: Remove.
603 * etc/bench.pl.in (bench_fusion_parser): Remove.
604 Adjust.
605
606 2008-11-26 Akim Demaille <demaille@gostai.com>
607
608 Use yy* consistently.
609 * data/glr.c: Now that yyrhs no longer exists as a global
610 variable, rename local "rhs" variables into "yyrhs" for
611 consistency.
612
613 2008-11-25 Akim Demaille <demaille@gostai.com>
614
615 Get rid of yyrhs and yyprhs in glr.c.
616 * data/glr.c (yyrhs, yyprhs): Remove.
617 Instead, use the state stack and yystos.
618
619 2008-11-25 Akim Demaille <demaille@gostai.com>
620
621 Flag glr tests.
622 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
623 as an Autotest keyword.
624
625 2008-11-25 Akim Demaille <demaille@gostai.com>
626
627 Prefer TESTSUITE_FLAGS.
628 TESTSUITEFLAGS is barely readable.
629
630 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
631 for backward compatibility.
632 Use the former instead of the latter.
633
634 2008-11-25 Akim Demaille <demaille@gostai.com>
635
636 Get rid of yyrhs and yyprhs in larl1.java.
637 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
638 (yy_reduce_print): Rather, use yystos_ and the state stack.
639
640 2008-11-25 Akim Demaille <demaille@gostai.com>
641
642 Formatting changes.
643
644 2008-11-25 Akim Demaille <demaille@gostai.com>
645
646 Get rid of yyrhs and yyprhs in yacc.c.
647 They were used to get the symbol types, given a rule number, when
648 displaying the top of the stack before a reduction. But the
649 symbol type is available from the state stack. This has two be
650 benefits: two tables less in the parser (making it smaller), and a
651 more consistent use of the three stacks which will help to fuse
652 them.
653
654 * data/yacc.c (yyprhs, yyrhs): Remove.
655 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
656 (yy_reduce_print): Take yyssp as argument.
657 Use it, together with yystos, to get the symbol type.
658 * tests/regression.at (Web2c Report): Remove these tables from the
659 expected output.
660
661 2008-11-25 Akim Demaille <demaille@gostai.com>
662
663 b4_tables_map.
664 The point is to factor the generation of the tables across skeletons.
665 This is language dependant.
666
667 * data/c.m4 (b4_comment_): New.
668 Should be usable to define how to generate tables independently of
669 the language.
670 (b4_c_comment): New.
671 (b4_comment): Bounce to b4_c_comment.
672 Now support $2 = [PREFIX] for indentation.
673 * data/lalr1.cc (b4_table_declare): Don't output a comment if
674 there is no comment.
675 Indent it properly when there is one.
676 Output the ending semicolon.
677 (b4_table_define): Space changes.
678 Output the ending semicolon.
679 (b4_tables_map): New.
680 Use it twice instead of declaring and defining the (integral)
681 tables by hand.
682
683 2008-11-25 Akim Demaille <demaille@gostai.com>
684
685 b4_table_declare.
686 * data/lalr1.cc (b4_table_declare): New.
687 Use it to declare the tables defined with b4_table_define.
688 (b4_table_define): Declare a third arg to match b4_table_declare
689 signature.
690 Move all the comments around invocations of b4_table_define into
691 the invocations itselves.
692 Move things around to have the order for declarations and
693 definitions.
694
695 2008-11-25 Akim Demaille <demaille@gostai.com>
696
697 Formatting changes.
698 * data/lalr1.java: here.
699
700 2008-11-25 Akim Demaille <demaille@gostai.com>
701
702 b4_args is more general than only C++.
703 * data/lalr1.cc (b4_args, _b4_args): Move to...
704 * data/bison.m4: here.
705
706 2008-11-21 Di-an Jan <dianj@freeshell.org>
707
708 Implement no-XXX arguments for --warnings, --report, --trace.
709 * src/getargs.c (flags_argmatch): Handles no-XXX.
710 Fix typo in doxygen comment.
711
712 2008-11-21 Akim Demaille <demaille@gostai.com>
713
714 Display the changes in cross-options.texi.
715 * build-aux/cross-options.pl ($sep): New, to separate items.
716 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
717 changes.
718
719 2008-11-20 Di-an Jan <dianj@freeshell.org>
720
721 Improves options in the manual.
722 * doc/bison.texinfo (-g, -x): Add space before argument.
723 (Option Cross Key): Implement FIXME: listing directives also.
724 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
725 (Short Option): Special case -d. Put arguments inside @option.
726 (Bison Directive): Add column, automatically extracted from
727 src/scan-gram.l (actual name passed as the first argument)
728 with special case for %define.
729 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
730 to build-aux/cross-options.pl.
731 * src/getargs.c (usage): Document limitations of cross-options.pl.
732 * src/scan-gram.l: Likewise.
733
734 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
735
736 Fix unexpanded macros in GLR defines file.
737 Reported by Csaba Raduly at
738 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
739 * THANKS (Csaba Raduly): Add.
740 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
741 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
742 lexer in a separate module that includes the defines file.
743 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
744 source.
745 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
746 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
747 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
748 (AT_DATA_SOURCE_PROLOGUE): New.
749 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
750 (AT_DATA_SOURCE): New.
751 (AT_FULL_COMPILE): Extend to support an additional source file.
752
753 2008-11-18 Akim Demaille <demaille@gostai.com>
754
755 More TODO.
756 * TODO: More short term issues.
757
758 2008-11-18 Akim Demaille <demaille@gostai.com>
759
760 Regen.
761 * src/parse-gram.h, src/parse-gram.c: Regen.
762
763 2008-11-18 Akim Demaille <demaille@gostai.com>
764
765 Use b4_subtract where possible.
766 * data/lalr1.cc (b4_subtract): Move to...
767 * data/bison.m4: here.
768 * data/glr.c (b4_rhs_data): Use it.
769 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
770
771 2008-11-18 Akim Demaille <demaille@gostai.com>
772
773 Remove incorrect mode specification.
774 * data/glr.cc: Don't pretend it's C code.
775
776 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
777
778 Simplify last patch slightly.
779 * src/getargs.c (getargs): Here.
780
781 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
782
783 Fix last warning from --enable-gcc-warnings.
784 * src/getargs.c (getargs): Don't assign const address to non-const
785 pointer.
786
787 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
788
789 Don't let maintainer-*-check targets force a version update.
790 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
791 handled.
792
793 2008-11-17 Di-an Jan <dianj@freeshell.org>
794
795 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
796 Align menus. Adjust word wrapping. Use node names for menu names.
797 (Examples): Don't abbreviate node names.
798 (LocalWords): Remove abbreviations.
799 (Copying): Make description a sentence.
800 (Java Action Features): Remove period to match the rest of menu.
801
802 2008-11-17 Di-an Jan <dianj@freeshell.org>
803
804 Handles several --enable-gcc-warnings.
805 * src/getargs.c (command_line_location): Set parameters to void.
806 * src/output.c (symbol_type_name_cmp): Make static.
807 (symbols_by_type_name): Set parameters to void.
808 (symbol_definitions_output): Remove unused parameter. Rename as...
809 (prepare_symbol_definitions): this.
810 (muscles_output): Move symbol_definitions_output to...
811 (output): here as prepare_symbol_definitions.
812 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
813 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
814
815 2008-11-17 Di-an Jan <dianj@freeshell.org>
816
817 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
818 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
819
820 2008-11-16 Akim Demaille <demaille@gostai.com>
821
822 Add missing $(EXEEXT).
823 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
824 "src/bison$(EXEEXT)".
825 Reported by Di-an Jan.
826
827 2008-11-15 Akim Demaille <demaille@gostai.com>
828
829 * TODO: Update.
830
831 2008-11-15 Akim Demaille <demaille@gostai.com>
832
833 Formatting changes.
834 * tests/input.at: here.
835
836 2008-11-15 Akim Demaille <demaille@gostai.com>
837
838 Remove duplicate header inclusion.
839 * src/LR0.c: here.
840
841 2008-11-15 Akim Demaille <demaille@gostai.com>
842
843 * src/parse-gram.h, src/parse-gram.c: Regen.
844
845 2008-11-15 Akim Demaille <demaille@gostai.com>
846
847 Support parametric types.
848
849 There are two issues to handle: first scanning nested angle
850 bracket pairs to support types such as std::pair< std::string,
851 std::list<std::string> > >.
852
853 Another issue is to address idiosyncracies of C++: do not glue two
854 closing angle brackets together (otherwise it's operator>>), and
855 avoid sticking blindly a TYPE to the opening <, as it can result
856 in '<:' which is a digraph for '['.
857
858 * src/scan-gram.l (brace_level): Rename as...
859 (nesting): this.
860 (SC_TAG): New.
861 Implement support for complex tags.
862 (tag): Accept
863 , but not <.
864 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
865 (b4_symbol_variant): Leave space around types as parameters.
866 * examples/variant.yy: Use nested template types and leading ::.
867 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
868 Rename as...
869 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
870 * tests/c++.at: Test parametric types.
871
872 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
873
874 Test token.prefix.
875 This is not sufficient, but we test at least that the make_SYMBOL
876 interface is not affected by token.prefix. A more general test
877 will be implemented when the support of token.prefix is generalized
878 to more skeletons.
879
880 * tests/c++.at: One more variant test, using token.prefix.
881
882 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
883
884 Test the make_TOKEN interface.
885 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
886 Factor the common code in yylex.
887 Use it to test "%define lex_symbol".
888
889 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
890
891 Formatting change.
892
893 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
894
895 Simplify code for variants bench marks.
896 * etc/bench.pl.in (&generate_grammar_list): Define and use
897 location_type.
898 Factor the common code in yylex.
899
900 2008-11-15 Akim Demaille <demaille@gostai.com>
901
902 Better error message.
903 * bootstrap (find_tool): Fix the error message.
904
905 2008-11-15 Akim Demaille <demaille@gostai.com>
906
907 Update variant.yy to newest interface.
908 * examples/variant.yy: Define lex_symbol.
909 Adjust.
910
911 2008-11-15 Akim Demaille <demaille@gostai.com>
912
913 Don't use locations in variant.yy.
914 * examples/variant.yy: Adjust to not using locations.
915
916 2008-11-15 Akim Demaille <demaille@gostai.com>
917
918 Comment changes.
919 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
920 comments for the license.
921
922 2008-11-15 Akim Demaille <demaille@gostai.com>
923
924 Remove tests/Makefile.am.
925 * tests/Makefile.am: Rename as...
926 * tests/local.mk: this.
927 * Makefile.am, configure.ac: Adjust.
928 * Makefile.am (DISTCLEANFILES): Define.
929 (maintainer-check, maintainer-xml-check, maintainer-push-check):
930 Remove, we no longer need to bounce to the real targets.
931
932 2008-11-15 Akim Demaille <demaille@gostai.com>
933
934 Comment changes.
935
936 2008-11-15 Akim Demaille <demaille@gostai.com>
937
938 djgpp/local.mk.
939 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
940 * djgpp/local.mk: this new file.
941
942 2008-11-15 Akim Demaille <demaille@gostai.com>
943
944 Remove doc/Makefile.am.
945 * doc/Makefile.am: Rename as...
946 * doc/local.mk: this.
947 Adjust paths
948 * Makefile.am, configure.ac: Adjust.
949 * Makefile.am (MOSTLYCLEANFILES): New.
950 * src/local.mk: Adjust.
951
952 2008-11-15 Akim Demaille <demaille@gostai.com>
953
954 Move sc_tight_scope into maint.mk.
955 It does not work, and I don't know how it was supposed to work: it
956 seems to be looking for sources in the build tree. I just moved
957 it at a better place, fixing it is still required.
958
959 * src/local.mk (echo): Remove.
960 (sc_tight_scope): Move to...
961 * maint.mk: here.
962
963 2008-11-15 Akim Demaille <demaille@gostai.com>
964
965 Regen.
966 * src/parse-gram.h, src/parse-gram.h: Regen.
967
968 2008-11-15 Akim Demaille <demaille@gostai.com>
969
970 Remove src/Makefile.am.
971 * src/Makefile.am: Rename as...
972 * src/local.mk: this.
973 Prefix all the paths with src/.
974 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
975 (AM_CPPFLAGS): Find find in builddir/src.
976 (YACC): Move the flags into...
977 (AM_YFLAGS): here.
978 * maint.mk (sc_tight_scope): Disable.
979 It used to bounce to the version in src/Makefile.am which is now
980 part of this very Makefile.
981 * Makefile.am, configure.ac: Adjust.
982 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
983 include "..." to find files "here": we are no longer in src/, so
984 qualify the includes with src/.
985 * doc/Makefile.am (PREPATH): No longer include the top_builddir
986 prefix.
987 (.x.1): Adjust to be able to create src/foo from the top level
988 Makefile, instead of going bounce to src/Makefile the creation of
989 foo.
990
991 2008-11-15 Akim Demaille <demaille@gostai.com>
992
993 Remove useless variable.
994 * doc/Makefile.am (srcsrcdir): Remove.
995
996 2008-11-15 Akim Demaille <demaille@gostai.com>
997
998 Remove data/Makefile.am.
999 * data/Makefile.am: Rename as...
1000 * data/local.mk: this.
1001 Adjust paths.
1002 * Makefile.am, configure.ac: Adjust.
1003
1004 2008-11-15 Akim Demaille <demaille@gostai.com>
1005
1006 Remove etc/Makefile.am.
1007 * etc/Makefile.am: Rename as...
1008 * etc/local.mk: this.
1009 Adjust.
1010 * Makefile.am, configure.ac: Adjust.
1011
1012 2008-11-15 Akim Demaille <demaille@gostai.com>
1013
1014 Remove examples/local.mk.
1015 examples/calc++/Makefile.am might be interesting to keep as is, since
1016 it is an example in itself.
1017
1018 * examples/Makefile.am: Rename as...
1019 * examples/local.mk: this.
1020 Adjust.
1021 * Makefile.am, configure.ac: Adjust.
1022
1023 2008-11-15 Akim Demaille <demaille@gostai.com>
1024
1025 Remove build-aux/Makefile.am.
1026 Recursive Makefiles are really way too slow, let's get rid of some of
1027 them.
1028
1029 * build-aux/Makefile.am: Rename as...
1030 * build-aux/local.mk: this.
1031 Adjust paths.
1032 * Makefile.am, configure.ac: Adjust.
1033
1034 2008-11-15 Akim Demaille <demaille@gostai.com>
1035
1036 Provide convenience constructors for locations and positions.
1037 * data/location.cc (position::position): Accept file, line and
1038 column as arguments with default values.
1039 Always qualify initial line and column literals as unsigned.
1040 (location::location): Provide convenience constructors.
1041
1042 2008-11-15 Akim Demaille <demaille@gostai.com>
1043
1044 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
1045 token type.
1046 Using template buys us nothing, and makes it uselessly complex to
1047 construct a symbol. Besides, it could not be generalized to other
1048 languages, while make_FOO would work in C/Java etc.
1049
1050 * data/lalr1.cc (b4_symbol_): New.
1051 (b4_symbol): Use it.
1052 (b4_symbol_constructor_declaration_)
1053 (b4_symbol_constructor_definition_): Instead of generating
1054 specializations of an overloaded template function, just generate
1055 several functions whose names are forged from the token names
1056 without the token.prefix.
1057 (b4_symbol_constructor_declarations): Generate them for all the
1058 symbols, not just by class of symbol type, now that instead of
1059 specializing a function template by the token, we generate a
1060 function named after the token.
1061 (b4_symbol_constructor_specialization_)
1062 (b4_symbol_constructor_specializations): Remove.
1063 * etc/bench.pl.in: Adjust to this new API.
1064
1065 2008-11-13 Akim Demaille <demaille@gostai.com>
1066
1067 %define token.prefix.
1068 Provide a means to add a prefix to the name of the tokens as
1069 output in the generated files. Because of name clashes, it is
1070 good to have such a prefix such as TOK_ that protects from names
1071 such as EOF, FILE etc. But it clutters the grammar itself.
1072
1073 * data/bison.m4 (token.prefix): Empty by default.
1074 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
1075 * data/lalr1.cc (b4_symbol): Ditto.
1076
1077 2008-11-13 Akim Demaille <demaille@gostai.com>
1078
1079 Compute at M4 time some of the subtractions.
1080 * data/lalr1.cc (b4_subtract): New.
1081 (b4_rhs_data): Use it.
1082
1083 2008-11-13 Akim Demaille <demaille@gostai.com>
1084
1085 symbol::token.
1086 This allows the user to get the type of a token returned by yylex.
1087
1088 * data/lalr1.cc (symbol::token): New.
1089 (yytoknum_): Define when %define lex_symbol, independently of
1090 %debug.
1091 (yytoken_number_): Move into...
1092 (symbol::token): here, since that's the only use.
1093 The other one is YYPRINT which was not officially supported
1094 by lalr1.cc, and anyway it did not work since YYPRINT uses this
1095 array under a different name (yytoknum).
1096
1097 2008-11-13 Akim Demaille <demaille@gostai.com>
1098
1099 YYERRCODE.
1100 * TODO (YYERRCODE): Mention the case of $undef.
1101
1102 2008-11-13 Akim Demaille <demaille@gostai.com>
1103
1104 TODO: YYPRINT.
1105 * TODO (YYPRINT): New.
1106
1107 2008-11-13 Akim Demaille <demaille@gostai.com>
1108
1109 Comment changes.
1110 * data/lalr1.cc, data/yacc.c: Fix the description of the
1111 yytranslate and yytoknum tables.
1112
1113 2008-11-13 Akim Demaille <demaille@gostai.com>
1114
1115 Define make_symbol in the header.
1116 To reach good performances these functions should be inlined (yet
1117 this is to measure precisely). To this end they must be available
1118 to the caller.
1119
1120 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
1121 location_type with the class name.
1122 Since will now be output in the header, declare "inline".
1123 No longer use b4_symbol_constructor_specializations, but
1124 b4_symbol_constructor_definitions in the header.
1125 Don't call it in the *.cc file.
1126
1127 2008-11-13 Akim Demaille <demaille@gostai.com>
1128
1129 Define yytranslate in the header for lex_symbol.
1130 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
1131 into the header file when using %define lex_symbol.
1132 (yytranslate_): Declare inline.
1133
1134 2008-11-13 Akim Demaille <demaille@gostai.com>
1135
1136 Define the constructors of symbol_type in
1137 b4_symbol_constructor_definitions.
1138 The constructors are called by the make_symbol functions, which a
1139 forthcoming patch will move elsewhere. Hence the interest of
1140 putting them together.
1141
1142 The stack_symbol_type does not need to be moved, it is used only
1143 by the parser.
1144
1145 * data/lalr1.cc: Move symbol_type and symbol_base_type
1146 constructors into...
1147 (b4_symbol_constructor_definitions): here.
1148 Adjust.
1149
1150 2008-11-13 Akim Demaille <demaille@gostai.com>
1151
1152 Make it easier to move the definition of yytranslate_.
1153 Forthcoming changes will make it possible to use yytranslate_
1154 from outside the parser implementation file.
1155
1156 * data/lalr1.cc (b4_yytranslate_definition): New.
1157 Use it.
1158
1159 2008-11-13 Akim Demaille <demaille@gostai.com>
1160
1161 Remove useless class specification.
1162 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
1163 to refer to the class name to use a type defined by the class for
1164 arguments of member functions.
1165
1166 2008-11-13 Akim Demaille <demaille@gostai.com>
1167
1168 Finer input type for yytranslate.
1169 This patch is debatable: the tradition expects yylex to return an int
1170 which happens to correspond to token_number (which is an enum). This
1171 allows for instance to return characters (such as '*' etc.). But this
1172 goes against the stronger typing I am trying to have with the new
1173 lex interface which return a symbol_type. So in this case, feed
1174 yytranslate_ with a token_type.
1175
1176 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
1177 expect a token_type.
1178
1179 2008-11-13 Akim Demaille <demaille@gostai.com>
1180
1181 Honor lex-params in %define lex_symbol mode.
1182 * data/lalr1.cc: Use b4_lex_param.
1183
1184 2008-11-13 Akim Demaille <demaille@gostai.com>
1185
1186 Simplify names.
1187 * src/output.c (symbol_definitions_output): Rename symbol
1188 attributes type_name and has_type_name as type and has_type.
1189 * data/lalr1.cc: Adjust uses.
1190
1191 2008-11-13 Akim Demaille <demaille@gostai.com>
1192
1193 Use b4_type_names for the union type.
1194 The union used to compute the size of the variant used to iterate
1195 over the type of all the symbols, with a lot of redundancy. Now
1196 iterate over the lists of symbols having the same type-name.
1197
1198 * data/lalr1.cc (b4_char_sizeof_): New.
1199 (b4_char_sizeof): Use it.
1200 Adjust to be called with a list of numbers instead of a single
1201 number.
1202 Adjust its caller for new-line issues.
1203
1204 2008-11-13 Akim Demaille <demaille@gostai.com>
1205
1206 Define the "identifier" of a symbol.
1207 Symbols may have several string representations, for instance if
1208 they have an alias. What I call its "id" is a string that can be
1209 used as an identifier. May not exist.
1210
1211 Currently the symbols which have the "tag_is_id" flag set are
1212 those that don't have an alias. Look harder for the id.
1213
1214 * src/output.c (is_identifier): Move to...
1215 * src/symtab.c (is_identifier): here.
1216 * src/symtab.h, src/symtab.c (symbol_id_get): New.
1217 * src/output.c (symbol_definitions_output): Use it to define "id"
1218 and "has_id".
1219 Remove the definition of "tag_is_id".
1220 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
1221 "tag_is_id" were used to produce code.
1222 We still use "tag" for documentation.
1223
1224 2008-11-11 Akim Demaille <demaille@gostai.com>
1225
1226 Locations are no longer required by lalr1.cc.
1227 * data/lalr1.cc (_b4_args, b4_args): New.
1228 Adjust all uses of locations to make them optional.
1229 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
1230 (AT_CHECK_NAMESPACE): Check the use of locations.
1231 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
1232 without locations with lalr1.cc.
1233 Test these cases.
1234 * tests/output.at: Check lalr1.cc with and without location
1235 support.
1236 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
1237 Don't use locations.
1238
1239 2008-11-11 Akim Demaille <demaille@gostai.com>
1240
1241 AT_FULL_COMPILE.
1242 * tests/local.at (AT_FULL_COMPILE): New.
1243 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
1244
1245 2008-11-11 Akim Demaille <demaille@gostai.com>
1246
1247 Support parens in calc++.
1248 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
1249 * examples/calc++/test (run): Check the expected output.
1250 Adjust callers.
1251 Check parens too.
1252
1253 2008-11-11 Akim Demaille <demaille@gostai.com>
1254
1255 Simplify lalr1.cc since %defines is mandatory.
1256 * data/lalr1.cc: Remove useless calls to b4_defines_if.
1257
1258 2008-11-11 Akim Demaille <demaille@gostai.com>
1259
1260 TODO: yyfmt.
1261 * TODO (yysyntax_error): New item.
1262
1263 2008-11-11 Akim Demaille <demaille@gostai.com>
1264
1265 Prefer M4 to CPP.
1266 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1267 YYERROR_VERBOSE.
1268
1269 2008-11-11 Akim Demaille <demaille@gostai.com>
1270
1271 Support i18n of the parse error messages.
1272 * TODO (lalr1.cc/I18n): Remove.
1273 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1274 error messages, as done in yacc.c.
1275 Stay within the yy* pseudo namespace.
1276
1277 2008-11-11 Akim Demaille <demaille@gostai.com>
1278
1279 More TODO.
1280 * TODO (single stack, yysyntax_error): New.
1281
1282 2008-11-11 Akim Demaille <demaille@gostai.com>
1283
1284 Make it possible to return a symbol_type from yylex.
1285 * data/lalr1.cc (b4_lex_symbol_if): New.
1286 (parse): When lex_symbol is defined, expected yylex to return the
1287 complete lookahead.
1288 * etc/bench.pl.in (generate_grammar_list): Extend to support this
1289 yylex interface.
1290 (bench_variant_parser): Exercise it.
1291
1292 2008-11-11 Akim Demaille <demaille@gostai.com>
1293
1294 Remove useless bench case.
1295 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
1296 no longer used.
1297
1298 2008-11-11 Akim Demaille <demaille@gostai.com>
1299
1300 Improve display of directives.
1301 * etc/bench.pl.in (parse_term): Don't add useless eol.
1302
1303 2008-11-11 Akim Demaille <demaille@gostai.com>
1304
1305 Use string_cast in the bench.
1306 * etc/bench.pl.in (generate_grammar_list): Define and use
1307 string_cast.
1308
1309 2008-11-11 Akim Demaille <demaille@gostai.com>
1310
1311 Replace yychar with a Boolean.
1312 * data/lalr1.cc (parse::yychar): Replace by...
1313 (parse::yyempty): this.
1314
1315 2008-11-11 Akim Demaille <demaille@gostai.com>
1316
1317 Factor the tables.
1318 * TODO: New item.
1319
1320 2008-11-11 Akim Demaille <demaille@gostai.com>
1321
1322 Let yytranslate handle the eof case.
1323 * data/lalr1.cc (yytranslate_): Handle the EOF case.
1324 Adjust callers.
1325 No longer expect yychar to be equal to yyeof_, rather, test the
1326 lookahead's (translated) kind.
1327
1328 2008-11-11 Akim Demaille <demaille@gostai.com>
1329
1330 yychar cannot be empty in yyerrlab.
1331 * TODO (yychar == yyempty_): New.
1332 * data/lalr1.cc: Remove the handling of this case.
1333 This eases forthcoming changes related to yychar and yytranslate.
1334
1335 2008-11-11 Akim Demaille <demaille@gostai.com>
1336
1337 Bench: syntactic sugar for %define/#define.
1338 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
1339 (&bench_push_parser, bench_variant_parser): Use this feature.
1340 (&eat): New.
1341 Use it.
1342
1343 2008-11-11 Akim Demaille <demaille@gostai.com>
1344
1345 Less memory pressure on the "list" bench.
1346 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
1347 the values, to limit memory pressure.
1348
1349 2008-11-11 Akim Demaille <demaille@gostai.com>
1350
1351 Introduce make_symbol.
1352 make_symbol provides a means to construct a full symbol (kind,
1353 value, location) in a single shot. It is meant to be a Symbol
1354 constructor, parameterized by the symbol kind so that overloading
1355 would prevent incorrect kind/value pairs. Unfortunately
1356 parameterized constructors do not work well in C++ (unless the
1357 parameter also appears as an argument, which is not acceptable),
1358 hence the use of a function instead of a constructor.
1359
1360 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1361 (b4_symbol_constructor_declarations)
1362 (b4_symbol_constructor_specialization_)
1363 (b4_symbol_constructor_specializations)
1364 (b4_symbol_constructor_definition_)
1365 (b4_symbol_constructor_definitions): New.
1366 Use them where appropriate to generate declaration, declaration of
1367 the specializations, and implementations of the templated
1368 overloaded function "make_symbol".
1369 (variant::variant): Always define a default ctor.
1370 Also provide a copy ctor.
1371 (symbol_base_type, symbol_type): New ctor overloads for value-less
1372 symbols.
1373 (symbol_type): Now public, so that functions such as yylex can use
1374 it.
1375
1376 2008-11-11 Akim Demaille <demaille@gostai.com>
1377
1378 Inform m4 whether a tag is a valid id.
1379 * src/output.c (is_identifier): New.
1380 (symbol_definitions_output): Use it to define tag_is_id.
1381 But maybe this should be done at m4 level?
1382
1383 2008-11-11 Akim Demaille <demaille@gostai.com>
1384
1385 Test 214 was failing: it greps with a pattern containing [ ]*
1386 which obviously meant to catch spaces and tabs, but contained only
1387 spaces. Tabulations in sources are a nuisance, so to simplify the
1388 matter, get rid of all the tabulations in the Java sources. The
1389 other skeletons will be treated equally later.
1390
1391 * data/java.m4, data/lalr1.java: Untabify.
1392 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
1393 tabulations are no longer generated.
1394
1395 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
1396
1397 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1398 * configure.ac: Adjust usage.
1399 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1400 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1401 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1402
1403 2008-11-10 Di-an Jan <dianj@freeshell.org>
1404
1405 Workaround Java's ``code too large'' problem for parser tables
1406 in most cases, by using one function per initialization.
1407 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
1408 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
1409 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
1410 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
1411 (yytname_): Use b4_typed_parser_table.
1412 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
1413 ``code too large'' error.
1414
1415 2008-11-10 Di-an Jan <dianj@freeshell.org>
1416
1417 * NEWS: Document them.
1418
1419 General Java skeleton improvements.
1420 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
1421 using gcj < 4.3 in the testsuite, according to comments in
1422 gnulib/m4/javacomp.m4.
1423 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
1424 location_type, position_type): Remove extraneous brackets from
1425 b4_percent_define_default.
1426 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
1427 m4_define and m4_define_default.
1428 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
1429 which marks the end of user code with appropriate syncline, like all
1430 the other skeletons.
1431 (b4_user_post_prologue): Add. Don't silently drop.
1432 (yylex): Remove.
1433 (parse): Inline yylex.
1434 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
1435 (%{...%}): Fix typo of %code imports.
1436 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
1437
1438 Support annotations on parser class with %define annotations.
1439 * data/lalr1.java (annotations): Add to parser class modifier.
1440 * doc/bison.texinfo (Java Parser Interface): Document
1441 %define annotations.
1442 (Java Declarations Summary): Document %define annotations.
1443 * tests/java.at (Java parser class modifiers): Test annotations.
1444
1445 Do not generate code for %error-verbose unless requested.
1446 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
1447 Make private. Make conditional on %error-verbose.
1448 (getErrorVerbose, setErrorVerbose): New.
1449 (yytnamerr_): Make conditional on %error-verbose.
1450 (yysyntax_error): Make some code conditional on %error-verbose.
1451 * doc/bison.texinfo (Java Bison Interface): Remove the parts
1452 about %error-verbose having no effect.
1453 (getErrorVerbose, setErrorVerbose): Document.
1454
1455 Move constants for token names to Lexer interface.
1456 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
1457 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
1458 (parse): Qualify EOF to Lexer.EOF.
1459 * doc/bison.texinfo (Java Parser Interface): Move documentation of
1460 EOF and token names to Java Lexer Interface.
1461 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
1462
1463 Make yyerror public.
1464 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
1465 (yyerror): Change to public. Add Javadoc comments. Use longer
1466 parameter names. Make the body rather than the declarator
1467 conditional on %locations.
1468 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
1469
1470 Allow user to add code to the constructor with %code init.
1471 * data/java.m4 (b4_init_throws): New, for %define init_throws.
1472 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
1473 Add %code init to the front of the constructor body.
1474 * doc/bison.texinfo (YYParser.YYParser): Document %code init
1475 and %define init_throws.
1476 (Java Declarations Summary): Document %code init and
1477 %define init_throws.
1478 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
1479 (Java constructor init and init_throws): Add tests.
1480
1481 2008-11-10 Akim Demaille <demaille@gostai.com>
1482
1483 Update TODO.
1484 * TODO (-D): is implemented.
1485 (associativity): Same precedence must have the same associativity.
1486 For instance, how can a * b / c be parsed if * is %left and / is
1487 %right?
1488 (YYERRORCODE, YYFAIL, YYBACKUP): New.
1489
1490 2008-11-10 Akim Demaille <demaille@gostai.com>
1491
1492 Formatting changes.
1493
1494 2008-11-10 Akim Demaille <demaille@gostai.com>
1495
1496 More information about the symbols.
1497 * src/output.c (type_names_output): Document all the symbols,
1498 including those that don't have a type-name.
1499 (symbol_definitions_output): Define "is_token" and
1500 "has_type_name".
1501 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
1502 type-name, now that they are defined too in b4_type_names.
1503
1504 2008-11-10 Akim Demaille <demaille@gostai.com>
1505
1506 Regen.
1507
1508 2008-11-10 Akim Demaille <demaille@gostai.com>
1509
1510 Make parser::yytranslate static.
1511 Small speedup (1%) on the list grammar. And makes yytranslate_
1512 available in non member functions.
1513
1514 * data/lalr1.cc (yytranslate_): Does not need to be a instance
1515 function.
1516
1517 2008-11-10 Akim Demaille <demaille@gostai.com>
1518
1519 Avoid trailing spaces.
1520 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
1521 * data/lalr1.cc: Don't indent before rule and symbol actions, as
1522 they can be empty, and anyway this incorrectly indents the first
1523 action.
1524
1525 2008-11-10 Akim Demaille <demaille@gostai.com>
1526
1527 Comment changes.
1528
1529 2008-11-10 Akim Demaille <demaille@gostai.com>
1530
1531 Use "enum" for integral constants.
1532 This is just nicer to read, I observed no speedup.
1533
1534 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
1535 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
1536 (yyuser_token_number_max_, yyundef_token_): Move into...
1537 (yytranslate_): here.
1538
1539 2008-11-10 Akim Demaille <demaille@gostai.com>
1540
1541 Shortcuts in bench directives.
1542 * etc/bench.pl.in (parse_dirs): New.
1543 Use it.
1544 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
1545 Create the benches in "benches/".
1546
1547 2008-11-10 Akim Demaille <demaille@gostai.com>
1548
1549 Formatting changes.
1550 * data/lalr1.cc: here.
1551
1552 2008-11-10 Akim Demaille <demaille@gostai.com>
1553
1554 Adjust verbose message to using emacs.
1555 * etc/bench.pl.in: Inform compilation-mode when we change the
1556 directory.
1557 (generate_grammar_list): Recognize %define "variant" in addition
1558 to %define variant.
1559
1560 2008-11-10 Akim Demaille <demaille@gostai.com>
1561
1562 Classify symbols by type-name.
1563 * src/uniqstr.h (UNIQSTR_CMP): New.
1564 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
1565 (type_names_output): New.
1566 (muscles_output): Use it.
1567 * data/lalr1.cc (b4_symbol_action_): Remove.
1568 (b4_symbol_case_, b4_type_action_): New.
1569 Adjust uses of b4_symbol_action_ to use b4_type_action_.
1570
1571 2008-11-10 Akim Demaille <demaille@gostai.com>
1572
1573 Change the handling of the symbols in the skeletons.
1574 Before we were using tables which lines were the symbols and which
1575 columns were things like number, tag, type-name etc. It is was
1576 difficult to extend: each time a column was added, all the numbers had
1577 to be updated (you asked for colon $2, not for "tag"). Also, it was
1578 hard to filter these tables when only a subset of the symbols (say the
1579 tokens, or the nterms, or the tokens that have and external number
1580 *and* a type-name) was of interest.
1581
1582 Now instead of monolithic tables, we define one macro per cell. For
1583 instance "b4_symbol(0, tag)" is a macro name which contents is
1584 self-decriptive. The macro "b4_symbol" provides easier access to
1585 these cells.
1586
1587 * src/output.c (type_names_output): Remove.
1588 (symbol_numbers_output, symbol_definitions_output): New.
1589 (muscles_output): Call them.
1590 (prepare_symbols): Define b4_symbols_number.
1591
1592 2008-11-10 Akim Demaille <demaille@gostai.com>
1593
1594 --trace=muscles
1595 * src/getargs.h, src/getargs.c (trace_muscle): New.
1596 (trace_types, trace_args): Support it.
1597 * src/output.c (output_skeleton): Use it.
1598
1599 2008-11-10 Akim Demaille <demaille@gostai.com>
1600
1601 muscles_output.
1602 * src/output.c (muscles_output): New, extracted from...
1603 (output_skeleton): here.
1604 Adjust.
1605
1606 2008-11-10 Akim Demaille <demaille@gostai.com>
1607
1608 Formatting changes.
1609
1610 2008-11-10 Akim Demaille <demaille@gostai.com>
1611
1612 Update the variant example.
1613 * examples/variant.yy: Formatting changes.
1614 One stage build.
1615
1616 2008-11-10 Akim Demaille <demaille@gostai.com>
1617
1618 Support constructor with an argument.
1619 This improves the "list" bench by 2%.
1620
1621 * data/lalr1.cc (variant::build): Add an overloaded version with
1622 an argument.
1623 * tests/c++.at (AT_CHECK_VARIANT): Check it.
1624
1625 2008-11-10 Akim Demaille <demaille@gostai.com>
1626
1627 Test variants.
1628 * tests/c++.at (AT_CHECK_VARIANTS): New.
1629 Use it with and without %define assert.
1630
1631 2008-11-10 Akim Demaille <demaille@gostai.com>
1632
1633 Add %precedence support.
1634 Unfortunately it is not possible to reuse the %prec directive. This
1635 is because to please POSIX, we do not require to end the rules with a
1636 semicolon. As a result,
1637
1638 foo: bar %prec baz
1639
1640 is ambiguous: either a rule which precedence is that of baz, or a rule,
1641 and then a declaration of the precedence of the token baz.
1642
1643 * doc/bison.texinfo: Document %precedence.
1644 (Precedence Only): New.
1645 * src/assoc.h, src/assoc.c (precedence_assoc): New.
1646 * src/conflicts.c (resolve_sr_conflict): Support it.
1647 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
1648 Parse it.
1649 * tests/calc.at: Use %precedence for NEG.
1650 * tests/conflicts.at (%precedence does not suffice)
1651 (%precedence suffices): New tests.
1652
1653 2008-11-09 Akim Demaille <demaille@gostai.com>
1654
1655 Make benches in a sub dirs.
1656 * etc/bench.pl.in ($dir): New.
1657 Use it.
1658 Check the use of constructors with an argument.
1659 (bench_variant_parser): Fix.
1660
1661 2008-11-09 Akim Demaille <demaille@gostai.com>
1662
1663 fix eof condition
1664
1665 2008-11-09 Akim Demaille <demaille@gostai.com>
1666
1667 Fix --help.
1668
1669 2008-11-09 Akim Demaille <demaille@gostai.com>
1670
1671 Require the generation of parse-gram.output.
1672 * src/Makefile.am (YACC): Pass --report=all.
1673
1674 2008-11-09 Akim Demaille <demaille@gostai.com>
1675
1676 Formatting changes.
1677
1678 2008-11-09 Akim Demaille <demaille@gostai.com>
1679
1680 Update TODO.
1681 * TODO: Remove obsolete items.
1682 Update others.
1683
1684 2008-11-09 Akim Demaille <demaille@gostai.com>
1685
1686 Enhance bench.pl.
1687 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
1688 (@token, $grammar, $bench): New.
1689 (generate_grammar_variant): Rename as...
1690 (generate_grammar_list): this.
1691 (generate_grammar): Adjust.
1692 (bench_grammar): Rename as...
1693 (bench): this.
1694 Use it in the various bench-marking routines.
1695 (-b, -g): New options.
1696
1697 2008-11-09 Akim Demaille <demaille@gostai.com>
1698
1699 Use a static hierarchy for symbols in the C++ parser.
1700 * data/lalr1.cc (symbol_base_type, symbol_type)
1701 (stack_symbol_type): Make it a static hierarchy.
1702 Adjust dependencies.
1703
1704 2008-11-09 Akim Demaille <demaille@gostai.com>
1705
1706 bench.pl -d, --directive.
1707 * etc/bench.pl.in (@directive): New.
1708 (&bench_grammar): Use it.
1709 (&bench_list_grammar): New, to provide access to the "variant"
1710 grammar.
1711 Use it.
1712 (getopts): Support -d, --directive.
1713
1714 2008-11-09 Akim Demaille <demaille@gostai.com>
1715
1716 Use inline for small operations.
1717 * data/lalr1.cc (symbol_base_type, symbol_type)
1718 (stack_symbol_type): Declare constructor and other operations as
1719 inline.
1720 (yy_destroy_): Inline.
1721
1722 2008-11-09 Akim Demaille <demaille@gostai.com>
1723
1724 Introduce a hierarchy for symbols.
1725 * data/lalr1.cc (symbol_base_type, symbol_type): New.
1726 (data_type): Rename as...
1727 (stack_symbol_type): this.
1728 Derive from symbol_base_type.
1729 (yy_symbol_value_print_): Merge into...
1730 (yy_symbol_print_): this.
1731 Rename as...
1732 (yy_print_): this.
1733 (yydestruct_): Rename as...
1734 (yy_destroy_): this.
1735 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
1736 (parser::parse): yyla is now of symbol_type.
1737 Use its type member instead of yytoken.
1738
1739 2008-11-09 Akim Demaille <demaille@gostai.com>
1740
1741 Rename data_type and stack_symbol_type.
1742 * data/lalr1.cc (data_type): Rename as...
1743 (stack_symbol_type): this.
1744
1745 2008-11-09 Akim Demaille <demaille@gostai.com>
1746
1747 Handle semantic value and location together.
1748 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
1749 yydata.value and yydata.location.
1750 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
1751 (YY_SYMBOL_PRINT): Now take semantic value and location as a
1752 single arg.
1753 Adjust all callers.
1754 (yydestruct_): New overload for a stack symbol.
1755
1756 2008-11-09 Akim Demaille <demaille@gostai.com>
1757
1758 Push a complete symbol, not connected parts.
1759 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
1760 state, value and location.
1761 Adjust callers.
1762
1763 2008-11-09 Akim Demaille <demaille@gostai.com>
1764
1765 Agregate yylval and yylloc.
1766 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
1767 (parser::yyla): this.
1768
1769 2008-11-09 Akim Demaille <demaille@gostai.com>
1770
1771 Rely on the state stack to display reduction traces.
1772 To display rhs symbols before a reduction, we used information
1773 about the rule reduced, which required the tables yyrhs and
1774 yyprhs. Now use rely only on the state stack to get the same
1775 information.
1776
1777 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
1778 Use them.
1779 (parser::yyrhs_, parser::yyprhs_): Remove.
1780 (parser::yy_reduce_print_): Use the state stack.
1781
1782 2008-11-09 Akim Demaille <demaille@gostai.com>
1783
1784 Fuse yyval and yyloc into yylhs.
1785 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
1786 yylhs.
1787 (parse): Replace yyval and yyloc with yylhs.value and
1788 yylhs.location.
1789 After a user action, compute yylhs.state earlier.
1790 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
1791 fresh error_token.
1792
1793 2008-11-09 Di-an Jan <dianj@freeshell.org>
1794
1795 Remove unused variable.
1796 * src/output.c (type_names_output): Remove unused variable sep.
1797
1798 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
1799
1800 Change tests/output.at quoting.
1801 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
1802 expanding arguments.
1803
1804 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1805
1806 Don't add a semicolon to actions for %skeleton or %language.
1807 It breaks Java test cases as reported by Akim Demaille.
1808 * src/scan-code.l: Implement.
1809
1810 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1811
1812 Clean up %skeleton and %language priority implementation.
1813 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1814 remove static qualifier because others will soon need to see it.
1815 (language_prio): Likewise.
1816 (getargs): Use command_line_prio rather than 0.
1817 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1818 enum fields.
1819 (skeleton_prio): Extern it.
1820 (language_prio): Extern it.
1821 * src/parse-gram.y: Use grammar_prio rather than 1.
1822
1823 2008-11-07 Akim Demaille <demaille@gostai.com>
1824
1825 Moving push traces into yypush_.
1826 * data/lalr1.cc (yypush_): Now takes a optional trace message.
1827 Adjust all uses.
1828
1829 2008-11-07 Akim Demaille <demaille@gostai.com>
1830
1831 The single-stack C++ parser is now the standard one.
1832 * data/lalr1.cc: Rename as...
1833 * data/lalr1-split.cc: this.
1834 * data/lalr1-fusion.cc: Rename as...
1835 * data/lalr1.cc: this.
1836 * etc/bench.pl.in: Adjust.
1837
1838 2008-11-07 Akim Demaille <demaille@gostai.com>
1839
1840 Avoid empty-if warnings.
1841 Reported by Quentin Hocquet.
1842
1843 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
1844 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
1845
1846 2008-11-07 Akim Demaille <demaille@gostai.com>
1847
1848 Pass command line location to skeleton_arg and language_argmatch.
1849 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
1850 The location argument is now mandatory.
1851 Adjust all dependencies.
1852 (getargs): Use command_line_location.
1853
1854 2008-11-07 Akim Demaille <demaille@gostai.com>
1855
1856 -D, --define.
1857 * src/getargs.c (usage): Document -D.
1858 Fix help string for --locations.
1859 (command_line_location): New.
1860 (short_options, long_options, getargs): Support -D, --define.
1861 (getargs): Move -d support at the right place.
1862 * doc/bison.texinfo (Bison Options): Update.
1863 * tests/input.at (%define, --define): New.
1864
1865 2008-11-07 Akim Demaille <demaille@gostai.com>
1866
1867 Initialize the muscle table before parsing the command line.
1868 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
1869 (getargs): Define file_name.
1870 * src/main.c (main): Initialize muscle_tab before calling
1871 getargs.
1872 * src/muscle_tab.c (muscle_init): No longer define file_name, as
1873 its value is not available yet.
1874
1875 2008-11-07 Akim Demaille <demaille@gostai.com>
1876
1877 Locations without columns for command line arguments.
1878 * src/location.c (location_print): Don't display negative columns.
1879 * src/location.h: Document this.
1880
1881 2008-11-07 Akim Demaille <demaille@gostai.com>
1882
1883 Fix --help.
1884 * src/getargs.c (usage): Fix help string for -W.
1885
1886 2008-11-07 Akim Demaille <demaille@gostai.com>
1887
1888 Handle more general types of option arguments.
1889 * build-aux/cross-options.pl: The argument ends at the first
1890 space, not the first non-symbol character.
1891 Use @var for each word appearing the argument description.
1892
1893 2008-11-07 Akim Demaille <demaille@gostai.com>
1894
1895 Destroy the variants that remain on the stack in case of error.
1896 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
1897 destructor.
1898 Display the value only if yymsg is nonnull.
1899 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
1900
1901 2008-11-07 Akim Demaille <demaille@gostai.com>
1902
1903 Add "%define assert" to variants.
1904 This is used to help the user catch cases where some value gets
1905 ovewritten by a new one. This should not happen, as this will
1906 probably leak.
1907
1908 Unfortunately this uncovered a bug in the C++ parser itself: the
1909 lookahead value was not destroyed between two calls to yylex. For
1910 instance if the previous lookahead was a std::string, and then an int,
1911 then the value of the std::string was correctly taken (i.e., the
1912 lookahead was now an empty string), but std::string structure itself
1913 was not reclaimed.
1914
1915 This is now done in variant::build(other&) (which is used to take the
1916 value of the lookahead): other is not only stolen from its value, it
1917 is also destroyed. This incurs a new performance penalty of a few
1918 percent, and union becomes faster again.
1919
1920 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
1921 (b4_variant_if): New.
1922 (variant::built): New.
1923 Use it whereever the status of the variant changes.
1924 * etc/bench.pl.in: Check the penalty of %define assert.
1925
1926 2008-11-07 Akim Demaille <demaille@gostai.com>
1927
1928 Use "%define variant" in bench.pl.
1929 * etc/bench.pl.in: No longer use the pseudo directive %variants,
1930 just use %define variants.
1931
1932 2008-11-07 Akim Demaille <demaille@gostai.com>
1933
1934 Regen.
1935 * src/parse-gram.h, src/parse-gram.c: Regen.
1936
1937 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
1938
1939 Fix user actions without a trailing semicolon.
1940 Reported by Sergei Steshenko at
1941 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1942 * THANKS (Sergei Steshenko): Add.
1943 * src/scan-code.l (SC_RULE_ACTION): Fix it.
1944 * tests/regression.at (Fix user actions without a trailing semicolon):
1945 New test case.
1946
1947 2008-11-04 Akim Demaille <demaille@gostai.com>
1948
1949 Use b4_copyright_years.
1950 * data/yacc.c (b4_copyright_years): New.
1951 Fix its value according to the comments in the file.
1952 Use it and undefine it.
1953
1954 2008-11-04 Akim Demaille <demaille@gostai.com>
1955
1956 Formatting changes.
1957 * data/lalr1-fusion.cc, src/parse-gram.y: here.
1958
1959 2008-11-04 Akim Demaille <demaille@gostai.com>
1960
1961 Formatting changes.
1962 * data/lalr1-fusion.cc: here.
1963
1964 2008-11-04 Akim Demaille <demaille@gostai.com>
1965
1966 Use strict on bench.pl.
1967 * etc/bench.pl.in (&run, &generate_grammar): New.
1968 Rename the grammar generating functions for consistency.
1969 Change the interface so that the list of benches to run is passed
1970 as (optionless) arguments.
1971 (&compile): Use &run.
1972
1973 2008-11-04 Akim Demaille <demaille@gostai.com>
1974
1975 Remove spurious initial empty lines.
1976 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1977 * data/yacc.c: End the @output lines with an @.
1978
1979 2008-11-04 Akim Demaille <demaille@gostai.com>
1980
1981 Improve the display of sizes.
1982 * etc/bench.p.in: Higher precision.
1983 Sort by decreasing size.
1984
1985 2008-11-04 Akim Demaille <demaille@gostai.com>
1986
1987 Don't memcpy C++ structures.
1988 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
1989 arguments.
1990 (variant::build): New overload for
1991 copy-construction-that-destroys.
1992 (variant::swap): New.
1993 (parser::yypush_): Use it in variant mode.
1994
1995 2008-11-04 Akim Demaille <demaille@gostai.com>
1996
1997 Better defaults for bench.pl.
1998 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
1999 default values.
2000 Adjust &verbose uses.
2001 (-q, --quiet): New.
2002
2003 2008-11-04 Akim Demaille <demaille@gostai.com>
2004
2005 Make variant.yy more complex.
2006 std::list cannot be copied via memcpy, they are more demanding than
2007 std::string. Use one std::list to strengthen the test.
2008
2009 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
2010 Adjust.
2011 Create a list of strings, instead of a single large string.
2012
2013 2008-11-04 Akim Demaille <demaille@gostai.com>
2014
2015 bench.pl --bench.
2016 * etc/bench.pl.in (--bench, $bench): New.
2017
2018 2008-11-04 Akim Demaille <demaille@gostai.com>
2019
2020 Sort methods.
2021 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
2022 Define it after as().
2023
2024 2008-11-04 Akim Demaille <demaille@gostai.com>
2025
2026 Useless parens.
2027 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
2028
2029 2008-11-04 Akim Demaille <demaille@gostai.com>
2030
2031 Issue missing synclines after user actions.
2032 * data/c.m4 (b4_case): Issue synclines on the output file.
2033
2034 2008-11-04 Akim Demaille <demaille@gostai.com>
2035
2036 Remove trailing empty line.
2037 * data/lalr1-fusion.cc: Don't add an empty line after the user's
2038 epilogue.
2039
2040 2008-11-04 Akim Demaille <demaille@gostai.com>
2041
2042 Fix output of copyright years.
2043 * data/bison.m4 (b4_copyright): Fix the indentation of the
2044 copyright year paragraph.
2045 Use b4_copyright_years when no years are given.
2046 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
2047 (b4_copyright_years): New.
2048 Use it.
2049
2050 2008-11-04 Akim Demaille <demaille@gostai.com>
2051
2052 Avoid the spurious initial empty line.
2053 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
2054 the end of @output request to suppress the empty line that
2055 results.
2056
2057 2008-11-04 Akim Demaille <demaille@gostai.com>
2058
2059 Remove parser::rhs_number_type.
2060 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
2061 (yyrhs_): Use b4_table_define.
2062
2063 2008-11-04 Akim Demaille <demaille@gostai.com>
2064
2065 Fix iteration type.
2066 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
2067
2068 2008-11-04 Akim Demaille <demaille@gostai.com>
2069
2070 Factor the declaration of the integer tables.
2071 * data/lalr1-fusion.cc (b4_table_define): New.
2072 Use it.
2073
2074 2008-11-03 Akim Demaille <demaille@gostai.com>
2075
2076 Fix indentation of tables in lalr1.cc
2077 * data/lalr1-fusion.cc: Fix the indentation.
2078
2079 2008-11-03 Akim Demaille <demaille@gostai.com>
2080
2081 Destroy the lhs symbols after reduction.
2082 * data/lalr1-fusion.cc (parse): After the user action, when in
2083 variant mode, destroy the lhs symbols.
2084
2085 2008-11-03 Akim Demaille <demaille@gostai.com>
2086
2087 Simplify yysyntax_error_ use.
2088 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
2089 type, but make it unnamed in the declaration when it is not used.
2090
2091 2008-11-03 Akim Demaille <demaille@gostai.com>
2092
2093 Let yy::variant::build return an lvalue.
2094 * data/lalr1-fusion.cc (variant::build): Return a reference to the
2095 object.
2096
2097 2008-11-03 Akim Demaille <demaille@gostai.com>
2098
2099 Define yy::variant only when needed.
2100 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
2101 used.
2102
2103 2008-11-03 Akim Demaille <demaille@gostai.com>
2104
2105 Bench the three-stack lalr1.cc.
2106 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
2107 one-stack one.
2108
2109 2008-11-03 Akim Demaille <demaille@gostai.com>
2110
2111 Fail on parse error in calc++.
2112 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
2113 status.
2114 * examples/calc++/test ($me, $number, $exit, run): New.
2115 Use them to propagate errors to the exit status.
2116
2117 2008-11-03 Akim Demaille <demaille@gostai.com>
2118
2119 Don't specify the skeleton twice in the example.
2120 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
2121 file does what is needed.
2122
2123 2008-11-03 Akim Demaille <demaille@gostai.com>
2124
2125 bench: Improve output.
2126 * etc/bench.pl.in (bench_grammar): Tune the printf format.
2127
2128 2008-11-03 Akim Demaille <demaille@gostai.com>
2129
2130 bench: check impact of %debug on variants.
2131 * etc/bench.pl.in (variant_grammar): Fix the computation of
2132 $variant.
2133 Generate a grammar file that can work with or without %debug.
2134 Do use the @directive.
2135 (bench_variant_parser): Check impact of %debug.
2136 (@directives): Rename all the occurrences to...
2137 (@directive): this, for consistency.
2138
2139 2008-11-03 Akim Demaille <demaille@gostai.com>
2140
2141 bench: report the size too.
2142 * etc/bench.pl.in ($iterations): Defaults to -3.
2143 (&bench_grammar): Require hireswallclock.
2144 Compute and display the size of the result.
2145 More comments.
2146
2147 2008-11-03 Akim Demaille <demaille@gostai.com>
2148
2149 bench: More use of the verbosity level.
2150 * etc/bench.pl.in ($verbose, &verbose): New.
2151 Use them.
2152 More POD documentation.
2153
2154 2008-11-03 Akim Demaille <demaille@gostai.com>
2155
2156 bench.pl: a command line interface
2157 * etc/bench.pl.in: More doc.
2158 Some fixes in the documentation.
2159 ($cflags, $iterations, &help, &getopt): New.
2160 Use them.
2161 (&variant_grammar): Let the number of stages be 10 times what is
2162 specified.
2163
2164 2008-11-03 Akim Demaille <demaille@gostai.com>
2165
2166 Bench the use of Boost.Variants.
2167 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
2168 New.
2169 (&compile): Be ready to compile C++ parsers.
2170 (&bench_push_parser): Move debug information to the outermost
2171 level.
2172 * THANKS: Add Michiel De Wilde.
2173
2174 2008-11-03 Akim Demaille <demaille@gostai.com>
2175
2176 bench.pl: Pass directives as a list instead of as a string.
2177 * etc/bench.pl.in (&directives): New.
2178 (&triangular_grammar, &calc_grammar): Use it to format the Bison
2179 directives.
2180 (&triangular_grammar): Do use the directives (were ignored).
2181 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
2182 directives.
2183
2184 2008-11-03 Akim Demaille <demaille@gostai.com>
2185
2186 Improve genericity of bench.pl.
2187 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
2188 argument.
2189 (&bench_push_parser): New.
2190 Call it.
2191
2192 2008-11-03 Akim Demaille <demaille@gostai.com>
2193
2194 Add documentation to bench.pl.
2195 * etc/bench.pl.in: Comment changes.
2196
2197 2008-11-03 Akim Demaille <demaille@gostai.com>
2198
2199 Fuse the three stacks into a single one.
2200
2201 In order to make it easy to perform benchmarks to ensure that
2202 there are no performance loss, lalr1.cc is forked into
2203 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
2204 lalr1.cc.
2205
2206 Meanwhile, to make sure that lalr1-fusion.cc is correctly
2207 exercized by the test suite, the user must install a symbolic link
2208 from lalr1.cc to it.
2209
2210 Instead of having three stacks (state, value, location), use a
2211 stack of triples. This considerably simplifies the code (and it
2212 will be easier not to require locations as currently does the C++
2213 parser), and also gives a 10% speedup according to
2214 etc/bench (probably mainly since memory allocation is done once
2215 instead of three times).
2216
2217 Another motivation is to make it easier to destruct properly
2218 semantic values: now that they are bound to their state (hence
2219 symbol type) it will be easier to call the appropriate destructor.
2220
2221 These changes should probably benefit the C parser too.
2222
2223 * data/lalr1.cc: Copy as...
2224 * data/lalr1-fusion.cc: this new file.
2225 (b4_rhs_value, b4_rhs_location): New definitions overriding those
2226 from c++.m4.
2227 (state_stack_type, semantic_stack_type, location_stack_type)
2228 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
2229 (data_type, stack_type, yystack_): New.
2230 (YYLLOC_DEFAULT, yypush_): Adjust.
2231 (yyerror_range): Now based on data_type, not location_type.
2232
2233 2008-11-03 Akim Demaille <demaille@gostai.com>
2234
2235 Push the state, value, and location at the same time.
2236 This is needed to prepare a forthcoming patch that fuses the three
2237 stacks into one.
2238
2239 * data/lalr1.cc (parser::yypush_): New.
2240 (parser::yynewstate): Change the semantics: instead of arriving to
2241 this label when value and location have been pushed, but yystate
2242 is to be pushed on the state stack, now the three of them must
2243 have been pushed before. yystate still must be the new state.
2244 This allows to use yypush_ everywhere instead of individual
2245 handling of the stacks.
2246
2247 2008-11-03 Akim Demaille <demaille@gostai.com>
2248
2249 Prefer references to pointers.
2250 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
2251 definition to use references instead of pointers.
2252 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
2253 Take the value and location as references.
2254 Adjust callers.
2255
2256 2008-11-03 Akim Demaille <demaille@gostai.com>
2257
2258 stack::size instead of stack::height.
2259 * data/lalr1.cc (stack::height): Rename as...
2260 (stack::size): this.
2261 Fix the output type.
2262 Comment changes.
2263
2264 2008-11-03 Akim Demaille <demaille@gostai.com>
2265
2266 Use variants to support objects as semantic values.
2267 This patch was inspired by work by Michiel De Wilde. But he used
2268 Boost variants which (i) requires Boost on the user side, (ii) is
2269 slow, and (iii) has useless overhead (the parser knows the type of
2270 the semantic value there is no reason to duplicate this
2271 information as Boost.Variants do).
2272
2273 This implementation reserves a buffer large enough to store the
2274 largest objects. yy::variant implements this buffer. It was
2275 implemented with Quentin Hocquet.
2276
2277 * src/output.c (type_names_output): New.
2278 (output_skeleton): Invoke it.
2279 * data/c++.m4 (b4_variant_if): New.
2280 (b4_symbol_value): If needed, provide a definition for variants.
2281 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
2282 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
2283 (b4_char_sizeof, yy::variant): New.
2284 (parser::parse): If variants are requested, define
2285 parser::union_type, parser::variant, change the definition of
2286 semantic_type, construct $$ before running the user action instead
2287 of performing a default $$ = $1.
2288 * examples/variant.yy: New.
2289 Based on an example by Michiel De Wilde.
2290
2291 2008-11-03 Akim Demaille <demaille@gostai.com>
2292
2293 Parameterize the extraction of semantic values.
2294 To make future changes easier, no longer rely on ".TYPE" being the
2295 way to get a semantic value.
2296
2297 * data/c.m4 (b4_symbol_value): New.
2298 Use it.
2299 * data/c++.m4, data/yacc.c: Use it.
2300 * data/glr.c: Use b4_symbol_value.
2301 (b4_rhs_data): New.
2302 Use it.
2303
2304 2008-11-03 Akim Demaille <demaille@gostai.com>
2305
2306 Prepare easier M4 changes.
2307 * data/lalr1.cc: Use escaped [] instead of literals to prepare
2308 future changes.
2309
2310 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2311
2312 Initiate further development.
2313 * NEWS: Create an empty section for new entries.
2314 * gnulib: Update submodule to HEAD.
2315
2316 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2317
2318 * NEWS: Version 2.4.
2319
2320 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2321
2322 Prepare for next release.
2323 * NEWS: Briefly mention changes since 2.3b.
2324 * README: Say GNU m4 1.4.6, which we've been requiring in release
2325 announcements already, not 1.4.3, which breaks the build.
2326
2327 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2328
2329 Say %language is experimental.
2330 We're thinking of extending it's effect on output file naming. See the
2331 thread at
2332 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2333 * NEWS: Say it's experimental.
2334 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2335 recommend it over %skeleton for now.
2336 (Bison Options): Likewise.
2337 (C++ Bison Interface): Use %skeleton not %language.
2338 (Calc++ Parser): Use %skeleton not %language.
2339 * src/getargs.c (usage): Say it's experimental.
2340
2341 2008-11-01 Di-an Jan <dianj@freeshell.org>
2342 Paolo Bonzini <bonzini@gnu.org>
2343
2344 Support all Java parser class modifiers.
2345 * data/java.m4 (b4_percent_define_get3): New.
2346 (b4_final_if, b4_strictfp_if): New.
2347 * data/lalr1.java (final, strictfp, extends, implements): Support.
2348 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2349 documentation.
2350 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2351 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2352 (AT_CHECK_JAVA_GREP): New.
2353 (Java parser class modifiers): New test.
2354 (Java parser class extends and implements): New test.
2355
2356 Model exception propagation better with throws and lex_throws.
2357 * data/java.m4 (b4_list2): New.
2358 (throws): Change default.
2359 * data/lalr1.java (yyaction): Add throws.
2360 (parse): Add lex_throws in addition to throws.
2361 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2362 * tests/java.at (Java throws specifications): New test.
2363
2364 Improve documentation for Java parsers.
2365 * doc/bison.texinfo (Java Parsers): Add subsections.
2366 Don't quote first argument of %define.
2367 (Java Bison Interface): Document output files. Move documentation
2368 of parser class and merge into Java Parser Interface. Document
2369 features that error out. Document directives with no effect.
2370 Move note about Javadoc higher.
2371 (Java Semantic Values): Explicitly mention stype.
2372 Document that generic types cannot be used.
2373 (Java Location Values): Use @deftypeivar. Document constructors.
2374 Correct return value for toString.
2375 (Java Parser Interface): List undocumented constants/fields.
2376 Move documentation of fields added by %parse-param closer to list
2377 of members. Document that token names are added as fields.
2378 Document constructors accurately. Remove error method.
2379 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2380 Interface. Describe %code lexer and yylex accutately.
2381 Remove documentation that does not match the code.
2382 (Java Action Features): New.
2383 (Java Differences): Add reference. Add item on semantic values.
2384 Add note about @{ ... @}. Clarify %% epilogue placement.
2385 (Java Declarations Summary): New.
2386
2387 Fix Java skeleton.
2388 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2389 (b4_remove_comma): Quote test argument.
2390 (b4_identification): Remove "bison" field.
2391 * tests/java.at (Java parser class and package names): New test.
2392 (Java %parse-param and %lex-param): New test.
2393 (Java stype, position_class and location_class): New test.
2394
2395 2008-10-31 Di-an Jan <dianj@freeshell.org>
2396
2397 * data/lalr1.jave: Update copyright years.
2398 (YYParser): Correct name of "generated from" file in Javadoc:
2399 use b4_file_name instead of @ofile@.
2400 (Location constructor): Correct Javadoc parameter name.
2401 (yylloc): Add missing opening m4 quote after b4_location_if.
2402 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2403 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2404 (YYParser constructor): Correct Javadoc parameter name.
2405
2406 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2407
2408 Always put auxiliary code files in the same dir as other output files.
2409 * src/files.c (compute_file_name_parts): When the user specifies
2410 --output but not --file-prefix, extract the directory prefix from the
2411 file prefix not from the grammar file name. This affects the location
2412 of files like location.hh generated by the C++ skeleton. The includes
2413 in the other output files require this fix.
2414 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2415 for expected output files.
2416 (Output files): Add a test for the above.
2417
2418 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2419
2420 * gnulib: Update submodule to HEAD.
2421
2422 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2423
2424 Update copyright year.
2425 * src/files.c: Here.
2426
2427 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2428
2429 Don't overwrite the input file.
2430 * src/files.c (output_file_name_check): Fatal error if using input file
2431 for output.
2432 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2433 argument.
2434 (Conflicting output files): Add test.
2435
2436 2008-10-28 Akim Demaille <demaille@gostai.com>
2437
2438 Space changes.
2439 * data/lalr1.cc: Formatting changes.
2440
2441 2008-10-28 Akim Demaille <demaille@gostai.com>
2442
2443 Don't define debugging functions when !YYDEBUG.
2444 * data/lalr1.cc (debug_stream, set_debug_stream)
2445 (debug_level_type, debug_level, set_debug_level): Don't
2446 declare them when YYDEBUG is not defined.
2447 The implementation are already YYDEBUG-aware.
2448
2449 2008-10-28 Akim Demaille <demaille@gostai.com>
2450
2451 Prefer "continue" for empty loop bodies.
2452 * etc/bench.pl.in: Use "continue" instead of {}.
2453
2454 2008-10-28 Akim Demaille <demaille@gostai.com>
2455
2456 Space and comments changes.
2457 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2458 * data/c.m4, data/lalr1.cc: Space changes.
2459
2460 2008-10-28 Akim Demaille <demaille@gostai.com>
2461
2462 Make gnulib a submodule.
2463 * gnulib: New.
2464 * .gitmodules (gnulib): New.
2465
2466 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2467
2468 Fix yyerror_range for user-defined location type in C++. Reported by
2469 Georg Sauthoff at
2470 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2471 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2472 * THANKS (Georg Sauthoff): Add.
2473
2474 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2475
2476 Update several administrative files mainly to facilitate releasing.
2477 * HACKING (Administrivia): Make the git-merge-changelog notes more
2478 helpful.
2479 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2480 (Release Procedure): Update for git and add numerous details that were
2481 previously missing.
2482 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2483 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2484 that announcements don't claim we bootstrapped with whatever bison
2485 happened to be in PATH. Add flex as a bootstrap tool.
2486 * Makefile.maint: Remove, previously replaced by maint.mk.
2487 * Makefile.cfg: Remove, and migrate settings to...
2488 * cfg.mk: ... here for the sake of `make announcement'.
2489 * bootstrap.conf (gnulib_modules): Add announce-gen.
2490 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2491 Berry.
2492
2493 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2494
2495 Small but important bugfixes for the Java skeleton.
2496 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2497 (yy_symbol_print): Call toString on yyvaluep.
2498
2499 2008-08-29 Akim Demaille <demaille@gostai.com>
2500
2501 Clarify UPDATED use.
2502 * doc/bison.texinfo: It refers to the last edition of this file,
2503 not to the release date of Bison.
2504 Reported by Joel E. Denny.
2505
2506 2008-08-29 Akim Demaille <demaille@gostai.com>
2507
2508 * README: Update FAQ pointer.
2509 Reported by Joel E. Denny.
2510
2511 2008-08-27 Eric Blake <ebb9@byu.net>
2512
2513 Resync m4sugar from autoconf.
2514 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2515 (m4_init): Adjust to latest m4.git changes.
2516 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2517 effects.
2518 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2519 (_m4_list_cmp): Reduce side effects.
2520
2521 2008-08-27 Akim Demaille <demaille@gostai.com>
2522
2523 Check yyerrok in calc.at.
2524 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2525 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2526 expected.
2527
2528 2008-08-27 Akim Demaille <demaille@gostai.com>
2529
2530 Support yyerrok in lalr1.cc.
2531 YYBACKUP is still to import back into lalr1.cc.
2532 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
2533
2534 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2535
2536 For maintainer-check*, don't recompile for a $(VERSION) update.
2537 * cfg.mk: New file.
2538 (_is-dist-target): Override the one in GNUmakefile.
2539 * Makefile.am (EXTRA_DIST): Add cfg.mk.
2540
2541 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2542
2543 Update for recent change to gnulib.
2544 * src/parse-gram.y: Don't include strverscmp.h. It comes from
2545 string.h now.
2546
2547 2008-08-15 Eric Blake <ebb9@byu.net>
2548
2549 Remaining m4sugar merge from autoconf.
2550 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2551 * data/m4sugar/foreach.m4: New file, copied from autoconf.
2552 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2553 * src/output.c (output_skeleton): Tell m4 how to find it.
2554
2555 Partial m4sugar merge from autoconf: m4_map.
2556 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2557 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2558 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2559 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2560 for empty list.
2561 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2562 Likewise.
2563 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2564 declares it.
2565
2566 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2567
2568 Keep .version and PACKAGE_VERSION in sync.
2569 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2570 dependency, and add comments justifying this in more detail. Discussed
2571 starting at
2572 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2573
2574 2008-08-06 Eric Blake <ebb9@byu.net>
2575
2576 Partial m4sugar merge from autoconf: m4_shiftn.
2577 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2578 (m4_shift2, m4_shift3): New macros.
2579 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2580 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2581 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2582 * data/java.m4 (b4_remove_comma): Likewise.
2583
2584 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2585 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2586 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2587 (m4_init): Consolidate wrapped text into single m4_wrap.
2588 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2589 in wrapped text.
2590
2591 2008-08-05 Eric Blake <ebb9@byu.net>
2592
2593 Partial m4sugar merge from autoconf: builtins, version.m4.
2594 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2595 (m4_prepend): Remove, as it is unused and inherently quadratic,
2596 whereas m4_append is linear in newer m4.
2597 (m4_mkstemp): New builtin.
2598 (m4_symbols): Make rename conditional.
2599 (m4_version_prereq): Ensure fatal error if used in bison, which
2600 intentionally lacks version.m4.
2601
2602 Fix comments in m4sugar.
2603 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2604
2605 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2606
2607 Update for recent .gitignore fix in Gnulib.
2608 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2609 anchored .gitignore entries.
2610
2611 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2612
2613 Set gnu or gnits strictness.
2614 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2615 development and gnits strictness for releases. Based on Eric Blake's
2616 suggestion at
2617 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2618
2619 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2620
2621 * NEWS: Clarify documentation of %language.
2622
2623 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2624
2625 Support usage of git-merge-changelog.
2626 * .gitattributes: New.
2627 * HACKING: Document usage of git-merge-changelog.
2628 * bootstrap: Install git-merge-changelog entries in .git/config
2629 if appropriate.
2630
2631 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2632
2633 Remove remaining dependence on CVS Id keyword.
2634 * ChangeLog: For the sake of people still using CVS, don't use dollars
2635 when mentioning Id.
2636 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2637 unusual anyway.
2638 * data/xslt/xml2dot.xsl: Likewise.
2639 * data/xslt/xml2text.xsl: Likewise.
2640 * data/xslt/xml2xhtml.xsl: Likewise.
2641 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2642 * doc/Makefile.am (neutralize): Remove, no longer needed.
2643 (.x.1): Don't use neutralize.
2644 (edit): Don't substitute for ID.
2645 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2646
2647 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2648
2649 Fix dependence on computed configure variables.
2650 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2651 $(top_srcdir)/configure.ac so that changes to computed variables, such
2652 as PACKAGE_VERSION, are seen.
2653 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2654
2655 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2656
2657 Update copyright dates for recent changes.
2658 * Makefile.am: Here.
2659 * src/Makefile.am: Here.
2660 * src/reduce.c: Here.
2661 * tests/reduce.at: Here.
2662
2663 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2664
2665 Use git-version-gen for version names between releases.
2666 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2667 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2668 * .prev-version: New.
2669 * .version.in: Remove.
2670 * ChangeLog: Remove the Id previously used for capturing the CVS
2671 revision.
2672 * GNUmakefile: Remove, now copied from Gnulib.
2673 * Makefile.am: Add code suggested by comments in
2674 build-aux/git-version-gen.
2675 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2676 .prev-version, and .version.
2677 * NEWS (2.3b+): Rename to...
2678 (?.?): ... this because we're dropping the "+" version naming scheme,
2679 but, in general, we still can't be sure of our next release name.
2680 * bootstrap: Add a quick hack to remove from .gitignore the
2681 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2682 entry. This should really be fixed in gnulib instead.
2683 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2684 * configure.ac (AC_INIT): Set version name by invoking
2685 build-aux/git-version-gen.
2686 (AC_CONFIG_FILES): Remove .version, now generated by
2687 build-aux/git-version-gen.
2688 * maint.mk: New, copied from coreutils.
2689 * doc/.cvsignore (bison.1): Add.
2690 * doc/.gitignore (/bison.1): Add.
2691 * doc/bison.1: Remove, generated.
2692 * src/.cvsignore (revision.c): Remove.
2693 * src/.gitignore (/revision.c): Remove.
2694 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2695 (BUILT_SOURCES): Remove revision.c.
2696 (revision.c): Remove.
2697 * src/getargs.c (version): Don't print revision after the VERSION.
2698 * src/revision.h: Remove.
2699
2700 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2701
2702 Fix untranslatable composition of sentences. Reported by Goran
2703 Uddeborg at
2704 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2705 * THANKS (Goran Uddeborg): Add.
2706 * src/reduce.c (reduce_print): Report the number of nonterminals and
2707 rules useless in the grammar in separate sentences.
2708 * tests/reduce.at (Useless Rules): Update output.
2709 (Reduced Automaton): Likewise.
2710 (Underivable Rules): Likewise.
2711 (Empty Language): Likewise.
2712
2713 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2714
2715 Fix some .gitignore and .cvsignore problems.
2716 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2717 (insert_vc_ignore): ... this new function, which prepends `/' to all
2718 .gitignore entries before passing them to insert_sorted_if_absent.
2719 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2720 .cvsignore files are maintained even though Bison developers run
2721 bootstrap while using Git.
2722 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2723 unneeded by Bison.
2724 (gnulib): Add.
2725 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2726 unneeded. Reported by Eric Blake.
2727 * lib/.gitignore (/*~): Add.
2728 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2729 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2730 Blake.
2731 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2732
2733 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2734
2735 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2736 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2737 * bootstrap.conf (gnulib_modules): Add unsetenv.
2738 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2739 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2740 (/setenv.m4): Add.
2741 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2742 the first argument because it may become position-dependent, and unset
2743 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2744 Add comments explaining these issues in more detail.
2745
2746 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2747
2748 Add .gitignore everywhere based on .cvsignore.
2749 * .gitignore: New.
2750 * build-aux/.gitignore: New.
2751 * data/.gitignore: New.
2752 * doc/.gitignore: New.
2753 * etc/.gitignore: New.
2754 * examples/.gitignore: New.
2755 * examples/calc++/.gitignore: New.
2756 * lib/.gitignore: New.
2757 * m4/.gitignore: New.
2758 * po/.gitignore: New.
2759 * runtime-po/.gitignore: New.
2760 * src/.gitignore: New.
2761 * tests/.gitignore: New.
2762
2763 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2764
2765 * NEWS (2.3b+): New section, empty for now.
2766 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2767
2768 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2769
2770 * NEWS (2.3b): Update release date since there has been a delay in
2771 getting the announcements and tarballs out.
2772
2773 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2774
2775 * NEWS: Version 2.3b.
2776 * configure.ac (AC_INIT): Likewise.
2777 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2778
2779 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2780
2781 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2782 been doing it for years.
2783 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2784 (Release Procedure): Add FIXME about make alpha being unmaintained.
2785
2786 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2787
2788 * data/yacc.c: Reformat m4 a little for readability.
2789 * src/lalr.c (build_relations): Correct comment.
2790
2791 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2792
2793 DJGPP specific issue.
2794 * djgpp/config.sed: Fixes required to run configure scripts generated
2795 by autoconf 2.62.
2796
2797 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2798
2799 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2800 coordinator@translationproject.org.
2801
2802 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2803
2804 * THANKS: Add Eric Blake.
2805
2806 2008-04-23 Eric Blake <ebb9@byu.net>
2807
2808 Revert prior patch, by working around autoconf regression.
2809 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2810 ("Output file name: ("): Uncomment test.
2811 ("Output file name: )"): Likewise.
2812 Based on an idea from Noah Misch.
2813
2814 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2815
2816 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2817 2.61. Reported by Juan Manuel Guerrero at
2818 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2819 * tests/output.at ("Output file name: ("): Comment out test case for
2820 now.
2821 ("Output file name: )"): Likewise.
2822
2823 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2824
2825 * GNUmakefile: Update git-version-gen invocation so make dist
2826 succeeds.
2827
2828 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2829
2830 Update to the current gnulib CVS repository, and fix trigraph handling
2831 in Bison.
2832 * bootstrap: Update gnulib CVS repository URL.
2833 (symlink_to_dir): Encapsulate the code that guarantees the destination
2834 directory exists into...
2835 (check_dst_dir): ... this new function, and...
2836 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2837 fail when copying files into lib/uniwidth/.
2838 * src/output.c (prepare_symbols): When writing yytname muscles, where
2839 symbol names will be encoded in C-string literals, tell quotearg to
2840 escape trigraphs. This used to be the default in gnulib.
2841 * tests/regression.at (Token definitions): Because of the change in
2842 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2843 escapes trigraphs in symbol names. Thus, yytname no longer has
2844 trigraphs unnecessarily doubly escaped. Update test case output.
2845 Extend test case to be sure Bison's own error messages will no longer
2846 have trigraphs in symbol names unnecessarily escaped once.
2847
2848 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2849
2850 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2851 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2852 * .cvsignore: Add .version.
2853 * .version.in: New.
2854 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2855 * configure.ac (AC_CONFIG_FILES): Add .version.
2856 * build-aux/.cvsignore: Add git-version-gen.
2857
2858 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2859
2860 * NEWS (2.3a+): Mention that -g now takes an argument.
2861 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2862 consistency. Update the -g and -x entries now that they take
2863 arguments. Use brackets to indicate optional arguments.
2864 * src/getargs.c (usage): Explain the relationship between arguments of
2865 long and short options more completely. Document --defines and -d
2866 separately since the former takes an argument but, for POSIX Yacc, the
2867 latter does not.
2868 (short_options): Let -W take an optional argument like --warnings.
2869 (getargs): Sort cases.
2870
2871 2008-02-28 Akim Demaille <demaille@gostai.com>
2872
2873 * doc/bison.texinfo: Fix a few typos.
2874
2875 2008-02-28 Akim Demaille <akim@epita.fr>
2876
2877 * doc/bison.texinfo (Bison Options): Document -W.
2878 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2879
2880 2008-02-28 Akim Demaille <akim@epita.fr>
2881
2882 * src/getargs.c (short_options): Split and sort for readability.
2883 -g and -x take optional arguments, just like their long options.
2884 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2885 understand.
2886 Fix the handling of $opt which resulted in all the argument to be
2887 considered as optional.
2888
2889 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2890
2891 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2892 say its interface is experimental.
2893 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2894 Java.
2895 (Bison Options): In the -L and --language entry, mention Java.
2896 (Java Bison Interface): Say the interface is experimental.
2897 * src/getargs.c (usage): Mention -L and --language.
2898
2899 * NEWS (2.3a+): Say the push parsing interface is experimental.
2900 * doc/bison.texinfo (Push Decl): Likewise.
2901 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2902 (Push Parser Function): Likewise.
2903 (Pull Parser Function): Likewise.
2904 (Parser Create Function): Likewise.
2905 (Parser Delete Function): Likewise.
2906 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2907 yypull_parse, and yypush_parse entries.
2908
2909 * NEWS (2.3a+): Mention XML support, and say the schema is
2910 experimental.
2911 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2912 * src/getargs.c (usage): Say the XML schema is experimental.
2913
2914 * NEWS (2.3a+): Say option instead of flag.
2915
2916 2008-02-21 Wojciech Polak <polak@gnu.org>
2917
2918 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2919 text.
2920
2921 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
2922
2923 Fix impure push parser compile error reported by Bob Rossi at
2924 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
2925 * data/yacc.c: Clean up whitespace in the output a little.
2926 (yypstate_allocated): Define for impure push parsers regardless of
2927 whether the pull interface is also requested.
2928 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
2929 check impure push parsers without the pull interface.
2930
2931 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
2932 yyerror takes arguments specified by %parse-param while yypstate_new
2933 does not.
2934 * doc/bison.texinfo (Parser Create Function): Document that
2935 yypstate_new returns 0 for multiple impure parser instances.
2936 * tests/push.at (Push Parsing: Multiple impure instances): Update
2937 expected stderr output.
2938
2939 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2940
2941 * runtime-po/POTFILES.in (push.c): Remove.
2942
2943 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2944
2945 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
2946 * data/push.c: Rename to...
2947 * data/yacc.c: ... this, overwriting it.
2948 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
2949 `%push-pull-parser' -> `%define api.push_pull "both"'.
2950 Remove old yacc.c tests, and update push.c tests to yacc.c.
2951
2952 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2953
2954 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
2955 `"%code top" blocks' instead of `%code "top" blocks'.
2956 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
2957 Clean up whitespace in the output a little.
2958
2959 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2960
2961 Fix documentation problems reported by Tim Josling at
2962 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
2963 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
2964 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
2965 integers. Explain the effect of literal string aliases on error
2966 messages. Copy token 0 documentation from the C++ skeleton
2967 documentation.
2968
2969 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2970
2971 Accept a token number in a %left, %right, or %nonassoc for POSIX
2972 conformance. Reported by Tim Josling at
2973 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
2974 * NEWS (2.3a+): Mention.
2975 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
2976 and code numbers are treated by precedence declarations.
2977 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
2978 of symbols.1.
2979 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
2980 of symbol.
2981 (symbol.prec): New, just like symbol but allows INT.
2982 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
2983 longer holds.
2984 * tests/regression.at (Token number in precedence declaration): New
2985 test case.
2986
2987 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2988
2989 DJGPP specific issues.
2990 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
2991 be changed. Copyright timestamp adjusted.
2992 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
2993 be changed. Copyright timestamp adjusted.
2994 * djgpp/config.site: Copyright timestamp adjusted.
2995 * djgpp/config_h.sed: Copyright timestamp adjusted.
2996 * djgpp/djunpack.bat: Copyright timestamp adjusted.
2997 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
2998 filename translation list.
2999 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3000 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3001 files shall be created. Before trying to use the temp dir where the
3002 environment variable points to check that the dir really exists. If
3003 not default to the cwd as temp dir. Copyright timestamp adjusted.
3004 * djgpp/subpipe.h: Copyright timestamp adjusted.
3005 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3006
3007 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3008
3009 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3010
3011 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3012
3013 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3014 Problem reported by Claudio Saavedra in
3015 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3016
3017 2008-01-05 Wojciech Polak <polak@gnu.org>
3018
3019 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3020 document's title with the input grammar file name.
3021
3022 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3023
3024 Automate regression testing of the XML/XSLT implementation. Discussed
3025 starting at
3026 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3027 * configure.ac (XSLTPROC): New substitution.
3028 * Makefile.am (maintainer-xml-check): New phony target invoking...
3029 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3030 invoking make maintainer-check with BISON_TEST_XML=1.
3031 * tests/atlocal.in (XSLTPROC): New.
3032 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3033 not to report reachable memory when Bison is expected to have a
3034 non-zero exit status and (2) to compare XML/XSLT output with --graph
3035 and --report=all output for every working grammar when
3036 BISON_TEST_XML=1.
3037 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3038 (AT_BISON_CHECK_XML): New.
3039 (AT_QUELL_VALGRIND): New.
3040 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3041 (AT_CHECK): ... don't redefine this since this was the old way to
3042 quell Valgrind.
3043 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3044 AT_BISON_CHECK invocations.
3045 * tests/c++.at: Likewise.
3046 * tests/calc.at: Likewise.
3047 * tests/conflicts.at: Likewise.
3048 * tests/cxx-type.at: Likewise.
3049 * tests/existing.at: Likewise.
3050 * tests/glr-regression.at: Likewise.
3051 * tests/headers.at: Likewise.
3052 * tests/input.at: Likewise.
3053 * tests/java.at: Likewise.
3054 * tests/output.at: Likewise.
3055 * tests/push.at: Likewise.
3056 * tests/reduce.at: Likewise.
3057 * tests/regression.at: Likewise.
3058 * tests/sets.at: Likewise.
3059 * tests/skeletons.at: Likewise.
3060 * tests/synclines.at: Likewise.
3061 * tests/torture.at: Likewise.
3062 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3063 tends to hang xsltproc.
3064 (Big horizontal): Likewise.
3065
3066 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3067
3068 In XML output, remove redundant class attribute on symbol element.
3069 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3070 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3071 look up a symbol to determine whether it's a nonterminal or terminal.
3072 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3073 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3074
3075 Add prec/assoc information to XML output.
3076 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3077 %prec, add a percent_prec attribute.
3078 * src/print-xml.c (print_grammar): For each terminal that has a
3079 precedence or associativity, add a prec or assoc attribute.
3080 (xml_indent): New.
3081 (xml_puts): Use xml_indent.
3082 (xml_printf): Use xml_indent.
3083 * src/print-xml.h (xml_indent): Prototype.
3084
3085 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3086 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3087
3088 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3089
3090 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3091 (bison:ruleByNumber): ... this for clarity.
3092 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3093 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3094 (xsl:template match="reduction"): Update.
3095 (xsl:template match="item"): Update.
3096 (xsl:template match="reduction"): Update.
3097
3098 In the XML output, don't print the list of rules where symbols appear.
3099 Compute it in XSLT instead. Discussed at
3100 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3101 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3102 (bison:ruleByRhs): New.
3103 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3104 bison:ruleByRhs.
3105 (xsl:template match="terminal/rule"): Remove.
3106 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3107 bison:ruleByRhs.
3108 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3109 Remove.
3110 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3111 bison:ruleByRhs and mode="number-link" for rule template.
3112 (xsl:template match="terminal/rule"): Remove.
3113 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3114 bison:ruleByRhs and mode="number-link" for rule template.
3115 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3116 Rewrite as...
3117 (xsl:template match="rule" mode="number-link"): ... this.
3118 * src/print-xml.c (print_grammar): Don't print the list of rules.
3119
3120 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3121
3122 Don't let --report affect XML output; always print all information.
3123 Discussed at
3124 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3125 * src/conflicts.c (log_resolution): Implement.
3126 * src/print-xml.c (print_core): Implement.
3127 (print_state): Implement.
3128 (print_xml): Implement.
3129
3130 * NEWS (2.3a+): Fix quotes.
3131 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3132 don't let %verbose clear the list specified by --report.
3133
3134 2007-11-26 Akim Demaille <akim@epita.fr>
3135
3136 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3137
3138 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3139
3140 In the XML output, list useless and unused symbols and rules with the
3141 useful ones and add a "usefulness" attribute. Discussed starting at
3142 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3143 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3144 (grammar_rules_print_xml): Print all rules instead of just those
3145 useful in the grammar, and add a "usefulness" attribute.
3146 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3147 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3148 (print_grammar): Print all nonterminals instead of just useful ones,
3149 and add a "usefulness" attribute to nonterminals and terminals.
3150 (print_xml): Don't print a separate "reductions" or
3151 "rules-useless-in-parser" element.
3152 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3153 (reduce_xml): Remove.
3154 (reduce_token_unused_in_grammar): New.
3155 (reduce_nonterminal_useless_in_grammar): New.
3156 * src/reduce.h (reduce_xml): Remove prototype.
3157 (reduce_token_unused_in_grammar): Add prototype.
3158 (reduce_nonterminal_useless_in_grammar): Add prototype.
3159 * data/xslt/xml2text.xsl: Update for XML changes.
3160 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3161 * tests/reduce.at (Useless Terminals): Update output.
3162 (Useless Rules): Update output.
3163 (Reduced Automaton): Update output.
3164
3165 Say "Terminals unused in grammar" instead of "Unused terminals".
3166 * NEWS (2.3a+): Update.
3167 * doc/bison.texinfo (Understanding): Update example output.
3168 * src/reduce.c (reduce_output): Implement.
3169 * data/xslt/xml2text.xsl: Implement.
3170 * data/xslt/xml2xhtml.xsl: Implement.
3171
3172 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3173
3174 Accept --report-file=FILE to override the default `.output' filename.
3175 * NEWS (2.3a+): Mention.
3176 * doc/bison.texinfo (Bison Options): Add an entry.
3177 * src/files.c (compute_output_file_names): Don't override
3178 spec_verbose_file if already set.
3179 * src/getargs.c (usage): Document --report-file.
3180 (REPORT_FILE_OPTION): New anonymous enum member.
3181 (long_options): Add entry for it.
3182 (getargs): Add case for it setting spec_verbose_file.
3183
3184 * build-aux/cross-options.pl: Don't record a short option just because
3185 there's an arg.
3186 * doc/.cvsignore: Add yacc.1.
3187
3188 2007-11-14 Akim Demaille <akim@epita.fr>
3189
3190 * doc/yacc.1.in: New.
3191 * configure.ac, doc/Makefile.am: Adjust.
3192 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3193 config.h symbol.
3194 Use AC_SUBST for assignments too.
3195 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3196
3197 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3198
3199 * src/gram.c: Remove comments that duplicate comments in gram.h.
3200
3201 When reporting useless rules and nonterminals, say "useless in grammar"
3202 instead of "useless", and say "useless in parser" instead of "never
3203 reduced". Discussed starting at
3204 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3205 * NEWS (2.3a+): Mention this change.
3206 * data/xslt/xml2text.xsl: Update output text and expected input XML
3207 element names to match changes below.
3208 * data/xslt/xml2xhtml.xsl: Likewise.
3209 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3210 Contents: "Rules useless in parser due to conflicts".
3211 * doc/bison.texinfo (Decl Summary): Reword a little.
3212 (Understanding): Update example output for changes below.
3213 * src/gram.c: (rule_useful_p): Rename to...
3214 (rule_useful_in_grammar_p): ... this.
3215 (rule_useless_p): Rename to...
3216 (rule_useless_in_grammar_p): ... this.
3217 (rule_never_reduced_p): Rename to...
3218 (rule_useless_in_parser_p): ... this.
3219 (grammar_rules_print): Update for renames.
3220 (grammar_rules_print_xml): Update for renames.
3221 (grammar_rules_never_reduced_report): Rename to...
3222 (grammar_rules_useless_report): ... this since it is used for either
3223 kind of useless rule.
3224 * src/gram.h: Reword comments and update function names in prototypes.
3225 * src/main.c (main): Say "rule useless in parser due to conflicts".
3226 * src/print-xml.c (print_rules_never_reduced): Rename to...
3227 (print_rules_useless_in_parser): ... this, and rename output XML
3228 element "rules-never-reduced" to "rules-useless-in-parser".
3229 (print_xml): Update for rename.
3230 * src/print.c (print_results): Say "Rules useless in parser due to
3231 conflicts".
3232 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3233 (nonterminals_reduce): Say "nonterminal useless in grammar".
3234 (reduce_output): Say "Nonterminals useless in grammar".
3235 Say "Rules useless in grammar".
3236 (reduce_xml): Rename output XML element "useless" to
3237 "useless-in-grammar".
3238 (reduce_print): Don't report the count of grammatically useless rules
3239 as "rules never reduced" just because %yacc is specified.
3240 In the correct report of this count, say nonterminal(s) and rule(s)
3241 "useless in grammar".
3242 * tests/conflicts.at (S/R in initial): Update expected output.
3243 (Defaulted Conflicted Reduction): Likewise.
3244 (Unreachable States After Conflict Resolution): Likewise.
3245 * tests/existing.at (GNU pic Grammar): Likewise.
3246 * tests/reduce.at (Useless Nonterminals): Likewise.
3247 (Useless Rules): Likewise.
3248 (Reduced Automaton): Likewise.
3249 (Underivable Rules): Likewise.
3250 (Empty Language): Likewise.
3251
3252 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3253
3254 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3255 here document and before the EOF so that BSD's implementation of Bourne
3256 shell doesn't parse the delimiter as part of the here document.
3257 * doc/.cvsignore: Add cross-options.texi.
3258 * src/getargs.c (usage): Add a blank line after the warning categories.
3259
3260 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
3261
3262 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3263
3264 2007-11-05 Akim Demaille <akim@epita.fr>
3265
3266 Remove Id: from bison.1.
3267 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3268 (perl -0777 -pi -e 's/\.PP\nId): New.
3269 (.x.1): Use it to ignore the version control revision.
3270
3271 2007-11-05 Akim Demaille <demaille@gostai.com>
3272
3273 * build-aux/Makefile.am: Ship cross-options.pl.
3274 * doc/Makefile.am: Always refer to cross-options.texi with
3275 $(srcdir).
3276 (MAINTAINERCLEANFILES): Add it.
3277
3278 2007-11-04 Akim Demaille <demaille@gostai.com>
3279
3280 Generate the long/short option cross-table.
3281 * build-aux/cross-options.pl: New.
3282 * doc/Makefile.am (cross-options.texi): New.
3283 * doc/bison.texinfo: Use it.
3284
3285 2007-11-04 Akim Demaille <demaille@gostai.com>
3286
3287 Generate bison.1 using help2man.
3288 * doc/common.x, doc/bison.x: New.
3289 * doc/Makefile.am (bison.1, .x.1): New.
3290 The code is taken from autoconf-2.61/man/Makefile.am.
3291 * configure.ac: Look for help2man.
3292
3293 2007-11-04 Akim Demaille <demaille@gostai.com>
3294
3295 Complete --help.
3296 * src/getargs.c (usage): Document -W, make it clear that -d,
3297 -g and -x have optional arguments.
3298
3299 2007-11-04 Akim Demaille <demaille@gostai.com>
3300
3301 Find sha1sum when named gsha1sum.
3302 * bootstrap (find_tool): New.
3303 ($SHA1SUM): New.
3304
3305 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3306
3307 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3308 at
3309 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3310 * NEWS (2.3a+): Mention.
3311 * data/bison.m4 (b4_pure_if): Don't define it here.
3312 * data/c.m4 (b4_identification): Depend on individual skeletons to
3313 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3314 values of the %define variables api.pure or api.push_pull. Define
3315 YYPURE, YYPUSH, and YYPULL accordingly.
3316 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3317 glr.cc has already defined b4_pure_flag.
3318 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3319 Remove YYPUSH and YYPULL since they're back in b4_identification again.
3320 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
3321 * doc/bison.texinfo (Pure Decl): Update.
3322 (Push Decl): Update.
3323 (Decl Summary): Add api.pure to %define entry.
3324 In %pure-parser entry, say it's deprecated and reference %define.
3325 (Pure Calling): Update.
3326 (Error Reporting): Update.
3327 (C++ Scanner Interface): Update.
3328 (How Can I Reset the Parser): Update.
3329 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3330 reference %define.
3331 * src/getargs.c (pure_parser): Remove global variable.
3332 * src/getargs.h (pure_parser): Remove extern.
3333 * src/output.c (prepare): Don't define pure_flag muscle.
3334 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3335 wrapper around `%define api.pure'.
3336 * tests/calc.at (Simple LALR Calculator): Update.
3337 (Simple GLR Calculator): Update.
3338 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3339 Update.
3340 (GLR: Resolve ambiguity, pure, locations): Update.
3341 (GLR: Merge conflicting parses, pure, no locations): Update.
3342 (GLR: Merge conflicting parses, pure, locations): Update.
3343 * tests/glr-regression.at (Uninitialized location when reporting
3344 ambiguity): Update
3345 * tests/input.at (Unused %define api.pure): New test case.
3346 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3347 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3348 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3349
3350 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3351
3352 %define push_pull -> %define api.push_pull. Discussed starting at
3353 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3354 * data/push.c: Expect the new name.
3355 * data/yacc.c: Likewise.
3356 * doc/bison.texinfo (Push Decl): Update.
3357 (Decl Summary): Update %define entry.
3358 (Push Parser Function): Update.
3359 (Pull Parser Function): Update.
3360 (Parser Create Function): Update.
3361 (Parser Delete Function): Update.
3362 * tests/calc.at (Simple LALR Calculator): Update.
3363 * tests/input.at (%define enum variables): Update.
3364 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3365 (Push Parsing: Multiple impure instances): Update.
3366 (Push Parsing: Unsupported Skeletons): Update.
3367 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3368 (Exploding the Stack Size with Malloc): Update.
3369
3370 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3371 other entries some.
3372
3373 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3374
3375 For the XML output's terminal element, rename @number to @token-number,
3376 and add @symbol-number. In the nonterminal element, rename @number to
3377 @symbol-number. Discussed starting at
3378 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3379 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3380 renames.
3381 (xsl:template match="nonterminal"): Likewise.
3382 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3383 (xsl:template match="nonterminal"): Likewise.
3384 * src/print-xml.c (print_grammar): Implement.
3385
3386 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3387
3388 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3389 2007-10-11 change, the child elements here are items not rules.
3390 (xsl:template match="item"): New.
3391 (xsl:template match="rule"): Update for new reduced itemset.
3392 (xsl:template match="point"): Remove.
3393 (xsl:template match="empty"): For consistency with --graph, don't
3394 output "/* empty */".
3395 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3396 line-wrap, don't pass a negative value as first-line-length since this
3397 won't work with the following changes.
3398 (xsl:template name="line-wrap"): Simplify slightly.
3399 (xsl:template name="ws-search"): Eliminate recursion.
3400 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3401 set next to an item whose dot is not at the end of the RHS even if it
3402 happens to be associated with the same rule.
3403
3404 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3405
3406 Add %define lr.keep_unreachable_states.
3407 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3408 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3409 * src/main.c (main): Implement it.
3410 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3411 Extend to test it, and fix a typo.
3412
3413 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3414
3415 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
3416 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3417 the example .output text.
3418 * tests/regression.at (Extra lookahead sets in report): Improve wording
3419 of comments.
3420
3421 2007-10-17 Wojciech Polak <polak@gnu.org>
3422
3423 * src/print-xml.c (print_grammar): Renamed
3424 <terminal> and <nonterminal> attributes:
3425 "type" to "number" and "symbol" to "name".
3426 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3427 Use new attribute names.
3428 (xsl:template match="nonterminal"): Likewise.
3429 * data/xslt/xml2xhtml.xsl: Likewise.
3430
3431 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3432
3433 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3434 (Option Cross Key): Likewise.
3435
3436 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3437 next to an item whose dot is not at the end of the RHS even if it
3438 happens to be associated with the same rule.
3439 * src/print.c (print_core): Likewise.
3440 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3441 (Resolved SR Conflicts): Update output.
3442 * tests/regression.at (Extra lookahead sets in report): New test case.
3443
3444 2007-10-11 Wojciech Polak <polak@gnu.org>
3445
3446 * src/print-xml.c (print_core): Remove item set
3447 redundancy.
3448 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3449 Improve processing time. Suggested by Joel E. Denny.
3450 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3451 Write xsl:param "required" attribute as comment.
3452 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3453 (xsl:template match="rule"): Support new reduced itemset.
3454 (xsl:template match="point"): Remove.
3455 * data/xslt/xml2xhtml.xsl: Likewise.
3456
3457 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3458
3459 * src/getargs.c (version): Update copyright year.
3460
3461 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3462
3463 Make xml2dot.xsl and --graph produce the same output.
3464 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
3465 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3466 escaped later.
3467 (xsl:template name="output-node"): Use the new escape template instead
3468 of the string-replace template directly.
3469 (xsl:template name="output-edge"): Likewise.
3470 (xsl:template name="escape"): New, escapes backslashes and newlines in
3471 addition to quotation marks.
3472 * src/graphviz.c (start_graph, output_node, output_edge): Add
3473 whitespace to output for legibility.
3474
3475 Make xml2text.xsl and --report produce the same output, and remove the
3476 XML "conflicts" element since a conflict summary is easily extracted
3477 from the automaton.
3478 * data/xslt/bison.xsl: New.
3479 (xsl:template match="state" mode="bison:count-conflicts): New.
3480 * data/xslt/xml2text.xsl: Import bison.xsl.
3481 (xsl:template match="bison-xml-report"): Instead of styling the
3482 "conflicts" element, style the "automaton" element with mode
3483 "conflicts". Unlike the former, the latter lists S/R and R/R
3484 conflicts for a state on the same line.
3485 (xsl:template match="conflicts"): Remove.
3486 (xsl:template match="conflict"): Remove.
3487 (xsl:template match="terminal"): Line-wrap the list of rules in which
3488 the terminal is used.
3489 (xsl:template match="nonterminal"): Likewise for nonterminals.
3490 (xsl:template match="automaton" mode="conflicts"): New.
3491 (xsl:template match="state" mode="conflicts"): New.
3492 (xsl:template name="line-wrap"): New.
3493 (xsl:template name="ws-search"): New.
3494 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3495 (xsl:template match="bison-xml-report"): Instead of styling the
3496 "conflicts" element, style the "automaton" element with mode
3497 "conflicts."
3498 (xsl:template match="conflicts"): Remove.
3499 (xsl:template match="conflict"): Remove.
3500 (xsl:template match="automaton" mode="conflicts"): New.
3501 (xsl:template match="state" mode="conflicts): New.
3502 * src/conflicts.c (conflicts_output_xml): Remove.
3503 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3504 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3505 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3506 the corresponding XSLT is easier. Also, never wrap between a word and
3507 the comma that follows it.
3508
3509 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3510
3511 Improve C++ namespace support. Discussed starting at
3512 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3513 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3514 b4_namespace_close): New macros that interpret the %define variable
3515 "namespace" so its value can contain "::" to indicate nested
3516 namespaces.
3517 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3518 the above macros.
3519 * data/lalr1.cc (b4_namespace): Likewise.
3520 * data/location.cc (b4_namespace): Likewise.
3521 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3522 inside a new table in the general %define entry. Document `%define
3523 namespace' there as well. Point the %name-prefix entry to it since it
3524 explains it more completely in the case of C++.
3525 (C++ Bison Interface): Mention `%define namespace' instead of
3526 %name-prefix.
3527 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3528 entry suffices.
3529 * tests/c++.at (Relative namespace references): New test case.
3530 (Absolute namespace references): New test case.
3531 (Syntactically invalid namespace references): New test case.
3532 * tests/input.at (C++ namespace reference errors): New test case.
3533
3534 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3535
3536 Add syncline support and location accessor to internal %define
3537 interfaces.
3538 * data/bison.m4 (b4_percent_define_get_loc): New.
3539 (b4_percent_define_get_syncline): New.
3540 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3541 (b4_percent_define_default): Record defining location as line 1 rather
3542 than 0 for the sake of synchronizing #line's, and define
3543 b4_percent_define_syncline(VARIABLE).
3544 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3545 * src/muscle_tab.c (muscle_syncline_grow): New.
3546 (muscle_code_grow): Use muscle_syncline_grow.
3547 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3548 define b4_percent_define_syncline(VARIABLE).
3549 (muscle_percent_define_get_loc): New.
3550 (muscle_percent_define_get_syncline): New.
3551 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3552 remove some unused variables.
3553 (muscle_percent_define_default): Record defining location as line 1
3554 rather than 0 for the sake of synchronizing #line's, and define
3555 b4_percent_define_syncline(VARIABLE).
3556 (muscle_percent_define_check_values): Use
3557 muscle_percent_define_get_loc.
3558 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3559 (muscle_percent_define_get_syncline): Prototype.
3560 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3561 defaults): Update output for location change.
3562 (Complaining during macro argument expansion): Extend to test
3563 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3564
3565 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3566
3567 Fix some error-reporting macro bugs.
3568 * data/bison.m4 (b4_cat): New.
3569 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3570 to stdout so they don't become arguments to other macros. Update
3571 comments and add examples.
3572 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3573 add examples.
3574 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3575 after printing the error directive so that M4 doesn't report subsequent
3576 problems that are induced by this problem.
3577 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3578 instead of just in them. Recognize @\n in both places. Both expand to
3579 the empty string. Needed by b4_cat.
3580 * tests/skeletons.at (Complaining during macro argument expansion):
3581 New test case.
3582 (Fatal errors make M4 exit immediately): New test case.
3583
3584 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3585
3586 Implement --print-datadir.
3587 * src/getargs.c (usage): Mention.
3588 (PRINT_DATADIR_OPTION): New anonymous enum member.
3589 (long_options): Add entry for it.
3590 (getargs): Add case for it calling compute_pkgdatadir.
3591 * src/output.c (output_skeleton): Encapsulate data directory
3592 computation from here...
3593 (prepare): ... and from here...
3594 (compute_pkgdatadir): ... into this new function.
3595 * src/output.h (compute_pkgdatadir): Prototype.
3596
3597 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3598
3599 * src/print-xml.c (escape_bufs): New static global variable
3600 replacing...
3601 (xml_escape_n): ... the static local variable buf here.
3602 (print_xml): Free memory for escape_bufs.
3603 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3604
3605 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3606
3607 Replace `%push-parser' and `%push-pull-parser' with
3608 `%define push_pull "push"' and `%define push_pull "both"'.
3609 `%define push_pull "pull"' is the default.
3610 * doc/bison.texinfo (Push Decl, Push Parser Function,
3611 Pull Parser Function, Parser Create Function, Parser Delete Function):
3612 Update declarations.
3613 (Decl Summary, Table of Symbols): Replace %push-parser and
3614 %push-pull-parser entries with a %define push_pull entry.
3615 * data/bison.m4 (b4_percent_define_check_values): New macro.
3616 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3617 definitions...
3618 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3619 definitions...
3620 * data/push.c: ... to here and compute them from the value of the
3621 %define variable push_pull.
3622 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3623 parsing requests here...
3624 * data/yacc.c: ... hack this to switch to push.c any time
3625 b4_use_push_pull_flag or the %define variable push_pull is set. This
3626 will go away when we mv push.c yacc.c.
3627 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3628 push parsing is not supported since unused %define variables are
3629 reported anyway.
3630 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3631 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3632 comments for consistency with b4_percent_define_check_values.
3633 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3634 muscles.
3635 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3636 Remove.
3637 (prologue_declaration): Remove %push-parser and %push-pull-parser
3638 rules.
3639 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3640 * tests/calc.at: Update declarations.
3641 * tests/input.at (%define enum variables): New test case.
3642 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3643 declaration.
3644 (Push Parsing: Multiple impure instances): Update declaration.
3645 (Push Parsing: Unsupported Skeletons): New test case.
3646 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3647 declaration.
3648 (Exploding the Stack Size with Malloc): Update declaration.
3649
3650 2007-09-24 Wojciech Polak <polak@gnu.org>
3651
3652 Add XSLT transformations.
3653
3654 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3655 * data/xslt/xml2text.xsl: Transform XML into plain text.
3656 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3657 * data/Makefile.am (xsltdir): New variable.
3658 (dist_xslt_DATA): Add xslt/*.xsl files.
3659
3660 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3661
3662 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3663 Problem reported by Wojciech Polak.
3664 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3665 (xml_printf): Undo change I made on 21 September; that is,
3666 indent 2 spaces, not 1.
3667
3668 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3669
3670 Pacify ./configure --enable-gcc-warnings.
3671 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3672 `char const *' instead of `char *'.
3673 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3674 local variable `sep'.
3675
3676 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3677
3678 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3679 elsewhere.
3680 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3681 (xml_printf): Indent just 1 space for level.
3682 (e_char, xlate_char): Remove.
3683 (xml_escape_string): Rewrite to avoid undefined behavior (used
3684 storage that was freed from the stack).
3685 (xml_escape_n): Don't bother checking for subscript error.
3686
3687 2007-09-21 Wojciech Polak <polak@gnu.org>
3688
3689 Add Bison XML Automaton Report.
3690
3691 Add support for an -x option to generate an XML report.
3692 It is not documented yet.
3693 * src/print-xml.c: New file.
3694 * src/print-xml.h: Likewise.
3695 * lib/timevar.def (TV_XML): New var.
3696 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3697 * src/conflicts.c: Include print-xml.h.
3698 (solved_conflicts_xml_obstack): New var.
3699 (log_resolution, conflicts_solve, conflicts_free):
3700 Add support for XML report.
3701 (conflicts_output_val): New function.
3702 * src/conflicts.h (conflicts_output_val): New decl.
3703 * src/files.c (spec_xml_file): New var.
3704 (compute_output_file_names, output_file_names_free): Add XML support.
3705 * src/files.h (spec_xml_file): New decl.
3706 * src/getargs.c (xml_flag): New var.
3707 (usage, short_options, long_options, getargs): Add XML support.
3708 * src/getargs.h (xml_flag): New decl.
3709 * src/gram.c: Include print-xml.h.
3710 (rule_lhs_print_xml, rule_rhs_print_xml):
3711 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3712 New functions.
3713 * src/gram.h: Declare external ones.
3714 * src/main.c: Include print-xml.h.
3715 (main): Add XML support.
3716 * src/reduce.c: Include print-xml.h.
3717 (reduce_xml): New function.
3718 * src/reduce.h: Declare it.
3719 * src/state.c: Include print-xml.h.
3720 (state_new): Add XML support.
3721 (state_rule_lookahead_tokens_print_xml): New function.
3722 * src/state.h: Declare it.
3723 (struct state): New member solved_conflicts_xml.
3724 * src/symtab.c (symbol_class_get_string): New function.
3725 * src/symtab.h: Declare it.
3726
3727 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3728
3729 * GNUmakefile: Switch to coreutils's version.
3730 * bootstrap: Likewise.
3731 * Makefile.cfg: Adjust to new GNUmakefile.
3732 * README-hacking: Likewise.
3733
3734 Import from gnulib:
3735
3736 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3737 Bruno Haible <bruno@clisp.org>
3738
3739 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3740 and is a script that invokes bison. Tighten the code. Add comments.
3741
3742 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3743
3744 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3745 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3746 * doc/bison.texinfo (Decl Summary): Fix.
3747 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3748 * tests/input.at (Boolean %define variables): Update output.
3749 * tests/skeletons.at (%define boolean variables: invalid skeleton
3750 defaults): Rename to...
3751 (%define Boolean variables: invalid skeleton defaults): ... this and
3752 update output.
3753
3754 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3755
3756 In impure push mode, don't allow more than one yypstate to be allocated
3757 since multiple impure parsers would corrupt yynerrs.
3758 * data/push.c (yypstate_allocated): New static global variable
3759 initialized to 0.
3760 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3761 exhaustion if yypstate_allocated is 1, but still return 2.
3762 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3763 already 1. Otherwise, set it to 1.
3764 (yypstate_delete): Set it to 0.
3765 * tests/push.at (Push Parsing: Multiple impure instances): New test
3766 case.
3767
3768 2007-08-17 Bob Rossi <bob@brasko.net>
3769
3770 * doc/bison.texinfo (Push Decl): Document the push parser.
3771 (Table of Symbols): Ditto.
3772 (Pure Decl): Ditto.
3773 (Decl Summary): Ditto.
3774 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3775 Parser Create Function, Parser Delete Function):
3776 Add new push parser symbols.
3777 (Table of Symbols): Document push-parser, push-pull-parser,
3778 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3779
3780 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3781
3782 Update to GPLv3.
3783 * doc/gpl-3.0.texi: New file.
3784 * doc/gpl.texi: Remove.
3785 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3786 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3787 * README-hacking, TODO, bootstrap, bootstrap.conf:
3788 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3789 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3790 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3791 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3792 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3793 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3794 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3795 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3796 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3797 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3798 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3799 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3800 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3801 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3802 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3803 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3804 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3805 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3806 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3807 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3808 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3809 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3810 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3811 * src/complain.c, src/complain.h, src/conflicts.c:
3812 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3813 * src/files.h, src/flex-scanner.h, src/getargs.c:
3814 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3815 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3816 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3817 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3818 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3819 * src/print.c, src/print.h, src/print_graph.c:
3820 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3821 * src/reduce.h, src/relation.c, src/relation.h:
3822 * src/revision.h, src/scan-code.h, src/scan-code.l:
3823 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3824 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3825 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3826 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3827 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3828 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3829 * tests/existing.at, tests/glr-regression.at:
3830 * tests/headers.at, tests/input.at, tests/java.at:
3831 * tests/local.at, tests/output.at, tests/push.at:
3832 * tests/reduce.at, tests/regression.at, tests/sets.at:
3833 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3834 * tests/torture.at:
3835 Update to GPLv3.
3836
3837 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3838
3839 Get rid of broken %no-parser, -n, and --no-parser implementation and
3840 documentation.
3841 * TODO: Don't mention them.
3842 * doc/bison.1: Likewise.
3843 * doc/bison.texinfo (Decl Summary): Likewise.
3844 (Bison Options): Likewise.
3845 (Option Cross Key): Likewise.
3846 * src/getargs.c (no_parser_flag): Remove global variable.
3847 (usage): Don't print description of -n and --no-parser.
3848 (long_options): Remove --no-parser entry here.
3849 (getargs): Remove -n case in the switch here.
3850 * src/getargs.h (no_parser_flag): Remove extern.
3851 * tests/regression.at (Web2c Actions): Remove comment that mentions
3852 --no-parser.
3853
3854 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3855
3856 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3857 name user variables starting with `yy'. Just pass NULL instead of a
3858 dummy local &yylval to yypush_parse.
3859 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3860 starting with `yy'.
3861
3862 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3863
3864 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3865 true since it's then always used regardless of whether yyoverflow is
3866 defined. Reported by Christian Burger at
3867 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3868 * THANKS: Add Christian Burger.
3869
3870 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3871 node names: say "Decl Summary" not "Bison Declaration Summary".
3872
3873 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3874
3875 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3876 determine whether this function has already complained about an invalid
3877 value for a %define boolean variable, don't check whether Bison has
3878 ever examined the value. As written, the check was a tautology.
3879 Instead, record and check for this complaint using a separate muscle.
3880
3881 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3882
3883 Fix push parsing memory leak reported by Brandon Lucia at
3884 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3885 * THANKS: Add Brandon Lucia.
3886 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3887 but the parse never completed and thus freed it.
3888 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3889 * tests/testsuite.at: Include push.at.
3890 * test/push.at: New.
3891 (Push Parsing: Memory Leak for Early Deletion): New test case.
3892
3893 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3894
3895 Improve handling of multiple S/R conflicts in the same state and of S/R
3896 conflicts involving multiple reductions.
3897 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3898 set for a state here or Bison will abort if it is reassigned on a
3899 later conflicted reduction in the same state.
3900 Similarly, don't finalize and assign the solved conflicts report here
3901 or it will be lost if it is reassigned on a later conflicted reduction
3902 in the same state.
3903 (set_conflicts): Instead, assign them both here after all S/R conflicts
3904 in the state have been fully examined.
3905 * src/print.c (shift_set): Rename to...
3906 (no_reduce_set): ... this.
3907 (print_reductions): Update for rename, and add %nonassoc error action
3908 tokens to no_reduce_set so that, when printing the first remaining
3909 reduction on an error action token, the reduction is enclosed in
3910 brackets.
3911 (print_results): Update for rename.
3912 * tests/conflicts.at (Solved conflicts report for multiple reductions
3913 in a state): New test case.
3914 (%nonassoc error actions for multiple reductions in a state): New test
3915 case.
3916
3917 * src/main.c (main): Don't depend on C99 features.
3918
3919 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3920
3921 * build-aux/.cvsignore: Add compile.
3922 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
3923 uniwidth.
3924
3925 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
3926
3927 * bootstrap (slurp): Create target directories that don't exist.
3928 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
3929
3930 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3931
3932 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
3933 than item number.
3934 * closure.c (closure): Likewise.
3935 * state.h (reductions): Comment sorting of rules.
3936 (state): Comment sorting of items.
3937
3938 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
3939
3940 Fix C++ test cases after recent Gnulib changes. Discussed starting at
3941 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
3942 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
3943 definition in order to avoid Gnulib headers since we don't use config.h
3944 here.
3945 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
3946 rather than AT_DATA so that config.h is included.
3947
3948 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
3949
3950 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
3951 instead of fprintf. Guard these functions with #if YYDEBUG instead of
3952 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
3953 and so that YYFPRINTF is guaranteed to be defined here.
3954
3955 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3956
3957 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
3958 with...
3959 (muscle_percent_define_check_values): ... this more helpful function.
3960 Again, it's not used yet, but it will be.
3961 * src/muscle_tab.h: Likewise.
3962
3963 Improve some comments in parser table construction.
3964 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
3965 (generate_states): Don't mention ruleset, which is internal to closure.
3966 * src/closure.c (closure): Explain sorting of core and itemset, which
3967 is required for this function to behave correctly.
3968 * src/closure.h (closure): Mention sorting.
3969
3970 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
3971
3972 * src/lalr.c (state_lookahead_tokens_count): For code readability,
3973 move the check for disabled transitions to an aver since conflict
3974 resolution hasn't happened yet.
3975
3976 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
3977 labels a state as inconsistent just because it has error transitions.
3978 The original form of this check appeared in revision 1.1 of lalr.c,
3979 which was committed on 1991-12-21. Now (at least), changing the
3980 consistency label on such a state appears to have no useful effect in
3981 any of the places it is examined, which I enumerate below. The key
3982 point to understanding each item in this enumeration is that a state
3983 with an error transition is labelled consistent in the first place only
3984 if it has no rules, so the check cannot matter for states that have
3985 rules. (1) Labelling a state as inconsistent will cause set_conflicts
3986 to try to identify its conflicts, and a state must have *rules* to have
3987 conflicts. (2) Labelling a state as inconsistent will affect how
3988 action_row sets the default *rule* for the state. (3) Labelling a
3989 state as inconsistent will cause build_relations to add lookback edges
3990 to *rules* in that state.
3991 * src/state.h (struct state): Word the comment for member consistent
3992 more carefully.
3993
3994 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3995
3996 Don't depend on C99 features.
3997 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
3998 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
3999 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4000 * src/state.c (state_mark_reachable_states): Fix for-loop.
4001 (state_remove_unreachable_states): Fix for-loop.
4002
4003 Don't widen struct state with member reachable just to temporarily
4004 record reachability. Instead, use a local bitset.
4005 * src/state.h (struct state): Remove member.
4006 * src/state.c (state_new): Don't initialize it.
4007 (state_mark_reachable_states): Rename to...
4008 (state_record_reachable_states): ... this, and use bitset.
4009 (state_remove_unreachable_states): Use bitset.
4010
4011 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4012
4013 * src/Makefile.am (yacc): Quote target action commands properly so
4014 that the yacc script isn't corrupt. Reported by Hans Aberg at
4015 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4016
4017 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4018 the case of pure parsers. Reported by Frans Englich at
4019 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4020 * THANKS: Add Frans Englich.
4021
4022 * NEWS (2.3a+): In the %code entry, reference section `Bison
4023 Declaration Summary' from the manual now since the %code summary has
4024 moved there.
4025 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4026 in the rules section must be terminated by semicolons.
4027
4028 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4029
4030 Extend the front-end API for %define variables to more completely
4031 mirror the back-end. This will be useful in the future.
4032 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4033 Update comments to mention the new front-end counterparts of these
4034 macros.
4035 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4036 for muscle_string_decode and muscle_location_decode.
4037 (muscle_string_decode): New static function.
4038 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4039 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4040 functions.
4041 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4042 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4043 implementation more closely.
4044 (muscle_percent_define_invalid_value): New function.
4045 * src/muscle_tab.h (muscle_percent_define_get,
4046 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4047 Prototype.
4048
4049 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4050
4051 * NEWS (2.3a+): Mention yesterday's state-removal change.
4052 (2.3a): Remove the %language entry, which was added after 2.3a.
4053 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4054 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4055 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4056 tests/existing.at: Update copyright date.
4057
4058 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4059
4060 If conflict resolution makes states unreachable, remove those states,
4061 report rules that are then unused, and don't report conflicts in those
4062 states.
4063 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4064 New global function.
4065 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4066 function.
4067 * src/main.c (main): After conflict resolution, remove the unreachable
4068 states and update all data structures that reference states by number.
4069 * src/state.c (state_new): Initialize each state's reachable member to
4070 false.
4071 (state_mark_reachable_states): New static function.
4072 (state_remove_unreachable_states): New global function.
4073 * src/state.h (struct state): Add member bool reachable.
4074 (state_remove_unreachable_states): Prototype.
4075 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4076 New test case.
4077 * tests/existing.at (GNU pic Grammar): Update test case output now that
4078 an unused rule is discovered.
4079
4080 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4081
4082 Minor code cleanup in parser table construction.
4083 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4084 (new_itemsets, save_reductions): Update for rename to nitemset.
4085 * src/closure.c (nritemset): Rename to...
4086 (nitemset): ... this since the "r" appears to meaningless and isn't
4087 used in the comments.
4088 (closure): Update for rename.
4089 * src/closure.h (nritemset): Update extern to...
4090 (nitemset): ... this.
4091 * src/lalr.c (LA): Fix a typo in comments.
4092 * src/print.c (print_core): Update for rename to nitemset.
4093 * src/print_graph.c (print_graph): Likewise.
4094 * src/state.h: Fix some typos in header comments.
4095
4096 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4097
4098 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4099 still sticks to ASCII. Sorry!
4100
4101 * README-hacking: New file, taken mostly from coreutils, with changes
4102 for Bison. Contains much of the contents of:
4103 * README-cvs: Remove.
4104 * bootstrap: Sync from gnulib.
4105 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4106 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4107
4108 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4109
4110 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4111 Setzer.
4112 (Java Differences): Fix some typos.
4113 * THANKS: Add Sebastian Setzer.
4114
4115 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4116
4117 * data/java.m4 (b4_single_class_if): Remove.
4118 (b4_abstract_if): Look at "%define abstract".
4119 (b4_lexer_if): New.
4120 (b4_union_name): Rename...
4121 (b4_yystype): ... to this. Map to "%define stype".
4122 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4123 b4_maybe_throws): Fix quoting.
4124 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4125 * data/lalr1.java (Lexer interface): Always define.
4126 (Lexer interface within parser class): Remove.
4127 (YYLexer class): New, used when "%code lexer" is present.
4128 (constructor): When "%code lexer" is used, pass %lex-param
4129 to the lexer constructor.
4130 (yylex, yyparse): Remove %lex-param from method invocations
4131 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4132
4133 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4134 abstract". Rename "%define union_name" to "%define stype".
4135 Rename method names according to previous patch.
4136 (Java Scanner Interface): Describe "%code lexer" instead of
4137 "%pure-parser" and "%define single_class".
4138 (Java Differences): Mention "%code lexer".
4139
4140 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4141 Include scanner here, using macros from tests/local.at.
4142 (AT_DATA_CALC_Y): Remove final argument.
4143 (_AT_CHECK_JAVA_CALC): Likewise.
4144 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4145 of %locations and %error-verbose.
4146 (main): Test with and without %lex-param.
4147 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4148 (AT_BISON_OPTION_POPDEFS): Pop it.
4149
4150 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4151
4152 DJGPP spefic issue. Inhibit the use of disallowed characters for
4153 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4154 and concern testsuite case 46.
4155 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4156 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4157 * djgpp/config.bat: Inhibit the use of disallowed characters.
4158
4159 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4160
4161 Miscellaneous %define and %code cleanup.
4162 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4163 values are interpreted.
4164 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4165 documentation a little more.
4166 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4167 muscle_percent_define_insert, muscle_percent_code_grow): New
4168 functions/macros.
4169 * src/muscle_tab.h (muscle_percent_define_insert,
4170 muscle_percent_code_grow): Prototype.
4171 * src/parse-gram.y (prologue_declaration): Use
4172 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4173 %define and %code directives.
4174
4175 Make it easy to share %define boolean variables between the front-end
4176 and back-end. Though not used yet, this will be useful in the future.
4177 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4178 Bison uses of names rather than just skeleton uses of names.
4179 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4180 b4_percent_define_skeleton_variables(VARIABLE) to
4181 b4_percent_define_bison_variables(VARIABLE).
4182 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4183 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4184 b4_percent_code_bison_qualifiers(QUALIFIER).
4185 (b4_check_user_names_wrap): Update for renames.
4186 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4187 muscle_percent_define_default): New functions mimicking
4188 b4_percent_define_flag_if and b4_percent_define_default.
4189
4190 For %define variables, report locations for invalid values and
4191 redefinitions.
4192 * data/bison.m4 (b4_percent_define_flag_if): Read
4193 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4194 value for VARIABLE.
4195 (b4_percent_define_default): Save a special location in
4196 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4197 must later be reported as invalid.
4198 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4199 functions.
4200 (muscle_percent_define_insert): Record the location of VARIABLE in
4201 muscle percent_define_loc(VARIABLE), and use it to report the previous
4202 location for a redefinition.
4203 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4204 (muscle_percent_define_default): Update like b4_percent_define_default.
4205 (muscle_grow_user_name_list): Rename to...
4206 (muscle_user_name_list_grow): ... this for consistency and use
4207 muscle_location_grow.
4208 * src/muscle_tab.h (muscle_location_grow): Prototype.
4209 * tests/input.at (%define errors): Update expected output.
4210 * tests/skeletons.at (%define boolean variables: invalid skeleton
4211 defaults): New test case.
4212
4213 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4214
4215 * src/print.c (lookahead_set, state_default_rule): Remove.
4216 (print_reductions): Replace state_default_rule invocation with
4217 equivalent use of yydefact, which was computed in token_actions in
4218 tables.c.
4219 (print_results): Don't allocate lookahead_set.
4220
4221 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
4222
4223 * data/lalr1.java: Prefix all private members with yy.
4224
4225 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4226
4227 Use YYFPRINTF instead of fprintf where appropriate. Reported by
4228 Sebastien Fricker at
4229 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
4230 * THANKS: Add Sebastien Fricker.
4231 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4232 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4233 accept a variable number of arguments.
4234
4235 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4236
4237 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4238
4239 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4240
4241 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4242 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4243 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4244
4245 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4246
4247 Undo my 2007-02-07 change, switching back to the c-strcase module
4248 introduced in the 2007-02-03 change. Bruno Haible reported that
4249 the 2007-02-07 change would be dangerous in Turkish if we add a
4250 language whose name contains "i", since "i" is not lowercase "I"
4251 in Turkish.
4252 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4253 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4254 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4255 * m4/.cvsignore: Remove strcase.m4.
4256 * src/getargs.c: Revert 2007-02-07 change, as follows.
4257 Include c-strcase.h.
4258 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4259
4260 2007-02-11 Bruno Haible <bruno@clisp.org>
4261
4262 Enable the Java related testsuite tests when the only Java compiler
4263 found is a gcj < 4.3. Discussed at
4264 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4265 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4266
4267 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4268
4269 * data/Makefile.am: Update copyright date.
4270 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4271 yypstate_new returns NULL.
4272 (yypstate_new): Return NULL if malloc does.
4273 * src/reader.c (packgram): Move translation of rule actions from the
4274 beginning of packgram to...
4275 (check_and_convert_grammar): ... here right before packgram is invoked
4276 so it's easier to write more complete comments, and remove redundant
4277 code.
4278
4279 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4280
4281 As in semantic actions, make @$ in %initial-action, %destructor, and
4282 %printer imply %locations.
4283 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4284 scanning @$.
4285 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4286 (@$ in %initial-action implies %locations,
4287 @$ in %destructor implies %locations,
4288 @$ in %printer implies %locations): ... these new test cases.
4289
4290 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4291
4292 Undo most of the 2007-02-03 change, switching to the strcase module
4293 now that gnulib strcase has been fixed.
4294 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4295 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4296 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4297 * m4/.cvsignore: Add strcase.m4.
4298 * src/getargs.c: Revert 2007-02-03 change, as follows.
4299 Don't include c-strcase.h.
4300 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4301 strcasecmp has "unspecified behavior" outside the POSIX locale,
4302 but it works fine in practice if at least one argument is ASCII,
4303 as is the case in Bison.
4304
4305 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
4306
4307 * tests/java.at: Skip tests if only one of javac/java is present.
4308 Reported by Joel E. Denny.
4309 * tests/atlocal.in: Adjust copyright years.
4310
4311 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
4312
4313 * data/lalr1.java (Stack): Work around old verifiers that disallow
4314 access to the private fields of an inner class, from the outer class.
4315 We can make Stack's fields public because user code doesn't have access
4316 to the instance of Stack used by parse(). Reported by Paul Eggert.
4317
4318 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4319
4320 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4321 the right spot for these files?
4322 * bootstrap.conf (gnulib_modules): Add c-strcase.
4323 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4324 c-strncasecmp.c.
4325 * src/getargs.c: Include c-strcase.h.
4326 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4327 to avoid unspecified behavior.
4328
4329 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4330
4331 * doc/bison.texinfo (Decl Summary): Correct typo.
4332
4333 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
4334
4335 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4336 Complain if the value does not match empty, "true" or "false".
4337 * data/c++.m4: Adjust default definitions of %define variables.
4338 * data/java.m4: Adjust default definitions of %define variables.
4339 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4340 to above behavior.
4341 * tests/input.at (Boolean %define variables): Test new behavior.
4342
4343 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
4344
4345 * NEWS: Mention java.
4346 * TODO: Remove things that are done.
4347 * bootstrap.conf: Add javacomp-script and javaexec-script.
4348 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4349
4350 * data/Makefile.am: Add new files.
4351 * data/java-skel.m4: New.
4352 * data/java.m4: New.
4353 * data/lalr1.java: New.
4354
4355 * doc/bison.texinfo: Put "A Complete C++ Example" under
4356 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4357 under Other Languages.
4358
4359 * src/getargs.c (valid_languages): Add Java.
4360 * src/getargs.h (struct bison_language): Update size of string fields.
4361
4362 * tests/Makefile.am: Add java.at.
4363 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4364 * tests/java.at: New.
4365 * tests/testsuite.at: Include it.
4366
4367 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4368
4369 Clean up.
4370 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4371 at_directive_argv arguments so these no longer have to be global
4372 variables. Also, update the implementation for the following changes.
4373 (fail_for_at_directive_too_many_args,
4374 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4375 (at_directive_name): Remove as at_directive_argv[0] will be used for
4376 this now.
4377 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4378 for the directive name.
4379 (at_directive_argc, at_directive_argv): Make these local within
4380 skel_lex instead of global.
4381 (INITIAL): Update directive start action for above changes.
4382 (SC_AT_DIRECTIVE_ARG): Rename to...
4383 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4384 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4385 (scan_skel): Move yylex_destroy to...
4386 (skel_scanner_free): ... here.
4387 * tests/skeletons.at (installed skeleton file name): Rename to...
4388 (installed skeleton file names): ... this.
4389
4390 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4391
4392 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4393 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4394 Summary" not "Directives".
4395 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4396 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4397 since the former is now the more complete one.
4398 (Prologue Alternatives): Likewise and do the same for %defines.
4399 (Table of Symbols): Add summary of %code, add summary of %define, and
4400 move full %code documentation to...
4401 (Decl Summary): ... here for consistency with other entries in these
4402 sections.
4403 Move %define entry in order to keep this list alphabetized.
4404 Reword %define entry a little to put less emphasis on the skeleton
4405 concept, which most users shouldn't have to think about.
4406
4407 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4408
4409 Adjust to recent gnulib changes.
4410 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4411 Add string.h, string_.h, unistd_.h, wchar_.h.
4412 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4413 * src/system.h: Don't include <stpcpy.h>; this is now done by
4414 <string.h>.
4415
4416 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
4417
4418 Simplify implementation of unqualified %code, implement macros for
4419 uniform treatment of boolean %define flags. Document %define.
4420 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4421 b4_percent_code_ifdef): New.
4422 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4423 * data/c++.m4: Define default value for global_tokens_and_yystype.
4424 * data/glr.cc: Likewise.
4425 * data/location.cc: Use b4_percent_define_flag_if.
4426
4427 * doc/bison.texinfo (Decl Summary): Document %define.
4428
4429 * src/parse-gram.y (Unqualified %code): Change muscle name to
4430 b4_percent_code().
4431 (content.opt): Default to empty.
4432
4433 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4434
4435 Implement support for relative and absolute skeleton file names.
4436 Discussed starting at
4437 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4438 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4439 (Bison Options): Document in --skeleton entry.
4440 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4441 full_skeleton can't necessarily hold all of pkgdatadir.
4442 If the specified skeleton file name contains a `/', don't prepend
4443 pkgdatadir.
4444 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4445 file name contains a `/', prepend the grammar file directory.
4446 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4447 * skeletons.at: New file.
4448 (relative skeleton file names): New test case.
4449 (installed skeleton file names): New test case.
4450 * tests/testsuite.at: Include skeletons.at.
4451
4452 * bootstrap: Update copyright to 2007.
4453
4454 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
4455
4456 * bootstrap: Remove occurrences of .#bootmp from the files.
4457
4458 2007-01-17 Akim Demaille <akim@epita.fr>
4459
4460 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4461 nonterminals.
4462 Use per-type %printer.
4463
4464 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4465
4466 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4467 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4468 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4469 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4470 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4471 tests/glr-regression.at, tests/input.at, tests/local.at,
4472 tests/output.at, tests/torture.at: Update copyright to 2007.
4473
4474 2007-01-16 Akim Demaille <akim@epita.fr>
4475
4476 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4477 error code.
4478 (Calc++ Scanner): Exit with failure if we can't open the input
4479 file.
4480 Accept "-" standing for stdin.
4481 (Calc++ Top Level): Print the result only if the parsing was
4482 successful.
4483
4484 2007-01-16 Akim Demaille <akim@epita.fr>
4485
4486 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4487
4488 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
4489 and Joel E. Denny <jdenny@ces.clemson.edu>
4490
4491 Clean up %define and %code implementation in M4 some. Most
4492 importantly, rename all related macros to be in the b4_percent_define
4493 and b4_percent_code namespaces. Also, complete support for `.' in
4494 %define variable names and %code qualifiers.
4495 * data/bison.m4 (b4_check_user_names): Check for special
4496 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4497 m4_foreach loops.
4498 (b4_get_percent_define, b4_get_percent_code): Rename to...
4499 (b4_percent_define_get, b4_percent_code_get): ... these.
4500 Extend documentation with examples.
4501 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4502 b4_percent_define_skeleton_variables and
4503 b4_percent_code_skeleton_qualifiers.
4504 Expect any value for the %define variable `foo' to be stored in the
4505 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4506 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4507 expect any unqualified %code blocks to be stored in a macro named
4508 `b4_percent_code_unqualified'.
4509 Use m4_indir so that %define variable names and %code qualifiers can
4510 contain `.', which is allowed by the grammar parser.
4511 (b4_percent_define_default): New macro to set a default value for a
4512 %define variable.
4513 (m4_wrap): Update wrapped code, and fix some underquoting.
4514 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4515 Expect grammar uses of %define variables and %code qualifiers to be
4516 defined in b4_percent_define_user_variables and
4517 b4_percent_code_user_qualifiers.
4518 * data/c++.m4: Use b4_percent_define_default rather than
4519 m4_define_default. Fix some underquoting. Skeleton usage of %define
4520 variable define_location_comparison now implies skeleton usage of
4521 %define variable filename_type.
4522 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4523 data/push.c, data/yacc.c: Update macro names.
4524 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4525 muscle names.
4526
4527 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4528
4529 DJGPP specific issues.
4530
4531 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4532 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4533
4534 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4535
4536 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4537 run parsers in all tests so that Valgrind is invoked during
4538 maintainer-check-valgrind.
4539 (Duplicate representation of merged trees): Free all semantic values.
4540 (Duplicated user destructor for lookahead): Likewise.
4541
4542 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4543
4544 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4545 command-line prefix.
4546 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4547 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4548 miss Valgrind messages.
4549 (Exploding the Stack Size with Malloc): Likewise.
4550
4551 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4552
4553 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4554 locals. Reported by Juan Manuel Guerrero at
4555 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4556 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4557 Fix some indentation also.
4558 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4559 explaining this issue.
4560
4561 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
4562 and Joel E. Denny <jdenny@ces.clemson.edu>
4563
4564 Simplify union and prologue handling, and escape union and lex/parse
4565 params with digraphs.
4566 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4567 values to the empty string since these are no longer guaranteed
4568 initialized by the front-end.
4569 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4570 braces around b4_user_stype since this is no longer done by the
4571 front-end.
4572 * src/files.c, src/files.h (pre_prologue_obstack,
4573 post_prologue_obstack): Remove.
4574 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4575 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4576 with digraphs. This fixes lex params and parse params.
4577 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4578 * src/output.c (prepare): Remove muscle insertion of the prologues.
4579 (output): Remove freeing of pre_prologue_obstack and
4580 post_prologue_obstack.
4581 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4582 than prologue_augment for prologue parsing so you don't need prologue
4583 obstacks.
4584 (grammar_declaration): For %union RHS, use `braceless' instead of
4585 "{...}" so that braces are already stripped and code is escaped with
4586 digraphs.
4587 * src/reader.c (prologue_augment): Remove.
4588 (reader): Remove initialization of pre_prologue_obstack and
4589 post_prologue_obstack.
4590 * src/reader.h (prologue_augment): Remove.
4591
4592 * data/c.m4: Remove stray parenthesis.
4593
4594 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4595
4596 Remove quotes from variables names in %define directives and from
4597 qualifiers in %code directives, and restrict the characters that are
4598 allowed in them to M4-friendly ones. For %define, continue to support
4599 the quoted form as a deprecated feature. Discussed starting at
4600 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4601 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4602 %code.
4603 * doc/bison.texinfo (Prologue Alternatives): Update.
4604 (Decl Summary): In %defines entry, update mention of `%code requires'
4605 and `%code provides'.
4606 (C++ Location Values): Update %define uses.
4607 (Calc++ Parser Interface): Likewise.
4608 (Calc++ Parser): Likewise, and update `%code requires' uses.
4609 (Table of Symbols): Update %code documentation.
4610 * src/parse-gram.y (prologue_declaration): For %define variables, use
4611 `variable' instead of `STRING'.
4612 (grammar_declaration): For %code qualifiers, use `ID' instead of
4613 `STRING'.
4614 (variable): New nonterminal that takes an `ID' or a `STRING'.
4615 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4616 and %define uses.
4617 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4618 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4619 (%define errors): Update %define uses.
4620
4621 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4622
4623 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4624 instead of muscle_insert for %define values so that M4-special
4625 characters are replaced with digraphs.
4626 * tests/input.at (%define errors): Extend to check weird values.
4627
4628 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4629
4630 Instead of having skeletons declare all valid %define variables and
4631 %code qualifiers, provide macros that retrieve the associated values
4632 and build these lists automatically. Thus Bison will now warn when a
4633 variable or qualifier is not used by the skeleton in the current
4634 invocation regardless of whether it might sometimes be used by that
4635 skeleton in other invocations. Also, move all %define value macros to
4636 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4637 form, which is replaced by %code.
4638 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4639 (b4_check_user_names): ... this, and change the series of valid name
4640 arguments to a single list argument for names used in the skeleton
4641 similar to the existing list argument for names used in the grammar.
4642 Warn instead of complaining.
4643 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4644 values and %code code, to format %code code properly, and to build
4645 lists of all %define variables and %code qualifiers used in the
4646 skeleton: b4_skeleton_percent_define_variables and
4647 b4_skeleton_percent_code_qualifiers.
4648 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4649 Remove, and...
4650 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4651 the skeleton names lists can finish building first. In place of
4652 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4653 expect the lists b4_user_percent_define_variables and
4654 b4_user_percent_code_qualifiers.
4655 * data/c++.m4: Where setting default values for b4_parser_class_name,
4656 b4_location_type, b4_filename_type, b4_namespace, and
4657 b4_define_location_comparison, update their names to the
4658 b4_percent_define_ namespace.
4659 * data/glr.c: Don't use b4_check_percent_define_variables and
4660 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4661 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4662 (b4_parser_class_name, b4_namespace): Define these using
4663 b4_get_percent_define for parser_class_name and namespace.
4664 * data/location.cc: Use b4_get_percent_define.
4665 * data/push.c: Don't use b4_check_percent_define_variables and
4666 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4667 * data/yacc.c: Likewise, and don't call m4_exit in
4668 b4_use_push_for_pull_if or m4_wrap code will never execute.
4669 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4670 Rename to...
4671 (muscle_grow_user_name_list): ... this for consistency with the
4672 terminology used in bison.m4.
4673 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4674 %define variable names, and rename muscle used_percent_define_variables
4675 to user_percent_define_variables.
4676 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4677 user_percent_code_qualifiers.
4678 (content): Remove.
4679 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4680 {CODE} form is no longer accepted.
4681 * tests/input.at (Reject bad %code qualifiers): Rename to...
4682 (Reject unused %code qualifiers): ... this, and update test output.
4683 (%define error): Update test output.
4684
4685 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4686
4687 Check for unrecognized %define variables similar to checking for
4688 unrecognized %code qualifiers. Check for redefined %define variables.
4689 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4690 generalizes...
4691 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4692 (b4_check_percent_define_variables): New, also wraps it.
4693 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4694 variables using b4_check_percent_define_variables.
4695 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4696 all those exercised in the test suite and all those listed in the
4697 `Default values' section of c++.m4. Are there others?
4698 * data/push.c, data/yacc.c: Declare no valid %define variables.
4699 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4700 similar to muscle_find, but it works even when the muscle stores a
4701 const value.
4702 (muscle_grow_used_name_list): New function for constructing the used
4703 name list muscles that b4_check_for_unrecognized_names requires.
4704 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4705 %define'd more than once. Define the b4_used_percent_define_variables
4706 muscle with muscle_grow_used_name_list.
4707 (grammar_declaration): Abbreviate %code code with
4708 muscle_grow_used_name_list.
4709 * tests/input.at (%define errors): New.
4710
4711 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4712
4713 Provide warn_at, complain_at, and fatal_at function callbacks to the
4714 skeletons, and use this for %code qualifier complaints.
4715 * data/bison.m4 (b4_error_at): New, invoked by...
4716 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4717 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4718 @fatal_at(...@) directives.
4719 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4720 qualifiers in b4_used_percent_code_qualifiers and to use
4721 b4_complain_at.
4722 * src/location.c, src/location.h (boundary_set_from_string): New global
4723 function.
4724 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4725 function.
4726 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4727 to b4_used_percent_code_qualifiers.
4728 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4729 function.
4730 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4731 (lineno): Rename to...
4732 (out_lineno): ... this so I don't misunderstand it again.
4733 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4734 here; these newlines are in the input but not the output file.
4735 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4736 (at_directive_perform): ... this new static function, and add handling
4737 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4738 directives.
4739 * tests/input.at (Reject bad %code qualifiers): Update test output with
4740 locations and extend.
4741
4742 * tests/output.at (Output file name: [, Output file name: ]): Remove
4743 bogus comment about these tests failing.
4744
4745 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4746
4747 Clean up b4_check_percent_code_qualifiers a little.
4748 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4749 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4750 documentation and add examples.
4751 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4752 qualifiers here.
4753
4754 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4755
4756 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4757 unreliable -- especially when they're hidden inside another macro.
4758 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4759 data/c.m4: Remove m4_divert(-1).
4760 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4761 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4762 m4_divert_push(0) and m4_divert_pop(0).
4763 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
4764 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4765 pushed and popped by m4sugar, should be first on the stack.
4766
4767 Provide warn, complain, and fatal function callbacks to the skeletons.
4768 This provides more flexibility than m4_fatal, improves the error
4769 message format, and captures messages for translation. Discussed
4770 starting at
4771 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4772 * data/bison.m4 (b4_error): New, invoked by...
4773 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4774 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4775 directives. Because these M4 macros might be called when the current
4776 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4777 the previous removal of uses of m4_divert, which caused trouble.
4778 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4779 m4_fatal to report unrecognized %code qualifiers.
4780 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4781 push parser requests.
4782 * data/glr.c: Use b4_complain instead of m4_fatal to report
4783 non-deterministic push parser requests.
4784 Update @output usage to @output(...@) form.
4785 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4786 report missing %defines. Update @output usage to @output(...@) form.
4787 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4788 @output(...@) form.
4789 * src/main.c (main): Invoke skel_scanner_free.
4790 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4791 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4792 obstack_for_string from flex-scanner.h.
4793 (YY_DECL): Use to declare skel_lex static.
4794 (decode_at_digraphs): Remove; now handled in the new
4795 SC_AT_DIRECTIVE_ARG start condition.
4796 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4797 functions.
4798 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4799 at_directive_argv): New static globals.
4800 (INITIAL): Use fail_for_invalid_at.
4801 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4802 recognize the start of a generalized `@directive(...@)' form and
4803 start...
4804 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4805 directive args (using the new obstack_for_string), to decode the
4806 contained @ diagraphs, and to perform the directive. It recognizes
4807 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4808 @output(...@).
4809 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4810 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4811 `@,'.
4812 (scan_skel): Initialize obstack_for_string on the first call.
4813 (skel_scanner_free): New function to free obstack_for_string.
4814 * tests/input.at (Reject bad %code qualifiers): Update test output.
4815
4816 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4817
4818 Consolidate the 4 prologue alternative directives (%code, %requires,
4819 %provides, and %code-top) into a single %code directive with an
4820 optional qualifier field. Discussed at
4821 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4822 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4823 alternatives.
4824 * doc/bison.texinfo (Prologue Alternatives): Update.
4825 (Decl Summary): Update to %code "requires" and %code "provides".
4826 (Calc++ Parser): Update to %code "requires".
4827 (Table of Symbols): Remove entries for %requires, %provides, and
4828 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4829 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4830 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4831 which are skeleton-specific.
4832 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4833 declare what %code qualifiers it supports and to complain if any other
4834 qualifiers were used in the grammar.
4835 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4836 and b4_user_code([b4_percent_code_provides]) in place of
4837 b4_user_requires and b4_user_provides.
4838 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4839 Add b4_user_code([b4_percent_code_top]) and
4840 b4_user_code([b4_percent_code]).
4841 Invoke b4_check_percent_code_qualifiers.
4842 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4843 PERCENT_REQUIRES): Remove.
4844 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4845 %requires. Rewrite the %code RHS as the unqualified form defining the
4846 muscle b4_percent_code. Add another RHS for the qualified %code form,
4847 which defines muscles of the form b4_percent_code_QUALIFIER and the
4848 b4_used_percent_code_qualifiers muscle.
4849 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4850 PERCENT_REQUIRES): Remove.
4851 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4852 %code "requires" and %code "provides".
4853 * tests/input.at (Reject bad %code qualifiers): New.
4854
4855 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4856
4857 Use the new code_props interface for destructors and printers.
4858 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4859 printer_location members, and change the type of the destructor and
4860 printer members to code_props.
4861 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4862 symbol_printer_get, semantic_type_destructor_set,
4863 semantic_type_printer_set, default_tagged_destructor_set,
4864 default_tagless_destructor_set, default_tagged_printer_set,
4865 default_tagless_printer_set): Use code_props in arguments and return
4866 types in place of char const * and location.
4867 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4868 since the locations are now contained in the return of
4869 symbol_destructor_get and symbol_printer_get.
4870 * src/output.c (symbol_destructors_output, symbol_printers_output):
4871 Replace with...
4872 (symbol_code_props_output): ... this to eliminate duplicate code.
4873 (output_skeleton): Update to use symbol_code_props_output.
4874 * src/reader.c (symbol_should_be_used): Update use of
4875 symbol_destructor_get.
4876 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4877 Update uses of the various _destructor_set and _printer_set functions.
4878 * src/symtab.c: (default_tagged_destructor_location,
4879 default_tagless_destructor_location, default_tagged_printer_location,
4880 default_tagless_printer_location): Remove since we...
4881 (default_tagged_destructor, default_tagless_destructor,
4882 default_tagged_printer, default_tagless_printer): ... change the type
4883 of these to code_props.
4884 (symbol_new, semantic_type_new, symbol_destructor_set,
4885 semantic_type_destructor_set, symbol_destructor_get,
4886 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4887 symbol_check_alias_consistency, default_tagged_destructor_set,
4888 default_tagless_destructor_set, default_tagged_printer_set,
4889 default_tagless_printer_set): Update.
4890 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4891 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4892 code_props members.
4893 (symbol_print): Use SYMBOL_CODE_PRINT.
4894
4895 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4896
4897 Use the new code_props interface for rule actions.
4898 * src/symlist.h (symbol_list): Replace action, action_location, and
4899 used members with a code_props action_props member.
4900 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4901 grammar_midrule_action, grammar_current_rule_merge_set,
4902 grammar_current_rule_symbol_append, packgram): Update.
4903 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4904 * src/scan-code.l (handle_action_dollar): Update.
4905 (translate_rule_action): Remove, no longer used.
4906 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4907
4908 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4909
4910 Use the new code_props interface in parse-gram.y.
4911 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4912 Update all uses of translate_* functions to use the new code_props
4913 interface and to use gram_scanner_last_string_free and
4914 code_scanner_last_string_free where possible.
4915 (grammar_declaration): symbol_list_destructor_set and
4916 symbol_list_printer_set now perform the translation, so don't do it
4917 here. Use gram_scanner_last_string_free where possible.
4918 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4919 translate_code): Remove, no longer used.
4920 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4921 symbol_list_printer_set): Perform code translation here rather than
4922 depending on the caller to do so.
4923
4924 * src/symlist.h (struct symbol_list): Correct some documentation typos.
4925 * src/scan-gram.h (gram_last_string): Remove declaration.
4926 * src/scan-gram.l (last_string): Declare it static.
4927
4928 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4929
4930 Encapsulate code properties and related functionality for the various
4931 destructors, printers, and actions into a code_props structure and
4932 interface. This patch merely implements code_props in scan-code.h and
4933 scan-code.l. Future patches will rewrite other modules to use it.
4934 Discussed starting at
4935 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
4936 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
4937 consistently initialize const structs that have an empty location
4938 field.
4939 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
4940 to ensure consistency.
4941 * src/scan-code.h (code_props): New structure.
4942 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
4943 function, macro, and const global variable for initializing a
4944 code_props with no code.
4945 (code_props_plain_init, code_props_symbol_action_init,
4946 code_props_rule_action_init, code_props_translate_code): The rest of
4947 the new code_props functional interface. Among other things, the init
4948 functions set the code_props kind field so that
4949 code_props_translate_code will know whether to behave like
4950 translate_symbol_action, translate_rule_action, or translate_code.
4951 These old translate functions must remain until all other modules are
4952 updated to use the new code_props interface.
4953 (code_scanner_last_string_free): New function similar to
4954 gram_scanner_last_string_free.
4955 (code_scanner_free): Add documentation.
4956 * src/scan-code.l: Implement the new interface.
4957 (code_lex): Make it static, add a code_props* argument, and remove the
4958 rule argument.
4959 (last_string): New static global similar to the one in scan-gram.l.
4960 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
4961 instead of rule.
4962 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
4963 code_props since Bison may one day use this information for destructors
4964 and printers.
4965 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
4966 (handle_action_dollar): Use symbol_list_n_get and set used flag
4967 directly since symbol_list_n_used_set is removed.
4968 (translate_action): Add a code_props* argument and remove the rule,
4969 action, and location arguments. Pass the code_props* on to code_lex.
4970 (translate_rule_action, translate_symbol_action, translate_code):
4971 Rewrite as wrappers around the new code_props interface.
4972 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
4973 it would eventually need to break the encapsulation of code_props.
4974
4975 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4976
4977 * etc/.cvsignore: New.
4978
4979 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4980
4981 Add maintainer-push-check to run maintainer-check using push parsing in
4982 place of pull parsing where available.
4983 * Makefile.am (maintainer-push-check): New.
4984 * data/bison.m4 (b4_use_push_for_pull_if): New.
4985 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
4986 appropriately based on their existing values.
4987 (yypush_parse): Don't print push-parser-specific diagnostics if push
4988 parsing is being used in place of pull parsing.
4989 * data/yacc.c: If push parsing should replace pull parsing, redirect to
4990 push.c.
4991 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
4992 variable, and insert b4_use_push_for_pull_flag into muscles.
4993 * tests/Makefile.am (maintainer-push-check): New.
4994
4995 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4996
4997 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
4998 (whether successful or failed) so that yypush_parse can be invoked
4999 again to start a new parse using the same yypstate.
5000 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5001 check multiple yypull_parse invocations on the same yypstate. For pull
5002 mode, extend to check multiple yyparse invocations.
5003 (Exploding the Stack Size with Alloca): Extend to try with
5004 %push-pull-parser.
5005 (Exploding the Stack Size with Malloc): Likewise.
5006
5007 * tests/calc.at (Simple LALR Calculator): Don't specify
5008 %skeleton "push.c" since %push-pull-parser implies that now.
5009 * tests/headers.at (export YYLTYPE): Don't check for the push
5010 declarations. Otherwise, this test case can't be used to see if push
5011 mode can truly emulate pull mode.
5012 * tests/input.at (Torturing the Scanner): Likewise.
5013 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5014 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5015 AT_YACC_IF, which now includes the case of push mode since %skeleton
5016 need not be used for push mode. This will be more intuitive once
5017 push.c is renamed to yacc.c.
5018
5019 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5020
5021 For push mode, convert yyparse from a macro to a function, invoke yylex
5022 instead of passing a yylexp argument to yypull_parse, and don't
5023 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5024 Discussed starting at
5025 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5026 * data/bison.m4 (b4_pull_if): New.
5027 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5028 * data/push.c: Improve M4 quoting a little.
5029 (b4_generate_macro_args, b4_parenthesize): Remove.
5030 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5031 any time a pull parser is requested.
5032 Don't #define this as a wrapper around yypull_parse. Instead, when
5033 both push and pull are requested, make it a function that does that
5034 same thing.
5035 (yypull_parse): If there's a b4_prefix, #define this to
5036 b4_prefix[pull_parse] when both push and pull are requested.
5037 Don't define this as a function unless both push and pull are
5038 requested.
5039 Remove the yylexp argument and hard-code yylex invocation instead.
5040 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5041 %push-parser.
5042 * src/getargs.c (pull_parser): New global initialized to true.
5043 * getargs.h (pull_parser): extern it.
5044 * src/output.c (prepare): Insert pull_flag muscle.
5045 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5046 (prologue_declaration): Set both push_parser and pull_parser = true for
5047 %push-pull-parser. Set push_parser = true and pull_parser = false for
5048 %push-parser.
5049 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5050 %push-parser since there's no backward-compatibility concern here.
5051 Scan %push-pull-parser.
5052 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5053 instead of %push-parser.
5054 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5055 prototype it in the module that calls yyparse.
5056 * tests/input.at (Torturing the Scanner): Likewise.
5057 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5058
5059 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5060
5061 Update etc/bench.pl. Optimize push mode a little (the yyn change
5062 deserves most of the credit).
5063 * Makefile.am (SUBDIRS): Add etc subdirectory.
5064 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5065 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5066 yytoken, yyval, and yyloc declarations to...
5067 (yyparse or yypush_parse): ... here to improve performance. For
5068 yypush_parse invocations after the first, be sure to assign yyn its old
5069 value again.
5070 (yypstate_new): Don't bother initializing the yyresult field since the
5071 initial value isn't used.
5072 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5073 remove the #define that, in push mode, set it to yyps->NAME.
5074 * etc/Makefile.am: New.
5075 * etc/bench.pl: Remove and build it instead from...
5076 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5077 "tests/bison" from the build directory by default rather than just
5078 invoking "bison" from $PATH.
5079 (calc_grammar): Update push parser code: don't declare yylval globally,
5080 don't define yyparse_wrapper, and don't #define yyparse.
5081 (bench_grammar): Update to check all working combinations of yacc.c,
5082 push.c, impure, pure, pull, and push.
5083
5084 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5085
5086 For push mode, add pull wrappers around yypush_parse.
5087 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5088 (yypull_parse): New function wrapping yypush_parse.
5089 (yyparse): New #define wrapping yypull_parse.
5090 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5091 is declared.
5092 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5093 prototype yylex in the module that calls yyparse, and don't prototype
5094 yyparse there. Otherwise, the yyparse expansion won't compile.
5095 * tests/input.at (Torturing the Scanner): Likewise.
5096
5097 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5098
5099 Enable push parsers to operate in impure mode. Thus, %push-parser no
5100 longer implies %pure-parser. The point of this change is to move
5101 towards being able to test the push parser code by running the entire
5102 test suite as if %push-parser had been declared.
5103 * data/push.c (yypush_parse): For impure mode, remove the
5104 yypushed_char, yypushed_val, and yypushed_loc arguments.
5105 Instead, declare these as local variables initialized to the global
5106 yychar, yylval, and yylloc.
5107 For the first yypush_parse invocation only, restore the initial values
5108 of these global variables when it's time to read a token since they
5109 have been overwritten.
5110 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5111 %push-parser.
5112 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5113 %pure-parser along with %push-parser since this test case was designed
5114 for pure push parsers.
5115 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5116 (AT_YACC_OR_PUSH_IF): New.
5117 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5118 add a note that it's still wrong for some cases (as it has been for a
5119 while).
5120 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5121 %push-parser no longer implies %pure-parser.
5122
5123 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5124
5125 Remove some unnecessary differences between the pull parser code and
5126 the push parser code. This patch enables yynerrs in push mode.
5127 * data/push.c: Reformat M4 a little.
5128 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5129 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5130 because push mode is on. Instead, if pure mode is on, move yynerrs
5131 to...
5132 (b4_declare_parser_state_variables): ... here.
5133 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5134 to yyps->NAME so it can be used in yypush_parse.
5135 (yypush_parse): Don't omit uses of yynerrs in push mode.
5136
5137 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5138
5139 Fix bug such that the first pushed token's value and location are
5140 sometimes overwritten (sometimes by %initial-action) before being used.
5141 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5142 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5143 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5144 more closely mimic the pull parser logic.
5145 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5146 time to read a token, which is after any initialization of yylval and
5147 yylloc.
5148 (gottoken): Rename label to...
5149 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5150 user namespace.
5151
5152 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5153
5154 Rearrange initialization of the parser state variables so that the
5155 skeleton doesn't have to have a copy for pull mode and another for push
5156 mode. This patch also fixes at least a bug such that yylloc was not
5157 initialized (with b4_location_initial_line and
5158 b4_location_initial_column) upon calling yypush_parse. However, that
5159 initialization now overwrites the first token's location;
5160 %initial-action assigning @$ already did the same thing, and both bugs
5161 will be fixed in a later patch.
5162 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5163 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5164 yyss, yyvs, yyls, and yystacksize.
5165 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5166 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5167 yylsp.
5168 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5169 yyps->NAME so it can be used in yypush_parse.
5170 (yyparse or yypush_parse): For yypush_parse, don't print the
5171 "Starting parse" diagnostic for invocations after the first.
5172 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5173 yypush_parse, only do it for the first invocation.
5174 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5175 initialization to occur in yypush_parse but only on the first
5176 invocation.
5177
5178 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5179
5180 * data/push.c: Add CPP guards around push parser declarations in both
5181 the header and the code file.
5182 In the code file, move the push parser declarations to the same place
5183 they appear in the header file.
5184 Clean up the M4 some, especially the inconsistent underquoting in
5185 some b4_c_function_def and b4_c_function_decl uses.
5186
5187 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5188
5189 Encapsulate the push parser state variables into an M4 macro so the
5190 push skeleton doesn't have to list them again for pull mode's yyparse.
5191 For push mode, remove yypush_parse's local equivalents of these
5192 variables to eliminate unnecessary copying between the two sets at
5193 run-time. This patch also fixes at least a bug related to multiple
5194 %initial-action invocations in push mode.
5195 * data/push.c (b4_declare_parser_variables): Rename to...
5196 (b4_declare_scanner_communication_variables): ... this for clarity and
5197 update both uses.
5198 (b4_declare_yyparse_variables): Remove and move its contents to the one
5199 spot where it was invoked.
5200 (b4_declare_parser_state_variables): New macro containing the parser
5201 state variables required by push mode.
5202 (struct yypstate): Replace all fields but yynew with
5203 b4_declare_parser_state_variables.
5204 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5205 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5206 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5207 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5208 parser state variable declarations with
5209 b4_declare_parser_state_variables.
5210 Don't initialize parser state variables when calling yypush_parse since
5211 yypstate_new already does that.
5212 Invoke the user's initial action only upon the first yypush_parse
5213 invocation.
5214 Remove all code that copies between the local parser state variables
5215 and the yypstate.
5216
5217 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5218
5219 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5220 prevent a name collision in a future patch where these names will
5221 sometimes be #define'd.
5222 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5223 since it no longer has the same name as the existing argument.
5224 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5225
5226 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
5227 and Joel E. Denny <jdenny@ces.clemson.edu>
5228
5229 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5230 that the argument is case-insensitive, and there's no `=' here.
5231 For the %skeleton entry, mention that %language is better.
5232 (Bison Options): Likewise for --language and --skeleton. Move the
5233 --skeleton entry so that the `Tuning the parser' section is sorted
5234 alphabetically on long options.
5235 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5236 %language directive in detail here; cross-reference the %language
5237 documentation instead.
5238 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5239 `%require "2.3b"' so that the example is always up-to-date.
5240 (Table of Symbols): Add entries for %language and %skeleton.
5241 * examples/extexi (normalize): Instead of replacing every %require
5242 argument with the current Bison version, just substitute for
5243 `@value{VERSION}'. This guarantees that we're testing what actually
5244 appears in the documentation.
5245 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5246 rather than `@VERSION@'.
5247
5248 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5249
5250 * NEWS: Reword the %language news a bit, and put it earlier.
5251
5252 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5253 Rewrite to simplify the logic.
5254 (language_argmatch): Likewise.
5255 (program_name): We now own this var.
5256 * src/getargs.h (struct bison_language): Use char[] rather than
5257 const char *.
5258
5259 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5260 Java is supported.
5261 * src/complain.c (program_name): Remove decl; no longer needed.
5262 * src/main.c (program_name): Remove; now belongs to getargs.
5263
5264 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
5265
5266 * NEWS: Document %language.
5267
5268 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5269
5270 * data/c-skel.m4, data/c++-skel.m4: New files.
5271 * data/glr.c: Complain on push parsers.
5272
5273 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5274 over %skeleton.
5275 (Decl Summary): Document %language and %skeleton.
5276 (Command line): Document -L.
5277
5278 * examples/extexi: Rewrite %require directive.
5279 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5280
5281 * src/files.c (compute_exts_from_gc): Look in language structure
5282 for .y extension.
5283 (compute_file_name_parts): Check whether .tab should be added.
5284 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5285 (language, skeleton_arg, language_argmatch): New.
5286 (long_options): Add --language.
5287 (getargs): Use skeleton_arg, add -L/--language.
5288 * src/getargs.h: Include location.h.
5289 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5290 * src/output.c (prepare): Pick default skeleton from struct language.
5291 Don't dispatch C skeletons here.
5292 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5293 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5294 * src/scan-gram.l ("%language"): New rule.
5295
5296 * tests/calc.at: Test %skeleton and %language.
5297 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5298 (AT_GLR_IF): Look for %skeleton "glr.cc".
5299 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5300 (AT_YACC_IF): Reject %language.
5301
5302 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5303
5304 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5305 since it wasn't used; only the typedef name 'semantic_type' is needed.
5306 Also, omit trailing white space.
5307
5308 * bootstrap: Sync from coreutils.
5309 (gnulib_extra_files): Add build-aux/announce.gen.
5310 (slurp): Adjust .gitignore files like .cvsignore files.
5311 * build-aux/announce-gen: Remove from CVS, since bootstrap
5312 now creates this.
5313
5314 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5315
5316 Make %push-parser imply %pure-parser. This fixes several bugs; see
5317 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5318 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5319 pure_parser = true.
5320 * data/push.c: Don't bother testing b4_push_if when deciding whether
5321 to expand b4_declare_parser_variables globally.
5322 (yypush_parse): Likewise in here.
5323
5324 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5325 (yy_reduce_print): Reformat M4 for readability.
5326
5327 2006-12-15 Bob Rossi <bob@brasko.net>
5328 and Joel Denny <jdenny@ces.clemson.edu>
5329
5330 * data/push.c (yypstate): Add typedef, and update all uses of
5331 struct yypstate to just yypstate.
5332 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5333
5334 2006-12-14 Bob Rossi <bob@brasko.net>
5335
5336 * data/push.c (yypush_parse): Declare prototype regardless of
5337 %locations option.
5338
5339 2006-12-14 Bob Rossi <bob@brasko.net>
5340
5341 * data/push.c (yyparse): Remove the prototype and the #define when in
5342 push-parser mode.
5343
5344 2006-12-13 Bob Rossi <bob@brasko.net>
5345
5346 * data/push.c (yypstate_init): Rename to...
5347 (yypstate_new): ... this and use b4_c_function_def.
5348 (yypstate_delete): New.
5349 (yypush_parse): Change parameters yynval and yynlloc to be const.
5350 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5351 yypstate_delete functions.
5352
5353 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5354
5355 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5356 strange test case titles. Reported by Bob Rossi.
5357
5358 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5359
5360 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5361 of potential ambiguities in GLR grammers.
5362
5363 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5364
5365 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5366 `bison ', use m4_index instead of m4_substr since chopping up a string
5367 containing M4-special characters causes problems here.
5368
5369 Fix a couple of bugs related to special characters in user-specified
5370 file names, and make it easier for skeletons to compute output file
5371 names with the same file name prefix as Bison-computed output file
5372 names.
5373 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5374 b4_parser_file_name and b4_spec_defines_file instead of
5375 @output_parser_name@ and @output_header_name@, which are now redundant.
5376 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5377 b4_parser_file_name, b4_spec_defines_file, and the new
5378 @basename(FILENAME@) instead of @output_parser_name@ and
5379 @output_header_name@, which inappropriately escaped the file names as
5380 C string literals.
5381 * src/files.c (all_but_ext): Remove static qualifier.
5382 (compute_output_file_names): Move `free (all_but_ext)' to...
5383 (output_file_names_free): ... here since all_but_ext is needed later.
5384 * src/files.h (all_but_ext): Extern.
5385 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5386 exactly what MUSCLE_INSERT_STRING used to do.
5387 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5388 characters are escaped properly.
5389 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5390 all_but_ext.
5391 For pkgdatadir muscle, maintain previous functionality by using
5392 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5393 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5394 digraphs would never be expanded. Hopefully no one has M4-special
5395 characters in his Bison installation path.
5396 * src/scan-skel.l: Don't parse @output_header_name@ and
5397 @output_parser_name@ anymore since they're now redundant.
5398 In @output, use decode_at_digraphs.
5399 Parse a new @basename command that invokes last_component.
5400 (decode_at_digraphs): New.
5401 (BASE_QPUTS): Remove unused.
5402 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5403 (Output file name): New tests.
5404
5405 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5406
5407 Warn about output files that are generated by the skeletons and that
5408 conflict with other output files.
5409 * data/glr.c: Don't generate the header file here when glr.cc does.
5410 * src/files.c (file_names, file_names_count): New static globals.
5411 (compute_output_file_names): Invoke output_file_name_check for files
5412 not generated by the skeletons and remove existing checks.
5413 (output_file_name_check): New function that warns about conflicting
5414 output file names.
5415 (output_file_names_free): Free file_names.
5416 * src/files.h (output_file_name_check): Declare.
5417 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5418 the skeletons.
5419 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5420 (Conflicting output files): New tests.
5421
5422 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5423
5424 * doc/bison.texinfo: Fix a couple of typos.
5425
5426 2006-12-08 Bob Rossi <bob@brasko.net>
5427
5428 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5429 Rename to...
5430 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5431 update all uses.
5432 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5433 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5434 local pv.
5435 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5436 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5437
5438 2006-12-07 Bob Rossi <bob@brasko.net>
5439 and Joel Denny <jdenny@ces.clemson.edu>
5440
5441 * data/push.c (yypvarsinit): Change return type from void* to struct
5442 yypvars*. No longer cast to void* on return.
5443 (struct yypvars): Remove yylen since it need not be remembered between
5444 yypushparse invocations.
5445 (yypushparse): Don't copy between yylen and pv->yylen.
5446
5447 2006-12-05 Bob Rossi <bob@brasko.net>
5448
5449 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5450 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5451 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5452 (struct yypvars): Remove b4_declare_parser_variables.
5453 (yypvarsinit): Remove init code for removed variables.
5454 (global scope): Do not declare b4_declare_parser_variables if
5455 push or pure mode.
5456 (yypushparse): Add b4_declare_parser_variables.
5457 Init new local variables, and remove init code for removed
5458 yypvars variables.
5459 (yyparse): Delete.
5460 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5461 and yyparse for other modes.
5462 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5463 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5464 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5465 (AT_PURE_LEX_IF): True if pure or push parser.
5466
5467 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5468
5469 Document Yacc prologue alternatives and default %destructor's and
5470 %printer's as experimental. Don't mention Java yet. Discussed at
5471 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5472 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5473 (2.3a): Annotate this entry to say the old forms of these features were
5474 also experimental.
5475 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
5476 Table of Symbols): Say they're experimental. Comment out any mention
5477 of Java (we'll want this back eventually).
5478
5479 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5480
5481 Support a file name argument to %defines. Deprecate `=' in
5482 %file-prefix, %name-prefix, and %output. Discussed at
5483 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5484 * NEWS (2.3a+): Mention.
5485 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
5486 form of %defines, and remove `=' from entries for %file-prefix,
5487 %name-prefix, and %output.
5488 * src/parse-gram.y (prologue_declaration): Implement.
5489 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5490 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5491 all but one occurrence of %name-prefix.
5492 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5493 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5494 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5495 occurrence of each of %file-prefix and %output. Add check for %defines
5496 with argument.
5497 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5498 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5499 Remove the `=' from %output.
5500
5501 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5502
5503 Don't escape $ in test case titles since Autoconf 2.61 now does that
5504 correctly.
5505 * tests/actions.at (Default %printer and %destructor are not for error
5506 or $undefined): Here.
5507 (Default %printer and %destructor are not for $accept): Here.
5508 * tests/input.at (Invalid $n and @n): Here.
5509
5510 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5511
5512 Rename <!> to <>. Discussed starting at
5513 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5514 * NEWS (2.3a+): Update.
5515 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
5516 Update.
5517 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5518 * src/scan-gram.l (INITIAL): Implement.
5519 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5520 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5521 comment.
5522 * tests/actions.at (Default tagless %printer and %destructor,
5523 Default tagged and per-type %printer and %destructor,
5524 Default %printer and %destructor are not for error or $undefined,
5525 Default %printer and %destructor are not for $accept,
5526 Default %printer and %destructor for mid-rule values): Update.
5527 * tests/input.at (Default %printer and %destructor redeclared,
5528 Unused values with default %destructor): Update.
5529
5530 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
5531
5532 Don't let %prec take a nonterminal.
5533 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5534 token.
5535 * tests/input.at (%prec takes a token): New test checking that %prec
5536 won't take a nonterminal.
5537
5538 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5539
5540 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5541 it was double-quoted.
5542 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5543 grammar is maintained with Bison's highest standards.
5544 * src/getargs.c: Fix some typos in Doxygen comments.
5545
5546 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5547
5548 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5549 later. Reported by Paul Eggert in
5550 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5551 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5552 * src/scan-code.l (translate_action): Don't bother invoking
5553 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5554 (code_scanner_free): Instead of invoking
5555 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5556 which frees more.
5557 * src/scan-gram.l (gram_scanner_free): Likewise.
5558 * src/scan-skel.l (scan_skel): Likewise.
5559
5560 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5561
5562 * src/files.c (tr): Change return type to void.
5563 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5564 has been called previously for the same key.
5565 (muscle_find): Return storage instead of value so that
5566 --enable-gcc-warnings doesn't produce warnings that the return discards
5567 const. aver that the value and storage are the same since storage
5568 could potentially be NULL when value is not.
5569 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5570 same as 0.
5571
5572 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5573
5574 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5575 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5576 us a slightly cleaner distribution, and also works.
5577 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5578 gnulib changes.
5579
5580 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5581 and Paul Eggert <eggert@cs.ucla.edu>
5582
5583 Don't let Bison leak memory except when it complains.
5584 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5585 (spec_defines_file, dir_prefix): Now char *, not const char *,
5586 since they are freed.
5587 * src/files.c: Likewise.
5588 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5589 Likewise.
5590 (tr): Now operates in-place. All uses changed.
5591 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5592 values.
5593 (compute_file_name_parts, compute_output_file_names): Don't store
5594 read-only data in variables that will be freed.
5595 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5596 src_extension, and header_extension.
5597 (output_file_names_free): New public function to free
5598 spec_verbose_file, spec_graph_file, spec_defines_file,
5599 parser_file_name, and dir_prefix.
5600 * src/getargs.c (getargs): Don't store read-only data in variables that
5601 will be freed.
5602 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5603 (which previously existed but was unused), and quotearg_free.
5604 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5605 * src/muscle_tab.c: Likewise.
5606 (muscle_entry): Make the value char const *,
5607 and add a new storage member that is char * and can be freed.
5608 (muscle_entry_free): New private function.
5609 (muscle_init): Use it instead of free.
5610 (muscle_insert, muscle_grow): Update and use new storage member.
5611 (muscle_code_grow): Free the string passed to muscle_grow
5612 since it's not needed anymore.
5613 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5614 add a new `char *code' member.
5615 ("{...}"): Declare semantic type as code.
5616 * src/scan-code.h (translate_rule_action):
5617 (translate_symbol_action, translate_code, translate_action): Return
5618 `char const *' rather than `char *' since external code should not free
5619 these strings.
5620 * src/scan-code.l: Likewise.
5621 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5622 which is "{...}" in the parser.
5623 * tests/Makefile.am (maintainer-check-valgrind): Set
5624 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5625 Valgrind.
5626 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5627 complain.
5628 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5629 expecting a non-zero exit status sets --leak-check=summary and
5630 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5631 this case, and we don't want to hear about it.
5632
5633 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5634
5635 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5636 instead of from the template, to simplify configuration a bit.
5637 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5638 and m4/wint_t.m4, as they are needed with the latest gnulib.
5639
5640 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5641
5642 Disable unset/unused mid-rule value warnings by default, and recognize
5643 --warnings=midrule-values to enable them. Discussed starting at
5644 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5645 * NEWS (2.3a+): Mention.
5646 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5647 warnings): Add entry for midrule-values subargument.
5648 * src/reader.c (symbol_should_be_used): Don't return true just because
5649 the value is a set/used mid-rule value unless
5650 --warnings=midrule-values was specified.
5651 * tests/input.at (Unused values, Unused values before symbol
5652 declarations): Run tests with and without --warnings=midrule-values.
5653
5654 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5655 than LIST_FREE directly.
5656
5657 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5658
5659 Finish implementing --warnings=error, which should not be implied by
5660 --warnings=all (or by its synonyms -W and --warnings without
5661 subarguments).
5662 * src/complain.c (set_warning_issued): New function to report that
5663 warnings are being treated as errors and to record an error if so.
5664 Invoke...
5665 (warn_at, warn): ... here.
5666 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5667 "error - warnings are errors" does not appear above "all - all of the
5668 above".
5669 (getargs): For -W and --warnings without subarguments, don't let
5670 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5671 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5672
5673 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5674
5675 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5676 empty subargument list. For example: `bison --warnings= parser.y'.
5677
5678 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5679
5680 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5681 the parser header file so that gcc doesn't warn.
5682
5683 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5684
5685 Split the default %destructor/%printer into two kinds: <*> and <!>.
5686 Discussed starting at
5687 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5688 * NEWS (2.3a+): Mention.
5689 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5690 previous change today related to mid-rules.
5691 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
5692 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
5693 (TYPE_TAG_ANY): Add as <*>.
5694 (TYPE_TAG_NONE): Add as <!>.
5695 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5696 for <*> and <!>.
5697 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5698 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5699 * src/symlist.c (symbol_list_default_new): Split into tagged and
5700 tagless versions.
5701 (symbol_list_destructor_set, symbol_list_printer_set): Split
5702 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5703 SYMLIST_DEFAULT_TAGLESS.
5704 * src/symlist.h: Update symbol_list_default*_new prototypes.
5705 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5706 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5707 * src/symtab.c (default_destructor, default_destructor_location,
5708 default_printer, default_printer_location): Split each into tagged and
5709 tagless versions.
5710 (symbol_destructor_get, symbol_destructor_location_get,
5711 symbol_printer_get, symbol_printer_location_get): Implement tagged
5712 default and tagless default cases.
5713 (default_destructor_set, default_printer_set): Split each into tagged
5714 and tagless versions.
5715 * src/symtab.h: Update prototypes.
5716 * tests/actions.at (Default %printer and %destructor): Rename to...
5717 (Default tagless %printer and %destructor): ... this, and extend.
5718 (Per-type %printer and %destructor): Rename to...
5719 (Default tagged and per-type %printer and %destructor): ... this, and
5720 extend.
5721 (Default %printer and %destructor for user-defined end token): Extend.
5722 (Default %printer and %destructor are not for error or $undefined):
5723 Update.
5724 (Default %printer and %destructor are not for $accept): Update.
5725 (Default %printer and %destructor for mid-rule values): Extend.
5726 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5727 (Unused values with default %destructor): Extend.
5728
5729 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5730
5731 Don't apply the default %destructor/%printer to an unreferenced midrule
5732 value. Mentioned at
5733 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5734 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5735 like $@n instead of just @n so that the default %destructor/%printer
5736 logic doesn't see them as user-defined symbols.
5737 (symbol_is_dummy): Check for both forms of the name.
5738 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5739 name for which the midrule value is referenced in any action.
5740 * tests/actions.at (Default %printer and %destructor for mid-rule
5741 values): New test.
5742 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5743 for change to dummy symbol names.
5744
5745 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5746
5747 Warn about unset midrule $$ if the corresponding $n is used.
5748 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5749 $n usage.
5750 (packgram): Before invoking grammar_rule_check on any rule, make sure
5751 all actions have already been scanned in order to set `used' flags.
5752 Otherwise, checking that a midrule's $$ is set will not always work
5753 properly because the midrule check must forward-reference the midrule's
5754 parent rule.
5755 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5756 warning.
5757
5758 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5759
5760 More improvements to the documentation of the prologue alternatives:
5761 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5762 Bison manual.
5763 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5764 some text to clarify the relative importance of the new directives and
5765 to show how these directives may be viewed as code labels.
5766
5767 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5768
5769 Similar to the recently removed %before-header, add %code-top as the
5770 alternative to the pre-prologue. Mentioned at
5771 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5772 Also, let the prologue alternatives appear in the grammar section.
5773 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5774 (prologue_declaration): Move the existing prologue alternatives to...
5775 (grammar_declaration): ... here and add %code-top.
5776 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5777
5778 Clean up and extend documentation for the prologue alternatives.
5779 * NEWS (2.3a+): Describe prologue alternatives.
5780 * doc/bison.texinfo (Prologue): Move discussion of prologue
5781 alternatives to...
5782 (Prologue Alternatives): ... this new section, and extend it to discuss
5783 all 4 directives in detail.
5784 (Table of Symbols): Clean up discussion of prologue alternatives and
5785 add %code-top.
5786
5787 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5788
5789 DJGPP specific issues.
5790
5791 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5792 config.bat accordingly.
5793 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5794 * djgpp/config.site: Likewise.
5795
5796 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
5797
5798 Replace %*-header with %provides, %requires, %code. See discussion at
5799 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5800
5801 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5802 (b4_user_start_header): Remove.
5803 * data/glr.c: Use new macros instead of b4_*start_header
5804 and b4_*end_header.
5805 * data/glr.cc: Likewise.
5806 * data/lalr1.cc: Likewise.
5807 * data/push.c: Likewise.
5808 * data/yacc.c: Likewise.
5809
5810 * doc/bison.texinfo: Remove %before-header, rename
5811 %{start,end,after}-header to %requires, %provides, %code.
5812
5813 * src/parse-gram.y: Likewise (also rename token names accordingly).
5814 * src/scan-gram.l: Likewise.
5815 * tests/actions.at: Likewise.
5816
5817 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5818
5819 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5820 Problem reported by Joel E. Denny.
5821
5822 2006-10-14 Jim Meyering <jim@meyering.net>
5823
5824 (Sync from coreutils.)
5825 Work also when the working directory (with e.g. coreutils sources)
5826 is version controlled with git, rather than CVS.
5827 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5828 rather than CVS.
5829 In messages and comments, say e.g., "checked-out sources",
5830 rather than "CVS sources".
5831 (version_controlled_file): New function. Work for git as well as
5832 for CVS. Don't use grep's -q option.
5833 (slurp): Call it here, in place of CVS-specific code.
5834
5835 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5836
5837 Fix testsuite for ./configure --enable-gcc-warnings:
5838 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5839 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5840 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5841 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5842 * test/regression.at (Diagnostic that expects two alternatives):
5843 Likewise.
5844
5845 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5846
5847 * bootstrap.conf (gnulib_modules): Add config-h.
5848 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5849 worry about HAVE_CONFIG_H.
5850 * lib/abitset.c: Likewise.
5851 * lib/bitset.c: Likewise.
5852 * lib/bitset_stats.c: Likewise.
5853 * lib/bitsetv-print.c: Likewise.
5854 * lib/bitsetv.c: Likewise.
5855 * lib/ebitset.c: Likewise.
5856 * lib/get-errno.c: Likewise.
5857 * lib/lbitset.c: Likewise.
5858 * lib/subpipe.c: Likewise.
5859 * lib/timevar.c: Likewise.
5860 * lib/vbitset.c: Likewise.
5861 * lib/bitset.c: Include "bitset.h" first, to test interface.
5862 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5863 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5864 * lib/bitsetv.c: Include "bitsetv.h" first.
5865 * lib/get-errno.c: Include "get-errno.h" first.
5866 * m4/.cvsignore: Add config-h.m4.
5867 * tests/actions.at (Default %printer and %destructor for ...):
5868 Adjust expected line numbers in output to reflect removal of #if
5869 HAVE_CONFIG_H lines.
5870 * tests/glr-regression.at (Missed %merge type warnings when ...):
5871 Likewise.
5872 * tests/regression.at (Braced code in declaration in rules section):
5873 Likewise.
5874 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5875 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5876 Include <config.h> unconditionally.
5877
5878 * bootstrap: Sync from coreutils, as follows:
5879
5880 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5881
5882 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5883 variable was sometimes used without being initialized. This
5884 messed up the installation of the INSTALL file in some cases.
5885
5886 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5887
5888 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5889 --copy. Inspired by a suggestion from Bruno Haible.
5890
5891 2006-10-03 Jim Meyering <jim@meyering.net>
5892
5893 * bootstrap: Undo last change to this file, since now gnulib-tool
5894 sticks with the automake default in generating dependencies.
5895
5896 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5897
5898 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5899 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5900
5901 * doc/bison.1: Add copyright notice.
5902
5903 * data/glr.c: Don't include <stdarg.h>; not used.
5904
5905 * NEWS: The -g and --graph options now output graphs in Graphviz
5906 DOT format, not VCG format.
5907 * doc/bison.1: Likewise.
5908 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
5909 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5910 of this change in
5911 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
5912 * TODO: Remove Graphviz entry.
5913 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5914 remove vcg.c, vcg.h, vcg_defaults.h.
5915 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5916 * src/graphviz.c, src/graphviz.h: New files.
5917 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5918 * src/files.h: Make comment more generic.
5919 * src/main.c (main): Likewise.
5920 * src/print_graph.h: Likewise.
5921 * src/getargs.c (usage): Make usage description more generic.
5922 * src/print_graph.c: Include graphviz.h rather than vcg.h.
5923 (static_graph, fgraph): Remove. All uses changed to pass
5924 arguments instead of sharing a static var.
5925 (print_core, print_actions, print_state, print_graph):
5926 Output graphviz format rather than VCG format.
5927 * tests/.cvsignore: Remove *.vcg; add *.dot.
5928 * tests/output.at: Expect *.dot files, not *.vcg files.
5929
5930 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
5931 accommodates the 2006-10-08 change.
5932
5933 2006-10-11 Bob Rossi <bob@brasko.net>
5934
5935 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
5936 (b4_yyssa, b4_yyerror_range): New macros.
5937 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
5938 (yypvarsinit): Remove init of removed fields.
5939 (yypushparse): Remove use of removed fields; use new macros instead.
5940
5941 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5942
5943 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
5944 in a push parser. Reindent slightly to match yacc.c better.
5945
5946 2006-10-11 Bob Rossi <bob@brasko.net>
5947
5948 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
5949 yymsg_alloc fields.
5950 (yypvarsinit, yypushparse): Remove init of removed fields.
5951 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
5952
5953 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5954
5955 * THANKS: Add Paolo Bonzini and Bob Rossi.
5956
5957 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
5958
5959 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
5960 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
5961 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
5962 b4_define_user_cde and uses): Remove.
5963 (b4_comment, b4_prefix, b4_sync_start): New.
5964 * data/bison.m4: New file, with most of the content removed from c.m4.
5965 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
5966 * src/output.c (output_skeleton): Pass bison.m4.
5967 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
5968 only if specified.
5969
5970 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
5971
5972 Fix test failure reported by Tom Lane in
5973 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
5974 and try to make such failures easier to catch in the future.
5975 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
5976 that's now the caller's responsibility.
5977 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
5978 Set yychar = YYEOF if it's negative.
5979 * tests/actions.at (yylex): Abort if asked to read past EOF.
5980 * tests/conflicts.at (yylex): Likewise.
5981 * tests/cxx-type.at (yylex): Likewise.
5982 * tests/glr-regression.at (yylex): Likewise.
5983 * tests/input.at (yylex): Likewise.
5984 * tests/regression.at (yylex): Likewise.
5985 * tests/torture.at (yylex): Likewise.
5986
5987 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
5988
5989 Fix problems with translating English-language diagnostics.
5990 * bootstrap: Fix bug introduced in recent bootstrap changes, with
5991 respect to bison-runtime pot generation. The YY_ stuff
5992 wasn't being captured.
5993 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
5994 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
5995 * runtime-po/POTFILES.in: Add data/push.c.
5996
5997 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5998
5999 Merge bootstrap changes from coreutils.
6000
6001 2006-09-28 Jim Meyering <jim@meyering.net>
6002
6003 Automatically generated dependencies are important even
6004 when all of the sources in a directory come from gnulib.
6005 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6006 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6007
6008 2006-09-23 Jim Meyering <jim@meyering.net>
6009
6010 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6011
6012 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6013
6014 * bootstrap: Add support for --force.
6015 (usage): New function. Describe usage less tersely.
6016 (CVS_only_file): New var.
6017
6018 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6019
6020 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6021 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6022 Adjust white space and comments to match GNU style better.
6023
6024 2006-09-20 Bob Rossi <bob@brasko.net>
6025
6026 * data/push.c (yyresult_get): Remove function.
6027 (YYPUSH_MORE): Add #define.
6028 (yypushparse): Modify return value.
6029
6030 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6031
6032 * stamp-h.in: Remove; no longer needed.
6033 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6034 Remove config.h, config.hin, intl (no longer created).
6035 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6036 stamp-h1.
6037
6038 Sync bootstrap from coreutils, as follows:
6039
6040 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6041
6042 * bootstrap (symlink_to_gnulib): New function.
6043 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6044 to copies-of-gnulib.
6045 (cp_mark_as_generated, slurp, gnulib_files):
6046 Avoid making a copy if it's the same as the old version.
6047 (gnulib_files): Add support for this variable (used by Bison).
6048
6049 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6050
6051 * src/getargs.c (usage): Rework to use conventions similar to
6052 coreutils, to make translation a bit easier and the code a bit
6053 smaller. Problem reported by Tim Van Holder.
6054
6055 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6056
6057 Use some of gnulib's new modules, taken from coreutils.
6058
6059 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6060 * bootstrap.conf: New file.
6061 (gnulib_modules): Add configmake, inttypes, unistd.
6062 (XGETTEXT_OPTIONS): Add complain, complain_at,
6063 fatal, fatal_at, warn, warn_at, unexpected_end.
6064 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6065 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6066 (gl_EARLY): Add.
6067 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6068 (gl_INIT): Add
6069 (GNULIB_AUTOCONF_SNIPPET): Remove.
6070 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6071 the pickiest.
6072 * lib/.cvsignore: Add inttypes_.h.
6073 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6074 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6075 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6076 no-longer-necessary initializations.
6077 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6078 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6079 use the unistd module.
6080 * src/system.h: Likewise.
6081 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6082 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6083 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6084 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6085 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6086 * src/system.h: Include inttypes.h unconditionally, now that we
6087 use the inttypes module. Don't bother to include stdint.h, since
6088 inttypes.h now does that for us.
6089 (LOCALEDIR): Remove, now that we use the configmake module.
6090 * src/getargs.c: Include configmake.h.
6091 * src/main.c: Likewise.
6092 * src/output.c: Likewise.
6093 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6094 not from $abs_top_builddir, since config.h moved.
6095
6096
6097 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6098 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6099
6100 * src/parse-gram.y (symbol_declaration): Don't put statements
6101 before declarations; it's not portable to C89.
6102 * src/scan-code.l (handle_action_at): Likewise.
6103
6104 * src/scan-code.l: Always initialize braces_level; the old code
6105 left it uninitialized and therefore had undefined behavior.
6106
6107 Don't attempt to redefine 'assert', since it runs afoul of
6108 systems where standard headers (mistakenly) include <assert.h>.
6109 Instead, define and use our own alternative, called 'aver'.
6110 * src/reader.c: Don't include assert.h, since we no longer
6111 use assert.
6112 * src/scan-code.l: Likewise.
6113 * src/system.h (assert): Remove, replacing with....
6114 (aver): New function, taking a bool arg. All uses changed.
6115 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6116 not merely an integer.
6117
6118 2006-09-15 Bob Rossi <bob@brasko.net>
6119
6120 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6121 * data/c.m4 (YYPUSH): New.
6122 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6123 * src/getargs.c (push_parser): New var.
6124 * src/getargs.h (push_parser): New declaration.
6125 * src/output.c (prepare): Add macro insertion of `push_flag'.
6126 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6127 (prologue_declaration): Parse %push-parser.
6128 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6129 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6130 list of removed lines from the traces observed.
6131 (AT_CHECK_CALC_LALR): Added push parser tests.
6132
6133 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6134
6135 * NEWS: Version 2.3a.
6136 * configure.ac (AC_INIT): Likewise.
6137
6138 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6139 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6140 due to header ordering dependencies. I don't know why the #define
6141 was there.
6142
6143 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6144 runtime cost when YYDEBUG is not defined, and so that some tests
6145 that used to fail now work. Problem and initial suggestion by
6146 Paolo Bonzini.
6147 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6148 * data/glr.cc (b4_parser_class_name):
6149 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6150 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6151 (yydebug_) [YYDEBUG]: New member.
6152 (yycdebug_): Now defined only if YYDEBUG.
6153 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6154 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6155 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6156 if YYYDEBUG.
6157 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6158 Define only if YYDEBUG.
6159 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6160 set_debug_level.
6161 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6162 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6163 AT_CHECK_CALC_GLR_CC that are working now.
6164
6165 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6166
6167 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6168 We don't need them in glr.cc, and glr.c defines them.
6169 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6170 assumes that defining it to anything is the same as defining
6171 it to 1. Problem reported by Paolo Bonzini.
6172
6173 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6174
6175 * data/c.m4 (b4_null, b4_case): Define.
6176 * src/output.c (prepare_symbols): Use b4_null.
6177 (user_actions_output): Use b4_case.
6178
6179 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6180
6181 * data/glr.c (b4_shared_declarations): Put start-header first,
6182 before any #includes that we generate, so that feature-test
6183 macros work. Problem reported by Michael Deutschmann in
6184 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6185 * data/lalr1.cc: Likewise.
6186 * doc/bison.texinfo (Prologue): Document that feature-test macros
6187 should be defined before any Bison declarations.
6188 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6189 that depend on location.hh after, not before, Bison decls, since
6190 we now include location.hh after the first user prologue.
6191
6192 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6193 Sander Brandenburg in
6194 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6195 Also, fix minor white space and comment issues.
6196 (Prologue): Mention that it's better to define feature-test macros
6197 before Bison declarations. Problem reported by Michael Deutschmann.
6198
6199 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6200 by Jim Meyering.
6201 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6202 This adjusts to recent gnulib changes.
6203
6204 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6205
6206 Finish implementation of per-type %destructor/%printer. Discussed
6207 starting at
6208 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6209 and
6210 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6211 * NEWS (2.3+): Add a description of this feature to the default
6212 %destructor/%printer description.
6213 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6214 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6215 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6216 list node contains a semantic type.
6217 * src/symtab.c, src/symtab.h: Extend with a table that associates
6218 semantic types with their %destructor's and %printer's.
6219 (semantic_type_from_uniqstr, semantic_type_get,
6220 semantic_type_destructor_set, semantic_type_printer_set): New functions
6221 composing the public interface of that table.
6222 (symbol_destructor_get, symbol_destructor_location_get,
6223 symbol_printer_get, symbol_printer_location_get): If there's no
6224 per-symbol %destructor/%printer, look up the per-type before trying
6225 the default.
6226 * tests/actions.at (Per-type %printer and %destructor): New test case.
6227 * tests/input.at (Default %printer and %destructor redeclared):
6228 Extend to check that multiple occurrences of %symbol-default in a
6229 single %destructor/%printer declaration is an error.
6230 (Per-type %printer and %destructor redeclared, Unused values with
6231 per-type %destructor): New test cases.
6232
6233 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6234
6235 Require default %destructor/%printer to be declared using
6236 %symbol-default instead of an empty symbol list, and start working on
6237 new per-type %destructor/%printer. Discussed at
6238 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6239 * NEWS (2.3+): Add %symbol-default to example.
6240 * bison.texinfo (Freeing Discarded Symbols): Likewise.
6241 (Table of Symbols): Add entry for %symbol-default.
6242 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6243 (generic_symlist, generic_symlist_item): New nonterminals for creating
6244 a list in which each item is a symbol, semantic type, or
6245 %symbol-default.
6246 (grammar_declaration): Use generic_symlist in %destructor and %printer
6247 declarations instead of symbols.1 or an empty list.
6248 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6249 for changes to symbol_list.
6250 * src/reader.c: Update for changes to symbol_list.
6251 * src/scan-code.l: Likewise.
6252 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6253 * src/symlist.c, src/symlist.h: Extend such that a list node may
6254 represent a semantic type or a %symbol-default in addition to just an
6255 ordinary symbol. Add switched functions for setting %destructor's and
6256 %printer's.
6257 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6258 %destructor/%printer declarations.
6259
6260 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6261
6262 Whether the default %destructor/%printer applies to a particular symbol
6263 isn't a question of whether the user *declares* that symbol (in %token,
6264 for example). It's a question of whether the user by any means
6265 *defines* the symbol at all (by simply using a char token, for
6266 example). $end is defined by Bison whereas any other token with token
6267 number 0 is defined by the user. The error token is always defined by
6268 Bison regardless of whether the user declares it with %token, but we
6269 may one day let the user define error as a nonterminal instead.
6270 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6271 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6272 the meaning of "user-defined".
6273 * tests/actions.at (Default %printer and %destructor for user-declared
6274 end token): Rename to...
6275 (Default %printer and %destructor for user-defined end token): ...
6276 this.
6277
6278 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6279 computation of whether to apply the default, don't maintain a list of
6280 every Bison-defined symbol. Instead, just check for a first character
6281 of '$', which a user symbol cannot have, and check for the error token.
6282
6283 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6284
6285 Don't apply the default %destructor or %printer to the error token,
6286 $undefined, or $accept. This change fits the general rule that the
6287 default %destructor and %printer are only for user-declared symbols,
6288 and it solves several difficulties that are described in the new test
6289 cases listed below.
6290 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6291 * tests/actions.at (Default %printer and %destructor are not for error
6292 or $undefined, Default %printer and %destructor are not for $accept):
6293 New test cases.
6294
6295 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6296
6297 Allow %start after the first rule.
6298 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6299 when parsing the first rule.
6300 (check_and_convert_grammar): Search for it here after all grammar
6301 declarations have been parsed. Skip midrules, which have dummy LHS
6302 nonterminals.
6303 * src/symtab.c (symbol_is_dummy): New function.
6304 * src/symtab.h (symbol_is_dummy): Declare it.
6305 * tests/input.at (%start after first rule): New test.
6306
6307 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6308
6309 Redo some of the previous commit: add back the ability to use
6310 non-aliased/undeclared string literals since it might be useful to
6311 those declaring %token-table.
6312 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6313 commit: don't worry about complaints from symbols_pack.
6314 * src/symtab.c (symbol_new, symbol_class_set,
6315 symbol_check_alias_consistency): Undo changes in previous commit: count
6316 each string literal as a new symbol and token, assign it a symbol
6317 number, and don't complain about non-aliased string literals.
6318 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6319 and token counts but does still set aliased tokens to the same number,
6320 symbol_pack_processor now leaves empty slots in the symbols array.
6321 Remove those slots.
6322 * tests/regression.at (Undeclared string literal): Remove test case
6323 added in previous commit since non-aliased string literals are allowed
6324 again.
6325 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6326 remove unnecessary string literal declarations.
6327 * tests/sets.at (Firsts): Likewise.
6328
6329 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6330
6331 Don't allow an undeclared string literal, but allow a string literal to
6332 be used before its declaration.
6333 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6334 symbols_pack complained.
6335 * src/symtab.c (symbol_new): Don't count a string literal as a new
6336 symbol.
6337 (symbol_class_set): Don't count a string literal as a new token, and
6338 don't assign it a symbol number since symbol_make_alias does that.
6339 (symbol_make_alias): It's not necessary to decrement the symbol and
6340 token counts anymore. Don't assume that an alias declaration occurs
6341 before any uses of the identifier or string, and thus don't assert that
6342 one of them has the highest symbol number so far.
6343 (symbol_check_alias_consistency): Complain if there's a string literal
6344 that wasn't declared as an alias.
6345 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6346 symbol_pack asserts that every token has been assigned a symbol number
6347 although undeclared string literals have not.
6348 * tests/regression.at (String alias declared after use, Undeclared
6349 string literal): New test cases.
6350 (Characters Escapes, Web2c Actions): Declare string literals as
6351 aliases.
6352 * tests/sets.at (Firsts): Likewise.
6353
6354 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6355
6356 In the grammar scanner, STRING_FINISH unclosed constructs and return
6357 them to the parser in order to improve error messages.
6358 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6359 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6360 * tests/input.at (Unclosed constructs): New test case.
6361 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6362 seen.
6363
6364 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6365 unused global.
6366
6367 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6368
6369 Handle string aliases for character tokens correctly.
6370 * src/symtab.c (symbol_user_token_number_set): If the token has an
6371 alias, check and set its alias's user token number instead of its own,
6372 which is set to indicate the alias. Previously, every occurrence of
6373 the character token in the grammar overwrote that alias indicator with
6374 the character code.
6375 * tests/input.at (String aliases for character tokens): New test.
6376
6377 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6378
6379 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6380
6381 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6382
6383 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6384 to prevent failures when building on older platforms.
6385 Check for autopoint failure.
6386 Set XGETTEXT_OPTIONS to values that check for C format strings,
6387 so that translators are warned about them (this also helps
6388 prevent core dumps).
6389
6390 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6391 function, since it simplifies our code a bit.
6392
6393 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6394 rather than -W, so we don't get bogus warnings about sign comparisons.
6395 Add -Wpointer-arith, since that warning is useful (it reports code
6396 that does not conform to C89 and that some compilers reject).
6397 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6398 since it's no longer needed.
6399
6400 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6401
6402 Clean up scanners a bit.
6403 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6404 definitions so gcc won't warn when obstack_for_string is unused.
6405 * src/scan-code.l: config.h and system.h are already #include'd by
6406 scan-code-c.c, so get rid of them here.
6407 * src/scan-gram.l: Likewise.
6408 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6409 definitions rather than duplicating the rest of it.
6410 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6411
6412 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6413
6414 Suppress signed/unsigned comparison warnings for yycheck.
6415 * data/c.m4 (b4_safest_int_type): New macro.
6416 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6417 a signed int type, cast it to b4_safest_int_type first.
6418 * data/yacc.c: Likewise.
6419 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6420 also overwritten.
6421
6422 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6423
6424 * doc/bison.texinfo: Fix some typos.
6425
6426 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6427
6428 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6429 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6430
6431 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6432 the latest gnulib does this a different way.
6433 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6434 translation was patched, so stop omitting it.
6435
6436 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6437
6438 Enable declaration of default %printer/%destructor. Make the parser
6439 use these for all user-declared grammar symbols for which the user does
6440 not declare a specific %printer/%destructor. Thus, the parser uses it
6441 for token 0 if the user declares it but not if Bison generates it as
6442 $end. Discussed starting at
6443 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6444 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6445 and
6446 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6447 * NEWS (2.3+): Mention.
6448 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6449 declare a %destructor for a mid-rule's semantic value. It's just
6450 impossible to declare one specific to it.
6451 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6452 code. Describe default %destructor form.
6453 * src/parse-gram.y (grammar_declaration): Parse default
6454 %printer/%destructor declarations.
6455 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6456 and symbol_destructor_location_get rather than accessing the destructor
6457 and destructor_location members of struct symbol.
6458 (symbol_printers_output): Likewise but for %printer's.
6459 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6460 again.
6461 * src/symtab.c (default_destructor, default_destructor_location,
6462 default_printer, default_printer_location): New static global
6463 variables to record the default %destructor and %printer.
6464 (symbol_destructor_get, symbol_destructor_location_get,
6465 symbol_printer_get, symbol_printer_location_get): New functions to
6466 compute the appropriate %destructor and %printer for a symbol.
6467 (default_destructor_set, default_printer_set): New functions to set the
6468 default %destructor and %printer.
6469 * src/symtab.h: Prototype all those new functions.
6470 * tests/actions.at (Default %printer and %destructor): New test to
6471 check that the right %printer and %destructor are called, that they're
6472 not called for $end, and that $$ and @$ work correctly.
6473 (Default %printer and %destructor for user-declared end token): New
6474 test to check that the default %printer and %destructor are called for
6475 a user-declared end token.
6476 * tests/input.at (Default %printer and %destructor redeclared, Unused
6477 values with default %destructor): New tests to check related grammar
6478 warnings and errors.
6479
6480 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6481
6482 Clean up handling of %destructor for the end token (token 0).
6483 Discussed starting at
6484 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6485 and
6486 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6487
6488 Make the skeletons consistent in how they pop the end token and invoke
6489 its %destructor.
6490 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6491 state, which has token number 0, since this would invoke the
6492 %destructor for the end token.
6493 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6494 until after shifting the end token, or else it won't be popped.
6495 * data/yacc.c (yyparse): Likewise.
6496
6497 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6498 it's the end token. Upon termination, destroy an unshifted lookahead
6499 even when it's the end token.
6500 * data/lalr1.cc (yy::parser::parse): Likewise.
6501 * data/yacc.c (yyparse): Likewise.
6502
6503 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6504 value warnings for the end token when the user gives the end token a
6505 %destructor.
6506
6507 * tests/actions.at (Printers and Destructors): Test all the above.
6508
6509 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6510
6511 Update to latest gnulib and gettext versions.
6512 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6513 Add fopen-safer.
6514 (gnulib_files): Add m4/warning.m4. Don't worry about files
6515 overwritten by autopoint.
6516 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6517 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6518 rejects them.
6519 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6520 so that we can remove the intl files at a better time.
6521 (intl_files_to_remove): Remove aclocal.m4, since it gets
6522 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6523 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6524 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6525 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6526 Remove datarootdir hack; no longer needed.
6527 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6528 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6529 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6530 strdup.h.
6531 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6532 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6533
6534 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
6535
6536 * bootstrap: Adjust to today's change to gnulib-tool by invoking
6537 it with --assume-autoconf='latest-stable'.
6538
6539 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
6540
6541 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6542 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6543 YYSTYPE' and `{'.
6544 * src/muscle_tab.h (muscle_grow): Replace the header comments with
6545 those from muscle_tab.c since the old ones are misleading.
6546
6547 2006-07-13 Akim Demaille <akim@epita.fr>
6548
6549 Support %define "KEY" {VALUE}.
6550 * src/scan-code.h, src/scan-code.l (translate_action)
6551 (translate_rule_action, translate_symbol_action, translate_code):
6552 Return char *, not const char *.
6553 * src/parse-gram.y (declaration): Rename as...
6554 (prologue_declaration): this.
6555 (string_content): Remove this nonterminal, use STRING.
6556 (braceless, content, content.opt): New nonterminal.
6557 Use them.
6558 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6559 as value.
6560 * src/scan-gram.l (getargs.h): Don't include it.
6561
6562 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
6563
6564 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6565 rather than a for-loop that declares a local bool variable. This
6566 should work around a compatibility problem with a Cray x1e C++
6567 compiler reported by Hung Nguyen in
6568 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6569 The for-loop was introduced in the 2004-11-17 change but I don't
6570 know why it was needed.
6571
6572 2006-07-12 Akim Demaille <akim@epita.fr>
6573
6574 * data/c.m4: Comment changes.
6575
6576 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
6577
6578 * src/complain.c (error_message, ERROR_MESSAGE): New.
6579 To factor...
6580 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6581 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6582
6583 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6584
6585 * NEWS: Instead of %union, you can define and use your own union type
6586 YYSTYPE if your grammar contains at least one <type> tag.
6587 Your YYSTYPE need not be a macro; it can be a typedef.
6588 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6589 (Union Decl, Decl Summary): Document this.
6590 * data/glr.c (YYSTYPE): Implement this.
6591 * data/glr.cc (YYSTYPE): Likewise.
6592 * data/lalr1.cc (YYSTYPE): Likewise.
6593 * data/yacc.c (YYSTYPE): Likewise.
6594 * src/output.c (prepare): Output tag_seen_flag.
6595 * src/parse-gram.y (declaration, grammar_declaration):
6596 Use 'union_seen' rather than 'typed' to determine whether
6597 %union has been seen, since grammars can now be typed without
6598 %union.
6599 (symbol_declaration, type.opt, symbol_def):
6600 Keep track of whether a tag has been seen.
6601 * src/reader.c (union_seen, tag_seen): New vars.
6602 (typed): remove.
6603 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6604 * src/scan-code.l (untyped_var_seen): New variable.
6605 (handle_action_dollar): Adjust to above changes.
6606 (handle_action_dollar, handle_action_at):
6607 Improve overflow checking for outlandish numbers.
6608 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6609 avoid new diagnostics generated by above changes.
6610 * tests/regression.at (YYSTYPE typedef): Add test to check
6611 for type tags without %union.
6612
6613 * src/symlist.c (symbol_list_length): Return int, not unsigned
6614 int, since callers expect int. This may need to get revisited
6615 once we have proper integer overflow checking.
6616
6617 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6618 object is now static.
6619
6620 * src/getargs.c (flags_argmatch): Return void, not int,
6621 to pacify ./configure --enable-gcc-warnings.
6622
6623 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6624 since last_string is already defined to FLEX_PREFIX (last_string).
6625
6626 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6627
6628 Implement --warnings/-W.
6629 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6630 replaced by...
6631 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6632 Adjust callers.
6633 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6634 (warnings_args, warnings_types): New.
6635 (getargs, short_options, long_options): Accept -W/--warnings.
6636 Sort the options by alphabetical order, upper case letter right
6637 before its lower case.
6638
6639 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6640
6641 Change %merge result type clash warnings to errors. Discussed at
6642 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6643 * src/reader.c (record_merge_function_type): Use complain_at.
6644 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6645 declared later): Update test case results.
6646
6647 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6648
6649 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6650 to be in alphabetical order.
6651 (trace_args): Spelling fixes.
6652
6653 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6654
6655 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6656 so they don't collide with user-defined macros.
6657 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6658 this was never guaranteed, and now that we're using gnulib stdint,
6659 which defines int_fast16_t to long int, the problem is exposed.
6660
6661 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6662
6663 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6664 need the full POSIX semantics (and weren't implementing them
6665 anyway).
6666
6667 Adjust to Autoconf 2.60 and today's gnulib.
6668 * bootstrap (gnulib_modules): Add stdint.
6669 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6670 no longer copies it.
6671 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6672 since stdint needs the former and wcwidth (which is now required
6673 by mbswidth) needs the latter.
6674 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6675 work around a compatibility glitch between gettext 0.14.6 and
6676 Autoconf 2.60.
6677 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6678 Do not check for uintptr_t, since new stdint module does the right
6679 thing.
6680 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6681 Add stdint.h, stdint_.h, wcwidth.h.
6682 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6683 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6684 stdint.m4, wchar_t.m4, wcwidth.m4.
6685 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6686 usual order for ../lib/*.h files.
6687 (file_name_split): Use last_component, not base_name, to adjust
6688 to gnulib changes.
6689 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6690 for ../lib/*.h files.
6691 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6692 Define unconditionally, since we now assume the stdint module.
6693 * src/scan-skel.l: Include <dirname.h>.
6694 (BASE_QPUTS): Use last_component, not base_name.
6695 * src/system.h: Include <unlocked-io.h> in the usual order
6696 for ../lib/*.h files. Include <stdint.h> unconditionally,
6697 since we now use the stdint module.
6698 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6699 HAVE_UINTPTR_T, since we now use the stdint module.
6700 (base_name): Remove decl, since files now include <dirname.h>
6701 to get the decl.
6702
6703 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6704
6705 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6706 New, default to 1.
6707 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6708 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6709 default.
6710 * tests/calc.at: Adjust.
6711
6712 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6713
6714 * data/c.m4 (b4_basename): New.
6715 (b4_syncline): Also output the location of its invocation (from
6716 the skeleton).
6717 (b4_user_action, b4_define_user_action, b4_user_actions)
6718 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6719 (b4_user_stype): New.
6720 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6721
6722 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6723
6724 In the grammar file, the first column is 1 not 0 on the first line as
6725 on every other line.
6726 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6727 * tests/input.at (Torturing the Scanner): Update output.
6728
6729 * src/scan-gram.l (scanner_cursor): Declare it static.
6730
6731 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6732
6733 In warnings, say "previous declaration" rather than "first
6734 declaration".
6735 * src/symtab.c (redeclaration): Do that here.
6736 * src/reader.c (record_merge_function_type): In the case of a result
6737 type clash, report the previous declaration rather than the very first
6738 one in the grammar file.
6739 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6740 declared later): Add a third declaration to check this behavior.
6741 * tests/input.at (Incompatible Aliases): Update output.
6742
6743 2006-06-27 Akim Demaille <akim@epita.fr>
6744
6745 * doc/Doxyfile.in: New.
6746 * doc/Makefile.am: Use it.
6747 * src/lalr.h, src/symtab.h: Initial doxygenation.
6748
6749 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6750
6751 Don't miss %merge result type warnings just because the LHS types are
6752 declared after the %merge. This continues the effort of the previous
6753 patch.
6754 * src/reader.c (get_merge_function): Don't set the merger type yet.
6755 (record_merge_function_type): New function for setting the merger type
6756 and checking for clashes.
6757 (grammar_current_rule_merge_set): Set the location of the %merge for
6758 the current rule.
6759 (packgram): Invoke record_merge_function_type for each rule now that
6760 all symbol type declarations have been parsed.
6761 * src/reader.h (merger_list.type_declaration_location): New member
6762 storing the location of the first %merge from which the type for this
6763 merging function was derived.
6764 * src/symlist.h (symbol_list.merger_declaration_location): New member
6765 storing the location of a rule's %merge, if any.
6766 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6767 declared later): New test to catch the error fixed by the above patch.
6768
6769 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6770
6771 Get action warnings (grammar_rule_check) right even when symbol
6772 declarations appear after the rules. Discussed at
6773 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6774 and
6775 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6776 Don't mistake the type of $$ in a midrule to be that of its parent
6777 rule's $$.
6778 * src/reader.c (grammar_current_rule_end): Don't invoke
6779 grammar_rule_check yet since not all symbol declarations may have been
6780 parsed yet.
6781 (grammar_midrule_action): Likewise.
6782 Don't record whether the midrule's $$ has been used yet since actions
6783 haven't been translated yet.
6784 Record the midrule's parent rule and its RHS index within the parent
6785 rule.
6786 (grammar_current_rule_action_append): Don't translate the action yet
6787 since not all symbol declarations may have been parsed yet and, thus,
6788 warnings about types for $$, $n, @$, and @n can't be reported yet.
6789 (packgram): Translate the action and invoke grammar_rule_check now that
6790 all symbol declarations have been parsed.
6791 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6792 after parsing the entire grammar file, the symbol list here in the case
6793 of a midrule is actually the midrule's empty RHS, so reference its
6794 parent rule's RHS where necessary.
6795 On the other hand, now that you can already know it's a midrule, you
6796 aren't forced to think $$ has the same type as its parent rule's $$.
6797 (handle_action_at): In the case of a midrule, reference the parent rule
6798 where necessary.
6799 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6800 members.
6801 (symbol_list_length): Now that this is invoked after all rules have
6802 been parsed, a NULL symbol (rather than a NULL symbol list node)
6803 terminates a rule. symbol_list_print already does this correctly.
6804 * src/symlist.h (symbol_list.midrule_parent_rule,
6805 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6806 remember their relationships with their parents.
6807 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6808 fixed by the above patch.
6809 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6810 implementing...
6811 (Unused values): ... this old test case and...
6812 (Unused values before symbol declarations): ... this new test case.
6813 This one is the same as `Unused values' except that all symbol
6814 declarations appear after the rules in order to catch the rest of the
6815 errors fixed by the above patch.
6816
6817 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6818
6819 More cleanup.
6820 * src/reader.c (current_rule): Declare it static since it's no longer
6821 used outside this file.
6822 (grammar_current_rule_action_append): Remove redundant arguments from
6823 translate_rule_action invocation.
6824 * src/reader.h (current_rule): Remove this unused extern.
6825 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6826 * src/scan-code.l (translate_rule_action): Likewise.
6827
6828 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6829
6830 Clean up yesterday's patch.
6831 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6832 to...
6833 * src/reader.c (grammar_current_rule_action_append): ... here for
6834 consistency with grammar_current_rule_symbol_append.
6835 * tests/regression.at (Braced code in declaration in rules section):
6836 Make yyerror and yylex static as usual.
6837
6838 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6839
6840 Fix bug that mistakes braced code in a declaration in the rules section
6841 to be a rule action. Mentioned at
6842 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6843 * src/scan-gram.l: Move midrule action detection from the start of the
6844 scanning of any braced code to...
6845 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6846 action. For readability, use $2 and @2 rather than the equivalent
6847 global variables.
6848 * tests/regression.at (Braced code in declaration in rules section):
6849 New test to catch the error fixed by the above patch.
6850
6851 Work on code readability some.
6852 * src/scan-code.l (current_rule): Get rid of this misleading and
6853 redundant declaration: it's actually extern'ed in reader.h.
6854 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6855 translate_action): Add a rule argument and use it instead of the global
6856 current_rule.
6857 (translate_rule_action): This already receives current_rule through an
6858 argument, so pass it on to translate_action instead of assigning
6859 current_rule to current_rule.
6860 (translate_symbol_action, translate_code): Pass rule = NULL to
6861 translate_action.
6862
6863 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6864
6865 Rename %before-definitions to %start-header and %after-definitions to
6866 %end-header. Don't use these declarations to separate pre-prologue
6867 blocks from post-prologue blocks. Add new order-independent
6868 declarations %before-header and %after-header as alternatives to the
6869 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6870 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6871 * NEWS (2.3+): Update for these changes.
6872 * data/glr.c (b4_before_definitions): Update to...
6873 (b4_start_header): ... this.
6874 (b4_after_definitions): Update to...
6875 (b4_end_header): ... this.
6876 * data/glr.cc: Likewise.
6877 * data/lalr1.cc: Likewise.
6878 * data/yacc.c: Likewise.
6879 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6880 prologue blocks with %*-header declarations.
6881 (Calc++ Parser): Likewise.
6882 (Decl Summary): Update names.
6883 (Table of Symbols): Update description.
6884 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6885 (PERCENT_END_HEADER): ... this.
6886 (PERCENT_BEFORE_DEFINITIONS): Update to...
6887 (PERCENT_START_HEADER): ... this.
6888 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6889 (declaration): Update token names and m4 macro names.
6890 When parsing %end-header and %start-header, invoke translate_code
6891 before muscle_code_grow, and no longer set global booleans to remember
6892 whether these declarations have been seen.
6893 Parse new %after-header and %before-header.
6894 * src/reader.c (before_definitions, after_definitions): Remove.
6895 (prologue_augment): Accept a new bool argument to specify whether to
6896 augment the pre-prologue or post-prologue.
6897 * src/reader.h (before_definitions, after_definitions): Remove these
6898 extern's.
6899 (prologue_augment): Add new bool argument.
6900 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6901 (PERCENT_END_HEADER): ... this.
6902 (PERCENT_BEFORE_DEFINITIONS): Update to...
6903 (PERCENT_START_HEADER): ... this.
6904 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6905 * tests/actions.at (Printers and Destructors): Update names.
6906
6907 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6908
6909 Add comparison operators for C++ location classes. Discussed at
6910 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6911 * data/c++.m4 (b4_define_location_comparison): New boolean %define
6912 declaration indicating whether filename_type has an operator==. If
6913 filename_type is `std::string', it defaults to `1', `0' otherwise.
6914 * data/location.cc: Iff b4_define_location_comparison is `1', add
6915 operator== and operator!= for class position and for class location.
6916
6917 Some minor fixes.
6918 * src/scan-action.l: Remove unused file.
6919 * src/symtab.c (symbol_printer_set): Use printer_location not
6920 destructor_location.
6921 * src/symtab.h (struct symbol): Replace incorrect source comment for
6922 printer members.
6923 * tests/input.at (Incompatible Aliases): Update output with correct
6924 printer location.
6925
6926 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
6927
6928 Don't put the pre-prologue in the header file. For the yacc.c code
6929 file and the glr.c header and code files, move the pre-prologue before
6930 the token definitions. Add new %before-definitions and
6931 %after-definitions to declare code that will go in both the header file
6932 and code file. Discussed at
6933 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
6934 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
6935 and
6936 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
6937 * NEWS (2.3+): Describe these changes.
6938 * data/glr.c (b4_pre_prologue): Move from within to before...
6939 (b4_shared_declarations): ... this.
6940 Add new b4_before_definitions before b4_token_enums.
6941 Add new b4_after_definitions at the end.
6942 * data/glr.cc (b4_pre_prologue): Replace with...
6943 (b4_before_definitions): ... this in the header file.
6944 (b4_after_definitions): New near the end of the header file.
6945 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
6946 code file right before including the header file.
6947 (b4_before_definitions): New in the previous position of
6948 b4_pre_prologue in the header file.
6949 (b4_after_definitions): New near the end of the header file.
6950 * data/yacc.c: Clean up some m4 quoting especially in the header file.
6951 (b4_token_enums_defines): In the code file, move to right before
6952 YYSTYPE for consistency with the header file.
6953 (b4_before_definitions): New right before b4_token_enums_defines in
6954 both the header and code file.
6955 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
6956 header and code file.
6957 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
6958 of prologues for %union dependencies.
6959 (Decl Summary): In %defines description, mention the effect of
6960 %before-definitions and %after-definitions on the header file.
6961 (Calc++ Parser): Forward declare driver in a %before-definitions rather
6962 than in the pre-prologue so that make check succeeds.
6963 (Table of Symbols): Add entries for %before-definitions and
6964 %after-definitions.
6965 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
6966 %before-definitions.
6967 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
6968 (declaration): Parse those declarations and append to
6969 b4_before_definitions and b4_after_definitions, respectively.
6970 * src/reader.c (before_definitions, after_definitions): New bools to
6971 track whether those declarations have been seen.
6972 (prologue_augment): Add to the post-prologue if %union,
6973 %before-definitions, or %after-definitions has been seen.
6974 * src/reader.h (before_definitions, after_definitions): New extern's.
6975 * src/scan-gram.l: Scan the new declarations.
6976 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
6977 prologue block in a %before-definitions or a %after-definitions based
6978 on whether the %union is declared.
6979 * tests/regression.at (Early token definitions with --yacc, Early token
6980 definitions without --yacc): Move tests for token definitions into the
6981 post-prologue since token names are no longer defined in the
6982 pre-prologue.
6983
6984 2006-06-20 Akim Demaille <akim@epita.fr>
6985
6986 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
6987 (symbol_get): Use it.
6988 * src/parse-gram.y: Use it.
6989
6990 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
6991
6992 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
6993 build succeeds when configured with --enable-gcc-warnings.
6994
6995 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
6996
6997 * src/parse-gram.y (char_name): New function.
6998 (CHAR, STRING, string_content): For %printer, properly escape.
6999 (ID): Prefer fputs to fprintf.
7000 (id): Reindent to be consistent with other rules.
7001 Properly quote char.
7002
7003 The Translation Project changed its way of publishing translations
7004 to maintainers. I haven't received any responses to my request
7005 for supporting the old way, or for documenting the new way. I
7006 have modified 'bootstrap' to use screen scraping
7007 (in this case, HTML scraping). This is unreliable and inelegant,
7008 but I don't see any better way. Yuck.
7009 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7010 (get_translations): New function, which uses HTML scraping to
7011 deduce locations of latest translations.
7012 Use this function to grab both bison and bison-runtime .po files.
7013 Don't bother priming the pump for the runtime-po domain any more,
7014 as it's now translated better than bison is.
7015
7016 2006-06-19 Akim Demaille <akim@epita.fr>
7017
7018 * src/scan-gram.l: No longer "parse" things after `%union' until
7019 `{'. Rather, return a single "%union" token.
7020 No longer make symbols: return strings, and leave the conversion
7021 to symbols to the parser.
7022 (SC_PRE_CODE, token_type): Remove.
7023 * src/parse-gram.y (%union): New field `character'.
7024 Sort tokens.
7025 (CHAR): New token.
7026 (ID, ID_COLON): Now that the scanner no longer makes them
7027 identifiers, adjust all uses to invoke symbol_get.
7028 (id_colon): New, wraps the conversion from string to symbol.
7029 (%union): Accept a possible union_name.
7030 (symbol): Now can be a char.
7031 * data/c.m4 (b4_union_name): Leave a default value.
7032 * data/glr.c, data/yacc.c: Use it.
7033
7034 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7035
7036 For associating token numbers with token names for "yacc.c", don't use
7037 #define statements unless `--yacc' is specified; always use enum
7038 yytokentype. Most important discussions start at:
7039 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7040 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7041 and
7042 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7043 * NEWS (2.3+): Mention.
7044 * data/c.m4 (b4_yacc_if): New.
7045 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7046 token #define's.
7047 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7048 on token name definitions.
7049 * src/getargs.c (usage): Capitalize `Yacc' in English.
7050 * src/output.c (prepare): Define b4_yacc_flag.
7051 * tests/regression.at (Early token definitions): Test that tokens names
7052 are defined before the pre-prologue not just before the post-prologue.
7053 Remove this test case and copy to...
7054 (Early token definitions with --yacc): ... this to test #define's.
7055 (Early token definitions without --yacc): ... and this to test enums.
7056
7057 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7058
7059 * NEWS: Reword the post-2.3 change to not be so optimistic about
7060 removing the old "look-ahead" spelling.
7061 Update previous look-ahead/lookahead change reports.
7062 * REFERENCES: look-ahead -> lookahead (since that's
7063 what he actually wrote).
7064 * doc/refcard.tex: look ahead -> lookahead,
7065 look-ahead -> lookahead
7066
7067 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7068
7069 For consistency, use `lookahead' instead of `look-ahead' or
7070 `look_ahead'. Discussed starting at
7071 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7072 and then at
7073 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7074 * NEWS: For the next release, note the change to `--report'.
7075 * TODO, doc/bison.1: Update English.
7076 * doc/bison.texinfo: Update English.
7077 (Understanding Your Parser, Bison Options): Document as
7078 `--report=lookahead' rather than `--report=look-ahead'.
7079 * src/conflicts.c: Update English in comments.
7080 (lookahead_set): Rename from look_ahead_set.
7081 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7082 (resolve_sr_conflict): Rename local look_ahead_tokens to
7083 lookahead_tokens, and update other uses.
7084 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7085 count_rr_conflicts, conflicts_free): Update uses.
7086 * src/getargs.c (report_args): Move "lookahead" before alternate
7087 spellings.
7088 (report_types): Update uses.
7089 (usage): For `--report' usage description, state `lookahead' spelling
7090 rather than `look-ahead'.
7091 * src/getargs.h (report.report_lookahead_tokens): Rename from
7092 report_look_ahead_tokens.
7093 * src/lalr.c: Update English in comments.
7094 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7095 (state_lookahead_tokens_count): Rename from
7096 state_look_ahead_tokens_count.
7097 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7098 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7099 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7100 Update other uses.
7101 Update English in output.
7102 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7103 * src/print.c: Update English in comments.
7104 (lookahead_set): Rename from look_ahead_set.
7105 (print_reduction): Rename argument lookahead_token from
7106 look_ahead_token.
7107 (print_core, state_default_rule, print_reductions, print_results):
7108 Update uses.
7109 * src/print_graph.c: Update English in comments.
7110 (print_core): Update uses.
7111 * src/state.c: Update English in comments.
7112 (reductions_new): Update uses.
7113 (state_rule_lookahead_tokens_print): Rename from
7114 state_rule_look_ahead_tokens_print, and update other uses.
7115 * src/state.h: Update English in comments.
7116 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7117 (state_rule_lookahead_tokens_print): Rename from
7118 state_rule_look_ahead_tokens_print.
7119 * src/tables.c: Update English in comments.
7120 (conflict_row, action_row): Update uses.
7121 * tests/glr-regression.at
7122 (Incorrect lookahead during deterministic GLR,
7123 Incorrect lookahead during nondeterministic GLR): Rename
7124 print_look_ahead to print_lookahead.
7125 * tests/torture.at: Update English in comments.
7126 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7127 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7128 (Many lookahead tokens): Update uses.
7129 * data/glr.c: Update English in comments.
7130 * lalr1.cc: Likewise.
7131 * yacc.c: Likewise.
7132 * src/conflicts.h: Likewise.
7133 * src/lalr.h: Likewise.
7134 * src/main.c: Likewise.
7135 * src/output.c: Likewise.
7136 * src/parse-gram.c: Likewise.
7137 * src/tables.h: Likewise.
7138 * tests/calc.at: Likewise.
7139
7140 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7141
7142 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7143
7144 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7145
7146 * TODO: Add request from Nelson H. F. Beebe to be able to install
7147 Bison without installing the yacc script.
7148
7149 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7150
7151 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7152 and yytext if they're already #define'd.
7153 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7154 * src/scan-code-c.c: ... here.
7155 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7156 <config.h>.
7157
7158 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7159
7160 Get Bison to build again when configured with --enable-gcc-warnings.
7161 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7162 missing #include's.
7163 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7164 loc argument as it shadows a global.
7165 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7166 invocation.
7167
7168 * src/.cvsignore: Add scan-code.c.
7169
7170 2006-06-07 Akim Demaille <akim@epita.fr>
7171
7172 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7173 to...
7174 * src/scan-code.l: here.
7175 * tests/input.at (Torturing the Scanner): Fix another location
7176 error.
7177
7178 2006-06-07 Akim Demaille <akim@epita.fr>
7179
7180 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7181
7182 2006-06-06 Akim Demaille <akim@epita.fr>
7183
7184 Extract the parsing of user actions from the grammar scanner.
7185 As a consequence, the relation between the grammar scanner and
7186 parser is much simpler. We can also split "composite tokens" back
7187 into simple tokens.
7188 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7189 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7190 rename as...
7191 * src/location.h, src/location.c (add_column_width)
7192 (location_compute): these.
7193 Fix the column count: the initial column is 0.
7194 (location_print): Be robust to ending column being 0.
7195 * src/location.h (boundary_set): New.
7196 * src/main.c: Adjust to scanner_free being renamed as
7197 gram_scanner_free.
7198 * src/output.c: Include scan-code.h.
7199 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7200 Use boundary_set.
7201 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7202 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7203 which is now, again, a separate token.
7204 Adjust all dependencies.
7205 Whereever actions with $ and @ are used, use translate_code.
7206 (action): Remove this nonterminal which is now useless.
7207 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7208 (grammar_current_rule_action_append): Use translate_code.
7209 (packgram): Bound check ruleno, itemno, and rule_length.
7210 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7211 (last_string, last_braced_code_loc, max_left_semantic_context)
7212 (scanner_initialize, scanner_free, scanner_last_string_free)
7213 (gram_out, gram_lineno, YY_DECL_): Move to...
7214 * src/scan-gram.h: this new file.
7215 (YY_DECL): Rename as...
7216 (GRAM_DECL): this.
7217 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7218 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7219 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7220 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7221 Move these declarations, and...
7222 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7223 these to...
7224 * src/flex-scanner.h: this new file.
7225 * src/scan-gram.l (rule_length, rule_length_overflow)
7226 (increment_rule_length): Remove.
7227 (last_braced_code_loc): Rename as...
7228 (gram_last_braced_code_loc): this.
7229 Adjust to the changes of the parser.
7230 Move all the handling of $ and @ into...
7231 * src/scan-code.l: here.
7232 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7233 (handle_action_dollar, handle_action_at): Move to...
7234 * src/scan-code.l: here.
7235 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7236 scan-code.h, scan-code-c.c, scan-gram.h.
7237 (EXTRA_bison_SOURCES): Add scan-code.l.
7238 (BUILT_SOURCES): Add scan-code.c.
7239 (yacc): Be robust to white spaces.
7240
7241 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7242 * tests/regression.at: Adjust the column numbers.
7243 * tests/regression.at: Adjust the error message.
7244
7245 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7246
7247 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7248 Use Akim's wording from
7249 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7250
7251 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7252
7253 Between Bison releases, manually append `+' to the previous Bison
7254 release number, and use that as a signal to automatically print the
7255 ChangeLog's CVS Id keyword from --version. Discussed starting at
7256 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7257 * ChangeLog: Add Id header.
7258 * configure.ac (AC_INIT): Append `+' to `2.3'.
7259 * src/.cvsignore: Add revision.c.
7260 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7261 (BUILT_SOURCES): Add revision.c.
7262 (revision.c): New target rule. This file defines a new global variable
7263 named revision. It initializes it with either the Id from ChangeLog
7264 or, if VERSION doesn't contain `+', with the empty string.
7265 * src/getargs.c (version): Print the value of revision.
7266 * src/revision.h: Extern revision.
7267
7268 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7269
7270 * NEWS: Version 2.3.
7271 * configure.ac (AC_INIT): Likewise.
7272
7273 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7274
7275 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7276 with no arguments, not as an object-like macro. This is for
7277 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7278 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7279 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7280 Document this.
7281
7282 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7283
7284 * src/getargs.c (usage): Back out yesterday's modification of the
7285 --help output so that we don't have to wait for translation before
7286 releasing 2.3.
7287
7288 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7289
7290 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7291 Problem reported by Akim Demaille.
7292
7293 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7294
7295 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7296
7297 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7298
7299 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7300 generated source code. Problem reported by Frans Englich in
7301 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7302
7303 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7304
7305 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7306 shell, not within 'make', so that 'make' by an ordinary builder
7307 (using GNU make) does not worry about configuring gzip. This also
7308 works around a bug reported independently by Keith Thompson and by
7309 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7310 stderr rather than stdout, messing up the build logs.
7311
7312 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7313
7314 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7315 to make sure that YYID will never be unused. This fixes a 'make
7316 maintainer-check' failure caused by the recent changes to the 'Trivial
7317 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7318 not used.
7319 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7320
7321 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7322
7323 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7324 state before an empty RHS is always resolved here. Only the location
7325 of that state is guaranteed to be resolved, and that's enough. This
7326 fixes the remaining bug reported by Derek M. Jones in
7327 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7328 * tests/glr-regression.at (Uninitialized location when reporting
7329 ambiguity): Test the above case.
7330 Also, the embedded comments in this test case claim it checks the case
7331 of an empty RHS that has inherited the initial location. However, the
7332 corresponding LHS was already resolved, so yyresolveLocations didn't
7333 actually have reason to modify it. Fix this by forcing
7334 nondeterministic operation at the beginning of the parse.
7335
7336 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7337
7338 * data/c.m4 (b4_yy_symbol_print_generate):
7339 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7340 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7341 of the bugs reported today by Derek M Jones in
7342 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7343 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7344 defined to be a type name without parens or brackets.
7345 (Location Type): Similarly for YYLTYPE.
7346 * tests/regression.at (Trivial grammars): Put in a test for this
7347 bug that will be caught by 'make maintainer-check' (though not,
7348 alas, by 'make check' unless your compiler is picky).
7349
7350 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7351
7352 * NEWS: Version 2.2.
7353 * configure.ac (AC_INIT): Likewise.
7354
7355 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7356
7357 * data/glr.c (yyreportTree): Make room in yystates for the state
7358 preceding the RHS. This fixes the segmentation fault reported by Derek
7359 M. Jones in
7360 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7361 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7362 to the user. Reported for yyreportTree by Derek M. Jones later in the
7363 same thread.
7364 * THANKS: Add Derek M. Jones.
7365 Update my email address.
7366 Fix typo in Steve Murphy's name.
7367
7368 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7369
7370 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7371 checking against YYLAST that caused the parser to miss a potential
7372 alternative in its diagnostic.
7373 Problem reported by Maria Jose Moron Fernandez in
7374 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7375 * data/lalr1.cc (yysyntax_error_): Likewise.
7376 * data/yacc.c (yysyntax_error): Likewise.
7377 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7378 tokens, in case we run into an older C compiler.
7379 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7380 Use them to check for the off-by-one error fixed above.
7381
7382 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7383 YYSIZE_T, not size_t.
7384 * tests/regression.at (Trivial grammars): New test, to catch
7385 the error fixed by the above patch.
7386
7387 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7388
7389 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7390 scheme.
7391 Reported by Steve Murphy.
7392
7393 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7394
7395 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7396 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7397
7398 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7399
7400 Implement --trace=m4.
7401 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7402 * src/output.c (output_skeleton): When set, pass -dV to m4.
7403
7404 Factor the handling of flags in m4.
7405 * src/output.c (prepare): Rename the muscle names debug, defines,
7406 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7407 * data/c.m4: Adjust.
7408 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7409 Use b4_define_flag_if to define other b4_FLAG_if macros.
7410 (b4_location_if): As a consequence, rename as...
7411 (b4_locations_if): this, for consistency.
7412 Adjust all the skeletons.
7413
7414 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7415
7416 * etc/bench.pm: Shorten bench names.
7417
7418 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7419
7420 * src/output.h, src/output.c (error_verbose): Move to...
7421 * src/getargs.h, src/getargs.c: here.
7422 Sort the flags.
7423 Adjust dependencies.
7424
7425 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7426
7427 * data/c.m4 (b4_copyright): Put the special exception for Bison
7428 skeletons here, so we don't have to put it in each skeleton. All
7429 uses changed. Suggested by Akim Demaille. Also, wrap the
7430 copyright notice, in case it is longer than 80 columns. Replace
7431 comma by newline after title.
7432
7433 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7434
7435 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7436 incompatibility, not a bug. Mention that it wasn't fixed as of
7437 flex 2.5.33.
7438
7439 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7440
7441 * examples/extexi: Enforce the precedence of concatenation over
7442 >>.
7443 Reported by Tommy Nordgren.
7444
7445 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7446
7447 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7448 with the member "token".
7449 Reported by Martin Nylin.
7450
7451 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7452
7453 * data/glr.c: Switch to Bison 2.2 special-exception language in
7454 the copyright notice. Use more-regular format for titles and
7455 copyright notices.
7456 * data/glr.cc: Likewise.
7457 * data/location.cc: Likewise.
7458 * data/yacc.cc: Likewise.
7459 * doc/bison.texinfo (Conditions): Document this.
7460 * NEWS: likewise. Upgrade version to 2.2.
7461
7462 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
7463
7464 * data/glr.cc: Remove dead code.
7465
7466 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7467
7468 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7469 that variable and the line breaks the bootstrap. Problem reported
7470 by Juan M. Guerrero.
7471
7472 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7473
7474 * doc/bison.texinfo (Multiple start-symbols): New.
7475
7476 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7477
7478 * etc/README, etc/bench.pl: New.
7479
7480 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
7481
7482 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7483 rule.
7484 Reported by Mickael Labau.
7485 * tests/input.at (Torturing the Scanner): Test it.
7486
7487 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7488
7489 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7490 Problem reported by Bob Rossi.
7491
7492 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7493
7494 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7495 and didn't really work.
7496 For the index, use @ifnotinfo, not @iftex.
7497 Minor cleanups of spacing and terminology.
7498
7499 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7500
7501 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7502 of AT_NAME_PREFIX when %name-prefix is not used.
7503
7504 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7505
7506 Apply --prefix to C++ skeletons too: they change the namespace.
7507 The test suite already exercize these cases.
7508 * data/c++.m4 (b4_namespace): New.
7509 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7510 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7511 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7512 * doc/bison.texinfo: Document it.
7513 (Option Cross Key): Use @multitable in all formats. It looks
7514 nicer, even in TeX outputs.
7515 (Rules): Use the same code whatever the output type is.
7516 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7517 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7518 * tests/calc.at: Use it, instead of hard coding `yy'.
7519
7520 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7521
7522 * TODO: Remove dead items.
7523
7524 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7525
7526 * doc/FAQ: Remove, merged into...
7527 * doc/bison.texinfo (FAQ): this.
7528 * doc/Makefile.am (EXTRA_DIST): Adjust.
7529
7530 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7531
7532 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7533 even if empty.
7534 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7535 * doc/bison.texinfo (Calc++ Scanner): Use it.
7536
7537 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
7538
7539 Fix two nits reported by twlevo, plus one more that I discovered.
7540
7541 * src/assoc.h (assoc_to_string): Give a name to the arg, as
7542 this is the usual Bison style.
7543 * src/location.h (location_print): Likewise.
7544
7545 * src/reader.h (token_name): Likewise.
7546
7547 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7548
7549 Fix some nits reported by twlevo.
7550 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7551 and "POSIX". Use more-modern syntax for URLs. Mention C++
7552 and ask for Java. Don't hardwire OS version numbers. Add
7553 copyright notice.
7554 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7555 * src/conflicts.c (solved_conflicts_obstack): Now static.
7556
7557 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
7558
7559 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7560 page. Say "you can use it" not "you may use it" as on the web page;
7561 we're describing capabilities not granting permission.
7562
7563 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7564
7565 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7566 shadowing warnings. Use usual patter for iterating through RHS.
7567 * tests/glr-regression.at
7568 (Uninitialized location when reporting ambiguity):
7569 Modify yylex so that it uses its argument, rather than trying
7570 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7571 const char -> char const.
7572
7573 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7574 Don't use tabs inside commands; it messes up 'ps'.
7575 Problem reported by twlevo.
7576
7577 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7578
7579 * tests/glr-regression.at (Uninitialized location when reporting
7580 ambiguity): New test case.
7581 * data/glr.c (yyresolveLocations): New function, which uses
7582 YYLLOC_DEFAULT.
7583 (yyresolveValue): Invoke yyresolveLocations before reporting an
7584 ambiguity.
7585 * doc/bison.texinfo (Default Action for Locations): Note
7586 YYLLOC_DEFAULT's usage for ambiguity locations.
7587 (GLR Semantic Actions): Cross-reference those notes.
7588
7589 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7590
7591 * tests/glr-regression.at (Leaked semantic values when reporting
7592 ambiguity): Remove unnecessary union and type declarations.
7593 (Leaked lookahead after nondeterministic parse syntax error): New test
7594 case.
7595 * data/glr.c (yyparse): Check for zero stacks remaining before
7596 attempting to shift the lookahead so that you don't lose it.
7597
7598 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7599
7600 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7601 * tests/glr-regression.at (Leaked semantic values when reporting
7602 ambiguity): New test case.
7603 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7604 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7605 now unnecessary yystackp parameter.
7606 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7607 destructors can be called.
7608
7609 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7610 in existing testcases.
7611
7612 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7613
7614 Don't leak semantic values for parent RHS when a user action cuts the
7615 parser, and clean up related code a bit.
7616 * tests/glr-regression.at (Leaked merged semantic value if user action
7617 cuts parse): Rename to...
7618 (Leaked semantic values if user action cuts parse): ... this. Add check
7619 for leaked parent RHS values.
7620 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7621 between an unresolved state (non-empty chain of semantic options) and
7622 an incomplete one (signaled by an empty chain).
7623 (yyresolveStates): Document the interface. Move all manipulation of a
7624 successfully or unsuccessfully resolved yyGLRState to...
7625 (yyresolveValue): ... here so that yyresolveValue always leaves a
7626 yyGLRState with consistent data and thus is easier to understand.
7627 Remove the yyvalp and yylocp parameters since they are always just
7628 taken from the yys parameter. When reporting a discarded merged value
7629 in debugging output, note that it is incompletely merged. Document the
7630 interface.
7631 (yyresolveAction): If resolving any of the RHS states fails, destroy
7632 them all rather than leaking them. Thus, as long as user actions are
7633 written to clean up the RHS correctly, yyresolveAction always cleans up
7634 the RHS of a semantic option. Document the interface.
7635
7636 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7637
7638 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7639 led to a segmentation fault in GNU Pascal. Problem reported
7640 by Waldek Hebisch.
7641
7642 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7643
7644 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7645 mid-rule action inside a nonterminal symbol in order to declare a
7646 destructor for its semantic value.
7647
7648 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7649
7650 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7651 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7652 __cplusplus && ! defined _STDLIB_H && !
7653 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7654 defined free))]: Include <stdlib.h> rather than rolling our own
7655 declarations of malloc and free, to avoid problems with
7656 incompatible declarations (using 'throw') C++'s stdlib.h. This
7657 should fix Debian bug 340012
7658 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7659 reported by Guillaume Melquiond.
7660
7661 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7662
7663 * NEWS: Clarify symbols versus types in unused-value warnings.
7664
7665 * configure.ac (AC_INIT): Bump version number.
7666
7667 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7668
7669 * NEWS: Version 2.1a.
7670 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7671 since C99 requires this.
7672
7673 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7674
7675 * m4/c-working.m4: New file.
7676 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7677
7678 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7679
7680 * Makefile.maint: Merge from coreutils.
7681
7682 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7683
7684 More portability fixes for problems summarized by Nelson H. F. Beebe.
7685
7686 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7687 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7688 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7689 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7690 messes up because C++ code is compiled in 32-bit mode but linked
7691 in 64-bit mode.
7692
7693 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7694
7695 More portability fixes for problems summarized by Nelson H. F. Beebe.
7696
7697 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7698 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7699
7700 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7701 nodist_PROGRAMS, since we don't need to actually compile the
7702 example if we're just doing a plain 'make'. This avoids bothering
7703 the installer unnecessarily about problems due to weird C++
7704 compilers.
7705
7706 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7707
7708 More portability fixes for problems summarized by Nelson H. F. Beebe.
7709
7710 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7711 than #include "...", and compile with -I'.'. The old method was
7712 not portable, according to Posix and the C standard, and it does
7713 not work with Sun C 5.7, where previous #line directives affect
7714 the working directory used in later #include "..." directives.
7715
7716 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7717
7718 Various DJGGP specific issues in /djgpp
7719
7720 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7721
7722 More portability fixes for problems summarized by Nelson H. F. Beebe.
7723
7724 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7725 '#include <map>' works and that you can apply ++ to iterators.
7726
7727 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7728
7729 Work around portability problems summarized by Nelson H. F. Beebe in
7730 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7731
7732 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7733 that '#include <string>' works.
7734
7735 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7736 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7737 "warning: sorry: semantics of inline function static data `const
7738 unsigned char translate_table[262]' are wrong (you'll wind up with
7739 multiple copies)".
7740
7741 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7742 or, xor to not_, and_, or_, and xor_, respectively. This works
7743 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7744 random system header somewhere that includes the equivalent of
7745 <iso646.h>.
7746
7747 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7748 -E" works; it apparently doesn't work with PathScale EKO Compiler
7749 Suite Version 2.0.
7750
7751 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7752
7753 During deterministic GLR operation, user actions should be able to
7754 influence the parse by changing yychar. To make this easier to fix and
7755 to make glr.c easier to evolve in general, don't maintain yytoken in
7756 parallel with yychar; just compute yytoken when needed.
7757 * tests/glr-regression.at (Incorrect lookahead during deterministic
7758 GLR): Check that setting yychar in a user action has the intended
7759 effect.
7760 * data/glr.c (yyGLRStack): Remove yytokenp member.
7761 (yyclearin): Don't set *yytokenp.
7762 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7763 yychar rather than *yytokenp to determine the current lookahead.
7764 Compute yytoken locally when needed.
7765 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7766 point to.
7767
7768 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7769 after `--report' documentation.
7770
7771 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7772
7773 * src/parse-gram.y (grammar_declaration): Location of printer
7774 symbol is @1, not list->location. Bug reported by twlevo.
7775 * tests/input.at (Incompatible Aliases): Adjust to above change.
7776
7777 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7778
7779 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7780 all the test at once. This makes the output easier to read in the
7781 normal case.
7782
7783 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7784 got from <http://bro-ids.org/download.html>. The bug is that
7785 when two actions appeared in succession, the second one was
7786 scanned before the first one was added to the grammar rule
7787 as a midrule action. Bison then output the incorrect warning
7788 "parse.y:905.17-906.36: warning: unused value: $3".
7789 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7790 associated with a value.
7791 (rhs): Don't invoke grammar_current_rule_action_append.
7792 (action): Invoke it here instead.
7793 * src/reader.c (grammar_midrule_action): Now extern.
7794 (grammar_current_rule_action_append): Don't invoke
7795 grammar_midrule_action; that is now the scanner's job.
7796 * src/reader.h (last_string, last_braced_code_loc):
7797 (grammar_midrule_action): New decls.
7798 * src/scan-gram.l (last_string): Now extern, sigh.
7799 (last_braced_code_loc): New extern variable.
7800 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7801 rule already has an action.
7802 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7803 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7804 Add some tests to check that the above changes fixed the bug.
7805
7806 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7807
7808 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7809 All used changed. Check whether the symbol has a destructor,
7810 not whether it is typed.
7811 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7812 that the values are still reported as unused. All line numbers
7813 adjusted.
7814
7815 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7816
7817 Work around a bug in bro 0.8, which underparenthesizes its
7818 definition of YYLLOC_DEFAULT.
7819 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7820 their arguments.
7821 * data/lalr1.cc: Likewise.
7822 * data/yacc.cc: Likewise.
7823
7824 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7825
7826 Work around a bug in Pike 7.0, and give the Pike folks a
7827 better way to override the usual int widths.
7828 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7829 user can override the types.
7830 (short): #undef, to work around a bug in Pike 7.0.
7831 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7832 (union yyalloc.yyss): Use yytype_int16 rather than short.
7833 All uses changed.
7834 (yysigned_char): Remove.
7835 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7836 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7837 * tests/regression.at (Web2c Actions): Adjust to above changes.
7838
7839 * src/reader.c (check_and_convert_grammar): New function.
7840 (reader): Close the input file even if something went wrong during
7841 parsing. Minor file descriptor leak reported by twlevo.
7842
7843 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7844 to pacify gcc -Wswitch-default.
7845 * src/scan-gram.l (adjust_location): Use a default: break; case
7846 to pacify gcc -Wswitch-default.
7847 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7848 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7849 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7850 Move these decls to scan-skel.l, since they don't need to be
7851 visible elsewhere.
7852 * src/scan-skel.l: Accept the above decls.
7853 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7854 is used.
7855
7856 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7857
7858 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7859 since we don't want to insist on a version number at the start
7860 of the changelog every time.
7861 * Makefile.maint: Sync from coreutils a bit better.
7862 (sc_trailing_blank): Renamed from sc_trailing_space.
7863 All uses changed.
7864 (sc_no_if_have_config_h, sc_require_config_h):
7865 (sc_prohibit_assert_without_use): New rules.
7866 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7867 (sc_dd_max_sym_length): Fix leading spaces in rule.
7868 (sc_system_h_headers): Prefix with @.
7869 (sc_useless_cpp_parens, m4-check): Output line numbers.
7870 (changelog-check): Allow version only in head.
7871 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7872 satisfy new Makefile.maint rule.
7873 * data/glr.c: Likewise.
7874 * data/glr.cc: Likewise.
7875 * data/lalr1.cc: Likewise.
7876 * data/yacc.c: Likewise.
7877 * lib/ebitsetv.c: Likewise.
7878 * lib/lbitset.c: Likewise.
7879 * lib/subpipe.c: Likewise.
7880 * lib/timevar.c: Likewise.
7881 * src/system.h: Likewise.
7882 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7883 * djgpp/Makefile.maint: Add copyright notice.
7884 * djgpp/README.in: Likewise.
7885 * djgpp/config.bat: Likewise.
7886 * djgpp/config.site: Likewise.
7887 * djgpp/config_h.sed: Likewise.
7888 * djgpp/djunpack.bat: Likewise.
7889 * djgpp/config.sed: Fix copyright notice to match standard format.
7890 * djgpp/subpipe.h: Likewise.
7891 * lib/bitsetv-print.c: Likewise.
7892 * lib/bitsetv.c: Likewise.
7893 * lib/subpipe.h: Likewise.
7894 * lib/timevar.c: Likewise.
7895 * lib/timevar.h: Likewise.
7896 * djgpp/subpipe.c: Use standard recipe for config.h.
7897 * lib/abitset.c: Likewise.
7898 * lib/bitset.c: Likewise.
7899 * lib/bitset_stats.c: Likewise.
7900 * lib/bitsetv-print.c: Likewise.
7901 * lib/bitsetv.c: Likewise.
7902 * lib/ebitsetv.c: Likewise.
7903 * lib/get-errno.c: Likewise.
7904 * lib/lbitset.c: Likewise.
7905 * lib/subpipe.c: Likewise.
7906 * lib/timevar.c: Likewise.
7907 * lib/vbitset.c: Likewise.
7908 * tests/local.at: Likewise.
7909 * src/scan-gram.l: Don't include verify.h, since system.h does
7910 that for us.
7911 * .x-sc_require_config_h: New file.
7912 * .x-sc_unmarked_diagnostics: New file.
7913
7914 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
7915
7916 Be a bit more systematic about using 'abort'.
7917 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7918 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7919 Put 'default: abort ();' before some other case, to satisfy older
7920 pedantic compilers.
7921 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7922 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
7923 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
7924 * src/conflicts.c (resolve_sr_conflict): Likewise.
7925 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
7926 (get_decision_str, get_orientation_str, get_node_alignment_str):
7927 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
7928 (get_linestyle_str, get_arrowstyle_str): Likewise.
7929 * src/conflicts.c (resolve_sr_conflict):
7930 Use a default case rather than one for the one remaining enum
7931 value, to catch invalid enum values as well.
7932 * src/lalr.c (set_goto_map, map_goto):
7933 Prefer "assert (FOO);" to "if (!FOO) abort ();".
7934 * src/nullable.c (nullable_compute, token_definitions_output):
7935 Likewise.
7936 * src/reader.c (packgram, reader): Likewise.
7937 * src/state.c (transitions_to, state_new, state_reduction_find):
7938 Likewise.
7939 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
7940 (symbol_pack): Likewise.
7941 * src/tables.c (conflict_row, pack_vector): Likewise.
7942 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
7943 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
7944 * src/system.h: Don't include <assert.h>.
7945 (assert): New macro.
7946
7947 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
7948 (Destructor Decl, Parser Function, Pure Calling):
7949 Describe rules for braces inside C code more carefully.
7950
7951 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
7952
7953 Fix some porting glitches found by Nelson H. F. Beebe.
7954 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
7955 compilers that don't understand that abort () does not return.
7956 * src/state.c (transitions_to): Likewise.
7957 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7958 that '#include <cstdlib>' works.
7959 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
7960 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
7961 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
7962 for the benefit of some pre-C99 compilers.
7963
7964 * bootstrap: Undo changes to gnulib files that autoreconf made.
7965
7966 Minor fixups to get 'make maintainer-check' to work.
7967 * configure.ac: Don't use -Wnested-externs, as it's incompatible
7968 with the new verify.h implementation.
7969 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
7970 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
7971 * data/yacc.c (YYUSE): Likewise.
7972 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
7973 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
7974 * src/parse-gram.y (declaration): Don't pass a string constant
7975 to a function that expects char *, since GCC might complain
7976 about the constant value.
7977 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
7978 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
7979 before #defining them.
7980 * tests/glr-regression.at
7981 (Incorrectly initialized location for empty right-hand side in GLR):
7982 In yyerror, use the msg arg.
7983 (Corrupted semantic options if user action cuts parse):
7984 (Incorrect lookahead during deterministic GLR):
7985 (Incorrect lookahead during nondeterministic GLR):
7986 Don't name a local var 'index'; it shadows string.h's 'index'.
7987
7988 2006-01-19 Akim Demaille <akim@epita.fr>
7989
7990 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
7991 location, not just parts of it.
7992
7993 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
7994
7995 * NEWS: Document the fact that multiple %unions are now allowed.
7996 * doc/bison.texinfo (Union Decl): Likewise.
7997 * TODO: This feature is now implemented, so remove it from
7998 the wishlist.
7999
8000 * Makefile.maint: Merge with coreutils Makefile.maint.
8001 (CVS_LIST): Use build-aux version if available.
8002 (VERSION_REGEXP): New macro.
8003 (syntax-check-rules): Add sc_no_if_have_config_h,
8004 sc_prohibit_assert_without_use, sc_require_config_h,
8005 sc_useless_cpp_parens.
8006 (sc_obsolete_symbols): Check for O_NDELAY.
8007 (sc_dd_max_sym_length): Track coreutils.
8008 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8009 (sc_useless_cpp_parens): New rule.
8010 (news-date-check): Look for version or today's date.
8011 (changelog-check): Don't require version number near head.
8012 (copyright-check): Use current year instead of hardwiring 2005.
8013 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8014 (announcement): Add --gpg-key-ID.
8015
8016 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8017 with "file system".
8018
8019 Avoid undefined behavior that addressed just before the start of an
8020 array. Problem reported by twlevo.
8021 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8022 * src/lalr.c (build_relations): Rely on new sentinel.
8023 * src/gram.c (gram_free): Adjust to new sentinel.
8024
8025 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8026
8027 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8028 yylookaheadNeeds. All uses updated.
8029 (yysplitStack): Rename local yynewLookaheadStatuses to
8030 yynewLookaheadNeeds.
8031 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8032 GLR): In comments, change `lookahead status' to `lookahead need'.
8033
8034 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8035
8036 * data/glr.c (yysplitStack): A little stylistic rewrite.
8037
8038 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8039
8040 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8041
8042 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8043
8044 * doc/bison.texinfo: Fix some typos.
8045 (GLR Semantic Actions): New subsection discussing special
8046 considerations because GLR semantic actions might be deferred.
8047 (Actions): Mention look-ahead usage of yylval.
8048 (Actions and Locations): Mention look-ahead usage of yylloc.
8049 (Special Features for Use in Actions): Add YYEOF entry and mention it
8050 in the yychar entry.
8051 In the yychar entry, remove mention of the local yychar case (pure
8052 parser) since this is irrelevant information when writing semantic
8053 actions and since it's already discussed in `Table of Symbols' where
8054 yychar is otherwise described as an external variable.
8055 In the yychar entry, don't call it the `current' look-ahead since it
8056 isn't when semantic actions are deferred.
8057 In the yychar and yyclearin entries, add note about deferred semantic
8058 actions.
8059 Add yylloc and yylval entries discussing look-ahead usage.
8060 (Look-Ahead Tokens): When discussing yychar, don't call it the
8061 `current' look-ahead, and do mention yylval and yylloc.
8062 (Error Recovery): Cross-reference `Action Features' when mentioning
8063 yyclearin.
8064 (Table of Symbols): In the yychar entry, don't call it the `current'
8065 look-ahead.
8066 In the yylloc and yylval entries, mention look-ahead usage.
8067
8068 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8069
8070 * tests/glr-regression.at: Update copyright year to 2006.
8071
8072 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8073
8074 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8075 use during nondeterministic operation to track which stacks have
8076 actually needed the current lookahead.
8077 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8078 Allocate, deallocate, resize, and otherwise shuffle space for
8079 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8080 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8081 appropriately during nondeterministic operation.
8082 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8083 members to store the current lookahead to be used by the deferred
8084 user action.
8085 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8086 from which the RHS is taken. Set the lookahead members of the new
8087 yySemanticOption according to the lookahead status for stack yyk.
8088 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8089 yyaddDeferredAction.
8090 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8091 members of yySemanticOption before invoking yyuserAction, and then set
8092 them back to their current values afterward.
8093 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8094 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8095 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8096 titles for consistency.
8097 (Leaked merged semantic value if user action cuts parse): In order to
8098 suppress lint warnings, use arguments in merge function, and assign
8099 char value < 128 in main.
8100 (Incorrect lookahead during deterministic GLR): New test case.
8101 (Incorrect lookahead during nondeterministic GLR): New test case.
8102
8103 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8104
8105 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8106 !yyvaluep as signal that no semantic value is available to print.
8107 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8108 to print a semantic value.
8109
8110 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8111
8112 * tests/glr-regression.at: For consistency with my newer test cases,
8113 don't thank myself.
8114
8115 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8116
8117 * data/glr.c (yyresolveValue): When merging semantic options, if at
8118 least one user action succeeds but a later one cuts the parse, then
8119 destroy the semantic value before returning rather than leaking it.
8120 (yyresolveStates): If a user action cuts the parse and thus
8121 yyresolveValue fails, ignore the (unset) semantic value rather than
8122 corrupting the yyGLRState, and empty the semantic options list since
8123 the user actions should have called all necessary destructors.
8124 Simplify code with YYCHK.
8125 * tests/glr-regression.at (Corrupted semantic options if user action
8126 cuts parse): New test case.
8127 (Undesirable destructors if user action cuts parse): New test case.
8128 Before applying any of this patch, this test case never actually failed
8129 for me... but only because the corrupted semantic options usually
8130 masked this bug.
8131 (Leaked merged semantic value if user action cuts parse): New test
8132 case.
8133
8134 2006-01-05 Akim Demaille <akim@epita.fr>
8135
8136 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8137
8138 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8139
8140 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8141 _MSC_VER. Problem reported by Cenzato Marco.
8142 (b4_c_function_def): Use it.
8143 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8144 b4_c_modern.
8145 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8146 than rolling our own.
8147
8148 2006-01-04 Akim Demaille <akim@epita.fr>
8149
8150 Also warn about non-used mid-rule values.
8151 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8152 member.
8153 (symbol_list_new): Adjust.
8154 * src/reader.c (symbol_typed_p): New.
8155 (grammar_rule_check): Use it.
8156 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8157 Check its rule.
8158 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8159 Use it.
8160 * tests/actions.at (Exotic Dollars): Adjust.
8161
8162 2006-01-04 Akim Demaille <akim@epita.fr>
8163
8164 * src/reader.c (grammar_midrule_action): If $$ is set in a
8165 mid-rule, move the `used' bit to its lhs.
8166 * tests/input.at (Unused values): New.
8167 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8168
8169 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8170
8171 * doc/bison.texinfo (Bison Options): Say more accurately what
8172 --yacc does.
8173 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8174 about declarations in the grammar when in Yacc mode, as POSIX does
8175 not require a diagnostic when the grammar uses extensions.
8176
8177 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8178
8179 Warn about dubious constructions like "%token T T".
8180 Reported by twlevo.
8181 * src/symtab.h (struct symbol.declared): New member.
8182 * src/symtab.c (symbol_new): Initialize it to false.
8183 (symbol_class_set): New arg DECLARING, specifying whether
8184 this is a declaration that we want to warn about, if there
8185 is more than one of them. All uses changed.
8186
8187 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8188 Allow multiple %union directives, whose contents concatenate.
8189 * src/parse-gram.y (grammar_declaration): Likewise.
8190 Use muscle_code_grow, so that we don't need stype_line any more.
8191 All uses changed.
8192
8193 * src/muscle_tab.c (muscle_grow): Fix comment.
8194
8195 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8196 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8197 Update copyright year to 2006.
8198
8199 2006-01-03 Akim Demaille <akim@epita.fr>
8200
8201 Have glr.cc pass (some of) the calc.at tests.
8202 * data/glr.cc (b4_parse_param_orig): New.
8203 (b4_parse_param): Improve its definition, and bound it more
8204 clearly in the skeleton.
8205 (b4_epilogue): Append, instead of prepending, in order to keep
8206 #line consistency.
8207 Simplify the generation of auxiliary functions: locations and
8208 purity are mandated.
8209 (b4_global_tokens_and_yystype): Honor it.
8210 * data/location.cc (c++.m4): Don't include it.
8211 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8212 and AT_SKEL_CC_IF.
8213 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8214 AT_LALR1_CC_IF.
8215 Be sure to initialize the first position's filename.
8216 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8217 mandated anyway.
8218 (AT_CHECK_CALC_GLR_CC): New.
8219 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8220
8221 2006-01-02 Akim Demaille <akim@epita.fr>
8222
8223 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8224 c.m4.
8225 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
8226 * data/glr.cc: Do not include stack.hh.
8227
8228 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8229
8230 * data/glr.c: Reformat whitespace with tabs.
8231 (b4_lpure_formals): Remove this unused m4 macro.
8232 * tests/cxx-type.at: Reformat whitespace with tabs.
8233 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8234 since it's a member. Rename type to isNterm for clarity.
8235
8236 2005-12-29 Akim <akim@sulaco.local>
8237
8238 Let glr.cc catch up with symbol_value_print.
8239 * data/glr.cc (b4_yysymprint_generate): Replace by...
8240 (b4_yy_symbol_print_generate): this.
8241 (yy_symbol_print, yy_symbol_value_print): Declare them.
8242
8243 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8244
8245 * src/location.h (boundary): Note that a line or column equal
8246 to INT_MAX indicates an overflow.
8247 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8248 (rule_length_overflow, increment_rule_length, add_column_width):
8249 New functions.
8250 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8251 (<SC_BRACED_CODE>"}"):
8252 Use increment_rule_length rather than incrementing it by hand.
8253 (adjust_location, handle_syncline): Diagnose overflow.
8254 (handle_action_dollar, handle_action_at):
8255 Fix bug with monstrosities like $-2147483648.
8256 Remove now-unnecessary checks.
8257 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8258 (convert_ucn_to_byte): Verify assumptions.
8259 (handle_syncline): New arg LOC. All callers changed.
8260 Don't store through a value derived from char const * pointer.
8261
8262 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8263 GCC warnings.
8264
8265 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8266
8267 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8268 Remove unnecessary forward static decls.
8269
8270 2005-12-27 Akim Demaille <akim@epita.fr>
8271
8272 * src/reader.c (grammar_current_rule_check): Also check that $$
8273 is used.
8274 Take the rule to check as argument, hence rename as...
8275 (grammar_rule_check): this.
8276 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8277 Rename as...
8278 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8279 (grammar_midrule_action, grammar_symbol_append): Now static.
8280 * tests/torture.at (input): Don't rely on the default action
8281 being always performed.
8282 * tests/calc.at: "Set" $$ even when the action is "cut" with
8283 YYERROR or other.
8284 * tests/actions.at (Exotic Dollars): Instead of using unused
8285 values, check that the warning is issued.
8286
8287 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8288
8289 * NEWS: Improve wording for unused-value warnings.
8290
8291 2005-12-22 Akim Demaille <akim@epita.fr>
8292
8293 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8294 (b4_yysymprint_generate): Rename as...
8295 (b4_yy_symbol_print_generate): this.
8296 Generate yy_symbol_print instead of yysymprint.
8297 Generate also yy_symbol_value_print, and use it.
8298
8299 2005-12-22 Akim Demaille <akim@epita.fr>
8300
8301 * NEWS: Warn about unused values.
8302 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8303 a `used' member.
8304 (symbol_list_n_get, symbol_list_n_used_set): New.
8305 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8306 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8307 * src/reader.c (grammar_current_rule_check): Check that values are
8308 used.
8309 * src/symtab.c (symbol_print): Accept 0.
8310 * tests/existing.at: Remove the type information.
8311 Empty the actions.
8312 Remove useless actions (beware of mid-rule actions: perl -000
8313 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8314 * tests/actions.at (Exotic Dollars): Use unused values.
8315 * tests/calc.at: Likewise.
8316 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8317 Likewise.
8318
8319 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8320 rule_useful_p.
8321
8322 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8323
8324 Undo 2005-12-01 tentative license wording change. The wording is
8325 still being reviewed by the lawyers, and we don't want to wait for
8326 them before publishing a test release. For now, revert to the
8327 previous wording.
8328 * NEWS: Undo 2005-12-01 change.
8329 * data/glr.c: Revert to previous license wording.
8330 * data/glr.cc: Likewise.
8331 * data/lalr1.cc: Likewise.
8332 * data/location.cc: Likewise.
8333 * data/yacc.c: Likewise.
8334
8335 * NEWS: Reword %destructor vs YYABORT etc.
8336 * data/glr.c: Use American spacing, for consistency.
8337 * data/glr.cc: Likewise.
8338 * data/lalr1.cc: Likewise.
8339 * data/yacc.c: Likewise.
8340 * data/yacc.c: Reformat comments slightly.
8341 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8342 for consistency. Fix some spelling errors and reword recently-included
8343 text slightly.
8344 * tests/cxx-type.at: Cast results of malloc, for C++.
8345
8346 2005-12-21 Joel E. Denny <address@hidden>
8347
8348 * tests/cxx-type.at: Construct a tree, count the parents of shared
8349 nodes, and free each node once and only once. Previously, the memory
8350 for semantic values was leaked instead.
8351
8352 2005-12-21 Joel E. Denny <address@hidden>
8353
8354 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8355 (yylval, yylloc): If pure, #define to yystackp->yyval and
8356 yystackp->yyloc similar to yychar and yynerrs.
8357 (yyparse): If pure, remove local yylval and yylloc. Add local
8358 yystackp to accommodate pure definitions of yylval and yylloc.
8359 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8360 yylvalp and yyllocp to &yylval and &yylloc.
8361 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8362 namespace. Previously, nerrs and char were missing, but lval and lloc
8363 weren't necessary.
8364 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8365 yylvalp and yyllocp parameters since, if pure, these are now always
8366 accessible through yystackp. If not pure, they are still accessible
8367 globally.
8368 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8369 `if (YYID (N))' to pacify lint.
8370
8371 2005-12-21 Akim Demaille <akim@epita.fr>
8372
8373 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8374 destroy the RHS symbols of a rule.
8375 * data/yacc.c (yylen): Initialize to 0.
8376 Keep its value to the number of items to possibly shift.
8377 In particular, a regular successful parse that ends on YYFINAL by
8378 a (internal) YYACCEPT must not have yylen != 0.
8379 (yyerrorlab, yyreturn): Pop the RHS.
8380 Reorder a bit to emphasize the `shifting' bits of code.
8381 (YYPOPSTACK): Now accept a number of items to pop.
8382 * data/lalr1.cc: Likewise.
8383 * data/glr.c: Formatting changes.
8384 Use goto instead of fall through.
8385 * doc/bison.texinfo (Destructor Decl): Complete.
8386
8387 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8388
8389 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8390 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8391 * djgpp/config.bat: Replace every occurence of the file name
8392 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8393 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8394 * djgpp/config.sed: Replace every occurence of the file name
8395 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8396 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8397 * djgpp/djunpack.bat: DJGPP specific file.
8398 * djgpp/fnchange.lst: DJGPP specific file.
8399 * djgpp/README.in: Add new information about how to unpack the bison
8400 source on MSDOS and other systems which have 8.3 file name restrictions
8401 using djunpack.bat and fnchange.lst.
8402
8403 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8404
8405 * bootstrap (build_cvs_prefix): Remove; unused.
8406 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8407 when getting gnulib.
8408
8409 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8410
8411 * data/glr.c: Reorder typedef declarations for structs to match order
8412 of struct declarations.
8413 Rename yystack everywhere to yystackp except in yyparse where it's not
8414 a pointer.
8415 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8416 consistency.
8417 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8418 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8419 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8420 lint.
8421
8422 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8423
8424 * tests/sets.at (Accept): Fix typos in regular expression used to
8425 sed out the final state number.
8426
8427 Work around portability problem on Solaris 10: flex-generated
8428 files include <stdio.h> before <config.h>, which messes up
8429 because the latter defines __EXTENSIONS__. Address the problem
8430 by creating two new little files that include <config.h> first,
8431 then include the flex-generated files. Rewrite everyone else
8432 to include <config.h> first, as well.
8433 * lib/timevar.c: Always include "config.h".
8434 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8435 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8436 (EXTRA_bison_SOURCES): New macro.
8437 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8438 * src/system.h: Don't include config.h.
8439 * src/LR0.c: Include <config.h> first.
8440 * src/assoc.c: Likewise.
8441 * src/closure.c: Likewise.
8442 * src/complain.c: Likewise.
8443 * src/conflicts.c: Likewise.
8444 * src/derives.c: Likewise.
8445 * src/files.c: Likewise.
8446 * src/getargs.c: Likewise.
8447 * src/gram.c: Likewise.
8448 * src/lalr.c: Likewise.
8449 * src/location.c: Likewise.
8450 * src/main.c: Likewise.
8451 * src/muscle_tab.c: Likewise.
8452 * src/nullable.c: Likewise.
8453 * src/output.c: Likewise.
8454 * src/parse-gram.y: Likewise.
8455 * src/print.c: Likewise.
8456 * src/print_graph.c: Likewise.
8457 * src/reader.c: Likewise.
8458 * src/reduce.c: Likewise.
8459 * src/relation.c: Likewise.
8460 * src/state.c: Likewise.
8461 * src/symlist.c: Likewise.
8462 * src/symtab.c: Likewise.
8463 * src/tables.c: Likewise.
8464 * src/uniqstr.c: Likewise.
8465 * src/vcg.c: Likewise.
8466
8467 * src/parse-gram.y: Fix minor problems uncovered by lint.
8468 (current_lhs, current_lhs_location): Now static.
8469 (current_assoc): Remove unused variable.
8470
8471 Cleanups so that Bison-generated parsers have less lint.
8472 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8473 Prepend /*ARGSUSED*/, for lint's sake.
8474 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8475 definition if 'lint' is defined.
8476 (YYID): New macro (or function, if lint).
8477 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8478 * data/yacc.c: Likewise.
8479 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8480 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8481 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8482 is C++ only.
8483 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8484 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8485 Use YYID(0) rather than 0, for lint.
8486 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8487 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8488
8489 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8490
8491 * tests/glr-regression.at
8492 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8493 Close memory leak reported by twlevo.
8494
8495 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8496
8497 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8498 all stacks.
8499 (yyparse): Iterate another stack in order to call user destructors.
8500 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8501 New test case.
8502 (Duplicated user destructor for lookahead): This test now is expected
8503 to succeed.
8504
8505 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8506
8507 * NEWS: Document the following change.
8508 * data/yacc.c: Say "parser skeleton" rather than "file", since
8509 it's no longer just a file.
8510 * data/glr.c: Grant a special exception for C GLR parsers, that
8511 reads like the already-existing exception for C LALR(1) parsers.
8512 * data/glr.cc: Likewise.
8513 * data/lalr1.cc: Likewise.
8514 * data/location.cc: Likewise.
8515 * data/yacc.c: Reword the "written by" statement to clarify that
8516 it was the parser skeleton, not the entire output file.
8517 * data/glr.c: Written by Paul Hilfinger.
8518 * data/glr.cc: Written by Akim Demaille.
8519 * data/lalr1.cc: Likewise.
8520
8521 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8522
8523 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8524 Fix typos in previous change that broke 'make check'.
8525 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8526 supported in C.
8527 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8528 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8529 We can revert this once things settle down.
8530
8531 * src/conflicts.c (conflicts_print): Don't print file name twice
8532 when %expect fails because there were no conflicts.
8533 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8534 change.
8535 * tests/conflicts.at (%expect not enough, %expect too much):
8536 (%expect with reduce conflicts): Adjust to new behavior.
8537
8538 2005-11-18 Akim Demaille <akim@epita.fr>
8539
8540 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8541 errors.
8542 * NEWS: Document this.
8543 * doc/bison.texinfo (Expect Decl): Likewise.
8544
8545 2005-11-16 Akim Demaille <akim@epita.fr>
8546
8547 Generalize the display of semantic values and locations in traces.
8548 * data/glr.c (yy_reduce_print): Fix indices (again).
8549 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8550 literal integers.
8551 * data/lalr1.cc (yyreduce_print): Rename as...
8552 (yy_reduce_print): this.
8553 Display values and locations.
8554 * data/yacc.c (yy_reduce_print): Likewise.
8555 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8556 (yysymprint): Move higher to be visible from yy_reduce_print).
8557 (yyparse): Adjust.
8558 * tests/calc.at: Adjust the expected length of the traces.
8559
8560 2005-11-14 Akim Demaille <akim@epita.fr>
8561
8562 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8563 from 1 to N, while values and location start at 0.
8564 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8565
8566 2005-11-14 Akim Demaille <akim@epita.fr>
8567
8568 * data/glr.c (yy_reduce_print): Fix the $ number.
8569
8570 2005-11-14 Akim Demaille <akim@epita.fr>
8571
8572 "Use" parse parameters.
8573 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8574 * data/glr.c, data/glr.cc: Use them.
8575 * data/glr.c (YYUSE): Have a C++ definition that supports
8576 non-pointer types.
8577
8578 2005-11-14 Akim Demaille <akim@epita.fr>
8579
8580 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8581
8582 2005-11-14 Akim Demaille <akim@epita.fr>
8583
8584 * data/glr.cc: New.
8585 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
8586
8587 2005-11-12 Akim Demaille <akim@epita.fr>
8588
8589 Let position and location be PODs.
8590 * data/location.cc (position::initialize, location::initialize): New.
8591 (position::position, location::location): Define only if
8592 b4_location_constructors is defined.
8593 * data/lalr1.cc (b4_location_constructors): Define it for backward
8594 compatibility.
8595 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8596
8597 2005-11-12 Akim Demaille <akim@epita.fr>
8598
8599 * data/lalr1.cc: Move the body of the ctor and dtor into the
8600 parser file (instead of the header).
8601 Wrap the implementations in a "namespace yy".
8602
8603 2005-11-12 Akim Demaille <akim@epita.fr>
8604
8605 Have glr.c include its header file when created.
8606 * data/glr.c (b4_shared_declarations): New.
8607 Output them verbatim in the parser if !%defines, otherwise
8608 output then in the header file, and include it instead.
8609
8610 2005-11-11 Akim Demaille <akim@epita.fr>
8611
8612 * data/glr.c: Comment changes.
8613
8614 2005-11-11 Akim Demaille <akim@epita.fr>
8615
8616 When yydebug, report semantic and location values for reductions.
8617 * data/glr.c (yy_reduce_print): Report the semantic values and the
8618 locations.
8619 (YY_REDUCE_PRINT): Adjust.
8620 (yyglrReduce): Use them.
8621 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8622 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8623 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8624 traces.
8625
8626 2005-11-10 Akim Demaille <akim@epita.fr>
8627
8628 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8629 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8630 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8631
8632 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8633
8634 * m4/cxx.m4, examples/Makefile.am: Don't build
8635 examples/calc++ if no C++ compiler is available. (trivial change)
8636
8637 2005-11-09 Akim Demaille <akim@epita.fr>
8638
8639 * src/scan-skel.l: Use a couple of asserts.
8640
8641 2005-11-03 Akim Demaille <akim@epita.fr>
8642
8643 In some (weird) cases, the final state number is incorrect.
8644 Reported by Alexandre Duret-Lutz.
8645 * src/LR0.c (state_list_append): Remove the computation of
8646 final_state.
8647 (save_reductions): Do it here.
8648 (get_state): Alpha conversion.
8649 (generate_states): Use a for loop.
8650 * src/gram.h (item_number_is_rule_number)
8651 (item_number_is_symbol_number): New.
8652 * src/state.c: Use assert.
8653 * src/system.h: Include assert.h.
8654 * tests/sets.at (Accept): New.
8655
8656 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8657
8658 * data/glr.c (yyfill): Adjust comment.
8659 (yyresolveAction): Initialize default location properly
8660 for empty right-hand sides.
8661 (yydoAction): Ditto.
8662 Add comment explaining apparently dead code.
8663 * tests/glr-regression.at
8664 (Incorrectly initialized location for empty right-hand side in GLR):
8665 New test.
8666
8667 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8668
8669 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8670 gnulib when interrupted. This fixes some race conditions and
8671 works around some portability problems (one noted by Paul
8672 Hilfinger).
8673
8674 2005-10-22 Akim <akim@epita.fr>
8675
8676 * Makefile.cfg: Adjust to config -> build-aux.
8677 Reported by twledo.
8678
8679 2005-10-21 Akim Demaille <akim@epita.fr>
8680
8681 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8682 the %parse-params.
8683 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8684 * data/yacc.c (b4_Pure_if): Rename as...
8685 (b4_yacc_pure_if): this.
8686 (YY_SYMBOL_PRINT, yyparse): Adjust.
8687 * doc/bison.texinfo: Formatting changes.
8688
8689 2005-10-21 Akim Demaille <akim@epita.fr>
8690
8691 Finish the transition config -> build-aux.
8692 * configure.ac, Makefile.am: Use build-aux.
8693 * config/prev-version, config/announce-gen, config/Makefile.am:
8694 Move to...
8695 * build-aux/prev-version, build-aux/announce-gen,
8696 * build-aux/Makefile.am: here.
8697
8698 2005-10-14 Akim Demaille <akim@epita.fr>
8699
8700 * examples/calc++/test: Use set -x only when VERBOSE.
8701
8702 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8703
8704 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8705 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8706
8707 2005-10-13 Akim Demaille <akim@epita.fr>
8708
8709 * src/scan-skel.l: Output the base name parts of the parser and
8710 header file names.
8711 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
8712 additional checks.
8713 Use this to exercise C++ outputs in subdirs.
8714 Reported by Oleg Smolsky.
8715
8716 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8717
8718 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8719 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8720 Problem reported by John P. Hartmann.
8721 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8722 already defined it.
8723
8724 2005-10-12 Akim Demaille <akim@epita.fr>
8725
8726 * src/parse-gram.y (version_check): Exit 63 to please missing
8727 (stands for "version mismatch).
8728 * tests/input.at, doc/bison.texinfo: Adjust.
8729
8730 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8731
8732 Work around portability problems with Visual Age C compiler
8733 (xlc and xlC_r) reported by John P. Hartmann.
8734 * data/location.cc (initial_column, initial_line): Remove.
8735 All uses replaced by 0 and 1.
8736 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8737 that xlc complains about.
8738 * src/scan-skel.l (skel_wrap): Likewise.
8739 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
8740 as __STDC__.
8741 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8742 __STDC_VERSION__. Use it everywhere instead of looking at
8743 __STDC__ and __cplusplus.
8744
8745 2005-10-10 Akim Demaille <akim@epita.fr>
8746
8747 * examples/calc++/test: Be quiet unless VERBOSE.
8748
8749 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8750
8751 * data/c.m4 (yydestruct, yysymprint):
8752 Use YYUSE instead of casting to void.
8753 * data/glr.c (YYUSE): New macro.
8754 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8755 Use it instead of rolling our own.
8756 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8757 (YYCHK1):
8758 Use /*CONSTCOND*/ to suppress lint warnings.
8759 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8760 (YY_STACK_PRINT): Use 'false' not '0'.
8761 (YYUSE): New macro.
8762 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8763 * data/yacc.c (YYUSE): New macro.
8764 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8765 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8766 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8767
8768
8769 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8770 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8771
8772 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8773
8774 Undo the parts of the unlocked-I/O change that substituted
8775 putc or puts for printf. This might hurt performance a bit,
8776 but some people prefer the printf style.
8777 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8778 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8779 All uses replaced by YYFPRINTF and YYDPRINTF.
8780 * data/yacc.c: Likewise.
8781 * lib/bitset.c (bitset_print): Likewise.
8782 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8783 putc and puts.
8784 * lib/lbitset.c (debug_lbitset): Likewise.
8785 * src/closure.c (print_firsts, print_fderives): Likewise.
8786 * src/gram.c (grammar_dump): Likewise.
8787 * src/lalr.c (look_ahead_tokens_print): Likewise.
8788 * src/output.c (escaped_output): Likewise.
8789 (user_actions_output): Break apart two printfs.
8790 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8791 * src/reduce.c (reduce_print): Likewise.
8792 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8793 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8794
8795 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8796 Use assignments rather than casts-to-void to suppress
8797 unused-variable warnings. This pacifies 'lint'.
8798 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8799 unused-variable warnings.
8800
8801 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8802
8803 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8804
8805 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8806
8807 Use unlocked I/O for a minor performance improvement on hosts like
8808 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8809 is to use the gnlib unlocked-io module, and to prefer putc and
8810 puts to printf when either will work (since the latter doesn't
8811 come in an unlocked flavor).
8812 * bootstrap (gnulib_modules): Add unlocked-io.
8813 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8814 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8815 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8816 and similarly for puts and putc and printf.
8817 * data/yacc.c: Likewise.
8818 * lib/bitset.c (bitset_print): Likewise.
8819 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8820 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8821 to printf.
8822 * lib/lbitset.c (debug_lbitset): Likewise.
8823 * src/closure.c (print_firsts, print_fderives): Likewise.
8824 * src/gram.c (grammar_dump): Likewise.
8825 * src/lalr.c (look_ahead_tokens_print): Likewise.
8826 * src/output.c (escaped_output): Likewise.
8827 (user_actions_output): Coalesce two printfs.
8828 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
8829 * src/reduce.c (reduce_print): Likewise.
8830 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8831 * src/system.h: Include unlocked-io.h rather than stdio.h.
8832
8833 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8834 this confuses xgettext.
8835
8836 2005-10-02 Akim Demaille <akim@epita.fr>
8837
8838 * bootstrap (gnulib_modules): Add strverscmp.
8839 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8840 * m4/.cvsignore: Add strverscmp.m4.
8841 * src/parse-gram.y (%require): New token, new rule.
8842 (version_check): New.
8843 * src/scan-gram.l (%require): Adjust.
8844 * tests/input.at (AT_REQUIRE): New.
8845 Use it.
8846 * doc/bison.texinfo (Require Decl): New.
8847 (Calc++ Parser): Use %require.
8848
8849 2005-10-02 Akim Demaille <akim@epita.fr>
8850
8851 * data/location.cc: New.
8852
8853 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8854 Akim Demaille <akim@epita.fr>
8855
8856 Make sure -odir/foo.cc creates dir/location.hh etc.
8857 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8858 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8859 (spec_defines_file): Now const.
8860 (dir_prefix): New.
8861 (short_base_name): Remove.
8862 * src/files.c: Adjust.
8863 (dirname.h): Include.
8864 (base_name): Don't prototype it.
8865 (finput): Remove, duplicates gram_in.
8866 (full_base_name, short_base_name): Replace by...
8867 (all_but_ext, all_but_tab_ext): these.
8868 (compute_base_names): Rename as...
8869 (compute_file_name_parts): this.
8870 Update to compute the new variables, including dir_prefix.
8871 Adjust dependencies.
8872 * src/output.c (prepare): Output them.
8873 * src/reader.c: Adjust to use gram_in, not finput.
8874 * src/scan-skel.l (@dir_prefix@): New.
8875
8876 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8877
8878 * lib/subpipe.c: New function end_of_output_subpipe() added
8879 to allow support for non-posix systems. This is a no-op function
8880 for posix systems.
8881
8882 * lib/subpipe.h: New function end_of_output_subpipe() added
8883 to allow support for non-posix systems. This is a no-op function
8884 for posix systems.
8885
8886 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8887 handle the lack of pipe/fork functionality on non-posix systems.
8888
8889 * djgpp/Makefile.maint: DJGPP specific file.
8890
8891 * djgpp/README.in: DJGPP specific file.
8892
8893 * djgpp/config.bat: DJGPP specific configuration file.
8894
8895 * djgpp/config.sed: DJGPP specific configuration file.
8896
8897 * djgpp/config.site: DJGPP specific configuration file.
8898
8899 * djgpp/config_h.sed: DJGPP specific configuration file.
8900
8901 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8902
8903 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8904
8905 2005-10-02 Akim Demaille <akim@epita.fr>
8906
8907 * data/location.cc: New, extract from...
8908 * data/lalr1.cc: here.
8909 (location.hh): Include it after the user prologue, in case the
8910 filename type is defined by the user.
8911 Forward declation location and position before the pre-prologue.
8912 (yyresult_): Rename as...
8913 (yyresult): this, it's a local variable, not an attribute.
8914 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8915
8916 2005-10-01 Akim Demaille <akim@epita.fr>
8917
8918 * examples/extexi: Restore the #line generation.
8919
8920 2005-09-30 Akim Demaille <akim@epita.fr>,
8921 Alexandre Duret-Lutz <adl@gnu.org>
8922
8923 Move the token type and YYSTYPE in the parser class.
8924 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
8925 (parser::token): New, from the moved free definition of tokens.
8926 (parser::semantic_value): Now a full definition instead of an
8927 indirection to YYSTYPE.
8928 (b4_post_prologue): No longer included in the header file, but
8929 in the implementation file.
8930 * doc/bison.texi (C+ Language Interface): Update.
8931 * src/parse-gram.y: Support unary %define.
8932 * tests/actions.at: Define global_tokens_and_yystype for backward
8933 compatibility until we update the tests.
8934 * tests/calc.at: Idem.
8935 (first_line, first_column, last_line, last_column): Define for lalr1.cc
8936 to simplify the code.
8937
8938 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
8939
8940 Port to SunOS 4.1.4, which lacks strtoul and strerror.
8941 Ah, the good old days! Problem reported by Peter Klein.
8942 * bootstrap (gnulib_modules): Add strerror, strtoul.
8943 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
8944 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
8945
8946 2005-09-29 Akim Demaille <akim@epita.fr>
8947
8948 * data/c.m4 (b4_error_verbose_if): New.
8949 * data/lalr1.cc: Use it.
8950 (YYERROR_VERBOSE_IF): Remove.
8951 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
8952 parser members, replaced by...
8953 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
8954 local variables.
8955 (yysyntax_error_): Takes the state number as argument.
8956 (yyreduce_print_): Use the argument yyrule, not the former
8957 attribute yyn_.
8958
8959 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
8960
8961 * bootstrap (gnulib_modules): Add verify.
8962 * lib/.cvsignore: Add verify.h.
8963 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
8964 * src/system.h (verify): Remove.
8965 Include verify.h instead.
8966 * src/tables.c (tables_generate): Use new API for 'verify'.
8967
8968 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
8969
8970 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
8971 local variables whose names begin with 'yy'.
8972 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8973 Trivial changes from Joel E. Denny.
8974
8975 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
8976 it itself.
8977 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
8978 don't use alloca any more.
8979
8980 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
8981 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
8982 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
8983 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
8984 to match yacc.c, to test more hosts.
8985
8986 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
8987
8988 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
8989 doesn't affect behavior.
8990 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
8991 Solaris, AIX, MSC.
8992 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
8993 This works a bit better with glibc, if user code has already included
8994 stdlib.h.
8995 * doc/bison.texinfo (Bison Parser): Document that users can't
8996 arbitrarily use malloc and free for other purposes. Document
8997 that <alloca.h> and <malloc.h> might be included.
8998 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
8999 user must declare alloca.
9000
9001 * HACKING (release): Forwarn the Translation Project about
9002 stable releses.
9003
9004 2005-09-20 Akim Demaille <akim@epita.fr>
9005
9006 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9007
9008 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9009
9010 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9011 (YYSTACK_ALLOC_MAXIMUM): Use it.
9012 (yysyntax_error): New function.
9013 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9014 multiple syntax errors are reported, and alloca is being used.
9015 Instead, reallocate buffers twice as big each time, so that
9016 we waste at most half the allocated memory. Start with a small
9017 (128-byte) buffer that will suffice in most cases anyway.
9018 Use yysyntax_error to do most of the work.
9019
9020 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9021 yynerrs is the number of errors reported, not the number of
9022 errors encountered.
9023
9024 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9025 Mark it as expected to fail.
9026 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9027 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9028 Don't start user-code symbols with "yy", to avoid name space problems.
9029
9030 2005-09-19 Akim Demaille <akim@epita.fr>
9031
9032 Remove the traits, failed experiment.
9033 It never proved useful, and anyway because of the current
9034 definition, it was not possible to have several specialization of
9035 this traits, making it useless.
9036 * data/lalr1.cc (yy:traits): Remove.
9037 Inline its definitions in the parser class.
9038
9039 2005-09-19 Akim Demaille <akim@epita.fr>
9040
9041 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9042 least Mac OSX with a /usr/local install of gettext.
9043
9044 2005-09-19 Akim Demaille <akim@epita.fr>
9045
9046 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9047 and yytoken for similarity with the other skeletons.
9048
9049 2005-09-19 Akim Demaille <akim@epita.fr>
9050
9051 * NEWS, configure.ac: update version number to 2.1a.
9052
9053 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9054
9055 * NEWS: Version 2.1.
9056
9057 * NEWS: Remove notice of yytname change, since it was never in an
9058 official release.
9059 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9060 diagnostic.
9061 * src/output.c (prepare): Likewise.
9062 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9063 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9064 is not defined. This is an awful hack, but it's enough for now.
9065 All callers changed.
9066 * tests/glr-regression-at (make_value): Args are const pointers now,
9067 to avoid GCC warning.
9068 (Duplicated user destructor for lookahead): New test. Currently
9069 skipped. It fails on my host but I'm not sure it'll always fail.
9070
9071 2005-09-16 Akim Demaille <akim@epita.fr>
9072
9073 * src/symtab.h (struct symbol): Declare the printer and destructor
9074 as const, to avoid accidental calls to free.
9075 (symbol_destructor_set, symbol_printer_set): Adjust.
9076 * src/symtab.c: Adjust.
9077
9078 2005-09-16 Akim Demaille <akim@epita.fr>
9079
9080 * data/c.m4 (b4_token_enums): New.
9081 (b4_token_defines): Rename as...
9082 (b4_token_enums_defines): this.
9083 (b4_token_defines): New, output only the #defines.
9084 * data/yacc.c, data/glr.c: Adjust.
9085 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9086 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9087 as default values.
9088
9089 2005-09-16 Akim Demaille <akim@epita.fr>
9090
9091 * data/lalr1.cc (yylex_): Remove, inline its code.
9092 (yyreport_syntax_error_): Remove, replaced by...
9093 (yysyntax_error_): this which returns a string and leaves to the
9094 caller the call to the users' error function.
9095 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9096 Move from members of the parser object...
9097 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9098 to local variables of the parse function.
9099
9100 2005-09-16 Akim Demaille <akim@epita.fr>
9101
9102 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9103 since it's in Bison's name space.
9104
9105 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9106
9107 * data/glr.c (yyresolveValue): Add default case to pacify
9108 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9109
9110 * NEWS: Document when yyparse started to return 2.
9111 * doc/bison.texinfo (Parser Function): Document when yyparse
9112 returns 2.
9113
9114 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9115 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9116 changed.
9117 (class position): file_name -> filename (reverting). All uses changed.
9118
9119 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9120
9121 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9122 do anything if $@ exists. This reverts part of the 2005-07-07
9123 patch.
9124
9125 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9126
9127 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9128 contains obsolete information and isn't worth distributing as a
9129 separate file anyway.
9130 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9131 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9132 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9133 (yyparse): Abort if user code uses longjmp to throw an unexpected
9134 value.
9135
9136 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9137
9138 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9139 Suggested by twlevo@xs4all.nl.
9140
9141 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9142 This avoids a diagnostic from gcc -Wswitch-enum.
9143 Problem reported by twlevo@xs4all.nl.
9144
9145 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9146 standards. Use "file name" or "file" or "name", depending on
9147 the context.
9148 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9149 not to hack/foo.tab.c.
9150 (Calc++ Top Level): 2nd arg of main is not const.
9151 * data/glr.c: b4_filename -> b4_file_name.
9152 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9153 All uses changed.
9154 (class position): filename -> file_name. All uses changed.
9155 * data/yacc.c: b4_filename -> b4_file_name.
9156 * lib/bitset.h: filename -> file_name in local vars.
9157 * lib/bitset_stats.c: Likewise.
9158 * src/files.c: Likewise.
9159 * src/scan-skel.l ("@output ".*\n): Likewise.
9160 * src/files.c (file_name_split): Renamed from filename_split.
9161 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9162
9163 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9164
9165 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9166 to accommodate latest gnulib.
9167
9168 * tests/glr-regression.at (Duplicate representation of merged trees):
9169 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9170
9171 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9172 needed.
9173
9174 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9175
9176 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9177 All uses changed. Invoke user destructor after an error during a
9178 split parse (trivial change from Joel E. Denny).
9179
9180 * tests/glr-regression.at
9181 (User destructor after an error during a split parse): New test case.
9182 Problem reported by Joel E. Denny in:
9183 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9184
9185 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9186
9187 * README-cvs: Give URLs for recommended tools.
9188 Mention Gzip version problem, and bootstrapping issues.
9189 Remove troubleshooting section, as it's somewhat obsolete.
9190
9191 * bootstrap (no_cache): New var, to accommodate different wget
9192 variants. Use it instead of '-C off'. Problem reported by
9193 twlevo@xs4all.nl.
9194
9195 * data/glr.c (yydestroyStackItem): New function.
9196 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9197 debugging information. Problem reported by Joel E. Denny.
9198
9199 2005-08-25 Akim Demaille <akim@epita.fr>
9200
9201 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9202
9203 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9204
9205 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9206 Don't invoke destructor on unresolved entries.
9207 * tests/glr-regression.at
9208 (User destructor for unresolved GLR semantic value): New test case.
9209 Problem reported by Joel E. Denny in:
9210 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9211
9212 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9213
9214 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9215 Add strnlen.c.
9216 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9217 lib-prefix.m4, po.m4.
9218
9219 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9220 in yydestruct diagnostic, since it might not be an error.
9221 Problem reported by Joel Denny near end of
9222 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9223 * data/lalr1.cc (yyerturn): Likewise.
9224 * data/yacc.c (yyreturn): Likewise.
9225 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9226
9227 * src/files.c: Remove obsolete FIXME comment.
9228
9229 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9230 with the other templates, and to fix bogus run-on messages such
9231 as the one reported at the end of
9232 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9233 All callers changed to avoid the newline.
9234 (yyprocessOneStack): Output two lines rather than one, to accommodate
9235 the above change. This changes the debug output format slightly.
9236
9237 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9238 reported by Joel E. Denny in
9239 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9240 (trivial change).
9241 * tests/glr-regression.at (Duplicate representation of merged trees):
9242 New test, from Joel E. Denny in:
9243 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9244 * THANKS: Add Joel E. Denny.
9245
9246 * configure.ac (AC_INIT): Bump to 2.0c.
9247
9248 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9249
9250 * NEWS: Version 2.0b.
9251
9252 * Makefile.am (SUBDIRS): Put examples before tests, so that
9253 "make check" doesn't finish with "All 1 tests passed".
9254
9255 * tests/regression.at (Token definitions): Don't rely on
9256 AT_PARSER_CHECK for data that contains backslashes. It currently
9257 uses 'echo', and 'echo' isn't portable if its argument contains
9258 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9259 that the byte '\0xff' is not printable in the C locale; it is,
9260 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9261 not printable, so use '\0x81' to test.
9262
9263 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9264 version of GCC, since the macro is used with non-GCC compilers.
9265
9266 Fix core dump reported by Pablo De Napoli in
9267 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9268 * tests/regression.at (Invalid inputs with {}): New test.
9269 * src/parse-gram.y (token_name): Translate type before using
9270 it as an index.
9271
9272 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9273 the user's name space. All uses changed to __attribute__
9274 ((__unused__)).
9275 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9276 Add __attribute__ ((__noreturn__)).
9277
9278 * etc/clcommit: Remove. We weren't using it, and it failed
9279 "make maintainer-distcheck".
9280 * Makefile.maint: Merge from coreutils.
9281 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9282 (syntax-check-rules): Change list of rules as described below.
9283 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9284 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9285 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9286 (sc_trailing_space): New rules.
9287 (sc_xalloc_h_in_src): Remove.
9288 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9289 (sc_space_tab, sc_error_exit_success, sc_changelog):
9290 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9291 (makefile-check, po-check, author_mark_check):
9292 (makefile_path_separator_check, copyright-check):
9293 Use grep -n, to make it easier to find violations.
9294 Use CVS_LIST and CVS_LIST_EXCEPT.
9295 (header_regexp, h_re): Remove.
9296 (dd_c): New macro.
9297 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9298 (my-distcheck): Use more-modern GCC flags.
9299 (signatures, %.asc): Remove.
9300 (rel-files, announcement): Remove signatures.
9301 Restore old updating code, even though we don't use it, so
9302 that we're the same as coreutils.
9303 (alpha, beta, major): Depend on news-date-check.
9304 Make the upload commands.
9305
9306 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9307 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9308 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9309 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9310 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9311 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9312 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9313 * tests/sets.at: Likewise.
9314
9315 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9316 we comment out the Autoconf version number.
9317 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9318 it's error-prone and "make maintainer-distcheck" rejects it.
9319
9320 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9321 Indent calls to "error" to pacify "make maintainer-distcheck",
9322 when the calls are not intended to be translated.
9323 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9324
9325 * src/Makefile.am (DEFS): Use +=, to pacify
9326 "make maintainer-distcheck".
9327 (bison_SOURCES): Add scan-skel.h.
9328 (sc_tight_scope): New rule, from coreutils.
9329
9330 * src/files.c (src_extension, header_extension):
9331 Now static, not extern.
9332 * src/getargs.c (short_options): Likewise.
9333 * src/muscle_tab.c (muscle_table): Likewise.
9334 * src/parse-gram.y (current_class, current_type, current_prec):
9335 Likewise.
9336 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9337 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9338 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9339 void, to avoid warning when NLS is disabled.
9340 * src/output.c: Include scan-skel.h.
9341 (scan_skel): Remove decl, since scan-skel.h does this.
9342 (output_skeleton):
9343 Indent calls to "error" to pacify "make maintainer-distcheck".
9344 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9345 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9346 "make maintainer-distcheck".
9347 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9348 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9349 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9350 (skel_lex_destroy, scan_skel): Move these decls to...
9351 * src/scan-skel.h: New file.
9352 * src/uniqstr.c (uniqstr_assert):
9353 Indent calls to "error" to pacify "make maintainer-distcheck".
9354
9355 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9356 not @VAR@.
9357
9358 * tests/torture.at: Revamp to avoid misuse of atoi that
9359 "make maintainer-distcheck" complained about.
9360
9361 * examples/extexi (message): Don't print a message more than once,
9362 and omit line-number decoration that makes Emacs compile think
9363 that informative messages are worth worrying about.
9364
9365 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9366
9367 * configure.ac: Update version number.
9368
9369 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9370 accidentally.
9371 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9372 autogenerated by the maintainer.
9373 * examples/calc++/.cvsignore: Add *.yy.
9374
9375 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9376 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9377 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9378
9379 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9380
9381 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9382 from maintainer-distcheck about casting the argument of 'free'.
9383
9384 * NEWS: Mention recent yytname changes.
9385 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9386
9387 * bootstrap: For translations that have not yet been upgraded to
9388 the new runtime-po domain, prime the pump by extracting the
9389 relevant strings from the obsolete translations. This code can be
9390 removed once the bison-runtime domain has been translated by each
9391 team.
9392
9393 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9394 now that token names are already quoted.
9395
9396 Fix problem reported by Anthony Heading.
9397 * data/glr.c (YYTOKEN_TABLE): New macro.
9398 (yytname): Define if YYTOKEN_TABLE.
9399 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9400 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9401 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9402 * src/output.c (prepare_symbols): Output token_table_flag.
9403
9404 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9405
9406 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9407 again if the first call fails.
9408
9409 * data/glr.c (yytnamerr): New function.
9410 (yyreportSyntaxError): Use it to dequote most string literals.
9411 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9412 with other skeletons. All uses changed.
9413 (yytnameerr_): New function.
9414 (yyreport_syntax_error): Use it to dequote most string literals.
9415 * data/yacc.c (yytnamerr): New function.
9416 (yyerrlab): Use it to decode most string literals.
9417 * doc/bison.texinfo (Decl Summary, Calling Convention):
9418 Clarify quoting convention of yytname.
9419 * src/output.c (prepare_symbols): Quote all names. This undoes
9420 the 2005-04-17 change, which is now accomplished (mostly) via
9421 changes in the parsers as described above.
9422 * tests/regression.at (Token definitions, Web2c Actions):
9423 Undo most 2005-04-17 change here, too.
9424
9425 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9426
9427 Fix more problems reported by twlevo@xs4all.nl.
9428 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9429 remove trailing spaces. This loses the exit status of ./types,
9430 and isn't needed since ./types shouldn't be emitting trailing
9431 spaces.
9432 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9433 as the stack isn't valid in that case.
9434
9435 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9436 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9437 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9438 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9439 is used.
9440 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9441 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9442 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9443 Likewise.
9444
9445 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9446 overly-picky compilers that reject 'char *foo = "bar";'.
9447
9448 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9449 to FILE * parameter, not to stderr. This fixes a typo introduced
9450 in the 2005-07-12 change.
9451
9452 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9453 warnings from GCC 4.
9454
9455 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9456 (yyglrShiftDefer, yysplitStack):
9457 Remove unused parameters b4_pure_formals. All uses changed.
9458 (yyglrShift): Remove unused parameters b4_user_formals.
9459 All uses changed.
9460 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9461
9462 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9463
9464 Destructor cleanups and regularization among the three skeletons.
9465 * NEWS: Document the behavior changes.
9466 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9467 stack before failing, as the cleanup code will do it for us now.
9468 * data/lalr1.cc (yyerrlab): Likewise.
9469 * data/glr.c (yyparse): Pop everything off the stack before
9470 freeing it, so that destructors get called properly.
9471 * data/lalr1.cc (yyreturn): Likewise.
9472 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9473 This is more consistent.
9474 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9475 why destructors might be called. 1.875 -> 2.1.
9476 (Destructor Decl, Decl Summary, Table of Symbols):
9477 Some English-language cleanups for %destructor.
9478 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9479 Add output line for destructor of start symbol.
9480 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9481 because of that same extra output line.
9482
9483 * NEWS: Document minor wording changes in diagnostics of
9484 Bison-generated parsers.
9485 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9486 Remove unused formals. All uses changed.
9487 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9488 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9489 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9490 Rename yyoverflowab to yyexhaustedlab.
9491 When memory exhaustion occurs during syntax-error reporting,
9492 report it separately rather than in a single diagnostic; this
9493 eases translation.
9494 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9495 (Memory Exhausted): Renamed from Parser Stack Overflow.
9496 Revamp wording slightly to prefer "memory exhaustion".
9497 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9498
9499 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9500
9501 Add i18n support to the GLR skeleton. Partially fix the C++
9502 skeleton; a C++ expert needs to finish this. Remove debugging
9503 msgids; there's little point to having them translated, since they
9504 can be understood only by someone who can read the
9505 (English-language) source code.
9506
9507 Generate runtime-po/bison-runtime.pot automatically, so that we
9508 don't have to worry about garbage getting in that file. We'll
9509 make sure after the next official release that old msgids don't
9510 get lost. See
9511 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9512
9513 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9514 Now auto-generated.
9515 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9516 Fix typos in explanations of the runtime file.
9517 * bootstrap: Change gettext keyword from YYI18N to YY_.
9518 Use standard Makefile.in.in in runtime-po, since we'll arrange
9519 for backward-compatible bison-runtime.po files in a different way.
9520 * data/glr.c (YY_): New macro, from yacc.c.
9521 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9522 Translate messages intended for users.
9523 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9524 the wording in the other skeletons. We don't know that the memory
9525 is virtual.
9526 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
9527 Use same method that yacc.c uses.
9528 Don't translate debugging messages.
9529 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9530 it doesn't work (yet), and requires C++ expertise to fix.
9531 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
9532 Move defn to a more logical place, to be consistent with other
9533 skeletons.
9534 Don't translate debugging messages.
9535 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9536 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
9537 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
9538 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9539
9540 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9541 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9542 void, not int.
9543 * tests/glr-regression.at (Badly Collapsed GLR States):
9544 Likewise.
9545 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9546 yylex should return 0 at EOF rather than aborting.
9547
9548 Improve tests for stack overflow in GLR parser.
9549 Problem reported by twlevo@xs4all.nl.
9550 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9551 All uses removed.
9552 (yyStackOverflow): Just longjmp, but with value 2 so that caller
9553 can handle the problem.
9554 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9555 (yyparse): New local variable yyresult to record the result.
9556 Use result of setjmp to set it, rather than storing itinto
9557 struct.
9558 (yyDone): Remove label.
9559 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9560 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
9561 if YYABORT is used).
9562 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9563 yyparse status; put status > 1 into diagnostic.
9564 Check that status==2 works.
9565 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9566 Use exit status 3 for failure to open (which shouldn't happen).
9567
9568 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9569
9570 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9571 1 on syntax error; just let yyparse do its thing.
9572 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9573 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9574 (Exploding the Stack Size with Alloca):
9575 (Exploding the Stack Size with Malloc):
9576 Expect exit status 2, not 1, since the parser is supposed to blow
9577 its stack. Problem reported by twlevo@xs4all.nl.
9578
9579 * data/glr.c (yyparse): Don't assume that the initial calls
9580 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9581 Print a stack-overflow message and fail instead.
9582 Initialize the line-number information before creating the stack,
9583 so that the stack-overflow message can report line zero safely.
9584
9585 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9586
9587 Fix problems reported by twlevo@xs4all.nl.
9588 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9589 (yyuserMerge): Provide a default case if b4_mergers is empty.
9590 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9591 * tests/glr-regression.at
9592 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9593 Add casts to pacify C++ compilers.
9594 * tests/glr-regression.at (Improper merging of GLR delayed action
9595 sets): Declare yylex before using it.
9596 * tests/Makefile.am (maintainer-check-g++): Fix a stray
9597 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9598 test for valgrind; valgrind is independent of g++.
9599 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9600 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9601 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9602 Use a destructor, so that we can expand the stack. Change
9603 YYSTYPE to char * so that we can free it. Cast result of malloc.
9604
9605 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9606
9607 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9608 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9609
9610 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9611
9612 * PACKAGING: New file, suggested by Bruno Haible and taken from
9613 similar wording in gettext's PACKAGING file.
9614 * NEWS: Mention PACKAGING.
9615 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9616
9617 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9618
9619 * NEWS: Document recent i18n improvements.
9620 * bootstrap: Get runtime translations into runtime-po.
9621 Create runtime-po files automatically, if possible.
9622 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9623 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9624 does not infringe on the user's name space.
9625 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9626 * doc/bison.texinfo (Internationalization): Revamp the English
9627 and Texinfo syntax a bit, to try to make it clearer.
9628 (Bison Options, Option Cross Key): Mention --print-localedir.
9629 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9630 YYENABLE_NLS. Quote a bit more.
9631 * runtime-po/.cvsignore: New file.
9632 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9633 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9634 * runtime-po/quot.sed: Likewise.
9635 * runtime-po/boldquot.sed: Likewise.
9636 * runtime-po/en@quot.header: Likewise.
9637 * runtime-po/en@boldquot.header: Likewise.
9638 * runtime-po/insert-header.sin: Likewise.
9639 * runtime-po/remove-potcdate.sin: Likewise.
9640 * runtime-po/Makevars: Likewise.
9641 * runtime-po/LINGUAS: Likewise.
9642 * runtime-po/de.po: Likewise; we will rely on the translation project
9643 to maintain this, so "bootstrap" should get it.
9644 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
9645 its value.
9646 * src/main.c (main): Bind the bison-runtime domain, too.
9647
9648 2005-07-12 Bruno Haible <bruno@clisp.org>
9649
9650 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9651 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9652 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9653 * runtime-po: New directory.
9654 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9655 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9656 * runtime-po/Rules-quot: New file, copied from po/.
9657 * runtime-po/quot.sed: Likewise.
9658 * runtime-po/boldquot.sed: Likewise.
9659 * runtime-po/en@quot.header: Likewise.
9660 * runtime-po/en@boldquot.header: Likewise.
9661 * runtime-po/insert-header.sin: Likewise.
9662 * runtime-po/remove-potcdate.sin: Likewise.
9663 * runtime-po/Makevars: New file.
9664 * runtime-po/POTFILES.in: New file.
9665 * runtime-po/LINGUAS: New file.
9666 * runtime-po/bison-runtime.pot: New file.
9667 * runtime-po/de.po: New file.
9668 * m4/bison.m4: New file.
9669 * Makefile.am (SUBDIRS): Add runtime-po.
9670 (aclocaldir, aclocal_DATA): New variables.
9671 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9672 Define aclocaldir.
9673 * src/getargs.c (usage): Document --print-localedir option.
9674 (PRINT_LOCALEDIR_OPTION): New enum item.
9675 (long_options): Add --print-localedir option.
9676 (getargs): Handle --print-localedir option.
9677 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9678 (Internationalization): New section.
9679
9680 2005-07-12 Akim Demaille <akim@epita.fr>
9681
9682 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9683 for consistency with the rest of the code.
9684 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9685 Add separators.
9686
9687 2005-07-12 Akim Demaille <akim@epita.fr>
9688
9689 * src/parse-gram.y: Use %printer instead of YYPRINT.
9690
9691 2005-07-12 Akim Demaille <akim@epita.fr>
9692
9693 * src/symtab.h, src/symtab.c (symbol_print): New.
9694 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9695 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9696
9697 2005-07-12 Akim Demaille <akim@epita.fr>
9698
9699 * data/glr.c (b4_syncline): Fix (swap) the definitions of
9700 b4_at_dollar and b4_dollar_dollar.
9701
9702 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9703
9704 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9705 and Pennello's paper.
9706
9707 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9708
9709 * data/yacc.c (yyparse): Undo previous patch. Instead,
9710 set yylsp[0] and yyvsp[0] only if the initial action
9711 sets yylloc and yylval, respectively.
9712
9713 * data/yacc.c (yyparse): In the initial action, set
9714 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9715 This avoids the use of undefined variables if the initial
9716 action does not set yylloc and/or yylval.
9717
9718 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9719
9720 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9721 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9722 Remove from CVS. These files are automatically generated.
9723 * examples/extexi: Clarify that this file is now part of Bison,
9724 not GNU M4, and that it works with any POSIX-compatible Awk.
9725 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9726 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9727 so that we also get calc++-parser.yy. Geneate it.
9728 Use $(AWK), not gawk, since any conforming Awk will do.
9729 Put comment before action, since older 'make' can't handle comment
9730 in action.
9731 $(BUILT_SOURCES): List all built sources, not just some of them.
9732 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9733 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9734 $($(calc_sources_generated)): Remove unnecessary test for existence
9735 of target. (This had a shell syntax error anyway; a stray "x".)
9736 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9737 calc++-parser.yy.
9738 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9739
9740 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9741 implied by the other modules.
9742
9743 2005-07-06 Akim Demaille <akim@epita.fr>
9744
9745 Bind examples/calc++ to the package.
9746 * examples/calc++/Makefile: Remove, replaced by...
9747 * examples/calc++/Makefile.am: ... this new file.
9748 * examples/calc++/test: Remove input.
9749 * examples/calc++/compile: Remove.
9750 * examples/Makefile.am: New.
9751 * configure.ac, Makefile.am: Adjust.
9752 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9753
9754 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9755
9756 * data/glr.c (yyFail): Drastically simplify; since the format argument
9757 never had any % directives, we can simply pass it to yyerror.
9758 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9759 be modified later, as that is the usual style in glr.c.
9760 Problems reported by Paul Hilfinger.
9761
9762 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9763 and size overflow errors.
9764 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9765 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9766 (YYSIZEMAX): New macro.
9767 (yystpcpy): New function, taken from yacc.c.
9768 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9769 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9770 so that we don't have to maintain their signatures.
9771 (yyFail): Check for buffer overflow, by using vsnprintf rather
9772 than vsprintf. Allocate a bigger buffer if possible.
9773 Report an error if buffer allocation fails.
9774 (yyStackOverflow): New function.
9775 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9776 the initialization was successful. It might fail if storage was
9777 exhausted.
9778 (yyexpandGLRStack): Add more checks for storage allocation failure.
9779 Use yyStackOverflow to report failures.
9780 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9781 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9782 Don't assume stack number fits in int.
9783 (yysplitStack): Check for storage allocation failure.
9784 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9785 can print diagnostics on storage allocation failure. All callers
9786 changed.
9787 (yyresolveValue): Use yybool for boolean.
9788 (yyreportSyntaxError): Check for size-calculation overflow.
9789 This code is taken from yacc.c.
9790 (yyparse): Check for storage allocation errors when allocating
9791 the initial stack.
9792
9793 2005-07-05 Akim Demaille <akim@epita.fr>
9794
9795 Extract calc++ from the documentation.
9796 * doc/bison.texinfo (Calc++): Add the extraction marks.
9797 * examples/extexi: New, from the aborted GNU Programming 2E.
9798 Separate the different paragraph of a file with empty lines.
9799 * examples/Makefile: Use it to extract the whole calc++ example.
9800
9801 2005-06-24 Akim Demaille <akim@epita.fr>
9802
9803 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9804 class typedefs.
9805
9806 2005-06-22 Akim Demaille <akim@epita.fr>
9807
9808 * doc/bison.texinfo (C++ Language Interface): First stab.
9809 (C++ Parsers): Remove.
9810
9811 2005-06-22 Akim Demaille <akim@epita.fr>
9812
9813 * data/lalr1.cc (yylex_): Honor %lex-param.
9814
9815 2005-06-22 Akim Demaille <akim@epita.fr>
9816
9817 Start a set of simple examples.
9818 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9819 * examples/calc++/calc++-driver.hh,
9820 * examples/calc++/calc++-parser.yy,
9821 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9822 * examples/calc++/compile, examples/calc++/test: New.
9823
9824 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9825
9826 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9827 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9828 which stems from the 2005-05-27 patch.
9829
9830 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9831
9832 * data/glr.c: Modify treatment of unused parameters to permit use
9833 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9834
9835 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9836
9837 Fix infringement on user name space reported by Janos Zoltan Szabo.
9838 * data/yacc.c (yyparse): strlen -> yystrlen.
9839
9840 2005-05-30 Akim Demaille <akim@epita.fr>
9841
9842 * data/lalr1.cc (_): New.
9843 Translate the various messages.
9844
9845 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9846
9847 Fix infringement on user name space reported by Bruno Haible.
9848 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9849 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9850 the user's name space.
9851 (alloca): Include <stdlib.h> to get it, if it's not built in.
9852 (YYMALLOC, YYFREE): Define only if needed.
9853 (malloc, free): Declare, but only if needed, as this infringes on
9854 the user name space.
9855
9856 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9857
9858 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9859 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9860 with %d format.
9861 * lib/ebitset.c (min, max): Undef before defining.
9862 * lib/vbitset.c (min, max): Likewise.
9863 * lib/subpipe.c (create_subpipe): Save local variables in case
9864 vfork clobbers them.
9865
9866 2005-05-24 Bruno Haible <bruno@clisp.org>
9867
9868 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9869 error message syntax used by gcc-4.0.
9870
9871 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9872
9873 * README: Mention m4 1.4.3. Remove obsolete advice about
9874 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9875
9876 * bootstrap: Remove workaround for problem I encountered with
9877 gettext 0.14.1; it seems to be fixed now.
9878
9879 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9880
9881 * NEWS: Version 2.0a.
9882
9883 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9884 the previous change.
9885
9886 Various maintainer cleanups.
9887 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9888 conftest*, for benefit of CVS commands run at the same time as
9889 "configure". Add build-aux, since "bootstrap" now creates it and
9890 its subfiles.
9891 * Makefile.cfg (move_if_change): Remove.
9892 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9893 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9894 (po_repo, do-po-update, po-update, wget_files, get-targets):
9895 (config.guess-url_prefix, config.sub-url_prefix):
9896 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9897 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9898 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9899 Remove.
9900 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9901 this is now the recommended name.
9902 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9903 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9904 ylwrap. These files now go into build-aux.
9905 * config/move-if-change: Remove.
9906 * config/prev-version.txt: Bump from 1.75 to 2.0.
9907
9908 * bootstrap: Add stdio-safer, unistd-safer modules.
9909 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9910 we don't need it).
9911 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9912 fopen-safer.c, stdio-safer.h, unistd-safer.h.
9913 * lib/subpipe.c: Include "unistd-safer.h".
9914 (create_subpipe): Make sure all the newly-created
9915 file descriptors are > 2, so that diagnostics don't
9916 get sent down them (which might cause Bison to hang, in theory).
9917 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9918 * src/files.c (xfopen): Use fopen_safer, not fopen.
9919
9920 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
9921 yesterday's yacc.c fix.
9922
9923 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
9924
9925 * data/glr.c, data/lalr1.cc: Update copyright date.
9926
9927 Fix a destructor bug reported by Wolfgang Spraul in
9928 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
9929 * data/yacc.c (yyabortlab): Don't call destructor, and
9930 don't set yychar to EMPTY.
9931 (yyoverflowlab): Don't call destructor.
9932 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
9933 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
9934 since we no longer output the message "discarding lookahead token
9935 end of input ()".
9936
9937 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9938
9939 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
9940 fix a small glitch in debugging output.
9941 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
9942 after YY_SYMBOL_PRINT where needed.
9943
9944 (struct yyGLRState): Add some comments.
9945 (struct yySemanticOption): Add some comments.
9946 (union yyGLRStackItem): Add comment.
9947
9948 (yymergeOptionSets): Correct this to properly perform the union,
9949 avoiding infinite reported by Michael Rosien.
9950 Update comment.
9951
9952 * tests/glr-regression.at: Add test for GLR merging error reported
9953 by M. Rosien.
9954
9955 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
9956
9957 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
9958 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
9959 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
9960 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
9961 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
9962 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
9963 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
9964 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
9965 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
9966 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
9967 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
9968 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
9969 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
9970 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
9971 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
9972 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
9973 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
9974 src/derives.h, src/files.c, src/files.h, src/getargs.c,
9975 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
9976 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
9977 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
9978 src/output.h, src/parse-gram.c, src/parse-gram.h,
9979 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
9980 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
9981 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
9982 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
9983 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
9984 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
9985 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
9986 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
9987 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
9988 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
9989 tests/reduce.at, tests/regression.at, tests/sets.at,
9990 tests/synclines.at, tests/testsuite.at, tests/torture.at:
9991 Update FSF postal mail address.
9992
9993 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
9994
9995 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
9996 Problem reported by Ralf Menzel.
9997
9998 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
9999
10000 * tests/actions.at: Test that stack overflow invokes destructors.
10001 From Marcus Holland-Moritz.
10002 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10003 from here....
10004 (yyreturn): to here. That way, destructors are called properly
10005 even if the stack overflows, or the user calls YYACCEPT or
10006 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10007 (yyoverflowlab): Destroy the lookahead.
10008
10009 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10010
10011 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10012
10013 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10014
10015 * NEWS: Bison-generated C parsers no longer quote literal strings
10016 associated with tokens.
10017 * src/output.c (prepare_symbols): Don't escape strings,
10018 since users don't want to see C escapes.
10019 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10020 in diagnostics.
10021 * tests/input.at (Torturing the Scanner): Likewise.
10022 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10023
10024 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10025
10026 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10027 the data size is known to be too small and we can't increase it.
10028 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10029
10030 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10031
10032 * src/parse-gram.y: Include quotearg.h.
10033 (string_as_id): Quote $1 before using it as a key, since the
10034 lexer no longer quotes it for us.
10035 (string_content): Don't strip quotes, since lexer no longer
10036 quotes it for us.
10037 * src/scan-gram.l: Include quotearg.h.
10038 ("\""): Omit quote.
10039 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10040 a key, since the rest of the lexer doesn't quote it.
10041 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10042 * tests/regression.at (Token definitions): Check for backslashes
10043 in token strings.
10044
10045 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10046 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10047 (yyparse): Revamp code to generate long syntax error message, to
10048 make it easier to translate, and to avoid problems with arithmetic
10049 overflow. Change "virtual memory" to "memory" in diagnostic, since
10050 we don't know whether the memory is virtual.
10051
10052 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10053
10054 * NEWS: Bison-generated C parsers now use the _ macro to
10055 translate strings.
10056 * data/yacc.c (_) [!defined _]: New macro.
10057 All English strings wrapped inside this macro.
10058 * doc/bison.texinfo (Bison Parser): Document _.
10059 * po/POTFILES.in: Include src/parse-gram.c, since it now
10060 includes translateable strings that parse-gram.y doesn't.
10061
10062 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10063
10064 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10065 reverting the 2004-10-11 change to this function.
10066 (symbol_check_alias_consistency): Don't call symbol_type_set
10067 if the type name is already correct.
10068 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10069
10070 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10071
10072 * tests/regression.at (Token definitions): Don't use a token named
10073 c, as that generates a "#define c ..." that runs afoul of buggy
10074 stdlib.h that uses the identifier c as a member of struct
10075 drand48_data. Problem reported by Horst Wente.
10076
10077 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10078
10079 * bootstrap: Change translation URL from
10080 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10081 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10082 redirection glitches. Problem reported by twlevo@xs4all.nl.
10083
10084 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10085
10086 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10087 after operands; POSIX says this isn't portable for the c99 command.
10088
10089 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10090
10091 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10092 immediately if a data overrun has occurred; this may help us track
10093 down what may be a spurious failure on MacOS.
10094
10095 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10096
10097 Respond to problems reported by twlevo@xs4all.nl.
10098
10099 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10100
10101 * src/vcg.h: Comment fix.
10102 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10103 (G_CMAX): Change to -1 instead of INT_MAX.
10104
10105 * data/yacc.c (yyparse): Omit spaces before #line.
10106
10107 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10108
10109 * src/tables.c (state_number_to_vector_number): Put it inside an
10110 "#if 0", since it's not currently used. Problem reported by
10111 Roland McGrath.
10112
10113 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10114
10115 * src/output.c (escaped_output): Renamed from
10116 escaped_file_name_output, since we now use it for symbol tags as
10117 well. All uses changed.
10118 (symbol_destructors_output, symbol_printers_output):
10119 Escape symbol tags too.
10120 Problem reported by Matyas Forstner in
10121 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10122
10123 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10124 not needed.
10125 * src/output.c (user_actions_output, token_definitions_output,
10126 symbol_destructors_output, symbol_printers_output): Likewise.
10127 * src/reader.c (prologue_augment): Likewise.
10128 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10129
10130 * src/vcg.c (output_edge): Don't quote linestyle arg.
10131 Problem reported by twlevo@xs4all.nl.
10132
10133 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10134
10135 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10136 example, reported by Derek M Jones. Also, make the example even
10137 more outrageous, to better illustrate how bad the problem is.
10138
10139 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10140
10141 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10142 putsym. Typo reported by Sebastian Piping.
10143
10144 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10145
10146 * doc/bison.texinfo (Language and Grammar): some -> same
10147 (Epilogue): int he -> in the
10148 Typos reported by Sebastian Piping via Justin Pence.
10149
10150 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10151
10152 * tests/glr-regression.at (Improper handling of embedded actions
10153 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10154 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10155 with dollar signs in test names.
10156 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10157 for a similar reason.
10158
10159 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10160
10161 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10162 wants to redefine G_VIEW.
10163
10164 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10165
10166 * src/vcg.c (get_view_str): Remove case for normal_view.
10167 Problem reported by twlevo@xs4all.nl.
10168
10169 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10170
10171 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10172 Problem reported by twlevo@xs4all.nl.
10173
10174 * doc/bison.texinfo: Change @dircategory from "GNU programming
10175 tools" to "Software development". Requested by Richard Stallman
10176 via Karl Berry.
10177
10178 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10179
10180 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10181 Problem reported by twlevo@xs4all.nl.
10182
10183 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10184
10185 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10186 keyword; it's not needed with modern compilers, and it doesn't
10187 affect correctness with older compilers. Suggested by
10188 twlevo@xs4all.nl.
10189
10190 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10191
10192 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10193 gcc -Wswitch-default.
10194 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10195 * data/yacc.c (yyparse): Likewise.
10196
10197 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10198
10199 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10200 already. Let config.h define any nonstandard values.
10201
10202 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10203
10204 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10205 for the benefit of slower hosts. Problem reported by
10206 Nelson H. F. Beebe.
10207
10208 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10209
10210 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10211 being defined and not used.
10212 * data/lalr1.cc (yyparse): Likewise.
10213 Use "if (false)" rather than "if (0)".
10214
10215 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10216
10217 * TODO: Mention that we should allow NUL bytes in tokens.
10218
10219 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10220
10221 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10222 Problem reported by Hans Aberg.
10223
10224 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10225
10226 * src/getargs.c (version): Happy new year; update overall
10227 program copyright date from 2004 to 2005.
10228
10229 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10230 Problem reported by Hans Aberg.
10231 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10232 (Output file names.): Add a test for the case when standard output
10233 is closed.
10234
10235 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10236
10237 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10238 to fix an oversight in the Bison 2.0 manual.
10239
10240 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10241
10242 * NEWS: Version 2.0. Reformat the existing news items since
10243 1.875, so that related items are grouped together.
10244 * configure.ac (AC_INIT): Bump version to 2.0.
10245 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10246
10247 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10248 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10249 otherwise, we're not testing alloca. Unfortunately there's no
10250 simple way to consult HAVE_ALLOCA here.
10251
10252 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10253 for yymsg, too.
10254
10255 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10256 hand. This avoids a warning about comparing int to size_t when
10257 GCC warnings are enabled.
10258
10259 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10260
10261 * NEWS: Bison-generated parsers no longer default to using the
10262 alloca function (when available) to extend the parser stack, due
10263 to widespread problems in unchecked stack-overflow detection.
10264 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10265 responsibility to set it to a positive value. This lets the user
10266 specify a value that is not a preprocessor constant.
10267 * data/yacc.c (YYMAXDEPTH): Likewise.
10268 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10269 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10270 to be a compile-time constant. However, explain the constraints on it.
10271 Also, explain the constraints on YYINITDEPTH.
10272 (Table of Symbols): Explain that alloca is no longer the default.
10273 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10274 to 1.
10275
10276 * doc/bison.texinfo (Location Default Action): Mention that n must
10277 be zero when k is zero. Suggested by Frank Heckenbach.
10278
10279 2004-12-22 Akim Demaille <akim@epita.fr>
10280
10281 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10282 (parser::state_type, parser::semantic_type, parser::location_type):
10283 Private, not public.
10284 (parser::parse): Return ints, not bool.
10285 Returning a bool introduces a problem: 0 corresponds to false, and
10286 it seems weird to return false on success. Returning true changes
10287 the conventions for yyparse.
10288 Alternatively we could return void and send an exception.
10289 There is no clear consensus (yet?).
10290 (state_stack, semantic_stack, location_stack): Rename as...
10291 (state_stack_type, semantic_stack_type, location_stack_type): these.
10292 Private, not public.
10293 * tests/c++.at: New.
10294 * tests/testsuite.at, tests/Makefile.am: Adjust.
10295
10296 2004-12-21 Akim Demaille <akim@epita.fr>
10297
10298 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10299
10300 2004-12-21 Akim Demaille <akim@epita.fr>
10301
10302 Don't impose std::string for filenames.
10303
10304 * data/lalr1.cc (b4_filename_type): New.
10305 (position::filename): Use it.
10306 (parser.hh): Move the inclusion of stack.hh and location.hh below
10307 the user code, so that needed headers for the filename type can be
10308 included first.
10309 Forward declare them before the user code.
10310 * tests/Makefile.am (check-local, installcheck-local): Pass
10311 TESTSUITEFLAGS to the TESTSUITE.
10312
10313 2004-12-20 Akim Demaille <akim@epita.fr>
10314
10315 Use more STL like names: my_class instead of MyClass.
10316
10317 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10318 (SemanticStack, SemanticType, StateStack, StateType)
10319 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10320 (Parser::value): Rename as...
10321 (location_stack, location_type, rhs_number_type, semantic_stack)
10322 (semantic_type, state_stack, state_type, token_number_type, stack)
10323 (slice, traits, parser::yylloc, parser::yylval): these.
10324
10325 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10326
10327 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10328
10329 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10330 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10331
10332 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10333
10334 Remove uses of 'short int' and 'unsigned short int'. This raises
10335 some arbitrary limits. It uses more memory but nowadays that's
10336 not much of an issue.
10337
10338 This change does not affect the generated parsers; that's a different
10339 task, as some users will want to conserve memory there.
10340
10341 Ideally we should use size_t to represent all object counts, and
10342 something like ptrdiff_t to represent signed differences of object
10343 counts; but that will require more code-cleanup than I have the
10344 time to do right now.
10345
10346 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10347 Use size_t, not int or short int, to count objects.
10348 * src/closure.c (nritemset, closure): Likewise.
10349 * src/closure.h (nritemset, closure): Likewise.
10350 * src/nullable.c (nullable_compute): Likewise.
10351 * src/print.c (print_core): Likewise.
10352 * src/print_graph.c (print_core): Likewise.
10353 * src/state.c (state_compare, state_hash): Likewise.
10354 * src/state.h (struct state): Likewise.
10355 * src/tables.c (default_goto, goto_actions): Likewise.
10356
10357 * src/gram.h (rule_number, rule): Use int, not short int.
10358 * src/output.c (prepare_rules): Likewise.
10359 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10360 errs, reductions): Likewise.
10361 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10362 Likewise.
10363 * src/tables.c (vector_number, tally, action_number,
10364 ACTION_NUMBER_MINIMUM): Likewise.
10365 * src/output.c (muscle_insert_short_int_table): Remove.
10366
10367 2004-12-17 Akim Demaille <akim@epita.fr>
10368
10369 * data/lalr1.cc: Extensive Doxygenation.
10370 (error_): Rename as...
10371 (error): this, since it is visible to the user.
10372 Adjust callers.
10373 (Parser::message): Now an automatic variable from...
10374 (Parser::yyreport_syntax_error_): here.
10375 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10376 Parser::error.
10377 * tests/input.at: Escape $.
10378
10379 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10380
10381 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10382 Parenthesize rhs to avoid obscure problems with mistakes like
10383 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10384 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10385 b4_rhs_location): Likewise.
10386 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10387 b4_rhs_location): Likewise.
10388
10389 2004-12-16 Akim Demaille <akim@epita.fr>
10390
10391 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10392 yacc.c: be sure to stay within yycheck_.
10393 * tests/actions.at: Re-enable C++ tests.
10394
10395 2004-12-16 Akim Demaille <akim@epita.fr>
10396
10397 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10398 real.
10399
10400 2004-12-16 Akim Demaille <akim@epita.fr>
10401
10402 Use #define to handle the %name-prefix.
10403
10404 * data/glr.c, data/yacc.c: Comment changes.
10405 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10406 so that one can refer to yylex in the parser file, and have it
10407 renamed, as is the case with other skeletons.
10408
10409 2004-12-16 Akim Demaille <akim@epita.fr>
10410
10411 Move lalr1.cc internals into yy*.
10412
10413 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10414 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10415 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10416 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10417 (empty_, final_, terror_, errcode_, ntokens_)
10418 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10419 (looka_, ilooka_, error_range_, nerrs_):
10420 Rename as...
10421 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10422 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10423 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10424 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10425 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10426 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10427 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10428 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10429 these.
10430
10431 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10432
10433 Fix some problems reported by twlevo at xs4all.
10434 * src/symtab.c (symbol_new): Report an error if the input grammar
10435 contains too many symbols. This is better than calling abort() later.
10436 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10437 (struct node, struct graph):
10438 Rename member expand to stretch. All uses changed.
10439 (struct graph): Remove member layoutalgorithm. All uses removed.
10440 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10441 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10442 All uses changed.
10443 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10444
10445 2004-12-15 Akim Demaille <akim@epita.fr>
10446
10447 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10448 Add more Doxygen comments.
10449 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10450 (report_syntax_error_, translate_): Rename as...
10451 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10452 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10453
10454 2004-12-15 Akim Demaille <akim@epita.fr>
10455
10456 * data/lalr1.cc (lex_): Rename as...
10457 (yylex_): this.
10458 Move the trace here.
10459 Take the %name-prefix into account.
10460 Reported by Alexandre Duret-Lutz.
10461
10462 2004-12-15 Akim Demaille <akim@epita.fr>
10463
10464 Simplify the C++ parser constructor.
10465
10466 * data/lalr1.cc (debug_): Rename as...
10467 (yydebug_): so that the parser's internals are always in the yy*
10468 pseudo namespace.
10469 Adjust uses.
10470 (b4_parse_param_decl): Remove the leading comma as it is now only
10471 called as unique argument list.
10472 (Parser::Parser): Remove the constructor accepting a location and
10473 an initial debugging level.
10474 Remove from the other ctor the argument for the debugging level.
10475 (debug_level_type, debug_level, set_debug_level): New.
10476
10477 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10478 constructor calls.
10479
10480 2004-12-15 Akim Demaille <akim@epita.fr>
10481
10482 Remove b4_root related material: failure experiment
10483 (which goal was to allow to derive from a class).
10484
10485 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10486 definitions and uses.
10487
10488 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10489
10490 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10491 not 2, since it's not portable to subtract 1 from the start of an
10492 array. The new item 0 is never set or used. All uses changed.
10493
10494 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10495 the default definition of YYLLOC_DEFAULT. Problem reported
10496 by Frank Heckenbach.
10497
10498 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10499
10500 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10501 the normal case and one for the error case. Just use the
10502 first one uniformly. Problem reported by Frank Heckenbach.
10503 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10504 use exactly the same macro in both places.
10505 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10506 so that the normal-case YYRHSLOC works for the error case too.
10507 All uses changed.
10508 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10509 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10510 * doc/bison.texinfo (Location Default Action): Don't claim that
10511 we have an array of locations. Use the same macro for both glr
10512 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10513 the index is 0.
10514
10515 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10516
10517 * HACKING: Update email addresses to send announcements to.
10518
10519 * configure.ac (AC_INIT): Bump version to 1.875f.
10520
10521 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10522
10523 * NEWS: Version 1.875e.
10524 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10525
10526 * src/scan-skel.l: Include "complain.h", for "fatal".
10527
10528 * src/relation.h (relation_print, relation_digraph):
10529 Relation sizes are of type relation_node, not size_t (this is
10530 merely a doc fix, since the two types are equivalent).
10531 (relation_transpose): Relation sizes are of type relation_node,
10532 not int.
10533 * src/relation.c: Likewise.
10534 (top, infinity): Now of type relation_node, not int.
10535 (traverse, relation_transpose): Use relation_node, not int.
10536
10537 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10538 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10539 (yyparse): Remove unused local introduced in 2004-10-25 patch.
10540
10541 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
10542 specifying whether the test should be skipped. Use it tp
10543 specify that the [%defines %skeleton "lalr1.cc"] tests currently
10544 fail on some hosts, and should be skipped.
10545
10546 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
10547
10548 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
10549 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10550 unless otherwise specified below.
10551
10552 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10553 to allocate kernel_base, kernel_items, kernel_size, since
10554 they needn't be initialized to 0.
10555 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10556 * src/closure.c (new_closure): Likewise, for itemset.
10557 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10558 * src/lalr.c (set_goto_map): Likewise, for temp_map.
10559 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10560 (build_relations): Likewise for edge, states1, includes.
10561 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10562 * src/reader.c (packgram): Likewise, for ritem, rules.
10563 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10564 * src/relation.c (relation_digraph): Likewise for VERTICES.
10565 (relation_transpose): Likewise for new_R, end_R.
10566 * src/symtab.c (symbols_token_translations_init): Likewise for
10567 token_translations.
10568 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10569 (token_actions): Likewise for yydefact, actrow, conflrow,
10570 conflict_list.
10571 (save_column): Likewise for froms[symno], tos[symno].
10572 (goto_actions): Likewise for state_count.
10573 (pack_table): Likewise for base, pos, check.
10574 (tables_generate): Likewise for width.
10575
10576 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10577 for initial core. Just have a separate core, so we needn't worry
10578 about whether kernel_size and kernel_base are initialized.
10579
10580 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10581 kernel_size, kernel_items): Remove unnecessary initialization.
10582 * src/conflicts.c (conflicts): Likewise.
10583 * src/derives.c (derives): Likewise.
10584 * src/muscle_tablc (muscle_insert): Likewise.
10585 * src/relation.c (relation_digraph): Likewise.
10586 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10587 conflrow, conflict_table, conflict_list, table, check):
10588 Likewise.
10589
10590 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10591 This is because all callers pass unsigned int.
10592 * src/closure.h (new_closure): Likewise.
10593
10594 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10595 (build_relations): Initialize includes[i] in all cases.
10596 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10597 and rules[ruleno].precsym. Initialize members in order.
10598 * src/relation.c (relation_transpose): Always initialize new_R[i]
10599 and end_R[i].
10600 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10601
10602 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10603 conflict_list[0] was always 0, but now it isn't initialized.
10604
10605 * src/table.c (table_grow): When conflict_table grew, the grown
10606 area wasn't cleared. Fix this.
10607
10608 * lib/.cvsignore: Add strdup.c, strdup.h.
10609 * m4/.cvsignore: Add strdup.m4.
10610
10611 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10612
10613 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10614 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10615 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10616 ngotos + 1 without checking for overflow.
10617 (build_relations): Use END_NODE, not -1, to denote end of edges.
10618 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10619 build_relations): Use goto_number, not int, for goto numbers.
10620 * src/tables.c (save_column, default_goto): Likewise.
10621
10622 2004-11-23 Akim Demaille <akim@epita.fr>
10623
10624 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10625 of #defining from yystype.
10626 Don't typedef yystype, C++ does not need it.
10627 This lets it possible to forward declare it as union.
10628
10629 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10630
10631 * bootstrap (gnulib_modules): Add extensions.
10632 Problem reported by Jim Meyering.
10633
10634 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10635
10636 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10637 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10638 src/system.h, src/tables.c: XFREE -> free, to accommodate
10639 recent change to gnulib xalloc.h.
10640 Problem reported by Jim Meyering.
10641
10642 2004-11-17 Akim Demaille <akim@epita.fr>
10643
10644 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10645
10646 2004-11-17 Akim Demaille <akim@epita.fr>,
10647 Alexandre Duret-Lutz <adl@gnu.org>
10648
10649 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10650 changes.
10651 (YYCDEBUG): Adjust.
10652 Use it instead of cdebug_.
10653 (Parser::debug_stream, Parser::set_debug_stream): New.
10654 (Parser::symprint_): Define cdebug_ for temporary backward
10655 compatibility.
10656 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10657 debug_stream ().
10658
10659 2004-11-17 Akim Demaille <akim@epita.fr>
10660
10661 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10662 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10663 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10664 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10665
10666 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10667
10668 * data/glr.c (yyloc_default): Remove; not used.
10669 Problem reported by Frank Heckenbach.
10670
10671 2004-10-25 Akim Demaille <akim@epita.fr>
10672
10673 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10674 Introduce another definition to address simple location arrays.
10675 (yyGLRStack): New member: yyerror_range.
10676 (yyrecoverSyntaxError, yyparse): Update it.
10677 (yyrecoverSyntaxError): Use it when shifting the error token to
10678 have an accurate range, equivalent to the one computed by both
10679 yacc.c and lalr1.cc.
10680 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10681 that column numbers start at column 0, as per GNU Coding
10682 Standards, the others tests, and the doc.
10683 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10684 Adjust to the above change (first column is 0).
10685 And adjust the location of the "<error>", now covering the whole
10686 line.
10687
10688 2004-10-22 Akim Demaille <akim@epita.fr>
10689 and Paul Eggert <eggert@cs.ucla.edu>
10690
10691 Remove some arbitrary limits on goto numbers and relations.
10692 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10693 initial values, since they're never used.
10694 (set_goto_map): ngotos is now unsigned, so test for overflow
10695 by seeing whether it wraps around to zero.
10696 * src/lalr.h (goto_number): Now size_t, not short int.
10697 (GOTO_NUMBER_MAXIMUM): Remove.
10698 * src/relation.c (relation_print, traverse, relation_transpose):
10699 Check for END_NODE rather than looking at sign.
10700 * src/relation.h (END_NODE): New macro.
10701 (relation_node): Now size_t, not short int.
10702
10703 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10704
10705 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10706 keyword, not an identifier. Problem reported by Baron Schwartz in
10707 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10708
10709 2004-10-11 Akim Demaille <akim@epita.fr>
10710
10711 * src/symtab.c (symbol_check_alias_consistency): Also check
10712 type names, destructors, and printers.
10713 Reported by Alexandre Duret-Lutz.
10714 Recode the handling of associativity and precedence in terms
10715 of symbol_precedence_set.
10716 Accept no redeclaration at all, not even equal to the previous
10717 value.
10718 (redeclaration): New.
10719 Use it to factor redeclaration complaints.
10720 (symbol_make_alias): Don't set the type of the alias, let
10721 symbol_check_alias_consistency do it as for other features.
10722 * src/symtab.h (symbol): Add new member prec_location, and
10723 type_location.
10724 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10725 * tests/input.at (Incompatible Aliases): New.
10726
10727 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10728
10729 .cvsignore fixes to accommodate gnulib changes,
10730 and the practice of naming build directories "_build".
10731 * .cvsignore: Add "_*". Sort.
10732 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10733 * m4/.cvsignore: Add "*_gl.m4".
10734
10735 2004-10-06 Akim Demaille <akim@epita.fr>
10736
10737 * src/parse-gram.y (add_param): Fix the truncation of trailing
10738 spaces.
10739
10740 2004-10-05 Akim Demaille <akim@epita.fr>
10741
10742 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10743 whether the reducion was empty or not. This leaves room to
10744 improve the use of YYLLOC_DEFAULT in such a case.
10745 lalr1.cc is still experimental, so changing this is acceptable.
10746 And finally, there are probably not many users who changed the
10747 handling of locations in GLR, so changing is admissible too.
10748
10749 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10750 empty reduction, set @$ to an empty location ending the previously
10751 stacked symbol.
10752 Adjust uses to make sure the code is triggered on empty
10753 reductions.
10754 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10755 expected output: empty reductions have empty locations.
10756
10757 2004-09-29 Akim Demaille <akim@epita.fr>
10758
10759 * data/lalr1.cc: Move towards a more standard C++ coding style
10760 for templates: Class < T > -> Class<T>.
10761
10762 2004-09-29 Akim Demaille <akim@epita.fr>
10763
10764 * data/lalr1.cc: Reinstall the former ctor, for sake of
10765 compatibility, but warn it will be removed.
10766 Move towards a more standard C++ coding style (i.e., type *var ->
10767 type* var).
10768
10769 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10770
10771 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10772 since it's less likely to work if NULs are involved in the future.
10773
10774 2004-09-27 Akim Demaille <akim@epita.fr>
10775
10776 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10777
10778 2004-09-27 Akim Demaille <akim@epita.fr>
10779
10780 * data/lalr1.cc (b4_parse_param_decl_1): New.
10781 (b4_parse_param_decl): Use it to have different names between attribute
10782 and argument names.
10783 (b4_cc_constructor_call): Likewise.
10784
10785 2004-09-24 Akim Demaille <akim@epita.fr>
10786
10787 * src/parse-gram.y (add_param): Strip the leading and trailing
10788 blanks from a formal argument declaration.
10789 (YY_LOCATION_PRINT): New.
10790
10791 2004-09-24 Akim Demaille <akim@epita.fr>
10792
10793 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10794 after the location.
10795
10796 2004-09-24 Akim Demaille <akim@epita.fr>
10797
10798 * doc/bison.texinfo (Table of Symbols): Sort.
10799
10800 2004-09-21 Akim Demaille <akim@epita.fr>
10801
10802 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10803 the useless parentheses.
10804 Suggested by Paul Eggert.
10805
10806 2004-09-20 Akim Demaille <akim@epita.fr>
10807
10808 Let the initial-action act on the look-ahead, and use it for the
10809 "initial push" (corresponding to an hypothetical beginning-of-file).
10810 And let lalr1.cc honor %initial-action.
10811
10812 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10813 example.
10814 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10815 (Parser::Parser): Remove the ctor that used to initialize it.
10816 (Parser::parse): Like in the other skeletons, issue the "starting
10817 parse" message before any action.
10818 Honor %initial-action.
10819 Initialize the stacks with the lookahead.
10820 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10821 look-ahead.
10822 Push them in the stacks.
10823 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10824
10825 2004-09-20 Akim Demaille <akim@epita.fr>
10826
10827 * doc/bison.texinfo (Initial Action Decl): New.
10828
10829 2004-09-20 Akim Demaille <akim@epita.fr>
10830
10831 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10832 clearer criterion to define it.
10833 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10834 When reducing on an empty RHS, use the latest stacked location as
10835 location.
10836 yylloc is not always available.
10837 * data/glr.c: Likewise.
10838 Also, honor initial-actions.
10839
10840 2004-09-20 Akim Demaille <akim@epita.fr>
10841
10842 * data/yacc.c (YY_LOCATION_PRINT): New.
10843 Define when we know YYLTYPE's structure, i.e., when the default
10844 YYLLOC_DEFAULT is used.
10845 * data/c.m4 (b4_yysymprint_generate): Use it.
10846 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10847 value of the result.
10848 (error_start_): Replace with...
10849 (error_range_): this location array.
10850 This allows to replace code relying on the implementation of
10851 locations by portable code.
10852 * data/yacc.c (yylerrsp): Replace with...
10853 (yyerror_range): this.
10854 Every time a token is popped, update yyerror_range[0], to have an
10855 accurate location for the error token.
10856 * data/glr.c (YY_LOCATION_PRINT): New.
10857 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10858 deference a pointer.
10859 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10860 report the location in %printers.
10861
10862 * src/scan-skel.l: Instead of abort, report error messages to ease
10863 understanding skeleton scanning failures.
10864
10865 2004-09-16 Akim Demaille <akim@epita.fr>
10866
10867 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10868 (iterator, const_iterator): these, to be more in the C++ spirit.
10869 Also, return reverse iterators so that when displaying the stack
10870 we display its bottom first.
10871 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10872 from yacc.c.
10873 We should probably use vector here though.
10874
10875 2004-09-16 Akim Demaille <akim@epita.fr>
10876
10877 Have more complete shift traces.
10878
10879 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10880 to report Shifts instead of ad hoc YYDPRINTF invocations,
10881 including for the error token.
10882 * data/lalr1.cc (symprint_): Output the location.
10883 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10884 output the location within the %printer.
10885 Activate GLR tests, at least to make sure they compile properly.
10886 They still don't pass though.
10887 * tests/calc.at: Adjust expect verbose output, since now "Entering
10888 state..." is on a different line than the "Shifting" message.
10889
10890 2004-09-08 Akim Demaille <akim@epita.fr>
10891
10892 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10893 Bison directive from the Bison file to the invocation of this
10894 macro, so that these directives are passed to
10895 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10896 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10897 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10898 the extra Bison directives instead of the whole series.
10899 Change the grammar so that there are recoverable errors, and
10900 unrecoverable errors. Now we can have the parser give up before
10901 consuming the whole input. As a result we now can observe that
10902 the lookahead is freed when needed.
10903 Change the parser source to parse argv[1] instead of a hard coded
10904 string.
10905 Simplify yylex, and give a value and location to EOF.
10906 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10907 passed directives already coded in the file.
10908 Add some tests to check the location of "error".
10909 For some tests, the C++ parser is correct, and not yacc.c.
10910 For other tests, they provide different, but unsatisfying, values,
10911 so keep the C++ value so that at least one parser is "correct"
10912 according to the test suite.
10913 (Actions after errors): Remove, this is subsumed by the
10914 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10915
10916 2004-09-06 Akim Demaille <akim@epita.fr>
10917
10918 * data/lalr1.cc: Adjust the indentation of the labels.
10919 (Parser::pop): New.
10920 Use it.
10921
10922 2004-09-06 Akim Demaille <akim@epita.fr>
10923
10924 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
10925 argument, an informative message.
10926 Call YY_SYMBOL_PRINT.
10927 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
10928 * data/lalr1.cc (destruct_): Likewise.
10929 In addition, no longer depend on b4_yysymprint_generate and
10930 b4_yydestruct_generate to generate these functions, do it "by
10931 hand".
10932
10933 2004-09-03 Akim Demaille <akim@epita.fr>
10934
10935 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
10936 invoked, yydestruct the lookahead.
10937 * tests/calc.at (Calculator $1): Update the expected lengths of
10938 traces: there is an added line for the discarded lookahead.
10939 * doc/bison.texinfo (Destructor Decl): Some rewording.
10940 Define "discarded" symbols.
10941
10942 2004-09-02 Akim Demaille <akim@epita.fr>
10943
10944 * data/lalr1.cc (translate_, destruct_): No reason to be static.
10945
10946 2004-09-02 Akim Demaille <akim@epita.fr>
10947
10948 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
10949 (YYDSYMPRINTF): Rename as...
10950 (YY_SYMBOL_PRINT): this.
10951 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
10952 two.
10953 Use it instead of direct symprint_ calls.
10954 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
10955 one.
10956
10957 2004-09-02 Akim Demaille <akim@epita.fr>
10958
10959 * data/lalr1.cc (b4_yysymprint_generate): New.
10960 (symprint_): New member function, defined when YYDEBUG.
10961 Use it consistently instead of token/nterm debugging output by
10962 hand.
10963 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
10964 %printer calls to use cdebug_ when using lalr1.cc.
10965
10966 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
10967
10968 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
10969 with #ifdef YYDEBUG.
10970
10971 2004-08-26 Akim Demaille <akim@epita.fr>
10972
10973 * doc/bison.texinfo (Implementing Loops): Rename as...
10974 (Implementing Gotos/Loops): this.
10975
10976 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
10977
10978 Adjust to latest gnulib.
10979 * bootstrap (gnulib_modules): Add xalloc-die.
10980 Set LC_ALL=C so that file names sort consistently.
10981 Prefer the gnulib copies of gettext.m4, glibc21.m4,
10982 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
10983 uintmax_t.m4, ulonglong.m4.
10984 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
10985 po.m4 since we are now using _gl.m4 instead.
10986
10987 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
10988
10989 * src/scan-action.l: Remove. Scanning of semantic actions is
10990 handled in scan-gram.l.
10991
10992 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
10993
10994 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
10995
10996 * src/location.h (struct): The file member is a uniqstr.
10997 (equal_boundaries): Use UNIQSTR_EQ for comparison.
10998
10999 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11000
11001 Fix bug with non-%union parsers that have printers or destructors,
11002 which led to a Bison core dump. Reported by Peter Fales in
11003 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11004
11005 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11006 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11007 not to our own type.
11008 * src/output.c (symbol_destructors_output, symbol_printers_output):
11009 Don't assume %union.
11010 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11011 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11012 UNION-FLAG. All callers changed.
11013 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11014 Use type char, not unsigned int, when declaring an array of char;
11015 this lets us remove a cast.
11016 (Printers and Destructors): Add non-%union test cases.
11017
11018 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11019
11020 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11021 GLR writeups. E.g., avoid frenchspacing and the future tense,
11022 change "lookahead" to "look-ahead", and change "wrt" to "with
11023 respect to".
11024
11025 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11026
11027 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11028 New sections, split off from the GLR Parsers section. Put the new
11029 Simple GLR Parser near the start of the GLR section, for clarity.
11030 Rewrite connective text.
11031
11032 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11033
11034 * doc/bison.texinfo (Simple GLR Parsers): New section.
11035
11036 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11037
11038 * NEWS, TODO, doc/bison.texinfo:
11039 Use "look-ahead" instead of "lookahead", to be consistent.
11040 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11041 while we're fixing "look-ahead".
11042 * src/conflicts.c (shift_set): Renamed from shiftset.
11043 (look_ahead_set): Renamed from lookaheadset.
11044 * src/print.c: Likewise.
11045 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11046 name for "lookahead".
11047 (report_types, usage): Likewise.
11048 * src/getargs.h (report_look_ahead_tokens): Renamed from
11049 report_lookaheads.
11050 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11051 compute_lookaheads.
11052 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11053 (look_ahead_tokens_print): Renamed from lookaheads_print.
11054 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11055 state_rule_lookaheads_print.
11056 * src/state.h: Likewise.
11057 (reductions.look_ahead_tokens): Renamed from lookaheads.
11058 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11059 AT_DATA_LOOKAHEADS_GRAMMAR.
11060
11061 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11062
11063 * README: Update location of patched M4 distribution.
11064
11065 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11066
11067 Don't assume the C++ compiler takes the same arguments as the C compiler
11068 (trivial change).
11069 * configure.ac (O0CXXFLAGS): New var.
11070 * tests/atlocal.in (CXXFLAGS): Use it.
11071
11072 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11073
11074 Fix some "make check" problems with C++ reported by
11075 Albert Chin-A-Young for Tru64 C++ in this thread:
11076 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11077
11078 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11079 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11080 Output to a .cc file for C++, not to a .c file.
11081 * tests/calc.at (AT_CHECK_CALC): Likewise.
11082 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11083 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11084
11085 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11086
11087 * tests/calc.at, tests/actions.at: Workaround for SGI
11088 C++ compiler. (trivial change)
11089
11090 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11091
11092 Spent a few hours checking out which prerequisite versions the
11093 current sources actually require. I went all the way back to
11094 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11095 a seemingly endless set of combinations of versions more recent
11096 than that. The bottom line is that the current sources require
11097 fairly recent versions of the build tools, and it'll be some work
11098 to change this.
11099 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11100 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11101 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11102 Add comments explaining why those particular versions are
11103 currently needed.
11104
11105 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11106 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11107 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11108
11109 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11110 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11111
11112 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11113
11114 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11115 0.11.5. Suggested by Bruno Haible.
11116 * bootstrap: Remove gettext version checking.
11117
11118 * doc/bison.texinfo (Decl Summary): Also mention that %union
11119 can depend on prerequisite types. Problem reported by Tim
11120 Van Holder.
11121
11122 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11123
11124 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11125 * README-alpha: Don't tell people not to package this.
11126
11127 * bootstrap: Don't assume $(...) works; use `...` instead.
11128 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11129 gettext better.
11130
11131 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11132 put into the -d output file, and mention what to do if YYSTYPE is
11133 defined as a macro.
11134
11135 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11136
11137 Undo change made earlier today: it caused autopoint to not bring
11138 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11139 autopoint's.
11140
11141 * bootstrap: Check that gettext version matches what's in
11142 configure.ac. Warn users to ignore robots.txt ERROR 404.
11143 * bootstrap: Undo today's earlier change (logged below).
11144 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11145
11146 The gettext version checking is causing more trouble than it's
11147 curing; remove it. Problem reported by Paul Hilfinger.
11148
11149 * bootstrap: Issue a warning that one can expect a message
11150 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11151 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11152
11153 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11154
11155 Ensure that the C++ compiler used for testing actually works on a
11156 simple test program; if not, skip the C++-related tests. Problem
11157 reported by Vin Shelton in:
11158 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11159
11160 * m4/cxx.m4: New file.
11161 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11162 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11163 * tests/local.at (AT_COMPILE_CXX): Use it.
11164
11165 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11166
11167 * data/glr.c (yylloc): Output this macro even if locations are not
11168 being generated, as the GLR parser needs it even in that case.
11169 Problem reported by Troy A. Johnson
11170 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11171
11172 * configure.ac (AC_INIT): Update to 1.875e.
11173
11174 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11175
11176 * NEWS: Version 1.875d.
11177 * configure.ac (AC_INIT): Likewise.
11178 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11179
11180 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11181 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11182 lalr1.cc runs afoul of the first, and the last two are no longer
11183 supported by GCC 3.4.0.
11184 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11185 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11186
11187 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11188
11189 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11190 unsigned int, for compatibility with latest gnulib hash module.
11191 * src/state.c (state_hash, state_hasher): Likewise.
11192 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11193 * src/uniqstr.c (hash_uniqstr): Likewise.
11194
11195 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11196
11197 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11198
11199 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11200 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11201 character and string literals.
11202 (unexpected_end): New function.
11203 (unexpected_eof): Use it.
11204 (unexpected_newline): New function.
11205 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11206 actions.
11207
11208 * NEWS: Document %expect-rr.
11209
11210 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11211 Fix typo by replacing $1 with $option.
11212 Remove more 'intl'-related files.
11213 Don't DEFUN AM_INTL_SUBDIR twice.
11214
11215 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11216 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11217 strtoul.c.
11218 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11219 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11220 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11221 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11222 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11223 * src/.cvsignore: Add *.output.
11224
11225 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11226 gets copied to the output file.
11227
11228 2004-04-28 Paul Eggert <eggert@twinsun.com>
11229
11230 Get files from the gnulib and po repositories, instead of relying
11231 on them being in our CVS. Upgrade to latest versions of gnulib
11232 and Automake.
11233
11234 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11235 * bootstrap: Bootstrap from gnulib and po repositories.
11236 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11237 * README-cvs: Document these changes. Remove version numbers from
11238 mentions of build tools, since they change so often. Mention Flex.
11239
11240 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11241 (gl_USE_SYSTEM_EXTENSIONS): Add.
11242 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11243 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
11244 does this for us.
11245 (AC_ISC_POSIX): Remove; we no longer support this
11246 ancient OS, as it gets in the way of latest Autoconf & gnulib.
11247 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11248 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11249 Do not check for C89 headers, except for locale.h which is used
11250 by the Yacc library and must port to K&R hosts.
11251 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11252 Do not check for C89 functions, except for setlocale which is
11253 used by the Yacc library.
11254 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11255 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11256 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11257 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11258 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11259 AM_GNU_GETTEXT): Remove; now done by:
11260 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11261 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11262 for us.
11263
11264 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11265 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11266 Define to empty, as gnulib.mk will do the rest for us.
11267 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11268 for us.
11269 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11270 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11271
11272 * src/files.c: Include gnulib's xstrndup.h.
11273
11274 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11275 (REALLOC): Use xnrealloc, for likewise.
11276 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11277 (strnlen, memrchr): Remove decls; functions no longer used.
11278 Include <stpcpy.h>.
11279
11280 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11281 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11282 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11283 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11284 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11285 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11286 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11287 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11288 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11289 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11290 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11291 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11292 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11293 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11294 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11295 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11296 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11297 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11298 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11299 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11300 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11301 Remove, as these files are now generated automatically
11302 by bootstrap or automake.
11303
11304 * po/ChangeLog: Remove: all but one entry was a duplicate
11305 of this file, and I moved that 2000-11-02 entry here.
11306
11307 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11308 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11309 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11310 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11311 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11312 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11313 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11314 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11315 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11316 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11317 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11318 xstrndup.h.
11319 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11320 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11321 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11322 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11323 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11324 * src/.cvsignore: Remove *_.c.
11325
11326
11327 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11328 support it. (The latest stable gzip doesn't.)
11329
11330 2004-04-27 Paul Eggert <eggert@twinsun.com>
11331
11332 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11333 case, as stos_ is now used by destructors due to the 2004-02-09
11334 change.
11335
11336 Remove more K&R C support.
11337 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11338 * lib/subpipe.c (errno): Remove decl.
11339 Include <stdlib.h> unconditionally.
11340 (EXIT_FAILURE): Remove macro.
11341 * src/complain.c (vfprintf, strerror): Remove.
11342 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11343 unconditionally.
11344 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11345 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11346 (strchr, strspn, memchr): Remove decls.
11347 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11348 unconditionally. Do not declare perror.
11349 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11350 unconditionally.
11351
11352 * src/complain.c (_): Remove useless defn, as system.h defines this.
11353
11354 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11355 with latest obstack.h.
11356 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11357 to procedure types, as obstack.h now does that for us.
11358 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11359
11360 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11361 so that this include file can stand alone.
11362 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11363 does this now. Include subpipe.h first after config.h, to
11364 test whether it can stand alone.
11365
11366 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11367 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11368 unused declaration.
11369
11370 * tests/synclines.at (%union synch line): Put a dummy member in
11371 the union, because empty unions aren't allowed in C. Caught
11372 by GCC 3.4.0.
11373
11374 2004-04-13 Jim Meyering <jim@meyering.net>
11375
11376 * src/conflicts.c (conflicts_print): Correct format string typo:
11377 use `%%' to produce literal `%'. (trivial change)
11378
11379 2004-03-30 Paul Eggert <eggert@twinsun.com>
11380
11381 * src/getargs.c (version): Update copyright year to 2004.
11382
11383 * data/c.m4 (b4_int_type): Use 'short int' rather than
11384 'short', and similarly for 'long', 'unsigned', etc.
11385 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11386 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11387 yy_yypstack, yydumpstack): Likewise.
11388 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11389 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11390 Likewise.
11391 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11392 yy_stack_print, yyparse): Likewise.
11393 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11394 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11395 * lib/bitset.c (bitset_print): Likewise.
11396 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11397 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11398 * lib/bitsetv.c (bitsetv_dump): Likewise.
11399 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11400 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11401 Likewise.
11402 * src/LR0.c (allocate_itemsets): Likewise.
11403 * src/gram.h (rule_number, rule): Likewise.
11404 * src/lalr.h (goto_number): Likewise.
11405 * src/nullable.c (nullable_compute): Likewise.
11406 * src/output.c (prepare_rules): Likewise.
11407 * src/relation.c (relation_print, relation_digraph): Likewise.
11408 * src/relation.h (relation_node): Likewise.
11409 * src/state.h (state_number, transitions, errs, reductions,
11410 struct state): Likewise.
11411 * src/symtab.h (symbol_number, struct symbol): Likewise.
11412 * src/tables.c (vector_number, tally, action_number,
11413 default_goto, goto_actions): Likewise.
11414 * tests/existing.at (GNU Cim Grammar): Likewise.
11415 * tests/regression.at (Web2c Actions): Likewise.
11416
11417 * src/output.c (muscle_insert_short_int_table): Renamed from
11418 muscle_insert_short_table. All uses changed.
11419
11420 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11421
11422 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11423 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11424 Add %expect-rr rule.
11425
11426 * src/scan-gram.l: Recognize %expect-rr.
11427
11428 * src/conflicts.h (expected_sr_conflicts): Rename from
11429 expected_conflicts.
11430 (expected_rr_conflicts): Declare.
11431
11432 * src/conflicts.c (expected_sr_conflicts): Rename from
11433 expected_conflicts.
11434 (expected_rr_conflicts): Define.
11435 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11436 for GLR parsers.
11437 Use expected_sr_conflicts in place of expected_conflicts.
11438 Warn if expected_rr_conflicts used in non-GLR parser.
11439
11440 * doc/bison.texinfo: Add documentation for %expect-rr.
11441
11442 2004-03-08 Paul Eggert <eggert@gnu.org>
11443
11444 Add support for hex token numbers. Suggested by Odd Arild Olsen in
11445 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
11446
11447 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11448 in lalr1.cc.
11449 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11450 * src/scan-gram.l (scan_integer): New function.
11451 ({int}): Use it.
11452 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11453 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11454 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11455 Say "long int", not "long", for uniformity with GNU style.
11456
11457 2004-02-25 Paul Eggert <eggert@twinsun.com>
11458
11459 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11460 compilers. This fixes a problem with Intel's C++ compiler being
11461 chatty, reported by Guido Trentalancia in
11462 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
11463
11464 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11465
11466 Support %destructor and merge error locations in lalr1.cc.
11467
11468 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11469 (Parser::stos_): Define unconditionally.
11470 (Parser::destruct_): New method. Generate its body with
11471 b4_yydestruct_generate.
11472 (Parser::error_start_): New attribute.
11473 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11474 token which are discarded.
11475 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11476 error_start_ when erroneous token are discarded.
11477 (Parser::parse) <yyerrlab1>: Compute the location of the error
11478 token so that it covers all the discarded tokens.
11479 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11480 it can be called with `%skeleton "lalr1.cc"', and do that.
11481
11482 2004-02-02 Paul Eggert <eggert@twinsun.com>
11483
11484 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11485 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11486 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11487 There's no need to mention top_builddir since Automake does that
11488 for us.
11489 (INCLUDES): Remove, as Automake says it's obsolescent.
11490 Contents migrated into AM_CPPFLAGS as described above.
11491 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11492
11493 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11494
11495 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11496 (yyreportSyntaxError): Handle case where lookahead token is
11497 YYEMPTY.
11498
11499 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11500
11501 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11502 resulting parsers are compilable with C++.
11503
11504 2003-12-23 Paul Eggert <eggert@twinsun.com>
11505
11506 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11507 * src/output.c (output_skeleton): Rename local var.
11508 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11509 Bison tokens, as this runs afoul of the 2003-10-07 change that
11510 disallowed NUL bytes in character constants or string literals.
11511
11512 * tests/local.at: Require Autoconf 2.59's Autotest.
11513 * tests/testsuite.at: Don't include local.at, since we now assume
11514 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11515 including it.
11516 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11517 multiple inclusion warnings.
11518
11519 2003-12-02 Akim Demaille <akim@epita.fr>
11520
11521 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11522 conditions.
11523 From Bruno Haible.
11524
11525 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
11526
11527 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11528
11529 2003-10-07 Paul Eggert <eggert@twinsun.com>
11530
11531 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11532 if testsuite doesn't exist.
11533
11534 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11535 literals, unfortunately.
11536 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11537 Complain about NUL bytes in character constants or string literals.
11538
11539 2003-10-05 Paul Eggert <eggert@twinsun.com>
11540
11541 * NEWS: Don't document %no-default-prec, as it's still
11542 too experimental.
11543 * doc/bison.texinfo: Document %no-default-prec only if
11544 the defaultprec flag is set. Normally it's not.
11545
11546 2003-10-04 Paul Eggert <eggert@twinsun.com>
11547
11548 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11549 non-modifiable lvalue, instead of a modifiable one.
11550 * doc/bison.texinfo (Actions): Document that $$ can
11551 be assigned to. Do not claim that $$ and $N are
11552 array element references: user code should not rely on this.
11553
11554 2003-10-01 Paul Eggert <eggert@twinsun.com>
11555
11556 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11557 (grammar_declaration): Use it.
11558 * src/scan-gram.l: New token %no-default-prec.
11559 * tests/conflicts.at: Revamp tests to use %no-default-prec.
11560 * NEWS, doc/bison.texinfo: Document the above.
11561
11562 2003-10-01 Akim Demaille <akim@epita.fr>
11563
11564 VCG no longer supports long_straight_phase.
11565
11566 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11567 * src/print_graph.c (print_graph): Adjust.
11568
11569 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
11570 and Paul Eggert <eggert@twinsun.com>
11571
11572 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11573 Table of Symbols): Document %default-prec.
11574 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11575 (grammar_declaration): Set default_prec on %default-prec.
11576 * src/scan-gram.l (%default-prec): New token.
11577 * src/reader.h (default_prec): New flag.
11578 * src/reader.c: Likewise.
11579 (packgram): Handle it.
11580 * tests/conflicts.at (%default-prec without %prec,
11581 %default-prec with %prec, %default-prec 1): New tests.
11582
11583 2003-09-30 Paul Eggert <eggert@twinsun.com>
11584
11585 * tests/testsuite.at: Include local.at, not input.at, fixing
11586 a typo in the 2003-08-25 patch.
11587
11588 2003-08-27 Akim Demaille <akim@epita.fr>
11589
11590 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11591 GCC warnings.
11592
11593 2003-08-26 Akim Demaille <akim@epita.fr>
11594
11595 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11596 "<\#" to avoid magic from Gnus when posting parts of this script.
11597
11598 2003-08-26 Akim Demaille <akim@epita.fr>
11599
11600 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11601 (Parser::parse): here.
11602 Adjust: nerrs and errstatus is now replaced by...
11603 (Parser::nerrs_, Parser::errstatus_): New.
11604
11605 2003-08-25 Akim Demaille <akim@epita.fr>
11606
11607 * config/announce-gen, Makefile.cfg: New.
11608 * Makefile.am: Adjust.
11609 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11610 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11611
11612 2003-08-25 Akim Demaille <akim@epita.fr>
11613
11614 When reducing initial empty rules, Bison parser read an initial
11615 location that is not defined. This results in garbage, and that
11616 affects Bison's own parser. Therefore we need (i) to extend Bison
11617 to support a means to initialize this location, and (ii) to use
11618 this CVS Bison to fix CVS Bison's parser.
11619
11620 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11621 with...
11622 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11623 * src/parse-gram.y: Adjust.
11624 (%initial-action): New.
11625 (%error-verbose): Since we require CVS Bison, there is no reason
11626 not to use it.
11627 * src/scan-gram.l: Adjust.
11628 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11629 * data/yacc.c (yyparse): Use b4_initial_action.
11630
11631 2003-08-25 Akim Demaille <akim@epita.fr>
11632
11633 * doc/bison.texinfo: Don't promote stdout for error messages.
11634
11635 2003-08-25 Akim Demaille <akim@epita.fr>
11636
11637 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11638 From Alexandre Duret-Lutz.
11639
11640 2003-08-25 Akim Demaille <akim@epita.fr>
11641
11642 Version 1.875c.
11643
11644 2003-08-25 Akim Demaille <akim@epita.fr>
11645
11646 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11647 Use them.
11648
11649 2003-08-25 Akim Demaille <akim@epita.fr>
11650
11651 * data/lalr1.cc (Parser::reduce_print_): New.
11652 Use it.
11653
11654 2003-08-25 Akim Demaille <akim@epita.fr>
11655
11656 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11657 error recovery loops. This patch is based on
11658 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
11659 Also, augment the similarity between lalr1.cc and yacc.c.
11660 Note: the locations of error recovery rules are not correct yet.
11661
11662 * data/lalr1.cc: Comment changes to augment the similarity between
11663 lalr1.cc and yacc.c.
11664 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11665 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11666 yyerrlab), when hitting EOF, pop the whole stack here instead of
11667 merely falling thru the default error handling mechanism.
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 (required by POSIX).
11672 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11673 fail.
11674
11675 2003-08-25 Akim Demaille <akim@epita.fr>
11676
11677 Tune local.at so that people can "autom4te -l autotest calc.at -o
11678 calc" for instance, to extract a sub test suite.
11679
11680 * tests/testsuite.at: Move the initialization, Autotest version
11681 requirement, and AT_TESTED invocation into...
11682 * tests/local.at: here.
11683 * tests/testsuite.at: Include it for compatibility with Autoconf
11684 2.57.
11685 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11686 be ignore.
11687
11688 2003-08-04 Paul Eggert <eggert@twinsun.com>
11689
11690 Rework code slightly to avoid gcc -Wtraditional warnings.
11691 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11692 The returned value is now stored in *YY0. All callers changed.
11693 * src/output.c (merge_output): Adjust to the above change.
11694
11695 2003-07-26 Paul Eggert <eggert@twinsun.com>
11696
11697 * data/glr.c (YYASSERT): New macro.
11698 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11699 yyresolveStates, yyprocessOneStack):
11700 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11701 Derived from a suggestion by Frank Heckenbach.
11702
11703 2003-07-25 Paul Eggert <eggert@twinsun.com>
11704
11705 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11706 for portability to K&R C (after ansi2knr, presumably). See
11707 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
11708 by Frank Heckenbach, though I have omitted the structure-initialization
11709 part of his glr-knr.diff patch since I recall that the Portable
11710 C Compiler didn't require that change.
11711
11712 Let the user specify how to allocate and free memory.
11713 Derived from a suggestion by Frank Heckenbach in
11714 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
11715 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11716 All uses of free, malloc, realloc changed to use these macros,
11717 and unnecessary casts removed.
11718 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11719
11720 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11721
11722 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11723 use s.empty() rather than s == "" to test for empty string; see
11724 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
11725 (trivial change)
11726
11727 2003-06-25 Akim Demaille <akim@epita.fr>
11728
11729 * config/depcomp, config/install-sh: Update from masters.
11730
11731 2003-06-20 Paul Eggert <eggert@twinsun.com>
11732
11733 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11734 and return properly parenthesized result.
11735 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11736 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11737 Remove unnecessary parentheses from uses.
11738 * doc/bison.texinfo (Location Default Action): Describe the
11739 conventions for parentheses.
11740
11741 2003-06-19 Paul Eggert <eggert@twinsun.com>
11742
11743 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11744 yyreportTree): Do not assume that size_t is the same width as int,
11745 when printing sizes. Print sizes using an unsigned format.
11746 Problem reported by Frank Heckenbach in
11747 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
11748
11749 Port to Forte Developer 7 C compiler.
11750 * data/glr.c (struct YYLTYPE): If locations are not being used,
11751 declare a single dummy member, as empty structs do not conform
11752 to the C standard.
11753 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11754 the Forte Developer 7 C compiler complains that end-of-loop
11755 code is not reached.
11756
11757 2003-06-17 Paul Eggert <eggert@twinsun.com>
11758
11759 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11760 avoid warnings from picky compilers about redefinition of PARAMS.
11761
11762 2003-06-17 Paul Eggert <eggert@twinsun.com>
11763
11764 Version 1.875b.
11765
11766 * NEWS: Document 1.875b.
11767
11768 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11769 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11770 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11771 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11772 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11773 per recent gettext manual's suggestion.
11774 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11775 Use prototypes, not old-style definitions.
11776 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11777 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11778 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11779 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11780 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11781 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11782 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11783 vbitset_or_and_cmp, vbitset_copy): Likewise.
11784
11785 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11786 Do not include <stdlib.h>.
11787 (PARAMS): Define unconditionally for C89.
11788 (ATTRIBUTE_NORETURN): Remove.
11789 (ATTRIBUTE_UNUSED): Define unconditionally.
11790
11791 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
11792 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
11793 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11794 * lib/vbitset.c, lib/vbitset.h: New files.
11795 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11796 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11797 from libbitset.
11798
11799 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11800 `How Can I Reset @code{yyparse}', since texinfo does not allow
11801 arbitrary @ in node names.
11802
11803 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11804 shouldn't be needed according to the gettext 0.12.1 documentation
11805 but which seem to be needed anyway: codeset.m4 glibc21.m4
11806 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
11807 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
11808 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
11809
11810 * lib/.cvsignore: Add stdbool.h.
11811 * m4/.cvsignore: Add nls.m4, po.m4.
11812
11813 Upgrade to CVS gnulib.
11814 * stdbool_.h: File renamed from stdbool.h.in.
11815 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11816 AC_HEADER_STDBOOL.
11817 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11818 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11819 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11820 (MOSTLYCLEANFILES): New var.
11821 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11822 (stdbool.h): New rule.
11823 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11824 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11825 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11826 m4/quote.m4: Upgrade to today's gnulib.
11827
11828 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11829 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11830 the tests right now.
11831 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11832 yyerror are declared before use; C99 requires this.
11833
11834 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11835
11836 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11837 first.
11838 (yyrecoverSyntaxError): Correct the logic for setting and testing
11839 yyerrState.
11840 Correct comment on handling EOF.
11841 Allow states with only a default reduction, rather than failing
11842 (I can't quite reconstruct why these were not allowed before).
11843
11844 Fixes to avoid problem that $-N rules in GLR parsers can cause
11845 buffer overruns, corrupting state.
11846
11847 * src/output.c (prepare_rules): Output max_left_semantic_context
11848 definition.
11849 * src/reader.h (max_left_semantic_context): New variable declaration.
11850 * src/scan-gram.l (max_left_semantic_context): Define.
11851 (handle_action_dollar): Update max_left_semantic_context.
11852 * data/glr.c (YYMAXLEFT): New definition.
11853 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11854 (yyresolveAction): Ditto.
11855
11856 Fixes to problems with location handling in GLR parsers reported by
11857 Frank Heckenbach (2003/06/05).
11858
11859 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11860 (YYRHSLOC): Add parentheses, and define only if locations used.
11861 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11862 locations not used.
11863 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11864 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
11865
11866 * tests/cxx-type.at: Exercise location information; update tests
11867 to differentiate output with and without locations.
11868 Remove forward declarations of yylex and yyerror---caused errors
11869 because default YYLTYPE not yet defined.
11870 Change semantic actions to compute strings, rather than printing
11871 them directly (to test proper passing of semantics values). Change
11872 output to prefix notation and update test data and expected results.
11873 (yylex): Track locations.
11874 (stmtMerge): Return value rather than printing, and include arguments
11875 in value.
11876
11877 2003-06-03 Paul Eggert <eggert@twinsun.com>
11878
11879 Avoid warnings generated by GCC 2.95.4 when Bison is
11880 configured with --enable-gcc-warnings.
11881 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11882 yy::]b4_parser_class_name[::translate_,
11883 yy::Stack::operator[] (unsigned),
11884 yy::Stack::operator[] (unsigned) const,
11885 yy::Slice::operator[] (unsigned),
11886 yy::Slice::operator[] (unsigned) const):
11887 Rename local vars to avoid warnings.
11888 * tests/glr-regression.at (Improper handling of embedded actions
11889 and $-N in GLR parsers): Remove unused local variable from yylex.
11890 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11891 (void) as arg when not pure, since we now assume C89 when building
11892 Bison. Pacify GCC by using parameter.
11893
11894 2003-06-02 Paul Eggert <eggert@twinsun.com>
11895
11896 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11897 yy::Location::lines, yy::Location::columns): Rename arguments
11898 to avoid shadowing; this removes a warning generated by GCC 3.3.
11899
11900 2003-06-01 Paul Eggert <eggert@twinsun.com>
11901
11902 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11903 to g++, as GCC 3.3 complains if you do it.
11904 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11905 everything that WARNING_CFLAGS has, except omit warnings
11906 not suitable for C++.
11907 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11908 * tests/atlocal.in (CXXFLAGS): New var.
11909 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11910
11911 Fix a GLR parser bug I reported in February; see
11912 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
11913 The problem was that GLR parsers did not conform to the C standard,
11914 because actions like { $1 = $2 + $3; } expanded to expressions
11915 that invoked YYFILL in separate subexpressions, and YYFILL assigned
11916 to a local variable. The C standard says that expressions
11917 like (var = f ()) + (var = f ()) have undefined behavior.
11918 Another problem was that GCC sometimes issues warnings that
11919 yyfill and its parameters are unused.
11920
11921 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
11922 as possibly unused.
11923 (yyfill): New function.
11924 (YYFILL): Use it.
11925 (yyuserAction): Change type of yynormal to bool, so that it matches
11926 the new yyfill signature. Mark it as possibly unused.
11927
11928
11929 Follow up on a bug I reported in February, where a Bison-generated
11930 parser can loop. Provide a test case and a fix for yacc.c. I
11931 don't have a fix for lalr1.cc or for glr.c, unfortunately.
11932 The original bug report is in:
11933 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
11934
11935 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
11936 macro's size was becoming unwieldy.
11937 (yyerrlab): Do not discard an empty lookahead symbol, as this
11938 might destroy garbage.
11939 (yyerrorlab): New label, with the old contents of YYERROR,
11940 plus the following change: pop the stack of rhs corresponding
11941 to the production that invoked YYERROR. That is how Yacc
11942 behaves, and POSIX requires this behavior.
11943 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
11944 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
11945 Define 'alarm' to do nothing if unistd.h is not available.
11946 Add a new rule "exp: '-' error;" to test the above change to
11947 data/yacc.c. Use 'alarm' to abort any test taking longer than
11948 10 seconds, as it's probably looping.
11949 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
11950 Also, the new yacc.c generates two fewer diagnostics for an
11951 existing test.
11952
11953 2003-05-24 Paul Eggert <eggert@twinsun.com>
11954
11955 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
11956 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
11957 This fixes a problem reported by John Bowman when the Compaq/HP
11958 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
11959 -ansi -Wall -gall).
11960 * data/yacc.c (union yyalloc): Likewise.
11961 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
11962
11963 Switch from 'int' to 'bool' where that makes sense.
11964
11965 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
11966 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
11967 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
11968 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
11969 Return or accept bool, not int. All callers changed.
11970 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
11971 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
11972 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
11973 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
11974 bitset_or_and_cmp_): Likewise.
11975 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
11976 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
11977 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
11978 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
11979 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
11980 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
11981 bitset_stats_or_and_cmp): Likewise.
11982 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
11983 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
11984 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
11985 ebitset_xor_cmp): Likewise.
11986 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
11987 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
11988 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
11989 lbitset_xor_cmp): Likewise.
11990 * lib/bbitset.h: Include <stdbool.h>.
11991 (struct bitset_vtable): The following members now return bool, not
11992 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
11993 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
11994 or_and_cmp).
11995 * src/conflicts.c (count_rr_conflicts): Likewise.
11996 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
11997 All uses changed.
11998 * lib/ebitset.c (ebitset_obstack_init): Likewise.
11999 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12000 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12001 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12002 graph_flag): Likewise.
12003 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12004 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12005 graph_flag): Likewise.
12006 * src/output.c (error_verbose): Likewise.
12007 * src/output.h (error_verbose): Likewise.
12008 * src/reader.c (start_flag, typed): Likewise.
12009 * src/reader.h (typed): Likewise.
12010 * src/getargs.c (LOCATIONS_OPTION): New constant.
12011 (long_options, getargs): Use it.
12012 * src/lalr.c (build_relations): Use bool, not int.
12013 * src/nullable.c (nullable_compute): Likewise.
12014 * src/print.c (print_reductions): Likewise.
12015 * src/tables.c (action_row, pack_vector): Likewise.
12016 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12017 * src/output.c (prepare): Use it.
12018 * src/output.c (token_definitions_output,
12019 symbol_destructors_output, symbol_destructors_output): Use string,
12020 not boolean integer, to keep track of whether to output separator.
12021 * src/print_graph.c (print_core): Likewise.
12022 * src/state.c (state_rule_lookaheads_print): Likewise.
12023
12024 * config/install-sh: Sync from automake 1.7.5.
12025
12026 2003-05-14 Paul Eggert <eggert@twinsun.com>
12027
12028 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12029 semicolon after a grammar declaration, in the interest of possible
12030 future changes to the Bison input language.
12031 Do not allow a stray semicolon at the start of the grammar.
12032 (rhses.1): Allow one or more semicolons after any rule, including
12033 just before "|" as required by POSIX.
12034 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12035 grammar.
12036
12037 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12038
12039 %parse-param support for lalr1.cc.
12040
12041 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12042 b4_cc_constructor_calls, b4_cc_constructor_call,
12043 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12044 definitions.
12045 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12046 parse-param arguments.
12047 (yy::b4_parser_class_name): Declare instance variables to
12048 hold parse-param arguments.
12049 * tests/calc.at: s/value/semantic_value/ because value clashes
12050 with a member of yy::b4_parser_class_name. Adjust C++ code
12051 to handle %parse-param. Enable %parse-param test in C++.
12052
12053 2003-05-12 Paul Eggert <eggert@twinsun.com>
12054
12055 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12056 English a bit. Fix fclose typo. Change "const char" to "char
12057 const", and use ANSI C rather than K&R for "main". Suggest
12058 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12059 and suggest yy_switch_to_buffer.
12060
12061 2003-05-05 Paul Eggert <eggert@twinsun.com>
12062
12063 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12064 C89. This avoids a diagnostic on compilers that define __STDC__
12065 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12066 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12067
12068 2003-05-03 Paul Eggert <eggert@twinsun.com>
12069
12070 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12071 Do not overrun array bounds.
12072 This should fix a bug reported today by Olatunji Oluwabukunmi in
12073 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12074
12075 2003-04-29 Akim Demaille <akim@epita.fr>
12076
12077 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12078 * src/getargs.c, src/getargs.h: here, as bool, not int.
12079 (nondeterministic_parser): New.
12080 * src/parse-gram.y, src/scan-gram.l: Support
12081 %nondeterministic-parser.
12082 * src/output.c (prepare): Use nondeterministic_parser instead
12083 of glr_parser where appropriate.
12084 * src/tables.c (conflict_row, action_row, save_row)
12085 (token_actions, token_actions, pack_vector): Ditto.
12086
12087 2003-04-29 Akim Demaille <akim@epita.fr>
12088
12089 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12090
12091 2003-04-29 Akim Demaille <akim@epita.fr>
12092
12093 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12094 with %pure-parser and %locations to exercise the patch from Yakov
12095 Markovitch below.
12096
12097 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12098
12099 * data/yacc.c: (b4_lex_param): Corrected for the case where
12100 %lex-param is provided and %pure-parser isn't.
12101
12102 2003-04-27 Paul Eggert <eggert@twinsun.com>
12103
12104 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12105 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12106 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12107 if it is not defined.
12108 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12109
12110 2003-04-26 Paul Eggert <eggert@twinsun.com>
12111
12112 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12113 Declare to be of type suitable for the ninf value itself, not of
12114 type suitable for the corresponding table, since the latter might
12115 be unsigned but the ninf value might be negative. This fixes a
12116 bug reported by Alexandre Duret-Lutz in
12117 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12118
12119 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12120 invokes it. We shouldn't invoke it twice because it will attempt
12121 to put error.o in the archive twice. This fixes a glitch reported
12122 by Martin Mokrejs in
12123 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12124
12125 2003-04-21 Paul Eggert <eggert@twinsun.com>
12126
12127 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12128 to gnulib.
12129
12130 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12131
12132 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12133 Fix obvious typo that results in uncompilable GLR parsers
12134 when both %pure-parser and %locations are used. (trivial change)
12135
12136 2003-04-17 Paul Eggert <eggert@twinsun.com>
12137
12138 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12139 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12140 Do not insert the expected token via unput, as this runs afoul
12141 of a POSIX-compatibility bug in flex 2.5.31.
12142 All uses changed to BEGIN the parent state,
12143 since we no longer insert the expected token via unput.
12144 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12145 that is no longer emitted after the above change.
12146
12147 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12148 the first one. This change is from Paul Hilfinger, and it fixes
12149 regression reported by Werner Lemberg in
12150 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12151
12152 (resolve_sr_conflict): Don't invoke state_errs_set
12153 unless one or more tokens have been explicitly made errors.
12154 Otherwise, the above change causes Bison to abort.
12155
12156 * tests/existing.at (GNU pic Grammar): New test case, taken from
12157 Lemberg's email.
12158
12159 2003-03-31 Akim Demaille <akim@epita.fr>
12160
12161 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12162
12163 2003-03-31 Akim Demaille <akim@epita.fr>
12164
12165 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12166 output.
12167
12168 2003-03-31 Akim Demaille <akim@epita.fr>
12169
12170 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12171 From Paul Hilfinger.
12172
12173 2003-03-29 Akim Demaille <akim@epita.fr>
12174
12175 * m4/error.m4: Do not put under dynamic conditions some code which
12176 expansion is under static control.
12177
12178 2003-03-29 Akim Demaille <akim@epita.fr>
12179
12180 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12181
12182 2003-03-29 Akim Demaille <akim@epita.fr>
12183
12184 * doc/bison.texinfo (Strings are Destroyed): New.
12185
12186 2003-03-13 Paul Eggert <eggert@twinsun.com>
12187
12188 * .cvsignore: Add configure.lineno.
12189 * src/.cvsignore: Add yacc.
12190 * tests/.cvsignore: Add testsuite.log.
12191 * doc/fdl.texi: Sync with latest FSF version.
12192
12193 2003-03-12 Paul Eggert <eggert@twinsun.com>
12194
12195 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12196 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12197 cursor, instead of leaving it undefined. This fixes a bug
12198 reported by Tim Van Holder in
12199 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12200 * tests/input.at (Torturing the Scanner): Test the scanner on
12201 an empty input file, which was Tim Van Holder's test case.
12202
12203 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12204 <sys/resource.h> can be included, include sys/time.h and
12205 sys/times.h first, if available. This works around the SunOS
12206 4.1.4 porting bug reported by Bruce Becker in
12207 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12208
12209 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12210 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12211 AC_HEADER_SYS_WAIT.
12212
12213 Merge changes from gnulib. This was prompted because the CVS
12214 snapshot didn't build on Solaris 7 due to strnlen problems.
12215
12216 These changes need to be merged back into gnulib:
12217 * lib/hash.c: Include <stdbool.h> unconditionally.
12218 * m4/onceonly.m4 (m4_quote): New macro.
12219 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12220 Quote AC_FOREACH variable-expansions properly.
12221 The 2003-01-03 obstack.h change also needs merging.
12222 {end of changes requiring merging}
12223
12224 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12225 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12226 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12227 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12228 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12229 New files, imported from gnulib.
12230 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12231 above.
12232
12233 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12234 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12235 gnulib sources.
12236
12237 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12238 Add.
12239 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12240 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12241 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12242 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12243 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12244 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12245 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12246 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12247 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12248 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12249 (jm_PREREQ_ARGMATCH): Remove.
12250 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12251 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12252
12253 * src/system.h: Include <stdbool.h> unconditionally.
12254
12255 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12256 assuming at least C89 in the bitset code for some time now.
12257
12258 2003-03-03 Akim Demaille <akim@epita.fr>
12259
12260 * ro.po: New.
12261
12262 2003-03-02 Akim Demaille <akim@epita.fr>
12263
12264 * doc/bison.texinfo (Table of Symbols): Reactivate the
12265 documentation for %lex-param, and %parse-param.
12266
12267 2003-03-02 Akim Demaille <akim@epita.fr>
12268
12269 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12270 generate verbose error messages.
12271 Use the number of tokens as an upper bound in yytname, as it
12272 cannot be a non terminal.
12273
12274 2003-03-02 Akim Demaille <akim@epita.fr>
12275
12276 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12277 message.
12278
12279 2003-03-02 Akim Demaille <akim@epita.fr>
12280
12281 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12282 Use them to exercise yycheck overrun.
12283 Based on Andrew Suffield's grammar.
12284
12285 2003-03-02 Akim Demaille <akim@epita.fr>
12286
12287 Create tests/local.at for Bison generic testing macros.
12288
12289 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12290 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12291 This new file.
12292 * tests/calc.at (AT_CHECK_CALC): Adjust.
12293 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12294 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12295 * tests/local.at: here.
12296 (AT_COMPILE_CXX): Tags the tests using it as c++.
12297 Ignore the test if CXX is not functional.
12298
12299 2003-03-01 Paul Eggert <eggert@twinsun.com>
12300
12301 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12302 not loc->end, since loc->end might contain garbage and this leads
12303 to undefined behavior on some platforms.
12304 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12305 depend on *loc, so that the reader doesn't give the the false
12306 impression that *loc is initialized.
12307 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12308 does not survive the return.
12309
12310 2003-03-01 Akim Demaille <akim@epita.fr>
12311
12312 * src/scan-gram.l (code_start): Always initialize it when entering
12313 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12314 yylex invocation. An alternative would be making it static, but
12315 then it starts with the second %%'s beginning, instead of its end.
12316
12317 2003-02-28 Paul Eggert <eggert@twinsun.com>
12318
12319 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12320 around a UnixWare 7.1.1 porting bug reported by John Hughes in
12321 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
12322
12323 2003-02-26 Paul Eggert <eggert@twinsun.com>
12324
12325 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12326 Remove Sequent/Pyramid discussion (nobody uses them any more).
12327 Merge VMS and MS-DOS discussion; these ports may well be dead
12328 but let's keep mentioning them for now. Put <> around email
12329 addresses. Add copyright notice.
12330
12331 2003-02-24 Paul Eggert <eggert@twinsun.com>
12332
12333 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12334 to avoid collision with flex use of yylineno.
12335 Problem reported by Bruce Lilly in
12336 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
12337 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12338 * data/yacc.c (yy_reduce_print): Likewise.
12339
12340 * config/depcomp: Sync with Automake 1.7.3.
12341
12342 2003-02-21 Akim Demaille <akim@epita.fr>
12343
12344 * data/lalr1.cc: Use temporary variables instead of casts to
12345 change integer types.
12346 Suggested by Paul Eggert.
12347
12348 2003-02-21 Akim Demaille <akim@epita.fr>
12349
12350 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12351 to avoid confusions with lalr1.cc's notion of Position.
12352 Suggested by Paul Eggert.
12353
12354 2003-02-20 Akim Demaille <akim@epita.fr>
12355
12356 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12357 before initial_columns.
12358 (location.hh): Use consistent variable names when defining the
12359 operator<<.
12360 Use "last" so that we subtract from Positions, not from unsigned.
12361
12362 2003-02-20 Akim Demaille <akim@epita.fr>
12363
12364 * data/lalr1.cc (position.hh): New subfile, including the extended
12365 and Doxygen'ed documentation of class Position.
12366 (location.hh): Use it.
12367 Document a` la Doxygen.
12368 With the help of Benoit Perrot.
12369
12370 2003-02-20 Akim Demaille <akim@epita.fr>
12371
12372 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12373 AT_YACC_IF.
12374 Redefine AT_YYERROR_SEES_LOC_IF using it.
12375 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12376 not defined.
12377 Don't use the location in yy::Parser::error_ and
12378 yy::Parser::print_ when not %locations.
12379 Activate more lalr1.cc tests.
12380
12381 2003-02-19 Akim Demaille <akim@epita.fr>
12382
12383 * data/lalr1.cc: When displaying a line number, be sure to make it
12384 an int.
12385
12386 2003-02-19 Akim Demaille <akim@epita.fr>
12387
12388 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12389 Remove, useless.
12390 (YYABORT, YYACCEPT, YYERROR): New.
12391 * tests/calc.at: Renable the lalr1.cc test.
12392
12393 2003-02-19 Akim Demaille <akim@epita.fr>
12394
12395 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12396 error recovery, mixing with/without pops and discarding of the
12397 lookahead.
12398 Exercise YYERROR.
12399 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12400
12401 2003-02-17 Paul Eggert <eggert@twinsun.com>
12402
12403 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12404 * tests/testsuite.at (AT_COMPILE): Use them.
12405 This fixes the testsuite problem reported by Robert Lentz in
12406 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
12407
12408 2003-02-12 Paul Eggert <eggert@twinsun.com>
12409
12410 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12411 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
12412 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
12413 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12414 Check for malloc failure, for consistency with yacc.c.
12415 (yytname_size): Remove, for consistency with yacc.c.
12416
12417 The bug still remains in data/lalr1.cc, as I didn't have time
12418 to fix it there.
12419
12420 2003-02-06 Akim Demaille <akim@epita.fr>
12421
12422 * configure.ac (GXX): Rename as...
12423 (CXX): this, to keep the original Autoconf semantics.
12424 Require 2.57.
12425 * data/lalr1.cc: Fix b4_copyright invocations.
12426 If YYDEBUG is not defined, don't depend upon name_ being defined.
12427 (location.hh): Include string and iostream.
12428 (Position::filename): New member.
12429 (Position::Position ()): New.
12430 (operator<< (Position)): New.
12431 (operator- (Position, int)): New.
12432 (Location::first, Location::last): Rename as...
12433 (Location::begin, Location::end): these, to mock the conventional
12434 iterator names.
12435 (operator<< (Location)): New.
12436 * tests/atlocal.in (CXX): New.
12437 * tests/testsuite.at (AT_COMPILE_CXX): New.
12438 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12439 locations in a more synthetic way.
12440 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12441 lalr1.cc is used.
12442 Adjust the C locations to match those from Emacs: first column is
12443 column 0.
12444 Change all the expected results.
12445 Conform to the GCS: simplify the locations when applicable.
12446 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12447 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12448 these CPP macros with the m4 macros new defined by...
12449 (AT_CHECK_PUSHDEFS): this, i.e.:
12450 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
12451 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
12452 New macros.
12453 (AT_CHECK_POPDEFS): Undefine them.
12454 (AT_CHECK_CALC_LALR1_CC): New.
12455 Use it for the first lalr1.cc test.
12456
12457 2003-02-04 Akim Demaille <akim@epita.fr>
12458
12459 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12460 Location as is defined.
12461
12462 2003-02-04 Akim Demaille <akim@epita.fr>
12463
12464 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12465 name_ being defined.
12466
12467 2003-02-03 Paul Eggert <eggert@twinsun.com>
12468
12469 * src/gram.h (start_symbol): Remove unused decl.
12470
12471 Use more-consistent naming conventions for local vars.
12472
12473 * src/derives.c (derives_compute): Change type of local var from
12474 int to rule_number.
12475 * src/gram.c (grammar_rules_partial_print): Likewise.
12476 * src/print.c (print_core): Likewise.
12477 * src/reduce.c (reduce_grammar_tables): Likewise.
12478
12479 * src/gram.c (grammar_dump): Change name of item_number *
12480 local var from r to rp.
12481 * src/nullable.c (nullable_compute): Likewise.
12482
12483 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12484
12485 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12486 for symbol or symbol_number var.
12487 * src/reader.c (grammar_start_symbol_set): Likewise.
12488 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12489 Likewise.
12490 * src/state.c (transitions_to): Likewise.
12491 * src/state.h: Likewise.
12492 * src/tables.c (symbol_number_to_vector_number): Likewise.
12493
12494 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12495 char * var.
12496
12497 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12498 var.
12499
12500 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12501 var.
12502
12503 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12504 Use str, not s, for char * var. Use ch, not c, for character var.
12505 Use size for size var.
12506
12507 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12508 char * var.
12509 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12510 uniqstr var.
12511 * src/uniqstr.h: Likewise.
12512
12513 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12514 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12515 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12516 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12517 param to have same name as that of enum, so that we don't use
12518 "s" to stand for a non-state.
12519
12520 2003-02-02 Akim Demaille <akim@epita.fr>
12521
12522 * src/scan-skel.l: Scan more than one inert character per yylex
12523 invocation.
12524
12525 2003-02-01 Paul Eggert <eggert@twinsun.com>
12526
12527 Version 1.875a.
12528
12529 * po/LINGUAS: Add ms.
12530
12531 2003-01-30 Akim Demaille <akim@epita.fr>
12532
12533 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12534
12535 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12536
12537 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12538 of $1.
12539
12540 Changes in response to error report by S. Eken: GLR mode does not
12541 handle negative $ indices or $ indices in embedded rules correctly.
12542 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
12543
12544 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12545 (b4_rhs_location): Ditto.
12546 (yyfill): New function to copy from stack tree into array
12547 incrementally.
12548 (yyuserAction): Modify to allow incremental move of semantic values
12549 to rhs array when in GLR mode.
12550 Define YYFILL to use in user-defined actions to fill semantic array
12551 as needed.
12552 Remove dummy use of yystack, as there is now a guaranteed use.
12553 (yydoAction): Modify to allow incremental move of semantic values
12554 to rhs array when in GLR mode.
12555 (yyresolveAction): Ditto.
12556 (yyglrShiftDefer): Update comment.
12557 (yyresolveStates): Use X == NULL for pointers, not !X.
12558 (yyglrReduce): Ditto.
12559 (yydoAction): Ditto
12560
12561 * tests/glr-regr1.at: Rename to ...
12562 * tests/glr-regression.at: Add new regression test for the problems
12563 described above (adapted from S. Eken).
12564 Update copyright notice.
12565 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12566 * tests/Makefile.am: Ditto.
12567
12568 2003-01-28 Paul Eggert <eggert@twinsun.com>
12569
12570 * data/lalr1.cc: Do not use @output_header_name@ unless
12571 b4_defines_flag is set. This fixes two bugs reported by
12572 Tim Van Holder in
12573 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12574 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
12575
12576 2003-01-21 Paul Eggert <eggert@twinsun.com>
12577
12578 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12579 we don't need to worry about yyerrlab1 being reported as an
12580 "unused label" by non-GCC C compilers. The downside is that if
12581 locations are used then a couple of statements are duplicated each
12582 time YYERROR is invoked, but the upside is that the warnings
12583 should vanish.
12584 (yyerrlab1): Move code to YERROR.
12585 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12586 This reverts some of the 2002-12-27 change.
12587
12588 2003-01-17 Paul Eggert <eggert@twinsun.com>
12589
12590 * src/output.c (symbol_printers_output): Fix typo that led
12591 to core dump. Problem reported by Antonio Rus in
12592 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
12593
12594 2003-01-13 Akim Demaille <akim@epita.fr>,
12595 Quoc Peyrot <chojin@lrde.epita.fr>,
12596 Robert Anisko <anisko_r@lrde.epita.fr>
12597
12598 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12599 when the stacks contain one element, as the loop would otherwise
12600 free the last state, and then use the top state (the one we just
12601 popped). This means that the initial elements will not be freed
12602 explicitly, as is the case in yacc.c; it is not a problem, as
12603 these elements have fake values.
12604
12605 2003-01-11 Paul Eggert <eggert@twinsun.com>
12606
12607 * NEWS: %expect-violations are now just warnings, reverting
12608 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12609 bootstrapping problem reported by Matthias Klose; see
12610 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
12611 * src/conflicts.c (conflicts_print): Likewise.
12612 * tests/conflicts.at (%expect not enough, %expect too much,
12613 %expect with reduce conflicts): Likewise.
12614 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12615 that the warning is enabled if the number of conflicts changes
12616 (not necessarily increases).
12617
12618 * src/getargs.c (version): Update copyright year.
12619
12620 2003-01-09 Akim Demaille <akim@epita.fr>
12621
12622 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12623
12624 2003-01-08 Paul Eggert <eggert@twinsun.com>
12625
12626 * Makefile.maint (WGETFLAGS):
12627 New macro, containing "-C off" to disable proxy caches.
12628 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12629 (rel-check): Use $(WGET) instead of wget.
12630
12631 2003-01-06 Paul Eggert <eggert@twinsun.com>
12632
12633 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12634 the GLR paper of Scott, Johnstone and Hussain.
12635
12636 2003-01-04 Paul Eggert <eggert@twinsun.com>
12637
12638 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12639 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12640 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12641 (EXTRA_LIBRARIES): New var, for liby.a.
12642 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12643 (EXTRA_SCRIPTS): New var, for yacc.
12644
12645 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12646 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12647 Problem reported by Nelson H. F. Beebe.
12648
12649 2003-01-03 Paul Eggert <eggert@twinsun.com>
12650
12651 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12652 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12653 when compiling Bison 1.875's `bitset bset = obstack_alloc
12654 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12655
12656 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12657 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12658 grow to a huge size with typical invocation.
12659
12660 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12661 Use the pattern recommended by Autoconf 2.57, except also protect
12662 against double-definition.
12663 * src/system.h: Likewise.
12664 Portability issues reported by Nelson H. F. Beebe.
12665
12666 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12667 All uses changed. Provide a definition in both C and C++.
12668 (yytrue, yyfalse): Define even if defined (__cplusplus).
12669
12670 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12671 Reported by Nelson H. F. Beebe.
12672
12673 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12674
12675 2003-01-02 Paul Eggert <eggert@twinsun.com>
12676
12677 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12678 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12679 Bug reported by Nelson H. F. Beebe.
12680
12681 2003-01-01 Paul Eggert <eggert@twinsun.com>
12682
12683 * Version 1.875.
12684
12685 2002-12-30 Paul Eggert <eggert@twinsun.com>
12686
12687 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12688 Moved here from...
12689 (<INITIAL>","): Here. This causes stray "," to be treated
12690 more uniformly.
12691
12692 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
12693 last brace in braced code when not in Yacc mode, for compatibility
12694 with Bison 1.35. This resurrects the 2001-12-15 patch to
12695 src/reader.c.
12696
12697 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12698 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12699
12700 2002-12-28 Paul Eggert <eggert@twinsun.com>
12701
12702 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12703 that of SYM's type. This fixes Debian bug 168069, reported by
12704 Thomas Olsson.
12705
12706 2002-12-28 Paul Eggert <eggert@twinsun.com>
12707
12708 Version 1.75f.
12709
12710 Switch back to the Yacc style of conflict reports, undoing some
12711 of the 2002-07-30 change.
12712 * doc/bison.texinfo (Understanding): Use Yacc style for
12713 conflict reports. Also, use new way of locating rules.
12714 * src/conflicts.c (conflict_report):
12715 Renamed from conflict_report_yacc, removing the old
12716 'conflict_report'. Translate the entire conflict report at once,
12717 so that we don't assume that "," has the same interpretation in
12718 all languages.
12719 (conflicts_output): Use Yacc-style conflict report for each state,
12720 instead of our more-complicated style.
12721 (conflicts_print): Use Yacc-style conflict report, except print
12722 the input file name when not emulating Yacc.
12723 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12724 Conflicted Reduction, %expect not enough, %expect too much,
12725 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12726 * tests/existing.at (GNU Cim Grammar): Likewise.
12727 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12728
12729 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12730 fatal): Don't invoke fflush; it's not needed and it might even be
12731 harmful for stdout, as stdout might not be open.
12732 * src/reduce.c (reduce_print): Likewise.
12733
12734 2002-12-27 Paul Eggert <eggert@twinsun.com>
12735
12736 Fix a bug where error locations were not being recorded correctly.
12737 This problem was originally reported by Paul Hilfinger in
12738 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
12739
12740 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12741 top of the location stack's error locations.
12742 (yyerrlab): Set it. When discarding a token, push its location
12743 onto yylerrsp so that we don't lose track of the error's end.
12744 (yyerrlab1): Now is only the target of YYERROR, so that we can
12745 properly record the location of the action that failed. For GCC
12746 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12747 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12748 (yyerrlab2): New label, which yyerrlab now falls through to.
12749 Compute the error's location by applying YYLLOC_DEFAULT to
12750 the locations of all the symbols that went into the error.
12751 * doc/bison.texinfo (Location Default Action): Mention that
12752 YYLLOC_DEFAULT is also invoked for syntax errors.
12753 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12754 Error locations include the locations of all the tokens that were
12755 discarded, not just the last token.
12756
12757 2002-12-26 Paul Eggert <eggert@twinsun.com>
12758
12759 * src/files.c: Include quote.h.
12760 (compute_output_file_names): Warn if we detect conflicting
12761 outputs to the same file. This should catch the misunderstanding
12762 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12763
12764 * src/conflicts.c (conflicts_print): If the user specifies
12765 "%expect N", report an error if there are any reduce/reduce
12766 conflicts. This is what the manual says should happen.
12767 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12768 * tests/conflicts.at (%expect with reduce conflicts): New test.
12769
12770 Don't use m4_include on relative file names, as it doesn't work as
12771 desired if there happens to be a file with that name under ".".
12772
12773 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12774 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12775 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12776 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12777 * src/output.c (output_skeleton): Use full path names when
12778 specifying a file to include; don't rely on include path, as
12779 it's unreliable when the working file contains a file with
12780 that name.
12781
12782 2002-12-25 Paul Eggert <eggert@twinsun.com>
12783
12784 Remove obsolete references to bison.simple and bison.hairy.
12785 Problem mentioned by Aubin Mahe in
12786 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
12787 * data/glr.c: Comment fix.
12788 * doc/bison.1: Remove references. Also, mention "yacc".
12789
12790 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12791 with -g option.
12792
12793 * src/parse-gram.y (declaration): Use enum "report_states" rather
12794 than its numeric value 1.
12795
12796 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12797 opening a new one. This fixes Debian bug 165349, reported by
12798 Bruce Stephens.
12799
12800 2002-12-24 Paul Eggert <eggert@twinsun.com>
12801
12802 Version 1.75e.
12803
12804 * Makefile.maint (cvs-update): Don't assume that the shell
12805 supports $(...), as Solaris sh doesn't.
12806
12807 * src/parse-gram.y (lloc_default): Remove test for empty
12808 nonterminals at the end, since it didn't change the result.
12809
12810 2002-12-24 Paul Eggert <eggert@twinsun.com>
12811
12812 If the user does not define YYSTYPE as a macro, Bison now declares it
12813 using typedef instead of defining it as a macro. POSIX requires this.
12814 For consistency, YYLTYPE is also declared instead of defined.
12815
12816 %union directives can now have a tag before the `{', e.g., the
12817 directive `%union foo {...}' now generates the C code
12818 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12819 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12820 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12821 instead of `yyltype'.
12822
12823 `yystype' and `yyltype' are now obsolescent macros instead of being
12824 typedefs or tags; they are no longer documented and will be
12825 withdrawn in a future release.
12826
12827 * data/glr.c (b4_location_type): Remove.
12828 (YYSTYPE): Renamed from yystype.
12829 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12830 (struct YYLTYPE): Renamed from struct yyltype.
12831 (YYLTYPE): Renamed from yyltype.
12832 (yyltype, yystype): New (and obsolescent) macros,
12833 for backward compatibility.
12834 * data/yacc.c: Likewise.
12835
12836 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12837 does not specify a union tag. This is for compatibility with
12838 Solaris 9 yacc.
12839
12840 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12841 const *, since it is now modified by stripping surrounding { }.
12842 (current_braced_code): Remove.
12843 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12844 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12845 trailing " {...}". Now of type <chars>.
12846 (grammar_declaration): Adjust to bundled tokens.
12847 (code_content): Remove; stripping is now done by add_param.
12848 (print_token_value): Print contents of bundled tokens.
12849 (token_name): New function.
12850
12851 * src/reader.h (braced_code, current_braced_code): Remove.
12852 (token_name): New decl.
12853
12854 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12855 token_type, not braced_code code_kind. All uses changed.
12856 (SC_PRE_CODE): New state, for scanning after a keyword that
12857 has (or usually has) an immediately-following braced code.
12858 (token_type): New local var, to keep track of which token type
12859 to return when scanning braced code.
12860 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
12861 <INITIAL>"%parse-param", <INITIAL>"%printer",
12862 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12863 instead of returning a token type immediately.
12864 (<INITIAL>"{"): Set token type.
12865 (<SC_BRACED_CODE>"}"): Use it.
12866 (handle_action_dollar, handle_action_at): Now returns bool
12867 indicating success. Fail if ! current_rule; this prevents a core dump.
12868 (handle_symbol_code_dollar, handle_symbol_code_at):
12869 Remove; merge body into caller.
12870 (handle_dollar, handle_at): Complain in invalid contexts.
12871
12872 * NEWS, doc/bison.texinfo: Document the above.
12873 * NEWS: Fix years and program names in copyright notice.
12874
12875 2002-12-17 Paul Eggert <eggert@twinsun.com>
12876
12877 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12878 Reporting, Table of Symbols): Omit mentions of %lex-param and
12879 %parse-param from the documentation for now.
12880
12881 2002-12-15 Paul Eggert <eggert@twinsun.com>
12882
12883 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12884 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12885 lookahead symbol, and which sets yychar in parser actions) and it
12886 disagreed with the Bison documentation. Bug
12887 reported by Andrew Walrond.
12888
12889 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12890 as the caller now does that.
12891 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12892 (YYEMPTY): Parenthesize right hand side, since others use it.
12893 (yyparse): Don't assume that our generated code is the only code
12894 that sets yychar.
12895
12896 2002-12-13 Paul Eggert <eggert@twinsun.com>
12897
12898 Version 1.75d.
12899
12900 POSIX requires a "yacc" command.
12901 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12902 (MOSTLYCLEANFILES): Add yacc.
12903 (yacc): New rule.
12904 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
12905 as an alias for bison y.
12906
12907 * po/LINGUAS: Add da.
12908
12909 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12910 problem with latest <getopt.h>.
12911 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12912
12913 * doc/fdl.texi: Upgrade to 1.2.
12914 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12915 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12916 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12917 gnulib.
12918 * config/install-sh: Sync with autotools.
12919
12920 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
12921 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
12922 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
12923 locations are requested.
12924 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
12925 locations are requested.
12926
12927 2002-12-12 Paul Eggert <eggert@twinsun.com>
12928
12929 Remove unportable casts and storage allocation tricks.
12930 While we're at it, remove almost all casts, since they
12931 usually aren't needed and are a sign of trouble.
12932
12933 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
12934
12935 * src/derives.c (derives_compute): Do not subtract NTOKENS from
12936 the pointer DSET returned by malloc; this isn't portable.
12937 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
12938 Similarly for DERIVES.
12939 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
12940 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
12941 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
12942
12943 * src/derives.c (derives_compute): Do not bother invoking
12944 int_of_rule_number, since rule numbers are integers.
12945
12946 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
12947 rather than XMALLOC (char, N).
12948
12949 * src/files.c (filename_split): Rewrite to avoid cast.
12950
12951 * src/gram.h (symbol_number_as_item_number,
12952 item_number_as_symbol_number, rule_number_as_item_number,
12953 item_number_as_rule_number):
12954 Now inline functions rather than macros, to avoid casts.
12955 * src/state.h (state_number_as_int): Likewise.
12956 * src/tables.c (state_number_to_vector_number,
12957 symbol_number_to_vector_number): Likewise.
12958
12959 * src/gram.h (int_of_rule_number): Remove; no longer used.
12960
12961 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
12962 since the resulting storage is always stored into.
12963
12964 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
12965 where it's needed.
12966
12967 * src/muscle_tab.c (muscle_m4_output):
12968 Now inline. Return bool, not int.
12969 * src/state.c (state_compare): Likewise.
12970 * src/symtab.c (symbol_check_defined,
12971 symbol_check_alias_consistency, symbol_pack, symbol_translation,
12972 hash_compare_symbol, hash_symbol):
12973 Likewise.
12974 * src/uniqstr.c (uniqstr_print): Likewise.
12975 * src/muscle_tab.c (muscle_m4_output_processor):
12976 New function, to avoid casts.
12977 * src/state.c (state_comparator, stage_hasher): Likewise.
12978 * src/symtab.c (symbol_check_defined_processor,
12979 symbol_check_alias_consistency_processor, symbol_pack_processor,
12980 symbol_translation_processor, hash_symbol_comparator,
12981 hash_symbol_hasher): Likewise.
12982 * src/uniqstr.c (uniqstr_print_processor): Likewise.
12983 * src/muscle_tab.c (muscles_m4_output):
12984 Use new functions instead of casting old functions unportably.
12985 * src/state.c (state_hash_new): Likewise.
12986 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
12987 symbols_token_translations_init):
12988 Likewise.
12989 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
12990
12991 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
12992 var instead of casting to long, to avoid casts.
12993 (prepare_states): Use MALLOC rather than alloca, so that we don't
12994 have to worry about alloca.
12995 * src/state.c (state_hash_lookup): Likewise.
12996
12997 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
12998 local var instead of casting to unsigned char, to avoid casts.
12999
13000 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13001 STATE_ALLOC): Remove.
13002 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13003 rather than calloc, and use offsetof to avoid allocating slightly
13004 too much storage.
13005 (state_new): Initialize all members.
13006
13007 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13008
13009 * src/symtab.c (symbol_free): Remove; unused.
13010 (symbol_get): Remove cast in lhs of assignment.
13011 (symbols_do): Now static. Accept generic arguments, not
13012 hashing-related ones.
13013
13014 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13015 (symbol_processor): Remove.
13016 (symbols_do): Remove decl; now static.
13017
13018 * src/system.h (alloca): Remove; decl no longer needed.
13019 (<stddef.h>): Include, for offsetof.
13020 (<inttypes.>, <stdint.h>): Include if available.
13021 (uintptr_t): New type, if system lacks it.
13022 (CALLOC, MALLOC, REALLOC): New macros.
13023 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13024 new macros.
13025
13026 * src/tables.c (table_size): Now int, to pacify GCC.
13027 (table_grow, table_ninf_remap): Use signed table size.
13028 (save_row): Don't bother initializing locals when not needed.
13029 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13030 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13031
13032 * src/vcg.h: Correct misspellings.
13033
13034 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13035
13036
13037 * src/getargs.c (getargs): Don't assume EOF == -1.
13038
13039 2002-12-09 Paul Eggert <eggert@twinsun.com>
13040
13041 Change identifier spellings to avoid collisions with names
13042 that are reserved by POSIX.
13043
13044 Don't use names ending in _t, since POSIX reserves them.
13045 For consistency, remove _e and _s endings -- they're weren't
13046 needed to remove ambiguity. All uses changed.
13047 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13048 turn was just renamed from struniq_t.
13049 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13050 which in turn was just renamed from struniq_processor_t.
13051 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13052 in turn was renamed from hash_compare_struniq_t.
13053 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13054 (state_list): Renamed from state_list_t.
13055 * src/assoc.h (assoc): Renamed from assoc_t.
13056 * src/conflicts.c (enum conflict_resolution): Renamed from
13057 enum conflict_resolution_e.
13058 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13059 (rule_list): Renamed from rule_list_t.
13060 * src/getargs.h (enum trace): Renamed from enum trace_e.
13061 (enum report): Renamed from enum report_e.
13062 * src/gram.h (item_number): Renamed from item_number_t.
13063 (rule_number): Renamed from rule_number_t.
13064 (struct rule_s): Remove the "rule_s" part; not used.
13065 (rule): Renamed from rule_t.
13066 (rule_filter): Renamed from rule_filter_t.
13067 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13068 (goto_list): Renamed from goto_list_t.
13069 * src/lalr.h (goto_number): Renamed from goto_number_t.
13070 * src/location.h (location): Renamed from location_t.
13071 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13072 and moved here from:
13073 * src/muscle_tab.h (muscle_entry_t): here.
13074 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13075 (rule_list): Renamed from rule_list_t.
13076 * src/print_graph.c (static_graph): Renamed from graph.
13077 * src/reader.h (braced_code): Renamed from braced_code_t.
13078 Remove brace_code_e tag.
13079 * src/relation.h (relation_node): Renamed from relation_node_t.
13080 (relation_nodes): Renamed from relation_nodes_t.
13081 (relation): Renamed from relation_t.
13082 * src/state.h (state_number): Renamed from state_number_t.
13083 (struct state): Renamed from struct state_s.
13084 (state): Renamed from state_t.
13085 (transitions): Renamed from transitions_t. Unused (and
13086 misspelled) transtion_s tag removed.
13087 (errs): Renamed from errs_t. Unused errs_s tag removed.
13088 (reductions): Renamed from reductions_t. Unused tag
13089 reductions_s removed.
13090 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13091 (struct symbol_list): Renamed from struct symbol_list_s.
13092 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13093 (struct symbol): Renamed from struct symbol_s.
13094 (symbol): Renamed from symbol_t.
13095 * src/tables.c (vector_number): Renamed from vector_number_t.
13096 (action_number): Renamed from action_t.
13097 * src/tables.h (base_number): Renamed from base_t.
13098 * src/vcg.h (enum color): Renamed from enum color_e.
13099 (enum textmode): Renamed from enum textmode_e.
13100 (enum shape): Renamed from enum shape_e.
13101 (struct colorentry): Renamed from struct colorentry_s.
13102 (struct classname): Renamed from struct classname_s.
13103 (struct infoname): Renamed from struct infoname_s.
13104 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13105 (enum decision): Renamed from enum decision_e.
13106 (enum orientation): Renamed from enum orientation_e.
13107 (enum alignment): Renamed from enum alignment_e.
13108 (enum arrow_mode): Renamed from enum arrow_mode_e.
13109 (enum crossing_type): Renamed from enum crossing_type_e.
13110 (enum view): Renamed from enum view_e.
13111 (struct node): Renamed from struct node_s.
13112 (node): Renamed from node_t.
13113 (enum linestyle): Renamed from enum linestyle_e.
13114 (enum arrowstyle): Renamed from enum arrowstyle_e.
13115 (struct edge): Renamed from struct edge.
13116 (edge): Renamed from edge_t.
13117 (struct graph): Renamed from struct graph_s.
13118 (graph): Renamed from graph_t.
13119 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13120 Rename value_t -> value.
13121 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13122 value_t_as_yystype -> value_as_yystype.
13123
13124 Don't include <errno.h> in the mainstream code, since it
13125 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13126 * lib/get-errno.c, lib/get-errno.h: New files.
13127 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13128 get-errno.c.
13129 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13130 * src/output.c (output_skeleton): Likewise.
13131 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13132 instead of errno.
13133 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13134 Likewise.
13135 (handle_action_dollar, handle_action_at): Likewise.
13136 * src/system.h: Do not include <errno.h>.
13137 (TAB_EXT): Renamed from EXT_TAB.
13138 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13139
13140 Avoid str[a-z]*, since <string.h> reserves that name space.
13141 Change all instances of "struniq" in names to "uniqstr", and
13142 likewise for "STRUNIQ" and "UNIQSTR".
13143 * src/uniqstr.c: Renamed from src/struniq.c.
13144 * src/uniqstr.h: Renamed from src/struniq.h.
13145 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13146 * src/files.c (strsuffix): Remove; unused.
13147 (concat2): Renamed from stringappend. Now static.
13148 * src/files.h (strsuffix, stringappend): Remove; unused.
13149 * src/parse-gram.y (<chars>): Renamed from <string>.
13150 (<uniqstr>): Renamed from <struniq>.
13151 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13152 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13153 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13154 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13155 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13156 (N_EXPAND): Renamed from N_STRETCH.
13157
13158 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13159 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13160 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13161 Remove; unused.
13162 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13163 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13164 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13165 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13166 (BASE_MAXIMUM): Renamed from BASE_MAX.
13167 (BASE_MINIMUM): Renamed from BASE_MIN.
13168 (ACTION_MAX): Remove; unused.
13169 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13170 Unnecessary casts removed from above defines.
13171
13172
13173 Fix misspelling in names.
13174 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13175 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13176 G_NODE_ALIGNEMENT.
13177
13178
13179 * lib/timevar.c (timevar_report): Renamed from time_report,
13180 for consistency with other names.
13181 * lib/timevar.h (timevar_report): New decl.
13182 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13183
13184
13185 Sort include-file uses.
13186
13187 Reorder all include files under src to be in the order "system.h".
13188 then the ../lib include files in angle brackets (alphabetized),
13189 then the . include files in double-quotes (alphabetized). Fix
13190 dependency breakages encountered in this process, as follows:
13191 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13192 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13193 * src/state.h: Include "symtab.h".
13194
13195 2002-12-08 Paul Eggert <eggert@twinsun.com>
13196
13197 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13198 since this causes problems when __file__ contains character
13199 sequences like "@" that are treated specially by src/scan-skel.l.
13200 Instead, just use the file's basename. This fixes the bug
13201 reported by Martin Mokrejs in
13202 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13203
13204 2002-12-06 Paul Eggert <eggert@twinsun.com>
13205
13206 Add support for rules that do not have trailing semicolons, as
13207 POSIX requires. Improve the quality of locations in Bison
13208 diagnostics.
13209
13210 * src/location.c: Include <quotearg.h>.
13211 (empty_location): Now const.
13212 (location_print): New function. Follow the recommendation of the
13213 GNU Coding Standards for locations that span file boundaries.
13214 * src/location.h: Do not include <quotearg.h>; no longer needed.
13215 (boundary): New type.
13216 (location_t): Use it. This allows locations to span file boundaries.
13217 All member uses changed: file -> start.file or end.file (as needed),
13218 first_line -> start.line, first_column -> start.column,
13219 last_line -> end.line, last_column -> end.column.
13220 (equal_boundaries): New function.
13221 (LOCATION_RESET, LOCATION_STEP): Remove.
13222 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13223 (empty_location): Now const.
13224 (location_print): New decl.
13225 * src/parse-gram.y (lloc_default): New function, which handles
13226 empty locations more accurately.
13227 (YYLLOC_DEFAULT): Use it.
13228 (%token COLON): Remove.
13229 (%token ID_COLON): New token.
13230 (rules): Use it.
13231 (declarations, rules): Remove trailing semicolon.
13232 (declaration, rules_or_grammar_declaration):
13233 Allow empty (";") declaration.
13234 (symbol_def): Remove empty actions; no longer needed.
13235 (rules_or_grammar_declaration): Remove trailing semicolon.
13236 (semi_colon.opt): Remove.
13237 * src/reader.h: Include location.h.
13238 (scanner_cursor): New decl.
13239 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13240 rolling our own.
13241 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13242 of *loc.
13243 (STEP): Remove. No longer needed, now that adjust_location does
13244 the work. All uses removed.
13245 (scanner_cursor): New var.
13246 (adjust_location): Renamed from extend_location. It now sets
13247 *loc and adjusts the scanner cursor. All uses changed.
13248 Don't bother testing for CR.
13249 (handle_syncline): Remove location arg; now updates scanner cursor.
13250 All callers changed.
13251 (unexpected_end_of_file): Now accepts start boundary of token or
13252 comment, not location. All callers changed. Update scanner cursor,
13253 not the location.
13254 (SC_AFTER_IDENTIFIER): New state.
13255 (context_state): Renamed from c_context. All uses changed.
13256 (id_loc, code_start, token_start): New local vars.
13257 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13258 processing of Yacc white space and equivalents here.
13259 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13260 instead of returning ID immediately, since we need to search for
13261 a subsequent colon.
13262 (<INITIAL>"'", "\""): Save token_start.
13263 (<INITIAL>"%{", "{", "%%"): Save code_start.
13264 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13265 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13266 BEGIN context_state at end, not INITIAL.
13267 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13268 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13269 Return correct token start.
13270 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13271 the start of a character, string or multiline comment is found.
13272 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13273 Reduction): Adjust reported locations to match the more-precise
13274 results now expected.
13275 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13276 * tests/reduce.at (Useless Rules, Reduced Automaton,
13277 Underivable Rules): Likewise.
13278 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13279 or "|"' now that so many other tokens are allowed by the new grammar.
13280
13281 * src/complain.h (current_file): Remove duplicate decl;
13282 current_file is now owned by files.h.
13283 * src/complain.c, src/scan-gram.l: Include files.h.
13284
13285 2002-12-06 Paul Eggert <eggert@twinsun.com>
13286
13287 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13288 promotes to int; it might be unsigned int.
13289 * data/yacc.c (yy_reduce_print): Likewise.
13290
13291 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13292 be #defined in the prologue, not in the Bison declarations.
13293 This fixes Debian Bug 102878, reported by Shaul Karl.
13294
13295 2002-12-02 Paul Eggert <eggert@twinsun.com>
13296
13297 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13298 * lib/strtoul.c: New file, from gnulib.
13299 This fixes a porting bug reported by Peter Klein in
13300 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
13301
13302 2002-11-30 Paul Eggert <eggert@twinsun.com>
13303
13304 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13305 and put only a forward declaration in the prologue. This is for
13306 consistency with the other scanner helper functions.
13307
13308 Type clashes now generate warnings, not errors, since it
13309 appears that POSIX may allow some grammars with type clashes.
13310 * src/reader.c (grammar_current_rule_check): Warn about
13311 type clashes instead of complaining.
13312 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13313
13314 Add Yacc library, since POSIX requires it.
13315 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13316 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13317 * lib/main.c, lib/yyerror.c: New files.
13318
13319 gram_error can be static; it need not be extern.
13320 * src/reader.h (gram_error): Remove decl.
13321 * src/parse-gram.y (gram_error): Now static. Add static decl.
13322 (print_token_value): Omit parameter names from forward decl,
13323 for consistency.
13324
13325 2002-11-29 Paul Eggert <eggert@twinsun.com>
13326
13327 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13328 be declared before being used. E.g., one should typically
13329 declare them in the prologue. Use GNU coding style in examples.
13330 Put "const" consistently after the type it modifies. Mention
13331 that C99 supports "inline". Mention that yyerror traditionally
13332 returns "int".
13333
13334 %parse-param and %lex-param now take just one argument, the
13335 declaration; the argument name is deduced from the declaration.
13336
13337 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13338 Reporting, Table of Symbols): Document this.
13339 * src/parse-gram.y (add_param): New function.
13340 (COMMA): Remove.
13341 (declaration): Implement new rule for %parse-param and %lex-param.
13342 * src/scan-gram.l: "," now elicits a warning, rather than being
13343 a token; this is more compatible with byacc.
13344 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13345
13346 2002-11-27 Paul Eggert <eggert@twinsun.com>
13347
13348 Rename identifiers to avoid real and potential collisions.
13349
13350 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13351 to avoid collision with lex macro described by Bruce Lilly in
13352 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13353 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13354 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13355 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13356 All uses changed.
13357 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13358 The name "yycontrol" violates the name space rules, and this stuff
13359 wasn't being used anyway.
13360 (input): Remove action; this stuff wasn't being used.
13361 (gram_error): Rename local variable yylloc -> loc.
13362 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13363 (YY_DECL): Don't use "yy" at start of local variables.
13364 All uses changed, e.g., yylloc -> loc.
13365 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13366 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13367 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13368 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13369
13370 * src/parse-gram.y (gram_error): loc is now const *.
13371 * src/reader.h (gram_error): Likewise.
13372
13373 2002-11-24 Paul Eggert <eggert@twinsun.com>
13374
13375 Version 1.75c.
13376
13377 * tests/actions.at (Actions after errors): Use an output format
13378 more similar to that of the Printers and Destructors test.
13379 Test the position of the ';' token too.
13380 (Printers and Destructors): Likewise.
13381 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13382 unnecessarily alarming people when the test fails.
13383
13384 * data/yacc.c (yyerrlab1): Move this label down, so that the
13385 parser does not discard the lookahead token if the user code
13386 invokes YYERROR. This change is required for POSIX conformance.
13387
13388 * lib/error.c: Sync with gnulib.
13389
13390 2002-11-22 Paul Eggert <eggert@twinsun.com>
13391
13392 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13393 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13394 * lib/xmalloc.c: Likewise.
13395
13396 2002-11-20 Paul Eggert <eggert@twinsun.com>
13397
13398 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13399
13400 2002-11-20 Paul Eggert <eggert@twinsun.com>
13401
13402 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13403 should use `if (! x) abort ();' rather than `assert (x);', and
13404 anyway it's one less thing to worry about configuring.
13405
13406 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13407 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13408 and replace all instances of assert with abort.
13409 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13410 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13411
13412 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13413 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13414 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13415 hash_find_entry, hash_rehash, hash_insert): Likewise.
13416 * src/conflicts.c (resolve_sr_conflict): Likewise.
13417 * src/lalr.c (set_goto_map, map_goto): Likewise.
13418 * src/nullable.c (nullable_compute): Likewise.
13419 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13420 * src/reader.c (packgram, reader): Likewise.
13421 * src/state.c (state_new, state_free, state_transitions_set,
13422 state_reduction_find): Likewise.
13423 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13424 symbol_pack): Likewise.
13425 * src/tables.c (conflict_row, pack_vector): Likewise.
13426 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13427 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13428 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13429 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13430
13431 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13432 (ARGMATCH_CONSTRAINT): New macro.
13433 (ARGMATCH_ASSERT): Use it.
13434
13435 * src/system.h (verify): New macro.
13436 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13437 rather than assert.
13438 * src/tables.c (tables_generate): Likewise.
13439
13440 * src/struniq.c (struniq_assert): Now returns void, and aborts
13441 if the assertion is false.
13442 (struniq_assert_p): Remove.
13443 * src/struniq.h: Likewise.
13444
13445 2002-11-18 Paul Eggert <eggert@twinsun.com>
13446
13447 * data/glr.c (yygetLRActions): Replace `yyindex' with
13448 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13449 This fixes the regression with Sun ONE Studio 7 cc that I reported in
13450 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
13451
13452 2002-11-18 Akim Demaille <akim@epita.fr>
13453
13454 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13455 space.
13456 From Tim Van Holder.
13457
13458 2002-11-17 Paul Eggert <eggert@twinsun.com>
13459
13460 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13461 to "SyntaxError" for consistency with my 2002-11-15 change.
13462
13463 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13464 not define to {}, since this breaks the common use of `YYDPRINTF
13465 ((...));' if a single statement is desired (e.g. before `else').
13466 Work around GCC warnings by surrounding corresponding calls with
13467 {} if needed.
13468 (yyhasResolvedValue): Remove unused function.
13469 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13470 loop body.
13471 (yyreportSyntaxError): Renamed from yyreportParseError.
13472 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13473 All uses changed.
13474 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13475 extern when possible. Remove unused initializations.
13476
13477 2002-11-16 Akim Demaille <akim@epita.fr>
13478
13479 Augment the similarity between GLR and LALR traces.
13480
13481 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13482 (YY_REDUCE_PRINT): New.
13483 (yyparse): Use them.
13484 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13485 YYDPRINT here.
13486 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13487 state reached after the reduction/recovery, since...
13488 (yyparse, yyprocessOneStack): Report the state we are entering in.
13489
13490 2002-11-16 Akim Demaille <akim@epita.fr>
13491
13492 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13493 Add support for --trace=skeleton.
13494 * src/scan-skel.l: %option debug.
13495 Scan strings of non-@ or \n instead of character by character.
13496 (scan_skel): Handle trace_skeleton.
13497 (QPUTS): New.
13498 (@output_parser_name@, @output_header_name@): ``Restore'' their
13499 support (used to be M4 macros).
13500 * data/yacc.c: Quote larger chunks, a la glr.c.
13501 * data/lalr1.cc: Likewise.
13502 The header guards are no longer available, so use some other
13503 string than `YYLSP_NEEDED'.
13504
13505 2002-11-16 Akim Demaille <akim@epita.fr>
13506
13507 Make the ``Printers and Destructors'' test more verbose, taking
13508 `yacc.c''s behavior as (possibly wrong) reference.
13509
13510 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13511 instead of fprint on stdout.
13512 Set and report the last_line of the symbols.
13513 Consistently display values and locations.
13514
13515 2002-11-16 Paul Eggert <eggert@twinsun.com>
13516
13517 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13518
13519 2002-11-15 Paul Eggert <eggert@twinsun.com>
13520
13521 * tests/actions.at (Actions after errors): New test case.
13522
13523 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13524 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13525 tests/action.at, tests/calc.at, tests/conflicts.at,
13526 tests/cxx-type.at, tests/regression.at:
13527 "parse error" -> "syntax error" for POSIX compatibility.
13528 "parsing stack overflow..." -> "parser stack overflow" so
13529 that code matches Bison documentation.
13530
13531 2002-11-15 Akim Demaille <akim@epita.fr>
13532
13533 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13534 take two BRACED_CODE, not two string_content.
13535 Free the scanner's obstack when we are done.
13536 (code_content): New.
13537 * tests/calc.at: Adjust.
13538 * doc/bison.texinfo: Adjust.
13539 Also, make sure to include the `,' for these declarations.
13540
13541 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13542
13543 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13544 definition; avoids potential autoreconf problems.
13545
13546 2002-11-15 Akim Demaille <akim@epita.fr>
13547
13548 Always check the value returned by yyparse.
13549
13550 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13551 returned by yyparse.
13552 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13553 Adjust calls.
13554 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13555 returned by yyparse.
13556
13557 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13558
13559 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
13560 on input.at test.
13561
13562 2002-11-14 Paul Eggert <eggert@twinsun.com>
13563
13564 * src/output.c (output_skeleton): Call xfopen instead of
13565 duplicating xfopen's body.
13566
13567 Fix bugs reported by Nelson H. F. Beebe in
13568 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
13569
13570 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13571 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13572 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13573 file twice in the grammar, as an extra check.
13574
13575 * tests/input.at (Torturing the Scanner): Surround the
13576 backslash-newline tests with "#if 0", to make it less likely that
13577 we'll run into compiler bugs. Bring back solitary \ inside
13578 comment, but add a closing comment to work around HP C bug. Don't
13579 test backslash-newline in C character constant.
13580
13581 2002-11-14 Akim Demaille <akim@epita.fr>
13582
13583 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13584 status of the compiler.
13585 Calling `exit 1' is no longer needed.
13586 Reported by Nelson H. F. Beebe.
13587
13588 2002-11-14 Akim Demaille <akim@epita.fr>
13589
13590 * tests/atlocal.in (CPPFLAGS): We have config.h.
13591 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13592 New.
13593 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13594 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13595 * tests/regression.at, tests/torture.at: Use them for all the
13596 grammars that are to be compiled.
13597 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13598 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13599 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13600
13601 2002-11-14 Akim Demaille <akim@epita.fr>
13602
13603 * doc/bison.texinfo: Various formatting changes (alignments in
13604 samples, additional @group/@end group, GCS in samples.
13605 Use @deffn instead of simple @table to define the directives,
13606 macros, variables etc.
13607
13608 2002-11-13 Paul Eggert <eggert@twinsun.com>
13609
13610 Fix some bugs reported by Albert Chin-A-Young in
13611 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
13612
13613 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
13614 -o c"; the HP C compiler chatters during compilation.
13615 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13616 * tests/headers.at (export YYLTYPE): Likewise.
13617
13618 * tests/input.at (Torturing the Scanner): Remove lines containing
13619 solitary backslashes, as they tickle a bug in the HP C compiler.
13620
13621 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13622 comments, since they're not portable. Use GNU coding style.
13623
13624 2002-11-13 Akim Demaille <akim@epita.fr>
13625
13626 * data/yacc.c: Leave bigger chunks of quoted text.
13627 (YYDSYMPRINTF): New.
13628 Use it to report symbol activities.
13629 * data/glr.c (YYDSYMPRINTF): New.
13630 Use it.
13631
13632 2002-11-12 Paul Eggert <eggert@twinsun.com>
13633
13634 Version 1.75b.
13635
13636 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13637 (yyglrReduce): Return yyok, not 0.
13638 This should avoid the enumerated-type warnings reported
13639 by Nelson H. F. Beebe in
13640 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
13641
13642 * lib/bbitset.h (BITSET_INLINE): Remove.
13643 * lib/bitset.h [! BITSET_INLINE]: Remove.
13644 (bitset_set, bitset_reset, bitset_test): Rename local vars
13645 to avoid shadowing warnings by GCC.
13646
13647 * data/glr.c (inline): Remove #define. It's the user's
13648 responsibility to #define it away, just like 'const'.
13649 This fixes one of the bugs reported by Nelson H. F. Beebe in
13650 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
13651
13652 * Makefile.maint (po-check): Scan .l and .y files instead of the
13653 .c and the .h files that they generate. This fixes the bug
13654 reported by Tim Van Holder in:
13655 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
13656 Look for N_ as well as for _. Try to avoid matching #define for
13657 N_ and _.
13658 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13659 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13660 * src/scan-gram.l: Revamp regular expressions so that " and '
13661 do not confuse xgettext.
13662
13663 * src/struniq.h (struniq_new): Do not declare the return type
13664 to be 'const'; this violates the C standard.
13665 * src/struniq.c (struniq_new): Likewise.
13666
13667 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13668
13669 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13670 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13671 linker.
13672
13673 2002-11-12 Akim Demaille <akim@epita.fr>
13674
13675 * Makefile.maint: Sync with Autoconf:
13676 (local_updates): New.
13677
13678 2002-11-12 Akim Demaille <akim@epita.fr>
13679
13680 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13681
13682 2002-11-12 Akim Demaille <akim@epita.fr>
13683
13684 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13685 locations.
13686
13687 2002-11-12 Akim Demaille <akim@epita.fr>
13688
13689 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13690 not yyvalue.
13691
13692 2002-11-12 Akim Demaille <akim@epita.fr>
13693
13694 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13695 Use it to test the GLR parser.
13696
13697 2002-11-12 Akim Demaille <akim@epita.fr>
13698
13699 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13700 defines it.
13701 * data/glr.c (yystos): New.
13702 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13703 (YYDSYMPRINT): New.
13704 (yyval): Don't define it, it is handled via M4.
13705 (yyrecoverParseError): Free verbosely the discarded symbols.
13706 * data/yacc.c (yysymprint): Remove, rather...
13707 (b4_yysymprint_generate): invoke.
13708 * data/c.m4 (b4_yysymprint_generate): New.
13709 Accept pointers as arguments, as opposed to the version from
13710 yacc.c.
13711 (b4_yydestruct_generate): Likewise.
13712 * tests/cations.at (Printers and Destructors): Use Bison directives
13713 instead of CPP macros.
13714 Don't rely on internal details.
13715
13716 2002-11-12 Akim Demaille <akim@epita.fr>
13717
13718 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13719 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13720 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13721 it against YYEMPTY and so forth), work on yytoken (i.e., set
13722 it to YYEMPTY etc.).
13723 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13724 (b4_symbol_actions): Remove.
13725 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13726 for 0, end-of-input.
13727
13728 2002-11-12 Akim Demaille <akim@epita.fr>
13729
13730 * doc/bison.texinfo (Destructor Decl): New.
13731
13732 2002-11-12 Akim Demaille <akim@epita.fr>
13733
13734 * src/tables.c (tables_generate): Use free for pointers that
13735 cannot be NULL, not XFREE.
13736 (pack_vector): Use assert, not fatal, for bound violations.
13737 * src/state.c (state_new): Likewise.
13738 * src/reader.c (reader): Likewise.
13739 * src/lalr.c (set_goto_map): Likewise.
13740 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
13741 the file name.
13742
13743 2002-11-12 Akim Demaille <akim@epita.fr>
13744
13745 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13746 Restore.
13747 * src/scan-gram.l (last_string): Is global to the file, not to
13748 yylex.
13749 * src/parse-gram.y (input): Don't append the epilogue here,
13750 (epilogue.opt): do it here, and free the scanner's obstack.
13751 * src/reader.c (epilogue_set): Rename as...
13752 (epilogue_augment): this.
13753 * data/c.m4 (b4_epilogue): Defaults to empty.
13754
13755 2002-11-12 Akim Demaille <akim@epita.fr>
13756
13757 * src/getargs.c (long_options): Remove duplicates.
13758 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13759 Remove.
13760 * doc/bison.rnh: Remove.
13761 * doc/bison.texinfo (VMS Invocation): Remove.
13762
13763 2002-11-12 Akim Demaille <akim@epita.fr>
13764
13765 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13766 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13767
13768 Use struniq for symbols.
13769
13770 * src/symtab.h (symbol_t): The tag member is a struniq.
13771 (symbol_type_set): Adjust.
13772 * src/symtab.c (symbol_new): Takes a struniq.
13773 (symbol_free): Don't free the tag member.
13774 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13775 (hash_compare_symbol, hash_symbol): these.
13776 Use the fact that tags as struniqs.
13777 (symbol_get): Use struniq_new.
13778 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13779 Returns a strniq.
13780 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13781 and type members are struniqs.
13782 * src/reader.c (get_merge_function)
13783 (grammar_current_rule_merge_set): Adjust.
13784 (TYPE, current_type): Are struniq.
13785
13786 Use struniq for file names.
13787
13788 * src/files.h, src/files.c (infile): Split into...
13789 (grammar_file, current_file): these.
13790 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13791 * src/reduce.c (reduce_print): Likewise.
13792 * src/getargs.c (getargs): Likewise.
13793 * src/complain.h, src/complain.c: Likewise.
13794 * src/main.c (main): Call struniqs_new early enough to use it for
13795 file names.
13796 Don't free the input file name.
13797
13798 2002-11-12 Akim Demaille <akim@epita.fr>
13799
13800 * src/symtab.c (symbol_free): Remove dead deactivated code:
13801 type_name are properly removed.
13802 Don't use XFREE to free items that cannot be NULL.
13803 * src/struniq.h, src/struniq.c: New.
13804 * src/main.c (main): Initialize/free struniqs.
13805 * src/parse-gram.y (%union): Add astruniq member.
13806 (yyprint): Adjust.
13807 * src/scan-gram.l (<{tag}>): Return a struniq.
13808 Free the obstack bit that used to store it.
13809 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13810
13811 2002-11-11 Paul Eggert <eggert@twinsun.com>
13812
13813 Revamp to fix many (but not all) of the C- and M4-related quoting
13814 problems. Among other things, this fixes the Bison bug reported
13815 by Jan Hubicka when processing the Bash grammar; see:
13816 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
13817
13818 Use new @ escapes consistently. Represent brackets with @{ and @}
13819 rather than @<:@ and @:>@, since this works a bit better with dumb
13820 editors like vi. Represent @ with @@, since @ is now consistently
13821 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13822 __ofile__, to avoid unexpected expansions. Similarly, use @output
13823 rather than #output.
13824
13825 * data/c.m4 (b4_copyright): Omit file name from comment, since
13826 the file name could contain "*/".
13827 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13828 be quoted. All uses changed.
13829
13830 * data/glr.c: Use new @ escapes consistently.
13831 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13832 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13833 Remove, since they couldn't handle arbitrary characters in file
13834 names.
13835 * data/lalr1.cc: Likewise.
13836 * data/yacc.c: Likewise.
13837
13838 * src/files.c (output_infix): Remove; all uses removed.
13839 * src/files.h: Likewise.
13840
13841 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13842 mishandled funny characters in file names, and anyway it isn't
13843 needed any more.
13844 * data/yacc.c: Likewise.
13845 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13846
13847 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13848 * data/yacc.c: Likewise.
13849
13850 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13851 strings now.
13852 (muscle_init): Quote filename as a C string.
13853 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13854 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13855 * src/output.c (escaped_file_name_output): New function.
13856 (prepare_symbols): Quote tokens for M4.
13857 (prepare): Don't insert output_infix, output_prefix,
13858 output_parser_name, output_header_name; this is now down by scan-skel.
13859 Insert skeleton as a C string.
13860
13861 * src/output.c (user_actions_output, symbol_destructors_output,
13862 symbol_printers_output): Quote filenames for C and M4.
13863 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13864
13865 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13866 escapes other than \\ and \'; this simplifies the code.
13867 (<SC_STRING>): Likewise, for \\ and \".
13868 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13869 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13870 Use new escapes @{ and @} for [ and ].
13871
13872 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13873 them with auto vars.
13874 Switch to new escape scheme, where @ is the escape character uniformly.
13875 Abort if a stray escape character is found. Avoid unbounded input
13876 buffer when parsing non-escaped text.
13877
13878 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13879 __oline__, #output, $@, and @{ do not have unintended meanings.
13880
13881 2002-11-09 Paul Eggert <eggert@twinsun.com>
13882
13883 Fix the test failure due to GCC warnings described in
13884 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
13885 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13886 evaluate to 0 if it's impossible for NINF to be in the respective
13887 table.
13888 (yygetLRActions, yyrecoverParseError): Use them.
13889
13890 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13891 counted in the token inserted at end of file. Now takes
13892 location_t *, not location_t, so that the location can be
13893 adjusted. All uses changed.
13894
13895 * tests/regression.at (Invalid inputs): Adjust wording in
13896 diagnostic to match the new behavior.
13897
13898 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13899 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13900 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13901 abort ();'. This reduces the runtime of the "Many lookaheads"
13902 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13903 GCC 3.2.
13904
13905 2002-11-07 Paul Eggert <eggert@twinsun.com>
13906
13907 * src/parse-gram.y (CHARACTER): Remove unused token.
13908 All uses removed.
13909
13910 * src/scan-gram.l: Remove stack option. We no longer use the
13911 stack, since the stack was never deeper than 1; instead, use the
13912 new auto var c_context to record the stacked value.
13913
13914 Remove nounput option. At an unexpected end of file, we now unput
13915 the minimal input necessary to end cleanly; this simplifies the
13916 code.
13917
13918 Avoid unbounded token sizes where this is easy.
13919
13920 (unexpected_end_of_file): New function.
13921 Use it to systematize the error message on unexpected EOF.
13922 (last-string): Now auto, not static.
13923 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
13924 (scanner_last_string_free): Remove; not used.
13925 (percent_percent_count): Move decl to just before use.
13926 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
13927 not the (never otherwised-used) CHARACTER.
13928
13929 2002-11-07 Akim Demaille <akim@epita.fr>
13930
13931 Let yyerror always receive the msg as last argument, so that
13932 yyerror can be variadic.
13933
13934 * data/yacc.c (b4_yyerror_args): New.
13935 Use it when calling yyerror.
13936 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
13937 Use it when calling yyerror.
13938 * doc/bison.texinfo (Error Reporting): Adjust.
13939 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
13940 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
13941
13942 2002-11-06 Akim Demaille <akim@epita.fr>
13943
13944 #line should have quoted strings.
13945 Ideally, this should be done by m4_quotearg.
13946
13947 * src/scan-skel.l: Include quotearg.h.
13948 Quote __ofile__.
13949 * src/output.c (symbol_printers_output)
13950 (symbol_destructors_output): Quote the file name.
13951
13952 2002-11-06 Akim Demaille <akim@epita.fr>
13953
13954 * tests/regression.at (Invalid inputs): Adjust to the recent
13955 messages.
13956
13957 2002-11-06 Akim Demaille <akim@epita.fr>
13958
13959 Restore --no-lines.
13960 Reported by Jim Kent.
13961
13962 * data/c.m4 (b4_syncline): New.
13963 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
13964 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
13965 * src/output.c (user_actions_output): Likewise.
13966 (prepare): Define 'b4_synclines_flag'.
13967 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
13968
13969 2002-11-06 Akim Demaille <akim@epita.fr>
13970
13971 * src/main.c (main): Free `infile'.
13972 * src/scan-gram.l (handle_syncline): New.
13973 Recognize `#line'.
13974 * src/output.c (user_actions_output, symbol_destructors_output)
13975 (symbol_printers_output): Use the location's file name, not
13976 infile.
13977 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13978
13979 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13980
13981 * src/tables.c (matching_state): Don't allow states to match if
13982 either has GLR conflict entries.
13983
13984 2002-11-05 Paul Eggert <eggert@twinsun.com>
13985
13986 * src/scan-gram.l: Use more accurate diagnostics, e.g.
13987 "integer out of range" rather than "invalid value".
13988 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
13989 accordingly.
13990
13991 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
13992 Also, remove one static variable in the scanner.
13993
13994 * src/scan-gram.l (braces_level): Now auto, not static.
13995 Initialize to zero if the compiler is being picky.
13996 (INITIAL): Clear braces_level instead of incrementing it.
13997 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
13998 as POSIX 1003.1-2001 requires.
13999 * src/system.h (IF_LINT): New macro, taken from coreutils.
14000 * configure.ac: Define "lint" if --enable-gcc-warnings.
14001
14002 2002-11-05 Akim Demaille <akim@epita.fr>
14003
14004 * src/scan-gram.l: When it starts with `%', complain about the
14005 whole directive, not just that `invalid character: %'.
14006
14007 2002-11-04 Akim Demaille <akim@epita.fr>
14008
14009 * Makefile.maint: Update from Autoconf.
14010 (update, cvs-update, po-update, do-po-update): New.
14011
14012 2002-11-04 Akim Demaille <akim@epita.fr>
14013
14014 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14015 and yyerror.
14016 Have yyerror `use' its arguments.
14017 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14018 returns true when location & yacc & pure & parse-param.
14019 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14020
14021 2002-11-04 Akim Demaille <akim@epita.fr>
14022
14023 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14024 clashes.
14025 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14026 font-lock-mode.
14027 Use complain_at.
14028 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14029 slot 0.
14030
14031 2002-11-03 Paul Eggert <eggert@twinsun.com>
14032
14033 * src/reader.c (get_merge_function, grammar_current_rule_check):
14034 Use consistent diagnostics for reporting type name clashes.
14035 Quote the types with <>, for consistency with Yacc.
14036 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14037
14038 2002-11-03 Akim Demaille <akim@epita.fr>
14039
14040 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14041 New.
14042 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14043 (b4_parse_param): Remove.
14044 Use b4_identification.
14045 Propagate b4_pure_args where needed to pass them to yyerror.
14046 * data/glr.m4 (b4_parse_param): Remove.
14047 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14048 (b4_lpure_formals): New.
14049 Use b4_identification.
14050 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14051 b4_user_formals and b4_user_args.
14052 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14053 (yyreportAmbiguity): When using a pure parser, also need
14054 the location, and the parse-params.
14055 Adjust callers.
14056 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14057 When using a pure parser, also need the parse-params.
14058 Adjust callers.
14059 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14060 (%pure-parser + %parse-param) LALR and GLR parsers.
14061 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14062 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14063 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14064 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14065 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14066 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14067 * doc/bison.texinfo: Untabify the whole file.
14068 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14069 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14070 (Error Reporting): Adjust to these new directives.
14071 Document %error-verbose, deprecate YYERROR_VERBOSE.
14072
14073 2002-11-03 Akim Demaille <akim@epita.fr>
14074
14075 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14076 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14077 command line options.
14078 * tests/cxx-type.at: Formatting changes.
14079
14080 2002-11-03 Paul Eggert <eggert@twinsun.com>
14081
14082 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14083 to count columns correctly, and to check for invalid inputs.
14084
14085 Use mbsnwidth to count columns correctly. Account for tabs, too.
14086 Include mbswidth.h.
14087 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14088 (extend_location): New function.
14089 (YY_LINES): Remove.
14090
14091 Handle CRLF in C code rather than in Lex code.
14092 (YY_INPUT): New macro.
14093 (no_cr_read): New function.
14094
14095 Scan UCNs, even though we don't fully handle them yet.
14096 (convert_ucn_to_byte): New function.
14097
14098 Handle backslash-newline correctly in C code.
14099 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14100 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14101 all uses changed.
14102 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14103 Use {splice} wherever C allows backslash-newline.
14104 YY_STEP after space, newline, vertical-tab.
14105 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14106
14107 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14108
14109 ({int}, handle_action_dollar, handle_action_at): Check for integer
14110 overflow.
14111
14112 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14113
14114 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14115 as well as \000. Check for UCHAR_MAX, not 255.
14116 Allow \x with an arbitrary positive number of digits, as in C.
14117 Check for overflow here.
14118 Allow \? and UCNs, for compatibility with C.
14119
14120 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14121 with quote slot used by complain_at.
14122
14123 * tests/input.at: Add tests for backslash-newline, m4 quotes
14124 in symbols, long literals, and funny escapes in strings.
14125
14126 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14127 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14128 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14129 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14130 * m4/mbswidth.m4: New file, from GNU coreutils.
14131
14132 * doc/bison.texinfo (Grammar Outline): Document // comments.
14133 (Symbols): Document that trigraphs have no special meaning in Bison,
14134 nor is backslash-newline allowed.
14135 (Actions): Document that trigraphs have no special meaning.
14136
14137 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14138 no longer used.
14139
14140 2002-11-02 Paul Eggert <eggert@twinsun.com>
14141
14142 * src/reader.c: Don't include quote.h; not needed.
14143 (get_merge_function): Reword warning to be consistent with
14144 type clash diagnostic in grammar_current_rule_check.
14145
14146 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14147 bug in trigraph handling.
14148
14149 * src/output.c (prepare_symbols): When printing token names,
14150 escape "[" as "@<:@" and likewise for "]".
14151
14152 * src/system.h (errno): Remove declaration, as we are now
14153 assuming C89 or better, and C89 guarantees errno.
14154
14155 2002-10-30 Paul Eggert <eggert@twinsun.com>
14156
14157 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14158 Check for close failures.
14159 * src/files.h (xfclose): Return void, not int, since it always
14160 returned zero.
14161 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14162 indicates one.
14163 * src/output.c (output_skeleton): Use xfclose rather than fclose
14164 and ferror. xfclose now checks ferror.
14165
14166 * data/glr.c (YYLEFTMOST_STATE): Remove.
14167 (yyreportTree): Use a stack-based leftmost state. This avoids
14168 our continuing battles with bogus warnings about initializers.
14169
14170 2002-10-30 Akim Demaille <akim@epita.fr>
14171
14172 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14173 #if.
14174
14175 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14176
14177 * tests/glr-regr1.at: New test for reported regressions.
14178 * tests/testsuite.at: Add glr-regr1.at test.
14179 * tests/Makefile.am: Add glr-regr1.at test.
14180
14181 2002-10-24 Paul Eggert <eggert@twinsun.com>
14182
14183 Version 1.75a.
14184
14185 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14186 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14187 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14188 Don't assume strdup exists; POSIX says its an XSI extension.
14189 Check for buffer overflow on input.
14190
14191 2002-10-24 Akim Demaille <akim@epita.fr>
14192
14193 * src/output.c (output_skeleton): Don't disable M4sugar comments
14194 too soon: it results in comments being expanded.
14195 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14196 first output.
14197
14198 2002-10-24 Akim Demaille <akim@epita.fr>
14199
14200 * data/yacc.c (m4_int_type): New.
14201 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14202 char' as only yacc.c wants K&R portability.
14203 * data/glr.c (yysigned_char): Remove.
14204 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14205 Reported by Quoc Peyrot.
14206
14207 2002-10-23 Paul Eggert <eggert@twinsun.com>
14208
14209 * src/main.c (main): With --trace=time, report times even if a
14210 non-fatal error occurs. Formerly, the times were reported in some
14211 such cases but not in others.
14212 * src/reader.c (reader): Just return if a complaint has been issued,
14213 instead of exiting, so that 'main' can report times.
14214
14215 2002-10-22 Akim Demaille <akim@epita.fr>
14216
14217 * src/system.h: Include sys/types.
14218 Reported by Bert Deknuydt.
14219
14220 2002-10-23 Paul Eggert <eggert@twinsun.com>
14221
14222 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14223 Suggested by Art Haas.
14224
14225 2002-10-22 Paul Eggert <eggert@twinsun.com>
14226
14227 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14228 decl; not needed any more.
14229 * src/main.c (main): Use return to exit, undoing yesterday's change.
14230 The last OS that we could find where this wouldn't work is
14231 SunOS 3.5, and that's too old to worry about now.
14232
14233 * data/glr.c (struct yyltype): Define members even when not
14234 doing locations. This is more consistent with yacc.c, and it
14235 works around the following bug reports:
14236 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14237 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
14238
14239 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14240 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14241 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14242
14243 2002-10-22 Akim Demaille <akim@epita.fr>
14244
14245 * data/README: New.
14246
14247 2002-10-21 Paul Eggert <eggert@twinsun.com>
14248
14249 Be consistent about 'bool'; the old code used an enum in one
14250 module and an int in another, and this violates the C standard.
14251 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14252 * configure.ac (AC_HEADER_STDBOOL): Add.
14253 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14254 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14255 * src/symtab.c (hash_compare_symbol_t): Likewise.
14256 * src/system.h (bool, false, true): Use a definition consistent
14257 with ../lib/hash.c. All uses changed.
14258
14259 * src/complain.c (warning_issued): Renamed from warn_message_count,
14260 so that we needn't worry about integer overflow (!).
14261 Now of type bool. All uses changed.
14262 (complaint_issued): Renamed from complain_message_count; likewise.
14263
14264 * src/main.c (main): Use exit to exit with failure.
14265
14266 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14267 rather than 1 and 0.
14268 * src/main.c (main): Likewise.
14269 * src/getargs.c (getargs): Likewise.
14270 * src/reader.c (reader): Likewise.
14271
14272 * src/getarg.c (getargs): Remove duplicate code for
14273 "Try `bison --help'".
14274
14275 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14276 What was that "2" for?
14277
14278 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14279 * src/getargs.c (usage): Likewise.
14280
14281 * src/getargs.c (getargs): When there are too few operands, report
14282 the last one. When there are too many, report the first extra
14283 one. This is how diffutils does it.
14284
14285 2002-10-20 Paul Eggert <eggert@twinsun.com>
14286
14287 Remove K&R vestiges.
14288 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14289 * src/complain.c (VA_START): Remove. Assume prototypes.
14290 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14291 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14292 fatal): Assume prototypes.
14293 * src/complain.h: Assume prototypes.
14294 * src/system.h (PARAMS): Remove.
14295 Include <limits.h> unconditionally, since it's guaranteeed even
14296 for a freestanding C89 compiler.
14297 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14298 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
14299
14300 2002-10-20 Akim Demaille <akim@epita.fr>
14301
14302 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14303 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14304 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14305 (yyresolveStates, yyresolveAction, yyresolveStack)
14306 (yyprocessOneStack): Use them.
14307 (yy_reduce_print): New.
14308 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14309
14310 2002-10-20 Akim Demaille <akim@epita.fr>
14311
14312 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14313 arguments and output `void'.
14314 (b4_c_function): Rename as...
14315 (b4_c_function_def): this.
14316 (b4_c_function_decl, b4_c_ansi_function_def)
14317 (b4_c_ansi_function_decl): New.
14318 Change the interpretation of the arguments: before `int, foo', now
14319 `int foo, foo'.
14320 * data/yacc.c (yyparse): Prototype and define thanks to these.
14321 Adjust b4_c_function_def uses.
14322 * data/glr.c (yyparse): Likewise, but ANSI only.
14323
14324 2002-10-20 Akim Demaille <akim@epita.fr>
14325
14326 * src/output.c (prepare): Move the definition of `tokens_number',
14327 `nterms_number', `undef_token_number', `user_token_number_max'
14328 to...
14329 (prepare_tokens): Here.
14330 (prepare_tokens): Rename as...
14331 (prepare_symbols): this.
14332 (prepare): Move the definition of `rules_number' to...
14333 (prepare_rules): here.
14334 (prepare): Move the definition of `last', `final_state_number',
14335 `states_number' to...
14336 (prepare_states): here.
14337 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14338
14339 2002-10-20 Akim Demaille <akim@epita.fr>
14340
14341 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14342
14343 2002-10-20 Akim Demaille <akim@epita.fr>
14344
14345 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14346 * data/c.m4: here.
14347
14348 2002-10-20 Akim Demaille <akim@epita.fr>
14349
14350 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14351 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14352 `pair'.
14353 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14354 `name' to...
14355 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14356 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14357 These.
14358
14359 2002-10-19 Paul Eggert <eggert@twinsun.com>
14360
14361 Do not create a temporary file, as that involves security and
14362 cleanup headaches. Instead, use a pair of pipes.
14363 Derived from a suggestion by Florian Krohm.
14364 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14365 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14366 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14367 (BISON_PREREQ_SUBPIPE): Add.
14368 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14369 Add subpipe.h, subpipe.c.
14370 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14371 * po/POTFILES.in: Add lib/subpipe.c.
14372 * src/output.c: Include "subpipe.h".
14373 (m4_invoke): Remove decl.
14374 (scan_skel): New decl.
14375 (output_skeleton): Use pipe rather than temporary file for m4 input.
14376 Check that m4sugar.m4 is readable, to avoid deadlock.
14377 Check for pipe I/O error.
14378 * src/scan-skel.l (readpipe): Remove decl.
14379 (scan_skel): New function, to be used in place of m4_invoke.
14380 Read from stream rather than file.
14381
14382 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14383 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14384 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14385 this generates a more-accurate value anyway.
14386
14387 * lib/timevar.c (timervar_accumulate): Rename locals to
14388 avoid confusion with similarly-named more-global.
14389 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14390
14391 * src/output.c (prepare): Use xstrdup to convert char const *
14392 to char *, to avoid GCC warning.
14393
14394 2002-10-19 Akim Demaille <akim@epita.fr>
14395
14396 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14397 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14398 Use them to have `calc.y' ready for %pure-parser.
14399 * data/yacc.c (YYLEX): Pass a yylex return type to
14400 b4_c_function_call.
14401
14402 2002-10-19 Akim Demaille <akim@epita.fr>
14403
14404 Prototype support of %lex-param and %parse-param.
14405
14406 * src/parse-gram.y: Add the definition of the %lex-param and
14407 %parse-param tokens, plus their rules.
14408 Drop the `_' version of %glr-parser.
14409 Add the "," token.
14410 * src/scan-gram.l (INITIAL): Scan them.
14411 * src/muscle_tab.c: Comment changes.
14412 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14413 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14414 (muscle_entry_s): The `value' member is no longer const.
14415 Adjust all dependencies.
14416 * src/muscle_tab.c (muscle_init): Adjust: use
14417 MUSCLE_INSERT_STRING.
14418 Initialize the obstack earlier.
14419 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14420 (muscle_pair_list_grow): New.
14421 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14422 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14423 * tests/calc.at: Use %locations, not --locations.
14424 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14425
14426 2002-10-19 Akim Demaille <akim@epita.fr>
14427
14428 * src/getargs.c (usage): Take status as argument and exit
14429 accordingly.
14430 Report the traditional `Try ... --help' message when status != 0.
14431 (usage, version): Don't take a FILE * as arg, it is pointless.
14432 (getargs): When there is an incorrect number of arguments, make it
14433 an error, and report it GNUlically thanks to `usage ()'.
14434
14435 2002-10-18 Paul Eggert <eggert@twinsun.com>
14436
14437 * data/glr.c (yyreportParseError): Don't assume that sprintf
14438 yields the length of the printed string, as this is not true
14439 on SunOS 4.1.4. Reported by Peter Klein.
14440
14441 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14442 * tests/conflicts.at (%nonassoc and eof): Likewise.
14443 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14444
14445 2002-10-17 Akim Demaille <akim@epita.fr>
14446
14447 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14448 * src/getargs.c (trace_types, trace_args): Adjust.
14449 * src/reader.c (grammar_current_rule_prec_set)
14450 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14451 Standardize error messages.
14452 And s/@prec/%prec/!
14453 (reader): Use trace_flag to enable scanner/parser debugging,
14454 instead of an adhoc scheme.
14455 * src/scan-gram.l: Remove trailing debugging code.
14456
14457 2002-10-16 Paul Eggert <eggert@twinsun.com>
14458
14459 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14460 MUSCLE_TAB_H.
14461
14462 * NEWS: Officially drop support for building Bison with K&R C,
14463 since it didn't work anyway and it's not worth worrying about.
14464 * Makefile.maint (wget_files): Remove ansi2knr.c.
14465 (ansi2knr.c-url_prefix): Remove.
14466 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14467 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14468 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14469
14470 2002-10-15 Paul Eggert <eggert@twinsun.com>
14471
14472 Stop using the "enum_" trick for K&R-style function definitions;
14473 it confused me, and I was the author! Instead, assume that people
14474 who want to use K&R C compilers (when using these modules in GCC,
14475 perhaps?) will run ansi2knr.
14476
14477 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14478 All uses of "enum_" changed to "enum ".
14479 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14480 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14481
14482 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14483 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14484 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14485 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14486 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14487 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14488 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14489 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14490 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14491 Use function prototypes; this removes the need for declaring
14492 static functions simply to provide their prototypes.
14493 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14494 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14495 bitset_count_, bitset_create, bitset_dump, bitset_first,
14496 bitset_free, bitset_init, bitset_last, bitset_next,
14497 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14498 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14499 bitset_print, bitset_release_memory, bitset_toggle_,
14500 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14501 debug_bitset): Likewise.
14502 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14503 * lib/bitset_stats.c (bitset_log_histogram_print,
14504 bitset_percent_histogram_print, bitset_stats_and,
14505 bitset_stats_and_cmp, bitset_stats_and_or,
14506 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14507 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14508 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14509 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14510 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14511 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14512 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14513 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14514 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14515 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14516 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14517 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14518 bitset_stats_zero): Likewise.
14519 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14520 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14521 bitsetv_dump, debug_bitsetv): Likewise.
14522 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14523 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14524 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14525 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14526 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14527 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14528 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14529 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14530 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14531 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14532 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14533 Likewise.
14534 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14535 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14536 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14537 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14538 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14539 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14540 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14541 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14542 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14543 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14544 lbitset_xor_cmp, lbitset_zero): Likewise.
14545
14546 2002-10-14 Akim Demaille <akim@epita.fr>
14547
14548 Version 1.75.
14549
14550 2002-10-14 Akim Demaille <akim@epita.fr>
14551
14552 * tests/Makefile.am (maintainer-check-posix): New.
14553
14554 2002-10-14 Akim Demaille <akim@epita.fr>
14555
14556 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14557 member.
14558
14559 2002-10-14 Akim Demaille <akim@epita.fr>
14560
14561 * src/tables.c (table_ninf_remap): base -> tab.
14562 Reported by Matt Rosing.
14563
14564 2002-10-14 Paul Eggert <eggert@twinsun.com>
14565
14566 * tests/action.at, tests/calc.at, tests/conflicts.at,
14567 tests/cxx-type.at, tests/headers.at, tests/input.at,
14568 tests/regression.at, tests/synclines.at, tests/torture.at:
14569 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14570 so that the tests still work even if POSIXLY_CORRECT is set.
14571 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
14572
14573 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14574 for portability to K&R hosts. Fix typo: signed char is guaranteed
14575 only to 127, not to 128.
14576 * data/glr.c (yysigned_char): New type.
14577 * data/yacc.c (yysigned_char): Likewise.
14578 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14579
14580 2002-10-13 Paul Eggert <eggert@twinsun.com>
14581
14582 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14583 true due to limited range of data type" warning from GCC.
14584
14585 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14586 by wrapping enum yytokentype's definition inside #ifndef
14587 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14588
14589 2002-10-13 Akim Demaille <akim@epita.fr>
14590
14591 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14592 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14593
14594 2002-10-13 Akim Demaille <akim@epita.fr>
14595
14596 * Makefile.maint: Update from Autoconf 2.54.
14597 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14598
14599 2002-10-13 Akim Demaille <akim@epita.fr>
14600
14601 * src/print.c (print_state): Separate the list of solved conflicts
14602 from the other items.
14603 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14604
14605 2002-10-13 Akim Demaille <akim@epita.fr>
14606
14607 Let nondeterministic skeletons be usable with deterministic
14608 tables.
14609
14610 With the patch, GAWK compiled by GCC without -O2 passes its test
14611 suite using a GLR parser driven by LALR tables. It fails with -O2
14612 because `struct stat' gives two different answers on my machine:
14613 88 (definition of an auto var) and later 96 (memset on this var).
14614 Hence the stack is badly corrumpted. The headers inclusion is to
14615 blame: if I move the awk.h inclusion before GLR's system header
14616 inclusion, the two struct stat have the same size.
14617
14618 * src/tables.c (pack_table): Always create conflict_table.
14619 (token_actions): Always create conflict_list.
14620 * data/glr.c (YYFLAG): Remove, unused.
14621
14622 2002-10-13 Akim Demaille <akim@epita.fr>
14623
14624 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14625 (O0FLAGS): New.
14626 (VALGRIND, GXX): New.
14627 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14628 * tests/bison.in: Run $PREBISON a pre-command.
14629 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14630 (maintainer-check-g++): New.
14631 * Makefile.am (maintainer-check): New.
14632
14633 2002-10-13 Akim Demaille <akim@epita.fr>
14634
14635 * data/glr.c: Formatting changes.
14636 Tweak some trace messages to match yacc.c's.
14637
14638 2002-10-13 Akim Demaille <akim@epita.fr>
14639
14640 GLR parsers sometimes raise parse errors instead of performing the
14641 default reduction.
14642 Reported by Charles-Henry de Boysson.
14643
14644 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
14645 check the length of the traces when %glr.
14646 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14647 GLR's traces.
14648 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14649 Test GLR parsers.
14650 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14651 (yyltype): Remove the yy prefix from the member names.
14652 (yytable): Complete its comment.
14653 (yygetLRActions): Map error action number from YYTABLE from
14654 YYTABLE_NINF to 0.
14655 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14656 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14657 not satisfying as we could compare an YYACTION computed from
14658 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14659 only value for error actions.
14660 (yyreportParseError): In verbose parse error messages, don't issue
14661 `error' in the list of expected tokens.
14662 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14663 next action to perform to match glr.c's decoding.
14664 (yytable): Complete its comment.
14665
14666 2002-10-13 Paul Eggert <eggert@twinsun.com>
14667
14668 Fix problem reported by Henrik Grubbstroem in
14669 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
14670 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14671 because the Bison parser reads the second action before reducing
14672 the first one.
14673 * src/scan-gram.l (rule_length): New static var.
14674 Use it to keep track of the rule length in the scanner, since
14675 we can't expect the parser to be in lock-step sync with the scanner.
14676 (handle_action_dollar, handle_action_at): Use this var.
14677 * tests/actions.at (Exotic Dollars): Test for the problem.
14678
14679 2002-10-12 Paul Eggert <eggert@twinsun.com>
14680
14681 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14682 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14683 Include <sys/time.h> when checking for clock_t and struct tms.
14684 Use same include order as source.
14685 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
14686 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
14687
14688 * lib/timevar.c: Update copyright date and clarify comments.
14689 (get_time) [IN_GCC]: Keep the GCC version for reference.
14690
14691 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14692 GCC version as of today, then merge Bison's changes.
14693 Change "GCC" to "Bison" in copyright notice. timevar.def's
14694 author is Akim, so change that too.
14695
14696 * src/reader.c (grammar_current_rule_check):
14697 Don't worry about the default action if $$ is untyped.
14698 Prevents bogus warnings reported by Jim Gifford in
14699 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
14700
14701 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14702 * data/glr.c, data/lalr1.cc, data/yacc.c:
14703 Output token definitions before the first part of user declarations.
14704 Fixes compatibility problem reported by Jim Gifford for kbd in
14705 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14706
14707 2002-10-11 Paul Eggert <eggert@twinsun.com>
14708
14709 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14710 (yyparse): here. This undoes some of the 2002-07-25 change.
14711 Compatibility problem reported by Ralf S. Engelschall with
14712 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14713
14714 2002-10-11 Akim Demaille <akim@epita.fr>
14715
14716 * tests/regression.at Characters Escapes): New.
14717 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14718 characters.
14719 Reported by Jan Nieuwenhuizen.
14720
14721 2002-10-11 Akim Demaille <akim@epita.fr>
14722
14723 * po/id.po: New.
14724
14725 2002-10-10 Paul Eggert <eggert@twinsun.com>
14726
14727 Portability fixes for bitsets; this also avoids several GCC
14728 warnings.
14729
14730 * lib/abitset.c: Include <stddef.h>, for offsetof.
14731 * lib/lbitset.c: Likewise.
14732
14733 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14734 properly for vectors of objects. Do not assume that adding a
14735 header size to a multiple of a word size yields a value that is
14736 properly aligned for the whole union.
14737 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14738
14739 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14740 unique names for structures.
14741 * lib/ebitset.c (ebitset_bytes): Likewise.
14742 * lib/lbitset.c (lbitset_bytes): Likewise.
14743
14744 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14745 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14746 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14747 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14748 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14749 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14750 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14751 to improve the type-checking that GCC can do.
14752 * lib/bitset.c (bitset_op4_cmp): Likewise.
14753 * lib/bitset_stats.c (bitset_stats_count,
14754 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14755 bitset_stats_copy, bitset_stats_disjoint_p,
14756 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14757 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14758 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14759 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14760 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14761 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14762 bitset_stats_or_and_cmp): Likewise.
14763 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14764 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14765 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14766 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14767
14768 * lib/abitset.h: Include bitset.h, not bbitset.h.
14769 * lib/ebitset.h: Likewise.
14770 * lib/lbitset.h: Likewise.
14771
14772 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14773 All instances of parameters of type enum bitset_opts are now of
14774 type enum_bitset_opts, to conform to the C Standard, and similarly
14775 for enum_bitset_type.
14776 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14777 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14778
14779 Do not use "struct bitset_struct" to mean different things in
14780 different modules. Not only is this confusing, it violates
14781 the C Standard, which requires that structure types in different
14782 modules must be compatible if one is to be passed to the other.
14783 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14784 All instances of "struct bitset_struct *" replaced with "bitset".
14785 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14786 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14787 struct lbitset_struct, struct bitset_stats_struct): New types.
14788 All uses of struct bitset_struct changed to union bitset_union,
14789 etc.
14790 * lib/abitset.c (struct abitset_struct, abitset,
14791 struct bitset_struct): Remove.
14792 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14793 struct bitset_struct): Remove.
14794 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14795 bitset_struct): Remove.
14796 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14797 Likewise.
14798
14799 Do not call a function of type T using a call that assumes the
14800 function is of a different type U. Standard C requires that a
14801 function must be called with a type that is compatible with its
14802 definition.
14803 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14804 New decls.
14805 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14806 New functions.
14807 * lib/ebitset.c (PFV): Remove.
14808 * lib/lbitset.c (PFV): Likewise.
14809 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14810 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14811 decls.
14812 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14813 (ebitset_vtable): Use them.
14814 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14815 lbitset_xor): New functions.
14816 (lbitset_vtable): Use them.
14817
14818 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14819 Declare.
14820
14821 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14822 GCC warning.
14823 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14824 Use offsetof, for simplicity.
14825
14826 2002-10-06 Paul Eggert <eggert@twinsun.com>
14827
14828 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14829 the same width as int. This reapplies a hunk of the 2002-08-12 patch
14830 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
14831 which was inadvertently undone by the 2002-09-30 patch.
14832 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14833 the same width as int.
14834
14835 2002-10-04 Paul Eggert <eggert@twinsun.com>
14836
14837 Version 1.50.
14838
14839 * configure.ac (AC_INIT), NEWS: Increment version number.
14840
14841 * doc/bison.texinfo: Minor spelling, grammar, and white space
14842 fixes.
14843 (Symbols): Mention that any negative value returned from yylex
14844 signifies end-of-input. Warn about negative chars. Mention
14845 the portable Standard C character set.
14846
14847 The GNU coding standard says CFLAGS and YFLAGS are reserved
14848 for the installer to set.
14849 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14850 * src/Makefile.am (AM_CFLAGS): Likewise.
14851 (AM_YFLAGS): Renamed from YFLAGS.
14852
14853 Fix some MAX and MIN problems.
14854 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14855 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14856 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14857 * src/reader.c (reader): Use it.
14858
14859 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14860 POSIX 1003.1-2001 has removed fgrep.
14861
14862 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14863
14864 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14865 interpreted as signed.
14866 * lib/ebitset.c (ebitset_list): Fix bug.
14867
14868 2002-10-01 Paul Eggert <eggert@twinsun.com>
14869
14870 More fixes for 64-bit hosts and large bitsets.
14871
14872 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14873 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14874 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14875 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14876 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14877 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14878 bitset_count_): Likewise.
14879 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14880 bitset_first, bitset_last): Likewise.
14881 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14882 bitset_stats_list_reverse, bitset_stats_size,
14883 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14884 Likewise.
14885 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14886 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14887 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14888 bitsetv_reflexive_transitive_closure): Likewise.
14889 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14890 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14891 Likewise.
14892 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14893 Likewise.
14894
14895 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14896 Use size_t, not unsigned int, to count bytes.
14897 * lib/abitset.h (abitset_bytes): Likewise.
14898 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14899 Likewise.
14900 * lib/bitset.h (bitset_bytes): Likewise.
14901 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14902 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14903 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14904 * lib/ebitset.c (ebitset_bytes): Likewise.
14905 * lib/ebitset.h (ebitset_bytes): Likewise.
14906 * lib/lbitset.c (lbitset_bytes): Likewise.
14907 * lib/lbitset.h (lbitset_bytes): Likewise.
14908
14909 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14910 abitset_subset_p, abitset_disjoint_p, abitset_and,
14911 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14912 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14913 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14914 abitset_or_and, abitset_or_and_cmp):
14915 Use bitset_windex instead of unsigned int.
14916 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14917 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14918 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14919 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
14920 Likewise.
14921 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
14922
14923 * lib/bitset.c (bitset_print):
14924 Use proper printf formats for widths of integer types.
14925 * lib/bitset_stats.c (bitset_percent_histogram_print,
14926 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
14927 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14928 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14929 * lib/lbitset.c (lbitset_bytes): Likewise.
14930
14931 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
14932 BITSET_SIZE_MAX): New macros.
14933 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
14934 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
14935 to BITSET_WINDEX_MAX.
14936
14937 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
14938 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
14939 since we now return the bitset_bindex type (not int).
14940
14941 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
14942 when computing sizes.
14943 * lib/ebitset.c (ebitset_elts_grow): Likewise.
14944
14945 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
14946 and avoid cast to unsigned.
14947
14948 2002-09-30 Akim Demaille <akim@epita.fr>
14949
14950 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14951 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
14952 Updates from Michael Hayes.
14953
14954 2002-09-30 Art Haas <ahaas@neosoft.com>
14955
14956 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
14957 invocations.
14958 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
14959 defined.
14960
14961 2002-09-27 Akim Demaille <akim@epita.fr>
14962
14963 Version 1.49c.
14964
14965 2002-09-27 Akim Demaille <akim@epita.fr>
14966
14967 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
14968 (Because of AC_LIBSOURCE).
14969
14970 2002-09-27 Akim Demaille <akim@epita.fr>
14971
14972 Playing with Autoscan.
14973
14974 * configure.ac: Remove the old LIBOBJ tweaks.
14975 (AC_REPLACE_FUNCS): Add strrchr and strtol.
14976 * lib/strrchr.c: New.
14977 * lib/strtol.c: New, from the Coreutils 4.5.1.
14978
14979 2002-09-27 Akim Demaille <akim@epita.fr>
14980
14981 Playing with Autoscan.
14982
14983 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
14984 * lib/Makefile.am (libbison_a_SOURCES): No longer include
14985 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
14986 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
14987 Coreutils 4.5.1.
14988
14989 2002-09-24 Akim Demaille <akim@epita.fr>
14990
14991 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
14992 (Frequently Asked Questions, Parser Stack Overflow): New.
14993
14994 2002-09-13 Akim Demaille <akim@epita.fr>
14995
14996 Playing with autoscan.
14997
14998 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
14999 * src/files.c (skeleton_find): Remove, unused.
15000 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15001 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15002
15003 2002-09-13 Akim Demaille <akim@epita.fr>
15004
15005 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15006 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15007
15008 2002-09-13 Akim Demaille <akim@epita.fr>
15009
15010 * configure.ac: Require 2.54.
15011 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15012 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15013 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15014 Remove, provided by Autoconf macros.
15015
15016 2002-09-12 Akim Demaille <akim@epita.fr>
15017
15018 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15019
15020 2002-09-12 Akim Demaille <akim@epita.fr>
15021
15022 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15023 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15024 Reported by Martin Mokrejs.
15025
15026 2002-09-10 Akim Demaille <akim@epita.fr>
15027
15028 * src/parse-gram.y: Associate a human readable string to each
15029 token type.
15030 * tests/regression.at (Invalid inputs): Adjust.
15031
15032 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15033
15034 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15035 with an Autoconf-2.5x style configure.ac.
15036
15037 2002-09-06 Paul Eggert <eggert@twinsun.com>
15038
15039 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15040 exception applies only to yacc.c. This is a modification of a
15041 patch originally suggested by Akim Demaille.
15042
15043 2002-09-06 Akim Demaille <akim@epita.fr>
15044
15045 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15046 here to...
15047 * data/yacc.c: here.
15048
15049 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15050 LocationType.
15051 (b4_ltype): Default to yy::Location from location.hh.
15052
15053 2002-09-04 Jim Meyering <jim@meyering.net>
15054
15055 * data/yacc.c: Guard the declaration of yytoknum also with
15056 `#ifdef YYPRINT', so it is declared only when used.
15057
15058 2002-09-04 Akim Demaille <akim@epita.fr>
15059
15060 * configure.in: Rename as...
15061 * configure.ac: this.
15062 Bump to 1.49c.
15063
15064 2002-09-04 Akim Demaille <akim@epita.fr>
15065
15066 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15067 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15068 translate maintainer only messages.
15069
15070 2002-08-12 Paul Eggert <eggert@twinsun.com>
15071
15072 Version 1.49b.
15073
15074 * Makefile.am (SUBDIRS): Remove intl.
15075 (DISTCLEANFILES): Remove.
15076 * NEWS: Mention that GNU M4 is now required. Clarify what is
15077 meant by "larger grammars". Mention the pt_BR translation.
15078 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15079 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15080 Bump version from 0.11.2 to 0.11.5.
15081 (BISON_PREREQ_STAGE): Remove.
15082 (AM_GNU_GETTEXT): Use external gettext.
15083 (AC_OUTPUT): Remove intl/Makefile.
15084
15085 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15086
15087 * data/glr.c: Include string.h, for strlen.
15088 (yyreportParseError): Use size_t for yysize.
15089 (yy_yypstack): No longer nested inside yypstates, as nested
15090 functions are not portable. Do not assume size_t is the
15091 same width as int.
15092 (yypstates): Do not assume that ptrdiff_t is the same width
15093 as int, and similarly for yyposn and YYINDEX.
15094
15095 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15096
15097 * lib/Makefile.am (INCLUDES): Do not include from the intl
15098 directory, which has been removed.
15099 * src/Makefile.am (INCLUDES): Likewise.
15100
15101 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15102 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15103 New vars.
15104
15105 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15106 * tests/Makefile.am (EXTRA_DIST): Likewise.
15107
15108 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15109 Do not assume that bitset_windex is the same width as unsigned.
15110
15111 * lib/abitset.c (abitset_unused_clear): Do not assume that
15112 bitset_word is the same width as int.
15113 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15114 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15115 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15116 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15117 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15118
15119 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15120 portability to one's complement hosts!).
15121 * lib/ebitset.c (ebitset_op1): Likewise.
15122 * lib/lbitset.c (lbitset_op1): Likewise.
15123
15124 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15125 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15126 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15127 Sync with fileutils.
15128 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15129 lib/gettext.h: Sync with diffutils.
15130
15131 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15132 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15133
15134 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15135 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15136 check for void *.
15137
15138 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15139 size_t; the old version tried to do this but casted improperly.
15140 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15141 (bitset_test): Now returns int, not unsigned long.
15142
15143 * lib/bitset_stats.c: Include "gettext.h".
15144 (_): New macro.
15145 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15146 name locals "index", as it generates unnecessary warnings on some
15147 hosts that have an "index" function.
15148
15149 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15150 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15151 they need translation.
15152 * src/LR0.c (state_list_append, new_itemsets, get_state,
15153 append_states, generate_states): Likewise.
15154 * src/assoc.c (assoc_to_string): Likewise.
15155 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15156 * src/gram.c (grammar_dump): Likewise.
15157 * src/injections.c (injections_compute): Likewise.
15158 * src/lalr.c (lookaheads_print): Likewise.
15159 * src/relation.c (relation_transpose): Likewise.
15160 * src/scan-gram.l: Likewise.
15161 * src/tables.c (table_grow, pack_vector): Likewise.
15162
15163 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15164 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15165 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15166 * m4/mbstate_t.m4: Sync with fileutils.
15167 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15168
15169 * po/LINGUAS: Add pt_BR.
15170 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15171 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15172 lib/timevar.c.
15173 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15174 manual recommends.
15175 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15176
15177 * src/complain.c (strerror_r): Remove decl; not needed.
15178 (strerror): Use same pattern as ../lib/error.c.
15179
15180 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15181
15182 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15183
15184 * src/main.c (main): Cast result of bindtextdomain and textdomain
15185 to void, to avoid a GCC warning when --disable-nls is in effect.
15186
15187 * src/scan-gram.l: Use strings rather than escapes when possible,
15188 to minimize the number of warnings from xgettext.
15189 (handle_action_dollar, handle_action_at): Don't use isdigit,
15190 as it mishandles negative chars and it may not work as expected
15191 outside the C locale.
15192
15193 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15194 this is a GCC extension and is not portable to other compilers.
15195
15196 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15197 Do not include <ctype.h>; no longer needed.
15198 Do not include <malloc.h>; no longer needed (and generates
15199 warnings on OpenBSD 3.0).
15200
15201 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15202 it's not portable.
15203
15204 * tests/regression.at: Do not use 'cc -c input.c -o input';
15205 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15206
15207 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15208 exit status as failure, not just exit status 1. Sun C exits
15209 with status 2 sometimes.
15210
15211 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15212 Use it for the two large tests.
15213
15214 2002-08-02 Akim Demaille <akim@epita.fr>
15215
15216 * src/conflicts.c (conflicts_output): Don't output rules never
15217 reduced here, since anyway that computation doesn't work.
15218 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15219 (rule_useless_p, rule_never_reduced_p): New.
15220 (grammar_rules_partial_print): Use a filter instead of a range.
15221 Display the title only if needed.
15222 (grammar_rules_print): Adjust.
15223 (grammar_rules_never_reduced_report): New.
15224 * src/tables.c (action_row): Move the computation of rules never
15225 reduced to...
15226 (token_actions): here.
15227 * src/main.c (main): Make the parser before making the report, so
15228 that rules never reduced are computed.
15229 Call grammar_rules_never_reduced_report.
15230 * src/print.c (print_results): Report rules never reduced.
15231 * tests/conflicts.at, tests/reduce.at: Adjust.
15232
15233 2002-08-01 Akim Demaille <akim@epita.fr>
15234
15235 Instead of attaching lookaheads and duplicating the rules being
15236 reduced by a state, attach the lookaheads to the reductions.
15237
15238 * src/state.h (state_t): Remove the `lookaheads',
15239 `lookaheads_rule' member.
15240 (reductions_t): Add a `lookaheads' member.
15241 Use a regular array for the `rules'.
15242 * src/state.c (reductions_new): Initialize the lookaheads member
15243 to 0.
15244 (state_rule_lookaheads_print): Adjust.
15245 * src/state.h, src/state.c (state_reductions_find): New.
15246 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15247 (count_rr_conflicts): Adjust.
15248 * src/lalr.c (LArule): Remove.
15249 (add_lookback_edge): Adjust.
15250 (state_lookaheads_count): New.
15251 (states_lookaheads_initialize): Merge into...
15252 (initialize_LA): this.
15253 (lalr_free): Adjust.
15254 * src/main.c (main): Don't free nullable and derives too early: it
15255 is used by --verbose.
15256 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15257
15258 2002-08-01 Akim Demaille <akim@epita.fr>
15259
15260 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15261 `rule_number_t**'.
15262 (set_derives, free_derives): Rename as...
15263 (derives_compute, derives_free): this.
15264 Adjust all dependencies.
15265 * src/nullable.c (set_nullable, free_nullable): Rename as...
15266 (nullable_compute, nullable_free): these.
15267 (rule_list_t): Store rule_t *, not rule_number_t.
15268 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15269 pointers, instead of their numbers.
15270 * src/main.c (main): Call nullable_free, and derives_free earlier,
15271 as they were lo longer used.
15272
15273 2002-08-01 Akim Demaille <akim@epita.fr>
15274
15275 * lib/timevar.c (get_time): Include children time.
15276 * src/lalr.h (LA, LArule): Don't export them: used with the
15277 state_t.
15278 * src/lalr.c (LA, LArule): Static.
15279 * src/lalr.h, src/lalr.c (lalr_free): New.
15280 * src/main.c (main): Call it.
15281 * src/tables.c (pack_vector): Check whether loc is >= to the
15282 table_size, not >.
15283 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15284 (tables_generate): do it, since that's also it which allocates
15285 them.
15286 Don't free LA and LArule, main does.
15287
15288 2002-07-31 Akim Demaille <akim@epita.fr>
15289
15290 Separate parser tables computation and output.
15291
15292 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15293 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15294 (yydefgoto, yydefact, high): Move to...
15295 * src/tables.h, src/tables.c: here.
15296 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15297 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15298 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15299 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15300 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15301 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15302 (action_row, save_row, token_actions, save_column, default_goto)
15303 (goto_actions, sort_actions, matching_state, pack_vector)
15304 (table_ninf_remap, pack_table, prepare_actions): Move to...
15305 * src/tables.c: here.
15306 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15307 * src/output.c (token_actions, output_base, output_conflicts)
15308 (output_check): Merge into...
15309 (prepare_actions): this.
15310 (actions_output): Rename as...
15311 (user_actions_output): this.
15312 * src/main.c (main): Call tables_generate and tables_free.
15313
15314 2002-07-31 Akim Demaille <akim@epita.fr>
15315
15316 Steal GCC's --time-report support.
15317
15318 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15319 stolen/adjusted from GCC.
15320 * m4/stage.m4: Remove time related checks.
15321 * m4/timevar.m4: New.
15322 * configure.in: Adjust.
15323 * src/system.h: Adjust to using timevar.h.
15324 * src/getargs.h, src/getargs.c: Support trace_time for
15325 --trace=time.
15326 * src/main.c (stage): Remove.
15327 (main): Replace `stage' invocations with timevar calls.
15328 * src/output.c: Insert pertinent timevar calls.
15329
15330 2002-07-31 Akim Demaille <akim@epita.fr>
15331
15332 Let --trace have arguments.
15333
15334 * src/getargs.h (enum trace_e): New.
15335 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15336 (long_options, short_options): --trace/-T takes an optional
15337 argument.
15338 Change all the uses of trace_flag to reflect the new flags.
15339 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15340
15341 Strengthen `stage' portability.
15342
15343 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15344 * configure.in: Use it.
15345 Don't check for malloc.h and sys/times.h.
15346 * src/system.h: Include them when appropriate.
15347 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15348 times and struct tms are available.
15349
15350 2002-07-30 Akim Demaille <akim@epita.fr>
15351
15352 In verbose parse error message, don't report `error' as an
15353 expected token.
15354 * tests/actions.at (Printers and Destructors): Adjust.
15355 * tests/calc.at (Calculator $1): Adjust.
15356 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15357 error message, do not report the parser accepts the error token in
15358 that state.
15359
15360 2002-07-30 Akim Demaille <akim@epita.fr>
15361
15362 Normalize conflict related messages.
15363
15364 * src/complain.h, src/complain.c (warn, complain): New.
15365 * src/conflicts.c (conflicts_print): Use them.
15366 (conflict_report_yacc): New, extracted from...
15367 (conflicts_print): here.
15368 * tests/conflicts.at, tests/existing.at: Adjust.
15369
15370 2002-07-30 Akim Demaille <akim@epita.fr>
15371
15372 Report rules which are never reduced by the parser: those hidden
15373 by conflicts.
15374
15375 * src/LR0.c (save_reductions): Don't make the final state too
15376 different: save its reduction (accept) instead of having a state
15377 without any action (no shift or goto, no reduce).
15378 Note: the final state is now a ``regular'' state, i.e., the
15379 parsers now contain `reduce 0' as default reduction.
15380 Nevertheless, since they decide to `accept' when yystate =
15381 final_state, they still will not reduce rule 0.
15382 * src/print.c (print_actions, print_reduction): Adjust.
15383 * src/output.c (action_row): Track reduced rules.
15384 (token_actions): Report rules never reduced.
15385 * tests/conflicts.at, tests/regression.at: Adjust.
15386
15387 2002-07-30 Akim Demaille <akim@epita.fr>
15388
15389 `stage' was accidently included in a previous patch.
15390 Initiate its autoconfiscation.
15391
15392 * configure.in: Look for malloc.h and sys/times.h.
15393 * src/main.c (stage): Adjust.
15394 Report only when trace_flag.
15395
15396 2002-07-29 Akim Demaille <akim@epita.fr>
15397
15398 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15399 state_number_t.
15400 (errs_t): symbol_t*, not symbol_number_t.
15401 (reductions_t): rule_t*, not rule_number_t.
15402 (FOR_EACH_SHIFT): New.
15403 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15404 * src/print.c, src/print_graph.c: Adjust.
15405
15406 2002-07-29 Akim Demaille <akim@epita.fr>
15407
15408 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15409
15410 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15411 (endtoken, accept): these.
15412 * src/reader.c (reader): Set endtoken's default tag to "$end".
15413 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15414 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15415 Adjust.
15416
15417 2002-07-29 Akim Demaille <akim@epita.fr>
15418
15419 * src/reduce.c (reduce_grammar): When the language is empty,
15420 complain about the start symbol, not the axiom.
15421 Use its location.
15422 * tests/reduce.at (Empty Language): New.
15423
15424 2002-07-26 Akim Demaille <akim@epita.fr>
15425
15426 * src/reader.h, src/reader.c (gram_error): ... can't get
15427 yycontrol without making too strong assumptions on the parser
15428 itself.
15429 * src/output.c (prepare_tokens): Use the real 0th value of
15430 token_translations instead of `0'.
15431 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15432 visible here.
15433 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15434 for the time being: %locations ought to provide it to yyerror.
15435
15436 2002-07-25 Akim Demaille <akim@epita.fr>
15437
15438 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15439 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15440 * tests/regression.at (Web2c Actions): Adjust.
15441
15442 2002-07-25 Akim Demaille <akim@epita.fr>
15443
15444 Stop storing rules from 1 to nrules + 1.
15445
15446 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15447 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15448 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15449 Iterate from 0 to nrules.
15450 Use rule_number_as_item_number and item_number_as_rule_number.
15451 Adjust to `derive' now containing possibly 0.
15452 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15453 Handle the `- 1' part in rule numbers from/to item numbers.
15454 * src/conflicts.c (log_resolution): Fix the message which reversed
15455 shift and reduce.
15456 * src/output.c (action_row): Initialize default_rule to -1.
15457 (token_actions): Adjust.
15458 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15459 expected output.
15460 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15461
15462 2002-07-25 Akim Demaille <akim@epita.fr>
15463
15464 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15465 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15466 (b4_c_knr_arg_decl): New.
15467 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15468 yyreport_parse_error.
15469
15470 2002-07-25 Akim Demaille <akim@epita.fr>
15471
15472 * data/yacc.c (yyreport_parse_error): New, extracted from...
15473 (yyparse): here.
15474 (yydestruct, yysymprint): Move above yyparse.
15475 Be K&R compliant.
15476
15477 2002-07-25 Akim Demaille <akim@epita.fr>
15478
15479 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15480 replace...
15481 (b4_sint_type, b4_uint_type): these.
15482 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15483 * tests/regression.at (Web2c Actions): Adjust.
15484
15485 2002-07-25 Akim Demaille <akim@epita.fr>
15486
15487 * src/gram.h (TIEM_NUMBER_MAX): New.
15488 (item_number_of_rule_number, rule_number_of_item_number): Rename
15489 as...
15490 (rule_number_as_item_number, item_number_as_rule_number): these.
15491 Adjust dependencies.
15492 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15493 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15494 (symbol_number_to_vector_number): New.
15495 (order): Of vector_number_t* type.
15496 (base_t, BASE_MAX, BASE_MIN): New.
15497 (froms, tos, width, pos, check): Of base_t type.
15498 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15499 (actrow): Of action_number_t type.
15500 (conflrow): Of unsigned int type.
15501 (table_ninf, base_ninf): New.
15502 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15503 (muscle_insert_int_table, muscle_insert_base_table)
15504 (muscle_insert_rule_number_table): New.
15505 (prepare_tokens): Output `toknum' as int_table.
15506 (action_row): Returns a rule_number_t.
15507 Use ACTION_MIN, not SHRT_MIN.
15508 (token_actions): yydefact is rule_number_t*.
15509 (table_ninf_remap): New.
15510 (pack_table): Use it for `base' and `table'.
15511 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15512 replaced with...
15513 (YYPACT_NINF, YYTABLE_NINF): these.
15514 (yypact, yytable): Compute their types instead of hard-coded
15515 `short'.
15516 * tests/regression.at (Web2c Actions): Adjust.
15517
15518 2002-07-19 Akim Demaille <akim@epita.fr>
15519
15520 * src/scan-gram.l (id): Can start with an underscore.
15521
15522 2002-07-16 Akim Demaille <akim@epita.fr>
15523
15524 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15525 Adjust all former `associativity' dependencies.
15526 * src/symtab.c (symbol_new): Default associativity is `undef', not
15527 `right'.
15528 (symbol_check_alias_consistence): Adjust.
15529
15530 2002-07-09 Akim Demaille <akim@epita.fr>
15531
15532 * doc/bison.texinfo: Properly set the ``header'' part.
15533 Use @dircategory ``GNU programming tools'' as per Texinfo's
15534 documentation.
15535 Use @copying.
15536
15537 2002-07-09 Akim Demaille <akim@epita.fr>
15538
15539 * lib/quotearg.h: Protect against multiple inclusions.
15540 * src/location.h (location_t): Add a `file' member.
15541 (LOCATION_RESET, LOCATION_PRINT): Adjust.
15542 * src/complain.c (warn_at, complain_at, fatal_at): Drop
15543 `error_one_per_line' support.
15544
15545 2002-07-09 Akim Demaille <akim@epita.fr>
15546
15547 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15548 * src/reader.c (lineno): Remove.
15549 Adjust all dependencies.
15550 (get_merge_function): Take a location and use complain_at.
15551 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15552 * tests/regression.at (Invalid inputs, Mixing %token styles):
15553 Adjust.
15554
15555 2002-07-09 Akim Demaille <akim@epita.fr>
15556
15557 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15558 recovery rule, and forbid extensions when --yacc.
15559 (gram_error): Use complain_at.
15560 * src/reader.c (reader): Exit if there were parse errors.
15561
15562 2002-07-09 Akim Demaille <akim@epita.fr>
15563
15564 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15565 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15566 Reported by R Blake <blakers@mac.com>.
15567
15568 2002-07-09 Akim Demaille <akim@epita.fr>
15569
15570 * data/yacc.c: Output the copyright notive in the header.
15571
15572 2002-07-03 Akim Demaille <akim@epita.fr>
15573
15574 * src/output.c (froms, tos): Are state_number_t.
15575 (save_column): sp, sp1, and sp2 are state_number_t.
15576 (prepare): Rename `final' as `final_state_number', `nnts' as
15577 `nterms_number', `nrules' as `rules_number', `nstates' as
15578 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15579 unused.
15580 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15581 * data/lalr1.cc (nsym_): Remove, unused.
15582
15583 2002-07-03 Akim Demaille <akim@epita.fr>
15584
15585 * src/lalr.h, src/lalr.c (goto_number_t): New.
15586 * src/lalr.c (goto_list_t): New.
15587 Propagate them.
15588 * src/nullable.c (rule_list_t): New.
15589 Propagate.
15590 * src/types.h: Remove.
15591
15592 2002-07-03 Akim Demaille <akim@epita.fr>
15593
15594 * src/closure.c (print_fderives): Use rule_rhs_print.
15595 * src/derives.c (print_derives): Use rule_rhs_print.
15596 (rule_list_t): New, replaces `shorts'.
15597 (set_derives): Add comments.
15598 * tests/sets.at (Nullable, Firsts): Adjust.
15599
15600 2002-07-03 Akim Demaille <akim@epita.fr>
15601
15602 * src/output.c (prepare_actions): Free `tally' and `width'.
15603 (prepare_actions): Allocate and free `order'.
15604 * src/symtab.c (symbols_free): Free `symbols'.
15605 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15606 * src/output.c (m4_invoke): Move to...
15607 * src/scan-skel.l: here.
15608 (<<EOF>>): Close yyout, and free its name.
15609
15610 2002-07-03 Akim Demaille <akim@epita.fr>
15611
15612 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15613
15614 * src/LR0.c (new_state): Merge into...
15615 (state_list_append): this.
15616 (new_states): Merge into...
15617 (generate_states): here.
15618 (set_states): Don't ensure a proper `errs' state member here, do it...
15619 * src/conflicts.c (conflicts_solve): here.
15620 * src/state.h, src/state.c: Comment changes.
15621 (state_t): Rename member `shifts' as `transitions'.
15622 Adjust all dependencies.
15623 (errs_new): For consistency, also take the values as argument.
15624 (errs_dup): Remove.
15625 (state_errs_set): New.
15626 (state_reductions_set, state_transitions_set): Assert that no
15627 previous value was assigned.
15628 (state_free): New.
15629 (states_free): Use it.
15630 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15631 temporary storage: use `errs' and `nerrs' as elsewhere.
15632 (set_conflicts): Allocate and free this `errs'.
15633
15634 2002-07-02 Akim Demaille <akim@epita.fr>
15635
15636 * lib/libiberty.h: New.
15637 * lib: Update the bitset implementation from upstream.
15638 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15639 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15640 * src/main.c: Adjust bitset stats calls.
15641
15642 2002-07-01 Paul Eggert <eggert@twinsun.com>
15643
15644 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15645 char, so that negative chars don't collide with $.
15646
15647 2002-06-30 Akim Demaille <akim@epita.fr>
15648
15649 Have the GLR tests be `warning' checked, and fix the warnings.
15650
15651 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15652 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15653 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15654 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15655 (yyaddDeferredAction): static.
15656 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15657 (yyreportParseError): yyprefix is const.
15658 yytokenp is used only when verbose.
15659 (yy__GNUC__): Replace with __GNUC__.
15660 (yypdumpstack): yyi is size_t.
15661 (yypreference): Un-yy local variables and arguments, to avoid
15662 clashes with `yyr1'. Anyway, we are not in the user name space.
15663 (yytname_size): be an int, as is compared with ints.
15664 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15665 Use them.
15666 * tests/cxx-gram.at: Use quotation to protect $1.
15667 Use AT_COMPILE to enable warnings hunts.
15668 Prototype yylex and yyerror.
15669 `Use' argc.
15670 Include `string.h', not `strings.h'.
15671 Produce and prototype stmtMerge only when used.
15672 yylex takes a location.
15673
15674 2002-06-30 Akim Demaille <akim@epita.fr>
15675
15676 We spend a lot of time in quotearg, in particular when --verbose.
15677
15678 * src/symtab.c (symbol_get): Store a quoted version of the key.
15679 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15680 Adjust all callers.
15681
15682 2002-06-30 Akim Demaille <akim@epita.fr>
15683
15684 * src/state.h (reductions_t): Rename member `nreds' as num.
15685 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15686 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15687
15688 2002-06-30 Akim Demaille <akim@epita.fr>
15689
15690 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15691 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15692 (shifts_to): Rename as...
15693 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15694 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15695 (TRANSITION_IS_DISABLED, transitions_to): these.
15696
15697 2002-06-30 Akim Demaille <akim@epita.fr>
15698
15699 * src/print.c (print_shifts, print_gotos): Merge into...
15700 (print_transitions): this.
15701 (print_transitions, print_errs, print_reductions): Align the
15702 lookaheads columns.
15703 (print_core, print_transitions, print_errs, print_state,
15704 print_grammar): Output empty lines separator before, not after.
15705 (state_default_rule_compute): Rename as...
15706 (state_default_rule): this.
15707 * tests/conflicts.at (Defaulted Conflicted Reduction),
15708 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15709 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15710
15711 2002-06-30 Akim Demaille <akim@epita.fr>
15712
15713 Display items as we display rules.
15714
15715 * src/gram.h, src/gram.c (rule_lhs_print): New.
15716 * src/gram.c (grammar_rules_partial_print): Use it.
15717 * src/print.c (print_core): Likewise.
15718 * tests/conflicts.at (Defaulted Conflicted Reduction),
15719 (Unresolved SR Conflicts): Adjust.
15720 (Unresolved SR Conflicts): Adjust and rename as...
15721 (Resolved SR Conflicts): this, as was meant.
15722 * tests/regression.at (Web2c Report): Adjust.
15723
15724 2002-06-30 Akim Demaille <akim@epita.fr>
15725
15726 * src/print.c (state_default_rule_compute): New, extracted from...
15727 (print_reductions): here.
15728 Pessimize, but clarify the code.
15729 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15730
15731 2002-06-30 Akim Demaille <akim@epita.fr>
15732
15733 * src/output.c (action_row): Let default_rule be always a rule
15734 number.
15735
15736 2002-06-30 Akim Demaille <akim@epita.fr>
15737
15738 * src/closure.c (print_firsts, print_fderives, closure):
15739 Use BITSET_EXECUTE.
15740 * src/lalr.c (lookaheads_print): Likewise.
15741 * src/state.c (state_rule_lookaheads_print): Likewise.
15742 * src/print_graph.c (print_core): Likewise.
15743 * src/print.c (print_reductions): Likewise.
15744 * src/output.c (action_row): Likewise.
15745 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15746
15747 2002-06-30 Akim Demaille <akim@epita.fr>
15748
15749 * src/print_graph.c: Use report_flag.
15750
15751 2002-06-30 Akim Demaille <akim@epita.fr>
15752
15753 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15754 to...
15755 * src/relation.h, src/relation.c (traverse, relation_digraph)
15756 (relation_print, relation_transpose): New.
15757
15758 2002-06-30 Akim Demaille <akim@epita.fr>
15759
15760 * src/state.h, src/state.c (shifts_to): New.
15761 * src/lalr.c (build_relations): Use it.
15762
15763 2002-06-30 Akim Demaille <akim@epita.fr>
15764
15765 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15766 (item_number_of_rule_number, rule_number_of_item_number): New.
15767 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15768 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15769 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15770 Propagate their use.
15771 Much remains to be done, in particular wrt `shorts' from types.h.
15772
15773 2002-06-30 Akim Demaille <akim@epita.fr>
15774
15775 * src/symtab.c (symbol_new): Initialize the `printer' member.
15776
15777 2002-06-30 Akim Demaille <akim@epita.fr>
15778
15779 * src/LR0.c (save_reductions): Remove, replaced by...
15780 * src/state.h, src/state.c (state_reductions_set): New.
15781 (reductions, errs): Rename as...
15782 (reductions_t, errs_t): these.
15783 Adjust all dependencies.
15784
15785 2002-06-30 Akim Demaille <akim@epita.fr>
15786
15787 * src/LR0.c (state_list_t, state_list_append): New.
15788 (first_state, last_state): Now symbol_list_t.
15789 (this_state): Remove.
15790 (new_itemsets, append_states, save_reductions): Take a state_t as
15791 argument.
15792 (set_states, generate_states): Adjust.
15793 (save_shifts): Remove, replaced by...
15794 * src/state.h, src/state.c (state_shifts_set): New.
15795 (shifts): Rename as...
15796 (shifts_t): this.
15797 Adjust all dependencies.
15798 * src/state.h (state_t): Remove the `next' member.
15799
15800 2002-06-30 Akim Demaille <akim@epita.fr>
15801
15802 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15803 escaped in slot 0.
15804
15805 2002-06-30 Akim Demaille <akim@epita.fr>
15806
15807 Use hash.h for the state hash table.
15808
15809 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15810 (allocate_storage): Use state_hash_new.
15811 (free_storage): Use state_hash_free.
15812 (new_state, get_state): Adjust.
15813 * src/lalr.h, src/lalr.c (states): Move to...
15814 * src/states.h (state_t): Remove the `link' member, no longer
15815 used.
15816 * src/states.h, src/states.c: here.
15817 (state_hash_new, state_hash_free, state_hash_lookup)
15818 (state_hash_insert, states_free): New.
15819 * src/states.c (state_table, state_compare, state_hash): New.
15820 * src/output.c (output_actions): Do not free states now, since we
15821 still need to know the final_state number in `prepare', called
15822 afterwards. Do it...
15823 * src/main.c (main): here: call states_free after `output'.
15824
15825 2002-06-30 Akim Demaille <akim@epita.fr>
15826
15827 * src/state.h, src/state.c (state_new): New, extracted from...
15828 * src/LR0.c (new_state): here.
15829 * src/state.h (STATE_ALLOC): Move to...
15830 * src/state.c: here.
15831 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15832 * src/state.h, src/state.c: here.
15833
15834 2002-06-30 Akim Demaille <akim@epita.fr>
15835
15836 * src/reader.c (gensym): Rename as...
15837 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15838 (getsym): Rename as...
15839 (symbol_get): this.
15840
15841 2002-06-30 Akim Demaille <akim@epita.fr>
15842
15843 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15844 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15845 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15846 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15847
15848 2002-06-30 Akim Demaille <akim@epita.fr>
15849
15850 Make the test suite pass with warnings checked.
15851
15852 * tests/actions.at (Printers and Destructors): Improve.
15853 Avoid unsigned vs. signed issues.
15854 * tests/calc.at: Don't exercise the scanner here, do it...
15855 * tests/input.at (Torturing the Scanner): here.
15856
15857 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15858
15859 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
15860 reorganize first lines parallel to yacc.c.
15861
15862 2002-06-28 Akim Demaille <akim@epita.fr>
15863
15864 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15865 (b4_token_enum, b4_token_defines): New, factored from...
15866 * data/lalr1.cc, data/yacc.c, glr.c: here.
15867
15868 2002-06-28 Akim Demaille <akim@epita.fr>
15869
15870 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15871 unused variables.
15872 * src/output.c (merger_output): static.
15873
15874 2002-06-28 Akim Demaille <akim@epita.fr>
15875
15876 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
15877 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15878 pacify GCC.
15879 * src/output.c (save_row): Initialize all the variables to pacify GCC.
15880
15881 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15882
15883 Accumulated changelog for new GLR parsing features.
15884
15885 * src/conflicts.c (count_total_conflicts): Change name to
15886 conflicts_total_count.
15887 * src/conflicts.h: Ditto.
15888 * src/output.c (token_actions): Use the new name.
15889 (output_conflicts): Change conflp => conflict_list_heads, and
15890 confl => conflict_list for better readability.
15891 * data/glr.c: Use the new names.
15892 * NEWS: Add self to GLR announcement.
15893
15894 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15895
15896 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15897 Akim Demaille.
15898
15899 * data/bison.glr: Change name to glr.c
15900 * data/glr.c: Renamed from bison.glr.
15901 * data/Makefile.am: Add glr.c
15902
15903 * src/getargs.c:
15904
15905 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
15906 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
15907
15908 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15909
15910 * data/bison.glr: Be sure to restore the
15911 current #line when returning to the skeleton contents after having
15912 exposed the input file's #line.
15913
15914 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15915
15916 * data/bison.glr: Bring up to date with changes to bison.simple.
15917
15918 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15919
15920 * data/bison.glr: Correct definitions that use b4_prefix.
15921 Various reformatting.
15922 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
15923 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
15924 yytokenp argument; now part of stack.
15925 (yychar): Define to behave as documented.
15926 (yyclearin): Ditto.
15927
15928 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15929
15930 * src/reader.h: Add declaration for free_merger_functions.
15931
15932 * src/reader.c (merge_functions): New variable.
15933 (get_merge_function): New function.
15934 (free_merger_functions): New function.
15935 (readgram): Check for %prec that is not followed by a symbol.
15936 Handle %dprec and %merge declarations.
15937 (packgram): Initialize dprec and merger fields in rules array.
15938
15939 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
15940 conflict_list_cnt, conflict_list_free): New variables.
15941 (table_grow): Also grow conflict_table.
15942 (prepare_rules): Output dprec and merger tables.
15943 (conflict_row): New function.
15944 (action_row): Output conflict lists for GLR parser. Don't use
15945 default reduction in conflicted states for GLR parser so that there
15946 are spaces for the conflict lists.
15947 (save_row): Also save conflict information.
15948 (token_actions): Allocate conflict list.
15949 (merger_output): New function.
15950 (pack_vector): Pack conflict table, too.
15951 (output_conflicts): New function to output yyconflp and yyconfl.
15952 (output_check): Allocate conflict_tos.
15953 (output_actions): Output conflict tables, also.
15954 (output_skeleton): Output b4_mergers definition.
15955 (prepare): Output b4_max_rhs_length definition.
15956 Use 'bison.glr' as default skeleton for GLR parsers.
15957
15958 * src/gram.c (glr_parser): New flag.
15959 (grammar_free): Call free_merger_functions.
15960
15961 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
15962 all pairs of conflicting reductions, rather than just all tokens
15963 causing conflicts. Needed to size conflict tables.
15964 (conflicts_output): Modify call to count_rr_conflicts for new
15965 interface.
15966 (conflicts_print): Ditto.
15967 (count_total_conflicts): New function.
15968
15969 * src/reader.h (merger_list): New type.
15970 (merge_functions): New variable.
15971
15972 * src/lex.h (tok_dprec, tok_merge): New token types.
15973
15974 * src/gram.h (rule_s): Add dprec and merger fields.
15975 (glr_parser): New flag.
15976
15977 * src/conflicts.h (count_total_conflicts): New function.
15978
15979 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
15980
15981 * doc/bison.texinfo (Generalized LR Parsing): New section.
15982 (GLR Parsers): New section.
15983 (Language and Grammar): Mention GLR parsing.
15984 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
15985 Correct typo ("tge" -> "the").
15986
15987 * data/bison.glr: New skeleton for GLR parsing.
15988
15989 * tests/cxx-gram.at: New tests for GLR parsing.
15990
15991 * tests/testsuite.at: Include cxx-gram.at.
15992
15993 * tests/Makefile.am: Add cxx-gram.at.
15994
15995 * src/parse-gram.y:
15996
15997 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
15998
15999 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16000
16001 2002-06-27 Akim Demaille <akim@epita.fr>
16002
16003 * src/options.h, src/options.c: Remove.
16004 * src/getargs.c (short_options, long_options): New.
16005
16006 2002-06-27 Akim Demaille <akim@epita.fr>
16007
16008 * data/bison.simple, data/bison.c++: Rename as...
16009 * data/yacc.c, data/lalr1.cc: these.
16010 * doc/bison.texinfo (Environment Variables): Remove.
16011
16012 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16013
16014 * src/getargs.c (report_argmatch): Initialize strtok().
16015
16016 2002-06-20 Akim Demaille <akim@epita.fr>
16017
16018 * data/bison.simple (b4_symbol_actions): New, replaces...
16019 (b4_symbol_destructor, b4_symbol_printer): these.
16020 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16021 user token numbers.
16022
16023 2002-06-20 Akim Demaille <akim@epita.fr>
16024
16025 * data/bison.simple (yydestructor): Rename as...
16026 (yydestruct): this.
16027
16028 2002-06-20 Akim Demaille <akim@epita.fr>
16029
16030 * src/symtab.h, src/symtab.c (symbol_type_set)
16031 (symbol_destructor_set, symbol_precedence_set): The location is
16032 the last argument.
16033 Adjust all callers.
16034
16035 2002-06-20 Akim Demaille <akim@epita.fr>
16036
16037 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16038 internals.
16039 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16040 Takes a location.
16041 * src/symtab.h, src/symtab.c (symbol_class_set)
16042 (symbol_user_token_number_set): Likewise.
16043 Adjust all callers.
16044 Promote complain_at.
16045 * tests/input.at (Type Clashes): Adjust.
16046
16047 2002-06-20 Akim Demaille <akim@epita.fr>
16048
16049 * data/bison.simple (YYLEX): Fix the declaration when
16050 %pure-parser.
16051
16052 2002-06-20 Akim Demaille <akim@epita.fr>
16053
16054 * data/bison.simple (yysymprint): Don't print the token number,
16055 just its name.
16056 * tests/actions.at (Destructors): Rename as...
16057 (Printers and Destructors): this.
16058 Also exercise %printer.
16059
16060 2002-06-20 Akim Demaille <akim@epita.fr>
16061
16062 * data/bison.simple (YYDSYMPRINT): New.
16063 Use it to remove many of the #if YYDEBUG/if (yydebug).
16064
16065 2002-06-20 Akim Demaille <akim@epita.fr>
16066
16067 * src/symtab.h, src/symtab.c (symbol_t): printer and
16068 printer_location are new members.
16069 (symbol_printer_set): New.
16070 * src/parse-gram.y (PERCENT_PRINTER): New token.
16071 Handle its associated rule.
16072 * src/scan-gram.l: Adjust.
16073 (handle_destructor_at, handle_destructor_dollar): Rename as...
16074 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16075 * src/output.c (symbol_printers_output): New.
16076 (output_skeleton): Call it.
16077 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16078 since there are already many grammar files with a user `yyprint'.
16079 Replace the calls to YYPRINT to calls to yysymprint.
16080 * tests/calc.at: Adjust.
16081 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16082 taking advantage of parser very internal details (stack size!).
16083
16084 2002-06-20 Akim Demaille <akim@epita.fr>
16085
16086 * src/scan-gram.l: Complete the scanner with the missing patterns
16087 to pacify Flex.
16088 Use `quote' and `symbol_tag_get' where appropriate.
16089
16090 2002-06-19 Akim Demaille <akim@epita.fr>
16091
16092 * tests/actions.at (Destructors): Augment to test locations.
16093 * data/bison.simple (yydestructor): Pass it the current location
16094 if locations are enabled.
16095 Prototype only when __STDC__ or C++.
16096 Change the argument names to move into the yy name space: there is
16097 user code here.
16098
16099 2002-06-19 Akim Demaille <akim@epita.fr>
16100
16101 * data/bison.simple (b4_pure_if): New.
16102 Use it instead of #ifdef YYPURE.
16103
16104 2002-06-19 Akim Demaille <akim@epita.fr>
16105
16106 * data/bison.simple (b4_location_if): New.
16107 Use it instead of #ifdef YYLSP_NEEDED.
16108
16109 2002-06-19 Akim Demaille <akim@epita.fr>
16110
16111 Prepare @$ in %destructor, but currently don't bind it in the
16112 skeleton, as %location use is not cleaned up yet.
16113
16114 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16115 (handle_action_at): New.
16116 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16117 a braced_code_t and a location as additional arguments.
16118 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16119 unquote one when outputting `b4_dollar_dollar'.
16120 Adjust callers.
16121 * data/bison.simple (b4_eval): Remove.
16122 (b4_symbol_destructor): Adjust.
16123 * tests/input.at (Invalid @n): Adjust.
16124
16125 2002-06-19 Zack Weinberg <zack@codesourcery.com>
16126
16127 * doc/bison.texinfo: Document ability to have multiple
16128 prologue sections.
16129
16130 2002-06-18 Akim Demaille <akim@epita.fr>
16131
16132 * src/files.c (compute_base_names): When computing the output file
16133 names from the input file name, strip the directory part.
16134
16135 2002-06-18 Akim Demaille <akim@epita.fr>
16136
16137 * data/bison.simple.new: Comment changes.
16138 Reported by Andreas Schwab.
16139
16140 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16141
16142 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16143 there are no `label `yyoverflowlab' defined but not used' warnings
16144 when yyoverflow is defined.
16145
16146 2002-06-18 Akim Demaille <akim@epita.fr>
16147
16148 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16149 new member.
16150 (symbol_destructor_set): Adjust.
16151 * src/output.c (symbol_destructors_output): Output the destructor
16152 locations.
16153 Output the symbol name.
16154 * data/bison.simple (b4_symbol_destructor): Adjust.
16155
16156 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16157 and Akim Demaille <akim@epita.fr>
16158
16159 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16160 what's left on the stack when the error recovery hits EOF.
16161 * tests/actions.at (Destructors): Complete to exercise this case.
16162
16163 2002-06-17 Akim Demaille <akim@epita.fr>
16164
16165 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16166 arguments is really empty, not only equal to `[]'.
16167 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16168 member.
16169 (symbol_destructor_set): New.
16170 * src/output.c (symbol_destructors_output): New.
16171 * src/reader.h (brace_code_t, current_braced_code): New.
16172 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16173 (handle_dollar): Rename as...
16174 (handle_action_dollar): this.
16175 (handle_destructor_dollar): New.
16176 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16177 (grammar_declaration): Use it.
16178 * data/bison.simple (yystos): Is always defined.
16179 (yydestructor): New.
16180 * tests/actions.at (Destructors): New.
16181 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16182
16183 2002-06-17 Akim Demaille <akim@epita.fr>
16184
16185 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16186 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16187 rule_length only when needed.
16188 * src/output.c (actions_output, token_definitions_output): Output
16189 the full M4 block.
16190 * src/symtab.c: Don't access directly to the symbol tag, use
16191 symbol_tag_get.
16192 * src/parse-gram.y: Use symbol_list_free.
16193
16194 2002-06-17 Akim Demaille <akim@epita.fr>
16195
16196 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16197 (symbol_list_prepend, get_type_name): Move to...
16198 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16199 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16200 Adjust all callers.
16201 (symbol_list_free): New.
16202 * src/scan-gram.l (handle_dollar): Takes a location.
16203 * tests/input.at (Invalid $n): Adjust.
16204
16205 2002-06-17 Akim Demaille <akim@epita.fr>
16206
16207 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16208 (symbol_list_prepend): New.
16209 * src/parse-gram.y (%union): `list' is a new member.
16210 (symbols.1): New, replaces...
16211 (terms_to_prec.1, nterms_to_type.1): these.
16212 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16213 Take a location as additional argument.
16214 Adjust all callers.
16215
16216 2002-06-15 Akim Demaille <akim@epita.fr>
16217
16218 * src/parse-gram.y: Move %token in the declaration section so that
16219 we don't depend upon CVS Bison.
16220
16221 2002-06-15 Akim Demaille <akim@epita.fr>
16222
16223 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16224 * src/print.c (print_core): Use it.
16225
16226 2002-06-15 Akim Demaille <akim@epita.fr>
16227
16228 * src/conflicts.c (log_resolution): Accept the rule involved in
16229 the sr conflicts instead of the lookahead number that points to
16230 that rule.
16231 (flush_reduce): Accept the current lookahead vector as argument,
16232 instead of the index in LA.
16233 (resolve_sr_conflict): Accept the current number of lookahead
16234 bitset to consider for the STATE, instead of the index in LA.
16235 (set_conflicts): Adjust.
16236 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16237
16238 2002-06-15 Akim Demaille <akim@epita.fr>
16239
16240 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16241 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16242 Adjust all dependencies.
16243 * src/lalr.c (initialize_lookaheads): Split into...
16244 (states_lookaheads_count, states_lookaheads_initialize): these.
16245 (lalr): Adjust.
16246
16247 2002-06-15 Akim Demaille <akim@epita.fr>
16248
16249 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16250 out of...
16251 (grammar_rules_print): here.
16252 * src/reduce.c (reduce_output): Use it.
16253 * tests/reduce.at (Useless Rules, Reduced Automaton)
16254 (Underivable Rules): Adjust.
16255
16256 2002-06-15 Akim Demaille <akim@epita.fr>
16257
16258 Copy BYacc's nice way to report the grammar.
16259
16260 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16261 New.
16262 Don't print the rules' location, it is confusing and useless.
16263 (rule_print): Use grammar_rhs_print.
16264 * src/print.c (print_grammar): Use grammar_rules_print.
16265
16266 2002-06-15 Akim Demaille <akim@epita.fr>
16267
16268 Complete and rationalize `useless thing' warnings.
16269
16270 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16271 (symbol_tag_print): New.
16272 Use them everywhere in place of accessing directly the tag member.
16273 * src/gram.h, src/gram.c (rule_print): New.
16274 Use it where a rule used to be printed `by hand'.
16275 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16276 (reduce_grammar_tables): Report the useless rules.
16277 (reduce_print): Useless things are a warning, not an error.
16278 Report it as such.
16279 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16280 (Reduced Automaton, Underivable Rules): Adjust.
16281 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16282 * tests/conflicts.at (Unresolved SR Conflicts)
16283 (Solved SR Conflicts): Adjust.
16284
16285 2002-06-15 Akim Demaille <akim@epita.fr>
16286
16287 Let symbols have a location.
16288
16289 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16290 (getsym): Adjust.
16291 Adjust all callers.
16292 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16293 Use location_t, not int.
16294 * src/symtab.c (symbol_check_defined): Take advantage of the
16295 location.
16296 * tests/regression.at (Invalid inputs): Adjust.
16297
16298 2002-06-15 Akim Demaille <akim@epita.fr>
16299
16300 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16301 (input): Don't try to initialize yylloc here, do it in the
16302 scanner.
16303 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16304 * src/gram.h (rule_t): Change line and action_line into location
16305 and action_location, of location_t type.
16306 Adjust all dependencies.
16307 * src/location.h, src/location.c (empty_location): New.
16308 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16309 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16310 (grammar_current_rule_symbol_append)
16311 (grammar_current_rule_action_append): Expect a location as argument.
16312 * src/reader.c (grammar_midrule_action): Adjust to attach an
16313 action's location as dummy symbol location.
16314 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16315 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16316 the line numbers.
16317
16318 2002-06-14 Akim Demaille <akim@epita.fr>
16319
16320 Grammar declarations may be found in the grammar section.
16321
16322 * src/parse-gram.y (rules_or_grammar_declaration): New.
16323 (declarations): Each declaration may end with a semicolon, not
16324 just...
16325 (grammar_declaration): `"%union"'.
16326 (grammar): Branch to rules_or_grammar_declaration.
16327
16328 2002-06-14 Akim Demaille <akim@epita.fr>
16329
16330 * src/main.c (main): Invoke scanner_free.
16331
16332 2002-06-14 Akim Demaille <akim@epita.fr>
16333
16334 * src/output.c (m4_invoke): Extracted from...
16335 (output_skeleton): here.
16336 Free tempfile.
16337
16338 2002-06-14 Akim Demaille <akim@epita.fr>
16339
16340 * src/parse-gram.y (directives, directive, gram)
16341 (grammar_directives, precedence_directives, precedence_directive):
16342 Rename as...
16343 (declarations, declaration, grammar, grammar_declaration)
16344 (precedence_declaration, precedence_declarator): these.
16345 (symbol_declaration): New.
16346
16347 2002-06-14 Akim Demaille <akim@epita.fr>
16348
16349 * src/files.c (action_obstack): Remove, unused.
16350 (output_obstack): Remove it, and all its dependencies, as it is no
16351 longer needed.
16352 * src/reader.c (epilogue_set): Build the epilogue in the
16353 muscle_obstack.
16354 * src/output.h, src/output.c (muscle_obstack): Move to...
16355 * src/muscle_tab.h, src/muscle_tab.h: here.
16356 (muscle_init): Initialize muscle_obstack.
16357 (muscle_free): New.
16358 * src/main.c (main): Call it.
16359
16360 2002-06-14 Akim Demaille <akim@epita.fr>
16361
16362 * src/location.h: New, extracted from...
16363 * src/reader.h: here.
16364 * src/Makefile.am (noinst_HEADERS): Merge into
16365 (bison_SOURCES): this.
16366 Add location.h.
16367 * src/parse-gram.y: Use location_t instead of Bison's.
16368 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16369 Use location_t instead of ints.
16370
16371 2002-06-14 Akim Demaille <akim@epita.fr>
16372
16373 * data/bison.simple, data/bison.c++: Be sure to restore the
16374 current #line when returning to the skeleton contents after having
16375 exposed the input file's #line.
16376
16377 2002-06-12 Akim Demaille <akim@epita.fr>
16378
16379 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16380 eager.
16381 * tests/actions.at (Exotic Dollars): New.
16382
16383 2002-06-12 Akim Demaille <akim@epita.fr>
16384
16385 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16386 ['"/] too eagerly.
16387 * tests/input.at (Torturing the Scanner): New.
16388
16389 2002-06-11 Akim Demaille <akim@epita.fr>
16390
16391 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16392 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16393 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16394 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16395 * src/reader.c (reader): Use it.
16396
16397 2002-06-11 Akim Demaille <akim@epita.fr>
16398
16399 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16400 Adjust all callers.
16401 (scanner_last_string_free): New.
16402
16403 2002-06-11 Akim Demaille <akim@epita.fr>
16404
16405 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16406 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16407 (last_string, YY_OBS_FREE): New.
16408 Use them when returning an ID.
16409
16410 2002-06-11 Akim Demaille <akim@epita.fr>
16411
16412 Have Bison grammars parsed by a Bison grammar.
16413
16414 * src/reader.c, src/reader.h (prologue_augment): New.
16415 * src/reader.c (copy_definition): Remove.
16416
16417 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16418 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16419 (grammar_current_rule_prec_set, grammar_current_rule_check)
16420 (grammar_current_rule_symbol_append)
16421 (grammar_current_rule_action_append): Export.
16422 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16423 (symbol_list_action_append): Remove.
16424 Hook the routines from reader.
16425 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16426 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16427
16428 * src/reader.c (read_declarations): Remove, unused.
16429
16430 * src/parse-gram.y: Handle the epilogue.
16431 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16432 (grammar_start_symbol_set): this.
16433 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16434 * src/reader.c (readgram): Remove, unused.
16435 (reader): Adjust to insert eoftoken and axiom where appropriate.
16436
16437 * src/reader.c (copy_dollar): Replace with...
16438 * src/scan-gram.h (handle_dollar): this.
16439 * src/parse-gram.y: Remove `%thong'.
16440
16441 * src/reader.c (copy_at): Replace with...
16442 * src/scan-gram.h (handle_at): this.
16443
16444 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16445 New.
16446
16447 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16448 time being.
16449
16450 * src/reader.h, src/reader.c (grammar_rule_end): New.
16451
16452 * src/parse.y (current_type, current_class): New.
16453 Implement `%nterm', `%token' support.
16454 Merge `%term' into `%token'.
16455 (string_as_id): New.
16456 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16457 type name.
16458
16459 * src/parse-gram.y: Be sure to handle properly the beginning of
16460 rules.
16461
16462 * src/parse-gram.y: Handle %type.
16463 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16464
16465 * src/parse-gram.y: More directives support.
16466 * src/options.c: No longer handle source directives.
16467
16468 * src/parse-gram.y: Fix %output.
16469
16470 * src/parse-gram.y: Handle %union.
16471 Use the prologue locations.
16472 * src/reader.c (parse_union_decl): Remove.
16473
16474 * src/reader.h, src/reader.c (epilogue_set): New.
16475 * src/parse-gram.y: Use it.
16476
16477 * data/bison.simple, data/bison.c++: b4_stype is now either not
16478 defined, then default to int, or to the contents of %union,
16479 without `union' itself.
16480 Adjust.
16481 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16482
16483 * src/output.c (actions_output): Don't output braces, as they are
16484 already handled by the scanner.
16485
16486 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16487 characters to themselves.
16488
16489 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16490 that the epilogue has a proper #line.
16491
16492 * src/parse-gram.y: Handle precedence/associativity.
16493
16494 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16495 a terminal.
16496 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16497 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16498 at all to define terminals that cannot be emitted.
16499
16500 * src/scan-gram.l: Escape M4 characters.
16501
16502 * src/scan-gram.l: Working properly with escapes in user
16503 strings/characters.
16504
16505 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16506 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16507 grammar.
16508 Use more modest sizes, as for the time being the parser does not
16509 release memory, and therefore the process swallows a huge amount
16510 of memory.
16511
16512 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16513 stricter %token grammar.
16514
16515 * src/symtab.h (associativity): Add `undef_assoc'.
16516 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16517 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16518
16519 * tests/regression.at (Invalid %directive): Remove, as it is now
16520 meaningless.
16521 (Invalid inputs): Adjust to the new error messages.
16522 (Token definitions): The new grammar doesn't allow too many
16523 eccentricities.
16524
16525 * src/lex.h, src/lex.c: Remove.
16526 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16527 (copy_character, copy_string2, copy_string, copy_identifier)
16528 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16529 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16530 (parse_action): Remove.
16531 * po/POTFILES.in: Adjust.
16532
16533 2002-06-11 Akim Demaille <akim@epita.fr>
16534
16535 * src/reader.c (parse_action): Don't store directly into the
16536 rule's action member: return the action as a string.
16537 Don't require `rule_length' as an argument: compute it.
16538 (grammar_current_rule_symbol_append)
16539 (grammar_current_rule_action_append): New, eved out from
16540 (readgram): here.
16541 Remove `action_flag', `rulelength', unused now.
16542
16543 2002-06-11 Akim Demaille <akim@epita.fr>
16544
16545 * src/reader.c (grammar_current_rule_prec_set).
16546 (grammar_current_rule_check): New, eved out from...
16547 (readgram): here.
16548 Remove `xaction', `first_rhs': useless.
16549 * tests/input.at (Type clashes): New.
16550 * tests/existing.at (GNU Cim Grammar): Adjust.
16551
16552 2002-06-11 Akim Demaille <akim@epita.fr>
16553
16554 * src/reader.c (grammar_midrule_action): New, Eved out from
16555 (readgram): here.
16556
16557 2002-06-11 Akim Demaille <akim@epita.fr>
16558
16559 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16560 New.
16561 (readgram): Use them as replacement of inlined code, crule and
16562 crule1.
16563
16564 2002-06-11 Akim Demaille <akim@epita.fr>
16565
16566 * src/reader.c (grammar_end, grammar_symbol_append): New.
16567 (readgram): Use them.
16568 Make the use of `p' as local as possible.
16569
16570 2002-06-10 Akim Demaille <akim@epita.fr>
16571
16572 GCJ's parser requires the tokens to be defined before the prologue.
16573
16574 * data/bison.simple: Output the token definition before the user's
16575 prologue.
16576 * tests/regression.at (Braces parsing, Duplicate string)
16577 (Mixing %token styles): Check the output from bison.
16578 (Early token definitions): New.
16579
16580 2002-06-10 Akim Demaille <akim@epita.fr>
16581
16582 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16583 assigning twice the same user number to a token, so that we can
16584 use it in...
16585 * src/lex.c (lex): here.
16586 Also use `symbol_class_set' instead of hand written code.
16587 * src/reader.c (parse_assoc_decl): Likewise.
16588
16589 2002-06-10 Akim Demaille <akim@epita.fr>
16590
16591 * src/symtab.c, src/symtab.c (symbol_class_set)
16592 (symbol_user_token_number_set): New.
16593 * src/reader.c (parse_token_decl): Use them.
16594 Use a switch instead of ifs.
16595 Use a single argument.
16596
16597 2002-06-10 Akim Demaille <akim@epita.fr>
16598
16599 Remove `%thong' support as it is undocumented, unused, duplicates
16600 `%token's job, and creates useless e-mail traffic with people who
16601 want to know what it is, why it is undocumented, unused, and
16602 duplicates `%token's job.
16603
16604 * src/reader.c (parse_thong_decl): Remove.
16605 * src/options.c (option_table): Remove "thong".
16606 * src/lex.h (tok_thong): Remove.
16607
16608 2002-06-10 Akim Demaille <akim@epita.fr>
16609
16610 * src/symtab.c, src/symtab.c (symbol_type_set)
16611 (symbol_precedence_set): New.
16612 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16613 (value_components_used): Remove, unused.
16614
16615 2002-06-09 Akim Demaille <akim@epita.fr>
16616
16617 Move symbols handling code out of the reader.
16618
16619 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16620 (axiom): Move to...
16621 * src/symtab.h, src/symtab.c: here.
16622
16623 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16624 * src/reader.c (startval): Rename as...
16625 * src/symtab.h, src/symtab.c (startsymbol): this.
16626 * src/reader.c: Adjust.
16627
16628 * src/reader.c (symbol_check_defined, symbol_make_alias)
16629 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16630 (token_translations_init)
16631 Move to...
16632 * src/symtab.c: here.
16633 * src/reader.c (packsymbols): Move to...
16634 * src/symtab.h, src/symtab.c (symbols_pack): here.
16635 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16636 argument.
16637
16638 2002-06-03 Akim Demaille <akim@epita.fr>
16639
16640 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16641 then statements.
16642
16643 2002-06-03 Akim Demaille <akim@epita.fr>
16644
16645 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16646 structs with non literals.
16647 * src/scan-skel.l: never-interactive.
16648 * src/conflicts.c (enum conflict_resolution_e): No trailing
16649 comma.
16650 * src/getargs.c (usage): Split long literal strings.
16651 Reported by Hans Aberg.
16652
16653 2002-05-28 Akim Demaille <akim@epita.fr>
16654
16655 * data/bison.c++: Use C++ ostreams.
16656 (cdebug_): New member.
16657
16658 2002-05-28 Akim Demaille <akim@epita.fr>
16659
16660 * src/output.c (output_skeleton): Be sure to allocate enough room
16661 for `/' _and_ for `\0' in full_skeleton.
16662
16663 2002-05-28 Akim Demaille <akim@epita.fr>
16664
16665 * data/bison.c++: Catch up with bison.simple:
16666 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16667 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16668 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16669 and popping traces.
16670
16671 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16672
16673 * src/output.c (output_skeleton): Put an explicit path in front of
16674 the skeleton file name, rather than relying on the -I directory,
16675 to partially alleviate effects of having a skeleton file lying around
16676 in the current directory.
16677
16678 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16679
16680 * src/conflicts.c (log_resolution): Correct typo:
16681 obstack_printf should be obstack_fgrow1.
16682
16683 2002-05-26 Akim Demaille <akim@epita.fr>
16684
16685 * src/state.h (state_t): `solved_conflicts' is a new member.
16686 * src/LR0.c (new_state): Set it to 0.
16687 * src/conflicts.h, src/conflicts.c (print_conflicts)
16688 (free_conflicts, solve_conflicts): Rename as...
16689 (conflicts_print, conflicts_free, conflicts_solve): these.
16690 Adjust callers.
16691 * src/conflicts.c (enum conflict_resolution_e)
16692 (solved_conflicts_obstack): New, used by...
16693 (log_resolution): this.
16694 Adjust to attach the conflict resolution to each state.
16695 Complete the description with the precedence/associativity
16696 information.
16697 (resolve_sr_conflict): Adjust.
16698 * src/print.c (print_state): Output its solved_conflicts.
16699 * tests/conflicts.at (Unresolved SR Conflicts)
16700 (Solved SR Conflicts): Exercise --report=all.
16701
16702 2002-05-26 Akim Demaille <akim@epita.fr>
16703
16704 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16705 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16706 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16707 (token_number_t, item_number_as_token_number)
16708 (token_number_as_item_number, muscle_insert_token_number_table):
16709 Rename as...
16710 (symbol_number_t, item_number_as_symbol_number)
16711 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16712 these, since it is more appropriate.
16713
16714 2002-05-26 Akim Demaille <akim@epita.fr>
16715
16716 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16717 `Error:' lines.
16718 * data/bison.simple (yystos) [YYDEBUG]: New.
16719 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16720 error recovery.
16721 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16722
16723 2002-05-25 Akim Demaille <akim@epita.fr>
16724
16725 * doc/bison.texinfo (Debugging): Split into...
16726 (Tracing): this new section, its former contents, and...
16727 (Understanding): this new section.
16728 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16729 by...
16730 (report_flag): this.
16731 Adjust all dependencies.
16732 (report_args, report_types, report_argmatch): New.
16733 (usage, getargs): Report/support -r, --report.
16734 * src/options.h
16735 (struct option_table_struct): Rename as..,
16736 (struct option_table_s): this.
16737 Rename the `set_flag' member to `flag' to match with getopt_long's
16738 struct.
16739 * src/options.c (option_table): Split verbose into an entry for
16740 %verbose, and another for --verbose.
16741 Support --report/-r, so remove -r from the obsolete --raw.
16742 * src/print.c: Attach full item sets and lookaheads reports to
16743 report_flag instead of trace_flag.
16744 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16745
16746 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16747 and Paul Eggert <eggert@twinsun.com>
16748
16749 * data/bison.simple (yyparse): Correct error handling to conform to
16750 POSIX and yacc. Specifically, after syntax error is discovered,
16751 do not reduce further before shifting the error token.
16752 Clean up the code a bit by removing the labels yyerrdefault,
16753 yyerrhandle, yyerrpop.
16754 * NEWS: Document the above.
16755
16756 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16757
16758 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16759 type; it isn't always big enough, since it doesn't necessarily
16760 include non-terminals.
16761 (yytranslate): Expand definition of yy_token_number_type, so that
16762 the latter can be removed.
16763 (yy_token_number_type): Remove, only one use.
16764 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16765 don't use TokenNumberType as element type.
16766
16767 * tests/regression.at: Modify expected output to agree with change
16768 to yyr1 and yytranslate.
16769
16770 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16771
16772 * src/reader.c (parse_action): Use copy_character instead of
16773 obstack_1grow.
16774
16775 2002-05-13 Akim Demaille <akim@epita.fr>
16776
16777 * tests/regression.at (Token definitions): Prototype yylex and
16778 yyerror.
16779
16780 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16781
16782 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
16783 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16784 32-bit arithmetic.
16785 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16786
16787 2002-05-07 Akim Demaille <akim@epita.fr>
16788
16789 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16790 avoid GCC warnings.
16791
16792 2002-05-07 Akim Demaille <akim@epita.fr>
16793
16794 Kill GCC warnings.
16795
16796 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16797 over the RHS of each rule.
16798 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16799 * src/state.h (state_t): Member `nitems' is unsigned short.
16800 * src/LR0.c (get_state): Adjust.
16801 * src/reader.c (packgram): Likewise.
16802 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16803 `Type'.
16804 (muscle_insert_int_table): Remove, unused.
16805 (prepare_rules): Remove `max'.
16806
16807 2002-05-06 Akim Demaille <akim@epita.fr>
16808
16809 * src/closure.c (print_firsts): Display of the symbol tags.
16810 (bitmatrix_print): Move to...
16811 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16812 here.
16813 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16814
16815 2002-05-06 Akim Demaille <akim@epita.fr>
16816
16817 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16818 hash_do_for_each.
16819
16820 2002-05-06 Akim Demaille <akim@epita.fr>
16821
16822 * src/LR0.c (new_state, get_state): Instead of using the global
16823 `kernel_size' and `kernel_base', have two new arguments:
16824 `core_size' and `core'.
16825 Adjust callers.
16826
16827 2002-05-06 Akim Demaille <akim@epita.fr>
16828
16829 * src/reader.c (packgram): No longer end `ritem' with a 0
16830 sentinel: it is not used.
16831
16832 2002-05-05 Akim Demaille <akim@epita.fr>
16833
16834 New experimental feature: display the lookaheads in the report and
16835 graph.
16836
16837 * src/print (print_core): When --trace-flag, display the rules
16838 lookaheads.
16839 * src/print_graph.c (print_core): Likewise.
16840 Swap the arguments.
16841 Adjust caller.
16842
16843 2002-05-05 Akim Demaille <akim@epita.fr>
16844
16845 * tests/torture.at (Many lookaheads): New test.
16846
16847 2002-05-05 Akim Demaille <akim@epita.fr>
16848
16849 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16850 (GENERATE_MUSCLE_INSERT_TABLE): this.
16851 (output_int_table, output_unsigned_int_table, output_short_table)
16852 (output_token_number_table, output_item_number_table): Replace with...
16853 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16854 (muscle_insert_short_table, muscle_insert_token_number_table)
16855 (muscle_insert_item_number_table): these.
16856 Adjust all callers.
16857 (prepare_tokens): Don't free `translations', since...
16858 * src/reader.h, src/reader.c (grammar_free): do it.
16859 Move to...
16860 * src/gram.h, src/gram.c (grammar_free): here.
16861 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16862 b4_translate_max.
16863
16864 2002-05-05 Akim Demaille <akim@epita.fr>
16865
16866 * src/output.c (output_unsigned_int_table): New.
16867 (prepare_rules): `i' is unsigned.
16868 `prhs', `rline', `r2' are unsigned int.
16869 Rename muscle `rhs_number_max' as `rhs_max'.
16870 Output muscles `prhs_max', `rline_max', and `r2_max'.
16871 Free rline and r1.
16872 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16873 to compute types instead of constant types.
16874 * tests/regression.at (Web2c Actions): Adjust.
16875
16876 2002-05-04 Akim Demaille <akim@epita.fr>
16877
16878 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16879 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16880 Adjust dependencies.
16881 * src/output.c (token_definitions_output): Be sure not to output a
16882 `#define 'a'' when fed with `%token 'a' "a"'.
16883 * tests/regression.at (Token definitions): New.
16884
16885 2002-05-03 Paul Eggert <eggert@twinsun.com>
16886
16887 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16888 for K&R C.
16889
16890 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16891
16892 * Makefile.am (SUBDIRS): Remove intl.
16893 (EXTRA_DIST): Add config/config.rpath.
16894
16895 2002-05-03 Akim Demaille <akim@epita.fr>
16896
16897 * data/bison.simple (m4_if): Don't output empty enums.
16898 And actually, output valid enum definitions :(.
16899
16900 2002-05-03 Akim Demaille <akim@epita.fr>
16901
16902 * configure.bat: Remove, completely obsolete.
16903 * Makefile.am (EXTRA_DIST): Adjust.
16904 Don't distribute config.rpath...
16905 * config/Makefile.am (EXTRA_DIST): Do it.
16906
16907 2002-05-03 Akim Demaille <akim@epita.fr>
16908
16909 * configure.in (GETTEXT_VERSION): New.
16910 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16911
16912 2002-05-03 Akim Demaille <akim@epita.fr>
16913
16914 * data/bison.simple (b4_token_enum): New.
16915 (b4_token_defines): Use it to output tokens both as #define and
16916 enums.
16917 Suggested by Paul Eggert.
16918 * src/output.c (token_definitions_output): Don't output spurious
16919 white spaces.
16920
16921 2002-05-03 Akim Demaille <akim@epita.fr>
16922
16923 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16924
16925 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
16926
16927 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
16928 Update the stack class, give a try to deque as the default container.
16929
16930 2002-05-02 Akim Demaille <akim@epita.fr>
16931
16932 * data/bison.simple (yyparse): Do not implement @$ = @1.
16933 (YYLLOC_DEFAULT): Adjust to do it.
16934 * doc/bison.texinfo (Location Default Action): Fix.
16935
16936 2002-05-02 Akim Demaille <akim@epita.fr>
16937
16938 * src/reader.c (parse_braces): Merge into...
16939 (parse_action): this.
16940
16941 2002-05-02 Akim Demaille <akim@epita.fr>
16942
16943 * configure.in (ALL_LINGUAS): Remove.
16944 * po/LINGUAS, hr.po: New.
16945
16946 2002-05-02 Akim Demaille <akim@epita.fr>
16947
16948 Remove the so called hairy (semantic) parsers.
16949
16950 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
16951 * src/gram.h, src/gram.c (semantic_parser): Remove.
16952 (rule_t): Remove the guard and guard_line members.
16953 * src/lex.h (token_t): remove tok_guard.
16954 * src/options.c (option_table): Remove %guard and %semantic_parser
16955 support.
16956 * src/output.c, src/output.h (guards_output): Remove.
16957 (prepare): Adjust.
16958 (token_definitions_output): Don't output the `T'
16959 tokens (???).
16960 (output_skeleton): Don't output the guards.
16961 * src/files.c, src/files.c (attrsfile): Remove.
16962 * src/reader.c (symbol_list): Remove the guard and guard_line
16963 members.
16964 Adjust dependencies.
16965 (parse_guard): Remove.
16966 * data/bison.hairy: Remove.
16967 * doc/bison.texinfo (Environment Variables): Remove occurrences of
16968 BISON_HAIRY.
16969
16970 2002-05-02 Akim Demaille <akim@epita.fr>
16971
16972 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
16973 (parse_guard): Rename the formal argument `stack_offset' as
16974 `rule_length', which is more readable.
16975 Adjust callers.
16976 (copy_at, copy_dollar): Instead of outputting the hard coded
16977 values of $$, $n and so forth, output invocation to b4_lhs_value,
16978 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
16979 Note: this patch partially drops `semantic-parser' support: it
16980 always does `rule_length - n', where semantic parsers ought to
16981 always use `-n'.
16982 * data/bison.simple, data/bison.c++ (b4_lhs_value)
16983 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
16984
16985 2002-05-02 Akim Demaille <akim@epita.fr>
16986
16987 * configure.in (AC_INIT): Bump to 1.49b.
16988 (AM_INIT_AUTOMAKE): Short invocation.
16989
16990 2002-05-02 Akim Demaille <akim@epita.fr>
16991
16992 Version 1.49a.
16993
16994 2002-05-01 Akim Demaille <akim@epita.fr>
16995
16996 * src/skeleton.h: Remove.
16997
16998 2002-05-01 Akim Demaille <akim@epita.fr>
16999
17000 * src/skeleton.h: Fix the #endif.
17001 Reported by Magnus Fromreide.
17002
17003 2002-04-26 Paul Eggert <eggert@twinsun.com>
17004
17005 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17006 Define if we define YYSTYPE and YYLTYPE, respectively.
17007 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17008
17009 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17010
17011 * src/scan-skel.l: Postprocess quadrigraphs.
17012
17013 * src/reader.c (copy_character): New function, used to output
17014 single characters while replacing `[' and `]' with quadrigraphs, to
17015 avoid troubles with M4 quotes.
17016 (copy_comment): Output characters with copy_character.
17017 (read_additionnal_code): Likewise.
17018 (copy_string2): Likewise.
17019 (copy_definition): Likewise.
17020
17021 * tests/calc.at: Exercise M4 quoting.
17022
17023 2002-04-25 Akim Demaille <akim@epita.fr>
17024
17025 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17026 between `!' and the command.
17027 Reported by Paul Eggert.
17028
17029 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17030
17031 * tests/calc.at: Exercise prologue splitting.
17032
17033 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17034 `b4_post_prologue' instead of `b4_prologue'.
17035
17036 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17037 muscles.
17038 (output): Free pre_prologue_obstack and post_prologue_obstack.
17039 * src/files.h, src/files.c (attrs_obstack): Remove.
17040 (pre_prologue_obstack, post_prologue_obstack): New.
17041 * src/reader.c (copy_definition): Add a parameter to specify the
17042 obstack to fill, instead of using attrs_obstack unconditionally.
17043 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17044 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17045
17046 2002-04-23 Paul Eggert <eggert@twinsun.com>
17047
17048 * data/bison.simple: Remove unnecessary commentary and white
17049 space differences from 1_29-branch.
17050 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17051
17052 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17053 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17054 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17055 constructors or destructors.
17056
17057 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17058
17059 2002-04-23 Akim Demaille <akim@epita.fr>
17060
17061 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17062 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17063 location with columns.
17064 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17065 All reported by Paul Eggert.
17066
17067 2002-04-22 Akim Demaille <akim@epita.fr>
17068
17069 * src/reduce.c (dump_grammar): Move to...
17070 * src/gram.h, src/gram.c (grammar_dump): here.
17071 Be sure to separate long item numbers.
17072 Don't read the members of a rule's prec if its nil.
17073
17074 2002-04-22 Akim Demaille <akim@epita.fr>
17075
17076 * src/output.c (table_size, table_grow): New.
17077 (MAXTABLE): Remove, replace uses with table_size.
17078 (pack_vector): Instead of dying when the table is too big, grow it.
17079
17080 2002-04-22 Akim Demaille <akim@epita.fr>
17081
17082 * data/bison.simple (yyr1): Its type is that of a token number.
17083 * data/bison.c++ (r1_): Likewise.
17084 * tests/regression.at (Web2c Actions): Adjust.
17085
17086 2002-04-22 Akim Demaille <akim@epita.fr>
17087
17088 * src/reader.c (token_translations_init): 256 is now the default
17089 value for the error token, i.e., it will be assigned another
17090 number if the user assigned 256 to one of her tokens.
17091 (reader): Don't force 256 to error.
17092 * doc/bison.texinfo (Symbols): Adjust.
17093 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17094 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17095 etc. instead of 10, 20, 30 (which was used to `jump' over error
17096 (256) and undefined (2)).
17097
17098 2002-04-22 Akim Demaille <akim@epita.fr>
17099
17100 Propagate more token_number_t.
17101
17102 * src/gram.h (token_number_as_item_number)
17103 (item_number_as_token_number): New.
17104 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17105 Use it to create output_item_number_table and
17106 output_token_number_table.
17107 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17108 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17109 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17110 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17111
17112 2002-04-22 Akim Demaille <akim@epita.fr>
17113
17114 * src/output.h, src/output.c (get_lines_number): Remove.
17115
17116 2002-04-19 Akim Demaille <akim@epita.fr>
17117
17118 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17119 as Lex/Flex'.
17120 (Debugging): More details about enabling the debugging features.
17121 (Table of Symbols): Describe $$, $n, @$, and @n.
17122 Suggested by Tim Josling.
17123
17124 2002-04-19 Akim Demaille <akim@epita.fr>
17125
17126 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17127
17128 2002-04-10 Akim Demaille <akim@epita.fr>
17129
17130 * src/system.h: Rely on HAVE_LIMITS_H.
17131 Suggested by Paul Eggert.
17132
17133 2002-04-09 Akim Demaille <akim@epita.fr>
17134
17135 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17136 full stderr, and strip it according to the bison options, instead
17137 of composing the error message from different bits.
17138 This makes it easier to check for several error messages.
17139 Adjust all the invocations.
17140 Add an invocation exercising the error token.
17141 Add an invocation demonstrating a stupid error message.
17142 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17143 Adjust the tests.
17144 Error message are for stderr, not stdout.
17145
17146 2002-04-09 Akim Demaille <akim@epita.fr>
17147
17148 * src/gram.h, src/gram.c (error_token_number): Remove, use
17149 errtoken->number.
17150 * src/reader.c (reader): Don't specify the user token number (2)
17151 for $undefined, as it uselessly prevents using it.
17152 * src/gram.h (token_number_t): Move to...
17153 * src/symtab.h: here.
17154 (state_t.number): Is a token_number_t.
17155 * src/print.c, src/reader.c: Use undeftoken->number instead of
17156 hard coded 2.
17157 (Even though this 2 is not the same as above: the number of the
17158 undeftoken remains being 2, it is its user token number which
17159 might not be 2).
17160 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17161 `user_token_number_max'.
17162 Output `undef_token_number'.
17163 * data/bison.simple, data/bison.c++: Use them.
17164 Be sure to map invalid yylex return values to
17165 `undef_token_number'. This saves us from gratuitous SEGV.
17166
17167 * tests/conflicts.at (Solved SR Conflicts)
17168 (Unresolved SR Conflicts): Adjust.
17169 * tests/regression.at (Web2c Actions): Adjust.
17170
17171 2002-04-08 Akim Demaille <akim@epita.fr>
17172
17173 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17174 Adding #line.
17175 Remove the duplicate `typedefs'.
17176 (RhsNumberType): Fix the declaration and various other typos.
17177 Use __ofile__.
17178 * data/bison.simple: Use __ofile__.
17179 * src/scan-skel.l: Handle __ofile__.
17180
17181 2002-04-08 Akim Demaille <akim@epita.fr>
17182
17183 * src/gram.h (item_number_t): New, the type of item numbers in
17184 RITEM. Note that it must be able to code symbol numbers as
17185 positive number, and the negation of rule numbers as negative
17186 numbers.
17187 Adjust all dependencies (pretty many).
17188 * src/reduce.c (rule): Remove this `short *' pointer: use
17189 item_number_t.
17190 * src/system.h (MINSHORT, MAXSHORT): Remove.
17191 Include `limits.h'.
17192 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17193 (shortcpy): Remove.
17194 (MAXTABLE): Move to...
17195 * src/output.c (MAXTABLE): here.
17196 (prepare_rules): Use output_int_table to output rhs.
17197 * data/bison.simple, data/bison.c++: Adjust.
17198 * tests/torture.at (Big triangle): Move the limit from 254 to
17199 500.
17200 * tests/regression.at (Web2c Actions): Ajust.
17201
17202 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17203 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17204 passes, but produces negative #line number, once fixed, GCC is
17205 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17206 C), it passes.
17207 * src/state.h (state_h): Code input lines on ints, not shorts.
17208
17209 2002-04-08 Akim Demaille <akim@epita.fr>
17210
17211 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17212 and then the grammar.
17213
17214 2002-04-08 Akim Demaille <akim@epita.fr>
17215
17216 * src/system.h: No longer using strndup.
17217
17218 2002-04-07 Akim Demaille <akim@epita.fr>
17219
17220 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17221 * src/output.c (output_table_data): Return the longest number.
17222 (prepare_tokens): Output `token_number_max').
17223 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17224 New.
17225 Use them to define yy_token_number_type/TokenNumberType.
17226 Use this type for yytranslate.
17227 * tests/torture.at (Big triangle): Push the limit from 124 to
17228 253.
17229 * tests/regression.at (Web2c Actions): Adjust.
17230
17231 2002-04-07 Akim Demaille <akim@epita.fr>
17232
17233 * tests/torture.at (Big triangle): New.
17234 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17235 * tests/existing.at: here.
17236
17237 2002-04-07 Akim Demaille <akim@epita.fr>
17238
17239 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17240 nritems.
17241 Adjust dependencies.
17242
17243 2002-04-07 Akim Demaille <akim@epita.fr>
17244
17245 * src/reader.c: Normalize increments to prefix form.
17246
17247 2002-04-07 Akim Demaille <akim@epita.fr>
17248
17249 * src/reader.c, symtab.c: Remove debugging code.
17250
17251 2002-04-07 Akim Demaille <akim@epita.fr>
17252
17253 Rename all the `bucket's as `symbol_t'.
17254
17255 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17256 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17257 * src/symtab.c, src/symtab.h (bucket): Rename as...
17258 (symbol_t): this.
17259 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17260 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17261 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17262 (buckets_new, buckets_free, buckets_do): Rename as...
17263 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17264 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17265 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17266 (symbols_new, symbols_free, symbols_do): these.
17267
17268 2002-04-07 Akim Demaille <akim@epita.fr>
17269
17270 Use lib/hash for the symbol table.
17271
17272 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17273 EOF.
17274 * src/lex.c (lex): Set the `number' member of new terminals.
17275 * src/reader.c (bucket_check_defined, bucket_make_alias)
17276 (bucket_check_alias_consistence, bucket_translation): New.
17277 (reader, grammar_free, readgram, token_translations_init)
17278 (packsymbols): Adjust.
17279 (reader): Number the predefined tokens.
17280 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17281 for predefined tokens.
17282 * src/symtab.h (bucket): Remove all the hash table related
17283 members.
17284 * src/symtab.c (symtab): Replace by...
17285 (bucket_table): this.
17286 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17287 (buckets_new, buckets_do): New.
17288
17289 2002-04-07 Akim Demaille <akim@epita.fr>
17290
17291 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17292 (start_symbol, max_user_token_number, semantic_parser)
17293 (error_token_number): Initialize.
17294 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17295 Initialize.
17296 (reader): Don't.
17297 (errtoken, eoftoken, undeftoken, axiom): Extern.
17298
17299 2002-04-07 Akim Demaille <akim@epita.fr>
17300
17301 * src/gram.h (rule_s): prec and precsym are now pointers
17302 to the bucket giving the priority/associativity.
17303 Member `associativity' removed: useless.
17304 * src/reduce.c, src/conflicts.c: Adjust.
17305
17306 2002-04-07 Akim Demaille <akim@epita.fr>
17307
17308 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17309 Properly escape the symbols' TAG when outputting them.
17310
17311 2002-04-07 Akim Demaille <akim@epita.fr>
17312
17313 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17314
17315 2002-04-07 Akim Demaille <akim@epita.fr>
17316
17317 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17318 (LArule): this, which is an array to rule_t*.
17319 * src/print.c, src/conflicts.c: Adjust.
17320
17321 2002-04-07 Akim Demaille <akim@epita.fr>
17322
17323 * src/gram.h (rule_t): Rename `number' as `user_number'.
17324 `number' is a new member.
17325 Adjust dependencies.
17326 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17327
17328 2002-04-07 Akim Demaille <akim@epita.fr>
17329
17330 As a result of the previous patch, it is no longer needed
17331 to reorder ritem itself.
17332
17333 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17334
17335 2002-04-07 Akim Demaille <akim@epita.fr>
17336
17337 Be sure never to walk through RITEMS, but use only data related to
17338 the rules themselves. RITEMS should be banished.
17339
17340 * src/output.c (output_token_translations): Rename as...
17341 (prepare_tokens): this.
17342 In addition to `translate', prepare the muscles `tname' and
17343 `toknum', which were handled by...
17344 (output_rule_data): this.
17345 Remove, and move the remainder of its outputs into...
17346 (prepare_rules): this new routines, which also merges content from
17347 (output_gram): this.
17348 (prepare_rules): Be sure never to walk through RITEMS.
17349 (output_stos): Rename as...
17350 (prepare_stos): this.
17351 (output): Always invoke prepare_states, after all, just don't use it
17352 in the output if you don't need it.
17353
17354 2002-04-07 Akim Demaille <akim@epita.fr>
17355
17356 * src/LR0.c (new_state): Display `nstates' as the name of the
17357 newly created state.
17358 Adjust to initialize first_state and last_state if needed.
17359 Be sure to distinguish the initial from the final state.
17360 (new_states): Create the itemset of the initial state, and use
17361 new_state.
17362 * src/closure.c (closure): Now that the initial state has its
17363 items properly set, there is no need for a special case when
17364 creating `ruleset'.
17365
17366 As a result, now the rule 0, reducing to $axiom, is visible in the
17367 outputs. Adjust the test suite.
17368
17369 * tests/conflicts.at (Solved SR Conflicts)
17370 (Unresolved SR Conflicts): Adjust.
17371 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17372 * tests/conflicts.at (S/R in initial): New.
17373
17374 2002-04-07 Akim Demaille <akim@epita.fr>
17375
17376 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17377 the RHS of the rules.
17378 * src/output.c (output_gram): Likewise.
17379
17380 2002-04-07 Akim Demaille <akim@epita.fr>
17381
17382 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17383 bucket.
17384 Adjust all dependencies.
17385 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17386 `number' of the buckets too.
17387 * src/gram.h: Include `symtab.h'.
17388 (associativity): Move to...
17389 * src/symtab.h: here.
17390 No longer include `gram.h'.
17391
17392 2002-04-07 Akim Demaille <akim@epita.fr>
17393
17394 * src/gram.h, src/gram.c (rules_rhs_length): New.
17395 (ritem_longest_rhs): Use it.
17396 * src/gram.h (rule_t): `number' is a new member.
17397 * src/reader.c (packgram): Set it.
17398 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17399 the end of `rules', and count them out of `nrules'.
17400 (reduce_output, dump_grammar): Adjust.
17401 * src/print.c (print_grammar): It is no longer needed to check for
17402 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17403 * tests/reduce.at (Reduced Automaton): New test.
17404
17405 2002-04-07 Akim Demaille <akim@epita.fr>
17406
17407 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17408 lacking `+ 1' to nrules, Bison reported as useless a token if it
17409 was used solely to set the precedence of the last rule...
17410
17411 2002-04-07 Akim Demaille <akim@epita.fr>
17412
17413 * data/bison.c++, data/bison.simple: Don't output the current file
17414 name in #line, to avoid useless diffs between two identical
17415 outputs under different names.
17416
17417 2002-04-07 Akim Demaille <akim@epita.fr>
17418
17419 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17420 Normalize loops to using `< nrules + 1', not `<= nrules'.
17421
17422 2002-04-07 Akim Demaille <akim@epita.fr>
17423
17424 * TODO: Update.
17425
17426 2002-04-07 Akim Demaille <akim@epita.fr>
17427
17428 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17429 bucket.value as bucket.number.
17430
17431 2002-04-07 Akim Demaille <akim@epita.fr>
17432
17433 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17434 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17435 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17436 RHS, instead of being an index in RITEMS.
17437
17438 2002-04-04 Paul Eggert <eggert@twinsun.com>
17439
17440 * doc/bison.texinfo: Update copyright date.
17441 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17442 (Symbols): Warn about running Bison in one character set,
17443 but compiling and/or running in an incompatible one.
17444 Warn about character code 256, too.
17445
17446 2002-04-03 Paul Eggert <eggert@twinsun.com>
17447
17448 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17449 YYERROR_VERBOSE is nonzero, not whether it is defined.
17450
17451 Merge changes from bison-1_29-branch.
17452
17453 2002-03-20 Paul Eggert <eggert@twinsun.com>
17454
17455 Merge fixes from Debian bison_1.34-1.diff.
17456
17457 * configure.in (AC_PREREQ): 2.53.
17458
17459 2002-03-20 Akim Demaille <akim@epita.fr>
17460
17461 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17462
17463 2002-03-19 Paul Eggert <eggert@twinsun.com>
17464
17465 * src/bison.simple (YYCOPY): New macro.
17466 (YYSTACK_RELOCATE): Use it.
17467 Remove Type arg; no longer needed. All callers changed.
17468 (yymemcpy): Remove; no longer needed.
17469
17470 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17471 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17472
17473 2002-03-19 Akim Demaille <akim@epita.fr>
17474
17475 Test and fix the #line outputs.
17476
17477 * tests/atlocal.at (GCC): New.
17478 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
17479 (Prologue synch line, %union synch line, Postprologue synch line)
17480 (Action synch line, Epilogue synch line): New tests.
17481 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17482 * data/bison.simple, data/bison.c++: Use it.
17483
17484 2002-03-19 Akim Demaille <akim@epita.fr>
17485
17486 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17487 (Solved SR Conflicts, %expect not enough, %expect right)
17488 (%expect too much): Move to...
17489 * tests/conflicts.at: this new file.
17490
17491 2002-03-19 Akim Demaille <akim@epita.fr>
17492
17493 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17494 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17495 that we can move to enums for instance.
17496 * src/output.c (token_definitions_output): Output a list of
17497 `token-name, token-number' instead of the #define.
17498 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17499
17500 2002-03-14 Akim Demaille <akim@epita.fr>
17501
17502 Use Gettext 0.11.1.
17503
17504 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
17505
17506 * data/bison.c++: Make the user able to add members to the generated
17507 parser by subclassing.
17508
17509 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
17510
17511 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17512 a character.
17513 Reported by Nicolas Tisserand and Nicolas Burrus.
17514
17515 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17516
17517 * src/reader.c: Warn about lacking semi-colons, do not complain.
17518
17519 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17520
17521 * data/bison.c++: Remove a debug line.
17522
17523 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17524
17525 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
17526 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
17527 provide a default implementation.
17528
17529 2002-03-04 Akim Demaille <akim@epita.fr>
17530
17531 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17532 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17533 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17534 * tests/semantic.at (Parsing Guards): Similarly.
17535 * src/reader.at (readgram): Complain if the last rule is not ended
17536 with a semi-colon.
17537
17538 2002-03-04 Akim Demaille <akim@epita.fr>
17539
17540 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17541 * src/closure.c: here.
17542 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17543 RTC.
17544 * src/warshall.h, src/warshall.c: Remove.
17545 * tests/sets.at (Broken Closure): Adjust.
17546
17547 2002-03-04 Akim Demaille <akim@epita.fr>
17548
17549 * src/output.c (output_skeleton): tempdir is const.
17550 bytes_read is unused.
17551
17552 2002-03-04 Akim Demaille <akim@epita.fr>
17553
17554 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17555 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17556 Update.
17557 From Michael Hayes.
17558
17559 2002-03-04 Akim Demaille <akim@epita.fr>
17560
17561 * src/closure.c (closure): `r' is unused.
17562
17563 2002-03-04 Akim Demaille <akim@epita.fr>
17564
17565 * tests/sets.at (Broken Closure): Add the ending `;'.
17566 * src/reader.at (readgram): Complain if a rule is not ended with a
17567 semi-colon.
17568
17569 2002-03-04 Akim Demaille <akim@epita.fr>
17570
17571 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17572 (count_sr_conflicts): Use bitset_count.
17573 * src/reduce.c (inaccessable_symbols): Ditto.
17574 (bits_size): Remove.
17575 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17576
17577 2002-03-04 Akim Demaille <akim@epita.fr>
17578
17579 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17580 * src/reduce.c: Remove the `bitset_zero's following the
17581 `bitset_create's, as now it is performed by the latter.
17582
17583 2002-03-04 Akim Demaille <akim@epita.fr>
17584
17585 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17586 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17587 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17588 latest sources from Michael.
17589
17590 2002-03-04 Akim Demaille <akim@epita.fr>
17591
17592 * src/output.c (output): Don't free the grammar.
17593 * src/reader.c (grammar_free): New.
17594 * src/main.c (main): Call it and don't free symtab here.
17595
17596 2002-03-04 Akim Demaille <akim@epita.fr>
17597
17598 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17599 before returning.
17600 Reported by Benoit Perrot.
17601
17602 2002-03-04 Akim Demaille <akim@epita.fr>
17603
17604 Use bitset operations when possible, not loops over bits.
17605
17606 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17607 bitset_or.
17608 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17609 * src/reduce.c (useless_nonterminals): Formatting changes.
17610 * src/warshall.c (TC): Use bitset_or.
17611
17612 2002-03-04 Akim Demaille <akim@epita.fr>
17613
17614 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17615 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17616 Ditto.
17617
17618 2002-03-04 Akim Demaille <akim@epita.fr>
17619
17620 * src/lalr.c (F): Now a bitset*.
17621 Adjust all dependencies.
17622
17623 2002-03-04 Akim Demaille <akim@epita.fr>
17624
17625 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17626 Adjust all dependencies.
17627
17628 2002-03-04 Akim Demaille <akim@epita.fr>
17629
17630 * src/L0.c, src/LR0.h (nstates): Be size_t.
17631 Adjust comparisons (signed vs unsigned).
17632 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17633 bitset*.
17634 Adjust all dependencies.
17635
17636 2002-03-04 Akim Demaille <akim@epita.fr>
17637
17638 * src/closure.c (firsts): Now, also a bitset.
17639 Adjust all dependencies.
17640 (varsetsize): Remove, now unused.
17641 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17642
17643 2002-03-04 Akim Demaille <akim@epita.fr>
17644
17645 * src/print.c: Convert to use bitset.h, not hand coded iterations
17646 over ints.
17647
17648 2002-03-04 Akim Demaille <akim@epita.fr>
17649
17650 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17651
17652 2002-03-04 Akim Demaille <akim@epita.fr>
17653
17654 * src/closure.c (ruleset): Be a bitset.
17655 (rulesetsize): Remove.
17656
17657 2002-03-04 Akim Demaille <akim@epita.fr>
17658
17659 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17660 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17661 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17662 * src/closure.c (fderives): Be an array of bitsets.
17663
17664 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
17665
17666 * data/bison.c++: Merge the two generated headers. Insert a copyright
17667 notice in each output file.
17668
17669 2002-02-28 Akim Demaille <akim@epita.fr>
17670
17671 * data/bison.c++: Copy the prologue of bison.simple to fetch
17672 useful M4 definitions, such as b4_header_guard.
17673
17674 2002-02-25 Akim Demaille <akim@epita.fr>
17675
17676 * src/getargs.c (version): Give the name of the authors, and use a
17677 translator friendly scheme for the bgr
17678 copyright notice.
17679
17680 2002-02-25 Akim Demaille <akim@epita.fr>
17681
17682 * src/output.c (header_output): Remove, now handled completely via
17683 M4.
17684
17685 2002-02-25 Akim Demaille <akim@epita.fr>
17686
17687 * m4/m4.m4: New, from CVS Autoconf.
17688 * configure.in: Invoke it.
17689 * src/output.c (output_skeleton): Use its result instead of the
17690 hard coded name.
17691
17692 2002-02-25 Akim Demaille <akim@epita.fr>
17693
17694 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17695 Fileutils 4.1.5.
17696 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17697 * src/output.c (output_skeleton): Use mkstemp to create a real
17698 temporary file.
17699 Move the filling of `skeleton' and its muscle to...
17700 (prepare): here.
17701 (output): Move the definition of the prologue muscle to...
17702 (prepare): here.
17703 * src/system.h (DEFAULT_TMPDIR): New.
17704
17705 2002-02-14 Paul Eggert <eggert@twinsun.com>
17706
17707 Remove the support for C++ namespace cleanliness; it was
17708 causing more problems than it was curing, since it didn't work
17709 properly on some nonstandard C++ compilers. This can wait
17710 for a proper C++ parser.
17711
17712 * NEWS: Document this.
17713 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17714 of C++, as it's treated like C now.
17715 * src/bison.simple (YYSTD): Remove.
17716 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17717 Treat C++ just like Standard C instead of trying to support
17718 namespace cleanliness.
17719
17720 2002-02-14 Akim Demaille <akim@epita.fr>
17721
17722 * tests/regression.at (else): Adjust to Andreas' change.
17723
17724 2002-02-14 Akim Demaille <akim@epita.fr>
17725
17726 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17727
17728 2002-02-13 Andreas Schwab <schwab@suse.de>
17729
17730 * src/output.c (output_rule_data): Don't output NULL, it might
17731 not be defined yet.
17732
17733 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
17734
17735 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17736 (Copyright notice): Update.
17737
17738 2002-02-11 Akim Demaille <akim@epita.fr>
17739
17740 * tests/regression.at (%nonassoc and eof): Don't include
17741 nonportable headers.
17742
17743 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
17744
17745 * data/bison.c++: Correct error recovery. Make the user able to
17746 initialize the starting location.
17747
17748 2002-02-07 Akim Demaille <akim@epita.fr>
17749
17750 * tests/input.at: New.
17751
17752 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17753
17754 * data/bison.c++: Replace some direct m4 expansions by constants. Be
17755 more consistent when naming methods and variables. Put preprocessor
17756 directives around tables only needed for debugging.
17757
17758 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17759
17760 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17761 C++ parsers.
17762 (yy::b4_name::parse): Use print_.
17763
17764 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17765
17766 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17767
17768 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17769
17770 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17771 C++ parsers.
17772 (yy::b4_name::parse): Build verbose error messages, and use error_.
17773
17774 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17775
17776 * data/bison.c++: Fix m4 quoting in comments.
17777
17778 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17779
17780 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17781 not expanded by m4.
17782
17783 2002-02-05 Akim Demaille <akim@epita.fr>
17784
17785 * data/bison.c++: Adjust to the M4 back end.
17786 More is certainly needed.
17787
17788 2002-02-05 Akim Demaille <akim@epita.fr>
17789
17790 Give a try to M4 as a back end.
17791
17792 * lib/readpipe.c: New, from wdiff.
17793 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17794 BISON_HAIRY.
17795 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17796 specific values. Now it is m4 that performs the lookup.
17797 * src/parse-skel.y: Remove.
17798 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17799 * src/output.c (actions_output, guards_output)
17800 (token_definitions_output): No longer keeps track of the output
17801 line number, hence remove the second argument.
17802 (guards_output): Check against the guard member of a rule, not the
17803 action member.
17804 Adjust callers.
17805 (output_skeleton): Don't look for the skeleton location, let m4 do
17806 that.
17807 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17808 file will be used.
17809 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17810 (prepare): Given that for the time being changesyntax is not
17811 usable in M4, rename the muscles using `-' to `_'.
17812 Define `defines_flag', `output_parser_name' and `output_header_name'.
17813 * src/output.h (actions_output, guards_output)
17814 (token_definitions_output): Adjust prototypes.
17815 * src/scan-skel.l: Instead of scanning the skeletons, it now
17816 processes the output of m4: `__oline__' and `#output'.
17817 * data/bison.simple: Adjust to be used by M4(sugar).
17818 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17819 to date.
17820 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17821 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17822 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17823 shamelessly stolen from CVS Autoconf.
17824
17825 2002-02-05 Akim Demaille <akim@epita.fr>
17826
17827 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17828 * configure.in: Check for the declarations of free and malloc.
17829 * src/muscle_tab.c: Adjust.
17830
17831 2002-02-05 Akim Demaille <akim@epita.fr>
17832
17833 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17834 which have no values.
17835
17836 2002-02-05 Akim Demaille <akim@epita.fr>
17837
17838 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17839 * data/: here.
17840
17841 2002-01-29 Paul Eggert <eggert@twinsun.com>
17842
17843 * src/bison.simple (YYSIZE_T): Do not define merely because
17844 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17845 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17846
17847 2002-01-27 Akim Demaille <akim@epita.fr>
17848
17849 Fix `%nonassoc and eof'.
17850
17851 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17852 which were not properly copied! Replace
17853 memcpy (res->errs, src->errs, src->nerrs);
17854 with
17855 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17856 !!!
17857 * tests/regression.at (%nonassoc and eof): Adjust to newest
17858 Autotest: `.' is not in the PATH.
17859
17860 2002-01-27 Akim Demaille <akim@epita.fr>
17861
17862 * tests/sets.at (AT_EXTRACT_SETS): New.
17863 (Nullable): Use it.
17864 (Firsts): New.
17865
17866 2002-01-26 Akim Demaille <akim@epita.fr>
17867
17868 * tests/actions.at, tests/calc.at, tests/headers.at,
17869 * tests/torture.at: Adjust to the newest Autotest which no longer
17870 forces `.' in the PATH.
17871
17872 2002-01-25 Akim Demaille <akim@epita.fr>
17873
17874 * tests/regression.at (%nonassoc and eof): New.
17875 Suggested by Robert Anisko.
17876
17877 2002-01-24 Akim Demaille <akim@epita.fr>
17878
17879 Bison dumps core when trying to complain about broken input files.
17880 Reported by Cris van Pelt.
17881
17882 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17883 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17884 into...
17885 (Invalid inputs): Strengthen: exercise parse_percent_token.
17886
17887 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
17888
17889 * src/Makefile.am: Add bison.c++.
17890 * src/bison.c++: New skeleton.
17891
17892 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
17893
17894 * po/it.po: New.
17895
17896 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17897
17898 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17899
17900 2002-01-20 Marc Autret <marc@gnu.org>
17901
17902 * src/files.c (compute_output_file_names): Fix
17903
17904 2002-01-20 Marc Autret <marc@gnu.org>
17905
17906 * tests/output.at: New test.
17907 * src/files.c (compute_base_names): Don't map extensions when
17908 the YACC flag is set, use defaults.
17909 Reported by Evgeny Stambulchik.
17910
17911 2002-01-20 Marc Autret <marc@gnu.org>
17912
17913 * src/system.h: Need to define __attribute__ away for non-GCC
17914 compilers as well (i.e., the vendor C compiler).
17915 Suggested by Albert Chin-A-Young.
17916
17917 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
17918
17919 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17920 canonical definition.
17921 * src/system.h: Use the canonical definition for PARAMS (avoids
17922 a conflict with the macro from lib/hash.h).
17923
17924 2002-01-11 Akim Demaille <akim@epita.fr>
17925
17926 * configure.in: Use AC_FUNC_STRNLEN.
17927 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
17928
17929 2002-01-09 Akim Demaille <akim@epita.fr>
17930
17931 * src/files.c, src/files.h (output_infix): New.
17932 (tab_extension): Remove.
17933 (compute_base_names): Compute the former, drop the latter.
17934 * src/output.c (prepare): Insert the muscles `output-infix', and
17935 `output-suffix'.
17936 * src/parse-skel.y (string, string.1): New.
17937 (section.header): Use it.
17938 (section.yacc): Remove.
17939 (prefix): Remove too.
17940 * src/scan-skel.l: Adjust.
17941 * src/bison.simple, src/bison.hairy: Adjust.
17942
17943 2002-01-09 Akim Demaille <akim@epita.fr>
17944
17945 * configure.in (WERROR_CFLAGS): Compute it.
17946 * src/Makefile.am (CFLAGS): Pass it.
17947 * tests/atlocal.in (CFLAGS): Idem.
17948 * src/files.c: Fix a few warnings.
17949 (get_extension_index): Remove, unused.
17950
17951 2002-01-08 Akim Demaille <akim@epita.fr>
17952
17953 * src/getargs.c (AS_FILE_NAME): New.
17954 (getargs): Use it to convert DOSish file names.
17955 * src/files.c (base_name): Rename as full_base_name to avoid
17956 clashes with `base_name ()'.
17957 (filename_split): New.
17958 (compute_base_names): N-th rewrite, using filename_split.
17959
17960 2002-01-08 Akim Demaille <akim@epita.fr>
17961
17962 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
17963 New, stolen from the Fileutils 4.1.
17964 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17965 * configure.in: Check for the presence of memrchr, and of its
17966 prototype.
17967
17968 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
17969
17970 * lib/hash.h (__P): Added definition for this macro.
17971 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
17972 BUILT_SOURCES, to ensure they are generated first.
17973 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
17974 %error-verbose to allow bootstrapping with bison 1.30x.
17975
17976 2002-01-06 Akim Demaille <akim@epita.fr>
17977
17978 * src/reader.c (parse_braces): Don't fetch the next char, the
17979 convention is to fetch on entry.
17980 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
17981 'switch' without a following semicolon.
17982 * tests/regression.at (braces parsing): New.
17983
17984 2002-01-06 Akim Demaille <akim@epita.fr>
17985
17986 Bison is dead wrong in its RR conflict reports.
17987
17988 * tests/torture.at (GNU Cim Grammar): New.
17989 * src/conflicts.c (count_rr_conflicts): Fix.
17990
17991 2002-01-06 Akim Demaille <akim@epita.fr>
17992
17993 Creating package.m4 from configure.ac causes too many problems.
17994
17995 * tests/Makefile.am (package.m4): Create it by hand,
17996 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
17997
17998 2002-01-06 Akim Demaille <akim@epita.fr>
17999
18000 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18001 skeleton.h.
18002
18003 2002-01-04 Paul Eggert <eggert@twinsun.com>
18004
18005 * doc/bison.texinfo (Debugging):
18006 Remove YYSTDERR; it's no longer defined or used.
18007 Also, s/cstdio.h/cstdio/.
18008
18009 2002-01-03 Akim Demaille <akim@epita.fr>
18010
18011 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18012
18013 2002-01-03 Akim Demaille <akim@epita.fr>
18014
18015 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18016 tracing code to --trace, wait for a better --trace option, with
18017 args.
18018
18019 2002-01-03 Akim Demaille <akim@epita.fr>
18020
18021 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18022 The ISO C++ standard is extremely clear about it: stderr is
18023 considered a macro, not a regular symbol (see table 94 `Header
18024 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18025 Therefore std:: does not apply to it. It still does with fprintf.
18026 Also, s/cstdio.h/cstdio/.
18027
18028 2002-01-03 Akim Demaille <akim@epita.fr>
18029
18030 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18031 for non system headers.
18032
18033 2002-01-02 Akim Demaille <akim@epita.fr>
18034
18035 Equip the skeleton chain with location tracking, runtime trace,
18036 pure parser and scanner.
18037
18038 * src/parse-skel.y: Request a pure parser, locations, and prefix
18039 renaming.
18040 (%union): Having several members with the same type does not help
18041 type mismatches, simplify.
18042 (YYPRINT, yyprint): New.
18043 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18044 (skel_error): this.
18045 Handle locations.
18046 * src/scan-skel.l: Adjust to these changes.
18047 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18048 (LOCATION_PRINT, skel_control_t): New.
18049
18050 2001-12-30 Akim Demaille <akim@epita.fr>
18051
18052 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18053 replace `gb' with BLANKS.
18054 * src/scan-skel.l: Adjust.
18055
18056 2001-12-30 Akim Demaille <akim@epita.fr>
18057
18058 * src/system.h: We don't need nor want bcopy.
18059 Throw away MS-DOS crap: we don't need getpid.
18060 * configure.in: We don't need strndup. It was even causing
18061 problems: because Flex includes the headers *before* us,
18062 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18063 not visible.
18064 * lib/xstrndup.c: New.
18065 * src/scan-skel.l: Use it.
18066 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18067 * src/parse-skel.y: Use %directives instead of #defines.
18068
18069 2001-12-30 Akim Demaille <akim@epita.fr>
18070
18071 * src/skeleton.h: New.
18072 * src/output.c (output_parser, output_master_parser): Remove, dead
18073 code.
18074 * src/output.h (get_lines_number, actions_output, guards_output)
18075 (token_definitions_output): Prototype them.
18076 * src/parse-skel.y: Add the license notice.
18077 Include output.h and skeleton.h.
18078 (process_skeleton): Returns void, and takes a single parameter.
18079 * src/scan-skel.l: Add the license notice.
18080 Include skeleton.h.
18081 Don't use %option yylineno: it seems that then Flex imagines
18082 REJECT has been used, and therefore it won't reallocate its
18083 buffers (which makes no other sense to me than a bug). It results
18084 in warnings for `unused: yy_flex_realloc'.
18085
18086 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
18087
18088 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18089 (MUSCLE_INSERT_PREFIX): ...to there.
18090 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18091 (MUSCLE_INSERT_PREFIX): Move from here...
18092
18093 * src/bison.hairy: Add a section directive. Put braces around muscle
18094 names. This parser skeleton is still broken, but Bison should not
18095 choke on a bad muscle 'syntax'.
18096 * src/bison.simple: Add a section directive. Put braces around muscle
18097 names.
18098
18099 * src/files.h (strsuffix, stringappend): Add declarations.
18100 (tab_extension): Add declaration.
18101 (short_base_name): Add declaration.
18102
18103 * src/files.c (strsuffix, stringappend): No longer static. These
18104 functions are used in the skeleton parser.
18105 (tab_extension): New.
18106 (compute_base_names): Use the computations done in this function
18107 to guess if the generated parsers should have '.tab' in their
18108 names.
18109 (short_base_name): No longer static.
18110
18111 * src/output.c (output_skeleton): New.
18112 (output): Disable call to output_master_parser, and give a try to
18113 a new skeleton handling system.
18114 (guards_output, actions_output): No longer static.
18115 (token_definitions_output, get_lines_number): No longer static.
18116
18117 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18118
18119 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18120 parse-skel.y.
18121
18122 * src/parse-skel.y: New file.
18123 * src/scan-skel.l: New file.
18124
18125 2001-12-29 Akim Demaille <akim@epita.fr>
18126
18127 %name-prefix is broken.
18128
18129 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18130 Adjust all dependencies.
18131 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18132 %name-prefix.
18133
18134 Renaming yylval but not yylloc is not consistent. Now we do.
18135
18136 * src/bison.simple: Prefix yylloc if used.
18137 * doc/bison.texinfo (Decl Summary): Document that.
18138
18139 2001-12-29 Akim Demaille <akim@epita.fr>
18140
18141 * doc/bison.texinfo: Promote `%long-directive' over
18142 `%long_directive'.
18143 Remove all references to fixed-output-files, yacc is enough.
18144
18145 2001-12-29 Akim Demaille <akim@epita.fr>
18146
18147 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18148 user prologue. These are defaults.
18149 * tests/actions.at (Mid-rule actions): Make sure the user can
18150 define YYDEBUG and YYERROR_VERBOSE.
18151
18152 2001-12-29 Akim Demaille <akim@epita.fr>
18153
18154 * src/output.c (header_output): Don't forget to export YYLTYPE and
18155 yylloc.
18156 * tests/headers.at (export YYLTYPE): New, make sure it does.
18157 * tests/regression.at (%union and --defines, Invalid CPP headers):
18158 Move to...
18159 * tests/headers.at: here.
18160
18161 2001-12-29 Akim Demaille <akim@epita.fr>
18162
18163 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18164
18165 2001-12-29 Akim Demaille <akim@epita.fr>
18166
18167 * tests/actions.at (Mid-rule actions): Output on a single line
18168 instead of several.
18169
18170 2001-12-29 Akim Demaille <akim@epita.fr>
18171
18172 * doc/bison.texinfo: Formatting changes.
18173
18174 2001-12-29 Akim Demaille <akim@epita.fr>
18175
18176 Don't store the token defs in a muscle, just be ready to output it
18177 on command. Now possible via `symbols'. Fixes a memory leak.
18178
18179 * src/output.c (token_definitions_output): New.
18180 (output_parser, header_output): Use it.
18181 * src/reader.c (symbols_save): Remove.
18182
18183 2001-12-29 Akim Demaille <akim@epita.fr>
18184
18185 * src/bison.simple: Do not provide a default for YYSTYPE and
18186 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18187 default.
18188
18189 2001-12-29 Akim Demaille <akim@epita.fr>
18190
18191 Mid-rule actions are simply... ignored!
18192
18193 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18194 the empty-rule associated to the dummy symbol, not to the host
18195 rule.
18196 * tests/actions.at (Mid-rule actions): New.
18197
18198 2001-12-29 Akim Demaille <akim@epita.fr>
18199
18200 Memory leak.
18201
18202 * src/reader.c (reader): Free grammar.
18203
18204 2001-12-29 Akim Demaille <akim@epita.fr>
18205
18206 Memory leak.
18207
18208 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18209 since it allocates it for each state, although only one is needed.
18210 (allocate_storage): Do it here.
18211
18212 2001-12-29 Akim Demaille <akim@epita.fr>
18213
18214 * src/options.h, src/options.c (create_long_option_table): Rename
18215 as...
18216 (long_option_table_new): this, with a clearer prototype.
18217 (percent_table): Remove, unused,
18218 * src/getargs.c (getargs): Adjust.
18219
18220 2001-12-29 Akim Demaille <akim@epita.fr>
18221
18222 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18223 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18224 as states.
18225
18226 2001-12-29 Akim Demaille <akim@epita.fr>
18227
18228 * src/lalr.c (build_relations): Rename `states' as `states1'.
18229 Sorry, I don't understand exactly what it is, no better name...
18230
18231 2001-12-29 Akim Demaille <akim@epita.fr>
18232
18233 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18234 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18235 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18236 as rules.
18237
18238 2001-12-29 Akim Demaille <akim@epita.fr>
18239
18240 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18241 ago.
18242
18243 2001-12-29 Akim Demaille <akim@epita.fr>
18244
18245 * src/reader.c, src/reader.h (user_toknums): Remove.
18246 Adjust all users to use symbols[i]->user_token_number.
18247
18248 2001-12-29 Akim Demaille <akim@epita.fr>
18249
18250 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18251 Adjust all users to use symbols[i]->prec or ->assoc.
18252
18253 2001-12-29 Akim Demaille <akim@epita.fr>
18254
18255 * src/reader.c, src/reader.h (tags): Remove.
18256 Adjust all users to use symbols[i]->tag.
18257
18258 2001-12-29 Akim Demaille <akim@epita.fr>
18259
18260 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18261 and rule_table.
18262 * src/reader.c (packsymbols): Fill this table.
18263 Drop sprec.
18264 * src/conflicts.c (resolve_sr_conflict): Adjust.
18265 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18266 single table.
18267 Use symbols[i]->tag instead of tags[i].
18268
18269 2001-12-29 Akim Demaille <akim@epita.fr>
18270
18271 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18272 In addition, put a comment in there, to replace...
18273 * tests/regression.at (%union and C comments): Remove.
18274
18275 2001-12-29 Akim Demaille <akim@epita.fr>
18276
18277 * tests/regression.at (Web2c Actions): Blindly move the actual
18278 output as expected output. The contents *seem* right to me, but I
18279 can't pretend reading perfectly parser tables... Nonetheless, all
18280 the other tests pass correctly, the table look OK, even though the
18281 presence of `$axiom' is to be noted: AFAICS it is useless (but
18282 harmless).
18283
18284 2001-12-29 Akim Demaille <akim@epita.fr>
18285
18286 * src/reader.c (readgram): Don't add the rule 0 if there were no
18287 rules read. In other words, add it _after_ having performed
18288 grammar sanity checks.
18289 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18290
18291 2001-12-29 Akim Demaille <akim@epita.fr>
18292
18293 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18294 visible, and some states have now a different number.
18295
18296 2001-12-29 Akim Demaille <akim@epita.fr>
18297
18298 * src/reader.c (readgram): Bind the initial rule's lineno to that
18299 of the first rule.
18300 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18301 (Solved SR Conflicts): Adjust rule 0's line number.
18302
18303 2001-12-29 Akim Demaille <akim@epita.fr>
18304
18305 Fix the `GAWK Grammar' failure.
18306
18307 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18308 the reductions of the first state which was mistakenly confused
18309 with the final state because precisely final_state was initialized
18310 to 0.
18311 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18312 now noticed by Bison.
18313 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18314 have a reduction on $default.
18315
18316 2001-12-29 Akim Demaille <akim@epita.fr>
18317
18318 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18319 rule line numbers.
18320 * src/closure.c (print_closure): Likewise.
18321 * src/derives.c (print_derives): Likewise.
18322 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18323 now.
18324
18325 2001-12-29 Akim Demaille <akim@epita.fr>
18326
18327 * src/lalr.c (lookaheads_print): New.
18328 (lalr): Call it when --trace-flag.
18329 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18330 are dumped.
18331
18332 2001-12-29 Akim Demaille <akim@epita.fr>
18333
18334 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18335 when walking through ritem, even via rule->rhs.
18336 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18337 (useful_production, useless_nonterminals): Likewise.
18338 (reduce_grammar_tables): Likewise, plus update nritems.
18339 * src/nullable.c (set_nullable): Likewise.
18340 * src/lalr.c (build_relations): Likewise.
18341 * tests/sets.at (Nullable): Adjust.
18342 Fortunately, now, the $axiom is no longer nullable.
18343
18344 2001-12-29 Akim Demaille <akim@epita.fr>
18345
18346 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18347 the 0-sentinel.
18348 * src/gram.c (ritem_longest_rhs): Likewise.
18349 * src/reduce.c (nonterminals_reduce): Likewise.
18350 * src/print_graph.c (print_graph): Likewise.
18351 * src/output.c (output_rule_data): Likewise.
18352 * src/nullable.c (set_nullable): Likewise.
18353
18354 2001-12-29 Akim Demaille <akim@epita.fr>
18355
18356 * src/output.c: Comment changes.
18357
18358 2001-12-27 Paul Eggert <eggert@twinsun.com>
18359
18360 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18361 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18362 Sparc, as they were causing more porting problems than the
18363 (minor) performance improvement was worth.
18364
18365 Also, catch up with 1.31's YYSTD.
18366
18367 2001-12-27 Akim Demaille <akim@epita.fr>
18368
18369 * src/output.c (output_gram): Rely on nritems, not the
18370 0-sentinel. See below.
18371 Use -1 as separator, not 0.
18372 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18373 Rely on -1 as separator in yyrhs, instead of 0.
18374 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18375 twice `Now at end of input', therefore there are two lines less to
18376 expect.
18377
18378 2001-12-27 Akim Demaille <akim@epita.fr>
18379
18380 * tests/regression.at (Unresolved SR Conflicts):
18381 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18382 below.
18383
18384 2001-12-27 Akim Demaille <akim@epita.fr>
18385
18386 * src/LR0.c (new_state): Recognize the final state by the fact it
18387 is reached by eoftoken.
18388 (insert_start_shifting_state, insert_eof_shifting_state)
18389 (insert_accepting_state, augment_automaton): Remove, since now
18390 these states are automatically computed from the initial state.
18391 (generate_states): Adjust.
18392 * src/print.c: When reporting a rule number to the user, substract
18393 1, so that the axiom rule is rule 0, and the first user rule is 1.
18394 * src/reduce.c: Likewise.
18395 * src/print_graph.c (print_core): For the time being, just as for
18396 the report, depend upon --trace-flags to dump the full set of
18397 items.
18398 * src/reader.c (readgram): Once the grammar read, insert the rule
18399 0: `$axiom: START-SYMBOL $'.
18400 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18401 number of the states has changed (the final state is no longer
18402 necessarily the last), catch up.
18403
18404 2001-12-27 Akim Demaille <akim@epita.fr>
18405
18406 Try to make the use of the eoftoken valid. Given that its value
18407 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18408 is used instead of > 0 where appropriate, (ii), depend upon nritems
18409 instead of the 0-sentinel.
18410
18411 * src/gram.h, src/gram.c (nritems): New.
18412 Expected to be duplication of nitems, but for the time being...
18413 * src/reader.c (packgram): Assert nritems and nitems are equal.
18414 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18415 * src/closure.c (print_closure, print_fderives): Likewise.
18416 * src/gram.c (ritem_print): Likewise.
18417 * src/print.c (print_core, print_grammar): Likewise.
18418 * src/print_graph.c: Likewise.
18419
18420 2001-12-27 Akim Demaille <akim@epita.fr>
18421
18422 * src/main.c (main): If there are complains after grammar
18423 reductions, then output the report anyway if requested, then die.
18424 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18425 * src/reader.c (eoftoken): New.
18426 (parse_token_decl): If the token being defined has value `0', it
18427 is the eoftoken.
18428 (packsymbols): No longer hack `tags' to insert `$' by hand.
18429 Be sure to preserve the value of the eoftoken.
18430 (reader): Make sure eoftoken is defined.
18431 Initialize nsyms to 0: now eoftoken is created just like the others.
18432 * src/print.c (print_grammar): Don't special case the eof token.
18433 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18434 lie anyway, albeit pleasant.
18435 * tests/calc.at: Exercise error messages with eoftoken.
18436 Change the grammar so that empty input is invalid.
18437 Adjust expectations.
18438 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18439
18440 2001-12-27 Akim Demaille <akim@epita.fr>
18441
18442 * configure.in: Check the protos of strchr ans strspn.
18443 Replace strchr if needed.
18444 * src/system.h: Provide the protos of strchr, strspn and memchr if
18445 missing.
18446 * lib/strchr.c: New.
18447 * src/reader.c (symbols_save): Use strchr.
18448
18449 2001-12-27 Akim Demaille <akim@epita.fr>
18450
18451 * src/print.c, src/print_graph.c (escape): New.
18452 Use it to quote the TAGS outputs.
18453 * src/print_graph.c (print_state): Now errors are in red, and
18454 reductions in green.
18455 Prefer high to wide: output the state number on a line of its own.
18456
18457 2001-12-27 Akim Demaille <akim@epita.fr>
18458
18459 * src/state.h, src/state.c (reductions_new): New.
18460 * src/LR0.c (set_state_table): Let all the states have a
18461 `reductions', even if reduced to 0.
18462 (save_reductions): Adjust.
18463 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18464 * src/print.c (print_reductions, print_actions): Adjust.
18465 * src/output.c (action_row): Adjust.
18466
18467 2001-12-27 Akim Demaille <akim@epita.fr>
18468
18469 * src/state.h, src/state.c (errs_new, errs_dup): New.
18470 * src/LR0.c (set_state_table): Let all the states have an errs,
18471 even if reduced to 0.
18472 * src/print.c (print_errs, print_reductions): Adjust.
18473 * src/output.c (output_actions, action_row): Adjust.
18474 * src/conflicts.c (resolve_sr_conflict): Adjust.
18475
18476 2001-12-27 Akim Demaille <akim@epita.fr>
18477
18478 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18479
18480 2001-12-27 Akim Demaille <akim@epita.fr>
18481
18482 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18483 * src/print.c: here.
18484 (lookaheadset, shiftset): New, used as additional storage by
18485 print_reductions.
18486 (print_results): Adjust.
18487 (print_shifts, print_gotos, print_errs): New, extracted from...
18488 (print_actions): here.
18489 * src/print_graph.c (print_actions): Remove dead code.
18490
18491 2001-12-27 Akim Demaille <akim@epita.fr>
18492
18493 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18494 `$n' and `@n'.
18495
18496 2001-12-27 Akim Demaille <akim@epita.fr>
18497
18498 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18499 (build_relations): Adjust.
18500
18501 2001-12-27 Akim Demaille <akim@epita.fr>
18502
18503 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18504 duplication.
18505
18506 2001-12-27 Akim Demaille <akim@epita.fr>
18507
18508 * src/reader.c (packgram): Catch nitems overflows.
18509
18510 2001-12-27 Akim Demaille <akim@epita.fr>
18511
18512 * src/files.c, src/files.h (guard_obstack): Remove.
18513 * src/output.c (output): Adjust.
18514 * src/reader.c (parse_braces): New, factoring...
18515 (copy_action, copy_guard): these two which are renamed as...
18516 (parse_action, parse_guard): these.
18517 As a voluntary consequence, using braces around guards is now
18518 mandatory.
18519
18520 2001-12-27 Akim Demaille <akim@epita.fr>
18521
18522 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18523 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18524 members.
18525 (symbol_list_new): Adjust.
18526 (copy_action): action_line is the first line, not the last.
18527 (copy_guard): Just as for actions, store the `action' only, not
18528 the switch/case/break flesh.
18529 Don't parse the user action that might follow the guard, let...
18530 (readgram): do it, i.e., now, there can be an action after a
18531 guard.
18532 In other words the guard is just explicitly optional.
18533 (packgram): Adjust.
18534 * src/output.c (guards_output): New.
18535 (output_parser): Call it when needed.
18536 (output): Also free the guard and attrs obstacks.
18537 * src/files.c, src/files.h (obstack_save): Remove.
18538 (output_files): Remove.
18539 As a result, if one needs the former `.act' file, using an
18540 appropriate skeleton which requires actions and guards is now
18541 required.
18542 * src/main.c (main): Adjust.
18543 * tests/semantic.at: New.
18544 * tests/regression.at: Use `input.y' as input file name.
18545 Avoid 8+3 problems by requiring input.c when the test needs the
18546 parser.
18547
18548 2001-12-27 Akim Demaille <akim@epita.fr>
18549
18550 * src/reader.c (symbol_list_new): Be sure to initialize all the
18551 fields.
18552
18553 2001-12-27 Akim Demaille <akim@epita.fr>
18554
18555 All the hacks using a final pseudo state are now useless.
18556
18557 * src/LR0.c (set_state_table): state_table holds exactly nstates.
18558 * src/lalr.c (nLA): New.
18559 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18560 instead of lookaheadsp from the pseudo state (nstate + 1).
18561
18562 2001-12-27 Akim Demaille <akim@epita.fr>
18563
18564 * src/output.c (action_row, token_actions): Use a state_t instead
18565 of a integer, and nlookaheads instead of the following state's
18566 lookaheadsp.
18567
18568 2001-12-27 Akim Demaille <akim@epita.fr>
18569
18570 * src/conflicts.c (log_resolution, flush_shift)
18571 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18572 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18573 (conflicts_print, print_reductions): Use a state_t instead of an
18574 integer when referring to a state.
18575 As much as possible, depend upon nlookaheads, instead of the
18576 `lookaheadsp' member of the following state (since lookaheads of
18577 successive states are successive, the difference between state n + 1
18578 and n served as the number of lookaheads for state n).
18579 * src/lalr.c (add_lookback_edge): Likewise.
18580 * src/print.c (print_core, print_actions, print_state)
18581 (print_results): Likewise.
18582 * src/print_graph.c (print_core, print_actions, print_state)
18583 (print_graph): Likewise.
18584 * src/conflicts.h: Adjust.
18585
18586 2001-12-27 Akim Demaille <akim@epita.fr>
18587
18588 * src/bison.hairy: Formatting/comment changes.
18589 ANSIfy.
18590 Remove `register' indications.
18591 Add plenty of `static'.
18592
18593 2001-12-27 Akim Demaille <akim@epita.fr>
18594
18595 * src/output.c (prepare): Drop the muscle `ntbase' which
18596 duplicates ntokens.
18597 * src/bison.simple: Formatting/comment changes.
18598 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18599 is an undocumented synonym.
18600
18601 2001-12-22 Akim Demaille <akim@epita.fr>
18602
18603 * src/output.c (output_table_data): Change the prototype to use
18604 `int' for array ranges: some invocations do pass an int, not a
18605 short.
18606 Reported by Wayne Green.
18607
18608 2001-12-22 Akim Demaille <akim@epita.fr>
18609
18610 Some actions of web2c.y are improperly triggered.
18611 Reported by Mike Castle.
18612
18613 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18614 * tests/regression.at (Web2c): Rename as...
18615 (Web2c Report): this.
18616 (Web2c Actions): New.
18617
18618 2001-12-22 Akim Demaille <akim@epita.fr>
18619
18620 Reductions in web2c.y are improperly reported.
18621 Reported by Mike Castle.
18622
18623 * src/conflicts.c (print_reductions): Fix.
18624 * tests/regression.at (Web2c): New.
18625
18626 2001-12-18 Akim Demaille <akim@epita.fr>
18627
18628 Some host fail on `assert (!"foo")', which expands to
18629 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18630 Reported by Nelson Beebee.
18631
18632 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18633 `#define it_succeeded 0' and `assert (it_succeeded)'.
18634
18635 2001-12-17 Marc Autret <autret_m@epita.fr>
18636
18637 * src/bison.simple: Don't hard code the skeleton line and filename.
18638 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18639 New line counter 'skeleton_line' (skeleton-line muscle).
18640
18641 2001-12-17 Paul Eggert <eggert@twinsun.com>
18642
18643 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18644 YYDEBUG must be defined to a nonzero value.
18645
18646 * src/bison.simple (yytname): Do not assume that the user defines
18647 YYDEBUG to a properly parenthesized expression.
18648
18649 2001-12-17 Akim Demaille <akim@epita.fr>
18650
18651 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18652 nlookaheads is a new member.
18653 Adjust all users.
18654 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18655 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18656 state.
18657
18658 2001-12-17 Akim Demaille <akim@epita.fr>
18659
18660 * src/files.h, src/files.c (open_files, close_files): Remove.
18661 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18662 let...
18663 * src/reader.c (reader): Do it.
18664
18665 2001-12-17 Akim Demaille <akim@epita.fr>
18666
18667 * src/conflicts.c (print_reductions): Formatting changes.
18668
18669 2001-12-17 Akim Demaille <akim@epita.fr>
18670
18671 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18672 (flush_reduce): New.
18673 (resolve_sr_conflict): Adjust.
18674
18675 2001-12-17 Akim Demaille <akim@epita.fr>
18676
18677 * src/output.c (output_obstack): Be static and rename as...
18678 (format_obstack): this, to avoid any confusion with files.c's
18679 output_obstack.
18680 * src/reader.h (muscle_obstack): Move to...
18681 * src/output.h: here, since it's defined in output.c.
18682
18683 2001-12-17 Akim Demaille <akim@epita.fr>
18684
18685 * src/output.c (action_row, save_column, default_goto)
18686 (sort_actions, matching_state, pack_vector): Better variable
18687 locality.
18688
18689 2001-12-17 Akim Demaille <akim@epita.fr>
18690
18691 * src/output.c: Various formatting changes.
18692
18693 2001-12-17 Akim Demaille <akim@epita.fr>
18694
18695 * src/files.c (output_files): Free the output_obstack.
18696 * src/main.c (main): Call print and print_graph conditionally.
18697 * src/print.c (print): Work unconditionally.
18698 * src/print_graph.c (print_graph): Work unconditionally.
18699 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18700
18701 2001-12-16 Marc Autret <autret_m@epita.fr>
18702
18703 * src/output.c (actions_output): Fix. When we use %no-lines,
18704 there is one less line per action.
18705
18706 2001-12-16 Marc Autret <autret_m@epita.fr>
18707
18708 * src/bison.simple: Remove a useless #line directive.
18709 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18710 * src/output.c (get_lines_number): New.
18711 (output_parser): Adjust, now takes care about the lines of a
18712 output muscles.
18713 Fix line numbering.
18714 (actions_output): Computes the number of lines taken by actions.
18715 (output_master_parser): Insert new skeleton which is the name of
18716 the output parser file name.
18717
18718 2001-12-15 Marc Autret <autret_m@epita.fr>
18719
18720 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18721
18722 2001-12-15 Marc Autret <autret_m@epita.fr>
18723
18724 * src/output.c (output_gram): Keep track of the hairy one.
18725
18726 2001-12-15 Akim Demaille <akim@epita.fr>
18727
18728 Make `make distcheck' work.
18729
18730 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18731 system.h which uses libgettext.h.
18732
18733 2001-12-15 Akim Demaille <akim@epita.fr>
18734
18735 * src/nullable.c (set_nullable): Useless rules must be skipped,
18736 otherwise, since we range over their symbols, we might look at a
18737 nonterminal which no longer ``exists'', i.e., it is not counted in
18738 `nvars', hence we overflow our arrays.
18739
18740 2001-12-15 Akim Demaille <akim@epita.fr>
18741
18742 The header can also be produced directly, without any obstack!
18743 Yahoo!
18744
18745 * src/files.c, src/files.h (defines_obstack): Remove.
18746 (compute_header_macro): Global.
18747 (defines_obstack_save): Remove.
18748 * src/reader.c (parse_union_decl): No longer output to
18749 defines_obstack: its content can be found in the `stype' muscle
18750 anyway.
18751 (output_token_translations): Merge into...
18752 (symbols_output): this.
18753 Rename as...
18754 (symbols_save): this.
18755 (reader): Adjust.
18756 * src/output.c (header_output): New.
18757 (output): Call it.
18758
18759 2001-12-15 Akim Demaille <akim@epita.fr>
18760
18761 * src/reader.c (parse_union_decl): Instead of handling two obstack
18762 simultaneously, use one to define the `stype' muscle, and use the
18763 value of the latter to fill defines_obstack.
18764 (copy_comment): Remove.
18765 (copy_comment2): Work for a single obstack.
18766 Rename as...
18767 (copy_comment): this.
18768
18769 2001-12-15 Akim Demaille <akim@epita.fr>
18770
18771 * src/lex.c, src/lex.h (xgetc): No longer static.
18772 * src/reader.c (parse_union_decl): Revamp.
18773
18774 2001-12-15 Akim Demaille <akim@epita.fr>
18775
18776 Still making progress in separating Bison into (i) input, (ii)
18777 process, (iii) output: now we can directly output the parser file
18778 without using table_obstack at all.
18779
18780 * src/files.c, src/files.h (table_obstack): Bye bye.
18781 (parser_file_name): New.
18782 * src/files.c (compute_output_file_names): Compute it.
18783 * src/output.c (actions_output, output_parser)
18784 (output_master_parser): To a file instead of an obstack.
18785
18786 2001-12-15 Akim Demaille <akim@epita.fr>
18787
18788 Attach actions to rules, instead of pre-outputting them to
18789 actions_obstack.
18790
18791 * src/gram.h (rule_t): action and action_line are new members.
18792 * src/reader.c (symbol_list): Likewise.
18793 (copy_action): Save the actions within the rule.
18794 (packgram): Save them in rule_table.
18795 * src/output.c (actions_output): New.
18796 (output_parser): Use it on `%%actions'.
18797 (output_rule_data): Don't free rule_table.
18798 (output): Do it.
18799 (prepare): Don't save the `action' muscle.
18800 * src/bison.simple: s/%%action/%%actions/.
18801
18802 2001-12-15 Akim Demaille <akim@epita.fr>
18803
18804 * src/reader.c (copy_action): When --yacc, don't append a `;'
18805 to the user action: let it fail if lacking.
18806 Suggested by Arnold Robbins and Tom Tromey.
18807
18808 2001-12-14 Akim Demaille <akim@epita.fr>
18809
18810 * src/lex.c (literalchar): Simply return the char you decoded, non
18811 longer mess around with obstacks and int pointers.
18812 Adjust all callers.
18813
18814 2001-12-14 Akim Demaille <akim@epita.fr>
18815
18816 * src/lex.c (literalchar): Don't escape the special characters,
18817 just decode them, and keep them as char (before, eol was output as
18818 the 2 char string `\n' etc.).
18819 * src/output.c (output_rule_data): Use quotearg to output the
18820 token strings.
18821
18822 2001-12-13 Paul Eggert <eggert@twinsun.com>
18823
18824 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18825 Do not infringe on the global user namespace when using C++.
18826 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18827 All uses of `fprintf' and `stderr' changed.
18828
18829 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18830
18831 2001-12-13 Akim Demaille <akim@epita.fr>
18832
18833 The computation of nullable is broken: it doesn't handle empty
18834 RHS's properly.
18835
18836 * tests/torture.at (GNU AWK Grammar): New.
18837 * tests/sets.at (Nullable): New.
18838 * src/nullable.c (set_nullable): Instead of blindly looping over
18839 `ritems', loop over the rules, and then over their rhs's.
18840
18841 Work around Autotest bugs.
18842
18843 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18844 frame, because Autotest understand lines starting with a `+' as
18845 traces from the shell. Then, they are not processed properly.
18846 Admittedly an Autotest bug, but we don't have time to wait for
18847 Autotest to catch up.
18848 * tests/regression.at (Broken Closure): Adjust to the new table
18849 frames.
18850 Move to...
18851 * tests/sets.at: here.
18852
18853 2001-12-13 Akim Demaille <akim@epita.fr>
18854
18855 * src/closure.c (closure): Use nrules instead of playing tricks
18856 with BITS_PER_WORD.
18857
18858 2001-12-13 Akim Demaille <akim@epita.fr>
18859
18860 * src/print.c (print_actions): Output the handling of `$' as the
18861 traces do: shifting the token EOF. Before EOF was treated as a
18862 nonterminal.
18863 * tests/regression.at: Adjust some tests.
18864 * src/print_graph.c (print_core): Complete the set of items via
18865 closure. The next-to-final and final states are still unsatisfying,
18866 but that's to be addressed elsewhere.
18867 No longer output the rule numbers, but do output the state number.
18868 A single loop for the shifts + gotos is enough, but picked a
18869 distinct color for each.
18870 (print_graph): Initialize and finalize closure.
18871
18872 2001-12-13 Akim Demaille <akim@epita.fr>
18873
18874 * src/reader.c (readgram): Remove dead code, an strip useless
18875 braces.
18876 (get_type): Remove, unused.
18877
18878 2001-12-12 Akim Demaille <akim@epita.fr>
18879
18880 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18881 on that of lib/error.c.
18882
18883 2001-12-12 Akim Demaille <akim@epita.fr>
18884
18885 Some hosts don't like `/' in includes.
18886
18887 * src/system.h: Include libgettext.h without qualifying the path.
18888 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18889 $(top_srcdir).
18890
18891 2001-12-11 Marc Autret <autret_m@epita.fr>
18892
18893 * src/output.c (output_parser): Remove useless muscle.
18894
18895 2001-12-11 Marc Autret <autret_m@epita.fr>
18896
18897 * src/bison.simple: Remove #line just before %%epilogue. It
18898 is now handled in ...
18899 * src/reader.c (read_additionnal_code): Add the output of a
18900 #line for the epilogue.
18901
18902 2001-12-10 Marc Autret <autret_m@epita.fr>
18903
18904 * src/reader.c (copy_definition): Re-use CPP-outed code which
18905 replace precedent remove.
18906 * src/bison.simple: Remove #line before %%prologue because
18907 %%input-line is wrong at this time.
18908
18909 2001-12-10 Marc Autret <autret_m@epita.fr>
18910
18911 * src/reader.c (symbols_output): Clean up.
18912 * src/output.c (output_gram, output): Clean up.
18913
18914 2001-12-10 Akim Demaille <akim@epita.fr>
18915
18916 * src/lalr.c (initialize_lookaheads): New. Extracted from...
18917 * src/LR0.c (set_state_table): here.
18918 * src/lalr.c (lalr): Call it.
18919
18920 2001-12-10 Akim Demaille <akim@epita.fr>
18921
18922 * src/state.h (shifts): Remove the `number' member: shifts are
18923 attached to state, hence no longer need to be labelled with a
18924 state number.
18925
18926 2001-12-10 Akim Demaille <akim@epita.fr>
18927
18928 Now that states have a complete set of members, the linked list of
18929 shifts is useless: just fill directly the state's shifts member.
18930
18931 * src/state.h (shifts): Remove the `next' member.
18932 * src/LR0.c (first_state, last_state): Remove.
18933 Adjust the callers.
18934 (augment_automaton): Don't look for the shifts that must be added
18935 a shift on EOF: it is those of the state we looked for! But now,
18936 since shifts are attached, it is no longer needed to looking
18937 merely by its id: its number.
18938
18939 2001-12-10 Akim Demaille <akim@epita.fr>
18940
18941 * src/LR0.c (augment_automaton): Better variable locality.
18942 Remove an impossible branch: if there is a state corresponding to
18943 the start symbol being shifted, then there is shift for the start
18944 symbol from the initial state.
18945
18946 2001-12-10 Akim Demaille <akim@epita.fr>
18947
18948 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
18949 only when appropriate: when insert_start_shifting_state' is not
18950 invoked.
18951 * tests/regression.at (Rule Line Numbers): Adjust.
18952
18953 2001-12-10 Akim Demaille <akim@epita.fr>
18954
18955 * src/LR0.c (augment_automaton): Now that all states have shifts,
18956 merge the two cases addition shifts to the initial state.
18957
18958 2001-12-10 Akim Demaille <akim@epita.fr>
18959
18960 * src/lalr.c (set_state_table): Move to...
18961 * src/LR0.c: here.
18962 * src/lalr.c (lalr): Don't call it...
18963 * src/LR0.c (generate_states): do it.
18964 * src/LR0.h (first_state): Remove, only the table is used.
18965
18966 2001-12-10 Akim Demaille <akim@epita.fr>
18967
18968 * src/LR0.h (first_shift, first_reduction): Remove.
18969 * src/lalr.c: Don't use first_shift: find shifts through the
18970 states.
18971
18972 2001-12-10 Akim Demaille <akim@epita.fr>
18973
18974 * src/LR0.c: Attach shifts to states as soon as they are
18975 computed.
18976 * src/lalr.c (set_state_table): Instead of assigning shifts to
18977 state, just assert that the mapping was properly done.
18978
18979 2001-12-10 Akim Demaille <akim@epita.fr>
18980
18981 * src/LR0.c (insert_start_shift): Rename as...
18982 (insert_start_shifting_state): this.
18983 (insert_eof_shifting_state, insert_accepting_state): New.
18984 (augment_automaton): Adjust.
18985 Better locality of the variables.
18986 When looking if the start_symbol is shifted from the initial
18987 state, using `while (... symbol != start_symbol ...)' sounds
18988 better than `while (... symbol < start_symbol ...)': If fail
18989 to see how the order between symbols could be relevant!
18990
18991 2001-12-10 Akim Demaille <akim@epita.fr>
18992
18993 * src/getargs.h: Don't declare `spec_name_prefix' and
18994 `spec_file_prefix', declared by src/files.h.
18995 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
18996 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
18997 * src/output.c (prepare): Adjust.
18998 * src/reader.c (symbols_output): Likewise.
18999 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19000
19001 2001-12-10 Akim Demaille <akim@epita.fr>
19002
19003 * src/muscle_tab.c (muscle_init): NULL is a better default than
19004 `"0"'.
19005
19006 2001-12-10 Akim Demaille <akim@epita.fr>
19007
19008 * src/reader.c (reader): Calling symbols_output once is enough.
19009
19010 2001-12-10 Akim Demaille <akim@epita.fr>
19011
19012 Now that states have a complete set of members, the linked list of
19013 reductions is useless: just fill directly the state's reductions
19014 member.
19015
19016 * src/state.h (struct reductions): Remove member `number' and
19017 `next'.
19018 * src/LR0.c (first_reduction, last_reduction): Remove.
19019 (save_reductions): Don't link the new reductions, store them in
19020 this_state.
19021 * src/lalr.c (set_state_table): No need to attach reductions to
19022 states, it's already done.
19023 * src/output.c (output_actions): No longer free the shifts, then
19024 the reductions, then the states: free all the states and their
19025 members.
19026
19027 2001-12-10 Akim Demaille <akim@epita.fr>
19028
19029 * src/options.c (OPTN, DRTV, BOTH): New.
19030 (option_table): Use them.
19031
19032 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19033 the job of system.h.
19034 * src/options.c: Don't include stdio.h and xalloc.h for the same
19035 reasons.
19036
19037 2001-12-10 Akim Demaille <akim@epita.fr>
19038
19039 * src/output.c (output, prepare): Make sure the values of the
19040 muscles `action' and `prologue' are 0-terminated.
19041
19042 2001-12-10 Akim Demaille <akim@epita.fr>
19043
19044 Clean up GCC warnings.
19045
19046 * src/reader.c (copy_action): `buf' is not used.
19047 (parse_skel_decl): Be static.
19048 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19049 * src/options.h (create_long_option_table): Have a real prototype.
19050 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19051 (hash_delete_at): Return const void *.
19052 Adjust casts to preserve the const.
19053
19054 2001-12-10 Akim Demaille <akim@epita.fr>
19055
19056 * configure.in: Require 2.52g.
19057 M4 is not needed, but AUTOM4TE is.
19058 * m4/m4.m4: Remove.
19059 * tests/Makefile.am: Adjust.
19060
19061 2001-12-10 Akim Demaille <akim@epita.fr>
19062
19063 One structure for states is enough, even though theoretically
19064 there are LR(0) states and LALR(1) states.
19065
19066 * src/lalr.h (state_t): Remove.
19067 (state_table): Be state_t **, not state_t *.
19068 * src/state.h (core, CORE_ALLOC): Rename as...
19069 (state_t, STATE_ALLOC): this.
19070 Add the LALR(1) members: shifts, reductions, errs.
19071 * src/LR0.c (state_table): Rename as...
19072 (state_hash): this, to avoid name clashes with the global
19073 `state_table'.
19074 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19075 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19076
19077 2001-12-10 Akim Demaille <akim@epita.fr>
19078
19079 Bison dumps core on bash.y.
19080 Reported by Pascal Bart.
19081
19082 * src/warshall.c (bitmatrix_print): New.
19083 (TC): Use it.
19084 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19085 j must be the outer loop.
19086 * tests/regression.at (Broken Closure): New.
19087
19088 2001-12-05 Akim Demaille <akim@epita.fr>
19089
19090 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19091 its argument.
19092 Reported by Peter Hamorsky.
19093
19094 2001-12-05 Akim Demaille <akim@epita.fr>
19095
19096 * src/conflicts.c (err_table): Remove.
19097 (resolve_sr_conflict): Adjust.
19098 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19099 Rename as...
19100 (state_t.reductions, state_t.shifts): this.
19101
19102 2001-12-05 Akim Demaille <akim@epita.fr>
19103
19104 * src/reduce.c (reduce_grammar_tables): No longer disable the
19105 removal of useless rules via CPP but via `if (0)', so that the
19106 compiler still check the code is valid.
19107 For instance, it should have noticed `rline' no longer exists: use
19108 the `line' member of rule_t.
19109 * src/gram.c (dummy, rline): Remove, unused.
19110
19111 2001-12-05 Akim Demaille <akim@epita.fr>
19112
19113 * src/output.c (pack_vector): Use assert, not berror.
19114 * src/main.c (berror): Remove, unused.
19115
19116 2001-12-05 Akim Demaille <akim@epita.fr>
19117
19118 New experimental feature: if --verbose --trace output all the
19119 items of a state, not only its kernel.
19120
19121 * src/print.c (print_core): If `trace_flag', then invoke closure
19122 before outputting the items of the state (print_core is no longer
19123 a correct name them).
19124 (print_results): Invoke new_closure/free_closure if needed.
19125
19126 2001-12-05 Akim Demaille <akim@epita.fr>
19127
19128 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19129 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19130 (nitemset): for consistency with the rest of the project.
19131
19132 2001-12-05 Akim Demaille <akim@epita.fr>
19133
19134 * src/closure.c (print_closure): Improve.
19135 (closure): Use it for printing input and output.
19136
19137 2001-12-05 Akim Demaille <akim@epita.fr>
19138
19139 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19140 indexed by nonterminals.
19141
19142 2001-12-05 Akim Demaille <akim@epita.fr>
19143
19144 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19145 what it was!).
19146 * src/warshall.h: Remove accidental duplication of the content.
19147
19148 2001-12-05 Akim Demaille <akim@epita.fr>
19149
19150 * src/closure.c (set_fderives): De-obfuscate.
19151
19152 2001-12-05 Akim Demaille <akim@epita.fr>
19153
19154 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19155
19156 2001-12-05 Akim Demaille <akim@epita.fr>
19157
19158 * src/closure.c (set_firsts): De-obfuscate.
19159
19160 2001-12-05 Akim Demaille <akim@epita.fr>
19161
19162 * src/output.c (action_row): De-obfuscate
19163 using the good o' techniques: arrays not pointers, variable
19164 locality, BITISSET, RESETBIT etc.
19165
19166 2001-12-05 Akim Demaille <akim@epita.fr>
19167
19168 Pessimize the code to simplify it: from now on, all the states
19169 have a valid SHIFTS, which NSHIFTS is possibly 0.
19170
19171 * src/LR0.c (shifts_new): Be global and move to..
19172 * src/state.c, src/state.h: here.
19173 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19174 * src/print_graph: Adjust.
19175
19176 2001-12-05 Akim Demaille <akim@epita.fr>
19177
19178 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19179 * src/conflicts.c: Use it.
19180 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19181 incorrectly ``simplified''.
19182
19183 2001-12-05 Akim Demaille <akim@epita.fr>
19184
19185 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19186 using the good o' techniques: arrays not pointers, variable
19187 locality, BITISSET, RESETBIT etc.
19188
19189 2001-12-05 Akim Demaille <akim@epita.fr>
19190
19191 * src/state.h (SHIFT_SYMBOL): New.
19192 * src/conflicts.c: Use it to deobfuscate.
19193
19194 2001-12-05 Akim Demaille <akim@epita.fr>
19195
19196 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19197 (print_reductions): De-obfuscate using the good o' techniques:
19198 arrays not pointers, variable locality, BITISSET.
19199
19200 2001-12-05 Akim Demaille <akim@epita.fr>
19201
19202 * src/conflicts.c (print_reductions): Arrays, not pointers.
19203 Use BITISSET.
19204
19205 2001-12-05 Akim Demaille <akim@epita.fr>
19206
19207 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19208
19209 2001-12-05 Akim Demaille <akim@epita.fr>
19210
19211 * src/conflicts.c (print_reductions): Improve variable locality.
19212
19213 2001-12-05 Akim Demaille <akim@epita.fr>
19214
19215 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19216
19217 2001-12-05 Akim Demaille <akim@epita.fr>
19218
19219 * src/conflicts.c (print_reductions): Improve variable locality.
19220
19221 2001-12-05 Akim Demaille <akim@epita.fr>
19222
19223 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19224 * src/lalr.c: Use them.
19225
19226 2001-12-05 Akim Demaille <akim@epita.fr>
19227
19228 * src/LR0.c (augment_automaton): Formatting changes.
19229 Better variable locality.
19230
19231 2001-12-05 Akim Demaille <akim@epita.fr>
19232
19233 * src/lalr.c (matrix_print): New.
19234 (transpose): Use it.
19235 Use arrays instead of pointers.
19236
19237 2001-12-05 Akim Demaille <akim@epita.fr>
19238
19239 * src/lalr.c (maxrhs): Move to...
19240 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19241 * src/lalr.c (build_relations): Adjust.
19242
19243 2001-12-05 Akim Demaille <akim@epita.fr>
19244
19245 * src/lalr.c (transpose): Free the memory allocated to the
19246 argument, as it is replaced by the results by the unique caller.
19247 (build_relations): Merely invoke transpose: it handles the memory
19248 deallocation.
19249 Improve variable locality.
19250 Avoid variables used as mere abbreviations.
19251 (compute_lookaheads): Use arrays instead of pointers.
19252
19253 2001-12-05 Akim Demaille <akim@epita.fr>
19254
19255 * src/lalr.c (initialize_F): Improve variable locality.
19256 Avoid variables used as mere abbreviations.
19257
19258 2001-12-05 Akim Demaille <akim@epita.fr>
19259
19260 * src/derives.c (print_derives): Display the ruleno.
19261 * src/lalr.c (initialize_F, transpose): Better variable locality
19262 to improve readability.
19263 Avoid variables used as mere abbreviations.
19264
19265 2001-12-05 Akim Demaille <akim@epita.fr>
19266
19267 * src/lalr.c (traverse): Use arrays instead of pointers.
19268
19269 2001-12-05 Akim Demaille <akim@epita.fr>
19270
19271 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19272 the handling of squeue.
19273 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19274
19275 2001-12-05 Akim Demaille <akim@epita.fr>
19276
19277 Because useless nonterminals are now kept alive (instead of being
19278 `destroyed'), we now sometimes examine them, and store information
19279 related to them. Hence we need to know their number, and adjust
19280 memory allocations.
19281
19282 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19283 static.
19284 * src/LR0.c (allocate_itemsets): The memory allocated to
19285 `symbol_count' was used for two different purpose: once to count
19286 the number of occurrences of each symbol, and later reassigned to
19287 `shift_symbol', containing the symbol that can be shifted from a
19288 given state.
19289 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19290 only, and...
19291 (new_itemsets): Allocate `shift_symbol' here.
19292 (allocate_itemsets): symbol_count includes useless nonterminals.
19293 Make room for them.
19294 (free_storage): Use `free', not `XFREE', for pointers that cannot
19295 be null.
19296
19297 2001-12-05 Akim Demaille <akim@epita.fr>
19298
19299 * src/nullable.c (set_nullable): Deobfuscate the handling of
19300 ritem.
19301 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19302
19303 2001-12-05 Akim Demaille <akim@epita.fr>
19304
19305 * src/gram.c, src/gram.h (ritem_print): New.
19306 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19307 (This useless function was defined only to work around VMS linkers
19308 that can't handle compilation units with variables only).
19309 * src/reduce.c (dump_grammar): Use it to trace the construction of
19310 ritem.
19311
19312 2001-12-04 Paul Eggert <eggert@twinsun.com>
19313
19314 * src/bison.simple (union yyalloc): Change member names
19315 to be the same as the stack names.
19316 (yyparse): yyptr is now union yyalloc *, not char *.
19317 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19318 and may generate better code on some machines.
19319 (yystpcpy): Use prototype if __STDC__ is defined, not just
19320 if __cplusplus is defined.
19321
19322 2001-11-30 Akim Demaille <akim@epita.fr>
19323
19324 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19325 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19326 Gettext doesn't compile cleanly, and dies with -Werror.
19327 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19328 Include WARNING_CFLAGS here.
19329 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19330 before being defined.
19331
19332 2001-11-27 Paul Eggert <eggert@twinsun.com>
19333
19334 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19335 First arg is int, not unsigned.
19336 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19337 (SIZE_MAX, UINT_MAX): New macros.
19338 (quotearg_n_options): Abort if N is negative.
19339 Avoid overflow check on hosts where size_t is 64 bits and int
19340 is 32 bits, as overflow is impossible there.
19341 Fix off-by-one typo that caused unnecessary reallocation.
19342
19343 2001-11-29 Paul Eggert <eggert@twinsun.com>
19344
19345 Name space cleanup in generated parser.
19346
19347 * doc/bison.texinfo (Bison Parser): Discuss system headers
19348 and their effect on the user name space.
19349
19350 * src/bison.simple:
19351 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19352 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19353 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19354
19355 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19356 on user names when possible.
19357
19358 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19359 Simplify test for whather <alloca.h> exists.
19360
19361 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19362
19363 (<stdio.h>): Include if YYDEBUG.
19364
19365 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19366 ! defined (yyoverflow) && ! defined (yymemcpy).
19367
19368 (yymemcpy, yyparse): Rename local variables as needed so that
19369 they all begin with 'yy'.
19370
19371 (yystrlen, yystpcpy): New functions.
19372
19373 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19374 All uses changed.
19375
19376 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19377 instead of relying on string.h functions. Use YYSTACK_ALLOC
19378 and YYSTACK_FREE instead of malloc and free.
19379
19380 2001-11-30 Akim Demaille <akim@epita.fr>
19381
19382 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19383 before their first uses.
19384 (YYBISON, YYPURE): Move to the top of the output.
19385
19386 2001-11-30 Akim Demaille <akim@epita.fr>
19387
19388 * tests/reduce.at (Useless Nonterminals): Fix.
19389
19390 2001-11-30 Akim Demaille <akim@epita.fr>
19391
19392 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19393 if body instead of `;' to pacify GCC's warnings.
19394
19395 2001-11-30 Akim Demaille <akim@epita.fr>
19396
19397 Instead of mapping the LHS of unused rules to -1, keep the LHS
19398 valid, but flag the rules as invalid.
19399
19400 * src/gram.h (rule_t): `useful' is a new member.
19401 * src/print.c (print_grammar): Adjust.
19402 * src/derives.c (set_derives): Likewise.
19403 * src/reader.c (packgram, reduce_output): Likewise.
19404 * src/reduce.c (reduce_grammar_tables): Likewise.
19405 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19406
19407 2001-11-30 Akim Demaille <akim@epita.fr>
19408
19409 * src/reduce.c (reduce_output): Formatting changes.
19410 * src/print.c (print_results, print_grammar): Likewise.
19411 * tests/regression.at (Rule Line Numbers)
19412 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19413
19414 2001-11-30 Akim Demaille <akim@epita.fr>
19415
19416 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19417 useless nonterminals, move them at the end of the symbol arrays.
19418 (reduce_output): Adjust.
19419 * tests/reduce.at (Useless Nonterminals): Adjust.
19420
19421 2001-11-30 Akim Demaille <akim@epita.fr>
19422
19423 * src/reduce.c: Various comment/formatting changes.
19424 (nonterminals_reduce): New, extracted from...
19425 (reduce_grammar_tables): here.
19426 (reduce_grammar): Call nonterminals_reduce.
19427
19428 2001-11-29 Paul Eggert <eggert@twinsun.com>
19429
19430 * src/bison.simple (YYSTACK_REALLOC): Remove.
19431 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19432 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19433 New macros.
19434 (union yyalloc): New type.
19435 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19436 an arbitrary restriction on hosts where size_t is wider than int.
19437
19438 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19439 a parser stack overflow. Allocate just one block of memory for all
19440 three stacks, instead of allocating three blocks; this typically is
19441 faster and reduces fragmentation.
19442
19443 Do not limit the number of items in the stack to a value that fits
19444 in 'int', as this is an arbitrary limit on hosts with 64-bit
19445 size_t and 32-bit int.
19446
19447 2001-11-29 Marc Autret <autret_m@epita.fr>
19448
19449 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19450 of defining YYERROR_VERBOSE.
19451 [AT_DATA]: $4 is now out of C declarations in the prologue.
19452
19453 2001-11-28 Marc Autret <autret_m@epita.fr>
19454
19455 * src/reader.c (parse_dquoted_param): New.
19456 (parse_skel_decl): Use it.
19457 * src/lex.h: Add its prototype.
19458 * src/lex.c (literalchar): Become not static.
19459
19460 2001-11-28 Marc Autret <autret_m@epita.fr>
19461
19462 * src/output.h: And put its extern declaration here.
19463 * src/output.c (error_verbose): Define here.
19464 (prepare): Echo name modification.
19465 * src/getargs.h: Clean its extern declaration.
19466 * src/getargs.c (error_verbose_flag): Remove.
19467 (getargs): Remove case 'e'.
19468 * src/options.c (option_table): 'error-verbose' is now seen as simple
19469 percent option.
19470 Include output.h.
19471
19472 * src/reader.c (read_declarations): Remove case tok_include.
19473 (parse_include_decl): Remove.
19474 * src/lex.h (token_t): Remove tok_include.
19475 * src/options.c (option_table): 'include' is now a simple command line
19476 option.
19477
19478 2001-11-28 Marc Autret <autret_m@epita.fr>
19479
19480 * src/bison.simple: Adjust muscle names.
19481 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19482 * src/output.c (prepare): s/_/-/ for the muscles names.
19483 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19484
19485 2001-11-28 Marc Autret <autret_m@epita.fr>
19486
19487 * src/bison.simple: Fix debug.
19488 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19489
19490 2001-11-28 Akim Demaille <akim@epita.fr>
19491
19492 * src/LR0.c (shifts_new): New.
19493 (save_shifts, insert_start_shift, augment_automaton): Use it.
19494
19495 2001-11-28 Akim Demaille <akim@epita.fr>
19496
19497 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19498 keep ruleno only.
19499
19500 2001-11-28 Akim Demaille <akim@epita.fr>
19501
19502 * src/closure.c (closure): Instead of looping over word in array
19503 then bits in words, loop over bits in array.
19504
19505 2001-11-28 Akim Demaille <akim@epita.fr>
19506
19507 * src/closure.c (closure): No longer optimize the special case
19508 where all the bits of `ruleset[r]' are set to 0, to make the code
19509 clearer.
19510
19511 2001-11-28 Akim Demaille <akim@epita.fr>
19512
19513 * src/closure.c (closure): `r' and `c' are new variables, used to
19514 de-obfuscate accesses to RULESET and CORE.
19515
19516 2001-11-28 Akim Demaille <akim@epita.fr>
19517
19518 * src/reduce.c (reduce_print): Use ngettext.
19519 (dump_grammar): Improve the trace accuracy.
19520
19521 2001-11-28 Akim Demaille <akim@epita.fr>
19522
19523 * src/reduce.c (dump_grammar): Don't translate trace messages.
19524
19525 2001-11-28 Akim Demaille <akim@epita.fr>
19526
19527 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19528 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19529 as all tags are free'ed afterwards.
19530 From Enrico Scholz.
19531
19532 2001-11-27 Paul Eggert <eggert@twinsun.com>
19533
19534 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19535 use alloca when we didn't want to, and vice versa.
19536
19537 2001-11-27 Marc Autret <autret_m@epita.fr>
19538
19539 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19540 initialization.
19541 * src/output.c (prepare): Remove its update.
19542
19543 2001-11-27 Marc Autret <autret_m@epita.fr>
19544
19545 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19546 Use %error-verbose.
19547
19548 2001-11-27 Marc Autret <autret_m@epita.fr>
19549
19550 * src/bison.simple: Remove YYERROR_VERBOSE using.
19551 Use %%error_verbose.
19552 (yyparse): Likewise.
19553 * src/output.c (prepare): Give its final value.
19554 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19555 * src/getargs.h: Add its extern declaration.
19556 * src/getargs.c (error_verbose_flag): New int.
19557 (getargs): Update to catch new case.
19558 * src/options.c (option_table): 'error-verbose' is a new option.
19559 (shortopts): Update.
19560
19561 2001-11-27 Akim Demaille <akim@epita.fr>
19562
19563 * src/system.h: Use intl/libgettext.h.
19564 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19565
19566 2001-11-27 Akim Demaille <akim@epita.fr>
19567
19568 * tests/torture.at (Exploding the Stack Size with Malloc):
19569 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19570
19571 2001-11-27 Akim Demaille <akim@epita.fr>
19572
19573 * src/files.c: Include error.h.
19574 Reported by Hans Aberg.
19575
19576 2001-11-26 Marc Autret <autret_m@epita.fr>
19577
19578 * src/reader.c (parse_include_decl): New, not yet implemented.
19579 (read_declarations): Add case tok_include.
19580 * src/getargs.h (include): Add its extern definition.
19581 * src/getargs.c (include): New const char *.
19582 (getargs): Add case '-I'.
19583 * src/options.c (option_table): Add include as command line and
19584 percent option.
19585 * src/lex.h (token_t): Add tok_include.
19586
19587 2001-11-26 Akim Demaille <akim@epita.fr>
19588
19589 * src/reader.c (readgram): Make sure rules for mid-rule actions
19590 have a lineno equal to that of their host rule.
19591 Reported by Hans Aberg.
19592 * tests/regression.at (Rule Line Numbers): New.
19593
19594 2001-11-26 Akim Demaille <akim@epita.fr>
19595
19596 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19597 size_ts.
19598
19599 2001-11-26 Akim Demaille <akim@epita.fr>
19600
19601 * src/complain.c, src/complain.h (error): Remove, provided by
19602 lib/error.[ch].
19603
19604 2001-11-26 Akim Demaille <akim@epita.fr>
19605
19606 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19607 issue an error message.
19608 * tests/regression.at (Invalid %directive): New.
19609 Reported by Hans Aberg.
19610
19611 2001-11-26 Akim Demaille <akim@epita.fr>
19612
19613 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19614 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19615
19616 2001-11-26 Akim Demaille <akim@epita.fr>
19617
19618 * src/conflicts.c (conflicts_print): Don't complain at all when
19619 there are no reduce/reduce conflicts, and as many shift/reduce
19620 conflicts as expected.
19621 * tests/regression.at (%expect right): Adjust.
19622
19623 2001-11-23 Akim Demaille <akim@epita.fr>
19624
19625 * lib/alloca.c: Update, from fileutils.
19626
19627 2001-11-23 Akim Demaille <akim@epita.fr>
19628
19629 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19630
19631 2001-11-23 Akim Demaille <akim@epita.fr>
19632
19633 * src/system.h: Include alloca.h.
19634 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19635
19636 2001-11-23 Akim Demaille <akim@epita.fr>
19637
19638 * src/print_graph.c (print_actions): Remove `rule', unused.
19639 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19640 pacify GCC's signed < unsigned warnings.
19641 * src/closure.c (itemsetsize): Likewise.
19642 * src/reader.c (symbol_list_new): Static.
19643
19644 2001-11-23 Akim Demaille <akim@epita.fr>
19645
19646 Attaching lineno to buckets is stupid, since only one copy of each
19647 symbol is kept, only the line of the first occurrence is kept too.
19648
19649 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19650 * src/reader.c (rline_allocated): Remove, unused.
19651 (symbol_list): Have a `line' member.
19652 (symbol_list_new): New.
19653 (readgram): Use it.
19654 * src/print.c (print_grammar): Output the rule line numbers.
19655 * tests/regression.at (Solved SR Conflicts)
19656 (Unresolved SR Conflicts): Adjust.
19657 Reported by Hans Aberg.
19658
19659 2001-11-22 Marc Autret <autret_m@epita.fr>
19660
19661 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19662
19663 2001-11-22 Marc Autret <autret_m@epita.fr>
19664
19665 * src/muscle_tab.c (muscle_init): Remove initialization of
19666 skeleton muscle.
19667 * src/output.c (output_master_parser): Do it here.
19668
19669 2001-11-20 Akim Demaille <akim@epita.fr>
19670
19671 * po/sv.po: New.
19672 * configure.in (ALL_LINGUAS): Adjust.
19673 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19674 longer contains strings to translate.
19675
19676 2001-11-19 Akim Demaille <akim@epita.fr>
19677
19678 * src/conflicts.c (conflicts_print): Add a missing \n.
19679
19680 2001-11-19 Akim Demaille <akim@epita.fr>
19681
19682 * src/nullable.c (nullable_print): New.
19683 (set_nullable): Call it when tracing.
19684 Better locality of variables.
19685
19686 2001-11-19 Akim Demaille <akim@epita.fr>
19687
19688 * src/print.c (print_actions): Better locality of variables.
19689
19690 2001-11-19 Akim Demaille <akim@epita.fr>
19691
19692 * src/derives.c (print_derives): Fix and enrich.
19693 * src/closure.c (print_fderives): Likewise.
19694
19695 2001-11-19 Akim Demaille <akim@epita.fr>
19696
19697 * src/closure.c (itemsetend): Remove, replaced with...
19698 (itemsetsize): new.
19699
19700 2001-11-19 Akim Demaille <akim@epita.fr>
19701
19702 * src/LR0.c (kernel_end): Remove, replaced with...
19703 (kernel_size): new.
19704
19705 2001-11-19 Akim Demaille <akim@epita.fr>
19706
19707 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19708 to clarify.
19709
19710 2001-11-19 Akim Demaille <akim@epita.fr>
19711
19712 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19713
19714 2001-11-19 Akim Demaille <akim@epita.fr>
19715
19716 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19717 trace messages.
19718 * src/LR0.c: Likewise.
19719 (allocate_itemsets): Use arrays instead of pointers to clarify.
19720
19721 2001-11-19 Akim Demaille <akim@epita.fr>
19722
19723 * src/getargs.c (statistics_flag): Replace with...
19724 (trace_flag): New.
19725 (longopts): Accept --trace instead of --statistics.
19726 * src/getargs.h, src/options.c: Adjust.
19727 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19728 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19729
19730 2001-11-19 Akim Demaille <akim@epita.fr>
19731
19732 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
19733 pointers to clarify the code.
19734 (save_reductions, save_shifts): Factor common parts of alternatives.
19735
19736 2001-11-19 Akim Demaille <akim@epita.fr>
19737
19738 * src/LR0.c (new_state, get_state): Complete TRACE code.
19739 * src/closure.c: Include `reader.h' to get `tags', needed by the
19740 trace code.
19741 Rename the conditional DEBUG as TRACE.
19742 Output consistently TRACEs to stderr, not stdout.
19743 * src/derives.c: Likewise.
19744 * src/reduce.c: (inaccessable_symbols): Using if is better style
19745 than goto.
19746 Use `#if TRACE' instead of `#if 0' for tracing code.
19747
19748 2001-11-19 Akim Demaille <akim@epita.fr>
19749
19750 * src/system.h (LIST_FREE, shortcpy): New.
19751 * src/LR0.c: Use them.
19752 * src/output.c (free_itemsets, free_reductions, free_shifts):
19753 Remove, replaced by LIST_FREE.
19754
19755 2001-11-19 Akim Demaille <akim@epita.fr>
19756
19757 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19758 (REDUCTIONS_ALLOC): New.
19759 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19760 allocation.
19761
19762 2001-11-19 Akim Demaille <akim@epita.fr>
19763
19764 * src/LR0.c (new_state): Complete trace code.
19765 * src/nullable.c (set_nullable): Don't translate traces.
19766
19767 2001-11-19 Akim Demaille <akim@epita.fr>
19768
19769 * src/print_graph.c (print_core): Better locality of variables.
19770 * src/print.c (print_core): Likewise.
19771
19772 2001-11-19 Akim Demaille <akim@epita.fr>
19773
19774 * src/vcg.c: You do the output, so you are responsible of the
19775 handling of VCG syntax, in particular: use quotearg.
19776 * src/print_graph.c: Don't.
19777 (print_actions): Don't output the actions as part of the nodes,
19778 since that's the job of the edges.
19779 (print_state): Don't output by hand: fill the node description,
19780 and ask for its output.
19781
19782 2001-11-19 Akim Demaille <akim@epita.fr>
19783
19784 * src/bison.simple (yyparse): When verbosely reporting an error,
19785 no longer put additional quotes around token names.
19786 * tests/calc.at: Adjust.
19787
19788 2001-11-19 Akim Demaille <akim@epita.fr>
19789
19790 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19791 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19792 * src/output.c: Adjust.
19793
19794 2001-11-19 Akim Demaille <akim@epita.fr>
19795
19796 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19797 (rule_t): this.
19798 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19799
19800 2001-11-19 Akim Demaille <akim@epita.fr>
19801
19802 * src/gram.h (rule_t): New.
19803 (rule_table): New.
19804 (rrhs, rlhs): Remove, part of state_t.
19805 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19806 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19807 * src/reader.c, src/reduce.c: Adjust.
19808
19809 2001-11-19 Akim Demaille <akim@epita.fr>
19810
19811 * src/reader.c (symbols_output): New, extracted from...
19812 (packsymbols): Here.
19813 (reader): Call it.
19814
19815 2001-11-19 Akim Demaille <akim@epita.fr>
19816
19817 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19818 (maxrhs): this new function.
19819
19820 2001-11-19 Akim Demaille <akim@epita.fr>
19821
19822 * src/lalr.c (F): New macro to access the variable F.
19823 Adjust.
19824
19825 2001-11-19 Akim Demaille <akim@epita.fr>
19826
19827 * src/lalr.h (LA): New macro to access the variable LA.
19828 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19829 * src/lalr.c: Adjust.
19830
19831 2001-11-19 Akim Demaille <akim@epita.fr>
19832
19833 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19834 (set_state_table): handle the `lookaheads' members.
19835
19836 2001-11-19 Akim Demaille <akim@epita.fr>
19837
19838 * src/lalr.h (lookaheads): Removed array, whose contents is now
19839 a member of...
19840 (state_t): this structure.
19841 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19842 Adjust.
19843
19844 2001-11-19 Akim Demaille <akim@epita.fr>
19845
19846 * src/lalr.h (consistent): Removed array, whose contents is now
19847 a member of...
19848 (state_t): this structure.
19849 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19850 Adjust.
19851
19852 2001-11-19 Akim Demaille <akim@epita.fr>
19853
19854 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19855 contents are now members of...
19856 (state_t): this structure.
19857 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19858 Adjust.
19859
19860 2001-11-19 Akim Demaille <akim@epita.fr>
19861
19862 * src/lalr.h (state_t): New.
19863 (state_table): Be a state_t * instead of a core **.
19864 (accessing_symbol): Remove, part of state_t.
19865 * src/lalr.c: Adjust.
19866 (set_accessing_symbol): Merge into...
19867 (set_state_table): this.
19868 * src/print_graph.c, src/conflicts.c: Adjust.
19869
19870 2001-11-14 Akim Demaille <akim@epita.fr>
19871
19872 * tests/calc.at, tests/output.at, tests/regression.at,
19873 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19874 now the tests are run in private dirs, therefore AC_CLEANUP and
19875 family can be simplified to 0-ary.
19876 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19877 use abs. path to find config.h.
19878 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19879 stderr, there can be way too much random noise.
19880 Instead pass -Werror to GCC and rely on the exit status.
19881 Reported by Wolfram Wagner.
19882
19883 2001-11-14 Akim Demaille <akim@epita.fr>
19884
19885 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19886 defined only if yyoverflow is defined, to avoid `warning: unused
19887 variable `yyvs1''.
19888 Reported by The Test Suite.
19889
19890 2001-11-14 Akim Demaille <akim@epita.fr>
19891
19892 * src/print.c: Include reduce.h.
19893 Reported by Hans Aberg.
19894
19895 2001-11-14 Akim Demaille <akim@epita.fr>
19896
19897 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19898 Revert a previous patch: these are really const.
19899 * src/conflicts.c (conflict_report): Additional useless pair of
19900 braces to pacify GCC's warnings for `if () if () {} else {}'.
19901 * src/lex.c (parse_percent_token): Replace equal_offset with
19902 arg_offset.
19903 arg is const.
19904 Be sure to strdup `arg' when used, since there is no reason for
19905 token_buffer not to change.
19906
19907 2001-11-14 Akim Demaille <akim@epita.fr>
19908
19909 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19910 definition.
19911 * src/main.c (main): Use them.
19912 Suggested by Hans Aberg.
19913
19914 2001-11-12 Akim Demaille <akim@epita.fr>
19915
19916 * src/system.h (ngettext): Now that we use ngettext, be sure to
19917 provide a default definition when NLS are not used.
19918
19919 2001-11-12 Akim Demaille <akim@epita.fr>
19920
19921 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
19922 Use @kbd to denote user input.
19923 (Language and Grammar): ANSIfy the example.
19924 Adjust its layout for info/notinfo.
19925 (Location Tracking Calc): Output error messages to stderr.
19926 Output locations in a more GNUtically correct way.
19927 Fix a couple of Englishos.
19928 Adjust @group/@end group pairs.
19929
19930 2001-11-12 Akim Demaille <akim@epita.fr>
19931
19932 %expect was not functioning at all.
19933
19934 * src/conflicts.c (expected_conflicts): Set to -1.
19935 (conflict_report): Use ngettext.
19936 (conflicts_print): Check %expect and make its violation an error.
19937 * doc/bison.texinfo (Expect Decl): Adjust.
19938 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
19939 * tests/regression.at (%expect not enough, %expect right)
19940 (%expect too much): New.
19941
19942 2001-11-12 Akim Demaille <akim@epita.fr>
19943
19944 * tests/regression.at (Conflicts): Rename as...
19945 (Unresolved SR Conflicts): this.
19946 (Solved SR Conflicts): New.
19947
19948 2001-11-12 Akim Demaille <akim@epita.fr>
19949
19950 * src/reduce.c (print_results): Rename as...
19951 (reduce_output): This.
19952 Output to OUT, passed as argument, instead of output_obstack.
19953 (dump_grammar): Likewise.
19954 (reduce_free): New.
19955 Also free V1.
19956 (reduce_grammar): No longer call reduce_output, since...
19957 * src/print.c (print_results): do it.
19958 * src/main.c (main): Call reduce_free;
19959
19960 2001-11-12 Akim Demaille <akim@epita.fr>
19961
19962 * src/conflicts.c (print_reductions): Accept OUT as argument.
19963 Output to it, not to output_obstack.
19964 * src/print.c (print_actions): Adjust.
19965
19966 2001-11-12 Akim Demaille <akim@epita.fr>
19967
19968 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
19969 the result instead of using...
19970 (src_total, rrc_total, src_count, rrc_count): Remove.
19971 (any_conflicts): Remove.
19972 (print_conflicts): Split into...
19973 (conflicts_print, conflicts_output): New.
19974 * src/conflicts.h: Adjust.
19975 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
19976 * src/print.c (print_grammar): Issue `\n' between two rules.
19977 * tests/regression.at (Conflicts): New.
19978 Reported by Tom Lane.
19979
19980 2001-11-12 Akim Demaille <akim@epita.fr>
19981
19982 * tests/regression.at (Invalid input): Remove, duplicate with
19983 ``Invalid input: 1''.
19984
19985 2001-11-12 Akim Demaille <akim@epita.fr>
19986
19987 * tests/torture.at (AT_DATA_STACK_TORTURE)
19988 (Exploding the Stack Size with Alloca)
19989 (Exploding the Stack Size with Malloc): New.
19990
19991 2001-11-12 Akim Demaille <akim@epita.fr>
19992
19993 * src/bison.simple (YYSTACK_REALLOC): New.
19994 (yyparse) [!yyoverflow]: Use it and free the old stack.
19995 Reported by Per Allansson.
19996
19997 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
19998
19999 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20000 define CPP macro, which substitute YYSTYPE by yystype.
20001 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20002 with yyltype/YYLTYPE. This allows inclusion of the generated
20003 header within the parser if the compiler, such as GGC, accepts
20004 multiple equivalent #defines.
20005 From Akim.
20006
20007 2001-11-05 Akim Demaille <akim@epita.fr>
20008
20009 * src/reader.c (symbols_output): New, extracted from...
20010 (packsymbols): here.
20011 (reader): Adjust.
20012
20013 2001-11-05 Akim Demaille <akim@epita.fr>
20014
20015 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20016
20017 2001-11-05 Akim Demaille <akim@epita.fr>
20018
20019 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20020 pattern.
20021
20022 2001-11-05 Akim Demaille <akim@epita.fr>
20023
20024 * src/options.h (struct option_table_struct): set_flags is void*.
20025 * src/options.c (longopts): Support `--output' and `%output'.
20026 (usage): Adjust.
20027 * src/lex.h (tok_setopt): Remove, replaced with...
20028 (tok_intopt, tok_stropt): these new guys.
20029 * src/lex.c (getopt.h): Not needed.
20030 (token_buffer, unlexed_token_buffer): Not const.
20031 (percent_table): Promote `-' over `_' in directive names.
20032 Active `%name-prefix', `file-prefix', and `output'.
20033 (parse_percent_token): Accept possible arguments to directives.
20034 Promote `-' over `_' in directive names.
20035
20036 2001-11-04 Akim Demaille <akim@epita.fr>
20037
20038 * doc/bison.texinfo (Decl Summary): Split the list into
20039 `directives for grammars' and `directives for bison'.
20040 Sort'em.
20041 Add description of `%name-prefix', `file-prefix', and `output'.
20042 Promote `-' over `_' in directive names.
20043 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20044 Simplify the description of `--name-prefix'.
20045 Promote `-' over `_' in directive names.
20046 Promote `--output' over `--output-file'.
20047 Fix the description of `--defines'.
20048 * tests/output.at: Exercise %file-prefix and %output.
20049
20050 2001-11-02 Akim Demaille <akim@epita.fr>
20051
20052 * doc/refcard.tex: Update.
20053
20054 2001-11-02 Akim Demaille <akim@epita.fr>
20055
20056 * src/symtab.h (SUNDEF): New.
20057 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20058 stand for `uninitialized', instead of 0.
20059 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20060 * src/lex.c (lex): Adjust.
20061
20062 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20063 Number it 0.
20064 Let yylex return it instead of a plain 0.
20065 Reported by Dick Streefland.
20066
20067 2001-11-02 Akim Demaille <akim@epita.fr>
20068
20069 * tests/regression.at (Mixing %token styles): New test.
20070
20071 2001-11-02 Akim Demaille <akim@epita.fr>
20072
20073 * src/reader.c (parse_thong_decl): Formatting changes.
20074 (token_translations_init): New, extracted from...
20075 (packsymbols): Here.
20076 Adjust.
20077
20078 2001-11-01 Akim Demaille <akim@epita.fr>
20079
20080 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20081 Check that `9foo.y' produces correct cpp guards.
20082 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20083 guards.
20084 Reported by Wwp.
20085
20086 2001-11-01 Akim Demaille <akim@epita.fr>
20087
20088 * tests/regression.at (Invalid input: 2): New.
20089 * src/lex.c (unlexed_token_buffer): New.
20090 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20091 too.
20092 Reported by Wwp.
20093
20094 2001-11-01 Akim Demaille <akim@epita.fr>
20095
20096 * tests/calc.at: Catch up with 1.30.
20097 * configure.in: Bump to 1.49a.
20098 Adjust to newer Autotest.
20099
20100 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
20101
20102 * src/conflicts.c: Move global variables rrc_total and src_total ...
20103 (print_conflicts): here.
20104 * src/output.c (output): Free global variable user_toknums.
20105 * src/lex.c (token_obstack): Become static.
20106
20107 2001-10-18 Akim Demaille <akim@epita.fr>
20108
20109 * tests/atlocal.in (GCC): Add.
20110 * tests/calc.at: s/m4_match/m4_bmatch/.
20111 s/m4_patsubst/m4_bpatsubst/.
20112 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20113 * configure.in: AC_SUBST(GCC).
20114
20115 2001-10-14 Marc Autret <autret_m@epita.fr>
20116
20117 * src/options.c (create_long_option_table): Fix.
20118
20119 2001-10-10 Akim Demaille <akim@epita.fr>
20120
20121 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20122
20123 2001-10-04 Akim Demaille <akim@epita.fr>
20124
20125 * src/reader.c (parse_union_decl): Push the caracters in
20126 union_obstack, not attrs_obstack.
20127
20128 2001-10-04 Akim Demaille <akim@epita.fr>
20129
20130 Merge in the branch 1.29.
20131
20132 * src/reader.c (packsymbols): Use a temporary obstack for
20133 `%%tokendef', since output_stack is already used elsewhere.
20134
20135 2001-10-02 Akim Demaille <akim@epita.fr>
20136
20137 Bump 1.29d.
20138
20139 2001-10-02 Akim Demaille <akim@epita.fr>
20140
20141 Version 1.29c.
20142
20143 2001-10-02 Akim Demaille <akim@epita.fr>
20144
20145 * tests/regression.at (Invalid CPP headers): New.
20146 From Alexander Belopolsky.
20147 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20148
20149 2001-10-02 Akim Demaille <akim@epita.fr>
20150
20151 * tests/regression.at (Invalid input): New.
20152 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20153 Reported by Shura.
20154
20155 2001-10-02 Akim Demaille <akim@epita.fr>
20156
20157 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20158
20159 2001-10-02 Akim Demaille <akim@epita.fr>
20160
20161 * src/output.c (output_parser): Assert `skeleton'.
20162 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20163 systems.
20164 From Shura.
20165
20166 2001-10-01 Marc Autret <autret_m@epita.fr>
20167
20168 * src/lex.h: Echo modifications.
20169 * src/lex.c (unlex): Parameter is now token_t.
20170 From Hans Aberg.
20171
20172 2001-10-01 Marc Autret <autret_m@epita.fr>
20173
20174 * src/main.c: Include lex.h.
20175 From Hans Aberg.
20176
20177 2001-09-29 Akim Demaille <akim@epita.fr>
20178
20179 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20180
20181 2001-09-28 Akim Demaille <akim@epita.fr>
20182
20183 * tests/testsuite.at: Update to newer Autotest.
20184 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20185
20186 2001-09-27 Akim Demaille <akim@epita.fr>
20187
20188 Position independent wrapper.
20189
20190 * tests/bison: Remove.
20191 * tests/bison.in: New.
20192 * configure.in: Adjust.
20193
20194 2001-09-27 Paul Eggert <eggert@twinsun.com>
20195
20196 Port quotearg fixes from tar 1.13.24.
20197
20198 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20199 tm to be declared.
20200 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20201 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20202
20203 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20204 * m4/mbrtowc.m4: New file.
20205 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20206 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20207
20208 2001-09-27 Akim Demaille <akim@epita.fr>
20209
20210 Bump to 1.29c.
20211
20212 2001-09-27 Akim Demaille <akim@epita.fr>
20213
20214 Version 1.29b.
20215
20216 2001-09-25 Akim Demaille <akim@epita.fr>
20217
20218 * src/system.h: Include `xalloc.h'.
20219 Remove it from the C files.
20220 * src/files.c (output_files): Free the obstacks.
20221 * src/lex.c (init_lex): Rename as...
20222 (lex_init): this.
20223 (lex_free): New.
20224 * src/main.c (main): Use it.
20225
20226 2001-09-24 Marc Autret <autret_m@epita.fr>
20227
20228 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20229 to output informations in fout (FILE*).
20230 (open_graph, close_graph): Likewise.
20231 (output_graph, output_edge, output_node): Likewise.
20232 * src/vcg.h: Update function prototypes.
20233 * src/print_graph.c (print_graph): Open output graph file.
20234 (print_actions): Adjust.
20235 * src/files.h: Remove extern declaration.
20236 * src/files.c: Remove graph_obstack declaration.
20237 (open_files): Remove graph_obstack initialization.
20238 (output_files): Remove graph_obstack saving.
20239
20240 2001-09-24 Marc Autret <autret_m@epita.fr>
20241
20242 * src/files.c (compute_output_file_names): Fix.
20243
20244 2001-09-24 Marc Autret <autret_m@epita.fr>,
20245 Akim Demaille <akim@epita.fr>
20246
20247 * src/reader.c (reader): Remove call to free_symtab ().
20248 * src/main.c (main): Call it here.
20249 Include symtab.h.
20250 * src/conflicts.c (initialize_conflicts): Rename as...
20251 (solve_conflicts): this.
20252 * src/print.c (print_core, print_actions, print_state)
20253 (print_grammar): Dump to a file instead a `output_obstack'.
20254 (print_results): Dump `output_obstack', and then proceed with the
20255 FILE *.
20256 * src/files.c (compute_output_file_names, close_files): New.
20257 (output_files): Adjust.
20258 * src/main.c (main): Adjust.
20259
20260 2001-09-23 Marc Autret <autret_m@epita.fr>
20261
20262 * src/files.c (compute_header_macro): Computes header macro name
20263 from spec_defines_file when given.
20264
20265 2001-09-23 Marc Autret <autret_m@epita.fr>
20266
20267 * src/files.c (output_files): Add default extensions.
20268
20269 2001-09-22 Akim Demaille <akim@epita.fr>
20270
20271 * src/conflicts.c (finalize_conflicts): Rename as...
20272 (free_conflicts): this.
20273
20274 2001-09-22 Akim Demaille <akim@epita.fr>
20275
20276 * src/gram.c (gram_free): Rename back as...
20277 (dummy): this.
20278 (output_token_translations): Free `token_translations'.
20279 * src/symtab.c (free_symtab): Free the tag field.
20280
20281 2001-09-22 Akim Demaille <akim@epita.fr>
20282
20283 Remove `translations' as it is always set to true.
20284
20285 * src/gram.h: Adjust.
20286 * src/reader.c (packsymbols, parse_token_decl): Adjust
20287 * src/print.c (print_grammar): Adjust.
20288 * src/output.c (output_token_translations): Adjust.
20289 * src/lex.c (lex): Adjust.
20290 * src/gram.c: Be sure the set pointers to NULL.
20291 (dummy): Rename as...
20292 (gram_free): this.
20293
20294 2001-09-22 Akim Demaille <akim@epita.fr>
20295
20296 * configure.in: Invoke AM_LIB_DMALLOC.
20297 * src/system.h: Use dmalloc.
20298 * src/LR0.c: Be sure to have pointers initialized to NULL.
20299 (allocate_itemsets): Allocate kernel_items only if needed.
20300
20301 2001-09-22 Akim Demaille <akim@epita.fr>
20302
20303 * configure.in: Bump to 1.29b.
20304 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20305 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20306 need xmalloc.c in calc.y.
20307 From Pascal Bart.
20308
20309 2001-09-21 Akim Demaille <akim@epita.fr>
20310
20311 Version 1.29a.
20312 * Makefile.maint, config/config.guess, config/config.sub,
20313 * config/missing: Update from masters.
20314 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20315 upon package.m4.
20316 * configure.in (ALL_LINGUAS): Add `tr'.
20317
20318 2001-09-21 Akim Demaille <akim@epita.fr>
20319
20320 * tests/Makefile.am (package.m4): Move to...
20321 ($(srcdir)/$(TESTSUITE)): here.
20322
20323 2001-09-20 Akim Demaille <akim@epita.fr>
20324
20325 * src/complain.c: No longer try to be standalone: use system.h.
20326 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20327 * src/complain.h: Likewise.
20328 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20329 Remove the unused variable `n'.
20330 From Albert Chin-A-Young.
20331
20332 2001-09-18 Marc Autret <autret_m@epita.fr>
20333
20334 * doc/bison.1: Update.
20335 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20336 descriptions.
20337 (Option Cross Key): Update.
20338 Add --graph.
20339
20340 2001-09-18 Marc Autret <autret_m@epita.fr>
20341
20342 * tests/regression.at: New test (comment in %union).
20343
20344 2001-09-18 Marc Autret <autret_m@epita.fr>
20345
20346 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20347 do that.
20348 Reported by Keith Browne.
20349
20350 2001-09-18 Marc Autret <autret_m@epita.fr>
20351
20352 * tests/output.at: Add tests for --defines and --graph.
20353
20354 2001-09-18 Marc Autret <autret_m@epita.fr>
20355
20356 * tests/output.at: Removes tests of %{header,src}_extension features.
20357
20358 2001-09-18 Akim Demaille <akim@epita.fr>
20359
20360 * tests/Makefile.am (package.m4): New.
20361 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20362 (_AT_CHECK_CALC_ERROR): Likewise.
20363 Factor the `, ' part of verbose error messages.
20364
20365 2001-09-18 Marc Autret <autret_m@epita.fr>
20366
20367 * src/getargs.c (longopts): Declare --defines and --graph as options
20368 with optional arguments.
20369 * src/files.h: Add extern declarations.
20370 * src/files.c (spec_graph_file, spec_defines_file): New.
20371 (output_files): Update.
20372 Remove CPP-outed code.
20373
20374 2001-09-18 Marc Autret <autret_m@epita.fr>
20375
20376 Turn off %{source,header}_extension feature.
20377
20378 * src/files.c (compute_exts_from_gf): Update.
20379 (compute_exts_from_src): Update.
20380 (output_files): CPP-out useless code.
20381 * src/files.h: Remove {header,source}_extension extern declarations.
20382 * src/reader.c (parse_dquoted_param): CPP-out.
20383 (parse_header_extension_decl): Remove.
20384 (parse_source_extension_decl): Remove.
20385 (read_declarations): Remove cases tok_{hdrext,srcext}.
20386 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20387 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20388
20389 2001-09-10 Akim Demaille <akim@epita.fr>
20390
20391 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20392 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20393 (AT_CHECK_OUTPUT): this.
20394 Merely check ls' exit status, its output is useless.
20395
20396 2001-09-10 Akim Demaille <akim@epita.fr>
20397
20398 * tests/calc.at: Use m4_match.
20399 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20400
20401 2001-09-10 Marc Autret <autret_m@epita.fr>,
20402 Akim Demaille <akim@epita.fr>
20403
20404 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20405 enum color_e.
20406 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20407 to `normal'.
20408 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20409 * src/lex.h: Adjust prototype.
20410 (token_t): Add `tok_undef'.
20411 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20412 (parse_percent_token): Now returns token_t.
20413 Add default statement in switch.
20414 (lex): Separate `c' as an input variable, from the token_t result
20415 part.
20416 (unlexed): Is a token_t.
20417
20418 2001-09-10 Akim Demaille <akim@epita.fr>
20419
20420 * configure.in: Bump to 1.29a.
20421
20422 2001-09-07 Akim Demaille <akim@epita.fr>
20423
20424 Version 1.29.
20425
20426 2001-08-30 Akim Demaille <akim@epita.fr>
20427
20428 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20429 * m4/atconfig.m4: Remove.
20430 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20431 * tests/bison: New.
20432 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20433 m4_if, m4_patsubst, and m4_regexp.
20434 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20435 `input' file instead of echo.
20436
20437 2001-08-29 Akim Demaille <akim@epita.fr>
20438
20439 Bump to 1.28e.
20440
20441 2001-08-29 Akim Demaille <akim@epita.fr>
20442
20443 Version 1.28d.
20444
20445 2001-08-29 Paul Eggert <eggert@twinsun.com>
20446
20447 * src/bison.simple (yyparse): Don't take the address of an
20448 item before the start of an array, as that doesn't conform to
20449 the C Standard.
20450
20451 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20452
20453 * doc/bison.texinfo (Location Tracking Calc): New node.
20454
20455 2001-08-29 Paul Eggert <eggert@twinsun.com>
20456
20457 * src/output.c (output): Do not define const, as this now
20458 causes more problems than it cures.
20459
20460 2001-08-29 Akim Demaille <akim@epita.fr>
20461
20462 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20463 the nodes.
20464 Be sure to tag the `detailmenu'.
20465
20466 2001-08-29 Akim Demaille <akim@epita.fr>
20467
20468 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20469 download in a tmp dir.
20470
20471 2001-08-28 Marc Autret <autret_m@epita.fr>
20472
20473 * config/depcomp: New file.
20474
20475 2001-08-28 Marc Autret <autret_m@epita.fr>
20476
20477 * doc/bison.1 (mandoc): Adjust.
20478 From Juan Manuel Guerrero.
20479
20480 2001-08-28 Marc Autret <autret_m@epita.fr>
20481
20482 * src/print_graph.c (print_state): Fix.
20483
20484 2001-08-27 Marc Autret <autret_m@epita.fr>
20485
20486 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20487 char * members.
20488 Echo modifications to the functions prototypes.
20489 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20490
20491 2001-08-27 Marc Autret <autret_m@epita.fr>
20492
20493 * src/vcg.c: Include `xalloc.h'.
20494 (add_colorentry): New.
20495 (add_classname): New.
20496 (add_infoname): New.
20497 * src/vcg.h: Add new prototypes.
20498
20499 2001-08-27 Akim Demaille <akim@epita.fr>
20500
20501 * Makefile.maint: Sync. again with CVS Autoconf.
20502
20503 2001-08-27 Akim Demaille <akim@epita.fr>
20504
20505 * Makefile.maint: Formatting changes.
20506 (po-update, cvs-update, update): New targets.
20507 (AMTAR): Remove.
20508
20509 2001-08-27 Akim Demaille <akim@epita.fr>
20510
20511 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20512 * Makefile.maint: Sync. with CVS Autoconf.
20513
20514 2001-08-27 Marc Autret <autret_m@epita.fr>
20515
20516 * src/vcg.h (struct infoname_s): New.
20517 (struct colorentry_s): New.
20518 (graph_s): New fields {vertical,horizontal}_order in structure.
20519 Add `infoname' field.
20520 Add `colorentry' field;
20521 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20522 (G_HORIZONTAL_ORDER): New.
20523 (G_INFONAME): New.
20524 (G_COLORENTRY): New.
20525 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20526 Add output of `infoname'.
20527 Add output of `colorentry'.
20528
20529 2001-08-27 Marc Autret <autret_m@epita.fr>
20530
20531 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20532 This one shadowed a global parameter.
20533
20534 2001-08-24 Marc Autret <autret_m@epita.fr>
20535
20536 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20537 instead of `unsigned'.
20538 (print_state): Do not call obstack_object_size () in obstack_grow ()
20539 to avoid macro variables shadowing.
20540
20541 2001-08-23 Marc Autret <autret_m@epita.fr>
20542
20543 * src/lex.c (percent_table): Typo: s/naem/name/.
20544 Add graph option.
20545 Normalize new options declarations.
20546
20547 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
20548
20549 * tests/suite.at: Exercise %header_extension and %source_extension.
20550
20551 2001-08-16 Marc Autret <autret_m@epita.fr>
20552
20553 * src/reader.c (parse_dquoted_param): New.
20554 (parse_header_extension_decl): Use it.
20555 (parse_source_extension_decl): Likewise.
20556
20557 2001-08-16 Marc Autret <autret_m@epita.fr>
20558
20559 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20560 (get_xxxx_str): Use assert () instead of complain ().
20561 Remove return invokations in default cases.
20562 (get_decision_str): Modify default behaviour. Remove second argument.
20563 Echo modifications on calls.
20564 (output_graph): Fix.
20565
20566 2001-08-16 Marc Autret <autret_m@epita.fr>
20567
20568 * src/getargs.c (usage): Update with ``-g, --graph''.
20569
20570 2001-08-16 Marc Autret <autret_m@epita.fr>
20571
20572 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20573 (Option Cross Key): Likewise.
20574 * doc/bison.1: Update.
20575
20576 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
20577
20578 * src/output.c (output_master_parser): Don't finish action_obstack.
20579 (output_parser): Don't care about the muscle action, here.
20580 (prepare): Copy the action_obstack in the action muscle.
20581 (output): Free action_obstack.
20582
20583 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20584
20585 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20586 will contain `%union' declaration.
20587 (parse_union_decl): Delete #line directive output.
20588 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20589 informations about %union.
20590 (parse_union_decl): Copy the union_obstack in the muscle stype.
20591 * src/bison.simple: Add new #line directive.
20592 Add typdef %%stype YYSTYPE.
20593
20594 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20595
20596 * src/bison.simple: Add new `#line' directive.
20597
20598 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
20599
20600 * src/bison.simple: New `#line' directive.
20601 * src/output.c (output_parser): Support new dynamic muscle input_line.
20602
20603 2001-09-22 Marc Autret <autret_m@epita.fr>
20604
20605 * src/output.c (output_master_parser): New.
20606 (output_parser): Be more re-entrant.
20607
20608 2001-09-21 Marc Autret <autret_m@epita.fr>
20609
20610 * src/reader.c (copy_definition, parse_union_decl): Update and use
20611 `linef' muscle.
20612 (copy_action): Likewise.
20613 Use obstack_1grow ().
20614 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20615
20616 2001-09-21 Marc Autret <autret_m@epita.fr>
20617
20618 * src/options.c (option_table): Adjust.
20619 * src/lex.c (parse_percent_token): Fix.
20620
20621 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20622
20623 * src/options.c (symtab.h): Include it, need by lex.h.
20624
20625 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20626
20627 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20628 is now an option_table_struct*.
20629 (option_strcmp): New function option_strcmp.
20630 (parse_percent_token): Call option_strcmp.
20631 * src/getargs.c (xalloc.h, options.h): Include it.
20632 (getargs): Call create_long_option_table.
20633 (getargs): Free longopts at the end of the function.
20634 (shortopts): Move in options.c.
20635 * src/options.c (create_long_option_table): New function. Convert
20636 information from option_table to option structure.
20637 * src/reader.c (options.h): Include it.
20638
20639 * src/Makefile.am: Adjust.
20640 * src/options.c (option_table): Create from longopts and percent_table.
20641 * src/getargs.c (longopts): Delete.
20642 * src/lex.c (struct percent_table_struct): Delete.
20643 (percent_table): Delete.
20644 (options.h): Include it.
20645 * src/options.c: Create.
20646 * src/options.h: Create.
20647 Declare enum opt_access_e.
20648 Define struct option_table_struct.
20649
20650 2001-09-20 Marc Autret <autret_m@epita.fr>
20651
20652 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20653 sections of Bison.
20654
20655 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
20656
20657 * src/bison.simple: s/%%filename/%%skeleton.
20658 * src/muscle_tab.c (getargs.h): Include it.
20659 (muscle_init): Insert new muscle skeleton.
20660
20661 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
20662
20663 * src/output.c (output_parser): Delete unused variable actions_dumped.
20664
20665 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
20666
20667 * src/output.c (output): Delete call to reader_output_yylsp.
20668 * src/reader.c (reader): Likewise.
20669 * src/reader.h: Delete declaration of reader_output_yylsp.
20670
20671 2001-09-02 Marc Autret <autret_m@epita.fr>
20672
20673 * src/reader.c: Include muscle_tab.h.
20674 (parse_union_decl): Update.
20675 (parse_macro_decl): Rename parse_muscle_decl.
20676 Update to use renamed functions and variable.
20677 (read_declarations, copy_action, read_additionnal_code, : Updated
20678 with correct variables and functions names.
20679 (packsymbols, reader): Likewise.
20680
20681 * src/reader.h (muscle_obstack): Extern declaration update.
20682
20683 * src/output.c: Include muscle_tab.h
20684 In all functions using macro_insert, change by using muscle_insert ().
20685 (macro_obstack): Rename muscle_obstack.
20686 Echo modifications in the whole file.
20687 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20688 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20689 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20690
20691 * src/muscle_tab.h: Update double inclusion macros.
20692 (macro_entry_s): Rename muscle_entry_s.
20693 Update prototypes.
20694
20695 * src/muscle_tab.c: Include muscle_tab.h.
20696 Rename macro_tabble to muscle_table.
20697 (mhash1, mhash2, mcmp): Use muscle_entry.
20698 (macro_init): Rename muscle_init. Update.
20699 (macro_insert): Rename muscle_insert. Update.
20700 (macro_find): Rename muscle_find. Update.
20701
20702 * src/main.c: Include muscle_tab.h.
20703 (main): Call muscle_init ().
20704 * src/Makefile.am (bison_SOURCES): Echo modifications.
20705
20706 2001-09-02 Marc Autret <autret_m@epita.fr>
20707
20708 Now the files macro_tab.[ch] are named muscle_tab.[ch].
20709
20710 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20711
20712 2001-09-02 Marc Autret <autret_m@epita.fr>
20713
20714 * src/macrotab.c, src/macrotab.h: Remove.
20715
20716 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
20717
20718 * src/reader.c (copy_guard): Use muscle to specify the `#line'
20719 filename.
20720
20721 2001-09-01 Marc Autret <autret_m@epita.fr>
20722
20723 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20724 to an explicit value to activate the feature. We do it here.
20725
20726 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20727
20728 * src/output.c (prepare): Delete the `filename' muscule insertion.
20729 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20730 (parse_union_decl): Likewise.
20731 * src/macrotab.c (macro_init): Initialize filename by infile.
20732
20733 2001-08-31 Marc Autret <autret_m@epita.fr>
20734
20735 * src/bison.simple (YYLSP_NEEDED): New definition.
20736 * src/output.c (prepare): Add macro insertion of `locations_flag'
20737
20738 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20739
20740 * src/output.c (prepare): Delete insertion of previous muscles,
20741 and insert the `prefix' muscles.
20742 * src/macrotab.c (macro_init): Likewise.
20743 (macro_init): Initialization prefix directive by `yy'.
20744 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
20745 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20746 yylval, yydebug, yyerror, yynerrs and yyparse.
20747 New directive `#define' to substitute yydebug, ... with option
20748 name_prefix.
20749
20750 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20751
20752 * src/main.c (main): Standardize.
20753 * src/output.c (output_table_data, output_parser): Likewise.
20754 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20755
20756 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20757
20758 * src/reader.c (read_additionnal_code): Rename %%user_code to
20759 %%epilogue.
20760 * src/output.c (output): Rename %%declarations to %%prologue.
20761 * src/bison.simple: Echo modifications.
20762
20763 2001-08-31 Marc Autret <autret_m@epita.fr>
20764
20765 * src/reader.c (readgram): CleanUp.
20766 (output_token_defines): Likewise.
20767 (packsymbols): Likewise.
20768 (reader): Likewise.
20769 * src/output.c (output): CPP-out useless code.
20770
20771 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20772
20773 * src/reader.c (reader): Delete obsolete call to function
20774 output_trailers and output_headers.
20775 * src/output.h: Remove obsolete functions prototypes of output_headers
20776 and output_trailers.
20777
20778 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
20779
20780 * src/main.c: Include macrotab.h.
20781 * src/macrotab.h (macro_entry_s): Constify fields.
20782 Adjust functions prototypes.
20783 * src/macrotab.c (macro_insert): Constify key and value.
20784 (macro_find): Constify key.
20785 (macro_insert): Include 'xalloc.h'
20786 (macro_insert): Use XMALLOC.
20787 (macro_find): Constify return value.
20788 * src/output.c (output_table_data): Rename table to table_data.
20789 (output_parser): Constify macro_key, macro_value.
20790
20791 2001-08-30 Marc Autret <autret_m@epita.fr>
20792
20793 * src/reader.c (parse_skel_decl): New.
20794 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
20795 * src/lex.h (token_t): New token `tok_skel'.
20796 * src/lex.c (percent_table): Add skeleton option entry.
20797 Standardize.
20798
20799 2001-08-29 Marc Autret <autret_m@epita.fr>
20800
20801 * src/bison.simple: Add %%user_code directive at the end.
20802 * src/reader.c (read_additionnal_code): New.
20803 (reader): Use it.
20804 * src/output.c (output_program): Remove.
20805 (output): Update.
20806
20807 2001-08-28 Marc Autret <autret_m@epita.fr>
20808
20809 * src/output.c (output_actions): Clean up.
20810 (output_gram): CPP-out useless code.
20811 * src/reader.c (reader): Clean up, CPP-out useless code.
20812
20813 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
20814
20815 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
20816 directive.
20817 * src/bison.simple: Add `%%definitions'.
20818
20819 2001-08-28 Marc Autret <autret_m@epita.fr>
20820
20821 * config/depcomp: New file.
20822
20823 2001-08-27 Paul Eggert <eggert@twinsun.com>
20824
20825 * src/bison.simple (yyparse): Don't take the address of an
20826 item before the start of an array, as that doesn't conform to
20827 the C Standard.
20828
20829 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20830
20831 * src/output.c (output): Remove the initialization of the macro
20832 obstack. It was done too late here.
20833
20834 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20835 completely wrong.
20836 (reader): Initialize the macro obstack here, since we need it to grow
20837 '%define' directives.
20838
20839 * src/reader.h: Declare the macro obstack as extern.
20840
20841 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20842
20843 * src/output.c (output_parser): Fix. Store single '%' characters in
20844 the output obstack instead of throwing them away.
20845
20846 2001-08-27 Akim Demaille <akim@epita.fr>
20847
20848 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20849
20850 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20851
20852 * lib/Makefile.am: Adjust.
20853
20854 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20855
20856 * src/bison.simple: Update and add '%%' directives.
20857
20858 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20859
20860 * src/reader.c (reader): Remove calls to 'output_headers' and
20861 'output_trailers'. Remove some C output.
20862 (readgram): Disable a piece of code that was writing a default
20863 definition for 'YYSTYPE'.
20864 (reader_output_yylsp): Remove.
20865 (packsymbols): Output token defintions to a macro.
20866 (copy_definition): Disable C output.
20867
20868 * src/reader.c (parse_macro_decl): New function used to parse macro
20869 declarations.
20870 (copy_string2): Put the body of copy_string into this new function.
20871 Add a parameter to let the caller choose whether he wants to copy the
20872 string delimiters or not.
20873 (copy_string): Be a simple call to copy_string2 with the last argument
20874 bound to true.
20875 (read_declarations): Add case for macro definition.
20876 (copy_identifier): New.
20877 (parse_macro_decl): Read macro identifiers using copy_identifier
20878 rather than lex.
20879
20880 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20881
20882 * src/output.c (prepare): Add prefixed names.
20883 (output_parser): Output semantic actions.
20884 (output_parser): Fix bug on '%%line' directives.
20885
20886 * src/output.c (output_headers): Remove. The C code printed by this
20887 function should now be in the skeletons.
20888 (output_trailers): Remove.
20889 (output): Disable call to 'reader_output_yylsp'.
20890 (output_rule_data): Do not output tables to the table obstack.
20891
20892 * src/output.c: Remove some C dedicated output.
20893 Improve the use of macro and output obstacks.
20894 (output_defines): Remove.
20895
20896 * src/output.c (output_token_translations): Associate 'translate'
20897 table with a macro. No output to the table obstack.
20898 (output_gram): Same for 'rhs' and 'prhs'.
20899 (output_stos): Same for 'stos'.
20900 (output_rule_data): Same for 'r1' and 'r2'.
20901 (token_actions): Same for 'defact'.
20902 (goto_actions): Same for 'defgoto'.
20903 (output_base): Same for 'pact' and 'pgoto'.
20904 (output_table): Same for 'table'.
20905 (output_check): Same for 'check'.
20906
20907 * src/output.c (output_table_data): New function.
20908 (output_short_table): Remove.
20909 (output_short_or_char_table): Remove.
20910
20911 * src/output.c (output_parser): Replace most of the skeleton copy code
20912 with something new. Skeletons are now processed character by character
20913 rather than line by line, and Bison looks for '%%' macros. This is the
20914 first step in making Bison's output process (a lot) more flexible.
20915 (output_parser): Use the macro table.
20916
20917 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20918
20919 * src/main.c (main): Initialize the macro table.
20920
20921 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20922
20923 * src/lex.c (percent_table): Add tok_define.
20924 * src/lex.h: Add tok_define.
20925
20926 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20927
20928 * src/macrotab.c: New file.
20929 * src/macrotab.h: New file.
20930 * src/Makefile.am: Update.
20931
20932 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20933
20934 * lib/hash.c: New file.
20935 * lib/hash.h: New file.
20936 * lib/Makefile.am: Update.
20937
20938 2001-08-15 Akim Demaille <akim@epita.fr>
20939
20940 Version 1.28c.
20941
20942 2001-08-15 Marc Autret <autret_m@epita.fr>
20943
20944 * src/reader.c (readgram): Indent output macro YYSTYPE.
20945 (packsymbols): Likewise.
20946 (output_token_defines): Likewise.
20947 * src/files.c: Standardize.
20948 (compute_header_macro): New.
20949 (defines_obstack_save): New. Use compute_header_macro.
20950 (output_files): Update. Use defines_obstack_save.
20951
20952 2001-08-15 Akim Demaille <akim@epita.fr>
20953
20954 * doc/bison.texinfo (Table of Symbols): Document
20955 YYSTACK_USE_ALLOCA.
20956
20957 2001-08-15 Akim Demaille <akim@epita.fr>
20958
20959 * missing: Update from CVS Automake.
20960 * config/config.guess, config/config.sub, config/texinfo.tex:
20961 Update from gnu.org.
20962
20963 2001-08-15 Akim Demaille <akim@epita.fr>
20964
20965 * Makefile.maint: Sync with CVS Autoconf.
20966
20967 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
20968
20969 * doc/bison.texinfo: Include GNU Free Documentation License from
20970 `fdl.texi'.
20971 * doc/fdl.texi: Add to package.
20972
20973 2001-08-14 Marc Autret <autret_m@epita.fr>
20974
20975 Turn on %{source,header}_extension features.
20976
20977 * src/lex.c (percent_table): Un-CPP out header_extension and
20978 source_extension.
20979 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
20980 (compute_exts_from_src): Remove conditions. It restores priorities
20981 between options.
20982
20983 2001-08-14 Marc Autret <autret_m@epita.fr>
20984
20985 * src/files.c (compute_base_names): Add extensions computing when
20986 `--file-prefix' used.
20987 Standardize function calls.
20988
20989 2001-08-13 Marc Autret <autret_m@epita.fr>
20990
20991 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
20992 defining it (defined but null disables alloca).
20993
20994 2001-08-13 Marc Autret <autret_m@epita.fr>
20995
20996 * src/bison.simple (_yy_memcpy): CPP reformat.
20997
20998 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
20999
21000 * tests/atconfig.in (CPPFLAGS): Fix.
21001
21002 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21003
21004 * doc/bison.texinfo: Include GNU General Public License from
21005 `gpl.texi'.
21006 * doc/gpl.texi: Add to package.
21007
21008 2001-08-10 Marc Autret <autret_m@epita.fr>
21009
21010 * src/print_graph.h: Fix.
21011 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21012
21013 2001-08-10 Akim Demaille <akim@epita.fr>
21014
21015 * src/system.h: Provide default declarations for stpcpy, strndup,
21016 and strnlen.
21017
21018 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21019
21020 * doc/bison.texinfo (Locations): Update @$ stuff.
21021
21022 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21023
21024 * src/bison.simple (YYLLOC_DEFAULT): Update.
21025 (yyparse): Adjust.
21026
21027 2001-08-08 Marc Autret <autret_m@epita.fr>
21028
21029 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21030 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21031 Reported by Fabrice Bauzac.
21032
21033 2001-08-08 Marc Autret <autret_m@epita.fr>
21034
21035 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21036 * src/vcg.c (output_node): Fix.
21037 * src/vcg.h: Cleanup.
21038 * src/print_graph.c: Add comments.
21039 (node_output_size): New global variable. Simplify the formatting of
21040 the VCG graph output.
21041 (print_actions): Unused code is now used. It notifies the final state
21042 and no action states in the VCG graph. It also give the reduce actions.
21043 The `shift and goto' edges are red and the `go to state' edges are
21044 blue.
21045 Get the current node name and node_obstack by argument.
21046 (node_obstack): New variable.
21047 (print_state): Manage node_obstack.
21048 (print_core): Use node_obstack given by argument.
21049 A node is not only computed here but in print_actions also.
21050 (print_graph): CPP out useless code instead of commenting it.
21051
21052 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
21053
21054 * tests/atconfig.in (CPPFLAGS): Fix.
21055
21056 2001-08-07 Akim Demaille <akim@epita.fr>
21057
21058 * src/print_graph.c (quote): New.
21059 (print_core): Use it.
21060
21061 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21062
21063 * src/vcg.c (complain.h): Include it.
21064 Unepitaize `return' invocations.
21065 [NDEBUG] (main): Remove.
21066 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21067 * src/files.c (open_files): Initialize graph_obstack.
21068 * src/print_graph.c (print_actions): CPP out useless code.
21069 (print_core): Don't output the last `\n' in labels.
21070 Use `quote'.
21071 * src/files.c (output_files): Output the VCG file.
21072 * src/main.c (main): Invoke print_graph ();
21073
21074 2001-08-06 Marc Autret <autret_m@epita.fr>
21075
21076 Automaton VCG graph output.
21077 Using option ``-g'' or long option ``--graph'', you can generate
21078 a gram_filename.vcg file containing a VCG description of the LALR (1)
21079 automaton of your grammar.
21080
21081 * src/main.c: Call to print_graph() function.
21082 * src/getargs.h: Update.
21083 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21084 (graph_flag): New flag.
21085 (longopts): Update.
21086 (getargs): Add case `g'.
21087 * src/files.c (graph_obstack): New obstack struct.
21088 (open_files): Initialize new obstack.
21089 (output_files): Saves graph_obstack if required.
21090 * src/files.h (graph_obstack): New extern declaration.
21091 * src/Makefile.am: Add new source files.
21092
21093 2001-08-06 Marc Autret <autret_m@epita.fr>
21094
21095 * src/print_graph.c, src/print_graph.h (graph): New.
21096 * src/vcg.h: New file.
21097 * src/vcg.c: New file, VCG graph handling.
21098
21099 2001-08-06 Marc Autret <autret_m@epita.fr>
21100
21101 Add of %source_extension and %header_extension which specify
21102 the source or/and the header output file extension.
21103
21104 * src/files.c (compute_base_names): Remove initialisation of
21105 src_extension and header_extension.
21106 (compute_exts_from_gf): Update.
21107 (compute_exts_from_src): Update.
21108 (output_files): Update.
21109 * src/reader.c (parse_header_extension_decl): New.
21110 (parse_source_extension_decl): New.
21111 (read_declarations): New case statements for the new tokens.
21112 * src/lex.c (percent_table): Add entries for %source_extension
21113 and %header_extension.
21114 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21115
21116 2001-08-06 Marc Autret <autret_m@epita.fr>
21117
21118 * configure.in: Bump to 1.28c.
21119 * doc/bison.texinfo: Texinfo thingies.
21120
21121 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
21122
21123 * tests/atconfig.in (CPPFLAGS): Add.
21124 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21125
21126 2001-08-03 Akim Demaille <akim@epita.fr>
21127
21128 Version 1.28b.
21129
21130 2001-08-03 Akim Demaille <akim@epita.fr>
21131
21132 * tests/Makefile.am (check-local): Ship testsuite.
21133 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21134 Include `string.h'.
21135
21136 2001-08-03 Akim Demaille <akim@epita.fr>
21137
21138 * configure.in: Try using -Wformat when compiling.
21139
21140 2001-08-03 Akim Demaille <akim@epita.fr>
21141
21142 * configure.in: Bump to 1.28b.
21143
21144 2001-08-03 Akim Demaille <akim@epita.fr>
21145
21146 * src/complain.c: Adjust strerror_r portability issues.
21147
21148 2001-08-03 Akim Demaille <akim@epita.fr>
21149
21150 Version 1.28a.
21151
21152 2001-08-03 Akim Demaille <akim@epita.fr>
21153
21154 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21155 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21156 * src/getargs.c: Include complain.h.
21157 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21158 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21159
21160 2001-08-03 Akim Demaille <akim@epita.fr>
21161
21162 * src/reader.c (readgram): Display hidden chars in error messages.
21163
21164 2001-08-03 Akim Demaille <akim@epita.fr>
21165
21166 Update to gettext 0.10.39.
21167
21168 2001-08-03 Akim Demaille <akim@epita.fr>
21169
21170 * lib/strspn.c: New.
21171
21172 2001-08-01 Marc Autret <autret_m@epita.fr>
21173
21174 * doc/bison.texinfo: Update.
21175 * doc/bison.1 (mandoc): Update.
21176 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21177 * src/files.c: Support output files extensions computing.
21178 (src_extension): New static variable.
21179 (header_extension): New static variable.
21180 (tr): New function.
21181 (get_extension_index): New function, gets the index of an extension
21182 filename in a string.
21183 (compute_exts_from_gf): New function, computes extensions from the
21184 grammar file extension.
21185 (compute_exts_from_src): New functions, computes extensions from the
21186 C source file extension, file given by ``-o'' option.
21187 (compute_base_names): Update.
21188 (output_files): Update.
21189
21190 2001-08-01 Robert Anisko <anisko_r@epita.fr>
21191
21192 * doc/bison.texi: Document @$.
21193 (Locations): New section.
21194
21195 2001-07-18 Akim Demaille <akim@epita.fr>
21196
21197 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21198 * config/prev-version.txt, config/move-if-change: New.
21199 * Makefile.am: Adjust.
21200
21201 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
21202
21203 * src/bison.simple (yyparse): Suppress warning `comparaison
21204 between signed and unsigned'.
21205
21206 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
21207
21208 * src/getargs.h (raw_flag): Remove.
21209 * src/getargs.c: Die on `-r'/`--raw'.
21210 * src/lex.c (parse_percent_token): Die on `%raw'.
21211 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21212 * tests/calc.at: Suppress test with option `--raw'.
21213
21214 2001-07-14 Akim Demaille <akim@epita.fr>
21215
21216 * config/: New.
21217 * configure.in: Require Autoconf 2.50.
21218 Update to gettext 0.10.38.
21219
21220 2001-03-16 Akim Demaille <akim@epita.fr>
21221
21222 * doc/bison.texinfo: ANSIfy the examples.
21223
21224 2001-03-16 Akim Demaille <akim@epita.fr>
21225
21226 * getargs.c (skeleton): New variable.
21227 (longopts): --skeleton is a new option.
21228 (shortopts, getargs): -S is a new option.
21229 * getargs.h: Declare skeleton.
21230 * output.c (output_parser): Use it.
21231
21232 2001-03-16 Akim Demaille <akim@epita.fr>
21233
21234 * m4/strerror_r.m4: New.
21235 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21236 * lib/error.h, lib/error.c: Update.
21237
21238 2001-03-16 Akim Demaille <akim@epita.fr>
21239
21240 * src/getargs.c (longopts): Clean up.
21241
21242 2001-02-21 Akim Demaille <akim@epita.fr>
21243
21244 * src/reader.c (gensym): `gensym_count' is your own.
21245 Use a static buf to create the symbol name, as token_buffer is no
21246 longer a buffer.
21247
21248 2001-02-08 Akim Demaille <akim@epita.fr>
21249
21250 * src/conflicts.c (conflict_report): Be sure not to append to res
21251 between two calls, which could happen if both first sprintf were
21252 skipped, but not the first cp += strlen.
21253
21254 2001-02-08 Akim Demaille <akim@epita.fr>
21255
21256 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21257 New, from fileutils 4.0.37.
21258 * configure.in: Require Autoconf 2.49c. I took some time before
21259 making this decision. This is the only way out for portability
21260 issues in Bison, it would mean way too much duplicate effort to
21261 import in Bison features implemented in 2.49c since 2.13.
21262 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21263
21264 2001-02-02 Akim Demaille <akim@epita.fr>
21265
21266 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
21267 * lib/xalloc.h, lib/xmalloc.c: Update.
21268
21269 2001-01-19 Akim Demaille <akim@epita.fr>
21270
21271 Get rid of the ad hoc handling of token_buffer in the scanner: use
21272 the obstacks.
21273
21274 * src/lex.c (token_obstack): New.
21275 (init_lex): Initialize it. No longer call...
21276 (grow_token_buffer): this. Remove it.
21277 Adjust all the places which used it to use the obstack.
21278
21279 2001-01-19 Akim Demaille <akim@epita.fr>
21280
21281 * src/lex.h: Rename all the tokens:
21282 s/\bENDFILE\b/tok_eof/g;
21283 s/\bIDENTIFIER\b/tok_identifier/g;
21284 etc.
21285 Let them be enums, not #define, to ease debugging.
21286 Adjust all the code.
21287
21288 2001-01-18 Akim Demaille <akim@epita.fr>
21289
21290 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21291 * src/lex.c (maxtoken, grow_token_buffer): Static.
21292
21293 2001-01-18 Akim Demaille <akim@epita.fr>
21294
21295 Since we now use obstacks, more % directives can be enabled.
21296
21297 * src/lex.c (percent_table): Also accept `%yacc',
21298 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21299 `%debug'.
21300 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21301 instead of returning a token.
21302 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21303 * src/reader.c (read_declarations): Adjust.
21304 * src/files.c (open_files): Don't call `compute_base_names', don't
21305 compute `attrsfile' since they depend upon data which might be
21306 *in* the input file now.
21307 (output_files): Do it here.
21308 * src/output.c (output_headers): Document the fact that this patch
21309 introduces a guaranteed SEGV for semantic parsers.
21310 * doc/bison.texinfo: Document them.
21311 * tests/suite.at: Exercise these %options.
21312
21313 2000-12-20 Akim Demaille <akim@epita.fr>
21314
21315 Also handle the output file (--verbose) with obstacks.
21316
21317 * files.c (foutput): Remove.
21318 (output_obstack): New.
21319 Adjust all dependencies.
21320 * src/conflicts.c: Return a string.
21321 * src/system.h (obstack_grow_string): Rename as...
21322 (obstack_sgrow): this. Be ready to work with non literals.
21323 (obstack_fgrow4): New.
21324
21325 2000-12-20 Akim Demaille <akim@epita.fr>
21326
21327 * src/files.c (open_files): Fix the computation of short_base_name
21328 in the case of `-o foo.tab.c'.
21329
21330 2000-12-20 Akim Demaille <akim@epita.fr>
21331
21332 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21333 (copy_dollar): Now that everything uses obstacks, get rid of the
21334 FILE * parameters.
21335
21336 2000-12-20 Akim Demaille <akim@epita.fr>
21337
21338 * src/files.c (open_files): Actually the `.output' file is based
21339 on the short_base_name, not base_name.
21340 * tests/suite.at (Checking output file names): Adjust.
21341
21342 2000-12-20 Akim Demaille <akim@epita.fr>
21343
21344 * src/bison.s1: Remove, we now use directly...
21345 * src/bison.simple: this.
21346 * src/Makefile.am: Use pkgdata instead of data.
21347
21348 2000-12-20 Akim Demaille <akim@epita.fr>
21349
21350 * src/files.c (guard_obstack): New.
21351 (open_files): Initialize it.
21352 (output_files): Dump it...
21353 * src/files.h: Export it.
21354 * src/reader.c (copy_guard): Use it.
21355
21356 2000-12-19 Akim Demaille <akim@epita.fr>
21357
21358 * src/files.c (outfile, defsfile, actfile): Removed as global
21359 vars.
21360 (open_files): Don't compute them.
21361 (output_files): Adjust.
21362 (base_name, short_base_name): Be global.
21363 Adjust dependencies.
21364
21365 2000-12-19 Akim Demaille <akim@epita.fr>
21366
21367 * src/files.c (strsuffix): New.
21368 (stringappend): Be just like strcat but allocate.
21369 (base_names): Eve out from open_files.
21370 Try to simplify the rather hairy computation of base_name and
21371 short_base_name.
21372 (open_files): Use it.
21373 * tests/suite.at (Checking output file names): New test.
21374
21375 2000-12-19 Akim Demaille <akim@epita.fr>
21376
21377 * src/system.h (obstack_grow_literal_string): Rename as...
21378 (obstack_grow_string): this.
21379 * src/output.c (output_parser): Recognize `%% actions' instead of
21380 `$'.
21381 * src/bison.s1: s/$/%% actions/.
21382 * src/bison.hairy: Likewise.
21383
21384 2000-12-19 Akim Demaille <akim@epita.fr>
21385
21386 * src/output.c (output_parser): Compute the `#line' lines when
21387 there are.
21388 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21389 Suggested by Hans Aberg.
21390
21391 2000-12-19 Akim Demaille <akim@epita.fr>
21392
21393 Let the handling of the skeleton files be local to the procedures
21394 that use it.
21395
21396 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21397 longer static.
21398 (fparser, open_extra_files): Remove.
21399 (open_files, output_files): Don't take care of fparser.
21400 * src/files.h: Adjust.
21401 * src/output.c (output_parser): Open and close the file to the
21402 skeleton.
21403 * src/reader.c (read_declarations): When %semantic_parser, open
21404 fguard.
21405
21406 2000-12-19 Akim Demaille <akim@epita.fr>
21407
21408 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21409 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21410
21411 2000-12-19 Akim Demaille <akim@epita.fr>
21412
21413 * src/files.c (open_files): Yipee! We no longer need all the code
21414 looking for `/tmp' since we have no tmp file.
21415
21416 2000-12-19 Akim Demaille <akim@epita.fr>
21417
21418 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21419 New macros.
21420 * src/files.c (open_files): Less dependency on MSDOS etc.
21421
21422 2000-12-14 Akim Demaille <akim@epita.fr>
21423
21424 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21425 Provide a default definition.
21426 Use it when executing the default @ action.
21427 * src/reader.c (reader_output_yylsp): No longer include
21428 `timestamp' and `text' in the default YYLTYPE.
21429
21430 2000-12-12 Akim Demaille <akim@epita.fr>
21431
21432 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21433 (copy_guard): Quote the file names.
21434 Reported by Laurent Mascherpa.
21435
21436 2000-12-12 Akim Demaille <akim@epita.fr>
21437
21438 * src/output.c (output_headers, output_program, output): Be sure
21439 to escape special characters when outputting filenames.
21440 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21441 (output_headers): Don't depend on them, Use ACTSTR.
21442
21443 2000-11-17 Akim Demaille <akim@epita.fr>
21444
21445 * lib/obstack.h: Formatting changes.
21446 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21447 prevents type checking.
21448 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21449 cast the value to (void *): assigning a `foo *' to a `void *'
21450 variable is valid.
21451 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21452 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21453 append characters.
21454
21455 2000-11-17 Akim Demaille <akim@epita.fr>
21456
21457 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21458 as...
21459 (suite.m4, regression.m4, calc.m4): these.
21460 * tests/atgeneral.m4: Update from CVS Autoconf.
21461
21462 2000-11-17 Akim Demaille <akim@epita.fr>
21463
21464 * tests/regression.m4 (%union and --defines): New test,
21465 demonstrating a current bug in the obstack implementation.
21466
21467 2000-11-17 Akim Demaille <akim@epita.fr>
21468
21469 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21470 macros.
21471 Use them to declare the variables which are global or local to
21472 `yyparse'.
21473
21474 2000-11-17 Akim Demaille <akim@epita.fr>
21475
21476 * acconfig.h: Remove, no longer used.
21477
21478 2000-11-07 Akim Demaille <akim@epita.fr>
21479
21480 * src: s/Copyright (C)/Copyright/g.
21481
21482 2000-11-07 Akim Demaille <akim@epita.fr>
21483
21484 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21485 defining.
21486 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21487
21488 2000-11-07 Akim Demaille <akim@epita.fr>
21489
21490 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21491 Merge in a single CPP if/else.
21492
21493 2000-11-07 Akim Demaille <akim@epita.fr>
21494
21495 * src/output.c (output): Remove useless variables.
21496 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21497 argument `data' for consistency with the prototypes.
21498 Qualify it `const'.
21499 (obstack_copy, obstack_copy0): Rename the second argument as
21500 `address' for consistency. Qualify it `const'.
21501 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21502 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21503 `const' their input argument (`data' or `address').
21504 Adjust the corresponding macros to include `const' in casts.
21505
21506 2000-11-03 Akim Demaille <akim@epita.fr>
21507
21508 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21509 s/PFILE1/BISON_HAIRY/.
21510 Adjust dependencies.
21511
21512 2000-11-03 Akim Demaille <akim@epita.fr>
21513
21514 For some reason, this was not applied.
21515
21516 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21517 `unlink': it's no longer used.
21518
21519 2000-11-03 Akim Demaille <akim@epita.fr>
21520
21521 * src/files.c (skeleton_find): New function, eved out of...
21522 (open_files, open_extra_files): here.
21523
21524 2000-11-03 Akim Demaille <akim@epita.fr>
21525
21526 Don't use `atexit'.
21527
21528 * src/files.c (obstack_save): New function.
21529 (done): Rename as...
21530 (output_files): this.
21531 Use `obstack_save'.
21532 * src/main.c (main): Don't use `atexit' to register `done', since
21533 it no longer has to remove tmp files, just call `output_files'
21534 when there are no errors.
21535
21536 2000-11-02 Akim Demaille <akim@epita.fr>
21537
21538 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21539 `unlink': it's no longer used.
21540 * src/files.h: Formatting changes.
21541
21542 2000-11-02 Akim Demaille <akim@epita.fr>
21543
21544 Remove the last uses of mktemp and unlink/delete.
21545
21546 * src/files.c (fdefines, ftable): Removed.
21547 (defines_ostack, table_obstack): New.
21548 Adjust dependencies of the former into uses of the latter.
21549 * src/output.c (output_short_or_char_table, output_short_table):
21550 Convert to using obstacks.
21551 * src/reader.c (copy_comment2): Accept one FILE * and two
21552 obstacks.
21553 (output_token_defines, reader_output_yylsp): Use obstacks.
21554 * src/system.h (obstack_fgrow3): New.
21555 * po/POTFILES.in: Adjust.
21556
21557 2000-11-01 Akim Demaille <akim@epita.fr>
21558
21559 Change each use of `fattrs' into a use of `attrs_obstack'.
21560
21561 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21562 * src/files.c (fattrs): Remove.
21563 (attrs_obstack): New.
21564 Adjust all dependencies.
21565 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21566
21567 2000-11-01 Akim Demaille <akim@epita.fr>
21568
21569 Introduce obstacks.
21570 Change each use of `faction' into a use of `action_obstack'.
21571
21572 * lib/obstack.h, lib/obstack.c: New files.
21573 * src/files.c (faction): Remove.
21574 (action_obstack): New.
21575 Adjust all dependencies.
21576
21577 2000-10-20 Akim Demaille <akim@epita.fr>
21578
21579 * lib/quote.h (PARAMS): New macro. Use it.
21580
21581 2000-10-16 Akim Demaille <akim@epita.fr>
21582
21583 * src/output.c (output_short_or_char_table): New function.
21584 (output_short_table, output_token_translations): Use it.
21585 (goto_actions): Use output_short_table.
21586
21587 2000-10-16 Akim Demaille <akim@epita.fr>
21588
21589 * src/symtab.c (bucket_new): New function.
21590 (getsym): Use it.
21591
21592 * src/output.c (output_short_table): New argument to display the
21593 comment associated with the table.
21594 Adjust dependencies.
21595 (output_gram): Use it.
21596 (output_rule_data): Nicer output layout for YYTNAME.
21597
21598 2000-10-16 Akim Demaille <akim@epita.fr>
21599
21600 * src/lex.c (read_typename): New function.
21601 (lex): Use it.
21602 * src/reader.c (copy_dollar): Likewise.
21603
21604 2000-10-16 Akim Demaille <akim@epita.fr>
21605
21606 * src/reader.c (copy_comment2): Expect the input stream to be on
21607 the `/' which is suspected to open a comment, instead of being
21608 called after `//' or `/*' was read.
21609 (copy_comment, copy_definition, parse_union_decl, copy_action)
21610 (copy_guard): Adjust.
21611
21612 2000-10-16 Akim Demaille <akim@epita.fr>
21613
21614 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21615 `read_signed_integer'.
21616
21617 2000-10-16 Akim Demaille <akim@epita.fr>
21618
21619 * src/reader.c (copy_dollar): New function.
21620 (copy_guard, copy_action): Use it.
21621
21622 2000-10-16 Akim Demaille <akim@epita.fr>
21623
21624 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21625 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21626 New files, from Fileutils 4.0.27.
21627 * src/main.c (printable_version): Remove.
21628 * src/lex.c, src/reader.c: Use `quote'.
21629
21630 2000-10-04 Akim Demaille <akim@epita.fr>
21631
21632 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21633
21634 2000-10-04 Akim Demaille <akim@epita.fr>
21635
21636 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21637
21638 2000-10-04 Akim Demaille <akim@epita.fr>
21639
21640 When a literal string is used to define two different tokens,
21641 `bison -v' segfaults.
21642 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21643
21644 * tests/regression.m4: New file.
21645 Include the core of the sample provided by Piotr Gackiewicz.
21646 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21647 properly.
21648
21649 2000-10-04 Akim Demaille <akim@epita.fr>
21650
21651 * src/reader.c (parse_expect_decl): Keep `count' within the size
21652 of `buffer'.
21653 From Neil Booth.
21654
21655 2000-10-02 Paul Eggert <eggert@twinsun.com>
21656
21657 * bison.s1 (yyparse): Assign the default value
21658 unconditionally, to avoid a GCC warning and make the parser a
21659 tad smaller.
21660
21661 2000-10-02 Akim Demaille <akim@epita.fr>
21662
21663 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21664 options.
21665
21666 2000-10-02 Akim Demaille <akim@epita.fr>
21667
21668 * src/derives.c, src/print.c, src/reduce.c: To ease the
21669 translation, move some `\n' out of the translated strings.
21670
21671 2000-10-02 Akim Demaille <akim@epita.fr>
21672
21673 The location tracking mechanism is precious for parse error
21674 messages. Nevertheless, it is enabled only when `@n' is used in
21675 the grammar, which is a different issue (you can use it in error
21676 message, but not in the grammar per se). Therefore, there should
21677 be another means to enable it.
21678
21679 * src/getargs.c (getargs): Support `--locations'.
21680 (usage): Report it.
21681 * src/getargs.h (locationsflag): Export it.
21682 * src/lex.c (percent_table): Support `%locations'.
21683 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21684 with `locationsflag'.
21685 * doc/bison.texinfo: Document `--locations' and `%locations'.
21686 Sort the options.
21687 * tests/calc.m4: Test it.
21688
21689 For regularity of the names, replace each
21690 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21691 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21692 In addition replace each `flag' with `_flag'.
21693
21694 2000-10-02 Akim Demaille <akim@epita.fr>
21695
21696 Also test parse error messages, including with YYERROR_VERBOSE.
21697
21698 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21699 associative).
21700 Use it to check the computations.
21701 Use it to check `nonassoc' is honored.
21702 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21703 `--yyerror-verbose'.
21704 (_AT_CHECK_CALC): Adjust to this option.
21705 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21706
21707 2000-10-02 Akim Demaille <akim@epita.fr>
21708
21709 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21710 the latter demonstrates a flaw in the handling of non debugging
21711 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21712 was used in order to simplify:
21713
21714 #if YYDEBUG
21715 if (yydebug)
21716 {
21717 ...
21718 }
21719 #endif
21720
21721 into
21722
21723 if (yydebug)
21724 {
21725 ...
21726 }
21727
21728 unfortunately this leads to a CPP conflict when
21729 `--name-prefix=foo' is used since it produces `#define yydebug
21730 foodebug'.
21731
21732 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21733 (YYDPRINTF): New macro.
21734 Spread its use.
21735 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21736 the bison options.
21737 Also test `--verbose', `--defines' and `--name-prefix'.
21738
21739 2000-10-02 Akim Demaille <akim@epita.fr>
21740
21741 Improve the readability of the produced parsers.
21742
21743 * src/bison.s1: Formatting changes.
21744 Improve the comment related to the `$' mark.
21745 (yydefault): Don't fall through to `yyresume': `goto' there.
21746 * src/output.c (output_parser): When the `$' is met, skip the end
21747 of its line.
21748 New variable, `number_of_dollar_signs', to check there's exactly
21749 one `$' in the parser skeleton.
21750
21751 2000-10-02 Akim Demaille <akim@epita.fr>
21752
21753 * lib/xstrdup.c: New file, from the fileutils.
21754 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21755 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21756 instead of strlen + xmalloc + strcpy.
21757 * src/symtab.c (copys): Remove, use xstrdup instead.
21758
21759 2000-10-02 Akim Demaille <akim@epita.fr>
21760
21761 * src/gram.h (associativity): New enum type which replaces the
21762 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21763 `right_assoc', `left_assoc' and `non_assoc'.
21764 Adjust all dependencies.
21765 * src/reader.c: Formatting changes.
21766 (LTYPESTR): Don't define it, use it as a literal in
21767 `reader_output_yylsp'.
21768 * src/symtab.h (symbol_class): New enum type which replaces the
21769 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21770 `sunknown', `stoken and `snterm'.
21771
21772 2000-10-02 Akim Demaille <akim@epita.fr>
21773
21774 * src/getargs.c (fixed_outfiles): Rename as...
21775 (yaccflag): for consistency and accuracy.
21776 Adjust dependencies.
21777
21778 2000-10-02 Akim Demaille <akim@epita.fr>
21779
21780 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21781 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21782 difficult and introduced a lot of core dump. It turns out that
21783 Bison used an implementation of `xmalloc' based on `calloc', and
21784 at various places it does depend upon the initialization to 0. I
21785 have not tried to isolate the pertinent places, and all the former
21786 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21787 someone should address this issue.
21788
21789 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21790 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21791 files.
21792 Adjust dependencies.
21793 * src/warshall.h: New file.
21794 Propagate.
21795
21796 2000-10-02 Akim Demaille <akim@epita.fr>
21797
21798 Various anti-`extern in *.c' changes.
21799
21800 * src/system.h: Include `assert.h'.
21801
21802 2000-10-02 Akim Demaille <akim@epita.fr>
21803
21804 * src/state.h (nstates, final_state, first_state, first_shift)
21805 (first_reduction): Move their exportation from here...
21806 * src/LR0.h: to here.
21807 Adjust dependencies.
21808 * src/getargs.c (statisticsflag): New variable.
21809 Add support for `--statistics'.
21810 Adjust dependencies.
21811
21812 Remove a lot of now useless `extern' statements in most files.
21813
21814 2000-10-02 Akim Demaille <akim@epita.fr>
21815
21816 * src/LR0.h: New file.
21817 Propagate its use.
21818
21819 2000-10-02 Akim Demaille <akim@epita.fr>
21820
21821 * src/print.h: New file.
21822 Propagate its use.
21823 * src/print.c: Formatting and ordering changes.
21824 (verbose, terse): Replace with...
21825 (print_results): this new function.
21826 Adjust dependencies.
21827
21828 2000-10-02 Akim Demaille <akim@epita.fr>
21829
21830 * src/conflicts.c (conflict_report): New function.
21831 (conflict_log, verbose_conflict_log): Replace with...
21832 (print_conflicts): this function.
21833 Adjust dependencies.
21834 * src/conflicts.h: New file.
21835 Propagate its inclusion.
21836
21837 2000-10-02 Akim Demaille <akim@epita.fr>
21838
21839 * src/nullable.h: New file.
21840 Propagate its inclusion.
21841 * src/nullable.c: Formatting changes.
21842
21843 2000-10-02 Akim Demaille <akim@epita.fr>
21844
21845 * src/reduce.h: New file.
21846 Propagate its inclusion.
21847 * src/reduce.c: Topological sort and other formatting changes.
21848 (bool, TRUE, FALSE): Move their definition to...
21849 * src/system.h: here.
21850
21851 2000-10-02 Akim Demaille <akim@epita.fr>
21852
21853 * src/files.c: Formatting changes.
21854 (tryopen, tryclose, openfiles): Rename as...
21855 (xfopen, xfclose, open_files): this.
21856 (stringappend): static.
21857 * src/files.h: Complete the list of exported symbols.
21858 Propagate its use.
21859
21860 2000-10-02 Akim Demaille <akim@epita.fr>
21861
21862 * src/reader.h: New file.
21863 Propagate its use instead of tedious list of `extern' and
21864 prototypes.
21865 * src/reader.c: Formatting changes, topological sort,
21866 s/register//.
21867
21868 2000-10-02 Akim Demaille <akim@epita.fr>
21869
21870 * src/lex.h: Prototype `lex.c' exported functions.
21871 * src/reader.c: Adjust.
21872 * src/lex.c: Formatting changes.
21873 (safegetc): Rename as...
21874 (xgetc): this.
21875
21876 2000-10-02 Akim Demaille <akim@epita.fr>
21877
21878 * src/lalr.h: New file.
21879 Propagate its inclusion instead of prototypes and `extern'.
21880 * src/lalr.c: Formatting changes, topological sorting etc.
21881
21882 2000-10-02 Akim Demaille <akim@epita.fr>
21883
21884 * src/output.c (token_actions): Introduce a temporary array,
21885 YYDEFACT, that makes it possible for this function to use
21886 output_short_table.
21887
21888 2000-10-02 Akim Demaille <akim@epita.fr>
21889
21890 `user_toknums' is output as a `short[]' in `output.c', while it is
21891 defined as a `int[]' in `reader.c'. For consistency with the
21892 other output tables, `user_toknums' is now defined as a table of
21893 shorts.
21894
21895 * src/reader.c (user_toknums): Be a short table instead of an int
21896 table.
21897 Adjust dependencies.
21898
21899 Factor the short table outputs.
21900
21901 * src/output.c (output_short_table): New function.
21902 * src/output.c (output_gram, output_stos, output_rule_data)
21903 (output_base, output_table, output_check): Use it.
21904
21905 2000-10-02 Akim Demaille <akim@epita.fr>
21906
21907 * src/output.c (output): Topological sort of the functions, in
21908 order to get rid of the `static' prototypes.
21909 No longer use `register'.
21910 * src/output.h: New file.
21911 Propagate its inclusion in files explicitly prototyping functions
21912 from output.c.
21913
21914 2000-09-21 Akim Demaille <akim@epita.fr>
21915
21916 * src/atgeneral.m4: Update from Autoconf.
21917
21918 2000-09-21 Akim Demaille <akim@epita.fr>
21919
21920 * src/closure.h: New file.
21921 * src/closure.c: Formatting changes, topological sort over the
21922 functions, use of closure.h.
21923 (initialize_closure, finalize_closure): Rename as...
21924 (new_closure, free_closure): these. Adjust dependencies.
21925 * src/LR0.c: Formatting changes, topological sort, use of
21926 cloture.h.
21927 (initialize_states): Rename as...
21928 (new_states): this.
21929 * src/Makefile.am (noinst_HEADERS): Adjust.
21930
21931 2000-09-20 Akim Demaille <akim@epita.fr>
21932
21933 * src/acconfig.h: Don't protect config.h against multiple
21934 inclusion.
21935 Don't define PARAMS.
21936 * src/system.h: Define PARAMS.
21937 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
21938 purpose of config.h. system.h must not try to fix wrong
21939 definitions in config.h.
21940
21941 2000-09-20 Akim Demaille <akim@epita.fr>
21942
21943 * src/derives.h: New file.
21944 * src/main.c, src/derives.h: Use it.
21945 Formatting changes.
21946 * src/Makefile.am (noinst_HEADERS): Adjust.
21947
21948 2000-09-20 Akim Demaille <akim@epita.fr>
21949
21950 * tests/atgeneral.m4: Update from Autoconf.
21951 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
21952 (AT_CHECK_CALC): New macros.
21953 Use these macros to test bison with options `', `--raw',
21954 `--debug', `--yacc', `--yacc --debug'.
21955
21956 2000-09-19 Akim Demaille <akim@epita.fr>
21957
21958 * src/output.c: Formatting changes.
21959 * src/machine.h: Remove, leaving its contents in...
21960 * src/system.h: here.
21961 Include stdio.h.
21962 Adjust all dependencies on stdio.h and machine.h.
21963 * src/getargs.h: New file.
21964 Let all `extern' declarations about getargs.c be replaced with
21965 inclusion of `getargs.h'.
21966 * src/Makefile.am (noinst_HEADERS): Adjust.
21967
21968 * tests/calc.m4 (yyin): Be initialized in main, not on the global
21969 scope.
21970 (yyerror): Returns void, not int.
21971 * doc/bison.texinfo: Formatting changes.
21972
21973 2000-09-19 Akim Demaille <akim@epita.fr>
21974
21975 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
21976 portable.
21977
21978 2000-09-18 Akim Demaille <akim@epita.fr>
21979
21980 * configure.in: Append WARNING_CFLAGS to CFLAGS.
21981 * src/Makefile.am (INCLUDES): Don't.
21982 Be ready to fetch headers in lib/.
21983
21984 2000-09-18 Akim Demaille <akim@epita.fr>
21985
21986 * doc/bison.texinfo: Update the copyright.
21987 ANSIfy and GNUify the examples.
21988 Remove the old menu.
21989
21990 2000-09-18 Akim Demaille <akim@epita.fr>
21991
21992 First set of tests: use the `calc' example from the documentation.
21993
21994 * src/bison.s1 (yyparse): Condition the code using `yytname' which
21995 is defined only when YYDEBUG is.
21996 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
21997 * src/files.c (tryopen, tryclose): Formatting changes.
21998 Move to the top and be static.
21999 * src/reader.c (read_signed_integer): Likewise.
22000 * tests/calc.m4: New file.
22001 * Makefile.am, suite.m4: Adjust.
22002 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22003
22004 2000-09-18 Akim Demaille <akim@epita.fr>
22005
22006 Add support for an Autotest test suite for Bison.
22007
22008 * m4/m4.m4, m4/atconfig.m4: New files.
22009 * m4/Makefile.am (EXTRA_DIST): Adjust.
22010 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22011 files.
22012 * src/getargs.c: Display a more standard --version message.
22013 * src/reader.c (reader): Formatting changes.
22014 No longer depend upon VERSION_STRING.
22015 * configure.in: No longer use `dnl'.
22016 Set up the test suite and the new directory `tests/.
22017 (VERSION_STRING): Remove.
22018
22019 2000-04-14 Akim Demaille <akim@epita.fr>
22020
22021 * src/reader.c (copy_comment2): New function, same as former
22022 `copy_comment', but outputs into two FILE *.
22023 (copy_comment): Use it.
22024 (parse_union_decl): Use it.
22025 (get_type, parse_start_decl): Use the same `invalid' message.
22026 (parse_start_decl, parse_union_decl): Use the same `multiple'
22027 message.
22028 (parse_union_decl, copy_guard, copy_action): Use the same
22029 `unmatched' message.
22030 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22031
22032 2000-03-31 Akim Demaille <akim@epita.fr>
22033
22034 * src/files.c (tryopen, tryclose): Move to the top.
22035 Be static.
22036
22037 2000-03-31 Akim Demaille <akim@epita.fr>
22038
22039 * src/main.c (main): Don't call `done', exit does it.
22040
22041 2000-03-31 Akim Demaille <akim@epita.fr>
22042
22043 * allocate.c: s/return (foo)/return foo/.
22044 * lalr.c: Likewise.
22045 * LR0.c: Likewise.
22046 * output.c: Likewise.
22047 * reader.c: Likewise.
22048 * symtab.c: Likewise.
22049 * vmsgetargs.c: Likewise.
22050
22051 2000-03-31 Akim Demaille <akim@epita.fr>
22052
22053 Clean up the error reporting functions.
22054
22055 * src/report.c: New file.
22056 * src/report.h: Likewise.
22057 * src/Makefile.am: Adjust.
22058 * m4/error.m4: New file.
22059 * m4/Makefile.am: Adjust.
22060 * configure.in (jm_PREREQ_ERROR): Call it.
22061 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22062 Remove.
22063 (fatal, fatals): Remove. All callers use complain.c::fatal.
22064 (warn, warni, warns, warnss, warnss): Remove. All callers use
22065 complain.c::complain.
22066 (toomany): Remove, use fatal instead.
22067 * src/files.c (done): No argument, use complain_message_count.
22068 * src/main.c (main): Register `done' to `atexit'.
22069
22070 * src/getargs.c (usage): More `fputs', less `fprintf'.
22071
22072 2000-03-28 Akim Demaille <akim@epita.fr>
22073
22074 * lib/: New directory.
22075 * Makefile.am (SUBDIRS): Adjust.
22076 * configure.in: Adjust.
22077 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22078 useless.
22079 * src/alloca.c: Moved to lib/.
22080 * src/getopt.c: Likewise.
22081 * src/getopt1.c: Likewise.
22082 * src/getopt.h: Likewise.
22083 * src/ansi2knr.c: Likewise.
22084 * src/ansi2knr.1: Likewise.
22085 * src/Makefile.am: Adjust.
22086 * lib/Makefile.am: New file.
22087
22088 2000-03-28 Akim Demaille <akim@epita.fr>
22089
22090 * src/getargs.c (usage): Refresh the help message.
22091
22092 2000-03-17 Akim Demaille <akim@epita.fr>
22093
22094 * src/getopt1.c: Updated from textutils 2.0e
22095 * src/getopt.c: Likewise.
22096 * src/getopt.h: Likewise.
22097
22098 2000-03-17 Akim Demaille <akim@epita.fr>
22099
22100 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22101 the file name, not the whole `#line LINE FILE'.
22102
22103 2000-03-17 Akim Demaille <akim@epita.fr>
22104
22105 On syntax errors, report the token on which we choked.
22106
22107 * src/bison.s1 (yyparse): In the label yyerrlab, when
22108 YYERROR_VERBOSE, add yychar in msg.
22109
22110 2000-03-17 Akim Demaille <akim@epita.fr>
22111
22112 * src/reader.c (copy_at): New function.
22113 (copy_guard): Use it.
22114 (copy_action): Use it.
22115
22116 2000-03-17 Akim Demaille <akim@epita.fr>
22117
22118 Be kind to translators, save some useless translations.
22119
22120 * src/main.c (banner): New function.
22121 (fatal_banner): Use it.
22122 (warn_banner): Use it.
22123
22124 2000-03-17 Akim Demaille <akim@epita.fr>
22125
22126 * src/reader.c (copy_definition): Use copy_string and
22127 copy_comment. Removed now unused `match', `ended',
22128 `cplus_comment'.
22129 (copy_comment, copy_string): Moved, to be visible from
22130 copy_definition.
22131
22132 2000-03-17 Akim Demaille <akim@epita.fr>
22133
22134 * src/reader.c (copy_string): Declare `static inline'. No
22135 problems with inline, since it is checked by configure.
22136 (copy_comment): Likewise.
22137
22138 2000-03-17 Akim Demaille <akim@epita.fr>
22139
22140 * src/reader.c (packsymbols): Formatting changes.
22141
22142 2000-03-17 Akim Demaille <akim@epita.fr>
22143
22144 * src/reader.c (copy_comment): New function, factored out from:
22145 (copy_action): Use it. Removed now unused `match', `ended',
22146 `cplus_comment'.
22147 (copy_guard): Likewise.
22148
22149 2000-03-17 Akim Demaille <akim@epita.fr>
22150
22151 * src/reader.c (copy_string): New function, factored out from:
22152 (copy_action): Use it.
22153 (copy_guard): Likewise.
22154
22155 2000-03-17 Akim Demaille <akim@epita.fr>
22156
22157 Change the handling of @s so that they behave exactly like $s.
22158 There is now a pseudo variable @$ (readble and writable), location
22159 of the lhs of the rule (by default ranging from the location of
22160 the first symbol of the rhs, to the location of the last symbol,
22161 or, if the rhs is empty, YYLLOC).
22162
22163 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22164 yyval.
22165 (yyparse): When providing a default semantic action, provide a
22166 default location action.
22167 (after the $): No longer change `*YYLSP', just stack YYLOC the
22168 same way you stack YYVAL.
22169 * src/reader.c (read_declarations): Use warns.
22170 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22171 (copy_action, case '@'): Likewise.
22172 Use a standard error message, to save useless work from
22173 translators.
22174
22175 2000-03-17 Akim Demaille <akim@epita.fr>
22176
22177 * src/bison.s1: Formatting and cosmetics changes.
22178 * src/reader.c: Likewise.
22179 Update the Copyright notice.
22180
22181 2000-03-17 Akim Demaille <akim@epita.fr>
22182
22183 * src/bison.s1 (#line): All set to `#line' only, since the
22184 Makefile now handles them.
22185
22186 2000-03-16 Akim Demaille <akim@epita.fr>
22187
22188 * src/output.c (output_rule_data): Output the documentation of
22189 some of the tables.
22190 (Copyright notice): Update.
22191 Formatting changes.
22192
22193 2000-03-16 Akim Demaille <akim@epita.fr>
22194
22195 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22196 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22197 One `#if YYDEBUG' remains, since it uses variables which are
22198 defined only if `YYDEBUG != 0'.
22199
22200 2000-03-16 Akim Demaille <akim@epita.fr>
22201
22202 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22203 and related variables so that the similarities are highlighted.
22204
22205 2000-03-16 Akim Demaille <akim@epita.fr>
22206
22207 * src/bison.s1: Properly indent CPP directives.
22208
22209 2000-03-16 Akim Demaille <akim@epita.fr>
22210
22211 * src/bison.s1: Properly indent the `alloca' CPP section.
22212
22213 2000-03-16 Akim Demaille <akim@epita.fr>
22214
22215 Do not hard code values of directories in `configure.in'.
22216 Update the `configure' tool chain.
22217
22218 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22219 src/makefile.am.
22220 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22221 (AC_OUTPUT): Add m4/Makefile.
22222 Bump to bison 1.28a, 1.29 has never been released.
22223 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22224 handled via src/Makefile.am.
22225 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22226 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22227 autoheader.
22228 * Makefile.am (SUBDIRS): Add m4.
22229 (ACLOCAL_AM_FLAGS): New variable.
22230 (AUTOMAKE_OPTIONS): Add check-news.
22231 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22232 the proper line number and file name.
22233 (DEFS): Propagate the location of bison library files and of the
22234 locale files.
22235 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22236 builddir.
22237 * acinclude.m4: Remove, replaced by the directory m4.
22238 * m4/Makefile.am (EXTRA_DIST): New variable.
22239 * m4/gettext.m4: New file, from the fileutils.
22240 * m4/lcmessage.m4: Likewise
22241 * m4/progtest.m4: Likewise.
22242 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22243
22244 2000-03-10 Akim Demaille <akim@epita.fr>
22245
22246 * src/closure.c:
22247 Formatting changes of various comments.
22248 Respect the GNU coding standards at various places.
22249 Don't use `_()' when no translation is needed.
22250
22251 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22252
22253 * src/files.c:
22254 OS/2 honors TMPDIR environment variable.
22255
22256 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22257
22258 * doc/bison.texinfo: Tweaked spelling and grammar.
22259 Updated ISBN.
22260 Removed reference to price of printed copy.
22261 Mention BISON_SIMPLE and BISON_HAIRY.
22262
22263 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22264
22265 * configure.in, NEWS:
22266 Bison 1.29 released.
22267
22268 1999-10-27 Jesse Thilo <jthilo@gnu.org>
22269
22270 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22271 Added reference card.
22272
22273 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22274
22275 * po/ru.po: Added Russian translation.
22276
22277 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22278
22279 * configure.in: Added Russian translation.
22280
22281 1999-07-06 Jesse Thilo <jthilo@gnu.org>
22282
22283 * configure.in, NEWS, README:
22284 Released version 1.28.
22285
22286 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22287
22288 * src/system.h:
22289 Squashed redefinition warning on some systems.
22290
22291 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22292 Have configure build version string instead of relying on ANSI string
22293 concatentation.
22294
22295 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22296
22297 * po/POTFILES.in: Got rid of version.c.
22298
22299 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22300
22301 * acconfig.h, configure.in:
22302 Have configure build version string instead of relying on ANSI string
22303 concatentation.
22304
22305 1999-06-08 Jesse Thilo <jthilo@gnu.org>
22306
22307 * doc/bison.1:
22308 Dropped mention of `+' for long-named options.
22309
22310 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22311
22312 * src/files.c: Added <unistd.h> for unlink().
22313
22314 * src/Makefile.am, src/system.h:
22315 I18n fixes.
22316
22317 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22318
22319 * README: Added a FAQ list.
22320
22321 * configure.in, acconfig.h:
22322 I18n fixes.
22323
22324 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22325
22326 * doc/FAQ, doc/Makefile.am:
22327 Added a FAQ list.
22328
22329 1999-05-19 Jesse Thilo <jthilo@gnu.org>
22330
22331 * src/alloc.h, src/symtab.h, src/version.c:
22332 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22333
22334 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22335
22336 * src/.cvsignore, src/Makefile.am:
22337 Reorganized: sources in `src', documentation in `doc'.
22338
22339 * src/lex.c (literalchar):
22340 fixed the code for escaping double quotes (thanks
22341 Jonathan Czisny.)
22342
22343 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22344
22345 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22346 Adjusted paths to reflect directory reorganization.
22347
22348 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22349
22350 * doc/.cvsignore, doc/Makefile.am:
22351 Reorganized: sources in `src', documentation in `doc'.
22352
22353 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22354
22355 * configure.in:
22356 Updated AC_INIT file to reflect directory reorganization.
22357
22358 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22359 Reorganized: sources in `src', documentation in `doc'.
22360
22361 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22362
22363 * src/allocate.c:
22364 Don't declare calloc() and realloc() if not necessary.
22365
22366 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22367
22368 * configure.in, acconfig.h, acinclude.m4:
22369 Don't declare calloc() and realloc() if not necessary.
22370
22371 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22372
22373 * po/.cvsignore: Added i18n support.
22374
22375 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22376
22377 * acconfig.h, configure.in, Makefile.am:
22378 Added i18n support.
22379
22380 1999-03-22 Jesse Thilo <jthilo@gnu.org>
22381
22382 * src/bison.s1: Fixed #line numbers.
22383
22384 1999-03-15 Jesse Thilo <jthilo@gnu.org>
22385
22386 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22387 Added PO files from Translation Project.
22388
22389 1999-03-03 Jesse Thilo <jthilo@gnu.org>
22390
22391 * Makefile.am:
22392 Added support for non-ANSI compilers (ansi2knr).
22393
22394 1999-02-16 Jesse Thilo <jthilo@gnu.org>
22395
22396 * configure.in: Bumped version number to 1.27.
22397
22398 * Makefile.am:
22399 Added `bison.simple' to list of files removed by `make distclean'.
22400
22401 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22402
22403 * src/files.c, src/files.h:
22404 Defined locations of parser files in config.h instead of Makefile.
22405
22406 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22407
22408 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22409 Defined locations of parser files in config.h instead of Makefile.
22410
22411 1999-02-09 Jesse Thilo <jthilo@gnu.org>
22412
22413 * Makefile.am:
22414 Removed inappropriate use of $< macro.
22415
22416 1999-02-05 Jesse Thilo <jthilo@gnu.org>
22417
22418 * po/Makefile.in.in, po/POTFILES.in:
22419 Add `po' directory skeleton.
22420
22421 1999-01-27 Jesse Thilo <jthilo@gnu.org>
22422
22423 * README: Document help-bison list.
22424
22425 * configure.in: Add check for mkstemp().
22426
22427 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22428
22429 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22430 Hush a few compiler warnings.
22431
22432 * src/files.c:
22433 Add tryclose(), which verifies that fclose was successful.
22434 Hush a couple of compiler warnings.
22435
22436 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22437
22438 * Makefile.am, OChangeLog:
22439 ChangeLog is now automatically generated. Include the old version as
22440 OChangeLog.
22441
22442 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22443
22444 * 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:
22445 Update FSF address.
22446
22447 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22448
22449 * doc/bison.texinfo: Fix formatting glitch.
22450
22451 * doc/bison.texinfo: Update FSF address.
22452
22453 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22454
22455 * acconfig.h: Update FSF address.
22456
22457 1999-01-08 Jesse Thilo <jthilo@gnu.org>
22458
22459 * src/system.h:
22460 Don't define PACKAGE here, since config.h defines it.
22461
22462 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22463
22464 * src/reader.c: Update copyright date.
22465
22466 * src/main.c:
22467 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22468 favor of output directly to stderr (avoids buffer overruns).
22469
22470 * src/reader.c: Some checks for premature EOF.
22471
22472 * 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:
22473 Use prototypes if the compiler understands them.
22474
22475 * src/files.c: Honor TMPDIR on Unix hosts.
22476 Use prototypes if the compiler understands them.
22477
22478 * src/reader.c:
22479 Fix a couple of buffer overrun bugs.
22480 Use prototypes if the compiler understands them.
22481
22482 * src/system.h: Include unistd.h and ctype.h.
22483 Use #ifdef instead of #if for NLS symbols.
22484
22485 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22486
22487 * doc/bison.texinfo:
22488 Delete comment "consider using @set for edition number, etc..." since
22489 we now are doing so.
22490
22491 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22492
22493 * configure.in:
22494 Use prototypes if the compiler understands them.
22495
22496 * NEWS: Document 1.26 highlights.
22497
22498 * Makefile.am: Require Automake 1.3 or later.
22499
22500 * acconfig.h:
22501 Use prototypes if the compiler understands them.
22502
22503 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22504
22505 * src/version.c:
22506 Use VERSION symbol from automake for version number.
22507
22508 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22509
22510 * acconfig.h, configure.in, version.cin:
22511 Use VERSION symbol from automake for version number.
22512
22513 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22514
22515 * Makefile.am:
22516 Distribute original version of simple parser (bison.s1), not built
22517 version (bison.simple).
22518
22519 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22520
22521 * doc/bison.texinfo: Add info dir entry.
22522
22523 * doc/bison.texinfo:
22524 Let automake put version number into documentation.
22525
22526 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22527
22528 * src/bison.cld, src/build.com, src/vmshlp.mar:
22529 Add non-RCS files from /gd/gnu/bison.
22530
22531 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22532
22533 * doc/bison.1:
22534 Document the BISON_HAIRY and BISON_SIMPLE variables.
22535
22536 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22537
22538 * src/version.c: Build version.c automatically.
22539
22540 * src/reader.c:
22541 Fix token numbering (used to start at 258, not 257).
22542
22543 * src/system.h: Include config.h.
22544
22545 * src/getargs.c: Update bug report address.
22546
22547 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22548 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22549
22550 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22551
22552 * Makefile.am:
22553 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22554
22555 * configure.in, version.cin:
22556 Build version.c automatically.
22557
22558 * AUTHORS: Add AUTHORS file.
22559
22560 * README: Update bug report address.
22561
22562 * bison.simple:
22563 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22564
22565 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22566 Add automake stuff.
22567
22568 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22569
22570 * doc/bison.texinfo: Clean up some formatting.
22571
22572 1998-05-05 Richard Stallman <rms@gnu.org>
22573
22574 * doc/bison.texinfo:
22575 Explain better why to make a pure parser.
22576
22577 1998-01-05 Richard Stallman <rms@gnu.org>
22578
22579 * src/files.c (openfiles):
22580 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22581 find a temporary directory, if possible. Do not unlink files while
22582 they are open.
22583
22584 1997-08-25 Richard Stallman <rms@gnu.org>
22585
22586 * src/reader.c (stack_offset;):
22587 Change some warni to warns.
22588
22589 * src/lex.c (literalchar): Use warns, not warni.
22590
22591 1997-06-28 Richard Stallman <rms@gnu.org>
22592
22593 * src/bison.s1: Add a Bison version comment.
22594
22595 * src/main.c (fatal, warn, berror):
22596 Use program_name.
22597
22598 1997-06-28 Richard Stallman <rms@gnu.org>
22599
22600 * Makefile.in (bison_version): New variable.
22601 (dist): Use that variable.
22602 (bison.s1): Substitute the Bison version into bison.simple.
22603
22604 * bison.simple: Add a Bison version comment.
22605
22606 1997-06-18 Richard Stallman <rms@gnu.org>
22607
22608 * src/main.c (fatal, warn, berror):
22609 Make error messages standard.
22610 (toomany): Improve error message text.
22611
22612 * 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:
22613 new.h renamed to alloc.h.
22614
22615 1997-06-18 Richard Stallman <rms@gnu.org>
22616
22617 * Makefile.in: new.h renamed to alloc.h.
22618
22619 1997-05-24 Richard Stallman <rms@gnu.org>
22620
22621 * src/lex.c (literalchar):
22622 Fix the code for escaping \, " and '.
22623
22624 (lex): Avoid trouble when there are many chars
22625 to discard in a char literal with just several chars in it.
22626
22627 1997-05-17 Richard Stallman <rms@gnu.org>
22628
22629 * src/bison.s1:
22630 Use malloc, if using alloca is troublesome.
22631 (YYSTACK_USE_ALLOCA): New flag macro.
22632 Define it for some systems and compilers.
22633 (YYSTACK_ALLOC): New macro.
22634 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22635 If it was malloc'd, free it.
22636
22637 1997-05-17 Richard Stallman <rms@gnu.org>
22638
22639 * bison.simple:
22640 Use malloc, if using alloca is troublesome.
22641 (YYSTACK_USE_ALLOCA): New flag macro.
22642 Define it for some systems and compilers.
22643 (YYSTACK_ALLOC): New macro.
22644 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22645 If it was malloc'd, free it.
22646
22647 1997-04-23 Richard Stallman <rms@gnu.org>
22648
22649 * src/bison.s1:
22650 (alloca) [__hpux]: Always define as __builtin_alloca.
22651
22652 1997-04-23 Richard Stallman <rms@gnu.org>
22653
22654 * bison.simple:
22655 (alloca) [__hpux]: Always define as __builtin_alloca.
22656
22657 1997-04-22 Richard Stallman <rms@gnu.org>
22658
22659 * src/bison.s1:
22660 [__hpux]: Include alloca.h (right for HPUX 10)
22661 instead of declaring alloca (right for HPUX 9).
22662
22663 * src/bison.s1 (__yy_memcpy):
22664 Declare arg `count' as unsigned int.
22665 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22666
22667 1997-04-22 Richard Stallman <rms@gnu.org>
22668
22669 * bison.simple:
22670 [__hpux]: Include alloca.h (right for HPUX 10)
22671 instead of declaring alloca (right for HPUX 9).
22672
22673 * bison.simple (__yy_memcpy):
22674 Declare arg `count' as unsigned int.
22675 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22676
22677 1997-01-03 Richard Stallman <rms@gnu.org>
22678
22679 * src/allocate.c: [__STDC__ or _MSC_VER]:
22680 Declare calloc and realloc to return void *.
22681
22682 1997-01-02 Richard Stallman <rms@gnu.org>
22683
22684 * src/system.h:
22685 [_MSC_VER]: Include stdlib.h and process.h.
22686 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22687
22688 * src/main.c (main): Return FAILURE as a value.
22689 (printable_version): Declare arg as int, not char.
22690
22691 1997-01-02 Richard Stallman <rms@gnu.org>
22692
22693 * Makefile.in (dist):
22694 Explicitly check for symlinks, and copy them.
22695
22696 1996-12-19 Richard Stallman <rms@gnu.org>
22697
22698 * src/files.c:
22699 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22700
22701 1996-12-18 Paul Eggert <eggert@gnu.org>
22702
22703 * src/bison.s1 (yyparse):
22704 If __GNUC__ and YYPARSE_PARAM are both defined,
22705 declare yyparse to have a void * argument.
22706
22707 1996-12-18 Paul Eggert <eggert@gnu.org>
22708
22709 * bison.simple (yyparse):
22710 If __GNUC__ and YYPARSE_PARAM are both defined,
22711 declare yyparse to have a void * argument.
22712
22713 1996-12-17 Richard Stallman <rms@gnu.org>
22714
22715 * src/reduce.c (nbits): Add some casts.
22716
22717 1996-08-12 Richard Stallman <rms@gnu.org>
22718
22719 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22720
22721 1996-08-12 Richard Stallman <rms@gnu.org>
22722
22723 * bison.simple: Test _MSDOS as well as _MSDOS_.
22724
22725 1996-07-31 Richard Stallman <rms@gnu.org>
22726
22727 * src/bison.s1:
22728 [__sun && __i386]: Include alloca.h.
22729
22730 1996-07-31 Richard Stallman <rms@gnu.org>
22731
22732 * bison.simple:
22733 [__sun && __i386]: Include alloca.h.
22734
22735 1996-07-30 Richard Stallman <rms@gnu.org>
22736
22737 * src/bison.s1: Comment change.
22738
22739 * src/bison.s1: Test _MSDOS_, not MSDOS.
22740
22741 1996-07-30 Richard Stallman <rms@gnu.org>
22742
22743 * bison.simple: Comment change.
22744
22745 * bison.simple: Test _MSDOS_, not MSDOS.
22746
22747 1996-06-01 Richard Stallman <rms@gnu.org>
22748
22749 * 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:
22750 Insert `_' macro around many string constants.
22751
22752 * src/main.c:
22753 Insert `_' macro around many string constants.
22754
22755 (main): Call setlocale, bindtextdomain and textdomain.
22756
22757 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22758 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22759 [ENABLE_NLS]: Include libintl.h.
22760 [ENABLE_NLS] (gettext): Define.
22761 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22762 (N_, PACKAGE, LOCALEDIR): New macros.
22763
22764 1996-06-01 Richard Stallman <rms@gnu.org>
22765
22766 * POTFILES.in: New file.
22767
22768 * Makefile.in (allocate.o):
22769 Define target explicitly.
22770
22771 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22772 (LDFLAGS): Set to @LDFLAGS@.
22773 (configure): Run autoconf only if preceding `cd' succeeds.
22774 (bison.s1): Redirect output to temporary file then move the
22775 temporary to the target, rather than redirecting directly to bison.s1.
22776 (clean): Remove config.status and config.log.
22777 (distclean): Don't remove config.status here.
22778
22779 1996-05-12 Richard Stallman <rms@gnu.org>
22780
22781 * src/bison.s1:
22782 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22783
22784 1996-05-12 Richard Stallman <rms@gnu.org>
22785
22786 * bison.simple:
22787 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22788
22789 1996-05-11 Richard Stallman <rms@gnu.org>
22790
22791 * src/bison.s1 (__yy_memcpy):
22792 Really reorder the args, as was supposedly done on Feb 14 1995.
22793 (yyparse): Calls changed accordingly.
22794
22795 1996-05-11 Richard Stallman <rms@gnu.org>
22796
22797 * Makefile.in (dist): Don't use $(srcdir).
22798
22799 * bison.simple (__yy_memcpy):
22800 Really reorder the args, as was supposedly done on Feb 14 1995.
22801 (yyparse): Calls changed accordingly.
22802
22803 1996-01-27 Richard Stallman <rms@gnu.org>
22804
22805 * src/output.c (output_rule_data):
22806 Test YYERROR_VERBOSE in the conditional
22807 around the definition of ttyname.
22808
22809 1995-12-29 Richard Stallman <rms@gnu.org>
22810
22811 * src/bison.s1:
22812 Fix line numbers in #line commands.
22813
22814 1995-12-29 Richard Stallman <rms@gnu.org>
22815
22816 * bison.simple:
22817 Fix line numbers in #line commands.
22818
22819 1995-12-27 Richard Stallman <rms@gnu.org>
22820
22821 * src/bison.s1 (YYPARSE_PARAM_DECL):
22822 In C++, make it always null.
22823 (YYPARSE_PARAM_ARG): New macro.
22824 (yyparse): Use YYPARSE_PARAM_ARG.
22825
22826 1995-12-27 Richard Stallman <rms@gnu.org>
22827
22828 * bison.simple (YYPARSE_PARAM_DECL):
22829 In C++, make it always null.
22830 (YYPARSE_PARAM_ARG): New macro.
22831 (yyparse): Use YYPARSE_PARAM_ARG.
22832
22833 1995-11-29 Richard Stallman <rms@gnu.org>
22834
22835 * doc/bison.texinfo:
22836 Describe literal string tokens, %raw, %no_lines, %token_table.
22837
22838 1995-11-29 Daniel Hagerty <hag@gnu.org>
22839
22840 * doc/bison.texinfo: Fixed update date
22841
22842 1995-10-16 Richard Stallman <rms@gnu.org>
22843
22844 * src/version.c: Version 1.25.
22845
22846 1995-10-16 Richard Stallman <rms@gnu.org>
22847
22848 * NEWS: *** empty log message ***
22849
22850 1995-10-16 Richard Stallman <rms@gnu.org>
22851
22852 * doc/bison.1, doc/bison.rnh:
22853 Add new options.
22854
22855 1995-10-15 Richard Stallman <rms@gnu.org>
22856
22857 * src/vmsgetargs.c, src/getargs.c:
22858 Added -n, -k, and -raw switches.
22859 (noparserflag, toknumflag, rawtoknumflag): New variables.
22860
22861 * src/symtab.h (SALIAS):
22862 New #define for adding aliases to %token.
22863 (struct bucket): Added `alias' field.
22864
22865 * src/reduce.c (reduce_grammar):
22866 Revise error message.
22867 (print_notices): Remove final `.' from error message.
22868
22869 * src/reader.c (reader_output_yylsp):
22870 New function.
22871 (readgram): Use `#if 0' around code that accepted %command
22872 inside grammar rules: The documentation doesn't allow it,
22873 and it will fail since the %command processors scan for the next %.
22874 (parse_token_decl): Extended the %token
22875 declaration to allow a multi-character symbol as an alias.
22876 (parse_thong_decl): New function.
22877 (read_declarations): Added %thong declarations.
22878 (read_declarations): Handle NOOP to deal with allowing
22879 % declarations as another means to specify the flags.
22880 (readgram): Allow %prec prior to semantics embedded in a rule.
22881 (skip_to_char, read_declarations, copy_definition)
22882 (parse_token_decl, parse_start_decl, parse_type_decl)
22883 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22884 (get_type_name, copy_guard, copy_action, readgram)
22885 (get_type, packsymbols): Revised most error messages.
22886 Changed `fatal' to `warnxxx' to avoid aborting for error.
22887 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22888 (read_declarations): Improve the error message for
22889 an invalid character. Do not abort.
22890 (read_declarations, copy_guard, copy_action): Use
22891 printable_version to avoid unprintable characters in printed output.
22892 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22893 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22894 Allow the type of a non-terminal can be given
22895 more than once, as long as all specifications give the same type.
22896
22897 * src/output.c:
22898 (output_headers, output_trailers, output, output_gram)
22899 (output_rule_data): Implement noparserflag variable.
22900 Implement toknumflag variable.
22901 (output): Call reader_output_yylsp to output LTYPESTR.
22902
22903 * src/main.c (main):
22904 If reader sees an error, don't process the grammar.
22905 (fatals): Updated to not use VARARGS1.
22906 (printable_version, int_to_string, warn, warni, warns, warnss)
22907 (warnsss): New error reporting functions. Avoid abort for error.
22908
22909 * src/lex.h:
22910 Added THONG and NOOP for alias processing.
22911 Added SETOPT for the new code that allows setting options with %flags.
22912
22913 * src/lex.c:
22914 Include getopt.h. Add some extern decls.
22915 (safegetc): New function to deal with EOF gracefully.
22916 (literalchar); new function to deal with reading \ escapes.
22917 (lex): Use literalchar.
22918 (lex): Implemented "..." tokens.
22919 (literalchar, lex, parse_percent_token): Made tokenbuffer
22920 always contain the token. This includes growing the token
22921 buffer while reading an integer.
22922 (parse_percent_token): Replaced if-else statement with percent_table.
22923 (parse_percent_token): Added % declarations as another
22924 way to specify the flags -n, -l, and -r. Also added hooks for
22925 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
22926 major changes to files.c.
22927 (lex) Retain in the incoming stream a character following
22928 an incorrect '/'.
22929 (skip_white_space, lex): Revised most error messages
22930 and changed fatal to warn to avoid aborting.
22931 (percent_table): Added %thong declarations.
22932
22933 * src/gram.h: Comment changes.
22934
22935 * src/files.c (openfiles, open_extra_files, done):
22936 Add faction flag
22937 and actfile file. Handle noparserflag. Both for -n switch.
22938
22939 * src/conflicts.c (resolve_sr_conflict):
22940 Remove use of alloca.
22941
22942 1995-06-01 Jim Meyering <meyering@gnu.org>
22943
22944 * doc/bison.texinfo: *** empty log message ***
22945
22946 1995-05-06 Richard Stallman <rms@gnu.org>
22947
22948 * src/bison.s1: Comment change.
22949
22950 1995-05-06 Richard Stallman <rms@gnu.org>
22951
22952 * bison.simple: Comment change.
22953
22954 1995-05-03 Richard Stallman <rms@gnu.org>
22955
22956 * src/version.c: Version now 1.24.
22957
22958 * src/bison.s1: Change distribution terms.
22959
22960 * src/version.c: Version now 1.23.
22961
22962 1995-05-03 Richard Stallman <rms@gnu.org>
22963
22964 * doc/bison.texinfo:
22965 Rewrite "Conditions for Using Bison".
22966 Update version to 1.24.
22967
22968 1995-05-03 Richard Stallman <rms@gnu.org>
22969
22970 * bison.simple: Change distribution terms.
22971
22972 1995-02-23 Richard Stallman <rms@gnu.org>
22973
22974 * src/files.c: Test __VMS_POSIX as well as VMS.
22975
22976 1995-02-14 Jim Meyering <meyering@gnu.org>
22977
22978 * src/bison.s1 (__yy_memcpy):
22979 Renamed from __yy_bcopy to avoid
22980 confusion. Reverse FROM and TO arguments to be consistent with
22981 those of memcpy.
22982
22983 1995-02-14 Jim Meyering <meyering@gnu.org>
22984
22985 * bison.simple (__yy_memcpy):
22986 Renamed from __yy_bcopy to avoid
22987 confusion. Reverse FROM and TO arguments to be consistent with
22988 those of memcpy.
22989
22990 1994-11-10 David J. MacKenzie <djm@gnu.org>
22991
22992 * NEWS: reformat
22993
22994 * NEWS: New file.
22995
22996 * Makefile.in (DISTFILES): Include NEWS.
22997
22998 * Makefile.in (DISTFILES):
22999 Include install-sh, not install.sh.
23000
23001 * configure.in: Update to Autoconf v2 macro names.
23002
23003 1994-10-05 David J. MacKenzie <djm@gnu.org>
23004
23005 * Makefile.in: fix typo
23006
23007 * Makefile.in (prefix, exec_prefix):
23008 Let configure set them.
23009
23010 1994-09-28 David J. MacKenzie <djm@gnu.org>
23011
23012 * Makefile.in: Set datadir to $(prefix)/share.
23013
23014 1994-09-15 Richard Stallman <rms@gnu.org>
23015
23016 * src/bison.s1:
23017 Update copyright notice and GPL version.
23018
23019 1994-09-15 Richard Stallman <rms@gnu.org>
23020
23021 * bison.simple:
23022 Update copyright notice and GPL version.
23023
23024 1994-07-12 Richard Stallman <rms@gnu.org>
23025
23026 * src/reduce.c, src/reader.c:
23027 entered into RCS
23028
23029 1994-05-05 David J. MacKenzie <djm@gnu.org>
23030
23031 * Makefile.in: entered into RCS
23032
23033 1994-03-26 Richard Stallman <rms@gnu.org>
23034
23035 * src/bison.s1: entered into RCS
23036
23037 1994-03-26 Richard Stallman <rms@gnu.org>
23038
23039 * bison.simple: entered into RCS
23040
23041 1994-03-25 Richard Stallman <rms@gnu.org>
23042
23043 * src/main.c: entered into RCS
23044
23045 1994-03-24 Richard Stallman <rms@gnu.org>
23046
23047 * src/conflicts.c: entered into RCS
23048
23049 1994-01-02 Richard Stallman <rms@gnu.org>
23050
23051 * Makefile.in: *** empty log message ***
23052
23053 1993-11-21 Richard Stallman <rms@gnu.org>
23054
23055 * src/bison.s1: *** empty log message ***
23056
23057 1993-11-21 Richard Stallman <rms@gnu.org>
23058
23059 * doc/bison.texinfo: entered into RCS
23060
23061 * doc/bison.texinfo: *** empty log message ***
23062
23063 1993-11-21 Richard Stallman <rms@gnu.org>
23064
23065 * bison.simple: *** empty log message ***
23066
23067 1993-10-25 David J. MacKenzie <djm@gnu.org>
23068
23069 * doc/bison.texinfo: *** empty log message ***
23070
23071 1993-10-19 Richard Stallman <rms@gnu.org>
23072
23073 * src/bison.s1: *** empty log message ***
23074
23075 1993-10-19 Richard Stallman <rms@gnu.org>
23076
23077 * bison.simple: *** empty log message ***
23078
23079 1993-10-14 Richard Stallman <rms@gnu.org>
23080
23081 * src/bison.s1: *** empty log message ***
23082
23083 1993-10-14 Richard Stallman <rms@gnu.org>
23084
23085 * bison.simple: *** empty log message ***
23086
23087 1993-09-14 David J. MacKenzie <djm@gnu.org>
23088
23089 * doc/bison.texinfo: *** empty log message ***
23090
23091 1993-09-13 Noah Friedman <friedman@gnu.org>
23092
23093 * Makefile.in: *** empty log message ***
23094
23095 1993-09-10 Richard Stallman <rms@gnu.org>
23096
23097 * src/conflicts.c: *** empty log message ***
23098
23099 * src/system.h: entered into RCS
23100
23101 1993-09-10 Richard Stallman <rms@gnu.org>
23102
23103 * doc/bison.1: entered into RCS
23104
23105 1993-09-06 Noah Friedman <friedman@gnu.org>
23106
23107 * src/version.c: entered into RCS
23108
23109 1993-09-06 Noah Friedman <friedman@gnu.org>
23110
23111 * Makefile.in: *** empty log message ***
23112
23113 1993-07-30 David J. MacKenzie <djm@gnu.org>
23114
23115 * Makefile.in: *** empty log message ***
23116
23117 1993-07-24 Richard Stallman <rms@gnu.org>
23118
23119 * src/bison.s1: *** empty log message ***
23120
23121 1993-07-24 Richard Stallman <rms@gnu.org>
23122
23123 * bison.simple: *** empty log message ***
23124
23125 1993-07-08 David J. MacKenzie <djm@gnu.org>
23126
23127 * Makefile.in: *** empty log message ***
23128
23129 1993-07-04 Richard Stallman <rms@gnu.org>
23130
23131 * src/bison.s1: *** empty log message ***
23132
23133 1993-07-04 Richard Stallman <rms@gnu.org>
23134
23135 * bison.simple: *** empty log message ***
23136
23137 1993-06-26 David J. MacKenzie <djm@gnu.org>
23138
23139 * src/getargs.c: entered into RCS
23140
23141 1993-06-26 David J. MacKenzie <djm@gnu.org>
23142
23143 * doc/bison.texinfo: *** empty log message ***
23144
23145 * doc/bison.1: New file.
23146
23147 1993-06-25 Richard Stallman <rms@gnu.org>
23148
23149 * src/getargs.c: New file.
23150
23151 1993-06-16 Richard Stallman <rms@gnu.org>
23152
23153 * src/bison.s1: *** empty log message ***
23154
23155 1993-06-16 Richard Stallman <rms@gnu.org>
23156
23157 * bison.simple: *** empty log message ***
23158
23159 1993-06-03 Richard Stallman <rms@gnu.org>
23160
23161 * src/bison.s1: New file.
23162
23163 1993-06-03 Richard Stallman <rms@gnu.org>
23164
23165 * doc/bison.texinfo: *** empty log message ***
23166
23167 1993-06-03 Richard Stallman <rms@gnu.org>
23168
23169 * bison.simple: New file.
23170
23171 1993-05-19 Richard Stallman <rms@gnu.org>
23172
23173 * doc/bison.texinfo: New file.
23174
23175 1993-05-07 Noah Friedman <friedman@gnu.org>
23176
23177 * Makefile.in: *** empty log message ***
23178
23179 1993-04-28 Noah Friedman <friedman@gnu.org>
23180
23181 * src/reader.c: *** empty log message ***
23182
23183 1993-04-23 Noah Friedman <friedman@gnu.org>
23184
23185 * src/alloc.h: entered into RCS
23186
23187 1993-04-20 David J. MacKenzie <djm@gnu.org>
23188
23189 * src/version.c: *** empty log message ***
23190
23191 * src/files.c, src/allocate.c:
23192 entered into RCS
23193
23194 * src/reader.c: *** empty log message ***
23195
23196 * src/lex.c: entered into RCS
23197
23198 * src/conflicts.c: New file.
23199
23200 * src/symtab.c: entered into RCS
23201
23202 * src/alloc.h: New file.
23203
23204 * src/LR0.c: entered into RCS
23205
23206 1993-04-18 Noah Friedman <friedman@gnu.org>
23207
23208 * src/reader.c: New file.
23209
23210 * src/version.c: *** empty log message ***
23211
23212 1993-04-18 Noah Friedman <friedman@gnu.org>
23213
23214 * Makefile.in: *** empty log message ***
23215
23216 1993-04-17 Noah Friedman <friedman@gnu.org>
23217
23218 * Makefile.in: *** empty log message ***
23219
23220 1993-04-15 Richard Stallman <rms@gnu.org>
23221
23222 * src/main.c, src/files.c:
23223 New file.
23224
23225 1993-04-15 Noah Friedman <friedman@gnu.org>
23226
23227 * configure.in: entered into RCS
23228
23229 * configure.in: *** empty log message ***
23230
23231 * configure.in: New file.
23232
23233 1993-04-14 Richard Stallman <rms@gnu.org>
23234
23235 * Makefile.in: New file.
23236
23237 1993-04-13 Richard Stallman <rms@gnu.org>
23238
23239 * src/version.c: New file.
23240
23241 1993-03-25 Richard Stallman <rms@gnu.org>
23242
23243 * src/output.c: entered into RCS
23244
23245 1992-09-25 Richard Stallman <rms@gnu.org>
23246
23247 * configure.bat: entered into RCS
23248
23249 1992-06-22 Richard Stallman <rms@gnu.org>
23250
23251 * src/vmsgetargs.c: entered into RCS
23252
23253 1992-06-22 Richard Stallman <rms@gnu.org>
23254
23255 * doc/bison.rnh: entered into RCS
23256
23257 1992-04-20 David J. MacKenzie <djm@gnu.org>
23258
23259 * README: entered into RCS
23260
23261 1992-01-22 Richard Stallman <rms@gnu.org>
23262
23263 * src/machine.h: entered into RCS
23264
23265 1991-12-21 Richard Stallman <rms@gnu.org>
23266
23267 * src/lalr.c, src/closure.c:
23268 entered into RCS
23269
23270 1991-12-20 Richard Stallman <rms@gnu.org>
23271
23272 * src/state.h: entered into RCS
23273
23274 1991-12-18 Richard Stallman <rms@gnu.org>
23275
23276 * src/print.c, src/nullable.c, src/derives.c:
23277 entered into RCS
23278
23279 1991-11-03 David J. MacKenzie <djm@gnu.org>
23280
23281 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23282 entered into RCS
23283
23284 1988-09-09 Richard Stallman <rms@gnu.org>
23285
23286 * src/bison.hairy: entered into RCS
23287
23288 1987-12-16 Richard Stallman <rms@gnu.org>
23289
23290 * REFERENCES: entered into RCS
23291
23292
23293 -----
23294
23295 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
23296 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
23297 2008, 2009 Free Software Foundation, Inc.
23298
23299 Copying and distribution of this file, with or without
23300 modification, are permitted provided the copyright notice and this
23301 notice are preserved.