]> git.saurik.com Git - bison.git/blob - ChangeLog
d838b483ed3f8fa68309ad132727ae223d23a062
[bison.git] / ChangeLog
1 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Pacify ./configure --enable-gcc-warnings.
4 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
5 in lib won't compile with it.
6 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
7
8 2009-03-31 Akim Demaille <demaille@gostai.com>
9
10 bootstrap: --help to stdout.
11 * bootstrap (usage): Don't send --help to stderr.
12 Use a here doc instead of a long string.
13
14 2009-03-31 Akim Demaille <demaille@gostai.com>
15
16 bootstrap: README-hacking no longer exists
17 * bootstrap (checkout_only_file): Set to HACKING.
18
19 2009-03-26 Akim Demaille <demaille@gostai.com>
20
21 doc: merge HACKING and README-hacking.
22 Two files is confusing.
23 Reported by Alexandre Duret-Lutz.
24
25 * README-hacking: Merge into...
26 * HACKING (Working from the repository): here.
27
28 2009-03-26 Akim Demaille <demaille@gostai.com>
29
30 doc: update README-hacking.
31 * README-hacking: We now use git and git submodules.
32 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
33
34 2009-03-26 Akim Demaille <demaille@gostai.com>
35
36 lalr1.cc: avoid GCC 4.3 warnings.
37 GCC 4.3 now warns about "a || b && c" and asks for explicit
38 parentheses.
39 Reported by Alexandre Duret-Lutz.
40 * data/location.cc: Update copyright years.
41 (Position::operator==): Use parens to make precedence explicit.
42 Compare lines and columns first, as they are more likely to be
43 different, and they are faster to compare.
44
45 2009-03-26 Akim Demaille <demaille@gostai.com>
46
47 gnulib: update.
48 * gnulib: Update to latest.
49 * src/local.mk (AM_CFLAGS): Move to...
50 * Makefile.am: here.
51 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
52 AM_CFLAGS.
53
54 2009-03-02 Akim Demaille <demaille@gostai.com>
55
56 Comment changes.
57
58 2009-03-02 Akim Demaille <demaille@gostai.com>
59
60 Share b4_yytranslate_define.
61 * data/lalr1.cc (b4_yytranslate_define): Move to...
62 * data/c++.m4: here.
63
64 2009-03-02 Akim Demaille <demaille@gostai.com>
65
66 Use locations in the variant example.
67 Yes, this obfuscates the point of this example, variants only.
68 But glr.cc cannot work (yet?) without locations. This change
69 makes it easier to use this example with glr.cc.
70
71 * examples/variant.yy (assert): %define it.
72 (locations): Request them.
73 (yylex): Bind the location to the stage.
74
75 2009-03-02 Akim Demaille <demaille@gostai.com>
76
77 Dub make_TOKEN as a public type interface.
78 * data/c++.m4 (b4_symbol_constructor_declare)
79 (b4_symbol_constructor_define): New empty stubs.
80 (b4_public_types_declare, b4_public_types_define): Use them.
81 * data/lalr1.cc (b4_symbol_constructor_declare)
82 (b4_symbol_constructor_declare_)
83 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
84 Move to...
85 * data/variant.hh: here.
86 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
87 needed.
88 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
89 b4_symbol_constructor_declare, as it is now done by
90 b4_public_types_define and b4_public_types_declare.
91
92 2009-03-02 Akim Demaille <demaille@gostai.com>
93
94 Coding style changes.
95 * data/lalr1.cc (b4_symbol_constructor_declaration_)
96 (b4_symbol_constructor_declarations)
97 (b4_symbol_constructor_definition_)
98 (b4_symbol_constructor_definitions)
99 (b4_yytranslate_definition): Rename as...
100 (b4_symbol_constructor_declare_)
101 (b4_symbol_constructor_declare)
102 (b4_symbol_constructor_define_)
103 (b4_symbol_constructor_define)
104 (b4_yytranslate_define): these.
105 * data/variant.hh (b4_variant_definition): Rename as...
106 (b4_variant_define): this.
107
108 2009-03-02 Akim Demaille <demaille@gostai.com>
109
110 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
111 * data/bison.m4 (b4_percent_define_if_define): New.
112 * data/c++.m4 (b4_variant_if): Move to...
113 * data/bison.m4: Here, using b4_percent_define_if_define.
114 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
115 * data/bison.m4: Here, using b4_percent_define_if_define.
116
117 2009-03-02 Akim Demaille <demaille@gostai.com>
118
119 Dub symbol_type_base as a public type.
120 * data/c++.m4 (b4_public_types_declare): Now define
121 symbol_type_base and symbol_type.
122 (b4_public_types_define): New.
123 In both cases, the definitions are taken verbatim from lalr1.cc.
124 * data/lalr1.cc: Adjust.
125
126 2009-03-02 Akim Demaille <demaille@gostai.com>
127
128 b4_public_types_declare.
129 * data/c++.m4 (b4_public_types_declare): New.
130 * data/glr.cc, data/lalr1.cc: Use it.
131
132 2009-03-02 Akim Demaille <demaille@gostai.com>
133
134 b4_semantic_type_declare.
135 * data/c++.m4 (b4_semantic_type_declare): New.
136 Factors and generalizes what was in glr.cc and lalr1.cc.
137 * data/variant.hh (b4_semantic_type_declare): Redefine it for
138 variants.
139 * data/lalr1.cc, data/glr.cc: Use it.
140
141 2009-02-26 Akim Demaille <demaille@gostai.com>
142
143 Upgrade gnulib.
144 * gnulib: Upgrade from master.
145 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
146 Regen.
147
148 2009-02-25 Akim Demaille <demaille@gostai.com>
149
150 Remove useless arguments.
151 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
152 relevant.
153
154 2009-02-25 Akim Demaille <demaille@gostai.com>
155
156 Comment changes.
157 * data/lalr1.cc: here.
158
159 2009-02-25 Akim Demaille <demaille@gostai.com>
160
161 Fix glr.cc's debug level handling.
162 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
163 glr.c which is used.
164 (debug_level, set_debug_level): Adjust.
165
166 2009-02-25 Akim Demaille <demaille@gostai.com>
167
168 Copyright years.
169 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
170
171 2009-02-25 Akim Demaille <demaille@gostai.com>
172
173 Style changes.
174 * etc/bench.pl.in (generate_grammar_list): Consitently use
175 location_type, not yy::location.
176
177 2009-02-25 Akim Demaille <demaille@gostai.com>
178
179 Comment change.
180 * data/lalr1.cc: here.
181
182 2009-02-19 Akim Demaille <demaille@gostai.com>
183
184 Make yyparser::error public.
185 * data/lalr1.cc: here.
186 There is no good reason to keep it private (and it is convenient
187 to use it from the scanner for instance). It is already public in
188 glr.cc.
189
190 2009-02-19 Akim Demaille <demaille@gostai.com>
191
192 Comment changes.
193 * data/glr.cc: here.
194
195 2009-02-19 Akim Demaille <demaille@gostai.com>
196
197 Remove trailing blanks.
198 The epilogue has its own ending \n, no need to add another.
199
200 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
201 epilogue.
202 * data/glr.cc: dnl when extending the epilogue.
203 Remove stray "private:".
204
205 2009-02-19 Akim Demaille <demaille@gostai.com>
206
207 Use b4_c_modern.
208 * data/c.m4 (b4_c_function_decl): Here.
209
210 2009-02-19 Akim Demaille <demaille@gostai.com>
211
212 Comment changes.
213 * data/lalr1.cc: here.
214
215 2009-02-19 Akim Demaille <demaille@gostai.com>
216
217 Extract variant.hh
218 * data/variant.hh: New, extracted from...
219 * data/lalr1.cc: here.
220 Adjust.
221 * data/local.mk: Adjust.
222
223 2009-02-19 Akim Demaille <demaille@gostai.com>
224
225 Extract stack.hh from lalr1.cc.
226 * data/stack.hh: New.
227 * data/lalr1.cc: Extract from here.
228 * data/local.mk: Adjust.
229
230 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
231
232 Add reminder about uploading public key to keys.gnupg.net.
233 * HACKING (Release Procedure): Here.
234
235 2009-01-28 Akim Demaille <demaille@gostai.com>
236
237 * NEWS: Update information about 2.4.1 and 2.4.2.
238
239 2008-11-04 Akim Demaille <demaille@gostai.com>
240
241 Reformat NEWS.
242 * NEWS: Use more outline-mode markup.
243 Suggested by Jim Meyering.
244
245 2009-01-08 Akim Demaille <demaille@gostai.com>
246
247 Fix grep portability issues.
248 Grep on Solaris does not support -q.
249 Reported by Summum Bonum.
250
251 * NEWS: Add a stub for 2.4.2.
252 * THANKS: Add Summum Bonum.
253 * tests/atlocal.in (EGREP): New.
254 (CC, CXX, XSLTPROC): Make it possible to override them via
255 envvars.
256 * tests/java.at: Use $EGREP instead of egrep.
257 Use AT_CHECK's ignore instead of grep's -q.
258
259 2008-12-11 Akim Demaille <demaille@gostai.com>
260
261 Pass the token type to yysyntax_error.
262 * data/yacc.c (yysyntax_error): Take the transated token instead
263 of the raw number.
264 Adjust callers.
265 * TODO: Update.
266
267 2008-12-11 Akim Demaille <demaille@gostai.com>
268
269 Formatting changes.
270 * data/glr.c: Formatting changes.
271
272 2008-12-11 Akim Demaille <demaille@gostai.com>
273
274 Propagate i18n changes into glr.c.
275 * TODO: Update.
276 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
277 building the error message format dynamically.
278 * data/lalr1.java: Formatting changes.
279
280 2008-12-11 Akim Demaille <demaille@gostai.com>
281
282 Use testsuite -C.
283 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
284 Solves problems when top_srcdir is an absolute path.
285 Suggested by Eric Blake.
286 * configure.ac: Require Autoconf 2.62.
287
288 2008-12-11 Akim Demaille <demaille@gostai.com>
289
290 Simplify the i18n of the error messages.
291 * data/lalr1.cc: Comment changes.
292 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
293 lalr1.cc instead of building dynamically the format string.
294
295 2008-12-08 Akim Demaille <demaille@gostai.com>
296
297 Fix portability issue in the test suite.
298 * tests/local.at (AT_MATCHES_CHECK): New.
299 Based on Perl instead of Sed. Sed has too many portability
300 pitfalls, not ever Sed is GNU Sed.
301 * tests/actions.at (Fix user actions without a trailing semicolon):
302 Use it.
303
304 2008-12-08 Akim Demaille <demaille@gostai.com>
305
306 Update data/README.
307 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
308
309 2008-12-08 Akim Demaille <demaille@gostai.com>
310
311 Install autoconf as a submodule to get m4sugar.
312 * .gitmodules: Add submodules/autoconf.
313 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
314 submodules/autoconf.
315
316 2008-12-08 Akim Demaille <demaille@gostai.com>
317
318 Test token.prefix in all the skeletons.
319 * data/java.m4 (b4_token_enum): Use the token.prefix.
320 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
321 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
322 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
323 * tests/java.at: Comment changes.
324 (AT_CHECK_JAVA_MINIMAL): Define the END token.
325 (Java parser class and package names): Add token.prefix check.
326
327 2008-12-08 Akim Demaille <demaille@gostai.com>
328
329 Fix regeneration of atconfig.
330 * tests/local.mk (tests/atconfig): The rule was incorrect, but
331 remove it: now that there is no tests/Makefile.am, the top-level
332 Makefile properly updates atconfig when needed.
333
334 2008-12-07 Di-an Jan <dianj@freeshell.org>
335
336 Implement the FIXME that ends an user action with a semicolon
337 if it seems necessary.
338 * src/scan-code.l (flex rules section): Flag cpp directive from
339 any `#' to the first unescaped end-of-line. Semicolon is not
340 needed after `;', `{', '}', or cpp directives and is needed after
341 any other token (whitespaces and comments have no effect).
342 * tests/actions.at (Fix user actions without a trailing semicolon):
343 New test.
344 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
345 to make user actions complete statements.
346 Adjust column numbers in error messages.
347 * tests/regression.at (Fix user actions without a trailing semicolon):
348 Remove. Covered by new test.
349
350 2008-12-07 Akim Demaille <demaille@gostai.com>
351
352 Update gnulib.
353 * gnulib: Update from master.
354
355 2008-12-05 Eric Blake <ebb9@byu.net>
356
357 Avoid compiler warning.
358 * src/output.c (muscle_insert_item_number_table): Delete unused
359 function.
360
361 2008-12-02 Eric Blake <ebb9@byu.net>
362
363 Build testsuite with newer autoconf.
364 * tests/output.at (m4_expand): Don't override in newer autoconf,
365 where the underlying implementation changed.
366 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
367 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
368 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
369 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
370 since some of them contain unbalanced ')'.
371
372 2008-12-01 Akim Demaille <demaille@gostai.com>
373
374 Use b4_symbol for printers and destructors everywhere.
375 * data/bison.m4 (b4_symbol_action_location): New.
376 * data/c.m4 (b4_symbol_actions): Remove.
377 Adjust all callers to use by b4_symbol_foreach and the corresponding
378 b4_symbol_printer/destructor macro.
379 * data/glr.cc: Adjust.
380 * data/lalr1.java: Adjust the %destructor sanity check.
381 * src/output.c (symbol_code_props_output): Remove, we no longer
382 need the b4_symbol_printers/destructors tables.
383
384 2008-12-01 Akim Demaille <demaille@gostai.com>
385
386 Use b4_symbol_case_.
387 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
388 b4_symbol_case_.
389
390 2008-12-01 Akim Demaille <demaille@gostai.com>
391
392 Move b4_symbol based macro to bison.m4.
393 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
394 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
395 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
396 (b4_type_foreach): Move to...
397 * data/bison.m4: Here.
398 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
399 b4_symbol_value_template instead of b4_symbol_value.
400
401 2008-12-01 Akim Demaille <demaille@gostai.com>
402
403 b4_symbol/type_foreach.
404 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
405 Use them.
406
407 2008-12-01 Akim Demaille <demaille@gostai.com>
408
409 Use the symbol properties to output the printer/destructor for lalr1.cc.
410 Instead of defining complex list of tuples to define various
411 properties of the symbols, we now prefer to define symbols as
412 "structs" in m4: using the symbol key (its number), and the
413 property name, b4_symbol gives it value. Use this to handle
414 destructors and printers.
415
416 * src/output.c (CODE_PROP): New.
417 (prepare_symbol_definitions): Use it to define the printer and
418 destructor related attributes of the symbols.
419 * data/lalr1.cc (b4_symbol_actions): Rename as...
420 (b4_symbol_action): this.
421 Use b4_symbol instead of 6 arguments.
422 (b4_symbol_printer, b4_symbol_destructor): New.
423 Use them instead of b4_symbol_actions.
424
425 2008-12-01 Akim Demaille <demaille@gostai.com>
426
427 Avoid capturing variables too easily.
428 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
429 v__ and p__ instead of v and p.
430
431 2008-12-01 Akim Demaille <demaille@gostai.com>
432
433 Remove spurious empty line before syncline.
434 * data/bison.m4 (b4_syncline): Don't output an empty line before
435 the output.
436
437 2008-11-26 Akim Demaille <demaille@gostai.com>
438
439 Convert lib/Makefile.am into lib/local.mk.
440 The real problem is rather gnulib.mk, which itself is extracted
441 from a Makefile.am that gnulib expects to the "recursive". The
442 tool prefix-gnulib-mk converts such a gnulib.mk to be
443 non-recursive. Also, some AC_SUBST variables need to be adjusted.
444
445 * etc/prefix-gnulib-mk: New.
446 * bootstrap (slurp): Use it to convert further gnulib.mk.
447 No longer try to avoid re-creation of lib/gnulib.mk as the changes
448 are deeper.
449 * lib/Makefile.am: Rename as...
450 * lib/local.mk: this.
451 Adjust to be prefixed.
452 * Makefile.am, configure.ac: Adjust.
453 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
454
455 2008-11-26 Akim Demaille <demaille@gostai.com>
456
457 s/_FLAGS/FLAGS/.
458 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
459 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
460 Reported by Eric Blake.
461
462 2008-11-26 Akim Demaille <demaille@gostai.com>
463
464 Use b4_parser_tables_define in glr.cc.
465 * data/glr.c: Use b4_parser_tables_define instead of defining the
466 (deterministic integral) tables by hand.
467
468 2008-11-26 Akim Demaille <demaille@gostai.com>
469
470 Use b4_parser_tables_define in Java.
471 * data/java.m4 (b4_typed_parser_table): Rename as...
472 (b4_typed_parser_table_define): this, for consistency.
473 Accept a comment as $4.
474 Move $2 into yy*_.
475 (b4_integral_parser_table): Rename as...
476 (b4_integral_parser_table_define): this.
477 * data/lalr1.java: Adjust all uses.
478 Use b4_parser_tables_define instead of generation by hand.
479
480 2008-11-26 Akim Demaille <demaille@gostai.com>
481
482 Prepare the convergence bw C style and Java table generation.
483 * data/bison.m4 (b4_tables_map, b4_tables_declare)
484 (b4_tables_define): Rename as...
485 (b4_integral_parser_tables_map, b4_parser_tables_declare)
486 (b4_parser_tables_define): these.
487 * data/c.m4 (b4_table_define): Rename as...
488 (b4_integral_parser_table_define): this.
489 * data/lalr1.cc: Adjust.
490 (b4_table_define, b4_table_declare): Rename as...
491 (b4_integral_parser_table_define)
492 (b4_integral_parser_table_declare): these.
493 (yyrline_): Move the comment where it is actually used.
494 * data/yacc.c: Adjust.
495 (yyrline): Use b4_integral_parser_table_define.
496
497 2008-11-26 Akim Demaille <demaille@gostai.com>
498
499 Regen.
500 * src/parse-gram.h, src/parse-gram.c: Regen.
501
502 2008-11-26 Akim Demaille <demaille@gostai.com>
503
504 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
505 * data/lalr1.cc (b4_tables_map): Move to...
506 * data/bison.m4: here.
507 Update the comment for yytable during the flight.
508 (b4_tables_declare, b4_tables_define): New.
509 * data/lalr1.cc: Use them.
510 * data/c.m4 (b4_table_define): New.
511 * data/yacc.c: Use b4_tables_define instead of output the tables
512 by hand.
513 * tests/regression.at (Web2c Actions): Adjust the expected output,
514 the order of the tables changed.
515
516 2008-11-26 Akim Demaille <demaille@gostai.com>
517
518 Get rid of (yy)rhs and (yy)prhs.
519 These tables are no longer needed in the parsers, and they don't seem to
520 be useful. They are not documented either.
521
522 * src/output.c (prepare_rules): Get rid of rhs and prhs.
523 Adjust the computation of (yy)r2.
524
525 2008-11-26 Akim Demaille <demaille@gostai.com>
526
527 Rule length is unsigned.
528 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
529
530 2008-11-26 Akim Demaille <demaille@gostai.com>
531
532 Get rid of lalr1-split.cc.
533 It was no longer maintainer.
534
535 * data/lalr1-split.cc: Remove.
536 * etc/bench.pl.in (bench_fusion_parser): Remove.
537 Adjust.
538
539 2008-11-26 Akim Demaille <demaille@gostai.com>
540
541 Use yy* consistently.
542 * data/glr.c: Now that yyrhs no longer exists as a global
543 variable, rename local "rhs" variables into "yyrhs" for
544 consistency.
545
546 2008-11-25 Akim Demaille <demaille@gostai.com>
547
548 Get rid of yyrhs and yyprhs in glr.c.
549 * data/glr.c (yyrhs, yyprhs): Remove.
550 Instead, use the state stack and yystos.
551
552 2008-11-25 Akim Demaille <demaille@gostai.com>
553
554 Flag glr tests.
555 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
556 as an Autotest keyword.
557
558 2008-11-25 Akim Demaille <demaille@gostai.com>
559
560 Prefer TESTSUITE_FLAGS.
561 TESTSUITEFLAGS is barely readable.
562
563 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
564 for backward compatibility.
565 Use the former instead of the latter.
566
567 2008-11-25 Akim Demaille <demaille@gostai.com>
568
569 Get rid of yyrhs and yyprhs in larl1.java.
570 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
571 (yy_reduce_print): Rather, use yystos_ and the state stack.
572
573 2008-11-25 Akim Demaille <demaille@gostai.com>
574
575 Formatting changes.
576
577 2008-11-25 Akim Demaille <demaille@gostai.com>
578
579 Get rid of yyrhs and yyprhs in yacc.c.
580 They were used to get the symbol types, given a rule number, when
581 displaying the top of the stack before a reduction. But the
582 symbol type is available from the state stack. This has two be
583 benefits: two tables less in the parser (making it smaller), and a
584 more consistent use of the three stacks which will help to fuse
585 them.
586
587 * data/yacc.c (yyprhs, yyrhs): Remove.
588 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
589 (yy_reduce_print): Take yyssp as argument.
590 Use it, together with yystos, to get the symbol type.
591 * tests/regression.at (Web2c Report): Remove these tables from the
592 expected output.
593
594 2008-11-25 Akim Demaille <demaille@gostai.com>
595
596 b4_tables_map.
597 The point is to factor the generation of the tables across skeletons.
598 This is language dependant.
599
600 * data/c.m4 (b4_comment_): New.
601 Should be usable to define how to generate tables independently of
602 the language.
603 (b4_c_comment): New.
604 (b4_comment): Bounce to b4_c_comment.
605 Now support $2 = [PREFIX] for indentation.
606 * data/lalr1.cc (b4_table_declare): Don't output a comment if
607 there is no comment.
608 Indent it properly when there is one.
609 Output the ending semicolon.
610 (b4_table_define): Space changes.
611 Output the ending semicolon.
612 (b4_tables_map): New.
613 Use it twice instead of declaring and defining the (integral)
614 tables by hand.
615
616 2008-11-25 Akim Demaille <demaille@gostai.com>
617
618 b4_table_declare.
619 * data/lalr1.cc (b4_table_declare): New.
620 Use it to declare the tables defined with b4_table_define.
621 (b4_table_define): Declare a third arg to match b4_table_declare
622 signature.
623 Move all the comments around invocations of b4_table_define into
624 the invocations itselves.
625 Move things around to have the order for declarations and
626 definitions.
627
628 2008-11-25 Akim Demaille <demaille@gostai.com>
629
630 Formatting changes.
631 * data/lalr1.java: here.
632
633 2008-11-25 Akim Demaille <demaille@gostai.com>
634
635 b4_args is more general than only C++.
636 * data/lalr1.cc (b4_args, _b4_args): Move to...
637 * data/bison.m4: here.
638
639 2008-11-21 Di-an Jan <dianj@freeshell.org>
640
641 Implement no-XXX arguments for --warnings, --report, --trace.
642 * src/getargs.c (flags_argmatch): Handles no-XXX.
643 Fix typo in doxygen comment.
644
645 2008-11-21 Akim Demaille <demaille@gostai.com>
646
647 Display the changes in cross-options.texi.
648 * build-aux/cross-options.pl ($sep): New, to separate items.
649 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
650 changes.
651
652 2008-11-20 Di-an Jan <dianj@freeshell.org>
653
654 Improves options in the manual.
655 * doc/bison.texinfo (-g, -x): Add space before argument.
656 (Option Cross Key): Implement FIXME: listing directives also.
657 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
658 (Short Option): Special case -d. Put arguments inside @option.
659 (Bison Directive): Add column, automatically extracted from
660 src/scan-gram.l (actual name passed as the first argument)
661 with special case for %define.
662 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
663 to build-aux/cross-options.pl.
664 * src/getargs.c (usage): Document limitations of cross-options.pl.
665 * src/scan-gram.l: Likewise.
666
667 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
668
669 Fix unexpanded macros in GLR defines file.
670 Reported by Csaba Raduly at
671 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
672 * THANKS (Csaba Raduly): Add.
673 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
674 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
675 lexer in a separate module that includes the defines file.
676 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
677 source.
678 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
679 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
680 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
681 (AT_DATA_SOURCE_PROLOGUE): New.
682 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
683 (AT_DATA_SOURCE): New.
684 (AT_FULL_COMPILE): Extend to support an additional source file.
685
686 2008-11-18 Akim Demaille <demaille@gostai.com>
687
688 More TODO.
689 * TODO: More short term issues.
690
691 2008-11-18 Akim Demaille <demaille@gostai.com>
692
693 Regen.
694 * src/parse-gram.h, src/parse-gram.c: Regen.
695
696 2008-11-18 Akim Demaille <demaille@gostai.com>
697
698 Use b4_subtract where possible.
699 * data/lalr1.cc (b4_subtract): Move to...
700 * data/bison.m4: here.
701 * data/glr.c (b4_rhs_data): Use it.
702 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
703
704 2008-11-18 Akim Demaille <demaille@gostai.com>
705
706 Remove incorrect mode specification.
707 * data/glr.cc: Don't pretend it's C code.
708
709 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
710
711 Simplify last patch slightly.
712 * src/getargs.c (getargs): Here.
713
714 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
715
716 Fix last warning from --enable-gcc-warnings.
717 * src/getargs.c (getargs): Don't assign const address to non-const
718 pointer.
719
720 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
721
722 Don't let maintainer-*-check targets force a version update.
723 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
724 handled.
725
726 2008-11-17 Di-an Jan <dianj@freeshell.org>
727
728 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
729 Align menus. Adjust word wrapping. Use node names for menu names.
730 (Examples): Don't abbreviate node names.
731 (LocalWords): Remove abbreviations.
732 (Copying): Make description a sentence.
733 (Java Action Features): Remove period to match the rest of menu.
734
735 2008-11-17 Di-an Jan <dianj@freeshell.org>
736
737 Handles several --enable-gcc-warnings.
738 * src/getargs.c (command_line_location): Set parameters to void.
739 * src/output.c (symbol_type_name_cmp): Make static.
740 (symbols_by_type_name): Set parameters to void.
741 (symbol_definitions_output): Remove unused parameter. Rename as...
742 (prepare_symbol_definitions): this.
743 (muscles_output): Move symbol_definitions_output to...
744 (output): here as prepare_symbol_definitions.
745 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
746 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
747
748 2008-11-17 Di-an Jan <dianj@freeshell.org>
749
750 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
751 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
752
753 2008-11-16 Akim Demaille <demaille@gostai.com>
754
755 Add missing $(EXEEXT).
756 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
757 "src/bison$(EXEEXT)".
758 Reported by Di-an Jan.
759
760 2008-11-15 Akim Demaille <demaille@gostai.com>
761
762 * TODO: Update.
763
764 2008-11-15 Akim Demaille <demaille@gostai.com>
765
766 Formatting changes.
767 * tests/input.at: here.
768
769 2008-11-15 Akim Demaille <demaille@gostai.com>
770
771 Remove duplicate header inclusion.
772 * src/LR0.c: here.
773
774 2008-11-15 Akim Demaille <demaille@gostai.com>
775
776 * src/parse-gram.h, src/parse-gram.c: Regen.
777
778 2008-11-15 Akim Demaille <demaille@gostai.com>
779
780 Support parametric types.
781
782 There are two issues to handle: first scanning nested angle
783 bracket pairs to support types such as std::pair< std::string,
784 std::list<std::string> > >.
785
786 Another issue is to address idiosyncracies of C++: do not glue two
787 closing angle brackets together (otherwise it's operator>>), and
788 avoid sticking blindly a TYPE to the opening <, as it can result
789 in '<:' which is a digraph for '['.
790
791 * src/scan-gram.l (brace_level): Rename as...
792 (nesting): this.
793 (SC_TAG): New.
794 Implement support for complex tags.
795 (tag): Accept
796 , but not <.
797 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
798 (b4_symbol_variant): Leave space around types as parameters.
799 * examples/variant.yy: Use nested template types and leading ::.
800 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
801 Rename as...
802 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
803 * tests/c++.at: Test parametric types.
804
805 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
806
807 Test token.prefix.
808 This is not sufficient, but we test at least that the make_SYMBOL
809 interface is not affected by token.prefix. A more general test
810 will be implemented when the support of token.prefix is generalized
811 to more skeletons.
812
813 * tests/c++.at: One more variant test, using token.prefix.
814
815 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
816
817 Test the make_TOKEN interface.
818 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
819 Factor the common code in yylex.
820 Use it to test "%define lex_symbol".
821
822 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
823
824 Formatting change.
825
826 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
827
828 Simplify code for variants bench marks.
829 * etc/bench.pl.in (&generate_grammar_list): Define and use
830 location_type.
831 Factor the common code in yylex.
832
833 2008-11-15 Akim Demaille <demaille@gostai.com>
834
835 Better error message.
836 * bootstrap (find_tool): Fix the error message.
837
838 2008-11-15 Akim Demaille <demaille@gostai.com>
839
840 Update variant.yy to newest interface.
841 * examples/variant.yy: Define lex_symbol.
842 Adjust.
843
844 2008-11-15 Akim Demaille <demaille@gostai.com>
845
846 Don't use locations in variant.yy.
847 * examples/variant.yy: Adjust to not using locations.
848
849 2008-11-15 Akim Demaille <demaille@gostai.com>
850
851 Comment changes.
852 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
853 comments for the license.
854
855 2008-11-15 Akim Demaille <demaille@gostai.com>
856
857 Remove tests/Makefile.am.
858 * tests/Makefile.am: Rename as...
859 * tests/local.mk: this.
860 * Makefile.am, configure.ac: Adjust.
861 * Makefile.am (DISTCLEANFILES): Define.
862 (maintainer-check, maintainer-xml-check, maintainer-push-check):
863 Remove, we no longer need to bounce to the real targets.
864
865 2008-11-15 Akim Demaille <demaille@gostai.com>
866
867 Comment changes.
868
869 2008-11-15 Akim Demaille <demaille@gostai.com>
870
871 djgpp/local.mk.
872 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
873 * djgpp/local.mk: this new file.
874
875 2008-11-15 Akim Demaille <demaille@gostai.com>
876
877 Remove doc/Makefile.am.
878 * doc/Makefile.am: Rename as...
879 * doc/local.mk: this.
880 Adjust paths
881 * Makefile.am, configure.ac: Adjust.
882 * Makefile.am (MOSTLYCLEANFILES): New.
883 * src/local.mk: Adjust.
884
885 2008-11-15 Akim Demaille <demaille@gostai.com>
886
887 Move sc_tight_scope into maint.mk.
888 It does not work, and I don't know how it was supposed to work: it
889 seems to be looking for sources in the build tree. I just moved
890 it at a better place, fixing it is still required.
891
892 * src/local.mk (echo): Remove.
893 (sc_tight_scope): Move to...
894 * maint.mk: here.
895
896 2008-11-15 Akim Demaille <demaille@gostai.com>
897
898 Regen.
899 * src/parse-gram.h, src/parse-gram.h: Regen.
900
901 2008-11-15 Akim Demaille <demaille@gostai.com>
902
903 Remove src/Makefile.am.
904 * src/Makefile.am: Rename as...
905 * src/local.mk: this.
906 Prefix all the paths with src/.
907 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
908 (AM_CPPFLAGS): Find find in builddir/src.
909 (YACC): Move the flags into...
910 (AM_YFLAGS): here.
911 * maint.mk (sc_tight_scope): Disable.
912 It used to bounce to the version in src/Makefile.am which is now
913 part of this very Makefile.
914 * Makefile.am, configure.ac: Adjust.
915 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
916 include "..." to find files "here": we are no longer in src/, so
917 qualify the includes with src/.
918 * doc/Makefile.am (PREPATH): No longer include the top_builddir
919 prefix.
920 (.x.1): Adjust to be able to create src/foo from the top level
921 Makefile, instead of going bounce to src/Makefile the creation of
922 foo.
923
924 2008-11-15 Akim Demaille <demaille@gostai.com>
925
926 Remove useless variable.
927 * doc/Makefile.am (srcsrcdir): Remove.
928
929 2008-11-15 Akim Demaille <demaille@gostai.com>
930
931 Remove data/Makefile.am.
932 * data/Makefile.am: Rename as...
933 * data/local.mk: this.
934 Adjust paths.
935 * Makefile.am, configure.ac: Adjust.
936
937 2008-11-15 Akim Demaille <demaille@gostai.com>
938
939 Remove etc/Makefile.am.
940 * etc/Makefile.am: Rename as...
941 * etc/local.mk: this.
942 Adjust.
943 * Makefile.am, configure.ac: Adjust.
944
945 2008-11-15 Akim Demaille <demaille@gostai.com>
946
947 Remove examples/local.mk.
948 examples/calc++/Makefile.am might be interesting to keep as is, since
949 it is an example in itself.
950
951 * examples/Makefile.am: Rename as...
952 * examples/local.mk: this.
953 Adjust.
954 * Makefile.am, configure.ac: Adjust.
955
956 2008-11-15 Akim Demaille <demaille@gostai.com>
957
958 Remove build-aux/Makefile.am.
959 Recursive Makefiles are really way too slow, let's get rid of some of
960 them.
961
962 * build-aux/Makefile.am: Rename as...
963 * build-aux/local.mk: this.
964 Adjust paths.
965 * Makefile.am, configure.ac: Adjust.
966
967 2008-11-15 Akim Demaille <demaille@gostai.com>
968
969 Provide convenience constructors for locations and positions.
970 * data/location.cc (position::position): Accept file, line and
971 column as arguments with default values.
972 Always qualify initial line and column literals as unsigned.
973 (location::location): Provide convenience constructors.
974
975 2008-11-15 Akim Demaille <demaille@gostai.com>
976
977 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
978 token type.
979 Using template buys us nothing, and makes it uselessly complex to
980 construct a symbol. Besides, it could not be generalized to other
981 languages, while make_FOO would work in C/Java etc.
982
983 * data/lalr1.cc (b4_symbol_): New.
984 (b4_symbol): Use it.
985 (b4_symbol_constructor_declaration_)
986 (b4_symbol_constructor_definition_): Instead of generating
987 specializations of an overloaded template function, just generate
988 several functions whose names are forged from the token names
989 without the token.prefix.
990 (b4_symbol_constructor_declarations): Generate them for all the
991 symbols, not just by class of symbol type, now that instead of
992 specializing a function template by the token, we generate a
993 function named after the token.
994 (b4_symbol_constructor_specialization_)
995 (b4_symbol_constructor_specializations): Remove.
996 * etc/bench.pl.in: Adjust to this new API.
997
998 2008-11-13 Akim Demaille <demaille@gostai.com>
999
1000 %define token.prefix.
1001 Provide a means to add a prefix to the name of the tokens as
1002 output in the generated files. Because of name clashes, it is
1003 good to have such a prefix such as TOK_ that protects from names
1004 such as EOF, FILE etc. But it clutters the grammar itself.
1005
1006 * data/bison.m4 (token.prefix): Empty by default.
1007 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
1008 * data/lalr1.cc (b4_symbol): Ditto.
1009
1010 2008-11-13 Akim Demaille <demaille@gostai.com>
1011
1012 Compute at M4 time some of the subtractions.
1013 * data/lalr1.cc (b4_subtract): New.
1014 (b4_rhs_data): Use it.
1015
1016 2008-11-13 Akim Demaille <demaille@gostai.com>
1017
1018 symbol::token.
1019 This allows the user to get the type of a token returned by yylex.
1020
1021 * data/lalr1.cc (symbol::token): New.
1022 (yytoknum_): Define when %define lex_symbol, independently of
1023 %debug.
1024 (yytoken_number_): Move into...
1025 (symbol::token): here, since that's the only use.
1026 The other one is YYPRINT which was not officially supported
1027 by lalr1.cc, and anyway it did not work since YYPRINT uses this
1028 array under a different name (yytoknum).
1029
1030 2008-11-13 Akim Demaille <demaille@gostai.com>
1031
1032 YYERRCODE.
1033 * TODO (YYERRCODE): Mention the case of $undef.
1034
1035 2008-11-13 Akim Demaille <demaille@gostai.com>
1036
1037 TODO: YYPRINT.
1038 * TODO (YYPRINT): New.
1039
1040 2008-11-13 Akim Demaille <demaille@gostai.com>
1041
1042 Comment changes.
1043 * data/lalr1.cc, data/yacc.c: Fix the description of the
1044 yytranslate and yytoknum tables.
1045
1046 2008-11-13 Akim Demaille <demaille@gostai.com>
1047
1048 Define make_symbol in the header.
1049 To reach good performances these functions should be inlined (yet
1050 this is to measure precisely). To this end they must be available
1051 to the caller.
1052
1053 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
1054 location_type with the class name.
1055 Since will now be output in the header, declare "inline".
1056 No longer use b4_symbol_constructor_specializations, but
1057 b4_symbol_constructor_definitions in the header.
1058 Don't call it in the *.cc file.
1059
1060 2008-11-13 Akim Demaille <demaille@gostai.com>
1061
1062 Define yytranslate in the header for lex_symbol.
1063 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
1064 into the header file when using %define lex_symbol.
1065 (yytranslate_): Declare inline.
1066
1067 2008-11-13 Akim Demaille <demaille@gostai.com>
1068
1069 Define the constructors of symbol_type in
1070 b4_symbol_constructor_definitions.
1071 The constructors are called by the make_symbol functions, which a
1072 forthcoming patch will move elsewhere. Hence the interest of
1073 putting them together.
1074
1075 The stack_symbol_type does not need to be moved, it is used only
1076 by the parser.
1077
1078 * data/lalr1.cc: Move symbol_type and symbol_base_type
1079 constructors into...
1080 (b4_symbol_constructor_definitions): here.
1081 Adjust.
1082
1083 2008-11-13 Akim Demaille <demaille@gostai.com>
1084
1085 Make it easier to move the definition of yytranslate_.
1086 Forthcoming changes will make it possible to use yytranslate_
1087 from outside the parser implementation file.
1088
1089 * data/lalr1.cc (b4_yytranslate_definition): New.
1090 Use it.
1091
1092 2008-11-13 Akim Demaille <demaille@gostai.com>
1093
1094 Remove useless class specification.
1095 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
1096 to refer to the class name to use a type defined by the class for
1097 arguments of member functions.
1098
1099 2008-11-13 Akim Demaille <demaille@gostai.com>
1100
1101 Finer input type for yytranslate.
1102 This patch is debatable: the tradition expects yylex to return an int
1103 which happens to correspond to token_number (which is an enum). This
1104 allows for instance to return characters (such as '*' etc.). But this
1105 goes against the stronger typing I am trying to have with the new
1106 lex interface which return a symbol_type. So in this case, feed
1107 yytranslate_ with a token_type.
1108
1109 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
1110 expect a token_type.
1111
1112 2008-11-13 Akim Demaille <demaille@gostai.com>
1113
1114 Honor lex-params in %define lex_symbol mode.
1115 * data/lalr1.cc: Use b4_lex_param.
1116
1117 2008-11-13 Akim Demaille <demaille@gostai.com>
1118
1119 Simplify names.
1120 * src/output.c (symbol_definitions_output): Rename symbol
1121 attributes type_name and has_type_name as type and has_type.
1122 * data/lalr1.cc: Adjust uses.
1123
1124 2008-11-13 Akim Demaille <demaille@gostai.com>
1125
1126 Use b4_type_names for the union type.
1127 The union used to compute the size of the variant used to iterate
1128 over the type of all the symbols, with a lot of redundancy. Now
1129 iterate over the lists of symbols having the same type-name.
1130
1131 * data/lalr1.cc (b4_char_sizeof_): New.
1132 (b4_char_sizeof): Use it.
1133 Adjust to be called with a list of numbers instead of a single
1134 number.
1135 Adjust its caller for new-line issues.
1136
1137 2008-11-13 Akim Demaille <demaille@gostai.com>
1138
1139 Define the "identifier" of a symbol.
1140 Symbols may have several string representations, for instance if
1141 they have an alias. What I call its "id" is a string that can be
1142 used as an identifier. May not exist.
1143
1144 Currently the symbols which have the "tag_is_id" flag set are
1145 those that don't have an alias. Look harder for the id.
1146
1147 * src/output.c (is_identifier): Move to...
1148 * src/symtab.c (is_identifier): here.
1149 * src/symtab.h, src/symtab.c (symbol_id_get): New.
1150 * src/output.c (symbol_definitions_output): Use it to define "id"
1151 and "has_id".
1152 Remove the definition of "tag_is_id".
1153 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
1154 "tag_is_id" were used to produce code.
1155 We still use "tag" for documentation.
1156
1157 2008-11-11 Akim Demaille <demaille@gostai.com>
1158
1159 Locations are no longer required by lalr1.cc.
1160 * data/lalr1.cc (_b4_args, b4_args): New.
1161 Adjust all uses of locations to make them optional.
1162 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
1163 (AT_CHECK_NAMESPACE): Check the use of locations.
1164 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
1165 without locations with lalr1.cc.
1166 Test these cases.
1167 * tests/output.at: Check lalr1.cc with and without location
1168 support.
1169 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
1170 Don't use locations.
1171
1172 2008-11-11 Akim Demaille <demaille@gostai.com>
1173
1174 AT_FULL_COMPILE.
1175 * tests/local.at (AT_FULL_COMPILE): New.
1176 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
1177
1178 2008-11-11 Akim Demaille <demaille@gostai.com>
1179
1180 Support parens in calc++.
1181 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
1182 * examples/calc++/test (run): Check the expected output.
1183 Adjust callers.
1184 Check parens too.
1185
1186 2008-11-11 Akim Demaille <demaille@gostai.com>
1187
1188 Simplify lalr1.cc since %defines is mandatory.
1189 * data/lalr1.cc: Remove useless calls to b4_defines_if.
1190
1191 2008-11-11 Akim Demaille <demaille@gostai.com>
1192
1193 TODO: yyfmt.
1194 * TODO (yysyntax_error): New item.
1195
1196 2008-11-11 Akim Demaille <demaille@gostai.com>
1197
1198 Prefer M4 to CPP.
1199 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1200 YYERROR_VERBOSE.
1201
1202 2008-11-11 Akim Demaille <demaille@gostai.com>
1203
1204 Support i18n of the parse error messages.
1205 * TODO (lalr1.cc/I18n): Remove.
1206 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1207 error messages, as done in yacc.c.
1208 Stay within the yy* pseudo namespace.
1209
1210 2008-11-11 Akim Demaille <demaille@gostai.com>
1211
1212 More TODO.
1213 * TODO (single stack, yysyntax_error): New.
1214
1215 2008-11-11 Akim Demaille <demaille@gostai.com>
1216
1217 Make it possible to return a symbol_type from yylex.
1218 * data/lalr1.cc (b4_lex_symbol_if): New.
1219 (parse): When lex_symbol is defined, expected yylex to return the
1220 complete lookahead.
1221 * etc/bench.pl.in (generate_grammar_list): Extend to support this
1222 yylex interface.
1223 (bench_variant_parser): Exercise it.
1224
1225 2008-11-11 Akim Demaille <demaille@gostai.com>
1226
1227 Remove useless bench case.
1228 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
1229 no longer used.
1230
1231 2008-11-11 Akim Demaille <demaille@gostai.com>
1232
1233 Improve display of directives.
1234 * etc/bench.pl.in (parse_term): Don't add useless eol.
1235
1236 2008-11-11 Akim Demaille <demaille@gostai.com>
1237
1238 Use string_cast in the bench.
1239 * etc/bench.pl.in (generate_grammar_list): Define and use
1240 string_cast.
1241
1242 2008-11-11 Akim Demaille <demaille@gostai.com>
1243
1244 Replace yychar with a Boolean.
1245 * data/lalr1.cc (parse::yychar): Replace by...
1246 (parse::yyempty): this.
1247
1248 2008-11-11 Akim Demaille <demaille@gostai.com>
1249
1250 Factor the tables.
1251 * TODO: New item.
1252
1253 2008-11-11 Akim Demaille <demaille@gostai.com>
1254
1255 Let yytranslate handle the eof case.
1256 * data/lalr1.cc (yytranslate_): Handle the EOF case.
1257 Adjust callers.
1258 No longer expect yychar to be equal to yyeof_, rather, test the
1259 lookahead's (translated) kind.
1260
1261 2008-11-11 Akim Demaille <demaille@gostai.com>
1262
1263 yychar cannot be empty in yyerrlab.
1264 * TODO (yychar == yyempty_): New.
1265 * data/lalr1.cc: Remove the handling of this case.
1266 This eases forthcoming changes related to yychar and yytranslate.
1267
1268 2008-11-11 Akim Demaille <demaille@gostai.com>
1269
1270 Bench: syntactic sugar for %define/#define.
1271 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
1272 (&bench_push_parser, bench_variant_parser): Use this feature.
1273 (&eat): New.
1274 Use it.
1275
1276 2008-11-11 Akim Demaille <demaille@gostai.com>
1277
1278 Less memory pressure on the "list" bench.
1279 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
1280 the values, to limit memory pressure.
1281
1282 2008-11-11 Akim Demaille <demaille@gostai.com>
1283
1284 Introduce make_symbol.
1285 make_symbol provides a means to construct a full symbol (kind,
1286 value, location) in a single shot. It is meant to be a Symbol
1287 constructor, parameterized by the symbol kind so that overloading
1288 would prevent incorrect kind/value pairs. Unfortunately
1289 parameterized constructors do not work well in C++ (unless the
1290 parameter also appears as an argument, which is not acceptable),
1291 hence the use of a function instead of a constructor.
1292
1293 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1294 (b4_symbol_constructor_declarations)
1295 (b4_symbol_constructor_specialization_)
1296 (b4_symbol_constructor_specializations)
1297 (b4_symbol_constructor_definition_)
1298 (b4_symbol_constructor_definitions): New.
1299 Use them where appropriate to generate declaration, declaration of
1300 the specializations, and implementations of the templated
1301 overloaded function "make_symbol".
1302 (variant::variant): Always define a default ctor.
1303 Also provide a copy ctor.
1304 (symbol_base_type, symbol_type): New ctor overloads for value-less
1305 symbols.
1306 (symbol_type): Now public, so that functions such as yylex can use
1307 it.
1308
1309 2008-11-11 Akim Demaille <demaille@gostai.com>
1310
1311 Inform m4 whether a tag is a valid id.
1312 * src/output.c (is_identifier): New.
1313 (symbol_definitions_output): Use it to define tag_is_id.
1314 But maybe this should be done at m4 level?
1315
1316 2008-11-11 Akim Demaille <demaille@gostai.com>
1317
1318 Test 214 was failing: it greps with a pattern containing [ ]*
1319 which obviously meant to catch spaces and tabs, but contained only
1320 spaces. Tabulations in sources are a nuisance, so to simplify the
1321 matter, get rid of all the tabulations in the Java sources. The
1322 other skeletons will be treated equally later.
1323
1324 * data/java.m4, data/lalr1.java: Untabify.
1325 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
1326 tabulations are no longer generated.
1327
1328 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
1329
1330 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1331 * configure.ac: Adjust usage.
1332 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1333 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1334 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1335
1336 2008-11-10 Di-an Jan <dianj@freeshell.org>
1337
1338 Workaround Java's ``code too large'' problem for parser tables
1339 in most cases, by using one function per initialization.
1340 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
1341 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
1342 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
1343 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
1344 (yytname_): Use b4_typed_parser_table.
1345 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
1346 ``code too large'' error.
1347
1348 2008-11-10 Di-an Jan <dianj@freeshell.org>
1349
1350 * NEWS: Document them.
1351
1352 General Java skeleton improvements.
1353 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
1354 using gcj < 4.3 in the testsuite, according to comments in
1355 gnulib/m4/javacomp.m4.
1356 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
1357 location_type, position_type): Remove extraneous brackets from
1358 b4_percent_define_default.
1359 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
1360 m4_define and m4_define_default.
1361 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
1362 which marks the end of user code with appropriate syncline, like all
1363 the other skeletons.
1364 (b4_user_post_prologue): Add. Don't silently drop.
1365 (yylex): Remove.
1366 (parse): Inline yylex.
1367 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
1368 (%{...%}): Fix typo of %code imports.
1369 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
1370
1371 Support annotations on parser class with %define annotations.
1372 * data/lalr1.java (annotations): Add to parser class modifier.
1373 * doc/bison.texinfo (Java Parser Interface): Document
1374 %define annotations.
1375 (Java Declarations Summary): Document %define annotations.
1376 * tests/java.at (Java parser class modifiers): Test annotations.
1377
1378 Do not generate code for %error-verbose unless requested.
1379 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
1380 Make private. Make conditional on %error-verbose.
1381 (getErrorVerbose, setErrorVerbose): New.
1382 (yytnamerr_): Make conditional on %error-verbose.
1383 (yysyntax_error): Make some code conditional on %error-verbose.
1384 * doc/bison.texinfo (Java Bison Interface): Remove the parts
1385 about %error-verbose having no effect.
1386 (getErrorVerbose, setErrorVerbose): Document.
1387
1388 Move constants for token names to Lexer interface.
1389 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
1390 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
1391 (parse): Qualify EOF to Lexer.EOF.
1392 * doc/bison.texinfo (Java Parser Interface): Move documentation of
1393 EOF and token names to Java Lexer Interface.
1394 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
1395
1396 Make yyerror public.
1397 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
1398 (yyerror): Change to public. Add Javadoc comments. Use longer
1399 parameter names. Make the body rather than the declarator
1400 conditional on %locations.
1401 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
1402
1403 Allow user to add code to the constructor with %code init.
1404 * data/java.m4 (b4_init_throws): New, for %define init_throws.
1405 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
1406 Add %code init to the front of the constructor body.
1407 * doc/bison.texinfo (YYParser.YYParser): Document %code init
1408 and %define init_throws.
1409 (Java Declarations Summary): Document %code init and
1410 %define init_throws.
1411 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
1412 (Java constructor init and init_throws): Add tests.
1413
1414 2008-11-10 Akim Demaille <demaille@gostai.com>
1415
1416 Update TODO.
1417 * TODO (-D): is implemented.
1418 (associativity): Same precedence must have the same associativity.
1419 For instance, how can a * b / c be parsed if * is %left and / is
1420 %right?
1421 (YYERRORCODE, YYFAIL, YYBACKUP): New.
1422
1423 2008-11-10 Akim Demaille <demaille@gostai.com>
1424
1425 Formatting changes.
1426
1427 2008-11-10 Akim Demaille <demaille@gostai.com>
1428
1429 More information about the symbols.
1430 * src/output.c (type_names_output): Document all the symbols,
1431 including those that don't have a type-name.
1432 (symbol_definitions_output): Define "is_token" and
1433 "has_type_name".
1434 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
1435 type-name, now that they are defined too in b4_type_names.
1436
1437 2008-11-10 Akim Demaille <demaille@gostai.com>
1438
1439 Regen.
1440
1441 2008-11-10 Akim Demaille <demaille@gostai.com>
1442
1443 Make parser::yytranslate static.
1444 Small speedup (1%) on the list grammar. And makes yytranslate_
1445 available in non member functions.
1446
1447 * data/lalr1.cc (yytranslate_): Does not need to be a instance
1448 function.
1449
1450 2008-11-10 Akim Demaille <demaille@gostai.com>
1451
1452 Avoid trailing spaces.
1453 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
1454 * data/lalr1.cc: Don't indent before rule and symbol actions, as
1455 they can be empty, and anyway this incorrectly indents the first
1456 action.
1457
1458 2008-11-10 Akim Demaille <demaille@gostai.com>
1459
1460 Comment changes.
1461
1462 2008-11-10 Akim Demaille <demaille@gostai.com>
1463
1464 Use "enum" for integral constants.
1465 This is just nicer to read, I observed no speedup.
1466
1467 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
1468 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
1469 (yyuser_token_number_max_, yyundef_token_): Move into...
1470 (yytranslate_): here.
1471
1472 2008-11-10 Akim Demaille <demaille@gostai.com>
1473
1474 Shortcuts in bench directives.
1475 * etc/bench.pl.in (parse_dirs): New.
1476 Use it.
1477 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
1478 Create the benches in "benches/".
1479
1480 2008-11-10 Akim Demaille <demaille@gostai.com>
1481
1482 Formatting changes.
1483 * data/lalr1.cc: here.
1484
1485 2008-11-10 Akim Demaille <demaille@gostai.com>
1486
1487 Adjust verbose message to using emacs.
1488 * etc/bench.pl.in: Inform compilation-mode when we change the
1489 directory.
1490 (generate_grammar_list): Recognize %define "variant" in addition
1491 to %define variant.
1492
1493 2008-11-10 Akim Demaille <demaille@gostai.com>
1494
1495 Classify symbols by type-name.
1496 * src/uniqstr.h (UNIQSTR_CMP): New.
1497 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
1498 (type_names_output): New.
1499 (muscles_output): Use it.
1500 * data/lalr1.cc (b4_symbol_action_): Remove.
1501 (b4_symbol_case_, b4_type_action_): New.
1502 Adjust uses of b4_symbol_action_ to use b4_type_action_.
1503
1504 2008-11-10 Akim Demaille <demaille@gostai.com>
1505
1506 Change the handling of the symbols in the skeletons.
1507 Before we were using tables which lines were the symbols and which
1508 columns were things like number, tag, type-name etc. It is was
1509 difficult to extend: each time a column was added, all the numbers had
1510 to be updated (you asked for colon $2, not for "tag"). Also, it was
1511 hard to filter these tables when only a subset of the symbols (say the
1512 tokens, or the nterms, or the tokens that have and external number
1513 *and* a type-name) was of interest.
1514
1515 Now instead of monolithic tables, we define one macro per cell. For
1516 instance "b4_symbol(0, tag)" is a macro name which contents is
1517 self-decriptive. The macro "b4_symbol" provides easier access to
1518 these cells.
1519
1520 * src/output.c (type_names_output): Remove.
1521 (symbol_numbers_output, symbol_definitions_output): New.
1522 (muscles_output): Call them.
1523 (prepare_symbols): Define b4_symbols_number.
1524
1525 2008-11-10 Akim Demaille <demaille@gostai.com>
1526
1527 --trace=muscles
1528 * src/getargs.h, src/getargs.c (trace_muscle): New.
1529 (trace_types, trace_args): Support it.
1530 * src/output.c (output_skeleton): Use it.
1531
1532 2008-11-10 Akim Demaille <demaille@gostai.com>
1533
1534 muscles_output.
1535 * src/output.c (muscles_output): New, extracted from...
1536 (output_skeleton): here.
1537 Adjust.
1538
1539 2008-11-10 Akim Demaille <demaille@gostai.com>
1540
1541 Formatting changes.
1542
1543 2008-11-10 Akim Demaille <demaille@gostai.com>
1544
1545 Update the variant example.
1546 * examples/variant.yy: Formatting changes.
1547 One stage build.
1548
1549 2008-11-10 Akim Demaille <demaille@gostai.com>
1550
1551 Support constructor with an argument.
1552 This improves the "list" bench by 2%.
1553
1554 * data/lalr1.cc (variant::build): Add an overloaded version with
1555 an argument.
1556 * tests/c++.at (AT_CHECK_VARIANT): Check it.
1557
1558 2008-11-10 Akim Demaille <demaille@gostai.com>
1559
1560 Test variants.
1561 * tests/c++.at (AT_CHECK_VARIANTS): New.
1562 Use it with and without %define assert.
1563
1564 2008-11-10 Akim Demaille <demaille@gostai.com>
1565
1566 Add %precedence support.
1567 Unfortunately it is not possible to reuse the %prec directive. This
1568 is because to please POSIX, we do not require to end the rules with a
1569 semicolon. As a result,
1570
1571 foo: bar %prec baz
1572
1573 is ambiguous: either a rule which precedence is that of baz, or a rule,
1574 and then a declaration of the precedence of the token baz.
1575
1576 * doc/bison.texinfo: Document %precedence.
1577 (Precedence Only): New.
1578 * src/assoc.h, src/assoc.c (precedence_assoc): New.
1579 * src/conflicts.c (resolve_sr_conflict): Support it.
1580 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
1581 Parse it.
1582 * tests/calc.at: Use %precedence for NEG.
1583 * tests/conflicts.at (%precedence does not suffice)
1584 (%precedence suffices): New tests.
1585
1586 2008-11-09 Akim Demaille <demaille@gostai.com>
1587
1588 Make benches in a sub dirs.
1589 * etc/bench.pl.in ($dir): New.
1590 Use it.
1591 Check the use of constructors with an argument.
1592 (bench_variant_parser): Fix.
1593
1594 2008-11-09 Akim Demaille <demaille@gostai.com>
1595
1596 fix eof condition
1597
1598 2008-11-09 Akim Demaille <demaille@gostai.com>
1599
1600 Fix --help.
1601
1602 2008-11-09 Akim Demaille <demaille@gostai.com>
1603
1604 Require the generation of parse-gram.output.
1605 * src/Makefile.am (YACC): Pass --report=all.
1606
1607 2008-11-09 Akim Demaille <demaille@gostai.com>
1608
1609 Formatting changes.
1610
1611 2008-11-09 Akim Demaille <demaille@gostai.com>
1612
1613 Update TODO.
1614 * TODO: Remove obsolete items.
1615 Update others.
1616
1617 2008-11-09 Akim Demaille <demaille@gostai.com>
1618
1619 Enhance bench.pl.
1620 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
1621 (@token, $grammar, $bench): New.
1622 (generate_grammar_variant): Rename as...
1623 (generate_grammar_list): this.
1624 (generate_grammar): Adjust.
1625 (bench_grammar): Rename as...
1626 (bench): this.
1627 Use it in the various bench-marking routines.
1628 (-b, -g): New options.
1629
1630 2008-11-09 Akim Demaille <demaille@gostai.com>
1631
1632 Use a static hierarchy for symbols in the C++ parser.
1633 * data/lalr1.cc (symbol_base_type, symbol_type)
1634 (stack_symbol_type): Make it a static hierarchy.
1635 Adjust dependencies.
1636
1637 2008-11-09 Akim Demaille <demaille@gostai.com>
1638
1639 bench.pl -d, --directive.
1640 * etc/bench.pl.in (@directive): New.
1641 (&bench_grammar): Use it.
1642 (&bench_list_grammar): New, to provide access to the "variant"
1643 grammar.
1644 Use it.
1645 (getopts): Support -d, --directive.
1646
1647 2008-11-09 Akim Demaille <demaille@gostai.com>
1648
1649 Use inline for small operations.
1650 * data/lalr1.cc (symbol_base_type, symbol_type)
1651 (stack_symbol_type): Declare constructor and other operations as
1652 inline.
1653 (yy_destroy_): Inline.
1654
1655 2008-11-09 Akim Demaille <demaille@gostai.com>
1656
1657 Introduce a hierarchy for symbols.
1658 * data/lalr1.cc (symbol_base_type, symbol_type): New.
1659 (data_type): Rename as...
1660 (stack_symbol_type): this.
1661 Derive from symbol_base_type.
1662 (yy_symbol_value_print_): Merge into...
1663 (yy_symbol_print_): this.
1664 Rename as...
1665 (yy_print_): this.
1666 (yydestruct_): Rename as...
1667 (yy_destroy_): this.
1668 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
1669 (parser::parse): yyla is now of symbol_type.
1670 Use its type member instead of yytoken.
1671
1672 2008-11-09 Akim Demaille <demaille@gostai.com>
1673
1674 Rename data_type and stack_symbol_type.
1675 * data/lalr1.cc (data_type): Rename as...
1676 (stack_symbol_type): this.
1677
1678 2008-11-09 Akim Demaille <demaille@gostai.com>
1679
1680 Handle semantic value and location together.
1681 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
1682 yydata.value and yydata.location.
1683 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
1684 (YY_SYMBOL_PRINT): Now take semantic value and location as a
1685 single arg.
1686 Adjust all callers.
1687 (yydestruct_): New overload for a stack symbol.
1688
1689 2008-11-09 Akim Demaille <demaille@gostai.com>
1690
1691 Push a complete symbol, not connected parts.
1692 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
1693 state, value and location.
1694 Adjust callers.
1695
1696 2008-11-09 Akim Demaille <demaille@gostai.com>
1697
1698 Agregate yylval and yylloc.
1699 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
1700 (parser::yyla): this.
1701
1702 2008-11-09 Akim Demaille <demaille@gostai.com>
1703
1704 Rely on the state stack to display reduction traces.
1705 To display rhs symbols before a reduction, we used information
1706 about the rule reduced, which required the tables yyrhs and
1707 yyprhs. Now use rely only on the state stack to get the same
1708 information.
1709
1710 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
1711 Use them.
1712 (parser::yyrhs_, parser::yyprhs_): Remove.
1713 (parser::yy_reduce_print_): Use the state stack.
1714
1715 2008-11-09 Akim Demaille <demaille@gostai.com>
1716
1717 Fuse yyval and yyloc into yylhs.
1718 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
1719 yylhs.
1720 (parse): Replace yyval and yyloc with yylhs.value and
1721 yylhs.location.
1722 After a user action, compute yylhs.state earlier.
1723 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
1724 fresh error_token.
1725
1726 2008-11-09 Di-an Jan <dianj@freeshell.org>
1727
1728 Remove unused variable.
1729 * src/output.c (type_names_output): Remove unused variable sep.
1730
1731 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
1732
1733 Change tests/output.at quoting.
1734 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
1735 expanding arguments.
1736
1737 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1738
1739 Don't add a semicolon to actions for %skeleton or %language.
1740 It breaks Java test cases as reported by Akim Demaille.
1741 * src/scan-code.l: Implement.
1742
1743 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1744
1745 Clean up %skeleton and %language priority implementation.
1746 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1747 remove static qualifier because others will soon need to see it.
1748 (language_prio): Likewise.
1749 (getargs): Use command_line_prio rather than 0.
1750 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1751 enum fields.
1752 (skeleton_prio): Extern it.
1753 (language_prio): Extern it.
1754 * src/parse-gram.y: Use grammar_prio rather than 1.
1755
1756 2008-11-07 Akim Demaille <demaille@gostai.com>
1757
1758 Moving push traces into yypush_.
1759 * data/lalr1.cc (yypush_): Now takes a optional trace message.
1760 Adjust all uses.
1761
1762 2008-11-07 Akim Demaille <demaille@gostai.com>
1763
1764 The single-stack C++ parser is now the standard one.
1765 * data/lalr1.cc: Rename as...
1766 * data/lalr1-split.cc: this.
1767 * data/lalr1-fusion.cc: Rename as...
1768 * data/lalr1.cc: this.
1769 * etc/bench.pl.in: Adjust.
1770
1771 2008-11-07 Akim Demaille <demaille@gostai.com>
1772
1773 Avoid empty-if warnings.
1774 Reported by Quentin Hocquet.
1775
1776 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
1777 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
1778
1779 2008-11-07 Akim Demaille <demaille@gostai.com>
1780
1781 Pass command line location to skeleton_arg and language_argmatch.
1782 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
1783 The location argument is now mandatory.
1784 Adjust all dependencies.
1785 (getargs): Use command_line_location.
1786
1787 2008-11-07 Akim Demaille <demaille@gostai.com>
1788
1789 -D, --define.
1790 * src/getargs.c (usage): Document -D.
1791 Fix help string for --locations.
1792 (command_line_location): New.
1793 (short_options, long_options, getargs): Support -D, --define.
1794 (getargs): Move -d support at the right place.
1795 * doc/bison.texinfo (Bison Options): Update.
1796 * tests/input.at (%define, --define): New.
1797
1798 2008-11-07 Akim Demaille <demaille@gostai.com>
1799
1800 Initialize the muscle table before parsing the command line.
1801 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
1802 (getargs): Define file_name.
1803 * src/main.c (main): Initialize muscle_tab before calling
1804 getargs.
1805 * src/muscle_tab.c (muscle_init): No longer define file_name, as
1806 its value is not available yet.
1807
1808 2008-11-07 Akim Demaille <demaille@gostai.com>
1809
1810 Locations without columns for command line arguments.
1811 * src/location.c (location_print): Don't display negative columns.
1812 * src/location.h: Document this.
1813
1814 2008-11-07 Akim Demaille <demaille@gostai.com>
1815
1816 Fix --help.
1817 * src/getargs.c (usage): Fix help string for -W.
1818
1819 2008-11-07 Akim Demaille <demaille@gostai.com>
1820
1821 Handle more general types of option arguments.
1822 * build-aux/cross-options.pl: The argument ends at the first
1823 space, not the first non-symbol character.
1824 Use @var for each word appearing the argument description.
1825
1826 2008-11-07 Akim Demaille <demaille@gostai.com>
1827
1828 Destroy the variants that remain on the stack in case of error.
1829 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
1830 destructor.
1831 Display the value only if yymsg is nonnull.
1832 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
1833
1834 2008-11-07 Akim Demaille <demaille@gostai.com>
1835
1836 Add "%define assert" to variants.
1837 This is used to help the user catch cases where some value gets
1838 ovewritten by a new one. This should not happen, as this will
1839 probably leak.
1840
1841 Unfortunately this uncovered a bug in the C++ parser itself: the
1842 lookahead value was not destroyed between two calls to yylex. For
1843 instance if the previous lookahead was a std::string, and then an int,
1844 then the value of the std::string was correctly taken (i.e., the
1845 lookahead was now an empty string), but std::string structure itself
1846 was not reclaimed.
1847
1848 This is now done in variant::build(other&) (which is used to take the
1849 value of the lookahead): other is not only stolen from its value, it
1850 is also destroyed. This incurs a new performance penalty of a few
1851 percent, and union becomes faster again.
1852
1853 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
1854 (b4_variant_if): New.
1855 (variant::built): New.
1856 Use it whereever the status of the variant changes.
1857 * etc/bench.pl.in: Check the penalty of %define assert.
1858
1859 2008-11-07 Akim Demaille <demaille@gostai.com>
1860
1861 Use "%define variant" in bench.pl.
1862 * etc/bench.pl.in: No longer use the pseudo directive %variants,
1863 just use %define variants.
1864
1865 2008-11-07 Akim Demaille <demaille@gostai.com>
1866
1867 Regen.
1868 * src/parse-gram.h, src/parse-gram.c: Regen.
1869
1870 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
1871
1872 Fix user actions without a trailing semicolon.
1873 Reported by Sergei Steshenko at
1874 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1875 * THANKS (Sergei Steshenko): Add.
1876 * src/scan-code.l (SC_RULE_ACTION): Fix it.
1877 * tests/regression.at (Fix user actions without a trailing semicolon):
1878 New test case.
1879
1880 2008-11-04 Akim Demaille <demaille@gostai.com>
1881
1882 Use b4_copyright_years.
1883 * data/yacc.c (b4_copyright_years): New.
1884 Fix its value according to the comments in the file.
1885 Use it and undefine it.
1886
1887 2008-11-04 Akim Demaille <demaille@gostai.com>
1888
1889 Formatting changes.
1890 * data/lalr1-fusion.cc, src/parse-gram.y: here.
1891
1892 2008-11-04 Akim Demaille <demaille@gostai.com>
1893
1894 Formatting changes.
1895 * data/lalr1-fusion.cc: here.
1896
1897 2008-11-04 Akim Demaille <demaille@gostai.com>
1898
1899 Use strict on bench.pl.
1900 * etc/bench.pl.in (&run, &generate_grammar): New.
1901 Rename the grammar generating functions for consistency.
1902 Change the interface so that the list of benches to run is passed
1903 as (optionless) arguments.
1904 (&compile): Use &run.
1905
1906 2008-11-04 Akim Demaille <demaille@gostai.com>
1907
1908 Remove spurious initial empty lines.
1909 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1910 * data/yacc.c: End the @output lines with an @.
1911
1912 2008-11-04 Akim Demaille <demaille@gostai.com>
1913
1914 Improve the display of sizes.
1915 * etc/bench.p.in: Higher precision.
1916 Sort by decreasing size.
1917
1918 2008-11-04 Akim Demaille <demaille@gostai.com>
1919
1920 Don't memcpy C++ structures.
1921 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
1922 arguments.
1923 (variant::build): New overload for
1924 copy-construction-that-destroys.
1925 (variant::swap): New.
1926 (parser::yypush_): Use it in variant mode.
1927
1928 2008-11-04 Akim Demaille <demaille@gostai.com>
1929
1930 Better defaults for bench.pl.
1931 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
1932 default values.
1933 Adjust &verbose uses.
1934 (-q, --quiet): New.
1935
1936 2008-11-04 Akim Demaille <demaille@gostai.com>
1937
1938 Make variant.yy more complex.
1939 std::list cannot be copied via memcpy, they are more demanding than
1940 std::string. Use one std::list to strengthen the test.
1941
1942 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
1943 Adjust.
1944 Create a list of strings, instead of a single large string.
1945
1946 2008-11-04 Akim Demaille <demaille@gostai.com>
1947
1948 bench.pl --bench.
1949 * etc/bench.pl.in (--bench, $bench): New.
1950
1951 2008-11-04 Akim Demaille <demaille@gostai.com>
1952
1953 Sort methods.
1954 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
1955 Define it after as().
1956
1957 2008-11-04 Akim Demaille <demaille@gostai.com>
1958
1959 Useless parens.
1960 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
1961
1962 2008-11-04 Akim Demaille <demaille@gostai.com>
1963
1964 Issue missing synclines after user actions.
1965 * data/c.m4 (b4_case): Issue synclines on the output file.
1966
1967 2008-11-04 Akim Demaille <demaille@gostai.com>
1968
1969 Remove trailing empty line.
1970 * data/lalr1-fusion.cc: Don't add an empty line after the user's
1971 epilogue.
1972
1973 2008-11-04 Akim Demaille <demaille@gostai.com>
1974
1975 Fix output of copyright years.
1976 * data/bison.m4 (b4_copyright): Fix the indentation of the
1977 copyright year paragraph.
1978 Use b4_copyright_years when no years are given.
1979 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
1980 (b4_copyright_years): New.
1981 Use it.
1982
1983 2008-11-04 Akim Demaille <demaille@gostai.com>
1984
1985 Avoid the spurious initial empty line.
1986 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
1987 the end of @output request to suppress the empty line that
1988 results.
1989
1990 2008-11-04 Akim Demaille <demaille@gostai.com>
1991
1992 Remove parser::rhs_number_type.
1993 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
1994 (yyrhs_): Use b4_table_define.
1995
1996 2008-11-04 Akim Demaille <demaille@gostai.com>
1997
1998 Fix iteration type.
1999 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
2000
2001 2008-11-04 Akim Demaille <demaille@gostai.com>
2002
2003 Factor the declaration of the integer tables.
2004 * data/lalr1-fusion.cc (b4_table_define): New.
2005 Use it.
2006
2007 2008-11-03 Akim Demaille <demaille@gostai.com>
2008
2009 Fix indentation of tables in lalr1.cc
2010 * data/lalr1-fusion.cc: Fix the indentation.
2011
2012 2008-11-03 Akim Demaille <demaille@gostai.com>
2013
2014 Destroy the lhs symbols after reduction.
2015 * data/lalr1-fusion.cc (parse): After the user action, when in
2016 variant mode, destroy the lhs symbols.
2017
2018 2008-11-03 Akim Demaille <demaille@gostai.com>
2019
2020 Simplify yysyntax_error_ use.
2021 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
2022 type, but make it unnamed in the declaration when it is not used.
2023
2024 2008-11-03 Akim Demaille <demaille@gostai.com>
2025
2026 Let yy::variant::build return an lvalue.
2027 * data/lalr1-fusion.cc (variant::build): Return a reference to the
2028 object.
2029
2030 2008-11-03 Akim Demaille <demaille@gostai.com>
2031
2032 Define yy::variant only when needed.
2033 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
2034 used.
2035
2036 2008-11-03 Akim Demaille <demaille@gostai.com>
2037
2038 Bench the three-stack lalr1.cc.
2039 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
2040 one-stack one.
2041
2042 2008-11-03 Akim Demaille <demaille@gostai.com>
2043
2044 Fail on parse error in calc++.
2045 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
2046 status.
2047 * examples/calc++/test ($me, $number, $exit, run): New.
2048 Use them to propagate errors to the exit status.
2049
2050 2008-11-03 Akim Demaille <demaille@gostai.com>
2051
2052 Don't specify the skeleton twice in the example.
2053 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
2054 file does what is needed.
2055
2056 2008-11-03 Akim Demaille <demaille@gostai.com>
2057
2058 bench: Improve output.
2059 * etc/bench.pl.in (bench_grammar): Tune the printf format.
2060
2061 2008-11-03 Akim Demaille <demaille@gostai.com>
2062
2063 bench: check impact of %debug on variants.
2064 * etc/bench.pl.in (variant_grammar): Fix the computation of
2065 $variant.
2066 Generate a grammar file that can work with or without %debug.
2067 Do use the @directive.
2068 (bench_variant_parser): Check impact of %debug.
2069 (@directives): Rename all the occurrences to...
2070 (@directive): this, for consistency.
2071
2072 2008-11-03 Akim Demaille <demaille@gostai.com>
2073
2074 bench: report the size too.
2075 * etc/bench.pl.in ($iterations): Defaults to -3.
2076 (&bench_grammar): Require hireswallclock.
2077 Compute and display the size of the result.
2078 More comments.
2079
2080 2008-11-03 Akim Demaille <demaille@gostai.com>
2081
2082 bench: More use of the verbosity level.
2083 * etc/bench.pl.in ($verbose, &verbose): New.
2084 Use them.
2085 More POD documentation.
2086
2087 2008-11-03 Akim Demaille <demaille@gostai.com>
2088
2089 bench.pl: a command line interface
2090 * etc/bench.pl.in: More doc.
2091 Some fixes in the documentation.
2092 ($cflags, $iterations, &help, &getopt): New.
2093 Use them.
2094 (&variant_grammar): Let the number of stages be 10 times what is
2095 specified.
2096
2097 2008-11-03 Akim Demaille <demaille@gostai.com>
2098
2099 Bench the use of Boost.Variants.
2100 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
2101 New.
2102 (&compile): Be ready to compile C++ parsers.
2103 (&bench_push_parser): Move debug information to the outermost
2104 level.
2105 * THANKS: Add Michiel De Wilde.
2106
2107 2008-11-03 Akim Demaille <demaille@gostai.com>
2108
2109 bench.pl: Pass directives as a list instead of as a string.
2110 * etc/bench.pl.in (&directives): New.
2111 (&triangular_grammar, &calc_grammar): Use it to format the Bison
2112 directives.
2113 (&triangular_grammar): Do use the directives (were ignored).
2114 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
2115 directives.
2116
2117 2008-11-03 Akim Demaille <demaille@gostai.com>
2118
2119 Improve genericity of bench.pl.
2120 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
2121 argument.
2122 (&bench_push_parser): New.
2123 Call it.
2124
2125 2008-11-03 Akim Demaille <demaille@gostai.com>
2126
2127 Add documentation to bench.pl.
2128 * etc/bench.pl.in: Comment changes.
2129
2130 2008-11-03 Akim Demaille <demaille@gostai.com>
2131
2132 Fuse the three stacks into a single one.
2133
2134 In order to make it easy to perform benchmarks to ensure that
2135 there are no performance loss, lalr1.cc is forked into
2136 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
2137 lalr1.cc.
2138
2139 Meanwhile, to make sure that lalr1-fusion.cc is correctly
2140 exercized by the test suite, the user must install a symbolic link
2141 from lalr1.cc to it.
2142
2143 Instead of having three stacks (state, value, location), use a
2144 stack of triples. This considerably simplifies the code (and it
2145 will be easier not to require locations as currently does the C++
2146 parser), and also gives a 10% speedup according to
2147 etc/bench (probably mainly since memory allocation is done once
2148 instead of three times).
2149
2150 Another motivation is to make it easier to destruct properly
2151 semantic values: now that they are bound to their state (hence
2152 symbol type) it will be easier to call the appropriate destructor.
2153
2154 These changes should probably benefit the C parser too.
2155
2156 * data/lalr1.cc: Copy as...
2157 * data/lalr1-fusion.cc: this new file.
2158 (b4_rhs_value, b4_rhs_location): New definitions overriding those
2159 from c++.m4.
2160 (state_stack_type, semantic_stack_type, location_stack_type)
2161 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
2162 (data_type, stack_type, yystack_): New.
2163 (YYLLOC_DEFAULT, yypush_): Adjust.
2164 (yyerror_range): Now based on data_type, not location_type.
2165
2166 2008-11-03 Akim Demaille <demaille@gostai.com>
2167
2168 Push the state, value, and location at the same time.
2169 This is needed to prepare a forthcoming patch that fuses the three
2170 stacks into one.
2171
2172 * data/lalr1.cc (parser::yypush_): New.
2173 (parser::yynewstate): Change the semantics: instead of arriving to
2174 this label when value and location have been pushed, but yystate
2175 is to be pushed on the state stack, now the three of them must
2176 have been pushed before. yystate still must be the new state.
2177 This allows to use yypush_ everywhere instead of individual
2178 handling of the stacks.
2179
2180 2008-11-03 Akim Demaille <demaille@gostai.com>
2181
2182 Prefer references to pointers.
2183 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
2184 definition to use references instead of pointers.
2185 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
2186 Take the value and location as references.
2187 Adjust callers.
2188
2189 2008-11-03 Akim Demaille <demaille@gostai.com>
2190
2191 stack::size instead of stack::height.
2192 * data/lalr1.cc (stack::height): Rename as...
2193 (stack::size): this.
2194 Fix the output type.
2195 Comment changes.
2196
2197 2008-11-03 Akim Demaille <demaille@gostai.com>
2198
2199 Use variants to support objects as semantic values.
2200 This patch was inspired by work by Michiel De Wilde. But he used
2201 Boost variants which (i) requires Boost on the user side, (ii) is
2202 slow, and (iii) has useless overhead (the parser knows the type of
2203 the semantic value there is no reason to duplicate this
2204 information as Boost.Variants do).
2205
2206 This implementation reserves a buffer large enough to store the
2207 largest objects. yy::variant implements this buffer. It was
2208 implemented with Quentin Hocquet.
2209
2210 * src/output.c (type_names_output): New.
2211 (output_skeleton): Invoke it.
2212 * data/c++.m4 (b4_variant_if): New.
2213 (b4_symbol_value): If needed, provide a definition for variants.
2214 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
2215 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
2216 (b4_char_sizeof, yy::variant): New.
2217 (parser::parse): If variants are requested, define
2218 parser::union_type, parser::variant, change the definition of
2219 semantic_type, construct $$ before running the user action instead
2220 of performing a default $$ = $1.
2221 * examples/variant.yy: New.
2222 Based on an example by Michiel De Wilde.
2223
2224 2008-11-03 Akim Demaille <demaille@gostai.com>
2225
2226 Parameterize the extraction of semantic values.
2227 To make future changes easier, no longer rely on ".TYPE" being the
2228 way to get a semantic value.
2229
2230 * data/c.m4 (b4_symbol_value): New.
2231 Use it.
2232 * data/c++.m4, data/yacc.c: Use it.
2233 * data/glr.c: Use b4_symbol_value.
2234 (b4_rhs_data): New.
2235 Use it.
2236
2237 2008-11-03 Akim Demaille <demaille@gostai.com>
2238
2239 Prepare easier M4 changes.
2240 * data/lalr1.cc: Use escaped [] instead of literals to prepare
2241 future changes.
2242
2243 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2244
2245 Initiate further development.
2246 * NEWS: Create an empty section for new entries.
2247 * gnulib: Update submodule to HEAD.
2248
2249 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2250
2251 * NEWS: Version 2.4.
2252
2253 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2254
2255 Prepare for next release.
2256 * NEWS: Briefly mention changes since 2.3b.
2257 * README: Say GNU m4 1.4.6, which we've been requiring in release
2258 announcements already, not 1.4.3, which breaks the build.
2259
2260 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2261
2262 Say %language is experimental.
2263 We're thinking of extending it's effect on output file naming. See the
2264 thread at
2265 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2266 * NEWS: Say it's experimental.
2267 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2268 recommend it over %skeleton for now.
2269 (Bison Options): Likewise.
2270 (C++ Bison Interface): Use %skeleton not %language.
2271 (Calc++ Parser): Use %skeleton not %language.
2272 * src/getargs.c (usage): Say it's experimental.
2273
2274 2008-11-01 Di-an Jan <dianj@freeshell.org>
2275 Paolo Bonzini <bonzini@gnu.org>
2276
2277 Support all Java parser class modifiers.
2278 * data/java.m4 (b4_percent_define_get3): New.
2279 (b4_final_if, b4_strictfp_if): New.
2280 * data/lalr1.java (final, strictfp, extends, implements): Support.
2281 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2282 documentation.
2283 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2284 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2285 (AT_CHECK_JAVA_GREP): New.
2286 (Java parser class modifiers): New test.
2287 (Java parser class extends and implements): New test.
2288
2289 Model exception propagation better with throws and lex_throws.
2290 * data/java.m4 (b4_list2): New.
2291 (throws): Change default.
2292 * data/lalr1.java (yyaction): Add throws.
2293 (parse): Add lex_throws in addition to throws.
2294 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2295 * tests/java.at (Java throws specifications): New test.
2296
2297 Improve documentation for Java parsers.
2298 * doc/bison.texinfo (Java Parsers): Add subsections.
2299 Don't quote first argument of %define.
2300 (Java Bison Interface): Document output files. Move documentation
2301 of parser class and merge into Java Parser Interface. Document
2302 features that error out. Document directives with no effect.
2303 Move note about Javadoc higher.
2304 (Java Semantic Values): Explicitly mention stype.
2305 Document that generic types cannot be used.
2306 (Java Location Values): Use @deftypeivar. Document constructors.
2307 Correct return value for toString.
2308 (Java Parser Interface): List undocumented constants/fields.
2309 Move documentation of fields added by %parse-param closer to list
2310 of members. Document that token names are added as fields.
2311 Document constructors accurately. Remove error method.
2312 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2313 Interface. Describe %code lexer and yylex accutately.
2314 Remove documentation that does not match the code.
2315 (Java Action Features): New.
2316 (Java Differences): Add reference. Add item on semantic values.
2317 Add note about @{ ... @}. Clarify %% epilogue placement.
2318 (Java Declarations Summary): New.
2319
2320 Fix Java skeleton.
2321 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2322 (b4_remove_comma): Quote test argument.
2323 (b4_identification): Remove "bison" field.
2324 * tests/java.at (Java parser class and package names): New test.
2325 (Java %parse-param and %lex-param): New test.
2326 (Java stype, position_class and location_class): New test.
2327
2328 2008-10-31 Di-an Jan <dianj@freeshell.org>
2329
2330 * data/lalr1.jave: Update copyright years.
2331 (YYParser): Correct name of "generated from" file in Javadoc:
2332 use b4_file_name instead of @ofile@.
2333 (Location constructor): Correct Javadoc parameter name.
2334 (yylloc): Add missing opening m4 quote after b4_location_if.
2335 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2336 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2337 (YYParser constructor): Correct Javadoc parameter name.
2338
2339 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2340
2341 Always put auxiliary code files in the same dir as other output files.
2342 * src/files.c (compute_file_name_parts): When the user specifies
2343 --output but not --file-prefix, extract the directory prefix from the
2344 file prefix not from the grammar file name. This affects the location
2345 of files like location.hh generated by the C++ skeleton. The includes
2346 in the other output files require this fix.
2347 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2348 for expected output files.
2349 (Output files): Add a test for the above.
2350
2351 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2352
2353 * gnulib: Update submodule to HEAD.
2354
2355 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2356
2357 Update copyright year.
2358 * src/files.c: Here.
2359
2360 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2361
2362 Don't overwrite the input file.
2363 * src/files.c (output_file_name_check): Fatal error if using input file
2364 for output.
2365 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2366 argument.
2367 (Conflicting output files): Add test.
2368
2369 2008-10-28 Akim Demaille <demaille@gostai.com>
2370
2371 Space changes.
2372 * data/lalr1.cc: Formatting changes.
2373
2374 2008-10-28 Akim Demaille <demaille@gostai.com>
2375
2376 Don't define debugging functions when !YYDEBUG.
2377 * data/lalr1.cc (debug_stream, set_debug_stream)
2378 (debug_level_type, debug_level, set_debug_level): Don't
2379 declare them when YYDEBUG is not defined.
2380 The implementation are already YYDEBUG-aware.
2381
2382 2008-10-28 Akim Demaille <demaille@gostai.com>
2383
2384 Prefer "continue" for empty loop bodies.
2385 * etc/bench.pl.in: Use "continue" instead of {}.
2386
2387 2008-10-28 Akim Demaille <demaille@gostai.com>
2388
2389 Space and comments changes.
2390 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2391 * data/c.m4, data/lalr1.cc: Space changes.
2392
2393 2008-10-28 Akim Demaille <demaille@gostai.com>
2394
2395 Make gnulib a submodule.
2396 * gnulib: New.
2397 * .gitmodules (gnulib): New.
2398
2399 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2400
2401 Fix yyerror_range for user-defined location type in C++. Reported by
2402 Georg Sauthoff at
2403 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2404 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2405 * THANKS (Georg Sauthoff): Add.
2406
2407 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2408
2409 Update several administrative files mainly to facilitate releasing.
2410 * HACKING (Administrivia): Make the git-merge-changelog notes more
2411 helpful.
2412 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2413 (Release Procedure): Update for git and add numerous details that were
2414 previously missing.
2415 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2416 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2417 that announcements don't claim we bootstrapped with whatever bison
2418 happened to be in PATH. Add flex as a bootstrap tool.
2419 * Makefile.maint: Remove, previously replaced by maint.mk.
2420 * Makefile.cfg: Remove, and migrate settings to...
2421 * cfg.mk: ... here for the sake of `make announcement'.
2422 * bootstrap.conf (gnulib_modules): Add announce-gen.
2423 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2424 Berry.
2425
2426 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2427
2428 Small but important bugfixes for the Java skeleton.
2429 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2430 (yy_symbol_print): Call toString on yyvaluep.
2431
2432 2008-08-29 Akim Demaille <demaille@gostai.com>
2433
2434 Clarify UPDATED use.
2435 * doc/bison.texinfo: It refers to the last edition of this file,
2436 not to the release date of Bison.
2437 Reported by Joel E. Denny.
2438
2439 2008-08-29 Akim Demaille <demaille@gostai.com>
2440
2441 * README: Update FAQ pointer.
2442 Reported by Joel E. Denny.
2443
2444 2008-08-27 Eric Blake <ebb9@byu.net>
2445
2446 Resync m4sugar from autoconf.
2447 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2448 (m4_init): Adjust to latest m4.git changes.
2449 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2450 effects.
2451 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2452 (_m4_list_cmp): Reduce side effects.
2453
2454 2008-08-27 Akim Demaille <demaille@gostai.com>
2455
2456 Check yyerrok in calc.at.
2457 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2458 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2459 expected.
2460
2461 2008-08-27 Akim Demaille <demaille@gostai.com>
2462
2463 Support yyerrok in lalr1.cc.
2464 YYBACKUP is still to import back into lalr1.cc.
2465 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
2466
2467 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2468
2469 For maintainer-check*, don't recompile for a $(VERSION) update.
2470 * cfg.mk: New file.
2471 (_is-dist-target): Override the one in GNUmakefile.
2472 * Makefile.am (EXTRA_DIST): Add cfg.mk.
2473
2474 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2475
2476 Update for recent change to gnulib.
2477 * src/parse-gram.y: Don't include strverscmp.h. It comes from
2478 string.h now.
2479
2480 2008-08-15 Eric Blake <ebb9@byu.net>
2481
2482 Remaining m4sugar merge from autoconf.
2483 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2484 * data/m4sugar/foreach.m4: New file, copied from autoconf.
2485 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2486 * src/output.c (output_skeleton): Tell m4 how to find it.
2487
2488 Partial m4sugar merge from autoconf: m4_map.
2489 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2490 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2491 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2492 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2493 for empty list.
2494 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2495 Likewise.
2496 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2497 declares it.
2498
2499 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2500
2501 Keep .version and PACKAGE_VERSION in sync.
2502 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2503 dependency, and add comments justifying this in more detail. Discussed
2504 starting at
2505 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2506
2507 2008-08-06 Eric Blake <ebb9@byu.net>
2508
2509 Partial m4sugar merge from autoconf: m4_shiftn.
2510 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2511 (m4_shift2, m4_shift3): New macros.
2512 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2513 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2514 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2515 * data/java.m4 (b4_remove_comma): Likewise.
2516
2517 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2518 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2519 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2520 (m4_init): Consolidate wrapped text into single m4_wrap.
2521 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2522 in wrapped text.
2523
2524 2008-08-05 Eric Blake <ebb9@byu.net>
2525
2526 Partial m4sugar merge from autoconf: builtins, version.m4.
2527 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2528 (m4_prepend): Remove, as it is unused and inherently quadratic,
2529 whereas m4_append is linear in newer m4.
2530 (m4_mkstemp): New builtin.
2531 (m4_symbols): Make rename conditional.
2532 (m4_version_prereq): Ensure fatal error if used in bison, which
2533 intentionally lacks version.m4.
2534
2535 Fix comments in m4sugar.
2536 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2537
2538 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2539
2540 Update for recent .gitignore fix in Gnulib.
2541 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2542 anchored .gitignore entries.
2543
2544 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2545
2546 Set gnu or gnits strictness.
2547 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2548 development and gnits strictness for releases. Based on Eric Blake's
2549 suggestion at
2550 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2551
2552 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2553
2554 * NEWS: Clarify documentation of %language.
2555
2556 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2557
2558 Support usage of git-merge-changelog.
2559 * .gitattributes: New.
2560 * HACKING: Document usage of git-merge-changelog.
2561 * bootstrap: Install git-merge-changelog entries in .git/config
2562 if appropriate.
2563
2564 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2565
2566 Remove remaining dependence on CVS Id keyword.
2567 * ChangeLog: For the sake of people still using CVS, don't use dollars
2568 when mentioning Id.
2569 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2570 unusual anyway.
2571 * data/xslt/xml2dot.xsl: Likewise.
2572 * data/xslt/xml2text.xsl: Likewise.
2573 * data/xslt/xml2xhtml.xsl: Likewise.
2574 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2575 * doc/Makefile.am (neutralize): Remove, no longer needed.
2576 (.x.1): Don't use neutralize.
2577 (edit): Don't substitute for ID.
2578 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2579
2580 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2581
2582 Fix dependence on computed configure variables.
2583 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2584 $(top_srcdir)/configure.ac so that changes to computed variables, such
2585 as PACKAGE_VERSION, are seen.
2586 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2587
2588 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2589
2590 Update copyright dates for recent changes.
2591 * Makefile.am: Here.
2592 * src/Makefile.am: Here.
2593 * src/reduce.c: Here.
2594 * tests/reduce.at: Here.
2595
2596 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2597
2598 Use git-version-gen for version names between releases.
2599 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2600 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2601 * .prev-version: New.
2602 * .version.in: Remove.
2603 * ChangeLog: Remove the Id previously used for capturing the CVS
2604 revision.
2605 * GNUmakefile: Remove, now copied from Gnulib.
2606 * Makefile.am: Add code suggested by comments in
2607 build-aux/git-version-gen.
2608 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2609 .prev-version, and .version.
2610 * NEWS (2.3b+): Rename to...
2611 (?.?): ... this because we're dropping the "+" version naming scheme,
2612 but, in general, we still can't be sure of our next release name.
2613 * bootstrap: Add a quick hack to remove from .gitignore the
2614 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2615 entry. This should really be fixed in gnulib instead.
2616 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2617 * configure.ac (AC_INIT): Set version name by invoking
2618 build-aux/git-version-gen.
2619 (AC_CONFIG_FILES): Remove .version, now generated by
2620 build-aux/git-version-gen.
2621 * maint.mk: New, copied from coreutils.
2622 * doc/.cvsignore (bison.1): Add.
2623 * doc/.gitignore (/bison.1): Add.
2624 * doc/bison.1: Remove, generated.
2625 * src/.cvsignore (revision.c): Remove.
2626 * src/.gitignore (/revision.c): Remove.
2627 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2628 (BUILT_SOURCES): Remove revision.c.
2629 (revision.c): Remove.
2630 * src/getargs.c (version): Don't print revision after the VERSION.
2631 * src/revision.h: Remove.
2632
2633 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2634
2635 Fix untranslatable composition of sentences. Reported by Goran
2636 Uddeborg at
2637 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2638 * THANKS (Goran Uddeborg): Add.
2639 * src/reduce.c (reduce_print): Report the number of nonterminals and
2640 rules useless in the grammar in separate sentences.
2641 * tests/reduce.at (Useless Rules): Update output.
2642 (Reduced Automaton): Likewise.
2643 (Underivable Rules): Likewise.
2644 (Empty Language): Likewise.
2645
2646 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2647
2648 Fix some .gitignore and .cvsignore problems.
2649 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2650 (insert_vc_ignore): ... this new function, which prepends `/' to all
2651 .gitignore entries before passing them to insert_sorted_if_absent.
2652 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2653 .cvsignore files are maintained even though Bison developers run
2654 bootstrap while using Git.
2655 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2656 unneeded by Bison.
2657 (gnulib): Add.
2658 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2659 unneeded. Reported by Eric Blake.
2660 * lib/.gitignore (/*~): Add.
2661 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2662 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2663 Blake.
2664 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2665
2666 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2667
2668 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2669 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2670 * bootstrap.conf (gnulib_modules): Add unsetenv.
2671 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2672 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2673 (/setenv.m4): Add.
2674 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2675 the first argument because it may become position-dependent, and unset
2676 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2677 Add comments explaining these issues in more detail.
2678
2679 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2680
2681 Add .gitignore everywhere based on .cvsignore.
2682 * .gitignore: New.
2683 * build-aux/.gitignore: New.
2684 * data/.gitignore: New.
2685 * doc/.gitignore: New.
2686 * etc/.gitignore: New.
2687 * examples/.gitignore: New.
2688 * examples/calc++/.gitignore: New.
2689 * lib/.gitignore: New.
2690 * m4/.gitignore: New.
2691 * po/.gitignore: New.
2692 * runtime-po/.gitignore: New.
2693 * src/.gitignore: New.
2694 * tests/.gitignore: New.
2695
2696 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2697
2698 * NEWS (2.3b+): New section, empty for now.
2699 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2700
2701 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2702
2703 * NEWS (2.3b): Update release date since there has been a delay in
2704 getting the announcements and tarballs out.
2705
2706 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2707
2708 * NEWS: Version 2.3b.
2709 * configure.ac (AC_INIT): Likewise.
2710 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2711
2712 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2713
2714 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2715 been doing it for years.
2716 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2717 (Release Procedure): Add FIXME about make alpha being unmaintained.
2718
2719 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2720
2721 * data/yacc.c: Reformat m4 a little for readability.
2722 * src/lalr.c (build_relations): Correct comment.
2723
2724 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2725
2726 DJGPP specific issue.
2727 * djgpp/config.sed: Fixes required to run configure scripts generated
2728 by autoconf 2.62.
2729
2730 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2731
2732 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2733 coordinator@translationproject.org.
2734
2735 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2736
2737 * THANKS: Add Eric Blake.
2738
2739 2008-04-23 Eric Blake <ebb9@byu.net>
2740
2741 Revert prior patch, by working around autoconf regression.
2742 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2743 ("Output file name: ("): Uncomment test.
2744 ("Output file name: )"): Likewise.
2745 Based on an idea from Noah Misch.
2746
2747 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2748
2749 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2750 2.61. Reported by Juan Manuel Guerrero at
2751 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2752 * tests/output.at ("Output file name: ("): Comment out test case for
2753 now.
2754 ("Output file name: )"): Likewise.
2755
2756 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2757
2758 * GNUmakefile: Update git-version-gen invocation so make dist
2759 succeeds.
2760
2761 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2762
2763 Update to the current gnulib CVS repository, and fix trigraph handling
2764 in Bison.
2765 * bootstrap: Update gnulib CVS repository URL.
2766 (symlink_to_dir): Encapsulate the code that guarantees the destination
2767 directory exists into...
2768 (check_dst_dir): ... this new function, and...
2769 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2770 fail when copying files into lib/uniwidth/.
2771 * src/output.c (prepare_symbols): When writing yytname muscles, where
2772 symbol names will be encoded in C-string literals, tell quotearg to
2773 escape trigraphs. This used to be the default in gnulib.
2774 * tests/regression.at (Token definitions): Because of the change in
2775 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2776 escapes trigraphs in symbol names. Thus, yytname no longer has
2777 trigraphs unnecessarily doubly escaped. Update test case output.
2778 Extend test case to be sure Bison's own error messages will no longer
2779 have trigraphs in symbol names unnecessarily escaped once.
2780
2781 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2782
2783 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2784 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2785 * .cvsignore: Add .version.
2786 * .version.in: New.
2787 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2788 * configure.ac (AC_CONFIG_FILES): Add .version.
2789 * build-aux/.cvsignore: Add git-version-gen.
2790
2791 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2792
2793 * NEWS (2.3a+): Mention that -g now takes an argument.
2794 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2795 consistency. Update the -g and -x entries now that they take
2796 arguments. Use brackets to indicate optional arguments.
2797 * src/getargs.c (usage): Explain the relationship between arguments of
2798 long and short options more completely. Document --defines and -d
2799 separately since the former takes an argument but, for POSIX Yacc, the
2800 latter does not.
2801 (short_options): Let -W take an optional argument like --warnings.
2802 (getargs): Sort cases.
2803
2804 2008-02-28 Akim Demaille <demaille@gostai.com>
2805
2806 * doc/bison.texinfo: Fix a few typos.
2807
2808 2008-02-28 Akim Demaille <akim@epita.fr>
2809
2810 * doc/bison.texinfo (Bison Options): Document -W.
2811 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2812
2813 2008-02-28 Akim Demaille <akim@epita.fr>
2814
2815 * src/getargs.c (short_options): Split and sort for readability.
2816 -g and -x take optional arguments, just like their long options.
2817 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2818 understand.
2819 Fix the handling of $opt which resulted in all the argument to be
2820 considered as optional.
2821
2822 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2823
2824 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2825 say its interface is experimental.
2826 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2827 Java.
2828 (Bison Options): In the -L and --language entry, mention Java.
2829 (Java Bison Interface): Say the interface is experimental.
2830 * src/getargs.c (usage): Mention -L and --language.
2831
2832 * NEWS (2.3a+): Say the push parsing interface is experimental.
2833 * doc/bison.texinfo (Push Decl): Likewise.
2834 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2835 (Push Parser Function): Likewise.
2836 (Pull Parser Function): Likewise.
2837 (Parser Create Function): Likewise.
2838 (Parser Delete Function): Likewise.
2839 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2840 yypull_parse, and yypush_parse entries.
2841
2842 * NEWS (2.3a+): Mention XML support, and say the schema is
2843 experimental.
2844 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2845 * src/getargs.c (usage): Say the XML schema is experimental.
2846
2847 * NEWS (2.3a+): Say option instead of flag.
2848
2849 2008-02-21 Wojciech Polak <polak@gnu.org>
2850
2851 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2852 text.
2853
2854 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
2855
2856 Fix impure push parser compile error reported by Bob Rossi at
2857 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
2858 * data/yacc.c: Clean up whitespace in the output a little.
2859 (yypstate_allocated): Define for impure push parsers regardless of
2860 whether the pull interface is also requested.
2861 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
2862 check impure push parsers without the pull interface.
2863
2864 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
2865 yyerror takes arguments specified by %parse-param while yypstate_new
2866 does not.
2867 * doc/bison.texinfo (Parser Create Function): Document that
2868 yypstate_new returns 0 for multiple impure parser instances.
2869 * tests/push.at (Push Parsing: Multiple impure instances): Update
2870 expected stderr output.
2871
2872 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2873
2874 * runtime-po/POTFILES.in (push.c): Remove.
2875
2876 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2877
2878 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
2879 * data/push.c: Rename to...
2880 * data/yacc.c: ... this, overwriting it.
2881 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
2882 `%push-pull-parser' -> `%define api.push_pull "both"'.
2883 Remove old yacc.c tests, and update push.c tests to yacc.c.
2884
2885 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2886
2887 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
2888 `"%code top" blocks' instead of `%code "top" blocks'.
2889 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
2890 Clean up whitespace in the output a little.
2891
2892 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2893
2894 Fix documentation problems reported by Tim Josling at
2895 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
2896 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
2897 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
2898 integers. Explain the effect of literal string aliases on error
2899 messages. Copy token 0 documentation from the C++ skeleton
2900 documentation.
2901
2902 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2903
2904 Accept a token number in a %left, %right, or %nonassoc for POSIX
2905 conformance. Reported by Tim Josling at
2906 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
2907 * NEWS (2.3a+): Mention.
2908 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
2909 and code numbers are treated by precedence declarations.
2910 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
2911 of symbols.1.
2912 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
2913 of symbol.
2914 (symbol.prec): New, just like symbol but allows INT.
2915 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
2916 longer holds.
2917 * tests/regression.at (Token number in precedence declaration): New
2918 test case.
2919
2920 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2921
2922 DJGPP specific issues.
2923 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
2924 be changed. Copyright timestamp adjusted.
2925 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
2926 be changed. Copyright timestamp adjusted.
2927 * djgpp/config.site: Copyright timestamp adjusted.
2928 * djgpp/config_h.sed: Copyright timestamp adjusted.
2929 * djgpp/djunpack.bat: Copyright timestamp adjusted.
2930 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
2931 filename translation list.
2932 * djgpp/subpipe.c (init_subpipe): Check the environment variables
2933 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
2934 files shall be created. Before trying to use the temp dir where the
2935 environment variable points to check that the dir really exists. If
2936 not default to the cwd as temp dir. Copyright timestamp adjusted.
2937 * djgpp/subpipe.h: Copyright timestamp adjusted.
2938 * djgpp/testsuite.sed: Copyright timestamp adjusted.
2939
2940 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
2941
2942 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
2943
2944 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
2945
2946 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
2947 Problem reported by Claudio Saavedra in
2948 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
2949
2950 2008-01-05 Wojciech Polak <polak@gnu.org>
2951
2952 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
2953 document's title with the input grammar file name.
2954
2955 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
2956
2957 Automate regression testing of the XML/XSLT implementation. Discussed
2958 starting at
2959 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
2960 * configure.ac (XSLTPROC): New substitution.
2961 * Makefile.am (maintainer-xml-check): New phony target invoking...
2962 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
2963 invoking make maintainer-check with BISON_TEST_XML=1.
2964 * tests/atlocal.in (XSLTPROC): New.
2965 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
2966 not to report reachable memory when Bison is expected to have a
2967 non-zero exit status and (2) to compare XML/XSLT output with --graph
2968 and --report=all output for every working grammar when
2969 BISON_TEST_XML=1.
2970 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
2971 (AT_BISON_CHECK_XML): New.
2972 (AT_QUELL_VALGRIND): New.
2973 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
2974 (AT_CHECK): ... don't redefine this since this was the old way to
2975 quell Valgrind.
2976 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
2977 AT_BISON_CHECK invocations.
2978 * tests/c++.at: Likewise.
2979 * tests/calc.at: Likewise.
2980 * tests/conflicts.at: Likewise.
2981 * tests/cxx-type.at: Likewise.
2982 * tests/existing.at: Likewise.
2983 * tests/glr-regression.at: Likewise.
2984 * tests/headers.at: Likewise.
2985 * tests/input.at: Likewise.
2986 * tests/java.at: Likewise.
2987 * tests/output.at: Likewise.
2988 * tests/push.at: Likewise.
2989 * tests/reduce.at: Likewise.
2990 * tests/regression.at: Likewise.
2991 * tests/sets.at: Likewise.
2992 * tests/skeletons.at: Likewise.
2993 * tests/synclines.at: Likewise.
2994 * tests/torture.at: Likewise.
2995 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
2996 tends to hang xsltproc.
2997 (Big horizontal): Likewise.
2998
2999 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3000
3001 In XML output, remove redundant class attribute on symbol element.
3002 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3003 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3004 look up a symbol to determine whether it's a nonterminal or terminal.
3005 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3006 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3007
3008 Add prec/assoc information to XML output.
3009 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3010 %prec, add a percent_prec attribute.
3011 * src/print-xml.c (print_grammar): For each terminal that has a
3012 precedence or associativity, add a prec or assoc attribute.
3013 (xml_indent): New.
3014 (xml_puts): Use xml_indent.
3015 (xml_printf): Use xml_indent.
3016 * src/print-xml.h (xml_indent): Prototype.
3017
3018 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3019 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3020
3021 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3022
3023 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3024 (bison:ruleByNumber): ... this for clarity.
3025 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3026 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3027 (xsl:template match="reduction"): Update.
3028 (xsl:template match="item"): Update.
3029 (xsl:template match="reduction"): Update.
3030
3031 In the XML output, don't print the list of rules where symbols appear.
3032 Compute it in XSLT instead. Discussed at
3033 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3034 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3035 (bison:ruleByRhs): New.
3036 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3037 bison:ruleByRhs.
3038 (xsl:template match="terminal/rule"): Remove.
3039 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3040 bison:ruleByRhs.
3041 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3042 Remove.
3043 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3044 bison:ruleByRhs and mode="number-link" for rule template.
3045 (xsl:template match="terminal/rule"): Remove.
3046 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3047 bison:ruleByRhs and mode="number-link" for rule template.
3048 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3049 Rewrite as...
3050 (xsl:template match="rule" mode="number-link"): ... this.
3051 * src/print-xml.c (print_grammar): Don't print the list of rules.
3052
3053 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3054
3055 Don't let --report affect XML output; always print all information.
3056 Discussed at
3057 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3058 * src/conflicts.c (log_resolution): Implement.
3059 * src/print-xml.c (print_core): Implement.
3060 (print_state): Implement.
3061 (print_xml): Implement.
3062
3063 * NEWS (2.3a+): Fix quotes.
3064 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3065 don't let %verbose clear the list specified by --report.
3066
3067 2007-11-26 Akim Demaille <akim@epita.fr>
3068
3069 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3070
3071 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3072
3073 In the XML output, list useless and unused symbols and rules with the
3074 useful ones and add a "usefulness" attribute. Discussed starting at
3075 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3076 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3077 (grammar_rules_print_xml): Print all rules instead of just those
3078 useful in the grammar, and add a "usefulness" attribute.
3079 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3080 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3081 (print_grammar): Print all nonterminals instead of just useful ones,
3082 and add a "usefulness" attribute to nonterminals and terminals.
3083 (print_xml): Don't print a separate "reductions" or
3084 "rules-useless-in-parser" element.
3085 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3086 (reduce_xml): Remove.
3087 (reduce_token_unused_in_grammar): New.
3088 (reduce_nonterminal_useless_in_grammar): New.
3089 * src/reduce.h (reduce_xml): Remove prototype.
3090 (reduce_token_unused_in_grammar): Add prototype.
3091 (reduce_nonterminal_useless_in_grammar): Add prototype.
3092 * data/xslt/xml2text.xsl: Update for XML changes.
3093 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3094 * tests/reduce.at (Useless Terminals): Update output.
3095 (Useless Rules): Update output.
3096 (Reduced Automaton): Update output.
3097
3098 Say "Terminals unused in grammar" instead of "Unused terminals".
3099 * NEWS (2.3a+): Update.
3100 * doc/bison.texinfo (Understanding): Update example output.
3101 * src/reduce.c (reduce_output): Implement.
3102 * data/xslt/xml2text.xsl: Implement.
3103 * data/xslt/xml2xhtml.xsl: Implement.
3104
3105 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3106
3107 Accept --report-file=FILE to override the default `.output' filename.
3108 * NEWS (2.3a+): Mention.
3109 * doc/bison.texinfo (Bison Options): Add an entry.
3110 * src/files.c (compute_output_file_names): Don't override
3111 spec_verbose_file if already set.
3112 * src/getargs.c (usage): Document --report-file.
3113 (REPORT_FILE_OPTION): New anonymous enum member.
3114 (long_options): Add entry for it.
3115 (getargs): Add case for it setting spec_verbose_file.
3116
3117 * build-aux/cross-options.pl: Don't record a short option just because
3118 there's an arg.
3119 * doc/.cvsignore: Add yacc.1.
3120
3121 2007-11-14 Akim Demaille <akim@epita.fr>
3122
3123 * doc/yacc.1.in: New.
3124 * configure.ac, doc/Makefile.am: Adjust.
3125 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3126 config.h symbol.
3127 Use AC_SUBST for assignments too.
3128 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3129
3130 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3131
3132 * src/gram.c: Remove comments that duplicate comments in gram.h.
3133
3134 When reporting useless rules and nonterminals, say "useless in grammar"
3135 instead of "useless", and say "useless in parser" instead of "never
3136 reduced". Discussed starting at
3137 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3138 * NEWS (2.3a+): Mention this change.
3139 * data/xslt/xml2text.xsl: Update output text and expected input XML
3140 element names to match changes below.
3141 * data/xslt/xml2xhtml.xsl: Likewise.
3142 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3143 Contents: "Rules useless in parser due to conflicts".
3144 * doc/bison.texinfo (Decl Summary): Reword a little.
3145 (Understanding): Update example output for changes below.
3146 * src/gram.c: (rule_useful_p): Rename to...
3147 (rule_useful_in_grammar_p): ... this.
3148 (rule_useless_p): Rename to...
3149 (rule_useless_in_grammar_p): ... this.
3150 (rule_never_reduced_p): Rename to...
3151 (rule_useless_in_parser_p): ... this.
3152 (grammar_rules_print): Update for renames.
3153 (grammar_rules_print_xml): Update for renames.
3154 (grammar_rules_never_reduced_report): Rename to...
3155 (grammar_rules_useless_report): ... this since it is used for either
3156 kind of useless rule.
3157 * src/gram.h: Reword comments and update function names in prototypes.
3158 * src/main.c (main): Say "rule useless in parser due to conflicts".
3159 * src/print-xml.c (print_rules_never_reduced): Rename to...
3160 (print_rules_useless_in_parser): ... this, and rename output XML
3161 element "rules-never-reduced" to "rules-useless-in-parser".
3162 (print_xml): Update for rename.
3163 * src/print.c (print_results): Say "Rules useless in parser due to
3164 conflicts".
3165 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3166 (nonterminals_reduce): Say "nonterminal useless in grammar".
3167 (reduce_output): Say "Nonterminals useless in grammar".
3168 Say "Rules useless in grammar".
3169 (reduce_xml): Rename output XML element "useless" to
3170 "useless-in-grammar".
3171 (reduce_print): Don't report the count of grammatically useless rules
3172 as "rules never reduced" just because %yacc is specified.
3173 In the correct report of this count, say nonterminal(s) and rule(s)
3174 "useless in grammar".
3175 * tests/conflicts.at (S/R in initial): Update expected output.
3176 (Defaulted Conflicted Reduction): Likewise.
3177 (Unreachable States After Conflict Resolution): Likewise.
3178 * tests/existing.at (GNU pic Grammar): Likewise.
3179 * tests/reduce.at (Useless Nonterminals): Likewise.
3180 (Useless Rules): Likewise.
3181 (Reduced Automaton): Likewise.
3182 (Underivable Rules): Likewise.
3183 (Empty Language): Likewise.
3184
3185 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3186
3187 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3188 here document and before the EOF so that BSD's implementation of Bourne
3189 shell doesn't parse the delimiter as part of the here document.
3190 * doc/.cvsignore: Add cross-options.texi.
3191 * src/getargs.c (usage): Add a blank line after the warning categories.
3192
3193 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
3194
3195 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3196
3197 2007-11-05 Akim Demaille <akim@epita.fr>
3198
3199 Remove Id: from bison.1.
3200 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3201 (perl -0777 -pi -e 's/\.PP\nId): New.
3202 (.x.1): Use it to ignore the version control revision.
3203
3204 2007-11-05 Akim Demaille <demaille@gostai.com>
3205
3206 * build-aux/Makefile.am: Ship cross-options.pl.
3207 * doc/Makefile.am: Always refer to cross-options.texi with
3208 $(srcdir).
3209 (MAINTAINERCLEANFILES): Add it.
3210
3211 2007-11-04 Akim Demaille <demaille@gostai.com>
3212
3213 Generate the long/short option cross-table.
3214 * build-aux/cross-options.pl: New.
3215 * doc/Makefile.am (cross-options.texi): New.
3216 * doc/bison.texinfo: Use it.
3217
3218 2007-11-04 Akim Demaille <demaille@gostai.com>
3219
3220 Generate bison.1 using help2man.
3221 * doc/common.x, doc/bison.x: New.
3222 * doc/Makefile.am (bison.1, .x.1): New.
3223 The code is taken from autoconf-2.61/man/Makefile.am.
3224 * configure.ac: Look for help2man.
3225
3226 2007-11-04 Akim Demaille <demaille@gostai.com>
3227
3228 Complete --help.
3229 * src/getargs.c (usage): Document -W, make it clear that -d,
3230 -g and -x have optional arguments.
3231
3232 2007-11-04 Akim Demaille <demaille@gostai.com>
3233
3234 Find sha1sum when named gsha1sum.
3235 * bootstrap (find_tool): New.
3236 ($SHA1SUM): New.
3237
3238 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3239
3240 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3241 at
3242 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3243 * NEWS (2.3a+): Mention.
3244 * data/bison.m4 (b4_pure_if): Don't define it here.
3245 * data/c.m4 (b4_identification): Depend on individual skeletons to
3246 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3247 values of the %define variables api.pure or api.push_pull. Define
3248 YYPURE, YYPUSH, and YYPULL accordingly.
3249 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3250 glr.cc has already defined b4_pure_flag.
3251 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3252 Remove YYPUSH and YYPULL since they're back in b4_identification again.
3253 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
3254 * doc/bison.texinfo (Pure Decl): Update.
3255 (Push Decl): Update.
3256 (Decl Summary): Add api.pure to %define entry.
3257 In %pure-parser entry, say it's deprecated and reference %define.
3258 (Pure Calling): Update.
3259 (Error Reporting): Update.
3260 (C++ Scanner Interface): Update.
3261 (How Can I Reset the Parser): Update.
3262 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3263 reference %define.
3264 * src/getargs.c (pure_parser): Remove global variable.
3265 * src/getargs.h (pure_parser): Remove extern.
3266 * src/output.c (prepare): Don't define pure_flag muscle.
3267 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3268 wrapper around `%define api.pure'.
3269 * tests/calc.at (Simple LALR Calculator): Update.
3270 (Simple GLR Calculator): Update.
3271 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3272 Update.
3273 (GLR: Resolve ambiguity, pure, locations): Update.
3274 (GLR: Merge conflicting parses, pure, no locations): Update.
3275 (GLR: Merge conflicting parses, pure, locations): Update.
3276 * tests/glr-regression.at (Uninitialized location when reporting
3277 ambiguity): Update
3278 * tests/input.at (Unused %define api.pure): New test case.
3279 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3280 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3281 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3282
3283 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3284
3285 %define push_pull -> %define api.push_pull. Discussed starting at
3286 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3287 * data/push.c: Expect the new name.
3288 * data/yacc.c: Likewise.
3289 * doc/bison.texinfo (Push Decl): Update.
3290 (Decl Summary): Update %define entry.
3291 (Push Parser Function): Update.
3292 (Pull Parser Function): Update.
3293 (Parser Create Function): Update.
3294 (Parser Delete Function): Update.
3295 * tests/calc.at (Simple LALR Calculator): Update.
3296 * tests/input.at (%define enum variables): Update.
3297 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3298 (Push Parsing: Multiple impure instances): Update.
3299 (Push Parsing: Unsupported Skeletons): Update.
3300 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3301 (Exploding the Stack Size with Malloc): Update.
3302
3303 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3304 other entries some.
3305
3306 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3307
3308 For the XML output's terminal element, rename @number to @token-number,
3309 and add @symbol-number. In the nonterminal element, rename @number to
3310 @symbol-number. Discussed starting at
3311 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3312 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3313 renames.
3314 (xsl:template match="nonterminal"): Likewise.
3315 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3316 (xsl:template match="nonterminal"): Likewise.
3317 * src/print-xml.c (print_grammar): Implement.
3318
3319 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3320
3321 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3322 2007-10-11 change, the child elements here are items not rules.
3323 (xsl:template match="item"): New.
3324 (xsl:template match="rule"): Update for new reduced itemset.
3325 (xsl:template match="point"): Remove.
3326 (xsl:template match="empty"): For consistency with --graph, don't
3327 output "/* empty */".
3328 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3329 line-wrap, don't pass a negative value as first-line-length since this
3330 won't work with the following changes.
3331 (xsl:template name="line-wrap"): Simplify slightly.
3332 (xsl:template name="ws-search"): Eliminate recursion.
3333 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3334 set next to an item whose dot is not at the end of the RHS even if it
3335 happens to be associated with the same rule.
3336
3337 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3338
3339 Add %define lr.keep_unreachable_states.
3340 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3341 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3342 * src/main.c (main): Implement it.
3343 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3344 Extend to test it, and fix a typo.
3345
3346 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3347
3348 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
3349 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3350 the example .output text.
3351 * tests/regression.at (Extra lookahead sets in report): Improve wording
3352 of comments.
3353
3354 2007-10-17 Wojciech Polak <polak@gnu.org>
3355
3356 * src/print-xml.c (print_grammar): Renamed
3357 <terminal> and <nonterminal> attributes:
3358 "type" to "number" and "symbol" to "name".
3359 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3360 Use new attribute names.
3361 (xsl:template match="nonterminal"): Likewise.
3362 * data/xslt/xml2xhtml.xsl: Likewise.
3363
3364 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3365
3366 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3367 (Option Cross Key): Likewise.
3368
3369 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3370 next to an item whose dot is not at the end of the RHS even if it
3371 happens to be associated with the same rule.
3372 * src/print.c (print_core): Likewise.
3373 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3374 (Resolved SR Conflicts): Update output.
3375 * tests/regression.at (Extra lookahead sets in report): New test case.
3376
3377 2007-10-11 Wojciech Polak <polak@gnu.org>
3378
3379 * src/print-xml.c (print_core): Remove item set
3380 redundancy.
3381 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3382 Improve processing time. Suggested by Joel E. Denny.
3383 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3384 Write xsl:param "required" attribute as comment.
3385 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3386 (xsl:template match="rule"): Support new reduced itemset.
3387 (xsl:template match="point"): Remove.
3388 * data/xslt/xml2xhtml.xsl: Likewise.
3389
3390 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3391
3392 * src/getargs.c (version): Update copyright year.
3393
3394 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3395
3396 Make xml2dot.xsl and --graph produce the same output.
3397 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
3398 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3399 escaped later.
3400 (xsl:template name="output-node"): Use the new escape template instead
3401 of the string-replace template directly.
3402 (xsl:template name="output-edge"): Likewise.
3403 (xsl:template name="escape"): New, escapes backslashes and newlines in
3404 addition to quotation marks.
3405 * src/graphviz.c (start_graph, output_node, output_edge): Add
3406 whitespace to output for legibility.
3407
3408 Make xml2text.xsl and --report produce the same output, and remove the
3409 XML "conflicts" element since a conflict summary is easily extracted
3410 from the automaton.
3411 * data/xslt/bison.xsl: New.
3412 (xsl:template match="state" mode="bison:count-conflicts): New.
3413 * data/xslt/xml2text.xsl: Import bison.xsl.
3414 (xsl:template match="bison-xml-report"): Instead of styling the
3415 "conflicts" element, style the "automaton" element with mode
3416 "conflicts". Unlike the former, the latter lists S/R and R/R
3417 conflicts for a state on the same line.
3418 (xsl:template match="conflicts"): Remove.
3419 (xsl:template match="conflict"): Remove.
3420 (xsl:template match="terminal"): Line-wrap the list of rules in which
3421 the terminal is used.
3422 (xsl:template match="nonterminal"): Likewise for nonterminals.
3423 (xsl:template match="automaton" mode="conflicts"): New.
3424 (xsl:template match="state" mode="conflicts"): New.
3425 (xsl:template name="line-wrap"): New.
3426 (xsl:template name="ws-search"): New.
3427 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3428 (xsl:template match="bison-xml-report"): Instead of styling the
3429 "conflicts" element, style the "automaton" element with mode
3430 "conflicts."
3431 (xsl:template match="conflicts"): Remove.
3432 (xsl:template match="conflict"): Remove.
3433 (xsl:template match="automaton" mode="conflicts"): New.
3434 (xsl:template match="state" mode="conflicts): New.
3435 * src/conflicts.c (conflicts_output_xml): Remove.
3436 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3437 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3438 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3439 the corresponding XSLT is easier. Also, never wrap between a word and
3440 the comma that follows it.
3441
3442 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3443
3444 Improve C++ namespace support. Discussed starting at
3445 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3446 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3447 b4_namespace_close): New macros that interpret the %define variable
3448 "namespace" so its value can contain "::" to indicate nested
3449 namespaces.
3450 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3451 the above macros.
3452 * data/lalr1.cc (b4_namespace): Likewise.
3453 * data/location.cc (b4_namespace): Likewise.
3454 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3455 inside a new table in the general %define entry. Document `%define
3456 namespace' there as well. Point the %name-prefix entry to it since it
3457 explains it more completely in the case of C++.
3458 (C++ Bison Interface): Mention `%define namespace' instead of
3459 %name-prefix.
3460 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3461 entry suffices.
3462 * tests/c++.at (Relative namespace references): New test case.
3463 (Absolute namespace references): New test case.
3464 (Syntactically invalid namespace references): New test case.
3465 * tests/input.at (C++ namespace reference errors): New test case.
3466
3467 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3468
3469 Add syncline support and location accessor to internal %define
3470 interfaces.
3471 * data/bison.m4 (b4_percent_define_get_loc): New.
3472 (b4_percent_define_get_syncline): New.
3473 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3474 (b4_percent_define_default): Record defining location as line 1 rather
3475 than 0 for the sake of synchronizing #line's, and define
3476 b4_percent_define_syncline(VARIABLE).
3477 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3478 * src/muscle_tab.c (muscle_syncline_grow): New.
3479 (muscle_code_grow): Use muscle_syncline_grow.
3480 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3481 define b4_percent_define_syncline(VARIABLE).
3482 (muscle_percent_define_get_loc): New.
3483 (muscle_percent_define_get_syncline): New.
3484 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3485 remove some unused variables.
3486 (muscle_percent_define_default): Record defining location as line 1
3487 rather than 0 for the sake of synchronizing #line's, and define
3488 b4_percent_define_syncline(VARIABLE).
3489 (muscle_percent_define_check_values): Use
3490 muscle_percent_define_get_loc.
3491 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3492 (muscle_percent_define_get_syncline): Prototype.
3493 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3494 defaults): Update output for location change.
3495 (Complaining during macro argument expansion): Extend to test
3496 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3497
3498 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3499
3500 Fix some error-reporting macro bugs.
3501 * data/bison.m4 (b4_cat): New.
3502 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3503 to stdout so they don't become arguments to other macros. Update
3504 comments and add examples.
3505 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3506 add examples.
3507 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3508 after printing the error directive so that M4 doesn't report subsequent
3509 problems that are induced by this problem.
3510 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3511 instead of just in them. Recognize @\n in both places. Both expand to
3512 the empty string. Needed by b4_cat.
3513 * tests/skeletons.at (Complaining during macro argument expansion):
3514 New test case.
3515 (Fatal errors make M4 exit immediately): New test case.
3516
3517 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3518
3519 Implement --print-datadir.
3520 * src/getargs.c (usage): Mention.
3521 (PRINT_DATADIR_OPTION): New anonymous enum member.
3522 (long_options): Add entry for it.
3523 (getargs): Add case for it calling compute_pkgdatadir.
3524 * src/output.c (output_skeleton): Encapsulate data directory
3525 computation from here...
3526 (prepare): ... and from here...
3527 (compute_pkgdatadir): ... into this new function.
3528 * src/output.h (compute_pkgdatadir): Prototype.
3529
3530 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3531
3532 * src/print-xml.c (escape_bufs): New static global variable
3533 replacing...
3534 (xml_escape_n): ... the static local variable buf here.
3535 (print_xml): Free memory for escape_bufs.
3536 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3537
3538 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3539
3540 Replace `%push-parser' and `%push-pull-parser' with
3541 `%define push_pull "push"' and `%define push_pull "both"'.
3542 `%define push_pull "pull"' is the default.
3543 * doc/bison.texinfo (Push Decl, Push Parser Function,
3544 Pull Parser Function, Parser Create Function, Parser Delete Function):
3545 Update declarations.
3546 (Decl Summary, Table of Symbols): Replace %push-parser and
3547 %push-pull-parser entries with a %define push_pull entry.
3548 * data/bison.m4 (b4_percent_define_check_values): New macro.
3549 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3550 definitions...
3551 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3552 definitions...
3553 * data/push.c: ... to here and compute them from the value of the
3554 %define variable push_pull.
3555 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3556 parsing requests here...
3557 * data/yacc.c: ... hack this to switch to push.c any time
3558 b4_use_push_pull_flag or the %define variable push_pull is set. This
3559 will go away when we mv push.c yacc.c.
3560 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3561 push parsing is not supported since unused %define variables are
3562 reported anyway.
3563 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3564 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3565 comments for consistency with b4_percent_define_check_values.
3566 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3567 muscles.
3568 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3569 Remove.
3570 (prologue_declaration): Remove %push-parser and %push-pull-parser
3571 rules.
3572 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3573 * tests/calc.at: Update declarations.
3574 * tests/input.at (%define enum variables): New test case.
3575 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3576 declaration.
3577 (Push Parsing: Multiple impure instances): Update declaration.
3578 (Push Parsing: Unsupported Skeletons): New test case.
3579 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3580 declaration.
3581 (Exploding the Stack Size with Malloc): Update declaration.
3582
3583 2007-09-24 Wojciech Polak <polak@gnu.org>
3584
3585 Add XSLT transformations.
3586
3587 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3588 * data/xslt/xml2text.xsl: Transform XML into plain text.
3589 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3590 * data/Makefile.am (xsltdir): New variable.
3591 (dist_xslt_DATA): Add xslt/*.xsl files.
3592
3593 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3594
3595 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3596 Problem reported by Wojciech Polak.
3597 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3598 (xml_printf): Undo change I made on 21 September; that is,
3599 indent 2 spaces, not 1.
3600
3601 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3602
3603 Pacify ./configure --enable-gcc-warnings.
3604 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3605 `char const *' instead of `char *'.
3606 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3607 local variable `sep'.
3608
3609 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3610
3611 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3612 elsewhere.
3613 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3614 (xml_printf): Indent just 1 space for level.
3615 (e_char, xlate_char): Remove.
3616 (xml_escape_string): Rewrite to avoid undefined behavior (used
3617 storage that was freed from the stack).
3618 (xml_escape_n): Don't bother checking for subscript error.
3619
3620 2007-09-21 Wojciech Polak <polak@gnu.org>
3621
3622 Add Bison XML Automaton Report.
3623
3624 Add support for an -x option to generate an XML report.
3625 It is not documented yet.
3626 * src/print-xml.c: New file.
3627 * src/print-xml.h: Likewise.
3628 * lib/timevar.def (TV_XML): New var.
3629 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3630 * src/conflicts.c: Include print-xml.h.
3631 (solved_conflicts_xml_obstack): New var.
3632 (log_resolution, conflicts_solve, conflicts_free):
3633 Add support for XML report.
3634 (conflicts_output_val): New function.
3635 * src/conflicts.h (conflicts_output_val): New decl.
3636 * src/files.c (spec_xml_file): New var.
3637 (compute_output_file_names, output_file_names_free): Add XML support.
3638 * src/files.h (spec_xml_file): New decl.
3639 * src/getargs.c (xml_flag): New var.
3640 (usage, short_options, long_options, getargs): Add XML support.
3641 * src/getargs.h (xml_flag): New decl.
3642 * src/gram.c: Include print-xml.h.
3643 (rule_lhs_print_xml, rule_rhs_print_xml):
3644 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3645 New functions.
3646 * src/gram.h: Declare external ones.
3647 * src/main.c: Include print-xml.h.
3648 (main): Add XML support.
3649 * src/reduce.c: Include print-xml.h.
3650 (reduce_xml): New function.
3651 * src/reduce.h: Declare it.
3652 * src/state.c: Include print-xml.h.
3653 (state_new): Add XML support.
3654 (state_rule_lookahead_tokens_print_xml): New function.
3655 * src/state.h: Declare it.
3656 (struct state): New member solved_conflicts_xml.
3657 * src/symtab.c (symbol_class_get_string): New function.
3658 * src/symtab.h: Declare it.
3659
3660 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3661
3662 * GNUmakefile: Switch to coreutils's version.
3663 * bootstrap: Likewise.
3664 * Makefile.cfg: Adjust to new GNUmakefile.
3665 * README-hacking: Likewise.
3666
3667 Import from gnulib:
3668
3669 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3670 Bruno Haible <bruno@clisp.org>
3671
3672 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3673 and is a script that invokes bison. Tighten the code. Add comments.
3674
3675 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3676
3677 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3678 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3679 * doc/bison.texinfo (Decl Summary): Fix.
3680 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3681 * tests/input.at (Boolean %define variables): Update output.
3682 * tests/skeletons.at (%define boolean variables: invalid skeleton
3683 defaults): Rename to...
3684 (%define Boolean variables: invalid skeleton defaults): ... this and
3685 update output.
3686
3687 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3688
3689 In impure push mode, don't allow more than one yypstate to be allocated
3690 since multiple impure parsers would corrupt yynerrs.
3691 * data/push.c (yypstate_allocated): New static global variable
3692 initialized to 0.
3693 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3694 exhaustion if yypstate_allocated is 1, but still return 2.
3695 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3696 already 1. Otherwise, set it to 1.
3697 (yypstate_delete): Set it to 0.
3698 * tests/push.at (Push Parsing: Multiple impure instances): New test
3699 case.
3700
3701 2007-08-17 Bob Rossi <bob@brasko.net>
3702
3703 * doc/bison.texinfo (Push Decl): Document the push parser.
3704 (Table of Symbols): Ditto.
3705 (Pure Decl): Ditto.
3706 (Decl Summary): Ditto.
3707 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3708 Parser Create Function, Parser Delete Function):
3709 Add new push parser symbols.
3710 (Table of Symbols): Document push-parser, push-pull-parser,
3711 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3712
3713 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3714
3715 Update to GPLv3.
3716 * doc/gpl-3.0.texi: New file.
3717 * doc/gpl.texi: Remove.
3718 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3719 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3720 * README-hacking, TODO, bootstrap, bootstrap.conf:
3721 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3722 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3723 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3724 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3725 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3726 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3727 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3728 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3729 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3730 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3731 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3732 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3733 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3734 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3735 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3736 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3737 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3738 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3739 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3740 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3741 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3742 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3743 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3744 * src/complain.c, src/complain.h, src/conflicts.c:
3745 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3746 * src/files.h, src/flex-scanner.h, src/getargs.c:
3747 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3748 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3749 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3750 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3751 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3752 * src/print.c, src/print.h, src/print_graph.c:
3753 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3754 * src/reduce.h, src/relation.c, src/relation.h:
3755 * src/revision.h, src/scan-code.h, src/scan-code.l:
3756 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3757 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3758 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3759 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3760 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3761 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3762 * tests/existing.at, tests/glr-regression.at:
3763 * tests/headers.at, tests/input.at, tests/java.at:
3764 * tests/local.at, tests/output.at, tests/push.at:
3765 * tests/reduce.at, tests/regression.at, tests/sets.at:
3766 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3767 * tests/torture.at:
3768 Update to GPLv3.
3769
3770 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3771
3772 Get rid of broken %no-parser, -n, and --no-parser implementation and
3773 documentation.
3774 * TODO: Don't mention them.
3775 * doc/bison.1: Likewise.
3776 * doc/bison.texinfo (Decl Summary): Likewise.
3777 (Bison Options): Likewise.
3778 (Option Cross Key): Likewise.
3779 * src/getargs.c (no_parser_flag): Remove global variable.
3780 (usage): Don't print description of -n and --no-parser.
3781 (long_options): Remove --no-parser entry here.
3782 (getargs): Remove -n case in the switch here.
3783 * src/getargs.h (no_parser_flag): Remove extern.
3784 * tests/regression.at (Web2c Actions): Remove comment that mentions
3785 --no-parser.
3786
3787 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3788
3789 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3790 name user variables starting with `yy'. Just pass NULL instead of a
3791 dummy local &yylval to yypush_parse.
3792 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3793 starting with `yy'.
3794
3795 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3796
3797 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3798 true since it's then always used regardless of whether yyoverflow is
3799 defined. Reported by Christian Burger at
3800 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3801 * THANKS: Add Christian Burger.
3802
3803 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3804 node names: say "Decl Summary" not "Bison Declaration Summary".
3805
3806 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3807
3808 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3809 determine whether this function has already complained about an invalid
3810 value for a %define boolean variable, don't check whether Bison has
3811 ever examined the value. As written, the check was a tautology.
3812 Instead, record and check for this complaint using a separate muscle.
3813
3814 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3815
3816 Fix push parsing memory leak reported by Brandon Lucia at
3817 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3818 * THANKS: Add Brandon Lucia.
3819 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3820 but the parse never completed and thus freed it.
3821 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3822 * tests/testsuite.at: Include push.at.
3823 * test/push.at: New.
3824 (Push Parsing: Memory Leak for Early Deletion): New test case.
3825
3826 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3827
3828 Improve handling of multiple S/R conflicts in the same state and of S/R
3829 conflicts involving multiple reductions.
3830 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3831 set for a state here or Bison will abort if it is reassigned on a
3832 later conflicted reduction in the same state.
3833 Similarly, don't finalize and assign the solved conflicts report here
3834 or it will be lost if it is reassigned on a later conflicted reduction
3835 in the same state.
3836 (set_conflicts): Instead, assign them both here after all S/R conflicts
3837 in the state have been fully examined.
3838 * src/print.c (shift_set): Rename to...
3839 (no_reduce_set): ... this.
3840 (print_reductions): Update for rename, and add %nonassoc error action
3841 tokens to no_reduce_set so that, when printing the first remaining
3842 reduction on an error action token, the reduction is enclosed in
3843 brackets.
3844 (print_results): Update for rename.
3845 * tests/conflicts.at (Solved conflicts report for multiple reductions
3846 in a state): New test case.
3847 (%nonassoc error actions for multiple reductions in a state): New test
3848 case.
3849
3850 * src/main.c (main): Don't depend on C99 features.
3851
3852 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3853
3854 * build-aux/.cvsignore: Add compile.
3855 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
3856 uniwidth.
3857
3858 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
3859
3860 * bootstrap (slurp): Create target directories that don't exist.
3861 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
3862
3863 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3864
3865 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
3866 than item number.
3867 * closure.c (closure): Likewise.
3868 * state.h (reductions): Comment sorting of rules.
3869 (state): Comment sorting of items.
3870
3871 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
3872
3873 Fix C++ test cases after recent Gnulib changes. Discussed starting at
3874 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
3875 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
3876 definition in order to avoid Gnulib headers since we don't use config.h
3877 here.
3878 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
3879 rather than AT_DATA so that config.h is included.
3880
3881 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
3882
3883 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
3884 instead of fprintf. Guard these functions with #if YYDEBUG instead of
3885 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
3886 and so that YYFPRINTF is guaranteed to be defined here.
3887
3888 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3889
3890 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
3891 with...
3892 (muscle_percent_define_check_values): ... this more helpful function.
3893 Again, it's not used yet, but it will be.
3894 * src/muscle_tab.h: Likewise.
3895
3896 Improve some comments in parser table construction.
3897 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
3898 (generate_states): Don't mention ruleset, which is internal to closure.
3899 * src/closure.c (closure): Explain sorting of core and itemset, which
3900 is required for this function to behave correctly.
3901 * src/closure.h (closure): Mention sorting.
3902
3903 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
3904
3905 * src/lalr.c (state_lookahead_tokens_count): For code readability,
3906 move the check for disabled transitions to an aver since conflict
3907 resolution hasn't happened yet.
3908
3909 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
3910 labels a state as inconsistent just because it has error transitions.
3911 The original form of this check appeared in revision 1.1 of lalr.c,
3912 which was committed on 1991-12-21. Now (at least), changing the
3913 consistency label on such a state appears to have no useful effect in
3914 any of the places it is examined, which I enumerate below. The key
3915 point to understanding each item in this enumeration is that a state
3916 with an error transition is labelled consistent in the first place only
3917 if it has no rules, so the check cannot matter for states that have
3918 rules. (1) Labelling a state as inconsistent will cause set_conflicts
3919 to try to identify its conflicts, and a state must have *rules* to have
3920 conflicts. (2) Labelling a state as inconsistent will affect how
3921 action_row sets the default *rule* for the state. (3) Labelling a
3922 state as inconsistent will cause build_relations to add lookback edges
3923 to *rules* in that state.
3924 * src/state.h (struct state): Word the comment for member consistent
3925 more carefully.
3926
3927 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3928
3929 Don't depend on C99 features.
3930 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
3931 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
3932 * src/reader.c (check_and_convert_grammar): Fix for-loop.
3933 * src/state.c (state_mark_reachable_states): Fix for-loop.
3934 (state_remove_unreachable_states): Fix for-loop.
3935
3936 Don't widen struct state with member reachable just to temporarily
3937 record reachability. Instead, use a local bitset.
3938 * src/state.h (struct state): Remove member.
3939 * src/state.c (state_new): Don't initialize it.
3940 (state_mark_reachable_states): Rename to...
3941 (state_record_reachable_states): ... this, and use bitset.
3942 (state_remove_unreachable_states): Use bitset.
3943
3944 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
3945
3946 * src/Makefile.am (yacc): Quote target action commands properly so
3947 that the yacc script isn't corrupt. Reported by Hans Aberg at
3948 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
3949
3950 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
3951 the case of pure parsers. Reported by Frans Englich at
3952 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
3953 * THANKS: Add Frans Englich.
3954
3955 * NEWS (2.3a+): In the %code entry, reference section `Bison
3956 Declaration Summary' from the manual now since the %code summary has
3957 moved there.
3958 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
3959 in the rules section must be terminated by semicolons.
3960
3961 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
3962
3963 Extend the front-end API for %define variables to more completely
3964 mirror the back-end. This will be useful in the future.
3965 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
3966 Update comments to mention the new front-end counterparts of these
3967 macros.
3968 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
3969 for muscle_string_decode and muscle_location_decode.
3970 (muscle_string_decode): New static function.
3971 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
3972 (muscle_percent_define_get, muscle_percent_define_ifdef): New
3973 functions.
3974 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
3975 muscle_percent_define_get to mimic the b4_percent_define_flag_if
3976 implementation more closely.
3977 (muscle_percent_define_invalid_value): New function.
3978 * src/muscle_tab.h (muscle_percent_define_get,
3979 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
3980 Prototype.
3981
3982 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3983
3984 * NEWS (2.3a+): Mention yesterday's state-removal change.
3985 (2.3a): Remove the %language entry, which was added after 2.3a.
3986 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
3987 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
3988 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
3989 tests/existing.at: Update copyright date.
3990
3991 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3992
3993 If conflict resolution makes states unreachable, remove those states,
3994 report rules that are then unused, and don't report conflicts in those
3995 states.
3996 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
3997 New global function.
3998 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
3999 function.
4000 * src/main.c (main): After conflict resolution, remove the unreachable
4001 states and update all data structures that reference states by number.
4002 * src/state.c (state_new): Initialize each state's reachable member to
4003 false.
4004 (state_mark_reachable_states): New static function.
4005 (state_remove_unreachable_states): New global function.
4006 * src/state.h (struct state): Add member bool reachable.
4007 (state_remove_unreachable_states): Prototype.
4008 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4009 New test case.
4010 * tests/existing.at (GNU pic Grammar): Update test case output now that
4011 an unused rule is discovered.
4012
4013 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4014
4015 Minor code cleanup in parser table construction.
4016 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4017 (new_itemsets, save_reductions): Update for rename to nitemset.
4018 * src/closure.c (nritemset): Rename to...
4019 (nitemset): ... this since the "r" appears to meaningless and isn't
4020 used in the comments.
4021 (closure): Update for rename.
4022 * src/closure.h (nritemset): Update extern to...
4023 (nitemset): ... this.
4024 * src/lalr.c (LA): Fix a typo in comments.
4025 * src/print.c (print_core): Update for rename to nitemset.
4026 * src/print_graph.c (print_graph): Likewise.
4027 * src/state.h: Fix some typos in header comments.
4028
4029 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4030
4031 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4032 still sticks to ASCII. Sorry!
4033
4034 * README-hacking: New file, taken mostly from coreutils, with changes
4035 for Bison. Contains much of the contents of:
4036 * README-cvs: Remove.
4037 * bootstrap: Sync from gnulib.
4038 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4039 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4040
4041 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4042
4043 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4044 Setzer.
4045 (Java Differences): Fix some typos.
4046 * THANKS: Add Sebastian Setzer.
4047
4048 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4049
4050 * data/java.m4 (b4_single_class_if): Remove.
4051 (b4_abstract_if): Look at "%define abstract".
4052 (b4_lexer_if): New.
4053 (b4_union_name): Rename...
4054 (b4_yystype): ... to this. Map to "%define stype".
4055 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4056 b4_maybe_throws): Fix quoting.
4057 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4058 * data/lalr1.java (Lexer interface): Always define.
4059 (Lexer interface within parser class): Remove.
4060 (YYLexer class): New, used when "%code lexer" is present.
4061 (constructor): When "%code lexer" is used, pass %lex-param
4062 to the lexer constructor.
4063 (yylex, yyparse): Remove %lex-param from method invocations
4064 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4065
4066 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4067 abstract". Rename "%define union_name" to "%define stype".
4068 Rename method names according to previous patch.
4069 (Java Scanner Interface): Describe "%code lexer" instead of
4070 "%pure-parser" and "%define single_class".
4071 (Java Differences): Mention "%code lexer".
4072
4073 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4074 Include scanner here, using macros from tests/local.at.
4075 (AT_DATA_CALC_Y): Remove final argument.
4076 (_AT_CHECK_JAVA_CALC): Likewise.
4077 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4078 of %locations and %error-verbose.
4079 (main): Test with and without %lex-param.
4080 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4081 (AT_BISON_OPTION_POPDEFS): Pop it.
4082
4083 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4084
4085 DJGPP spefic issue. Inhibit the use of disallowed characters for
4086 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4087 and concern testsuite case 46.
4088 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4089 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4090 * djgpp/config.bat: Inhibit the use of disallowed characters.
4091
4092 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4093
4094 Miscellaneous %define and %code cleanup.
4095 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4096 values are interpreted.
4097 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4098 documentation a little more.
4099 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4100 muscle_percent_define_insert, muscle_percent_code_grow): New
4101 functions/macros.
4102 * src/muscle_tab.h (muscle_percent_define_insert,
4103 muscle_percent_code_grow): Prototype.
4104 * src/parse-gram.y (prologue_declaration): Use
4105 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4106 %define and %code directives.
4107
4108 Make it easy to share %define boolean variables between the front-end
4109 and back-end. Though not used yet, this will be useful in the future.
4110 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4111 Bison uses of names rather than just skeleton uses of names.
4112 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4113 b4_percent_define_skeleton_variables(VARIABLE) to
4114 b4_percent_define_bison_variables(VARIABLE).
4115 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4116 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4117 b4_percent_code_bison_qualifiers(QUALIFIER).
4118 (b4_check_user_names_wrap): Update for renames.
4119 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4120 muscle_percent_define_default): New functions mimicking
4121 b4_percent_define_flag_if and b4_percent_define_default.
4122
4123 For %define variables, report locations for invalid values and
4124 redefinitions.
4125 * data/bison.m4 (b4_percent_define_flag_if): Read
4126 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4127 value for VARIABLE.
4128 (b4_percent_define_default): Save a special location in
4129 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4130 must later be reported as invalid.
4131 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4132 functions.
4133 (muscle_percent_define_insert): Record the location of VARIABLE in
4134 muscle percent_define_loc(VARIABLE), and use it to report the previous
4135 location for a redefinition.
4136 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4137 (muscle_percent_define_default): Update like b4_percent_define_default.
4138 (muscle_grow_user_name_list): Rename to...
4139 (muscle_user_name_list_grow): ... this for consistency and use
4140 muscle_location_grow.
4141 * src/muscle_tab.h (muscle_location_grow): Prototype.
4142 * tests/input.at (%define errors): Update expected output.
4143 * tests/skeletons.at (%define boolean variables: invalid skeleton
4144 defaults): New test case.
4145
4146 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4147
4148 * src/print.c (lookahead_set, state_default_rule): Remove.
4149 (print_reductions): Replace state_default_rule invocation with
4150 equivalent use of yydefact, which was computed in token_actions in
4151 tables.c.
4152 (print_results): Don't allocate lookahead_set.
4153
4154 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
4155
4156 * data/lalr1.java: Prefix all private members with yy.
4157
4158 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4159
4160 Use YYFPRINTF instead of fprintf where appropriate. Reported by
4161 Sebastien Fricker at
4162 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
4163 * THANKS: Add Sebastien Fricker.
4164 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4165 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4166 accept a variable number of arguments.
4167
4168 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4169
4170 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4171
4172 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4173
4174 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4175 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4176 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4177
4178 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4179
4180 Undo my 2007-02-07 change, switching back to the c-strcase module
4181 introduced in the 2007-02-03 change. Bruno Haible reported that
4182 the 2007-02-07 change would be dangerous in Turkish if we add a
4183 language whose name contains "i", since "i" is not lowercase "I"
4184 in Turkish.
4185 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4186 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4187 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4188 * m4/.cvsignore: Remove strcase.m4.
4189 * src/getargs.c: Revert 2007-02-07 change, as follows.
4190 Include c-strcase.h.
4191 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4192
4193 2007-02-11 Bruno Haible <bruno@clisp.org>
4194
4195 Enable the Java related testsuite tests when the only Java compiler
4196 found is a gcj < 4.3. Discussed at
4197 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4198 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4199
4200 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4201
4202 * data/Makefile.am: Update copyright date.
4203 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4204 yypstate_new returns NULL.
4205 (yypstate_new): Return NULL if malloc does.
4206 * src/reader.c (packgram): Move translation of rule actions from the
4207 beginning of packgram to...
4208 (check_and_convert_grammar): ... here right before packgram is invoked
4209 so it's easier to write more complete comments, and remove redundant
4210 code.
4211
4212 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4213
4214 As in semantic actions, make @$ in %initial-action, %destructor, and
4215 %printer imply %locations.
4216 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4217 scanning @$.
4218 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4219 (@$ in %initial-action implies %locations,
4220 @$ in %destructor implies %locations,
4221 @$ in %printer implies %locations): ... these new test cases.
4222
4223 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4224
4225 Undo most of the 2007-02-03 change, switching to the strcase module
4226 now that gnulib strcase has been fixed.
4227 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4228 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4229 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4230 * m4/.cvsignore: Add strcase.m4.
4231 * src/getargs.c: Revert 2007-02-03 change, as follows.
4232 Don't include c-strcase.h.
4233 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4234 strcasecmp has "unspecified behavior" outside the POSIX locale,
4235 but it works fine in practice if at least one argument is ASCII,
4236 as is the case in Bison.
4237
4238 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
4239
4240 * tests/java.at: Skip tests if only one of javac/java is present.
4241 Reported by Joel E. Denny.
4242 * tests/atlocal.in: Adjust copyright years.
4243
4244 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
4245
4246 * data/lalr1.java (Stack): Work around old verifiers that disallow
4247 access to the private fields of an inner class, from the outer class.
4248 We can make Stack's fields public because user code doesn't have access
4249 to the instance of Stack used by parse(). Reported by Paul Eggert.
4250
4251 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4252
4253 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4254 the right spot for these files?
4255 * bootstrap.conf (gnulib_modules): Add c-strcase.
4256 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4257 c-strncasecmp.c.
4258 * src/getargs.c: Include c-strcase.h.
4259 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4260 to avoid unspecified behavior.
4261
4262 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4263
4264 * doc/bison.texinfo (Decl Summary): Correct typo.
4265
4266 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
4267
4268 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4269 Complain if the value does not match empty, "true" or "false".
4270 * data/c++.m4: Adjust default definitions of %define variables.
4271 * data/java.m4: Adjust default definitions of %define variables.
4272 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4273 to above behavior.
4274 * tests/input.at (Boolean %define variables): Test new behavior.
4275
4276 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
4277
4278 * NEWS: Mention java.
4279 * TODO: Remove things that are done.
4280 * bootstrap.conf: Add javacomp-script and javaexec-script.
4281 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4282
4283 * data/Makefile.am: Add new files.
4284 * data/java-skel.m4: New.
4285 * data/java.m4: New.
4286 * data/lalr1.java: New.
4287
4288 * doc/bison.texinfo: Put "A Complete C++ Example" under
4289 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4290 under Other Languages.
4291
4292 * src/getargs.c (valid_languages): Add Java.
4293 * src/getargs.h (struct bison_language): Update size of string fields.
4294
4295 * tests/Makefile.am: Add java.at.
4296 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4297 * tests/java.at: New.
4298 * tests/testsuite.at: Include it.
4299
4300 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4301
4302 Clean up.
4303 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4304 at_directive_argv arguments so these no longer have to be global
4305 variables. Also, update the implementation for the following changes.
4306 (fail_for_at_directive_too_many_args,
4307 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4308 (at_directive_name): Remove as at_directive_argv[0] will be used for
4309 this now.
4310 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4311 for the directive name.
4312 (at_directive_argc, at_directive_argv): Make these local within
4313 skel_lex instead of global.
4314 (INITIAL): Update directive start action for above changes.
4315 (SC_AT_DIRECTIVE_ARG): Rename to...
4316 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4317 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4318 (scan_skel): Move yylex_destroy to...
4319 (skel_scanner_free): ... here.
4320 * tests/skeletons.at (installed skeleton file name): Rename to...
4321 (installed skeleton file names): ... this.
4322
4323 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4324
4325 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4326 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4327 Summary" not "Directives".
4328 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4329 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4330 since the former is now the more complete one.
4331 (Prologue Alternatives): Likewise and do the same for %defines.
4332 (Table of Symbols): Add summary of %code, add summary of %define, and
4333 move full %code documentation to...
4334 (Decl Summary): ... here for consistency with other entries in these
4335 sections.
4336 Move %define entry in order to keep this list alphabetized.
4337 Reword %define entry a little to put less emphasis on the skeleton
4338 concept, which most users shouldn't have to think about.
4339
4340 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4341
4342 Adjust to recent gnulib changes.
4343 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4344 Add string.h, string_.h, unistd_.h, wchar_.h.
4345 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4346 * src/system.h: Don't include <stpcpy.h>; this is now done by
4347 <string.h>.
4348
4349 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
4350
4351 Simplify implementation of unqualified %code, implement macros for
4352 uniform treatment of boolean %define flags. Document %define.
4353 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4354 b4_percent_code_ifdef): New.
4355 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4356 * data/c++.m4: Define default value for global_tokens_and_yystype.
4357 * data/glr.cc: Likewise.
4358 * data/location.cc: Use b4_percent_define_flag_if.
4359
4360 * doc/bison.texinfo (Decl Summary): Document %define.
4361
4362 * src/parse-gram.y (Unqualified %code): Change muscle name to
4363 b4_percent_code().
4364 (content.opt): Default to empty.
4365
4366 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4367
4368 Implement support for relative and absolute skeleton file names.
4369 Discussed starting at
4370 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4371 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4372 (Bison Options): Document in --skeleton entry.
4373 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4374 full_skeleton can't necessarily hold all of pkgdatadir.
4375 If the specified skeleton file name contains a `/', don't prepend
4376 pkgdatadir.
4377 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4378 file name contains a `/', prepend the grammar file directory.
4379 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4380 * skeletons.at: New file.
4381 (relative skeleton file names): New test case.
4382 (installed skeleton file names): New test case.
4383 * tests/testsuite.at: Include skeletons.at.
4384
4385 * bootstrap: Update copyright to 2007.
4386
4387 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
4388
4389 * bootstrap: Remove occurrences of .#bootmp from the files.
4390
4391 2007-01-17 Akim Demaille <akim@epita.fr>
4392
4393 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4394 nonterminals.
4395 Use per-type %printer.
4396
4397 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4398
4399 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4400 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4401 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4402 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4403 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4404 tests/glr-regression.at, tests/input.at, tests/local.at,
4405 tests/output.at, tests/torture.at: Update copyright to 2007.
4406
4407 2007-01-16 Akim Demaille <akim@epita.fr>
4408
4409 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4410 error code.
4411 (Calc++ Scanner): Exit with failure if we can't open the input
4412 file.
4413 Accept "-" standing for stdin.
4414 (Calc++ Top Level): Print the result only if the parsing was
4415 successful.
4416
4417 2007-01-16 Akim Demaille <akim@epita.fr>
4418
4419 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4420
4421 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
4422 and Joel E. Denny <jdenny@ces.clemson.edu>
4423
4424 Clean up %define and %code implementation in M4 some. Most
4425 importantly, rename all related macros to be in the b4_percent_define
4426 and b4_percent_code namespaces. Also, complete support for `.' in
4427 %define variable names and %code qualifiers.
4428 * data/bison.m4 (b4_check_user_names): Check for special
4429 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4430 m4_foreach loops.
4431 (b4_get_percent_define, b4_get_percent_code): Rename to...
4432 (b4_percent_define_get, b4_percent_code_get): ... these.
4433 Extend documentation with examples.
4434 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4435 b4_percent_define_skeleton_variables and
4436 b4_percent_code_skeleton_qualifiers.
4437 Expect any value for the %define variable `foo' to be stored in the
4438 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4439 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4440 expect any unqualified %code blocks to be stored in a macro named
4441 `b4_percent_code_unqualified'.
4442 Use m4_indir so that %define variable names and %code qualifiers can
4443 contain `.', which is allowed by the grammar parser.
4444 (b4_percent_define_default): New macro to set a default value for a
4445 %define variable.
4446 (m4_wrap): Update wrapped code, and fix some underquoting.
4447 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4448 Expect grammar uses of %define variables and %code qualifiers to be
4449 defined in b4_percent_define_user_variables and
4450 b4_percent_code_user_qualifiers.
4451 * data/c++.m4: Use b4_percent_define_default rather than
4452 m4_define_default. Fix some underquoting. Skeleton usage of %define
4453 variable define_location_comparison now implies skeleton usage of
4454 %define variable filename_type.
4455 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4456 data/push.c, data/yacc.c: Update macro names.
4457 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4458 muscle names.
4459
4460 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4461
4462 DJGPP specific issues.
4463
4464 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4465 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4466
4467 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4468
4469 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4470 run parsers in all tests so that Valgrind is invoked during
4471 maintainer-check-valgrind.
4472 (Duplicate representation of merged trees): Free all semantic values.
4473 (Duplicated user destructor for lookahead): Likewise.
4474
4475 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4476
4477 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4478 command-line prefix.
4479 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4480 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4481 miss Valgrind messages.
4482 (Exploding the Stack Size with Malloc): Likewise.
4483
4484 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4485
4486 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4487 locals. Reported by Juan Manuel Guerrero at
4488 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4489 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4490 Fix some indentation also.
4491 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4492 explaining this issue.
4493
4494 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
4495 and Joel E. Denny <jdenny@ces.clemson.edu>
4496
4497 Simplify union and prologue handling, and escape union and lex/parse
4498 params with digraphs.
4499 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4500 values to the empty string since these are no longer guaranteed
4501 initialized by the front-end.
4502 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4503 braces around b4_user_stype since this is no longer done by the
4504 front-end.
4505 * src/files.c, src/files.h (pre_prologue_obstack,
4506 post_prologue_obstack): Remove.
4507 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4508 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4509 with digraphs. This fixes lex params and parse params.
4510 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4511 * src/output.c (prepare): Remove muscle insertion of the prologues.
4512 (output): Remove freeing of pre_prologue_obstack and
4513 post_prologue_obstack.
4514 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4515 than prologue_augment for prologue parsing so you don't need prologue
4516 obstacks.
4517 (grammar_declaration): For %union RHS, use `braceless' instead of
4518 "{...}" so that braces are already stripped and code is escaped with
4519 digraphs.
4520 * src/reader.c (prologue_augment): Remove.
4521 (reader): Remove initialization of pre_prologue_obstack and
4522 post_prologue_obstack.
4523 * src/reader.h (prologue_augment): Remove.
4524
4525 * data/c.m4: Remove stray parenthesis.
4526
4527 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4528
4529 Remove quotes from variables names in %define directives and from
4530 qualifiers in %code directives, and restrict the characters that are
4531 allowed in them to M4-friendly ones. For %define, continue to support
4532 the quoted form as a deprecated feature. Discussed starting at
4533 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4534 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4535 %code.
4536 * doc/bison.texinfo (Prologue Alternatives): Update.
4537 (Decl Summary): In %defines entry, update mention of `%code requires'
4538 and `%code provides'.
4539 (C++ Location Values): Update %define uses.
4540 (Calc++ Parser Interface): Likewise.
4541 (Calc++ Parser): Likewise, and update `%code requires' uses.
4542 (Table of Symbols): Update %code documentation.
4543 * src/parse-gram.y (prologue_declaration): For %define variables, use
4544 `variable' instead of `STRING'.
4545 (grammar_declaration): For %code qualifiers, use `ID' instead of
4546 `STRING'.
4547 (variable): New nonterminal that takes an `ID' or a `STRING'.
4548 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4549 and %define uses.
4550 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4551 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4552 (%define errors): Update %define uses.
4553
4554 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4555
4556 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4557 instead of muscle_insert for %define values so that M4-special
4558 characters are replaced with digraphs.
4559 * tests/input.at (%define errors): Extend to check weird values.
4560
4561 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4562
4563 Instead of having skeletons declare all valid %define variables and
4564 %code qualifiers, provide macros that retrieve the associated values
4565 and build these lists automatically. Thus Bison will now warn when a
4566 variable or qualifier is not used by the skeleton in the current
4567 invocation regardless of whether it might sometimes be used by that
4568 skeleton in other invocations. Also, move all %define value macros to
4569 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4570 form, which is replaced by %code.
4571 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4572 (b4_check_user_names): ... this, and change the series of valid name
4573 arguments to a single list argument for names used in the skeleton
4574 similar to the existing list argument for names used in the grammar.
4575 Warn instead of complaining.
4576 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4577 values and %code code, to format %code code properly, and to build
4578 lists of all %define variables and %code qualifiers used in the
4579 skeleton: b4_skeleton_percent_define_variables and
4580 b4_skeleton_percent_code_qualifiers.
4581 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4582 Remove, and...
4583 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4584 the skeleton names lists can finish building first. In place of
4585 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4586 expect the lists b4_user_percent_define_variables and
4587 b4_user_percent_code_qualifiers.
4588 * data/c++.m4: Where setting default values for b4_parser_class_name,
4589 b4_location_type, b4_filename_type, b4_namespace, and
4590 b4_define_location_comparison, update their names to the
4591 b4_percent_define_ namespace.
4592 * data/glr.c: Don't use b4_check_percent_define_variables and
4593 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4594 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4595 (b4_parser_class_name, b4_namespace): Define these using
4596 b4_get_percent_define for parser_class_name and namespace.
4597 * data/location.cc: Use b4_get_percent_define.
4598 * data/push.c: Don't use b4_check_percent_define_variables and
4599 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4600 * data/yacc.c: Likewise, and don't call m4_exit in
4601 b4_use_push_for_pull_if or m4_wrap code will never execute.
4602 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4603 Rename to...
4604 (muscle_grow_user_name_list): ... this for consistency with the
4605 terminology used in bison.m4.
4606 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4607 %define variable names, and rename muscle used_percent_define_variables
4608 to user_percent_define_variables.
4609 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4610 user_percent_code_qualifiers.
4611 (content): Remove.
4612 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4613 {CODE} form is no longer accepted.
4614 * tests/input.at (Reject bad %code qualifiers): Rename to...
4615 (Reject unused %code qualifiers): ... this, and update test output.
4616 (%define error): Update test output.
4617
4618 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4619
4620 Check for unrecognized %define variables similar to checking for
4621 unrecognized %code qualifiers. Check for redefined %define variables.
4622 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4623 generalizes...
4624 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4625 (b4_check_percent_define_variables): New, also wraps it.
4626 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4627 variables using b4_check_percent_define_variables.
4628 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4629 all those exercised in the test suite and all those listed in the
4630 `Default values' section of c++.m4. Are there others?
4631 * data/push.c, data/yacc.c: Declare no valid %define variables.
4632 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4633 similar to muscle_find, but it works even when the muscle stores a
4634 const value.
4635 (muscle_grow_used_name_list): New function for constructing the used
4636 name list muscles that b4_check_for_unrecognized_names requires.
4637 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4638 %define'd more than once. Define the b4_used_percent_define_variables
4639 muscle with muscle_grow_used_name_list.
4640 (grammar_declaration): Abbreviate %code code with
4641 muscle_grow_used_name_list.
4642 * tests/input.at (%define errors): New.
4643
4644 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4645
4646 Provide warn_at, complain_at, and fatal_at function callbacks to the
4647 skeletons, and use this for %code qualifier complaints.
4648 * data/bison.m4 (b4_error_at): New, invoked by...
4649 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4650 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4651 @fatal_at(...@) directives.
4652 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4653 qualifiers in b4_used_percent_code_qualifiers and to use
4654 b4_complain_at.
4655 * src/location.c, src/location.h (boundary_set_from_string): New global
4656 function.
4657 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4658 function.
4659 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4660 to b4_used_percent_code_qualifiers.
4661 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4662 function.
4663 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4664 (lineno): Rename to...
4665 (out_lineno): ... this so I don't misunderstand it again.
4666 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4667 here; these newlines are in the input but not the output file.
4668 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4669 (at_directive_perform): ... this new static function, and add handling
4670 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4671 directives.
4672 * tests/input.at (Reject bad %code qualifiers): Update test output with
4673 locations and extend.
4674
4675 * tests/output.at (Output file name: [, Output file name: ]): Remove
4676 bogus comment about these tests failing.
4677
4678 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4679
4680 Clean up b4_check_percent_code_qualifiers a little.
4681 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4682 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4683 documentation and add examples.
4684 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4685 qualifiers here.
4686
4687 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4688
4689 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4690 unreliable -- especially when they're hidden inside another macro.
4691 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4692 data/c.m4: Remove m4_divert(-1).
4693 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4694 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4695 m4_divert_push(0) and m4_divert_pop(0).
4696 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
4697 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4698 pushed and popped by m4sugar, should be first on the stack.
4699
4700 Provide warn, complain, and fatal function callbacks to the skeletons.
4701 This provides more flexibility than m4_fatal, improves the error
4702 message format, and captures messages for translation. Discussed
4703 starting at
4704 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4705 * data/bison.m4 (b4_error): New, invoked by...
4706 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4707 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4708 directives. Because these M4 macros might be called when the current
4709 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4710 the previous removal of uses of m4_divert, which caused trouble.
4711 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4712 m4_fatal to report unrecognized %code qualifiers.
4713 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4714 push parser requests.
4715 * data/glr.c: Use b4_complain instead of m4_fatal to report
4716 non-deterministic push parser requests.
4717 Update @output usage to @output(...@) form.
4718 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4719 report missing %defines. Update @output usage to @output(...@) form.
4720 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4721 @output(...@) form.
4722 * src/main.c (main): Invoke skel_scanner_free.
4723 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4724 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4725 obstack_for_string from flex-scanner.h.
4726 (YY_DECL): Use to declare skel_lex static.
4727 (decode_at_digraphs): Remove; now handled in the new
4728 SC_AT_DIRECTIVE_ARG start condition.
4729 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4730 functions.
4731 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4732 at_directive_argv): New static globals.
4733 (INITIAL): Use fail_for_invalid_at.
4734 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4735 recognize the start of a generalized `@directive(...@)' form and
4736 start...
4737 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4738 directive args (using the new obstack_for_string), to decode the
4739 contained @ diagraphs, and to perform the directive. It recognizes
4740 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4741 @output(...@).
4742 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4743 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4744 `@,'.
4745 (scan_skel): Initialize obstack_for_string on the first call.
4746 (skel_scanner_free): New function to free obstack_for_string.
4747 * tests/input.at (Reject bad %code qualifiers): Update test output.
4748
4749 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4750
4751 Consolidate the 4 prologue alternative directives (%code, %requires,
4752 %provides, and %code-top) into a single %code directive with an
4753 optional qualifier field. Discussed at
4754 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4755 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4756 alternatives.
4757 * doc/bison.texinfo (Prologue Alternatives): Update.
4758 (Decl Summary): Update to %code "requires" and %code "provides".
4759 (Calc++ Parser): Update to %code "requires".
4760 (Table of Symbols): Remove entries for %requires, %provides, and
4761 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4762 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4763 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4764 which are skeleton-specific.
4765 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4766 declare what %code qualifiers it supports and to complain if any other
4767 qualifiers were used in the grammar.
4768 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4769 and b4_user_code([b4_percent_code_provides]) in place of
4770 b4_user_requires and b4_user_provides.
4771 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4772 Add b4_user_code([b4_percent_code_top]) and
4773 b4_user_code([b4_percent_code]).
4774 Invoke b4_check_percent_code_qualifiers.
4775 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4776 PERCENT_REQUIRES): Remove.
4777 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4778 %requires. Rewrite the %code RHS as the unqualified form defining the
4779 muscle b4_percent_code. Add another RHS for the qualified %code form,
4780 which defines muscles of the form b4_percent_code_QUALIFIER and the
4781 b4_used_percent_code_qualifiers muscle.
4782 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4783 PERCENT_REQUIRES): Remove.
4784 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4785 %code "requires" and %code "provides".
4786 * tests/input.at (Reject bad %code qualifiers): New.
4787
4788 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4789
4790 Use the new code_props interface for destructors and printers.
4791 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4792 printer_location members, and change the type of the destructor and
4793 printer members to code_props.
4794 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4795 symbol_printer_get, semantic_type_destructor_set,
4796 semantic_type_printer_set, default_tagged_destructor_set,
4797 default_tagless_destructor_set, default_tagged_printer_set,
4798 default_tagless_printer_set): Use code_props in arguments and return
4799 types in place of char const * and location.
4800 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4801 since the locations are now contained in the return of
4802 symbol_destructor_get and symbol_printer_get.
4803 * src/output.c (symbol_destructors_output, symbol_printers_output):
4804 Replace with...
4805 (symbol_code_props_output): ... this to eliminate duplicate code.
4806 (output_skeleton): Update to use symbol_code_props_output.
4807 * src/reader.c (symbol_should_be_used): Update use of
4808 symbol_destructor_get.
4809 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4810 Update uses of the various _destructor_set and _printer_set functions.
4811 * src/symtab.c: (default_tagged_destructor_location,
4812 default_tagless_destructor_location, default_tagged_printer_location,
4813 default_tagless_printer_location): Remove since we...
4814 (default_tagged_destructor, default_tagless_destructor,
4815 default_tagged_printer, default_tagless_printer): ... change the type
4816 of these to code_props.
4817 (symbol_new, semantic_type_new, symbol_destructor_set,
4818 semantic_type_destructor_set, symbol_destructor_get,
4819 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4820 symbol_check_alias_consistency, default_tagged_destructor_set,
4821 default_tagless_destructor_set, default_tagged_printer_set,
4822 default_tagless_printer_set): Update.
4823 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4824 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4825 code_props members.
4826 (symbol_print): Use SYMBOL_CODE_PRINT.
4827
4828 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4829
4830 Use the new code_props interface for rule actions.
4831 * src/symlist.h (symbol_list): Replace action, action_location, and
4832 used members with a code_props action_props member.
4833 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4834 grammar_midrule_action, grammar_current_rule_merge_set,
4835 grammar_current_rule_symbol_append, packgram): Update.
4836 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4837 * src/scan-code.l (handle_action_dollar): Update.
4838 (translate_rule_action): Remove, no longer used.
4839 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4840
4841 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4842
4843 Use the new code_props interface in parse-gram.y.
4844 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4845 Update all uses of translate_* functions to use the new code_props
4846 interface and to use gram_scanner_last_string_free and
4847 code_scanner_last_string_free where possible.
4848 (grammar_declaration): symbol_list_destructor_set and
4849 symbol_list_printer_set now perform the translation, so don't do it
4850 here. Use gram_scanner_last_string_free where possible.
4851 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4852 translate_code): Remove, no longer used.
4853 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4854 symbol_list_printer_set): Perform code translation here rather than
4855 depending on the caller to do so.
4856
4857 * src/symlist.h (struct symbol_list): Correct some documentation typos.
4858 * src/scan-gram.h (gram_last_string): Remove declaration.
4859 * src/scan-gram.l (last_string): Declare it static.
4860
4861 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4862
4863 Encapsulate code properties and related functionality for the various
4864 destructors, printers, and actions into a code_props structure and
4865 interface. This patch merely implements code_props in scan-code.h and
4866 scan-code.l. Future patches will rewrite other modules to use it.
4867 Discussed starting at
4868 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
4869 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
4870 consistently initialize const structs that have an empty location
4871 field.
4872 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
4873 to ensure consistency.
4874 * src/scan-code.h (code_props): New structure.
4875 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
4876 function, macro, and const global variable for initializing a
4877 code_props with no code.
4878 (code_props_plain_init, code_props_symbol_action_init,
4879 code_props_rule_action_init, code_props_translate_code): The rest of
4880 the new code_props functional interface. Among other things, the init
4881 functions set the code_props kind field so that
4882 code_props_translate_code will know whether to behave like
4883 translate_symbol_action, translate_rule_action, or translate_code.
4884 These old translate functions must remain until all other modules are
4885 updated to use the new code_props interface.
4886 (code_scanner_last_string_free): New function similar to
4887 gram_scanner_last_string_free.
4888 (code_scanner_free): Add documentation.
4889 * src/scan-code.l: Implement the new interface.
4890 (code_lex): Make it static, add a code_props* argument, and remove the
4891 rule argument.
4892 (last_string): New static global similar to the one in scan-gram.l.
4893 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
4894 instead of rule.
4895 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
4896 code_props since Bison may one day use this information for destructors
4897 and printers.
4898 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
4899 (handle_action_dollar): Use symbol_list_n_get and set used flag
4900 directly since symbol_list_n_used_set is removed.
4901 (translate_action): Add a code_props* argument and remove the rule,
4902 action, and location arguments. Pass the code_props* on to code_lex.
4903 (translate_rule_action, translate_symbol_action, translate_code):
4904 Rewrite as wrappers around the new code_props interface.
4905 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
4906 it would eventually need to break the encapsulation of code_props.
4907
4908 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4909
4910 * etc/.cvsignore: New.
4911
4912 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4913
4914 Add maintainer-push-check to run maintainer-check using push parsing in
4915 place of pull parsing where available.
4916 * Makefile.am (maintainer-push-check): New.
4917 * data/bison.m4 (b4_use_push_for_pull_if): New.
4918 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
4919 appropriately based on their existing values.
4920 (yypush_parse): Don't print push-parser-specific diagnostics if push
4921 parsing is being used in place of pull parsing.
4922 * data/yacc.c: If push parsing should replace pull parsing, redirect to
4923 push.c.
4924 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
4925 variable, and insert b4_use_push_for_pull_flag into muscles.
4926 * tests/Makefile.am (maintainer-push-check): New.
4927
4928 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4929
4930 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
4931 (whether successful or failed) so that yypush_parse can be invoked
4932 again to start a new parse using the same yypstate.
4933 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
4934 check multiple yypull_parse invocations on the same yypstate. For pull
4935 mode, extend to check multiple yyparse invocations.
4936 (Exploding the Stack Size with Alloca): Extend to try with
4937 %push-pull-parser.
4938 (Exploding the Stack Size with Malloc): Likewise.
4939
4940 * tests/calc.at (Simple LALR Calculator): Don't specify
4941 %skeleton "push.c" since %push-pull-parser implies that now.
4942 * tests/headers.at (export YYLTYPE): Don't check for the push
4943 declarations. Otherwise, this test case can't be used to see if push
4944 mode can truly emulate pull mode.
4945 * tests/input.at (Torturing the Scanner): Likewise.
4946 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
4947 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
4948 AT_YACC_IF, which now includes the case of push mode since %skeleton
4949 need not be used for push mode. This will be more intuitive once
4950 push.c is renamed to yacc.c.
4951
4952 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4953
4954 For push mode, convert yyparse from a macro to a function, invoke yylex
4955 instead of passing a yylexp argument to yypull_parse, and don't
4956 generate yypull_parse or yyparse unless %push-pull-parser is declared.
4957 Discussed starting at
4958 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
4959 * data/bison.m4 (b4_pull_if): New.
4960 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
4961 * data/push.c: Improve M4 quoting a little.
4962 (b4_generate_macro_args, b4_parenthesize): Remove.
4963 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
4964 any time a pull parser is requested.
4965 Don't #define this as a wrapper around yypull_parse. Instead, when
4966 both push and pull are requested, make it a function that does that
4967 same thing.
4968 (yypull_parse): If there's a b4_prefix, #define this to
4969 b4_prefix[pull_parse] when both push and pull are requested.
4970 Don't define this as a function unless both push and pull are
4971 requested.
4972 Remove the yylexp argument and hard-code yylex invocation instead.
4973 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
4974 %push-parser.
4975 * src/getargs.c (pull_parser): New global initialized to true.
4976 * getargs.h (pull_parser): extern it.
4977 * src/output.c (prepare): Insert pull_flag muscle.
4978 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
4979 (prologue_declaration): Set both push_parser and pull_parser = true for
4980 %push-pull-parser. Set push_parser = true and pull_parser = false for
4981 %push-parser.
4982 * src/scan-gram.l: Don't accept %push_parser as an alternative to
4983 %push-parser since there's no backward-compatibility concern here.
4984 Scan %push-pull-parser.
4985 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
4986 instead of %push-parser.
4987 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
4988 prototype it in the module that calls yyparse.
4989 * tests/input.at (Torturing the Scanner): Likewise.
4990 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
4991
4992 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
4993
4994 Update etc/bench.pl. Optimize push mode a little (the yyn change
4995 deserves most of the credit).
4996 * Makefile.am (SUBDIRS): Add etc subdirectory.
4997 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
4998 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
4999 yytoken, yyval, and yyloc declarations to...
5000 (yyparse or yypush_parse): ... here to improve performance. For
5001 yypush_parse invocations after the first, be sure to assign yyn its old
5002 value again.
5003 (yypstate_new): Don't bother initializing the yyresult field since the
5004 initial value isn't used.
5005 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5006 remove the #define that, in push mode, set it to yyps->NAME.
5007 * etc/Makefile.am: New.
5008 * etc/bench.pl: Remove and build it instead from...
5009 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5010 "tests/bison" from the build directory by default rather than just
5011 invoking "bison" from $PATH.
5012 (calc_grammar): Update push parser code: don't declare yylval globally,
5013 don't define yyparse_wrapper, and don't #define yyparse.
5014 (bench_grammar): Update to check all working combinations of yacc.c,
5015 push.c, impure, pure, pull, and push.
5016
5017 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5018
5019 For push mode, add pull wrappers around yypush_parse.
5020 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5021 (yypull_parse): New function wrapping yypush_parse.
5022 (yyparse): New #define wrapping yypull_parse.
5023 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5024 is declared.
5025 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5026 prototype yylex in the module that calls yyparse, and don't prototype
5027 yyparse there. Otherwise, the yyparse expansion won't compile.
5028 * tests/input.at (Torturing the Scanner): Likewise.
5029
5030 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5031
5032 Enable push parsers to operate in impure mode. Thus, %push-parser no
5033 longer implies %pure-parser. The point of this change is to move
5034 towards being able to test the push parser code by running the entire
5035 test suite as if %push-parser had been declared.
5036 * data/push.c (yypush_parse): For impure mode, remove the
5037 yypushed_char, yypushed_val, and yypushed_loc arguments.
5038 Instead, declare these as local variables initialized to the global
5039 yychar, yylval, and yylloc.
5040 For the first yypush_parse invocation only, restore the initial values
5041 of these global variables when it's time to read a token since they
5042 have been overwritten.
5043 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5044 %push-parser.
5045 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5046 %pure-parser along with %push-parser since this test case was designed
5047 for pure push parsers.
5048 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5049 (AT_YACC_OR_PUSH_IF): New.
5050 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5051 add a note that it's still wrong for some cases (as it has been for a
5052 while).
5053 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5054 %push-parser no longer implies %pure-parser.
5055
5056 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5057
5058 Remove some unnecessary differences between the pull parser code and
5059 the push parser code. This patch enables yynerrs in push mode.
5060 * data/push.c: Reformat M4 a little.
5061 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5062 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5063 because push mode is on. Instead, if pure mode is on, move yynerrs
5064 to...
5065 (b4_declare_parser_state_variables): ... here.
5066 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5067 to yyps->NAME so it can be used in yypush_parse.
5068 (yypush_parse): Don't omit uses of yynerrs in push mode.
5069
5070 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5071
5072 Fix bug such that the first pushed token's value and location are
5073 sometimes overwritten (sometimes by %initial-action) before being used.
5074 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5075 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5076 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5077 more closely mimic the pull parser logic.
5078 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5079 time to read a token, which is after any initialization of yylval and
5080 yylloc.
5081 (gottoken): Rename label to...
5082 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5083 user namespace.
5084
5085 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5086
5087 Rearrange initialization of the parser state variables so that the
5088 skeleton doesn't have to have a copy for pull mode and another for push
5089 mode. This patch also fixes at least a bug such that yylloc was not
5090 initialized (with b4_location_initial_line and
5091 b4_location_initial_column) upon calling yypush_parse. However, that
5092 initialization now overwrites the first token's location;
5093 %initial-action assigning @$ already did the same thing, and both bugs
5094 will be fixed in a later patch.
5095 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5096 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5097 yyss, yyvs, yyls, and yystacksize.
5098 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5099 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5100 yylsp.
5101 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5102 yyps->NAME so it can be used in yypush_parse.
5103 (yyparse or yypush_parse): For yypush_parse, don't print the
5104 "Starting parse" diagnostic for invocations after the first.
5105 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5106 yypush_parse, only do it for the first invocation.
5107 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5108 initialization to occur in yypush_parse but only on the first
5109 invocation.
5110
5111 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5112
5113 * data/push.c: Add CPP guards around push parser declarations in both
5114 the header and the code file.
5115 In the code file, move the push parser declarations to the same place
5116 they appear in the header file.
5117 Clean up the M4 some, especially the inconsistent underquoting in
5118 some b4_c_function_def and b4_c_function_decl uses.
5119
5120 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5121
5122 Encapsulate the push parser state variables into an M4 macro so the
5123 push skeleton doesn't have to list them again for pull mode's yyparse.
5124 For push mode, remove yypush_parse's local equivalents of these
5125 variables to eliminate unnecessary copying between the two sets at
5126 run-time. This patch also fixes at least a bug related to multiple
5127 %initial-action invocations in push mode.
5128 * data/push.c (b4_declare_parser_variables): Rename to...
5129 (b4_declare_scanner_communication_variables): ... this for clarity and
5130 update both uses.
5131 (b4_declare_yyparse_variables): Remove and move its contents to the one
5132 spot where it was invoked.
5133 (b4_declare_parser_state_variables): New macro containing the parser
5134 state variables required by push mode.
5135 (struct yypstate): Replace all fields but yynew with
5136 b4_declare_parser_state_variables.
5137 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5138 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5139 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5140 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5141 parser state variable declarations with
5142 b4_declare_parser_state_variables.
5143 Don't initialize parser state variables when calling yypush_parse since
5144 yypstate_new already does that.
5145 Invoke the user's initial action only upon the first yypush_parse
5146 invocation.
5147 Remove all code that copies between the local parser state variables
5148 and the yypstate.
5149
5150 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5151
5152 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5153 prevent a name collision in a future patch where these names will
5154 sometimes be #define'd.
5155 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5156 since it no longer has the same name as the existing argument.
5157 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5158
5159 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
5160 and Joel E. Denny <jdenny@ces.clemson.edu>
5161
5162 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5163 that the argument is case-insensitive, and there's no `=' here.
5164 For the %skeleton entry, mention that %language is better.
5165 (Bison Options): Likewise for --language and --skeleton. Move the
5166 --skeleton entry so that the `Tuning the parser' section is sorted
5167 alphabetically on long options.
5168 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5169 %language directive in detail here; cross-reference the %language
5170 documentation instead.
5171 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5172 `%require "2.3b"' so that the example is always up-to-date.
5173 (Table of Symbols): Add entries for %language and %skeleton.
5174 * examples/extexi (normalize): Instead of replacing every %require
5175 argument with the current Bison version, just substitute for
5176 `@value{VERSION}'. This guarantees that we're testing what actually
5177 appears in the documentation.
5178 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5179 rather than `@VERSION@'.
5180
5181 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5182
5183 * NEWS: Reword the %language news a bit, and put it earlier.
5184
5185 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5186 Rewrite to simplify the logic.
5187 (language_argmatch): Likewise.
5188 (program_name): We now own this var.
5189 * src/getargs.h (struct bison_language): Use char[] rather than
5190 const char *.
5191
5192 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5193 Java is supported.
5194 * src/complain.c (program_name): Remove decl; no longer needed.
5195 * src/main.c (program_name): Remove; now belongs to getargs.
5196
5197 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
5198
5199 * NEWS: Document %language.
5200
5201 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5202
5203 * data/c-skel.m4, data/c++-skel.m4: New files.
5204 * data/glr.c: Complain on push parsers.
5205
5206 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5207 over %skeleton.
5208 (Decl Summary): Document %language and %skeleton.
5209 (Command line): Document -L.
5210
5211 * examples/extexi: Rewrite %require directive.
5212 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5213
5214 * src/files.c (compute_exts_from_gc): Look in language structure
5215 for .y extension.
5216 (compute_file_name_parts): Check whether .tab should be added.
5217 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5218 (language, skeleton_arg, language_argmatch): New.
5219 (long_options): Add --language.
5220 (getargs): Use skeleton_arg, add -L/--language.
5221 * src/getargs.h: Include location.h.
5222 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5223 * src/output.c (prepare): Pick default skeleton from struct language.
5224 Don't dispatch C skeletons here.
5225 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5226 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5227 * src/scan-gram.l ("%language"): New rule.
5228
5229 * tests/calc.at: Test %skeleton and %language.
5230 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5231 (AT_GLR_IF): Look for %skeleton "glr.cc".
5232 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5233 (AT_YACC_IF): Reject %language.
5234
5235 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5236
5237 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5238 since it wasn't used; only the typedef name 'semantic_type' is needed.
5239 Also, omit trailing white space.
5240
5241 * bootstrap: Sync from coreutils.
5242 (gnulib_extra_files): Add build-aux/announce.gen.
5243 (slurp): Adjust .gitignore files like .cvsignore files.
5244 * build-aux/announce-gen: Remove from CVS, since bootstrap
5245 now creates this.
5246
5247 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5248
5249 Make %push-parser imply %pure-parser. This fixes several bugs; see
5250 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5251 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5252 pure_parser = true.
5253 * data/push.c: Don't bother testing b4_push_if when deciding whether
5254 to expand b4_declare_parser_variables globally.
5255 (yypush_parse): Likewise in here.
5256
5257 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5258 (yy_reduce_print): Reformat M4 for readability.
5259
5260 2006-12-15 Bob Rossi <bob@brasko.net>
5261 and Joel Denny <jdenny@ces.clemson.edu>
5262
5263 * data/push.c (yypstate): Add typedef, and update all uses of
5264 struct yypstate to just yypstate.
5265 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5266
5267 2006-12-14 Bob Rossi <bob@brasko.net>
5268
5269 * data/push.c (yypush_parse): Declare prototype regardless of
5270 %locations option.
5271
5272 2006-12-14 Bob Rossi <bob@brasko.net>
5273
5274 * data/push.c (yyparse): Remove the prototype and the #define when in
5275 push-parser mode.
5276
5277 2006-12-13 Bob Rossi <bob@brasko.net>
5278
5279 * data/push.c (yypstate_init): Rename to...
5280 (yypstate_new): ... this and use b4_c_function_def.
5281 (yypstate_delete): New.
5282 (yypush_parse): Change parameters yynval and yynlloc to be const.
5283 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5284 yypstate_delete functions.
5285
5286 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5287
5288 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5289 strange test case titles. Reported by Bob Rossi.
5290
5291 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5292
5293 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5294 of potential ambiguities in GLR grammers.
5295
5296 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5297
5298 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5299 `bison ', use m4_index instead of m4_substr since chopping up a string
5300 containing M4-special characters causes problems here.
5301
5302 Fix a couple of bugs related to special characters in user-specified
5303 file names, and make it easier for skeletons to compute output file
5304 names with the same file name prefix as Bison-computed output file
5305 names.
5306 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5307 b4_parser_file_name and b4_spec_defines_file instead of
5308 @output_parser_name@ and @output_header_name@, which are now redundant.
5309 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5310 b4_parser_file_name, b4_spec_defines_file, and the new
5311 @basename(FILENAME@) instead of @output_parser_name@ and
5312 @output_header_name@, which inappropriately escaped the file names as
5313 C string literals.
5314 * src/files.c (all_but_ext): Remove static qualifier.
5315 (compute_output_file_names): Move `free (all_but_ext)' to...
5316 (output_file_names_free): ... here since all_but_ext is needed later.
5317 * src/files.h (all_but_ext): Extern.
5318 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5319 exactly what MUSCLE_INSERT_STRING used to do.
5320 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5321 characters are escaped properly.
5322 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5323 all_but_ext.
5324 For pkgdatadir muscle, maintain previous functionality by using
5325 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5326 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5327 digraphs would never be expanded. Hopefully no one has M4-special
5328 characters in his Bison installation path.
5329 * src/scan-skel.l: Don't parse @output_header_name@ and
5330 @output_parser_name@ anymore since they're now redundant.
5331 In @output, use decode_at_digraphs.
5332 Parse a new @basename command that invokes last_component.
5333 (decode_at_digraphs): New.
5334 (BASE_QPUTS): Remove unused.
5335 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5336 (Output file name): New tests.
5337
5338 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5339
5340 Warn about output files that are generated by the skeletons and that
5341 conflict with other output files.
5342 * data/glr.c: Don't generate the header file here when glr.cc does.
5343 * src/files.c (file_names, file_names_count): New static globals.
5344 (compute_output_file_names): Invoke output_file_name_check for files
5345 not generated by the skeletons and remove existing checks.
5346 (output_file_name_check): New function that warns about conflicting
5347 output file names.
5348 (output_file_names_free): Free file_names.
5349 * src/files.h (output_file_name_check): Declare.
5350 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5351 the skeletons.
5352 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5353 (Conflicting output files): New tests.
5354
5355 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5356
5357 * doc/bison.texinfo: Fix a couple of typos.
5358
5359 2006-12-08 Bob Rossi <bob@brasko.net>
5360
5361 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5362 Rename to...
5363 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5364 update all uses.
5365 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5366 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5367 local pv.
5368 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5369 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5370
5371 2006-12-07 Bob Rossi <bob@brasko.net>
5372 and Joel Denny <jdenny@ces.clemson.edu>
5373
5374 * data/push.c (yypvarsinit): Change return type from void* to struct
5375 yypvars*. No longer cast to void* on return.
5376 (struct yypvars): Remove yylen since it need not be remembered between
5377 yypushparse invocations.
5378 (yypushparse): Don't copy between yylen and pv->yylen.
5379
5380 2006-12-05 Bob Rossi <bob@brasko.net>
5381
5382 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5383 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5384 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5385 (struct yypvars): Remove b4_declare_parser_variables.
5386 (yypvarsinit): Remove init code for removed variables.
5387 (global scope): Do not declare b4_declare_parser_variables if
5388 push or pure mode.
5389 (yypushparse): Add b4_declare_parser_variables.
5390 Init new local variables, and remove init code for removed
5391 yypvars variables.
5392 (yyparse): Delete.
5393 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5394 and yyparse for other modes.
5395 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5396 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5397 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5398 (AT_PURE_LEX_IF): True if pure or push parser.
5399
5400 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5401
5402 Document Yacc prologue alternatives and default %destructor's and
5403 %printer's as experimental. Don't mention Java yet. Discussed at
5404 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5405 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5406 (2.3a): Annotate this entry to say the old forms of these features were
5407 also experimental.
5408 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
5409 Table of Symbols): Say they're experimental. Comment out any mention
5410 of Java (we'll want this back eventually).
5411
5412 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5413
5414 Support a file name argument to %defines. Deprecate `=' in
5415 %file-prefix, %name-prefix, and %output. Discussed at
5416 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5417 * NEWS (2.3a+): Mention.
5418 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
5419 form of %defines, and remove `=' from entries for %file-prefix,
5420 %name-prefix, and %output.
5421 * src/parse-gram.y (prologue_declaration): Implement.
5422 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5423 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5424 all but one occurrence of %name-prefix.
5425 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5426 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5427 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5428 occurrence of each of %file-prefix and %output. Add check for %defines
5429 with argument.
5430 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5431 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5432 Remove the `=' from %output.
5433
5434 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5435
5436 Don't escape $ in test case titles since Autoconf 2.61 now does that
5437 correctly.
5438 * tests/actions.at (Default %printer and %destructor are not for error
5439 or $undefined): Here.
5440 (Default %printer and %destructor are not for $accept): Here.
5441 * tests/input.at (Invalid $n and @n): Here.
5442
5443 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5444
5445 Rename <!> to <>. Discussed starting at
5446 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5447 * NEWS (2.3a+): Update.
5448 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
5449 Update.
5450 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5451 * src/scan-gram.l (INITIAL): Implement.
5452 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5453 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5454 comment.
5455 * tests/actions.at (Default tagless %printer and %destructor,
5456 Default tagged and per-type %printer and %destructor,
5457 Default %printer and %destructor are not for error or $undefined,
5458 Default %printer and %destructor are not for $accept,
5459 Default %printer and %destructor for mid-rule values): Update.
5460 * tests/input.at (Default %printer and %destructor redeclared,
5461 Unused values with default %destructor): Update.
5462
5463 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
5464
5465 Don't let %prec take a nonterminal.
5466 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5467 token.
5468 * tests/input.at (%prec takes a token): New test checking that %prec
5469 won't take a nonterminal.
5470
5471 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5472
5473 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5474 it was double-quoted.
5475 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5476 grammar is maintained with Bison's highest standards.
5477 * src/getargs.c: Fix some typos in Doxygen comments.
5478
5479 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5480
5481 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5482 later. Reported by Paul Eggert in
5483 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5484 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5485 * src/scan-code.l (translate_action): Don't bother invoking
5486 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5487 (code_scanner_free): Instead of invoking
5488 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5489 which frees more.
5490 * src/scan-gram.l (gram_scanner_free): Likewise.
5491 * src/scan-skel.l (scan_skel): Likewise.
5492
5493 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5494
5495 * src/files.c (tr): Change return type to void.
5496 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5497 has been called previously for the same key.
5498 (muscle_find): Return storage instead of value so that
5499 --enable-gcc-warnings doesn't produce warnings that the return discards
5500 const. aver that the value and storage are the same since storage
5501 could potentially be NULL when value is not.
5502 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5503 same as 0.
5504
5505 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5506
5507 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5508 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5509 us a slightly cleaner distribution, and also works.
5510 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5511 gnulib changes.
5512
5513 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5514 and Paul Eggert <eggert@cs.ucla.edu>
5515
5516 Don't let Bison leak memory except when it complains.
5517 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5518 (spec_defines_file, dir_prefix): Now char *, not const char *,
5519 since they are freed.
5520 * src/files.c: Likewise.
5521 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5522 Likewise.
5523 (tr): Now operates in-place. All uses changed.
5524 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5525 values.
5526 (compute_file_name_parts, compute_output_file_names): Don't store
5527 read-only data in variables that will be freed.
5528 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5529 src_extension, and header_extension.
5530 (output_file_names_free): New public function to free
5531 spec_verbose_file, spec_graph_file, spec_defines_file,
5532 parser_file_name, and dir_prefix.
5533 * src/getargs.c (getargs): Don't store read-only data in variables that
5534 will be freed.
5535 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5536 (which previously existed but was unused), and quotearg_free.
5537 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5538 * src/muscle_tab.c: Likewise.
5539 (muscle_entry): Make the value char const *,
5540 and add a new storage member that is char * and can be freed.
5541 (muscle_entry_free): New private function.
5542 (muscle_init): Use it instead of free.
5543 (muscle_insert, muscle_grow): Update and use new storage member.
5544 (muscle_code_grow): Free the string passed to muscle_grow
5545 since it's not needed anymore.
5546 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5547 add a new `char *code' member.
5548 ("{...}"): Declare semantic type as code.
5549 * src/scan-code.h (translate_rule_action):
5550 (translate_symbol_action, translate_code, translate_action): Return
5551 `char const *' rather than `char *' since external code should not free
5552 these strings.
5553 * src/scan-code.l: Likewise.
5554 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5555 which is "{...}" in the parser.
5556 * tests/Makefile.am (maintainer-check-valgrind): Set
5557 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5558 Valgrind.
5559 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5560 complain.
5561 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5562 expecting a non-zero exit status sets --leak-check=summary and
5563 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5564 this case, and we don't want to hear about it.
5565
5566 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5567
5568 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5569 instead of from the template, to simplify configuration a bit.
5570 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5571 and m4/wint_t.m4, as they are needed with the latest gnulib.
5572
5573 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5574
5575 Disable unset/unused mid-rule value warnings by default, and recognize
5576 --warnings=midrule-values to enable them. Discussed starting at
5577 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5578 * NEWS (2.3a+): Mention.
5579 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5580 warnings): Add entry for midrule-values subargument.
5581 * src/reader.c (symbol_should_be_used): Don't return true just because
5582 the value is a set/used mid-rule value unless
5583 --warnings=midrule-values was specified.
5584 * tests/input.at (Unused values, Unused values before symbol
5585 declarations): Run tests with and without --warnings=midrule-values.
5586
5587 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5588 than LIST_FREE directly.
5589
5590 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5591
5592 Finish implementing --warnings=error, which should not be implied by
5593 --warnings=all (or by its synonyms -W and --warnings without
5594 subarguments).
5595 * src/complain.c (set_warning_issued): New function to report that
5596 warnings are being treated as errors and to record an error if so.
5597 Invoke...
5598 (warn_at, warn): ... here.
5599 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5600 "error - warnings are errors" does not appear above "all - all of the
5601 above".
5602 (getargs): For -W and --warnings without subarguments, don't let
5603 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5604 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5605
5606 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5607
5608 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5609 empty subargument list. For example: `bison --warnings= parser.y'.
5610
5611 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5612
5613 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5614 the parser header file so that gcc doesn't warn.
5615
5616 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5617
5618 Split the default %destructor/%printer into two kinds: <*> and <!>.
5619 Discussed starting at
5620 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5621 * NEWS (2.3a+): Mention.
5622 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5623 previous change today related to mid-rules.
5624 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
5625 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
5626 (TYPE_TAG_ANY): Add as <*>.
5627 (TYPE_TAG_NONE): Add as <!>.
5628 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5629 for <*> and <!>.
5630 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5631 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5632 * src/symlist.c (symbol_list_default_new): Split into tagged and
5633 tagless versions.
5634 (symbol_list_destructor_set, symbol_list_printer_set): Split
5635 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5636 SYMLIST_DEFAULT_TAGLESS.
5637 * src/symlist.h: Update symbol_list_default*_new prototypes.
5638 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5639 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5640 * src/symtab.c (default_destructor, default_destructor_location,
5641 default_printer, default_printer_location): Split each into tagged and
5642 tagless versions.
5643 (symbol_destructor_get, symbol_destructor_location_get,
5644 symbol_printer_get, symbol_printer_location_get): Implement tagged
5645 default and tagless default cases.
5646 (default_destructor_set, default_printer_set): Split each into tagged
5647 and tagless versions.
5648 * src/symtab.h: Update prototypes.
5649 * tests/actions.at (Default %printer and %destructor): Rename to...
5650 (Default tagless %printer and %destructor): ... this, and extend.
5651 (Per-type %printer and %destructor): Rename to...
5652 (Default tagged and per-type %printer and %destructor): ... this, and
5653 extend.
5654 (Default %printer and %destructor for user-defined end token): Extend.
5655 (Default %printer and %destructor are not for error or $undefined):
5656 Update.
5657 (Default %printer and %destructor are not for $accept): Update.
5658 (Default %printer and %destructor for mid-rule values): Extend.
5659 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5660 (Unused values with default %destructor): Extend.
5661
5662 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5663
5664 Don't apply the default %destructor/%printer to an unreferenced midrule
5665 value. Mentioned at
5666 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5667 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5668 like $@n instead of just @n so that the default %destructor/%printer
5669 logic doesn't see them as user-defined symbols.
5670 (symbol_is_dummy): Check for both forms of the name.
5671 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5672 name for which the midrule value is referenced in any action.
5673 * tests/actions.at (Default %printer and %destructor for mid-rule
5674 values): New test.
5675 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5676 for change to dummy symbol names.
5677
5678 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5679
5680 Warn about unset midrule $$ if the corresponding $n is used.
5681 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5682 $n usage.
5683 (packgram): Before invoking grammar_rule_check on any rule, make sure
5684 all actions have already been scanned in order to set `used' flags.
5685 Otherwise, checking that a midrule's $$ is set will not always work
5686 properly because the midrule check must forward-reference the midrule's
5687 parent rule.
5688 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5689 warning.
5690
5691 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5692
5693 More improvements to the documentation of the prologue alternatives:
5694 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5695 Bison manual.
5696 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5697 some text to clarify the relative importance of the new directives and
5698 to show how these directives may be viewed as code labels.
5699
5700 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5701
5702 Similar to the recently removed %before-header, add %code-top as the
5703 alternative to the pre-prologue. Mentioned at
5704 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5705 Also, let the prologue alternatives appear in the grammar section.
5706 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5707 (prologue_declaration): Move the existing prologue alternatives to...
5708 (grammar_declaration): ... here and add %code-top.
5709 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5710
5711 Clean up and extend documentation for the prologue alternatives.
5712 * NEWS (2.3a+): Describe prologue alternatives.
5713 * doc/bison.texinfo (Prologue): Move discussion of prologue
5714 alternatives to...
5715 (Prologue Alternatives): ... this new section, and extend it to discuss
5716 all 4 directives in detail.
5717 (Table of Symbols): Clean up discussion of prologue alternatives and
5718 add %code-top.
5719
5720 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5721
5722 DJGPP specific issues.
5723
5724 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5725 config.bat accordingly.
5726 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5727 * djgpp/config.site: Likewise.
5728
5729 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
5730
5731 Replace %*-header with %provides, %requires, %code. See discussion at
5732 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5733
5734 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5735 (b4_user_start_header): Remove.
5736 * data/glr.c: Use new macros instead of b4_*start_header
5737 and b4_*end_header.
5738 * data/glr.cc: Likewise.
5739 * data/lalr1.cc: Likewise.
5740 * data/push.c: Likewise.
5741 * data/yacc.c: Likewise.
5742
5743 * doc/bison.texinfo: Remove %before-header, rename
5744 %{start,end,after}-header to %requires, %provides, %code.
5745
5746 * src/parse-gram.y: Likewise (also rename token names accordingly).
5747 * src/scan-gram.l: Likewise.
5748 * tests/actions.at: Likewise.
5749
5750 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5751
5752 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5753 Problem reported by Joel E. Denny.
5754
5755 2006-10-14 Jim Meyering <jim@meyering.net>
5756
5757 (Sync from coreutils.)
5758 Work also when the working directory (with e.g. coreutils sources)
5759 is version controlled with git, rather than CVS.
5760 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5761 rather than CVS.
5762 In messages and comments, say e.g., "checked-out sources",
5763 rather than "CVS sources".
5764 (version_controlled_file): New function. Work for git as well as
5765 for CVS. Don't use grep's -q option.
5766 (slurp): Call it here, in place of CVS-specific code.
5767
5768 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5769
5770 Fix testsuite for ./configure --enable-gcc-warnings:
5771 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5772 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5773 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5774 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5775 * test/regression.at (Diagnostic that expects two alternatives):
5776 Likewise.
5777
5778 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5779
5780 * bootstrap.conf (gnulib_modules): Add config-h.
5781 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5782 worry about HAVE_CONFIG_H.
5783 * lib/abitset.c: Likewise.
5784 * lib/bitset.c: Likewise.
5785 * lib/bitset_stats.c: Likewise.
5786 * lib/bitsetv-print.c: Likewise.
5787 * lib/bitsetv.c: Likewise.
5788 * lib/ebitset.c: Likewise.
5789 * lib/get-errno.c: Likewise.
5790 * lib/lbitset.c: Likewise.
5791 * lib/subpipe.c: Likewise.
5792 * lib/timevar.c: Likewise.
5793 * lib/vbitset.c: Likewise.
5794 * lib/bitset.c: Include "bitset.h" first, to test interface.
5795 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5796 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5797 * lib/bitsetv.c: Include "bitsetv.h" first.
5798 * lib/get-errno.c: Include "get-errno.h" first.
5799 * m4/.cvsignore: Add config-h.m4.
5800 * tests/actions.at (Default %printer and %destructor for ...):
5801 Adjust expected line numbers in output to reflect removal of #if
5802 HAVE_CONFIG_H lines.
5803 * tests/glr-regression.at (Missed %merge type warnings when ...):
5804 Likewise.
5805 * tests/regression.at (Braced code in declaration in rules section):
5806 Likewise.
5807 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5808 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5809 Include <config.h> unconditionally.
5810
5811 * bootstrap: Sync from coreutils, as follows:
5812
5813 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5814
5815 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5816 variable was sometimes used without being initialized. This
5817 messed up the installation of the INSTALL file in some cases.
5818
5819 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5820
5821 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5822 --copy. Inspired by a suggestion from Bruno Haible.
5823
5824 2006-10-03 Jim Meyering <jim@meyering.net>
5825
5826 * bootstrap: Undo last change to this file, since now gnulib-tool
5827 sticks with the automake default in generating dependencies.
5828
5829 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5830
5831 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5832 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5833
5834 * doc/bison.1: Add copyright notice.
5835
5836 * data/glr.c: Don't include <stdarg.h>; not used.
5837
5838 * NEWS: The -g and --graph options now output graphs in Graphviz
5839 DOT format, not VCG format.
5840 * doc/bison.1: Likewise.
5841 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
5842 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5843 of this change in
5844 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
5845 * TODO: Remove Graphviz entry.
5846 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5847 remove vcg.c, vcg.h, vcg_defaults.h.
5848 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5849 * src/graphviz.c, src/graphviz.h: New files.
5850 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5851 * src/files.h: Make comment more generic.
5852 * src/main.c (main): Likewise.
5853 * src/print_graph.h: Likewise.
5854 * src/getargs.c (usage): Make usage description more generic.
5855 * src/print_graph.c: Include graphviz.h rather than vcg.h.
5856 (static_graph, fgraph): Remove. All uses changed to pass
5857 arguments instead of sharing a static var.
5858 (print_core, print_actions, print_state, print_graph):
5859 Output graphviz format rather than VCG format.
5860 * tests/.cvsignore: Remove *.vcg; add *.dot.
5861 * tests/output.at: Expect *.dot files, not *.vcg files.
5862
5863 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
5864 accommodates the 2006-10-08 change.
5865
5866 2006-10-11 Bob Rossi <bob@brasko.net>
5867
5868 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
5869 (b4_yyssa, b4_yyerror_range): New macros.
5870 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
5871 (yypvarsinit): Remove init of removed fields.
5872 (yypushparse): Remove use of removed fields; use new macros instead.
5873
5874 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5875
5876 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
5877 in a push parser. Reindent slightly to match yacc.c better.
5878
5879 2006-10-11 Bob Rossi <bob@brasko.net>
5880
5881 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
5882 yymsg_alloc fields.
5883 (yypvarsinit, yypushparse): Remove init of removed fields.
5884 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
5885
5886 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5887
5888 * THANKS: Add Paolo Bonzini and Bob Rossi.
5889
5890 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
5891
5892 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
5893 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
5894 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
5895 b4_define_user_cde and uses): Remove.
5896 (b4_comment, b4_prefix, b4_sync_start): New.
5897 * data/bison.m4: New file, with most of the content removed from c.m4.
5898 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
5899 * src/output.c (output_skeleton): Pass bison.m4.
5900 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
5901 only if specified.
5902
5903 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
5904
5905 Fix test failure reported by Tom Lane in
5906 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
5907 and try to make such failures easier to catch in the future.
5908 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
5909 that's now the caller's responsibility.
5910 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
5911 Set yychar = YYEOF if it's negative.
5912 * tests/actions.at (yylex): Abort if asked to read past EOF.
5913 * tests/conflicts.at (yylex): Likewise.
5914 * tests/cxx-type.at (yylex): Likewise.
5915 * tests/glr-regression.at (yylex): Likewise.
5916 * tests/input.at (yylex): Likewise.
5917 * tests/regression.at (yylex): Likewise.
5918 * tests/torture.at (yylex): Likewise.
5919
5920 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
5921
5922 Fix problems with translating English-language diagnostics.
5923 * bootstrap: Fix bug introduced in recent bootstrap changes, with
5924 respect to bison-runtime pot generation. The YY_ stuff
5925 wasn't being captured.
5926 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
5927 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
5928 * runtime-po/POTFILES.in: Add data/push.c.
5929
5930 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5931
5932 Merge bootstrap changes from coreutils.
5933
5934 2006-09-28 Jim Meyering <jim@meyering.net>
5935
5936 Automatically generated dependencies are important even
5937 when all of the sources in a directory come from gnulib.
5938 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
5939 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
5940
5941 2006-09-23 Jim Meyering <jim@meyering.net>
5942
5943 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
5944
5945 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5946
5947 * bootstrap: Add support for --force.
5948 (usage): New function. Describe usage less tersely.
5949 (CVS_only_file): New var.
5950
5951 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
5952
5953 * data/push.c (YYPUSH_MORE): Make it an enum instead.
5954 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
5955 Adjust white space and comments to match GNU style better.
5956
5957 2006-09-20 Bob Rossi <bob@brasko.net>
5958
5959 * data/push.c (yyresult_get): Remove function.
5960 (YYPUSH_MORE): Add #define.
5961 (yypushparse): Modify return value.
5962
5963 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5964
5965 * stamp-h.in: Remove; no longer needed.
5966 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
5967 Remove config.h, config.hin, intl (no longer created).
5968 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
5969 stamp-h1.
5970
5971 Sync bootstrap from coreutils, as follows:
5972
5973 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
5974
5975 * bootstrap (symlink_to_gnulib): New function.
5976 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
5977 to copies-of-gnulib.
5978 (cp_mark_as_generated, slurp, gnulib_files):
5979 Avoid making a copy if it's the same as the old version.
5980 (gnulib_files): Add support for this variable (used by Bison).
5981
5982 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5983
5984 * src/getargs.c (usage): Rework to use conventions similar to
5985 coreutils, to make translation a bit easier and the code a bit
5986 smaller. Problem reported by Tim Van Holder.
5987
5988 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
5989
5990 Use some of gnulib's new modules, taken from coreutils.
5991
5992 * bootstrap: Sync from coreutils, except add support for gnulib_files.
5993 * bootstrap.conf: New file.
5994 (gnulib_modules): Add configmake, inttypes, unistd.
5995 (XGETTEXT_OPTIONS): Add complain, complain_at,
5996 fatal, fatal_at, warn, warn_at, unexpected_end.
5997 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
5998 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
5999 (gl_EARLY): Add.
6000 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6001 (gl_INIT): Add
6002 (GNULIB_AUTOCONF_SNIPPET): Remove.
6003 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6004 the pickiest.
6005 * lib/.cvsignore: Add inttypes_.h.
6006 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6007 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6008 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6009 no-longer-necessary initializations.
6010 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6011 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6012 use the unistd module.
6013 * src/system.h: Likewise.
6014 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6015 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6016 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6017 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6018 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6019 * src/system.h: Include inttypes.h unconditionally, now that we
6020 use the inttypes module. Don't bother to include stdint.h, since
6021 inttypes.h now does that for us.
6022 (LOCALEDIR): Remove, now that we use the configmake module.
6023 * src/getargs.c: Include configmake.h.
6024 * src/main.c: Likewise.
6025 * src/output.c: Likewise.
6026 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6027 not from $abs_top_builddir, since config.h moved.
6028
6029
6030 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6031 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6032
6033 * src/parse-gram.y (symbol_declaration): Don't put statements
6034 before declarations; it's not portable to C89.
6035 * src/scan-code.l (handle_action_at): Likewise.
6036
6037 * src/scan-code.l: Always initialize braces_level; the old code
6038 left it uninitialized and therefore had undefined behavior.
6039
6040 Don't attempt to redefine 'assert', since it runs afoul of
6041 systems where standard headers (mistakenly) include <assert.h>.
6042 Instead, define and use our own alternative, called 'aver'.
6043 * src/reader.c: Don't include assert.h, since we no longer
6044 use assert.
6045 * src/scan-code.l: Likewise.
6046 * src/system.h (assert): Remove, replacing with....
6047 (aver): New function, taking a bool arg. All uses changed.
6048 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6049 not merely an integer.
6050
6051 2006-09-15 Bob Rossi <bob@brasko.net>
6052
6053 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6054 * data/c.m4 (YYPUSH): New.
6055 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6056 * src/getargs.c (push_parser): New var.
6057 * src/getargs.h (push_parser): New declaration.
6058 * src/output.c (prepare): Add macro insertion of `push_flag'.
6059 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6060 (prologue_declaration): Parse %push-parser.
6061 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6062 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6063 list of removed lines from the traces observed.
6064 (AT_CHECK_CALC_LALR): Added push parser tests.
6065
6066 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6067
6068 * NEWS: Version 2.3a.
6069 * configure.ac (AC_INIT): Likewise.
6070
6071 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6072 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6073 due to header ordering dependencies. I don't know why the #define
6074 was there.
6075
6076 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6077 runtime cost when YYDEBUG is not defined, and so that some tests
6078 that used to fail now work. Problem and initial suggestion by
6079 Paolo Bonzini.
6080 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6081 * data/glr.cc (b4_parser_class_name):
6082 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6083 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6084 (yydebug_) [YYDEBUG]: New member.
6085 (yycdebug_): Now defined only if YYDEBUG.
6086 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6087 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6088 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6089 if YYYDEBUG.
6090 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6091 Define only if YYDEBUG.
6092 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6093 set_debug_level.
6094 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6095 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6096 AT_CHECK_CALC_GLR_CC that are working now.
6097
6098 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6099
6100 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6101 We don't need them in glr.cc, and glr.c defines them.
6102 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6103 assumes that defining it to anything is the same as defining
6104 it to 1. Problem reported by Paolo Bonzini.
6105
6106 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6107
6108 * data/c.m4 (b4_null, b4_case): Define.
6109 * src/output.c (prepare_symbols): Use b4_null.
6110 (user_actions_output): Use b4_case.
6111
6112 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6113
6114 * data/glr.c (b4_shared_declarations): Put start-header first,
6115 before any #includes that we generate, so that feature-test
6116 macros work. Problem reported by Michael Deutschmann in
6117 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6118 * data/lalr1.cc: Likewise.
6119 * doc/bison.texinfo (Prologue): Document that feature-test macros
6120 should be defined before any Bison declarations.
6121 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6122 that depend on location.hh after, not before, Bison decls, since
6123 we now include location.hh after the first user prologue.
6124
6125 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6126 Sander Brandenburg in
6127 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6128 Also, fix minor white space and comment issues.
6129 (Prologue): Mention that it's better to define feature-test macros
6130 before Bison declarations. Problem reported by Michael Deutschmann.
6131
6132 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6133 by Jim Meyering.
6134 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6135 This adjusts to recent gnulib changes.
6136
6137 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6138
6139 Finish implementation of per-type %destructor/%printer. Discussed
6140 starting at
6141 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6142 and
6143 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6144 * NEWS (2.3+): Add a description of this feature to the default
6145 %destructor/%printer description.
6146 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6147 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6148 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6149 list node contains a semantic type.
6150 * src/symtab.c, src/symtab.h: Extend with a table that associates
6151 semantic types with their %destructor's and %printer's.
6152 (semantic_type_from_uniqstr, semantic_type_get,
6153 semantic_type_destructor_set, semantic_type_printer_set): New functions
6154 composing the public interface of that table.
6155 (symbol_destructor_get, symbol_destructor_location_get,
6156 symbol_printer_get, symbol_printer_location_get): If there's no
6157 per-symbol %destructor/%printer, look up the per-type before trying
6158 the default.
6159 * tests/actions.at (Per-type %printer and %destructor): New test case.
6160 * tests/input.at (Default %printer and %destructor redeclared):
6161 Extend to check that multiple occurrences of %symbol-default in a
6162 single %destructor/%printer declaration is an error.
6163 (Per-type %printer and %destructor redeclared, Unused values with
6164 per-type %destructor): New test cases.
6165
6166 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6167
6168 Require default %destructor/%printer to be declared using
6169 %symbol-default instead of an empty symbol list, and start working on
6170 new per-type %destructor/%printer. Discussed at
6171 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6172 * NEWS (2.3+): Add %symbol-default to example.
6173 * bison.texinfo (Freeing Discarded Symbols): Likewise.
6174 (Table of Symbols): Add entry for %symbol-default.
6175 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6176 (generic_symlist, generic_symlist_item): New nonterminals for creating
6177 a list in which each item is a symbol, semantic type, or
6178 %symbol-default.
6179 (grammar_declaration): Use generic_symlist in %destructor and %printer
6180 declarations instead of symbols.1 or an empty list.
6181 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6182 for changes to symbol_list.
6183 * src/reader.c: Update for changes to symbol_list.
6184 * src/scan-code.l: Likewise.
6185 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6186 * src/symlist.c, src/symlist.h: Extend such that a list node may
6187 represent a semantic type or a %symbol-default in addition to just an
6188 ordinary symbol. Add switched functions for setting %destructor's and
6189 %printer's.
6190 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6191 %destructor/%printer declarations.
6192
6193 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6194
6195 Whether the default %destructor/%printer applies to a particular symbol
6196 isn't a question of whether the user *declares* that symbol (in %token,
6197 for example). It's a question of whether the user by any means
6198 *defines* the symbol at all (by simply using a char token, for
6199 example). $end is defined by Bison whereas any other token with token
6200 number 0 is defined by the user. The error token is always defined by
6201 Bison regardless of whether the user declares it with %token, but we
6202 may one day let the user define error as a nonterminal instead.
6203 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6204 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6205 the meaning of "user-defined".
6206 * tests/actions.at (Default %printer and %destructor for user-declared
6207 end token): Rename to...
6208 (Default %printer and %destructor for user-defined end token): ...
6209 this.
6210
6211 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6212 computation of whether to apply the default, don't maintain a list of
6213 every Bison-defined symbol. Instead, just check for a first character
6214 of '$', which a user symbol cannot have, and check for the error token.
6215
6216 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6217
6218 Don't apply the default %destructor or %printer to the error token,
6219 $undefined, or $accept. This change fits the general rule that the
6220 default %destructor and %printer are only for user-declared symbols,
6221 and it solves several difficulties that are described in the new test
6222 cases listed below.
6223 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6224 * tests/actions.at (Default %printer and %destructor are not for error
6225 or $undefined, Default %printer and %destructor are not for $accept):
6226 New test cases.
6227
6228 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6229
6230 Allow %start after the first rule.
6231 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6232 when parsing the first rule.
6233 (check_and_convert_grammar): Search for it here after all grammar
6234 declarations have been parsed. Skip midrules, which have dummy LHS
6235 nonterminals.
6236 * src/symtab.c (symbol_is_dummy): New function.
6237 * src/symtab.h (symbol_is_dummy): Declare it.
6238 * tests/input.at (%start after first rule): New test.
6239
6240 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6241
6242 Redo some of the previous commit: add back the ability to use
6243 non-aliased/undeclared string literals since it might be useful to
6244 those declaring %token-table.
6245 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6246 commit: don't worry about complaints from symbols_pack.
6247 * src/symtab.c (symbol_new, symbol_class_set,
6248 symbol_check_alias_consistency): Undo changes in previous commit: count
6249 each string literal as a new symbol and token, assign it a symbol
6250 number, and don't complain about non-aliased string literals.
6251 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6252 and token counts but does still set aliased tokens to the same number,
6253 symbol_pack_processor now leaves empty slots in the symbols array.
6254 Remove those slots.
6255 * tests/regression.at (Undeclared string literal): Remove test case
6256 added in previous commit since non-aliased string literals are allowed
6257 again.
6258 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6259 remove unnecessary string literal declarations.
6260 * tests/sets.at (Firsts): Likewise.
6261
6262 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6263
6264 Don't allow an undeclared string literal, but allow a string literal to
6265 be used before its declaration.
6266 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6267 symbols_pack complained.
6268 * src/symtab.c (symbol_new): Don't count a string literal as a new
6269 symbol.
6270 (symbol_class_set): Don't count a string literal as a new token, and
6271 don't assign it a symbol number since symbol_make_alias does that.
6272 (symbol_make_alias): It's not necessary to decrement the symbol and
6273 token counts anymore. Don't assume that an alias declaration occurs
6274 before any uses of the identifier or string, and thus don't assert that
6275 one of them has the highest symbol number so far.
6276 (symbol_check_alias_consistency): Complain if there's a string literal
6277 that wasn't declared as an alias.
6278 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6279 symbol_pack asserts that every token has been assigned a symbol number
6280 although undeclared string literals have not.
6281 * tests/regression.at (String alias declared after use, Undeclared
6282 string literal): New test cases.
6283 (Characters Escapes, Web2c Actions): Declare string literals as
6284 aliases.
6285 * tests/sets.at (Firsts): Likewise.
6286
6287 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6288
6289 In the grammar scanner, STRING_FINISH unclosed constructs and return
6290 them to the parser in order to improve error messages.
6291 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6292 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6293 * tests/input.at (Unclosed constructs): New test case.
6294 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6295 seen.
6296
6297 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6298 unused global.
6299
6300 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6301
6302 Handle string aliases for character tokens correctly.
6303 * src/symtab.c (symbol_user_token_number_set): If the token has an
6304 alias, check and set its alias's user token number instead of its own,
6305 which is set to indicate the alias. Previously, every occurrence of
6306 the character token in the grammar overwrote that alias indicator with
6307 the character code.
6308 * tests/input.at (String aliases for character tokens): New test.
6309
6310 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6311
6312 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6313
6314 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6315
6316 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6317 to prevent failures when building on older platforms.
6318 Check for autopoint failure.
6319 Set XGETTEXT_OPTIONS to values that check for C format strings,
6320 so that translators are warned about them (this also helps
6321 prevent core dumps).
6322
6323 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6324 function, since it simplifies our code a bit.
6325
6326 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6327 rather than -W, so we don't get bogus warnings about sign comparisons.
6328 Add -Wpointer-arith, since that warning is useful (it reports code
6329 that does not conform to C89 and that some compilers reject).
6330 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6331 since it's no longer needed.
6332
6333 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6334
6335 Clean up scanners a bit.
6336 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6337 definitions so gcc won't warn when obstack_for_string is unused.
6338 * src/scan-code.l: config.h and system.h are already #include'd by
6339 scan-code-c.c, so get rid of them here.
6340 * src/scan-gram.l: Likewise.
6341 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6342 definitions rather than duplicating the rest of it.
6343 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6344
6345 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6346
6347 Suppress signed/unsigned comparison warnings for yycheck.
6348 * data/c.m4 (b4_safest_int_type): New macro.
6349 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6350 a signed int type, cast it to b4_safest_int_type first.
6351 * data/yacc.c: Likewise.
6352 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6353 also overwritten.
6354
6355 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6356
6357 * doc/bison.texinfo: Fix some typos.
6358
6359 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6360
6361 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6362 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6363
6364 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6365 the latest gnulib does this a different way.
6366 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6367 translation was patched, so stop omitting it.
6368
6369 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6370
6371 Enable declaration of default %printer/%destructor. Make the parser
6372 use these for all user-declared grammar symbols for which the user does
6373 not declare a specific %printer/%destructor. Thus, the parser uses it
6374 for token 0 if the user declares it but not if Bison generates it as
6375 $end. Discussed starting at
6376 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6377 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6378 and
6379 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6380 * NEWS (2.3+): Mention.
6381 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6382 declare a %destructor for a mid-rule's semantic value. It's just
6383 impossible to declare one specific to it.
6384 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6385 code. Describe default %destructor form.
6386 * src/parse-gram.y (grammar_declaration): Parse default
6387 %printer/%destructor declarations.
6388 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6389 and symbol_destructor_location_get rather than accessing the destructor
6390 and destructor_location members of struct symbol.
6391 (symbol_printers_output): Likewise but for %printer's.
6392 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6393 again.
6394 * src/symtab.c (default_destructor, default_destructor_location,
6395 default_printer, default_printer_location): New static global
6396 variables to record the default %destructor and %printer.
6397 (symbol_destructor_get, symbol_destructor_location_get,
6398 symbol_printer_get, symbol_printer_location_get): New functions to
6399 compute the appropriate %destructor and %printer for a symbol.
6400 (default_destructor_set, default_printer_set): New functions to set the
6401 default %destructor and %printer.
6402 * src/symtab.h: Prototype all those new functions.
6403 * tests/actions.at (Default %printer and %destructor): New test to
6404 check that the right %printer and %destructor are called, that they're
6405 not called for $end, and that $$ and @$ work correctly.
6406 (Default %printer and %destructor for user-declared end token): New
6407 test to check that the default %printer and %destructor are called for
6408 a user-declared end token.
6409 * tests/input.at (Default %printer and %destructor redeclared, Unused
6410 values with default %destructor): New tests to check related grammar
6411 warnings and errors.
6412
6413 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6414
6415 Clean up handling of %destructor for the end token (token 0).
6416 Discussed starting at
6417 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6418 and
6419 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6420
6421 Make the skeletons consistent in how they pop the end token and invoke
6422 its %destructor.
6423 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6424 state, which has token number 0, since this would invoke the
6425 %destructor for the end token.
6426 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6427 until after shifting the end token, or else it won't be popped.
6428 * data/yacc.c (yyparse): Likewise.
6429
6430 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6431 it's the end token. Upon termination, destroy an unshifted lookahead
6432 even when it's the end token.
6433 * data/lalr1.cc (yy::parser::parse): Likewise.
6434 * data/yacc.c (yyparse): Likewise.
6435
6436 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6437 value warnings for the end token when the user gives the end token a
6438 %destructor.
6439
6440 * tests/actions.at (Printers and Destructors): Test all the above.
6441
6442 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6443
6444 Update to latest gnulib and gettext versions.
6445 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6446 Add fopen-safer.
6447 (gnulib_files): Add m4/warning.m4. Don't worry about files
6448 overwritten by autopoint.
6449 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6450 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6451 rejects them.
6452 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6453 so that we can remove the intl files at a better time.
6454 (intl_files_to_remove): Remove aclocal.m4, since it gets
6455 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6456 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6457 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6458 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6459 Remove datarootdir hack; no longer needed.
6460 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6461 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6462 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6463 strdup.h.
6464 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6465 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6466
6467 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
6468
6469 * bootstrap: Adjust to today's change to gnulib-tool by invoking
6470 it with --assume-autoconf='latest-stable'.
6471
6472 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
6473
6474 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6475 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6476 YYSTYPE' and `{'.
6477 * src/muscle_tab.h (muscle_grow): Replace the header comments with
6478 those from muscle_tab.c since the old ones are misleading.
6479
6480 2006-07-13 Akim Demaille <akim@epita.fr>
6481
6482 Support %define "KEY" {VALUE}.
6483 * src/scan-code.h, src/scan-code.l (translate_action)
6484 (translate_rule_action, translate_symbol_action, translate_code):
6485 Return char *, not const char *.
6486 * src/parse-gram.y (declaration): Rename as...
6487 (prologue_declaration): this.
6488 (string_content): Remove this nonterminal, use STRING.
6489 (braceless, content, content.opt): New nonterminal.
6490 Use them.
6491 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6492 as value.
6493 * src/scan-gram.l (getargs.h): Don't include it.
6494
6495 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
6496
6497 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6498 rather than a for-loop that declares a local bool variable. This
6499 should work around a compatibility problem with a Cray x1e C++
6500 compiler reported by Hung Nguyen in
6501 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6502 The for-loop was introduced in the 2004-11-17 change but I don't
6503 know why it was needed.
6504
6505 2006-07-12 Akim Demaille <akim@epita.fr>
6506
6507 * data/c.m4: Comment changes.
6508
6509 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
6510
6511 * src/complain.c (error_message, ERROR_MESSAGE): New.
6512 To factor...
6513 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6514 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6515
6516 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6517
6518 * NEWS: Instead of %union, you can define and use your own union type
6519 YYSTYPE if your grammar contains at least one <type> tag.
6520 Your YYSTYPE need not be a macro; it can be a typedef.
6521 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6522 (Union Decl, Decl Summary): Document this.
6523 * data/glr.c (YYSTYPE): Implement this.
6524 * data/glr.cc (YYSTYPE): Likewise.
6525 * data/lalr1.cc (YYSTYPE): Likewise.
6526 * data/yacc.c (YYSTYPE): Likewise.
6527 * src/output.c (prepare): Output tag_seen_flag.
6528 * src/parse-gram.y (declaration, grammar_declaration):
6529 Use 'union_seen' rather than 'typed' to determine whether
6530 %union has been seen, since grammars can now be typed without
6531 %union.
6532 (symbol_declaration, type.opt, symbol_def):
6533 Keep track of whether a tag has been seen.
6534 * src/reader.c (union_seen, tag_seen): New vars.
6535 (typed): remove.
6536 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6537 * src/scan-code.l (untyped_var_seen): New variable.
6538 (handle_action_dollar): Adjust to above changes.
6539 (handle_action_dollar, handle_action_at):
6540 Improve overflow checking for outlandish numbers.
6541 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6542 avoid new diagnostics generated by above changes.
6543 * tests/regression.at (YYSTYPE typedef): Add test to check
6544 for type tags without %union.
6545
6546 * src/symlist.c (symbol_list_length): Return int, not unsigned
6547 int, since callers expect int. This may need to get revisited
6548 once we have proper integer overflow checking.
6549
6550 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6551 object is now static.
6552
6553 * src/getargs.c (flags_argmatch): Return void, not int,
6554 to pacify ./configure --enable-gcc-warnings.
6555
6556 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6557 since last_string is already defined to FLEX_PREFIX (last_string).
6558
6559 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6560
6561 Implement --warnings/-W.
6562 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6563 replaced by...
6564 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6565 Adjust callers.
6566 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6567 (warnings_args, warnings_types): New.
6568 (getargs, short_options, long_options): Accept -W/--warnings.
6569 Sort the options by alphabetical order, upper case letter right
6570 before its lower case.
6571
6572 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6573
6574 Change %merge result type clash warnings to errors. Discussed at
6575 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6576 * src/reader.c (record_merge_function_type): Use complain_at.
6577 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6578 declared later): Update test case results.
6579
6580 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6581
6582 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6583 to be in alphabetical order.
6584 (trace_args): Spelling fixes.
6585
6586 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6587
6588 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6589 so they don't collide with user-defined macros.
6590 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6591 this was never guaranteed, and now that we're using gnulib stdint,
6592 which defines int_fast16_t to long int, the problem is exposed.
6593
6594 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6595
6596 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6597 need the full POSIX semantics (and weren't implementing them
6598 anyway).
6599
6600 Adjust to Autoconf 2.60 and today's gnulib.
6601 * bootstrap (gnulib_modules): Add stdint.
6602 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6603 no longer copies it.
6604 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6605 since stdint needs the former and wcwidth (which is now required
6606 by mbswidth) needs the latter.
6607 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6608 work around a compatibility glitch between gettext 0.14.6 and
6609 Autoconf 2.60.
6610 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6611 Do not check for uintptr_t, since new stdint module does the right
6612 thing.
6613 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6614 Add stdint.h, stdint_.h, wcwidth.h.
6615 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6616 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6617 stdint.m4, wchar_t.m4, wcwidth.m4.
6618 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6619 usual order for ../lib/*.h files.
6620 (file_name_split): Use last_component, not base_name, to adjust
6621 to gnulib changes.
6622 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6623 for ../lib/*.h files.
6624 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6625 Define unconditionally, since we now assume the stdint module.
6626 * src/scan-skel.l: Include <dirname.h>.
6627 (BASE_QPUTS): Use last_component, not base_name.
6628 * src/system.h: Include <unlocked-io.h> in the usual order
6629 for ../lib/*.h files. Include <stdint.h> unconditionally,
6630 since we now use the stdint module.
6631 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6632 HAVE_UINTPTR_T, since we now use the stdint module.
6633 (base_name): Remove decl, since files now include <dirname.h>
6634 to get the decl.
6635
6636 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6637
6638 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6639 New, default to 1.
6640 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6641 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6642 default.
6643 * tests/calc.at: Adjust.
6644
6645 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6646
6647 * data/c.m4 (b4_basename): New.
6648 (b4_syncline): Also output the location of its invocation (from
6649 the skeleton).
6650 (b4_user_action, b4_define_user_action, b4_user_actions)
6651 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6652 (b4_user_stype): New.
6653 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6654
6655 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6656
6657 In the grammar file, the first column is 1 not 0 on the first line as
6658 on every other line.
6659 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6660 * tests/input.at (Torturing the Scanner): Update output.
6661
6662 * src/scan-gram.l (scanner_cursor): Declare it static.
6663
6664 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6665
6666 In warnings, say "previous declaration" rather than "first
6667 declaration".
6668 * src/symtab.c (redeclaration): Do that here.
6669 * src/reader.c (record_merge_function_type): In the case of a result
6670 type clash, report the previous declaration rather than the very first
6671 one in the grammar file.
6672 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6673 declared later): Add a third declaration to check this behavior.
6674 * tests/input.at (Incompatible Aliases): Update output.
6675
6676 2006-06-27 Akim Demaille <akim@epita.fr>
6677
6678 * doc/Doxyfile.in: New.
6679 * doc/Makefile.am: Use it.
6680 * src/lalr.h, src/symtab.h: Initial doxygenation.
6681
6682 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6683
6684 Don't miss %merge result type warnings just because the LHS types are
6685 declared after the %merge. This continues the effort of the previous
6686 patch.
6687 * src/reader.c (get_merge_function): Don't set the merger type yet.
6688 (record_merge_function_type): New function for setting the merger type
6689 and checking for clashes.
6690 (grammar_current_rule_merge_set): Set the location of the %merge for
6691 the current rule.
6692 (packgram): Invoke record_merge_function_type for each rule now that
6693 all symbol type declarations have been parsed.
6694 * src/reader.h (merger_list.type_declaration_location): New member
6695 storing the location of the first %merge from which the type for this
6696 merging function was derived.
6697 * src/symlist.h (symbol_list.merger_declaration_location): New member
6698 storing the location of a rule's %merge, if any.
6699 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6700 declared later): New test to catch the error fixed by the above patch.
6701
6702 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6703
6704 Get action warnings (grammar_rule_check) right even when symbol
6705 declarations appear after the rules. Discussed at
6706 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6707 and
6708 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6709 Don't mistake the type of $$ in a midrule to be that of its parent
6710 rule's $$.
6711 * src/reader.c (grammar_current_rule_end): Don't invoke
6712 grammar_rule_check yet since not all symbol declarations may have been
6713 parsed yet.
6714 (grammar_midrule_action): Likewise.
6715 Don't record whether the midrule's $$ has been used yet since actions
6716 haven't been translated yet.
6717 Record the midrule's parent rule and its RHS index within the parent
6718 rule.
6719 (grammar_current_rule_action_append): Don't translate the action yet
6720 since not all symbol declarations may have been parsed yet and, thus,
6721 warnings about types for $$, $n, @$, and @n can't be reported yet.
6722 (packgram): Translate the action and invoke grammar_rule_check now that
6723 all symbol declarations have been parsed.
6724 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6725 after parsing the entire grammar file, the symbol list here in the case
6726 of a midrule is actually the midrule's empty RHS, so reference its
6727 parent rule's RHS where necessary.
6728 On the other hand, now that you can already know it's a midrule, you
6729 aren't forced to think $$ has the same type as its parent rule's $$.
6730 (handle_action_at): In the case of a midrule, reference the parent rule
6731 where necessary.
6732 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6733 members.
6734 (symbol_list_length): Now that this is invoked after all rules have
6735 been parsed, a NULL symbol (rather than a NULL symbol list node)
6736 terminates a rule. symbol_list_print already does this correctly.
6737 * src/symlist.h (symbol_list.midrule_parent_rule,
6738 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6739 remember their relationships with their parents.
6740 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6741 fixed by the above patch.
6742 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6743 implementing...
6744 (Unused values): ... this old test case and...
6745 (Unused values before symbol declarations): ... this new test case.
6746 This one is the same as `Unused values' except that all symbol
6747 declarations appear after the rules in order to catch the rest of the
6748 errors fixed by the above patch.
6749
6750 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6751
6752 More cleanup.
6753 * src/reader.c (current_rule): Declare it static since it's no longer
6754 used outside this file.
6755 (grammar_current_rule_action_append): Remove redundant arguments from
6756 translate_rule_action invocation.
6757 * src/reader.h (current_rule): Remove this unused extern.
6758 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6759 * src/scan-code.l (translate_rule_action): Likewise.
6760
6761 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6762
6763 Clean up yesterday's patch.
6764 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6765 to...
6766 * src/reader.c (grammar_current_rule_action_append): ... here for
6767 consistency with grammar_current_rule_symbol_append.
6768 * tests/regression.at (Braced code in declaration in rules section):
6769 Make yyerror and yylex static as usual.
6770
6771 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6772
6773 Fix bug that mistakes braced code in a declaration in the rules section
6774 to be a rule action. Mentioned at
6775 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6776 * src/scan-gram.l: Move midrule action detection from the start of the
6777 scanning of any braced code to...
6778 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6779 action. For readability, use $2 and @2 rather than the equivalent
6780 global variables.
6781 * tests/regression.at (Braced code in declaration in rules section):
6782 New test to catch the error fixed by the above patch.
6783
6784 Work on code readability some.
6785 * src/scan-code.l (current_rule): Get rid of this misleading and
6786 redundant declaration: it's actually extern'ed in reader.h.
6787 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6788 translate_action): Add a rule argument and use it instead of the global
6789 current_rule.
6790 (translate_rule_action): This already receives current_rule through an
6791 argument, so pass it on to translate_action instead of assigning
6792 current_rule to current_rule.
6793 (translate_symbol_action, translate_code): Pass rule = NULL to
6794 translate_action.
6795
6796 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6797
6798 Rename %before-definitions to %start-header and %after-definitions to
6799 %end-header. Don't use these declarations to separate pre-prologue
6800 blocks from post-prologue blocks. Add new order-independent
6801 declarations %before-header and %after-header as alternatives to the
6802 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6803 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6804 * NEWS (2.3+): Update for these changes.
6805 * data/glr.c (b4_before_definitions): Update to...
6806 (b4_start_header): ... this.
6807 (b4_after_definitions): Update to...
6808 (b4_end_header): ... this.
6809 * data/glr.cc: Likewise.
6810 * data/lalr1.cc: Likewise.
6811 * data/yacc.c: Likewise.
6812 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6813 prologue blocks with %*-header declarations.
6814 (Calc++ Parser): Likewise.
6815 (Decl Summary): Update names.
6816 (Table of Symbols): Update description.
6817 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6818 (PERCENT_END_HEADER): ... this.
6819 (PERCENT_BEFORE_DEFINITIONS): Update to...
6820 (PERCENT_START_HEADER): ... this.
6821 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6822 (declaration): Update token names and m4 macro names.
6823 When parsing %end-header and %start-header, invoke translate_code
6824 before muscle_code_grow, and no longer set global booleans to remember
6825 whether these declarations have been seen.
6826 Parse new %after-header and %before-header.
6827 * src/reader.c (before_definitions, after_definitions): Remove.
6828 (prologue_augment): Accept a new bool argument to specify whether to
6829 augment the pre-prologue or post-prologue.
6830 * src/reader.h (before_definitions, after_definitions): Remove these
6831 extern's.
6832 (prologue_augment): Add new bool argument.
6833 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6834 (PERCENT_END_HEADER): ... this.
6835 (PERCENT_BEFORE_DEFINITIONS): Update to...
6836 (PERCENT_START_HEADER): ... this.
6837 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6838 * tests/actions.at (Printers and Destructors): Update names.
6839
6840 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6841
6842 Add comparison operators for C++ location classes. Discussed at
6843 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6844 * data/c++.m4 (b4_define_location_comparison): New boolean %define
6845 declaration indicating whether filename_type has an operator==. If
6846 filename_type is `std::string', it defaults to `1', `0' otherwise.
6847 * data/location.cc: Iff b4_define_location_comparison is `1', add
6848 operator== and operator!= for class position and for class location.
6849
6850 Some minor fixes.
6851 * src/scan-action.l: Remove unused file.
6852 * src/symtab.c (symbol_printer_set): Use printer_location not
6853 destructor_location.
6854 * src/symtab.h (struct symbol): Replace incorrect source comment for
6855 printer members.
6856 * tests/input.at (Incompatible Aliases): Update output with correct
6857 printer location.
6858
6859 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
6860
6861 Don't put the pre-prologue in the header file. For the yacc.c code
6862 file and the glr.c header and code files, move the pre-prologue before
6863 the token definitions. Add new %before-definitions and
6864 %after-definitions to declare code that will go in both the header file
6865 and code file. Discussed at
6866 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
6867 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
6868 and
6869 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
6870 * NEWS (2.3+): Describe these changes.
6871 * data/glr.c (b4_pre_prologue): Move from within to before...
6872 (b4_shared_declarations): ... this.
6873 Add new b4_before_definitions before b4_token_enums.
6874 Add new b4_after_definitions at the end.
6875 * data/glr.cc (b4_pre_prologue): Replace with...
6876 (b4_before_definitions): ... this in the header file.
6877 (b4_after_definitions): New near the end of the header file.
6878 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
6879 code file right before including the header file.
6880 (b4_before_definitions): New in the previous position of
6881 b4_pre_prologue in the header file.
6882 (b4_after_definitions): New near the end of the header file.
6883 * data/yacc.c: Clean up some m4 quoting especially in the header file.
6884 (b4_token_enums_defines): In the code file, move to right before
6885 YYSTYPE for consistency with the header file.
6886 (b4_before_definitions): New right before b4_token_enums_defines in
6887 both the header and code file.
6888 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
6889 header and code file.
6890 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
6891 of prologues for %union dependencies.
6892 (Decl Summary): In %defines description, mention the effect of
6893 %before-definitions and %after-definitions on the header file.
6894 (Calc++ Parser): Forward declare driver in a %before-definitions rather
6895 than in the pre-prologue so that make check succeeds.
6896 (Table of Symbols): Add entries for %before-definitions and
6897 %after-definitions.
6898 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
6899 %before-definitions.
6900 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
6901 (declaration): Parse those declarations and append to
6902 b4_before_definitions and b4_after_definitions, respectively.
6903 * src/reader.c (before_definitions, after_definitions): New bools to
6904 track whether those declarations have been seen.
6905 (prologue_augment): Add to the post-prologue if %union,
6906 %before-definitions, or %after-definitions has been seen.
6907 * src/reader.h (before_definitions, after_definitions): New extern's.
6908 * src/scan-gram.l: Scan the new declarations.
6909 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
6910 prologue block in a %before-definitions or a %after-definitions based
6911 on whether the %union is declared.
6912 * tests/regression.at (Early token definitions with --yacc, Early token
6913 definitions without --yacc): Move tests for token definitions into the
6914 post-prologue since token names are no longer defined in the
6915 pre-prologue.
6916
6917 2006-06-20 Akim Demaille <akim@epita.fr>
6918
6919 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
6920 (symbol_get): Use it.
6921 * src/parse-gram.y: Use it.
6922
6923 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
6924
6925 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
6926 build succeeds when configured with --enable-gcc-warnings.
6927
6928 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
6929
6930 * src/parse-gram.y (char_name): New function.
6931 (CHAR, STRING, string_content): For %printer, properly escape.
6932 (ID): Prefer fputs to fprintf.
6933 (id): Reindent to be consistent with other rules.
6934 Properly quote char.
6935
6936 The Translation Project changed its way of publishing translations
6937 to maintainers. I haven't received any responses to my request
6938 for supporting the old way, or for documenting the new way. I
6939 have modified 'bootstrap' to use screen scraping
6940 (in this case, HTML scraping). This is unreliable and inelegant,
6941 but I don't see any better way. Yuck.
6942 * bootstrap (TP_URL, WGET_COMMAND): New vars.
6943 (get_translations): New function, which uses HTML scraping to
6944 deduce locations of latest translations.
6945 Use this function to grab both bison and bison-runtime .po files.
6946 Don't bother priming the pump for the runtime-po domain any more,
6947 as it's now translated better than bison is.
6948
6949 2006-06-19 Akim Demaille <akim@epita.fr>
6950
6951 * src/scan-gram.l: No longer "parse" things after `%union' until
6952 `{'. Rather, return a single "%union" token.
6953 No longer make symbols: return strings, and leave the conversion
6954 to symbols to the parser.
6955 (SC_PRE_CODE, token_type): Remove.
6956 * src/parse-gram.y (%union): New field `character'.
6957 Sort tokens.
6958 (CHAR): New token.
6959 (ID, ID_COLON): Now that the scanner no longer makes them
6960 identifiers, adjust all uses to invoke symbol_get.
6961 (id_colon): New, wraps the conversion from string to symbol.
6962 (%union): Accept a possible union_name.
6963 (symbol): Now can be a char.
6964 * data/c.m4 (b4_union_name): Leave a default value.
6965 * data/glr.c, data/yacc.c: Use it.
6966
6967 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
6968
6969 For associating token numbers with token names for "yacc.c", don't use
6970 #define statements unless `--yacc' is specified; always use enum
6971 yytokentype. Most important discussions start at:
6972 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
6973 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
6974 and
6975 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
6976 * NEWS (2.3+): Mention.
6977 * data/c.m4 (b4_yacc_if): New.
6978 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
6979 token #define's.
6980 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
6981 on token name definitions.
6982 * src/getargs.c (usage): Capitalize `Yacc' in English.
6983 * src/output.c (prepare): Define b4_yacc_flag.
6984 * tests/regression.at (Early token definitions): Test that tokens names
6985 are defined before the pre-prologue not just before the post-prologue.
6986 Remove this test case and copy to...
6987 (Early token definitions with --yacc): ... this to test #define's.
6988 (Early token definitions without --yacc): ... and this to test enums.
6989
6990 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
6991
6992 * NEWS: Reword the post-2.3 change to not be so optimistic about
6993 removing the old "look-ahead" spelling.
6994 Update previous look-ahead/lookahead change reports.
6995 * REFERENCES: look-ahead -> lookahead (since that's
6996 what he actually wrote).
6997 * doc/refcard.tex: look ahead -> lookahead,
6998 look-ahead -> lookahead
6999
7000 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7001
7002 For consistency, use `lookahead' instead of `look-ahead' or
7003 `look_ahead'. Discussed starting at
7004 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7005 and then at
7006 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7007 * NEWS: For the next release, note the change to `--report'.
7008 * TODO, doc/bison.1: Update English.
7009 * doc/bison.texinfo: Update English.
7010 (Understanding Your Parser, Bison Options): Document as
7011 `--report=lookahead' rather than `--report=look-ahead'.
7012 * src/conflicts.c: Update English in comments.
7013 (lookahead_set): Rename from look_ahead_set.
7014 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7015 (resolve_sr_conflict): Rename local look_ahead_tokens to
7016 lookahead_tokens, and update other uses.
7017 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7018 count_rr_conflicts, conflicts_free): Update uses.
7019 * src/getargs.c (report_args): Move "lookahead" before alternate
7020 spellings.
7021 (report_types): Update uses.
7022 (usage): For `--report' usage description, state `lookahead' spelling
7023 rather than `look-ahead'.
7024 * src/getargs.h (report.report_lookahead_tokens): Rename from
7025 report_look_ahead_tokens.
7026 * src/lalr.c: Update English in comments.
7027 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7028 (state_lookahead_tokens_count): Rename from
7029 state_look_ahead_tokens_count.
7030 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7031 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7032 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7033 Update other uses.
7034 Update English in output.
7035 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7036 * src/print.c: Update English in comments.
7037 (lookahead_set): Rename from look_ahead_set.
7038 (print_reduction): Rename argument lookahead_token from
7039 look_ahead_token.
7040 (print_core, state_default_rule, print_reductions, print_results):
7041 Update uses.
7042 * src/print_graph.c: Update English in comments.
7043 (print_core): Update uses.
7044 * src/state.c: Update English in comments.
7045 (reductions_new): Update uses.
7046 (state_rule_lookahead_tokens_print): Rename from
7047 state_rule_look_ahead_tokens_print, and update other uses.
7048 * src/state.h: Update English in comments.
7049 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7050 (state_rule_lookahead_tokens_print): Rename from
7051 state_rule_look_ahead_tokens_print.
7052 * src/tables.c: Update English in comments.
7053 (conflict_row, action_row): Update uses.
7054 * tests/glr-regression.at
7055 (Incorrect lookahead during deterministic GLR,
7056 Incorrect lookahead during nondeterministic GLR): Rename
7057 print_look_ahead to print_lookahead.
7058 * tests/torture.at: Update English in comments.
7059 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7060 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7061 (Many lookahead tokens): Update uses.
7062 * data/glr.c: Update English in comments.
7063 * lalr1.cc: Likewise.
7064 * yacc.c: Likewise.
7065 * src/conflicts.h: Likewise.
7066 * src/lalr.h: Likewise.
7067 * src/main.c: Likewise.
7068 * src/output.c: Likewise.
7069 * src/parse-gram.c: Likewise.
7070 * src/tables.h: Likewise.
7071 * tests/calc.at: Likewise.
7072
7073 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7074
7075 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7076
7077 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7078
7079 * TODO: Add request from Nelson H. F. Beebe to be able to install
7080 Bison without installing the yacc script.
7081
7082 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7083
7084 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7085 and yytext if they're already #define'd.
7086 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7087 * src/scan-code-c.c: ... here.
7088 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7089 <config.h>.
7090
7091 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7092
7093 Get Bison to build again when configured with --enable-gcc-warnings.
7094 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7095 missing #include's.
7096 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7097 loc argument as it shadows a global.
7098 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7099 invocation.
7100
7101 * src/.cvsignore: Add scan-code.c.
7102
7103 2006-06-07 Akim Demaille <akim@epita.fr>
7104
7105 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7106 to...
7107 * src/scan-code.l: here.
7108 * tests/input.at (Torturing the Scanner): Fix another location
7109 error.
7110
7111 2006-06-07 Akim Demaille <akim@epita.fr>
7112
7113 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7114
7115 2006-06-06 Akim Demaille <akim@epita.fr>
7116
7117 Extract the parsing of user actions from the grammar scanner.
7118 As a consequence, the relation between the grammar scanner and
7119 parser is much simpler. We can also split "composite tokens" back
7120 into simple tokens.
7121 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7122 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7123 rename as...
7124 * src/location.h, src/location.c (add_column_width)
7125 (location_compute): these.
7126 Fix the column count: the initial column is 0.
7127 (location_print): Be robust to ending column being 0.
7128 * src/location.h (boundary_set): New.
7129 * src/main.c: Adjust to scanner_free being renamed as
7130 gram_scanner_free.
7131 * src/output.c: Include scan-code.h.
7132 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7133 Use boundary_set.
7134 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7135 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7136 which is now, again, a separate token.
7137 Adjust all dependencies.
7138 Whereever actions with $ and @ are used, use translate_code.
7139 (action): Remove this nonterminal which is now useless.
7140 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7141 (grammar_current_rule_action_append): Use translate_code.
7142 (packgram): Bound check ruleno, itemno, and rule_length.
7143 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7144 (last_string, last_braced_code_loc, max_left_semantic_context)
7145 (scanner_initialize, scanner_free, scanner_last_string_free)
7146 (gram_out, gram_lineno, YY_DECL_): Move to...
7147 * src/scan-gram.h: this new file.
7148 (YY_DECL): Rename as...
7149 (GRAM_DECL): this.
7150 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7151 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7152 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7153 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7154 Move these declarations, and...
7155 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7156 these to...
7157 * src/flex-scanner.h: this new file.
7158 * src/scan-gram.l (rule_length, rule_length_overflow)
7159 (increment_rule_length): Remove.
7160 (last_braced_code_loc): Rename as...
7161 (gram_last_braced_code_loc): this.
7162 Adjust to the changes of the parser.
7163 Move all the handling of $ and @ into...
7164 * src/scan-code.l: here.
7165 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7166 (handle_action_dollar, handle_action_at): Move to...
7167 * src/scan-code.l: here.
7168 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7169 scan-code.h, scan-code-c.c, scan-gram.h.
7170 (EXTRA_bison_SOURCES): Add scan-code.l.
7171 (BUILT_SOURCES): Add scan-code.c.
7172 (yacc): Be robust to white spaces.
7173
7174 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7175 * tests/regression.at: Adjust the column numbers.
7176 * tests/regression.at: Adjust the error message.
7177
7178 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7179
7180 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7181 Use Akim's wording from
7182 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7183
7184 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7185
7186 Between Bison releases, manually append `+' to the previous Bison
7187 release number, and use that as a signal to automatically print the
7188 ChangeLog's CVS Id keyword from --version. Discussed starting at
7189 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7190 * ChangeLog: Add Id header.
7191 * configure.ac (AC_INIT): Append `+' to `2.3'.
7192 * src/.cvsignore: Add revision.c.
7193 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7194 (BUILT_SOURCES): Add revision.c.
7195 (revision.c): New target rule. This file defines a new global variable
7196 named revision. It initializes it with either the Id from ChangeLog
7197 or, if VERSION doesn't contain `+', with the empty string.
7198 * src/getargs.c (version): Print the value of revision.
7199 * src/revision.h: Extern revision.
7200
7201 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7202
7203 * NEWS: Version 2.3.
7204 * configure.ac (AC_INIT): Likewise.
7205
7206 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7207
7208 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7209 with no arguments, not as an object-like macro. This is for
7210 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7211 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7212 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7213 Document this.
7214
7215 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7216
7217 * src/getargs.c (usage): Back out yesterday's modification of the
7218 --help output so that we don't have to wait for translation before
7219 releasing 2.3.
7220
7221 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7222
7223 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7224 Problem reported by Akim Demaille.
7225
7226 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7227
7228 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7229
7230 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7231
7232 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7233 generated source code. Problem reported by Frans Englich in
7234 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7235
7236 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7237
7238 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7239 shell, not within 'make', so that 'make' by an ordinary builder
7240 (using GNU make) does not worry about configuring gzip. This also
7241 works around a bug reported independently by Keith Thompson and by
7242 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7243 stderr rather than stdout, messing up the build logs.
7244
7245 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7246
7247 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7248 to make sure that YYID will never be unused. This fixes a 'make
7249 maintainer-check' failure caused by the recent changes to the 'Trivial
7250 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7251 not used.
7252 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7253
7254 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7255
7256 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7257 state before an empty RHS is always resolved here. Only the location
7258 of that state is guaranteed to be resolved, and that's enough. This
7259 fixes the remaining bug reported by Derek M. Jones in
7260 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7261 * tests/glr-regression.at (Uninitialized location when reporting
7262 ambiguity): Test the above case.
7263 Also, the embedded comments in this test case claim it checks the case
7264 of an empty RHS that has inherited the initial location. However, the
7265 corresponding LHS was already resolved, so yyresolveLocations didn't
7266 actually have reason to modify it. Fix this by forcing
7267 nondeterministic operation at the beginning of the parse.
7268
7269 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7270
7271 * data/c.m4 (b4_yy_symbol_print_generate):
7272 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7273 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7274 of the bugs reported today by Derek M Jones in
7275 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7276 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7277 defined to be a type name without parens or brackets.
7278 (Location Type): Similarly for YYLTYPE.
7279 * tests/regression.at (Trivial grammars): Put in a test for this
7280 bug that will be caught by 'make maintainer-check' (though not,
7281 alas, by 'make check' unless your compiler is picky).
7282
7283 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7284
7285 * NEWS: Version 2.2.
7286 * configure.ac (AC_INIT): Likewise.
7287
7288 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7289
7290 * data/glr.c (yyreportTree): Make room in yystates for the state
7291 preceding the RHS. This fixes the segmentation fault reported by Derek
7292 M. Jones in
7293 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7294 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7295 to the user. Reported for yyreportTree by Derek M. Jones later in the
7296 same thread.
7297 * THANKS: Add Derek M. Jones.
7298 Update my email address.
7299 Fix typo in Steve Murphy's name.
7300
7301 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7302
7303 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7304 checking against YYLAST that caused the parser to miss a potential
7305 alternative in its diagnostic.
7306 Problem reported by Maria Jose Moron Fernandez in
7307 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7308 * data/lalr1.cc (yysyntax_error_): Likewise.
7309 * data/yacc.c (yysyntax_error): Likewise.
7310 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7311 tokens, in case we run into an older C compiler.
7312 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7313 Use them to check for the off-by-one error fixed above.
7314
7315 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7316 YYSIZE_T, not size_t.
7317 * tests/regression.at (Trivial grammars): New test, to catch
7318 the error fixed by the above patch.
7319
7320 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7321
7322 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7323 scheme.
7324 Reported by Steve Murphy.
7325
7326 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7327
7328 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7329 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7330
7331 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7332
7333 Implement --trace=m4.
7334 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7335 * src/output.c (output_skeleton): When set, pass -dV to m4.
7336
7337 Factor the handling of flags in m4.
7338 * src/output.c (prepare): Rename the muscle names debug, defines,
7339 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7340 * data/c.m4: Adjust.
7341 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7342 Use b4_define_flag_if to define other b4_FLAG_if macros.
7343 (b4_location_if): As a consequence, rename as...
7344 (b4_locations_if): this, for consistency.
7345 Adjust all the skeletons.
7346
7347 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7348
7349 * etc/bench.pm: Shorten bench names.
7350
7351 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7352
7353 * src/output.h, src/output.c (error_verbose): Move to...
7354 * src/getargs.h, src/getargs.c: here.
7355 Sort the flags.
7356 Adjust dependencies.
7357
7358 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7359
7360 * data/c.m4 (b4_copyright): Put the special exception for Bison
7361 skeletons here, so we don't have to put it in each skeleton. All
7362 uses changed. Suggested by Akim Demaille. Also, wrap the
7363 copyright notice, in case it is longer than 80 columns. Replace
7364 comma by newline after title.
7365
7366 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7367
7368 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7369 incompatibility, not a bug. Mention that it wasn't fixed as of
7370 flex 2.5.33.
7371
7372 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7373
7374 * examples/extexi: Enforce the precedence of concatenation over
7375 >>.
7376 Reported by Tommy Nordgren.
7377
7378 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7379
7380 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7381 with the member "token".
7382 Reported by Martin Nylin.
7383
7384 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7385
7386 * data/glr.c: Switch to Bison 2.2 special-exception language in
7387 the copyright notice. Use more-regular format for titles and
7388 copyright notices.
7389 * data/glr.cc: Likewise.
7390 * data/location.cc: Likewise.
7391 * data/yacc.cc: Likewise.
7392 * doc/bison.texinfo (Conditions): Document this.
7393 * NEWS: likewise. Upgrade version to 2.2.
7394
7395 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
7396
7397 * data/glr.cc: Remove dead code.
7398
7399 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7400
7401 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7402 that variable and the line breaks the bootstrap. Problem reported
7403 by Juan M. Guerrero.
7404
7405 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7406
7407 * doc/bison.texinfo (Multiple start-symbols): New.
7408
7409 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7410
7411 * etc/README, etc/bench.pl: New.
7412
7413 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
7414
7415 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7416 rule.
7417 Reported by Mickael Labau.
7418 * tests/input.at (Torturing the Scanner): Test it.
7419
7420 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7421
7422 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7423 Problem reported by Bob Rossi.
7424
7425 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7426
7427 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7428 and didn't really work.
7429 For the index, use @ifnotinfo, not @iftex.
7430 Minor cleanups of spacing and terminology.
7431
7432 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7433
7434 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7435 of AT_NAME_PREFIX when %name-prefix is not used.
7436
7437 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7438
7439 Apply --prefix to C++ skeletons too: they change the namespace.
7440 The test suite already exercize these cases.
7441 * data/c++.m4 (b4_namespace): New.
7442 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7443 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7444 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7445 * doc/bison.texinfo: Document it.
7446 (Option Cross Key): Use @multitable in all formats. It looks
7447 nicer, even in TeX outputs.
7448 (Rules): Use the same code whatever the output type is.
7449 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7450 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7451 * tests/calc.at: Use it, instead of hard coding `yy'.
7452
7453 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7454
7455 * TODO: Remove dead items.
7456
7457 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7458
7459 * doc/FAQ: Remove, merged into...
7460 * doc/bison.texinfo (FAQ): this.
7461 * doc/Makefile.am (EXTRA_DIST): Adjust.
7462
7463 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7464
7465 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7466 even if empty.
7467 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7468 * doc/bison.texinfo (Calc++ Scanner): Use it.
7469
7470 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
7471
7472 Fix two nits reported by twlevo, plus one more that I discovered.
7473
7474 * src/assoc.h (assoc_to_string): Give a name to the arg, as
7475 this is the usual Bison style.
7476 * src/location.h (location_print): Likewise.
7477
7478 * src/reader.h (token_name): Likewise.
7479
7480 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7481
7482 Fix some nits reported by twlevo.
7483 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7484 and "POSIX". Use more-modern syntax for URLs. Mention C++
7485 and ask for Java. Don't hardwire OS version numbers. Add
7486 copyright notice.
7487 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7488 * src/conflicts.c (solved_conflicts_obstack): Now static.
7489
7490 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
7491
7492 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7493 page. Say "you can use it" not "you may use it" as on the web page;
7494 we're describing capabilities not granting permission.
7495
7496 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7497
7498 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7499 shadowing warnings. Use usual patter for iterating through RHS.
7500 * tests/glr-regression.at
7501 (Uninitialized location when reporting ambiguity):
7502 Modify yylex so that it uses its argument, rather than trying
7503 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7504 const char -> char const.
7505
7506 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7507 Don't use tabs inside commands; it messes up 'ps'.
7508 Problem reported by twlevo.
7509
7510 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7511
7512 * tests/glr-regression.at (Uninitialized location when reporting
7513 ambiguity): New test case.
7514 * data/glr.c (yyresolveLocations): New function, which uses
7515 YYLLOC_DEFAULT.
7516 (yyresolveValue): Invoke yyresolveLocations before reporting an
7517 ambiguity.
7518 * doc/bison.texinfo (Default Action for Locations): Note
7519 YYLLOC_DEFAULT's usage for ambiguity locations.
7520 (GLR Semantic Actions): Cross-reference those notes.
7521
7522 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7523
7524 * tests/glr-regression.at (Leaked semantic values when reporting
7525 ambiguity): Remove unnecessary union and type declarations.
7526 (Leaked lookahead after nondeterministic parse syntax error): New test
7527 case.
7528 * data/glr.c (yyparse): Check for zero stacks remaining before
7529 attempting to shift the lookahead so that you don't lose it.
7530
7531 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7532
7533 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7534 * tests/glr-regression.at (Leaked semantic values when reporting
7535 ambiguity): New test case.
7536 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7537 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7538 now unnecessary yystackp parameter.
7539 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7540 destructors can be called.
7541
7542 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7543 in existing testcases.
7544
7545 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7546
7547 Don't leak semantic values for parent RHS when a user action cuts the
7548 parser, and clean up related code a bit.
7549 * tests/glr-regression.at (Leaked merged semantic value if user action
7550 cuts parse): Rename to...
7551 (Leaked semantic values if user action cuts parse): ... this. Add check
7552 for leaked parent RHS values.
7553 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7554 between an unresolved state (non-empty chain of semantic options) and
7555 an incomplete one (signaled by an empty chain).
7556 (yyresolveStates): Document the interface. Move all manipulation of a
7557 successfully or unsuccessfully resolved yyGLRState to...
7558 (yyresolveValue): ... here so that yyresolveValue always leaves a
7559 yyGLRState with consistent data and thus is easier to understand.
7560 Remove the yyvalp and yylocp parameters since they are always just
7561 taken from the yys parameter. When reporting a discarded merged value
7562 in debugging output, note that it is incompletely merged. Document the
7563 interface.
7564 (yyresolveAction): If resolving any of the RHS states fails, destroy
7565 them all rather than leaking them. Thus, as long as user actions are
7566 written to clean up the RHS correctly, yyresolveAction always cleans up
7567 the RHS of a semantic option. Document the interface.
7568
7569 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7570
7571 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7572 led to a segmentation fault in GNU Pascal. Problem reported
7573 by Waldek Hebisch.
7574
7575 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7576
7577 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7578 mid-rule action inside a nonterminal symbol in order to declare a
7579 destructor for its semantic value.
7580
7581 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7582
7583 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7584 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7585 __cplusplus && ! defined _STDLIB_H && !
7586 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7587 defined free))]: Include <stdlib.h> rather than rolling our own
7588 declarations of malloc and free, to avoid problems with
7589 incompatible declarations (using 'throw') C++'s stdlib.h. This
7590 should fix Debian bug 340012
7591 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7592 reported by Guillaume Melquiond.
7593
7594 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7595
7596 * NEWS: Clarify symbols versus types in unused-value warnings.
7597
7598 * configure.ac (AC_INIT): Bump version number.
7599
7600 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7601
7602 * NEWS: Version 2.1a.
7603 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7604 since C99 requires this.
7605
7606 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7607
7608 * m4/c-working.m4: New file.
7609 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7610
7611 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7612
7613 * Makefile.maint: Merge from coreutils.
7614
7615 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7616
7617 More portability fixes for problems summarized by Nelson H. F. Beebe.
7618
7619 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7620 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7621 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7622 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7623 messes up because C++ code is compiled in 32-bit mode but linked
7624 in 64-bit mode.
7625
7626 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7627
7628 More portability fixes for problems summarized by Nelson H. F. Beebe.
7629
7630 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7631 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7632
7633 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7634 nodist_PROGRAMS, since we don't need to actually compile the
7635 example if we're just doing a plain 'make'. This avoids bothering
7636 the installer unnecessarily about problems due to weird C++
7637 compilers.
7638
7639 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7640
7641 More portability fixes for problems summarized by Nelson H. F. Beebe.
7642
7643 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7644 than #include "...", and compile with -I'.'. The old method was
7645 not portable, according to Posix and the C standard, and it does
7646 not work with Sun C 5.7, where previous #line directives affect
7647 the working directory used in later #include "..." directives.
7648
7649 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7650
7651 Various DJGGP specific issues in /djgpp
7652
7653 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7654
7655 More portability fixes for problems summarized by Nelson H. F. Beebe.
7656
7657 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7658 '#include <map>' works and that you can apply ++ to iterators.
7659
7660 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7661
7662 Work around portability problems summarized by Nelson H. F. Beebe in
7663 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7664
7665 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7666 that '#include <string>' works.
7667
7668 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7669 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7670 "warning: sorry: semantics of inline function static data `const
7671 unsigned char translate_table[262]' are wrong (you'll wind up with
7672 multiple copies)".
7673
7674 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7675 or, xor to not_, and_, or_, and xor_, respectively. This works
7676 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7677 random system header somewhere that includes the equivalent of
7678 <iso646.h>.
7679
7680 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7681 -E" works; it apparently doesn't work with PathScale EKO Compiler
7682 Suite Version 2.0.
7683
7684 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7685
7686 During deterministic GLR operation, user actions should be able to
7687 influence the parse by changing yychar. To make this easier to fix and
7688 to make glr.c easier to evolve in general, don't maintain yytoken in
7689 parallel with yychar; just compute yytoken when needed.
7690 * tests/glr-regression.at (Incorrect lookahead during deterministic
7691 GLR): Check that setting yychar in a user action has the intended
7692 effect.
7693 * data/glr.c (yyGLRStack): Remove yytokenp member.
7694 (yyclearin): Don't set *yytokenp.
7695 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7696 yychar rather than *yytokenp to determine the current lookahead.
7697 Compute yytoken locally when needed.
7698 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7699 point to.
7700
7701 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7702 after `--report' documentation.
7703
7704 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7705
7706 * src/parse-gram.y (grammar_declaration): Location of printer
7707 symbol is @1, not list->location. Bug reported by twlevo.
7708 * tests/input.at (Incompatible Aliases): Adjust to above change.
7709
7710 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7711
7712 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7713 all the test at once. This makes the output easier to read in the
7714 normal case.
7715
7716 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7717 got from <http://bro-ids.org/download.html>. The bug is that
7718 when two actions appeared in succession, the second one was
7719 scanned before the first one was added to the grammar rule
7720 as a midrule action. Bison then output the incorrect warning
7721 "parse.y:905.17-906.36: warning: unused value: $3".
7722 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7723 associated with a value.
7724 (rhs): Don't invoke grammar_current_rule_action_append.
7725 (action): Invoke it here instead.
7726 * src/reader.c (grammar_midrule_action): Now extern.
7727 (grammar_current_rule_action_append): Don't invoke
7728 grammar_midrule_action; that is now the scanner's job.
7729 * src/reader.h (last_string, last_braced_code_loc):
7730 (grammar_midrule_action): New decls.
7731 * src/scan-gram.l (last_string): Now extern, sigh.
7732 (last_braced_code_loc): New extern variable.
7733 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7734 rule already has an action.
7735 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7736 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7737 Add some tests to check that the above changes fixed the bug.
7738
7739 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7740
7741 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7742 All used changed. Check whether the symbol has a destructor,
7743 not whether it is typed.
7744 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7745 that the values are still reported as unused. All line numbers
7746 adjusted.
7747
7748 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7749
7750 Work around a bug in bro 0.8, which underparenthesizes its
7751 definition of YYLLOC_DEFAULT.
7752 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7753 their arguments.
7754 * data/lalr1.cc: Likewise.
7755 * data/yacc.cc: Likewise.
7756
7757 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7758
7759 Work around a bug in Pike 7.0, and give the Pike folks a
7760 better way to override the usual int widths.
7761 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7762 user can override the types.
7763 (short): #undef, to work around a bug in Pike 7.0.
7764 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7765 (union yyalloc.yyss): Use yytype_int16 rather than short.
7766 All uses changed.
7767 (yysigned_char): Remove.
7768 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7769 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7770 * tests/regression.at (Web2c Actions): Adjust to above changes.
7771
7772 * src/reader.c (check_and_convert_grammar): New function.
7773 (reader): Close the input file even if something went wrong during
7774 parsing. Minor file descriptor leak reported by twlevo.
7775
7776 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7777 to pacify gcc -Wswitch-default.
7778 * src/scan-gram.l (adjust_location): Use a default: break; case
7779 to pacify gcc -Wswitch-default.
7780 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7781 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7782 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7783 Move these decls to scan-skel.l, since they don't need to be
7784 visible elsewhere.
7785 * src/scan-skel.l: Accept the above decls.
7786 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7787 is used.
7788
7789 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7790
7791 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7792 since we don't want to insist on a version number at the start
7793 of the changelog every time.
7794 * Makefile.maint: Sync from coreutils a bit better.
7795 (sc_trailing_blank): Renamed from sc_trailing_space.
7796 All uses changed.
7797 (sc_no_if_have_config_h, sc_require_config_h):
7798 (sc_prohibit_assert_without_use): New rules.
7799 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7800 (sc_dd_max_sym_length): Fix leading spaces in rule.
7801 (sc_system_h_headers): Prefix with @.
7802 (sc_useless_cpp_parens, m4-check): Output line numbers.
7803 (changelog-check): Allow version only in head.
7804 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7805 satisfy new Makefile.maint rule.
7806 * data/glr.c: Likewise.
7807 * data/glr.cc: Likewise.
7808 * data/lalr1.cc: Likewise.
7809 * data/yacc.c: Likewise.
7810 * lib/ebitsetv.c: Likewise.
7811 * lib/lbitset.c: Likewise.
7812 * lib/subpipe.c: Likewise.
7813 * lib/timevar.c: Likewise.
7814 * src/system.h: Likewise.
7815 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7816 * djgpp/Makefile.maint: Add copyright notice.
7817 * djgpp/README.in: Likewise.
7818 * djgpp/config.bat: Likewise.
7819 * djgpp/config.site: Likewise.
7820 * djgpp/config_h.sed: Likewise.
7821 * djgpp/djunpack.bat: Likewise.
7822 * djgpp/config.sed: Fix copyright notice to match standard format.
7823 * djgpp/subpipe.h: Likewise.
7824 * lib/bitsetv-print.c: Likewise.
7825 * lib/bitsetv.c: Likewise.
7826 * lib/subpipe.h: Likewise.
7827 * lib/timevar.c: Likewise.
7828 * lib/timevar.h: Likewise.
7829 * djgpp/subpipe.c: Use standard recipe for config.h.
7830 * lib/abitset.c: Likewise.
7831 * lib/bitset.c: Likewise.
7832 * lib/bitset_stats.c: Likewise.
7833 * lib/bitsetv-print.c: Likewise.
7834 * lib/bitsetv.c: Likewise.
7835 * lib/ebitsetv.c: Likewise.
7836 * lib/get-errno.c: Likewise.
7837 * lib/lbitset.c: Likewise.
7838 * lib/subpipe.c: Likewise.
7839 * lib/timevar.c: Likewise.
7840 * lib/vbitset.c: Likewise.
7841 * tests/local.at: Likewise.
7842 * src/scan-gram.l: Don't include verify.h, since system.h does
7843 that for us.
7844 * .x-sc_require_config_h: New file.
7845 * .x-sc_unmarked_diagnostics: New file.
7846
7847 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
7848
7849 Be a bit more systematic about using 'abort'.
7850 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7851 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7852 Put 'default: abort ();' before some other case, to satisfy older
7853 pedantic compilers.
7854 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7855 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
7856 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
7857 * src/conflicts.c (resolve_sr_conflict): Likewise.
7858 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
7859 (get_decision_str, get_orientation_str, get_node_alignment_str):
7860 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
7861 (get_linestyle_str, get_arrowstyle_str): Likewise.
7862 * src/conflicts.c (resolve_sr_conflict):
7863 Use a default case rather than one for the one remaining enum
7864 value, to catch invalid enum values as well.
7865 * src/lalr.c (set_goto_map, map_goto):
7866 Prefer "assert (FOO);" to "if (!FOO) abort ();".
7867 * src/nullable.c (nullable_compute, token_definitions_output):
7868 Likewise.
7869 * src/reader.c (packgram, reader): Likewise.
7870 * src/state.c (transitions_to, state_new, state_reduction_find):
7871 Likewise.
7872 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
7873 (symbol_pack): Likewise.
7874 * src/tables.c (conflict_row, pack_vector): Likewise.
7875 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
7876 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
7877 * src/system.h: Don't include <assert.h>.
7878 (assert): New macro.
7879
7880 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
7881 (Destructor Decl, Parser Function, Pure Calling):
7882 Describe rules for braces inside C code more carefully.
7883
7884 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
7885
7886 Fix some porting glitches found by Nelson H. F. Beebe.
7887 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
7888 compilers that don't understand that abort () does not return.
7889 * src/state.c (transitions_to): Likewise.
7890 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7891 that '#include <cstdlib>' works.
7892 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
7893 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
7894 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
7895 for the benefit of some pre-C99 compilers.
7896
7897 * bootstrap: Undo changes to gnulib files that autoreconf made.
7898
7899 Minor fixups to get 'make maintainer-check' to work.
7900 * configure.ac: Don't use -Wnested-externs, as it's incompatible
7901 with the new verify.h implementation.
7902 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
7903 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
7904 * data/yacc.c (YYUSE): Likewise.
7905 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
7906 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
7907 * src/parse-gram.y (declaration): Don't pass a string constant
7908 to a function that expects char *, since GCC might complain
7909 about the constant value.
7910 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
7911 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
7912 before #defining them.
7913 * tests/glr-regression.at
7914 (Incorrectly initialized location for empty right-hand side in GLR):
7915 In yyerror, use the msg arg.
7916 (Corrupted semantic options if user action cuts parse):
7917 (Incorrect lookahead during deterministic GLR):
7918 (Incorrect lookahead during nondeterministic GLR):
7919 Don't name a local var 'index'; it shadows string.h's 'index'.
7920
7921 2006-01-19 Akim Demaille <akim@epita.fr>
7922
7923 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
7924 location, not just parts of it.
7925
7926 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
7927
7928 * NEWS: Document the fact that multiple %unions are now allowed.
7929 * doc/bison.texinfo (Union Decl): Likewise.
7930 * TODO: This feature is now implemented, so remove it from
7931 the wishlist.
7932
7933 * Makefile.maint: Merge with coreutils Makefile.maint.
7934 (CVS_LIST): Use build-aux version if available.
7935 (VERSION_REGEXP): New macro.
7936 (syntax-check-rules): Add sc_no_if_have_config_h,
7937 sc_prohibit_assert_without_use, sc_require_config_h,
7938 sc_useless_cpp_parens.
7939 (sc_obsolete_symbols): Check for O_NDELAY.
7940 (sc_dd_max_sym_length): Track coreutils.
7941 (sc_unmarked_diagnostics): Look in all files, not just *.c.
7942 (sc_useless_cpp_parens): New rule.
7943 (news-date-check): Look for version or today's date.
7944 (changelog-check): Don't require version number near head.
7945 (copyright-check): Use current year instead of hardwiring 2005.
7946 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
7947 (announcement): Add --gpg-key-ID.
7948
7949 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
7950 with "file system".
7951
7952 Avoid undefined behavior that addressed just before the start of an
7953 array. Problem reported by twlevo.
7954 * src/reader.c (packgram): Prepend a new sentinel before ritem.
7955 * src/lalr.c (build_relations): Rely on new sentinel.
7956 * src/gram.c (gram_free): Adjust to new sentinel.
7957
7958 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
7959
7960 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
7961 yylookaheadNeeds. All uses updated.
7962 (yysplitStack): Rename local yynewLookaheadStatuses to
7963 yynewLookaheadNeeds.
7964 * data/glr-regression.at (Incorrect lookahead during nondeterministic
7965 GLR): In comments, change `lookahead status' to `lookahead need'.
7966
7967 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7968
7969 * data/glr.c (yysplitStack): A little stylistic rewrite.
7970
7971 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7972
7973 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
7974
7975 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
7976
7977 * doc/bison.texinfo: Fix some typos.
7978 (GLR Semantic Actions): New subsection discussing special
7979 considerations because GLR semantic actions might be deferred.
7980 (Actions): Mention look-ahead usage of yylval.
7981 (Actions and Locations): Mention look-ahead usage of yylloc.
7982 (Special Features for Use in Actions): Add YYEOF entry and mention it
7983 in the yychar entry.
7984 In the yychar entry, remove mention of the local yychar case (pure
7985 parser) since this is irrelevant information when writing semantic
7986 actions and since it's already discussed in `Table of Symbols' where
7987 yychar is otherwise described as an external variable.
7988 In the yychar entry, don't call it the `current' look-ahead since it
7989 isn't when semantic actions are deferred.
7990 In the yychar and yyclearin entries, add note about deferred semantic
7991 actions.
7992 Add yylloc and yylval entries discussing look-ahead usage.
7993 (Look-Ahead Tokens): When discussing yychar, don't call it the
7994 `current' look-ahead, and do mention yylval and yylloc.
7995 (Error Recovery): Cross-reference `Action Features' when mentioning
7996 yyclearin.
7997 (Table of Symbols): In the yychar entry, don't call it the `current'
7998 look-ahead.
7999 In the yylloc and yylval entries, mention look-ahead usage.
8000
8001 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8002
8003 * tests/glr-regression.at: Update copyright year to 2006.
8004
8005 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8006
8007 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8008 use during nondeterministic operation to track which stacks have
8009 actually needed the current lookahead.
8010 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8011 Allocate, deallocate, resize, and otherwise shuffle space for
8012 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8013 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8014 appropriately during nondeterministic operation.
8015 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8016 members to store the current lookahead to be used by the deferred
8017 user action.
8018 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8019 from which the RHS is taken. Set the lookahead members of the new
8020 yySemanticOption according to the lookahead status for stack yyk.
8021 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8022 yyaddDeferredAction.
8023 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8024 members of yySemanticOption before invoking yyuserAction, and then set
8025 them back to their current values afterward.
8026 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8027 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8028 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8029 titles for consistency.
8030 (Leaked merged semantic value if user action cuts parse): In order to
8031 suppress lint warnings, use arguments in merge function, and assign
8032 char value < 128 in main.
8033 (Incorrect lookahead during deterministic GLR): New test case.
8034 (Incorrect lookahead during nondeterministic GLR): New test case.
8035
8036 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8037
8038 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8039 !yyvaluep as signal that no semantic value is available to print.
8040 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8041 to print a semantic value.
8042
8043 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8044
8045 * tests/glr-regression.at: For consistency with my newer test cases,
8046 don't thank myself.
8047
8048 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8049
8050 * data/glr.c (yyresolveValue): When merging semantic options, if at
8051 least one user action succeeds but a later one cuts the parse, then
8052 destroy the semantic value before returning rather than leaking it.
8053 (yyresolveStates): If a user action cuts the parse and thus
8054 yyresolveValue fails, ignore the (unset) semantic value rather than
8055 corrupting the yyGLRState, and empty the semantic options list since
8056 the user actions should have called all necessary destructors.
8057 Simplify code with YYCHK.
8058 * tests/glr-regression.at (Corrupted semantic options if user action
8059 cuts parse): New test case.
8060 (Undesirable destructors if user action cuts parse): New test case.
8061 Before applying any of this patch, this test case never actually failed
8062 for me... but only because the corrupted semantic options usually
8063 masked this bug.
8064 (Leaked merged semantic value if user action cuts parse): New test
8065 case.
8066
8067 2006-01-05 Akim Demaille <akim@epita.fr>
8068
8069 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8070
8071 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8072
8073 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8074 _MSC_VER. Problem reported by Cenzato Marco.
8075 (b4_c_function_def): Use it.
8076 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8077 b4_c_modern.
8078 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8079 than rolling our own.
8080
8081 2006-01-04 Akim Demaille <akim@epita.fr>
8082
8083 Also warn about non-used mid-rule values.
8084 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8085 member.
8086 (symbol_list_new): Adjust.
8087 * src/reader.c (symbol_typed_p): New.
8088 (grammar_rule_check): Use it.
8089 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8090 Check its rule.
8091 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8092 Use it.
8093 * tests/actions.at (Exotic Dollars): Adjust.
8094
8095 2006-01-04 Akim Demaille <akim@epita.fr>
8096
8097 * src/reader.c (grammar_midrule_action): If $$ is set in a
8098 mid-rule, move the `used' bit to its lhs.
8099 * tests/input.at (Unused values): New.
8100 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8101
8102 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8103
8104 * doc/bison.texinfo (Bison Options): Say more accurately what
8105 --yacc does.
8106 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8107 about declarations in the grammar when in Yacc mode, as POSIX does
8108 not require a diagnostic when the grammar uses extensions.
8109
8110 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8111
8112 Warn about dubious constructions like "%token T T".
8113 Reported by twlevo.
8114 * src/symtab.h (struct symbol.declared): New member.
8115 * src/symtab.c (symbol_new): Initialize it to false.
8116 (symbol_class_set): New arg DECLARING, specifying whether
8117 this is a declaration that we want to warn about, if there
8118 is more than one of them. All uses changed.
8119
8120 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8121 Allow multiple %union directives, whose contents concatenate.
8122 * src/parse-gram.y (grammar_declaration): Likewise.
8123 Use muscle_code_grow, so that we don't need stype_line any more.
8124 All uses changed.
8125
8126 * src/muscle_tab.c (muscle_grow): Fix comment.
8127
8128 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8129 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8130 Update copyright year to 2006.
8131
8132 2006-01-03 Akim Demaille <akim@epita.fr>
8133
8134 Have glr.cc pass (some of) the calc.at tests.
8135 * data/glr.cc (b4_parse_param_orig): New.
8136 (b4_parse_param): Improve its definition, and bound it more
8137 clearly in the skeleton.
8138 (b4_epilogue): Append, instead of prepending, in order to keep
8139 #line consistency.
8140 Simplify the generation of auxiliary functions: locations and
8141 purity are mandated.
8142 (b4_global_tokens_and_yystype): Honor it.
8143 * data/location.cc (c++.m4): Don't include it.
8144 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8145 and AT_SKEL_CC_IF.
8146 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8147 AT_LALR1_CC_IF.
8148 Be sure to initialize the first position's filename.
8149 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8150 mandated anyway.
8151 (AT_CHECK_CALC_GLR_CC): New.
8152 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8153
8154 2006-01-02 Akim Demaille <akim@epita.fr>
8155
8156 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8157 c.m4.
8158 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
8159 * data/glr.cc: Do not include stack.hh.
8160
8161 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8162
8163 * data/glr.c: Reformat whitespace with tabs.
8164 (b4_lpure_formals): Remove this unused m4 macro.
8165 * tests/cxx-type.at: Reformat whitespace with tabs.
8166 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8167 since it's a member. Rename type to isNterm for clarity.
8168
8169 2005-12-29 Akim <akim@sulaco.local>
8170
8171 Let glr.cc catch up with symbol_value_print.
8172 * data/glr.cc (b4_yysymprint_generate): Replace by...
8173 (b4_yy_symbol_print_generate): this.
8174 (yy_symbol_print, yy_symbol_value_print): Declare them.
8175
8176 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8177
8178 * src/location.h (boundary): Note that a line or column equal
8179 to INT_MAX indicates an overflow.
8180 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8181 (rule_length_overflow, increment_rule_length, add_column_width):
8182 New functions.
8183 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8184 (<SC_BRACED_CODE>"}"):
8185 Use increment_rule_length rather than incrementing it by hand.
8186 (adjust_location, handle_syncline): Diagnose overflow.
8187 (handle_action_dollar, handle_action_at):
8188 Fix bug with monstrosities like $-2147483648.
8189 Remove now-unnecessary checks.
8190 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8191 (convert_ucn_to_byte): Verify assumptions.
8192 (handle_syncline): New arg LOC. All callers changed.
8193 Don't store through a value derived from char const * pointer.
8194
8195 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8196 GCC warnings.
8197
8198 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8199
8200 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8201 Remove unnecessary forward static decls.
8202
8203 2005-12-27 Akim Demaille <akim@epita.fr>
8204
8205 * src/reader.c (grammar_current_rule_check): Also check that $$
8206 is used.
8207 Take the rule to check as argument, hence rename as...
8208 (grammar_rule_check): this.
8209 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8210 Rename as...
8211 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8212 (grammar_midrule_action, grammar_symbol_append): Now static.
8213 * tests/torture.at (input): Don't rely on the default action
8214 being always performed.
8215 * tests/calc.at: "Set" $$ even when the action is "cut" with
8216 YYERROR or other.
8217 * tests/actions.at (Exotic Dollars): Instead of using unused
8218 values, check that the warning is issued.
8219
8220 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8221
8222 * NEWS: Improve wording for unused-value warnings.
8223
8224 2005-12-22 Akim Demaille <akim@epita.fr>
8225
8226 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8227 (b4_yysymprint_generate): Rename as...
8228 (b4_yy_symbol_print_generate): this.
8229 Generate yy_symbol_print instead of yysymprint.
8230 Generate also yy_symbol_value_print, and use it.
8231
8232 2005-12-22 Akim Demaille <akim@epita.fr>
8233
8234 * NEWS: Warn about unused values.
8235 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8236 a `used' member.
8237 (symbol_list_n_get, symbol_list_n_used_set): New.
8238 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8239 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8240 * src/reader.c (grammar_current_rule_check): Check that values are
8241 used.
8242 * src/symtab.c (symbol_print): Accept 0.
8243 * tests/existing.at: Remove the type information.
8244 Empty the actions.
8245 Remove useless actions (beware of mid-rule actions: perl -000
8246 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8247 * tests/actions.at (Exotic Dollars): Use unused values.
8248 * tests/calc.at: Likewise.
8249 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8250 Likewise.
8251
8252 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8253 rule_useful_p.
8254
8255 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8256
8257 Undo 2005-12-01 tentative license wording change. The wording is
8258 still being reviewed by the lawyers, and we don't want to wait for
8259 them before publishing a test release. For now, revert to the
8260 previous wording.
8261 * NEWS: Undo 2005-12-01 change.
8262 * data/glr.c: Revert to previous license wording.
8263 * data/glr.cc: Likewise.
8264 * data/lalr1.cc: Likewise.
8265 * data/location.cc: Likewise.
8266 * data/yacc.c: Likewise.
8267
8268 * NEWS: Reword %destructor vs YYABORT etc.
8269 * data/glr.c: Use American spacing, for consistency.
8270 * data/glr.cc: Likewise.
8271 * data/lalr1.cc: Likewise.
8272 * data/yacc.c: Likewise.
8273 * data/yacc.c: Reformat comments slightly.
8274 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8275 for consistency. Fix some spelling errors and reword recently-included
8276 text slightly.
8277 * tests/cxx-type.at: Cast results of malloc, for C++.
8278
8279 2005-12-21 Joel E. Denny <address@hidden>
8280
8281 * tests/cxx-type.at: Construct a tree, count the parents of shared
8282 nodes, and free each node once and only once. Previously, the memory
8283 for semantic values was leaked instead.
8284
8285 2005-12-21 Joel E. Denny <address@hidden>
8286
8287 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8288 (yylval, yylloc): If pure, #define to yystackp->yyval and
8289 yystackp->yyloc similar to yychar and yynerrs.
8290 (yyparse): If pure, remove local yylval and yylloc. Add local
8291 yystackp to accommodate pure definitions of yylval and yylloc.
8292 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8293 yylvalp and yyllocp to &yylval and &yylloc.
8294 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8295 namespace. Previously, nerrs and char were missing, but lval and lloc
8296 weren't necessary.
8297 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8298 yylvalp and yyllocp parameters since, if pure, these are now always
8299 accessible through yystackp. If not pure, they are still accessible
8300 globally.
8301 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8302 `if (YYID (N))' to pacify lint.
8303
8304 2005-12-21 Akim Demaille <akim@epita.fr>
8305
8306 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8307 destroy the RHS symbols of a rule.
8308 * data/yacc.c (yylen): Initialize to 0.
8309 Keep its value to the number of items to possibly shift.
8310 In particular, a regular successful parse that ends on YYFINAL by
8311 a (internal) YYACCEPT must not have yylen != 0.
8312 (yyerrorlab, yyreturn): Pop the RHS.
8313 Reorder a bit to emphasize the `shifting' bits of code.
8314 (YYPOPSTACK): Now accept a number of items to pop.
8315 * data/lalr1.cc: Likewise.
8316 * data/glr.c: Formatting changes.
8317 Use goto instead of fall through.
8318 * doc/bison.texinfo (Destructor Decl): Complete.
8319
8320 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8321
8322 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8323 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8324 * djgpp/config.bat: Replace every occurence of the file name
8325 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8326 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8327 * djgpp/config.sed: Replace every occurence of the file name
8328 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8329 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8330 * djgpp/djunpack.bat: DJGPP specific file.
8331 * djgpp/fnchange.lst: DJGPP specific file.
8332 * djgpp/README.in: Add new information about how to unpack the bison
8333 source on MSDOS and other systems which have 8.3 file name restrictions
8334 using djunpack.bat and fnchange.lst.
8335
8336 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8337
8338 * bootstrap (build_cvs_prefix): Remove; unused.
8339 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8340 when getting gnulib.
8341
8342 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8343
8344 * data/glr.c: Reorder typedef declarations for structs to match order
8345 of struct declarations.
8346 Rename yystack everywhere to yystackp except in yyparse where it's not
8347 a pointer.
8348 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8349 consistency.
8350 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8351 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8352 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8353 lint.
8354
8355 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8356
8357 * tests/sets.at (Accept): Fix typos in regular expression used to
8358 sed out the final state number.
8359
8360 Work around portability problem on Solaris 10: flex-generated
8361 files include <stdio.h> before <config.h>, which messes up
8362 because the latter defines __EXTENSIONS__. Address the problem
8363 by creating two new little files that include <config.h> first,
8364 then include the flex-generated files. Rewrite everyone else
8365 to include <config.h> first, as well.
8366 * lib/timevar.c: Always include "config.h".
8367 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8368 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8369 (EXTRA_bison_SOURCES): New macro.
8370 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8371 * src/system.h: Don't include config.h.
8372 * src/LR0.c: Include <config.h> first.
8373 * src/assoc.c: Likewise.
8374 * src/closure.c: Likewise.
8375 * src/complain.c: Likewise.
8376 * src/conflicts.c: Likewise.
8377 * src/derives.c: Likewise.
8378 * src/files.c: Likewise.
8379 * src/getargs.c: Likewise.
8380 * src/gram.c: Likewise.
8381 * src/lalr.c: Likewise.
8382 * src/location.c: Likewise.
8383 * src/main.c: Likewise.
8384 * src/muscle_tab.c: Likewise.
8385 * src/nullable.c: Likewise.
8386 * src/output.c: Likewise.
8387 * src/parse-gram.y: Likewise.
8388 * src/print.c: Likewise.
8389 * src/print_graph.c: Likewise.
8390 * src/reader.c: Likewise.
8391 * src/reduce.c: Likewise.
8392 * src/relation.c: Likewise.
8393 * src/state.c: Likewise.
8394 * src/symlist.c: Likewise.
8395 * src/symtab.c: Likewise.
8396 * src/tables.c: Likewise.
8397 * src/uniqstr.c: Likewise.
8398 * src/vcg.c: Likewise.
8399
8400 * src/parse-gram.y: Fix minor problems uncovered by lint.
8401 (current_lhs, current_lhs_location): Now static.
8402 (current_assoc): Remove unused variable.
8403
8404 Cleanups so that Bison-generated parsers have less lint.
8405 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8406 Prepend /*ARGSUSED*/, for lint's sake.
8407 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8408 definition if 'lint' is defined.
8409 (YYID): New macro (or function, if lint).
8410 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8411 * data/yacc.c: Likewise.
8412 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8413 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8414 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8415 is C++ only.
8416 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8417 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8418 Use YYID(0) rather than 0, for lint.
8419 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8420 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8421
8422 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8423
8424 * tests/glr-regression.at
8425 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8426 Close memory leak reported by twlevo.
8427
8428 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8429
8430 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8431 all stacks.
8432 (yyparse): Iterate another stack in order to call user destructors.
8433 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8434 New test case.
8435 (Duplicated user destructor for lookahead): This test now is expected
8436 to succeed.
8437
8438 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8439
8440 * NEWS: Document the following change.
8441 * data/yacc.c: Say "parser skeleton" rather than "file", since
8442 it's no longer just a file.
8443 * data/glr.c: Grant a special exception for C GLR parsers, that
8444 reads like the already-existing exception for C LALR(1) parsers.
8445 * data/glr.cc: Likewise.
8446 * data/lalr1.cc: Likewise.
8447 * data/location.cc: Likewise.
8448 * data/yacc.c: Reword the "written by" statement to clarify that
8449 it was the parser skeleton, not the entire output file.
8450 * data/glr.c: Written by Paul Hilfinger.
8451 * data/glr.cc: Written by Akim Demaille.
8452 * data/lalr1.cc: Likewise.
8453
8454 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8455
8456 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8457 Fix typos in previous change that broke 'make check'.
8458 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8459 supported in C.
8460 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8461 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8462 We can revert this once things settle down.
8463
8464 * src/conflicts.c (conflicts_print): Don't print file name twice
8465 when %expect fails because there were no conflicts.
8466 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8467 change.
8468 * tests/conflicts.at (%expect not enough, %expect too much):
8469 (%expect with reduce conflicts): Adjust to new behavior.
8470
8471 2005-11-18 Akim Demaille <akim@epita.fr>
8472
8473 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8474 errors.
8475 * NEWS: Document this.
8476 * doc/bison.texinfo (Expect Decl): Likewise.
8477
8478 2005-11-16 Akim Demaille <akim@epita.fr>
8479
8480 Generalize the display of semantic values and locations in traces.
8481 * data/glr.c (yy_reduce_print): Fix indices (again).
8482 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8483 literal integers.
8484 * data/lalr1.cc (yyreduce_print): Rename as...
8485 (yy_reduce_print): this.
8486 Display values and locations.
8487 * data/yacc.c (yy_reduce_print): Likewise.
8488 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8489 (yysymprint): Move higher to be visible from yy_reduce_print).
8490 (yyparse): Adjust.
8491 * tests/calc.at: Adjust the expected length of the traces.
8492
8493 2005-11-14 Akim Demaille <akim@epita.fr>
8494
8495 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8496 from 1 to N, while values and location start at 0.
8497 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8498
8499 2005-11-14 Akim Demaille <akim@epita.fr>
8500
8501 * data/glr.c (yy_reduce_print): Fix the $ number.
8502
8503 2005-11-14 Akim Demaille <akim@epita.fr>
8504
8505 "Use" parse parameters.
8506 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8507 * data/glr.c, data/glr.cc: Use them.
8508 * data/glr.c (YYUSE): Have a C++ definition that supports
8509 non-pointer types.
8510
8511 2005-11-14 Akim Demaille <akim@epita.fr>
8512
8513 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8514
8515 2005-11-14 Akim Demaille <akim@epita.fr>
8516
8517 * data/glr.cc: New.
8518 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
8519
8520 2005-11-12 Akim Demaille <akim@epita.fr>
8521
8522 Let position and location be PODs.
8523 * data/location.cc (position::initialize, location::initialize): New.
8524 (position::position, location::location): Define only if
8525 b4_location_constructors is defined.
8526 * data/lalr1.cc (b4_location_constructors): Define it for backward
8527 compatibility.
8528 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8529
8530 2005-11-12 Akim Demaille <akim@epita.fr>
8531
8532 * data/lalr1.cc: Move the body of the ctor and dtor into the
8533 parser file (instead of the header).
8534 Wrap the implementations in a "namespace yy".
8535
8536 2005-11-12 Akim Demaille <akim@epita.fr>
8537
8538 Have glr.c include its header file when created.
8539 * data/glr.c (b4_shared_declarations): New.
8540 Output them verbatim in the parser if !%defines, otherwise
8541 output then in the header file, and include it instead.
8542
8543 2005-11-11 Akim Demaille <akim@epita.fr>
8544
8545 * data/glr.c: Comment changes.
8546
8547 2005-11-11 Akim Demaille <akim@epita.fr>
8548
8549 When yydebug, report semantic and location values for reductions.
8550 * data/glr.c (yy_reduce_print): Report the semantic values and the
8551 locations.
8552 (YY_REDUCE_PRINT): Adjust.
8553 (yyglrReduce): Use them.
8554 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8555 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8556 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8557 traces.
8558
8559 2005-11-10 Akim Demaille <akim@epita.fr>
8560
8561 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8562 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8563 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8564
8565 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8566
8567 * m4/cxx.m4, examples/Makefile.am: Don't build
8568 examples/calc++ if no C++ compiler is available. (trivial change)
8569
8570 2005-11-09 Akim Demaille <akim@epita.fr>
8571
8572 * src/scan-skel.l: Use a couple of asserts.
8573
8574 2005-11-03 Akim Demaille <akim@epita.fr>
8575
8576 In some (weird) cases, the final state number is incorrect.
8577 Reported by Alexandre Duret-Lutz.
8578 * src/LR0.c (state_list_append): Remove the computation of
8579 final_state.
8580 (save_reductions): Do it here.
8581 (get_state): Alpha conversion.
8582 (generate_states): Use a for loop.
8583 * src/gram.h (item_number_is_rule_number)
8584 (item_number_is_symbol_number): New.
8585 * src/state.c: Use assert.
8586 * src/system.h: Include assert.h.
8587 * tests/sets.at (Accept): New.
8588
8589 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8590
8591 * data/glr.c (yyfill): Adjust comment.
8592 (yyresolveAction): Initialize default location properly
8593 for empty right-hand sides.
8594 (yydoAction): Ditto.
8595 Add comment explaining apparently dead code.
8596 * tests/glr-regression.at
8597 (Incorrectly initialized location for empty right-hand side in GLR):
8598 New test.
8599
8600 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8601
8602 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8603 gnulib when interrupted. This fixes some race conditions and
8604 works around some portability problems (one noted by Paul
8605 Hilfinger).
8606
8607 2005-10-22 Akim <akim@epita.fr>
8608
8609 * Makefile.cfg: Adjust to config -> build-aux.
8610 Reported by twledo.
8611
8612 2005-10-21 Akim Demaille <akim@epita.fr>
8613
8614 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8615 the %parse-params.
8616 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8617 * data/yacc.c (b4_Pure_if): Rename as...
8618 (b4_yacc_pure_if): this.
8619 (YY_SYMBOL_PRINT, yyparse): Adjust.
8620 * doc/bison.texinfo: Formatting changes.
8621
8622 2005-10-21 Akim Demaille <akim@epita.fr>
8623
8624 Finish the transition config -> build-aux.
8625 * configure.ac, Makefile.am: Use build-aux.
8626 * config/prev-version, config/announce-gen, config/Makefile.am:
8627 Move to...
8628 * build-aux/prev-version, build-aux/announce-gen,
8629 * build-aux/Makefile.am: here.
8630
8631 2005-10-14 Akim Demaille <akim@epita.fr>
8632
8633 * examples/calc++/test: Use set -x only when VERBOSE.
8634
8635 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8636
8637 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8638 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8639
8640 2005-10-13 Akim Demaille <akim@epita.fr>
8641
8642 * src/scan-skel.l: Output the base name parts of the parser and
8643 header file names.
8644 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
8645 additional checks.
8646 Use this to exercise C++ outputs in subdirs.
8647 Reported by Oleg Smolsky.
8648
8649 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8650
8651 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8652 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8653 Problem reported by John P. Hartmann.
8654 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8655 already defined it.
8656
8657 2005-10-12 Akim Demaille <akim@epita.fr>
8658
8659 * src/parse-gram.y (version_check): Exit 63 to please missing
8660 (stands for "version mismatch).
8661 * tests/input.at, doc/bison.texinfo: Adjust.
8662
8663 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8664
8665 Work around portability problems with Visual Age C compiler
8666 (xlc and xlC_r) reported by John P. Hartmann.
8667 * data/location.cc (initial_column, initial_line): Remove.
8668 All uses replaced by 0 and 1.
8669 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8670 that xlc complains about.
8671 * src/scan-skel.l (skel_wrap): Likewise.
8672 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
8673 as __STDC__.
8674 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8675 __STDC_VERSION__. Use it everywhere instead of looking at
8676 __STDC__ and __cplusplus.
8677
8678 2005-10-10 Akim Demaille <akim@epita.fr>
8679
8680 * examples/calc++/test: Be quiet unless VERBOSE.
8681
8682 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8683
8684 * data/c.m4 (yydestruct, yysymprint):
8685 Use YYUSE instead of casting to void.
8686 * data/glr.c (YYUSE): New macro.
8687 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8688 Use it instead of rolling our own.
8689 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8690 (YYCHK1):
8691 Use /*CONSTCOND*/ to suppress lint warnings.
8692 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8693 (YY_STACK_PRINT): Use 'false' not '0'.
8694 (YYUSE): New macro.
8695 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8696 * data/yacc.c (YYUSE): New macro.
8697 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8698 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8699 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8700
8701
8702 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8703 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8704
8705 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8706
8707 Undo the parts of the unlocked-I/O change that substituted
8708 putc or puts for printf. This might hurt performance a bit,
8709 but some people prefer the printf style.
8710 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8711 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8712 All uses replaced by YYFPRINTF and YYDPRINTF.
8713 * data/yacc.c: Likewise.
8714 * lib/bitset.c (bitset_print): Likewise.
8715 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8716 putc and puts.
8717 * lib/lbitset.c (debug_lbitset): Likewise.
8718 * src/closure.c (print_firsts, print_fderives): Likewise.
8719 * src/gram.c (grammar_dump): Likewise.
8720 * src/lalr.c (look_ahead_tokens_print): Likewise.
8721 * src/output.c (escaped_output): Likewise.
8722 (user_actions_output): Break apart two printfs.
8723 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8724 * src/reduce.c (reduce_print): Likewise.
8725 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8726 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8727
8728 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8729 Use assignments rather than casts-to-void to suppress
8730 unused-variable warnings. This pacifies 'lint'.
8731 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8732 unused-variable warnings.
8733
8734 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8735
8736 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8737
8738 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8739
8740 Use unlocked I/O for a minor performance improvement on hosts like
8741 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8742 is to use the gnlib unlocked-io module, and to prefer putc and
8743 puts to printf when either will work (since the latter doesn't
8744 come in an unlocked flavor).
8745 * bootstrap (gnulib_modules): Add unlocked-io.
8746 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8747 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8748 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8749 and similarly for puts and putc and printf.
8750 * data/yacc.c: Likewise.
8751 * lib/bitset.c (bitset_print): Likewise.
8752 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8753 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8754 to printf.
8755 * lib/lbitset.c (debug_lbitset): Likewise.
8756 * src/closure.c (print_firsts, print_fderives): Likewise.
8757 * src/gram.c (grammar_dump): Likewise.
8758 * src/lalr.c (look_ahead_tokens_print): Likewise.
8759 * src/output.c (escaped_output): Likewise.
8760 (user_actions_output): Coalesce two printfs.
8761 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
8762 * src/reduce.c (reduce_print): Likewise.
8763 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8764 * src/system.h: Include unlocked-io.h rather than stdio.h.
8765
8766 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8767 this confuses xgettext.
8768
8769 2005-10-02 Akim Demaille <akim@epita.fr>
8770
8771 * bootstrap (gnulib_modules): Add strverscmp.
8772 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8773 * m4/.cvsignore: Add strverscmp.m4.
8774 * src/parse-gram.y (%require): New token, new rule.
8775 (version_check): New.
8776 * src/scan-gram.l (%require): Adjust.
8777 * tests/input.at (AT_REQUIRE): New.
8778 Use it.
8779 * doc/bison.texinfo (Require Decl): New.
8780 (Calc++ Parser): Use %require.
8781
8782 2005-10-02 Akim Demaille <akim@epita.fr>
8783
8784 * data/location.cc: New.
8785
8786 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8787 Akim Demaille <akim@epita.fr>
8788
8789 Make sure -odir/foo.cc creates dir/location.hh etc.
8790 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8791 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8792 (spec_defines_file): Now const.
8793 (dir_prefix): New.
8794 (short_base_name): Remove.
8795 * src/files.c: Adjust.
8796 (dirname.h): Include.
8797 (base_name): Don't prototype it.
8798 (finput): Remove, duplicates gram_in.
8799 (full_base_name, short_base_name): Replace by...
8800 (all_but_ext, all_but_tab_ext): these.
8801 (compute_base_names): Rename as...
8802 (compute_file_name_parts): this.
8803 Update to compute the new variables, including dir_prefix.
8804 Adjust dependencies.
8805 * src/output.c (prepare): Output them.
8806 * src/reader.c: Adjust to use gram_in, not finput.
8807 * src/scan-skel.l (@dir_prefix@): New.
8808
8809 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8810
8811 * lib/subpipe.c: New function end_of_output_subpipe() added
8812 to allow support for non-posix systems. This is a no-op function
8813 for posix systems.
8814
8815 * lib/subpipe.h: New function end_of_output_subpipe() added
8816 to allow support for non-posix systems. This is a no-op function
8817 for posix systems.
8818
8819 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8820 handle the lack of pipe/fork functionality on non-posix systems.
8821
8822 * djgpp/Makefile.maint: DJGPP specific file.
8823
8824 * djgpp/README.in: DJGPP specific file.
8825
8826 * djgpp/config.bat: DJGPP specific configuration file.
8827
8828 * djgpp/config.sed: DJGPP specific configuration file.
8829
8830 * djgpp/config.site: DJGPP specific configuration file.
8831
8832 * djgpp/config_h.sed: DJGPP specific configuration file.
8833
8834 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8835
8836 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8837
8838 2005-10-02 Akim Demaille <akim@epita.fr>
8839
8840 * data/location.cc: New, extract from...
8841 * data/lalr1.cc: here.
8842 (location.hh): Include it after the user prologue, in case the
8843 filename type is defined by the user.
8844 Forward declation location and position before the pre-prologue.
8845 (yyresult_): Rename as...
8846 (yyresult): this, it's a local variable, not an attribute.
8847 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8848
8849 2005-10-01 Akim Demaille <akim@epita.fr>
8850
8851 * examples/extexi: Restore the #line generation.
8852
8853 2005-09-30 Akim Demaille <akim@epita.fr>,
8854 Alexandre Duret-Lutz <adl@gnu.org>
8855
8856 Move the token type and YYSTYPE in the parser class.
8857 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
8858 (parser::token): New, from the moved free definition of tokens.
8859 (parser::semantic_value): Now a full definition instead of an
8860 indirection to YYSTYPE.
8861 (b4_post_prologue): No longer included in the header file, but
8862 in the implementation file.
8863 * doc/bison.texi (C+ Language Interface): Update.
8864 * src/parse-gram.y: Support unary %define.
8865 * tests/actions.at: Define global_tokens_and_yystype for backward
8866 compatibility until we update the tests.
8867 * tests/calc.at: Idem.
8868 (first_line, first_column, last_line, last_column): Define for lalr1.cc
8869 to simplify the code.
8870
8871 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
8872
8873 Port to SunOS 4.1.4, which lacks strtoul and strerror.
8874 Ah, the good old days! Problem reported by Peter Klein.
8875 * bootstrap (gnulib_modules): Add strerror, strtoul.
8876 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
8877 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
8878
8879 2005-09-29 Akim Demaille <akim@epita.fr>
8880
8881 * data/c.m4 (b4_error_verbose_if): New.
8882 * data/lalr1.cc: Use it.
8883 (YYERROR_VERBOSE_IF): Remove.
8884 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
8885 parser members, replaced by...
8886 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
8887 local variables.
8888 (yysyntax_error_): Takes the state number as argument.
8889 (yyreduce_print_): Use the argument yyrule, not the former
8890 attribute yyn_.
8891
8892 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
8893
8894 * bootstrap (gnulib_modules): Add verify.
8895 * lib/.cvsignore: Add verify.h.
8896 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
8897 * src/system.h (verify): Remove.
8898 Include verify.h instead.
8899 * src/tables.c (tables_generate): Use new API for 'verify'.
8900
8901 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
8902
8903 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
8904 local variables whose names begin with 'yy'.
8905 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8906 Trivial changes from Joel E. Denny.
8907
8908 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
8909 it itself.
8910 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
8911 don't use alloca any more.
8912
8913 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
8914 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
8915 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
8916 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
8917 to match yacc.c, to test more hosts.
8918
8919 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
8920
8921 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
8922 doesn't affect behavior.
8923 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
8924 Solaris, AIX, MSC.
8925 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
8926 This works a bit better with glibc, if user code has already included
8927 stdlib.h.
8928 * doc/bison.texinfo (Bison Parser): Document that users can't
8929 arbitrarily use malloc and free for other purposes. Document
8930 that <alloca.h> and <malloc.h> might be included.
8931 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
8932 user must declare alloca.
8933
8934 * HACKING (release): Forwarn the Translation Project about
8935 stable releses.
8936
8937 2005-09-20 Akim Demaille <akim@epita.fr>
8938
8939 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
8940
8941 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
8942
8943 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
8944 (YYSTACK_ALLOC_MAXIMUM): Use it.
8945 (yysyntax_error): New function.
8946 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
8947 multiple syntax errors are reported, and alloca is being used.
8948 Instead, reallocate buffers twice as big each time, so that
8949 we waste at most half the allocated memory. Start with a small
8950 (128-byte) buffer that will suffice in most cases anyway.
8951 Use yysyntax_error to do most of the work.
8952
8953 * doc/bison.texinfo (Error Reporting, Table of Symbols):
8954 yynerrs is the number of errors reported, not the number of
8955 errors encountered.
8956
8957 * tests/glr-regression.at (Duplicated user destructor for lookahead):
8958 Mark it as expected to fail.
8959 Cast result of malloc; problem reported by twlevo@xs4all.nl.
8960 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
8961 Don't start user-code symbols with "yy", to avoid name space problems.
8962
8963 2005-09-19 Akim Demaille <akim@epita.fr>
8964
8965 Remove the traits, failed experiment.
8966 It never proved useful, and anyway because of the current
8967 definition, it was not possible to have several specialization of
8968 this traits, making it useless.
8969 * data/lalr1.cc (yy:traits): Remove.
8970 Inline its definitions in the parser class.
8971
8972 2005-09-19 Akim Demaille <akim@epita.fr>
8973
8974 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
8975 least Mac OSX with a /usr/local install of gettext.
8976
8977 2005-09-19 Akim Demaille <akim@epita.fr>
8978
8979 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
8980 and yytoken for similarity with the other skeletons.
8981
8982 2005-09-19 Akim Demaille <akim@epita.fr>
8983
8984 * NEWS, configure.ac: update version number to 2.1a.
8985
8986 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
8987
8988 * NEWS: Version 2.1.
8989
8990 * NEWS: Remove notice of yytname change, since it was never in an
8991 official release.
8992 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
8993 diagnostic.
8994 * src/output.c (prepare): Likewise.
8995 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
8996 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
8997 is not defined. This is an awful hack, but it's enough for now.
8998 All callers changed.
8999 * tests/glr-regression-at (make_value): Args are const pointers now,
9000 to avoid GCC warning.
9001 (Duplicated user destructor for lookahead): New test. Currently
9002 skipped. It fails on my host but I'm not sure it'll always fail.
9003
9004 2005-09-16 Akim Demaille <akim@epita.fr>
9005
9006 * src/symtab.h (struct symbol): Declare the printer and destructor
9007 as const, to avoid accidental calls to free.
9008 (symbol_destructor_set, symbol_printer_set): Adjust.
9009 * src/symtab.c: Adjust.
9010
9011 2005-09-16 Akim Demaille <akim@epita.fr>
9012
9013 * data/c.m4 (b4_token_enums): New.
9014 (b4_token_defines): Rename as...
9015 (b4_token_enums_defines): this.
9016 (b4_token_defines): New, output only the #defines.
9017 * data/yacc.c, data/glr.c: Adjust.
9018 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9019 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9020 as default values.
9021
9022 2005-09-16 Akim Demaille <akim@epita.fr>
9023
9024 * data/lalr1.cc (yylex_): Remove, inline its code.
9025 (yyreport_syntax_error_): Remove, replaced by...
9026 (yysyntax_error_): this which returns a string and leaves to the
9027 caller the call to the users' error function.
9028 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9029 Move from members of the parser object...
9030 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9031 to local variables of the parse function.
9032
9033 2005-09-16 Akim Demaille <akim@epita.fr>
9034
9035 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9036 since it's in Bison's name space.
9037
9038 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9039
9040 * data/glr.c (yyresolveValue): Add default case to pacify
9041 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9042
9043 * NEWS: Document when yyparse started to return 2.
9044 * doc/bison.texinfo (Parser Function): Document when yyparse
9045 returns 2.
9046
9047 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9048 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9049 changed.
9050 (class position): file_name -> filename (reverting). All uses changed.
9051
9052 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9053
9054 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9055 do anything if $@ exists. This reverts part of the 2005-07-07
9056 patch.
9057
9058 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9059
9060 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9061 contains obsolete information and isn't worth distributing as a
9062 separate file anyway.
9063 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9064 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9065 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9066 (yyparse): Abort if user code uses longjmp to throw an unexpected
9067 value.
9068
9069 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9070
9071 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9072 Suggested by twlevo@xs4all.nl.
9073
9074 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9075 This avoids a diagnostic from gcc -Wswitch-enum.
9076 Problem reported by twlevo@xs4all.nl.
9077
9078 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9079 standards. Use "file name" or "file" or "name", depending on
9080 the context.
9081 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9082 not to hack/foo.tab.c.
9083 (Calc++ Top Level): 2nd arg of main is not const.
9084 * data/glr.c: b4_filename -> b4_file_name.
9085 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9086 All uses changed.
9087 (class position): filename -> file_name. All uses changed.
9088 * data/yacc.c: b4_filename -> b4_file_name.
9089 * lib/bitset.h: filename -> file_name in local vars.
9090 * lib/bitset_stats.c: Likewise.
9091 * src/files.c: Likewise.
9092 * src/scan-skel.l ("@output ".*\n): Likewise.
9093 * src/files.c (file_name_split): Renamed from filename_split.
9094 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9095
9096 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9097
9098 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9099 to accommodate latest gnulib.
9100
9101 * tests/glr-regression.at (Duplicate representation of merged trees):
9102 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9103
9104 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9105 needed.
9106
9107 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9108
9109 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9110 All uses changed. Invoke user destructor after an error during a
9111 split parse (trivial change from Joel E. Denny).
9112
9113 * tests/glr-regression.at
9114 (User destructor after an error during a split parse): New test case.
9115 Problem reported by Joel E. Denny in:
9116 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9117
9118 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9119
9120 * README-cvs: Give URLs for recommended tools.
9121 Mention Gzip version problem, and bootstrapping issues.
9122 Remove troubleshooting section, as it's somewhat obsolete.
9123
9124 * bootstrap (no_cache): New var, to accommodate different wget
9125 variants. Use it instead of '-C off'. Problem reported by
9126 twlevo@xs4all.nl.
9127
9128 * data/glr.c (yydestroyStackItem): New function.
9129 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9130 debugging information. Problem reported by Joel E. Denny.
9131
9132 2005-08-25 Akim Demaille <akim@epita.fr>
9133
9134 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9135
9136 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9137
9138 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9139 Don't invoke destructor on unresolved entries.
9140 * tests/glr-regression.at
9141 (User destructor for unresolved GLR semantic value): New test case.
9142 Problem reported by Joel E. Denny in:
9143 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9144
9145 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9146
9147 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9148 Add strnlen.c.
9149 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9150 lib-prefix.m4, po.m4.
9151
9152 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9153 in yydestruct diagnostic, since it might not be an error.
9154 Problem reported by Joel Denny near end of
9155 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9156 * data/lalr1.cc (yyerturn): Likewise.
9157 * data/yacc.c (yyreturn): Likewise.
9158 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9159
9160 * src/files.c: Remove obsolete FIXME comment.
9161
9162 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9163 with the other templates, and to fix bogus run-on messages such
9164 as the one reported at the end of
9165 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9166 All callers changed to avoid the newline.
9167 (yyprocessOneStack): Output two lines rather than one, to accommodate
9168 the above change. This changes the debug output format slightly.
9169
9170 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9171 reported by Joel E. Denny in
9172 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9173 (trivial change).
9174 * tests/glr-regression.at (Duplicate representation of merged trees):
9175 New test, from Joel E. Denny in:
9176 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9177 * THANKS: Add Joel E. Denny.
9178
9179 * configure.ac (AC_INIT): Bump to 2.0c.
9180
9181 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9182
9183 * NEWS: Version 2.0b.
9184
9185 * Makefile.am (SUBDIRS): Put examples before tests, so that
9186 "make check" doesn't finish with "All 1 tests passed".
9187
9188 * tests/regression.at (Token definitions): Don't rely on
9189 AT_PARSER_CHECK for data that contains backslashes. It currently
9190 uses 'echo', and 'echo' isn't portable if its argument contains
9191 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9192 that the byte '\0xff' is not printable in the C locale; it is,
9193 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9194 not printable, so use '\0x81' to test.
9195
9196 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9197 version of GCC, since the macro is used with non-GCC compilers.
9198
9199 Fix core dump reported by Pablo De Napoli in
9200 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9201 * tests/regression.at (Invalid inputs with {}): New test.
9202 * src/parse-gram.y (token_name): Translate type before using
9203 it as an index.
9204
9205 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9206 the user's name space. All uses changed to __attribute__
9207 ((__unused__)).
9208 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9209 Add __attribute__ ((__noreturn__)).
9210
9211 * etc/clcommit: Remove. We weren't using it, and it failed
9212 "make maintainer-distcheck".
9213 * Makefile.maint: Merge from coreutils.
9214 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9215 (syntax-check-rules): Change list of rules as described below.
9216 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9217 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9218 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9219 (sc_trailing_space): New rules.
9220 (sc_xalloc_h_in_src): Remove.
9221 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9222 (sc_space_tab, sc_error_exit_success, sc_changelog):
9223 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9224 (makefile-check, po-check, author_mark_check):
9225 (makefile_path_separator_check, copyright-check):
9226 Use grep -n, to make it easier to find violations.
9227 Use CVS_LIST and CVS_LIST_EXCEPT.
9228 (header_regexp, h_re): Remove.
9229 (dd_c): New macro.
9230 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9231 (my-distcheck): Use more-modern GCC flags.
9232 (signatures, %.asc): Remove.
9233 (rel-files, announcement): Remove signatures.
9234 Restore old updating code, even though we don't use it, so
9235 that we're the same as coreutils.
9236 (alpha, beta, major): Depend on news-date-check.
9237 Make the upload commands.
9238
9239 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9240 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9241 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9242 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9243 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9244 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9245 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9246 * tests/sets.at: Likewise.
9247
9248 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9249 we comment out the Autoconf version number.
9250 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9251 it's error-prone and "make maintainer-distcheck" rejects it.
9252
9253 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9254 Indent calls to "error" to pacify "make maintainer-distcheck",
9255 when the calls are not intended to be translated.
9256 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9257
9258 * src/Makefile.am (DEFS): Use +=, to pacify
9259 "make maintainer-distcheck".
9260 (bison_SOURCES): Add scan-skel.h.
9261 (sc_tight_scope): New rule, from coreutils.
9262
9263 * src/files.c (src_extension, header_extension):
9264 Now static, not extern.
9265 * src/getargs.c (short_options): Likewise.
9266 * src/muscle_tab.c (muscle_table): Likewise.
9267 * src/parse-gram.y (current_class, current_type, current_prec):
9268 Likewise.
9269 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9270 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9271 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9272 void, to avoid warning when NLS is disabled.
9273 * src/output.c: Include scan-skel.h.
9274 (scan_skel): Remove decl, since scan-skel.h does this.
9275 (output_skeleton):
9276 Indent calls to "error" to pacify "make maintainer-distcheck".
9277 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9278 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9279 "make maintainer-distcheck".
9280 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9281 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9282 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9283 (skel_lex_destroy, scan_skel): Move these decls to...
9284 * src/scan-skel.h: New file.
9285 * src/uniqstr.c (uniqstr_assert):
9286 Indent calls to "error" to pacify "make maintainer-distcheck".
9287
9288 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9289 not @VAR@.
9290
9291 * tests/torture.at: Revamp to avoid misuse of atoi that
9292 "make maintainer-distcheck" complained about.
9293
9294 * examples/extexi (message): Don't print a message more than once,
9295 and omit line-number decoration that makes Emacs compile think
9296 that informative messages are worth worrying about.
9297
9298 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9299
9300 * configure.ac: Update version number.
9301
9302 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9303 accidentally.
9304 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9305 autogenerated by the maintainer.
9306 * examples/calc++/.cvsignore: Add *.yy.
9307
9308 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9309 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9310 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9311
9312 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9313
9314 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9315 from maintainer-distcheck about casting the argument of 'free'.
9316
9317 * NEWS: Mention recent yytname changes.
9318 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9319
9320 * bootstrap: For translations that have not yet been upgraded to
9321 the new runtime-po domain, prime the pump by extracting the
9322 relevant strings from the obsolete translations. This code can be
9323 removed once the bison-runtime domain has been translated by each
9324 team.
9325
9326 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9327 now that token names are already quoted.
9328
9329 Fix problem reported by Anthony Heading.
9330 * data/glr.c (YYTOKEN_TABLE): New macro.
9331 (yytname): Define if YYTOKEN_TABLE.
9332 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9333 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9334 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9335 * src/output.c (prepare_symbols): Output token_table_flag.
9336
9337 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9338
9339 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9340 again if the first call fails.
9341
9342 * data/glr.c (yytnamerr): New function.
9343 (yyreportSyntaxError): Use it to dequote most string literals.
9344 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9345 with other skeletons. All uses changed.
9346 (yytnameerr_): New function.
9347 (yyreport_syntax_error): Use it to dequote most string literals.
9348 * data/yacc.c (yytnamerr): New function.
9349 (yyerrlab): Use it to decode most string literals.
9350 * doc/bison.texinfo (Decl Summary, Calling Convention):
9351 Clarify quoting convention of yytname.
9352 * src/output.c (prepare_symbols): Quote all names. This undoes
9353 the 2005-04-17 change, which is now accomplished (mostly) via
9354 changes in the parsers as described above.
9355 * tests/regression.at (Token definitions, Web2c Actions):
9356 Undo most 2005-04-17 change here, too.
9357
9358 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9359
9360 Fix more problems reported by twlevo@xs4all.nl.
9361 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9362 remove trailing spaces. This loses the exit status of ./types,
9363 and isn't needed since ./types shouldn't be emitting trailing
9364 spaces.
9365 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9366 as the stack isn't valid in that case.
9367
9368 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9369 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9370 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9371 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9372 is used.
9373 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9374 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9375 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9376 Likewise.
9377
9378 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9379 overly-picky compilers that reject 'char *foo = "bar";'.
9380
9381 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9382 to FILE * parameter, not to stderr. This fixes a typo introduced
9383 in the 2005-07-12 change.
9384
9385 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9386 warnings from GCC 4.
9387
9388 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9389 (yyglrShiftDefer, yysplitStack):
9390 Remove unused parameters b4_pure_formals. All uses changed.
9391 (yyglrShift): Remove unused parameters b4_user_formals.
9392 All uses changed.
9393 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9394
9395 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9396
9397 Destructor cleanups and regularization among the three skeletons.
9398 * NEWS: Document the behavior changes.
9399 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9400 stack before failing, as the cleanup code will do it for us now.
9401 * data/lalr1.cc (yyerrlab): Likewise.
9402 * data/glr.c (yyparse): Pop everything off the stack before
9403 freeing it, so that destructors get called properly.
9404 * data/lalr1.cc (yyreturn): Likewise.
9405 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9406 This is more consistent.
9407 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9408 why destructors might be called. 1.875 -> 2.1.
9409 (Destructor Decl, Decl Summary, Table of Symbols):
9410 Some English-language cleanups for %destructor.
9411 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9412 Add output line for destructor of start symbol.
9413 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9414 because of that same extra output line.
9415
9416 * NEWS: Document minor wording changes in diagnostics of
9417 Bison-generated parsers.
9418 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9419 Remove unused formals. All uses changed.
9420 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9421 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9422 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9423 Rename yyoverflowab to yyexhaustedlab.
9424 When memory exhaustion occurs during syntax-error reporting,
9425 report it separately rather than in a single diagnostic; this
9426 eases translation.
9427 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9428 (Memory Exhausted): Renamed from Parser Stack Overflow.
9429 Revamp wording slightly to prefer "memory exhaustion".
9430 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9431
9432 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9433
9434 Add i18n support to the GLR skeleton. Partially fix the C++
9435 skeleton; a C++ expert needs to finish this. Remove debugging
9436 msgids; there's little point to having them translated, since they
9437 can be understood only by someone who can read the
9438 (English-language) source code.
9439
9440 Generate runtime-po/bison-runtime.pot automatically, so that we
9441 don't have to worry about garbage getting in that file. We'll
9442 make sure after the next official release that old msgids don't
9443 get lost. See
9444 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9445
9446 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9447 Now auto-generated.
9448 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9449 Fix typos in explanations of the runtime file.
9450 * bootstrap: Change gettext keyword from YYI18N to YY_.
9451 Use standard Makefile.in.in in runtime-po, since we'll arrange
9452 for backward-compatible bison-runtime.po files in a different way.
9453 * data/glr.c (YY_): New macro, from yacc.c.
9454 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9455 Translate messages intended for users.
9456 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9457 the wording in the other skeletons. We don't know that the memory
9458 is virtual.
9459 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
9460 Use same method that yacc.c uses.
9461 Don't translate debugging messages.
9462 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9463 it doesn't work (yet), and requires C++ expertise to fix.
9464 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
9465 Move defn to a more logical place, to be consistent with other
9466 skeletons.
9467 Don't translate debugging messages.
9468 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9469 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
9470 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
9471 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9472
9473 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9474 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9475 void, not int.
9476 * tests/glr-regression.at (Badly Collapsed GLR States):
9477 Likewise.
9478 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9479 yylex should return 0 at EOF rather than aborting.
9480
9481 Improve tests for stack overflow in GLR parser.
9482 Problem reported by twlevo@xs4all.nl.
9483 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9484 All uses removed.
9485 (yyStackOverflow): Just longjmp, but with value 2 so that caller
9486 can handle the problem.
9487 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9488 (yyparse): New local variable yyresult to record the result.
9489 Use result of setjmp to set it, rather than storing itinto
9490 struct.
9491 (yyDone): Remove label.
9492 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9493 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
9494 if YYABORT is used).
9495 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9496 yyparse status; put status > 1 into diagnostic.
9497 Check that status==2 works.
9498 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9499 Use exit status 3 for failure to open (which shouldn't happen).
9500
9501 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9502
9503 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9504 1 on syntax error; just let yyparse do its thing.
9505 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9506 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9507 (Exploding the Stack Size with Alloca):
9508 (Exploding the Stack Size with Malloc):
9509 Expect exit status 2, not 1, since the parser is supposed to blow
9510 its stack. Problem reported by twlevo@xs4all.nl.
9511
9512 * data/glr.c (yyparse): Don't assume that the initial calls
9513 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9514 Print a stack-overflow message and fail instead.
9515 Initialize the line-number information before creating the stack,
9516 so that the stack-overflow message can report line zero safely.
9517
9518 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9519
9520 Fix problems reported by twlevo@xs4all.nl.
9521 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9522 (yyuserMerge): Provide a default case if b4_mergers is empty.
9523 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9524 * tests/glr-regression.at
9525 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9526 Add casts to pacify C++ compilers.
9527 * tests/glr-regression.at (Improper merging of GLR delayed action
9528 sets): Declare yylex before using it.
9529 * tests/Makefile.am (maintainer-check-g++): Fix a stray
9530 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9531 test for valgrind; valgrind is independent of g++.
9532 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9533 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9534 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9535 Use a destructor, so that we can expand the stack. Change
9536 YYSTYPE to char * so that we can free it. Cast result of malloc.
9537
9538 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9539
9540 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9541 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9542
9543 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9544
9545 * PACKAGING: New file, suggested by Bruno Haible and taken from
9546 similar wording in gettext's PACKAGING file.
9547 * NEWS: Mention PACKAGING.
9548 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9549
9550 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9551
9552 * NEWS: Document recent i18n improvements.
9553 * bootstrap: Get runtime translations into runtime-po.
9554 Create runtime-po files automatically, if possible.
9555 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9556 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9557 does not infringe on the user's name space.
9558 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9559 * doc/bison.texinfo (Internationalization): Revamp the English
9560 and Texinfo syntax a bit, to try to make it clearer.
9561 (Bison Options, Option Cross Key): Mention --print-localedir.
9562 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9563 YYENABLE_NLS. Quote a bit more.
9564 * runtime-po/.cvsignore: New file.
9565 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9566 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9567 * runtime-po/quot.sed: Likewise.
9568 * runtime-po/boldquot.sed: Likewise.
9569 * runtime-po/en@quot.header: Likewise.
9570 * runtime-po/en@boldquot.header: Likewise.
9571 * runtime-po/insert-header.sin: Likewise.
9572 * runtime-po/remove-potcdate.sin: Likewise.
9573 * runtime-po/Makevars: Likewise.
9574 * runtime-po/LINGUAS: Likewise.
9575 * runtime-po/de.po: Likewise; we will rely on the translation project
9576 to maintain this, so "bootstrap" should get it.
9577 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
9578 its value.
9579 * src/main.c (main): Bind the bison-runtime domain, too.
9580
9581 2005-07-12 Bruno Haible <bruno@clisp.org>
9582
9583 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9584 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9585 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9586 * runtime-po: New directory.
9587 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9588 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9589 * runtime-po/Rules-quot: New file, copied from po/.
9590 * runtime-po/quot.sed: Likewise.
9591 * runtime-po/boldquot.sed: Likewise.
9592 * runtime-po/en@quot.header: Likewise.
9593 * runtime-po/en@boldquot.header: Likewise.
9594 * runtime-po/insert-header.sin: Likewise.
9595 * runtime-po/remove-potcdate.sin: Likewise.
9596 * runtime-po/Makevars: New file.
9597 * runtime-po/POTFILES.in: New file.
9598 * runtime-po/LINGUAS: New file.
9599 * runtime-po/bison-runtime.pot: New file.
9600 * runtime-po/de.po: New file.
9601 * m4/bison.m4: New file.
9602 * Makefile.am (SUBDIRS): Add runtime-po.
9603 (aclocaldir, aclocal_DATA): New variables.
9604 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9605 Define aclocaldir.
9606 * src/getargs.c (usage): Document --print-localedir option.
9607 (PRINT_LOCALEDIR_OPTION): New enum item.
9608 (long_options): Add --print-localedir option.
9609 (getargs): Handle --print-localedir option.
9610 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9611 (Internationalization): New section.
9612
9613 2005-07-12 Akim Demaille <akim@epita.fr>
9614
9615 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9616 for consistency with the rest of the code.
9617 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9618 Add separators.
9619
9620 2005-07-12 Akim Demaille <akim@epita.fr>
9621
9622 * src/parse-gram.y: Use %printer instead of YYPRINT.
9623
9624 2005-07-12 Akim Demaille <akim@epita.fr>
9625
9626 * src/symtab.h, src/symtab.c (symbol_print): New.
9627 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9628 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9629
9630 2005-07-12 Akim Demaille <akim@epita.fr>
9631
9632 * data/glr.c (b4_syncline): Fix (swap) the definitions of
9633 b4_at_dollar and b4_dollar_dollar.
9634
9635 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9636
9637 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9638 and Pennello's paper.
9639
9640 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9641
9642 * data/yacc.c (yyparse): Undo previous patch. Instead,
9643 set yylsp[0] and yyvsp[0] only if the initial action
9644 sets yylloc and yylval, respectively.
9645
9646 * data/yacc.c (yyparse): In the initial action, set
9647 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9648 This avoids the use of undefined variables if the initial
9649 action does not set yylloc and/or yylval.
9650
9651 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9652
9653 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9654 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9655 Remove from CVS. These files are automatically generated.
9656 * examples/extexi: Clarify that this file is now part of Bison,
9657 not GNU M4, and that it works with any POSIX-compatible Awk.
9658 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9659 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9660 so that we also get calc++-parser.yy. Geneate it.
9661 Use $(AWK), not gawk, since any conforming Awk will do.
9662 Put comment before action, since older 'make' can't handle comment
9663 in action.
9664 $(BUILT_SOURCES): List all built sources, not just some of them.
9665 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9666 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9667 $($(calc_sources_generated)): Remove unnecessary test for existence
9668 of target. (This had a shell syntax error anyway; a stray "x".)
9669 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9670 calc++-parser.yy.
9671 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9672
9673 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9674 implied by the other modules.
9675
9676 2005-07-06 Akim Demaille <akim@epita.fr>
9677
9678 Bind examples/calc++ to the package.
9679 * examples/calc++/Makefile: Remove, replaced by...
9680 * examples/calc++/Makefile.am: ... this new file.
9681 * examples/calc++/test: Remove input.
9682 * examples/calc++/compile: Remove.
9683 * examples/Makefile.am: New.
9684 * configure.ac, Makefile.am: Adjust.
9685 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9686
9687 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9688
9689 * data/glr.c (yyFail): Drastically simplify; since the format argument
9690 never had any % directives, we can simply pass it to yyerror.
9691 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9692 be modified later, as that is the usual style in glr.c.
9693 Problems reported by Paul Hilfinger.
9694
9695 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9696 and size overflow errors.
9697 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9698 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9699 (YYSIZEMAX): New macro.
9700 (yystpcpy): New function, taken from yacc.c.
9701 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9702 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9703 so that we don't have to maintain their signatures.
9704 (yyFail): Check for buffer overflow, by using vsnprintf rather
9705 than vsprintf. Allocate a bigger buffer if possible.
9706 Report an error if buffer allocation fails.
9707 (yyStackOverflow): New function.
9708 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9709 the initialization was successful. It might fail if storage was
9710 exhausted.
9711 (yyexpandGLRStack): Add more checks for storage allocation failure.
9712 Use yyStackOverflow to report failures.
9713 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9714 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9715 Don't assume stack number fits in int.
9716 (yysplitStack): Check for storage allocation failure.
9717 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9718 can print diagnostics on storage allocation failure. All callers
9719 changed.
9720 (yyresolveValue): Use yybool for boolean.
9721 (yyreportSyntaxError): Check for size-calculation overflow.
9722 This code is taken from yacc.c.
9723 (yyparse): Check for storage allocation errors when allocating
9724 the initial stack.
9725
9726 2005-07-05 Akim Demaille <akim@epita.fr>
9727
9728 Extract calc++ from the documentation.
9729 * doc/bison.texinfo (Calc++): Add the extraction marks.
9730 * examples/extexi: New, from the aborted GNU Programming 2E.
9731 Separate the different paragraph of a file with empty lines.
9732 * examples/Makefile: Use it to extract the whole calc++ example.
9733
9734 2005-06-24 Akim Demaille <akim@epita.fr>
9735
9736 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9737 class typedefs.
9738
9739 2005-06-22 Akim Demaille <akim@epita.fr>
9740
9741 * doc/bison.texinfo (C++ Language Interface): First stab.
9742 (C++ Parsers): Remove.
9743
9744 2005-06-22 Akim Demaille <akim@epita.fr>
9745
9746 * data/lalr1.cc (yylex_): Honor %lex-param.
9747
9748 2005-06-22 Akim Demaille <akim@epita.fr>
9749
9750 Start a set of simple examples.
9751 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9752 * examples/calc++/calc++-driver.hh,
9753 * examples/calc++/calc++-parser.yy,
9754 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9755 * examples/calc++/compile, examples/calc++/test: New.
9756
9757 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9758
9759 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9760 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9761 which stems from the 2005-05-27 patch.
9762
9763 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9764
9765 * data/glr.c: Modify treatment of unused parameters to permit use
9766 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9767
9768 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9769
9770 Fix infringement on user name space reported by Janos Zoltan Szabo.
9771 * data/yacc.c (yyparse): strlen -> yystrlen.
9772
9773 2005-05-30 Akim Demaille <akim@epita.fr>
9774
9775 * data/lalr1.cc (_): New.
9776 Translate the various messages.
9777
9778 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9779
9780 Fix infringement on user name space reported by Bruno Haible.
9781 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9782 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9783 the user's name space.
9784 (alloca): Include <stdlib.h> to get it, if it's not built in.
9785 (YYMALLOC, YYFREE): Define only if needed.
9786 (malloc, free): Declare, but only if needed, as this infringes on
9787 the user name space.
9788
9789 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9790
9791 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9792 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9793 with %d format.
9794 * lib/ebitset.c (min, max): Undef before defining.
9795 * lib/vbitset.c (min, max): Likewise.
9796 * lib/subpipe.c (create_subpipe): Save local variables in case
9797 vfork clobbers them.
9798
9799 2005-05-24 Bruno Haible <bruno@clisp.org>
9800
9801 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9802 error message syntax used by gcc-4.0.
9803
9804 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9805
9806 * README: Mention m4 1.4.3. Remove obsolete advice about
9807 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9808
9809 * bootstrap: Remove workaround for problem I encountered with
9810 gettext 0.14.1; it seems to be fixed now.
9811
9812 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9813
9814 * NEWS: Version 2.0a.
9815
9816 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9817 the previous change.
9818
9819 Various maintainer cleanups.
9820 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9821 conftest*, for benefit of CVS commands run at the same time as
9822 "configure". Add build-aux, since "bootstrap" now creates it and
9823 its subfiles.
9824 * Makefile.cfg (move_if_change): Remove.
9825 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9826 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9827 (po_repo, do-po-update, po-update, wget_files, get-targets):
9828 (config.guess-url_prefix, config.sub-url_prefix):
9829 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9830 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9831 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9832 Remove.
9833 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9834 this is now the recommended name.
9835 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9836 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9837 ylwrap. These files now go into build-aux.
9838 * config/move-if-change: Remove.
9839 * config/prev-version.txt: Bump from 1.75 to 2.0.
9840
9841 * bootstrap: Add stdio-safer, unistd-safer modules.
9842 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9843 we don't need it).
9844 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9845 fopen-safer.c, stdio-safer.h, unistd-safer.h.
9846 * lib/subpipe.c: Include "unistd-safer.h".
9847 (create_subpipe): Make sure all the newly-created
9848 file descriptors are > 2, so that diagnostics don't
9849 get sent down them (which might cause Bison to hang, in theory).
9850 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9851 * src/files.c (xfopen): Use fopen_safer, not fopen.
9852
9853 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
9854 yesterday's yacc.c fix.
9855
9856 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
9857
9858 * data/glr.c, data/lalr1.cc: Update copyright date.
9859
9860 Fix a destructor bug reported by Wolfgang Spraul in
9861 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
9862 * data/yacc.c (yyabortlab): Don't call destructor, and
9863 don't set yychar to EMPTY.
9864 (yyoverflowlab): Don't call destructor.
9865 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
9866 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
9867 since we no longer output the message "discarding lookahead token
9868 end of input ()".
9869
9870 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9871
9872 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
9873 fix a small glitch in debugging output.
9874 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
9875 after YY_SYMBOL_PRINT where needed.
9876
9877 (struct yyGLRState): Add some comments.
9878 (struct yySemanticOption): Add some comments.
9879 (union yyGLRStackItem): Add comment.
9880
9881 (yymergeOptionSets): Correct this to properly perform the union,
9882 avoiding infinite reported by Michael Rosien.
9883 Update comment.
9884
9885 * tests/glr-regression.at: Add test for GLR merging error reported
9886 by M. Rosien.
9887
9888 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
9889
9890 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
9891 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
9892 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
9893 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
9894 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
9895 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
9896 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
9897 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
9898 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
9899 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
9900 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
9901 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
9902 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
9903 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
9904 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
9905 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
9906 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
9907 src/derives.h, src/files.c, src/files.h, src/getargs.c,
9908 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
9909 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
9910 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
9911 src/output.h, src/parse-gram.c, src/parse-gram.h,
9912 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
9913 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
9914 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
9915 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
9916 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
9917 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
9918 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
9919 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
9920 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
9921 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
9922 tests/reduce.at, tests/regression.at, tests/sets.at,
9923 tests/synclines.at, tests/testsuite.at, tests/torture.at:
9924 Update FSF postal mail address.
9925
9926 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
9927
9928 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
9929 Problem reported by Ralf Menzel.
9930
9931 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
9932
9933 * tests/actions.at: Test that stack overflow invokes destructors.
9934 From Marcus Holland-Moritz.
9935 * data/yacc.c (yyerrlab): Move the code that destroys the stack
9936 from here....
9937 (yyreturn): to here. That way, destructors are called properly
9938 even if the stack overflows, or the user calls YYACCEPT or
9939 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
9940 (yyoverflowlab): Destroy the lookahead.
9941
9942 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
9943
9944 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
9945
9946 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
9947
9948 * NEWS: Bison-generated C parsers no longer quote literal strings
9949 associated with tokens.
9950 * src/output.c (prepare_symbols): Don't escape strings,
9951 since users don't want to see C escapes.
9952 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
9953 in diagnostics.
9954 * tests/input.at (Torturing the Scanner): Likewise.
9955 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
9956
9957 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
9958
9959 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
9960 the data size is known to be too small and we can't increase it.
9961 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
9962
9963 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
9964
9965 * src/parse-gram.y: Include quotearg.h.
9966 (string_as_id): Quote $1 before using it as a key, since the
9967 lexer no longer quotes it for us.
9968 (string_content): Don't strip quotes, since lexer no longer
9969 quotes it for us.
9970 * src/scan-gram.l: Include quotearg.h.
9971 ("\""): Omit quote.
9972 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
9973 a key, since the rest of the lexer doesn't quote it.
9974 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
9975 * tests/regression.at (Token definitions): Check for backslashes
9976 in token strings.
9977
9978 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
9979 (YYSIZE_T): Define to unsigned long int when using an older compiler.
9980 (yyparse): Revamp code to generate long syntax error message, to
9981 make it easier to translate, and to avoid problems with arithmetic
9982 overflow. Change "virtual memory" to "memory" in diagnostic, since
9983 we don't know whether the memory is virtual.
9984
9985 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
9986
9987 * NEWS: Bison-generated C parsers now use the _ macro to
9988 translate strings.
9989 * data/yacc.c (_) [!defined _]: New macro.
9990 All English strings wrapped inside this macro.
9991 * doc/bison.texinfo (Bison Parser): Document _.
9992 * po/POTFILES.in: Include src/parse-gram.c, since it now
9993 includes translateable strings that parse-gram.y doesn't.
9994
9995 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
9996
9997 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
9998 reverting the 2004-10-11 change to this function.
9999 (symbol_check_alias_consistency): Don't call symbol_type_set
10000 if the type name is already correct.
10001 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10002
10003 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10004
10005 * tests/regression.at (Token definitions): Don't use a token named
10006 c, as that generates a "#define c ..." that runs afoul of buggy
10007 stdlib.h that uses the identifier c as a member of struct
10008 drand48_data. Problem reported by Horst Wente.
10009
10010 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10011
10012 * bootstrap: Change translation URL from
10013 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10014 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10015 redirection glitches. Problem reported by twlevo@xs4all.nl.
10016
10017 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10018
10019 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10020 after operands; POSIX says this isn't portable for the c99 command.
10021
10022 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10023
10024 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10025 immediately if a data overrun has occurred; this may help us track
10026 down what may be a spurious failure on MacOS.
10027
10028 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10029
10030 Respond to problems reported by twlevo@xs4all.nl.
10031
10032 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10033
10034 * src/vcg.h: Comment fix.
10035 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10036 (G_CMAX): Change to -1 instead of INT_MAX.
10037
10038 * data/yacc.c (yyparse): Omit spaces before #line.
10039
10040 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10041
10042 * src/tables.c (state_number_to_vector_number): Put it inside an
10043 "#if 0", since it's not currently used. Problem reported by
10044 Roland McGrath.
10045
10046 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10047
10048 * src/output.c (escaped_output): Renamed from
10049 escaped_file_name_output, since we now use it for symbol tags as
10050 well. All uses changed.
10051 (symbol_destructors_output, symbol_printers_output):
10052 Escape symbol tags too.
10053 Problem reported by Matyas Forstner in
10054 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10055
10056 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10057 not needed.
10058 * src/output.c (user_actions_output, token_definitions_output,
10059 symbol_destructors_output, symbol_printers_output): Likewise.
10060 * src/reader.c (prologue_augment): Likewise.
10061 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10062
10063 * src/vcg.c (output_edge): Don't quote linestyle arg.
10064 Problem reported by twlevo@xs4all.nl.
10065
10066 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10067
10068 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10069 example, reported by Derek M Jones. Also, make the example even
10070 more outrageous, to better illustrate how bad the problem is.
10071
10072 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10073
10074 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10075 putsym. Typo reported by Sebastian Piping.
10076
10077 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10078
10079 * doc/bison.texinfo (Language and Grammar): some -> same
10080 (Epilogue): int he -> in the
10081 Typos reported by Sebastian Piping via Justin Pence.
10082
10083 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10084
10085 * tests/glr-regression.at (Improper handling of embedded actions
10086 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10087 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10088 with dollar signs in test names.
10089 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10090 for a similar reason.
10091
10092 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10093
10094 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10095 wants to redefine G_VIEW.
10096
10097 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10098
10099 * src/vcg.c (get_view_str): Remove case for normal_view.
10100 Problem reported by twlevo@xs4all.nl.
10101
10102 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10103
10104 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10105 Problem reported by twlevo@xs4all.nl.
10106
10107 * doc/bison.texinfo: Change @dircategory from "GNU programming
10108 tools" to "Software development". Requested by Richard Stallman
10109 via Karl Berry.
10110
10111 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10112
10113 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10114 Problem reported by twlevo@xs4all.nl.
10115
10116 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10117
10118 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10119 keyword; it's not needed with modern compilers, and it doesn't
10120 affect correctness with older compilers. Suggested by
10121 twlevo@xs4all.nl.
10122
10123 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10124
10125 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10126 gcc -Wswitch-default.
10127 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10128 * data/yacc.c (yyparse): Likewise.
10129
10130 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10131
10132 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10133 already. Let config.h define any nonstandard values.
10134
10135 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10136
10137 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10138 for the benefit of slower hosts. Problem reported by
10139 Nelson H. F. Beebe.
10140
10141 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10142
10143 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10144 being defined and not used.
10145 * data/lalr1.cc (yyparse): Likewise.
10146 Use "if (false)" rather than "if (0)".
10147
10148 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10149
10150 * TODO: Mention that we should allow NUL bytes in tokens.
10151
10152 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10153
10154 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10155 Problem reported by Hans Aberg.
10156
10157 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10158
10159 * src/getargs.c (version): Happy new year; update overall
10160 program copyright date from 2004 to 2005.
10161
10162 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10163 Problem reported by Hans Aberg.
10164 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10165 (Output file names.): Add a test for the case when standard output
10166 is closed.
10167
10168 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10169
10170 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10171 to fix an oversight in the Bison 2.0 manual.
10172
10173 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10174
10175 * NEWS: Version 2.0. Reformat the existing news items since
10176 1.875, so that related items are grouped together.
10177 * configure.ac (AC_INIT): Bump version to 2.0.
10178 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10179
10180 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10181 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10182 otherwise, we're not testing alloca. Unfortunately there's no
10183 simple way to consult HAVE_ALLOCA here.
10184
10185 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10186 for yymsg, too.
10187
10188 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10189 hand. This avoids a warning about comparing int to size_t when
10190 GCC warnings are enabled.
10191
10192 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10193
10194 * NEWS: Bison-generated parsers no longer default to using the
10195 alloca function (when available) to extend the parser stack, due
10196 to widespread problems in unchecked stack-overflow detection.
10197 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10198 responsibility to set it to a positive value. This lets the user
10199 specify a value that is not a preprocessor constant.
10200 * data/yacc.c (YYMAXDEPTH): Likewise.
10201 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10202 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10203 to be a compile-time constant. However, explain the constraints on it.
10204 Also, explain the constraints on YYINITDEPTH.
10205 (Table of Symbols): Explain that alloca is no longer the default.
10206 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10207 to 1.
10208
10209 * doc/bison.texinfo (Location Default Action): Mention that n must
10210 be zero when k is zero. Suggested by Frank Heckenbach.
10211
10212 2004-12-22 Akim Demaille <akim@epita.fr>
10213
10214 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10215 (parser::state_type, parser::semantic_type, parser::location_type):
10216 Private, not public.
10217 (parser::parse): Return ints, not bool.
10218 Returning a bool introduces a problem: 0 corresponds to false, and
10219 it seems weird to return false on success. Returning true changes
10220 the conventions for yyparse.
10221 Alternatively we could return void and send an exception.
10222 There is no clear consensus (yet?).
10223 (state_stack, semantic_stack, location_stack): Rename as...
10224 (state_stack_type, semantic_stack_type, location_stack_type): these.
10225 Private, not public.
10226 * tests/c++.at: New.
10227 * tests/testsuite.at, tests/Makefile.am: Adjust.
10228
10229 2004-12-21 Akim Demaille <akim@epita.fr>
10230
10231 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10232
10233 2004-12-21 Akim Demaille <akim@epita.fr>
10234
10235 Don't impose std::string for filenames.
10236
10237 * data/lalr1.cc (b4_filename_type): New.
10238 (position::filename): Use it.
10239 (parser.hh): Move the inclusion of stack.hh and location.hh below
10240 the user code, so that needed headers for the filename type can be
10241 included first.
10242 Forward declare them before the user code.
10243 * tests/Makefile.am (check-local, installcheck-local): Pass
10244 TESTSUITEFLAGS to the TESTSUITE.
10245
10246 2004-12-20 Akim Demaille <akim@epita.fr>
10247
10248 Use more STL like names: my_class instead of MyClass.
10249
10250 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10251 (SemanticStack, SemanticType, StateStack, StateType)
10252 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10253 (Parser::value): Rename as...
10254 (location_stack, location_type, rhs_number_type, semantic_stack)
10255 (semantic_type, state_stack, state_type, token_number_type, stack)
10256 (slice, traits, parser::yylloc, parser::yylval): these.
10257
10258 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10259
10260 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10261
10262 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10263 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10264
10265 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10266
10267 Remove uses of 'short int' and 'unsigned short int'. This raises
10268 some arbitrary limits. It uses more memory but nowadays that's
10269 not much of an issue.
10270
10271 This change does not affect the generated parsers; that's a different
10272 task, as some users will want to conserve memory there.
10273
10274 Ideally we should use size_t to represent all object counts, and
10275 something like ptrdiff_t to represent signed differences of object
10276 counts; but that will require more code-cleanup than I have the
10277 time to do right now.
10278
10279 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10280 Use size_t, not int or short int, to count objects.
10281 * src/closure.c (nritemset, closure): Likewise.
10282 * src/closure.h (nritemset, closure): Likewise.
10283 * src/nullable.c (nullable_compute): Likewise.
10284 * src/print.c (print_core): Likewise.
10285 * src/print_graph.c (print_core): Likewise.
10286 * src/state.c (state_compare, state_hash): Likewise.
10287 * src/state.h (struct state): Likewise.
10288 * src/tables.c (default_goto, goto_actions): Likewise.
10289
10290 * src/gram.h (rule_number, rule): Use int, not short int.
10291 * src/output.c (prepare_rules): Likewise.
10292 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10293 errs, reductions): Likewise.
10294 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10295 Likewise.
10296 * src/tables.c (vector_number, tally, action_number,
10297 ACTION_NUMBER_MINIMUM): Likewise.
10298 * src/output.c (muscle_insert_short_int_table): Remove.
10299
10300 2004-12-17 Akim Demaille <akim@epita.fr>
10301
10302 * data/lalr1.cc: Extensive Doxygenation.
10303 (error_): Rename as...
10304 (error): this, since it is visible to the user.
10305 Adjust callers.
10306 (Parser::message): Now an automatic variable from...
10307 (Parser::yyreport_syntax_error_): here.
10308 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10309 Parser::error.
10310 * tests/input.at: Escape $.
10311
10312 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10313
10314 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10315 Parenthesize rhs to avoid obscure problems with mistakes like
10316 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10317 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10318 b4_rhs_location): Likewise.
10319 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10320 b4_rhs_location): Likewise.
10321
10322 2004-12-16 Akim Demaille <akim@epita.fr>
10323
10324 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10325 yacc.c: be sure to stay within yycheck_.
10326 * tests/actions.at: Re-enable C++ tests.
10327
10328 2004-12-16 Akim Demaille <akim@epita.fr>
10329
10330 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10331 real.
10332
10333 2004-12-16 Akim Demaille <akim@epita.fr>
10334
10335 Use #define to handle the %name-prefix.
10336
10337 * data/glr.c, data/yacc.c: Comment changes.
10338 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10339 so that one can refer to yylex in the parser file, and have it
10340 renamed, as is the case with other skeletons.
10341
10342 2004-12-16 Akim Demaille <akim@epita.fr>
10343
10344 Move lalr1.cc internals into yy*.
10345
10346 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10347 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10348 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10349 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10350 (empty_, final_, terror_, errcode_, ntokens_)
10351 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10352 (looka_, ilooka_, error_range_, nerrs_):
10353 Rename as...
10354 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10355 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10356 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10357 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10358 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10359 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10360 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10361 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10362 these.
10363
10364 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10365
10366 Fix some problems reported by twlevo at xs4all.
10367 * src/symtab.c (symbol_new): Report an error if the input grammar
10368 contains too many symbols. This is better than calling abort() later.
10369 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10370 (struct node, struct graph):
10371 Rename member expand to stretch. All uses changed.
10372 (struct graph): Remove member layoutalgorithm. All uses removed.
10373 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10374 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10375 All uses changed.
10376 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10377
10378 2004-12-15 Akim Demaille <akim@epita.fr>
10379
10380 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10381 Add more Doxygen comments.
10382 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10383 (report_syntax_error_, translate_): Rename as...
10384 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10385 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10386
10387 2004-12-15 Akim Demaille <akim@epita.fr>
10388
10389 * data/lalr1.cc (lex_): Rename as...
10390 (yylex_): this.
10391 Move the trace here.
10392 Take the %name-prefix into account.
10393 Reported by Alexandre Duret-Lutz.
10394
10395 2004-12-15 Akim Demaille <akim@epita.fr>
10396
10397 Simplify the C++ parser constructor.
10398
10399 * data/lalr1.cc (debug_): Rename as...
10400 (yydebug_): so that the parser's internals are always in the yy*
10401 pseudo namespace.
10402 Adjust uses.
10403 (b4_parse_param_decl): Remove the leading comma as it is now only
10404 called as unique argument list.
10405 (Parser::Parser): Remove the constructor accepting a location and
10406 an initial debugging level.
10407 Remove from the other ctor the argument for the debugging level.
10408 (debug_level_type, debug_level, set_debug_level): New.
10409
10410 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10411 constructor calls.
10412
10413 2004-12-15 Akim Demaille <akim@epita.fr>
10414
10415 Remove b4_root related material: failure experiment
10416 (which goal was to allow to derive from a class).
10417
10418 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10419 definitions and uses.
10420
10421 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10422
10423 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10424 not 2, since it's not portable to subtract 1 from the start of an
10425 array. The new item 0 is never set or used. All uses changed.
10426
10427 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10428 the default definition of YYLLOC_DEFAULT. Problem reported
10429 by Frank Heckenbach.
10430
10431 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10432
10433 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10434 the normal case and one for the error case. Just use the
10435 first one uniformly. Problem reported by Frank Heckenbach.
10436 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10437 use exactly the same macro in both places.
10438 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10439 so that the normal-case YYRHSLOC works for the error case too.
10440 All uses changed.
10441 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10442 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10443 * doc/bison.texinfo (Location Default Action): Don't claim that
10444 we have an array of locations. Use the same macro for both glr
10445 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10446 the index is 0.
10447
10448 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10449
10450 * HACKING: Update email addresses to send announcements to.
10451
10452 * configure.ac (AC_INIT): Bump version to 1.875f.
10453
10454 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10455
10456 * NEWS: Version 1.875e.
10457 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10458
10459 * src/scan-skel.l: Include "complain.h", for "fatal".
10460
10461 * src/relation.h (relation_print, relation_digraph):
10462 Relation sizes are of type relation_node, not size_t (this is
10463 merely a doc fix, since the two types are equivalent).
10464 (relation_transpose): Relation sizes are of type relation_node,
10465 not int.
10466 * src/relation.c: Likewise.
10467 (top, infinity): Now of type relation_node, not int.
10468 (traverse, relation_transpose): Use relation_node, not int.
10469
10470 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10471 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10472 (yyparse): Remove unused local introduced in 2004-10-25 patch.
10473
10474 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
10475 specifying whether the test should be skipped. Use it tp
10476 specify that the [%defines %skeleton "lalr1.cc"] tests currently
10477 fail on some hosts, and should be skipped.
10478
10479 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
10480
10481 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
10482 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10483 unless otherwise specified below.
10484
10485 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10486 to allocate kernel_base, kernel_items, kernel_size, since
10487 they needn't be initialized to 0.
10488 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10489 * src/closure.c (new_closure): Likewise, for itemset.
10490 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10491 * src/lalr.c (set_goto_map): Likewise, for temp_map.
10492 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10493 (build_relations): Likewise for edge, states1, includes.
10494 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10495 * src/reader.c (packgram): Likewise, for ritem, rules.
10496 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10497 * src/relation.c (relation_digraph): Likewise for VERTICES.
10498 (relation_transpose): Likewise for new_R, end_R.
10499 * src/symtab.c (symbols_token_translations_init): Likewise for
10500 token_translations.
10501 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10502 (token_actions): Likewise for yydefact, actrow, conflrow,
10503 conflict_list.
10504 (save_column): Likewise for froms[symno], tos[symno].
10505 (goto_actions): Likewise for state_count.
10506 (pack_table): Likewise for base, pos, check.
10507 (tables_generate): Likewise for width.
10508
10509 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10510 for initial core. Just have a separate core, so we needn't worry
10511 about whether kernel_size and kernel_base are initialized.
10512
10513 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10514 kernel_size, kernel_items): Remove unnecessary initialization.
10515 * src/conflicts.c (conflicts): Likewise.
10516 * src/derives.c (derives): Likewise.
10517 * src/muscle_tablc (muscle_insert): Likewise.
10518 * src/relation.c (relation_digraph): Likewise.
10519 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10520 conflrow, conflict_table, conflict_list, table, check):
10521 Likewise.
10522
10523 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10524 This is because all callers pass unsigned int.
10525 * src/closure.h (new_closure): Likewise.
10526
10527 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10528 (build_relations): Initialize includes[i] in all cases.
10529 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10530 and rules[ruleno].precsym. Initialize members in order.
10531 * src/relation.c (relation_transpose): Always initialize new_R[i]
10532 and end_R[i].
10533 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10534
10535 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10536 conflict_list[0] was always 0, but now it isn't initialized.
10537
10538 * src/table.c (table_grow): When conflict_table grew, the grown
10539 area wasn't cleared. Fix this.
10540
10541 * lib/.cvsignore: Add strdup.c, strdup.h.
10542 * m4/.cvsignore: Add strdup.m4.
10543
10544 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10545
10546 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10547 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10548 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10549 ngotos + 1 without checking for overflow.
10550 (build_relations): Use END_NODE, not -1, to denote end of edges.
10551 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10552 build_relations): Use goto_number, not int, for goto numbers.
10553 * src/tables.c (save_column, default_goto): Likewise.
10554
10555 2004-11-23 Akim Demaille <akim@epita.fr>
10556
10557 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10558 of #defining from yystype.
10559 Don't typedef yystype, C++ does not need it.
10560 This lets it possible to forward declare it as union.
10561
10562 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10563
10564 * bootstrap (gnulib_modules): Add extensions.
10565 Problem reported by Jim Meyering.
10566
10567 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10568
10569 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10570 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10571 src/system.h, src/tables.c: XFREE -> free, to accommodate
10572 recent change to gnulib xalloc.h.
10573 Problem reported by Jim Meyering.
10574
10575 2004-11-17 Akim Demaille <akim@epita.fr>
10576
10577 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10578
10579 2004-11-17 Akim Demaille <akim@epita.fr>,
10580 Alexandre Duret-Lutz <adl@gnu.org>
10581
10582 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10583 changes.
10584 (YYCDEBUG): Adjust.
10585 Use it instead of cdebug_.
10586 (Parser::debug_stream, Parser::set_debug_stream): New.
10587 (Parser::symprint_): Define cdebug_ for temporary backward
10588 compatibility.
10589 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10590 debug_stream ().
10591
10592 2004-11-17 Akim Demaille <akim@epita.fr>
10593
10594 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10595 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10596 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10597 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10598
10599 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10600
10601 * data/glr.c (yyloc_default): Remove; not used.
10602 Problem reported by Frank Heckenbach.
10603
10604 2004-10-25 Akim Demaille <akim@epita.fr>
10605
10606 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10607 Introduce another definition to address simple location arrays.
10608 (yyGLRStack): New member: yyerror_range.
10609 (yyrecoverSyntaxError, yyparse): Update it.
10610 (yyrecoverSyntaxError): Use it when shifting the error token to
10611 have an accurate range, equivalent to the one computed by both
10612 yacc.c and lalr1.cc.
10613 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10614 that column numbers start at column 0, as per GNU Coding
10615 Standards, the others tests, and the doc.
10616 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10617 Adjust to the above change (first column is 0).
10618 And adjust the location of the "<error>", now covering the whole
10619 line.
10620
10621 2004-10-22 Akim Demaille <akim@epita.fr>
10622 and Paul Eggert <eggert@cs.ucla.edu>
10623
10624 Remove some arbitrary limits on goto numbers and relations.
10625 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10626 initial values, since they're never used.
10627 (set_goto_map): ngotos is now unsigned, so test for overflow
10628 by seeing whether it wraps around to zero.
10629 * src/lalr.h (goto_number): Now size_t, not short int.
10630 (GOTO_NUMBER_MAXIMUM): Remove.
10631 * src/relation.c (relation_print, traverse, relation_transpose):
10632 Check for END_NODE rather than looking at sign.
10633 * src/relation.h (END_NODE): New macro.
10634 (relation_node): Now size_t, not short int.
10635
10636 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10637
10638 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10639 keyword, not an identifier. Problem reported by Baron Schwartz in
10640 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10641
10642 2004-10-11 Akim Demaille <akim@epita.fr>
10643
10644 * src/symtab.c (symbol_check_alias_consistency): Also check
10645 type names, destructors, and printers.
10646 Reported by Alexandre Duret-Lutz.
10647 Recode the handling of associativity and precedence in terms
10648 of symbol_precedence_set.
10649 Accept no redeclaration at all, not even equal to the previous
10650 value.
10651 (redeclaration): New.
10652 Use it to factor redeclaration complaints.
10653 (symbol_make_alias): Don't set the type of the alias, let
10654 symbol_check_alias_consistency do it as for other features.
10655 * src/symtab.h (symbol): Add new member prec_location, and
10656 type_location.
10657 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10658 * tests/input.at (Incompatible Aliases): New.
10659
10660 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10661
10662 .cvsignore fixes to accommodate gnulib changes,
10663 and the practice of naming build directories "_build".
10664 * .cvsignore: Add "_*". Sort.
10665 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10666 * m4/.cvsignore: Add "*_gl.m4".
10667
10668 2004-10-06 Akim Demaille <akim@epita.fr>
10669
10670 * src/parse-gram.y (add_param): Fix the truncation of trailing
10671 spaces.
10672
10673 2004-10-05 Akim Demaille <akim@epita.fr>
10674
10675 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10676 whether the reducion was empty or not. This leaves room to
10677 improve the use of YYLLOC_DEFAULT in such a case.
10678 lalr1.cc is still experimental, so changing this is acceptable.
10679 And finally, there are probably not many users who changed the
10680 handling of locations in GLR, so changing is admissible too.
10681
10682 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10683 empty reduction, set @$ to an empty location ending the previously
10684 stacked symbol.
10685 Adjust uses to make sure the code is triggered on empty
10686 reductions.
10687 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10688 expected output: empty reductions have empty locations.
10689
10690 2004-09-29 Akim Demaille <akim@epita.fr>
10691
10692 * data/lalr1.cc: Move towards a more standard C++ coding style
10693 for templates: Class < T > -> Class<T>.
10694
10695 2004-09-29 Akim Demaille <akim@epita.fr>
10696
10697 * data/lalr1.cc: Reinstall the former ctor, for sake of
10698 compatibility, but warn it will be removed.
10699 Move towards a more standard C++ coding style (i.e., type *var ->
10700 type* var).
10701
10702 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10703
10704 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10705 since it's less likely to work if NULs are involved in the future.
10706
10707 2004-09-27 Akim Demaille <akim@epita.fr>
10708
10709 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10710
10711 2004-09-27 Akim Demaille <akim@epita.fr>
10712
10713 * data/lalr1.cc (b4_parse_param_decl_1): New.
10714 (b4_parse_param_decl): Use it to have different names between attribute
10715 and argument names.
10716 (b4_cc_constructor_call): Likewise.
10717
10718 2004-09-24 Akim Demaille <akim@epita.fr>
10719
10720 * src/parse-gram.y (add_param): Strip the leading and trailing
10721 blanks from a formal argument declaration.
10722 (YY_LOCATION_PRINT): New.
10723
10724 2004-09-24 Akim Demaille <akim@epita.fr>
10725
10726 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10727 after the location.
10728
10729 2004-09-24 Akim Demaille <akim@epita.fr>
10730
10731 * doc/bison.texinfo (Table of Symbols): Sort.
10732
10733 2004-09-21 Akim Demaille <akim@epita.fr>
10734
10735 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10736 the useless parentheses.
10737 Suggested by Paul Eggert.
10738
10739 2004-09-20 Akim Demaille <akim@epita.fr>
10740
10741 Let the initial-action act on the look-ahead, and use it for the
10742 "initial push" (corresponding to an hypothetical beginning-of-file).
10743 And let lalr1.cc honor %initial-action.
10744
10745 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10746 example.
10747 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10748 (Parser::Parser): Remove the ctor that used to initialize it.
10749 (Parser::parse): Like in the other skeletons, issue the "starting
10750 parse" message before any action.
10751 Honor %initial-action.
10752 Initialize the stacks with the lookahead.
10753 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10754 look-ahead.
10755 Push them in the stacks.
10756 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10757
10758 2004-09-20 Akim Demaille <akim@epita.fr>
10759
10760 * doc/bison.texinfo (Initial Action Decl): New.
10761
10762 2004-09-20 Akim Demaille <akim@epita.fr>
10763
10764 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10765 clearer criterion to define it.
10766 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10767 When reducing on an empty RHS, use the latest stacked location as
10768 location.
10769 yylloc is not always available.
10770 * data/glr.c: Likewise.
10771 Also, honor initial-actions.
10772
10773 2004-09-20 Akim Demaille <akim@epita.fr>
10774
10775 * data/yacc.c (YY_LOCATION_PRINT): New.
10776 Define when we know YYLTYPE's structure, i.e., when the default
10777 YYLLOC_DEFAULT is used.
10778 * data/c.m4 (b4_yysymprint_generate): Use it.
10779 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10780 value of the result.
10781 (error_start_): Replace with...
10782 (error_range_): this location array.
10783 This allows to replace code relying on the implementation of
10784 locations by portable code.
10785 * data/yacc.c (yylerrsp): Replace with...
10786 (yyerror_range): this.
10787 Every time a token is popped, update yyerror_range[0], to have an
10788 accurate location for the error token.
10789 * data/glr.c (YY_LOCATION_PRINT): New.
10790 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10791 deference a pointer.
10792 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10793 report the location in %printers.
10794
10795 * src/scan-skel.l: Instead of abort, report error messages to ease
10796 understanding skeleton scanning failures.
10797
10798 2004-09-16 Akim Demaille <akim@epita.fr>
10799
10800 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10801 (iterator, const_iterator): these, to be more in the C++ spirit.
10802 Also, return reverse iterators so that when displaying the stack
10803 we display its bottom first.
10804 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10805 from yacc.c.
10806 We should probably use vector here though.
10807
10808 2004-09-16 Akim Demaille <akim@epita.fr>
10809
10810 Have more complete shift traces.
10811
10812 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10813 to report Shifts instead of ad hoc YYDPRINTF invocations,
10814 including for the error token.
10815 * data/lalr1.cc (symprint_): Output the location.
10816 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10817 output the location within the %printer.
10818 Activate GLR tests, at least to make sure they compile properly.
10819 They still don't pass though.
10820 * tests/calc.at: Adjust expect verbose output, since now "Entering
10821 state..." is on a different line than the "Shifting" message.
10822
10823 2004-09-08 Akim Demaille <akim@epita.fr>
10824
10825 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10826 Bison directive from the Bison file to the invocation of this
10827 macro, so that these directives are passed to
10828 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10829 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10830 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10831 the extra Bison directives instead of the whole series.
10832 Change the grammar so that there are recoverable errors, and
10833 unrecoverable errors. Now we can have the parser give up before
10834 consuming the whole input. As a result we now can observe that
10835 the lookahead is freed when needed.
10836 Change the parser source to parse argv[1] instead of a hard coded
10837 string.
10838 Simplify yylex, and give a value and location to EOF.
10839 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10840 passed directives already coded in the file.
10841 Add some tests to check the location of "error".
10842 For some tests, the C++ parser is correct, and not yacc.c.
10843 For other tests, they provide different, but unsatisfying, values,
10844 so keep the C++ value so that at least one parser is "correct"
10845 according to the test suite.
10846 (Actions after errors): Remove, this is subsumed by the
10847 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10848
10849 2004-09-06 Akim Demaille <akim@epita.fr>
10850
10851 * data/lalr1.cc: Adjust the indentation of the labels.
10852 (Parser::pop): New.
10853 Use it.
10854
10855 2004-09-06 Akim Demaille <akim@epita.fr>
10856
10857 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
10858 argument, an informative message.
10859 Call YY_SYMBOL_PRINT.
10860 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
10861 * data/lalr1.cc (destruct_): Likewise.
10862 In addition, no longer depend on b4_yysymprint_generate and
10863 b4_yydestruct_generate to generate these functions, do it "by
10864 hand".
10865
10866 2004-09-03 Akim Demaille <akim@epita.fr>
10867
10868 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
10869 invoked, yydestruct the lookahead.
10870 * tests/calc.at (Calculator $1): Update the expected lengths of
10871 traces: there is an added line for the discarded lookahead.
10872 * doc/bison.texinfo (Destructor Decl): Some rewording.
10873 Define "discarded" symbols.
10874
10875 2004-09-02 Akim Demaille <akim@epita.fr>
10876
10877 * data/lalr1.cc (translate_, destruct_): No reason to be static.
10878
10879 2004-09-02 Akim Demaille <akim@epita.fr>
10880
10881 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
10882 (YYDSYMPRINTF): Rename as...
10883 (YY_SYMBOL_PRINT): this.
10884 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
10885 two.
10886 Use it instead of direct symprint_ calls.
10887 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
10888 one.
10889
10890 2004-09-02 Akim Demaille <akim@epita.fr>
10891
10892 * data/lalr1.cc (b4_yysymprint_generate): New.
10893 (symprint_): New member function, defined when YYDEBUG.
10894 Use it consistently instead of token/nterm debugging output by
10895 hand.
10896 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
10897 %printer calls to use cdebug_ when using lalr1.cc.
10898
10899 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
10900
10901 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
10902 with #ifdef YYDEBUG.
10903
10904 2004-08-26 Akim Demaille <akim@epita.fr>
10905
10906 * doc/bison.texinfo (Implementing Loops): Rename as...
10907 (Implementing Gotos/Loops): this.
10908
10909 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
10910
10911 Adjust to latest gnulib.
10912 * bootstrap (gnulib_modules): Add xalloc-die.
10913 Set LC_ALL=C so that file names sort consistently.
10914 Prefer the gnulib copies of gettext.m4, glibc21.m4,
10915 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
10916 uintmax_t.m4, ulonglong.m4.
10917 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
10918 po.m4 since we are now using _gl.m4 instead.
10919
10920 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
10921
10922 * src/scan-action.l: Remove. Scanning of semantic actions is
10923 handled in scan-gram.l.
10924
10925 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
10926
10927 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
10928
10929 * src/location.h (struct): The file member is a uniqstr.
10930 (equal_boundaries): Use UNIQSTR_EQ for comparison.
10931
10932 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
10933
10934 Fix bug with non-%union parsers that have printers or destructors,
10935 which led to a Bison core dump. Reported by Peter Fales in
10936 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
10937
10938 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
10939 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
10940 not to our own type.
10941 * src/output.c (symbol_destructors_output, symbol_printers_output):
10942 Don't assume %union.
10943 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
10944 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
10945 UNION-FLAG. All callers changed.
10946 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
10947 Use type char, not unsigned int, when declaring an array of char;
10948 this lets us remove a cast.
10949 (Printers and Destructors): Add non-%union test cases.
10950
10951 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10952
10953 * doc/bison.texinfo: Minor editorial changes, mostly to the new
10954 GLR writeups. E.g., avoid frenchspacing and the future tense,
10955 change "lookahead" to "look-ahead", and change "wrt" to "with
10956 respect to".
10957
10958 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10959
10960 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
10961 New sections, split off from the GLR Parsers section. Put the new
10962 Simple GLR Parser near the start of the GLR section, for clarity.
10963 Rewrite connective text.
10964
10965 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
10966
10967 * doc/bison.texinfo (Simple GLR Parsers): New section.
10968
10969 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10970
10971 * NEWS, TODO, doc/bison.texinfo:
10972 Use "look-ahead" instead of "lookahead", to be consistent.
10973 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
10974 while we're fixing "look-ahead".
10975 * src/conflicts.c (shift_set): Renamed from shiftset.
10976 (look_ahead_set): Renamed from lookaheadset.
10977 * src/print.c: Likewise.
10978 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
10979 name for "lookahead".
10980 (report_types, usage): Likewise.
10981 * src/getargs.h (report_look_ahead_tokens): Renamed from
10982 report_lookaheads.
10983 * src/lalr.c (compute_look_ahead_tokens): Renamed from
10984 compute_lookaheads.
10985 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
10986 (look_ahead_tokens_print): Renamed from lookaheads_print.
10987 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
10988 state_rule_lookaheads_print.
10989 * src/state.h: Likewise.
10990 (reductions.look_ahead_tokens): Renamed from lookaheads.
10991 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
10992 AT_DATA_LOOKAHEADS_GRAMMAR.
10993
10994 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
10995
10996 * README: Update location of patched M4 distribution.
10997
10998 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
10999
11000 Don't assume the C++ compiler takes the same arguments as the C compiler
11001 (trivial change).
11002 * configure.ac (O0CXXFLAGS): New var.
11003 * tests/atlocal.in (CXXFLAGS): Use it.
11004
11005 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11006
11007 Fix some "make check" problems with C++ reported by
11008 Albert Chin-A-Young for Tru64 C++ in this thread:
11009 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11010
11011 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11012 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11013 Output to a .cc file for C++, not to a .c file.
11014 * tests/calc.at (AT_CHECK_CALC): Likewise.
11015 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11016 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11017
11018 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11019
11020 * tests/calc.at, tests/actions.at: Workaround for SGI
11021 C++ compiler. (trivial change)
11022
11023 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11024
11025 Spent a few hours checking out which prerequisite versions the
11026 current sources actually require. I went all the way back to
11027 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11028 a seemingly endless set of combinations of versions more recent
11029 than that. The bottom line is that the current sources require
11030 fairly recent versions of the build tools, and it'll be some work
11031 to change this.
11032 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11033 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11034 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11035 Add comments explaining why those particular versions are
11036 currently needed.
11037
11038 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11039 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11040 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11041
11042 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11043 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11044
11045 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11046
11047 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11048 0.11.5. Suggested by Bruno Haible.
11049 * bootstrap: Remove gettext version checking.
11050
11051 * doc/bison.texinfo (Decl Summary): Also mention that %union
11052 can depend on prerequisite types. Problem reported by Tim
11053 Van Holder.
11054
11055 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11056
11057 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11058 * README-alpha: Don't tell people not to package this.
11059
11060 * bootstrap: Don't assume $(...) works; use `...` instead.
11061 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11062 gettext better.
11063
11064 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11065 put into the -d output file, and mention what to do if YYSTYPE is
11066 defined as a macro.
11067
11068 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11069
11070 Undo change made earlier today: it caused autopoint to not bring
11071 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11072 autopoint's.
11073
11074 * bootstrap: Check that gettext version matches what's in
11075 configure.ac. Warn users to ignore robots.txt ERROR 404.
11076 * bootstrap: Undo today's earlier change (logged below).
11077 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11078
11079 The gettext version checking is causing more trouble than it's
11080 curing; remove it. Problem reported by Paul Hilfinger.
11081
11082 * bootstrap: Issue a warning that one can expect a message
11083 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11084 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11085
11086 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11087
11088 Ensure that the C++ compiler used for testing actually works on a
11089 simple test program; if not, skip the C++-related tests. Problem
11090 reported by Vin Shelton in:
11091 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11092
11093 * m4/cxx.m4: New file.
11094 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11095 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11096 * tests/local.at (AT_COMPILE_CXX): Use it.
11097
11098 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11099
11100 * data/glr.c (yylloc): Output this macro even if locations are not
11101 being generated, as the GLR parser needs it even in that case.
11102 Problem reported by Troy A. Johnson
11103 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11104
11105 * configure.ac (AC_INIT): Update to 1.875e.
11106
11107 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11108
11109 * NEWS: Version 1.875d.
11110 * configure.ac (AC_INIT): Likewise.
11111 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11112
11113 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11114 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11115 lalr1.cc runs afoul of the first, and the last two are no longer
11116 supported by GCC 3.4.0.
11117 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11118 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11119
11120 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11121
11122 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11123 unsigned int, for compatibility with latest gnulib hash module.
11124 * src/state.c (state_hash, state_hasher): Likewise.
11125 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11126 * src/uniqstr.c (hash_uniqstr): Likewise.
11127
11128 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11129
11130 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11131
11132 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11133 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11134 character and string literals.
11135 (unexpected_end): New function.
11136 (unexpected_eof): Use it.
11137 (unexpected_newline): New function.
11138 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11139 actions.
11140
11141 * NEWS: Document %expect-rr.
11142
11143 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11144 Fix typo by replacing $1 with $option.
11145 Remove more 'intl'-related files.
11146 Don't DEFUN AM_INTL_SUBDIR twice.
11147
11148 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11149 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11150 strtoul.c.
11151 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11152 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11153 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11154 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11155 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11156 * src/.cvsignore: Add *.output.
11157
11158 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11159 gets copied to the output file.
11160
11161 2004-04-28 Paul Eggert <eggert@twinsun.com>
11162
11163 Get files from the gnulib and po repositories, instead of relying
11164 on them being in our CVS. Upgrade to latest versions of gnulib
11165 and Automake.
11166
11167 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11168 * bootstrap: Bootstrap from gnulib and po repositories.
11169 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11170 * README-cvs: Document these changes. Remove version numbers from
11171 mentions of build tools, since they change so often. Mention Flex.
11172
11173 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11174 (gl_USE_SYSTEM_EXTENSIONS): Add.
11175 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11176 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
11177 does this for us.
11178 (AC_ISC_POSIX): Remove; we no longer support this
11179 ancient OS, as it gets in the way of latest Autoconf & gnulib.
11180 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11181 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11182 Do not check for C89 headers, except for locale.h which is used
11183 by the Yacc library and must port to K&R hosts.
11184 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11185 Do not check for C89 functions, except for setlocale which is
11186 used by the Yacc library.
11187 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11188 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11189 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11190 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11191 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11192 AM_GNU_GETTEXT): Remove; now done by:
11193 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11194 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11195 for us.
11196
11197 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11198 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11199 Define to empty, as gnulib.mk will do the rest for us.
11200 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11201 for us.
11202 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11203 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11204
11205 * src/files.c: Include gnulib's xstrndup.h.
11206
11207 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11208 (REALLOC): Use xnrealloc, for likewise.
11209 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11210 (strnlen, memrchr): Remove decls; functions no longer used.
11211 Include <stpcpy.h>.
11212
11213 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11214 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11215 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11216 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11217 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11218 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11219 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11220 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11221 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11222 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11223 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11224 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11225 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11226 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11227 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11228 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11229 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11230 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11231 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11232 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11233 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11234 Remove, as these files are now generated automatically
11235 by bootstrap or automake.
11236
11237 * po/ChangeLog: Remove: all but one entry was a duplicate
11238 of this file, and I moved that 2000-11-02 entry here.
11239
11240 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11241 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11242 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11243 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11244 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11245 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11246 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11247 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11248 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11249 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11250 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11251 xstrndup.h.
11252 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11253 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11254 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11255 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11256 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11257 * src/.cvsignore: Remove *_.c.
11258
11259
11260 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11261 support it. (The latest stable gzip doesn't.)
11262
11263 2004-04-27 Paul Eggert <eggert@twinsun.com>
11264
11265 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11266 case, as stos_ is now used by destructors due to the 2004-02-09
11267 change.
11268
11269 Remove more K&R C support.
11270 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11271 * lib/subpipe.c (errno): Remove decl.
11272 Include <stdlib.h> unconditionally.
11273 (EXIT_FAILURE): Remove macro.
11274 * src/complain.c (vfprintf, strerror): Remove.
11275 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11276 unconditionally.
11277 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11278 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11279 (strchr, strspn, memchr): Remove decls.
11280 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11281 unconditionally. Do not declare perror.
11282 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11283 unconditionally.
11284
11285 * src/complain.c (_): Remove useless defn, as system.h defines this.
11286
11287 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11288 with latest obstack.h.
11289 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11290 to procedure types, as obstack.h now does that for us.
11291 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11292
11293 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11294 so that this include file can stand alone.
11295 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11296 does this now. Include subpipe.h first after config.h, to
11297 test whether it can stand alone.
11298
11299 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11300 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11301 unused declaration.
11302
11303 * tests/synclines.at (%union synch line): Put a dummy member in
11304 the union, because empty unions aren't allowed in C. Caught
11305 by GCC 3.4.0.
11306
11307 2004-04-13 Jim Meyering <jim@meyering.net>
11308
11309 * src/conflicts.c (conflicts_print): Correct format string typo:
11310 use `%%' to produce literal `%'. (trivial change)
11311
11312 2004-03-30 Paul Eggert <eggert@twinsun.com>
11313
11314 * src/getargs.c (version): Update copyright year to 2004.
11315
11316 * data/c.m4 (b4_int_type): Use 'short int' rather than
11317 'short', and similarly for 'long', 'unsigned', etc.
11318 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11319 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11320 yy_yypstack, yydumpstack): Likewise.
11321 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11322 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11323 Likewise.
11324 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11325 yy_stack_print, yyparse): Likewise.
11326 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11327 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11328 * lib/bitset.c (bitset_print): Likewise.
11329 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11330 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11331 * lib/bitsetv.c (bitsetv_dump): Likewise.
11332 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11333 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11334 Likewise.
11335 * src/LR0.c (allocate_itemsets): Likewise.
11336 * src/gram.h (rule_number, rule): Likewise.
11337 * src/lalr.h (goto_number): Likewise.
11338 * src/nullable.c (nullable_compute): Likewise.
11339 * src/output.c (prepare_rules): Likewise.
11340 * src/relation.c (relation_print, relation_digraph): Likewise.
11341 * src/relation.h (relation_node): Likewise.
11342 * src/state.h (state_number, transitions, errs, reductions,
11343 struct state): Likewise.
11344 * src/symtab.h (symbol_number, struct symbol): Likewise.
11345 * src/tables.c (vector_number, tally, action_number,
11346 default_goto, goto_actions): Likewise.
11347 * tests/existing.at (GNU Cim Grammar): Likewise.
11348 * tests/regression.at (Web2c Actions): Likewise.
11349
11350 * src/output.c (muscle_insert_short_int_table): Renamed from
11351 muscle_insert_short_table. All uses changed.
11352
11353 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11354
11355 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11356 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11357 Add %expect-rr rule.
11358
11359 * src/scan-gram.l: Recognize %expect-rr.
11360
11361 * src/conflicts.h (expected_sr_conflicts): Rename from
11362 expected_conflicts.
11363 (expected_rr_conflicts): Declare.
11364
11365 * src/conflicts.c (expected_sr_conflicts): Rename from
11366 expected_conflicts.
11367 (expected_rr_conflicts): Define.
11368 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11369 for GLR parsers.
11370 Use expected_sr_conflicts in place of expected_conflicts.
11371 Warn if expected_rr_conflicts used in non-GLR parser.
11372
11373 * doc/bison.texinfo: Add documentation for %expect-rr.
11374
11375 2004-03-08 Paul Eggert <eggert@gnu.org>
11376
11377 Add support for hex token numbers. Suggested by Odd Arild Olsen in
11378 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
11379
11380 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11381 in lalr1.cc.
11382 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11383 * src/scan-gram.l (scan_integer): New function.
11384 ({int}): Use it.
11385 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11386 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11387 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11388 Say "long int", not "long", for uniformity with GNU style.
11389
11390 2004-02-25 Paul Eggert <eggert@twinsun.com>
11391
11392 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11393 compilers. This fixes a problem with Intel's C++ compiler being
11394 chatty, reported by Guido Trentalancia in
11395 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
11396
11397 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11398
11399 Support %destructor and merge error locations in lalr1.cc.
11400
11401 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11402 (Parser::stos_): Define unconditionally.
11403 (Parser::destruct_): New method. Generate its body with
11404 b4_yydestruct_generate.
11405 (Parser::error_start_): New attribute.
11406 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11407 token which are discarded.
11408 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11409 error_start_ when erroneous token are discarded.
11410 (Parser::parse) <yyerrlab1>: Compute the location of the error
11411 token so that it covers all the discarded tokens.
11412 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11413 it can be called with `%skeleton "lalr1.cc"', and do that.
11414
11415 2004-02-02 Paul Eggert <eggert@twinsun.com>
11416
11417 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11418 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11419 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11420 There's no need to mention top_builddir since Automake does that
11421 for us.
11422 (INCLUDES): Remove, as Automake says it's obsolescent.
11423 Contents migrated into AM_CPPFLAGS as described above.
11424 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11425
11426 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11427
11428 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11429 (yyreportSyntaxError): Handle case where lookahead token is
11430 YYEMPTY.
11431
11432 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11433
11434 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11435 resulting parsers are compilable with C++.
11436
11437 2003-12-23 Paul Eggert <eggert@twinsun.com>
11438
11439 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11440 * src/output.c (output_skeleton): Rename local var.
11441 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11442 Bison tokens, as this runs afoul of the 2003-10-07 change that
11443 disallowed NUL bytes in character constants or string literals.
11444
11445 * tests/local.at: Require Autoconf 2.59's Autotest.
11446 * tests/testsuite.at: Don't include local.at, since we now assume
11447 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11448 including it.
11449 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11450 multiple inclusion warnings.
11451
11452 2003-12-02 Akim Demaille <akim@epita.fr>
11453
11454 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11455 conditions.
11456 From Bruno Haible.
11457
11458 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
11459
11460 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11461
11462 2003-10-07 Paul Eggert <eggert@twinsun.com>
11463
11464 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11465 if testsuite doesn't exist.
11466
11467 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11468 literals, unfortunately.
11469 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11470 Complain about NUL bytes in character constants or string literals.
11471
11472 2003-10-05 Paul Eggert <eggert@twinsun.com>
11473
11474 * NEWS: Don't document %no-default-prec, as it's still
11475 too experimental.
11476 * doc/bison.texinfo: Document %no-default-prec only if
11477 the defaultprec flag is set. Normally it's not.
11478
11479 2003-10-04 Paul Eggert <eggert@twinsun.com>
11480
11481 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11482 non-modifiable lvalue, instead of a modifiable one.
11483 * doc/bison.texinfo (Actions): Document that $$ can
11484 be assigned to. Do not claim that $$ and $N are
11485 array element references: user code should not rely on this.
11486
11487 2003-10-01 Paul Eggert <eggert@twinsun.com>
11488
11489 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11490 (grammar_declaration): Use it.
11491 * src/scan-gram.l: New token %no-default-prec.
11492 * tests/conflicts.at: Revamp tests to use %no-default-prec.
11493 * NEWS, doc/bison.texinfo: Document the above.
11494
11495 2003-10-01 Akim Demaille <akim@epita.fr>
11496
11497 VCG no longer supports long_straight_phase.
11498
11499 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11500 * src/print_graph.c (print_graph): Adjust.
11501
11502 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
11503 and Paul Eggert <eggert@twinsun.com>
11504
11505 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11506 Table of Symbols): Document %default-prec.
11507 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11508 (grammar_declaration): Set default_prec on %default-prec.
11509 * src/scan-gram.l (%default-prec): New token.
11510 * src/reader.h (default_prec): New flag.
11511 * src/reader.c: Likewise.
11512 (packgram): Handle it.
11513 * tests/conflicts.at (%default-prec without %prec,
11514 %default-prec with %prec, %default-prec 1): New tests.
11515
11516 2003-09-30 Paul Eggert <eggert@twinsun.com>
11517
11518 * tests/testsuite.at: Include local.at, not input.at, fixing
11519 a typo in the 2003-08-25 patch.
11520
11521 2003-08-27 Akim Demaille <akim@epita.fr>
11522
11523 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11524 GCC warnings.
11525
11526 2003-08-26 Akim Demaille <akim@epita.fr>
11527
11528 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11529 "<\#" to avoid magic from Gnus when posting parts of this script.
11530
11531 2003-08-26 Akim Demaille <akim@epita.fr>
11532
11533 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11534 (Parser::parse): here.
11535 Adjust: nerrs and errstatus is now replaced by...
11536 (Parser::nerrs_, Parser::errstatus_): New.
11537
11538 2003-08-25 Akim Demaille <akim@epita.fr>
11539
11540 * config/announce-gen, Makefile.cfg: New.
11541 * Makefile.am: Adjust.
11542 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11543 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11544
11545 2003-08-25 Akim Demaille <akim@epita.fr>
11546
11547 When reducing initial empty rules, Bison parser read an initial
11548 location that is not defined. This results in garbage, and that
11549 affects Bison's own parser. Therefore we need (i) to extend Bison
11550 to support a means to initialize this location, and (ii) to use
11551 this CVS Bison to fix CVS Bison's parser.
11552
11553 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11554 with...
11555 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11556 * src/parse-gram.y: Adjust.
11557 (%initial-action): New.
11558 (%error-verbose): Since we require CVS Bison, there is no reason
11559 not to use it.
11560 * src/scan-gram.l: Adjust.
11561 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11562 * data/yacc.c (yyparse): Use b4_initial_action.
11563
11564 2003-08-25 Akim Demaille <akim@epita.fr>
11565
11566 * doc/bison.texinfo: Don't promote stdout for error messages.
11567
11568 2003-08-25 Akim Demaille <akim@epita.fr>
11569
11570 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11571 From Alexandre Duret-Lutz.
11572
11573 2003-08-25 Akim Demaille <akim@epita.fr>
11574
11575 Version 1.875c.
11576
11577 2003-08-25 Akim Demaille <akim@epita.fr>
11578
11579 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11580 Use them.
11581
11582 2003-08-25 Akim Demaille <akim@epita.fr>
11583
11584 * data/lalr1.cc (Parser::reduce_print_): New.
11585 Use it.
11586
11587 2003-08-25 Akim Demaille <akim@epita.fr>
11588
11589 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11590 error recovery loops. This patch is based on
11591 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
11592 Also, augment the similarity between lalr1.cc and yacc.c.
11593 Note: the locations of error recovery rules are not correct yet.
11594
11595 * data/lalr1.cc: Comment changes to augment the similarity between
11596 lalr1.cc and yacc.c.
11597 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11598 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11599 yyerrlab), when hitting EOF, pop the whole stack here instead of
11600 merely falling thru the default error handling mechanism.
11601 (yyerrorlab): New label, with the old contents of YYERROR,
11602 plus the following change: pop the stack of rhs corresponding
11603 to the production that invoked YYERROR. That is how Yacc
11604 behaves (required by POSIX).
11605 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11606 fail.
11607
11608 2003-08-25 Akim Demaille <akim@epita.fr>
11609
11610 Tune local.at so that people can "autom4te -l autotest calc.at -o
11611 calc" for instance, to extract a sub test suite.
11612
11613 * tests/testsuite.at: Move the initialization, Autotest version
11614 requirement, and AT_TESTED invocation into...
11615 * tests/local.at: here.
11616 * tests/testsuite.at: Include it for compatibility with Autoconf
11617 2.57.
11618 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11619 be ignore.
11620
11621 2003-08-04 Paul Eggert <eggert@twinsun.com>
11622
11623 Rework code slightly to avoid gcc -Wtraditional warnings.
11624 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11625 The returned value is now stored in *YY0. All callers changed.
11626 * src/output.c (merge_output): Adjust to the above change.
11627
11628 2003-07-26 Paul Eggert <eggert@twinsun.com>
11629
11630 * data/glr.c (YYASSERT): New macro.
11631 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11632 yyresolveStates, yyprocessOneStack):
11633 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11634 Derived from a suggestion by Frank Heckenbach.
11635
11636 2003-07-25 Paul Eggert <eggert@twinsun.com>
11637
11638 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11639 for portability to K&R C (after ansi2knr, presumably). See
11640 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
11641 by Frank Heckenbach, though I have omitted the structure-initialization
11642 part of his glr-knr.diff patch since I recall that the Portable
11643 C Compiler didn't require that change.
11644
11645 Let the user specify how to allocate and free memory.
11646 Derived from a suggestion by Frank Heckenbach in
11647 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
11648 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11649 All uses of free, malloc, realloc changed to use these macros,
11650 and unnecessary casts removed.
11651 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11652
11653 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11654
11655 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11656 use s.empty() rather than s == "" to test for empty string; see
11657 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
11658 (trivial change)
11659
11660 2003-06-25 Akim Demaille <akim@epita.fr>
11661
11662 * config/depcomp, config/install-sh: Update from masters.
11663
11664 2003-06-20 Paul Eggert <eggert@twinsun.com>
11665
11666 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11667 and return properly parenthesized result.
11668 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11669 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11670 Remove unnecessary parentheses from uses.
11671 * doc/bison.texinfo (Location Default Action): Describe the
11672 conventions for parentheses.
11673
11674 2003-06-19 Paul Eggert <eggert@twinsun.com>
11675
11676 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11677 yyreportTree): Do not assume that size_t is the same width as int,
11678 when printing sizes. Print sizes using an unsigned format.
11679 Problem reported by Frank Heckenbach in
11680 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
11681
11682 Port to Forte Developer 7 C compiler.
11683 * data/glr.c (struct YYLTYPE): If locations are not being used,
11684 declare a single dummy member, as empty structs do not conform
11685 to the C standard.
11686 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11687 the Forte Developer 7 C compiler complains that end-of-loop
11688 code is not reached.
11689
11690 2003-06-17 Paul Eggert <eggert@twinsun.com>
11691
11692 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11693 avoid warnings from picky compilers about redefinition of PARAMS.
11694
11695 2003-06-17 Paul Eggert <eggert@twinsun.com>
11696
11697 Version 1.875b.
11698
11699 * NEWS: Document 1.875b.
11700
11701 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11702 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11703 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11704 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11705 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11706 per recent gettext manual's suggestion.
11707 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11708 Use prototypes, not old-style definitions.
11709 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11710 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11711 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11712 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11713 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11714 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11715 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11716 vbitset_or_and_cmp, vbitset_copy): Likewise.
11717
11718 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11719 Do not include <stdlib.h>.
11720 (PARAMS): Define unconditionally for C89.
11721 (ATTRIBUTE_NORETURN): Remove.
11722 (ATTRIBUTE_UNUSED): Define unconditionally.
11723
11724 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
11725 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
11726 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11727 * lib/vbitset.c, lib/vbitset.h: New files.
11728 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11729 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11730 from libbitset.
11731
11732 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11733 `How Can I Reset @code{yyparse}', since texinfo does not allow
11734 arbitrary @ in node names.
11735
11736 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11737 shouldn't be needed according to the gettext 0.12.1 documentation
11738 but which seem to be needed anyway: codeset.m4 glibc21.m4
11739 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
11740 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
11741 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
11742
11743 * lib/.cvsignore: Add stdbool.h.
11744 * m4/.cvsignore: Add nls.m4, po.m4.
11745
11746 Upgrade to CVS gnulib.
11747 * stdbool_.h: File renamed from stdbool.h.in.
11748 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11749 AC_HEADER_STDBOOL.
11750 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11751 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11752 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11753 (MOSTLYCLEANFILES): New var.
11754 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11755 (stdbool.h): New rule.
11756 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11757 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11758 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11759 m4/quote.m4: Upgrade to today's gnulib.
11760
11761 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11762 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11763 the tests right now.
11764 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11765 yyerror are declared before use; C99 requires this.
11766
11767 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11768
11769 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11770 first.
11771 (yyrecoverSyntaxError): Correct the logic for setting and testing
11772 yyerrState.
11773 Correct comment on handling EOF.
11774 Allow states with only a default reduction, rather than failing
11775 (I can't quite reconstruct why these were not allowed before).
11776
11777 Fixes to avoid problem that $-N rules in GLR parsers can cause
11778 buffer overruns, corrupting state.
11779
11780 * src/output.c (prepare_rules): Output max_left_semantic_context
11781 definition.
11782 * src/reader.h (max_left_semantic_context): New variable declaration.
11783 * src/scan-gram.l (max_left_semantic_context): Define.
11784 (handle_action_dollar): Update max_left_semantic_context.
11785 * data/glr.c (YYMAXLEFT): New definition.
11786 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11787 (yyresolveAction): Ditto.
11788
11789 Fixes to problems with location handling in GLR parsers reported by
11790 Frank Heckenbach (2003/06/05).
11791
11792 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11793 (YYRHSLOC): Add parentheses, and define only if locations used.
11794 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11795 locations not used.
11796 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11797 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
11798
11799 * tests/cxx-type.at: Exercise location information; update tests
11800 to differentiate output with and without locations.
11801 Remove forward declarations of yylex and yyerror---caused errors
11802 because default YYLTYPE not yet defined.
11803 Change semantic actions to compute strings, rather than printing
11804 them directly (to test proper passing of semantics values). Change
11805 output to prefix notation and update test data and expected results.
11806 (yylex): Track locations.
11807 (stmtMerge): Return value rather than printing, and include arguments
11808 in value.
11809
11810 2003-06-03 Paul Eggert <eggert@twinsun.com>
11811
11812 Avoid warnings generated by GCC 2.95.4 when Bison is
11813 configured with --enable-gcc-warnings.
11814 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11815 yy::]b4_parser_class_name[::translate_,
11816 yy::Stack::operator[] (unsigned),
11817 yy::Stack::operator[] (unsigned) const,
11818 yy::Slice::operator[] (unsigned),
11819 yy::Slice::operator[] (unsigned) const):
11820 Rename local vars to avoid warnings.
11821 * tests/glr-regression.at (Improper handling of embedded actions
11822 and $-N in GLR parsers): Remove unused local variable from yylex.
11823 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11824 (void) as arg when not pure, since we now assume C89 when building
11825 Bison. Pacify GCC by using parameter.
11826
11827 2003-06-02 Paul Eggert <eggert@twinsun.com>
11828
11829 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11830 yy::Location::lines, yy::Location::columns): Rename arguments
11831 to avoid shadowing; this removes a warning generated by GCC 3.3.
11832
11833 2003-06-01 Paul Eggert <eggert@twinsun.com>
11834
11835 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11836 to g++, as GCC 3.3 complains if you do it.
11837 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11838 everything that WARNING_CFLAGS has, except omit warnings
11839 not suitable for C++.
11840 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11841 * tests/atlocal.in (CXXFLAGS): New var.
11842 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11843
11844 Fix a GLR parser bug I reported in February; see
11845 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
11846 The problem was that GLR parsers did not conform to the C standard,
11847 because actions like { $1 = $2 + $3; } expanded to expressions
11848 that invoked YYFILL in separate subexpressions, and YYFILL assigned
11849 to a local variable. The C standard says that expressions
11850 like (var = f ()) + (var = f ()) have undefined behavior.
11851 Another problem was that GCC sometimes issues warnings that
11852 yyfill and its parameters are unused.
11853
11854 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
11855 as possibly unused.
11856 (yyfill): New function.
11857 (YYFILL): Use it.
11858 (yyuserAction): Change type of yynormal to bool, so that it matches
11859 the new yyfill signature. Mark it as possibly unused.
11860
11861
11862 Follow up on a bug I reported in February, where a Bison-generated
11863 parser can loop. Provide a test case and a fix for yacc.c. I
11864 don't have a fix for lalr1.cc or for glr.c, unfortunately.
11865 The original bug report is in:
11866 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
11867
11868 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
11869 macro's size was becoming unwieldy.
11870 (yyerrlab): Do not discard an empty lookahead symbol, as this
11871 might destroy garbage.
11872 (yyerrorlab): New label, with the old contents of YYERROR,
11873 plus the following change: pop the stack of rhs corresponding
11874 to the production that invoked YYERROR. That is how Yacc
11875 behaves, and POSIX requires this behavior.
11876 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
11877 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
11878 Define 'alarm' to do nothing if unistd.h is not available.
11879 Add a new rule "exp: '-' error;" to test the above change to
11880 data/yacc.c. Use 'alarm' to abort any test taking longer than
11881 10 seconds, as it's probably looping.
11882 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
11883 Also, the new yacc.c generates two fewer diagnostics for an
11884 existing test.
11885
11886 2003-05-24 Paul Eggert <eggert@twinsun.com>
11887
11888 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
11889 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
11890 This fixes a problem reported by John Bowman when the Compaq/HP
11891 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
11892 -ansi -Wall -gall).
11893 * data/yacc.c (union yyalloc): Likewise.
11894 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
11895
11896 Switch from 'int' to 'bool' where that makes sense.
11897
11898 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
11899 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
11900 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
11901 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
11902 Return or accept bool, not int. All callers changed.
11903 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
11904 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
11905 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
11906 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
11907 bitset_or_and_cmp_): Likewise.
11908 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
11909 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
11910 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
11911 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
11912 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
11913 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
11914 bitset_stats_or_and_cmp): Likewise.
11915 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
11916 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
11917 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
11918 ebitset_xor_cmp): Likewise.
11919 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
11920 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
11921 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
11922 lbitset_xor_cmp): Likewise.
11923 * lib/bbitset.h: Include <stdbool.h>.
11924 (struct bitset_vtable): The following members now return bool, not
11925 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
11926 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
11927 or_and_cmp).
11928 * src/conflicts.c (count_rr_conflicts): Likewise.
11929 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
11930 All uses changed.
11931 * lib/ebitset.c (ebitset_obstack_init): Likewise.
11932 * lib/lbitset.c (lbitset_obstack_init): Likewise.
11933 * src/getargs.c (debug_flag, defines_flag, locations_flag,
11934 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11935 graph_flag): Likewise.
11936 * src/getargs.h (debug_flag, defines_flag, locations_flag,
11937 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11938 graph_flag): Likewise.
11939 * src/output.c (error_verbose): Likewise.
11940 * src/output.h (error_verbose): Likewise.
11941 * src/reader.c (start_flag, typed): Likewise.
11942 * src/reader.h (typed): Likewise.
11943 * src/getargs.c (LOCATIONS_OPTION): New constant.
11944 (long_options, getargs): Use it.
11945 * src/lalr.c (build_relations): Use bool, not int.
11946 * src/nullable.c (nullable_compute): Likewise.
11947 * src/print.c (print_reductions): Likewise.
11948 * src/tables.c (action_row, pack_vector): Likewise.
11949 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
11950 * src/output.c (prepare): Use it.
11951 * src/output.c (token_definitions_output,
11952 symbol_destructors_output, symbol_destructors_output): Use string,
11953 not boolean integer, to keep track of whether to output separator.
11954 * src/print_graph.c (print_core): Likewise.
11955 * src/state.c (state_rule_lookaheads_print): Likewise.
11956
11957 * config/install-sh: Sync from automake 1.7.5.
11958
11959 2003-05-14 Paul Eggert <eggert@twinsun.com>
11960
11961 * src/parse-gram.y (rules_or_grammar_declaration): Require a
11962 semicolon after a grammar declaration, in the interest of possible
11963 future changes to the Bison input language.
11964 Do not allow a stray semicolon at the start of the grammar.
11965 (rhses.1): Allow one or more semicolons after any rule, including
11966 just before "|" as required by POSIX.
11967 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
11968 grammar.
11969
11970 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
11971
11972 %parse-param support for lalr1.cc.
11973
11974 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
11975 b4_cc_constructor_calls, b4_cc_constructor_call,
11976 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
11977 definitions.
11978 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
11979 parse-param arguments.
11980 (yy::b4_parser_class_name): Declare instance variables to
11981 hold parse-param arguments.
11982 * tests/calc.at: s/value/semantic_value/ because value clashes
11983 with a member of yy::b4_parser_class_name. Adjust C++ code
11984 to handle %parse-param. Enable %parse-param test in C++.
11985
11986 2003-05-12 Paul Eggert <eggert@twinsun.com>
11987
11988 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
11989 English a bit. Fix fclose typo. Change "const char" to "char
11990 const", and use ANSI C rather than K&R for "main". Suggest
11991 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
11992 and suggest yy_switch_to_buffer.
11993
11994 2003-05-05 Paul Eggert <eggert@twinsun.com>
11995
11996 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
11997 C89. This avoids a diagnostic on compilers that define __STDC__
11998 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
11999 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12000
12001 2003-05-03 Paul Eggert <eggert@twinsun.com>
12002
12003 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12004 Do not overrun array bounds.
12005 This should fix a bug reported today by Olatunji Oluwabukunmi in
12006 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12007
12008 2003-04-29 Akim Demaille <akim@epita.fr>
12009
12010 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12011 * src/getargs.c, src/getargs.h: here, as bool, not int.
12012 (nondeterministic_parser): New.
12013 * src/parse-gram.y, src/scan-gram.l: Support
12014 %nondeterministic-parser.
12015 * src/output.c (prepare): Use nondeterministic_parser instead
12016 of glr_parser where appropriate.
12017 * src/tables.c (conflict_row, action_row, save_row)
12018 (token_actions, token_actions, pack_vector): Ditto.
12019
12020 2003-04-29 Akim Demaille <akim@epita.fr>
12021
12022 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12023
12024 2003-04-29 Akim Demaille <akim@epita.fr>
12025
12026 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12027 with %pure-parser and %locations to exercise the patch from Yakov
12028 Markovitch below.
12029
12030 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12031
12032 * data/yacc.c: (b4_lex_param): Corrected for the case where
12033 %lex-param is provided and %pure-parser isn't.
12034
12035 2003-04-27 Paul Eggert <eggert@twinsun.com>
12036
12037 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12038 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12039 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12040 if it is not defined.
12041 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12042
12043 2003-04-26 Paul Eggert <eggert@twinsun.com>
12044
12045 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12046 Declare to be of type suitable for the ninf value itself, not of
12047 type suitable for the corresponding table, since the latter might
12048 be unsigned but the ninf value might be negative. This fixes a
12049 bug reported by Alexandre Duret-Lutz in
12050 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12051
12052 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12053 invokes it. We shouldn't invoke it twice because it will attempt
12054 to put error.o in the archive twice. This fixes a glitch reported
12055 by Martin Mokrejs in
12056 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12057
12058 2003-04-21 Paul Eggert <eggert@twinsun.com>
12059
12060 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12061 to gnulib.
12062
12063 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12064
12065 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12066 Fix obvious typo that results in uncompilable GLR parsers
12067 when both %pure-parser and %locations are used. (trivial change)
12068
12069 2003-04-17 Paul Eggert <eggert@twinsun.com>
12070
12071 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12072 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12073 Do not insert the expected token via unput, as this runs afoul
12074 of a POSIX-compatibility bug in flex 2.5.31.
12075 All uses changed to BEGIN the parent state,
12076 since we no longer insert the expected token via unput.
12077 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12078 that is no longer emitted after the above change.
12079
12080 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12081 the first one. This change is from Paul Hilfinger, and it fixes
12082 regression reported by Werner Lemberg in
12083 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12084
12085 (resolve_sr_conflict): Don't invoke state_errs_set
12086 unless one or more tokens have been explicitly made errors.
12087 Otherwise, the above change causes Bison to abort.
12088
12089 * tests/existing.at (GNU pic Grammar): New test case, taken from
12090 Lemberg's email.
12091
12092 2003-03-31 Akim Demaille <akim@epita.fr>
12093
12094 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12095
12096 2003-03-31 Akim Demaille <akim@epita.fr>
12097
12098 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12099 output.
12100
12101 2003-03-31 Akim Demaille <akim@epita.fr>
12102
12103 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12104 From Paul Hilfinger.
12105
12106 2003-03-29 Akim Demaille <akim@epita.fr>
12107
12108 * m4/error.m4: Do not put under dynamic conditions some code which
12109 expansion is under static control.
12110
12111 2003-03-29 Akim Demaille <akim@epita.fr>
12112
12113 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12114
12115 2003-03-29 Akim Demaille <akim@epita.fr>
12116
12117 * doc/bison.texinfo (Strings are Destroyed): New.
12118
12119 2003-03-13 Paul Eggert <eggert@twinsun.com>
12120
12121 * .cvsignore: Add configure.lineno.
12122 * src/.cvsignore: Add yacc.
12123 * tests/.cvsignore: Add testsuite.log.
12124 * doc/fdl.texi: Sync with latest FSF version.
12125
12126 2003-03-12 Paul Eggert <eggert@twinsun.com>
12127
12128 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12129 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12130 cursor, instead of leaving it undefined. This fixes a bug
12131 reported by Tim Van Holder in
12132 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12133 * tests/input.at (Torturing the Scanner): Test the scanner on
12134 an empty input file, which was Tim Van Holder's test case.
12135
12136 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12137 <sys/resource.h> can be included, include sys/time.h and
12138 sys/times.h first, if available. This works around the SunOS
12139 4.1.4 porting bug reported by Bruce Becker in
12140 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12141
12142 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12143 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12144 AC_HEADER_SYS_WAIT.
12145
12146 Merge changes from gnulib. This was prompted because the CVS
12147 snapshot didn't build on Solaris 7 due to strnlen problems.
12148
12149 These changes need to be merged back into gnulib:
12150 * lib/hash.c: Include <stdbool.h> unconditionally.
12151 * m4/onceonly.m4 (m4_quote): New macro.
12152 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12153 Quote AC_FOREACH variable-expansions properly.
12154 The 2003-01-03 obstack.h change also needs merging.
12155 {end of changes requiring merging}
12156
12157 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12158 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12159 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12160 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12161 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12162 New files, imported from gnulib.
12163 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12164 above.
12165
12166 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12167 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12168 gnulib sources.
12169
12170 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12171 Add.
12172 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12173 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12174 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12175 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12176 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12177 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12178 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12179 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12180 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12181 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12182 (jm_PREREQ_ARGMATCH): Remove.
12183 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12184 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12185
12186 * src/system.h: Include <stdbool.h> unconditionally.
12187
12188 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12189 assuming at least C89 in the bitset code for some time now.
12190
12191 2003-03-03 Akim Demaille <akim@epita.fr>
12192
12193 * ro.po: New.
12194
12195 2003-03-02 Akim Demaille <akim@epita.fr>
12196
12197 * doc/bison.texinfo (Table of Symbols): Reactivate the
12198 documentation for %lex-param, and %parse-param.
12199
12200 2003-03-02 Akim Demaille <akim@epita.fr>
12201
12202 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12203 generate verbose error messages.
12204 Use the number of tokens as an upper bound in yytname, as it
12205 cannot be a non terminal.
12206
12207 2003-03-02 Akim Demaille <akim@epita.fr>
12208
12209 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12210 message.
12211
12212 2003-03-02 Akim Demaille <akim@epita.fr>
12213
12214 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12215 Use them to exercise yycheck overrun.
12216 Based on Andrew Suffield's grammar.
12217
12218 2003-03-02 Akim Demaille <akim@epita.fr>
12219
12220 Create tests/local.at for Bison generic testing macros.
12221
12222 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12223 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12224 This new file.
12225 * tests/calc.at (AT_CHECK_CALC): Adjust.
12226 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12227 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12228 * tests/local.at: here.
12229 (AT_COMPILE_CXX): Tags the tests using it as c++.
12230 Ignore the test if CXX is not functional.
12231
12232 2003-03-01 Paul Eggert <eggert@twinsun.com>
12233
12234 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12235 not loc->end, since loc->end might contain garbage and this leads
12236 to undefined behavior on some platforms.
12237 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12238 depend on *loc, so that the reader doesn't give the the false
12239 impression that *loc is initialized.
12240 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12241 does not survive the return.
12242
12243 2003-03-01 Akim Demaille <akim@epita.fr>
12244
12245 * src/scan-gram.l (code_start): Always initialize it when entering
12246 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12247 yylex invocation. An alternative would be making it static, but
12248 then it starts with the second %%'s beginning, instead of its end.
12249
12250 2003-02-28 Paul Eggert <eggert@twinsun.com>
12251
12252 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12253 around a UnixWare 7.1.1 porting bug reported by John Hughes in
12254 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
12255
12256 2003-02-26 Paul Eggert <eggert@twinsun.com>
12257
12258 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12259 Remove Sequent/Pyramid discussion (nobody uses them any more).
12260 Merge VMS and MS-DOS discussion; these ports may well be dead
12261 but let's keep mentioning them for now. Put <> around email
12262 addresses. Add copyright notice.
12263
12264 2003-02-24 Paul Eggert <eggert@twinsun.com>
12265
12266 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12267 to avoid collision with flex use of yylineno.
12268 Problem reported by Bruce Lilly in
12269 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
12270 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12271 * data/yacc.c (yy_reduce_print): Likewise.
12272
12273 * config/depcomp: Sync with Automake 1.7.3.
12274
12275 2003-02-21 Akim Demaille <akim@epita.fr>
12276
12277 * data/lalr1.cc: Use temporary variables instead of casts to
12278 change integer types.
12279 Suggested by Paul Eggert.
12280
12281 2003-02-21 Akim Demaille <akim@epita.fr>
12282
12283 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12284 to avoid confusions with lalr1.cc's notion of Position.
12285 Suggested by Paul Eggert.
12286
12287 2003-02-20 Akim Demaille <akim@epita.fr>
12288
12289 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12290 before initial_columns.
12291 (location.hh): Use consistent variable names when defining the
12292 operator<<.
12293 Use "last" so that we subtract from Positions, not from unsigned.
12294
12295 2003-02-20 Akim Demaille <akim@epita.fr>
12296
12297 * data/lalr1.cc (position.hh): New subfile, including the extended
12298 and Doxygen'ed documentation of class Position.
12299 (location.hh): Use it.
12300 Document a` la Doxygen.
12301 With the help of Benoit Perrot.
12302
12303 2003-02-20 Akim Demaille <akim@epita.fr>
12304
12305 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12306 AT_YACC_IF.
12307 Redefine AT_YYERROR_SEES_LOC_IF using it.
12308 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12309 not defined.
12310 Don't use the location in yy::Parser::error_ and
12311 yy::Parser::print_ when not %locations.
12312 Activate more lalr1.cc tests.
12313
12314 2003-02-19 Akim Demaille <akim@epita.fr>
12315
12316 * data/lalr1.cc: When displaying a line number, be sure to make it
12317 an int.
12318
12319 2003-02-19 Akim Demaille <akim@epita.fr>
12320
12321 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12322 Remove, useless.
12323 (YYABORT, YYACCEPT, YYERROR): New.
12324 * tests/calc.at: Renable the lalr1.cc test.
12325
12326 2003-02-19 Akim Demaille <akim@epita.fr>
12327
12328 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12329 error recovery, mixing with/without pops and discarding of the
12330 lookahead.
12331 Exercise YYERROR.
12332 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12333
12334 2003-02-17 Paul Eggert <eggert@twinsun.com>
12335
12336 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12337 * tests/testsuite.at (AT_COMPILE): Use them.
12338 This fixes the testsuite problem reported by Robert Lentz in
12339 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
12340
12341 2003-02-12 Paul Eggert <eggert@twinsun.com>
12342
12343 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12344 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
12345 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
12346 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12347 Check for malloc failure, for consistency with yacc.c.
12348 (yytname_size): Remove, for consistency with yacc.c.
12349
12350 The bug still remains in data/lalr1.cc, as I didn't have time
12351 to fix it there.
12352
12353 2003-02-06 Akim Demaille <akim@epita.fr>
12354
12355 * configure.ac (GXX): Rename as...
12356 (CXX): this, to keep the original Autoconf semantics.
12357 Require 2.57.
12358 * data/lalr1.cc: Fix b4_copyright invocations.
12359 If YYDEBUG is not defined, don't depend upon name_ being defined.
12360 (location.hh): Include string and iostream.
12361 (Position::filename): New member.
12362 (Position::Position ()): New.
12363 (operator<< (Position)): New.
12364 (operator- (Position, int)): New.
12365 (Location::first, Location::last): Rename as...
12366 (Location::begin, Location::end): these, to mock the conventional
12367 iterator names.
12368 (operator<< (Location)): New.
12369 * tests/atlocal.in (CXX): New.
12370 * tests/testsuite.at (AT_COMPILE_CXX): New.
12371 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12372 locations in a more synthetic way.
12373 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12374 lalr1.cc is used.
12375 Adjust the C locations to match those from Emacs: first column is
12376 column 0.
12377 Change all the expected results.
12378 Conform to the GCS: simplify the locations when applicable.
12379 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12380 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12381 these CPP macros with the m4 macros new defined by...
12382 (AT_CHECK_PUSHDEFS): this, i.e.:
12383 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
12384 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
12385 New macros.
12386 (AT_CHECK_POPDEFS): Undefine them.
12387 (AT_CHECK_CALC_LALR1_CC): New.
12388 Use it for the first lalr1.cc test.
12389
12390 2003-02-04 Akim Demaille <akim@epita.fr>
12391
12392 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12393 Location as is defined.
12394
12395 2003-02-04 Akim Demaille <akim@epita.fr>
12396
12397 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12398 name_ being defined.
12399
12400 2003-02-03 Paul Eggert <eggert@twinsun.com>
12401
12402 * src/gram.h (start_symbol): Remove unused decl.
12403
12404 Use more-consistent naming conventions for local vars.
12405
12406 * src/derives.c (derives_compute): Change type of local var from
12407 int to rule_number.
12408 * src/gram.c (grammar_rules_partial_print): Likewise.
12409 * src/print.c (print_core): Likewise.
12410 * src/reduce.c (reduce_grammar_tables): Likewise.
12411
12412 * src/gram.c (grammar_dump): Change name of item_number *
12413 local var from r to rp.
12414 * src/nullable.c (nullable_compute): Likewise.
12415
12416 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12417
12418 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12419 for symbol or symbol_number var.
12420 * src/reader.c (grammar_start_symbol_set): Likewise.
12421 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12422 Likewise.
12423 * src/state.c (transitions_to): Likewise.
12424 * src/state.h: Likewise.
12425 * src/tables.c (symbol_number_to_vector_number): Likewise.
12426
12427 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12428 char * var.
12429
12430 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12431 var.
12432
12433 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12434 var.
12435
12436 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12437 Use str, not s, for char * var. Use ch, not c, for character var.
12438 Use size for size var.
12439
12440 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12441 char * var.
12442 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12443 uniqstr var.
12444 * src/uniqstr.h: Likewise.
12445
12446 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12447 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12448 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12449 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12450 param to have same name as that of enum, so that we don't use
12451 "s" to stand for a non-state.
12452
12453 2003-02-02 Akim Demaille <akim@epita.fr>
12454
12455 * src/scan-skel.l: Scan more than one inert character per yylex
12456 invocation.
12457
12458 2003-02-01 Paul Eggert <eggert@twinsun.com>
12459
12460 Version 1.875a.
12461
12462 * po/LINGUAS: Add ms.
12463
12464 2003-01-30 Akim Demaille <akim@epita.fr>
12465
12466 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12467
12468 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12469
12470 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12471 of $1.
12472
12473 Changes in response to error report by S. Eken: GLR mode does not
12474 handle negative $ indices or $ indices in embedded rules correctly.
12475 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
12476
12477 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12478 (b4_rhs_location): Ditto.
12479 (yyfill): New function to copy from stack tree into array
12480 incrementally.
12481 (yyuserAction): Modify to allow incremental move of semantic values
12482 to rhs array when in GLR mode.
12483 Define YYFILL to use in user-defined actions to fill semantic array
12484 as needed.
12485 Remove dummy use of yystack, as there is now a guaranteed use.
12486 (yydoAction): Modify to allow incremental move of semantic values
12487 to rhs array when in GLR mode.
12488 (yyresolveAction): Ditto.
12489 (yyglrShiftDefer): Update comment.
12490 (yyresolveStates): Use X == NULL for pointers, not !X.
12491 (yyglrReduce): Ditto.
12492 (yydoAction): Ditto
12493
12494 * tests/glr-regr1.at: Rename to ...
12495 * tests/glr-regression.at: Add new regression test for the problems
12496 described above (adapted from S. Eken).
12497 Update copyright notice.
12498 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12499 * tests/Makefile.am: Ditto.
12500
12501 2003-01-28 Paul Eggert <eggert@twinsun.com>
12502
12503 * data/lalr1.cc: Do not use @output_header_name@ unless
12504 b4_defines_flag is set. This fixes two bugs reported by
12505 Tim Van Holder in
12506 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12507 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
12508
12509 2003-01-21 Paul Eggert <eggert@twinsun.com>
12510
12511 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12512 we don't need to worry about yyerrlab1 being reported as an
12513 "unused label" by non-GCC C compilers. The downside is that if
12514 locations are used then a couple of statements are duplicated each
12515 time YYERROR is invoked, but the upside is that the warnings
12516 should vanish.
12517 (yyerrlab1): Move code to YERROR.
12518 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12519 This reverts some of the 2002-12-27 change.
12520
12521 2003-01-17 Paul Eggert <eggert@twinsun.com>
12522
12523 * src/output.c (symbol_printers_output): Fix typo that led
12524 to core dump. Problem reported by Antonio Rus in
12525 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
12526
12527 2003-01-13 Akim Demaille <akim@epita.fr>,
12528 Quoc Peyrot <chojin@lrde.epita.fr>,
12529 Robert Anisko <anisko_r@lrde.epita.fr>
12530
12531 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12532 when the stacks contain one element, as the loop would otherwise
12533 free the last state, and then use the top state (the one we just
12534 popped). This means that the initial elements will not be freed
12535 explicitly, as is the case in yacc.c; it is not a problem, as
12536 these elements have fake values.
12537
12538 2003-01-11 Paul Eggert <eggert@twinsun.com>
12539
12540 * NEWS: %expect-violations are now just warnings, reverting
12541 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12542 bootstrapping problem reported by Matthias Klose; see
12543 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
12544 * src/conflicts.c (conflicts_print): Likewise.
12545 * tests/conflicts.at (%expect not enough, %expect too much,
12546 %expect with reduce conflicts): Likewise.
12547 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12548 that the warning is enabled if the number of conflicts changes
12549 (not necessarily increases).
12550
12551 * src/getargs.c (version): Update copyright year.
12552
12553 2003-01-09 Akim Demaille <akim@epita.fr>
12554
12555 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12556
12557 2003-01-08 Paul Eggert <eggert@twinsun.com>
12558
12559 * Makefile.maint (WGETFLAGS):
12560 New macro, containing "-C off" to disable proxy caches.
12561 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12562 (rel-check): Use $(WGET) instead of wget.
12563
12564 2003-01-06 Paul Eggert <eggert@twinsun.com>
12565
12566 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12567 the GLR paper of Scott, Johnstone and Hussain.
12568
12569 2003-01-04 Paul Eggert <eggert@twinsun.com>
12570
12571 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12572 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12573 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12574 (EXTRA_LIBRARIES): New var, for liby.a.
12575 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12576 (EXTRA_SCRIPTS): New var, for yacc.
12577
12578 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12579 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12580 Problem reported by Nelson H. F. Beebe.
12581
12582 2003-01-03 Paul Eggert <eggert@twinsun.com>
12583
12584 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12585 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12586 when compiling Bison 1.875's `bitset bset = obstack_alloc
12587 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12588
12589 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12590 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12591 grow to a huge size with typical invocation.
12592
12593 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12594 Use the pattern recommended by Autoconf 2.57, except also protect
12595 against double-definition.
12596 * src/system.h: Likewise.
12597 Portability issues reported by Nelson H. F. Beebe.
12598
12599 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12600 All uses changed. Provide a definition in both C and C++.
12601 (yytrue, yyfalse): Define even if defined (__cplusplus).
12602
12603 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12604 Reported by Nelson H. F. Beebe.
12605
12606 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12607
12608 2003-01-02 Paul Eggert <eggert@twinsun.com>
12609
12610 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12611 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12612 Bug reported by Nelson H. F. Beebe.
12613
12614 2003-01-01 Paul Eggert <eggert@twinsun.com>
12615
12616 * Version 1.875.
12617
12618 2002-12-30 Paul Eggert <eggert@twinsun.com>
12619
12620 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12621 Moved here from...
12622 (<INITIAL>","): Here. This causes stray "," to be treated
12623 more uniformly.
12624
12625 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
12626 last brace in braced code when not in Yacc mode, for compatibility
12627 with Bison 1.35. This resurrects the 2001-12-15 patch to
12628 src/reader.c.
12629
12630 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12631 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12632
12633 2002-12-28 Paul Eggert <eggert@twinsun.com>
12634
12635 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12636 that of SYM's type. This fixes Debian bug 168069, reported by
12637 Thomas Olsson.
12638
12639 2002-12-28 Paul Eggert <eggert@twinsun.com>
12640
12641 Version 1.75f.
12642
12643 Switch back to the Yacc style of conflict reports, undoing some
12644 of the 2002-07-30 change.
12645 * doc/bison.texinfo (Understanding): Use Yacc style for
12646 conflict reports. Also, use new way of locating rules.
12647 * src/conflicts.c (conflict_report):
12648 Renamed from conflict_report_yacc, removing the old
12649 'conflict_report'. Translate the entire conflict report at once,
12650 so that we don't assume that "," has the same interpretation in
12651 all languages.
12652 (conflicts_output): Use Yacc-style conflict report for each state,
12653 instead of our more-complicated style.
12654 (conflicts_print): Use Yacc-style conflict report, except print
12655 the input file name when not emulating Yacc.
12656 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12657 Conflicted Reduction, %expect not enough, %expect too much,
12658 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12659 * tests/existing.at (GNU Cim Grammar): Likewise.
12660 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12661
12662 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12663 fatal): Don't invoke fflush; it's not needed and it might even be
12664 harmful for stdout, as stdout might not be open.
12665 * src/reduce.c (reduce_print): Likewise.
12666
12667 2002-12-27 Paul Eggert <eggert@twinsun.com>
12668
12669 Fix a bug where error locations were not being recorded correctly.
12670 This problem was originally reported by Paul Hilfinger in
12671 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
12672
12673 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12674 top of the location stack's error locations.
12675 (yyerrlab): Set it. When discarding a token, push its location
12676 onto yylerrsp so that we don't lose track of the error's end.
12677 (yyerrlab1): Now is only the target of YYERROR, so that we can
12678 properly record the location of the action that failed. For GCC
12679 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12680 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12681 (yyerrlab2): New label, which yyerrlab now falls through to.
12682 Compute the error's location by applying YYLLOC_DEFAULT to
12683 the locations of all the symbols that went into the error.
12684 * doc/bison.texinfo (Location Default Action): Mention that
12685 YYLLOC_DEFAULT is also invoked for syntax errors.
12686 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12687 Error locations include the locations of all the tokens that were
12688 discarded, not just the last token.
12689
12690 2002-12-26 Paul Eggert <eggert@twinsun.com>
12691
12692 * src/files.c: Include quote.h.
12693 (compute_output_file_names): Warn if we detect conflicting
12694 outputs to the same file. This should catch the misunderstanding
12695 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12696
12697 * src/conflicts.c (conflicts_print): If the user specifies
12698 "%expect N", report an error if there are any reduce/reduce
12699 conflicts. This is what the manual says should happen.
12700 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12701 * tests/conflicts.at (%expect with reduce conflicts): New test.
12702
12703 Don't use m4_include on relative file names, as it doesn't work as
12704 desired if there happens to be a file with that name under ".".
12705
12706 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12707 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12708 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12709 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12710 * src/output.c (output_skeleton): Use full path names when
12711 specifying a file to include; don't rely on include path, as
12712 it's unreliable when the working file contains a file with
12713 that name.
12714
12715 2002-12-25 Paul Eggert <eggert@twinsun.com>
12716
12717 Remove obsolete references to bison.simple and bison.hairy.
12718 Problem mentioned by Aubin Mahe in
12719 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
12720 * data/glr.c: Comment fix.
12721 * doc/bison.1: Remove references. Also, mention "yacc".
12722
12723 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12724 with -g option.
12725
12726 * src/parse-gram.y (declaration): Use enum "report_states" rather
12727 than its numeric value 1.
12728
12729 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12730 opening a new one. This fixes Debian bug 165349, reported by
12731 Bruce Stephens.
12732
12733 2002-12-24 Paul Eggert <eggert@twinsun.com>
12734
12735 Version 1.75e.
12736
12737 * Makefile.maint (cvs-update): Don't assume that the shell
12738 supports $(...), as Solaris sh doesn't.
12739
12740 * src/parse-gram.y (lloc_default): Remove test for empty
12741 nonterminals at the end, since it didn't change the result.
12742
12743 2002-12-24 Paul Eggert <eggert@twinsun.com>
12744
12745 If the user does not define YYSTYPE as a macro, Bison now declares it
12746 using typedef instead of defining it as a macro. POSIX requires this.
12747 For consistency, YYLTYPE is also declared instead of defined.
12748
12749 %union directives can now have a tag before the `{', e.g., the
12750 directive `%union foo {...}' now generates the C code
12751 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12752 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12753 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12754 instead of `yyltype'.
12755
12756 `yystype' and `yyltype' are now obsolescent macros instead of being
12757 typedefs or tags; they are no longer documented and will be
12758 withdrawn in a future release.
12759
12760 * data/glr.c (b4_location_type): Remove.
12761 (YYSTYPE): Renamed from yystype.
12762 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12763 (struct YYLTYPE): Renamed from struct yyltype.
12764 (YYLTYPE): Renamed from yyltype.
12765 (yyltype, yystype): New (and obsolescent) macros,
12766 for backward compatibility.
12767 * data/yacc.c: Likewise.
12768
12769 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12770 does not specify a union tag. This is for compatibility with
12771 Solaris 9 yacc.
12772
12773 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12774 const *, since it is now modified by stripping surrounding { }.
12775 (current_braced_code): Remove.
12776 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12777 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12778 trailing " {...}". Now of type <chars>.
12779 (grammar_declaration): Adjust to bundled tokens.
12780 (code_content): Remove; stripping is now done by add_param.
12781 (print_token_value): Print contents of bundled tokens.
12782 (token_name): New function.
12783
12784 * src/reader.h (braced_code, current_braced_code): Remove.
12785 (token_name): New decl.
12786
12787 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12788 token_type, not braced_code code_kind. All uses changed.
12789 (SC_PRE_CODE): New state, for scanning after a keyword that
12790 has (or usually has) an immediately-following braced code.
12791 (token_type): New local var, to keep track of which token type
12792 to return when scanning braced code.
12793 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
12794 <INITIAL>"%parse-param", <INITIAL>"%printer",
12795 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12796 instead of returning a token type immediately.
12797 (<INITIAL>"{"): Set token type.
12798 (<SC_BRACED_CODE>"}"): Use it.
12799 (handle_action_dollar, handle_action_at): Now returns bool
12800 indicating success. Fail if ! current_rule; this prevents a core dump.
12801 (handle_symbol_code_dollar, handle_symbol_code_at):
12802 Remove; merge body into caller.
12803 (handle_dollar, handle_at): Complain in invalid contexts.
12804
12805 * NEWS, doc/bison.texinfo: Document the above.
12806 * NEWS: Fix years and program names in copyright notice.
12807
12808 2002-12-17 Paul Eggert <eggert@twinsun.com>
12809
12810 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12811 Reporting, Table of Symbols): Omit mentions of %lex-param and
12812 %parse-param from the documentation for now.
12813
12814 2002-12-15 Paul Eggert <eggert@twinsun.com>
12815
12816 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12817 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12818 lookahead symbol, and which sets yychar in parser actions) and it
12819 disagreed with the Bison documentation. Bug
12820 reported by Andrew Walrond.
12821
12822 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12823 as the caller now does that.
12824 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12825 (YYEMPTY): Parenthesize right hand side, since others use it.
12826 (yyparse): Don't assume that our generated code is the only code
12827 that sets yychar.
12828
12829 2002-12-13 Paul Eggert <eggert@twinsun.com>
12830
12831 Version 1.75d.
12832
12833 POSIX requires a "yacc" command.
12834 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12835 (MOSTLYCLEANFILES): Add yacc.
12836 (yacc): New rule.
12837 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
12838 as an alias for bison y.
12839
12840 * po/LINGUAS: Add da.
12841
12842 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12843 problem with latest <getopt.h>.
12844 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12845
12846 * doc/fdl.texi: Upgrade to 1.2.
12847 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12848 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12849 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12850 gnulib.
12851 * config/install-sh: Sync with autotools.
12852
12853 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
12854 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
12855 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
12856 locations are requested.
12857 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
12858 locations are requested.
12859
12860 2002-12-12 Paul Eggert <eggert@twinsun.com>
12861
12862 Remove unportable casts and storage allocation tricks.
12863 While we're at it, remove almost all casts, since they
12864 usually aren't needed and are a sign of trouble.
12865
12866 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
12867
12868 * src/derives.c (derives_compute): Do not subtract NTOKENS from
12869 the pointer DSET returned by malloc; this isn't portable.
12870 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
12871 Similarly for DERIVES.
12872 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
12873 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
12874 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
12875
12876 * src/derives.c (derives_compute): Do not bother invoking
12877 int_of_rule_number, since rule numbers are integers.
12878
12879 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
12880 rather than XMALLOC (char, N).
12881
12882 * src/files.c (filename_split): Rewrite to avoid cast.
12883
12884 * src/gram.h (symbol_number_as_item_number,
12885 item_number_as_symbol_number, rule_number_as_item_number,
12886 item_number_as_rule_number):
12887 Now inline functions rather than macros, to avoid casts.
12888 * src/state.h (state_number_as_int): Likewise.
12889 * src/tables.c (state_number_to_vector_number,
12890 symbol_number_to_vector_number): Likewise.
12891
12892 * src/gram.h (int_of_rule_number): Remove; no longer used.
12893
12894 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
12895 since the resulting storage is always stored into.
12896
12897 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
12898 where it's needed.
12899
12900 * src/muscle_tab.c (muscle_m4_output):
12901 Now inline. Return bool, not int.
12902 * src/state.c (state_compare): Likewise.
12903 * src/symtab.c (symbol_check_defined,
12904 symbol_check_alias_consistency, symbol_pack, symbol_translation,
12905 hash_compare_symbol, hash_symbol):
12906 Likewise.
12907 * src/uniqstr.c (uniqstr_print): Likewise.
12908 * src/muscle_tab.c (muscle_m4_output_processor):
12909 New function, to avoid casts.
12910 * src/state.c (state_comparator, stage_hasher): Likewise.
12911 * src/symtab.c (symbol_check_defined_processor,
12912 symbol_check_alias_consistency_processor, symbol_pack_processor,
12913 symbol_translation_processor, hash_symbol_comparator,
12914 hash_symbol_hasher): Likewise.
12915 * src/uniqstr.c (uniqstr_print_processor): Likewise.
12916 * src/muscle_tab.c (muscles_m4_output):
12917 Use new functions instead of casting old functions unportably.
12918 * src/state.c (state_hash_new): Likewise.
12919 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
12920 symbols_token_translations_init):
12921 Likewise.
12922 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
12923
12924 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
12925 var instead of casting to long, to avoid casts.
12926 (prepare_states): Use MALLOC rather than alloca, so that we don't
12927 have to worry about alloca.
12928 * src/state.c (state_hash_lookup): Likewise.
12929
12930 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
12931 local var instead of casting to unsigned char, to avoid casts.
12932
12933 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
12934 STATE_ALLOC): Remove.
12935 (transitions_new, errs_new, reductions_new, state_new): Use malloc
12936 rather than calloc, and use offsetof to avoid allocating slightly
12937 too much storage.
12938 (state_new): Initialize all members.
12939
12940 * src/state.c (state_hash): Use unsigned accumulator, not signed.
12941
12942 * src/symtab.c (symbol_free): Remove; unused.
12943 (symbol_get): Remove cast in lhs of assignment.
12944 (symbols_do): Now static. Accept generic arguments, not
12945 hashing-related ones.
12946
12947 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
12948 (symbol_processor): Remove.
12949 (symbols_do): Remove decl; now static.
12950
12951 * src/system.h (alloca): Remove; decl no longer needed.
12952 (<stddef.h>): Include, for offsetof.
12953 (<inttypes.>, <stdint.h>): Include if available.
12954 (uintptr_t): New type, if system lacks it.
12955 (CALLOC, MALLOC, REALLOC): New macros.
12956 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
12957 new macros.
12958
12959 * src/tables.c (table_size): Now int, to pacify GCC.
12960 (table_grow, table_ninf_remap): Use signed table size.
12961 (save_row): Don't bother initializing locals when not needed.
12962 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
12963 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
12964
12965 * src/vcg.h: Correct misspellings.
12966
12967 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
12968
12969
12970 * src/getargs.c (getargs): Don't assume EOF == -1.
12971
12972 2002-12-09 Paul Eggert <eggert@twinsun.com>
12973
12974 Change identifier spellings to avoid collisions with names
12975 that are reserved by POSIX.
12976
12977 Don't use names ending in _t, since POSIX reserves them.
12978 For consistency, remove _e and _s endings -- they're weren't
12979 needed to remove ambiguity. All uses changed.
12980 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
12981 turn was just renamed from struniq_t.
12982 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
12983 which in turn was just renamed from struniq_processor_t.
12984 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
12985 in turn was renamed from hash_compare_struniq_t.
12986 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
12987 (state_list): Renamed from state_list_t.
12988 * src/assoc.h (assoc): Renamed from assoc_t.
12989 * src/conflicts.c (enum conflict_resolution): Renamed from
12990 enum conflict_resolution_e.
12991 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
12992 (rule_list): Renamed from rule_list_t.
12993 * src/getargs.h (enum trace): Renamed from enum trace_e.
12994 (enum report): Renamed from enum report_e.
12995 * src/gram.h (item_number): Renamed from item_number_t.
12996 (rule_number): Renamed from rule_number_t.
12997 (struct rule_s): Remove the "rule_s" part; not used.
12998 (rule): Renamed from rule_t.
12999 (rule_filter): Renamed from rule_filter_t.
13000 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13001 (goto_list): Renamed from goto_list_t.
13002 * src/lalr.h (goto_number): Renamed from goto_number_t.
13003 * src/location.h (location): Renamed from location_t.
13004 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13005 and moved here from:
13006 * src/muscle_tab.h (muscle_entry_t): here.
13007 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13008 (rule_list): Renamed from rule_list_t.
13009 * src/print_graph.c (static_graph): Renamed from graph.
13010 * src/reader.h (braced_code): Renamed from braced_code_t.
13011 Remove brace_code_e tag.
13012 * src/relation.h (relation_node): Renamed from relation_node_t.
13013 (relation_nodes): Renamed from relation_nodes_t.
13014 (relation): Renamed from relation_t.
13015 * src/state.h (state_number): Renamed from state_number_t.
13016 (struct state): Renamed from struct state_s.
13017 (state): Renamed from state_t.
13018 (transitions): Renamed from transitions_t. Unused (and
13019 misspelled) transtion_s tag removed.
13020 (errs): Renamed from errs_t. Unused errs_s tag removed.
13021 (reductions): Renamed from reductions_t. Unused tag
13022 reductions_s removed.
13023 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13024 (struct symbol_list): Renamed from struct symbol_list_s.
13025 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13026 (struct symbol): Renamed from struct symbol_s.
13027 (symbol): Renamed from symbol_t.
13028 * src/tables.c (vector_number): Renamed from vector_number_t.
13029 (action_number): Renamed from action_t.
13030 * src/tables.h (base_number): Renamed from base_t.
13031 * src/vcg.h (enum color): Renamed from enum color_e.
13032 (enum textmode): Renamed from enum textmode_e.
13033 (enum shape): Renamed from enum shape_e.
13034 (struct colorentry): Renamed from struct colorentry_s.
13035 (struct classname): Renamed from struct classname_s.
13036 (struct infoname): Renamed from struct infoname_s.
13037 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13038 (enum decision): Renamed from enum decision_e.
13039 (enum orientation): Renamed from enum orientation_e.
13040 (enum alignment): Renamed from enum alignment_e.
13041 (enum arrow_mode): Renamed from enum arrow_mode_e.
13042 (enum crossing_type): Renamed from enum crossing_type_e.
13043 (enum view): Renamed from enum view_e.
13044 (struct node): Renamed from struct node_s.
13045 (node): Renamed from node_t.
13046 (enum linestyle): Renamed from enum linestyle_e.
13047 (enum arrowstyle): Renamed from enum arrowstyle_e.
13048 (struct edge): Renamed from struct edge.
13049 (edge): Renamed from edge_t.
13050 (struct graph): Renamed from struct graph_s.
13051 (graph): Renamed from graph_t.
13052 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13053 Rename value_t -> value.
13054 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13055 value_t_as_yystype -> value_as_yystype.
13056
13057 Don't include <errno.h> in the mainstream code, since it
13058 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13059 * lib/get-errno.c, lib/get-errno.h: New files.
13060 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13061 get-errno.c.
13062 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13063 * src/output.c (output_skeleton): Likewise.
13064 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13065 instead of errno.
13066 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13067 Likewise.
13068 (handle_action_dollar, handle_action_at): Likewise.
13069 * src/system.h: Do not include <errno.h>.
13070 (TAB_EXT): Renamed from EXT_TAB.
13071 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13072
13073 Avoid str[a-z]*, since <string.h> reserves that name space.
13074 Change all instances of "struniq" in names to "uniqstr", and
13075 likewise for "STRUNIQ" and "UNIQSTR".
13076 * src/uniqstr.c: Renamed from src/struniq.c.
13077 * src/uniqstr.h: Renamed from src/struniq.h.
13078 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13079 * src/files.c (strsuffix): Remove; unused.
13080 (concat2): Renamed from stringappend. Now static.
13081 * src/files.h (strsuffix, stringappend): Remove; unused.
13082 * src/parse-gram.y (<chars>): Renamed from <string>.
13083 (<uniqstr>): Renamed from <struniq>.
13084 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13085 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13086 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13087 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13088 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13089 (N_EXPAND): Renamed from N_STRETCH.
13090
13091 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13092 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13093 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13094 Remove; unused.
13095 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13096 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13097 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13098 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13099 (BASE_MAXIMUM): Renamed from BASE_MAX.
13100 (BASE_MINIMUM): Renamed from BASE_MIN.
13101 (ACTION_MAX): Remove; unused.
13102 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13103 Unnecessary casts removed from above defines.
13104
13105
13106 Fix misspelling in names.
13107 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13108 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13109 G_NODE_ALIGNEMENT.
13110
13111
13112 * lib/timevar.c (timevar_report): Renamed from time_report,
13113 for consistency with other names.
13114 * lib/timevar.h (timevar_report): New decl.
13115 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13116
13117
13118 Sort include-file uses.
13119
13120 Reorder all include files under src to be in the order "system.h".
13121 then the ../lib include files in angle brackets (alphabetized),
13122 then the . include files in double-quotes (alphabetized). Fix
13123 dependency breakages encountered in this process, as follows:
13124 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13125 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13126 * src/state.h: Include "symtab.h".
13127
13128 2002-12-08 Paul Eggert <eggert@twinsun.com>
13129
13130 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13131 since this causes problems when __file__ contains character
13132 sequences like "@" that are treated specially by src/scan-skel.l.
13133 Instead, just use the file's basename. This fixes the bug
13134 reported by Martin Mokrejs in
13135 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13136
13137 2002-12-06 Paul Eggert <eggert@twinsun.com>
13138
13139 Add support for rules that do not have trailing semicolons, as
13140 POSIX requires. Improve the quality of locations in Bison
13141 diagnostics.
13142
13143 * src/location.c: Include <quotearg.h>.
13144 (empty_location): Now const.
13145 (location_print): New function. Follow the recommendation of the
13146 GNU Coding Standards for locations that span file boundaries.
13147 * src/location.h: Do not include <quotearg.h>; no longer needed.
13148 (boundary): New type.
13149 (location_t): Use it. This allows locations to span file boundaries.
13150 All member uses changed: file -> start.file or end.file (as needed),
13151 first_line -> start.line, first_column -> start.column,
13152 last_line -> end.line, last_column -> end.column.
13153 (equal_boundaries): New function.
13154 (LOCATION_RESET, LOCATION_STEP): Remove.
13155 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13156 (empty_location): Now const.
13157 (location_print): New decl.
13158 * src/parse-gram.y (lloc_default): New function, which handles
13159 empty locations more accurately.
13160 (YYLLOC_DEFAULT): Use it.
13161 (%token COLON): Remove.
13162 (%token ID_COLON): New token.
13163 (rules): Use it.
13164 (declarations, rules): Remove trailing semicolon.
13165 (declaration, rules_or_grammar_declaration):
13166 Allow empty (";") declaration.
13167 (symbol_def): Remove empty actions; no longer needed.
13168 (rules_or_grammar_declaration): Remove trailing semicolon.
13169 (semi_colon.opt): Remove.
13170 * src/reader.h: Include location.h.
13171 (scanner_cursor): New decl.
13172 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13173 rolling our own.
13174 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13175 of *loc.
13176 (STEP): Remove. No longer needed, now that adjust_location does
13177 the work. All uses removed.
13178 (scanner_cursor): New var.
13179 (adjust_location): Renamed from extend_location. It now sets
13180 *loc and adjusts the scanner cursor. All uses changed.
13181 Don't bother testing for CR.
13182 (handle_syncline): Remove location arg; now updates scanner cursor.
13183 All callers changed.
13184 (unexpected_end_of_file): Now accepts start boundary of token or
13185 comment, not location. All callers changed. Update scanner cursor,
13186 not the location.
13187 (SC_AFTER_IDENTIFIER): New state.
13188 (context_state): Renamed from c_context. All uses changed.
13189 (id_loc, code_start, token_start): New local vars.
13190 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13191 processing of Yacc white space and equivalents here.
13192 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13193 instead of returning ID immediately, since we need to search for
13194 a subsequent colon.
13195 (<INITIAL>"'", "\""): Save token_start.
13196 (<INITIAL>"%{", "{", "%%"): Save code_start.
13197 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13198 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13199 BEGIN context_state at end, not INITIAL.
13200 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13201 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13202 Return correct token start.
13203 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13204 the start of a character, string or multiline comment is found.
13205 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13206 Reduction): Adjust reported locations to match the more-precise
13207 results now expected.
13208 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13209 * tests/reduce.at (Useless Rules, Reduced Automaton,
13210 Underivable Rules): Likewise.
13211 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13212 or "|"' now that so many other tokens are allowed by the new grammar.
13213
13214 * src/complain.h (current_file): Remove duplicate decl;
13215 current_file is now owned by files.h.
13216 * src/complain.c, src/scan-gram.l: Include files.h.
13217
13218 2002-12-06 Paul Eggert <eggert@twinsun.com>
13219
13220 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13221 promotes to int; it might be unsigned int.
13222 * data/yacc.c (yy_reduce_print): Likewise.
13223
13224 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13225 be #defined in the prologue, not in the Bison declarations.
13226 This fixes Debian Bug 102878, reported by Shaul Karl.
13227
13228 2002-12-02 Paul Eggert <eggert@twinsun.com>
13229
13230 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13231 * lib/strtoul.c: New file, from gnulib.
13232 This fixes a porting bug reported by Peter Klein in
13233 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
13234
13235 2002-11-30 Paul Eggert <eggert@twinsun.com>
13236
13237 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13238 and put only a forward declaration in the prologue. This is for
13239 consistency with the other scanner helper functions.
13240
13241 Type clashes now generate warnings, not errors, since it
13242 appears that POSIX may allow some grammars with type clashes.
13243 * src/reader.c (grammar_current_rule_check): Warn about
13244 type clashes instead of complaining.
13245 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13246
13247 Add Yacc library, since POSIX requires it.
13248 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13249 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13250 * lib/main.c, lib/yyerror.c: New files.
13251
13252 gram_error can be static; it need not be extern.
13253 * src/reader.h (gram_error): Remove decl.
13254 * src/parse-gram.y (gram_error): Now static. Add static decl.
13255 (print_token_value): Omit parameter names from forward decl,
13256 for consistency.
13257
13258 2002-11-29 Paul Eggert <eggert@twinsun.com>
13259
13260 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13261 be declared before being used. E.g., one should typically
13262 declare them in the prologue. Use GNU coding style in examples.
13263 Put "const" consistently after the type it modifies. Mention
13264 that C99 supports "inline". Mention that yyerror traditionally
13265 returns "int".
13266
13267 %parse-param and %lex-param now take just one argument, the
13268 declaration; the argument name is deduced from the declaration.
13269
13270 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13271 Reporting, Table of Symbols): Document this.
13272 * src/parse-gram.y (add_param): New function.
13273 (COMMA): Remove.
13274 (declaration): Implement new rule for %parse-param and %lex-param.
13275 * src/scan-gram.l: "," now elicits a warning, rather than being
13276 a token; this is more compatible with byacc.
13277 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13278
13279 2002-11-27 Paul Eggert <eggert@twinsun.com>
13280
13281 Rename identifiers to avoid real and potential collisions.
13282
13283 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13284 to avoid collision with lex macro described by Bruce Lilly in
13285 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13286 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13287 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13288 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13289 All uses changed.
13290 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13291 The name "yycontrol" violates the name space rules, and this stuff
13292 wasn't being used anyway.
13293 (input): Remove action; this stuff wasn't being used.
13294 (gram_error): Rename local variable yylloc -> loc.
13295 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13296 (YY_DECL): Don't use "yy" at start of local variables.
13297 All uses changed, e.g., yylloc -> loc.
13298 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13299 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13300 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13301 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13302
13303 * src/parse-gram.y (gram_error): loc is now const *.
13304 * src/reader.h (gram_error): Likewise.
13305
13306 2002-11-24 Paul Eggert <eggert@twinsun.com>
13307
13308 Version 1.75c.
13309
13310 * tests/actions.at (Actions after errors): Use an output format
13311 more similar to that of the Printers and Destructors test.
13312 Test the position of the ';' token too.
13313 (Printers and Destructors): Likewise.
13314 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13315 unnecessarily alarming people when the test fails.
13316
13317 * data/yacc.c (yyerrlab1): Move this label down, so that the
13318 parser does not discard the lookahead token if the user code
13319 invokes YYERROR. This change is required for POSIX conformance.
13320
13321 * lib/error.c: Sync with gnulib.
13322
13323 2002-11-22 Paul Eggert <eggert@twinsun.com>
13324
13325 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13326 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13327 * lib/xmalloc.c: Likewise.
13328
13329 2002-11-20 Paul Eggert <eggert@twinsun.com>
13330
13331 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13332
13333 2002-11-20 Paul Eggert <eggert@twinsun.com>
13334
13335 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13336 should use `if (! x) abort ();' rather than `assert (x);', and
13337 anyway it's one less thing to worry about configuring.
13338
13339 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13340 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13341 and replace all instances of assert with abort.
13342 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13343 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13344
13345 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13346 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13347 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13348 hash_find_entry, hash_rehash, hash_insert): Likewise.
13349 * src/conflicts.c (resolve_sr_conflict): Likewise.
13350 * src/lalr.c (set_goto_map, map_goto): Likewise.
13351 * src/nullable.c (nullable_compute): Likewise.
13352 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13353 * src/reader.c (packgram, reader): Likewise.
13354 * src/state.c (state_new, state_free, state_transitions_set,
13355 state_reduction_find): Likewise.
13356 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13357 symbol_pack): Likewise.
13358 * src/tables.c (conflict_row, pack_vector): Likewise.
13359 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13360 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13361 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13362 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13363
13364 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13365 (ARGMATCH_CONSTRAINT): New macro.
13366 (ARGMATCH_ASSERT): Use it.
13367
13368 * src/system.h (verify): New macro.
13369 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13370 rather than assert.
13371 * src/tables.c (tables_generate): Likewise.
13372
13373 * src/struniq.c (struniq_assert): Now returns void, and aborts
13374 if the assertion is false.
13375 (struniq_assert_p): Remove.
13376 * src/struniq.h: Likewise.
13377
13378 2002-11-18 Paul Eggert <eggert@twinsun.com>
13379
13380 * data/glr.c (yygetLRActions): Replace `yyindex' with
13381 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13382 This fixes the regression with Sun ONE Studio 7 cc that I reported in
13383 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
13384
13385 2002-11-18 Akim Demaille <akim@epita.fr>
13386
13387 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13388 space.
13389 From Tim Van Holder.
13390
13391 2002-11-17 Paul Eggert <eggert@twinsun.com>
13392
13393 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13394 to "SyntaxError" for consistency with my 2002-11-15 change.
13395
13396 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13397 not define to {}, since this breaks the common use of `YYDPRINTF
13398 ((...));' if a single statement is desired (e.g. before `else').
13399 Work around GCC warnings by surrounding corresponding calls with
13400 {} if needed.
13401 (yyhasResolvedValue): Remove unused function.
13402 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13403 loop body.
13404 (yyreportSyntaxError): Renamed from yyreportParseError.
13405 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13406 All uses changed.
13407 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13408 extern when possible. Remove unused initializations.
13409
13410 2002-11-16 Akim Demaille <akim@epita.fr>
13411
13412 Augment the similarity between GLR and LALR traces.
13413
13414 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13415 (YY_REDUCE_PRINT): New.
13416 (yyparse): Use them.
13417 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13418 YYDPRINT here.
13419 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13420 state reached after the reduction/recovery, since...
13421 (yyparse, yyprocessOneStack): Report the state we are entering in.
13422
13423 2002-11-16 Akim Demaille <akim@epita.fr>
13424
13425 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13426 Add support for --trace=skeleton.
13427 * src/scan-skel.l: %option debug.
13428 Scan strings of non-@ or \n instead of character by character.
13429 (scan_skel): Handle trace_skeleton.
13430 (QPUTS): New.
13431 (@output_parser_name@, @output_header_name@): ``Restore'' their
13432 support (used to be M4 macros).
13433 * data/yacc.c: Quote larger chunks, a la glr.c.
13434 * data/lalr1.cc: Likewise.
13435 The header guards are no longer available, so use some other
13436 string than `YYLSP_NEEDED'.
13437
13438 2002-11-16 Akim Demaille <akim@epita.fr>
13439
13440 Make the ``Printers and Destructors'' test more verbose, taking
13441 `yacc.c''s behavior as (possibly wrong) reference.
13442
13443 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13444 instead of fprint on stdout.
13445 Set and report the last_line of the symbols.
13446 Consistently display values and locations.
13447
13448 2002-11-16 Paul Eggert <eggert@twinsun.com>
13449
13450 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13451
13452 2002-11-15 Paul Eggert <eggert@twinsun.com>
13453
13454 * tests/actions.at (Actions after errors): New test case.
13455
13456 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13457 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13458 tests/action.at, tests/calc.at, tests/conflicts.at,
13459 tests/cxx-type.at, tests/regression.at:
13460 "parse error" -> "syntax error" for POSIX compatibility.
13461 "parsing stack overflow..." -> "parser stack overflow" so
13462 that code matches Bison documentation.
13463
13464 2002-11-15 Akim Demaille <akim@epita.fr>
13465
13466 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13467 take two BRACED_CODE, not two string_content.
13468 Free the scanner's obstack when we are done.
13469 (code_content): New.
13470 * tests/calc.at: Adjust.
13471 * doc/bison.texinfo: Adjust.
13472 Also, make sure to include the `,' for these declarations.
13473
13474 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13475
13476 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13477 definition; avoids potential autoreconf problems.
13478
13479 2002-11-15 Akim Demaille <akim@epita.fr>
13480
13481 Always check the value returned by yyparse.
13482
13483 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13484 returned by yyparse.
13485 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13486 Adjust calls.
13487 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13488 returned by yyparse.
13489
13490 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13491
13492 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
13493 on input.at test.
13494
13495 2002-11-14 Paul Eggert <eggert@twinsun.com>
13496
13497 * src/output.c (output_skeleton): Call xfopen instead of
13498 duplicating xfopen's body.
13499
13500 Fix bugs reported by Nelson H. F. Beebe in
13501 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
13502
13503 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13504 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13505 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13506 file twice in the grammar, as an extra check.
13507
13508 * tests/input.at (Torturing the Scanner): Surround the
13509 backslash-newline tests with "#if 0", to make it less likely that
13510 we'll run into compiler bugs. Bring back solitary \ inside
13511 comment, but add a closing comment to work around HP C bug. Don't
13512 test backslash-newline in C character constant.
13513
13514 2002-11-14 Akim Demaille <akim@epita.fr>
13515
13516 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13517 status of the compiler.
13518 Calling `exit 1' is no longer needed.
13519 Reported by Nelson H. F. Beebe.
13520
13521 2002-11-14 Akim Demaille <akim@epita.fr>
13522
13523 * tests/atlocal.in (CPPFLAGS): We have config.h.
13524 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13525 New.
13526 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13527 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13528 * tests/regression.at, tests/torture.at: Use them for all the
13529 grammars that are to be compiled.
13530 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13531 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13532 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13533
13534 2002-11-14 Akim Demaille <akim@epita.fr>
13535
13536 * doc/bison.texinfo: Various formatting changes (alignments in
13537 samples, additional @group/@end group, GCS in samples.
13538 Use @deffn instead of simple @table to define the directives,
13539 macros, variables etc.
13540
13541 2002-11-13 Paul Eggert <eggert@twinsun.com>
13542
13543 Fix some bugs reported by Albert Chin-A-Young in
13544 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
13545
13546 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
13547 -o c"; the HP C compiler chatters during compilation.
13548 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13549 * tests/headers.at (export YYLTYPE): Likewise.
13550
13551 * tests/input.at (Torturing the Scanner): Remove lines containing
13552 solitary backslashes, as they tickle a bug in the HP C compiler.
13553
13554 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13555 comments, since they're not portable. Use GNU coding style.
13556
13557 2002-11-13 Akim Demaille <akim@epita.fr>
13558
13559 * data/yacc.c: Leave bigger chunks of quoted text.
13560 (YYDSYMPRINTF): New.
13561 Use it to report symbol activities.
13562 * data/glr.c (YYDSYMPRINTF): New.
13563 Use it.
13564
13565 2002-11-12 Paul Eggert <eggert@twinsun.com>
13566
13567 Version 1.75b.
13568
13569 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13570 (yyglrReduce): Return yyok, not 0.
13571 This should avoid the enumerated-type warnings reported
13572 by Nelson H. F. Beebe in
13573 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
13574
13575 * lib/bbitset.h (BITSET_INLINE): Remove.
13576 * lib/bitset.h [! BITSET_INLINE]: Remove.
13577 (bitset_set, bitset_reset, bitset_test): Rename local vars
13578 to avoid shadowing warnings by GCC.
13579
13580 * data/glr.c (inline): Remove #define. It's the user's
13581 responsibility to #define it away, just like 'const'.
13582 This fixes one of the bugs reported by Nelson H. F. Beebe in
13583 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
13584
13585 * Makefile.maint (po-check): Scan .l and .y files instead of the
13586 .c and the .h files that they generate. This fixes the bug
13587 reported by Tim Van Holder in:
13588 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
13589 Look for N_ as well as for _. Try to avoid matching #define for
13590 N_ and _.
13591 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13592 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13593 * src/scan-gram.l: Revamp regular expressions so that " and '
13594 do not confuse xgettext.
13595
13596 * src/struniq.h (struniq_new): Do not declare the return type
13597 to be 'const'; this violates the C standard.
13598 * src/struniq.c (struniq_new): Likewise.
13599
13600 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13601
13602 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13603 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13604 linker.
13605
13606 2002-11-12 Akim Demaille <akim@epita.fr>
13607
13608 * Makefile.maint: Sync with Autoconf:
13609 (local_updates): New.
13610
13611 2002-11-12 Akim Demaille <akim@epita.fr>
13612
13613 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13614
13615 2002-11-12 Akim Demaille <akim@epita.fr>
13616
13617 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13618 locations.
13619
13620 2002-11-12 Akim Demaille <akim@epita.fr>
13621
13622 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13623 not yyvalue.
13624
13625 2002-11-12 Akim Demaille <akim@epita.fr>
13626
13627 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13628 Use it to test the GLR parser.
13629
13630 2002-11-12 Akim Demaille <akim@epita.fr>
13631
13632 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13633 defines it.
13634 * data/glr.c (yystos): New.
13635 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13636 (YYDSYMPRINT): New.
13637 (yyval): Don't define it, it is handled via M4.
13638 (yyrecoverParseError): Free verbosely the discarded symbols.
13639 * data/yacc.c (yysymprint): Remove, rather...
13640 (b4_yysymprint_generate): invoke.
13641 * data/c.m4 (b4_yysymprint_generate): New.
13642 Accept pointers as arguments, as opposed to the version from
13643 yacc.c.
13644 (b4_yydestruct_generate): Likewise.
13645 * tests/cations.at (Printers and Destructors): Use Bison directives
13646 instead of CPP macros.
13647 Don't rely on internal details.
13648
13649 2002-11-12 Akim Demaille <akim@epita.fr>
13650
13651 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13652 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13653 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13654 it against YYEMPTY and so forth), work on yytoken (i.e., set
13655 it to YYEMPTY etc.).
13656 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13657 (b4_symbol_actions): Remove.
13658 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13659 for 0, end-of-input.
13660
13661 2002-11-12 Akim Demaille <akim@epita.fr>
13662
13663 * doc/bison.texinfo (Destructor Decl): New.
13664
13665 2002-11-12 Akim Demaille <akim@epita.fr>
13666
13667 * src/tables.c (tables_generate): Use free for pointers that
13668 cannot be NULL, not XFREE.
13669 (pack_vector): Use assert, not fatal, for bound violations.
13670 * src/state.c (state_new): Likewise.
13671 * src/reader.c (reader): Likewise.
13672 * src/lalr.c (set_goto_map): Likewise.
13673 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
13674 the file name.
13675
13676 2002-11-12 Akim Demaille <akim@epita.fr>
13677
13678 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13679 Restore.
13680 * src/scan-gram.l (last_string): Is global to the file, not to
13681 yylex.
13682 * src/parse-gram.y (input): Don't append the epilogue here,
13683 (epilogue.opt): do it here, and free the scanner's obstack.
13684 * src/reader.c (epilogue_set): Rename as...
13685 (epilogue_augment): this.
13686 * data/c.m4 (b4_epilogue): Defaults to empty.
13687
13688 2002-11-12 Akim Demaille <akim@epita.fr>
13689
13690 * src/getargs.c (long_options): Remove duplicates.
13691 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13692 Remove.
13693 * doc/bison.rnh: Remove.
13694 * doc/bison.texinfo (VMS Invocation): Remove.
13695
13696 2002-11-12 Akim Demaille <akim@epita.fr>
13697
13698 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13699 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13700
13701 Use struniq for symbols.
13702
13703 * src/symtab.h (symbol_t): The tag member is a struniq.
13704 (symbol_type_set): Adjust.
13705 * src/symtab.c (symbol_new): Takes a struniq.
13706 (symbol_free): Don't free the tag member.
13707 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13708 (hash_compare_symbol, hash_symbol): these.
13709 Use the fact that tags as struniqs.
13710 (symbol_get): Use struniq_new.
13711 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13712 Returns a strniq.
13713 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13714 and type members are struniqs.
13715 * src/reader.c (get_merge_function)
13716 (grammar_current_rule_merge_set): Adjust.
13717 (TYPE, current_type): Are struniq.
13718
13719 Use struniq for file names.
13720
13721 * src/files.h, src/files.c (infile): Split into...
13722 (grammar_file, current_file): these.
13723 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13724 * src/reduce.c (reduce_print): Likewise.
13725 * src/getargs.c (getargs): Likewise.
13726 * src/complain.h, src/complain.c: Likewise.
13727 * src/main.c (main): Call struniqs_new early enough to use it for
13728 file names.
13729 Don't free the input file name.
13730
13731 2002-11-12 Akim Demaille <akim@epita.fr>
13732
13733 * src/symtab.c (symbol_free): Remove dead deactivated code:
13734 type_name are properly removed.
13735 Don't use XFREE to free items that cannot be NULL.
13736 * src/struniq.h, src/struniq.c: New.
13737 * src/main.c (main): Initialize/free struniqs.
13738 * src/parse-gram.y (%union): Add astruniq member.
13739 (yyprint): Adjust.
13740 * src/scan-gram.l (<{tag}>): Return a struniq.
13741 Free the obstack bit that used to store it.
13742 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13743
13744 2002-11-11 Paul Eggert <eggert@twinsun.com>
13745
13746 Revamp to fix many (but not all) of the C- and M4-related quoting
13747 problems. Among other things, this fixes the Bison bug reported
13748 by Jan Hubicka when processing the Bash grammar; see:
13749 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
13750
13751 Use new @ escapes consistently. Represent brackets with @{ and @}
13752 rather than @<:@ and @:>@, since this works a bit better with dumb
13753 editors like vi. Represent @ with @@, since @ is now consistently
13754 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13755 __ofile__, to avoid unexpected expansions. Similarly, use @output
13756 rather than #output.
13757
13758 * data/c.m4 (b4_copyright): Omit file name from comment, since
13759 the file name could contain "*/".
13760 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13761 be quoted. All uses changed.
13762
13763 * data/glr.c: Use new @ escapes consistently.
13764 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13765 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13766 Remove, since they couldn't handle arbitrary characters in file
13767 names.
13768 * data/lalr1.cc: Likewise.
13769 * data/yacc.c: Likewise.
13770
13771 * src/files.c (output_infix): Remove; all uses removed.
13772 * src/files.h: Likewise.
13773
13774 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13775 mishandled funny characters in file names, and anyway it isn't
13776 needed any more.
13777 * data/yacc.c: Likewise.
13778 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13779
13780 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13781 * data/yacc.c: Likewise.
13782
13783 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13784 strings now.
13785 (muscle_init): Quote filename as a C string.
13786 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13787 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13788 * src/output.c (escaped_file_name_output): New function.
13789 (prepare_symbols): Quote tokens for M4.
13790 (prepare): Don't insert output_infix, output_prefix,
13791 output_parser_name, output_header_name; this is now down by scan-skel.
13792 Insert skeleton as a C string.
13793
13794 * src/output.c (user_actions_output, symbol_destructors_output,
13795 symbol_printers_output): Quote filenames for C and M4.
13796 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13797
13798 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13799 escapes other than \\ and \'; this simplifies the code.
13800 (<SC_STRING>): Likewise, for \\ and \".
13801 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13802 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13803 Use new escapes @{ and @} for [ and ].
13804
13805 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13806 them with auto vars.
13807 Switch to new escape scheme, where @ is the escape character uniformly.
13808 Abort if a stray escape character is found. Avoid unbounded input
13809 buffer when parsing non-escaped text.
13810
13811 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13812 __oline__, #output, $@, and @{ do not have unintended meanings.
13813
13814 2002-11-09 Paul Eggert <eggert@twinsun.com>
13815
13816 Fix the test failure due to GCC warnings described in
13817 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
13818 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13819 evaluate to 0 if it's impossible for NINF to be in the respective
13820 table.
13821 (yygetLRActions, yyrecoverParseError): Use them.
13822
13823 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13824 counted in the token inserted at end of file. Now takes
13825 location_t *, not location_t, so that the location can be
13826 adjusted. All uses changed.
13827
13828 * tests/regression.at (Invalid inputs): Adjust wording in
13829 diagnostic to match the new behavior.
13830
13831 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13832 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13833 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13834 abort ();'. This reduces the runtime of the "Many lookaheads"
13835 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13836 GCC 3.2.
13837
13838 2002-11-07 Paul Eggert <eggert@twinsun.com>
13839
13840 * src/parse-gram.y (CHARACTER): Remove unused token.
13841 All uses removed.
13842
13843 * src/scan-gram.l: Remove stack option. We no longer use the
13844 stack, since the stack was never deeper than 1; instead, use the
13845 new auto var c_context to record the stacked value.
13846
13847 Remove nounput option. At an unexpected end of file, we now unput
13848 the minimal input necessary to end cleanly; this simplifies the
13849 code.
13850
13851 Avoid unbounded token sizes where this is easy.
13852
13853 (unexpected_end_of_file): New function.
13854 Use it to systematize the error message on unexpected EOF.
13855 (last-string): Now auto, not static.
13856 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
13857 (scanner_last_string_free): Remove; not used.
13858 (percent_percent_count): Move decl to just before use.
13859 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
13860 not the (never otherwised-used) CHARACTER.
13861
13862 2002-11-07 Akim Demaille <akim@epita.fr>
13863
13864 Let yyerror always receive the msg as last argument, so that
13865 yyerror can be variadic.
13866
13867 * data/yacc.c (b4_yyerror_args): New.
13868 Use it when calling yyerror.
13869 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
13870 Use it when calling yyerror.
13871 * doc/bison.texinfo (Error Reporting): Adjust.
13872 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
13873 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
13874
13875 2002-11-06 Akim Demaille <akim@epita.fr>
13876
13877 #line should have quoted strings.
13878 Ideally, this should be done by m4_quotearg.
13879
13880 * src/scan-skel.l: Include quotearg.h.
13881 Quote __ofile__.
13882 * src/output.c (symbol_printers_output)
13883 (symbol_destructors_output): Quote the file name.
13884
13885 2002-11-06 Akim Demaille <akim@epita.fr>
13886
13887 * tests/regression.at (Invalid inputs): Adjust to the recent
13888 messages.
13889
13890 2002-11-06 Akim Demaille <akim@epita.fr>
13891
13892 Restore --no-lines.
13893 Reported by Jim Kent.
13894
13895 * data/c.m4 (b4_syncline): New.
13896 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
13897 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
13898 * src/output.c (user_actions_output): Likewise.
13899 (prepare): Define 'b4_synclines_flag'.
13900 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
13901
13902 2002-11-06 Akim Demaille <akim@epita.fr>
13903
13904 * src/main.c (main): Free `infile'.
13905 * src/scan-gram.l (handle_syncline): New.
13906 Recognize `#line'.
13907 * src/output.c (user_actions_output, symbol_destructors_output)
13908 (symbol_printers_output): Use the location's file name, not
13909 infile.
13910 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13911
13912 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13913
13914 * src/tables.c (matching_state): Don't allow states to match if
13915 either has GLR conflict entries.
13916
13917 2002-11-05 Paul Eggert <eggert@twinsun.com>
13918
13919 * src/scan-gram.l: Use more accurate diagnostics, e.g.
13920 "integer out of range" rather than "invalid value".
13921 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
13922 accordingly.
13923
13924 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
13925 Also, remove one static variable in the scanner.
13926
13927 * src/scan-gram.l (braces_level): Now auto, not static.
13928 Initialize to zero if the compiler is being picky.
13929 (INITIAL): Clear braces_level instead of incrementing it.
13930 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
13931 as POSIX 1003.1-2001 requires.
13932 * src/system.h (IF_LINT): New macro, taken from coreutils.
13933 * configure.ac: Define "lint" if --enable-gcc-warnings.
13934
13935 2002-11-05 Akim Demaille <akim@epita.fr>
13936
13937 * src/scan-gram.l: When it starts with `%', complain about the
13938 whole directive, not just that `invalid character: %'.
13939
13940 2002-11-04 Akim Demaille <akim@epita.fr>
13941
13942 * Makefile.maint: Update from Autoconf.
13943 (update, cvs-update, po-update, do-po-update): New.
13944
13945 2002-11-04 Akim Demaille <akim@epita.fr>
13946
13947 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
13948 and yyerror.
13949 Have yyerror `use' its arguments.
13950 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
13951 returns true when location & yacc & pure & parse-param.
13952 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
13953
13954 2002-11-04 Akim Demaille <akim@epita.fr>
13955
13956 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
13957 clashes.
13958 * src/scan-gram.l: Use [\'] instead of ['] to pacify
13959 font-lock-mode.
13960 Use complain_at.
13961 Use quote, not quote_n since LOCATION_PRINT no longer uses the
13962 slot 0.
13963
13964 2002-11-03 Paul Eggert <eggert@twinsun.com>
13965
13966 * src/reader.c (get_merge_function, grammar_current_rule_check):
13967 Use consistent diagnostics for reporting type name clashes.
13968 Quote the types with <>, for consistency with Yacc.
13969 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
13970
13971 2002-11-03 Akim Demaille <akim@epita.fr>
13972
13973 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
13974 New.
13975 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
13976 (b4_parse_param): Remove.
13977 Use b4_identification.
13978 Propagate b4_pure_args where needed to pass them to yyerror.
13979 * data/glr.m4 (b4_parse_param): Remove.
13980 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
13981 (b4_lpure_formals): New.
13982 Use b4_identification.
13983 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
13984 b4_user_formals and b4_user_args.
13985 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
13986 (yyreportAmbiguity): When using a pure parser, also need
13987 the location, and the parse-params.
13988 Adjust callers.
13989 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
13990 When using a pure parser, also need the parse-params.
13991 Adjust callers.
13992 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
13993 (%pure-parser + %parse-param) LALR and GLR parsers.
13994 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
13995 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
13996 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
13997 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
13998 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
13999 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14000 * doc/bison.texinfo: Untabify the whole file.
14001 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14002 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14003 (Error Reporting): Adjust to these new directives.
14004 Document %error-verbose, deprecate YYERROR_VERBOSE.
14005
14006 2002-11-03 Akim Demaille <akim@epita.fr>
14007
14008 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14009 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14010 command line options.
14011 * tests/cxx-type.at: Formatting changes.
14012
14013 2002-11-03 Paul Eggert <eggert@twinsun.com>
14014
14015 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14016 to count columns correctly, and to check for invalid inputs.
14017
14018 Use mbsnwidth to count columns correctly. Account for tabs, too.
14019 Include mbswidth.h.
14020 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14021 (extend_location): New function.
14022 (YY_LINES): Remove.
14023
14024 Handle CRLF in C code rather than in Lex code.
14025 (YY_INPUT): New macro.
14026 (no_cr_read): New function.
14027
14028 Scan UCNs, even though we don't fully handle them yet.
14029 (convert_ucn_to_byte): New function.
14030
14031 Handle backslash-newline correctly in C code.
14032 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14033 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14034 all uses changed.
14035 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14036 Use {splice} wherever C allows backslash-newline.
14037 YY_STEP after space, newline, vertical-tab.
14038 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14039
14040 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14041
14042 ({int}, handle_action_dollar, handle_action_at): Check for integer
14043 overflow.
14044
14045 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14046
14047 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14048 as well as \000. Check for UCHAR_MAX, not 255.
14049 Allow \x with an arbitrary positive number of digits, as in C.
14050 Check for overflow here.
14051 Allow \? and UCNs, for compatibility with C.
14052
14053 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14054 with quote slot used by complain_at.
14055
14056 * tests/input.at: Add tests for backslash-newline, m4 quotes
14057 in symbols, long literals, and funny escapes in strings.
14058
14059 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14060 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14061 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14062 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14063 * m4/mbswidth.m4: New file, from GNU coreutils.
14064
14065 * doc/bison.texinfo (Grammar Outline): Document // comments.
14066 (Symbols): Document that trigraphs have no special meaning in Bison,
14067 nor is backslash-newline allowed.
14068 (Actions): Document that trigraphs have no special meaning.
14069
14070 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14071 no longer used.
14072
14073 2002-11-02 Paul Eggert <eggert@twinsun.com>
14074
14075 * src/reader.c: Don't include quote.h; not needed.
14076 (get_merge_function): Reword warning to be consistent with
14077 type clash diagnostic in grammar_current_rule_check.
14078
14079 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14080 bug in trigraph handling.
14081
14082 * src/output.c (prepare_symbols): When printing token names,
14083 escape "[" as "@<:@" and likewise for "]".
14084
14085 * src/system.h (errno): Remove declaration, as we are now
14086 assuming C89 or better, and C89 guarantees errno.
14087
14088 2002-10-30 Paul Eggert <eggert@twinsun.com>
14089
14090 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14091 Check for close failures.
14092 * src/files.h (xfclose): Return void, not int, since it always
14093 returned zero.
14094 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14095 indicates one.
14096 * src/output.c (output_skeleton): Use xfclose rather than fclose
14097 and ferror. xfclose now checks ferror.
14098
14099 * data/glr.c (YYLEFTMOST_STATE): Remove.
14100 (yyreportTree): Use a stack-based leftmost state. This avoids
14101 our continuing battles with bogus warnings about initializers.
14102
14103 2002-10-30 Akim Demaille <akim@epita.fr>
14104
14105 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14106 #if.
14107
14108 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14109
14110 * tests/glr-regr1.at: New test for reported regressions.
14111 * tests/testsuite.at: Add glr-regr1.at test.
14112 * tests/Makefile.am: Add glr-regr1.at test.
14113
14114 2002-10-24 Paul Eggert <eggert@twinsun.com>
14115
14116 Version 1.75a.
14117
14118 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14119 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14120 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14121 Don't assume strdup exists; POSIX says its an XSI extension.
14122 Check for buffer overflow on input.
14123
14124 2002-10-24 Akim Demaille <akim@epita.fr>
14125
14126 * src/output.c (output_skeleton): Don't disable M4sugar comments
14127 too soon: it results in comments being expanded.
14128 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14129 first output.
14130
14131 2002-10-24 Akim Demaille <akim@epita.fr>
14132
14133 * data/yacc.c (m4_int_type): New.
14134 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14135 char' as only yacc.c wants K&R portability.
14136 * data/glr.c (yysigned_char): Remove.
14137 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14138 Reported by Quoc Peyrot.
14139
14140 2002-10-23 Paul Eggert <eggert@twinsun.com>
14141
14142 * src/main.c (main): With --trace=time, report times even if a
14143 non-fatal error occurs. Formerly, the times were reported in some
14144 such cases but not in others.
14145 * src/reader.c (reader): Just return if a complaint has been issued,
14146 instead of exiting, so that 'main' can report times.
14147
14148 2002-10-22 Akim Demaille <akim@epita.fr>
14149
14150 * src/system.h: Include sys/types.
14151 Reported by Bert Deknuydt.
14152
14153 2002-10-23 Paul Eggert <eggert@twinsun.com>
14154
14155 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14156 Suggested by Art Haas.
14157
14158 2002-10-22 Paul Eggert <eggert@twinsun.com>
14159
14160 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14161 decl; not needed any more.
14162 * src/main.c (main): Use return to exit, undoing yesterday's change.
14163 The last OS that we could find where this wouldn't work is
14164 SunOS 3.5, and that's too old to worry about now.
14165
14166 * data/glr.c (struct yyltype): Define members even when not
14167 doing locations. This is more consistent with yacc.c, and it
14168 works around the following bug reports:
14169 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14170 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
14171
14172 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14173 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14174 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14175
14176 2002-10-22 Akim Demaille <akim@epita.fr>
14177
14178 * data/README: New.
14179
14180 2002-10-21 Paul Eggert <eggert@twinsun.com>
14181
14182 Be consistent about 'bool'; the old code used an enum in one
14183 module and an int in another, and this violates the C standard.
14184 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14185 * configure.ac (AC_HEADER_STDBOOL): Add.
14186 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14187 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14188 * src/symtab.c (hash_compare_symbol_t): Likewise.
14189 * src/system.h (bool, false, true): Use a definition consistent
14190 with ../lib/hash.c. All uses changed.
14191
14192 * src/complain.c (warning_issued): Renamed from warn_message_count,
14193 so that we needn't worry about integer overflow (!).
14194 Now of type bool. All uses changed.
14195 (complaint_issued): Renamed from complain_message_count; likewise.
14196
14197 * src/main.c (main): Use exit to exit with failure.
14198
14199 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14200 rather than 1 and 0.
14201 * src/main.c (main): Likewise.
14202 * src/getargs.c (getargs): Likewise.
14203 * src/reader.c (reader): Likewise.
14204
14205 * src/getarg.c (getargs): Remove duplicate code for
14206 "Try `bison --help'".
14207
14208 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14209 What was that "2" for?
14210
14211 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14212 * src/getargs.c (usage): Likewise.
14213
14214 * src/getargs.c (getargs): When there are too few operands, report
14215 the last one. When there are too many, report the first extra
14216 one. This is how diffutils does it.
14217
14218 2002-10-20 Paul Eggert <eggert@twinsun.com>
14219
14220 Remove K&R vestiges.
14221 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14222 * src/complain.c (VA_START): Remove. Assume prototypes.
14223 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14224 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14225 fatal): Assume prototypes.
14226 * src/complain.h: Assume prototypes.
14227 * src/system.h (PARAMS): Remove.
14228 Include <limits.h> unconditionally, since it's guaranteeed even
14229 for a freestanding C89 compiler.
14230 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14231 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
14232
14233 2002-10-20 Akim Demaille <akim@epita.fr>
14234
14235 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14236 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14237 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14238 (yyresolveStates, yyresolveAction, yyresolveStack)
14239 (yyprocessOneStack): Use them.
14240 (yy_reduce_print): New.
14241 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14242
14243 2002-10-20 Akim Demaille <akim@epita.fr>
14244
14245 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14246 arguments and output `void'.
14247 (b4_c_function): Rename as...
14248 (b4_c_function_def): this.
14249 (b4_c_function_decl, b4_c_ansi_function_def)
14250 (b4_c_ansi_function_decl): New.
14251 Change the interpretation of the arguments: before `int, foo', now
14252 `int foo, foo'.
14253 * data/yacc.c (yyparse): Prototype and define thanks to these.
14254 Adjust b4_c_function_def uses.
14255 * data/glr.c (yyparse): Likewise, but ANSI only.
14256
14257 2002-10-20 Akim Demaille <akim@epita.fr>
14258
14259 * src/output.c (prepare): Move the definition of `tokens_number',
14260 `nterms_number', `undef_token_number', `user_token_number_max'
14261 to...
14262 (prepare_tokens): Here.
14263 (prepare_tokens): Rename as...
14264 (prepare_symbols): this.
14265 (prepare): Move the definition of `rules_number' to...
14266 (prepare_rules): here.
14267 (prepare): Move the definition of `last', `final_state_number',
14268 `states_number' to...
14269 (prepare_states): here.
14270 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14271
14272 2002-10-20 Akim Demaille <akim@epita.fr>
14273
14274 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14275
14276 2002-10-20 Akim Demaille <akim@epita.fr>
14277
14278 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14279 * data/c.m4: here.
14280
14281 2002-10-20 Akim Demaille <akim@epita.fr>
14282
14283 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14284 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14285 `pair'.
14286 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14287 `name' to...
14288 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14289 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14290 These.
14291
14292 2002-10-19 Paul Eggert <eggert@twinsun.com>
14293
14294 Do not create a temporary file, as that involves security and
14295 cleanup headaches. Instead, use a pair of pipes.
14296 Derived from a suggestion by Florian Krohm.
14297 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14298 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14299 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14300 (BISON_PREREQ_SUBPIPE): Add.
14301 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14302 Add subpipe.h, subpipe.c.
14303 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14304 * po/POTFILES.in: Add lib/subpipe.c.
14305 * src/output.c: Include "subpipe.h".
14306 (m4_invoke): Remove decl.
14307 (scan_skel): New decl.
14308 (output_skeleton): Use pipe rather than temporary file for m4 input.
14309 Check that m4sugar.m4 is readable, to avoid deadlock.
14310 Check for pipe I/O error.
14311 * src/scan-skel.l (readpipe): Remove decl.
14312 (scan_skel): New function, to be used in place of m4_invoke.
14313 Read from stream rather than file.
14314
14315 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14316 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14317 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14318 this generates a more-accurate value anyway.
14319
14320 * lib/timevar.c (timervar_accumulate): Rename locals to
14321 avoid confusion with similarly-named more-global.
14322 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14323
14324 * src/output.c (prepare): Use xstrdup to convert char const *
14325 to char *, to avoid GCC warning.
14326
14327 2002-10-19 Akim Demaille <akim@epita.fr>
14328
14329 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14330 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14331 Use them to have `calc.y' ready for %pure-parser.
14332 * data/yacc.c (YYLEX): Pass a yylex return type to
14333 b4_c_function_call.
14334
14335 2002-10-19 Akim Demaille <akim@epita.fr>
14336
14337 Prototype support of %lex-param and %parse-param.
14338
14339 * src/parse-gram.y: Add the definition of the %lex-param and
14340 %parse-param tokens, plus their rules.
14341 Drop the `_' version of %glr-parser.
14342 Add the "," token.
14343 * src/scan-gram.l (INITIAL): Scan them.
14344 * src/muscle_tab.c: Comment changes.
14345 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14346 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14347 (muscle_entry_s): The `value' member is no longer const.
14348 Adjust all dependencies.
14349 * src/muscle_tab.c (muscle_init): Adjust: use
14350 MUSCLE_INSERT_STRING.
14351 Initialize the obstack earlier.
14352 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14353 (muscle_pair_list_grow): New.
14354 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14355 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14356 * tests/calc.at: Use %locations, not --locations.
14357 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14358
14359 2002-10-19 Akim Demaille <akim@epita.fr>
14360
14361 * src/getargs.c (usage): Take status as argument and exit
14362 accordingly.
14363 Report the traditional `Try ... --help' message when status != 0.
14364 (usage, version): Don't take a FILE * as arg, it is pointless.
14365 (getargs): When there is an incorrect number of arguments, make it
14366 an error, and report it GNUlically thanks to `usage ()'.
14367
14368 2002-10-18 Paul Eggert <eggert@twinsun.com>
14369
14370 * data/glr.c (yyreportParseError): Don't assume that sprintf
14371 yields the length of the printed string, as this is not true
14372 on SunOS 4.1.4. Reported by Peter Klein.
14373
14374 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14375 * tests/conflicts.at (%nonassoc and eof): Likewise.
14376 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14377
14378 2002-10-17 Akim Demaille <akim@epita.fr>
14379
14380 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14381 * src/getargs.c (trace_types, trace_args): Adjust.
14382 * src/reader.c (grammar_current_rule_prec_set)
14383 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14384 Standardize error messages.
14385 And s/@prec/%prec/!
14386 (reader): Use trace_flag to enable scanner/parser debugging,
14387 instead of an adhoc scheme.
14388 * src/scan-gram.l: Remove trailing debugging code.
14389
14390 2002-10-16 Paul Eggert <eggert@twinsun.com>
14391
14392 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14393 MUSCLE_TAB_H.
14394
14395 * NEWS: Officially drop support for building Bison with K&R C,
14396 since it didn't work anyway and it's not worth worrying about.
14397 * Makefile.maint (wget_files): Remove ansi2knr.c.
14398 (ansi2knr.c-url_prefix): Remove.
14399 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14400 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14401 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14402
14403 2002-10-15 Paul Eggert <eggert@twinsun.com>
14404
14405 Stop using the "enum_" trick for K&R-style function definitions;
14406 it confused me, and I was the author! Instead, assume that people
14407 who want to use K&R C compilers (when using these modules in GCC,
14408 perhaps?) will run ansi2knr.
14409
14410 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14411 All uses of "enum_" changed to "enum ".
14412 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14413 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14414
14415 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14416 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14417 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14418 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14419 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14420 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14421 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14422 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14423 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14424 Use function prototypes; this removes the need for declaring
14425 static functions simply to provide their prototypes.
14426 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14427 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14428 bitset_count_, bitset_create, bitset_dump, bitset_first,
14429 bitset_free, bitset_init, bitset_last, bitset_next,
14430 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14431 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14432 bitset_print, bitset_release_memory, bitset_toggle_,
14433 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14434 debug_bitset): Likewise.
14435 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14436 * lib/bitset_stats.c (bitset_log_histogram_print,
14437 bitset_percent_histogram_print, bitset_stats_and,
14438 bitset_stats_and_cmp, bitset_stats_and_or,
14439 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14440 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14441 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14442 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14443 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14444 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14445 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14446 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14447 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14448 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14449 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14450 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14451 bitset_stats_zero): Likewise.
14452 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14453 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14454 bitsetv_dump, debug_bitsetv): Likewise.
14455 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14456 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14457 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14458 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14459 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14460 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14461 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14462 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14463 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14464 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14465 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14466 Likewise.
14467 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14468 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14469 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14470 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14471 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14472 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14473 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14474 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14475 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14476 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14477 lbitset_xor_cmp, lbitset_zero): Likewise.
14478
14479 2002-10-14 Akim Demaille <akim@epita.fr>
14480
14481 Version 1.75.
14482
14483 2002-10-14 Akim Demaille <akim@epita.fr>
14484
14485 * tests/Makefile.am (maintainer-check-posix): New.
14486
14487 2002-10-14 Akim Demaille <akim@epita.fr>
14488
14489 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14490 member.
14491
14492 2002-10-14 Akim Demaille <akim@epita.fr>
14493
14494 * src/tables.c (table_ninf_remap): base -> tab.
14495 Reported by Matt Rosing.
14496
14497 2002-10-14 Paul Eggert <eggert@twinsun.com>
14498
14499 * tests/action.at, tests/calc.at, tests/conflicts.at,
14500 tests/cxx-type.at, tests/headers.at, tests/input.at,
14501 tests/regression.at, tests/synclines.at, tests/torture.at:
14502 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14503 so that the tests still work even if POSIXLY_CORRECT is set.
14504 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
14505
14506 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14507 for portability to K&R hosts. Fix typo: signed char is guaranteed
14508 only to 127, not to 128.
14509 * data/glr.c (yysigned_char): New type.
14510 * data/yacc.c (yysigned_char): Likewise.
14511 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14512
14513 2002-10-13 Paul Eggert <eggert@twinsun.com>
14514
14515 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14516 true due to limited range of data type" warning from GCC.
14517
14518 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14519 by wrapping enum yytokentype's definition inside #ifndef
14520 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14521
14522 2002-10-13 Akim Demaille <akim@epita.fr>
14523
14524 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14525 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14526
14527 2002-10-13 Akim Demaille <akim@epita.fr>
14528
14529 * Makefile.maint: Update from Autoconf 2.54.
14530 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14531
14532 2002-10-13 Akim Demaille <akim@epita.fr>
14533
14534 * src/print.c (print_state): Separate the list of solved conflicts
14535 from the other items.
14536 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14537
14538 2002-10-13 Akim Demaille <akim@epita.fr>
14539
14540 Let nondeterministic skeletons be usable with deterministic
14541 tables.
14542
14543 With the patch, GAWK compiled by GCC without -O2 passes its test
14544 suite using a GLR parser driven by LALR tables. It fails with -O2
14545 because `struct stat' gives two different answers on my machine:
14546 88 (definition of an auto var) and later 96 (memset on this var).
14547 Hence the stack is badly corrumpted. The headers inclusion is to
14548 blame: if I move the awk.h inclusion before GLR's system header
14549 inclusion, the two struct stat have the same size.
14550
14551 * src/tables.c (pack_table): Always create conflict_table.
14552 (token_actions): Always create conflict_list.
14553 * data/glr.c (YYFLAG): Remove, unused.
14554
14555 2002-10-13 Akim Demaille <akim@epita.fr>
14556
14557 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14558 (O0FLAGS): New.
14559 (VALGRIND, GXX): New.
14560 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14561 * tests/bison.in: Run $PREBISON a pre-command.
14562 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14563 (maintainer-check-g++): New.
14564 * Makefile.am (maintainer-check): New.
14565
14566 2002-10-13 Akim Demaille <akim@epita.fr>
14567
14568 * data/glr.c: Formatting changes.
14569 Tweak some trace messages to match yacc.c's.
14570
14571 2002-10-13 Akim Demaille <akim@epita.fr>
14572
14573 GLR parsers sometimes raise parse errors instead of performing the
14574 default reduction.
14575 Reported by Charles-Henry de Boysson.
14576
14577 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
14578 check the length of the traces when %glr.
14579 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14580 GLR's traces.
14581 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14582 Test GLR parsers.
14583 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14584 (yyltype): Remove the yy prefix from the member names.
14585 (yytable): Complete its comment.
14586 (yygetLRActions): Map error action number from YYTABLE from
14587 YYTABLE_NINF to 0.
14588 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14589 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14590 not satisfying as we could compare an YYACTION computed from
14591 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14592 only value for error actions.
14593 (yyreportParseError): In verbose parse error messages, don't issue
14594 `error' in the list of expected tokens.
14595 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14596 next action to perform to match glr.c's decoding.
14597 (yytable): Complete its comment.
14598
14599 2002-10-13 Paul Eggert <eggert@twinsun.com>
14600
14601 Fix problem reported by Henrik Grubbstroem in
14602 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
14603 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14604 because the Bison parser reads the second action before reducing
14605 the first one.
14606 * src/scan-gram.l (rule_length): New static var.
14607 Use it to keep track of the rule length in the scanner, since
14608 we can't expect the parser to be in lock-step sync with the scanner.
14609 (handle_action_dollar, handle_action_at): Use this var.
14610 * tests/actions.at (Exotic Dollars): Test for the problem.
14611
14612 2002-10-12 Paul Eggert <eggert@twinsun.com>
14613
14614 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14615 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14616 Include <sys/time.h> when checking for clock_t and struct tms.
14617 Use same include order as source.
14618 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
14619 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
14620
14621 * lib/timevar.c: Update copyright date and clarify comments.
14622 (get_time) [IN_GCC]: Keep the GCC version for reference.
14623
14624 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14625 GCC version as of today, then merge Bison's changes.
14626 Change "GCC" to "Bison" in copyright notice. timevar.def's
14627 author is Akim, so change that too.
14628
14629 * src/reader.c (grammar_current_rule_check):
14630 Don't worry about the default action if $$ is untyped.
14631 Prevents bogus warnings reported by Jim Gifford in
14632 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
14633
14634 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14635 * data/glr.c, data/lalr1.cc, data/yacc.c:
14636 Output token definitions before the first part of user declarations.
14637 Fixes compatibility problem reported by Jim Gifford for kbd in
14638 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14639
14640 2002-10-11 Paul Eggert <eggert@twinsun.com>
14641
14642 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14643 (yyparse): here. This undoes some of the 2002-07-25 change.
14644 Compatibility problem reported by Ralf S. Engelschall with
14645 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14646
14647 2002-10-11 Akim Demaille <akim@epita.fr>
14648
14649 * tests/regression.at Characters Escapes): New.
14650 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14651 characters.
14652 Reported by Jan Nieuwenhuizen.
14653
14654 2002-10-11 Akim Demaille <akim@epita.fr>
14655
14656 * po/id.po: New.
14657
14658 2002-10-10 Paul Eggert <eggert@twinsun.com>
14659
14660 Portability fixes for bitsets; this also avoids several GCC
14661 warnings.
14662
14663 * lib/abitset.c: Include <stddef.h>, for offsetof.
14664 * lib/lbitset.c: Likewise.
14665
14666 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14667 properly for vectors of objects. Do not assume that adding a
14668 header size to a multiple of a word size yields a value that is
14669 properly aligned for the whole union.
14670 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14671
14672 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14673 unique names for structures.
14674 * lib/ebitset.c (ebitset_bytes): Likewise.
14675 * lib/lbitset.c (lbitset_bytes): Likewise.
14676
14677 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14678 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14679 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14680 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14681 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14682 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14683 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14684 to improve the type-checking that GCC can do.
14685 * lib/bitset.c (bitset_op4_cmp): Likewise.
14686 * lib/bitset_stats.c (bitset_stats_count,
14687 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14688 bitset_stats_copy, bitset_stats_disjoint_p,
14689 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14690 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14691 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14692 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14693 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14694 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14695 bitset_stats_or_and_cmp): Likewise.
14696 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14697 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14698 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14699 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14700
14701 * lib/abitset.h: Include bitset.h, not bbitset.h.
14702 * lib/ebitset.h: Likewise.
14703 * lib/lbitset.h: Likewise.
14704
14705 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14706 All instances of parameters of type enum bitset_opts are now of
14707 type enum_bitset_opts, to conform to the C Standard, and similarly
14708 for enum_bitset_type.
14709 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14710 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14711
14712 Do not use "struct bitset_struct" to mean different things in
14713 different modules. Not only is this confusing, it violates
14714 the C Standard, which requires that structure types in different
14715 modules must be compatible if one is to be passed to the other.
14716 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14717 All instances of "struct bitset_struct *" replaced with "bitset".
14718 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14719 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14720 struct lbitset_struct, struct bitset_stats_struct): New types.
14721 All uses of struct bitset_struct changed to union bitset_union,
14722 etc.
14723 * lib/abitset.c (struct abitset_struct, abitset,
14724 struct bitset_struct): Remove.
14725 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14726 struct bitset_struct): Remove.
14727 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14728 bitset_struct): Remove.
14729 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14730 Likewise.
14731
14732 Do not call a function of type T using a call that assumes the
14733 function is of a different type U. Standard C requires that a
14734 function must be called with a type that is compatible with its
14735 definition.
14736 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14737 New decls.
14738 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14739 New functions.
14740 * lib/ebitset.c (PFV): Remove.
14741 * lib/lbitset.c (PFV): Likewise.
14742 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14743 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14744 decls.
14745 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14746 (ebitset_vtable): Use them.
14747 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14748 lbitset_xor): New functions.
14749 (lbitset_vtable): Use them.
14750
14751 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14752 Declare.
14753
14754 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14755 GCC warning.
14756 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14757 Use offsetof, for simplicity.
14758
14759 2002-10-06 Paul Eggert <eggert@twinsun.com>
14760
14761 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14762 the same width as int. This reapplies a hunk of the 2002-08-12 patch
14763 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
14764 which was inadvertently undone by the 2002-09-30 patch.
14765 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14766 the same width as int.
14767
14768 2002-10-04 Paul Eggert <eggert@twinsun.com>
14769
14770 Version 1.50.
14771
14772 * configure.ac (AC_INIT), NEWS: Increment version number.
14773
14774 * doc/bison.texinfo: Minor spelling, grammar, and white space
14775 fixes.
14776 (Symbols): Mention that any negative value returned from yylex
14777 signifies end-of-input. Warn about negative chars. Mention
14778 the portable Standard C character set.
14779
14780 The GNU coding standard says CFLAGS and YFLAGS are reserved
14781 for the installer to set.
14782 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14783 * src/Makefile.am (AM_CFLAGS): Likewise.
14784 (AM_YFLAGS): Renamed from YFLAGS.
14785
14786 Fix some MAX and MIN problems.
14787 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14788 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14789 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14790 * src/reader.c (reader): Use it.
14791
14792 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14793 POSIX 1003.1-2001 has removed fgrep.
14794
14795 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14796
14797 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14798 interpreted as signed.
14799 * lib/ebitset.c (ebitset_list): Fix bug.
14800
14801 2002-10-01 Paul Eggert <eggert@twinsun.com>
14802
14803 More fixes for 64-bit hosts and large bitsets.
14804
14805 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14806 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14807 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14808 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14809 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14810 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14811 bitset_count_): Likewise.
14812 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14813 bitset_first, bitset_last): Likewise.
14814 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14815 bitset_stats_list_reverse, bitset_stats_size,
14816 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14817 Likewise.
14818 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14819 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14820 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14821 bitsetv_reflexive_transitive_closure): Likewise.
14822 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14823 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14824 Likewise.
14825 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14826 Likewise.
14827
14828 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14829 Use size_t, not unsigned int, to count bytes.
14830 * lib/abitset.h (abitset_bytes): Likewise.
14831 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14832 Likewise.
14833 * lib/bitset.h (bitset_bytes): Likewise.
14834 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14835 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14836 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14837 * lib/ebitset.c (ebitset_bytes): Likewise.
14838 * lib/ebitset.h (ebitset_bytes): Likewise.
14839 * lib/lbitset.c (lbitset_bytes): Likewise.
14840 * lib/lbitset.h (lbitset_bytes): Likewise.
14841
14842 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14843 abitset_subset_p, abitset_disjoint_p, abitset_and,
14844 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14845 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14846 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14847 abitset_or_and, abitset_or_and_cmp):
14848 Use bitset_windex instead of unsigned int.
14849 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14850 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14851 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14852 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
14853 Likewise.
14854 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
14855
14856 * lib/bitset.c (bitset_print):
14857 Use proper printf formats for widths of integer types.
14858 * lib/bitset_stats.c (bitset_percent_histogram_print,
14859 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
14860 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14861 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14862 * lib/lbitset.c (lbitset_bytes): Likewise.
14863
14864 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
14865 BITSET_SIZE_MAX): New macros.
14866 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
14867 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
14868 to BITSET_WINDEX_MAX.
14869
14870 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
14871 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
14872 since we now return the bitset_bindex type (not int).
14873
14874 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
14875 when computing sizes.
14876 * lib/ebitset.c (ebitset_elts_grow): Likewise.
14877
14878 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
14879 and avoid cast to unsigned.
14880
14881 2002-09-30 Akim Demaille <akim@epita.fr>
14882
14883 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14884 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
14885 Updates from Michael Hayes.
14886
14887 2002-09-30 Art Haas <ahaas@neosoft.com>
14888
14889 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
14890 invocations.
14891 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
14892 defined.
14893
14894 2002-09-27 Akim Demaille <akim@epita.fr>
14895
14896 Version 1.49c.
14897
14898 2002-09-27 Akim Demaille <akim@epita.fr>
14899
14900 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
14901 (Because of AC_LIBSOURCE).
14902
14903 2002-09-27 Akim Demaille <akim@epita.fr>
14904
14905 Playing with Autoscan.
14906
14907 * configure.ac: Remove the old LIBOBJ tweaks.
14908 (AC_REPLACE_FUNCS): Add strrchr and strtol.
14909 * lib/strrchr.c: New.
14910 * lib/strtol.c: New, from the Coreutils 4.5.1.
14911
14912 2002-09-27 Akim Demaille <akim@epita.fr>
14913
14914 Playing with Autoscan.
14915
14916 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
14917 * lib/Makefile.am (libbison_a_SOURCES): No longer include
14918 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
14919 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
14920 Coreutils 4.5.1.
14921
14922 2002-09-24 Akim Demaille <akim@epita.fr>
14923
14924 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
14925 (Frequently Asked Questions, Parser Stack Overflow): New.
14926
14927 2002-09-13 Akim Demaille <akim@epita.fr>
14928
14929 Playing with autoscan.
14930
14931 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
14932 * src/files.c (skeleton_find): Remove, unused.
14933 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
14934 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
14935
14936 2002-09-13 Akim Demaille <akim@epita.fr>
14937
14938 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
14939 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
14940
14941 2002-09-13 Akim Demaille <akim@epita.fr>
14942
14943 * configure.ac: Require 2.54.
14944 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
14945 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
14946 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
14947 Remove, provided by Autoconf macros.
14948
14949 2002-09-12 Akim Demaille <akim@epita.fr>
14950
14951 * m4/prereq.m4: Update, from Coreutils 4.5.1.
14952
14953 2002-09-12 Akim Demaille <akim@epita.fr>
14954
14955 * m4/prereq.m4: Update, from Fileutils 4.1.5.
14956 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
14957 Reported by Martin Mokrejs.
14958
14959 2002-09-10 Akim Demaille <akim@epita.fr>
14960
14961 * src/parse-gram.y: Associate a human readable string to each
14962 token type.
14963 * tests/regression.at (Invalid inputs): Adjust.
14964
14965 2002-09-10 Gary V. Vaughan <gary@gnu.org>
14966
14967 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
14968 with an Autoconf-2.5x style configure.ac.
14969
14970 2002-09-06 Paul Eggert <eggert@twinsun.com>
14971
14972 * doc/bison.texinfo (Conditions): Make explicit that the GPL
14973 exception applies only to yacc.c. This is a modification of a
14974 patch originally suggested by Akim Demaille.
14975
14976 2002-09-06 Akim Demaille <akim@epita.fr>
14977
14978 * data/c.m4 (b4_copyright): Move the GPL exception comment from
14979 here to...
14980 * data/yacc.c: here.
14981
14982 * data/lalr1.cc (struct yyltype): Don't define it, since we use
14983 LocationType.
14984 (b4_ltype): Default to yy::Location from location.hh.
14985
14986 2002-09-04 Jim Meyering <jim@meyering.net>
14987
14988 * data/yacc.c: Guard the declaration of yytoknum also with
14989 `#ifdef YYPRINT', so it is declared only when used.
14990
14991 2002-09-04 Akim Demaille <akim@epita.fr>
14992
14993 * configure.in: Rename as...
14994 * configure.ac: this.
14995 Bump to 1.49c.
14996
14997 2002-09-04 Akim Demaille <akim@epita.fr>
14998
14999 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15000 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15001 translate maintainer only messages.
15002
15003 2002-08-12 Paul Eggert <eggert@twinsun.com>
15004
15005 Version 1.49b.
15006
15007 * Makefile.am (SUBDIRS): Remove intl.
15008 (DISTCLEANFILES): Remove.
15009 * NEWS: Mention that GNU M4 is now required. Clarify what is
15010 meant by "larger grammars". Mention the pt_BR translation.
15011 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15012 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15013 Bump version from 0.11.2 to 0.11.5.
15014 (BISON_PREREQ_STAGE): Remove.
15015 (AM_GNU_GETTEXT): Use external gettext.
15016 (AC_OUTPUT): Remove intl/Makefile.
15017
15018 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15019
15020 * data/glr.c: Include string.h, for strlen.
15021 (yyreportParseError): Use size_t for yysize.
15022 (yy_yypstack): No longer nested inside yypstates, as nested
15023 functions are not portable. Do not assume size_t is the
15024 same width as int.
15025 (yypstates): Do not assume that ptrdiff_t is the same width
15026 as int, and similarly for yyposn and YYINDEX.
15027
15028 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15029
15030 * lib/Makefile.am (INCLUDES): Do not include from the intl
15031 directory, which has been removed.
15032 * src/Makefile.am (INCLUDES): Likewise.
15033
15034 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15035 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15036 New vars.
15037
15038 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15039 * tests/Makefile.am (EXTRA_DIST): Likewise.
15040
15041 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15042 Do not assume that bitset_windex is the same width as unsigned.
15043
15044 * lib/abitset.c (abitset_unused_clear): Do not assume that
15045 bitset_word is the same width as int.
15046 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15047 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15048 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15049 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15050 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15051
15052 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15053 portability to one's complement hosts!).
15054 * lib/ebitset.c (ebitset_op1): Likewise.
15055 * lib/lbitset.c (lbitset_op1): Likewise.
15056
15057 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15058 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15059 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15060 Sync with fileutils.
15061 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15062 lib/gettext.h: Sync with diffutils.
15063
15064 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15065 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15066
15067 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15068 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15069 check for void *.
15070
15071 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15072 size_t; the old version tried to do this but casted improperly.
15073 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15074 (bitset_test): Now returns int, not unsigned long.
15075
15076 * lib/bitset_stats.c: Include "gettext.h".
15077 (_): New macro.
15078 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15079 name locals "index", as it generates unnecessary warnings on some
15080 hosts that have an "index" function.
15081
15082 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15083 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15084 they need translation.
15085 * src/LR0.c (state_list_append, new_itemsets, get_state,
15086 append_states, generate_states): Likewise.
15087 * src/assoc.c (assoc_to_string): Likewise.
15088 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15089 * src/gram.c (grammar_dump): Likewise.
15090 * src/injections.c (injections_compute): Likewise.
15091 * src/lalr.c (lookaheads_print): Likewise.
15092 * src/relation.c (relation_transpose): Likewise.
15093 * src/scan-gram.l: Likewise.
15094 * src/tables.c (table_grow, pack_vector): Likewise.
15095
15096 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15097 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15098 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15099 * m4/mbstate_t.m4: Sync with fileutils.
15100 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15101
15102 * po/LINGUAS: Add pt_BR.
15103 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15104 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15105 lib/timevar.c.
15106 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15107 manual recommends.
15108 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15109
15110 * src/complain.c (strerror_r): Remove decl; not needed.
15111 (strerror): Use same pattern as ../lib/error.c.
15112
15113 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15114
15115 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15116
15117 * src/main.c (main): Cast result of bindtextdomain and textdomain
15118 to void, to avoid a GCC warning when --disable-nls is in effect.
15119
15120 * src/scan-gram.l: Use strings rather than escapes when possible,
15121 to minimize the number of warnings from xgettext.
15122 (handle_action_dollar, handle_action_at): Don't use isdigit,
15123 as it mishandles negative chars and it may not work as expected
15124 outside the C locale.
15125
15126 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15127 this is a GCC extension and is not portable to other compilers.
15128
15129 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15130 Do not include <ctype.h>; no longer needed.
15131 Do not include <malloc.h>; no longer needed (and generates
15132 warnings on OpenBSD 3.0).
15133
15134 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15135 it's not portable.
15136
15137 * tests/regression.at: Do not use 'cc -c input.c -o input';
15138 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15139
15140 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15141 exit status as failure, not just exit status 1. Sun C exits
15142 with status 2 sometimes.
15143
15144 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15145 Use it for the two large tests.
15146
15147 2002-08-02 Akim Demaille <akim@epita.fr>
15148
15149 * src/conflicts.c (conflicts_output): Don't output rules never
15150 reduced here, since anyway that computation doesn't work.
15151 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15152 (rule_useless_p, rule_never_reduced_p): New.
15153 (grammar_rules_partial_print): Use a filter instead of a range.
15154 Display the title only if needed.
15155 (grammar_rules_print): Adjust.
15156 (grammar_rules_never_reduced_report): New.
15157 * src/tables.c (action_row): Move the computation of rules never
15158 reduced to...
15159 (token_actions): here.
15160 * src/main.c (main): Make the parser before making the report, so
15161 that rules never reduced are computed.
15162 Call grammar_rules_never_reduced_report.
15163 * src/print.c (print_results): Report rules never reduced.
15164 * tests/conflicts.at, tests/reduce.at: Adjust.
15165
15166 2002-08-01 Akim Demaille <akim@epita.fr>
15167
15168 Instead of attaching lookaheads and duplicating the rules being
15169 reduced by a state, attach the lookaheads to the reductions.
15170
15171 * src/state.h (state_t): Remove the `lookaheads',
15172 `lookaheads_rule' member.
15173 (reductions_t): Add a `lookaheads' member.
15174 Use a regular array for the `rules'.
15175 * src/state.c (reductions_new): Initialize the lookaheads member
15176 to 0.
15177 (state_rule_lookaheads_print): Adjust.
15178 * src/state.h, src/state.c (state_reductions_find): New.
15179 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15180 (count_rr_conflicts): Adjust.
15181 * src/lalr.c (LArule): Remove.
15182 (add_lookback_edge): Adjust.
15183 (state_lookaheads_count): New.
15184 (states_lookaheads_initialize): Merge into...
15185 (initialize_LA): this.
15186 (lalr_free): Adjust.
15187 * src/main.c (main): Don't free nullable and derives too early: it
15188 is used by --verbose.
15189 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15190
15191 2002-08-01 Akim Demaille <akim@epita.fr>
15192
15193 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15194 `rule_number_t**'.
15195 (set_derives, free_derives): Rename as...
15196 (derives_compute, derives_free): this.
15197 Adjust all dependencies.
15198 * src/nullable.c (set_nullable, free_nullable): Rename as...
15199 (nullable_compute, nullable_free): these.
15200 (rule_list_t): Store rule_t *, not rule_number_t.
15201 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15202 pointers, instead of their numbers.
15203 * src/main.c (main): Call nullable_free, and derives_free earlier,
15204 as they were lo longer used.
15205
15206 2002-08-01 Akim Demaille <akim@epita.fr>
15207
15208 * lib/timevar.c (get_time): Include children time.
15209 * src/lalr.h (LA, LArule): Don't export them: used with the
15210 state_t.
15211 * src/lalr.c (LA, LArule): Static.
15212 * src/lalr.h, src/lalr.c (lalr_free): New.
15213 * src/main.c (main): Call it.
15214 * src/tables.c (pack_vector): Check whether loc is >= to the
15215 table_size, not >.
15216 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15217 (tables_generate): do it, since that's also it which allocates
15218 them.
15219 Don't free LA and LArule, main does.
15220
15221 2002-07-31 Akim Demaille <akim@epita.fr>
15222
15223 Separate parser tables computation and output.
15224
15225 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15226 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15227 (yydefgoto, yydefact, high): Move to...
15228 * src/tables.h, src/tables.c: here.
15229 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15230 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15231 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15232 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15233 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15234 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15235 (action_row, save_row, token_actions, save_column, default_goto)
15236 (goto_actions, sort_actions, matching_state, pack_vector)
15237 (table_ninf_remap, pack_table, prepare_actions): Move to...
15238 * src/tables.c: here.
15239 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15240 * src/output.c (token_actions, output_base, output_conflicts)
15241 (output_check): Merge into...
15242 (prepare_actions): this.
15243 (actions_output): Rename as...
15244 (user_actions_output): this.
15245 * src/main.c (main): Call tables_generate and tables_free.
15246
15247 2002-07-31 Akim Demaille <akim@epita.fr>
15248
15249 Steal GCC's --time-report support.
15250
15251 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15252 stolen/adjusted from GCC.
15253 * m4/stage.m4: Remove time related checks.
15254 * m4/timevar.m4: New.
15255 * configure.in: Adjust.
15256 * src/system.h: Adjust to using timevar.h.
15257 * src/getargs.h, src/getargs.c: Support trace_time for
15258 --trace=time.
15259 * src/main.c (stage): Remove.
15260 (main): Replace `stage' invocations with timevar calls.
15261 * src/output.c: Insert pertinent timevar calls.
15262
15263 2002-07-31 Akim Demaille <akim@epita.fr>
15264
15265 Let --trace have arguments.
15266
15267 * src/getargs.h (enum trace_e): New.
15268 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15269 (long_options, short_options): --trace/-T takes an optional
15270 argument.
15271 Change all the uses of trace_flag to reflect the new flags.
15272 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15273
15274 Strengthen `stage' portability.
15275
15276 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15277 * configure.in: Use it.
15278 Don't check for malloc.h and sys/times.h.
15279 * src/system.h: Include them when appropriate.
15280 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15281 times and struct tms are available.
15282
15283 2002-07-30 Akim Demaille <akim@epita.fr>
15284
15285 In verbose parse error message, don't report `error' as an
15286 expected token.
15287 * tests/actions.at (Printers and Destructors): Adjust.
15288 * tests/calc.at (Calculator $1): Adjust.
15289 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15290 error message, do not report the parser accepts the error token in
15291 that state.
15292
15293 2002-07-30 Akim Demaille <akim@epita.fr>
15294
15295 Normalize conflict related messages.
15296
15297 * src/complain.h, src/complain.c (warn, complain): New.
15298 * src/conflicts.c (conflicts_print): Use them.
15299 (conflict_report_yacc): New, extracted from...
15300 (conflicts_print): here.
15301 * tests/conflicts.at, tests/existing.at: Adjust.
15302
15303 2002-07-30 Akim Demaille <akim@epita.fr>
15304
15305 Report rules which are never reduced by the parser: those hidden
15306 by conflicts.
15307
15308 * src/LR0.c (save_reductions): Don't make the final state too
15309 different: save its reduction (accept) instead of having a state
15310 without any action (no shift or goto, no reduce).
15311 Note: the final state is now a ``regular'' state, i.e., the
15312 parsers now contain `reduce 0' as default reduction.
15313 Nevertheless, since they decide to `accept' when yystate =
15314 final_state, they still will not reduce rule 0.
15315 * src/print.c (print_actions, print_reduction): Adjust.
15316 * src/output.c (action_row): Track reduced rules.
15317 (token_actions): Report rules never reduced.
15318 * tests/conflicts.at, tests/regression.at: Adjust.
15319
15320 2002-07-30 Akim Demaille <akim@epita.fr>
15321
15322 `stage' was accidently included in a previous patch.
15323 Initiate its autoconfiscation.
15324
15325 * configure.in: Look for malloc.h and sys/times.h.
15326 * src/main.c (stage): Adjust.
15327 Report only when trace_flag.
15328
15329 2002-07-29 Akim Demaille <akim@epita.fr>
15330
15331 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15332 state_number_t.
15333 (errs_t): symbol_t*, not symbol_number_t.
15334 (reductions_t): rule_t*, not rule_number_t.
15335 (FOR_EACH_SHIFT): New.
15336 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15337 * src/print.c, src/print_graph.c: Adjust.
15338
15339 2002-07-29 Akim Demaille <akim@epita.fr>
15340
15341 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15342
15343 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15344 (endtoken, accept): these.
15345 * src/reader.c (reader): Set endtoken's default tag to "$end".
15346 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15347 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15348 Adjust.
15349
15350 2002-07-29 Akim Demaille <akim@epita.fr>
15351
15352 * src/reduce.c (reduce_grammar): When the language is empty,
15353 complain about the start symbol, not the axiom.
15354 Use its location.
15355 * tests/reduce.at (Empty Language): New.
15356
15357 2002-07-26 Akim Demaille <akim@epita.fr>
15358
15359 * src/reader.h, src/reader.c (gram_error): ... can't get
15360 yycontrol without making too strong assumptions on the parser
15361 itself.
15362 * src/output.c (prepare_tokens): Use the real 0th value of
15363 token_translations instead of `0'.
15364 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15365 visible here.
15366 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15367 for the time being: %locations ought to provide it to yyerror.
15368
15369 2002-07-25 Akim Demaille <akim@epita.fr>
15370
15371 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15372 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15373 * tests/regression.at (Web2c Actions): Adjust.
15374
15375 2002-07-25 Akim Demaille <akim@epita.fr>
15376
15377 Stop storing rules from 1 to nrules + 1.
15378
15379 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15380 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15381 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15382 Iterate from 0 to nrules.
15383 Use rule_number_as_item_number and item_number_as_rule_number.
15384 Adjust to `derive' now containing possibly 0.
15385 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15386 Handle the `- 1' part in rule numbers from/to item numbers.
15387 * src/conflicts.c (log_resolution): Fix the message which reversed
15388 shift and reduce.
15389 * src/output.c (action_row): Initialize default_rule to -1.
15390 (token_actions): Adjust.
15391 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15392 expected output.
15393 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15394
15395 2002-07-25 Akim Demaille <akim@epita.fr>
15396
15397 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15398 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15399 (b4_c_knr_arg_decl): New.
15400 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15401 yyreport_parse_error.
15402
15403 2002-07-25 Akim Demaille <akim@epita.fr>
15404
15405 * data/yacc.c (yyreport_parse_error): New, extracted from...
15406 (yyparse): here.
15407 (yydestruct, yysymprint): Move above yyparse.
15408 Be K&R compliant.
15409
15410 2002-07-25 Akim Demaille <akim@epita.fr>
15411
15412 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15413 replace...
15414 (b4_sint_type, b4_uint_type): these.
15415 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15416 * tests/regression.at (Web2c Actions): Adjust.
15417
15418 2002-07-25 Akim Demaille <akim@epita.fr>
15419
15420 * src/gram.h (TIEM_NUMBER_MAX): New.
15421 (item_number_of_rule_number, rule_number_of_item_number): Rename
15422 as...
15423 (rule_number_as_item_number, item_number_as_rule_number): these.
15424 Adjust dependencies.
15425 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15426 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15427 (symbol_number_to_vector_number): New.
15428 (order): Of vector_number_t* type.
15429 (base_t, BASE_MAX, BASE_MIN): New.
15430 (froms, tos, width, pos, check): Of base_t type.
15431 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15432 (actrow): Of action_number_t type.
15433 (conflrow): Of unsigned int type.
15434 (table_ninf, base_ninf): New.
15435 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15436 (muscle_insert_int_table, muscle_insert_base_table)
15437 (muscle_insert_rule_number_table): New.
15438 (prepare_tokens): Output `toknum' as int_table.
15439 (action_row): Returns a rule_number_t.
15440 Use ACTION_MIN, not SHRT_MIN.
15441 (token_actions): yydefact is rule_number_t*.
15442 (table_ninf_remap): New.
15443 (pack_table): Use it for `base' and `table'.
15444 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15445 replaced with...
15446 (YYPACT_NINF, YYTABLE_NINF): these.
15447 (yypact, yytable): Compute their types instead of hard-coded
15448 `short'.
15449 * tests/regression.at (Web2c Actions): Adjust.
15450
15451 2002-07-19 Akim Demaille <akim@epita.fr>
15452
15453 * src/scan-gram.l (id): Can start with an underscore.
15454
15455 2002-07-16 Akim Demaille <akim@epita.fr>
15456
15457 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15458 Adjust all former `associativity' dependencies.
15459 * src/symtab.c (symbol_new): Default associativity is `undef', not
15460 `right'.
15461 (symbol_check_alias_consistence): Adjust.
15462
15463 2002-07-09 Akim Demaille <akim@epita.fr>
15464
15465 * doc/bison.texinfo: Properly set the ``header'' part.
15466 Use @dircategory ``GNU programming tools'' as per Texinfo's
15467 documentation.
15468 Use @copying.
15469
15470 2002-07-09 Akim Demaille <akim@epita.fr>
15471
15472 * lib/quotearg.h: Protect against multiple inclusions.
15473 * src/location.h (location_t): Add a `file' member.
15474 (LOCATION_RESET, LOCATION_PRINT): Adjust.
15475 * src/complain.c (warn_at, complain_at, fatal_at): Drop
15476 `error_one_per_line' support.
15477
15478 2002-07-09 Akim Demaille <akim@epita.fr>
15479
15480 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15481 * src/reader.c (lineno): Remove.
15482 Adjust all dependencies.
15483 (get_merge_function): Take a location and use complain_at.
15484 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15485 * tests/regression.at (Invalid inputs, Mixing %token styles):
15486 Adjust.
15487
15488 2002-07-09 Akim Demaille <akim@epita.fr>
15489
15490 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15491 recovery rule, and forbid extensions when --yacc.
15492 (gram_error): Use complain_at.
15493 * src/reader.c (reader): Exit if there were parse errors.
15494
15495 2002-07-09 Akim Demaille <akim@epita.fr>
15496
15497 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15498 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15499 Reported by R Blake <blakers@mac.com>.
15500
15501 2002-07-09 Akim Demaille <akim@epita.fr>
15502
15503 * data/yacc.c: Output the copyright notive in the header.
15504
15505 2002-07-03 Akim Demaille <akim@epita.fr>
15506
15507 * src/output.c (froms, tos): Are state_number_t.
15508 (save_column): sp, sp1, and sp2 are state_number_t.
15509 (prepare): Rename `final' as `final_state_number', `nnts' as
15510 `nterms_number', `nrules' as `rules_number', `nstates' as
15511 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15512 unused.
15513 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15514 * data/lalr1.cc (nsym_): Remove, unused.
15515
15516 2002-07-03 Akim Demaille <akim@epita.fr>
15517
15518 * src/lalr.h, src/lalr.c (goto_number_t): New.
15519 * src/lalr.c (goto_list_t): New.
15520 Propagate them.
15521 * src/nullable.c (rule_list_t): New.
15522 Propagate.
15523 * src/types.h: Remove.
15524
15525 2002-07-03 Akim Demaille <akim@epita.fr>
15526
15527 * src/closure.c (print_fderives): Use rule_rhs_print.
15528 * src/derives.c (print_derives): Use rule_rhs_print.
15529 (rule_list_t): New, replaces `shorts'.
15530 (set_derives): Add comments.
15531 * tests/sets.at (Nullable, Firsts): Adjust.
15532
15533 2002-07-03 Akim Demaille <akim@epita.fr>
15534
15535 * src/output.c (prepare_actions): Free `tally' and `width'.
15536 (prepare_actions): Allocate and free `order'.
15537 * src/symtab.c (symbols_free): Free `symbols'.
15538 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15539 * src/output.c (m4_invoke): Move to...
15540 * src/scan-skel.l: here.
15541 (<<EOF>>): Close yyout, and free its name.
15542
15543 2002-07-03 Akim Demaille <akim@epita.fr>
15544
15545 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15546
15547 * src/LR0.c (new_state): Merge into...
15548 (state_list_append): this.
15549 (new_states): Merge into...
15550 (generate_states): here.
15551 (set_states): Don't ensure a proper `errs' state member here, do it...
15552 * src/conflicts.c (conflicts_solve): here.
15553 * src/state.h, src/state.c: Comment changes.
15554 (state_t): Rename member `shifts' as `transitions'.
15555 Adjust all dependencies.
15556 (errs_new): For consistency, also take the values as argument.
15557 (errs_dup): Remove.
15558 (state_errs_set): New.
15559 (state_reductions_set, state_transitions_set): Assert that no
15560 previous value was assigned.
15561 (state_free): New.
15562 (states_free): Use it.
15563 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15564 temporary storage: use `errs' and `nerrs' as elsewhere.
15565 (set_conflicts): Allocate and free this `errs'.
15566
15567 2002-07-02 Akim Demaille <akim@epita.fr>
15568
15569 * lib/libiberty.h: New.
15570 * lib: Update the bitset implementation from upstream.
15571 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15572 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15573 * src/main.c: Adjust bitset stats calls.
15574
15575 2002-07-01 Paul Eggert <eggert@twinsun.com>
15576
15577 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15578 char, so that negative chars don't collide with $.
15579
15580 2002-06-30 Akim Demaille <akim@epita.fr>
15581
15582 Have the GLR tests be `warning' checked, and fix the warnings.
15583
15584 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15585 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15586 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15587 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15588 (yyaddDeferredAction): static.
15589 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15590 (yyreportParseError): yyprefix is const.
15591 yytokenp is used only when verbose.
15592 (yy__GNUC__): Replace with __GNUC__.
15593 (yypdumpstack): yyi is size_t.
15594 (yypreference): Un-yy local variables and arguments, to avoid
15595 clashes with `yyr1'. Anyway, we are not in the user name space.
15596 (yytname_size): be an int, as is compared with ints.
15597 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15598 Use them.
15599 * tests/cxx-gram.at: Use quotation to protect $1.
15600 Use AT_COMPILE to enable warnings hunts.
15601 Prototype yylex and yyerror.
15602 `Use' argc.
15603 Include `string.h', not `strings.h'.
15604 Produce and prototype stmtMerge only when used.
15605 yylex takes a location.
15606
15607 2002-06-30 Akim Demaille <akim@epita.fr>
15608
15609 We spend a lot of time in quotearg, in particular when --verbose.
15610
15611 * src/symtab.c (symbol_get): Store a quoted version of the key.
15612 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15613 Adjust all callers.
15614
15615 2002-06-30 Akim Demaille <akim@epita.fr>
15616
15617 * src/state.h (reductions_t): Rename member `nreds' as num.
15618 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15619 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15620
15621 2002-06-30 Akim Demaille <akim@epita.fr>
15622
15623 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15624 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15625 (shifts_to): Rename as...
15626 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15627 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15628 (TRANSITION_IS_DISABLED, transitions_to): these.
15629
15630 2002-06-30 Akim Demaille <akim@epita.fr>
15631
15632 * src/print.c (print_shifts, print_gotos): Merge into...
15633 (print_transitions): this.
15634 (print_transitions, print_errs, print_reductions): Align the
15635 lookaheads columns.
15636 (print_core, print_transitions, print_errs, print_state,
15637 print_grammar): Output empty lines separator before, not after.
15638 (state_default_rule_compute): Rename as...
15639 (state_default_rule): this.
15640 * tests/conflicts.at (Defaulted Conflicted Reduction),
15641 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15642 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15643
15644 2002-06-30 Akim Demaille <akim@epita.fr>
15645
15646 Display items as we display rules.
15647
15648 * src/gram.h, src/gram.c (rule_lhs_print): New.
15649 * src/gram.c (grammar_rules_partial_print): Use it.
15650 * src/print.c (print_core): Likewise.
15651 * tests/conflicts.at (Defaulted Conflicted Reduction),
15652 (Unresolved SR Conflicts): Adjust.
15653 (Unresolved SR Conflicts): Adjust and rename as...
15654 (Resolved SR Conflicts): this, as was meant.
15655 * tests/regression.at (Web2c Report): Adjust.
15656
15657 2002-06-30 Akim Demaille <akim@epita.fr>
15658
15659 * src/print.c (state_default_rule_compute): New, extracted from...
15660 (print_reductions): here.
15661 Pessimize, but clarify the code.
15662 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15663
15664 2002-06-30 Akim Demaille <akim@epita.fr>
15665
15666 * src/output.c (action_row): Let default_rule be always a rule
15667 number.
15668
15669 2002-06-30 Akim Demaille <akim@epita.fr>
15670
15671 * src/closure.c (print_firsts, print_fderives, closure):
15672 Use BITSET_EXECUTE.
15673 * src/lalr.c (lookaheads_print): Likewise.
15674 * src/state.c (state_rule_lookaheads_print): Likewise.
15675 * src/print_graph.c (print_core): Likewise.
15676 * src/print.c (print_reductions): Likewise.
15677 * src/output.c (action_row): Likewise.
15678 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15679
15680 2002-06-30 Akim Demaille <akim@epita.fr>
15681
15682 * src/print_graph.c: Use report_flag.
15683
15684 2002-06-30 Akim Demaille <akim@epita.fr>
15685
15686 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15687 to...
15688 * src/relation.h, src/relation.c (traverse, relation_digraph)
15689 (relation_print, relation_transpose): New.
15690
15691 2002-06-30 Akim Demaille <akim@epita.fr>
15692
15693 * src/state.h, src/state.c (shifts_to): New.
15694 * src/lalr.c (build_relations): Use it.
15695
15696 2002-06-30 Akim Demaille <akim@epita.fr>
15697
15698 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15699 (item_number_of_rule_number, rule_number_of_item_number): New.
15700 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15701 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15702 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15703 Propagate their use.
15704 Much remains to be done, in particular wrt `shorts' from types.h.
15705
15706 2002-06-30 Akim Demaille <akim@epita.fr>
15707
15708 * src/symtab.c (symbol_new): Initialize the `printer' member.
15709
15710 2002-06-30 Akim Demaille <akim@epita.fr>
15711
15712 * src/LR0.c (save_reductions): Remove, replaced by...
15713 * src/state.h, src/state.c (state_reductions_set): New.
15714 (reductions, errs): Rename as...
15715 (reductions_t, errs_t): these.
15716 Adjust all dependencies.
15717
15718 2002-06-30 Akim Demaille <akim@epita.fr>
15719
15720 * src/LR0.c (state_list_t, state_list_append): New.
15721 (first_state, last_state): Now symbol_list_t.
15722 (this_state): Remove.
15723 (new_itemsets, append_states, save_reductions): Take a state_t as
15724 argument.
15725 (set_states, generate_states): Adjust.
15726 (save_shifts): Remove, replaced by...
15727 * src/state.h, src/state.c (state_shifts_set): New.
15728 (shifts): Rename as...
15729 (shifts_t): this.
15730 Adjust all dependencies.
15731 * src/state.h (state_t): Remove the `next' member.
15732
15733 2002-06-30 Akim Demaille <akim@epita.fr>
15734
15735 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15736 escaped in slot 0.
15737
15738 2002-06-30 Akim Demaille <akim@epita.fr>
15739
15740 Use hash.h for the state hash table.
15741
15742 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15743 (allocate_storage): Use state_hash_new.
15744 (free_storage): Use state_hash_free.
15745 (new_state, get_state): Adjust.
15746 * src/lalr.h, src/lalr.c (states): Move to...
15747 * src/states.h (state_t): Remove the `link' member, no longer
15748 used.
15749 * src/states.h, src/states.c: here.
15750 (state_hash_new, state_hash_free, state_hash_lookup)
15751 (state_hash_insert, states_free): New.
15752 * src/states.c (state_table, state_compare, state_hash): New.
15753 * src/output.c (output_actions): Do not free states now, since we
15754 still need to know the final_state number in `prepare', called
15755 afterwards. Do it...
15756 * src/main.c (main): here: call states_free after `output'.
15757
15758 2002-06-30 Akim Demaille <akim@epita.fr>
15759
15760 * src/state.h, src/state.c (state_new): New, extracted from...
15761 * src/LR0.c (new_state): here.
15762 * src/state.h (STATE_ALLOC): Move to...
15763 * src/state.c: here.
15764 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15765 * src/state.h, src/state.c: here.
15766
15767 2002-06-30 Akim Demaille <akim@epita.fr>
15768
15769 * src/reader.c (gensym): Rename as...
15770 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15771 (getsym): Rename as...
15772 (symbol_get): this.
15773
15774 2002-06-30 Akim Demaille <akim@epita.fr>
15775
15776 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15777 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15778 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15779 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15780
15781 2002-06-30 Akim Demaille <akim@epita.fr>
15782
15783 Make the test suite pass with warnings checked.
15784
15785 * tests/actions.at (Printers and Destructors): Improve.
15786 Avoid unsigned vs. signed issues.
15787 * tests/calc.at: Don't exercise the scanner here, do it...
15788 * tests/input.at (Torturing the Scanner): here.
15789
15790 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15791
15792 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
15793 reorganize first lines parallel to yacc.c.
15794
15795 2002-06-28 Akim Demaille <akim@epita.fr>
15796
15797 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15798 (b4_token_enum, b4_token_defines): New, factored from...
15799 * data/lalr1.cc, data/yacc.c, glr.c: here.
15800
15801 2002-06-28 Akim Demaille <akim@epita.fr>
15802
15803 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15804 unused variables.
15805 * src/output.c (merger_output): static.
15806
15807 2002-06-28 Akim Demaille <akim@epita.fr>
15808
15809 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
15810 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15811 pacify GCC.
15812 * src/output.c (save_row): Initialize all the variables to pacify GCC.
15813
15814 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15815
15816 Accumulated changelog for new GLR parsing features.
15817
15818 * src/conflicts.c (count_total_conflicts): Change name to
15819 conflicts_total_count.
15820 * src/conflicts.h: Ditto.
15821 * src/output.c (token_actions): Use the new name.
15822 (output_conflicts): Change conflp => conflict_list_heads, and
15823 confl => conflict_list for better readability.
15824 * data/glr.c: Use the new names.
15825 * NEWS: Add self to GLR announcement.
15826
15827 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15828
15829 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15830 Akim Demaille.
15831
15832 * data/bison.glr: Change name to glr.c
15833 * data/glr.c: Renamed from bison.glr.
15834 * data/Makefile.am: Add glr.c
15835
15836 * src/getargs.c:
15837
15838 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
15839 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
15840
15841 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15842
15843 * data/bison.glr: Be sure to restore the
15844 current #line when returning to the skeleton contents after having
15845 exposed the input file's #line.
15846
15847 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15848
15849 * data/bison.glr: Bring up to date with changes to bison.simple.
15850
15851 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15852
15853 * data/bison.glr: Correct definitions that use b4_prefix.
15854 Various reformatting.
15855 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
15856 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
15857 yytokenp argument; now part of stack.
15858 (yychar): Define to behave as documented.
15859 (yyclearin): Ditto.
15860
15861 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15862
15863 * src/reader.h: Add declaration for free_merger_functions.
15864
15865 * src/reader.c (merge_functions): New variable.
15866 (get_merge_function): New function.
15867 (free_merger_functions): New function.
15868 (readgram): Check for %prec that is not followed by a symbol.
15869 Handle %dprec and %merge declarations.
15870 (packgram): Initialize dprec and merger fields in rules array.
15871
15872 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
15873 conflict_list_cnt, conflict_list_free): New variables.
15874 (table_grow): Also grow conflict_table.
15875 (prepare_rules): Output dprec and merger tables.
15876 (conflict_row): New function.
15877 (action_row): Output conflict lists for GLR parser. Don't use
15878 default reduction in conflicted states for GLR parser so that there
15879 are spaces for the conflict lists.
15880 (save_row): Also save conflict information.
15881 (token_actions): Allocate conflict list.
15882 (merger_output): New function.
15883 (pack_vector): Pack conflict table, too.
15884 (output_conflicts): New function to output yyconflp and yyconfl.
15885 (output_check): Allocate conflict_tos.
15886 (output_actions): Output conflict tables, also.
15887 (output_skeleton): Output b4_mergers definition.
15888 (prepare): Output b4_max_rhs_length definition.
15889 Use 'bison.glr' as default skeleton for GLR parsers.
15890
15891 * src/gram.c (glr_parser): New flag.
15892 (grammar_free): Call free_merger_functions.
15893
15894 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
15895 all pairs of conflicting reductions, rather than just all tokens
15896 causing conflicts. Needed to size conflict tables.
15897 (conflicts_output): Modify call to count_rr_conflicts for new
15898 interface.
15899 (conflicts_print): Ditto.
15900 (count_total_conflicts): New function.
15901
15902 * src/reader.h (merger_list): New type.
15903 (merge_functions): New variable.
15904
15905 * src/lex.h (tok_dprec, tok_merge): New token types.
15906
15907 * src/gram.h (rule_s): Add dprec and merger fields.
15908 (glr_parser): New flag.
15909
15910 * src/conflicts.h (count_total_conflicts): New function.
15911
15912 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
15913
15914 * doc/bison.texinfo (Generalized LR Parsing): New section.
15915 (GLR Parsers): New section.
15916 (Language and Grammar): Mention GLR parsing.
15917 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
15918 Correct typo ("tge" -> "the").
15919
15920 * data/bison.glr: New skeleton for GLR parsing.
15921
15922 * tests/cxx-gram.at: New tests for GLR parsing.
15923
15924 * tests/testsuite.at: Include cxx-gram.at.
15925
15926 * tests/Makefile.am: Add cxx-gram.at.
15927
15928 * src/parse-gram.y:
15929
15930 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
15931
15932 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
15933
15934 2002-06-27 Akim Demaille <akim@epita.fr>
15935
15936 * src/options.h, src/options.c: Remove.
15937 * src/getargs.c (short_options, long_options): New.
15938
15939 2002-06-27 Akim Demaille <akim@epita.fr>
15940
15941 * data/bison.simple, data/bison.c++: Rename as...
15942 * data/yacc.c, data/lalr1.cc: these.
15943 * doc/bison.texinfo (Environment Variables): Remove.
15944
15945 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
15946
15947 * src/getargs.c (report_argmatch): Initialize strtok().
15948
15949 2002-06-20 Akim Demaille <akim@epita.fr>
15950
15951 * data/bison.simple (b4_symbol_actions): New, replaces...
15952 (b4_symbol_destructor, b4_symbol_printer): these.
15953 (yysymprint): Be sure to call YYPRINT only for tokens, and using
15954 user token numbers.
15955
15956 2002-06-20 Akim Demaille <akim@epita.fr>
15957
15958 * data/bison.simple (yydestructor): Rename as...
15959 (yydestruct): this.
15960
15961 2002-06-20 Akim Demaille <akim@epita.fr>
15962
15963 * src/symtab.h, src/symtab.c (symbol_type_set)
15964 (symbol_destructor_set, symbol_precedence_set): The location is
15965 the last argument.
15966 Adjust all callers.
15967
15968 2002-06-20 Akim Demaille <akim@epita.fr>
15969
15970 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
15971 internals.
15972 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
15973 Takes a location.
15974 * src/symtab.h, src/symtab.c (symbol_class_set)
15975 (symbol_user_token_number_set): Likewise.
15976 Adjust all callers.
15977 Promote complain_at.
15978 * tests/input.at (Type Clashes): Adjust.
15979
15980 2002-06-20 Akim Demaille <akim@epita.fr>
15981
15982 * data/bison.simple (YYLEX): Fix the declaration when
15983 %pure-parser.
15984
15985 2002-06-20 Akim Demaille <akim@epita.fr>
15986
15987 * data/bison.simple (yysymprint): Don't print the token number,
15988 just its name.
15989 * tests/actions.at (Destructors): Rename as...
15990 (Printers and Destructors): this.
15991 Also exercise %printer.
15992
15993 2002-06-20 Akim Demaille <akim@epita.fr>
15994
15995 * data/bison.simple (YYDSYMPRINT): New.
15996 Use it to remove many of the #if YYDEBUG/if (yydebug).
15997
15998 2002-06-20 Akim Demaille <akim@epita.fr>
15999
16000 * src/symtab.h, src/symtab.c (symbol_t): printer and
16001 printer_location are new members.
16002 (symbol_printer_set): New.
16003 * src/parse-gram.y (PERCENT_PRINTER): New token.
16004 Handle its associated rule.
16005 * src/scan-gram.l: Adjust.
16006 (handle_destructor_at, handle_destructor_dollar): Rename as...
16007 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16008 * src/output.c (symbol_printers_output): New.
16009 (output_skeleton): Call it.
16010 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16011 since there are already many grammar files with a user `yyprint'.
16012 Replace the calls to YYPRINT to calls to yysymprint.
16013 * tests/calc.at: Adjust.
16014 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16015 taking advantage of parser very internal details (stack size!).
16016
16017 2002-06-20 Akim Demaille <akim@epita.fr>
16018
16019 * src/scan-gram.l: Complete the scanner with the missing patterns
16020 to pacify Flex.
16021 Use `quote' and `symbol_tag_get' where appropriate.
16022
16023 2002-06-19 Akim Demaille <akim@epita.fr>
16024
16025 * tests/actions.at (Destructors): Augment to test locations.
16026 * data/bison.simple (yydestructor): Pass it the current location
16027 if locations are enabled.
16028 Prototype only when __STDC__ or C++.
16029 Change the argument names to move into the yy name space: there is
16030 user code here.
16031
16032 2002-06-19 Akim Demaille <akim@epita.fr>
16033
16034 * data/bison.simple (b4_pure_if): New.
16035 Use it instead of #ifdef YYPURE.
16036
16037 2002-06-19 Akim Demaille <akim@epita.fr>
16038
16039 * data/bison.simple (b4_location_if): New.
16040 Use it instead of #ifdef YYLSP_NEEDED.
16041
16042 2002-06-19 Akim Demaille <akim@epita.fr>
16043
16044 Prepare @$ in %destructor, but currently don't bind it in the
16045 skeleton, as %location use is not cleaned up yet.
16046
16047 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16048 (handle_action_at): New.
16049 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16050 a braced_code_t and a location as additional arguments.
16051 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16052 unquote one when outputting `b4_dollar_dollar'.
16053 Adjust callers.
16054 * data/bison.simple (b4_eval): Remove.
16055 (b4_symbol_destructor): Adjust.
16056 * tests/input.at (Invalid @n): Adjust.
16057
16058 2002-06-19 Zack Weinberg <zack@codesourcery.com>
16059
16060 * doc/bison.texinfo: Document ability to have multiple
16061 prologue sections.
16062
16063 2002-06-18 Akim Demaille <akim@epita.fr>
16064
16065 * src/files.c (compute_base_names): When computing the output file
16066 names from the input file name, strip the directory part.
16067
16068 2002-06-18 Akim Demaille <akim@epita.fr>
16069
16070 * data/bison.simple.new: Comment changes.
16071 Reported by Andreas Schwab.
16072
16073 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16074
16075 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16076 there are no `label `yyoverflowlab' defined but not used' warnings
16077 when yyoverflow is defined.
16078
16079 2002-06-18 Akim Demaille <akim@epita.fr>
16080
16081 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16082 new member.
16083 (symbol_destructor_set): Adjust.
16084 * src/output.c (symbol_destructors_output): Output the destructor
16085 locations.
16086 Output the symbol name.
16087 * data/bison.simple (b4_symbol_destructor): Adjust.
16088
16089 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16090 and Akim Demaille <akim@epita.fr>
16091
16092 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16093 what's left on the stack when the error recovery hits EOF.
16094 * tests/actions.at (Destructors): Complete to exercise this case.
16095
16096 2002-06-17 Akim Demaille <akim@epita.fr>
16097
16098 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16099 arguments is really empty, not only equal to `[]'.
16100 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16101 member.
16102 (symbol_destructor_set): New.
16103 * src/output.c (symbol_destructors_output): New.
16104 * src/reader.h (brace_code_t, current_braced_code): New.
16105 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16106 (handle_dollar): Rename as...
16107 (handle_action_dollar): this.
16108 (handle_destructor_dollar): New.
16109 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16110 (grammar_declaration): Use it.
16111 * data/bison.simple (yystos): Is always defined.
16112 (yydestructor): New.
16113 * tests/actions.at (Destructors): New.
16114 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16115
16116 2002-06-17 Akim Demaille <akim@epita.fr>
16117
16118 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16119 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16120 rule_length only when needed.
16121 * src/output.c (actions_output, token_definitions_output): Output
16122 the full M4 block.
16123 * src/symtab.c: Don't access directly to the symbol tag, use
16124 symbol_tag_get.
16125 * src/parse-gram.y: Use symbol_list_free.
16126
16127 2002-06-17 Akim Demaille <akim@epita.fr>
16128
16129 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16130 (symbol_list_prepend, get_type_name): Move to...
16131 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16132 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16133 Adjust all callers.
16134 (symbol_list_free): New.
16135 * src/scan-gram.l (handle_dollar): Takes a location.
16136 * tests/input.at (Invalid $n): Adjust.
16137
16138 2002-06-17 Akim Demaille <akim@epita.fr>
16139
16140 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16141 (symbol_list_prepend): New.
16142 * src/parse-gram.y (%union): `list' is a new member.
16143 (symbols.1): New, replaces...
16144 (terms_to_prec.1, nterms_to_type.1): these.
16145 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16146 Take a location as additional argument.
16147 Adjust all callers.
16148
16149 2002-06-15 Akim Demaille <akim@epita.fr>
16150
16151 * src/parse-gram.y: Move %token in the declaration section so that
16152 we don't depend upon CVS Bison.
16153
16154 2002-06-15 Akim Demaille <akim@epita.fr>
16155
16156 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16157 * src/print.c (print_core): Use it.
16158
16159 2002-06-15 Akim Demaille <akim@epita.fr>
16160
16161 * src/conflicts.c (log_resolution): Accept the rule involved in
16162 the sr conflicts instead of the lookahead number that points to
16163 that rule.
16164 (flush_reduce): Accept the current lookahead vector as argument,
16165 instead of the index in LA.
16166 (resolve_sr_conflict): Accept the current number of lookahead
16167 bitset to consider for the STATE, instead of the index in LA.
16168 (set_conflicts): Adjust.
16169 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16170
16171 2002-06-15 Akim Demaille <akim@epita.fr>
16172
16173 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16174 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16175 Adjust all dependencies.
16176 * src/lalr.c (initialize_lookaheads): Split into...
16177 (states_lookaheads_count, states_lookaheads_initialize): these.
16178 (lalr): Adjust.
16179
16180 2002-06-15 Akim Demaille <akim@epita.fr>
16181
16182 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16183 out of...
16184 (grammar_rules_print): here.
16185 * src/reduce.c (reduce_output): Use it.
16186 * tests/reduce.at (Useless Rules, Reduced Automaton)
16187 (Underivable Rules): Adjust.
16188
16189 2002-06-15 Akim Demaille <akim@epita.fr>
16190
16191 Copy BYacc's nice way to report the grammar.
16192
16193 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16194 New.
16195 Don't print the rules' location, it is confusing and useless.
16196 (rule_print): Use grammar_rhs_print.
16197 * src/print.c (print_grammar): Use grammar_rules_print.
16198
16199 2002-06-15 Akim Demaille <akim@epita.fr>
16200
16201 Complete and rationalize `useless thing' warnings.
16202
16203 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16204 (symbol_tag_print): New.
16205 Use them everywhere in place of accessing directly the tag member.
16206 * src/gram.h, src/gram.c (rule_print): New.
16207 Use it where a rule used to be printed `by hand'.
16208 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16209 (reduce_grammar_tables): Report the useless rules.
16210 (reduce_print): Useless things are a warning, not an error.
16211 Report it as such.
16212 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16213 (Reduced Automaton, Underivable Rules): Adjust.
16214 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16215 * tests/conflicts.at (Unresolved SR Conflicts)
16216 (Solved SR Conflicts): Adjust.
16217
16218 2002-06-15 Akim Demaille <akim@epita.fr>
16219
16220 Let symbols have a location.
16221
16222 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16223 (getsym): Adjust.
16224 Adjust all callers.
16225 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16226 Use location_t, not int.
16227 * src/symtab.c (symbol_check_defined): Take advantage of the
16228 location.
16229 * tests/regression.at (Invalid inputs): Adjust.
16230
16231 2002-06-15 Akim Demaille <akim@epita.fr>
16232
16233 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16234 (input): Don't try to initialize yylloc here, do it in the
16235 scanner.
16236 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16237 * src/gram.h (rule_t): Change line and action_line into location
16238 and action_location, of location_t type.
16239 Adjust all dependencies.
16240 * src/location.h, src/location.c (empty_location): New.
16241 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16242 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16243 (grammar_current_rule_symbol_append)
16244 (grammar_current_rule_action_append): Expect a location as argument.
16245 * src/reader.c (grammar_midrule_action): Adjust to attach an
16246 action's location as dummy symbol location.
16247 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16248 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16249 the line numbers.
16250
16251 2002-06-14 Akim Demaille <akim@epita.fr>
16252
16253 Grammar declarations may be found in the grammar section.
16254
16255 * src/parse-gram.y (rules_or_grammar_declaration): New.
16256 (declarations): Each declaration may end with a semicolon, not
16257 just...
16258 (grammar_declaration): `"%union"'.
16259 (grammar): Branch to rules_or_grammar_declaration.
16260
16261 2002-06-14 Akim Demaille <akim@epita.fr>
16262
16263 * src/main.c (main): Invoke scanner_free.
16264
16265 2002-06-14 Akim Demaille <akim@epita.fr>
16266
16267 * src/output.c (m4_invoke): Extracted from...
16268 (output_skeleton): here.
16269 Free tempfile.
16270
16271 2002-06-14 Akim Demaille <akim@epita.fr>
16272
16273 * src/parse-gram.y (directives, directive, gram)
16274 (grammar_directives, precedence_directives, precedence_directive):
16275 Rename as...
16276 (declarations, declaration, grammar, grammar_declaration)
16277 (precedence_declaration, precedence_declarator): these.
16278 (symbol_declaration): New.
16279
16280 2002-06-14 Akim Demaille <akim@epita.fr>
16281
16282 * src/files.c (action_obstack): Remove, unused.
16283 (output_obstack): Remove it, and all its dependencies, as it is no
16284 longer needed.
16285 * src/reader.c (epilogue_set): Build the epilogue in the
16286 muscle_obstack.
16287 * src/output.h, src/output.c (muscle_obstack): Move to...
16288 * src/muscle_tab.h, src/muscle_tab.h: here.
16289 (muscle_init): Initialize muscle_obstack.
16290 (muscle_free): New.
16291 * src/main.c (main): Call it.
16292
16293 2002-06-14 Akim Demaille <akim@epita.fr>
16294
16295 * src/location.h: New, extracted from...
16296 * src/reader.h: here.
16297 * src/Makefile.am (noinst_HEADERS): Merge into
16298 (bison_SOURCES): this.
16299 Add location.h.
16300 * src/parse-gram.y: Use location_t instead of Bison's.
16301 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16302 Use location_t instead of ints.
16303
16304 2002-06-14 Akim Demaille <akim@epita.fr>
16305
16306 * data/bison.simple, data/bison.c++: Be sure to restore the
16307 current #line when returning to the skeleton contents after having
16308 exposed the input file's #line.
16309
16310 2002-06-12 Akim Demaille <akim@epita.fr>
16311
16312 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16313 eager.
16314 * tests/actions.at (Exotic Dollars): New.
16315
16316 2002-06-12 Akim Demaille <akim@epita.fr>
16317
16318 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16319 ['"/] too eagerly.
16320 * tests/input.at (Torturing the Scanner): New.
16321
16322 2002-06-11 Akim Demaille <akim@epita.fr>
16323
16324 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16325 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16326 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16327 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16328 * src/reader.c (reader): Use it.
16329
16330 2002-06-11 Akim Demaille <akim@epita.fr>
16331
16332 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16333 Adjust all callers.
16334 (scanner_last_string_free): New.
16335
16336 2002-06-11 Akim Demaille <akim@epita.fr>
16337
16338 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16339 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16340 (last_string, YY_OBS_FREE): New.
16341 Use them when returning an ID.
16342
16343 2002-06-11 Akim Demaille <akim@epita.fr>
16344
16345 Have Bison grammars parsed by a Bison grammar.
16346
16347 * src/reader.c, src/reader.h (prologue_augment): New.
16348 * src/reader.c (copy_definition): Remove.
16349
16350 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16351 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16352 (grammar_current_rule_prec_set, grammar_current_rule_check)
16353 (grammar_current_rule_symbol_append)
16354 (grammar_current_rule_action_append): Export.
16355 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16356 (symbol_list_action_append): Remove.
16357 Hook the routines from reader.
16358 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16359 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16360
16361 * src/reader.c (read_declarations): Remove, unused.
16362
16363 * src/parse-gram.y: Handle the epilogue.
16364 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16365 (grammar_start_symbol_set): this.
16366 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16367 * src/reader.c (readgram): Remove, unused.
16368 (reader): Adjust to insert eoftoken and axiom where appropriate.
16369
16370 * src/reader.c (copy_dollar): Replace with...
16371 * src/scan-gram.h (handle_dollar): this.
16372 * src/parse-gram.y: Remove `%thong'.
16373
16374 * src/reader.c (copy_at): Replace with...
16375 * src/scan-gram.h (handle_at): this.
16376
16377 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16378 New.
16379
16380 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16381 time being.
16382
16383 * src/reader.h, src/reader.c (grammar_rule_end): New.
16384
16385 * src/parse.y (current_type, current_class): New.
16386 Implement `%nterm', `%token' support.
16387 Merge `%term' into `%token'.
16388 (string_as_id): New.
16389 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16390 type name.
16391
16392 * src/parse-gram.y: Be sure to handle properly the beginning of
16393 rules.
16394
16395 * src/parse-gram.y: Handle %type.
16396 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16397
16398 * src/parse-gram.y: More directives support.
16399 * src/options.c: No longer handle source directives.
16400
16401 * src/parse-gram.y: Fix %output.
16402
16403 * src/parse-gram.y: Handle %union.
16404 Use the prologue locations.
16405 * src/reader.c (parse_union_decl): Remove.
16406
16407 * src/reader.h, src/reader.c (epilogue_set): New.
16408 * src/parse-gram.y: Use it.
16409
16410 * data/bison.simple, data/bison.c++: b4_stype is now either not
16411 defined, then default to int, or to the contents of %union,
16412 without `union' itself.
16413 Adjust.
16414 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16415
16416 * src/output.c (actions_output): Don't output braces, as they are
16417 already handled by the scanner.
16418
16419 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16420 characters to themselves.
16421
16422 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16423 that the epilogue has a proper #line.
16424
16425 * src/parse-gram.y: Handle precedence/associativity.
16426
16427 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16428 a terminal.
16429 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16430 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16431 at all to define terminals that cannot be emitted.
16432
16433 * src/scan-gram.l: Escape M4 characters.
16434
16435 * src/scan-gram.l: Working properly with escapes in user
16436 strings/characters.
16437
16438 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16439 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16440 grammar.
16441 Use more modest sizes, as for the time being the parser does not
16442 release memory, and therefore the process swallows a huge amount
16443 of memory.
16444
16445 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16446 stricter %token grammar.
16447
16448 * src/symtab.h (associativity): Add `undef_assoc'.
16449 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16450 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16451
16452 * tests/regression.at (Invalid %directive): Remove, as it is now
16453 meaningless.
16454 (Invalid inputs): Adjust to the new error messages.
16455 (Token definitions): The new grammar doesn't allow too many
16456 eccentricities.
16457
16458 * src/lex.h, src/lex.c: Remove.
16459 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16460 (copy_character, copy_string2, copy_string, copy_identifier)
16461 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16462 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16463 (parse_action): Remove.
16464 * po/POTFILES.in: Adjust.
16465
16466 2002-06-11 Akim Demaille <akim@epita.fr>
16467
16468 * src/reader.c (parse_action): Don't store directly into the
16469 rule's action member: return the action as a string.
16470 Don't require `rule_length' as an argument: compute it.
16471 (grammar_current_rule_symbol_append)
16472 (grammar_current_rule_action_append): New, eved out from
16473 (readgram): here.
16474 Remove `action_flag', `rulelength', unused now.
16475
16476 2002-06-11 Akim Demaille <akim@epita.fr>
16477
16478 * src/reader.c (grammar_current_rule_prec_set).
16479 (grammar_current_rule_check): New, eved out from...
16480 (readgram): here.
16481 Remove `xaction', `first_rhs': useless.
16482 * tests/input.at (Type clashes): New.
16483 * tests/existing.at (GNU Cim Grammar): Adjust.
16484
16485 2002-06-11 Akim Demaille <akim@epita.fr>
16486
16487 * src/reader.c (grammar_midrule_action): New, Eved out from
16488 (readgram): here.
16489
16490 2002-06-11 Akim Demaille <akim@epita.fr>
16491
16492 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16493 New.
16494 (readgram): Use them as replacement of inlined code, crule and
16495 crule1.
16496
16497 2002-06-11 Akim Demaille <akim@epita.fr>
16498
16499 * src/reader.c (grammar_end, grammar_symbol_append): New.
16500 (readgram): Use them.
16501 Make the use of `p' as local as possible.
16502
16503 2002-06-10 Akim Demaille <akim@epita.fr>
16504
16505 GCJ's parser requires the tokens to be defined before the prologue.
16506
16507 * data/bison.simple: Output the token definition before the user's
16508 prologue.
16509 * tests/regression.at (Braces parsing, Duplicate string)
16510 (Mixing %token styles): Check the output from bison.
16511 (Early token definitions): New.
16512
16513 2002-06-10 Akim Demaille <akim@epita.fr>
16514
16515 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16516 assigning twice the same user number to a token, so that we can
16517 use it in...
16518 * src/lex.c (lex): here.
16519 Also use `symbol_class_set' instead of hand written code.
16520 * src/reader.c (parse_assoc_decl): Likewise.
16521
16522 2002-06-10 Akim Demaille <akim@epita.fr>
16523
16524 * src/symtab.c, src/symtab.c (symbol_class_set)
16525 (symbol_user_token_number_set): New.
16526 * src/reader.c (parse_token_decl): Use them.
16527 Use a switch instead of ifs.
16528 Use a single argument.
16529
16530 2002-06-10 Akim Demaille <akim@epita.fr>
16531
16532 Remove `%thong' support as it is undocumented, unused, duplicates
16533 `%token's job, and creates useless e-mail traffic with people who
16534 want to know what it is, why it is undocumented, unused, and
16535 duplicates `%token's job.
16536
16537 * src/reader.c (parse_thong_decl): Remove.
16538 * src/options.c (option_table): Remove "thong".
16539 * src/lex.h (tok_thong): Remove.
16540
16541 2002-06-10 Akim Demaille <akim@epita.fr>
16542
16543 * src/symtab.c, src/symtab.c (symbol_type_set)
16544 (symbol_precedence_set): New.
16545 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16546 (value_components_used): Remove, unused.
16547
16548 2002-06-09 Akim Demaille <akim@epita.fr>
16549
16550 Move symbols handling code out of the reader.
16551
16552 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16553 (axiom): Move to...
16554 * src/symtab.h, src/symtab.c: here.
16555
16556 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16557 * src/reader.c (startval): Rename as...
16558 * src/symtab.h, src/symtab.c (startsymbol): this.
16559 * src/reader.c: Adjust.
16560
16561 * src/reader.c (symbol_check_defined, symbol_make_alias)
16562 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16563 (token_translations_init)
16564 Move to...
16565 * src/symtab.c: here.
16566 * src/reader.c (packsymbols): Move to...
16567 * src/symtab.h, src/symtab.c (symbols_pack): here.
16568 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16569 argument.
16570
16571 2002-06-03 Akim Demaille <akim@epita.fr>
16572
16573 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16574 then statements.
16575
16576 2002-06-03 Akim Demaille <akim@epita.fr>
16577
16578 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16579 structs with non literals.
16580 * src/scan-skel.l: never-interactive.
16581 * src/conflicts.c (enum conflict_resolution_e): No trailing
16582 comma.
16583 * src/getargs.c (usage): Split long literal strings.
16584 Reported by Hans Aberg.
16585
16586 2002-05-28 Akim Demaille <akim@epita.fr>
16587
16588 * data/bison.c++: Use C++ ostreams.
16589 (cdebug_): New member.
16590
16591 2002-05-28 Akim Demaille <akim@epita.fr>
16592
16593 * src/output.c (output_skeleton): Be sure to allocate enough room
16594 for `/' _and_ for `\0' in full_skeleton.
16595
16596 2002-05-28 Akim Demaille <akim@epita.fr>
16597
16598 * data/bison.c++: Catch up with bison.simple:
16599 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16600 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16601 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16602 and popping traces.
16603
16604 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16605
16606 * src/output.c (output_skeleton): Put an explicit path in front of
16607 the skeleton file name, rather than relying on the -I directory,
16608 to partially alleviate effects of having a skeleton file lying around
16609 in the current directory.
16610
16611 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16612
16613 * src/conflicts.c (log_resolution): Correct typo:
16614 obstack_printf should be obstack_fgrow1.
16615
16616 2002-05-26 Akim Demaille <akim@epita.fr>
16617
16618 * src/state.h (state_t): `solved_conflicts' is a new member.
16619 * src/LR0.c (new_state): Set it to 0.
16620 * src/conflicts.h, src/conflicts.c (print_conflicts)
16621 (free_conflicts, solve_conflicts): Rename as...
16622 (conflicts_print, conflicts_free, conflicts_solve): these.
16623 Adjust callers.
16624 * src/conflicts.c (enum conflict_resolution_e)
16625 (solved_conflicts_obstack): New, used by...
16626 (log_resolution): this.
16627 Adjust to attach the conflict resolution to each state.
16628 Complete the description with the precedence/associativity
16629 information.
16630 (resolve_sr_conflict): Adjust.
16631 * src/print.c (print_state): Output its solved_conflicts.
16632 * tests/conflicts.at (Unresolved SR Conflicts)
16633 (Solved SR Conflicts): Exercise --report=all.
16634
16635 2002-05-26 Akim Demaille <akim@epita.fr>
16636
16637 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16638 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16639 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16640 (token_number_t, item_number_as_token_number)
16641 (token_number_as_item_number, muscle_insert_token_number_table):
16642 Rename as...
16643 (symbol_number_t, item_number_as_symbol_number)
16644 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16645 these, since it is more appropriate.
16646
16647 2002-05-26 Akim Demaille <akim@epita.fr>
16648
16649 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16650 `Error:' lines.
16651 * data/bison.simple (yystos) [YYDEBUG]: New.
16652 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16653 error recovery.
16654 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16655
16656 2002-05-25 Akim Demaille <akim@epita.fr>
16657
16658 * doc/bison.texinfo (Debugging): Split into...
16659 (Tracing): this new section, its former contents, and...
16660 (Understanding): this new section.
16661 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16662 by...
16663 (report_flag): this.
16664 Adjust all dependencies.
16665 (report_args, report_types, report_argmatch): New.
16666 (usage, getargs): Report/support -r, --report.
16667 * src/options.h
16668 (struct option_table_struct): Rename as..,
16669 (struct option_table_s): this.
16670 Rename the `set_flag' member to `flag' to match with getopt_long's
16671 struct.
16672 * src/options.c (option_table): Split verbose into an entry for
16673 %verbose, and another for --verbose.
16674 Support --report/-r, so remove -r from the obsolete --raw.
16675 * src/print.c: Attach full item sets and lookaheads reports to
16676 report_flag instead of trace_flag.
16677 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16678
16679 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16680 and Paul Eggert <eggert@twinsun.com>
16681
16682 * data/bison.simple (yyparse): Correct error handling to conform to
16683 POSIX and yacc. Specifically, after syntax error is discovered,
16684 do not reduce further before shifting the error token.
16685 Clean up the code a bit by removing the labels yyerrdefault,
16686 yyerrhandle, yyerrpop.
16687 * NEWS: Document the above.
16688
16689 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16690
16691 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16692 type; it isn't always big enough, since it doesn't necessarily
16693 include non-terminals.
16694 (yytranslate): Expand definition of yy_token_number_type, so that
16695 the latter can be removed.
16696 (yy_token_number_type): Remove, only one use.
16697 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16698 don't use TokenNumberType as element type.
16699
16700 * tests/regression.at: Modify expected output to agree with change
16701 to yyr1 and yytranslate.
16702
16703 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16704
16705 * src/reader.c (parse_action): Use copy_character instead of
16706 obstack_1grow.
16707
16708 2002-05-13 Akim Demaille <akim@epita.fr>
16709
16710 * tests/regression.at (Token definitions): Prototype yylex and
16711 yyerror.
16712
16713 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16714
16715 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
16716 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16717 32-bit arithmetic.
16718 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16719
16720 2002-05-07 Akim Demaille <akim@epita.fr>
16721
16722 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16723 avoid GCC warnings.
16724
16725 2002-05-07 Akim Demaille <akim@epita.fr>
16726
16727 Kill GCC warnings.
16728
16729 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16730 over the RHS of each rule.
16731 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16732 * src/state.h (state_t): Member `nitems' is unsigned short.
16733 * src/LR0.c (get_state): Adjust.
16734 * src/reader.c (packgram): Likewise.
16735 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16736 `Type'.
16737 (muscle_insert_int_table): Remove, unused.
16738 (prepare_rules): Remove `max'.
16739
16740 2002-05-06 Akim Demaille <akim@epita.fr>
16741
16742 * src/closure.c (print_firsts): Display of the symbol tags.
16743 (bitmatrix_print): Move to...
16744 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16745 here.
16746 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16747
16748 2002-05-06 Akim Demaille <akim@epita.fr>
16749
16750 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16751 hash_do_for_each.
16752
16753 2002-05-06 Akim Demaille <akim@epita.fr>
16754
16755 * src/LR0.c (new_state, get_state): Instead of using the global
16756 `kernel_size' and `kernel_base', have two new arguments:
16757 `core_size' and `core'.
16758 Adjust callers.
16759
16760 2002-05-06 Akim Demaille <akim@epita.fr>
16761
16762 * src/reader.c (packgram): No longer end `ritem' with a 0
16763 sentinel: it is not used.
16764
16765 2002-05-05 Akim Demaille <akim@epita.fr>
16766
16767 New experimental feature: display the lookaheads in the report and
16768 graph.
16769
16770 * src/print (print_core): When --trace-flag, display the rules
16771 lookaheads.
16772 * src/print_graph.c (print_core): Likewise.
16773 Swap the arguments.
16774 Adjust caller.
16775
16776 2002-05-05 Akim Demaille <akim@epita.fr>
16777
16778 * tests/torture.at (Many lookaheads): New test.
16779
16780 2002-05-05 Akim Demaille <akim@epita.fr>
16781
16782 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16783 (GENERATE_MUSCLE_INSERT_TABLE): this.
16784 (output_int_table, output_unsigned_int_table, output_short_table)
16785 (output_token_number_table, output_item_number_table): Replace with...
16786 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16787 (muscle_insert_short_table, muscle_insert_token_number_table)
16788 (muscle_insert_item_number_table): these.
16789 Adjust all callers.
16790 (prepare_tokens): Don't free `translations', since...
16791 * src/reader.h, src/reader.c (grammar_free): do it.
16792 Move to...
16793 * src/gram.h, src/gram.c (grammar_free): here.
16794 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16795 b4_translate_max.
16796
16797 2002-05-05 Akim Demaille <akim@epita.fr>
16798
16799 * src/output.c (output_unsigned_int_table): New.
16800 (prepare_rules): `i' is unsigned.
16801 `prhs', `rline', `r2' are unsigned int.
16802 Rename muscle `rhs_number_max' as `rhs_max'.
16803 Output muscles `prhs_max', `rline_max', and `r2_max'.
16804 Free rline and r1.
16805 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16806 to compute types instead of constant types.
16807 * tests/regression.at (Web2c Actions): Adjust.
16808
16809 2002-05-04 Akim Demaille <akim@epita.fr>
16810
16811 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16812 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16813 Adjust dependencies.
16814 * src/output.c (token_definitions_output): Be sure not to output a
16815 `#define 'a'' when fed with `%token 'a' "a"'.
16816 * tests/regression.at (Token definitions): New.
16817
16818 2002-05-03 Paul Eggert <eggert@twinsun.com>
16819
16820 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16821 for K&R C.
16822
16823 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16824
16825 * Makefile.am (SUBDIRS): Remove intl.
16826 (EXTRA_DIST): Add config/config.rpath.
16827
16828 2002-05-03 Akim Demaille <akim@epita.fr>
16829
16830 * data/bison.simple (m4_if): Don't output empty enums.
16831 And actually, output valid enum definitions :(.
16832
16833 2002-05-03 Akim Demaille <akim@epita.fr>
16834
16835 * configure.bat: Remove, completely obsolete.
16836 * Makefile.am (EXTRA_DIST): Adjust.
16837 Don't distribute config.rpath...
16838 * config/Makefile.am (EXTRA_DIST): Do it.
16839
16840 2002-05-03 Akim Demaille <akim@epita.fr>
16841
16842 * configure.in (GETTEXT_VERSION): New.
16843 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16844
16845 2002-05-03 Akim Demaille <akim@epita.fr>
16846
16847 * data/bison.simple (b4_token_enum): New.
16848 (b4_token_defines): Use it to output tokens both as #define and
16849 enums.
16850 Suggested by Paul Eggert.
16851 * src/output.c (token_definitions_output): Don't output spurious
16852 white spaces.
16853
16854 2002-05-03 Akim Demaille <akim@epita.fr>
16855
16856 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16857
16858 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
16859
16860 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
16861 Update the stack class, give a try to deque as the default container.
16862
16863 2002-05-02 Akim Demaille <akim@epita.fr>
16864
16865 * data/bison.simple (yyparse): Do not implement @$ = @1.
16866 (YYLLOC_DEFAULT): Adjust to do it.
16867 * doc/bison.texinfo (Location Default Action): Fix.
16868
16869 2002-05-02 Akim Demaille <akim@epita.fr>
16870
16871 * src/reader.c (parse_braces): Merge into...
16872 (parse_action): this.
16873
16874 2002-05-02 Akim Demaille <akim@epita.fr>
16875
16876 * configure.in (ALL_LINGUAS): Remove.
16877 * po/LINGUAS, hr.po: New.
16878
16879 2002-05-02 Akim Demaille <akim@epita.fr>
16880
16881 Remove the so called hairy (semantic) parsers.
16882
16883 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
16884 * src/gram.h, src/gram.c (semantic_parser): Remove.
16885 (rule_t): Remove the guard and guard_line members.
16886 * src/lex.h (token_t): remove tok_guard.
16887 * src/options.c (option_table): Remove %guard and %semantic_parser
16888 support.
16889 * src/output.c, src/output.h (guards_output): Remove.
16890 (prepare): Adjust.
16891 (token_definitions_output): Don't output the `T'
16892 tokens (???).
16893 (output_skeleton): Don't output the guards.
16894 * src/files.c, src/files.c (attrsfile): Remove.
16895 * src/reader.c (symbol_list): Remove the guard and guard_line
16896 members.
16897 Adjust dependencies.
16898 (parse_guard): Remove.
16899 * data/bison.hairy: Remove.
16900 * doc/bison.texinfo (Environment Variables): Remove occurrences of
16901 BISON_HAIRY.
16902
16903 2002-05-02 Akim Demaille <akim@epita.fr>
16904
16905 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
16906 (parse_guard): Rename the formal argument `stack_offset' as
16907 `rule_length', which is more readable.
16908 Adjust callers.
16909 (copy_at, copy_dollar): Instead of outputting the hard coded
16910 values of $$, $n and so forth, output invocation to b4_lhs_value,
16911 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
16912 Note: this patch partially drops `semantic-parser' support: it
16913 always does `rule_length - n', where semantic parsers ought to
16914 always use `-n'.
16915 * data/bison.simple, data/bison.c++ (b4_lhs_value)
16916 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
16917
16918 2002-05-02 Akim Demaille <akim@epita.fr>
16919
16920 * configure.in (AC_INIT): Bump to 1.49b.
16921 (AM_INIT_AUTOMAKE): Short invocation.
16922
16923 2002-05-02 Akim Demaille <akim@epita.fr>
16924
16925 Version 1.49a.
16926
16927 2002-05-01 Akim Demaille <akim@epita.fr>
16928
16929 * src/skeleton.h: Remove.
16930
16931 2002-05-01 Akim Demaille <akim@epita.fr>
16932
16933 * src/skeleton.h: Fix the #endif.
16934 Reported by Magnus Fromreide.
16935
16936 2002-04-26 Paul Eggert <eggert@twinsun.com>
16937
16938 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
16939 Define if we define YYSTYPE and YYLTYPE, respectively.
16940 (YYCOPY): Fix [] quoting problem in the non-GCC case.
16941
16942 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
16943
16944 * src/scan-skel.l: Postprocess quadrigraphs.
16945
16946 * src/reader.c (copy_character): New function, used to output
16947 single characters while replacing `[' and `]' with quadrigraphs, to
16948 avoid troubles with M4 quotes.
16949 (copy_comment): Output characters with copy_character.
16950 (read_additionnal_code): Likewise.
16951 (copy_string2): Likewise.
16952 (copy_definition): Likewise.
16953
16954 * tests/calc.at: Exercise M4 quoting.
16955
16956 2002-04-25 Akim Demaille <akim@epita.fr>
16957
16958 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
16959 between `!' and the command.
16960 Reported by Paul Eggert.
16961
16962 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
16963
16964 * tests/calc.at: Exercise prologue splitting.
16965
16966 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
16967 `b4_post_prologue' instead of `b4_prologue'.
16968
16969 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
16970 muscles.
16971 (output): Free pre_prologue_obstack and post_prologue_obstack.
16972 * src/files.h, src/files.c (attrs_obstack): Remove.
16973 (pre_prologue_obstack, post_prologue_obstack): New.
16974 * src/reader.c (copy_definition): Add a parameter to specify the
16975 obstack to fill, instead of using attrs_obstack unconditionally.
16976 (read_declarations): Pass pre_prologue_obstack to copy_definition if
16977 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
16978
16979 2002-04-23 Paul Eggert <eggert@twinsun.com>
16980
16981 * data/bison.simple: Remove unnecessary commentary and white
16982 space differences from 1_29-branch.
16983 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
16984
16985 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
16986 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
16987 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
16988 constructors or destructors.
16989
16990 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
16991
16992 2002-04-23 Akim Demaille <akim@epita.fr>
16993
16994 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
16995 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
16996 location with columns.
16997 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
16998 All reported by Paul Eggert.
16999
17000 2002-04-22 Akim Demaille <akim@epita.fr>
17001
17002 * src/reduce.c (dump_grammar): Move to...
17003 * src/gram.h, src/gram.c (grammar_dump): here.
17004 Be sure to separate long item numbers.
17005 Don't read the members of a rule's prec if its nil.
17006
17007 2002-04-22 Akim Demaille <akim@epita.fr>
17008
17009 * src/output.c (table_size, table_grow): New.
17010 (MAXTABLE): Remove, replace uses with table_size.
17011 (pack_vector): Instead of dying when the table is too big, grow it.
17012
17013 2002-04-22 Akim Demaille <akim@epita.fr>
17014
17015 * data/bison.simple (yyr1): Its type is that of a token number.
17016 * data/bison.c++ (r1_): Likewise.
17017 * tests/regression.at (Web2c Actions): Adjust.
17018
17019 2002-04-22 Akim Demaille <akim@epita.fr>
17020
17021 * src/reader.c (token_translations_init): 256 is now the default
17022 value for the error token, i.e., it will be assigned another
17023 number if the user assigned 256 to one of her tokens.
17024 (reader): Don't force 256 to error.
17025 * doc/bison.texinfo (Symbols): Adjust.
17026 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17027 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17028 etc. instead of 10, 20, 30 (which was used to `jump' over error
17029 (256) and undefined (2)).
17030
17031 2002-04-22 Akim Demaille <akim@epita.fr>
17032
17033 Propagate more token_number_t.
17034
17035 * src/gram.h (token_number_as_item_number)
17036 (item_number_as_token_number): New.
17037 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17038 Use it to create output_item_number_table and
17039 output_token_number_table.
17040 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17041 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17042 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17043 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17044
17045 2002-04-22 Akim Demaille <akim@epita.fr>
17046
17047 * src/output.h, src/output.c (get_lines_number): Remove.
17048
17049 2002-04-19 Akim Demaille <akim@epita.fr>
17050
17051 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17052 as Lex/Flex'.
17053 (Debugging): More details about enabling the debugging features.
17054 (Table of Symbols): Describe $$, $n, @$, and @n.
17055 Suggested by Tim Josling.
17056
17057 2002-04-19 Akim Demaille <akim@epita.fr>
17058
17059 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17060
17061 2002-04-10 Akim Demaille <akim@epita.fr>
17062
17063 * src/system.h: Rely on HAVE_LIMITS_H.
17064 Suggested by Paul Eggert.
17065
17066 2002-04-09 Akim Demaille <akim@epita.fr>
17067
17068 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17069 full stderr, and strip it according to the bison options, instead
17070 of composing the error message from different bits.
17071 This makes it easier to check for several error messages.
17072 Adjust all the invocations.
17073 Add an invocation exercising the error token.
17074 Add an invocation demonstrating a stupid error message.
17075 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17076 Adjust the tests.
17077 Error message are for stderr, not stdout.
17078
17079 2002-04-09 Akim Demaille <akim@epita.fr>
17080
17081 * src/gram.h, src/gram.c (error_token_number): Remove, use
17082 errtoken->number.
17083 * src/reader.c (reader): Don't specify the user token number (2)
17084 for $undefined, as it uselessly prevents using it.
17085 * src/gram.h (token_number_t): Move to...
17086 * src/symtab.h: here.
17087 (state_t.number): Is a token_number_t.
17088 * src/print.c, src/reader.c: Use undeftoken->number instead of
17089 hard coded 2.
17090 (Even though this 2 is not the same as above: the number of the
17091 undeftoken remains being 2, it is its user token number which
17092 might not be 2).
17093 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17094 `user_token_number_max'.
17095 Output `undef_token_number'.
17096 * data/bison.simple, data/bison.c++: Use them.
17097 Be sure to map invalid yylex return values to
17098 `undef_token_number'. This saves us from gratuitous SEGV.
17099
17100 * tests/conflicts.at (Solved SR Conflicts)
17101 (Unresolved SR Conflicts): Adjust.
17102 * tests/regression.at (Web2c Actions): Adjust.
17103
17104 2002-04-08 Akim Demaille <akim@epita.fr>
17105
17106 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17107 Adding #line.
17108 Remove the duplicate `typedefs'.
17109 (RhsNumberType): Fix the declaration and various other typos.
17110 Use __ofile__.
17111 * data/bison.simple: Use __ofile__.
17112 * src/scan-skel.l: Handle __ofile__.
17113
17114 2002-04-08 Akim Demaille <akim@epita.fr>
17115
17116 * src/gram.h (item_number_t): New, the type of item numbers in
17117 RITEM. Note that it must be able to code symbol numbers as
17118 positive number, and the negation of rule numbers as negative
17119 numbers.
17120 Adjust all dependencies (pretty many).
17121 * src/reduce.c (rule): Remove this `short *' pointer: use
17122 item_number_t.
17123 * src/system.h (MINSHORT, MAXSHORT): Remove.
17124 Include `limits.h'.
17125 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17126 (shortcpy): Remove.
17127 (MAXTABLE): Move to...
17128 * src/output.c (MAXTABLE): here.
17129 (prepare_rules): Use output_int_table to output rhs.
17130 * data/bison.simple, data/bison.c++: Adjust.
17131 * tests/torture.at (Big triangle): Move the limit from 254 to
17132 500.
17133 * tests/regression.at (Web2c Actions): Ajust.
17134
17135 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17136 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17137 passes, but produces negative #line number, once fixed, GCC is
17138 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17139 C), it passes.
17140 * src/state.h (state_h): Code input lines on ints, not shorts.
17141
17142 2002-04-08 Akim Demaille <akim@epita.fr>
17143
17144 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17145 and then the grammar.
17146
17147 2002-04-08 Akim Demaille <akim@epita.fr>
17148
17149 * src/system.h: No longer using strndup.
17150
17151 2002-04-07 Akim Demaille <akim@epita.fr>
17152
17153 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17154 * src/output.c (output_table_data): Return the longest number.
17155 (prepare_tokens): Output `token_number_max').
17156 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17157 New.
17158 Use them to define yy_token_number_type/TokenNumberType.
17159 Use this type for yytranslate.
17160 * tests/torture.at (Big triangle): Push the limit from 124 to
17161 253.
17162 * tests/regression.at (Web2c Actions): Adjust.
17163
17164 2002-04-07 Akim Demaille <akim@epita.fr>
17165
17166 * tests/torture.at (Big triangle): New.
17167 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17168 * tests/existing.at: here.
17169
17170 2002-04-07 Akim Demaille <akim@epita.fr>
17171
17172 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17173 nritems.
17174 Adjust dependencies.
17175
17176 2002-04-07 Akim Demaille <akim@epita.fr>
17177
17178 * src/reader.c: Normalize increments to prefix form.
17179
17180 2002-04-07 Akim Demaille <akim@epita.fr>
17181
17182 * src/reader.c, symtab.c: Remove debugging code.
17183
17184 2002-04-07 Akim Demaille <akim@epita.fr>
17185
17186 Rename all the `bucket's as `symbol_t'.
17187
17188 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17189 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17190 * src/symtab.c, src/symtab.h (bucket): Rename as...
17191 (symbol_t): this.
17192 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17193 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17194 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17195 (buckets_new, buckets_free, buckets_do): Rename as...
17196 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17197 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17198 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17199 (symbols_new, symbols_free, symbols_do): these.
17200
17201 2002-04-07 Akim Demaille <akim@epita.fr>
17202
17203 Use lib/hash for the symbol table.
17204
17205 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17206 EOF.
17207 * src/lex.c (lex): Set the `number' member of new terminals.
17208 * src/reader.c (bucket_check_defined, bucket_make_alias)
17209 (bucket_check_alias_consistence, bucket_translation): New.
17210 (reader, grammar_free, readgram, token_translations_init)
17211 (packsymbols): Adjust.
17212 (reader): Number the predefined tokens.
17213 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17214 for predefined tokens.
17215 * src/symtab.h (bucket): Remove all the hash table related
17216 members.
17217 * src/symtab.c (symtab): Replace by...
17218 (bucket_table): this.
17219 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17220 (buckets_new, buckets_do): New.
17221
17222 2002-04-07 Akim Demaille <akim@epita.fr>
17223
17224 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17225 (start_symbol, max_user_token_number, semantic_parser)
17226 (error_token_number): Initialize.
17227 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17228 Initialize.
17229 (reader): Don't.
17230 (errtoken, eoftoken, undeftoken, axiom): Extern.
17231
17232 2002-04-07 Akim Demaille <akim@epita.fr>
17233
17234 * src/gram.h (rule_s): prec and precsym are now pointers
17235 to the bucket giving the priority/associativity.
17236 Member `associativity' removed: useless.
17237 * src/reduce.c, src/conflicts.c: Adjust.
17238
17239 2002-04-07 Akim Demaille <akim@epita.fr>
17240
17241 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17242 Properly escape the symbols' TAG when outputting them.
17243
17244 2002-04-07 Akim Demaille <akim@epita.fr>
17245
17246 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17247
17248 2002-04-07 Akim Demaille <akim@epita.fr>
17249
17250 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17251 (LArule): this, which is an array to rule_t*.
17252 * src/print.c, src/conflicts.c: Adjust.
17253
17254 2002-04-07 Akim Demaille <akim@epita.fr>
17255
17256 * src/gram.h (rule_t): Rename `number' as `user_number'.
17257 `number' is a new member.
17258 Adjust dependencies.
17259 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17260
17261 2002-04-07 Akim Demaille <akim@epita.fr>
17262
17263 As a result of the previous patch, it is no longer needed
17264 to reorder ritem itself.
17265
17266 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17267
17268 2002-04-07 Akim Demaille <akim@epita.fr>
17269
17270 Be sure never to walk through RITEMS, but use only data related to
17271 the rules themselves. RITEMS should be banished.
17272
17273 * src/output.c (output_token_translations): Rename as...
17274 (prepare_tokens): this.
17275 In addition to `translate', prepare the muscles `tname' and
17276 `toknum', which were handled by...
17277 (output_rule_data): this.
17278 Remove, and move the remainder of its outputs into...
17279 (prepare_rules): this new routines, which also merges content from
17280 (output_gram): this.
17281 (prepare_rules): Be sure never to walk through RITEMS.
17282 (output_stos): Rename as...
17283 (prepare_stos): this.
17284 (output): Always invoke prepare_states, after all, just don't use it
17285 in the output if you don't need it.
17286
17287 2002-04-07 Akim Demaille <akim@epita.fr>
17288
17289 * src/LR0.c (new_state): Display `nstates' as the name of the
17290 newly created state.
17291 Adjust to initialize first_state and last_state if needed.
17292 Be sure to distinguish the initial from the final state.
17293 (new_states): Create the itemset of the initial state, and use
17294 new_state.
17295 * src/closure.c (closure): Now that the initial state has its
17296 items properly set, there is no need for a special case when
17297 creating `ruleset'.
17298
17299 As a result, now the rule 0, reducing to $axiom, is visible in the
17300 outputs. Adjust the test suite.
17301
17302 * tests/conflicts.at (Solved SR Conflicts)
17303 (Unresolved SR Conflicts): Adjust.
17304 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17305 * tests/conflicts.at (S/R in initial): New.
17306
17307 2002-04-07 Akim Demaille <akim@epita.fr>
17308
17309 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17310 the RHS of the rules.
17311 * src/output.c (output_gram): Likewise.
17312
17313 2002-04-07 Akim Demaille <akim@epita.fr>
17314
17315 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17316 bucket.
17317 Adjust all dependencies.
17318 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17319 `number' of the buckets too.
17320 * src/gram.h: Include `symtab.h'.
17321 (associativity): Move to...
17322 * src/symtab.h: here.
17323 No longer include `gram.h'.
17324
17325 2002-04-07 Akim Demaille <akim@epita.fr>
17326
17327 * src/gram.h, src/gram.c (rules_rhs_length): New.
17328 (ritem_longest_rhs): Use it.
17329 * src/gram.h (rule_t): `number' is a new member.
17330 * src/reader.c (packgram): Set it.
17331 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17332 the end of `rules', and count them out of `nrules'.
17333 (reduce_output, dump_grammar): Adjust.
17334 * src/print.c (print_grammar): It is no longer needed to check for
17335 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17336 * tests/reduce.at (Reduced Automaton): New test.
17337
17338 2002-04-07 Akim Demaille <akim@epita.fr>
17339
17340 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17341 lacking `+ 1' to nrules, Bison reported as useless a token if it
17342 was used solely to set the precedence of the last rule...
17343
17344 2002-04-07 Akim Demaille <akim@epita.fr>
17345
17346 * data/bison.c++, data/bison.simple: Don't output the current file
17347 name in #line, to avoid useless diffs between two identical
17348 outputs under different names.
17349
17350 2002-04-07 Akim Demaille <akim@epita.fr>
17351
17352 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17353 Normalize loops to using `< nrules + 1', not `<= nrules'.
17354
17355 2002-04-07 Akim Demaille <akim@epita.fr>
17356
17357 * TODO: Update.
17358
17359 2002-04-07 Akim Demaille <akim@epita.fr>
17360
17361 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17362 bucket.value as bucket.number.
17363
17364 2002-04-07 Akim Demaille <akim@epita.fr>
17365
17366 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17367 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17368 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17369 RHS, instead of being an index in RITEMS.
17370
17371 2002-04-04 Paul Eggert <eggert@twinsun.com>
17372
17373 * doc/bison.texinfo: Update copyright date.
17374 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17375 (Symbols): Warn about running Bison in one character set,
17376 but compiling and/or running in an incompatible one.
17377 Warn about character code 256, too.
17378
17379 2002-04-03 Paul Eggert <eggert@twinsun.com>
17380
17381 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17382 YYERROR_VERBOSE is nonzero, not whether it is defined.
17383
17384 Merge changes from bison-1_29-branch.
17385
17386 2002-03-20 Paul Eggert <eggert@twinsun.com>
17387
17388 Merge fixes from Debian bison_1.34-1.diff.
17389
17390 * configure.in (AC_PREREQ): 2.53.
17391
17392 2002-03-20 Akim Demaille <akim@epita.fr>
17393
17394 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17395
17396 2002-03-19 Paul Eggert <eggert@twinsun.com>
17397
17398 * src/bison.simple (YYCOPY): New macro.
17399 (YYSTACK_RELOCATE): Use it.
17400 Remove Type arg; no longer needed. All callers changed.
17401 (yymemcpy): Remove; no longer needed.
17402
17403 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17404 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17405
17406 2002-03-19 Akim Demaille <akim@epita.fr>
17407
17408 Test and fix the #line outputs.
17409
17410 * tests/atlocal.at (GCC): New.
17411 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
17412 (Prologue synch line, %union synch line, Postprologue synch line)
17413 (Action synch line, Epilogue synch line): New tests.
17414 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17415 * data/bison.simple, data/bison.c++: Use it.
17416
17417 2002-03-19 Akim Demaille <akim@epita.fr>
17418
17419 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17420 (Solved SR Conflicts, %expect not enough, %expect right)
17421 (%expect too much): Move to...
17422 * tests/conflicts.at: this new file.
17423
17424 2002-03-19 Akim Demaille <akim@epita.fr>
17425
17426 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17427 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17428 that we can move to enums for instance.
17429 * src/output.c (token_definitions_output): Output a list of
17430 `token-name, token-number' instead of the #define.
17431 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17432
17433 2002-03-14 Akim Demaille <akim@epita.fr>
17434
17435 Use Gettext 0.11.1.
17436
17437 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
17438
17439 * data/bison.c++: Make the user able to add members to the generated
17440 parser by subclassing.
17441
17442 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
17443
17444 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17445 a character.
17446 Reported by Nicolas Tisserand and Nicolas Burrus.
17447
17448 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17449
17450 * src/reader.c: Warn about lacking semi-colons, do not complain.
17451
17452 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17453
17454 * data/bison.c++: Remove a debug line.
17455
17456 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17457
17458 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
17459 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
17460 provide a default implementation.
17461
17462 2002-03-04 Akim Demaille <akim@epita.fr>
17463
17464 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17465 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17466 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17467 * tests/semantic.at (Parsing Guards): Similarly.
17468 * src/reader.at (readgram): Complain if the last rule is not ended
17469 with a semi-colon.
17470
17471 2002-03-04 Akim Demaille <akim@epita.fr>
17472
17473 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17474 * src/closure.c: here.
17475 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17476 RTC.
17477 * src/warshall.h, src/warshall.c: Remove.
17478 * tests/sets.at (Broken Closure): Adjust.
17479
17480 2002-03-04 Akim Demaille <akim@epita.fr>
17481
17482 * src/output.c (output_skeleton): tempdir is const.
17483 bytes_read is unused.
17484
17485 2002-03-04 Akim Demaille <akim@epita.fr>
17486
17487 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17488 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17489 Update.
17490 From Michael Hayes.
17491
17492 2002-03-04 Akim Demaille <akim@epita.fr>
17493
17494 * src/closure.c (closure): `r' is unused.
17495
17496 2002-03-04 Akim Demaille <akim@epita.fr>
17497
17498 * tests/sets.at (Broken Closure): Add the ending `;'.
17499 * src/reader.at (readgram): Complain if a rule is not ended with a
17500 semi-colon.
17501
17502 2002-03-04 Akim Demaille <akim@epita.fr>
17503
17504 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17505 (count_sr_conflicts): Use bitset_count.
17506 * src/reduce.c (inaccessable_symbols): Ditto.
17507 (bits_size): Remove.
17508 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17509
17510 2002-03-04 Akim Demaille <akim@epita.fr>
17511
17512 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17513 * src/reduce.c: Remove the `bitset_zero's following the
17514 `bitset_create's, as now it is performed by the latter.
17515
17516 2002-03-04 Akim Demaille <akim@epita.fr>
17517
17518 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17519 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17520 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17521 latest sources from Michael.
17522
17523 2002-03-04 Akim Demaille <akim@epita.fr>
17524
17525 * src/output.c (output): Don't free the grammar.
17526 * src/reader.c (grammar_free): New.
17527 * src/main.c (main): Call it and don't free symtab here.
17528
17529 2002-03-04 Akim Demaille <akim@epita.fr>
17530
17531 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17532 before returning.
17533 Reported by Benoit Perrot.
17534
17535 2002-03-04 Akim Demaille <akim@epita.fr>
17536
17537 Use bitset operations when possible, not loops over bits.
17538
17539 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17540 bitset_or.
17541 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17542 * src/reduce.c (useless_nonterminals): Formatting changes.
17543 * src/warshall.c (TC): Use bitset_or.
17544
17545 2002-03-04 Akim Demaille <akim@epita.fr>
17546
17547 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17548 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17549 Ditto.
17550
17551 2002-03-04 Akim Demaille <akim@epita.fr>
17552
17553 * src/lalr.c (F): Now a bitset*.
17554 Adjust all dependencies.
17555
17556 2002-03-04 Akim Demaille <akim@epita.fr>
17557
17558 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17559 Adjust all dependencies.
17560
17561 2002-03-04 Akim Demaille <akim@epita.fr>
17562
17563 * src/L0.c, src/LR0.h (nstates): Be size_t.
17564 Adjust comparisons (signed vs unsigned).
17565 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17566 bitset*.
17567 Adjust all dependencies.
17568
17569 2002-03-04 Akim Demaille <akim@epita.fr>
17570
17571 * src/closure.c (firsts): Now, also a bitset.
17572 Adjust all dependencies.
17573 (varsetsize): Remove, now unused.
17574 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17575
17576 2002-03-04 Akim Demaille <akim@epita.fr>
17577
17578 * src/print.c: Convert to use bitset.h, not hand coded iterations
17579 over ints.
17580
17581 2002-03-04 Akim Demaille <akim@epita.fr>
17582
17583 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17584
17585 2002-03-04 Akim Demaille <akim@epita.fr>
17586
17587 * src/closure.c (ruleset): Be a bitset.
17588 (rulesetsize): Remove.
17589
17590 2002-03-04 Akim Demaille <akim@epita.fr>
17591
17592 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17593 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17594 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17595 * src/closure.c (fderives): Be an array of bitsets.
17596
17597 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
17598
17599 * data/bison.c++: Merge the two generated headers. Insert a copyright
17600 notice in each output file.
17601
17602 2002-02-28 Akim Demaille <akim@epita.fr>
17603
17604 * data/bison.c++: Copy the prologue of bison.simple to fetch
17605 useful M4 definitions, such as b4_header_guard.
17606
17607 2002-02-25 Akim Demaille <akim@epita.fr>
17608
17609 * src/getargs.c (version): Give the name of the authors, and use a
17610 translator friendly scheme for the bgr
17611 copyright notice.
17612
17613 2002-02-25 Akim Demaille <akim@epita.fr>
17614
17615 * src/output.c (header_output): Remove, now handled completely via
17616 M4.
17617
17618 2002-02-25 Akim Demaille <akim@epita.fr>
17619
17620 * m4/m4.m4: New, from CVS Autoconf.
17621 * configure.in: Invoke it.
17622 * src/output.c (output_skeleton): Use its result instead of the
17623 hard coded name.
17624
17625 2002-02-25 Akim Demaille <akim@epita.fr>
17626
17627 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17628 Fileutils 4.1.5.
17629 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17630 * src/output.c (output_skeleton): Use mkstemp to create a real
17631 temporary file.
17632 Move the filling of `skeleton' and its muscle to...
17633 (prepare): here.
17634 (output): Move the definition of the prologue muscle to...
17635 (prepare): here.
17636 * src/system.h (DEFAULT_TMPDIR): New.
17637
17638 2002-02-14 Paul Eggert <eggert@twinsun.com>
17639
17640 Remove the support for C++ namespace cleanliness; it was
17641 causing more problems than it was curing, since it didn't work
17642 properly on some nonstandard C++ compilers. This can wait
17643 for a proper C++ parser.
17644
17645 * NEWS: Document this.
17646 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17647 of C++, as it's treated like C now.
17648 * src/bison.simple (YYSTD): Remove.
17649 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17650 Treat C++ just like Standard C instead of trying to support
17651 namespace cleanliness.
17652
17653 2002-02-14 Akim Demaille <akim@epita.fr>
17654
17655 * tests/regression.at (else): Adjust to Andreas' change.
17656
17657 2002-02-14 Akim Demaille <akim@epita.fr>
17658
17659 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17660
17661 2002-02-13 Andreas Schwab <schwab@suse.de>
17662
17663 * src/output.c (output_rule_data): Don't output NULL, it might
17664 not be defined yet.
17665
17666 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
17667
17668 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17669 (Copyright notice): Update.
17670
17671 2002-02-11 Akim Demaille <akim@epita.fr>
17672
17673 * tests/regression.at (%nonassoc and eof): Don't include
17674 nonportable headers.
17675
17676 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
17677
17678 * data/bison.c++: Correct error recovery. Make the user able to
17679 initialize the starting location.
17680
17681 2002-02-07 Akim Demaille <akim@epita.fr>
17682
17683 * tests/input.at: New.
17684
17685 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17686
17687 * data/bison.c++: Replace some direct m4 expansions by constants. Be
17688 more consistent when naming methods and variables. Put preprocessor
17689 directives around tables only needed for debugging.
17690
17691 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17692
17693 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17694 C++ parsers.
17695 (yy::b4_name::parse): Use print_.
17696
17697 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17698
17699 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17700
17701 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17702
17703 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17704 C++ parsers.
17705 (yy::b4_name::parse): Build verbose error messages, and use error_.
17706
17707 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17708
17709 * data/bison.c++: Fix m4 quoting in comments.
17710
17711 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17712
17713 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17714 not expanded by m4.
17715
17716 2002-02-05 Akim Demaille <akim@epita.fr>
17717
17718 * data/bison.c++: Adjust to the M4 back end.
17719 More is certainly needed.
17720
17721 2002-02-05 Akim Demaille <akim@epita.fr>
17722
17723 Give a try to M4 as a back end.
17724
17725 * lib/readpipe.c: New, from wdiff.
17726 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17727 BISON_HAIRY.
17728 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17729 specific values. Now it is m4 that performs the lookup.
17730 * src/parse-skel.y: Remove.
17731 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17732 * src/output.c (actions_output, guards_output)
17733 (token_definitions_output): No longer keeps track of the output
17734 line number, hence remove the second argument.
17735 (guards_output): Check against the guard member of a rule, not the
17736 action member.
17737 Adjust callers.
17738 (output_skeleton): Don't look for the skeleton location, let m4 do
17739 that.
17740 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17741 file will be used.
17742 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17743 (prepare): Given that for the time being changesyntax is not
17744 usable in M4, rename the muscles using `-' to `_'.
17745 Define `defines_flag', `output_parser_name' and `output_header_name'.
17746 * src/output.h (actions_output, guards_output)
17747 (token_definitions_output): Adjust prototypes.
17748 * src/scan-skel.l: Instead of scanning the skeletons, it now
17749 processes the output of m4: `__oline__' and `#output'.
17750 * data/bison.simple: Adjust to be used by M4(sugar).
17751 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17752 to date.
17753 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17754 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17755 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17756 shamelessly stolen from CVS Autoconf.
17757
17758 2002-02-05 Akim Demaille <akim@epita.fr>
17759
17760 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17761 * configure.in: Check for the declarations of free and malloc.
17762 * src/muscle_tab.c: Adjust.
17763
17764 2002-02-05 Akim Demaille <akim@epita.fr>
17765
17766 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17767 which have no values.
17768
17769 2002-02-05 Akim Demaille <akim@epita.fr>
17770
17771 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17772 * data/: here.
17773
17774 2002-01-29 Paul Eggert <eggert@twinsun.com>
17775
17776 * src/bison.simple (YYSIZE_T): Do not define merely because
17777 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17778 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17779
17780 2002-01-27 Akim Demaille <akim@epita.fr>
17781
17782 Fix `%nonassoc and eof'.
17783
17784 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17785 which were not properly copied! Replace
17786 memcpy (res->errs, src->errs, src->nerrs);
17787 with
17788 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17789 !!!
17790 * tests/regression.at (%nonassoc and eof): Adjust to newest
17791 Autotest: `.' is not in the PATH.
17792
17793 2002-01-27 Akim Demaille <akim@epita.fr>
17794
17795 * tests/sets.at (AT_EXTRACT_SETS): New.
17796 (Nullable): Use it.
17797 (Firsts): New.
17798
17799 2002-01-26 Akim Demaille <akim@epita.fr>
17800
17801 * tests/actions.at, tests/calc.at, tests/headers.at,
17802 * tests/torture.at: Adjust to the newest Autotest which no longer
17803 forces `.' in the PATH.
17804
17805 2002-01-25 Akim Demaille <akim@epita.fr>
17806
17807 * tests/regression.at (%nonassoc and eof): New.
17808 Suggested by Robert Anisko.
17809
17810 2002-01-24 Akim Demaille <akim@epita.fr>
17811
17812 Bison dumps core when trying to complain about broken input files.
17813 Reported by Cris van Pelt.
17814
17815 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17816 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17817 into...
17818 (Invalid inputs): Strengthen: exercise parse_percent_token.
17819
17820 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
17821
17822 * src/Makefile.am: Add bison.c++.
17823 * src/bison.c++: New skeleton.
17824
17825 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
17826
17827 * po/it.po: New.
17828
17829 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17830
17831 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17832
17833 2002-01-20 Marc Autret <marc@gnu.org>
17834
17835 * src/files.c (compute_output_file_names): Fix
17836
17837 2002-01-20 Marc Autret <marc@gnu.org>
17838
17839 * tests/output.at: New test.
17840 * src/files.c (compute_base_names): Don't map extensions when
17841 the YACC flag is set, use defaults.
17842 Reported by Evgeny Stambulchik.
17843
17844 2002-01-20 Marc Autret <marc@gnu.org>
17845
17846 * src/system.h: Need to define __attribute__ away for non-GCC
17847 compilers as well (i.e., the vendor C compiler).
17848 Suggested by Albert Chin-A-Young.
17849
17850 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
17851
17852 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17853 canonical definition.
17854 * src/system.h: Use the canonical definition for PARAMS (avoids
17855 a conflict with the macro from lib/hash.h).
17856
17857 2002-01-11 Akim Demaille <akim@epita.fr>
17858
17859 * configure.in: Use AC_FUNC_STRNLEN.
17860 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
17861
17862 2002-01-09 Akim Demaille <akim@epita.fr>
17863
17864 * src/files.c, src/files.h (output_infix): New.
17865 (tab_extension): Remove.
17866 (compute_base_names): Compute the former, drop the latter.
17867 * src/output.c (prepare): Insert the muscles `output-infix', and
17868 `output-suffix'.
17869 * src/parse-skel.y (string, string.1): New.
17870 (section.header): Use it.
17871 (section.yacc): Remove.
17872 (prefix): Remove too.
17873 * src/scan-skel.l: Adjust.
17874 * src/bison.simple, src/bison.hairy: Adjust.
17875
17876 2002-01-09 Akim Demaille <akim@epita.fr>
17877
17878 * configure.in (WERROR_CFLAGS): Compute it.
17879 * src/Makefile.am (CFLAGS): Pass it.
17880 * tests/atlocal.in (CFLAGS): Idem.
17881 * src/files.c: Fix a few warnings.
17882 (get_extension_index): Remove, unused.
17883
17884 2002-01-08 Akim Demaille <akim@epita.fr>
17885
17886 * src/getargs.c (AS_FILE_NAME): New.
17887 (getargs): Use it to convert DOSish file names.
17888 * src/files.c (base_name): Rename as full_base_name to avoid
17889 clashes with `base_name ()'.
17890 (filename_split): New.
17891 (compute_base_names): N-th rewrite, using filename_split.
17892
17893 2002-01-08 Akim Demaille <akim@epita.fr>
17894
17895 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
17896 New, stolen from the Fileutils 4.1.
17897 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17898 * configure.in: Check for the presence of memrchr, and of its
17899 prototype.
17900
17901 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
17902
17903 * lib/hash.h (__P): Added definition for this macro.
17904 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
17905 BUILT_SOURCES, to ensure they are generated first.
17906 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
17907 %error-verbose to allow bootstrapping with bison 1.30x.
17908
17909 2002-01-06 Akim Demaille <akim@epita.fr>
17910
17911 * src/reader.c (parse_braces): Don't fetch the next char, the
17912 convention is to fetch on entry.
17913 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
17914 'switch' without a following semicolon.
17915 * tests/regression.at (braces parsing): New.
17916
17917 2002-01-06 Akim Demaille <akim@epita.fr>
17918
17919 Bison is dead wrong in its RR conflict reports.
17920
17921 * tests/torture.at (GNU Cim Grammar): New.
17922 * src/conflicts.c (count_rr_conflicts): Fix.
17923
17924 2002-01-06 Akim Demaille <akim@epita.fr>
17925
17926 Creating package.m4 from configure.ac causes too many problems.
17927
17928 * tests/Makefile.am (package.m4): Create it by hand,
17929 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
17930
17931 2002-01-06 Akim Demaille <akim@epita.fr>
17932
17933 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
17934 skeleton.h.
17935
17936 2002-01-04 Paul Eggert <eggert@twinsun.com>
17937
17938 * doc/bison.texinfo (Debugging):
17939 Remove YYSTDERR; it's no longer defined or used.
17940 Also, s/cstdio.h/cstdio/.
17941
17942 2002-01-03 Akim Demaille <akim@epita.fr>
17943
17944 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
17945
17946 2002-01-03 Akim Demaille <akim@epita.fr>
17947
17948 * src/parse-skel.y (process_skeleton): Don't bind the parser's
17949 tracing code to --trace, wait for a better --trace option, with
17950 args.
17951
17952 2002-01-03 Akim Demaille <akim@epita.fr>
17953
17954 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
17955 The ISO C++ standard is extremely clear about it: stderr is
17956 considered a macro, not a regular symbol (see table 94 `Header
17957 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
17958 Therefore std:: does not apply to it. It still does with fprintf.
17959 Also, s/cstdio.h/cstdio/.
17960
17961 2002-01-03 Akim Demaille <akim@epita.fr>
17962
17963 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
17964 for non system headers.
17965
17966 2002-01-02 Akim Demaille <akim@epita.fr>
17967
17968 Equip the skeleton chain with location tracking, runtime trace,
17969 pure parser and scanner.
17970
17971 * src/parse-skel.y: Request a pure parser, locations, and prefix
17972 renaming.
17973 (%union): Having several members with the same type does not help
17974 type mismatches, simplify.
17975 (YYPRINT, yyprint): New.
17976 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
17977 (skel_error): this.
17978 Handle locations.
17979 * src/scan-skel.l: Adjust to these changes.
17980 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
17981 (LOCATION_PRINT, skel_control_t): New.
17982
17983 2001-12-30 Akim Demaille <akim@epita.fr>
17984
17985 * src/parse-skel.y: Get rid of the shift/reduce conflict:
17986 replace `gb' with BLANKS.
17987 * src/scan-skel.l: Adjust.
17988
17989 2001-12-30 Akim Demaille <akim@epita.fr>
17990
17991 * src/system.h: We don't need nor want bcopy.
17992 Throw away MS-DOS crap: we don't need getpid.
17993 * configure.in: We don't need strndup. It was even causing
17994 problems: because Flex includes the headers *before* us,
17995 _GNU_SOURCE is not defined by config.h, and therefore strndup was
17996 not visible.
17997 * lib/xstrndup.c: New.
17998 * src/scan-skel.l: Use it.
17999 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18000 * src/parse-skel.y: Use %directives instead of #defines.
18001
18002 2001-12-30 Akim Demaille <akim@epita.fr>
18003
18004 * src/skeleton.h: New.
18005 * src/output.c (output_parser, output_master_parser): Remove, dead
18006 code.
18007 * src/output.h (get_lines_number, actions_output, guards_output)
18008 (token_definitions_output): Prototype them.
18009 * src/parse-skel.y: Add the license notice.
18010 Include output.h and skeleton.h.
18011 (process_skeleton): Returns void, and takes a single parameter.
18012 * src/scan-skel.l: Add the license notice.
18013 Include skeleton.h.
18014 Don't use %option yylineno: it seems that then Flex imagines
18015 REJECT has been used, and therefore it won't reallocate its
18016 buffers (which makes no other sense to me than a bug). It results
18017 in warnings for `unused: yy_flex_realloc'.
18018
18019 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
18020
18021 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18022 (MUSCLE_INSERT_PREFIX): ...to there.
18023 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18024 (MUSCLE_INSERT_PREFIX): Move from here...
18025
18026 * src/bison.hairy: Add a section directive. Put braces around muscle
18027 names. This parser skeleton is still broken, but Bison should not
18028 choke on a bad muscle 'syntax'.
18029 * src/bison.simple: Add a section directive. Put braces around muscle
18030 names.
18031
18032 * src/files.h (strsuffix, stringappend): Add declarations.
18033 (tab_extension): Add declaration.
18034 (short_base_name): Add declaration.
18035
18036 * src/files.c (strsuffix, stringappend): No longer static. These
18037 functions are used in the skeleton parser.
18038 (tab_extension): New.
18039 (compute_base_names): Use the computations done in this function
18040 to guess if the generated parsers should have '.tab' in their
18041 names.
18042 (short_base_name): No longer static.
18043
18044 * src/output.c (output_skeleton): New.
18045 (output): Disable call to output_master_parser, and give a try to
18046 a new skeleton handling system.
18047 (guards_output, actions_output): No longer static.
18048 (token_definitions_output, get_lines_number): No longer static.
18049
18050 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18051
18052 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18053 parse-skel.y.
18054
18055 * src/parse-skel.y: New file.
18056 * src/scan-skel.l: New file.
18057
18058 2001-12-29 Akim Demaille <akim@epita.fr>
18059
18060 %name-prefix is broken.
18061
18062 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18063 Adjust all dependencies.
18064 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18065 %name-prefix.
18066
18067 Renaming yylval but not yylloc is not consistent. Now we do.
18068
18069 * src/bison.simple: Prefix yylloc if used.
18070 * doc/bison.texinfo (Decl Summary): Document that.
18071
18072 2001-12-29 Akim Demaille <akim@epita.fr>
18073
18074 * doc/bison.texinfo: Promote `%long-directive' over
18075 `%long_directive'.
18076 Remove all references to fixed-output-files, yacc is enough.
18077
18078 2001-12-29 Akim Demaille <akim@epita.fr>
18079
18080 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18081 user prologue. These are defaults.
18082 * tests/actions.at (Mid-rule actions): Make sure the user can
18083 define YYDEBUG and YYERROR_VERBOSE.
18084
18085 2001-12-29 Akim Demaille <akim@epita.fr>
18086
18087 * src/output.c (header_output): Don't forget to export YYLTYPE and
18088 yylloc.
18089 * tests/headers.at (export YYLTYPE): New, make sure it does.
18090 * tests/regression.at (%union and --defines, Invalid CPP headers):
18091 Move to...
18092 * tests/headers.at: here.
18093
18094 2001-12-29 Akim Demaille <akim@epita.fr>
18095
18096 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18097
18098 2001-12-29 Akim Demaille <akim@epita.fr>
18099
18100 * tests/actions.at (Mid-rule actions): Output on a single line
18101 instead of several.
18102
18103 2001-12-29 Akim Demaille <akim@epita.fr>
18104
18105 * doc/bison.texinfo: Formatting changes.
18106
18107 2001-12-29 Akim Demaille <akim@epita.fr>
18108
18109 Don't store the token defs in a muscle, just be ready to output it
18110 on command. Now possible via `symbols'. Fixes a memory leak.
18111
18112 * src/output.c (token_definitions_output): New.
18113 (output_parser, header_output): Use it.
18114 * src/reader.c (symbols_save): Remove.
18115
18116 2001-12-29 Akim Demaille <akim@epita.fr>
18117
18118 * src/bison.simple: Do not provide a default for YYSTYPE and
18119 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18120 default.
18121
18122 2001-12-29 Akim Demaille <akim@epita.fr>
18123
18124 Mid-rule actions are simply... ignored!
18125
18126 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18127 the empty-rule associated to the dummy symbol, not to the host
18128 rule.
18129 * tests/actions.at (Mid-rule actions): New.
18130
18131 2001-12-29 Akim Demaille <akim@epita.fr>
18132
18133 Memory leak.
18134
18135 * src/reader.c (reader): Free grammar.
18136
18137 2001-12-29 Akim Demaille <akim@epita.fr>
18138
18139 Memory leak.
18140
18141 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18142 since it allocates it for each state, although only one is needed.
18143 (allocate_storage): Do it here.
18144
18145 2001-12-29 Akim Demaille <akim@epita.fr>
18146
18147 * src/options.h, src/options.c (create_long_option_table): Rename
18148 as...
18149 (long_option_table_new): this, with a clearer prototype.
18150 (percent_table): Remove, unused,
18151 * src/getargs.c (getargs): Adjust.
18152
18153 2001-12-29 Akim Demaille <akim@epita.fr>
18154
18155 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18156 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18157 as states.
18158
18159 2001-12-29 Akim Demaille <akim@epita.fr>
18160
18161 * src/lalr.c (build_relations): Rename `states' as `states1'.
18162 Sorry, I don't understand exactly what it is, no better name...
18163
18164 2001-12-29 Akim Demaille <akim@epita.fr>
18165
18166 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18167 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18168 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18169 as rules.
18170
18171 2001-12-29 Akim Demaille <akim@epita.fr>
18172
18173 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18174 ago.
18175
18176 2001-12-29 Akim Demaille <akim@epita.fr>
18177
18178 * src/reader.c, src/reader.h (user_toknums): Remove.
18179 Adjust all users to use symbols[i]->user_token_number.
18180
18181 2001-12-29 Akim Demaille <akim@epita.fr>
18182
18183 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18184 Adjust all users to use symbols[i]->prec or ->assoc.
18185
18186 2001-12-29 Akim Demaille <akim@epita.fr>
18187
18188 * src/reader.c, src/reader.h (tags): Remove.
18189 Adjust all users to use symbols[i]->tag.
18190
18191 2001-12-29 Akim Demaille <akim@epita.fr>
18192
18193 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18194 and rule_table.
18195 * src/reader.c (packsymbols): Fill this table.
18196 Drop sprec.
18197 * src/conflicts.c (resolve_sr_conflict): Adjust.
18198 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18199 single table.
18200 Use symbols[i]->tag instead of tags[i].
18201
18202 2001-12-29 Akim Demaille <akim@epita.fr>
18203
18204 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18205 In addition, put a comment in there, to replace...
18206 * tests/regression.at (%union and C comments): Remove.
18207
18208 2001-12-29 Akim Demaille <akim@epita.fr>
18209
18210 * tests/regression.at (Web2c Actions): Blindly move the actual
18211 output as expected output. The contents *seem* right to me, but I
18212 can't pretend reading perfectly parser tables... Nonetheless, all
18213 the other tests pass correctly, the table look OK, even though the
18214 presence of `$axiom' is to be noted: AFAICS it is useless (but
18215 harmless).
18216
18217 2001-12-29 Akim Demaille <akim@epita.fr>
18218
18219 * src/reader.c (readgram): Don't add the rule 0 if there were no
18220 rules read. In other words, add it _after_ having performed
18221 grammar sanity checks.
18222 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18223
18224 2001-12-29 Akim Demaille <akim@epita.fr>
18225
18226 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18227 visible, and some states have now a different number.
18228
18229 2001-12-29 Akim Demaille <akim@epita.fr>
18230
18231 * src/reader.c (readgram): Bind the initial rule's lineno to that
18232 of the first rule.
18233 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18234 (Solved SR Conflicts): Adjust rule 0's line number.
18235
18236 2001-12-29 Akim Demaille <akim@epita.fr>
18237
18238 Fix the `GAWK Grammar' failure.
18239
18240 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18241 the reductions of the first state which was mistakenly confused
18242 with the final state because precisely final_state was initialized
18243 to 0.
18244 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18245 now noticed by Bison.
18246 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18247 have a reduction on $default.
18248
18249 2001-12-29 Akim Demaille <akim@epita.fr>
18250
18251 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18252 rule line numbers.
18253 * src/closure.c (print_closure): Likewise.
18254 * src/derives.c (print_derives): Likewise.
18255 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18256 now.
18257
18258 2001-12-29 Akim Demaille <akim@epita.fr>
18259
18260 * src/lalr.c (lookaheads_print): New.
18261 (lalr): Call it when --trace-flag.
18262 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18263 are dumped.
18264
18265 2001-12-29 Akim Demaille <akim@epita.fr>
18266
18267 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18268 when walking through ritem, even via rule->rhs.
18269 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18270 (useful_production, useless_nonterminals): Likewise.
18271 (reduce_grammar_tables): Likewise, plus update nritems.
18272 * src/nullable.c (set_nullable): Likewise.
18273 * src/lalr.c (build_relations): Likewise.
18274 * tests/sets.at (Nullable): Adjust.
18275 Fortunately, now, the $axiom is no longer nullable.
18276
18277 2001-12-29 Akim Demaille <akim@epita.fr>
18278
18279 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18280 the 0-sentinel.
18281 * src/gram.c (ritem_longest_rhs): Likewise.
18282 * src/reduce.c (nonterminals_reduce): Likewise.
18283 * src/print_graph.c (print_graph): Likewise.
18284 * src/output.c (output_rule_data): Likewise.
18285 * src/nullable.c (set_nullable): Likewise.
18286
18287 2001-12-29 Akim Demaille <akim@epita.fr>
18288
18289 * src/output.c: Comment changes.
18290
18291 2001-12-27 Paul Eggert <eggert@twinsun.com>
18292
18293 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18294 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18295 Sparc, as they were causing more porting problems than the
18296 (minor) performance improvement was worth.
18297
18298 Also, catch up with 1.31's YYSTD.
18299
18300 2001-12-27 Akim Demaille <akim@epita.fr>
18301
18302 * src/output.c (output_gram): Rely on nritems, not the
18303 0-sentinel. See below.
18304 Use -1 as separator, not 0.
18305 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18306 Rely on -1 as separator in yyrhs, instead of 0.
18307 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18308 twice `Now at end of input', therefore there are two lines less to
18309 expect.
18310
18311 2001-12-27 Akim Demaille <akim@epita.fr>
18312
18313 * tests/regression.at (Unresolved SR Conflicts):
18314 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18315 below.
18316
18317 2001-12-27 Akim Demaille <akim@epita.fr>
18318
18319 * src/LR0.c (new_state): Recognize the final state by the fact it
18320 is reached by eoftoken.
18321 (insert_start_shifting_state, insert_eof_shifting_state)
18322 (insert_accepting_state, augment_automaton): Remove, since now
18323 these states are automatically computed from the initial state.
18324 (generate_states): Adjust.
18325 * src/print.c: When reporting a rule number to the user, substract
18326 1, so that the axiom rule is rule 0, and the first user rule is 1.
18327 * src/reduce.c: Likewise.
18328 * src/print_graph.c (print_core): For the time being, just as for
18329 the report, depend upon --trace-flags to dump the full set of
18330 items.
18331 * src/reader.c (readgram): Once the grammar read, insert the rule
18332 0: `$axiom: START-SYMBOL $'.
18333 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18334 number of the states has changed (the final state is no longer
18335 necessarily the last), catch up.
18336
18337 2001-12-27 Akim Demaille <akim@epita.fr>
18338
18339 Try to make the use of the eoftoken valid. Given that its value
18340 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18341 is used instead of > 0 where appropriate, (ii), depend upon nritems
18342 instead of the 0-sentinel.
18343
18344 * src/gram.h, src/gram.c (nritems): New.
18345 Expected to be duplication of nitems, but for the time being...
18346 * src/reader.c (packgram): Assert nritems and nitems are equal.
18347 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18348 * src/closure.c (print_closure, print_fderives): Likewise.
18349 * src/gram.c (ritem_print): Likewise.
18350 * src/print.c (print_core, print_grammar): Likewise.
18351 * src/print_graph.c: Likewise.
18352
18353 2001-12-27 Akim Demaille <akim@epita.fr>
18354
18355 * src/main.c (main): If there are complains after grammar
18356 reductions, then output the report anyway if requested, then die.
18357 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18358 * src/reader.c (eoftoken): New.
18359 (parse_token_decl): If the token being defined has value `0', it
18360 is the eoftoken.
18361 (packsymbols): No longer hack `tags' to insert `$' by hand.
18362 Be sure to preserve the value of the eoftoken.
18363 (reader): Make sure eoftoken is defined.
18364 Initialize nsyms to 0: now eoftoken is created just like the others.
18365 * src/print.c (print_grammar): Don't special case the eof token.
18366 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18367 lie anyway, albeit pleasant.
18368 * tests/calc.at: Exercise error messages with eoftoken.
18369 Change the grammar so that empty input is invalid.
18370 Adjust expectations.
18371 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18372
18373 2001-12-27 Akim Demaille <akim@epita.fr>
18374
18375 * configure.in: Check the protos of strchr ans strspn.
18376 Replace strchr if needed.
18377 * src/system.h: Provide the protos of strchr, strspn and memchr if
18378 missing.
18379 * lib/strchr.c: New.
18380 * src/reader.c (symbols_save): Use strchr.
18381
18382 2001-12-27 Akim Demaille <akim@epita.fr>
18383
18384 * src/print.c, src/print_graph.c (escape): New.
18385 Use it to quote the TAGS outputs.
18386 * src/print_graph.c (print_state): Now errors are in red, and
18387 reductions in green.
18388 Prefer high to wide: output the state number on a line of its own.
18389
18390 2001-12-27 Akim Demaille <akim@epita.fr>
18391
18392 * src/state.h, src/state.c (reductions_new): New.
18393 * src/LR0.c (set_state_table): Let all the states have a
18394 `reductions', even if reduced to 0.
18395 (save_reductions): Adjust.
18396 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18397 * src/print.c (print_reductions, print_actions): Adjust.
18398 * src/output.c (action_row): Adjust.
18399
18400 2001-12-27 Akim Demaille <akim@epita.fr>
18401
18402 * src/state.h, src/state.c (errs_new, errs_dup): New.
18403 * src/LR0.c (set_state_table): Let all the states have an errs,
18404 even if reduced to 0.
18405 * src/print.c (print_errs, print_reductions): Adjust.
18406 * src/output.c (output_actions, action_row): Adjust.
18407 * src/conflicts.c (resolve_sr_conflict): Adjust.
18408
18409 2001-12-27 Akim Demaille <akim@epita.fr>
18410
18411 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18412
18413 2001-12-27 Akim Demaille <akim@epita.fr>
18414
18415 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18416 * src/print.c: here.
18417 (lookaheadset, shiftset): New, used as additional storage by
18418 print_reductions.
18419 (print_results): Adjust.
18420 (print_shifts, print_gotos, print_errs): New, extracted from...
18421 (print_actions): here.
18422 * src/print_graph.c (print_actions): Remove dead code.
18423
18424 2001-12-27 Akim Demaille <akim@epita.fr>
18425
18426 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18427 `$n' and `@n'.
18428
18429 2001-12-27 Akim Demaille <akim@epita.fr>
18430
18431 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18432 (build_relations): Adjust.
18433
18434 2001-12-27 Akim Demaille <akim@epita.fr>
18435
18436 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18437 duplication.
18438
18439 2001-12-27 Akim Demaille <akim@epita.fr>
18440
18441 * src/reader.c (packgram): Catch nitems overflows.
18442
18443 2001-12-27 Akim Demaille <akim@epita.fr>
18444
18445 * src/files.c, src/files.h (guard_obstack): Remove.
18446 * src/output.c (output): Adjust.
18447 * src/reader.c (parse_braces): New, factoring...
18448 (copy_action, copy_guard): these two which are renamed as...
18449 (parse_action, parse_guard): these.
18450 As a voluntary consequence, using braces around guards is now
18451 mandatory.
18452
18453 2001-12-27 Akim Demaille <akim@epita.fr>
18454
18455 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18456 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18457 members.
18458 (symbol_list_new): Adjust.
18459 (copy_action): action_line is the first line, not the last.
18460 (copy_guard): Just as for actions, store the `action' only, not
18461 the switch/case/break flesh.
18462 Don't parse the user action that might follow the guard, let...
18463 (readgram): do it, i.e., now, there can be an action after a
18464 guard.
18465 In other words the guard is just explicitly optional.
18466 (packgram): Adjust.
18467 * src/output.c (guards_output): New.
18468 (output_parser): Call it when needed.
18469 (output): Also free the guard and attrs obstacks.
18470 * src/files.c, src/files.h (obstack_save): Remove.
18471 (output_files): Remove.
18472 As a result, if one needs the former `.act' file, using an
18473 appropriate skeleton which requires actions and guards is now
18474 required.
18475 * src/main.c (main): Adjust.
18476 * tests/semantic.at: New.
18477 * tests/regression.at: Use `input.y' as input file name.
18478 Avoid 8+3 problems by requiring input.c when the test needs the
18479 parser.
18480
18481 2001-12-27 Akim Demaille <akim@epita.fr>
18482
18483 * src/reader.c (symbol_list_new): Be sure to initialize all the
18484 fields.
18485
18486 2001-12-27 Akim Demaille <akim@epita.fr>
18487
18488 All the hacks using a final pseudo state are now useless.
18489
18490 * src/LR0.c (set_state_table): state_table holds exactly nstates.
18491 * src/lalr.c (nLA): New.
18492 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18493 instead of lookaheadsp from the pseudo state (nstate + 1).
18494
18495 2001-12-27 Akim Demaille <akim@epita.fr>
18496
18497 * src/output.c (action_row, token_actions): Use a state_t instead
18498 of a integer, and nlookaheads instead of the following state's
18499 lookaheadsp.
18500
18501 2001-12-27 Akim Demaille <akim@epita.fr>
18502
18503 * src/conflicts.c (log_resolution, flush_shift)
18504 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18505 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18506 (conflicts_print, print_reductions): Use a state_t instead of an
18507 integer when referring to a state.
18508 As much as possible, depend upon nlookaheads, instead of the
18509 `lookaheadsp' member of the following state (since lookaheads of
18510 successive states are successive, the difference between state n + 1
18511 and n served as the number of lookaheads for state n).
18512 * src/lalr.c (add_lookback_edge): Likewise.
18513 * src/print.c (print_core, print_actions, print_state)
18514 (print_results): Likewise.
18515 * src/print_graph.c (print_core, print_actions, print_state)
18516 (print_graph): Likewise.
18517 * src/conflicts.h: Adjust.
18518
18519 2001-12-27 Akim Demaille <akim@epita.fr>
18520
18521 * src/bison.hairy: Formatting/comment changes.
18522 ANSIfy.
18523 Remove `register' indications.
18524 Add plenty of `static'.
18525
18526 2001-12-27 Akim Demaille <akim@epita.fr>
18527
18528 * src/output.c (prepare): Drop the muscle `ntbase' which
18529 duplicates ntokens.
18530 * src/bison.simple: Formatting/comment changes.
18531 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18532 is an undocumented synonym.
18533
18534 2001-12-22 Akim Demaille <akim@epita.fr>
18535
18536 * src/output.c (output_table_data): Change the prototype to use
18537 `int' for array ranges: some invocations do pass an int, not a
18538 short.
18539 Reported by Wayne Green.
18540
18541 2001-12-22 Akim Demaille <akim@epita.fr>
18542
18543 Some actions of web2c.y are improperly triggered.
18544 Reported by Mike Castle.
18545
18546 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18547 * tests/regression.at (Web2c): Rename as...
18548 (Web2c Report): this.
18549 (Web2c Actions): New.
18550
18551 2001-12-22 Akim Demaille <akim@epita.fr>
18552
18553 Reductions in web2c.y are improperly reported.
18554 Reported by Mike Castle.
18555
18556 * src/conflicts.c (print_reductions): Fix.
18557 * tests/regression.at (Web2c): New.
18558
18559 2001-12-18 Akim Demaille <akim@epita.fr>
18560
18561 Some host fail on `assert (!"foo")', which expands to
18562 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18563 Reported by Nelson Beebee.
18564
18565 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18566 `#define it_succeeded 0' and `assert (it_succeeded)'.
18567
18568 2001-12-17 Marc Autret <autret_m@epita.fr>
18569
18570 * src/bison.simple: Don't hard code the skeleton line and filename.
18571 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18572 New line counter 'skeleton_line' (skeleton-line muscle).
18573
18574 2001-12-17 Paul Eggert <eggert@twinsun.com>
18575
18576 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18577 YYDEBUG must be defined to a nonzero value.
18578
18579 * src/bison.simple (yytname): Do not assume that the user defines
18580 YYDEBUG to a properly parenthesized expression.
18581
18582 2001-12-17 Akim Demaille <akim@epita.fr>
18583
18584 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18585 nlookaheads is a new member.
18586 Adjust all users.
18587 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18588 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18589 state.
18590
18591 2001-12-17 Akim Demaille <akim@epita.fr>
18592
18593 * src/files.h, src/files.c (open_files, close_files): Remove.
18594 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18595 let...
18596 * src/reader.c (reader): Do it.
18597
18598 2001-12-17 Akim Demaille <akim@epita.fr>
18599
18600 * src/conflicts.c (print_reductions): Formatting changes.
18601
18602 2001-12-17 Akim Demaille <akim@epita.fr>
18603
18604 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18605 (flush_reduce): New.
18606 (resolve_sr_conflict): Adjust.
18607
18608 2001-12-17 Akim Demaille <akim@epita.fr>
18609
18610 * src/output.c (output_obstack): Be static and rename as...
18611 (format_obstack): this, to avoid any confusion with files.c's
18612 output_obstack.
18613 * src/reader.h (muscle_obstack): Move to...
18614 * src/output.h: here, since it's defined in output.c.
18615
18616 2001-12-17 Akim Demaille <akim@epita.fr>
18617
18618 * src/output.c (action_row, save_column, default_goto)
18619 (sort_actions, matching_state, pack_vector): Better variable
18620 locality.
18621
18622 2001-12-17 Akim Demaille <akim@epita.fr>
18623
18624 * src/output.c: Various formatting changes.
18625
18626 2001-12-17 Akim Demaille <akim@epita.fr>
18627
18628 * src/files.c (output_files): Free the output_obstack.
18629 * src/main.c (main): Call print and print_graph conditionally.
18630 * src/print.c (print): Work unconditionally.
18631 * src/print_graph.c (print_graph): Work unconditionally.
18632 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18633
18634 2001-12-16 Marc Autret <autret_m@epita.fr>
18635
18636 * src/output.c (actions_output): Fix. When we use %no-lines,
18637 there is one less line per action.
18638
18639 2001-12-16 Marc Autret <autret_m@epita.fr>
18640
18641 * src/bison.simple: Remove a useless #line directive.
18642 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18643 * src/output.c (get_lines_number): New.
18644 (output_parser): Adjust, now takes care about the lines of a
18645 output muscles.
18646 Fix line numbering.
18647 (actions_output): Computes the number of lines taken by actions.
18648 (output_master_parser): Insert new skeleton which is the name of
18649 the output parser file name.
18650
18651 2001-12-15 Marc Autret <autret_m@epita.fr>
18652
18653 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18654
18655 2001-12-15 Marc Autret <autret_m@epita.fr>
18656
18657 * src/output.c (output_gram): Keep track of the hairy one.
18658
18659 2001-12-15 Akim Demaille <akim@epita.fr>
18660
18661 Make `make distcheck' work.
18662
18663 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18664 system.h which uses libgettext.h.
18665
18666 2001-12-15 Akim Demaille <akim@epita.fr>
18667
18668 * src/nullable.c (set_nullable): Useless rules must be skipped,
18669 otherwise, since we range over their symbols, we might look at a
18670 nonterminal which no longer ``exists'', i.e., it is not counted in
18671 `nvars', hence we overflow our arrays.
18672
18673 2001-12-15 Akim Demaille <akim@epita.fr>
18674
18675 The header can also be produced directly, without any obstack!
18676 Yahoo!
18677
18678 * src/files.c, src/files.h (defines_obstack): Remove.
18679 (compute_header_macro): Global.
18680 (defines_obstack_save): Remove.
18681 * src/reader.c (parse_union_decl): No longer output to
18682 defines_obstack: its content can be found in the `stype' muscle
18683 anyway.
18684 (output_token_translations): Merge into...
18685 (symbols_output): this.
18686 Rename as...
18687 (symbols_save): this.
18688 (reader): Adjust.
18689 * src/output.c (header_output): New.
18690 (output): Call it.
18691
18692 2001-12-15 Akim Demaille <akim@epita.fr>
18693
18694 * src/reader.c (parse_union_decl): Instead of handling two obstack
18695 simultaneously, use one to define the `stype' muscle, and use the
18696 value of the latter to fill defines_obstack.
18697 (copy_comment): Remove.
18698 (copy_comment2): Work for a single obstack.
18699 Rename as...
18700 (copy_comment): this.
18701
18702 2001-12-15 Akim Demaille <akim@epita.fr>
18703
18704 * src/lex.c, src/lex.h (xgetc): No longer static.
18705 * src/reader.c (parse_union_decl): Revamp.
18706
18707 2001-12-15 Akim Demaille <akim@epita.fr>
18708
18709 Still making progress in separating Bison into (i) input, (ii)
18710 process, (iii) output: now we can directly output the parser file
18711 without using table_obstack at all.
18712
18713 * src/files.c, src/files.h (table_obstack): Bye bye.
18714 (parser_file_name): New.
18715 * src/files.c (compute_output_file_names): Compute it.
18716 * src/output.c (actions_output, output_parser)
18717 (output_master_parser): To a file instead of an obstack.
18718
18719 2001-12-15 Akim Demaille <akim@epita.fr>
18720
18721 Attach actions to rules, instead of pre-outputting them to
18722 actions_obstack.
18723
18724 * src/gram.h (rule_t): action and action_line are new members.
18725 * src/reader.c (symbol_list): Likewise.
18726 (copy_action): Save the actions within the rule.
18727 (packgram): Save them in rule_table.
18728 * src/output.c (actions_output): New.
18729 (output_parser): Use it on `%%actions'.
18730 (output_rule_data): Don't free rule_table.
18731 (output): Do it.
18732 (prepare): Don't save the `action' muscle.
18733 * src/bison.simple: s/%%action/%%actions/.
18734
18735 2001-12-15 Akim Demaille <akim@epita.fr>
18736
18737 * src/reader.c (copy_action): When --yacc, don't append a `;'
18738 to the user action: let it fail if lacking.
18739 Suggested by Arnold Robbins and Tom Tromey.
18740
18741 2001-12-14 Akim Demaille <akim@epita.fr>
18742
18743 * src/lex.c (literalchar): Simply return the char you decoded, non
18744 longer mess around with obstacks and int pointers.
18745 Adjust all callers.
18746
18747 2001-12-14 Akim Demaille <akim@epita.fr>
18748
18749 * src/lex.c (literalchar): Don't escape the special characters,
18750 just decode them, and keep them as char (before, eol was output as
18751 the 2 char string `\n' etc.).
18752 * src/output.c (output_rule_data): Use quotearg to output the
18753 token strings.
18754
18755 2001-12-13 Paul Eggert <eggert@twinsun.com>
18756
18757 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18758 Do not infringe on the global user namespace when using C++.
18759 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18760 All uses of `fprintf' and `stderr' changed.
18761
18762 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18763
18764 2001-12-13 Akim Demaille <akim@epita.fr>
18765
18766 The computation of nullable is broken: it doesn't handle empty
18767 RHS's properly.
18768
18769 * tests/torture.at (GNU AWK Grammar): New.
18770 * tests/sets.at (Nullable): New.
18771 * src/nullable.c (set_nullable): Instead of blindly looping over
18772 `ritems', loop over the rules, and then over their rhs's.
18773
18774 Work around Autotest bugs.
18775
18776 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18777 frame, because Autotest understand lines starting with a `+' as
18778 traces from the shell. Then, they are not processed properly.
18779 Admittedly an Autotest bug, but we don't have time to wait for
18780 Autotest to catch up.
18781 * tests/regression.at (Broken Closure): Adjust to the new table
18782 frames.
18783 Move to...
18784 * tests/sets.at: here.
18785
18786 2001-12-13 Akim Demaille <akim@epita.fr>
18787
18788 * src/closure.c (closure): Use nrules instead of playing tricks
18789 with BITS_PER_WORD.
18790
18791 2001-12-13 Akim Demaille <akim@epita.fr>
18792
18793 * src/print.c (print_actions): Output the handling of `$' as the
18794 traces do: shifting the token EOF. Before EOF was treated as a
18795 nonterminal.
18796 * tests/regression.at: Adjust some tests.
18797 * src/print_graph.c (print_core): Complete the set of items via
18798 closure. The next-to-final and final states are still unsatisfying,
18799 but that's to be addressed elsewhere.
18800 No longer output the rule numbers, but do output the state number.
18801 A single loop for the shifts + gotos is enough, but picked a
18802 distinct color for each.
18803 (print_graph): Initialize and finalize closure.
18804
18805 2001-12-13 Akim Demaille <akim@epita.fr>
18806
18807 * src/reader.c (readgram): Remove dead code, an strip useless
18808 braces.
18809 (get_type): Remove, unused.
18810
18811 2001-12-12 Akim Demaille <akim@epita.fr>
18812
18813 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18814 on that of lib/error.c.
18815
18816 2001-12-12 Akim Demaille <akim@epita.fr>
18817
18818 Some hosts don't like `/' in includes.
18819
18820 * src/system.h: Include libgettext.h without qualifying the path.
18821 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18822 $(top_srcdir).
18823
18824 2001-12-11 Marc Autret <autret_m@epita.fr>
18825
18826 * src/output.c (output_parser): Remove useless muscle.
18827
18828 2001-12-11 Marc Autret <autret_m@epita.fr>
18829
18830 * src/bison.simple: Remove #line just before %%epilogue. It
18831 is now handled in ...
18832 * src/reader.c (read_additionnal_code): Add the output of a
18833 #line for the epilogue.
18834
18835 2001-12-10 Marc Autret <autret_m@epita.fr>
18836
18837 * src/reader.c (copy_definition): Re-use CPP-outed code which
18838 replace precedent remove.
18839 * src/bison.simple: Remove #line before %%prologue because
18840 %%input-line is wrong at this time.
18841
18842 2001-12-10 Marc Autret <autret_m@epita.fr>
18843
18844 * src/reader.c (symbols_output): Clean up.
18845 * src/output.c (output_gram, output): Clean up.
18846
18847 2001-12-10 Akim Demaille <akim@epita.fr>
18848
18849 * src/lalr.c (initialize_lookaheads): New. Extracted from...
18850 * src/LR0.c (set_state_table): here.
18851 * src/lalr.c (lalr): Call it.
18852
18853 2001-12-10 Akim Demaille <akim@epita.fr>
18854
18855 * src/state.h (shifts): Remove the `number' member: shifts are
18856 attached to state, hence no longer need to be labelled with a
18857 state number.
18858
18859 2001-12-10 Akim Demaille <akim@epita.fr>
18860
18861 Now that states have a complete set of members, the linked list of
18862 shifts is useless: just fill directly the state's shifts member.
18863
18864 * src/state.h (shifts): Remove the `next' member.
18865 * src/LR0.c (first_state, last_state): Remove.
18866 Adjust the callers.
18867 (augment_automaton): Don't look for the shifts that must be added
18868 a shift on EOF: it is those of the state we looked for! But now,
18869 since shifts are attached, it is no longer needed to looking
18870 merely by its id: its number.
18871
18872 2001-12-10 Akim Demaille <akim@epita.fr>
18873
18874 * src/LR0.c (augment_automaton): Better variable locality.
18875 Remove an impossible branch: if there is a state corresponding to
18876 the start symbol being shifted, then there is shift for the start
18877 symbol from the initial state.
18878
18879 2001-12-10 Akim Demaille <akim@epita.fr>
18880
18881 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
18882 only when appropriate: when insert_start_shifting_state' is not
18883 invoked.
18884 * tests/regression.at (Rule Line Numbers): Adjust.
18885
18886 2001-12-10 Akim Demaille <akim@epita.fr>
18887
18888 * src/LR0.c (augment_automaton): Now that all states have shifts,
18889 merge the two cases addition shifts to the initial state.
18890
18891 2001-12-10 Akim Demaille <akim@epita.fr>
18892
18893 * src/lalr.c (set_state_table): Move to...
18894 * src/LR0.c: here.
18895 * src/lalr.c (lalr): Don't call it...
18896 * src/LR0.c (generate_states): do it.
18897 * src/LR0.h (first_state): Remove, only the table is used.
18898
18899 2001-12-10 Akim Demaille <akim@epita.fr>
18900
18901 * src/LR0.h (first_shift, first_reduction): Remove.
18902 * src/lalr.c: Don't use first_shift: find shifts through the
18903 states.
18904
18905 2001-12-10 Akim Demaille <akim@epita.fr>
18906
18907 * src/LR0.c: Attach shifts to states as soon as they are
18908 computed.
18909 * src/lalr.c (set_state_table): Instead of assigning shifts to
18910 state, just assert that the mapping was properly done.
18911
18912 2001-12-10 Akim Demaille <akim@epita.fr>
18913
18914 * src/LR0.c (insert_start_shift): Rename as...
18915 (insert_start_shifting_state): this.
18916 (insert_eof_shifting_state, insert_accepting_state): New.
18917 (augment_automaton): Adjust.
18918 Better locality of the variables.
18919 When looking if the start_symbol is shifted from the initial
18920 state, using `while (... symbol != start_symbol ...)' sounds
18921 better than `while (... symbol < start_symbol ...)': If fail
18922 to see how the order between symbols could be relevant!
18923
18924 2001-12-10 Akim Demaille <akim@epita.fr>
18925
18926 * src/getargs.h: Don't declare `spec_name_prefix' and
18927 `spec_file_prefix', declared by src/files.h.
18928 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
18929 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
18930 * src/output.c (prepare): Adjust.
18931 * src/reader.c (symbols_output): Likewise.
18932 * src/vmsgetargs.c: Vaguely adjust, but who cares?
18933
18934 2001-12-10 Akim Demaille <akim@epita.fr>
18935
18936 * src/muscle_tab.c (muscle_init): NULL is a better default than
18937 `"0"'.
18938
18939 2001-12-10 Akim Demaille <akim@epita.fr>
18940
18941 * src/reader.c (reader): Calling symbols_output once is enough.
18942
18943 2001-12-10 Akim Demaille <akim@epita.fr>
18944
18945 Now that states have a complete set of members, the linked list of
18946 reductions is useless: just fill directly the state's reductions
18947 member.
18948
18949 * src/state.h (struct reductions): Remove member `number' and
18950 `next'.
18951 * src/LR0.c (first_reduction, last_reduction): Remove.
18952 (save_reductions): Don't link the new reductions, store them in
18953 this_state.
18954 * src/lalr.c (set_state_table): No need to attach reductions to
18955 states, it's already done.
18956 * src/output.c (output_actions): No longer free the shifts, then
18957 the reductions, then the states: free all the states and their
18958 members.
18959
18960 2001-12-10 Akim Demaille <akim@epita.fr>
18961
18962 * src/options.c (OPTN, DRTV, BOTH): New.
18963 (option_table): Use them.
18964
18965 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
18966 the job of system.h.
18967 * src/options.c: Don't include stdio.h and xalloc.h for the same
18968 reasons.
18969
18970 2001-12-10 Akim Demaille <akim@epita.fr>
18971
18972 * src/output.c (output, prepare): Make sure the values of the
18973 muscles `action' and `prologue' are 0-terminated.
18974
18975 2001-12-10 Akim Demaille <akim@epita.fr>
18976
18977 Clean up GCC warnings.
18978
18979 * src/reader.c (copy_action): `buf' is not used.
18980 (parse_skel_decl): Be static.
18981 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
18982 * src/options.h (create_long_option_table): Have a real prototype.
18983 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
18984 (hash_delete_at): Return const void *.
18985 Adjust casts to preserve the const.
18986
18987 2001-12-10 Akim Demaille <akim@epita.fr>
18988
18989 * configure.in: Require 2.52g.
18990 M4 is not needed, but AUTOM4TE is.
18991 * m4/m4.m4: Remove.
18992 * tests/Makefile.am: Adjust.
18993
18994 2001-12-10 Akim Demaille <akim@epita.fr>
18995
18996 One structure for states is enough, even though theoretically
18997 there are LR(0) states and LALR(1) states.
18998
18999 * src/lalr.h (state_t): Remove.
19000 (state_table): Be state_t **, not state_t *.
19001 * src/state.h (core, CORE_ALLOC): Rename as...
19002 (state_t, STATE_ALLOC): this.
19003 Add the LALR(1) members: shifts, reductions, errs.
19004 * src/LR0.c (state_table): Rename as...
19005 (state_hash): this, to avoid name clashes with the global
19006 `state_table'.
19007 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19008 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19009
19010 2001-12-10 Akim Demaille <akim@epita.fr>
19011
19012 Bison dumps core on bash.y.
19013 Reported by Pascal Bart.
19014
19015 * src/warshall.c (bitmatrix_print): New.
19016 (TC): Use it.
19017 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19018 j must be the outer loop.
19019 * tests/regression.at (Broken Closure): New.
19020
19021 2001-12-05 Akim Demaille <akim@epita.fr>
19022
19023 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19024 its argument.
19025 Reported by Peter Hamorsky.
19026
19027 2001-12-05 Akim Demaille <akim@epita.fr>
19028
19029 * src/conflicts.c (err_table): Remove.
19030 (resolve_sr_conflict): Adjust.
19031 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19032 Rename as...
19033 (state_t.reductions, state_t.shifts): this.
19034
19035 2001-12-05 Akim Demaille <akim@epita.fr>
19036
19037 * src/reduce.c (reduce_grammar_tables): No longer disable the
19038 removal of useless rules via CPP but via `if (0)', so that the
19039 compiler still check the code is valid.
19040 For instance, it should have noticed `rline' no longer exists: use
19041 the `line' member of rule_t.
19042 * src/gram.c (dummy, rline): Remove, unused.
19043
19044 2001-12-05 Akim Demaille <akim@epita.fr>
19045
19046 * src/output.c (pack_vector): Use assert, not berror.
19047 * src/main.c (berror): Remove, unused.
19048
19049 2001-12-05 Akim Demaille <akim@epita.fr>
19050
19051 New experimental feature: if --verbose --trace output all the
19052 items of a state, not only its kernel.
19053
19054 * src/print.c (print_core): If `trace_flag', then invoke closure
19055 before outputting the items of the state (print_core is no longer
19056 a correct name them).
19057 (print_results): Invoke new_closure/free_closure if needed.
19058
19059 2001-12-05 Akim Demaille <akim@epita.fr>
19060
19061 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19062 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19063 (nitemset): for consistency with the rest of the project.
19064
19065 2001-12-05 Akim Demaille <akim@epita.fr>
19066
19067 * src/closure.c (print_closure): Improve.
19068 (closure): Use it for printing input and output.
19069
19070 2001-12-05 Akim Demaille <akim@epita.fr>
19071
19072 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19073 indexed by nonterminals.
19074
19075 2001-12-05 Akim Demaille <akim@epita.fr>
19076
19077 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19078 what it was!).
19079 * src/warshall.h: Remove accidental duplication of the content.
19080
19081 2001-12-05 Akim Demaille <akim@epita.fr>
19082
19083 * src/closure.c (set_fderives): De-obfuscate.
19084
19085 2001-12-05 Akim Demaille <akim@epita.fr>
19086
19087 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19088
19089 2001-12-05 Akim Demaille <akim@epita.fr>
19090
19091 * src/closure.c (set_firsts): De-obfuscate.
19092
19093 2001-12-05 Akim Demaille <akim@epita.fr>
19094
19095 * src/output.c (action_row): De-obfuscate
19096 using the good o' techniques: arrays not pointers, variable
19097 locality, BITISSET, RESETBIT etc.
19098
19099 2001-12-05 Akim Demaille <akim@epita.fr>
19100
19101 Pessimize the code to simplify it: from now on, all the states
19102 have a valid SHIFTS, which NSHIFTS is possibly 0.
19103
19104 * src/LR0.c (shifts_new): Be global and move to..
19105 * src/state.c, src/state.h: here.
19106 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19107 * src/print_graph: Adjust.
19108
19109 2001-12-05 Akim Demaille <akim@epita.fr>
19110
19111 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19112 * src/conflicts.c: Use it.
19113 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19114 incorrectly ``simplified''.
19115
19116 2001-12-05 Akim Demaille <akim@epita.fr>
19117
19118 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19119 using the good o' techniques: arrays not pointers, variable
19120 locality, BITISSET, RESETBIT etc.
19121
19122 2001-12-05 Akim Demaille <akim@epita.fr>
19123
19124 * src/state.h (SHIFT_SYMBOL): New.
19125 * src/conflicts.c: Use it to deobfuscate.
19126
19127 2001-12-05 Akim Demaille <akim@epita.fr>
19128
19129 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19130 (print_reductions): De-obfuscate using the good o' techniques:
19131 arrays not pointers, variable locality, BITISSET.
19132
19133 2001-12-05 Akim Demaille <akim@epita.fr>
19134
19135 * src/conflicts.c (print_reductions): Arrays, not pointers.
19136 Use BITISSET.
19137
19138 2001-12-05 Akim Demaille <akim@epita.fr>
19139
19140 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19141
19142 2001-12-05 Akim Demaille <akim@epita.fr>
19143
19144 * src/conflicts.c (print_reductions): Improve variable locality.
19145
19146 2001-12-05 Akim Demaille <akim@epita.fr>
19147
19148 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19149
19150 2001-12-05 Akim Demaille <akim@epita.fr>
19151
19152 * src/conflicts.c (print_reductions): Improve variable locality.
19153
19154 2001-12-05 Akim Demaille <akim@epita.fr>
19155
19156 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19157 * src/lalr.c: Use them.
19158
19159 2001-12-05 Akim Demaille <akim@epita.fr>
19160
19161 * src/LR0.c (augment_automaton): Formatting changes.
19162 Better variable locality.
19163
19164 2001-12-05 Akim Demaille <akim@epita.fr>
19165
19166 * src/lalr.c (matrix_print): New.
19167 (transpose): Use it.
19168 Use arrays instead of pointers.
19169
19170 2001-12-05 Akim Demaille <akim@epita.fr>
19171
19172 * src/lalr.c (maxrhs): Move to...
19173 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19174 * src/lalr.c (build_relations): Adjust.
19175
19176 2001-12-05 Akim Demaille <akim@epita.fr>
19177
19178 * src/lalr.c (transpose): Free the memory allocated to the
19179 argument, as it is replaced by the results by the unique caller.
19180 (build_relations): Merely invoke transpose: it handles the memory
19181 deallocation.
19182 Improve variable locality.
19183 Avoid variables used as mere abbreviations.
19184 (compute_lookaheads): Use arrays instead of pointers.
19185
19186 2001-12-05 Akim Demaille <akim@epita.fr>
19187
19188 * src/lalr.c (initialize_F): Improve variable locality.
19189 Avoid variables used as mere abbreviations.
19190
19191 2001-12-05 Akim Demaille <akim@epita.fr>
19192
19193 * src/derives.c (print_derives): Display the ruleno.
19194 * src/lalr.c (initialize_F, transpose): Better variable locality
19195 to improve readability.
19196 Avoid variables used as mere abbreviations.
19197
19198 2001-12-05 Akim Demaille <akim@epita.fr>
19199
19200 * src/lalr.c (traverse): Use arrays instead of pointers.
19201
19202 2001-12-05 Akim Demaille <akim@epita.fr>
19203
19204 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19205 the handling of squeue.
19206 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19207
19208 2001-12-05 Akim Demaille <akim@epita.fr>
19209
19210 Because useless nonterminals are now kept alive (instead of being
19211 `destroyed'), we now sometimes examine them, and store information
19212 related to them. Hence we need to know their number, and adjust
19213 memory allocations.
19214
19215 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19216 static.
19217 * src/LR0.c (allocate_itemsets): The memory allocated to
19218 `symbol_count' was used for two different purpose: once to count
19219 the number of occurrences of each symbol, and later reassigned to
19220 `shift_symbol', containing the symbol that can be shifted from a
19221 given state.
19222 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19223 only, and...
19224 (new_itemsets): Allocate `shift_symbol' here.
19225 (allocate_itemsets): symbol_count includes useless nonterminals.
19226 Make room for them.
19227 (free_storage): Use `free', not `XFREE', for pointers that cannot
19228 be null.
19229
19230 2001-12-05 Akim Demaille <akim@epita.fr>
19231
19232 * src/nullable.c (set_nullable): Deobfuscate the handling of
19233 ritem.
19234 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19235
19236 2001-12-05 Akim Demaille <akim@epita.fr>
19237
19238 * src/gram.c, src/gram.h (ritem_print): New.
19239 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19240 (This useless function was defined only to work around VMS linkers
19241 that can't handle compilation units with variables only).
19242 * src/reduce.c (dump_grammar): Use it to trace the construction of
19243 ritem.
19244
19245 2001-12-04 Paul Eggert <eggert@twinsun.com>
19246
19247 * src/bison.simple (union yyalloc): Change member names
19248 to be the same as the stack names.
19249 (yyparse): yyptr is now union yyalloc *, not char *.
19250 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19251 and may generate better code on some machines.
19252 (yystpcpy): Use prototype if __STDC__ is defined, not just
19253 if __cplusplus is defined.
19254
19255 2001-11-30 Akim Demaille <akim@epita.fr>
19256
19257 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19258 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19259 Gettext doesn't compile cleanly, and dies with -Werror.
19260 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19261 Include WARNING_CFLAGS here.
19262 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19263 before being defined.
19264
19265 2001-11-27 Paul Eggert <eggert@twinsun.com>
19266
19267 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19268 First arg is int, not unsigned.
19269 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19270 (SIZE_MAX, UINT_MAX): New macros.
19271 (quotearg_n_options): Abort if N is negative.
19272 Avoid overflow check on hosts where size_t is 64 bits and int
19273 is 32 bits, as overflow is impossible there.
19274 Fix off-by-one typo that caused unnecessary reallocation.
19275
19276 2001-11-29 Paul Eggert <eggert@twinsun.com>
19277
19278 Name space cleanup in generated parser.
19279
19280 * doc/bison.texinfo (Bison Parser): Discuss system headers
19281 and their effect on the user name space.
19282
19283 * src/bison.simple:
19284 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19285 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19286 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19287
19288 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19289 on user names when possible.
19290
19291 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19292 Simplify test for whather <alloca.h> exists.
19293
19294 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19295
19296 (<stdio.h>): Include if YYDEBUG.
19297
19298 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19299 ! defined (yyoverflow) && ! defined (yymemcpy).
19300
19301 (yymemcpy, yyparse): Rename local variables as needed so that
19302 they all begin with 'yy'.
19303
19304 (yystrlen, yystpcpy): New functions.
19305
19306 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19307 All uses changed.
19308
19309 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19310 instead of relying on string.h functions. Use YYSTACK_ALLOC
19311 and YYSTACK_FREE instead of malloc and free.
19312
19313 2001-11-30 Akim Demaille <akim@epita.fr>
19314
19315 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19316 before their first uses.
19317 (YYBISON, YYPURE): Move to the top of the output.
19318
19319 2001-11-30 Akim Demaille <akim@epita.fr>
19320
19321 * tests/reduce.at (Useless Nonterminals): Fix.
19322
19323 2001-11-30 Akim Demaille <akim@epita.fr>
19324
19325 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19326 if body instead of `;' to pacify GCC's warnings.
19327
19328 2001-11-30 Akim Demaille <akim@epita.fr>
19329
19330 Instead of mapping the LHS of unused rules to -1, keep the LHS
19331 valid, but flag the rules as invalid.
19332
19333 * src/gram.h (rule_t): `useful' is a new member.
19334 * src/print.c (print_grammar): Adjust.
19335 * src/derives.c (set_derives): Likewise.
19336 * src/reader.c (packgram, reduce_output): Likewise.
19337 * src/reduce.c (reduce_grammar_tables): Likewise.
19338 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19339
19340 2001-11-30 Akim Demaille <akim@epita.fr>
19341
19342 * src/reduce.c (reduce_output): Formatting changes.
19343 * src/print.c (print_results, print_grammar): Likewise.
19344 * tests/regression.at (Rule Line Numbers)
19345 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19346
19347 2001-11-30 Akim Demaille <akim@epita.fr>
19348
19349 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19350 useless nonterminals, move them at the end of the symbol arrays.
19351 (reduce_output): Adjust.
19352 * tests/reduce.at (Useless Nonterminals): Adjust.
19353
19354 2001-11-30 Akim Demaille <akim@epita.fr>
19355
19356 * src/reduce.c: Various comment/formatting changes.
19357 (nonterminals_reduce): New, extracted from...
19358 (reduce_grammar_tables): here.
19359 (reduce_grammar): Call nonterminals_reduce.
19360
19361 2001-11-29 Paul Eggert <eggert@twinsun.com>
19362
19363 * src/bison.simple (YYSTACK_REALLOC): Remove.
19364 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19365 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19366 New macros.
19367 (union yyalloc): New type.
19368 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19369 an arbitrary restriction on hosts where size_t is wider than int.
19370
19371 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19372 a parser stack overflow. Allocate just one block of memory for all
19373 three stacks, instead of allocating three blocks; this typically is
19374 faster and reduces fragmentation.
19375
19376 Do not limit the number of items in the stack to a value that fits
19377 in 'int', as this is an arbitrary limit on hosts with 64-bit
19378 size_t and 32-bit int.
19379
19380 2001-11-29 Marc Autret <autret_m@epita.fr>
19381
19382 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19383 of defining YYERROR_VERBOSE.
19384 [AT_DATA]: $4 is now out of C declarations in the prologue.
19385
19386 2001-11-28 Marc Autret <autret_m@epita.fr>
19387
19388 * src/reader.c (parse_dquoted_param): New.
19389 (parse_skel_decl): Use it.
19390 * src/lex.h: Add its prototype.
19391 * src/lex.c (literalchar): Become not static.
19392
19393 2001-11-28 Marc Autret <autret_m@epita.fr>
19394
19395 * src/output.h: And put its extern declaration here.
19396 * src/output.c (error_verbose): Define here.
19397 (prepare): Echo name modification.
19398 * src/getargs.h: Clean its extern declaration.
19399 * src/getargs.c (error_verbose_flag): Remove.
19400 (getargs): Remove case 'e'.
19401 * src/options.c (option_table): 'error-verbose' is now seen as simple
19402 percent option.
19403 Include output.h.
19404
19405 * src/reader.c (read_declarations): Remove case tok_include.
19406 (parse_include_decl): Remove.
19407 * src/lex.h (token_t): Remove tok_include.
19408 * src/options.c (option_table): 'include' is now a simple command line
19409 option.
19410
19411 2001-11-28 Marc Autret <autret_m@epita.fr>
19412
19413 * src/bison.simple: Adjust muscle names.
19414 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19415 * src/output.c (prepare): s/_/-/ for the muscles names.
19416 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19417
19418 2001-11-28 Marc Autret <autret_m@epita.fr>
19419
19420 * src/bison.simple: Fix debug.
19421 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19422
19423 2001-11-28 Akim Demaille <akim@epita.fr>
19424
19425 * src/LR0.c (shifts_new): New.
19426 (save_shifts, insert_start_shift, augment_automaton): Use it.
19427
19428 2001-11-28 Akim Demaille <akim@epita.fr>
19429
19430 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19431 keep ruleno only.
19432
19433 2001-11-28 Akim Demaille <akim@epita.fr>
19434
19435 * src/closure.c (closure): Instead of looping over word in array
19436 then bits in words, loop over bits in array.
19437
19438 2001-11-28 Akim Demaille <akim@epita.fr>
19439
19440 * src/closure.c (closure): No longer optimize the special case
19441 where all the bits of `ruleset[r]' are set to 0, to make the code
19442 clearer.
19443
19444 2001-11-28 Akim Demaille <akim@epita.fr>
19445
19446 * src/closure.c (closure): `r' and `c' are new variables, used to
19447 de-obfuscate accesses to RULESET and CORE.
19448
19449 2001-11-28 Akim Demaille <akim@epita.fr>
19450
19451 * src/reduce.c (reduce_print): Use ngettext.
19452 (dump_grammar): Improve the trace accuracy.
19453
19454 2001-11-28 Akim Demaille <akim@epita.fr>
19455
19456 * src/reduce.c (dump_grammar): Don't translate trace messages.
19457
19458 2001-11-28 Akim Demaille <akim@epita.fr>
19459
19460 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19461 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19462 as all tags are free'ed afterwards.
19463 From Enrico Scholz.
19464
19465 2001-11-27 Paul Eggert <eggert@twinsun.com>
19466
19467 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19468 use alloca when we didn't want to, and vice versa.
19469
19470 2001-11-27 Marc Autret <autret_m@epita.fr>
19471
19472 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19473 initialization.
19474 * src/output.c (prepare): Remove its update.
19475
19476 2001-11-27 Marc Autret <autret_m@epita.fr>
19477
19478 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19479 Use %error-verbose.
19480
19481 2001-11-27 Marc Autret <autret_m@epita.fr>
19482
19483 * src/bison.simple: Remove YYERROR_VERBOSE using.
19484 Use %%error_verbose.
19485 (yyparse): Likewise.
19486 * src/output.c (prepare): Give its final value.
19487 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19488 * src/getargs.h: Add its extern declaration.
19489 * src/getargs.c (error_verbose_flag): New int.
19490 (getargs): Update to catch new case.
19491 * src/options.c (option_table): 'error-verbose' is a new option.
19492 (shortopts): Update.
19493
19494 2001-11-27 Akim Demaille <akim@epita.fr>
19495
19496 * src/system.h: Use intl/libgettext.h.
19497 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19498
19499 2001-11-27 Akim Demaille <akim@epita.fr>
19500
19501 * tests/torture.at (Exploding the Stack Size with Malloc):
19502 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19503
19504 2001-11-27 Akim Demaille <akim@epita.fr>
19505
19506 * src/files.c: Include error.h.
19507 Reported by Hans Aberg.
19508
19509 2001-11-26 Marc Autret <autret_m@epita.fr>
19510
19511 * src/reader.c (parse_include_decl): New, not yet implemented.
19512 (read_declarations): Add case tok_include.
19513 * src/getargs.h (include): Add its extern definition.
19514 * src/getargs.c (include): New const char *.
19515 (getargs): Add case '-I'.
19516 * src/options.c (option_table): Add include as command line and
19517 percent option.
19518 * src/lex.h (token_t): Add tok_include.
19519
19520 2001-11-26 Akim Demaille <akim@epita.fr>
19521
19522 * src/reader.c (readgram): Make sure rules for mid-rule actions
19523 have a lineno equal to that of their host rule.
19524 Reported by Hans Aberg.
19525 * tests/regression.at (Rule Line Numbers): New.
19526
19527 2001-11-26 Akim Demaille <akim@epita.fr>
19528
19529 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19530 size_ts.
19531
19532 2001-11-26 Akim Demaille <akim@epita.fr>
19533
19534 * src/complain.c, src/complain.h (error): Remove, provided by
19535 lib/error.[ch].
19536
19537 2001-11-26 Akim Demaille <akim@epita.fr>
19538
19539 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19540 issue an error message.
19541 * tests/regression.at (Invalid %directive): New.
19542 Reported by Hans Aberg.
19543
19544 2001-11-26 Akim Demaille <akim@epita.fr>
19545
19546 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19547 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19548
19549 2001-11-26 Akim Demaille <akim@epita.fr>
19550
19551 * src/conflicts.c (conflicts_print): Don't complain at all when
19552 there are no reduce/reduce conflicts, and as many shift/reduce
19553 conflicts as expected.
19554 * tests/regression.at (%expect right): Adjust.
19555
19556 2001-11-23 Akim Demaille <akim@epita.fr>
19557
19558 * lib/alloca.c: Update, from fileutils.
19559
19560 2001-11-23 Akim Demaille <akim@epita.fr>
19561
19562 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19563
19564 2001-11-23 Akim Demaille <akim@epita.fr>
19565
19566 * src/system.h: Include alloca.h.
19567 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19568
19569 2001-11-23 Akim Demaille <akim@epita.fr>
19570
19571 * src/print_graph.c (print_actions): Remove `rule', unused.
19572 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19573 pacify GCC's signed < unsigned warnings.
19574 * src/closure.c (itemsetsize): Likewise.
19575 * src/reader.c (symbol_list_new): Static.
19576
19577 2001-11-23 Akim Demaille <akim@epita.fr>
19578
19579 Attaching lineno to buckets is stupid, since only one copy of each
19580 symbol is kept, only the line of the first occurrence is kept too.
19581
19582 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19583 * src/reader.c (rline_allocated): Remove, unused.
19584 (symbol_list): Have a `line' member.
19585 (symbol_list_new): New.
19586 (readgram): Use it.
19587 * src/print.c (print_grammar): Output the rule line numbers.
19588 * tests/regression.at (Solved SR Conflicts)
19589 (Unresolved SR Conflicts): Adjust.
19590 Reported by Hans Aberg.
19591
19592 2001-11-22 Marc Autret <autret_m@epita.fr>
19593
19594 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19595
19596 2001-11-22 Marc Autret <autret_m@epita.fr>
19597
19598 * src/muscle_tab.c (muscle_init): Remove initialization of
19599 skeleton muscle.
19600 * src/output.c (output_master_parser): Do it here.
19601
19602 2001-11-20 Akim Demaille <akim@epita.fr>
19603
19604 * po/sv.po: New.
19605 * configure.in (ALL_LINGUAS): Adjust.
19606 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19607 longer contains strings to translate.
19608
19609 2001-11-19 Akim Demaille <akim@epita.fr>
19610
19611 * src/conflicts.c (conflicts_print): Add a missing \n.
19612
19613 2001-11-19 Akim Demaille <akim@epita.fr>
19614
19615 * src/nullable.c (nullable_print): New.
19616 (set_nullable): Call it when tracing.
19617 Better locality of variables.
19618
19619 2001-11-19 Akim Demaille <akim@epita.fr>
19620
19621 * src/print.c (print_actions): Better locality of variables.
19622
19623 2001-11-19 Akim Demaille <akim@epita.fr>
19624
19625 * src/derives.c (print_derives): Fix and enrich.
19626 * src/closure.c (print_fderives): Likewise.
19627
19628 2001-11-19 Akim Demaille <akim@epita.fr>
19629
19630 * src/closure.c (itemsetend): Remove, replaced with...
19631 (itemsetsize): new.
19632
19633 2001-11-19 Akim Demaille <akim@epita.fr>
19634
19635 * src/LR0.c (kernel_end): Remove, replaced with...
19636 (kernel_size): new.
19637
19638 2001-11-19 Akim Demaille <akim@epita.fr>
19639
19640 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19641 to clarify.
19642
19643 2001-11-19 Akim Demaille <akim@epita.fr>
19644
19645 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19646
19647 2001-11-19 Akim Demaille <akim@epita.fr>
19648
19649 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19650 trace messages.
19651 * src/LR0.c: Likewise.
19652 (allocate_itemsets): Use arrays instead of pointers to clarify.
19653
19654 2001-11-19 Akim Demaille <akim@epita.fr>
19655
19656 * src/getargs.c (statistics_flag): Replace with...
19657 (trace_flag): New.
19658 (longopts): Accept --trace instead of --statistics.
19659 * src/getargs.h, src/options.c: Adjust.
19660 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19661 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19662
19663 2001-11-19 Akim Demaille <akim@epita.fr>
19664
19665 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
19666 pointers to clarify the code.
19667 (save_reductions, save_shifts): Factor common parts of alternatives.
19668
19669 2001-11-19 Akim Demaille <akim@epita.fr>
19670
19671 * src/LR0.c (new_state, get_state): Complete TRACE code.
19672 * src/closure.c: Include `reader.h' to get `tags', needed by the
19673 trace code.
19674 Rename the conditional DEBUG as TRACE.
19675 Output consistently TRACEs to stderr, not stdout.
19676 * src/derives.c: Likewise.
19677 * src/reduce.c: (inaccessable_symbols): Using if is better style
19678 than goto.
19679 Use `#if TRACE' instead of `#if 0' for tracing code.
19680
19681 2001-11-19 Akim Demaille <akim@epita.fr>
19682
19683 * src/system.h (LIST_FREE, shortcpy): New.
19684 * src/LR0.c: Use them.
19685 * src/output.c (free_itemsets, free_reductions, free_shifts):
19686 Remove, replaced by LIST_FREE.
19687
19688 2001-11-19 Akim Demaille <akim@epita.fr>
19689
19690 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19691 (REDUCTIONS_ALLOC): New.
19692 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19693 allocation.
19694
19695 2001-11-19 Akim Demaille <akim@epita.fr>
19696
19697 * src/LR0.c (new_state): Complete trace code.
19698 * src/nullable.c (set_nullable): Don't translate traces.
19699
19700 2001-11-19 Akim Demaille <akim@epita.fr>
19701
19702 * src/print_graph.c (print_core): Better locality of variables.
19703 * src/print.c (print_core): Likewise.
19704
19705 2001-11-19 Akim Demaille <akim@epita.fr>
19706
19707 * src/vcg.c: You do the output, so you are responsible of the
19708 handling of VCG syntax, in particular: use quotearg.
19709 * src/print_graph.c: Don't.
19710 (print_actions): Don't output the actions as part of the nodes,
19711 since that's the job of the edges.
19712 (print_state): Don't output by hand: fill the node description,
19713 and ask for its output.
19714
19715 2001-11-19 Akim Demaille <akim@epita.fr>
19716
19717 * src/bison.simple (yyparse): When verbosely reporting an error,
19718 no longer put additional quotes around token names.
19719 * tests/calc.at: Adjust.
19720
19721 2001-11-19 Akim Demaille <akim@epita.fr>
19722
19723 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19724 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19725 * src/output.c: Adjust.
19726
19727 2001-11-19 Akim Demaille <akim@epita.fr>
19728
19729 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19730 (rule_t): this.
19731 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19732
19733 2001-11-19 Akim Demaille <akim@epita.fr>
19734
19735 * src/gram.h (rule_t): New.
19736 (rule_table): New.
19737 (rrhs, rlhs): Remove, part of state_t.
19738 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19739 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19740 * src/reader.c, src/reduce.c: Adjust.
19741
19742 2001-11-19 Akim Demaille <akim@epita.fr>
19743
19744 * src/reader.c (symbols_output): New, extracted from...
19745 (packsymbols): Here.
19746 (reader): Call it.
19747
19748 2001-11-19 Akim Demaille <akim@epita.fr>
19749
19750 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19751 (maxrhs): this new function.
19752
19753 2001-11-19 Akim Demaille <akim@epita.fr>
19754
19755 * src/lalr.c (F): New macro to access the variable F.
19756 Adjust.
19757
19758 2001-11-19 Akim Demaille <akim@epita.fr>
19759
19760 * src/lalr.h (LA): New macro to access the variable LA.
19761 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19762 * src/lalr.c: Adjust.
19763
19764 2001-11-19 Akim Demaille <akim@epita.fr>
19765
19766 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19767 (set_state_table): handle the `lookaheads' members.
19768
19769 2001-11-19 Akim Demaille <akim@epita.fr>
19770
19771 * src/lalr.h (lookaheads): Removed array, whose contents is now
19772 a member of...
19773 (state_t): this structure.
19774 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19775 Adjust.
19776
19777 2001-11-19 Akim Demaille <akim@epita.fr>
19778
19779 * src/lalr.h (consistent): Removed array, whose contents is now
19780 a member of...
19781 (state_t): this structure.
19782 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19783 Adjust.
19784
19785 2001-11-19 Akim Demaille <akim@epita.fr>
19786
19787 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19788 contents are now members of...
19789 (state_t): this structure.
19790 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19791 Adjust.
19792
19793 2001-11-19 Akim Demaille <akim@epita.fr>
19794
19795 * src/lalr.h (state_t): New.
19796 (state_table): Be a state_t * instead of a core **.
19797 (accessing_symbol): Remove, part of state_t.
19798 * src/lalr.c: Adjust.
19799 (set_accessing_symbol): Merge into...
19800 (set_state_table): this.
19801 * src/print_graph.c, src/conflicts.c: Adjust.
19802
19803 2001-11-14 Akim Demaille <akim@epita.fr>
19804
19805 * tests/calc.at, tests/output.at, tests/regression.at,
19806 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19807 now the tests are run in private dirs, therefore AC_CLEANUP and
19808 family can be simplified to 0-ary.
19809 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19810 use abs. path to find config.h.
19811 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19812 stderr, there can be way too much random noise.
19813 Instead pass -Werror to GCC and rely on the exit status.
19814 Reported by Wolfram Wagner.
19815
19816 2001-11-14 Akim Demaille <akim@epita.fr>
19817
19818 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19819 defined only if yyoverflow is defined, to avoid `warning: unused
19820 variable `yyvs1''.
19821 Reported by The Test Suite.
19822
19823 2001-11-14 Akim Demaille <akim@epita.fr>
19824
19825 * src/print.c: Include reduce.h.
19826 Reported by Hans Aberg.
19827
19828 2001-11-14 Akim Demaille <akim@epita.fr>
19829
19830 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19831 Revert a previous patch: these are really const.
19832 * src/conflicts.c (conflict_report): Additional useless pair of
19833 braces to pacify GCC's warnings for `if () if () {} else {}'.
19834 * src/lex.c (parse_percent_token): Replace equal_offset with
19835 arg_offset.
19836 arg is const.
19837 Be sure to strdup `arg' when used, since there is no reason for
19838 token_buffer not to change.
19839
19840 2001-11-14 Akim Demaille <akim@epita.fr>
19841
19842 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19843 definition.
19844 * src/main.c (main): Use them.
19845 Suggested by Hans Aberg.
19846
19847 2001-11-12 Akim Demaille <akim@epita.fr>
19848
19849 * src/system.h (ngettext): Now that we use ngettext, be sure to
19850 provide a default definition when NLS are not used.
19851
19852 2001-11-12 Akim Demaille <akim@epita.fr>
19853
19854 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
19855 Use @kbd to denote user input.
19856 (Language and Grammar): ANSIfy the example.
19857 Adjust its layout for info/notinfo.
19858 (Location Tracking Calc): Output error messages to stderr.
19859 Output locations in a more GNUtically correct way.
19860 Fix a couple of Englishos.
19861 Adjust @group/@end group pairs.
19862
19863 2001-11-12 Akim Demaille <akim@epita.fr>
19864
19865 %expect was not functioning at all.
19866
19867 * src/conflicts.c (expected_conflicts): Set to -1.
19868 (conflict_report): Use ngettext.
19869 (conflicts_print): Check %expect and make its violation an error.
19870 * doc/bison.texinfo (Expect Decl): Adjust.
19871 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
19872 * tests/regression.at (%expect not enough, %expect right)
19873 (%expect too much): New.
19874
19875 2001-11-12 Akim Demaille <akim@epita.fr>
19876
19877 * tests/regression.at (Conflicts): Rename as...
19878 (Unresolved SR Conflicts): this.
19879 (Solved SR Conflicts): New.
19880
19881 2001-11-12 Akim Demaille <akim@epita.fr>
19882
19883 * src/reduce.c (print_results): Rename as...
19884 (reduce_output): This.
19885 Output to OUT, passed as argument, instead of output_obstack.
19886 (dump_grammar): Likewise.
19887 (reduce_free): New.
19888 Also free V1.
19889 (reduce_grammar): No longer call reduce_output, since...
19890 * src/print.c (print_results): do it.
19891 * src/main.c (main): Call reduce_free;
19892
19893 2001-11-12 Akim Demaille <akim@epita.fr>
19894
19895 * src/conflicts.c (print_reductions): Accept OUT as argument.
19896 Output to it, not to output_obstack.
19897 * src/print.c (print_actions): Adjust.
19898
19899 2001-11-12 Akim Demaille <akim@epita.fr>
19900
19901 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
19902 the result instead of using...
19903 (src_total, rrc_total, src_count, rrc_count): Remove.
19904 (any_conflicts): Remove.
19905 (print_conflicts): Split into...
19906 (conflicts_print, conflicts_output): New.
19907 * src/conflicts.h: Adjust.
19908 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
19909 * src/print.c (print_grammar): Issue `\n' between two rules.
19910 * tests/regression.at (Conflicts): New.
19911 Reported by Tom Lane.
19912
19913 2001-11-12 Akim Demaille <akim@epita.fr>
19914
19915 * tests/regression.at (Invalid input): Remove, duplicate with
19916 ``Invalid input: 1''.
19917
19918 2001-11-12 Akim Demaille <akim@epita.fr>
19919
19920 * tests/torture.at (AT_DATA_STACK_TORTURE)
19921 (Exploding the Stack Size with Alloca)
19922 (Exploding the Stack Size with Malloc): New.
19923
19924 2001-11-12 Akim Demaille <akim@epita.fr>
19925
19926 * src/bison.simple (YYSTACK_REALLOC): New.
19927 (yyparse) [!yyoverflow]: Use it and free the old stack.
19928 Reported by Per Allansson.
19929
19930 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
19931
19932 * src/bison.simple: Define type yystype instead of YYSTYPE, and
19933 define CPP macro, which substitute YYSTYPE by yystype.
19934 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
19935 with yyltype/YYLTYPE. This allows inclusion of the generated
19936 header within the parser if the compiler, such as GGC, accepts
19937 multiple equivalent #defines.
19938 From Akim.
19939
19940 2001-11-05 Akim Demaille <akim@epita.fr>
19941
19942 * src/reader.c (symbols_output): New, extracted from...
19943 (packsymbols): here.
19944 (reader): Adjust.
19945
19946 2001-11-05 Akim Demaille <akim@epita.fr>
19947
19948 * src/lex.c (parse_percent_token): s/quotearg/quote/.
19949
19950 2001-11-05 Akim Demaille <akim@epita.fr>
19951
19952 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
19953 pattern.
19954
19955 2001-11-05 Akim Demaille <akim@epita.fr>
19956
19957 * src/options.h (struct option_table_struct): set_flags is void*.
19958 * src/options.c (longopts): Support `--output' and `%output'.
19959 (usage): Adjust.
19960 * src/lex.h (tok_setopt): Remove, replaced with...
19961 (tok_intopt, tok_stropt): these new guys.
19962 * src/lex.c (getopt.h): Not needed.
19963 (token_buffer, unlexed_token_buffer): Not const.
19964 (percent_table): Promote `-' over `_' in directive names.
19965 Active `%name-prefix', `file-prefix', and `output'.
19966 (parse_percent_token): Accept possible arguments to directives.
19967 Promote `-' over `_' in directive names.
19968
19969 2001-11-04 Akim Demaille <akim@epita.fr>
19970
19971 * doc/bison.texinfo (Decl Summary): Split the list into
19972 `directives for grammars' and `directives for bison'.
19973 Sort'em.
19974 Add description of `%name-prefix', `file-prefix', and `output'.
19975 Promote `-' over `_' in directive names.
19976 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
19977 Simplify the description of `--name-prefix'.
19978 Promote `-' over `_' in directive names.
19979 Promote `--output' over `--output-file'.
19980 Fix the description of `--defines'.
19981 * tests/output.at: Exercise %file-prefix and %output.
19982
19983 2001-11-02 Akim Demaille <akim@epita.fr>
19984
19985 * doc/refcard.tex: Update.
19986
19987 2001-11-02 Akim Demaille <akim@epita.fr>
19988
19989 * src/symtab.h (SUNDEF): New.
19990 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
19991 stand for `uninitialized', instead of 0.
19992 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
19993 * src/lex.c (lex): Adjust.
19994
19995 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
19996 Number it 0.
19997 Let yylex return it instead of a plain 0.
19998 Reported by Dick Streefland.
19999
20000 2001-11-02 Akim Demaille <akim@epita.fr>
20001
20002 * tests/regression.at (Mixing %token styles): New test.
20003
20004 2001-11-02 Akim Demaille <akim@epita.fr>
20005
20006 * src/reader.c (parse_thong_decl): Formatting changes.
20007 (token_translations_init): New, extracted from...
20008 (packsymbols): Here.
20009 Adjust.
20010
20011 2001-11-01 Akim Demaille <akim@epita.fr>
20012
20013 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20014 Check that `9foo.y' produces correct cpp guards.
20015 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20016 guards.
20017 Reported by Wwp.
20018
20019 2001-11-01 Akim Demaille <akim@epita.fr>
20020
20021 * tests/regression.at (Invalid input: 2): New.
20022 * src/lex.c (unlexed_token_buffer): New.
20023 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20024 too.
20025 Reported by Wwp.
20026
20027 2001-11-01 Akim Demaille <akim@epita.fr>
20028
20029 * tests/calc.at: Catch up with 1.30.
20030 * configure.in: Bump to 1.49a.
20031 Adjust to newer Autotest.
20032
20033 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
20034
20035 * src/conflicts.c: Move global variables rrc_total and src_total ...
20036 (print_conflicts): here.
20037 * src/output.c (output): Free global variable user_toknums.
20038 * src/lex.c (token_obstack): Become static.
20039
20040 2001-10-18 Akim Demaille <akim@epita.fr>
20041
20042 * tests/atlocal.in (GCC): Add.
20043 * tests/calc.at: s/m4_match/m4_bmatch/.
20044 s/m4_patsubst/m4_bpatsubst/.
20045 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20046 * configure.in: AC_SUBST(GCC).
20047
20048 2001-10-14 Marc Autret <autret_m@epita.fr>
20049
20050 * src/options.c (create_long_option_table): Fix.
20051
20052 2001-10-10 Akim Demaille <akim@epita.fr>
20053
20054 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20055
20056 2001-10-04 Akim Demaille <akim@epita.fr>
20057
20058 * src/reader.c (parse_union_decl): Push the caracters in
20059 union_obstack, not attrs_obstack.
20060
20061 2001-10-04 Akim Demaille <akim@epita.fr>
20062
20063 Merge in the branch 1.29.
20064
20065 * src/reader.c (packsymbols): Use a temporary obstack for
20066 `%%tokendef', since output_stack is already used elsewhere.
20067
20068 2001-10-02 Akim Demaille <akim@epita.fr>
20069
20070 Bump 1.29d.
20071
20072 2001-10-02 Akim Demaille <akim@epita.fr>
20073
20074 Version 1.29c.
20075
20076 2001-10-02 Akim Demaille <akim@epita.fr>
20077
20078 * tests/regression.at (Invalid CPP headers): New.
20079 From Alexander Belopolsky.
20080 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20081
20082 2001-10-02 Akim Demaille <akim@epita.fr>
20083
20084 * tests/regression.at (Invalid input): New.
20085 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20086 Reported by Shura.
20087
20088 2001-10-02 Akim Demaille <akim@epita.fr>
20089
20090 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20091
20092 2001-10-02 Akim Demaille <akim@epita.fr>
20093
20094 * src/output.c (output_parser): Assert `skeleton'.
20095 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20096 systems.
20097 From Shura.
20098
20099 2001-10-01 Marc Autret <autret_m@epita.fr>
20100
20101 * src/lex.h: Echo modifications.
20102 * src/lex.c (unlex): Parameter is now token_t.
20103 From Hans Aberg.
20104
20105 2001-10-01 Marc Autret <autret_m@epita.fr>
20106
20107 * src/main.c: Include lex.h.
20108 From Hans Aberg.
20109
20110 2001-09-29 Akim Demaille <akim@epita.fr>
20111
20112 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20113
20114 2001-09-28 Akim Demaille <akim@epita.fr>
20115
20116 * tests/testsuite.at: Update to newer Autotest.
20117 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20118
20119 2001-09-27 Akim Demaille <akim@epita.fr>
20120
20121 Position independent wrapper.
20122
20123 * tests/bison: Remove.
20124 * tests/bison.in: New.
20125 * configure.in: Adjust.
20126
20127 2001-09-27 Paul Eggert <eggert@twinsun.com>
20128
20129 Port quotearg fixes from tar 1.13.24.
20130
20131 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20132 tm to be declared.
20133 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20134 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20135
20136 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20137 * m4/mbrtowc.m4: New file.
20138 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20139 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20140
20141 2001-09-27 Akim Demaille <akim@epita.fr>
20142
20143 Bump to 1.29c.
20144
20145 2001-09-27 Akim Demaille <akim@epita.fr>
20146
20147 Version 1.29b.
20148
20149 2001-09-25 Akim Demaille <akim@epita.fr>
20150
20151 * src/system.h: Include `xalloc.h'.
20152 Remove it from the C files.
20153 * src/files.c (output_files): Free the obstacks.
20154 * src/lex.c (init_lex): Rename as...
20155 (lex_init): this.
20156 (lex_free): New.
20157 * src/main.c (main): Use it.
20158
20159 2001-09-24 Marc Autret <autret_m@epita.fr>
20160
20161 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20162 to output informations in fout (FILE*).
20163 (open_graph, close_graph): Likewise.
20164 (output_graph, output_edge, output_node): Likewise.
20165 * src/vcg.h: Update function prototypes.
20166 * src/print_graph.c (print_graph): Open output graph file.
20167 (print_actions): Adjust.
20168 * src/files.h: Remove extern declaration.
20169 * src/files.c: Remove graph_obstack declaration.
20170 (open_files): Remove graph_obstack initialization.
20171 (output_files): Remove graph_obstack saving.
20172
20173 2001-09-24 Marc Autret <autret_m@epita.fr>
20174
20175 * src/files.c (compute_output_file_names): Fix.
20176
20177 2001-09-24 Marc Autret <autret_m@epita.fr>,
20178 Akim Demaille <akim@epita.fr>
20179
20180 * src/reader.c (reader): Remove call to free_symtab ().
20181 * src/main.c (main): Call it here.
20182 Include symtab.h.
20183 * src/conflicts.c (initialize_conflicts): Rename as...
20184 (solve_conflicts): this.
20185 * src/print.c (print_core, print_actions, print_state)
20186 (print_grammar): Dump to a file instead a `output_obstack'.
20187 (print_results): Dump `output_obstack', and then proceed with the
20188 FILE *.
20189 * src/files.c (compute_output_file_names, close_files): New.
20190 (output_files): Adjust.
20191 * src/main.c (main): Adjust.
20192
20193 2001-09-23 Marc Autret <autret_m@epita.fr>
20194
20195 * src/files.c (compute_header_macro): Computes header macro name
20196 from spec_defines_file when given.
20197
20198 2001-09-23 Marc Autret <autret_m@epita.fr>
20199
20200 * src/files.c (output_files): Add default extensions.
20201
20202 2001-09-22 Akim Demaille <akim@epita.fr>
20203
20204 * src/conflicts.c (finalize_conflicts): Rename as...
20205 (free_conflicts): this.
20206
20207 2001-09-22 Akim Demaille <akim@epita.fr>
20208
20209 * src/gram.c (gram_free): Rename back as...
20210 (dummy): this.
20211 (output_token_translations): Free `token_translations'.
20212 * src/symtab.c (free_symtab): Free the tag field.
20213
20214 2001-09-22 Akim Demaille <akim@epita.fr>
20215
20216 Remove `translations' as it is always set to true.
20217
20218 * src/gram.h: Adjust.
20219 * src/reader.c (packsymbols, parse_token_decl): Adjust
20220 * src/print.c (print_grammar): Adjust.
20221 * src/output.c (output_token_translations): Adjust.
20222 * src/lex.c (lex): Adjust.
20223 * src/gram.c: Be sure the set pointers to NULL.
20224 (dummy): Rename as...
20225 (gram_free): this.
20226
20227 2001-09-22 Akim Demaille <akim@epita.fr>
20228
20229 * configure.in: Invoke AM_LIB_DMALLOC.
20230 * src/system.h: Use dmalloc.
20231 * src/LR0.c: Be sure to have pointers initialized to NULL.
20232 (allocate_itemsets): Allocate kernel_items only if needed.
20233
20234 2001-09-22 Akim Demaille <akim@epita.fr>
20235
20236 * configure.in: Bump to 1.29b.
20237 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20238 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20239 need xmalloc.c in calc.y.
20240 From Pascal Bart.
20241
20242 2001-09-21 Akim Demaille <akim@epita.fr>
20243
20244 Version 1.29a.
20245 * Makefile.maint, config/config.guess, config/config.sub,
20246 * config/missing: Update from masters.
20247 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20248 upon package.m4.
20249 * configure.in (ALL_LINGUAS): Add `tr'.
20250
20251 2001-09-21 Akim Demaille <akim@epita.fr>
20252
20253 * tests/Makefile.am (package.m4): Move to...
20254 ($(srcdir)/$(TESTSUITE)): here.
20255
20256 2001-09-20 Akim Demaille <akim@epita.fr>
20257
20258 * src/complain.c: No longer try to be standalone: use system.h.
20259 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20260 * src/complain.h: Likewise.
20261 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20262 Remove the unused variable `n'.
20263 From Albert Chin-A-Young.
20264
20265 2001-09-18 Marc Autret <autret_m@epita.fr>
20266
20267 * doc/bison.1: Update.
20268 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20269 descriptions.
20270 (Option Cross Key): Update.
20271 Add --graph.
20272
20273 2001-09-18 Marc Autret <autret_m@epita.fr>
20274
20275 * tests/regression.at: New test (comment in %union).
20276
20277 2001-09-18 Marc Autret <autret_m@epita.fr>
20278
20279 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20280 do that.
20281 Reported by Keith Browne.
20282
20283 2001-09-18 Marc Autret <autret_m@epita.fr>
20284
20285 * tests/output.at: Add tests for --defines and --graph.
20286
20287 2001-09-18 Marc Autret <autret_m@epita.fr>
20288
20289 * tests/output.at: Removes tests of %{header,src}_extension features.
20290
20291 2001-09-18 Akim Demaille <akim@epita.fr>
20292
20293 * tests/Makefile.am (package.m4): New.
20294 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20295 (_AT_CHECK_CALC_ERROR): Likewise.
20296 Factor the `, ' part of verbose error messages.
20297
20298 2001-09-18 Marc Autret <autret_m@epita.fr>
20299
20300 * src/getargs.c (longopts): Declare --defines and --graph as options
20301 with optional arguments.
20302 * src/files.h: Add extern declarations.
20303 * src/files.c (spec_graph_file, spec_defines_file): New.
20304 (output_files): Update.
20305 Remove CPP-outed code.
20306
20307 2001-09-18 Marc Autret <autret_m@epita.fr>
20308
20309 Turn off %{source,header}_extension feature.
20310
20311 * src/files.c (compute_exts_from_gf): Update.
20312 (compute_exts_from_src): Update.
20313 (output_files): CPP-out useless code.
20314 * src/files.h: Remove {header,source}_extension extern declarations.
20315 * src/reader.c (parse_dquoted_param): CPP-out.
20316 (parse_header_extension_decl): Remove.
20317 (parse_source_extension_decl): Remove.
20318 (read_declarations): Remove cases tok_{hdrext,srcext}.
20319 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20320 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20321
20322 2001-09-10 Akim Demaille <akim@epita.fr>
20323
20324 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20325 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20326 (AT_CHECK_OUTPUT): this.
20327 Merely check ls' exit status, its output is useless.
20328
20329 2001-09-10 Akim Demaille <akim@epita.fr>
20330
20331 * tests/calc.at: Use m4_match.
20332 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20333
20334 2001-09-10 Marc Autret <autret_m@epita.fr>,
20335 Akim Demaille <akim@epita.fr>
20336
20337 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20338 enum color_e.
20339 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20340 to `normal'.
20341 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20342 * src/lex.h: Adjust prototype.
20343 (token_t): Add `tok_undef'.
20344 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20345 (parse_percent_token): Now returns token_t.
20346 Add default statement in switch.
20347 (lex): Separate `c' as an input variable, from the token_t result
20348 part.
20349 (unlexed): Is a token_t.
20350
20351 2001-09-10 Akim Demaille <akim@epita.fr>
20352
20353 * configure.in: Bump to 1.29a.
20354
20355 2001-09-07 Akim Demaille <akim@epita.fr>
20356
20357 Version 1.29.
20358
20359 2001-08-30 Akim Demaille <akim@epita.fr>
20360
20361 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20362 * m4/atconfig.m4: Remove.
20363 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20364 * tests/bison: New.
20365 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20366 m4_if, m4_patsubst, and m4_regexp.
20367 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20368 `input' file instead of echo.
20369
20370 2001-08-29 Akim Demaille <akim@epita.fr>
20371
20372 Bump to 1.28e.
20373
20374 2001-08-29 Akim Demaille <akim@epita.fr>
20375
20376 Version 1.28d.
20377
20378 2001-08-29 Paul Eggert <eggert@twinsun.com>
20379
20380 * src/bison.simple (yyparse): Don't take the address of an
20381 item before the start of an array, as that doesn't conform to
20382 the C Standard.
20383
20384 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20385
20386 * doc/bison.texinfo (Location Tracking Calc): New node.
20387
20388 2001-08-29 Paul Eggert <eggert@twinsun.com>
20389
20390 * src/output.c (output): Do not define const, as this now
20391 causes more problems than it cures.
20392
20393 2001-08-29 Akim Demaille <akim@epita.fr>
20394
20395 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20396 the nodes.
20397 Be sure to tag the `detailmenu'.
20398
20399 2001-08-29 Akim Demaille <akim@epita.fr>
20400
20401 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20402 download in a tmp dir.
20403
20404 2001-08-28 Marc Autret <autret_m@epita.fr>
20405
20406 * config/depcomp: New file.
20407
20408 2001-08-28 Marc Autret <autret_m@epita.fr>
20409
20410 * doc/bison.1 (mandoc): Adjust.
20411 From Juan Manuel Guerrero.
20412
20413 2001-08-28 Marc Autret <autret_m@epita.fr>
20414
20415 * src/print_graph.c (print_state): Fix.
20416
20417 2001-08-27 Marc Autret <autret_m@epita.fr>
20418
20419 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20420 char * members.
20421 Echo modifications to the functions prototypes.
20422 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20423
20424 2001-08-27 Marc Autret <autret_m@epita.fr>
20425
20426 * src/vcg.c: Include `xalloc.h'.
20427 (add_colorentry): New.
20428 (add_classname): New.
20429 (add_infoname): New.
20430 * src/vcg.h: Add new prototypes.
20431
20432 2001-08-27 Akim Demaille <akim@epita.fr>
20433
20434 * Makefile.maint: Sync. again with CVS Autoconf.
20435
20436 2001-08-27 Akim Demaille <akim@epita.fr>
20437
20438 * Makefile.maint: Formatting changes.
20439 (po-update, cvs-update, update): New targets.
20440 (AMTAR): Remove.
20441
20442 2001-08-27 Akim Demaille <akim@epita.fr>
20443
20444 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20445 * Makefile.maint: Sync. with CVS Autoconf.
20446
20447 2001-08-27 Marc Autret <autret_m@epita.fr>
20448
20449 * src/vcg.h (struct infoname_s): New.
20450 (struct colorentry_s): New.
20451 (graph_s): New fields {vertical,horizontal}_order in structure.
20452 Add `infoname' field.
20453 Add `colorentry' field;
20454 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20455 (G_HORIZONTAL_ORDER): New.
20456 (G_INFONAME): New.
20457 (G_COLORENTRY): New.
20458 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20459 Add output of `infoname'.
20460 Add output of `colorentry'.
20461
20462 2001-08-27 Marc Autret <autret_m@epita.fr>
20463
20464 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20465 This one shadowed a global parameter.
20466
20467 2001-08-24 Marc Autret <autret_m@epita.fr>
20468
20469 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20470 instead of `unsigned'.
20471 (print_state): Do not call obstack_object_size () in obstack_grow ()
20472 to avoid macro variables shadowing.
20473
20474 2001-08-23 Marc Autret <autret_m@epita.fr>
20475
20476 * src/lex.c (percent_table): Typo: s/naem/name/.
20477 Add graph option.
20478 Normalize new options declarations.
20479
20480 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
20481
20482 * tests/suite.at: Exercise %header_extension and %source_extension.
20483
20484 2001-08-16 Marc Autret <autret_m@epita.fr>
20485
20486 * src/reader.c (parse_dquoted_param): New.
20487 (parse_header_extension_decl): Use it.
20488 (parse_source_extension_decl): Likewise.
20489
20490 2001-08-16 Marc Autret <autret_m@epita.fr>
20491
20492 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20493 (get_xxxx_str): Use assert () instead of complain ().
20494 Remove return invokations in default cases.
20495 (get_decision_str): Modify default behaviour. Remove second argument.
20496 Echo modifications on calls.
20497 (output_graph): Fix.
20498
20499 2001-08-16 Marc Autret <autret_m@epita.fr>
20500
20501 * src/getargs.c (usage): Update with ``-g, --graph''.
20502
20503 2001-08-16 Marc Autret <autret_m@epita.fr>
20504
20505 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20506 (Option Cross Key): Likewise.
20507 * doc/bison.1: Update.
20508
20509 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
20510
20511 * src/output.c (output_master_parser): Don't finish action_obstack.
20512 (output_parser): Don't care about the muscle action, here.
20513 (prepare): Copy the action_obstack in the action muscle.
20514 (output): Free action_obstack.
20515
20516 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20517
20518 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20519 will contain `%union' declaration.
20520 (parse_union_decl): Delete #line directive output.
20521 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20522 informations about %union.
20523 (parse_union_decl): Copy the union_obstack in the muscle stype.
20524 * src/bison.simple: Add new #line directive.
20525 Add typdef %%stype YYSTYPE.
20526
20527 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20528
20529 * src/bison.simple: Add new `#line' directive.
20530
20531 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
20532
20533 * src/bison.simple: New `#line' directive.
20534 * src/output.c (output_parser): Support new dynamic muscle input_line.
20535
20536 2001-09-22 Marc Autret <autret_m@epita.fr>
20537
20538 * src/output.c (output_master_parser): New.
20539 (output_parser): Be more re-entrant.
20540
20541 2001-09-21 Marc Autret <autret_m@epita.fr>
20542
20543 * src/reader.c (copy_definition, parse_union_decl): Update and use
20544 `linef' muscle.
20545 (copy_action): Likewise.
20546 Use obstack_1grow ().
20547 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20548
20549 2001-09-21 Marc Autret <autret_m@epita.fr>
20550
20551 * src/options.c (option_table): Adjust.
20552 * src/lex.c (parse_percent_token): Fix.
20553
20554 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20555
20556 * src/options.c (symtab.h): Include it, need by lex.h.
20557
20558 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20559
20560 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20561 is now an option_table_struct*.
20562 (option_strcmp): New function option_strcmp.
20563 (parse_percent_token): Call option_strcmp.
20564 * src/getargs.c (xalloc.h, options.h): Include it.
20565 (getargs): Call create_long_option_table.
20566 (getargs): Free longopts at the end of the function.
20567 (shortopts): Move in options.c.
20568 * src/options.c (create_long_option_table): New function. Convert
20569 information from option_table to option structure.
20570 * src/reader.c (options.h): Include it.
20571
20572 * src/Makefile.am: Adjust.
20573 * src/options.c (option_table): Create from longopts and percent_table.
20574 * src/getargs.c (longopts): Delete.
20575 * src/lex.c (struct percent_table_struct): Delete.
20576 (percent_table): Delete.
20577 (options.h): Include it.
20578 * src/options.c: Create.
20579 * src/options.h: Create.
20580 Declare enum opt_access_e.
20581 Define struct option_table_struct.
20582
20583 2001-09-20 Marc Autret <autret_m@epita.fr>
20584
20585 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20586 sections of Bison.
20587
20588 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
20589
20590 * src/bison.simple: s/%%filename/%%skeleton.
20591 * src/muscle_tab.c (getargs.h): Include it.
20592 (muscle_init): Insert new muscle skeleton.
20593
20594 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
20595
20596 * src/output.c (output_parser): Delete unused variable actions_dumped.
20597
20598 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
20599
20600 * src/output.c (output): Delete call to reader_output_yylsp.
20601 * src/reader.c (reader): Likewise.
20602 * src/reader.h: Delete declaration of reader_output_yylsp.
20603
20604 2001-09-02 Marc Autret <autret_m@epita.fr>
20605
20606 * src/reader.c: Include muscle_tab.h.
20607 (parse_union_decl): Update.
20608 (parse_macro_decl): Rename parse_muscle_decl.
20609 Update to use renamed functions and variable.
20610 (read_declarations, copy_action, read_additionnal_code, : Updated
20611 with correct variables and functions names.
20612 (packsymbols, reader): Likewise.
20613
20614 * src/reader.h (muscle_obstack): Extern declaration update.
20615
20616 * src/output.c: Include muscle_tab.h
20617 In all functions using macro_insert, change by using muscle_insert ().
20618 (macro_obstack): Rename muscle_obstack.
20619 Echo modifications in the whole file.
20620 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20621 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20622 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20623
20624 * src/muscle_tab.h: Update double inclusion macros.
20625 (macro_entry_s): Rename muscle_entry_s.
20626 Update prototypes.
20627
20628 * src/muscle_tab.c: Include muscle_tab.h.
20629 Rename macro_tabble to muscle_table.
20630 (mhash1, mhash2, mcmp): Use muscle_entry.
20631 (macro_init): Rename muscle_init. Update.
20632 (macro_insert): Rename muscle_insert. Update.
20633 (macro_find): Rename muscle_find. Update.
20634
20635 * src/main.c: Include muscle_tab.h.
20636 (main): Call muscle_init ().
20637 * src/Makefile.am (bison_SOURCES): Echo modifications.
20638
20639 2001-09-02 Marc Autret <autret_m@epita.fr>
20640
20641 Now the files macro_tab.[ch] are named muscle_tab.[ch].
20642
20643 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20644
20645 2001-09-02 Marc Autret <autret_m@epita.fr>
20646
20647 * src/macrotab.c, src/macrotab.h: Remove.
20648
20649 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
20650
20651 * src/reader.c (copy_guard): Use muscle to specify the `#line'
20652 filename.
20653
20654 2001-09-01 Marc Autret <autret_m@epita.fr>
20655
20656 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20657 to an explicit value to activate the feature. We do it here.
20658
20659 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20660
20661 * src/output.c (prepare): Delete the `filename' muscule insertion.
20662 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20663 (parse_union_decl): Likewise.
20664 * src/macrotab.c (macro_init): Initialize filename by infile.
20665
20666 2001-08-31 Marc Autret <autret_m@epita.fr>
20667
20668 * src/bison.simple (YYLSP_NEEDED): New definition.
20669 * src/output.c (prepare): Add macro insertion of `locations_flag'
20670
20671 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20672
20673 * src/output.c (prepare): Delete insertion of previous muscles,
20674 and insert the `prefix' muscles.
20675 * src/macrotab.c (macro_init): Likewise.
20676 (macro_init): Initialization prefix directive by `yy'.
20677 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
20678 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20679 yylval, yydebug, yyerror, yynerrs and yyparse.
20680 New directive `#define' to substitute yydebug, ... with option
20681 name_prefix.
20682
20683 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20684
20685 * src/main.c (main): Standardize.
20686 * src/output.c (output_table_data, output_parser): Likewise.
20687 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20688
20689 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20690
20691 * src/reader.c (read_additionnal_code): Rename %%user_code to
20692 %%epilogue.
20693 * src/output.c (output): Rename %%declarations to %%prologue.
20694 * src/bison.simple: Echo modifications.
20695
20696 2001-08-31 Marc Autret <autret_m@epita.fr>
20697
20698 * src/reader.c (readgram): CleanUp.
20699 (output_token_defines): Likewise.
20700 (packsymbols): Likewise.
20701 (reader): Likewise.
20702 * src/output.c (output): CPP-out useless code.
20703
20704 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20705
20706 * src/reader.c (reader): Delete obsolete call to function
20707 output_trailers and output_headers.
20708 * src/output.h: Remove obsolete functions prototypes of output_headers
20709 and output_trailers.
20710
20711 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
20712
20713 * src/main.c: Include macrotab.h.
20714 * src/macrotab.h (macro_entry_s): Constify fields.
20715 Adjust functions prototypes.
20716 * src/macrotab.c (macro_insert): Constify key and value.
20717 (macro_find): Constify key.
20718 (macro_insert): Include 'xalloc.h'
20719 (macro_insert): Use XMALLOC.
20720 (macro_find): Constify return value.
20721 * src/output.c (output_table_data): Rename table to table_data.
20722 (output_parser): Constify macro_key, macro_value.
20723
20724 2001-08-30 Marc Autret <autret_m@epita.fr>
20725
20726 * src/reader.c (parse_skel_decl): New.
20727 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
20728 * src/lex.h (token_t): New token `tok_skel'.
20729 * src/lex.c (percent_table): Add skeleton option entry.
20730 Standardize.
20731
20732 2001-08-29 Marc Autret <autret_m@epita.fr>
20733
20734 * src/bison.simple: Add %%user_code directive at the end.
20735 * src/reader.c (read_additionnal_code): New.
20736 (reader): Use it.
20737 * src/output.c (output_program): Remove.
20738 (output): Update.
20739
20740 2001-08-28 Marc Autret <autret_m@epita.fr>
20741
20742 * src/output.c (output_actions): Clean up.
20743 (output_gram): CPP-out useless code.
20744 * src/reader.c (reader): Clean up, CPP-out useless code.
20745
20746 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
20747
20748 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
20749 directive.
20750 * src/bison.simple: Add `%%definitions'.
20751
20752 2001-08-28 Marc Autret <autret_m@epita.fr>
20753
20754 * config/depcomp: New file.
20755
20756 2001-08-27 Paul Eggert <eggert@twinsun.com>
20757
20758 * src/bison.simple (yyparse): Don't take the address of an
20759 item before the start of an array, as that doesn't conform to
20760 the C Standard.
20761
20762 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20763
20764 * src/output.c (output): Remove the initialization of the macro
20765 obstack. It was done too late here.
20766
20767 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20768 completely wrong.
20769 (reader): Initialize the macro obstack here, since we need it to grow
20770 '%define' directives.
20771
20772 * src/reader.h: Declare the macro obstack as extern.
20773
20774 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20775
20776 * src/output.c (output_parser): Fix. Store single '%' characters in
20777 the output obstack instead of throwing them away.
20778
20779 2001-08-27 Akim Demaille <akim@epita.fr>
20780
20781 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20782
20783 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20784
20785 * lib/Makefile.am: Adjust.
20786
20787 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20788
20789 * src/bison.simple: Update and add '%%' directives.
20790
20791 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20792
20793 * src/reader.c (reader): Remove calls to 'output_headers' and
20794 'output_trailers'. Remove some C output.
20795 (readgram): Disable a piece of code that was writing a default
20796 definition for 'YYSTYPE'.
20797 (reader_output_yylsp): Remove.
20798 (packsymbols): Output token defintions to a macro.
20799 (copy_definition): Disable C output.
20800
20801 * src/reader.c (parse_macro_decl): New function used to parse macro
20802 declarations.
20803 (copy_string2): Put the body of copy_string into this new function.
20804 Add a parameter to let the caller choose whether he wants to copy the
20805 string delimiters or not.
20806 (copy_string): Be a simple call to copy_string2 with the last argument
20807 bound to true.
20808 (read_declarations): Add case for macro definition.
20809 (copy_identifier): New.
20810 (parse_macro_decl): Read macro identifiers using copy_identifier
20811 rather than lex.
20812
20813 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20814
20815 * src/output.c (prepare): Add prefixed names.
20816 (output_parser): Output semantic actions.
20817 (output_parser): Fix bug on '%%line' directives.
20818
20819 * src/output.c (output_headers): Remove. The C code printed by this
20820 function should now be in the skeletons.
20821 (output_trailers): Remove.
20822 (output): Disable call to 'reader_output_yylsp'.
20823 (output_rule_data): Do not output tables to the table obstack.
20824
20825 * src/output.c: Remove some C dedicated output.
20826 Improve the use of macro and output obstacks.
20827 (output_defines): Remove.
20828
20829 * src/output.c (output_token_translations): Associate 'translate'
20830 table with a macro. No output to the table obstack.
20831 (output_gram): Same for 'rhs' and 'prhs'.
20832 (output_stos): Same for 'stos'.
20833 (output_rule_data): Same for 'r1' and 'r2'.
20834 (token_actions): Same for 'defact'.
20835 (goto_actions): Same for 'defgoto'.
20836 (output_base): Same for 'pact' and 'pgoto'.
20837 (output_table): Same for 'table'.
20838 (output_check): Same for 'check'.
20839
20840 * src/output.c (output_table_data): New function.
20841 (output_short_table): Remove.
20842 (output_short_or_char_table): Remove.
20843
20844 * src/output.c (output_parser): Replace most of the skeleton copy code
20845 with something new. Skeletons are now processed character by character
20846 rather than line by line, and Bison looks for '%%' macros. This is the
20847 first step in making Bison's output process (a lot) more flexible.
20848 (output_parser): Use the macro table.
20849
20850 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20851
20852 * src/main.c (main): Initialize the macro table.
20853
20854 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20855
20856 * src/lex.c (percent_table): Add tok_define.
20857 * src/lex.h: Add tok_define.
20858
20859 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20860
20861 * src/macrotab.c: New file.
20862 * src/macrotab.h: New file.
20863 * src/Makefile.am: Update.
20864
20865 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20866
20867 * lib/hash.c: New file.
20868 * lib/hash.h: New file.
20869 * lib/Makefile.am: Update.
20870
20871 2001-08-15 Akim Demaille <akim@epita.fr>
20872
20873 Version 1.28c.
20874
20875 2001-08-15 Marc Autret <autret_m@epita.fr>
20876
20877 * src/reader.c (readgram): Indent output macro YYSTYPE.
20878 (packsymbols): Likewise.
20879 (output_token_defines): Likewise.
20880 * src/files.c: Standardize.
20881 (compute_header_macro): New.
20882 (defines_obstack_save): New. Use compute_header_macro.
20883 (output_files): Update. Use defines_obstack_save.
20884
20885 2001-08-15 Akim Demaille <akim@epita.fr>
20886
20887 * doc/bison.texinfo (Table of Symbols): Document
20888 YYSTACK_USE_ALLOCA.
20889
20890 2001-08-15 Akim Demaille <akim@epita.fr>
20891
20892 * missing: Update from CVS Automake.
20893 * config/config.guess, config/config.sub, config/texinfo.tex:
20894 Update from gnu.org.
20895
20896 2001-08-15 Akim Demaille <akim@epita.fr>
20897
20898 * Makefile.maint: Sync with CVS Autoconf.
20899
20900 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
20901
20902 * doc/bison.texinfo: Include GNU Free Documentation License from
20903 `fdl.texi'.
20904 * doc/fdl.texi: Add to package.
20905
20906 2001-08-14 Marc Autret <autret_m@epita.fr>
20907
20908 Turn on %{source,header}_extension features.
20909
20910 * src/lex.c (percent_table): Un-CPP out header_extension and
20911 source_extension.
20912 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
20913 (compute_exts_from_src): Remove conditions. It restores priorities
20914 between options.
20915
20916 2001-08-14 Marc Autret <autret_m@epita.fr>
20917
20918 * src/files.c (compute_base_names): Add extensions computing when
20919 `--file-prefix' used.
20920 Standardize function calls.
20921
20922 2001-08-13 Marc Autret <autret_m@epita.fr>
20923
20924 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
20925 defining it (defined but null disables alloca).
20926
20927 2001-08-13 Marc Autret <autret_m@epita.fr>
20928
20929 * src/bison.simple (_yy_memcpy): CPP reformat.
20930
20931 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
20932
20933 * tests/atconfig.in (CPPFLAGS): Fix.
20934
20935 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
20936
20937 * doc/bison.texinfo: Include GNU General Public License from
20938 `gpl.texi'.
20939 * doc/gpl.texi: Add to package.
20940
20941 2001-08-10 Marc Autret <autret_m@epita.fr>
20942
20943 * src/print_graph.h: Fix.
20944 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
20945
20946 2001-08-10 Akim Demaille <akim@epita.fr>
20947
20948 * src/system.h: Provide default declarations for stpcpy, strndup,
20949 and strnlen.
20950
20951 2001-08-10 Robert Anisko <anisko_r@epita.fr>
20952
20953 * doc/bison.texinfo (Locations): Update @$ stuff.
20954
20955 2001-08-09 Robert Anisko <anisko_r@epita.fr>
20956
20957 * src/bison.simple (YYLLOC_DEFAULT): Update.
20958 (yyparse): Adjust.
20959
20960 2001-08-08 Marc Autret <autret_m@epita.fr>
20961
20962 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
20963 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
20964 Reported by Fabrice Bauzac.
20965
20966 2001-08-08 Marc Autret <autret_m@epita.fr>
20967
20968 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
20969 * src/vcg.c (output_node): Fix.
20970 * src/vcg.h: Cleanup.
20971 * src/print_graph.c: Add comments.
20972 (node_output_size): New global variable. Simplify the formatting of
20973 the VCG graph output.
20974 (print_actions): Unused code is now used. It notifies the final state
20975 and no action states in the VCG graph. It also give the reduce actions.
20976 The `shift and goto' edges are red and the `go to state' edges are
20977 blue.
20978 Get the current node name and node_obstack by argument.
20979 (node_obstack): New variable.
20980 (print_state): Manage node_obstack.
20981 (print_core): Use node_obstack given by argument.
20982 A node is not only computed here but in print_actions also.
20983 (print_graph): CPP out useless code instead of commenting it.
20984
20985 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
20986
20987 * tests/atconfig.in (CPPFLAGS): Fix.
20988
20989 2001-08-07 Akim Demaille <akim@epita.fr>
20990
20991 * src/print_graph.c (quote): New.
20992 (print_core): Use it.
20993
20994 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
20995
20996 * src/vcg.c (complain.h): Include it.
20997 Unepitaize `return' invocations.
20998 [NDEBUG] (main): Remove.
20999 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21000 * src/files.c (open_files): Initialize graph_obstack.
21001 * src/print_graph.c (print_actions): CPP out useless code.
21002 (print_core): Don't output the last `\n' in labels.
21003 Use `quote'.
21004 * src/files.c (output_files): Output the VCG file.
21005 * src/main.c (main): Invoke print_graph ();
21006
21007 2001-08-06 Marc Autret <autret_m@epita.fr>
21008
21009 Automaton VCG graph output.
21010 Using option ``-g'' or long option ``--graph'', you can generate
21011 a gram_filename.vcg file containing a VCG description of the LALR (1)
21012 automaton of your grammar.
21013
21014 * src/main.c: Call to print_graph() function.
21015 * src/getargs.h: Update.
21016 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21017 (graph_flag): New flag.
21018 (longopts): Update.
21019 (getargs): Add case `g'.
21020 * src/files.c (graph_obstack): New obstack struct.
21021 (open_files): Initialize new obstack.
21022 (output_files): Saves graph_obstack if required.
21023 * src/files.h (graph_obstack): New extern declaration.
21024 * src/Makefile.am: Add new source files.
21025
21026 2001-08-06 Marc Autret <autret_m@epita.fr>
21027
21028 * src/print_graph.c, src/print_graph.h (graph): New.
21029 * src/vcg.h: New file.
21030 * src/vcg.c: New file, VCG graph handling.
21031
21032 2001-08-06 Marc Autret <autret_m@epita.fr>
21033
21034 Add of %source_extension and %header_extension which specify
21035 the source or/and the header output file extension.
21036
21037 * src/files.c (compute_base_names): Remove initialisation of
21038 src_extension and header_extension.
21039 (compute_exts_from_gf): Update.
21040 (compute_exts_from_src): Update.
21041 (output_files): Update.
21042 * src/reader.c (parse_header_extension_decl): New.
21043 (parse_source_extension_decl): New.
21044 (read_declarations): New case statements for the new tokens.
21045 * src/lex.c (percent_table): Add entries for %source_extension
21046 and %header_extension.
21047 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21048
21049 2001-08-06 Marc Autret <autret_m@epita.fr>
21050
21051 * configure.in: Bump to 1.28c.
21052 * doc/bison.texinfo: Texinfo thingies.
21053
21054 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
21055
21056 * tests/atconfig.in (CPPFLAGS): Add.
21057 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21058
21059 2001-08-03 Akim Demaille <akim@epita.fr>
21060
21061 Version 1.28b.
21062
21063 2001-08-03 Akim Demaille <akim@epita.fr>
21064
21065 * tests/Makefile.am (check-local): Ship testsuite.
21066 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21067 Include `string.h'.
21068
21069 2001-08-03 Akim Demaille <akim@epita.fr>
21070
21071 * configure.in: Try using -Wformat when compiling.
21072
21073 2001-08-03 Akim Demaille <akim@epita.fr>
21074
21075 * configure.in: Bump to 1.28b.
21076
21077 2001-08-03 Akim Demaille <akim@epita.fr>
21078
21079 * src/complain.c: Adjust strerror_r portability issues.
21080
21081 2001-08-03 Akim Demaille <akim@epita.fr>
21082
21083 Version 1.28a.
21084
21085 2001-08-03 Akim Demaille <akim@epita.fr>
21086
21087 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21088 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21089 * src/getargs.c: Include complain.h.
21090 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21091 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21092
21093 2001-08-03 Akim Demaille <akim@epita.fr>
21094
21095 * src/reader.c (readgram): Display hidden chars in error messages.
21096
21097 2001-08-03 Akim Demaille <akim@epita.fr>
21098
21099 Update to gettext 0.10.39.
21100
21101 2001-08-03 Akim Demaille <akim@epita.fr>
21102
21103 * lib/strspn.c: New.
21104
21105 2001-08-01 Marc Autret <autret_m@epita.fr>
21106
21107 * doc/bison.texinfo: Update.
21108 * doc/bison.1 (mandoc): Update.
21109 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21110 * src/files.c: Support output files extensions computing.
21111 (src_extension): New static variable.
21112 (header_extension): New static variable.
21113 (tr): New function.
21114 (get_extension_index): New function, gets the index of an extension
21115 filename in a string.
21116 (compute_exts_from_gf): New function, computes extensions from the
21117 grammar file extension.
21118 (compute_exts_from_src): New functions, computes extensions from the
21119 C source file extension, file given by ``-o'' option.
21120 (compute_base_names): Update.
21121 (output_files): Update.
21122
21123 2001-08-01 Robert Anisko <anisko_r@epita.fr>
21124
21125 * doc/bison.texi: Document @$.
21126 (Locations): New section.
21127
21128 2001-07-18 Akim Demaille <akim@epita.fr>
21129
21130 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21131 * config/prev-version.txt, config/move-if-change: New.
21132 * Makefile.am: Adjust.
21133
21134 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
21135
21136 * src/bison.simple (yyparse): Suppress warning `comparaison
21137 between signed and unsigned'.
21138
21139 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
21140
21141 * src/getargs.h (raw_flag): Remove.
21142 * src/getargs.c: Die on `-r'/`--raw'.
21143 * src/lex.c (parse_percent_token): Die on `%raw'.
21144 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21145 * tests/calc.at: Suppress test with option `--raw'.
21146
21147 2001-07-14 Akim Demaille <akim@epita.fr>
21148
21149 * config/: New.
21150 * configure.in: Require Autoconf 2.50.
21151 Update to gettext 0.10.38.
21152
21153 2001-03-16 Akim Demaille <akim@epita.fr>
21154
21155 * doc/bison.texinfo: ANSIfy the examples.
21156
21157 2001-03-16 Akim Demaille <akim@epita.fr>
21158
21159 * getargs.c (skeleton): New variable.
21160 (longopts): --skeleton is a new option.
21161 (shortopts, getargs): -S is a new option.
21162 * getargs.h: Declare skeleton.
21163 * output.c (output_parser): Use it.
21164
21165 2001-03-16 Akim Demaille <akim@epita.fr>
21166
21167 * m4/strerror_r.m4: New.
21168 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21169 * lib/error.h, lib/error.c: Update.
21170
21171 2001-03-16 Akim Demaille <akim@epita.fr>
21172
21173 * src/getargs.c (longopts): Clean up.
21174
21175 2001-02-21 Akim Demaille <akim@epita.fr>
21176
21177 * src/reader.c (gensym): `gensym_count' is your own.
21178 Use a static buf to create the symbol name, as token_buffer is no
21179 longer a buffer.
21180
21181 2001-02-08 Akim Demaille <akim@epita.fr>
21182
21183 * src/conflicts.c (conflict_report): Be sure not to append to res
21184 between two calls, which could happen if both first sprintf were
21185 skipped, but not the first cp += strlen.
21186
21187 2001-02-08 Akim Demaille <akim@epita.fr>
21188
21189 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21190 New, from fileutils 4.0.37.
21191 * configure.in: Require Autoconf 2.49c. I took some time before
21192 making this decision. This is the only way out for portability
21193 issues in Bison, it would mean way too much duplicate effort to
21194 import in Bison features implemented in 2.49c since 2.13.
21195 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21196
21197 2001-02-02 Akim Demaille <akim@epita.fr>
21198
21199 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
21200 * lib/xalloc.h, lib/xmalloc.c: Update.
21201
21202 2001-01-19 Akim Demaille <akim@epita.fr>
21203
21204 Get rid of the ad hoc handling of token_buffer in the scanner: use
21205 the obstacks.
21206
21207 * src/lex.c (token_obstack): New.
21208 (init_lex): Initialize it. No longer call...
21209 (grow_token_buffer): this. Remove it.
21210 Adjust all the places which used it to use the obstack.
21211
21212 2001-01-19 Akim Demaille <akim@epita.fr>
21213
21214 * src/lex.h: Rename all the tokens:
21215 s/\bENDFILE\b/tok_eof/g;
21216 s/\bIDENTIFIER\b/tok_identifier/g;
21217 etc.
21218 Let them be enums, not #define, to ease debugging.
21219 Adjust all the code.
21220
21221 2001-01-18 Akim Demaille <akim@epita.fr>
21222
21223 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21224 * src/lex.c (maxtoken, grow_token_buffer): Static.
21225
21226 2001-01-18 Akim Demaille <akim@epita.fr>
21227
21228 Since we now use obstacks, more % directives can be enabled.
21229
21230 * src/lex.c (percent_table): Also accept `%yacc',
21231 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21232 `%debug'.
21233 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21234 instead of returning a token.
21235 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21236 * src/reader.c (read_declarations): Adjust.
21237 * src/files.c (open_files): Don't call `compute_base_names', don't
21238 compute `attrsfile' since they depend upon data which might be
21239 *in* the input file now.
21240 (output_files): Do it here.
21241 * src/output.c (output_headers): Document the fact that this patch
21242 introduces a guaranteed SEGV for semantic parsers.
21243 * doc/bison.texinfo: Document them.
21244 * tests/suite.at: Exercise these %options.
21245
21246 2000-12-20 Akim Demaille <akim@epita.fr>
21247
21248 Also handle the output file (--verbose) with obstacks.
21249
21250 * files.c (foutput): Remove.
21251 (output_obstack): New.
21252 Adjust all dependencies.
21253 * src/conflicts.c: Return a string.
21254 * src/system.h (obstack_grow_string): Rename as...
21255 (obstack_sgrow): this. Be ready to work with non literals.
21256 (obstack_fgrow4): New.
21257
21258 2000-12-20 Akim Demaille <akim@epita.fr>
21259
21260 * src/files.c (open_files): Fix the computation of short_base_name
21261 in the case of `-o foo.tab.c'.
21262
21263 2000-12-20 Akim Demaille <akim@epita.fr>
21264
21265 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21266 (copy_dollar): Now that everything uses obstacks, get rid of the
21267 FILE * parameters.
21268
21269 2000-12-20 Akim Demaille <akim@epita.fr>
21270
21271 * src/files.c (open_files): Actually the `.output' file is based
21272 on the short_base_name, not base_name.
21273 * tests/suite.at (Checking output file names): Adjust.
21274
21275 2000-12-20 Akim Demaille <akim@epita.fr>
21276
21277 * src/bison.s1: Remove, we now use directly...
21278 * src/bison.simple: this.
21279 * src/Makefile.am: Use pkgdata instead of data.
21280
21281 2000-12-20 Akim Demaille <akim@epita.fr>
21282
21283 * src/files.c (guard_obstack): New.
21284 (open_files): Initialize it.
21285 (output_files): Dump it...
21286 * src/files.h: Export it.
21287 * src/reader.c (copy_guard): Use it.
21288
21289 2000-12-19 Akim Demaille <akim@epita.fr>
21290
21291 * src/files.c (outfile, defsfile, actfile): Removed as global
21292 vars.
21293 (open_files): Don't compute them.
21294 (output_files): Adjust.
21295 (base_name, short_base_name): Be global.
21296 Adjust dependencies.
21297
21298 2000-12-19 Akim Demaille <akim@epita.fr>
21299
21300 * src/files.c (strsuffix): New.
21301 (stringappend): Be just like strcat but allocate.
21302 (base_names): Eve out from open_files.
21303 Try to simplify the rather hairy computation of base_name and
21304 short_base_name.
21305 (open_files): Use it.
21306 * tests/suite.at (Checking output file names): New test.
21307
21308 2000-12-19 Akim Demaille <akim@epita.fr>
21309
21310 * src/system.h (obstack_grow_literal_string): Rename as...
21311 (obstack_grow_string): this.
21312 * src/output.c (output_parser): Recognize `%% actions' instead of
21313 `$'.
21314 * src/bison.s1: s/$/%% actions/.
21315 * src/bison.hairy: Likewise.
21316
21317 2000-12-19 Akim Demaille <akim@epita.fr>
21318
21319 * src/output.c (output_parser): Compute the `#line' lines when
21320 there are.
21321 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21322 Suggested by Hans Aberg.
21323
21324 2000-12-19 Akim Demaille <akim@epita.fr>
21325
21326 Let the handling of the skeleton files be local to the procedures
21327 that use it.
21328
21329 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21330 longer static.
21331 (fparser, open_extra_files): Remove.
21332 (open_files, output_files): Don't take care of fparser.
21333 * src/files.h: Adjust.
21334 * src/output.c (output_parser): Open and close the file to the
21335 skeleton.
21336 * src/reader.c (read_declarations): When %semantic_parser, open
21337 fguard.
21338
21339 2000-12-19 Akim Demaille <akim@epita.fr>
21340
21341 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21342 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21343
21344 2000-12-19 Akim Demaille <akim@epita.fr>
21345
21346 * src/files.c (open_files): Yipee! We no longer need all the code
21347 looking for `/tmp' since we have no tmp file.
21348
21349 2000-12-19 Akim Demaille <akim@epita.fr>
21350
21351 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21352 New macros.
21353 * src/files.c (open_files): Less dependency on MSDOS etc.
21354
21355 2000-12-14 Akim Demaille <akim@epita.fr>
21356
21357 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21358 Provide a default definition.
21359 Use it when executing the default @ action.
21360 * src/reader.c (reader_output_yylsp): No longer include
21361 `timestamp' and `text' in the default YYLTYPE.
21362
21363 2000-12-12 Akim Demaille <akim@epita.fr>
21364
21365 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21366 (copy_guard): Quote the file names.
21367 Reported by Laurent Mascherpa.
21368
21369 2000-12-12 Akim Demaille <akim@epita.fr>
21370
21371 * src/output.c (output_headers, output_program, output): Be sure
21372 to escape special characters when outputting filenames.
21373 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21374 (output_headers): Don't depend on them, Use ACTSTR.
21375
21376 2000-11-17 Akim Demaille <akim@epita.fr>
21377
21378 * lib/obstack.h: Formatting changes.
21379 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21380 prevents type checking.
21381 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21382 cast the value to (void *): assigning a `foo *' to a `void *'
21383 variable is valid.
21384 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21385 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21386 append characters.
21387
21388 2000-11-17 Akim Demaille <akim@epita.fr>
21389
21390 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21391 as...
21392 (suite.m4, regression.m4, calc.m4): these.
21393 * tests/atgeneral.m4: Update from CVS Autoconf.
21394
21395 2000-11-17 Akim Demaille <akim@epita.fr>
21396
21397 * tests/regression.m4 (%union and --defines): New test,
21398 demonstrating a current bug in the obstack implementation.
21399
21400 2000-11-17 Akim Demaille <akim@epita.fr>
21401
21402 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21403 macros.
21404 Use them to declare the variables which are global or local to
21405 `yyparse'.
21406
21407 2000-11-17 Akim Demaille <akim@epita.fr>
21408
21409 * acconfig.h: Remove, no longer used.
21410
21411 2000-11-07 Akim Demaille <akim@epita.fr>
21412
21413 * src: s/Copyright (C)/Copyright/g.
21414
21415 2000-11-07 Akim Demaille <akim@epita.fr>
21416
21417 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21418 defining.
21419 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21420
21421 2000-11-07 Akim Demaille <akim@epita.fr>
21422
21423 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21424 Merge in a single CPP if/else.
21425
21426 2000-11-07 Akim Demaille <akim@epita.fr>
21427
21428 * src/output.c (output): Remove useless variables.
21429 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21430 argument `data' for consistency with the prototypes.
21431 Qualify it `const'.
21432 (obstack_copy, obstack_copy0): Rename the second argument as
21433 `address' for consistency. Qualify it `const'.
21434 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21435 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21436 `const' their input argument (`data' or `address').
21437 Adjust the corresponding macros to include `const' in casts.
21438
21439 2000-11-03 Akim Demaille <akim@epita.fr>
21440
21441 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21442 s/PFILE1/BISON_HAIRY/.
21443 Adjust dependencies.
21444
21445 2000-11-03 Akim Demaille <akim@epita.fr>
21446
21447 For some reason, this was not applied.
21448
21449 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21450 `unlink': it's no longer used.
21451
21452 2000-11-03 Akim Demaille <akim@epita.fr>
21453
21454 * src/files.c (skeleton_find): New function, eved out of...
21455 (open_files, open_extra_files): here.
21456
21457 2000-11-03 Akim Demaille <akim@epita.fr>
21458
21459 Don't use `atexit'.
21460
21461 * src/files.c (obstack_save): New function.
21462 (done): Rename as...
21463 (output_files): this.
21464 Use `obstack_save'.
21465 * src/main.c (main): Don't use `atexit' to register `done', since
21466 it no longer has to remove tmp files, just call `output_files'
21467 when there are no errors.
21468
21469 2000-11-02 Akim Demaille <akim@epita.fr>
21470
21471 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21472 `unlink': it's no longer used.
21473 * src/files.h: Formatting changes.
21474
21475 2000-11-02 Akim Demaille <akim@epita.fr>
21476
21477 Remove the last uses of mktemp and unlink/delete.
21478
21479 * src/files.c (fdefines, ftable): Removed.
21480 (defines_ostack, table_obstack): New.
21481 Adjust dependencies of the former into uses of the latter.
21482 * src/output.c (output_short_or_char_table, output_short_table):
21483 Convert to using obstacks.
21484 * src/reader.c (copy_comment2): Accept one FILE * and two
21485 obstacks.
21486 (output_token_defines, reader_output_yylsp): Use obstacks.
21487 * src/system.h (obstack_fgrow3): New.
21488 * po/POTFILES.in: Adjust.
21489
21490 2000-11-01 Akim Demaille <akim@epita.fr>
21491
21492 Change each use of `fattrs' into a use of `attrs_obstack'.
21493
21494 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21495 * src/files.c (fattrs): Remove.
21496 (attrs_obstack): New.
21497 Adjust all dependencies.
21498 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21499
21500 2000-11-01 Akim Demaille <akim@epita.fr>
21501
21502 Introduce obstacks.
21503 Change each use of `faction' into a use of `action_obstack'.
21504
21505 * lib/obstack.h, lib/obstack.c: New files.
21506 * src/files.c (faction): Remove.
21507 (action_obstack): New.
21508 Adjust all dependencies.
21509
21510 2000-10-20 Akim Demaille <akim@epita.fr>
21511
21512 * lib/quote.h (PARAMS): New macro. Use it.
21513
21514 2000-10-16 Akim Demaille <akim@epita.fr>
21515
21516 * src/output.c (output_short_or_char_table): New function.
21517 (output_short_table, output_token_translations): Use it.
21518 (goto_actions): Use output_short_table.
21519
21520 2000-10-16 Akim Demaille <akim@epita.fr>
21521
21522 * src/symtab.c (bucket_new): New function.
21523 (getsym): Use it.
21524
21525 * src/output.c (output_short_table): New argument to display the
21526 comment associated with the table.
21527 Adjust dependencies.
21528 (output_gram): Use it.
21529 (output_rule_data): Nicer output layout for YYTNAME.
21530
21531 2000-10-16 Akim Demaille <akim@epita.fr>
21532
21533 * src/lex.c (read_typename): New function.
21534 (lex): Use it.
21535 * src/reader.c (copy_dollar): Likewise.
21536
21537 2000-10-16 Akim Demaille <akim@epita.fr>
21538
21539 * src/reader.c (copy_comment2): Expect the input stream to be on
21540 the `/' which is suspected to open a comment, instead of being
21541 called after `//' or `/*' was read.
21542 (copy_comment, copy_definition, parse_union_decl, copy_action)
21543 (copy_guard): Adjust.
21544
21545 2000-10-16 Akim Demaille <akim@epita.fr>
21546
21547 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21548 `read_signed_integer'.
21549
21550 2000-10-16 Akim Demaille <akim@epita.fr>
21551
21552 * src/reader.c (copy_dollar): New function.
21553 (copy_guard, copy_action): Use it.
21554
21555 2000-10-16 Akim Demaille <akim@epita.fr>
21556
21557 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21558 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21559 New files, from Fileutils 4.0.27.
21560 * src/main.c (printable_version): Remove.
21561 * src/lex.c, src/reader.c: Use `quote'.
21562
21563 2000-10-04 Akim Demaille <akim@epita.fr>
21564
21565 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21566
21567 2000-10-04 Akim Demaille <akim@epita.fr>
21568
21569 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21570
21571 2000-10-04 Akim Demaille <akim@epita.fr>
21572
21573 When a literal string is used to define two different tokens,
21574 `bison -v' segfaults.
21575 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21576
21577 * tests/regression.m4: New file.
21578 Include the core of the sample provided by Piotr Gackiewicz.
21579 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21580 properly.
21581
21582 2000-10-04 Akim Demaille <akim@epita.fr>
21583
21584 * src/reader.c (parse_expect_decl): Keep `count' within the size
21585 of `buffer'.
21586 From Neil Booth.
21587
21588 2000-10-02 Paul Eggert <eggert@twinsun.com>
21589
21590 * bison.s1 (yyparse): Assign the default value
21591 unconditionally, to avoid a GCC warning and make the parser a
21592 tad smaller.
21593
21594 2000-10-02 Akim Demaille <akim@epita.fr>
21595
21596 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21597 options.
21598
21599 2000-10-02 Akim Demaille <akim@epita.fr>
21600
21601 * src/derives.c, src/print.c, src/reduce.c: To ease the
21602 translation, move some `\n' out of the translated strings.
21603
21604 2000-10-02 Akim Demaille <akim@epita.fr>
21605
21606 The location tracking mechanism is precious for parse error
21607 messages. Nevertheless, it is enabled only when `@n' is used in
21608 the grammar, which is a different issue (you can use it in error
21609 message, but not in the grammar per se). Therefore, there should
21610 be another means to enable it.
21611
21612 * src/getargs.c (getargs): Support `--locations'.
21613 (usage): Report it.
21614 * src/getargs.h (locationsflag): Export it.
21615 * src/lex.c (percent_table): Support `%locations'.
21616 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21617 with `locationsflag'.
21618 * doc/bison.texinfo: Document `--locations' and `%locations'.
21619 Sort the options.
21620 * tests/calc.m4: Test it.
21621
21622 For regularity of the names, replace each
21623 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21624 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21625 In addition replace each `flag' with `_flag'.
21626
21627 2000-10-02 Akim Demaille <akim@epita.fr>
21628
21629 Also test parse error messages, including with YYERROR_VERBOSE.
21630
21631 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21632 associative).
21633 Use it to check the computations.
21634 Use it to check `nonassoc' is honored.
21635 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21636 `--yyerror-verbose'.
21637 (_AT_CHECK_CALC): Adjust to this option.
21638 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21639
21640 2000-10-02 Akim Demaille <akim@epita.fr>
21641
21642 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21643 the latter demonstrates a flaw in the handling of non debugging
21644 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21645 was used in order to simplify:
21646
21647 #if YYDEBUG
21648 if (yydebug)
21649 {
21650 ...
21651 }
21652 #endif
21653
21654 into
21655
21656 if (yydebug)
21657 {
21658 ...
21659 }
21660
21661 unfortunately this leads to a CPP conflict when
21662 `--name-prefix=foo' is used since it produces `#define yydebug
21663 foodebug'.
21664
21665 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21666 (YYDPRINTF): New macro.
21667 Spread its use.
21668 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21669 the bison options.
21670 Also test `--verbose', `--defines' and `--name-prefix'.
21671
21672 2000-10-02 Akim Demaille <akim@epita.fr>
21673
21674 Improve the readability of the produced parsers.
21675
21676 * src/bison.s1: Formatting changes.
21677 Improve the comment related to the `$' mark.
21678 (yydefault): Don't fall through to `yyresume': `goto' there.
21679 * src/output.c (output_parser): When the `$' is met, skip the end
21680 of its line.
21681 New variable, `number_of_dollar_signs', to check there's exactly
21682 one `$' in the parser skeleton.
21683
21684 2000-10-02 Akim Demaille <akim@epita.fr>
21685
21686 * lib/xstrdup.c: New file, from the fileutils.
21687 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21688 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21689 instead of strlen + xmalloc + strcpy.
21690 * src/symtab.c (copys): Remove, use xstrdup instead.
21691
21692 2000-10-02 Akim Demaille <akim@epita.fr>
21693
21694 * src/gram.h (associativity): New enum type which replaces the
21695 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21696 `right_assoc', `left_assoc' and `non_assoc'.
21697 Adjust all dependencies.
21698 * src/reader.c: Formatting changes.
21699 (LTYPESTR): Don't define it, use it as a literal in
21700 `reader_output_yylsp'.
21701 * src/symtab.h (symbol_class): New enum type which replaces the
21702 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21703 `sunknown', `stoken and `snterm'.
21704
21705 2000-10-02 Akim Demaille <akim@epita.fr>
21706
21707 * src/getargs.c (fixed_outfiles): Rename as...
21708 (yaccflag): for consistency and accuracy.
21709 Adjust dependencies.
21710
21711 2000-10-02 Akim Demaille <akim@epita.fr>
21712
21713 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21714 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21715 difficult and introduced a lot of core dump. It turns out that
21716 Bison used an implementation of `xmalloc' based on `calloc', and
21717 at various places it does depend upon the initialization to 0. I
21718 have not tried to isolate the pertinent places, and all the former
21719 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21720 someone should address this issue.
21721
21722 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21723 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21724 files.
21725 Adjust dependencies.
21726 * src/warshall.h: New file.
21727 Propagate.
21728
21729 2000-10-02 Akim Demaille <akim@epita.fr>
21730
21731 Various anti-`extern in *.c' changes.
21732
21733 * src/system.h: Include `assert.h'.
21734
21735 2000-10-02 Akim Demaille <akim@epita.fr>
21736
21737 * src/state.h (nstates, final_state, first_state, first_shift)
21738 (first_reduction): Move their exportation from here...
21739 * src/LR0.h: to here.
21740 Adjust dependencies.
21741 * src/getargs.c (statisticsflag): New variable.
21742 Add support for `--statistics'.
21743 Adjust dependencies.
21744
21745 Remove a lot of now useless `extern' statements in most files.
21746
21747 2000-10-02 Akim Demaille <akim@epita.fr>
21748
21749 * src/LR0.h: New file.
21750 Propagate its use.
21751
21752 2000-10-02 Akim Demaille <akim@epita.fr>
21753
21754 * src/print.h: New file.
21755 Propagate its use.
21756 * src/print.c: Formatting and ordering changes.
21757 (verbose, terse): Replace with...
21758 (print_results): this new function.
21759 Adjust dependencies.
21760
21761 2000-10-02 Akim Demaille <akim@epita.fr>
21762
21763 * src/conflicts.c (conflict_report): New function.
21764 (conflict_log, verbose_conflict_log): Replace with...
21765 (print_conflicts): this function.
21766 Adjust dependencies.
21767 * src/conflicts.h: New file.
21768 Propagate its inclusion.
21769
21770 2000-10-02 Akim Demaille <akim@epita.fr>
21771
21772 * src/nullable.h: New file.
21773 Propagate its inclusion.
21774 * src/nullable.c: Formatting changes.
21775
21776 2000-10-02 Akim Demaille <akim@epita.fr>
21777
21778 * src/reduce.h: New file.
21779 Propagate its inclusion.
21780 * src/reduce.c: Topological sort and other formatting changes.
21781 (bool, TRUE, FALSE): Move their definition to...
21782 * src/system.h: here.
21783
21784 2000-10-02 Akim Demaille <akim@epita.fr>
21785
21786 * src/files.c: Formatting changes.
21787 (tryopen, tryclose, openfiles): Rename as...
21788 (xfopen, xfclose, open_files): this.
21789 (stringappend): static.
21790 * src/files.h: Complete the list of exported symbols.
21791 Propagate its use.
21792
21793 2000-10-02 Akim Demaille <akim@epita.fr>
21794
21795 * src/reader.h: New file.
21796 Propagate its use instead of tedious list of `extern' and
21797 prototypes.
21798 * src/reader.c: Formatting changes, topological sort,
21799 s/register//.
21800
21801 2000-10-02 Akim Demaille <akim@epita.fr>
21802
21803 * src/lex.h: Prototype `lex.c' exported functions.
21804 * src/reader.c: Adjust.
21805 * src/lex.c: Formatting changes.
21806 (safegetc): Rename as...
21807 (xgetc): this.
21808
21809 2000-10-02 Akim Demaille <akim@epita.fr>
21810
21811 * src/lalr.h: New file.
21812 Propagate its inclusion instead of prototypes and `extern'.
21813 * src/lalr.c: Formatting changes, topological sorting etc.
21814
21815 2000-10-02 Akim Demaille <akim@epita.fr>
21816
21817 * src/output.c (token_actions): Introduce a temporary array,
21818 YYDEFACT, that makes it possible for this function to use
21819 output_short_table.
21820
21821 2000-10-02 Akim Demaille <akim@epita.fr>
21822
21823 `user_toknums' is output as a `short[]' in `output.c', while it is
21824 defined as a `int[]' in `reader.c'. For consistency with the
21825 other output tables, `user_toknums' is now defined as a table of
21826 shorts.
21827
21828 * src/reader.c (user_toknums): Be a short table instead of an int
21829 table.
21830 Adjust dependencies.
21831
21832 Factor the short table outputs.
21833
21834 * src/output.c (output_short_table): New function.
21835 * src/output.c (output_gram, output_stos, output_rule_data)
21836 (output_base, output_table, output_check): Use it.
21837
21838 2000-10-02 Akim Demaille <akim@epita.fr>
21839
21840 * src/output.c (output): Topological sort of the functions, in
21841 order to get rid of the `static' prototypes.
21842 No longer use `register'.
21843 * src/output.h: New file.
21844 Propagate its inclusion in files explicitly prototyping functions
21845 from output.c.
21846
21847 2000-09-21 Akim Demaille <akim@epita.fr>
21848
21849 * src/atgeneral.m4: Update from Autoconf.
21850
21851 2000-09-21 Akim Demaille <akim@epita.fr>
21852
21853 * src/closure.h: New file.
21854 * src/closure.c: Formatting changes, topological sort over the
21855 functions, use of closure.h.
21856 (initialize_closure, finalize_closure): Rename as...
21857 (new_closure, free_closure): these. Adjust dependencies.
21858 * src/LR0.c: Formatting changes, topological sort, use of
21859 cloture.h.
21860 (initialize_states): Rename as...
21861 (new_states): this.
21862 * src/Makefile.am (noinst_HEADERS): Adjust.
21863
21864 2000-09-20 Akim Demaille <akim@epita.fr>
21865
21866 * src/acconfig.h: Don't protect config.h against multiple
21867 inclusion.
21868 Don't define PARAMS.
21869 * src/system.h: Define PARAMS.
21870 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
21871 purpose of config.h. system.h must not try to fix wrong
21872 definitions in config.h.
21873
21874 2000-09-20 Akim Demaille <akim@epita.fr>
21875
21876 * src/derives.h: New file.
21877 * src/main.c, src/derives.h: Use it.
21878 Formatting changes.
21879 * src/Makefile.am (noinst_HEADERS): Adjust.
21880
21881 2000-09-20 Akim Demaille <akim@epita.fr>
21882
21883 * tests/atgeneral.m4: Update from Autoconf.
21884 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
21885 (AT_CHECK_CALC): New macros.
21886 Use these macros to test bison with options `', `--raw',
21887 `--debug', `--yacc', `--yacc --debug'.
21888
21889 2000-09-19 Akim Demaille <akim@epita.fr>
21890
21891 * src/output.c: Formatting changes.
21892 * src/machine.h: Remove, leaving its contents in...
21893 * src/system.h: here.
21894 Include stdio.h.
21895 Adjust all dependencies on stdio.h and machine.h.
21896 * src/getargs.h: New file.
21897 Let all `extern' declarations about getargs.c be replaced with
21898 inclusion of `getargs.h'.
21899 * src/Makefile.am (noinst_HEADERS): Adjust.
21900
21901 * tests/calc.m4 (yyin): Be initialized in main, not on the global
21902 scope.
21903 (yyerror): Returns void, not int.
21904 * doc/bison.texinfo: Formatting changes.
21905
21906 2000-09-19 Akim Demaille <akim@epita.fr>
21907
21908 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
21909 portable.
21910
21911 2000-09-18 Akim Demaille <akim@epita.fr>
21912
21913 * configure.in: Append WARNING_CFLAGS to CFLAGS.
21914 * src/Makefile.am (INCLUDES): Don't.
21915 Be ready to fetch headers in lib/.
21916
21917 2000-09-18 Akim Demaille <akim@epita.fr>
21918
21919 * doc/bison.texinfo: Update the copyright.
21920 ANSIfy and GNUify the examples.
21921 Remove the old menu.
21922
21923 2000-09-18 Akim Demaille <akim@epita.fr>
21924
21925 First set of tests: use the `calc' example from the documentation.
21926
21927 * src/bison.s1 (yyparse): Condition the code using `yytname' which
21928 is defined only when YYDEBUG is.
21929 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
21930 * src/files.c (tryopen, tryclose): Formatting changes.
21931 Move to the top and be static.
21932 * src/reader.c (read_signed_integer): Likewise.
21933 * tests/calc.m4: New file.
21934 * Makefile.am, suite.m4: Adjust.
21935 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
21936
21937 2000-09-18 Akim Demaille <akim@epita.fr>
21938
21939 Add support for an Autotest test suite for Bison.
21940
21941 * m4/m4.m4, m4/atconfig.m4: New files.
21942 * m4/Makefile.am (EXTRA_DIST): Adjust.
21943 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
21944 files.
21945 * src/getargs.c: Display a more standard --version message.
21946 * src/reader.c (reader): Formatting changes.
21947 No longer depend upon VERSION_STRING.
21948 * configure.in: No longer use `dnl'.
21949 Set up the test suite and the new directory `tests/.
21950 (VERSION_STRING): Remove.
21951
21952 2000-04-14 Akim Demaille <akim@epita.fr>
21953
21954 * src/reader.c (copy_comment2): New function, same as former
21955 `copy_comment', but outputs into two FILE *.
21956 (copy_comment): Use it.
21957 (parse_union_decl): Use it.
21958 (get_type, parse_start_decl): Use the same `invalid' message.
21959 (parse_start_decl, parse_union_decl): Use the same `multiple'
21960 message.
21961 (parse_union_decl, copy_guard, copy_action): Use the same
21962 `unmatched' message.
21963 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
21964
21965 2000-03-31 Akim Demaille <akim@epita.fr>
21966
21967 * src/files.c (tryopen, tryclose): Move to the top.
21968 Be static.
21969
21970 2000-03-31 Akim Demaille <akim@epita.fr>
21971
21972 * src/main.c (main): Don't call `done', exit does it.
21973
21974 2000-03-31 Akim Demaille <akim@epita.fr>
21975
21976 * allocate.c: s/return (foo)/return foo/.
21977 * lalr.c: Likewise.
21978 * LR0.c: Likewise.
21979 * output.c: Likewise.
21980 * reader.c: Likewise.
21981 * symtab.c: Likewise.
21982 * vmsgetargs.c: Likewise.
21983
21984 2000-03-31 Akim Demaille <akim@epita.fr>
21985
21986 Clean up the error reporting functions.
21987
21988 * src/report.c: New file.
21989 * src/report.h: Likewise.
21990 * src/Makefile.am: Adjust.
21991 * m4/error.m4: New file.
21992 * m4/Makefile.am: Adjust.
21993 * configure.in (jm_PREREQ_ERROR): Call it.
21994 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
21995 Remove.
21996 (fatal, fatals): Remove. All callers use complain.c::fatal.
21997 (warn, warni, warns, warnss, warnss): Remove. All callers use
21998 complain.c::complain.
21999 (toomany): Remove, use fatal instead.
22000 * src/files.c (done): No argument, use complain_message_count.
22001 * src/main.c (main): Register `done' to `atexit'.
22002
22003 * src/getargs.c (usage): More `fputs', less `fprintf'.
22004
22005 2000-03-28 Akim Demaille <akim@epita.fr>
22006
22007 * lib/: New directory.
22008 * Makefile.am (SUBDIRS): Adjust.
22009 * configure.in: Adjust.
22010 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22011 useless.
22012 * src/alloca.c: Moved to lib/.
22013 * src/getopt.c: Likewise.
22014 * src/getopt1.c: Likewise.
22015 * src/getopt.h: Likewise.
22016 * src/ansi2knr.c: Likewise.
22017 * src/ansi2knr.1: Likewise.
22018 * src/Makefile.am: Adjust.
22019 * lib/Makefile.am: New file.
22020
22021 2000-03-28 Akim Demaille <akim@epita.fr>
22022
22023 * src/getargs.c (usage): Refresh the help message.
22024
22025 2000-03-17 Akim Demaille <akim@epita.fr>
22026
22027 * src/getopt1.c: Updated from textutils 2.0e
22028 * src/getopt.c: Likewise.
22029 * src/getopt.h: Likewise.
22030
22031 2000-03-17 Akim Demaille <akim@epita.fr>
22032
22033 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22034 the file name, not the whole `#line LINE FILE'.
22035
22036 2000-03-17 Akim Demaille <akim@epita.fr>
22037
22038 On syntax errors, report the token on which we choked.
22039
22040 * src/bison.s1 (yyparse): In the label yyerrlab, when
22041 YYERROR_VERBOSE, add yychar in msg.
22042
22043 2000-03-17 Akim Demaille <akim@epita.fr>
22044
22045 * src/reader.c (copy_at): New function.
22046 (copy_guard): Use it.
22047 (copy_action): Use it.
22048
22049 2000-03-17 Akim Demaille <akim@epita.fr>
22050
22051 Be kind to translators, save some useless translations.
22052
22053 * src/main.c (banner): New function.
22054 (fatal_banner): Use it.
22055 (warn_banner): Use it.
22056
22057 2000-03-17 Akim Demaille <akim@epita.fr>
22058
22059 * src/reader.c (copy_definition): Use copy_string and
22060 copy_comment. Removed now unused `match', `ended',
22061 `cplus_comment'.
22062 (copy_comment, copy_string): Moved, to be visible from
22063 copy_definition.
22064
22065 2000-03-17 Akim Demaille <akim@epita.fr>
22066
22067 * src/reader.c (copy_string): Declare `static inline'. No
22068 problems with inline, since it is checked by configure.
22069 (copy_comment): Likewise.
22070
22071 2000-03-17 Akim Demaille <akim@epita.fr>
22072
22073 * src/reader.c (packsymbols): Formatting changes.
22074
22075 2000-03-17 Akim Demaille <akim@epita.fr>
22076
22077 * src/reader.c (copy_comment): New function, factored out from:
22078 (copy_action): Use it. Removed now unused `match', `ended',
22079 `cplus_comment'.
22080 (copy_guard): Likewise.
22081
22082 2000-03-17 Akim Demaille <akim@epita.fr>
22083
22084 * src/reader.c (copy_string): New function, factored out from:
22085 (copy_action): Use it.
22086 (copy_guard): Likewise.
22087
22088 2000-03-17 Akim Demaille <akim@epita.fr>
22089
22090 Change the handling of @s so that they behave exactly like $s.
22091 There is now a pseudo variable @$ (readble and writable), location
22092 of the lhs of the rule (by default ranging from the location of
22093 the first symbol of the rhs, to the location of the last symbol,
22094 or, if the rhs is empty, YYLLOC).
22095
22096 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22097 yyval.
22098 (yyparse): When providing a default semantic action, provide a
22099 default location action.
22100 (after the $): No longer change `*YYLSP', just stack YYLOC the
22101 same way you stack YYVAL.
22102 * src/reader.c (read_declarations): Use warns.
22103 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22104 (copy_action, case '@'): Likewise.
22105 Use a standard error message, to save useless work from
22106 translators.
22107
22108 2000-03-17 Akim Demaille <akim@epita.fr>
22109
22110 * src/bison.s1: Formatting and cosmetics changes.
22111 * src/reader.c: Likewise.
22112 Update the Copyright notice.
22113
22114 2000-03-17 Akim Demaille <akim@epita.fr>
22115
22116 * src/bison.s1 (#line): All set to `#line' only, since the
22117 Makefile now handles them.
22118
22119 2000-03-16 Akim Demaille <akim@epita.fr>
22120
22121 * src/output.c (output_rule_data): Output the documentation of
22122 some of the tables.
22123 (Copyright notice): Update.
22124 Formatting changes.
22125
22126 2000-03-16 Akim Demaille <akim@epita.fr>
22127
22128 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22129 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22130 One `#if YYDEBUG' remains, since it uses variables which are
22131 defined only if `YYDEBUG != 0'.
22132
22133 2000-03-16 Akim Demaille <akim@epita.fr>
22134
22135 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22136 and related variables so that the similarities are highlighted.
22137
22138 2000-03-16 Akim Demaille <akim@epita.fr>
22139
22140 * src/bison.s1: Properly indent CPP directives.
22141
22142 2000-03-16 Akim Demaille <akim@epita.fr>
22143
22144 * src/bison.s1: Properly indent the `alloca' CPP section.
22145
22146 2000-03-16 Akim Demaille <akim@epita.fr>
22147
22148 Do not hard code values of directories in `configure.in'.
22149 Update the `configure' tool chain.
22150
22151 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22152 src/makefile.am.
22153 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22154 (AC_OUTPUT): Add m4/Makefile.
22155 Bump to bison 1.28a, 1.29 has never been released.
22156 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22157 handled via src/Makefile.am.
22158 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22159 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22160 autoheader.
22161 * Makefile.am (SUBDIRS): Add m4.
22162 (ACLOCAL_AM_FLAGS): New variable.
22163 (AUTOMAKE_OPTIONS): Add check-news.
22164 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22165 the proper line number and file name.
22166 (DEFS): Propagate the location of bison library files and of the
22167 locale files.
22168 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22169 builddir.
22170 * acinclude.m4: Remove, replaced by the directory m4.
22171 * m4/Makefile.am (EXTRA_DIST): New variable.
22172 * m4/gettext.m4: New file, from the fileutils.
22173 * m4/lcmessage.m4: Likewise
22174 * m4/progtest.m4: Likewise.
22175 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22176
22177 2000-03-10 Akim Demaille <akim@epita.fr>
22178
22179 * src/closure.c:
22180 Formatting changes of various comments.
22181 Respect the GNU coding standards at various places.
22182 Don't use `_()' when no translation is needed.
22183
22184 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22185
22186 * src/files.c:
22187 OS/2 honors TMPDIR environment variable.
22188
22189 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22190
22191 * doc/bison.texinfo: Tweaked spelling and grammar.
22192 Updated ISBN.
22193 Removed reference to price of printed copy.
22194 Mention BISON_SIMPLE and BISON_HAIRY.
22195
22196 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22197
22198 * configure.in, NEWS:
22199 Bison 1.29 released.
22200
22201 1999-10-27 Jesse Thilo <jthilo@gnu.org>
22202
22203 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22204 Added reference card.
22205
22206 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22207
22208 * po/ru.po: Added Russian translation.
22209
22210 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22211
22212 * configure.in: Added Russian translation.
22213
22214 1999-07-06 Jesse Thilo <jthilo@gnu.org>
22215
22216 * configure.in, NEWS, README:
22217 Released version 1.28.
22218
22219 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22220
22221 * src/system.h:
22222 Squashed redefinition warning on some systems.
22223
22224 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22225 Have configure build version string instead of relying on ANSI string
22226 concatentation.
22227
22228 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22229
22230 * po/POTFILES.in: Got rid of version.c.
22231
22232 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22233
22234 * acconfig.h, configure.in:
22235 Have configure build version string instead of relying on ANSI string
22236 concatentation.
22237
22238 1999-06-08 Jesse Thilo <jthilo@gnu.org>
22239
22240 * doc/bison.1:
22241 Dropped mention of `+' for long-named options.
22242
22243 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22244
22245 * src/files.c: Added <unistd.h> for unlink().
22246
22247 * src/Makefile.am, src/system.h:
22248 I18n fixes.
22249
22250 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22251
22252 * README: Added a FAQ list.
22253
22254 * configure.in, acconfig.h:
22255 I18n fixes.
22256
22257 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22258
22259 * doc/FAQ, doc/Makefile.am:
22260 Added a FAQ list.
22261
22262 1999-05-19 Jesse Thilo <jthilo@gnu.org>
22263
22264 * src/alloc.h, src/symtab.h, src/version.c:
22265 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22266
22267 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22268
22269 * src/.cvsignore, src/Makefile.am:
22270 Reorganized: sources in `src', documentation in `doc'.
22271
22272 * src/lex.c (literalchar):
22273 fixed the code for escaping double quotes (thanks
22274 Jonathan Czisny.)
22275
22276 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22277
22278 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22279 Adjusted paths to reflect directory reorganization.
22280
22281 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22282
22283 * doc/.cvsignore, doc/Makefile.am:
22284 Reorganized: sources in `src', documentation in `doc'.
22285
22286 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22287
22288 * configure.in:
22289 Updated AC_INIT file to reflect directory reorganization.
22290
22291 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22292 Reorganized: sources in `src', documentation in `doc'.
22293
22294 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22295
22296 * src/allocate.c:
22297 Don't declare calloc() and realloc() if not necessary.
22298
22299 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22300
22301 * configure.in, acconfig.h, acinclude.m4:
22302 Don't declare calloc() and realloc() if not necessary.
22303
22304 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22305
22306 * po/.cvsignore: Added i18n support.
22307
22308 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22309
22310 * acconfig.h, configure.in, Makefile.am:
22311 Added i18n support.
22312
22313 1999-03-22 Jesse Thilo <jthilo@gnu.org>
22314
22315 * src/bison.s1: Fixed #line numbers.
22316
22317 1999-03-15 Jesse Thilo <jthilo@gnu.org>
22318
22319 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22320 Added PO files from Translation Project.
22321
22322 1999-03-03 Jesse Thilo <jthilo@gnu.org>
22323
22324 * Makefile.am:
22325 Added support for non-ANSI compilers (ansi2knr).
22326
22327 1999-02-16 Jesse Thilo <jthilo@gnu.org>
22328
22329 * configure.in: Bumped version number to 1.27.
22330
22331 * Makefile.am:
22332 Added `bison.simple' to list of files removed by `make distclean'.
22333
22334 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22335
22336 * src/files.c, src/files.h:
22337 Defined locations of parser files in config.h instead of Makefile.
22338
22339 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22340
22341 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22342 Defined locations of parser files in config.h instead of Makefile.
22343
22344 1999-02-09 Jesse Thilo <jthilo@gnu.org>
22345
22346 * Makefile.am:
22347 Removed inappropriate use of $< macro.
22348
22349 1999-02-05 Jesse Thilo <jthilo@gnu.org>
22350
22351 * po/Makefile.in.in, po/POTFILES.in:
22352 Add `po' directory skeleton.
22353
22354 1999-01-27 Jesse Thilo <jthilo@gnu.org>
22355
22356 * README: Document help-bison list.
22357
22358 * configure.in: Add check for mkstemp().
22359
22360 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22361
22362 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22363 Hush a few compiler warnings.
22364
22365 * src/files.c:
22366 Add tryclose(), which verifies that fclose was successful.
22367 Hush a couple of compiler warnings.
22368
22369 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22370
22371 * Makefile.am, OChangeLog:
22372 ChangeLog is now automatically generated. Include the old version as
22373 OChangeLog.
22374
22375 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22376
22377 * 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:
22378 Update FSF address.
22379
22380 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22381
22382 * doc/bison.texinfo: Fix formatting glitch.
22383
22384 * doc/bison.texinfo: Update FSF address.
22385
22386 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22387
22388 * acconfig.h: Update FSF address.
22389
22390 1999-01-08 Jesse Thilo <jthilo@gnu.org>
22391
22392 * src/system.h:
22393 Don't define PACKAGE here, since config.h defines it.
22394
22395 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22396
22397 * src/reader.c: Update copyright date.
22398
22399 * src/main.c:
22400 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22401 favor of output directly to stderr (avoids buffer overruns).
22402
22403 * src/reader.c: Some checks for premature EOF.
22404
22405 * 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:
22406 Use prototypes if the compiler understands them.
22407
22408 * src/files.c: Honor TMPDIR on Unix hosts.
22409 Use prototypes if the compiler understands them.
22410
22411 * src/reader.c:
22412 Fix a couple of buffer overrun bugs.
22413 Use prototypes if the compiler understands them.
22414
22415 * src/system.h: Include unistd.h and ctype.h.
22416 Use #ifdef instead of #if for NLS symbols.
22417
22418 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22419
22420 * doc/bison.texinfo:
22421 Delete comment "consider using @set for edition number, etc..." since
22422 we now are doing so.
22423
22424 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22425
22426 * configure.in:
22427 Use prototypes if the compiler understands them.
22428
22429 * NEWS: Document 1.26 highlights.
22430
22431 * Makefile.am: Require Automake 1.3 or later.
22432
22433 * acconfig.h:
22434 Use prototypes if the compiler understands them.
22435
22436 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22437
22438 * src/version.c:
22439 Use VERSION symbol from automake for version number.
22440
22441 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22442
22443 * acconfig.h, configure.in, version.cin:
22444 Use VERSION symbol from automake for version number.
22445
22446 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22447
22448 * Makefile.am:
22449 Distribute original version of simple parser (bison.s1), not built
22450 version (bison.simple).
22451
22452 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22453
22454 * doc/bison.texinfo: Add info dir entry.
22455
22456 * doc/bison.texinfo:
22457 Let automake put version number into documentation.
22458
22459 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22460
22461 * src/bison.cld, src/build.com, src/vmshlp.mar:
22462 Add non-RCS files from /gd/gnu/bison.
22463
22464 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22465
22466 * doc/bison.1:
22467 Document the BISON_HAIRY and BISON_SIMPLE variables.
22468
22469 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22470
22471 * src/version.c: Build version.c automatically.
22472
22473 * src/reader.c:
22474 Fix token numbering (used to start at 258, not 257).
22475
22476 * src/system.h: Include config.h.
22477
22478 * src/getargs.c: Update bug report address.
22479
22480 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22481 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22482
22483 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22484
22485 * Makefile.am:
22486 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22487
22488 * configure.in, version.cin:
22489 Build version.c automatically.
22490
22491 * AUTHORS: Add AUTHORS file.
22492
22493 * README: Update bug report address.
22494
22495 * bison.simple:
22496 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22497
22498 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22499 Add automake stuff.
22500
22501 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22502
22503 * doc/bison.texinfo: Clean up some formatting.
22504
22505 1998-05-05 Richard Stallman <rms@gnu.org>
22506
22507 * doc/bison.texinfo:
22508 Explain better why to make a pure parser.
22509
22510 1998-01-05 Richard Stallman <rms@gnu.org>
22511
22512 * src/files.c (openfiles):
22513 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22514 find a temporary directory, if possible. Do not unlink files while
22515 they are open.
22516
22517 1997-08-25 Richard Stallman <rms@gnu.org>
22518
22519 * src/reader.c (stack_offset;):
22520 Change some warni to warns.
22521
22522 * src/lex.c (literalchar): Use warns, not warni.
22523
22524 1997-06-28 Richard Stallman <rms@gnu.org>
22525
22526 * src/bison.s1: Add a Bison version comment.
22527
22528 * src/main.c (fatal, warn, berror):
22529 Use program_name.
22530
22531 1997-06-28 Richard Stallman <rms@gnu.org>
22532
22533 * Makefile.in (bison_version): New variable.
22534 (dist): Use that variable.
22535 (bison.s1): Substitute the Bison version into bison.simple.
22536
22537 * bison.simple: Add a Bison version comment.
22538
22539 1997-06-18 Richard Stallman <rms@gnu.org>
22540
22541 * src/main.c (fatal, warn, berror):
22542 Make error messages standard.
22543 (toomany): Improve error message text.
22544
22545 * 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:
22546 new.h renamed to alloc.h.
22547
22548 1997-06-18 Richard Stallman <rms@gnu.org>
22549
22550 * Makefile.in: new.h renamed to alloc.h.
22551
22552 1997-05-24 Richard Stallman <rms@gnu.org>
22553
22554 * src/lex.c (literalchar):
22555 Fix the code for escaping \, " and '.
22556
22557 (lex): Avoid trouble when there are many chars
22558 to discard in a char literal with just several chars in it.
22559
22560 1997-05-17 Richard Stallman <rms@gnu.org>
22561
22562 * src/bison.s1:
22563 Use malloc, if using alloca is troublesome.
22564 (YYSTACK_USE_ALLOCA): New flag macro.
22565 Define it for some systems and compilers.
22566 (YYSTACK_ALLOC): New macro.
22567 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22568 If it was malloc'd, free it.
22569
22570 1997-05-17 Richard Stallman <rms@gnu.org>
22571
22572 * bison.simple:
22573 Use malloc, if using alloca is troublesome.
22574 (YYSTACK_USE_ALLOCA): New flag macro.
22575 Define it for some systems and compilers.
22576 (YYSTACK_ALLOC): New macro.
22577 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22578 If it was malloc'd, free it.
22579
22580 1997-04-23 Richard Stallman <rms@gnu.org>
22581
22582 * src/bison.s1:
22583 (alloca) [__hpux]: Always define as __builtin_alloca.
22584
22585 1997-04-23 Richard Stallman <rms@gnu.org>
22586
22587 * bison.simple:
22588 (alloca) [__hpux]: Always define as __builtin_alloca.
22589
22590 1997-04-22 Richard Stallman <rms@gnu.org>
22591
22592 * src/bison.s1:
22593 [__hpux]: Include alloca.h (right for HPUX 10)
22594 instead of declaring alloca (right for HPUX 9).
22595
22596 * src/bison.s1 (__yy_memcpy):
22597 Declare arg `count' as unsigned int.
22598 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22599
22600 1997-04-22 Richard Stallman <rms@gnu.org>
22601
22602 * bison.simple:
22603 [__hpux]: Include alloca.h (right for HPUX 10)
22604 instead of declaring alloca (right for HPUX 9).
22605
22606 * bison.simple (__yy_memcpy):
22607 Declare arg `count' as unsigned int.
22608 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22609
22610 1997-01-03 Richard Stallman <rms@gnu.org>
22611
22612 * src/allocate.c: [__STDC__ or _MSC_VER]:
22613 Declare calloc and realloc to return void *.
22614
22615 1997-01-02 Richard Stallman <rms@gnu.org>
22616
22617 * src/system.h:
22618 [_MSC_VER]: Include stdlib.h and process.h.
22619 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22620
22621 * src/main.c (main): Return FAILURE as a value.
22622 (printable_version): Declare arg as int, not char.
22623
22624 1997-01-02 Richard Stallman <rms@gnu.org>
22625
22626 * Makefile.in (dist):
22627 Explicitly check for symlinks, and copy them.
22628
22629 1996-12-19 Richard Stallman <rms@gnu.org>
22630
22631 * src/files.c:
22632 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22633
22634 1996-12-18 Paul Eggert <eggert@gnu.org>
22635
22636 * src/bison.s1 (yyparse):
22637 If __GNUC__ and YYPARSE_PARAM are both defined,
22638 declare yyparse to have a void * argument.
22639
22640 1996-12-18 Paul Eggert <eggert@gnu.org>
22641
22642 * bison.simple (yyparse):
22643 If __GNUC__ and YYPARSE_PARAM are both defined,
22644 declare yyparse to have a void * argument.
22645
22646 1996-12-17 Richard Stallman <rms@gnu.org>
22647
22648 * src/reduce.c (nbits): Add some casts.
22649
22650 1996-08-12 Richard Stallman <rms@gnu.org>
22651
22652 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22653
22654 1996-08-12 Richard Stallman <rms@gnu.org>
22655
22656 * bison.simple: Test _MSDOS as well as _MSDOS_.
22657
22658 1996-07-31 Richard Stallman <rms@gnu.org>
22659
22660 * src/bison.s1:
22661 [__sun && __i386]: Include alloca.h.
22662
22663 1996-07-31 Richard Stallman <rms@gnu.org>
22664
22665 * bison.simple:
22666 [__sun && __i386]: Include alloca.h.
22667
22668 1996-07-30 Richard Stallman <rms@gnu.org>
22669
22670 * src/bison.s1: Comment change.
22671
22672 * src/bison.s1: Test _MSDOS_, not MSDOS.
22673
22674 1996-07-30 Richard Stallman <rms@gnu.org>
22675
22676 * bison.simple: Comment change.
22677
22678 * bison.simple: Test _MSDOS_, not MSDOS.
22679
22680 1996-06-01 Richard Stallman <rms@gnu.org>
22681
22682 * 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:
22683 Insert `_' macro around many string constants.
22684
22685 * src/main.c:
22686 Insert `_' macro around many string constants.
22687
22688 (main): Call setlocale, bindtextdomain and textdomain.
22689
22690 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22691 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22692 [ENABLE_NLS]: Include libintl.h.
22693 [ENABLE_NLS] (gettext): Define.
22694 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22695 (N_, PACKAGE, LOCALEDIR): New macros.
22696
22697 1996-06-01 Richard Stallman <rms@gnu.org>
22698
22699 * POTFILES.in: New file.
22700
22701 * Makefile.in (allocate.o):
22702 Define target explicitly.
22703
22704 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22705 (LDFLAGS): Set to @LDFLAGS@.
22706 (configure): Run autoconf only if preceding `cd' succeeds.
22707 (bison.s1): Redirect output to temporary file then move the
22708 temporary to the target, rather than redirecting directly to bison.s1.
22709 (clean): Remove config.status and config.log.
22710 (distclean): Don't remove config.status here.
22711
22712 1996-05-12 Richard Stallman <rms@gnu.org>
22713
22714 * src/bison.s1:
22715 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22716
22717 1996-05-12 Richard Stallman <rms@gnu.org>
22718
22719 * bison.simple:
22720 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22721
22722 1996-05-11 Richard Stallman <rms@gnu.org>
22723
22724 * src/bison.s1 (__yy_memcpy):
22725 Really reorder the args, as was supposedly done on Feb 14 1995.
22726 (yyparse): Calls changed accordingly.
22727
22728 1996-05-11 Richard Stallman <rms@gnu.org>
22729
22730 * Makefile.in (dist): Don't use $(srcdir).
22731
22732 * bison.simple (__yy_memcpy):
22733 Really reorder the args, as was supposedly done on Feb 14 1995.
22734 (yyparse): Calls changed accordingly.
22735
22736 1996-01-27 Richard Stallman <rms@gnu.org>
22737
22738 * src/output.c (output_rule_data):
22739 Test YYERROR_VERBOSE in the conditional
22740 around the definition of ttyname.
22741
22742 1995-12-29 Richard Stallman <rms@gnu.org>
22743
22744 * src/bison.s1:
22745 Fix line numbers in #line commands.
22746
22747 1995-12-29 Richard Stallman <rms@gnu.org>
22748
22749 * bison.simple:
22750 Fix line numbers in #line commands.
22751
22752 1995-12-27 Richard Stallman <rms@gnu.org>
22753
22754 * src/bison.s1 (YYPARSE_PARAM_DECL):
22755 In C++, make it always null.
22756 (YYPARSE_PARAM_ARG): New macro.
22757 (yyparse): Use YYPARSE_PARAM_ARG.
22758
22759 1995-12-27 Richard Stallman <rms@gnu.org>
22760
22761 * bison.simple (YYPARSE_PARAM_DECL):
22762 In C++, make it always null.
22763 (YYPARSE_PARAM_ARG): New macro.
22764 (yyparse): Use YYPARSE_PARAM_ARG.
22765
22766 1995-11-29 Richard Stallman <rms@gnu.org>
22767
22768 * doc/bison.texinfo:
22769 Describe literal string tokens, %raw, %no_lines, %token_table.
22770
22771 1995-11-29 Daniel Hagerty <hag@gnu.org>
22772
22773 * doc/bison.texinfo: Fixed update date
22774
22775 1995-10-16 Richard Stallman <rms@gnu.org>
22776
22777 * src/version.c: Version 1.25.
22778
22779 1995-10-16 Richard Stallman <rms@gnu.org>
22780
22781 * NEWS: *** empty log message ***
22782
22783 1995-10-16 Richard Stallman <rms@gnu.org>
22784
22785 * doc/bison.1, doc/bison.rnh:
22786 Add new options.
22787
22788 1995-10-15 Richard Stallman <rms@gnu.org>
22789
22790 * src/vmsgetargs.c, src/getargs.c:
22791 Added -n, -k, and -raw switches.
22792 (noparserflag, toknumflag, rawtoknumflag): New variables.
22793
22794 * src/symtab.h (SALIAS):
22795 New #define for adding aliases to %token.
22796 (struct bucket): Added `alias' field.
22797
22798 * src/reduce.c (reduce_grammar):
22799 Revise error message.
22800 (print_notices): Remove final `.' from error message.
22801
22802 * src/reader.c (reader_output_yylsp):
22803 New function.
22804 (readgram): Use `#if 0' around code that accepted %command
22805 inside grammar rules: The documentation doesn't allow it,
22806 and it will fail since the %command processors scan for the next %.
22807 (parse_token_decl): Extended the %token
22808 declaration to allow a multi-character symbol as an alias.
22809 (parse_thong_decl): New function.
22810 (read_declarations): Added %thong declarations.
22811 (read_declarations): Handle NOOP to deal with allowing
22812 % declarations as another means to specify the flags.
22813 (readgram): Allow %prec prior to semantics embedded in a rule.
22814 (skip_to_char, read_declarations, copy_definition)
22815 (parse_token_decl, parse_start_decl, parse_type_decl)
22816 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22817 (get_type_name, copy_guard, copy_action, readgram)
22818 (get_type, packsymbols): Revised most error messages.
22819 Changed `fatal' to `warnxxx' to avoid aborting for error.
22820 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22821 (read_declarations): Improve the error message for
22822 an invalid character. Do not abort.
22823 (read_declarations, copy_guard, copy_action): Use
22824 printable_version to avoid unprintable characters in printed output.
22825 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22826 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22827 Allow the type of a non-terminal can be given
22828 more than once, as long as all specifications give the same type.
22829
22830 * src/output.c:
22831 (output_headers, output_trailers, output, output_gram)
22832 (output_rule_data): Implement noparserflag variable.
22833 Implement toknumflag variable.
22834 (output): Call reader_output_yylsp to output LTYPESTR.
22835
22836 * src/main.c (main):
22837 If reader sees an error, don't process the grammar.
22838 (fatals): Updated to not use VARARGS1.
22839 (printable_version, int_to_string, warn, warni, warns, warnss)
22840 (warnsss): New error reporting functions. Avoid abort for error.
22841
22842 * src/lex.h:
22843 Added THONG and NOOP for alias processing.
22844 Added SETOPT for the new code that allows setting options with %flags.
22845
22846 * src/lex.c:
22847 Include getopt.h. Add some extern decls.
22848 (safegetc): New function to deal with EOF gracefully.
22849 (literalchar); new function to deal with reading \ escapes.
22850 (lex): Use literalchar.
22851 (lex): Implemented "..." tokens.
22852 (literalchar, lex, parse_percent_token): Made tokenbuffer
22853 always contain the token. This includes growing the token
22854 buffer while reading an integer.
22855 (parse_percent_token): Replaced if-else statement with percent_table.
22856 (parse_percent_token): Added % declarations as another
22857 way to specify the flags -n, -l, and -r. Also added hooks for
22858 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
22859 major changes to files.c.
22860 (lex) Retain in the incoming stream a character following
22861 an incorrect '/'.
22862 (skip_white_space, lex): Revised most error messages
22863 and changed fatal to warn to avoid aborting.
22864 (percent_table): Added %thong declarations.
22865
22866 * src/gram.h: Comment changes.
22867
22868 * src/files.c (openfiles, open_extra_files, done):
22869 Add faction flag
22870 and actfile file. Handle noparserflag. Both for -n switch.
22871
22872 * src/conflicts.c (resolve_sr_conflict):
22873 Remove use of alloca.
22874
22875 1995-06-01 Jim Meyering <meyering@gnu.org>
22876
22877 * doc/bison.texinfo: *** empty log message ***
22878
22879 1995-05-06 Richard Stallman <rms@gnu.org>
22880
22881 * src/bison.s1: Comment change.
22882
22883 1995-05-06 Richard Stallman <rms@gnu.org>
22884
22885 * bison.simple: Comment change.
22886
22887 1995-05-03 Richard Stallman <rms@gnu.org>
22888
22889 * src/version.c: Version now 1.24.
22890
22891 * src/bison.s1: Change distribution terms.
22892
22893 * src/version.c: Version now 1.23.
22894
22895 1995-05-03 Richard Stallman <rms@gnu.org>
22896
22897 * doc/bison.texinfo:
22898 Rewrite "Conditions for Using Bison".
22899 Update version to 1.24.
22900
22901 1995-05-03 Richard Stallman <rms@gnu.org>
22902
22903 * bison.simple: Change distribution terms.
22904
22905 1995-02-23 Richard Stallman <rms@gnu.org>
22906
22907 * src/files.c: Test __VMS_POSIX as well as VMS.
22908
22909 1995-02-14 Jim Meyering <meyering@gnu.org>
22910
22911 * src/bison.s1 (__yy_memcpy):
22912 Renamed from __yy_bcopy to avoid
22913 confusion. Reverse FROM and TO arguments to be consistent with
22914 those of memcpy.
22915
22916 1995-02-14 Jim Meyering <meyering@gnu.org>
22917
22918 * bison.simple (__yy_memcpy):
22919 Renamed from __yy_bcopy to avoid
22920 confusion. Reverse FROM and TO arguments to be consistent with
22921 those of memcpy.
22922
22923 1994-11-10 David J. MacKenzie <djm@gnu.org>
22924
22925 * NEWS: reformat
22926
22927 * NEWS: New file.
22928
22929 * Makefile.in (DISTFILES): Include NEWS.
22930
22931 * Makefile.in (DISTFILES):
22932 Include install-sh, not install.sh.
22933
22934 * configure.in: Update to Autoconf v2 macro names.
22935
22936 1994-10-05 David J. MacKenzie <djm@gnu.org>
22937
22938 * Makefile.in: fix typo
22939
22940 * Makefile.in (prefix, exec_prefix):
22941 Let configure set them.
22942
22943 1994-09-28 David J. MacKenzie <djm@gnu.org>
22944
22945 * Makefile.in: Set datadir to $(prefix)/share.
22946
22947 1994-09-15 Richard Stallman <rms@gnu.org>
22948
22949 * src/bison.s1:
22950 Update copyright notice and GPL version.
22951
22952 1994-09-15 Richard Stallman <rms@gnu.org>
22953
22954 * bison.simple:
22955 Update copyright notice and GPL version.
22956
22957 1994-07-12 Richard Stallman <rms@gnu.org>
22958
22959 * src/reduce.c, src/reader.c:
22960 entered into RCS
22961
22962 1994-05-05 David J. MacKenzie <djm@gnu.org>
22963
22964 * Makefile.in: entered into RCS
22965
22966 1994-03-26 Richard Stallman <rms@gnu.org>
22967
22968 * src/bison.s1: entered into RCS
22969
22970 1994-03-26 Richard Stallman <rms@gnu.org>
22971
22972 * bison.simple: entered into RCS
22973
22974 1994-03-25 Richard Stallman <rms@gnu.org>
22975
22976 * src/main.c: entered into RCS
22977
22978 1994-03-24 Richard Stallman <rms@gnu.org>
22979
22980 * src/conflicts.c: entered into RCS
22981
22982 1994-01-02 Richard Stallman <rms@gnu.org>
22983
22984 * Makefile.in: *** empty log message ***
22985
22986 1993-11-21 Richard Stallman <rms@gnu.org>
22987
22988 * src/bison.s1: *** empty log message ***
22989
22990 1993-11-21 Richard Stallman <rms@gnu.org>
22991
22992 * doc/bison.texinfo: entered into RCS
22993
22994 * doc/bison.texinfo: *** empty log message ***
22995
22996 1993-11-21 Richard Stallman <rms@gnu.org>
22997
22998 * bison.simple: *** empty log message ***
22999
23000 1993-10-25 David J. MacKenzie <djm@gnu.org>
23001
23002 * doc/bison.texinfo: *** empty log message ***
23003
23004 1993-10-19 Richard Stallman <rms@gnu.org>
23005
23006 * src/bison.s1: *** empty log message ***
23007
23008 1993-10-19 Richard Stallman <rms@gnu.org>
23009
23010 * bison.simple: *** empty log message ***
23011
23012 1993-10-14 Richard Stallman <rms@gnu.org>
23013
23014 * src/bison.s1: *** empty log message ***
23015
23016 1993-10-14 Richard Stallman <rms@gnu.org>
23017
23018 * bison.simple: *** empty log message ***
23019
23020 1993-09-14 David J. MacKenzie <djm@gnu.org>
23021
23022 * doc/bison.texinfo: *** empty log message ***
23023
23024 1993-09-13 Noah Friedman <friedman@gnu.org>
23025
23026 * Makefile.in: *** empty log message ***
23027
23028 1993-09-10 Richard Stallman <rms@gnu.org>
23029
23030 * src/conflicts.c: *** empty log message ***
23031
23032 * src/system.h: entered into RCS
23033
23034 1993-09-10 Richard Stallman <rms@gnu.org>
23035
23036 * doc/bison.1: entered into RCS
23037
23038 1993-09-06 Noah Friedman <friedman@gnu.org>
23039
23040 * src/version.c: entered into RCS
23041
23042 1993-09-06 Noah Friedman <friedman@gnu.org>
23043
23044 * Makefile.in: *** empty log message ***
23045
23046 1993-07-30 David J. MacKenzie <djm@gnu.org>
23047
23048 * Makefile.in: *** empty log message ***
23049
23050 1993-07-24 Richard Stallman <rms@gnu.org>
23051
23052 * src/bison.s1: *** empty log message ***
23053
23054 1993-07-24 Richard Stallman <rms@gnu.org>
23055
23056 * bison.simple: *** empty log message ***
23057
23058 1993-07-08 David J. MacKenzie <djm@gnu.org>
23059
23060 * Makefile.in: *** empty log message ***
23061
23062 1993-07-04 Richard Stallman <rms@gnu.org>
23063
23064 * src/bison.s1: *** empty log message ***
23065
23066 1993-07-04 Richard Stallman <rms@gnu.org>
23067
23068 * bison.simple: *** empty log message ***
23069
23070 1993-06-26 David J. MacKenzie <djm@gnu.org>
23071
23072 * src/getargs.c: entered into RCS
23073
23074 1993-06-26 David J. MacKenzie <djm@gnu.org>
23075
23076 * doc/bison.texinfo: *** empty log message ***
23077
23078 * doc/bison.1: New file.
23079
23080 1993-06-25 Richard Stallman <rms@gnu.org>
23081
23082 * src/getargs.c: New file.
23083
23084 1993-06-16 Richard Stallman <rms@gnu.org>
23085
23086 * src/bison.s1: *** empty log message ***
23087
23088 1993-06-16 Richard Stallman <rms@gnu.org>
23089
23090 * bison.simple: *** empty log message ***
23091
23092 1993-06-03 Richard Stallman <rms@gnu.org>
23093
23094 * src/bison.s1: New file.
23095
23096 1993-06-03 Richard Stallman <rms@gnu.org>
23097
23098 * doc/bison.texinfo: *** empty log message ***
23099
23100 1993-06-03 Richard Stallman <rms@gnu.org>
23101
23102 * bison.simple: New file.
23103
23104 1993-05-19 Richard Stallman <rms@gnu.org>
23105
23106 * doc/bison.texinfo: New file.
23107
23108 1993-05-07 Noah Friedman <friedman@gnu.org>
23109
23110 * Makefile.in: *** empty log message ***
23111
23112 1993-04-28 Noah Friedman <friedman@gnu.org>
23113
23114 * src/reader.c: *** empty log message ***
23115
23116 1993-04-23 Noah Friedman <friedman@gnu.org>
23117
23118 * src/alloc.h: entered into RCS
23119
23120 1993-04-20 David J. MacKenzie <djm@gnu.org>
23121
23122 * src/version.c: *** empty log message ***
23123
23124 * src/files.c, src/allocate.c:
23125 entered into RCS
23126
23127 * src/reader.c: *** empty log message ***
23128
23129 * src/lex.c: entered into RCS
23130
23131 * src/conflicts.c: New file.
23132
23133 * src/symtab.c: entered into RCS
23134
23135 * src/alloc.h: New file.
23136
23137 * src/LR0.c: entered into RCS
23138
23139 1993-04-18 Noah Friedman <friedman@gnu.org>
23140
23141 * src/reader.c: New file.
23142
23143 * src/version.c: *** empty log message ***
23144
23145 1993-04-18 Noah Friedman <friedman@gnu.org>
23146
23147 * Makefile.in: *** empty log message ***
23148
23149 1993-04-17 Noah Friedman <friedman@gnu.org>
23150
23151 * Makefile.in: *** empty log message ***
23152
23153 1993-04-15 Richard Stallman <rms@gnu.org>
23154
23155 * src/main.c, src/files.c:
23156 New file.
23157
23158 1993-04-15 Noah Friedman <friedman@gnu.org>
23159
23160 * configure.in: entered into RCS
23161
23162 * configure.in: *** empty log message ***
23163
23164 * configure.in: New file.
23165
23166 1993-04-14 Richard Stallman <rms@gnu.org>
23167
23168 * Makefile.in: New file.
23169
23170 1993-04-13 Richard Stallman <rms@gnu.org>
23171
23172 * src/version.c: New file.
23173
23174 1993-03-25 Richard Stallman <rms@gnu.org>
23175
23176 * src/output.c: entered into RCS
23177
23178 1992-09-25 Richard Stallman <rms@gnu.org>
23179
23180 * configure.bat: entered into RCS
23181
23182 1992-06-22 Richard Stallman <rms@gnu.org>
23183
23184 * src/vmsgetargs.c: entered into RCS
23185
23186 1992-06-22 Richard Stallman <rms@gnu.org>
23187
23188 * doc/bison.rnh: entered into RCS
23189
23190 1992-04-20 David J. MacKenzie <djm@gnu.org>
23191
23192 * README: entered into RCS
23193
23194 1992-01-22 Richard Stallman <rms@gnu.org>
23195
23196 * src/machine.h: entered into RCS
23197
23198 1991-12-21 Richard Stallman <rms@gnu.org>
23199
23200 * src/lalr.c, src/closure.c:
23201 entered into RCS
23202
23203 1991-12-20 Richard Stallman <rms@gnu.org>
23204
23205 * src/state.h: entered into RCS
23206
23207 1991-12-18 Richard Stallman <rms@gnu.org>
23208
23209 * src/print.c, src/nullable.c, src/derives.c:
23210 entered into RCS
23211
23212 1991-11-03 David J. MacKenzie <djm@gnu.org>
23213
23214 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23215 entered into RCS
23216
23217 1988-09-09 Richard Stallman <rms@gnu.org>
23218
23219 * src/bison.hairy: entered into RCS
23220
23221 1987-12-16 Richard Stallman <rms@gnu.org>
23222
23223 * REFERENCES: entered into RCS
23224
23225
23226 -----
23227
23228 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
23229 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
23230 2008, 2009 Free Software Foundation, Inc.
23231
23232 Copying and distribution of this file, with or without
23233 modification, are permitted provided the copyright notice and this
23234 notice are preserved.